diff --git a/dnsprovider/pkg/dnsprovider/providers/google/clouddns/clouddns.go b/dnsprovider/pkg/dnsprovider/providers/google/clouddns/clouddns.go index c3466d3cb992d..75ba98a2b6cdf 100644 --- a/dnsprovider/pkg/dnsprovider/providers/google/clouddns/clouddns.go +++ b/dnsprovider/pkg/dnsprovider/providers/google/clouddns/clouddns.go @@ -28,12 +28,12 @@ import ( dns "google.golang.org/api/dns/v1" "google.golang.org/api/option" gcfg "gopkg.in/gcfg.v1" - "k8s.io/cloud-provider-gcp/providers/gce" "k8s.io/klog/v2" "k8s.io/kops/dnsprovider/pkg/dnsprovider" "k8s.io/kops/dnsprovider/pkg/dnsprovider/providers/google/clouddns/internal" "k8s.io/kops/dnsprovider/pkg/dnsprovider/providers/google/clouddns/internal/stubs" + "k8s.io/kops/third_party/forked/gcetokensource" ) const ( @@ -70,7 +70,7 @@ func newCloudDns(config io.Reader) (*Interface, error) { projectID = cfg.Global.ProjectID } if cfg.Global.TokenURL != "" { - tokenSource = gce.NewAltTokenSource(cfg.Global.TokenURL, cfg.Global.TokenBody) + tokenSource = gcetokensource.NewAltTokenSource(cfg.Global.TokenURL, cfg.Global.TokenBody) } } return CreateInterface(projectID, tokenSource) diff --git a/go.mod b/go.mod index 40523135fafd0..c4a89fc2c6e30 100644 --- a/go.mod +++ b/go.mod @@ -89,7 +89,6 @@ require ( k8s.io/cli-runtime v0.36.0 k8s.io/client-go v0.36.0 k8s.io/cloud-provider-aws v1.34.1 - k8s.io/cloud-provider-gcp/providers v0.28.2 k8s.io/component-base v0.36.0 k8s.io/gengo v0.0.0-20250922181213-ec3ebc5fd46b k8s.io/klog/v2 v2.140.0 @@ -109,7 +108,6 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect - github.com/GoogleCloudPlatform/k8s-cloud-provider v1.25.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect diff --git a/go.sum b/go.sum index 319884c55fa4c..40191ee1a61a2 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,6 @@ github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mo github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/k8s-cloud-provider v1.25.0 h1:lwL1vLWmdBJ5h+StMEN6+GMz1J/Y0yUU3RDv+QBy+Q4= -github.com/GoogleCloudPlatform/k8s-cloud-provider v1.25.0/go.mod h1:UTfhBnADaj2rybPT049NScSh7Eall3u2ib43wmz3deg= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= @@ -810,8 +808,6 @@ k8s.io/cloud-provider v0.36.0 h1:PtiHsId1lBJixCbl5T+gUzbgOYAPschYj8tEAxxe0Ts= k8s.io/cloud-provider v0.36.0/go.mod h1:y/3sksoC0taJZR0PcAAYUqVyD6Jzu2X0lD4yCEPXPuI= k8s.io/cloud-provider-aws v1.34.1 h1:IbVH3Yg5QUrB6Uz0x/pZIP6GcmUB58FbZXPFUzfki6c= k8s.io/cloud-provider-aws v1.34.1/go.mod h1:a8p1e6RHviJmZ/ZJK9S26CpZ07uv/jCZa93opvKSDA8= -k8s.io/cloud-provider-gcp/providers v0.28.2 h1:I65pFTLNMQSj7YuW3Mg3pZIXmw0naCmF6TGAuz4/sZE= -k8s.io/cloud-provider-gcp/providers v0.28.2/go.mod h1:P8dxRvvLtX7xUwVUzA/QOqv8taCzBaVsVMnjnpjmYXE= k8s.io/component-base v0.36.0 h1:hFjEktssxiJhrK1zfybkH4kJOi8iZuF+mIDCqS5+jRo= k8s.io/component-base v0.36.0/go.mod h1:JZvIfcNHk+uck+8LhJzhSBtydWXaZNQwX2OdL+Mnwsk= k8s.io/gengo v0.0.0-20250922181213-ec3ebc5fd46b h1:8FRqbouORE7lQPnZxOONIk5xLM8CcoeD7o9cApVEsu0= diff --git a/tests/e2e/go.mod b/tests/e2e/go.mod index e5aae34ae3f7b..a151c1d99e36f 100644 --- a/tests/e2e/go.mod +++ b/tests/e2e/go.mod @@ -53,7 +53,6 @@ require ( github.com/Azure/go-autorest/logger v0.2.2 // indirect github.com/Azure/go-autorest/tracing v0.6.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect - github.com/GoogleCloudPlatform/k8s-cloud-provider v1.34.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0 // indirect @@ -250,7 +249,6 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pkg/sftp v1.13.10 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect @@ -343,9 +341,6 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/cloud-provider v0.36.0 // indirect - k8s.io/cloud-provider-gcp/providers v0.28.2 // indirect - k8s.io/component-base v0.36.0 // indirect k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect modernc.org/libc v1.66.10 // indirect diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index 500adfc0f72b3..e24224a68980b 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -105,8 +105,6 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgv github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GoogleCloudPlatform/k8s-cloud-provider v1.34.0 h1:QoaPZxsKBqKlIAwQSUJgiXlhz1Nu+Y1DgGqR7GV2uIA= -github.com/GoogleCloudPlatform/k8s-cloud-provider v1.34.0/go.mod h1:Zl1a9zE67QrQpwIib8BlF7mv7FAVXQwJDKD6rAQk/jw= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 h1:UnDZ/zFfG1JhH/DqxIZYU/1CUAlTUScoXD/LcM2Ykk8= @@ -1326,12 +1324,6 @@ k8s.io/apimachinery v0.36.0 h1:jZyPzhd5Z+3h9vJLt0z9XdzW9VzNzWAUw+P1xZ9PXtQ= k8s.io/apimachinery v0.36.0/go.mod h1:FklypaRJt6n5wUIwWXIP6GJlIpUizTgfo1T/As+Tyxc= k8s.io/client-go v0.36.0 h1:pOYi7C4RHChYjMiHpZSpSbIM6ZxVbRXBy7CuiIwqA3c= k8s.io/client-go v0.36.0/go.mod h1:ZKKcpwF0aLYfkHFCjillCKaTK/yBkEDHTDXCFY6AS9Y= -k8s.io/cloud-provider v0.36.0 h1:PtiHsId1lBJixCbl5T+gUzbgOYAPschYj8tEAxxe0Ts= -k8s.io/cloud-provider v0.36.0/go.mod h1:y/3sksoC0taJZR0PcAAYUqVyD6Jzu2X0lD4yCEPXPuI= -k8s.io/cloud-provider-gcp/providers v0.28.2 h1:I65pFTLNMQSj7YuW3Mg3pZIXmw0naCmF6TGAuz4/sZE= -k8s.io/cloud-provider-gcp/providers v0.28.2/go.mod h1:P8dxRvvLtX7xUwVUzA/QOqv8taCzBaVsVMnjnpjmYXE= -k8s.io/component-base v0.36.0 h1:hFjEktssxiJhrK1zfybkH4kJOi8iZuF+mIDCqS5+jRo= -k8s.io/component-base v0.36.0/go.mod h1:JZvIfcNHk+uck+8LhJzhSBtydWXaZNQwX2OdL+Mnwsk= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/LICENSE b/third_party/forked/gcetokensource/LICENSE similarity index 100% rename from vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/LICENSE rename to third_party/forked/gcetokensource/LICENSE diff --git a/third_party/forked/gcetokensource/doc.go b/third_party/forked/gcetokensource/doc.go new file mode 100644 index 0000000000000..2b31c7dacae25 --- /dev/null +++ b/third_party/forked/gcetokensource/doc.go @@ -0,0 +1,26 @@ +// Copyright 2015 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package gcetokensource is an in-tree copy of the AltTokenSource type from +// k8s.io/cloud-provider-gcp/providers/gce/token_source.go at tag v32.4.0. +// It is forked rather than imported so kops does not pull in the full +// cloud-provider-gcp module just for one OAuth2 helper used by the +// clouddns provider. +// +// Modifications relative to upstream: +// +// - Prometheus counters and the legacyregistry init() are removed; the +// k8s.io/component-base/metrics dependency is no longer needed +// - the build constraint and gce package name are dropped (the file is +// consumed only as a function helper, not as part of the gce package) +package gcetokensource diff --git a/third_party/forked/gcetokensource/token_source.go b/third_party/forked/gcetokensource/token_source.go new file mode 100644 index 0000000000000..70ec60cc09006 --- /dev/null +++ b/third_party/forked/gcetokensource/token_source.go @@ -0,0 +1,86 @@ +// Copyright 2015 The Kubernetes Authors. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gcetokensource + +import ( + "context" + "encoding/json" + "net/http" + "strings" + "time" + + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" + "google.golang.org/api/googleapi" + "k8s.io/client-go/util/flowcontrol" +) + +const ( + // Max QPS to allow through to the token URL. + tokenURLQPS = .05 // back off to once every 20 seconds when failing + // Maximum burst of requests to token URL before limiting. + tokenURLBurst = 3 +) + +// AltTokenSource holds the data for generating tokens from an alternate token URL. +type AltTokenSource struct { + oauthClient *http.Client + tokenURL string + tokenBody string `datapolicy:"token"` + throttle flowcontrol.RateLimiter +} + +// Token returns a token which may be used for authentication. +func (a *AltTokenSource) Token() (*oauth2.Token, error) { + a.throttle.Accept() + return a.token() +} + +func (a *AltTokenSource) token() (*oauth2.Token, error) { + req, err := http.NewRequest("POST", a.tokenURL, strings.NewReader(a.tokenBody)) + if err != nil { + return nil, err + } + res, err := a.oauthClient.Do(req) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var tok struct { + AccessToken string `json:"accessToken" datapolicy:"token"` + ExpireTime time.Time `json:"expireTime"` + } + if err := json.NewDecoder(res.Body).Decode(&tok); err != nil { + return nil, err + } + return &oauth2.Token{ + AccessToken: tok.AccessToken, + Expiry: tok.ExpireTime, + }, nil +} + +// NewAltTokenSource constructs a new alternate token source for generating tokens. +func NewAltTokenSource(tokenURL, tokenBody string) oauth2.TokenSource { + client := oauth2.NewClient(context.Background(), google.ComputeTokenSource("")) + a := &AltTokenSource{ + oauthClient: client, + tokenURL: tokenURL, + tokenBody: tokenBody, + throttle: flowcontrol.NewTokenBucketRateLimiter(tokenURLQPS, tokenURLBurst), + } + return oauth2.ReuseTokenSource(nil, a) +} diff --git a/third_party/forked/gcetokensource/token_source_test.go b/third_party/forked/gcetokensource/token_source_test.go new file mode 100644 index 0000000000000..d3d386d112337 --- /dev/null +++ b/third_party/forked/gcetokensource/token_source_test.go @@ -0,0 +1,79 @@ +/* +Copyright 2026 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package gcetokensource + +import ( + "net/http" + "net/http/httptest" + "strings" + "testing" + + "k8s.io/client-go/util/flowcontrol" +) + +func TestAltTokenSource_Token(t *testing.T) { + var gotBody string + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + body := make([]byte, r.ContentLength) + r.Body.Read(body) + gotBody = string(body) + w.Header().Set("Content-Type", "application/json") + w.Write([]byte(`{"accessToken":"abc123","expireTime":"2030-01-01T00:00:00Z"}`)) + })) + defer srv.Close() + + a := &AltTokenSource{ + oauthClient: srv.Client(), + tokenURL: srv.URL, + tokenBody: "request-body", + throttle: flowcontrol.NewTokenBucketRateLimiter(100, 100), + } + tok, err := a.Token() + if err != nil { + t.Fatalf("Token() error: %v", err) + } + if tok.AccessToken != "abc123" { + t.Errorf("AccessToken = %q, want abc123", tok.AccessToken) + } + if tok.Expiry.Year() != 2030 { + t.Errorf("Expiry = %v, want 2030", tok.Expiry) + } + if gotBody != "request-body" { + t.Errorf("server received body %q, want request-body", gotBody) + } +} + +func TestAltTokenSource_HTTPError(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "boom", http.StatusInternalServerError) + })) + defer srv.Close() + + a := &AltTokenSource{ + oauthClient: srv.Client(), + tokenURL: srv.URL, + tokenBody: "", + throttle: flowcontrol.NewTokenBucketRateLimiter(100, 100), + } + _, err := a.Token() + if err == nil { + t.Fatal("expected error on 500 response, got nil") + } + if !strings.Contains(err.Error(), "500") { + t.Errorf("error %q does not mention 500 status", err) + } +} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/constants.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/constants.go deleted file mode 100644 index a1f433bb0af9c..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/constants.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "strings" -) - -// NetworkTier represents the Network Service Tier used by a resource -type NetworkTier string - -// LbScheme represents the possible types of load balancers -type LbScheme string - -const ( - NetworkTierStandard NetworkTier = "Standard" - NetworkTierPremium NetworkTier = "Premium" - NetworkTierDefault NetworkTier = NetworkTierPremium - - SchemeExternal LbScheme = "EXTERNAL" - SchemeInternal LbScheme = "INTERNAL" -) - -// ToGCEValue converts NetworkTier to a string that we can populate the -// NetworkTier field of GCE objects, including ForwardingRules and Addresses. -func (n NetworkTier) ToGCEValue() string { - return strings.ToUpper(string(n)) -} - -// NetworkTierGCEValueToType converts the value of the NetworkTier field of a -// GCE object to the NetworkTier type. -func NetworkTierGCEValueToType(s string) NetworkTier { - switch s { - case NetworkTierStandard.ToGCEValue(): - return NetworkTierStandard - case NetworkTierPremium.ToGCEValue(): - return NetworkTierPremium - default: - return NetworkTier(s) - } -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/context.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/context.go deleted file mode 100644 index b2899a7c970a9..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/context.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "time" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -const ( - defaultCallTimeout = 1 * time.Hour -) - -// ContextWithCallTimeout returns a context with a default timeout, used for -// generated client calls. -func ContextWithCallTimeout() (context.Context, context.CancelFunc) { - return context.WithTimeout(context.Background(), defaultCallTimeout) -} - -// CallContextKey is a key identifying the most commonly used parts of an operation. -type CallContextKey struct { - // ProjectID is the non-numeric ID of the project. - ProjectID string - // Operation is the specific method being invoked (e.g. "Get", "List"). - Operation string - // Version is the API version of the call. - Version meta.Version - // Service is the service being invoked (e.g. "Firewalls", "BackendServices") - Service string -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/doc.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/doc.go deleted file mode 100644 index 1e52f6331ee82..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/doc.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package cloud implements a more golang friendly interface to the GCE compute -// API. The code in this package is generated automatically via the generator -// implemented in "gen/main.go". The code generator creates the basic CRUD -// actions for the given resource: "Insert", "Get", "List" and "Delete". -// Additional methods by customizing the ServiceInfo object (see below). -// Generated code includes a full mock of the GCE compute API. -// -// Usage -// -// The root of the GCE compute API is the interface "Cloud". Code written using -// Cloud can be used against the actual implementation "GCE" or "MockGCE". -// -// func foo(cloud Cloud) { -// igs, err := cloud.InstanceGroups().List(ctx, "us-central1-b", filter.None) -// ... -// } -// // Run foo against the actual cloud. -// foo(NewGCE(&Service{...})) -// // Run foo with a mock. -// foo(NewMockGCE()) -// -// Rate limiting and routing -// -// The generated code allows for custom policies for operation rate limiting -// and GCE project routing. See RateLimiter and ProjectRouter for more details. -// -// Mocks -// -// Mocks are automatically generated for each type implementing basic logic for -// resource manipulation. This eliminates the boilerplate required to mock GCE -// functionality. Each method will also have a corresponding "xxxHook" -// function generated in the mock structure where unit test code can hook the -// execution of the method. -// -// Mocks for different versions of the same service will share the same set of -// objects, i.e. an alpha object will be visible with beta and GA methods. -// Note that translation is done with JSON serialization between the API versions. -// -// Changing service code generation -// -// The list of services to generate is contained in "meta/meta.go". To add a -// service, add an entry to the list "meta.AllServices". An example entry: -// -// &ServiceInfo{ -// Object: "InstanceGroup", // Name of the object type. -// Service: "InstanceGroups", // Name of the service. -// Resource: "instanceGroups", // Lowercase resource name (as appears in the URL). -// version: meta.VersionAlpha, // API version (one entry per version is needed). -// keyType: Zonal, // What kind of resource this is. -// serviceType: reflect.TypeOf(&alpha.InstanceGroupsService{}), // Associated golang type. -// additionalMethods: []string{ // Additional methods to generate code for. -// "SetNamedPorts", -// }, -// options: // Or'd ("|") together. -// } -// -// Read-only objects -// -// Services such as Regions and Zones do not allow for mutations. Specify -// "ReadOnly" in ServiceInfo.options to omit the mutation methods. -// -// Adding custom methods -// -// Some methods that may not be properly handled by the generated code. To enable -// addition of custom code to the generated mocks, set the "CustomOps" option -// in "meta.ServiceInfo" entry. This will make the generated service interface -// embed a "Ops" interface. This interface MUST be written by hand -// and contain the custom method logic. Corresponding methods must be added to -// the corresponding Mockxxx and GCExxx struct types. -// -// // In "meta/meta.go": -// &ServiceInfo{ -// Object: "InstanceGroup", -// ... -// options: CustomOps, -// } -// -// // In the generated code "gen.go": -// type InstanceGroups interface { -// InstanceGroupsOps // Added by CustomOps option. -// ... -// } -// -// // In hand written file: -// type InstanceGroupsOps interface { -// MyMethod() -// } -// -// func (mock *MockInstanceGroups) MyMethod() { -// // Custom mock implementation. -// } -// -// func (gce *GCEInstanceGroups) MyMethod() { -// // Custom implementation. -// } -// -// Update generated codes -// -// Run hack/update-cloudprovider-gce.sh to update the generated codes. -// -package cloud diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go deleted file mode 100644 index fbf0f508d0b68..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go +++ /dev/null @@ -1,321 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package filter encapsulates the filter argument to compute API calls. -// -// // List all global addresses (no filter). -// c.GlobalAddresses().List(ctx, filter.None) -// -// // List global addresses filtering for name matching "abc.*". -// c.GlobalAddresses().List(ctx, filter.Regexp("name", "abc.*")) -// -// // List on multiple conditions. -// f := filter.Regexp("name", "homer.*").AndNotRegexp("name", "homers") -// c.GlobalAddresses().List(ctx, f) -package filter - -import ( - "errors" - "fmt" - "reflect" - "regexp" - "strings" - - "k8s.io/klog/v2" -) - -var ( - // None indicates that the List result set should not be filter (i.e. - // return all values). - None *F -) - -// Regexp returns a filter for fieldName eq regexp v. -func Regexp(fieldName, v string) *F { - return (&F{}).AndRegexp(fieldName, v) -} - -// NotRegexp returns a filter for fieldName ne regexp v. -func NotRegexp(fieldName, v string) *F { - return (&F{}).AndNotRegexp(fieldName, v) -} - -// EqualInt returns a filter for fieldName eq v. -func EqualInt(fieldName string, v int) *F { - return (&F{}).AndEqualInt(fieldName, v) -} - -// NotEqualInt returns a filter for fieldName ne v. -func NotEqualInt(fieldName string, v int) *F { - return (&F{}).AndNotEqualInt(fieldName, v) -} - -// EqualBool returns a filter for fieldName eq v. -func EqualBool(fieldName string, v bool) *F { - return (&F{}).AndEqualBool(fieldName, v) -} - -// NotEqualBool returns a filter for fieldName ne v. -func NotEqualBool(fieldName string, v bool) *F { - return (&F{}).AndNotEqualBool(fieldName, v) -} - -// F is a filter to be used with List() operations. -// -// From the compute API description: -// -// Sets a filter {expression} for filtering listed resources. Your {expression} -// must be in the format: field_name comparison_string literal_string. -// -// The field_name is the name of the field you want to compare. Only atomic field -// types are supported (string, number, boolean). The comparison_string must be -// either eq (equals) or ne (not equals). The literal_string is the string value -// to filter to. The literal value must be valid for the type of field you are -// filtering by (string, number, boolean). For string fields, the literal value is -// interpreted as a regular expression using RE2 syntax. The literal value must -// match the entire field. -// -// For example, to filter for instances that do not have a name of -// example-instance, you would use name ne example-instance. -// -// You can filter on nested fields. For example, you could filter on instances -// that have set the scheduling.automaticRestart field to true. Use filtering on -// nested fields to take advantage of labels to organize and search for results -// based on label values. -// -// To filter on multiple expressions, provide each separate expression within -// parentheses. For example, (scheduling.automaticRestart eq true) -// (zone eq us-central1-f). Multiple expressions are treated as AND expressions, -// meaning that resources must match all expressions to pass the filters. -type F struct { - predicates []filterPredicate -} - -// TODO(rramkumar): Support logical OR - -// And joins two filters together. -func (fl *F) And(rest *F) *F { - fl.predicates = append(fl.predicates, rest.predicates...) - return fl -} - -// AndRegexp adds a field ~ string predicate. -func (fl *F) AndRegexp(fieldName, v string) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: regexpEquals, s: &v}) - return fl -} - -// AndNotRegexp adds a field !~ string predicate. -func (fl *F) AndNotRegexp(fieldName, v string) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: regexpNotEquals, s: &v}) - return fl -} - -// AndEqualInt adds a field = int predicate. -func (fl *F) AndEqualInt(fieldName string, v int) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: equals, i: &v}) - return fl -} - -// AndNotEqualInt adds a field != int predicate. -func (fl *F) AndNotEqualInt(fieldName string, v int) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: notEquals, i: &v}) - return fl -} - -// AndEqualBool adds a field = bool predicate. -func (fl *F) AndEqualBool(fieldName string, v bool) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: equals, b: &v}) - return fl -} - -// AndNotEqualBool adds a field != bool predicate. -func (fl *F) AndNotEqualBool(fieldName string, v bool) *F { - fl.predicates = append(fl.predicates, filterPredicate{fieldName: fieldName, op: notEquals, b: &v}) - return fl -} - -func (fl *F) String() string { - if len(fl.predicates) == 1 { - return fl.predicates[0].String() - } - - var pl []string - for _, p := range fl.predicates { - pl = append(pl, "("+p.String()+")") - } - return strings.Join(pl, " ") -} - -// Match returns true if the F as specifies matches the given object. This -// is used by the Mock implementations to perform filtering and SHOULD NOT be -// used in production code as it is not well-tested to be equivalent to the -// actual compute API. -func (fl *F) Match(obj interface{}) bool { - if fl == nil { - return true - } - for _, p := range fl.predicates { - if !p.match(obj) { - return false - } - } - return true -} - -type filterOp int - -const ( - regexpEquals filterOp = iota - regexpNotEquals filterOp = iota - equals filterOp = iota - notEquals filterOp = iota -) - -// filterPredicate is an individual predicate for a fieldName and value. -type filterPredicate struct { - fieldName string - - op filterOp - s *string - i *int - b *bool -} - -func (fp *filterPredicate) String() string { - var op string - switch fp.op { - case regexpEquals: - // GCE API maps regexp comparison to 'eq' - op = "eq" - case regexpNotEquals: - op = "ne" - // Since GCE API does not allow using a mix of 'eq' and '=' operators, - // we use 'eq' everywhere - case equals: - op = "eq" - case notEquals: - op = "ne" - default: - op = "invalidOp" - } - - var value string - switch { - case fp.s != nil: - // There does not seem to be any sort of escaping as specified in the - // document. This means it's possible to create malformed expressions. - value = *fp.s - case fp.i != nil: - value = fmt.Sprintf("%d", *fp.i) - case fp.b != nil: - value = fmt.Sprintf("%t", *fp.b) - default: - value = "invalidValue" - } - - return fmt.Sprintf("%s %s %s", fp.fieldName, op, value) -} - -func (fp *filterPredicate) match(o interface{}) bool { - v, err := extractValue(fp.fieldName, o) - klog.V(6).Infof("extractValue(%q, %#v) = %v, %v", fp.fieldName, o, v, err) - if err != nil { - return false - } - - var match bool - switch x := v.(type) { - case string: - if fp.s == nil { - return false - } - re, err := regexp.Compile(*fp.s) - if err != nil { - klog.Errorf("Match regexp %q is invalid: %v", *fp.s, err) - return false - } - match = x == *fp.s - if fp.op < regexpNotEquals { - match = re.Match([]byte(x)) - } - case int: - if fp.i == nil { - return false - } - match = x == *fp.i - case bool: - if fp.b == nil { - return false - } - match = x == *fp.b - } - - switch fp.op { - case regexpEquals: - return match - case regexpNotEquals: - return !match - case equals: - return match - case notEquals: - return !match - } - - return false -} - -// snakeToCamelCase converts from "names_like_this" to "NamesLikeThis" to -// interoperate between proto and Golang naming conventions. -func snakeToCamelCase(s string) string { - parts := strings.Split(s, "_") - var ret string - for _, x := range parts { - ret += strings.Title(x) - } - return ret -} - -// extractValue returns the value of the field named by path in object o if it exists. -func extractValue(path string, o interface{}) (interface{}, error) { - parts := strings.Split(path, ".") - for _, f := range parts { - v := reflect.ValueOf(o) - // Dereference Ptr to handle *struct. - if v.Kind() == reflect.Ptr { - if v.IsNil() { - return nil, errors.New("field is nil") - } - v = v.Elem() - } - if v.Kind() != reflect.Struct { - return nil, fmt.Errorf("cannot get field from non-struct (%T)", o) - } - v = v.FieldByName(snakeToCamelCase(f)) - if !v.IsValid() { - return nil, fmt.Errorf("cannot get field %q as it is not a valid field in %T", f, o) - } - if !v.CanInterface() { - return nil, fmt.Errorf("cannot get field %q in obj of type %T", f, o) - } - o = v.Interface() - } - switch o.(type) { - case string, int, bool: - return o, nil - } - return nil, fmt.Errorf("unhandled object of type %T", o) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gce_projects.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gce_projects.go deleted file mode 100644 index 31a1b048f2685..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gce_projects.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "fmt" - "net/http" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -// ProjectsOps is the manually implemented methods for the Projects service. -type ProjectsOps interface { - Get(ctx context.Context, projectID string) (*compute.Project, error) - SetCommonInstanceMetadata(ctx context.Context, projectID string, m *compute.Metadata) error -} - -// MockProjectOpsState is stored in the mock.X field. -type MockProjectOpsState struct { - metadata map[string]*compute.Metadata -} - -// Get a project by projectID. -func (m *MockProjects) Get(ctx context.Context, projectID string) (*compute.Project, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - if p, ok := m.Objects[*meta.GlobalKey(projectID)]; ok { - return p.ToGA(), nil - } - return nil, &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockProjects %v not found", projectID), - } -} - -// Get a project by projectID. -func (g *GCEProjects) Get(ctx context.Context, projectID string) (*compute.Project, error) { - rk := &RateLimitKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Projects", - } - if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { - return nil, err - } - call := g.s.GA.Projects.Get(projectID) - call.Context(ctx) - v, err := call.Do() - g.s.RateLimiter.Observe(ctx, err, rk) - return v, err -} - -// SetCommonInstanceMetadata for a given project. -func (m *MockProjects) SetCommonInstanceMetadata(ctx context.Context, projectID string, meta *compute.Metadata) error { - if m.X == nil { - m.X = &MockProjectOpsState{metadata: map[string]*compute.Metadata{}} - } - state := m.X.(*MockProjectOpsState) - state.metadata[projectID] = meta - return nil -} - -// SetCommonInstanceMetadata for a given project. -func (g *GCEProjects) SetCommonInstanceMetadata(ctx context.Context, projectID string, m *compute.Metadata) error { - rk := &RateLimitKey{ - ProjectID: projectID, - Operation: "SetCommonInstanceMetadata", - Version: meta.Version("ga"), - Service: "Projects", - } - if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { - return err - } - call := g.s.GA.Projects.SetCommonInstanceMetadata(projectID, m) - call.Context(ctx) - - op, err := call.Do() - g.s.RateLimiter.Observe(ctx, err, rk) - if err != nil { - return err - } - return g.s.WaitForCompletion(ctx, op) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go deleted file mode 100644 index a9b08fe824b27..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go +++ /dev/null @@ -1,50322 +0,0 @@ -/* -Copyright 2023 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was generated by "go run gen/main.go > gen.go". Do not edit -// directly. - -package cloud - -import ( - "context" - "fmt" - "net/http" - "sync" - - "google.golang.org/api/googleapi" - "k8s.io/klog/v2" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - computega "google.golang.org/api/compute/v1" - networkservicesga "google.golang.org/api/networkservices/v1" - networkservicesbeta "google.golang.org/api/networkservices/v1beta1" -) - -func kLogEnabled(level klog.Level) bool { - return klog.V(level).Enabled() == true -} - -// Cloud is an interface for the GCE compute API. -type Cloud interface { - Addresses() Addresses - AlphaAddresses() AlphaAddresses - BetaAddresses() BetaAddresses - AlphaGlobalAddresses() AlphaGlobalAddresses - BetaGlobalAddresses() BetaGlobalAddresses - GlobalAddresses() GlobalAddresses - BackendServices() BackendServices - BetaBackendServices() BetaBackendServices - AlphaBackendServices() AlphaBackendServices - RegionBackendServices() RegionBackendServices - AlphaRegionBackendServices() AlphaRegionBackendServices - BetaRegionBackendServices() BetaRegionBackendServices - Disks() Disks - RegionDisks() RegionDisks - AlphaFirewalls() AlphaFirewalls - BetaFirewalls() BetaFirewalls - Firewalls() Firewalls - AlphaNetworkFirewallPolicies() AlphaNetworkFirewallPolicies - AlphaRegionNetworkFirewallPolicies() AlphaRegionNetworkFirewallPolicies - ForwardingRules() ForwardingRules - AlphaForwardingRules() AlphaForwardingRules - BetaForwardingRules() BetaForwardingRules - AlphaGlobalForwardingRules() AlphaGlobalForwardingRules - BetaGlobalForwardingRules() BetaGlobalForwardingRules - GlobalForwardingRules() GlobalForwardingRules - HealthChecks() HealthChecks - AlphaHealthChecks() AlphaHealthChecks - BetaHealthChecks() BetaHealthChecks - AlphaRegionHealthChecks() AlphaRegionHealthChecks - BetaRegionHealthChecks() BetaRegionHealthChecks - RegionHealthChecks() RegionHealthChecks - HttpHealthChecks() HttpHealthChecks - HttpsHealthChecks() HttpsHealthChecks - InstanceGroups() InstanceGroups - Instances() Instances - BetaInstances() BetaInstances - AlphaInstances() AlphaInstances - InstanceGroupManagers() InstanceGroupManagers - InstanceTemplates() InstanceTemplates - Images() Images - BetaImages() BetaImages - AlphaImages() AlphaImages - AlphaNetworks() AlphaNetworks - BetaNetworks() BetaNetworks - Networks() Networks - AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups - BetaNetworkEndpointGroups() BetaNetworkEndpointGroups - NetworkEndpointGroups() NetworkEndpointGroups - AlphaGlobalNetworkEndpointGroups() AlphaGlobalNetworkEndpointGroups - BetaGlobalNetworkEndpointGroups() BetaGlobalNetworkEndpointGroups - GlobalNetworkEndpointGroups() GlobalNetworkEndpointGroups - Projects() Projects - Regions() Regions - AlphaRouters() AlphaRouters - BetaRouters() BetaRouters - Routers() Routers - Routes() Routes - BetaSecurityPolicies() BetaSecurityPolicies - ServiceAttachments() ServiceAttachments - BetaServiceAttachments() BetaServiceAttachments - AlphaServiceAttachments() AlphaServiceAttachments - SslCertificates() SslCertificates - BetaSslCertificates() BetaSslCertificates - AlphaSslCertificates() AlphaSslCertificates - AlphaRegionSslCertificates() AlphaRegionSslCertificates - BetaRegionSslCertificates() BetaRegionSslCertificates - RegionSslCertificates() RegionSslCertificates - SslPolicies() SslPolicies - RegionSslPolicies() RegionSslPolicies - AlphaSubnetworks() AlphaSubnetworks - BetaSubnetworks() BetaSubnetworks - Subnetworks() Subnetworks - AlphaTargetHttpProxies() AlphaTargetHttpProxies - BetaTargetHttpProxies() BetaTargetHttpProxies - TargetHttpProxies() TargetHttpProxies - AlphaRegionTargetHttpProxies() AlphaRegionTargetHttpProxies - BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies - RegionTargetHttpProxies() RegionTargetHttpProxies - TargetHttpsProxies() TargetHttpsProxies - AlphaTargetHttpsProxies() AlphaTargetHttpsProxies - BetaTargetHttpsProxies() BetaTargetHttpsProxies - AlphaRegionTargetHttpsProxies() AlphaRegionTargetHttpsProxies - BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies - RegionTargetHttpsProxies() RegionTargetHttpsProxies - TargetPools() TargetPools - AlphaTargetTcpProxies() AlphaTargetTcpProxies - BetaTargetTcpProxies() BetaTargetTcpProxies - TargetTcpProxies() TargetTcpProxies - AlphaUrlMaps() AlphaUrlMaps - BetaUrlMaps() BetaUrlMaps - UrlMaps() UrlMaps - AlphaRegionUrlMaps() AlphaRegionUrlMaps - BetaRegionUrlMaps() BetaRegionUrlMaps - RegionUrlMaps() RegionUrlMaps - Zones() Zones - TcpRoutes() TcpRoutes - BetaTcpRoutes() BetaTcpRoutes - Meshes() Meshes - BetaMeshes() BetaMeshes -} - -// NewGCE returns a GCE. -func NewGCE(s *Service) *GCE { - g := &GCE{ - gceAddresses: &GCEAddresses{s}, - gceAlphaAddresses: &GCEAlphaAddresses{s}, - gceBetaAddresses: &GCEBetaAddresses{s}, - gceAlphaGlobalAddresses: &GCEAlphaGlobalAddresses{s}, - gceBetaGlobalAddresses: &GCEBetaGlobalAddresses{s}, - gceGlobalAddresses: &GCEGlobalAddresses{s}, - gceBackendServices: &GCEBackendServices{s}, - gceBetaBackendServices: &GCEBetaBackendServices{s}, - gceAlphaBackendServices: &GCEAlphaBackendServices{s}, - gceRegionBackendServices: &GCERegionBackendServices{s}, - gceAlphaRegionBackendServices: &GCEAlphaRegionBackendServices{s}, - gceBetaRegionBackendServices: &GCEBetaRegionBackendServices{s}, - gceDisks: &GCEDisks{s}, - gceRegionDisks: &GCERegionDisks{s}, - gceAlphaFirewalls: &GCEAlphaFirewalls{s}, - gceBetaFirewalls: &GCEBetaFirewalls{s}, - gceFirewalls: &GCEFirewalls{s}, - gceAlphaNetworkFirewallPolicies: &GCEAlphaNetworkFirewallPolicies{s}, - gceAlphaRegionNetworkFirewallPolicies: &GCEAlphaRegionNetworkFirewallPolicies{s}, - gceForwardingRules: &GCEForwardingRules{s}, - gceAlphaForwardingRules: &GCEAlphaForwardingRules{s}, - gceBetaForwardingRules: &GCEBetaForwardingRules{s}, - gceAlphaGlobalForwardingRules: &GCEAlphaGlobalForwardingRules{s}, - gceBetaGlobalForwardingRules: &GCEBetaGlobalForwardingRules{s}, - gceGlobalForwardingRules: &GCEGlobalForwardingRules{s}, - gceHealthChecks: &GCEHealthChecks{s}, - gceAlphaHealthChecks: &GCEAlphaHealthChecks{s}, - gceBetaHealthChecks: &GCEBetaHealthChecks{s}, - gceAlphaRegionHealthChecks: &GCEAlphaRegionHealthChecks{s}, - gceBetaRegionHealthChecks: &GCEBetaRegionHealthChecks{s}, - gceRegionHealthChecks: &GCERegionHealthChecks{s}, - gceHttpHealthChecks: &GCEHttpHealthChecks{s}, - gceHttpsHealthChecks: &GCEHttpsHealthChecks{s}, - gceInstanceGroups: &GCEInstanceGroups{s}, - gceInstances: &GCEInstances{s}, - gceBetaInstances: &GCEBetaInstances{s}, - gceAlphaInstances: &GCEAlphaInstances{s}, - gceInstanceGroupManagers: &GCEInstanceGroupManagers{s}, - gceInstanceTemplates: &GCEInstanceTemplates{s}, - gceImages: &GCEImages{s}, - gceBetaImages: &GCEBetaImages{s}, - gceAlphaImages: &GCEAlphaImages{s}, - gceAlphaNetworks: &GCEAlphaNetworks{s}, - gceBetaNetworks: &GCEBetaNetworks{s}, - gceNetworks: &GCENetworks{s}, - gceAlphaNetworkEndpointGroups: &GCEAlphaNetworkEndpointGroups{s}, - gceBetaNetworkEndpointGroups: &GCEBetaNetworkEndpointGroups{s}, - gceNetworkEndpointGroups: &GCENetworkEndpointGroups{s}, - gceAlphaGlobalNetworkEndpointGroups: &GCEAlphaGlobalNetworkEndpointGroups{s}, - gceBetaGlobalNetworkEndpointGroups: &GCEBetaGlobalNetworkEndpointGroups{s}, - gceGlobalNetworkEndpointGroups: &GCEGlobalNetworkEndpointGroups{s}, - gceProjects: &GCEProjects{s}, - gceRegions: &GCERegions{s}, - gceAlphaRouters: &GCEAlphaRouters{s}, - gceBetaRouters: &GCEBetaRouters{s}, - gceRouters: &GCERouters{s}, - gceRoutes: &GCERoutes{s}, - gceBetaSecurityPolicies: &GCEBetaSecurityPolicies{s}, - gceServiceAttachments: &GCEServiceAttachments{s}, - gceBetaServiceAttachments: &GCEBetaServiceAttachments{s}, - gceAlphaServiceAttachments: &GCEAlphaServiceAttachments{s}, - gceSslCertificates: &GCESslCertificates{s}, - gceBetaSslCertificates: &GCEBetaSslCertificates{s}, - gceAlphaSslCertificates: &GCEAlphaSslCertificates{s}, - gceAlphaRegionSslCertificates: &GCEAlphaRegionSslCertificates{s}, - gceBetaRegionSslCertificates: &GCEBetaRegionSslCertificates{s}, - gceRegionSslCertificates: &GCERegionSslCertificates{s}, - gceSslPolicies: &GCESslPolicies{s}, - gceRegionSslPolicies: &GCERegionSslPolicies{s}, - gceAlphaSubnetworks: &GCEAlphaSubnetworks{s}, - gceBetaSubnetworks: &GCEBetaSubnetworks{s}, - gceSubnetworks: &GCESubnetworks{s}, - gceAlphaTargetHttpProxies: &GCEAlphaTargetHttpProxies{s}, - gceBetaTargetHttpProxies: &GCEBetaTargetHttpProxies{s}, - gceTargetHttpProxies: &GCETargetHttpProxies{s}, - gceAlphaRegionTargetHttpProxies: &GCEAlphaRegionTargetHttpProxies{s}, - gceBetaRegionTargetHttpProxies: &GCEBetaRegionTargetHttpProxies{s}, - gceRegionTargetHttpProxies: &GCERegionTargetHttpProxies{s}, - gceTargetHttpsProxies: &GCETargetHttpsProxies{s}, - gceAlphaTargetHttpsProxies: &GCEAlphaTargetHttpsProxies{s}, - gceBetaTargetHttpsProxies: &GCEBetaTargetHttpsProxies{s}, - gceAlphaRegionTargetHttpsProxies: &GCEAlphaRegionTargetHttpsProxies{s}, - gceBetaRegionTargetHttpsProxies: &GCEBetaRegionTargetHttpsProxies{s}, - gceRegionTargetHttpsProxies: &GCERegionTargetHttpsProxies{s}, - gceTargetPools: &GCETargetPools{s}, - gceAlphaTargetTcpProxies: &GCEAlphaTargetTcpProxies{s}, - gceBetaTargetTcpProxies: &GCEBetaTargetTcpProxies{s}, - gceTargetTcpProxies: &GCETargetTcpProxies{s}, - gceAlphaUrlMaps: &GCEAlphaUrlMaps{s}, - gceBetaUrlMaps: &GCEBetaUrlMaps{s}, - gceUrlMaps: &GCEUrlMaps{s}, - gceAlphaRegionUrlMaps: &GCEAlphaRegionUrlMaps{s}, - gceBetaRegionUrlMaps: &GCEBetaRegionUrlMaps{s}, - gceRegionUrlMaps: &GCERegionUrlMaps{s}, - gceZones: &GCEZones{s}, - tdTcpRoutes: &TDTcpRoutes{s}, - tdBetaTcpRoutes: &TDBetaTcpRoutes{s}, - tdMeshes: &TDMeshes{s}, - tdBetaMeshes: &TDBetaMeshes{s}, - } - return g -} - -// GCE implements Cloud. -var _ Cloud = (*GCE)(nil) - -// GCE is the golang adapter for the compute APIs. -type GCE struct { - gceAddresses *GCEAddresses - gceAlphaAddresses *GCEAlphaAddresses - gceBetaAddresses *GCEBetaAddresses - gceAlphaGlobalAddresses *GCEAlphaGlobalAddresses - gceBetaGlobalAddresses *GCEBetaGlobalAddresses - gceGlobalAddresses *GCEGlobalAddresses - gceBackendServices *GCEBackendServices - gceBetaBackendServices *GCEBetaBackendServices - gceAlphaBackendServices *GCEAlphaBackendServices - gceRegionBackendServices *GCERegionBackendServices - gceAlphaRegionBackendServices *GCEAlphaRegionBackendServices - gceBetaRegionBackendServices *GCEBetaRegionBackendServices - gceDisks *GCEDisks - gceRegionDisks *GCERegionDisks - gceAlphaFirewalls *GCEAlphaFirewalls - gceBetaFirewalls *GCEBetaFirewalls - gceFirewalls *GCEFirewalls - gceAlphaNetworkFirewallPolicies *GCEAlphaNetworkFirewallPolicies - gceAlphaRegionNetworkFirewallPolicies *GCEAlphaRegionNetworkFirewallPolicies - gceForwardingRules *GCEForwardingRules - gceAlphaForwardingRules *GCEAlphaForwardingRules - gceBetaForwardingRules *GCEBetaForwardingRules - gceAlphaGlobalForwardingRules *GCEAlphaGlobalForwardingRules - gceBetaGlobalForwardingRules *GCEBetaGlobalForwardingRules - gceGlobalForwardingRules *GCEGlobalForwardingRules - gceHealthChecks *GCEHealthChecks - gceAlphaHealthChecks *GCEAlphaHealthChecks - gceBetaHealthChecks *GCEBetaHealthChecks - gceAlphaRegionHealthChecks *GCEAlphaRegionHealthChecks - gceBetaRegionHealthChecks *GCEBetaRegionHealthChecks - gceRegionHealthChecks *GCERegionHealthChecks - gceHttpHealthChecks *GCEHttpHealthChecks - gceHttpsHealthChecks *GCEHttpsHealthChecks - gceInstanceGroups *GCEInstanceGroups - gceInstances *GCEInstances - gceBetaInstances *GCEBetaInstances - gceAlphaInstances *GCEAlphaInstances - gceInstanceGroupManagers *GCEInstanceGroupManagers - gceInstanceTemplates *GCEInstanceTemplates - gceImages *GCEImages - gceBetaImages *GCEBetaImages - gceAlphaImages *GCEAlphaImages - gceAlphaNetworks *GCEAlphaNetworks - gceBetaNetworks *GCEBetaNetworks - gceNetworks *GCENetworks - gceAlphaNetworkEndpointGroups *GCEAlphaNetworkEndpointGroups - gceBetaNetworkEndpointGroups *GCEBetaNetworkEndpointGroups - gceNetworkEndpointGroups *GCENetworkEndpointGroups - gceAlphaGlobalNetworkEndpointGroups *GCEAlphaGlobalNetworkEndpointGroups - gceBetaGlobalNetworkEndpointGroups *GCEBetaGlobalNetworkEndpointGroups - gceGlobalNetworkEndpointGroups *GCEGlobalNetworkEndpointGroups - gceProjects *GCEProjects - gceRegions *GCERegions - gceAlphaRouters *GCEAlphaRouters - gceBetaRouters *GCEBetaRouters - gceRouters *GCERouters - gceRoutes *GCERoutes - gceBetaSecurityPolicies *GCEBetaSecurityPolicies - gceServiceAttachments *GCEServiceAttachments - gceBetaServiceAttachments *GCEBetaServiceAttachments - gceAlphaServiceAttachments *GCEAlphaServiceAttachments - gceSslCertificates *GCESslCertificates - gceBetaSslCertificates *GCEBetaSslCertificates - gceAlphaSslCertificates *GCEAlphaSslCertificates - gceAlphaRegionSslCertificates *GCEAlphaRegionSslCertificates - gceBetaRegionSslCertificates *GCEBetaRegionSslCertificates - gceRegionSslCertificates *GCERegionSslCertificates - gceSslPolicies *GCESslPolicies - gceRegionSslPolicies *GCERegionSslPolicies - gceAlphaSubnetworks *GCEAlphaSubnetworks - gceBetaSubnetworks *GCEBetaSubnetworks - gceSubnetworks *GCESubnetworks - gceAlphaTargetHttpProxies *GCEAlphaTargetHttpProxies - gceBetaTargetHttpProxies *GCEBetaTargetHttpProxies - gceTargetHttpProxies *GCETargetHttpProxies - gceAlphaRegionTargetHttpProxies *GCEAlphaRegionTargetHttpProxies - gceBetaRegionTargetHttpProxies *GCEBetaRegionTargetHttpProxies - gceRegionTargetHttpProxies *GCERegionTargetHttpProxies - gceTargetHttpsProxies *GCETargetHttpsProxies - gceAlphaTargetHttpsProxies *GCEAlphaTargetHttpsProxies - gceBetaTargetHttpsProxies *GCEBetaTargetHttpsProxies - gceAlphaRegionTargetHttpsProxies *GCEAlphaRegionTargetHttpsProxies - gceBetaRegionTargetHttpsProxies *GCEBetaRegionTargetHttpsProxies - gceRegionTargetHttpsProxies *GCERegionTargetHttpsProxies - gceTargetPools *GCETargetPools - gceAlphaTargetTcpProxies *GCEAlphaTargetTcpProxies - gceBetaTargetTcpProxies *GCEBetaTargetTcpProxies - gceTargetTcpProxies *GCETargetTcpProxies - gceAlphaUrlMaps *GCEAlphaUrlMaps - gceBetaUrlMaps *GCEBetaUrlMaps - gceUrlMaps *GCEUrlMaps - gceAlphaRegionUrlMaps *GCEAlphaRegionUrlMaps - gceBetaRegionUrlMaps *GCEBetaRegionUrlMaps - gceRegionUrlMaps *GCERegionUrlMaps - gceZones *GCEZones - tdTcpRoutes *TDTcpRoutes - tdBetaTcpRoutes *TDBetaTcpRoutes - tdMeshes *TDMeshes - tdBetaMeshes *TDBetaMeshes -} - -// Addresses returns the interface for the ga Addresses. -func (gce *GCE) Addresses() Addresses { - return gce.gceAddresses -} - -// AlphaAddresses returns the interface for the alpha Addresses. -func (gce *GCE) AlphaAddresses() AlphaAddresses { - return gce.gceAlphaAddresses -} - -// BetaAddresses returns the interface for the beta Addresses. -func (gce *GCE) BetaAddresses() BetaAddresses { - return gce.gceBetaAddresses -} - -// AlphaGlobalAddresses returns the interface for the alpha GlobalAddresses. -func (gce *GCE) AlphaGlobalAddresses() AlphaGlobalAddresses { - return gce.gceAlphaGlobalAddresses -} - -// BetaGlobalAddresses returns the interface for the beta GlobalAddresses. -func (gce *GCE) BetaGlobalAddresses() BetaGlobalAddresses { - return gce.gceBetaGlobalAddresses -} - -// GlobalAddresses returns the interface for the ga GlobalAddresses. -func (gce *GCE) GlobalAddresses() GlobalAddresses { - return gce.gceGlobalAddresses -} - -// BackendServices returns the interface for the ga BackendServices. -func (gce *GCE) BackendServices() BackendServices { - return gce.gceBackendServices -} - -// BetaBackendServices returns the interface for the beta BackendServices. -func (gce *GCE) BetaBackendServices() BetaBackendServices { - return gce.gceBetaBackendServices -} - -// AlphaBackendServices returns the interface for the alpha BackendServices. -func (gce *GCE) AlphaBackendServices() AlphaBackendServices { - return gce.gceAlphaBackendServices -} - -// RegionBackendServices returns the interface for the ga RegionBackendServices. -func (gce *GCE) RegionBackendServices() RegionBackendServices { - return gce.gceRegionBackendServices -} - -// AlphaRegionBackendServices returns the interface for the alpha RegionBackendServices. -func (gce *GCE) AlphaRegionBackendServices() AlphaRegionBackendServices { - return gce.gceAlphaRegionBackendServices -} - -// BetaRegionBackendServices returns the interface for the beta RegionBackendServices. -func (gce *GCE) BetaRegionBackendServices() BetaRegionBackendServices { - return gce.gceBetaRegionBackendServices -} - -// Disks returns the interface for the ga Disks. -func (gce *GCE) Disks() Disks { - return gce.gceDisks -} - -// RegionDisks returns the interface for the ga RegionDisks. -func (gce *GCE) RegionDisks() RegionDisks { - return gce.gceRegionDisks -} - -// AlphaFirewalls returns the interface for the alpha Firewalls. -func (gce *GCE) AlphaFirewalls() AlphaFirewalls { - return gce.gceAlphaFirewalls -} - -// BetaFirewalls returns the interface for the beta Firewalls. -func (gce *GCE) BetaFirewalls() BetaFirewalls { - return gce.gceBetaFirewalls -} - -// Firewalls returns the interface for the ga Firewalls. -func (gce *GCE) Firewalls() Firewalls { - return gce.gceFirewalls -} - -// AlphaNetworkFirewallPolicies returns the interface for the alpha NetworkFirewallPolicies. -func (gce *GCE) AlphaNetworkFirewallPolicies() AlphaNetworkFirewallPolicies { - return gce.gceAlphaNetworkFirewallPolicies -} - -// AlphaRegionNetworkFirewallPolicies returns the interface for the alpha RegionNetworkFirewallPolicies. -func (gce *GCE) AlphaRegionNetworkFirewallPolicies() AlphaRegionNetworkFirewallPolicies { - return gce.gceAlphaRegionNetworkFirewallPolicies -} - -// ForwardingRules returns the interface for the ga ForwardingRules. -func (gce *GCE) ForwardingRules() ForwardingRules { - return gce.gceForwardingRules -} - -// AlphaForwardingRules returns the interface for the alpha ForwardingRules. -func (gce *GCE) AlphaForwardingRules() AlphaForwardingRules { - return gce.gceAlphaForwardingRules -} - -// BetaForwardingRules returns the interface for the beta ForwardingRules. -func (gce *GCE) BetaForwardingRules() BetaForwardingRules { - return gce.gceBetaForwardingRules -} - -// AlphaGlobalForwardingRules returns the interface for the alpha GlobalForwardingRules. -func (gce *GCE) AlphaGlobalForwardingRules() AlphaGlobalForwardingRules { - return gce.gceAlphaGlobalForwardingRules -} - -// BetaGlobalForwardingRules returns the interface for the beta GlobalForwardingRules. -func (gce *GCE) BetaGlobalForwardingRules() BetaGlobalForwardingRules { - return gce.gceBetaGlobalForwardingRules -} - -// GlobalForwardingRules returns the interface for the ga GlobalForwardingRules. -func (gce *GCE) GlobalForwardingRules() GlobalForwardingRules { - return gce.gceGlobalForwardingRules -} - -// HealthChecks returns the interface for the ga HealthChecks. -func (gce *GCE) HealthChecks() HealthChecks { - return gce.gceHealthChecks -} - -// AlphaHealthChecks returns the interface for the alpha HealthChecks. -func (gce *GCE) AlphaHealthChecks() AlphaHealthChecks { - return gce.gceAlphaHealthChecks -} - -// BetaHealthChecks returns the interface for the beta HealthChecks. -func (gce *GCE) BetaHealthChecks() BetaHealthChecks { - return gce.gceBetaHealthChecks -} - -// AlphaRegionHealthChecks returns the interface for the alpha RegionHealthChecks. -func (gce *GCE) AlphaRegionHealthChecks() AlphaRegionHealthChecks { - return gce.gceAlphaRegionHealthChecks -} - -// BetaRegionHealthChecks returns the interface for the beta RegionHealthChecks. -func (gce *GCE) BetaRegionHealthChecks() BetaRegionHealthChecks { - return gce.gceBetaRegionHealthChecks -} - -// RegionHealthChecks returns the interface for the ga RegionHealthChecks. -func (gce *GCE) RegionHealthChecks() RegionHealthChecks { - return gce.gceRegionHealthChecks -} - -// HttpHealthChecks returns the interface for the ga HttpHealthChecks. -func (gce *GCE) HttpHealthChecks() HttpHealthChecks { - return gce.gceHttpHealthChecks -} - -// HttpsHealthChecks returns the interface for the ga HttpsHealthChecks. -func (gce *GCE) HttpsHealthChecks() HttpsHealthChecks { - return gce.gceHttpsHealthChecks -} - -// InstanceGroups returns the interface for the ga InstanceGroups. -func (gce *GCE) InstanceGroups() InstanceGroups { - return gce.gceInstanceGroups -} - -// Instances returns the interface for the ga Instances. -func (gce *GCE) Instances() Instances { - return gce.gceInstances -} - -// BetaInstances returns the interface for the beta Instances. -func (gce *GCE) BetaInstances() BetaInstances { - return gce.gceBetaInstances -} - -// AlphaInstances returns the interface for the alpha Instances. -func (gce *GCE) AlphaInstances() AlphaInstances { - return gce.gceAlphaInstances -} - -// InstanceGroupManagers returns the interface for the ga InstanceGroupManagers. -func (gce *GCE) InstanceGroupManagers() InstanceGroupManagers { - return gce.gceInstanceGroupManagers -} - -// InstanceTemplates returns the interface for the ga InstanceTemplates. -func (gce *GCE) InstanceTemplates() InstanceTemplates { - return gce.gceInstanceTemplates -} - -// Images returns the interface for the ga Images. -func (gce *GCE) Images() Images { - return gce.gceImages -} - -// BetaImages returns the interface for the beta Images. -func (gce *GCE) BetaImages() BetaImages { - return gce.gceBetaImages -} - -// AlphaImages returns the interface for the alpha Images. -func (gce *GCE) AlphaImages() AlphaImages { - return gce.gceAlphaImages -} - -// AlphaNetworks returns the interface for the alpha Networks. -func (gce *GCE) AlphaNetworks() AlphaNetworks { - return gce.gceAlphaNetworks -} - -// BetaNetworks returns the interface for the beta Networks. -func (gce *GCE) BetaNetworks() BetaNetworks { - return gce.gceBetaNetworks -} - -// Networks returns the interface for the ga Networks. -func (gce *GCE) Networks() Networks { - return gce.gceNetworks -} - -// AlphaNetworkEndpointGroups returns the interface for the alpha NetworkEndpointGroups. -func (gce *GCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups { - return gce.gceAlphaNetworkEndpointGroups -} - -// BetaNetworkEndpointGroups returns the interface for the beta NetworkEndpointGroups. -func (gce *GCE) BetaNetworkEndpointGroups() BetaNetworkEndpointGroups { - return gce.gceBetaNetworkEndpointGroups -} - -// NetworkEndpointGroups returns the interface for the ga NetworkEndpointGroups. -func (gce *GCE) NetworkEndpointGroups() NetworkEndpointGroups { - return gce.gceNetworkEndpointGroups -} - -// AlphaGlobalNetworkEndpointGroups returns the interface for the alpha GlobalNetworkEndpointGroups. -func (gce *GCE) AlphaGlobalNetworkEndpointGroups() AlphaGlobalNetworkEndpointGroups { - return gce.gceAlphaGlobalNetworkEndpointGroups -} - -// BetaGlobalNetworkEndpointGroups returns the interface for the beta GlobalNetworkEndpointGroups. -func (gce *GCE) BetaGlobalNetworkEndpointGroups() BetaGlobalNetworkEndpointGroups { - return gce.gceBetaGlobalNetworkEndpointGroups -} - -// GlobalNetworkEndpointGroups returns the interface for the ga GlobalNetworkEndpointGroups. -func (gce *GCE) GlobalNetworkEndpointGroups() GlobalNetworkEndpointGroups { - return gce.gceGlobalNetworkEndpointGroups -} - -// Projects returns the interface for the ga Projects. -func (gce *GCE) Projects() Projects { - return gce.gceProjects -} - -// Regions returns the interface for the ga Regions. -func (gce *GCE) Regions() Regions { - return gce.gceRegions -} - -// AlphaRouters returns the interface for the alpha Routers. -func (gce *GCE) AlphaRouters() AlphaRouters { - return gce.gceAlphaRouters -} - -// BetaRouters returns the interface for the beta Routers. -func (gce *GCE) BetaRouters() BetaRouters { - return gce.gceBetaRouters -} - -// Routers returns the interface for the ga Routers. -func (gce *GCE) Routers() Routers { - return gce.gceRouters -} - -// Routes returns the interface for the ga Routes. -func (gce *GCE) Routes() Routes { - return gce.gceRoutes -} - -// BetaSecurityPolicies returns the interface for the beta SecurityPolicies. -func (gce *GCE) BetaSecurityPolicies() BetaSecurityPolicies { - return gce.gceBetaSecurityPolicies -} - -// ServiceAttachments returns the interface for the ga ServiceAttachments. -func (gce *GCE) ServiceAttachments() ServiceAttachments { - return gce.gceServiceAttachments -} - -// BetaServiceAttachments returns the interface for the beta ServiceAttachments. -func (gce *GCE) BetaServiceAttachments() BetaServiceAttachments { - return gce.gceBetaServiceAttachments -} - -// AlphaServiceAttachments returns the interface for the alpha ServiceAttachments. -func (gce *GCE) AlphaServiceAttachments() AlphaServiceAttachments { - return gce.gceAlphaServiceAttachments -} - -// SslCertificates returns the interface for the ga SslCertificates. -func (gce *GCE) SslCertificates() SslCertificates { - return gce.gceSslCertificates -} - -// BetaSslCertificates returns the interface for the beta SslCertificates. -func (gce *GCE) BetaSslCertificates() BetaSslCertificates { - return gce.gceBetaSslCertificates -} - -// AlphaSslCertificates returns the interface for the alpha SslCertificates. -func (gce *GCE) AlphaSslCertificates() AlphaSslCertificates { - return gce.gceAlphaSslCertificates -} - -// AlphaRegionSslCertificates returns the interface for the alpha RegionSslCertificates. -func (gce *GCE) AlphaRegionSslCertificates() AlphaRegionSslCertificates { - return gce.gceAlphaRegionSslCertificates -} - -// BetaRegionSslCertificates returns the interface for the beta RegionSslCertificates. -func (gce *GCE) BetaRegionSslCertificates() BetaRegionSslCertificates { - return gce.gceBetaRegionSslCertificates -} - -// RegionSslCertificates returns the interface for the ga RegionSslCertificates. -func (gce *GCE) RegionSslCertificates() RegionSslCertificates { - return gce.gceRegionSslCertificates -} - -// SslPolicies returns the interface for the ga SslPolicies. -func (gce *GCE) SslPolicies() SslPolicies { - return gce.gceSslPolicies -} - -// RegionSslPolicies returns the interface for the ga RegionSslPolicies. -func (gce *GCE) RegionSslPolicies() RegionSslPolicies { - return gce.gceRegionSslPolicies -} - -// AlphaSubnetworks returns the interface for the alpha Subnetworks. -func (gce *GCE) AlphaSubnetworks() AlphaSubnetworks { - return gce.gceAlphaSubnetworks -} - -// BetaSubnetworks returns the interface for the beta Subnetworks. -func (gce *GCE) BetaSubnetworks() BetaSubnetworks { - return gce.gceBetaSubnetworks -} - -// Subnetworks returns the interface for the ga Subnetworks. -func (gce *GCE) Subnetworks() Subnetworks { - return gce.gceSubnetworks -} - -// AlphaTargetHttpProxies returns the interface for the alpha TargetHttpProxies. -func (gce *GCE) AlphaTargetHttpProxies() AlphaTargetHttpProxies { - return gce.gceAlphaTargetHttpProxies -} - -// BetaTargetHttpProxies returns the interface for the beta TargetHttpProxies. -func (gce *GCE) BetaTargetHttpProxies() BetaTargetHttpProxies { - return gce.gceBetaTargetHttpProxies -} - -// TargetHttpProxies returns the interface for the ga TargetHttpProxies. -func (gce *GCE) TargetHttpProxies() TargetHttpProxies { - return gce.gceTargetHttpProxies -} - -// AlphaRegionTargetHttpProxies returns the interface for the alpha RegionTargetHttpProxies. -func (gce *GCE) AlphaRegionTargetHttpProxies() AlphaRegionTargetHttpProxies { - return gce.gceAlphaRegionTargetHttpProxies -} - -// BetaRegionTargetHttpProxies returns the interface for the beta RegionTargetHttpProxies. -func (gce *GCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies { - return gce.gceBetaRegionTargetHttpProxies -} - -// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies. -func (gce *GCE) RegionTargetHttpProxies() RegionTargetHttpProxies { - return gce.gceRegionTargetHttpProxies -} - -// TargetHttpsProxies returns the interface for the ga TargetHttpsProxies. -func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies { - return gce.gceTargetHttpsProxies -} - -// AlphaTargetHttpsProxies returns the interface for the alpha TargetHttpsProxies. -func (gce *GCE) AlphaTargetHttpsProxies() AlphaTargetHttpsProxies { - return gce.gceAlphaTargetHttpsProxies -} - -// BetaTargetHttpsProxies returns the interface for the beta TargetHttpsProxies. -func (gce *GCE) BetaTargetHttpsProxies() BetaTargetHttpsProxies { - return gce.gceBetaTargetHttpsProxies -} - -// AlphaRegionTargetHttpsProxies returns the interface for the alpha RegionTargetHttpsProxies. -func (gce *GCE) AlphaRegionTargetHttpsProxies() AlphaRegionTargetHttpsProxies { - return gce.gceAlphaRegionTargetHttpsProxies -} - -// BetaRegionTargetHttpsProxies returns the interface for the beta RegionTargetHttpsProxies. -func (gce *GCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies { - return gce.gceBetaRegionTargetHttpsProxies -} - -// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies. -func (gce *GCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies { - return gce.gceRegionTargetHttpsProxies -} - -// TargetPools returns the interface for the ga TargetPools. -func (gce *GCE) TargetPools() TargetPools { - return gce.gceTargetPools -} - -// AlphaTargetTcpProxies returns the interface for the alpha TargetTcpProxies. -func (gce *GCE) AlphaTargetTcpProxies() AlphaTargetTcpProxies { - return gce.gceAlphaTargetTcpProxies -} - -// BetaTargetTcpProxies returns the interface for the beta TargetTcpProxies. -func (gce *GCE) BetaTargetTcpProxies() BetaTargetTcpProxies { - return gce.gceBetaTargetTcpProxies -} - -// TargetTcpProxies returns the interface for the ga TargetTcpProxies. -func (gce *GCE) TargetTcpProxies() TargetTcpProxies { - return gce.gceTargetTcpProxies -} - -// AlphaUrlMaps returns the interface for the alpha UrlMaps. -func (gce *GCE) AlphaUrlMaps() AlphaUrlMaps { - return gce.gceAlphaUrlMaps -} - -// BetaUrlMaps returns the interface for the beta UrlMaps. -func (gce *GCE) BetaUrlMaps() BetaUrlMaps { - return gce.gceBetaUrlMaps -} - -// UrlMaps returns the interface for the ga UrlMaps. -func (gce *GCE) UrlMaps() UrlMaps { - return gce.gceUrlMaps -} - -// AlphaRegionUrlMaps returns the interface for the alpha RegionUrlMaps. -func (gce *GCE) AlphaRegionUrlMaps() AlphaRegionUrlMaps { - return gce.gceAlphaRegionUrlMaps -} - -// BetaRegionUrlMaps returns the interface for the beta RegionUrlMaps. -func (gce *GCE) BetaRegionUrlMaps() BetaRegionUrlMaps { - return gce.gceBetaRegionUrlMaps -} - -// RegionUrlMaps returns the interface for the ga RegionUrlMaps. -func (gce *GCE) RegionUrlMaps() RegionUrlMaps { - return gce.gceRegionUrlMaps -} - -// Zones returns the interface for the ga Zones. -func (gce *GCE) Zones() Zones { - return gce.gceZones -} - -// TcpRoutes returns the interface for the ga TcpRoutes. -func (gce *GCE) TcpRoutes() TcpRoutes { - return gce.tdTcpRoutes -} - -// BetaTcpRoutes returns the interface for the beta TcpRoutes. -func (gce *GCE) BetaTcpRoutes() BetaTcpRoutes { - return gce.tdBetaTcpRoutes -} - -// Meshes returns the interface for the ga Meshes. -func (gce *GCE) Meshes() Meshes { - return gce.tdMeshes -} - -// BetaMeshes returns the interface for the beta Meshes. -func (gce *GCE) BetaMeshes() BetaMeshes { - return gce.tdBetaMeshes -} - -// NewMockGCE returns a new mock for GCE. -func NewMockGCE(projectRouter ProjectRouter) *MockGCE { - mockAddressesObjs := map[meta.Key]*MockAddressesObj{} - mockBackendServicesObjs := map[meta.Key]*MockBackendServicesObj{} - mockDisksObjs := map[meta.Key]*MockDisksObj{} - mockFirewallsObjs := map[meta.Key]*MockFirewallsObj{} - mockForwardingRulesObjs := map[meta.Key]*MockForwardingRulesObj{} - mockGlobalAddressesObjs := map[meta.Key]*MockGlobalAddressesObj{} - mockGlobalForwardingRulesObjs := map[meta.Key]*MockGlobalForwardingRulesObj{} - mockGlobalNetworkEndpointGroupsObjs := map[meta.Key]*MockGlobalNetworkEndpointGroupsObj{} - mockHealthChecksObjs := map[meta.Key]*MockHealthChecksObj{} - mockHttpHealthChecksObjs := map[meta.Key]*MockHttpHealthChecksObj{} - mockHttpsHealthChecksObjs := map[meta.Key]*MockHttpsHealthChecksObj{} - mockImagesObjs := map[meta.Key]*MockImagesObj{} - mockInstanceGroupManagersObjs := map[meta.Key]*MockInstanceGroupManagersObj{} - mockInstanceGroupsObjs := map[meta.Key]*MockInstanceGroupsObj{} - mockInstanceTemplatesObjs := map[meta.Key]*MockInstanceTemplatesObj{} - mockInstancesObjs := map[meta.Key]*MockInstancesObj{} - mockMeshesObjs := map[meta.Key]*MockMeshesObj{} - mockNetworkEndpointGroupsObjs := map[meta.Key]*MockNetworkEndpointGroupsObj{} - mockNetworkFirewallPoliciesObjs := map[meta.Key]*MockNetworkFirewallPoliciesObj{} - mockNetworksObjs := map[meta.Key]*MockNetworksObj{} - mockProjectsObjs := map[meta.Key]*MockProjectsObj{} - mockRegionBackendServicesObjs := map[meta.Key]*MockRegionBackendServicesObj{} - mockRegionDisksObjs := map[meta.Key]*MockRegionDisksObj{} - mockRegionHealthChecksObjs := map[meta.Key]*MockRegionHealthChecksObj{} - mockRegionNetworkFirewallPoliciesObjs := map[meta.Key]*MockRegionNetworkFirewallPoliciesObj{} - mockRegionSslCertificatesObjs := map[meta.Key]*MockRegionSslCertificatesObj{} - mockRegionSslPoliciesObjs := map[meta.Key]*MockRegionSslPoliciesObj{} - mockRegionTargetHttpProxiesObjs := map[meta.Key]*MockRegionTargetHttpProxiesObj{} - mockRegionTargetHttpsProxiesObjs := map[meta.Key]*MockRegionTargetHttpsProxiesObj{} - mockRegionUrlMapsObjs := map[meta.Key]*MockRegionUrlMapsObj{} - mockRegionsObjs := map[meta.Key]*MockRegionsObj{} - mockRoutersObjs := map[meta.Key]*MockRoutersObj{} - mockRoutesObjs := map[meta.Key]*MockRoutesObj{} - mockSecurityPoliciesObjs := map[meta.Key]*MockSecurityPoliciesObj{} - mockServiceAttachmentsObjs := map[meta.Key]*MockServiceAttachmentsObj{} - mockSslCertificatesObjs := map[meta.Key]*MockSslCertificatesObj{} - mockSslPoliciesObjs := map[meta.Key]*MockSslPoliciesObj{} - mockSubnetworksObjs := map[meta.Key]*MockSubnetworksObj{} - mockTargetHttpProxiesObjs := map[meta.Key]*MockTargetHttpProxiesObj{} - mockTargetHttpsProxiesObjs := map[meta.Key]*MockTargetHttpsProxiesObj{} - mockTargetPoolsObjs := map[meta.Key]*MockTargetPoolsObj{} - mockTargetTcpProxiesObjs := map[meta.Key]*MockTargetTcpProxiesObj{} - mockTcpRoutesObjs := map[meta.Key]*MockTcpRoutesObj{} - mockUrlMapsObjs := map[meta.Key]*MockUrlMapsObj{} - mockZonesObjs := map[meta.Key]*MockZonesObj{} - - mock := &MockGCE{ - MockAddresses: NewMockAddresses(projectRouter, mockAddressesObjs), - MockAlphaAddresses: NewMockAlphaAddresses(projectRouter, mockAddressesObjs), - MockBetaAddresses: NewMockBetaAddresses(projectRouter, mockAddressesObjs), - MockAlphaGlobalAddresses: NewMockAlphaGlobalAddresses(projectRouter, mockGlobalAddressesObjs), - MockBetaGlobalAddresses: NewMockBetaGlobalAddresses(projectRouter, mockGlobalAddressesObjs), - MockGlobalAddresses: NewMockGlobalAddresses(projectRouter, mockGlobalAddressesObjs), - MockBackendServices: NewMockBackendServices(projectRouter, mockBackendServicesObjs), - MockBetaBackendServices: NewMockBetaBackendServices(projectRouter, mockBackendServicesObjs), - MockAlphaBackendServices: NewMockAlphaBackendServices(projectRouter, mockBackendServicesObjs), - MockRegionBackendServices: NewMockRegionBackendServices(projectRouter, mockRegionBackendServicesObjs), - MockAlphaRegionBackendServices: NewMockAlphaRegionBackendServices(projectRouter, mockRegionBackendServicesObjs), - MockBetaRegionBackendServices: NewMockBetaRegionBackendServices(projectRouter, mockRegionBackendServicesObjs), - MockDisks: NewMockDisks(projectRouter, mockDisksObjs), - MockRegionDisks: NewMockRegionDisks(projectRouter, mockRegionDisksObjs), - MockAlphaFirewalls: NewMockAlphaFirewalls(projectRouter, mockFirewallsObjs), - MockBetaFirewalls: NewMockBetaFirewalls(projectRouter, mockFirewallsObjs), - MockFirewalls: NewMockFirewalls(projectRouter, mockFirewallsObjs), - MockAlphaNetworkFirewallPolicies: NewMockAlphaNetworkFirewallPolicies(projectRouter, mockNetworkFirewallPoliciesObjs), - MockAlphaRegionNetworkFirewallPolicies: NewMockAlphaRegionNetworkFirewallPolicies(projectRouter, mockRegionNetworkFirewallPoliciesObjs), - MockForwardingRules: NewMockForwardingRules(projectRouter, mockForwardingRulesObjs), - MockAlphaForwardingRules: NewMockAlphaForwardingRules(projectRouter, mockForwardingRulesObjs), - MockBetaForwardingRules: NewMockBetaForwardingRules(projectRouter, mockForwardingRulesObjs), - MockAlphaGlobalForwardingRules: NewMockAlphaGlobalForwardingRules(projectRouter, mockGlobalForwardingRulesObjs), - MockBetaGlobalForwardingRules: NewMockBetaGlobalForwardingRules(projectRouter, mockGlobalForwardingRulesObjs), - MockGlobalForwardingRules: NewMockGlobalForwardingRules(projectRouter, mockGlobalForwardingRulesObjs), - MockHealthChecks: NewMockHealthChecks(projectRouter, mockHealthChecksObjs), - MockAlphaHealthChecks: NewMockAlphaHealthChecks(projectRouter, mockHealthChecksObjs), - MockBetaHealthChecks: NewMockBetaHealthChecks(projectRouter, mockHealthChecksObjs), - MockAlphaRegionHealthChecks: NewMockAlphaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), - MockBetaRegionHealthChecks: NewMockBetaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), - MockRegionHealthChecks: NewMockRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), - MockHttpHealthChecks: NewMockHttpHealthChecks(projectRouter, mockHttpHealthChecksObjs), - MockHttpsHealthChecks: NewMockHttpsHealthChecks(projectRouter, mockHttpsHealthChecksObjs), - MockInstanceGroups: NewMockInstanceGroups(projectRouter, mockInstanceGroupsObjs), - MockInstances: NewMockInstances(projectRouter, mockInstancesObjs), - MockBetaInstances: NewMockBetaInstances(projectRouter, mockInstancesObjs), - MockAlphaInstances: NewMockAlphaInstances(projectRouter, mockInstancesObjs), - MockInstanceGroupManagers: NewMockInstanceGroupManagers(projectRouter, mockInstanceGroupManagersObjs), - MockInstanceTemplates: NewMockInstanceTemplates(projectRouter, mockInstanceTemplatesObjs), - MockImages: NewMockImages(projectRouter, mockImagesObjs), - MockBetaImages: NewMockBetaImages(projectRouter, mockImagesObjs), - MockAlphaImages: NewMockAlphaImages(projectRouter, mockImagesObjs), - MockAlphaNetworks: NewMockAlphaNetworks(projectRouter, mockNetworksObjs), - MockBetaNetworks: NewMockBetaNetworks(projectRouter, mockNetworksObjs), - MockNetworks: NewMockNetworks(projectRouter, mockNetworksObjs), - MockAlphaNetworkEndpointGroups: NewMockAlphaNetworkEndpointGroups(projectRouter, mockNetworkEndpointGroupsObjs), - MockBetaNetworkEndpointGroups: NewMockBetaNetworkEndpointGroups(projectRouter, mockNetworkEndpointGroupsObjs), - MockNetworkEndpointGroups: NewMockNetworkEndpointGroups(projectRouter, mockNetworkEndpointGroupsObjs), - MockAlphaGlobalNetworkEndpointGroups: NewMockAlphaGlobalNetworkEndpointGroups(projectRouter, mockGlobalNetworkEndpointGroupsObjs), - MockBetaGlobalNetworkEndpointGroups: NewMockBetaGlobalNetworkEndpointGroups(projectRouter, mockGlobalNetworkEndpointGroupsObjs), - MockGlobalNetworkEndpointGroups: NewMockGlobalNetworkEndpointGroups(projectRouter, mockGlobalNetworkEndpointGroupsObjs), - MockProjects: NewMockProjects(projectRouter, mockProjectsObjs), - MockRegions: NewMockRegions(projectRouter, mockRegionsObjs), - MockAlphaRouters: NewMockAlphaRouters(projectRouter, mockRoutersObjs), - MockBetaRouters: NewMockBetaRouters(projectRouter, mockRoutersObjs), - MockRouters: NewMockRouters(projectRouter, mockRoutersObjs), - MockRoutes: NewMockRoutes(projectRouter, mockRoutesObjs), - MockBetaSecurityPolicies: NewMockBetaSecurityPolicies(projectRouter, mockSecurityPoliciesObjs), - MockServiceAttachments: NewMockServiceAttachments(projectRouter, mockServiceAttachmentsObjs), - MockBetaServiceAttachments: NewMockBetaServiceAttachments(projectRouter, mockServiceAttachmentsObjs), - MockAlphaServiceAttachments: NewMockAlphaServiceAttachments(projectRouter, mockServiceAttachmentsObjs), - MockSslCertificates: NewMockSslCertificates(projectRouter, mockSslCertificatesObjs), - MockBetaSslCertificates: NewMockBetaSslCertificates(projectRouter, mockSslCertificatesObjs), - MockAlphaSslCertificates: NewMockAlphaSslCertificates(projectRouter, mockSslCertificatesObjs), - MockAlphaRegionSslCertificates: NewMockAlphaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), - MockBetaRegionSslCertificates: NewMockBetaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), - MockRegionSslCertificates: NewMockRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), - MockSslPolicies: NewMockSslPolicies(projectRouter, mockSslPoliciesObjs), - MockRegionSslPolicies: NewMockRegionSslPolicies(projectRouter, mockRegionSslPoliciesObjs), - MockAlphaSubnetworks: NewMockAlphaSubnetworks(projectRouter, mockSubnetworksObjs), - MockBetaSubnetworks: NewMockBetaSubnetworks(projectRouter, mockSubnetworksObjs), - MockSubnetworks: NewMockSubnetworks(projectRouter, mockSubnetworksObjs), - MockAlphaTargetHttpProxies: NewMockAlphaTargetHttpProxies(projectRouter, mockTargetHttpProxiesObjs), - MockBetaTargetHttpProxies: NewMockBetaTargetHttpProxies(projectRouter, mockTargetHttpProxiesObjs), - MockTargetHttpProxies: NewMockTargetHttpProxies(projectRouter, mockTargetHttpProxiesObjs), - MockAlphaRegionTargetHttpProxies: NewMockAlphaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), - MockBetaRegionTargetHttpProxies: NewMockBetaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), - MockRegionTargetHttpProxies: NewMockRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), - MockTargetHttpsProxies: NewMockTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), - MockAlphaTargetHttpsProxies: NewMockAlphaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), - MockBetaTargetHttpsProxies: NewMockBetaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), - MockAlphaRegionTargetHttpsProxies: NewMockAlphaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), - MockBetaRegionTargetHttpsProxies: NewMockBetaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), - MockRegionTargetHttpsProxies: NewMockRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), - MockTargetPools: NewMockTargetPools(projectRouter, mockTargetPoolsObjs), - MockAlphaTargetTcpProxies: NewMockAlphaTargetTcpProxies(projectRouter, mockTargetTcpProxiesObjs), - MockBetaTargetTcpProxies: NewMockBetaTargetTcpProxies(projectRouter, mockTargetTcpProxiesObjs), - MockTargetTcpProxies: NewMockTargetTcpProxies(projectRouter, mockTargetTcpProxiesObjs), - MockAlphaUrlMaps: NewMockAlphaUrlMaps(projectRouter, mockUrlMapsObjs), - MockBetaUrlMaps: NewMockBetaUrlMaps(projectRouter, mockUrlMapsObjs), - MockUrlMaps: NewMockUrlMaps(projectRouter, mockUrlMapsObjs), - MockAlphaRegionUrlMaps: NewMockAlphaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), - MockBetaRegionUrlMaps: NewMockBetaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), - MockRegionUrlMaps: NewMockRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), - MockZones: NewMockZones(projectRouter, mockZonesObjs), - MockTcpRoutes: NewMockTcpRoutes(projectRouter, mockTcpRoutesObjs), - MockBetaTcpRoutes: NewMockBetaTcpRoutes(projectRouter, mockTcpRoutesObjs), - MockMeshes: NewMockMeshes(projectRouter, mockMeshesObjs), - MockBetaMeshes: NewMockBetaMeshes(projectRouter, mockMeshesObjs), - } - return mock -} - -// MockGCE implements Cloud. -var _ Cloud = (*MockGCE)(nil) - -// MockGCE is the mock for the compute API. -type MockGCE struct { - MockAddresses *MockAddresses - MockAlphaAddresses *MockAlphaAddresses - MockBetaAddresses *MockBetaAddresses - MockAlphaGlobalAddresses *MockAlphaGlobalAddresses - MockBetaGlobalAddresses *MockBetaGlobalAddresses - MockGlobalAddresses *MockGlobalAddresses - MockBackendServices *MockBackendServices - MockBetaBackendServices *MockBetaBackendServices - MockAlphaBackendServices *MockAlphaBackendServices - MockRegionBackendServices *MockRegionBackendServices - MockAlphaRegionBackendServices *MockAlphaRegionBackendServices - MockBetaRegionBackendServices *MockBetaRegionBackendServices - MockDisks *MockDisks - MockRegionDisks *MockRegionDisks - MockAlphaFirewalls *MockAlphaFirewalls - MockBetaFirewalls *MockBetaFirewalls - MockFirewalls *MockFirewalls - MockAlphaNetworkFirewallPolicies *MockAlphaNetworkFirewallPolicies - MockAlphaRegionNetworkFirewallPolicies *MockAlphaRegionNetworkFirewallPolicies - MockForwardingRules *MockForwardingRules - MockAlphaForwardingRules *MockAlphaForwardingRules - MockBetaForwardingRules *MockBetaForwardingRules - MockAlphaGlobalForwardingRules *MockAlphaGlobalForwardingRules - MockBetaGlobalForwardingRules *MockBetaGlobalForwardingRules - MockGlobalForwardingRules *MockGlobalForwardingRules - MockHealthChecks *MockHealthChecks - MockAlphaHealthChecks *MockAlphaHealthChecks - MockBetaHealthChecks *MockBetaHealthChecks - MockAlphaRegionHealthChecks *MockAlphaRegionHealthChecks - MockBetaRegionHealthChecks *MockBetaRegionHealthChecks - MockRegionHealthChecks *MockRegionHealthChecks - MockHttpHealthChecks *MockHttpHealthChecks - MockHttpsHealthChecks *MockHttpsHealthChecks - MockInstanceGroups *MockInstanceGroups - MockInstances *MockInstances - MockBetaInstances *MockBetaInstances - MockAlphaInstances *MockAlphaInstances - MockInstanceGroupManagers *MockInstanceGroupManagers - MockInstanceTemplates *MockInstanceTemplates - MockImages *MockImages - MockBetaImages *MockBetaImages - MockAlphaImages *MockAlphaImages - MockAlphaNetworks *MockAlphaNetworks - MockBetaNetworks *MockBetaNetworks - MockNetworks *MockNetworks - MockAlphaNetworkEndpointGroups *MockAlphaNetworkEndpointGroups - MockBetaNetworkEndpointGroups *MockBetaNetworkEndpointGroups - MockNetworkEndpointGroups *MockNetworkEndpointGroups - MockAlphaGlobalNetworkEndpointGroups *MockAlphaGlobalNetworkEndpointGroups - MockBetaGlobalNetworkEndpointGroups *MockBetaGlobalNetworkEndpointGroups - MockGlobalNetworkEndpointGroups *MockGlobalNetworkEndpointGroups - MockProjects *MockProjects - MockRegions *MockRegions - MockAlphaRouters *MockAlphaRouters - MockBetaRouters *MockBetaRouters - MockRouters *MockRouters - MockRoutes *MockRoutes - MockBetaSecurityPolicies *MockBetaSecurityPolicies - MockServiceAttachments *MockServiceAttachments - MockBetaServiceAttachments *MockBetaServiceAttachments - MockAlphaServiceAttachments *MockAlphaServiceAttachments - MockSslCertificates *MockSslCertificates - MockBetaSslCertificates *MockBetaSslCertificates - MockAlphaSslCertificates *MockAlphaSslCertificates - MockAlphaRegionSslCertificates *MockAlphaRegionSslCertificates - MockBetaRegionSslCertificates *MockBetaRegionSslCertificates - MockRegionSslCertificates *MockRegionSslCertificates - MockSslPolicies *MockSslPolicies - MockRegionSslPolicies *MockRegionSslPolicies - MockAlphaSubnetworks *MockAlphaSubnetworks - MockBetaSubnetworks *MockBetaSubnetworks - MockSubnetworks *MockSubnetworks - MockAlphaTargetHttpProxies *MockAlphaTargetHttpProxies - MockBetaTargetHttpProxies *MockBetaTargetHttpProxies - MockTargetHttpProxies *MockTargetHttpProxies - MockAlphaRegionTargetHttpProxies *MockAlphaRegionTargetHttpProxies - MockBetaRegionTargetHttpProxies *MockBetaRegionTargetHttpProxies - MockRegionTargetHttpProxies *MockRegionTargetHttpProxies - MockTargetHttpsProxies *MockTargetHttpsProxies - MockAlphaTargetHttpsProxies *MockAlphaTargetHttpsProxies - MockBetaTargetHttpsProxies *MockBetaTargetHttpsProxies - MockAlphaRegionTargetHttpsProxies *MockAlphaRegionTargetHttpsProxies - MockBetaRegionTargetHttpsProxies *MockBetaRegionTargetHttpsProxies - MockRegionTargetHttpsProxies *MockRegionTargetHttpsProxies - MockTargetPools *MockTargetPools - MockAlphaTargetTcpProxies *MockAlphaTargetTcpProxies - MockBetaTargetTcpProxies *MockBetaTargetTcpProxies - MockTargetTcpProxies *MockTargetTcpProxies - MockAlphaUrlMaps *MockAlphaUrlMaps - MockBetaUrlMaps *MockBetaUrlMaps - MockUrlMaps *MockUrlMaps - MockAlphaRegionUrlMaps *MockAlphaRegionUrlMaps - MockBetaRegionUrlMaps *MockBetaRegionUrlMaps - MockRegionUrlMaps *MockRegionUrlMaps - MockZones *MockZones - MockTcpRoutes *MockTcpRoutes - MockBetaTcpRoutes *MockBetaTcpRoutes - MockMeshes *MockMeshes - MockBetaMeshes *MockBetaMeshes -} - -// Addresses returns the interface for the ga Addresses. -func (mock *MockGCE) Addresses() Addresses { - return mock.MockAddresses -} - -// AlphaAddresses returns the interface for the alpha Addresses. -func (mock *MockGCE) AlphaAddresses() AlphaAddresses { - return mock.MockAlphaAddresses -} - -// BetaAddresses returns the interface for the beta Addresses. -func (mock *MockGCE) BetaAddresses() BetaAddresses { - return mock.MockBetaAddresses -} - -// AlphaGlobalAddresses returns the interface for the alpha GlobalAddresses. -func (mock *MockGCE) AlphaGlobalAddresses() AlphaGlobalAddresses { - return mock.MockAlphaGlobalAddresses -} - -// BetaGlobalAddresses returns the interface for the beta GlobalAddresses. -func (mock *MockGCE) BetaGlobalAddresses() BetaGlobalAddresses { - return mock.MockBetaGlobalAddresses -} - -// GlobalAddresses returns the interface for the ga GlobalAddresses. -func (mock *MockGCE) GlobalAddresses() GlobalAddresses { - return mock.MockGlobalAddresses -} - -// BackendServices returns the interface for the ga BackendServices. -func (mock *MockGCE) BackendServices() BackendServices { - return mock.MockBackendServices -} - -// BetaBackendServices returns the interface for the beta BackendServices. -func (mock *MockGCE) BetaBackendServices() BetaBackendServices { - return mock.MockBetaBackendServices -} - -// AlphaBackendServices returns the interface for the alpha BackendServices. -func (mock *MockGCE) AlphaBackendServices() AlphaBackendServices { - return mock.MockAlphaBackendServices -} - -// RegionBackendServices returns the interface for the ga RegionBackendServices. -func (mock *MockGCE) RegionBackendServices() RegionBackendServices { - return mock.MockRegionBackendServices -} - -// AlphaRegionBackendServices returns the interface for the alpha RegionBackendServices. -func (mock *MockGCE) AlphaRegionBackendServices() AlphaRegionBackendServices { - return mock.MockAlphaRegionBackendServices -} - -// BetaRegionBackendServices returns the interface for the beta RegionBackendServices. -func (mock *MockGCE) BetaRegionBackendServices() BetaRegionBackendServices { - return mock.MockBetaRegionBackendServices -} - -// Disks returns the interface for the ga Disks. -func (mock *MockGCE) Disks() Disks { - return mock.MockDisks -} - -// RegionDisks returns the interface for the ga RegionDisks. -func (mock *MockGCE) RegionDisks() RegionDisks { - return mock.MockRegionDisks -} - -// AlphaFirewalls returns the interface for the alpha Firewalls. -func (mock *MockGCE) AlphaFirewalls() AlphaFirewalls { - return mock.MockAlphaFirewalls -} - -// BetaFirewalls returns the interface for the beta Firewalls. -func (mock *MockGCE) BetaFirewalls() BetaFirewalls { - return mock.MockBetaFirewalls -} - -// Firewalls returns the interface for the ga Firewalls. -func (mock *MockGCE) Firewalls() Firewalls { - return mock.MockFirewalls -} - -// AlphaNetworkFirewallPolicies returns the interface for the alpha NetworkFirewallPolicies. -func (mock *MockGCE) AlphaNetworkFirewallPolicies() AlphaNetworkFirewallPolicies { - return mock.MockAlphaNetworkFirewallPolicies -} - -// AlphaRegionNetworkFirewallPolicies returns the interface for the alpha RegionNetworkFirewallPolicies. -func (mock *MockGCE) AlphaRegionNetworkFirewallPolicies() AlphaRegionNetworkFirewallPolicies { - return mock.MockAlphaRegionNetworkFirewallPolicies -} - -// ForwardingRules returns the interface for the ga ForwardingRules. -func (mock *MockGCE) ForwardingRules() ForwardingRules { - return mock.MockForwardingRules -} - -// AlphaForwardingRules returns the interface for the alpha ForwardingRules. -func (mock *MockGCE) AlphaForwardingRules() AlphaForwardingRules { - return mock.MockAlphaForwardingRules -} - -// BetaForwardingRules returns the interface for the beta ForwardingRules. -func (mock *MockGCE) BetaForwardingRules() BetaForwardingRules { - return mock.MockBetaForwardingRules -} - -// AlphaGlobalForwardingRules returns the interface for the alpha GlobalForwardingRules. -func (mock *MockGCE) AlphaGlobalForwardingRules() AlphaGlobalForwardingRules { - return mock.MockAlphaGlobalForwardingRules -} - -// BetaGlobalForwardingRules returns the interface for the beta GlobalForwardingRules. -func (mock *MockGCE) BetaGlobalForwardingRules() BetaGlobalForwardingRules { - return mock.MockBetaGlobalForwardingRules -} - -// GlobalForwardingRules returns the interface for the ga GlobalForwardingRules. -func (mock *MockGCE) GlobalForwardingRules() GlobalForwardingRules { - return mock.MockGlobalForwardingRules -} - -// HealthChecks returns the interface for the ga HealthChecks. -func (mock *MockGCE) HealthChecks() HealthChecks { - return mock.MockHealthChecks -} - -// AlphaHealthChecks returns the interface for the alpha HealthChecks. -func (mock *MockGCE) AlphaHealthChecks() AlphaHealthChecks { - return mock.MockAlphaHealthChecks -} - -// BetaHealthChecks returns the interface for the beta HealthChecks. -func (mock *MockGCE) BetaHealthChecks() BetaHealthChecks { - return mock.MockBetaHealthChecks -} - -// AlphaRegionHealthChecks returns the interface for the alpha RegionHealthChecks. -func (mock *MockGCE) AlphaRegionHealthChecks() AlphaRegionHealthChecks { - return mock.MockAlphaRegionHealthChecks -} - -// BetaRegionHealthChecks returns the interface for the beta RegionHealthChecks. -func (mock *MockGCE) BetaRegionHealthChecks() BetaRegionHealthChecks { - return mock.MockBetaRegionHealthChecks -} - -// RegionHealthChecks returns the interface for the ga RegionHealthChecks. -func (mock *MockGCE) RegionHealthChecks() RegionHealthChecks { - return mock.MockRegionHealthChecks -} - -// HttpHealthChecks returns the interface for the ga HttpHealthChecks. -func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks { - return mock.MockHttpHealthChecks -} - -// HttpsHealthChecks returns the interface for the ga HttpsHealthChecks. -func (mock *MockGCE) HttpsHealthChecks() HttpsHealthChecks { - return mock.MockHttpsHealthChecks -} - -// InstanceGroups returns the interface for the ga InstanceGroups. -func (mock *MockGCE) InstanceGroups() InstanceGroups { - return mock.MockInstanceGroups -} - -// Instances returns the interface for the ga Instances. -func (mock *MockGCE) Instances() Instances { - return mock.MockInstances -} - -// BetaInstances returns the interface for the beta Instances. -func (mock *MockGCE) BetaInstances() BetaInstances { - return mock.MockBetaInstances -} - -// AlphaInstances returns the interface for the alpha Instances. -func (mock *MockGCE) AlphaInstances() AlphaInstances { - return mock.MockAlphaInstances -} - -// InstanceGroupManagers returns the interface for the ga InstanceGroupManagers. -func (mock *MockGCE) InstanceGroupManagers() InstanceGroupManagers { - return mock.MockInstanceGroupManagers -} - -// InstanceTemplates returns the interface for the ga InstanceTemplates. -func (mock *MockGCE) InstanceTemplates() InstanceTemplates { - return mock.MockInstanceTemplates -} - -// Images returns the interface for the ga Images. -func (mock *MockGCE) Images() Images { - return mock.MockImages -} - -// BetaImages returns the interface for the beta Images. -func (mock *MockGCE) BetaImages() BetaImages { - return mock.MockBetaImages -} - -// AlphaImages returns the interface for the alpha Images. -func (mock *MockGCE) AlphaImages() AlphaImages { - return mock.MockAlphaImages -} - -// AlphaNetworks returns the interface for the alpha Networks. -func (mock *MockGCE) AlphaNetworks() AlphaNetworks { - return mock.MockAlphaNetworks -} - -// BetaNetworks returns the interface for the beta Networks. -func (mock *MockGCE) BetaNetworks() BetaNetworks { - return mock.MockBetaNetworks -} - -// Networks returns the interface for the ga Networks. -func (mock *MockGCE) Networks() Networks { - return mock.MockNetworks -} - -// AlphaNetworkEndpointGroups returns the interface for the alpha NetworkEndpointGroups. -func (mock *MockGCE) AlphaNetworkEndpointGroups() AlphaNetworkEndpointGroups { - return mock.MockAlphaNetworkEndpointGroups -} - -// BetaNetworkEndpointGroups returns the interface for the beta NetworkEndpointGroups. -func (mock *MockGCE) BetaNetworkEndpointGroups() BetaNetworkEndpointGroups { - return mock.MockBetaNetworkEndpointGroups -} - -// NetworkEndpointGroups returns the interface for the ga NetworkEndpointGroups. -func (mock *MockGCE) NetworkEndpointGroups() NetworkEndpointGroups { - return mock.MockNetworkEndpointGroups -} - -// AlphaGlobalNetworkEndpointGroups returns the interface for the alpha GlobalNetworkEndpointGroups. -func (mock *MockGCE) AlphaGlobalNetworkEndpointGroups() AlphaGlobalNetworkEndpointGroups { - return mock.MockAlphaGlobalNetworkEndpointGroups -} - -// BetaGlobalNetworkEndpointGroups returns the interface for the beta GlobalNetworkEndpointGroups. -func (mock *MockGCE) BetaGlobalNetworkEndpointGroups() BetaGlobalNetworkEndpointGroups { - return mock.MockBetaGlobalNetworkEndpointGroups -} - -// GlobalNetworkEndpointGroups returns the interface for the ga GlobalNetworkEndpointGroups. -func (mock *MockGCE) GlobalNetworkEndpointGroups() GlobalNetworkEndpointGroups { - return mock.MockGlobalNetworkEndpointGroups -} - -// Projects returns the interface for the ga Projects. -func (mock *MockGCE) Projects() Projects { - return mock.MockProjects -} - -// Regions returns the interface for the ga Regions. -func (mock *MockGCE) Regions() Regions { - return mock.MockRegions -} - -// AlphaRouters returns the interface for the alpha Routers. -func (mock *MockGCE) AlphaRouters() AlphaRouters { - return mock.MockAlphaRouters -} - -// BetaRouters returns the interface for the beta Routers. -func (mock *MockGCE) BetaRouters() BetaRouters { - return mock.MockBetaRouters -} - -// Routers returns the interface for the ga Routers. -func (mock *MockGCE) Routers() Routers { - return mock.MockRouters -} - -// Routes returns the interface for the ga Routes. -func (mock *MockGCE) Routes() Routes { - return mock.MockRoutes -} - -// BetaSecurityPolicies returns the interface for the beta SecurityPolicies. -func (mock *MockGCE) BetaSecurityPolicies() BetaSecurityPolicies { - return mock.MockBetaSecurityPolicies -} - -// ServiceAttachments returns the interface for the ga ServiceAttachments. -func (mock *MockGCE) ServiceAttachments() ServiceAttachments { - return mock.MockServiceAttachments -} - -// BetaServiceAttachments returns the interface for the beta ServiceAttachments. -func (mock *MockGCE) BetaServiceAttachments() BetaServiceAttachments { - return mock.MockBetaServiceAttachments -} - -// AlphaServiceAttachments returns the interface for the alpha ServiceAttachments. -func (mock *MockGCE) AlphaServiceAttachments() AlphaServiceAttachments { - return mock.MockAlphaServiceAttachments -} - -// SslCertificates returns the interface for the ga SslCertificates. -func (mock *MockGCE) SslCertificates() SslCertificates { - return mock.MockSslCertificates -} - -// BetaSslCertificates returns the interface for the beta SslCertificates. -func (mock *MockGCE) BetaSslCertificates() BetaSslCertificates { - return mock.MockBetaSslCertificates -} - -// AlphaSslCertificates returns the interface for the alpha SslCertificates. -func (mock *MockGCE) AlphaSslCertificates() AlphaSslCertificates { - return mock.MockAlphaSslCertificates -} - -// AlphaRegionSslCertificates returns the interface for the alpha RegionSslCertificates. -func (mock *MockGCE) AlphaRegionSslCertificates() AlphaRegionSslCertificates { - return mock.MockAlphaRegionSslCertificates -} - -// BetaRegionSslCertificates returns the interface for the beta RegionSslCertificates. -func (mock *MockGCE) BetaRegionSslCertificates() BetaRegionSslCertificates { - return mock.MockBetaRegionSslCertificates -} - -// RegionSslCertificates returns the interface for the ga RegionSslCertificates. -func (mock *MockGCE) RegionSslCertificates() RegionSslCertificates { - return mock.MockRegionSslCertificates -} - -// SslPolicies returns the interface for the ga SslPolicies. -func (mock *MockGCE) SslPolicies() SslPolicies { - return mock.MockSslPolicies -} - -// RegionSslPolicies returns the interface for the ga RegionSslPolicies. -func (mock *MockGCE) RegionSslPolicies() RegionSslPolicies { - return mock.MockRegionSslPolicies -} - -// AlphaSubnetworks returns the interface for the alpha Subnetworks. -func (mock *MockGCE) AlphaSubnetworks() AlphaSubnetworks { - return mock.MockAlphaSubnetworks -} - -// BetaSubnetworks returns the interface for the beta Subnetworks. -func (mock *MockGCE) BetaSubnetworks() BetaSubnetworks { - return mock.MockBetaSubnetworks -} - -// Subnetworks returns the interface for the ga Subnetworks. -func (mock *MockGCE) Subnetworks() Subnetworks { - return mock.MockSubnetworks -} - -// AlphaTargetHttpProxies returns the interface for the alpha TargetHttpProxies. -func (mock *MockGCE) AlphaTargetHttpProxies() AlphaTargetHttpProxies { - return mock.MockAlphaTargetHttpProxies -} - -// BetaTargetHttpProxies returns the interface for the beta TargetHttpProxies. -func (mock *MockGCE) BetaTargetHttpProxies() BetaTargetHttpProxies { - return mock.MockBetaTargetHttpProxies -} - -// TargetHttpProxies returns the interface for the ga TargetHttpProxies. -func (mock *MockGCE) TargetHttpProxies() TargetHttpProxies { - return mock.MockTargetHttpProxies -} - -// AlphaRegionTargetHttpProxies returns the interface for the alpha RegionTargetHttpProxies. -func (mock *MockGCE) AlphaRegionTargetHttpProxies() AlphaRegionTargetHttpProxies { - return mock.MockAlphaRegionTargetHttpProxies -} - -// BetaRegionTargetHttpProxies returns the interface for the beta RegionTargetHttpProxies. -func (mock *MockGCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies { - return mock.MockBetaRegionTargetHttpProxies -} - -// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies. -func (mock *MockGCE) RegionTargetHttpProxies() RegionTargetHttpProxies { - return mock.MockRegionTargetHttpProxies -} - -// TargetHttpsProxies returns the interface for the ga TargetHttpsProxies. -func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies { - return mock.MockTargetHttpsProxies -} - -// AlphaTargetHttpsProxies returns the interface for the alpha TargetHttpsProxies. -func (mock *MockGCE) AlphaTargetHttpsProxies() AlphaTargetHttpsProxies { - return mock.MockAlphaTargetHttpsProxies -} - -// BetaTargetHttpsProxies returns the interface for the beta TargetHttpsProxies. -func (mock *MockGCE) BetaTargetHttpsProxies() BetaTargetHttpsProxies { - return mock.MockBetaTargetHttpsProxies -} - -// AlphaRegionTargetHttpsProxies returns the interface for the alpha RegionTargetHttpsProxies. -func (mock *MockGCE) AlphaRegionTargetHttpsProxies() AlphaRegionTargetHttpsProxies { - return mock.MockAlphaRegionTargetHttpsProxies -} - -// BetaRegionTargetHttpsProxies returns the interface for the beta RegionTargetHttpsProxies. -func (mock *MockGCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies { - return mock.MockBetaRegionTargetHttpsProxies -} - -// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies. -func (mock *MockGCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies { - return mock.MockRegionTargetHttpsProxies -} - -// TargetPools returns the interface for the ga TargetPools. -func (mock *MockGCE) TargetPools() TargetPools { - return mock.MockTargetPools -} - -// AlphaTargetTcpProxies returns the interface for the alpha TargetTcpProxies. -func (mock *MockGCE) AlphaTargetTcpProxies() AlphaTargetTcpProxies { - return mock.MockAlphaTargetTcpProxies -} - -// BetaTargetTcpProxies returns the interface for the beta TargetTcpProxies. -func (mock *MockGCE) BetaTargetTcpProxies() BetaTargetTcpProxies { - return mock.MockBetaTargetTcpProxies -} - -// TargetTcpProxies returns the interface for the ga TargetTcpProxies. -func (mock *MockGCE) TargetTcpProxies() TargetTcpProxies { - return mock.MockTargetTcpProxies -} - -// AlphaUrlMaps returns the interface for the alpha UrlMaps. -func (mock *MockGCE) AlphaUrlMaps() AlphaUrlMaps { - return mock.MockAlphaUrlMaps -} - -// BetaUrlMaps returns the interface for the beta UrlMaps. -func (mock *MockGCE) BetaUrlMaps() BetaUrlMaps { - return mock.MockBetaUrlMaps -} - -// UrlMaps returns the interface for the ga UrlMaps. -func (mock *MockGCE) UrlMaps() UrlMaps { - return mock.MockUrlMaps -} - -// AlphaRegionUrlMaps returns the interface for the alpha RegionUrlMaps. -func (mock *MockGCE) AlphaRegionUrlMaps() AlphaRegionUrlMaps { - return mock.MockAlphaRegionUrlMaps -} - -// BetaRegionUrlMaps returns the interface for the beta RegionUrlMaps. -func (mock *MockGCE) BetaRegionUrlMaps() BetaRegionUrlMaps { - return mock.MockBetaRegionUrlMaps -} - -// RegionUrlMaps returns the interface for the ga RegionUrlMaps. -func (mock *MockGCE) RegionUrlMaps() RegionUrlMaps { - return mock.MockRegionUrlMaps -} - -// Zones returns the interface for the ga Zones. -func (mock *MockGCE) Zones() Zones { - return mock.MockZones -} - -// TcpRoutes returns the interface for the ga TcpRoutes. -func (mock *MockGCE) TcpRoutes() TcpRoutes { - return mock.MockTcpRoutes -} - -// BetaTcpRoutes returns the interface for the beta TcpRoutes. -func (mock *MockGCE) BetaTcpRoutes() BetaTcpRoutes { - return mock.MockBetaTcpRoutes -} - -// Meshes returns the interface for the ga Meshes. -func (mock *MockGCE) Meshes() Meshes { - return mock.MockMeshes -} - -// BetaMeshes returns the interface for the beta Meshes. -func (mock *MockGCE) BetaMeshes() BetaMeshes { - return mock.MockBetaMeshes -} - -// MockAddressesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockAddressesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockAddressesObj) ToAlpha() *computealpha.Address { - if ret, ok := m.Obj.(*computealpha.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockAddressesObj) ToBeta() *computebeta.Address { - if ret, ok := m.Obj.(*computebeta.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockAddressesObj) ToGA() *computega.Address { - if ret, ok := m.Obj.(*computega.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// MockBackendServicesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockBackendServicesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockBackendServicesObj) ToAlpha() *computealpha.BackendService { - if ret, ok := m.Obj.(*computealpha.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockBackendServicesObj) ToBeta() *computebeta.BackendService { - if ret, ok := m.Obj.(*computebeta.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockBackendServicesObj) ToGA() *computega.BackendService { - if ret, ok := m.Obj.(*computega.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// MockDisksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockDisksObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockDisksObj) ToGA() *computega.Disk { - if ret, ok := m.Obj.(*computega.Disk); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Disk{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Disk via JSON: %v", m.Obj, err) - } - return ret -} - -// MockFirewallsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockFirewallsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockFirewallsObj) ToAlpha() *computealpha.Firewall { - if ret, ok := m.Obj.(*computealpha.Firewall); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Firewall{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Firewall via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockFirewallsObj) ToBeta() *computebeta.Firewall { - if ret, ok := m.Obj.(*computebeta.Firewall); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Firewall{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Firewall via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockFirewallsObj) ToGA() *computega.Firewall { - if ret, ok := m.Obj.(*computega.Firewall); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Firewall{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Firewall via JSON: %v", m.Obj, err) - } - return ret -} - -// MockForwardingRulesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockForwardingRulesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockForwardingRulesObj) ToAlpha() *computealpha.ForwardingRule { - if ret, ok := m.Obj.(*computealpha.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockForwardingRulesObj) ToBeta() *computebeta.ForwardingRule { - if ret, ok := m.Obj.(*computebeta.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockForwardingRulesObj) ToGA() *computega.ForwardingRule { - if ret, ok := m.Obj.(*computega.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// MockGlobalAddressesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockGlobalAddressesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockGlobalAddressesObj) ToAlpha() *computealpha.Address { - if ret, ok := m.Obj.(*computealpha.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockGlobalAddressesObj) ToBeta() *computebeta.Address { - if ret, ok := m.Obj.(*computebeta.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockGlobalAddressesObj) ToGA() *computega.Address { - if ret, ok := m.Obj.(*computega.Address); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Address{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Address via JSON: %v", m.Obj, err) - } - return ret -} - -// MockGlobalForwardingRulesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockGlobalForwardingRulesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockGlobalForwardingRulesObj) ToAlpha() *computealpha.ForwardingRule { - if ret, ok := m.Obj.(*computealpha.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockGlobalForwardingRulesObj) ToBeta() *computebeta.ForwardingRule { - if ret, ok := m.Obj.(*computebeta.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockGlobalForwardingRulesObj) ToGA() *computega.ForwardingRule { - if ret, ok := m.Obj.(*computega.ForwardingRule); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.ForwardingRule{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.ForwardingRule via JSON: %v", m.Obj, err) - } - return ret -} - -// MockGlobalNetworkEndpointGroupsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockGlobalNetworkEndpointGroupsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockGlobalNetworkEndpointGroupsObj) ToAlpha() *computealpha.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computealpha.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockGlobalNetworkEndpointGroupsObj) ToBeta() *computebeta.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computebeta.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockGlobalNetworkEndpointGroupsObj) ToGA() *computega.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computega.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// MockHealthChecksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockHealthChecksObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockHealthChecksObj) ToAlpha() *computealpha.HealthCheck { - if ret, ok := m.Obj.(*computealpha.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockHealthChecksObj) ToBeta() *computebeta.HealthCheck { - if ret, ok := m.Obj.(*computebeta.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockHealthChecksObj) ToGA() *computega.HealthCheck { - if ret, ok := m.Obj.(*computega.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// MockHttpHealthChecksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockHttpHealthChecksObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockHttpHealthChecksObj) ToGA() *computega.HttpHealthCheck { - if ret, ok := m.Obj.(*computega.HttpHealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.HttpHealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.HttpHealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// MockHttpsHealthChecksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockHttpsHealthChecksObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockHttpsHealthChecksObj) ToGA() *computega.HttpsHealthCheck { - if ret, ok := m.Obj.(*computega.HttpsHealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.HttpsHealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.HttpsHealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// MockImagesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockImagesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockImagesObj) ToAlpha() *computealpha.Image { - if ret, ok := m.Obj.(*computealpha.Image); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Image{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Image via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockImagesObj) ToBeta() *computebeta.Image { - if ret, ok := m.Obj.(*computebeta.Image); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Image{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Image via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockImagesObj) ToGA() *computega.Image { - if ret, ok := m.Obj.(*computega.Image); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Image{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Image via JSON: %v", m.Obj, err) - } - return ret -} - -// MockInstanceGroupManagersObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockInstanceGroupManagersObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockInstanceGroupManagersObj) ToGA() *computega.InstanceGroupManager { - if ret, ok := m.Obj.(*computega.InstanceGroupManager); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.InstanceGroupManager{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.InstanceGroupManager via JSON: %v", m.Obj, err) - } - return ret -} - -// MockInstanceGroupsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockInstanceGroupsObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockInstanceGroupsObj) ToGA() *computega.InstanceGroup { - if ret, ok := m.Obj.(*computega.InstanceGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.InstanceGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.InstanceGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// MockInstanceTemplatesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockInstanceTemplatesObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockInstanceTemplatesObj) ToGA() *computega.InstanceTemplate { - if ret, ok := m.Obj.(*computega.InstanceTemplate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.InstanceTemplate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.InstanceTemplate via JSON: %v", m.Obj, err) - } - return ret -} - -// MockInstancesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockInstancesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockInstancesObj) ToAlpha() *computealpha.Instance { - if ret, ok := m.Obj.(*computealpha.Instance); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Instance{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Instance via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockInstancesObj) ToBeta() *computebeta.Instance { - if ret, ok := m.Obj.(*computebeta.Instance); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Instance{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Instance via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockInstancesObj) ToGA() *computega.Instance { - if ret, ok := m.Obj.(*computega.Instance); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Instance{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Instance via JSON: %v", m.Obj, err) - } - return ret -} - -// MockMeshesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockMeshesObj struct { - Obj interface{} -} - -// ToBeta retrieves the given version of the object. -func (m *MockMeshesObj) ToBeta() *networkservicesbeta.Mesh { - if ret, ok := m.Obj.(*networkservicesbeta.Mesh); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &networkservicesbeta.Mesh{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *networkservicesbeta.Mesh via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockMeshesObj) ToGA() *networkservicesga.Mesh { - if ret, ok := m.Obj.(*networkservicesga.Mesh); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &networkservicesga.Mesh{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *networkservicesga.Mesh via JSON: %v", m.Obj, err) - } - return ret -} - -// MockNetworkEndpointGroupsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockNetworkEndpointGroupsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockNetworkEndpointGroupsObj) ToAlpha() *computealpha.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computealpha.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockNetworkEndpointGroupsObj) ToBeta() *computebeta.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computebeta.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockNetworkEndpointGroupsObj) ToGA() *computega.NetworkEndpointGroup { - if ret, ok := m.Obj.(*computega.NetworkEndpointGroup); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.NetworkEndpointGroup{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.NetworkEndpointGroup via JSON: %v", m.Obj, err) - } - return ret -} - -// MockNetworkFirewallPoliciesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockNetworkFirewallPoliciesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockNetworkFirewallPoliciesObj) ToAlpha() *computealpha.FirewallPolicy { - if ret, ok := m.Obj.(*computealpha.FirewallPolicy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.FirewallPolicy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.FirewallPolicy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockNetworksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockNetworksObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockNetworksObj) ToAlpha() *computealpha.Network { - if ret, ok := m.Obj.(*computealpha.Network); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Network{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Network via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockNetworksObj) ToBeta() *computebeta.Network { - if ret, ok := m.Obj.(*computebeta.Network); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Network{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Network via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockNetworksObj) ToGA() *computega.Network { - if ret, ok := m.Obj.(*computega.Network); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Network{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Network via JSON: %v", m.Obj, err) - } - return ret -} - -// MockProjectsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockProjectsObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockProjectsObj) ToGA() *computega.Project { - if ret, ok := m.Obj.(*computega.Project); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Project{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Project via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionBackendServicesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionBackendServicesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionBackendServicesObj) ToAlpha() *computealpha.BackendService { - if ret, ok := m.Obj.(*computealpha.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionBackendServicesObj) ToBeta() *computebeta.BackendService { - if ret, ok := m.Obj.(*computebeta.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionBackendServicesObj) ToGA() *computega.BackendService { - if ret, ok := m.Obj.(*computega.BackendService); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.BackendService{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.BackendService via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionDisksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionDisksObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionDisksObj) ToGA() *computega.Disk { - if ret, ok := m.Obj.(*computega.Disk); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Disk{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Disk via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionHealthChecksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionHealthChecksObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionHealthChecksObj) ToAlpha() *computealpha.HealthCheck { - if ret, ok := m.Obj.(*computealpha.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionHealthChecksObj) ToBeta() *computebeta.HealthCheck { - if ret, ok := m.Obj.(*computebeta.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionHealthChecksObj) ToGA() *computega.HealthCheck { - if ret, ok := m.Obj.(*computega.HealthCheck); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.HealthCheck{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.HealthCheck via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionNetworkFirewallPoliciesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionNetworkFirewallPoliciesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionNetworkFirewallPoliciesObj) ToAlpha() *computealpha.FirewallPolicy { - if ret, ok := m.Obj.(*computealpha.FirewallPolicy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.FirewallPolicy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.FirewallPolicy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionSslCertificatesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionSslCertificatesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionSslCertificatesObj) ToAlpha() *computealpha.SslCertificate { - if ret, ok := m.Obj.(*computealpha.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionSslCertificatesObj) ToBeta() *computebeta.SslCertificate { - if ret, ok := m.Obj.(*computebeta.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionSslCertificatesObj) ToGA() *computega.SslCertificate { - if ret, ok := m.Obj.(*computega.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionSslPoliciesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionSslPoliciesObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionSslPoliciesObj) ToGA() *computega.SslPolicy { - if ret, ok := m.Obj.(*computega.SslPolicy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.SslPolicy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.SslPolicy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionTargetHttpProxiesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionTargetHttpProxiesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionTargetHttpProxiesObj) ToAlpha() *computealpha.TargetHttpProxy { - if ret, ok := m.Obj.(*computealpha.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionTargetHttpProxiesObj) ToBeta() *computebeta.TargetHttpProxy { - if ret, ok := m.Obj.(*computebeta.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionTargetHttpProxiesObj) ToGA() *computega.TargetHttpProxy { - if ret, ok := m.Obj.(*computega.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionTargetHttpsProxiesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionTargetHttpsProxiesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionTargetHttpsProxiesObj) ToAlpha() *computealpha.TargetHttpsProxy { - if ret, ok := m.Obj.(*computealpha.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionTargetHttpsProxiesObj) ToBeta() *computebeta.TargetHttpsProxy { - if ret, ok := m.Obj.(*computebeta.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionTargetHttpsProxiesObj) ToGA() *computega.TargetHttpsProxy { - if ret, ok := m.Obj.(*computega.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionUrlMapsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionUrlMapsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRegionUrlMapsObj) ToAlpha() *computealpha.UrlMap { - if ret, ok := m.Obj.(*computealpha.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRegionUrlMapsObj) ToBeta() *computebeta.UrlMap { - if ret, ok := m.Obj.(*computebeta.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionUrlMapsObj) ToGA() *computega.UrlMap { - if ret, ok := m.Obj.(*computega.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRegionsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRegionsObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockRegionsObj) ToGA() *computega.Region { - if ret, ok := m.Obj.(*computega.Region); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Region{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Region via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRoutersObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRoutersObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockRoutersObj) ToAlpha() *computealpha.Router { - if ret, ok := m.Obj.(*computealpha.Router); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Router{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Router via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockRoutersObj) ToBeta() *computebeta.Router { - if ret, ok := m.Obj.(*computebeta.Router); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Router{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Router via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockRoutersObj) ToGA() *computega.Router { - if ret, ok := m.Obj.(*computega.Router); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Router{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Router via JSON: %v", m.Obj, err) - } - return ret -} - -// MockRoutesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockRoutesObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockRoutesObj) ToGA() *computega.Route { - if ret, ok := m.Obj.(*computega.Route); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Route{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Route via JSON: %v", m.Obj, err) - } - return ret -} - -// MockSecurityPoliciesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockSecurityPoliciesObj struct { - Obj interface{} -} - -// ToBeta retrieves the given version of the object. -func (m *MockSecurityPoliciesObj) ToBeta() *computebeta.SecurityPolicy { - if ret, ok := m.Obj.(*computebeta.SecurityPolicy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.SecurityPolicy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.SecurityPolicy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockServiceAttachmentsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockServiceAttachmentsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockServiceAttachmentsObj) ToAlpha() *computealpha.ServiceAttachment { - if ret, ok := m.Obj.(*computealpha.ServiceAttachment); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.ServiceAttachment{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.ServiceAttachment via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockServiceAttachmentsObj) ToBeta() *computebeta.ServiceAttachment { - if ret, ok := m.Obj.(*computebeta.ServiceAttachment); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.ServiceAttachment{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.ServiceAttachment via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockServiceAttachmentsObj) ToGA() *computega.ServiceAttachment { - if ret, ok := m.Obj.(*computega.ServiceAttachment); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.ServiceAttachment{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.ServiceAttachment via JSON: %v", m.Obj, err) - } - return ret -} - -// MockSslCertificatesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockSslCertificatesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockSslCertificatesObj) ToAlpha() *computealpha.SslCertificate { - if ret, ok := m.Obj.(*computealpha.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockSslCertificatesObj) ToBeta() *computebeta.SslCertificate { - if ret, ok := m.Obj.(*computebeta.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockSslCertificatesObj) ToGA() *computega.SslCertificate { - if ret, ok := m.Obj.(*computega.SslCertificate); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.SslCertificate{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.SslCertificate via JSON: %v", m.Obj, err) - } - return ret -} - -// MockSslPoliciesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockSslPoliciesObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockSslPoliciesObj) ToGA() *computega.SslPolicy { - if ret, ok := m.Obj.(*computega.SslPolicy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.SslPolicy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.SslPolicy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockSubnetworksObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockSubnetworksObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockSubnetworksObj) ToAlpha() *computealpha.Subnetwork { - if ret, ok := m.Obj.(*computealpha.Subnetwork); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.Subnetwork{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.Subnetwork via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockSubnetworksObj) ToBeta() *computebeta.Subnetwork { - if ret, ok := m.Obj.(*computebeta.Subnetwork); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.Subnetwork{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.Subnetwork via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockSubnetworksObj) ToGA() *computega.Subnetwork { - if ret, ok := m.Obj.(*computega.Subnetwork); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Subnetwork{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Subnetwork via JSON: %v", m.Obj, err) - } - return ret -} - -// MockTargetHttpProxiesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockTargetHttpProxiesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockTargetHttpProxiesObj) ToAlpha() *computealpha.TargetHttpProxy { - if ret, ok := m.Obj.(*computealpha.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockTargetHttpProxiesObj) ToBeta() *computebeta.TargetHttpProxy { - if ret, ok := m.Obj.(*computebeta.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockTargetHttpProxiesObj) ToGA() *computega.TargetHttpProxy { - if ret, ok := m.Obj.(*computega.TargetHttpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetHttpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetHttpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockTargetHttpsProxiesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockTargetHttpsProxiesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockTargetHttpsProxiesObj) ToAlpha() *computealpha.TargetHttpsProxy { - if ret, ok := m.Obj.(*computealpha.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockTargetHttpsProxiesObj) ToBeta() *computebeta.TargetHttpsProxy { - if ret, ok := m.Obj.(*computebeta.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockTargetHttpsProxiesObj) ToGA() *computega.TargetHttpsProxy { - if ret, ok := m.Obj.(*computega.TargetHttpsProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetHttpsProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetHttpsProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockTargetPoolsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockTargetPoolsObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockTargetPoolsObj) ToGA() *computega.TargetPool { - if ret, ok := m.Obj.(*computega.TargetPool); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetPool{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetPool via JSON: %v", m.Obj, err) - } - return ret -} - -// MockTargetTcpProxiesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockTargetTcpProxiesObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockTargetTcpProxiesObj) ToAlpha() *computealpha.TargetTcpProxy { - if ret, ok := m.Obj.(*computealpha.TargetTcpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.TargetTcpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.TargetTcpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockTargetTcpProxiesObj) ToBeta() *computebeta.TargetTcpProxy { - if ret, ok := m.Obj.(*computebeta.TargetTcpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.TargetTcpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.TargetTcpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockTargetTcpProxiesObj) ToGA() *computega.TargetTcpProxy { - if ret, ok := m.Obj.(*computega.TargetTcpProxy); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.TargetTcpProxy{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.TargetTcpProxy via JSON: %v", m.Obj, err) - } - return ret -} - -// MockTcpRoutesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockTcpRoutesObj struct { - Obj interface{} -} - -// ToBeta retrieves the given version of the object. -func (m *MockTcpRoutesObj) ToBeta() *networkservicesbeta.TcpRoute { - if ret, ok := m.Obj.(*networkservicesbeta.TcpRoute); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &networkservicesbeta.TcpRoute{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *networkservicesbeta.TcpRoute via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockTcpRoutesObj) ToGA() *networkservicesga.TcpRoute { - if ret, ok := m.Obj.(*networkservicesga.TcpRoute); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &networkservicesga.TcpRoute{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *networkservicesga.TcpRoute via JSON: %v", m.Obj, err) - } - return ret -} - -// MockUrlMapsObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockUrlMapsObj struct { - Obj interface{} -} - -// ToAlpha retrieves the given version of the object. -func (m *MockUrlMapsObj) ToAlpha() *computealpha.UrlMap { - if ret, ok := m.Obj.(*computealpha.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computealpha.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// ToBeta retrieves the given version of the object. -func (m *MockUrlMapsObj) ToBeta() *computebeta.UrlMap { - if ret, ok := m.Obj.(*computebeta.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computebeta.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// ToGA retrieves the given version of the object. -func (m *MockUrlMapsObj) ToGA() *computega.UrlMap { - if ret, ok := m.Obj.(*computega.UrlMap); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.UrlMap{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.UrlMap via JSON: %v", m.Obj, err) - } - return ret -} - -// MockZonesObj is used to store the various object versions in the shared -// map of mocked objects. This allows for multiple API versions to co-exist and -// share the same "view" of the objects in the backend. -type MockZonesObj struct { - Obj interface{} -} - -// ToGA retrieves the given version of the object. -func (m *MockZonesObj) ToGA() *computega.Zone { - if ret, ok := m.Obj.(*computega.Zone); ok { - return ret - } - // Convert the object via JSON copying to the type that was requested. - ret := &computega.Zone{} - if err := copyViaJSON(ret, m.Obj); err != nil { - klog.Errorf("Could not convert %T to *computega.Zone via JSON: %v", m.Obj, err) - } - return ret -} - -// Addresses is an interface that allows for mocking of Addresses. -type Addresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Address, error) -} - -// NewMockAddresses returns a new mock for Addresses. -func NewMockAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockAddresses { - mock := &MockAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAddresses is the mock for Addresses. -type MockAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAddresses, options ...Option) (bool, *computega.Address, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAddresses, options ...Option) (bool, []*computega.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Address, m *MockAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAddresses, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAddresses, options ...Option) (bool, map[string][]*computega.Address, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAddresses %v not found", key), - } - klog.V(5).Infof("MockAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAddresses.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAddresses.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Address - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockAddresses.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAddresses) Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAddresses %v exists", key), - } - klog.V(5).Infof("MockAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "addresses", key) - - m.Objects[*key] = &MockAddressesObj{obj} - klog.V(5).Infof("MockAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAddresses %v not found", key), - } - klog.V(5).Infof("MockAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Address, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computega.Address{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToGA().SelfLink) - if err != nil { - klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToGA()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToGA()) - } - klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAddresses) Obj(o *computega.Address) *MockAddressesObj { - return &MockAddressesObj{o} -} - -// GCEAddresses is a simplifying adapter for the GCE Addresses. -type GCEAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Addresses.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAddresses.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Addresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAddresses.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.Addresses.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Address - f := func(l *computega.AddressList) error { - klog.V(5).Infof("GCEAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEAddresses) Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Addresses", - } - klog.V(5).Infof("GCEAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Addresses.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Addresses", - } - klog.V(5).Infof("GCEAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Addresses.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAddresses.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("ga"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEAddresses.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEAddresses.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.GA.Addresses.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computega.Address{} - f := func(l *computega.AddressAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEAddresses.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Addresses...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AlphaAddresses is an interface that allows for mocking of Addresses. -type AlphaAddresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Address, error) -} - -// NewMockAlphaAddresses returns a new mock for Addresses. -func NewMockAlphaAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockAlphaAddresses { - mock := &MockAlphaAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaAddresses is the mock for Addresses. -type MockAlphaAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaAddresses, options ...Option) (bool, *computealpha.Address, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaAddresses, options ...Option) (bool, []*computealpha.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Address, m *MockAlphaAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaAddresses, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaAddresses, options ...Option) (bool, map[string][]*computealpha.Address, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaAddresses %v not found", key), - } - klog.V(5).Infof("MockAlphaAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaAddresses.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaAddresses.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Address - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaAddresses.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaAddresses) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaAddresses %v exists", key), - } - klog.V(5).Infof("MockAlphaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "addresses", key) - - m.Objects[*key] = &MockAddressesObj{obj} - klog.V(5).Infof("MockAlphaAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaAddresses %v not found", key), - } - klog.V(5).Infof("MockAlphaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Address, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computealpha.Address{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - if err != nil { - klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToAlpha()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToAlpha()) - } - klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaAddresses) Obj(o *computealpha.Address) *MockAddressesObj { - return &MockAddressesObj{o} -} - -// GCEAlphaAddresses is a simplifying adapter for the GCE Addresses. -type GCEAlphaAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEAlphaAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEAlphaAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Addresses.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEAlphaAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaAddresses.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Addresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaAddresses.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.Addresses.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Address - f := func(l *computealpha.AddressList) error { - klog.V(5).Infof("GCEAlphaAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEAlphaAddresses) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Addresses", - } - klog.V(5).Infof("GCEAlphaAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Addresses.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEAlphaAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Addresses", - } - klog.V(5).Infof("GCEAlphaAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Addresses.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("alpha"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEAlphaAddresses.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEAlphaAddresses.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Alpha.Addresses.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computealpha.Address{} - f := func(l *computealpha.AddressAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEAlphaAddresses.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Addresses...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// BetaAddresses is an interface that allows for mocking of Addresses. -type BetaAddresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Address, error) -} - -// NewMockBetaAddresses returns a new mock for Addresses. -func NewMockBetaAddresses(pr ProjectRouter, objs map[meta.Key]*MockAddressesObj) *MockBetaAddresses { - mock := &MockBetaAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaAddresses is the mock for Addresses. -type MockBetaAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaAddresses, options ...Option) (bool, *computebeta.Address, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaAddresses, options ...Option) (bool, []*computebeta.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Address, m *MockBetaAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaAddresses, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaAddresses, options ...Option) (bool, map[string][]*computebeta.Address, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaAddresses %v not found", key), - } - klog.V(5).Infof("MockBetaAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaAddresses.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaAddresses.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Address - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaAddresses.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaAddresses) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaAddresses %v exists", key), - } - klog.V(5).Infof("MockBetaAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "addresses", key) - - m.Objects[*key] = &MockAddressesObj{obj} - klog.V(5).Infof("MockBetaAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaAddresses %v not found", key), - } - klog.V(5).Infof("MockBetaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Address, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computebeta.Address{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToBeta().SelfLink) - if err != nil { - klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToBeta()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToBeta()) - } - klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaAddresses) Obj(o *computebeta.Address) *MockAddressesObj { - return &MockAddressesObj{o} -} - -// GCEBetaAddresses is a simplifying adapter for the GCE Addresses. -type GCEBetaAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEBetaAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEBetaAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Addresses.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEBetaAddresses) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaAddresses.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Addresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaAddresses.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.Addresses.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Address - f := func(l *computebeta.AddressList) error { - klog.V(5).Infof("GCEBetaAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEBetaAddresses) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Addresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Addresses", - } - klog.V(5).Infof("GCEBetaAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Addresses.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEBetaAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Addresses", - } - klog.V(5).Infof("GCEBetaAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Addresses.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaAddresses.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Addresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("beta"), - Service: "Addresses", - } - - klog.V(5).Infof("GCEBetaAddresses.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEBetaAddresses.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Beta.Addresses.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computebeta.Address{} - f := func(l *computebeta.AddressAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEBetaAddresses.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Addresses...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AlphaGlobalAddresses is an interface that allows for mocking of GlobalAddresses. -type AlphaGlobalAddresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockAlphaGlobalAddresses returns a new mock for GlobalAddresses. -func NewMockAlphaGlobalAddresses(pr ProjectRouter, objs map[meta.Key]*MockGlobalAddressesObj) *MockAlphaGlobalAddresses { - mock := &MockAlphaGlobalAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaGlobalAddresses is the mock for GlobalAddresses. -type MockAlphaGlobalAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalAddresses, options ...Option) (bool, *computealpha.Address, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaGlobalAddresses, options ...Option) (bool, []*computealpha.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Address, m *MockAlphaGlobalAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalAddresses, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaGlobalAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalAddresses.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaGlobalAddresses.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Address - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaGlobalAddresses.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaGlobalAddresses %v exists", key), - } - klog.V(5).Infof("MockAlphaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "addresses", key) - - m.Objects[*key] = &MockGlobalAddressesObj{obj} - klog.V(5).Infof("MockAlphaGlobalAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaGlobalAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaGlobalAddresses) Obj(o *computealpha.Address) *MockGlobalAddressesObj { - return &MockGlobalAddressesObj{o} -} - -// GCEAlphaGlobalAddresses is a simplifying adapter for the GCE GlobalAddresses. -type GCEAlphaGlobalAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEAlphaGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "GlobalAddresses", - } - - klog.V(5).Infof("GCEAlphaGlobalAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.GlobalAddresses.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaGlobalAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEAlphaGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalAddresses.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "GlobalAddresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaGlobalAddresses.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.GlobalAddresses.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Address - f := func(l *computealpha.AddressList) error { - klog.V(5).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEAlphaGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.GlobalAddresses.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEAlphaGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalAddresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalAddresses.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BetaGlobalAddresses is an interface that allows for mocking of GlobalAddresses. -type BetaGlobalAddresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockBetaGlobalAddresses returns a new mock for GlobalAddresses. -func NewMockBetaGlobalAddresses(pr ProjectRouter, objs map[meta.Key]*MockGlobalAddressesObj) *MockBetaGlobalAddresses { - mock := &MockBetaGlobalAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaGlobalAddresses is the mock for GlobalAddresses. -type MockBetaGlobalAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalAddresses, options ...Option) (bool, *computebeta.Address, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaGlobalAddresses, options ...Option) (bool, []*computebeta.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Address, m *MockBetaGlobalAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalAddresses, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaGlobalAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalAddresses.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaGlobalAddresses.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Address - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaGlobalAddresses.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaGlobalAddresses %v exists", key), - } - klog.V(5).Infof("MockBetaGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "addresses", key) - - m.Objects[*key] = &MockGlobalAddressesObj{obj} - klog.V(5).Infof("MockBetaGlobalAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaGlobalAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaGlobalAddresses) Obj(o *computebeta.Address) *MockGlobalAddressesObj { - return &MockGlobalAddressesObj{o} -} - -// GCEBetaGlobalAddresses is a simplifying adapter for the GCE GlobalAddresses. -type GCEBetaGlobalAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEBetaGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "GlobalAddresses", - } - - klog.V(5).Infof("GCEBetaGlobalAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.GlobalAddresses.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaGlobalAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEBetaGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalAddresses.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "GlobalAddresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaGlobalAddresses.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.GlobalAddresses.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Address - f := func(l *computebeta.AddressList) error { - klog.V(5).Infof("GCEBetaGlobalAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEBetaGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.GlobalAddresses.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEBetaGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalAddresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEBetaGlobalAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalAddresses.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GlobalAddresses is an interface that allows for mocking of GlobalAddresses. -type GlobalAddresses interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Address, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockGlobalAddresses returns a new mock for GlobalAddresses. -func NewMockGlobalAddresses(pr ProjectRouter, objs map[meta.Key]*MockGlobalAddressesObj) *MockGlobalAddresses { - mock := &MockGlobalAddresses{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockGlobalAddresses is the mock for GlobalAddresses. -type MockGlobalAddresses struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalAddressesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockGlobalAddresses, options ...Option) (bool, *computega.Address, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockGlobalAddresses, options ...Option) (bool, []*computega.Address, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Address, m *MockGlobalAddresses, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalAddresses, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalAddresses.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockGlobalAddresses.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockGlobalAddresses.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Address, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockGlobalAddresses.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockGlobalAddresses.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Address - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockGlobalAddresses.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockGlobalAddresses %v exists", key), - } - klog.V(5).Infof("MockGlobalAddresses.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "addresses") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "addresses", key) - - m.Objects[*key] = &MockGlobalAddressesObj{obj} - klog.V(5).Infof("MockGlobalAddresses.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalAddresses %v not found", key), - } - klog.V(5).Infof("MockGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockGlobalAddresses.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockGlobalAddresses) Obj(o *computega.Address) *MockGlobalAddressesObj { - return &MockGlobalAddressesObj{o} -} - -// GCEGlobalAddresses is a simplifying adapter for the GCE GlobalAddresses. -type GCEGlobalAddresses struct { - s *Service -} - -// Get the Address named by key. -func (g *GCEGlobalAddresses) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalAddresses.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalAddresses.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "GlobalAddresses", - } - - klog.V(5).Infof("GCEGlobalAddresses.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalAddresses.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.GlobalAddresses.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEGlobalAddresses.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Address objects. -func (g *GCEGlobalAddresses) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Address, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalAddresses.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "GlobalAddresses", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEGlobalAddresses.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.GlobalAddresses.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Address - f := func(l *computega.AddressList) error { - klog.V(5).Infof("GCEGlobalAddresses.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEGlobalAddresses.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Address with key of value obj. -func (g *GCEGlobalAddresses) Insert(ctx context.Context, key *meta.Key, obj *computega.Address, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalAddresses.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalAddresses.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalAddresses") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEGlobalAddresses.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalAddresses.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.GlobalAddresses.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalAddresses.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalAddresses.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Address referenced by key. -func (g *GCEGlobalAddresses) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalAddresses.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalAddresses.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalAddresses") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "GlobalAddresses", - } - klog.V(5).Infof("GCEGlobalAddresses.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalAddresses.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalAddresses.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalAddresses.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BackendServices is an interface that allows for mocking of BackendServices. -type BackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.BackendService, error) - AddSignedUrlKey(context.Context, *meta.Key, *computega.SignedUrlKey, ...Option) error - DeleteSignedUrlKey(context.Context, *meta.Key, string, ...Option) error - GetHealth(context.Context, *meta.Key, *computega.ResourceGroupReference, ...Option) (*computega.BackendServiceGroupHealth, error) - Patch(context.Context, *meta.Key, *computega.BackendService, ...Option) error - SetSecurityPolicy(context.Context, *meta.Key, *computega.SecurityPolicyReference, ...Option) error - Update(context.Context, *meta.Key, *computega.BackendService, ...Option) error -} - -// NewMockBackendServices returns a new mock for BackendServices. -func NewMockBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockBackendServices { - mock := &MockBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBackendServices is the mock for BackendServices. -type MockBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBackendServices, options ...Option) (bool, *computega.BackendService, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBackendServices, options ...Option) (bool, []*computega.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.BackendService, m *MockBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBackendServices, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBackendServices, options ...Option) (bool, map[string][]*computega.BackendService, error) - AddSignedUrlKeyHook func(context.Context, *meta.Key, *computega.SignedUrlKey, *MockBackendServices, ...Option) error - DeleteSignedUrlKeyHook func(context.Context, *meta.Key, string, *MockBackendServices, ...Option) error - GetHealthHook func(context.Context, *meta.Key, *computega.ResourceGroupReference, *MockBackendServices, ...Option) (*computega.BackendServiceGroupHealth, error) - PatchHook func(context.Context, *meta.Key, *computega.BackendService, *MockBackendServices, ...Option) error - SetSecurityPolicyHook func(context.Context, *meta.Key, *computega.SecurityPolicyReference, *MockBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computega.BackendService, *MockBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBackendServices %v not found", key), - } - klog.V(5).Infof("MockBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBackendServices.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBackendServices.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.BackendService - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockBackendServices.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBackendServices %v exists", key), - } - klog.V(5).Infof("MockBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "backendServices", key) - - m.Objects[*key] = &MockBackendServicesObj{obj} - klog.V(5).Infof("MockBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBackendServices %v not found", key), - } - klog.V(5).Infof("MockBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.BackendService, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computega.BackendService{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToGA().SelfLink) - if err != nil { - klog.V(5).Infof("MockBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToGA()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToGA()) - } - klog.V(5).Infof("MockBackendServices.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBackendServices) Obj(o *computega.BackendService) *MockBackendServicesObj { - return &MockBackendServicesObj{o} -} - -// AddSignedUrlKey is a mock for the corresponding method. -func (m *MockBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computega.SignedUrlKey, options ...Option) error { - if m.AddSignedUrlKeyHook != nil { - return m.AddSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// DeleteSignedUrlKey is a mock for the corresponding method. -func (m *MockBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DeleteSignedUrlKeyHook != nil { - return m.DeleteSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// GetHealth is a mock for the corresponding method. -func (m *MockBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computega.ResourceGroupReference, options ...Option) (*computega.BackendServiceGroupHealth, error) { - if m.GetHealthHook != nil { - return m.GetHealthHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("GetHealthHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSecurityPolicy is a mock for the corresponding method. -func (m *MockBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computega.SecurityPolicyReference, options ...Option) error { - if m.SetSecurityPolicyHook != nil { - return m.SetSecurityPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBackendServices is a simplifying adapter for the GCE BackendServices. -type GCEBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCEBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.BackendServices.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCEBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "BackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBackendServices.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.BackendServices.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.BackendService - f := func(l *computega.BackendServiceList) error { - klog.V(5).Infof("GCEBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCEBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.BackendServices.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCEBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("ga"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEBackendServices.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEBackendServices.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.GA.BackendServices.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computega.BackendService{} - f := func(l *computega.BackendServiceAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEBackendServices.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.BackendServices...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AddSignedUrlKey is a method on GCEBackendServices. -func (g *GCEBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computega.SignedUrlKey, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddSignedUrlKey", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.AddSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DeleteSignedUrlKey is a method on GCEBackendServices. -func (g *GCEBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DeleteSignedUrlKey", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.DeleteSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// GetHealth is a method on GCEBackendServices. -func (g *GCEBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computega.ResourceGroupReference, options ...Option) (*computega.BackendServiceGroupHealth, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.GetHealth(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.GetHealth(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetHealth", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.GetHealth(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.GetHealth(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.BackendServices.GetHealth(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.GetHealth(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEBackendServices. -func (g *GCEBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSecurityPolicy is a method on GCEBackendServices. -func (g *GCEBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computega.SecurityPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSecurityPolicy", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.SetSecurityPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEBackendServices. -func (g *GCEBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.BackendServices.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaBackendServices is an interface that allows for mocking of BackendServices. -type BetaBackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.BackendService, error) - AddSignedUrlKey(context.Context, *meta.Key, *computebeta.SignedUrlKey, ...Option) error - DeleteSignedUrlKey(context.Context, *meta.Key, string, ...Option) error - Patch(context.Context, *meta.Key, *computebeta.BackendService, ...Option) error - SetSecurityPolicy(context.Context, *meta.Key, *computebeta.SecurityPolicyReference, ...Option) error - Update(context.Context, *meta.Key, *computebeta.BackendService, ...Option) error -} - -// NewMockBetaBackendServices returns a new mock for BackendServices. -func NewMockBetaBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockBetaBackendServices { - mock := &MockBetaBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaBackendServices is the mock for BackendServices. -type MockBetaBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaBackendServices, options ...Option) (bool, *computebeta.BackendService, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaBackendServices, options ...Option) (bool, []*computebeta.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, m *MockBetaBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaBackendServices, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaBackendServices, options ...Option) (bool, map[string][]*computebeta.BackendService, error) - AddSignedUrlKeyHook func(context.Context, *meta.Key, *computebeta.SignedUrlKey, *MockBetaBackendServices, ...Option) error - DeleteSignedUrlKeyHook func(context.Context, *meta.Key, string, *MockBetaBackendServices, ...Option) error - PatchHook func(context.Context, *meta.Key, *computebeta.BackendService, *MockBetaBackendServices, ...Option) error - SetSecurityPolicyHook func(context.Context, *meta.Key, *computebeta.SecurityPolicyReference, *MockBetaBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computebeta.BackendService, *MockBetaBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaBackendServices %v not found", key), - } - klog.V(5).Infof("MockBetaBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaBackendServices.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaBackendServices.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.BackendService - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaBackendServices.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaBackendServices %v exists", key), - } - klog.V(5).Infof("MockBetaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "backendServices", key) - - m.Objects[*key] = &MockBackendServicesObj{obj} - klog.V(5).Infof("MockBetaBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaBackendServices %v not found", key), - } - klog.V(5).Infof("MockBetaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockBetaBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.BackendService, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockBetaBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computebeta.BackendService{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToBeta().SelfLink) - if err != nil { - klog.V(5).Infof("MockBetaBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToBeta()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToBeta()) - } - klog.V(5).Infof("MockBetaBackendServices.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaBackendServices) Obj(o *computebeta.BackendService) *MockBackendServicesObj { - return &MockBackendServicesObj{o} -} - -// AddSignedUrlKey is a mock for the corresponding method. -func (m *MockBetaBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computebeta.SignedUrlKey, options ...Option) error { - if m.AddSignedUrlKeyHook != nil { - return m.AddSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// DeleteSignedUrlKey is a mock for the corresponding method. -func (m *MockBetaBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DeleteSignedUrlKeyHook != nil { - return m.DeleteSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSecurityPolicy is a mock for the corresponding method. -func (m *MockBetaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyReference, options ...Option) error { - if m.SetSecurityPolicyHook != nil { - return m.SetSecurityPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockBetaBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaBackendServices is a simplifying adapter for the GCE BackendServices. -type GCEBetaBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCEBetaBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEBetaBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.BackendServices.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCEBetaBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "BackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaBackendServices.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.BackendServices.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.BackendService - f := func(l *computebeta.BackendServiceList) error { - klog.V(5).Infof("GCEBetaBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCEBetaBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.BackendServices.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCEBetaBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEBetaBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("beta"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEBetaBackendServices.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEBetaBackendServices.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Beta.BackendServices.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computebeta.BackendService{} - f := func(l *computebeta.BackendServiceAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEBetaBackendServices.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.BackendServices...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AddSignedUrlKey is a method on GCEBetaBackendServices. -func (g *GCEBetaBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computebeta.SignedUrlKey, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddSignedUrlKey", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.AddSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DeleteSignedUrlKey is a method on GCEBetaBackendServices. -func (g *GCEBetaBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DeleteSignedUrlKey", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.DeleteSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Patch is a method on GCEBetaBackendServices. -func (g *GCEBetaBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSecurityPolicy is a method on GCEBetaBackendServices. -func (g *GCEBetaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSecurityPolicy", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.SetSecurityPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaBackendServices. -func (g *GCEBetaBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEBetaBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.BackendServices.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaBackendServices is an interface that allows for mocking of BackendServices. -type AlphaBackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.BackendService, error) - AddSignedUrlKey(context.Context, *meta.Key, *computealpha.SignedUrlKey, ...Option) error - DeleteSignedUrlKey(context.Context, *meta.Key, string, ...Option) error - Patch(context.Context, *meta.Key, *computealpha.BackendService, ...Option) error - SetSecurityPolicy(context.Context, *meta.Key, *computealpha.SecurityPolicyReference, ...Option) error - Update(context.Context, *meta.Key, *computealpha.BackendService, ...Option) error -} - -// NewMockAlphaBackendServices returns a new mock for BackendServices. -func NewMockAlphaBackendServices(pr ProjectRouter, objs map[meta.Key]*MockBackendServicesObj) *MockAlphaBackendServices { - mock := &MockAlphaBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaBackendServices is the mock for BackendServices. -type MockAlphaBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaBackendServices, options ...Option) (bool, *computealpha.BackendService, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaBackendServices, options ...Option) (bool, []*computealpha.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, m *MockAlphaBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaBackendServices, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaBackendServices, options ...Option) (bool, map[string][]*computealpha.BackendService, error) - AddSignedUrlKeyHook func(context.Context, *meta.Key, *computealpha.SignedUrlKey, *MockAlphaBackendServices, ...Option) error - DeleteSignedUrlKeyHook func(context.Context, *meta.Key, string, *MockAlphaBackendServices, ...Option) error - PatchHook func(context.Context, *meta.Key, *computealpha.BackendService, *MockAlphaBackendServices, ...Option) error - SetSecurityPolicyHook func(context.Context, *meta.Key, *computealpha.SecurityPolicyReference, *MockAlphaBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computealpha.BackendService, *MockAlphaBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaBackendServices %v not found", key), - } - klog.V(5).Infof("MockAlphaBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaBackendServices.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaBackendServices.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.BackendService - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaBackendServices.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaBackendServices %v exists", key), - } - klog.V(5).Infof("MockAlphaBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "backendServices", key) - - m.Objects[*key] = &MockBackendServicesObj{obj} - klog.V(5).Infof("MockAlphaBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaBackendServices %v not found", key), - } - klog.V(5).Infof("MockAlphaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockAlphaBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.BackendService, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockAlphaBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computealpha.BackendService{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - if err != nil { - klog.V(5).Infof("MockAlphaBackendServices.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToAlpha()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToAlpha()) - } - klog.V(5).Infof("MockAlphaBackendServices.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaBackendServices) Obj(o *computealpha.BackendService) *MockBackendServicesObj { - return &MockBackendServicesObj{o} -} - -// AddSignedUrlKey is a mock for the corresponding method. -func (m *MockAlphaBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computealpha.SignedUrlKey, options ...Option) error { - if m.AddSignedUrlKeyHook != nil { - return m.AddSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// DeleteSignedUrlKey is a mock for the corresponding method. -func (m *MockAlphaBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DeleteSignedUrlKeyHook != nil { - return m.DeleteSignedUrlKeyHook(ctx, key, arg0, m) - } - return nil -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSecurityPolicy is a mock for the corresponding method. -func (m *MockAlphaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.SecurityPolicyReference, options ...Option) error { - if m.SetSecurityPolicyHook != nil { - return m.SetSecurityPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaBackendServices is a simplifying adapter for the GCE BackendServices. -type GCEAlphaBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCEAlphaBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEAlphaBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.BackendServices.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCEAlphaBackendServices) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaBackendServices.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.BackendServices.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.BackendService - f := func(l *computealpha.BackendServiceList) error { - klog.V(5).Infof("GCEAlphaBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCEAlphaBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.BackendServices.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCEAlphaBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEAlphaBackendServices) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - - klog.V(5).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Alpha.BackendServices.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computealpha.BackendService{} - f := func(l *computealpha.BackendServiceAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.BackendServices...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaBackendServices.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AddSignedUrlKey is a method on GCEAlphaBackendServices. -func (g *GCEAlphaBackendServices) AddSignedUrlKey(ctx context.Context, key *meta.Key, arg0 *computealpha.SignedUrlKey, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddSignedUrlKey", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.AddSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaBackendServices.AddSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DeleteSignedUrlKey is a method on GCEAlphaBackendServices. -func (g *GCEAlphaBackendServices) DeleteSignedUrlKey(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DeleteSignedUrlKey", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.DeleteSignedUrlKey(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaBackendServices.DeleteSignedUrlKey(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Patch is a method on GCEAlphaBackendServices. -func (g *GCEAlphaBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSecurityPolicy is a method on GCEAlphaBackendServices. -func (g *GCEAlphaBackendServices) SetSecurityPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.SecurityPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSecurityPolicy", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.SetSecurityPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaBackendServices.SetSecurityPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaBackendServices. -func (g *GCEAlphaBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "BackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "BackendServices", - } - klog.V(5).Infof("GCEAlphaBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.BackendServices.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionBackendServices is an interface that allows for mocking of RegionBackendServices. -type RegionBackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetHealth(context.Context, *meta.Key, *computega.ResourceGroupReference, ...Option) (*computega.BackendServiceGroupHealth, error) - Patch(context.Context, *meta.Key, *computega.BackendService, ...Option) error - Update(context.Context, *meta.Key, *computega.BackendService, ...Option) error -} - -// NewMockRegionBackendServices returns a new mock for RegionBackendServices. -func NewMockRegionBackendServices(pr ProjectRouter, objs map[meta.Key]*MockRegionBackendServicesObj) *MockRegionBackendServices { - mock := &MockRegionBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionBackendServices is the mock for RegionBackendServices. -type MockRegionBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionBackendServices, options ...Option) (bool, *computega.BackendService, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionBackendServices, options ...Option) (bool, []*computega.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.BackendService, m *MockRegionBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionBackendServices, options ...Option) (bool, error) - GetHealthHook func(context.Context, *meta.Key, *computega.ResourceGroupReference, *MockRegionBackendServices, ...Option) (*computega.BackendServiceGroupHealth, error) - PatchHook func(context.Context, *meta.Key, *computega.BackendService, *MockRegionBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computega.BackendService, *MockRegionBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionBackendServices.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionBackendServices.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.BackendService - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionBackendServices.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionBackendServices %v exists", key), - } - klog.V(5).Infof("MockRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "backendServices", key) - - m.Objects[*key] = &MockRegionBackendServicesObj{obj} - klog.V(5).Infof("MockRegionBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionBackendServices) Obj(o *computega.BackendService) *MockRegionBackendServicesObj { - return &MockRegionBackendServicesObj{o} -} - -// GetHealth is a mock for the corresponding method. -func (m *MockRegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computega.ResourceGroupReference, options ...Option) (*computega.BackendServiceGroupHealth, error) { - if m.GetHealthHook != nil { - return m.GetHealthHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("GetHealthHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockRegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockRegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionBackendServices is a simplifying adapter for the GCE RegionBackendServices. -type GCERegionBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCERegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - - klog.V(5).Infof("GCERegionBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionBackendServices.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCERegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionBackendServices.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionBackendServices.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.BackendService - f := func(l *computega.BackendServiceList) error { - klog.V(5).Infof("GCERegionBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCERegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCERegionBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionBackendServices.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCERegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCERegionBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionBackendServices.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetHealth is a method on GCERegionBackendServices. -func (g *GCERegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computega.ResourceGroupReference, options ...Option) (*computega.BackendServiceGroupHealth, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.GetHealth(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.GetHealth(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetHealth", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCERegionBackendServices.GetHealth(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.GetHealth(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionBackendServices.GetHealth(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionBackendServices.GetHealth(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCERegionBackendServices. -func (g *GCERegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCERegionBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionBackendServices.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCERegionBackendServices. -func (g *GCERegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computega.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCERegionBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionBackendServices.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaRegionBackendServices is an interface that allows for mocking of RegionBackendServices. -type AlphaRegionBackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetHealth(context.Context, *meta.Key, *computealpha.ResourceGroupReference, ...Option) (*computealpha.BackendServiceGroupHealth, error) - Patch(context.Context, *meta.Key, *computealpha.BackendService, ...Option) error - Update(context.Context, *meta.Key, *computealpha.BackendService, ...Option) error -} - -// NewMockAlphaRegionBackendServices returns a new mock for RegionBackendServices. -func NewMockAlphaRegionBackendServices(pr ProjectRouter, objs map[meta.Key]*MockRegionBackendServicesObj) *MockAlphaRegionBackendServices { - mock := &MockAlphaRegionBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionBackendServices is the mock for RegionBackendServices. -type MockAlphaRegionBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionBackendServices, options ...Option) (bool, *computealpha.BackendService, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionBackendServices, options ...Option) (bool, []*computealpha.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, m *MockAlphaRegionBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionBackendServices, options ...Option) (bool, error) - GetHealthHook func(context.Context, *meta.Key, *computealpha.ResourceGroupReference, *MockAlphaRegionBackendServices, ...Option) (*computealpha.BackendServiceGroupHealth, error) - PatchHook func(context.Context, *meta.Key, *computealpha.BackendService, *MockAlphaRegionBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computealpha.BackendService, *MockAlphaRegionBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionBackendServices.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionBackendServices.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.BackendService - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionBackendServices.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionBackendServices %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "backendServices", key) - - m.Objects[*key] = &MockRegionBackendServicesObj{obj} - klog.V(5).Infof("MockAlphaRegionBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionBackendServices) Obj(o *computealpha.BackendService) *MockRegionBackendServicesObj { - return &MockRegionBackendServicesObj{o} -} - -// GetHealth is a mock for the corresponding method. -func (m *MockAlphaRegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computealpha.ResourceGroupReference, options ...Option) (*computealpha.BackendServiceGroupHealth, error) { - if m.GetHealthHook != nil { - return m.GetHealthHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("GetHealthHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaRegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaRegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaRegionBackendServices is a simplifying adapter for the GCE RegionBackendServices. -type GCEAlphaRegionBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCEAlphaRegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - - klog.V(5).Infof("GCEAlphaRegionBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionBackendServices.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCEAlphaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionBackendServices.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.BackendService - f := func(l *computealpha.BackendServiceList) error { - klog.V(5).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCEAlphaRegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionBackendServices.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCEAlphaRegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionBackendServices.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetHealth is a method on GCEAlphaRegionBackendServices. -func (g *GCEAlphaRegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computealpha.ResourceGroupReference, options ...Option) (*computealpha.BackendServiceGroupHealth, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.GetHealth(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.GetHealth(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetHealth", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.GetHealth(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.GetHealth(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionBackendServices.GetHealth(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionBackendServices.GetHealth(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEAlphaRegionBackendServices. -func (g *GCEAlphaRegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionBackendServices.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaRegionBackendServices. -func (g *GCEAlphaRegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionBackendServices.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaRegionBackendServices is an interface that allows for mocking of RegionBackendServices. -type BetaRegionBackendServices interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetHealth(context.Context, *meta.Key, *computebeta.ResourceGroupReference, ...Option) (*computebeta.BackendServiceGroupHealth, error) - Patch(context.Context, *meta.Key, *computebeta.BackendService, ...Option) error - Update(context.Context, *meta.Key, *computebeta.BackendService, ...Option) error -} - -// NewMockBetaRegionBackendServices returns a new mock for RegionBackendServices. -func NewMockBetaRegionBackendServices(pr ProjectRouter, objs map[meta.Key]*MockRegionBackendServicesObj) *MockBetaRegionBackendServices { - mock := &MockBetaRegionBackendServices{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionBackendServices is the mock for RegionBackendServices. -type MockBetaRegionBackendServices struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionBackendServicesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionBackendServices, options ...Option) (bool, *computebeta.BackendService, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionBackendServices, options ...Option) (bool, []*computebeta.BackendService, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, m *MockBetaRegionBackendServices, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionBackendServices, options ...Option) (bool, error) - GetHealthHook func(context.Context, *meta.Key, *computebeta.ResourceGroupReference, *MockBetaRegionBackendServices, ...Option) (*computebeta.BackendServiceGroupHealth, error) - PatchHook func(context.Context, *meta.Key, *computebeta.BackendService, *MockBetaRegionBackendServices, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computebeta.BackendService, *MockBetaRegionBackendServices, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionBackendServices.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionBackendServices.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockBetaRegionBackendServices.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionBackendServices.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionBackendServices.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.BackendService - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionBackendServices.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionBackendServices %v exists", key), - } - klog.V(5).Infof("MockBetaRegionBackendServices.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "backendServices") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "backendServices", key) - - m.Objects[*key] = &MockRegionBackendServicesObj{obj} - klog.V(5).Infof("MockBetaRegionBackendServices.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionBackendServices %v not found", key), - } - klog.V(5).Infof("MockBetaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionBackendServices.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionBackendServices) Obj(o *computebeta.BackendService) *MockRegionBackendServicesObj { - return &MockRegionBackendServicesObj{o} -} - -// GetHealth is a mock for the corresponding method. -func (m *MockBetaRegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computebeta.ResourceGroupReference, options ...Option) (*computebeta.BackendServiceGroupHealth, error) { - if m.GetHealthHook != nil { - return m.GetHealthHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("GetHealthHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaRegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockBetaRegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaRegionBackendServices is a simplifying adapter for the GCE RegionBackendServices. -type GCEBetaRegionBackendServices struct { - s *Service -} - -// Get the BackendService named by key. -func (g *GCEBetaRegionBackendServices) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - - klog.V(5).Infof("GCEBetaRegionBackendServices.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionBackendServices.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionBackendServices.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all BackendService objects. -func (g *GCEBetaRegionBackendServices) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.BackendService, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionBackendServices.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionBackendServices.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.BackendService - f := func(l *computebeta.BackendServiceList) error { - klog.V(5).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert BackendService with key of value obj. -func (g *GCEBetaRegionBackendServices) Insert(ctx context.Context, key *meta.Key, obj *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionBackendServices.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionBackendServices.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the BackendService referenced by key. -func (g *GCEBetaRegionBackendServices) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEBetaRegionBackendServices.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionBackendServices.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionBackendServices.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetHealth is a method on GCEBetaRegionBackendServices. -func (g *GCEBetaRegionBackendServices) GetHealth(ctx context.Context, key *meta.Key, arg0 *computebeta.ResourceGroupReference, options ...Option) (*computebeta.BackendServiceGroupHealth, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.GetHealth(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.GetHealth(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetHealth", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEBetaRegionBackendServices.GetHealth(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.GetHealth(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionBackendServices.GetHealth(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionBackendServices.GetHealth(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEBetaRegionBackendServices. -func (g *GCEBetaRegionBackendServices) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionBackendServices.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionBackendServices.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaRegionBackendServices. -func (g *GCEBetaRegionBackendServices) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.BackendService, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionBackendServices.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionBackendServices.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionBackendServices") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "RegionBackendServices", - } - klog.V(5).Infof("GCEBetaRegionBackendServices.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionBackendServices.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionBackendServices.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionBackendServices.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Disks is an interface that allows for mocking of Disks. -type Disks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Disk, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Resize(context.Context, *meta.Key, *computega.DisksResizeRequest, ...Option) error -} - -// NewMockDisks returns a new mock for Disks. -func NewMockDisks(pr ProjectRouter, objs map[meta.Key]*MockDisksObj) *MockDisks { - mock := &MockDisks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockDisks is the mock for Disks. -type MockDisks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockDisksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockDisks, options ...Option) (bool, *computega.Disk, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockDisks, options ...Option) (bool, []*computega.Disk, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Disk, m *MockDisks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockDisks, options ...Option) (bool, error) - ResizeHook func(context.Context, *meta.Key, *computega.DisksResizeRequest, *MockDisks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockDisks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockDisks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockDisks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockDisks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockDisks %v not found", key), - } - klog.V(5).Infof("MockDisks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockDisks) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Disk, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockDisks.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockDisks.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Disk - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockDisks.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockDisks) Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockDisks %v exists", key), - } - klog.V(5).Infof("MockDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "disks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "disks", key) - - m.Objects[*key] = &MockDisksObj{obj} - klog.V(5).Infof("MockDisks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockDisks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockDisks %v not found", key), - } - klog.V(5).Infof("MockDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockDisks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockDisks) Obj(o *computega.Disk) *MockDisksObj { - return &MockDisksObj{o} -} - -// Resize is a mock for the corresponding method. -func (m *MockDisks) Resize(ctx context.Context, key *meta.Key, arg0 *computega.DisksResizeRequest, options ...Option) error { - if m.ResizeHook != nil { - return m.ResizeHook(ctx, key, arg0, m) - } - return nil -} - -// GCEDisks is a simplifying adapter for the GCE Disks. -type GCEDisks struct { - s *Service -} - -// Get the Disk named by key. -func (g *GCEDisks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEDisks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEDisks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Disks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Disks", - } - - klog.V(5).Infof("GCEDisks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEDisks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Disks.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEDisks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Disk objects. -func (g *GCEDisks) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Disk, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEDisks.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Disks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Disks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEDisks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.GA.Disks.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Disk - f := func(l *computega.DiskList) error { - klog.V(5).Infof("GCEDisks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEDisks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEDisks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Disk with key of value obj. -func (g *GCEDisks) Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEDisks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEDisks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Disks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Disks", - } - klog.V(5).Infof("GCEDisks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEDisks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Disks.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEDisks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEDisks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Disk referenced by key. -func (g *GCEDisks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEDisks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEDisks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Disks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Disks", - } - klog.V(5).Infof("GCEDisks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEDisks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Disks.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEDisks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Resize is a method on GCEDisks. -func (g *GCEDisks) Resize(ctx context.Context, key *meta.Key, arg0 *computega.DisksResizeRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEDisks.Resize(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEDisks.Resize(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Disks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Resize", - Version: meta.Version("ga"), - Service: "Disks", - } - klog.V(5).Infof("GCEDisks.Resize(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEDisks.Resize(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Disks.Resize(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEDisks.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEDisks.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionDisks is an interface that allows for mocking of RegionDisks. -type RegionDisks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Disk, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Resize(context.Context, *meta.Key, *computega.RegionDisksResizeRequest, ...Option) error -} - -// NewMockRegionDisks returns a new mock for RegionDisks. -func NewMockRegionDisks(pr ProjectRouter, objs map[meta.Key]*MockRegionDisksObj) *MockRegionDisks { - mock := &MockRegionDisks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionDisks is the mock for RegionDisks. -type MockRegionDisks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionDisksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionDisks, options ...Option) (bool, *computega.Disk, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionDisks, options ...Option) (bool, []*computega.Disk, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Disk, m *MockRegionDisks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionDisks, options ...Option) (bool, error) - ResizeHook func(context.Context, *meta.Key, *computega.RegionDisksResizeRequest, *MockRegionDisks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionDisks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionDisks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionDisks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionDisks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionDisks %v not found", key), - } - klog.V(5).Infof("MockRegionDisks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionDisks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Disk, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionDisks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionDisks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Disk - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionDisks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionDisks) Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionDisks %v exists", key), - } - klog.V(5).Infof("MockRegionDisks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "disks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "disks", key) - - m.Objects[*key] = &MockRegionDisksObj{obj} - klog.V(5).Infof("MockRegionDisks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionDisks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionDisks %v not found", key), - } - klog.V(5).Infof("MockRegionDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionDisks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionDisks) Obj(o *computega.Disk) *MockRegionDisksObj { - return &MockRegionDisksObj{o} -} - -// Resize is a mock for the corresponding method. -func (m *MockRegionDisks) Resize(ctx context.Context, key *meta.Key, arg0 *computega.RegionDisksResizeRequest, options ...Option) error { - if m.ResizeHook != nil { - return m.ResizeHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionDisks is a simplifying adapter for the GCE RegionDisks. -type GCERegionDisks struct { - s *Service -} - -// Get the Disk named by key. -func (g *GCERegionDisks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Disk, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionDisks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionDisks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionDisks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionDisks", - } - - klog.V(5).Infof("GCERegionDisks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionDisks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionDisks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionDisks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Disk objects. -func (g *GCERegionDisks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Disk, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionDisks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionDisks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionDisks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionDisks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionDisks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Disk - f := func(l *computega.DiskList) error { - klog.V(5).Infof("GCERegionDisks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionDisks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionDisks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Disk with key of value obj. -func (g *GCERegionDisks) Insert(ctx context.Context, key *meta.Key, obj *computega.Disk, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionDisks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionDisks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionDisks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionDisks", - } - klog.V(5).Infof("GCERegionDisks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionDisks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionDisks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionDisks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionDisks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Disk referenced by key. -func (g *GCERegionDisks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionDisks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionDisks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionDisks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionDisks", - } - klog.V(5).Infof("GCERegionDisks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionDisks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionDisks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionDisks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionDisks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Resize is a method on GCERegionDisks. -func (g *GCERegionDisks) Resize(ctx context.Context, key *meta.Key, arg0 *computega.RegionDisksResizeRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionDisks.Resize(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionDisks.Resize(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionDisks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Resize", - Version: meta.Version("ga"), - Service: "RegionDisks", - } - klog.V(5).Infof("GCERegionDisks.Resize(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionDisks.Resize(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionDisks.Resize(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionDisks.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionDisks.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaFirewalls is an interface that allows for mocking of Firewalls. -type AlphaFirewalls interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Firewall, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Firewall, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Firewall, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computealpha.Firewall, ...Option) error - Update(context.Context, *meta.Key, *computealpha.Firewall, ...Option) error -} - -// NewMockAlphaFirewalls returns a new mock for Firewalls. -func NewMockAlphaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockAlphaFirewalls { - mock := &MockAlphaFirewalls{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaFirewalls is the mock for Firewalls. -type MockAlphaFirewalls struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockFirewallsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls, options ...Option) (bool, *computealpha.Firewall, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaFirewalls, options ...Option) (bool, []*computealpha.Firewall, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Firewall, m *MockAlphaFirewalls, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computealpha.Firewall, *MockAlphaFirewalls, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computealpha.Firewall, *MockAlphaFirewalls, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Firewall, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key), - } - klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Firewall, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Firewall - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Firewall, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaFirewalls %v exists", key), - } - klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "firewalls") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "firewalls", key) - - m.Objects[*key] = &MockFirewallsObj{obj} - klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key), - } - klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaFirewalls) Obj(o *computealpha.Firewall) *MockFirewallsObj { - return &MockFirewallsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Firewall, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.Firewall, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaFirewalls is a simplifying adapter for the GCE Firewalls. -type GCEAlphaFirewalls struct { - s *Service -} - -// Get the Firewall named by key. -func (g *GCEAlphaFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - - klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Firewalls.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Firewall objects. -func (g *GCEAlphaFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.Firewalls.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Firewall - f := func(l *computealpha.FirewallList) error { - klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Firewall with key of value obj. -func (g *GCEAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Firewalls.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Firewall referenced by key. -func (g *GCEAlphaFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Firewalls.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEAlphaFirewalls. -func (g *GCEAlphaFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaFirewalls.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEAlphaFirewalls.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Firewalls.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaFirewalls. -func (g *GCEAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaFirewalls.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Firewalls.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaFirewalls is an interface that allows for mocking of Firewalls. -type BetaFirewalls interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Firewall, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Firewall, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Firewall, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computebeta.Firewall, ...Option) error - Update(context.Context, *meta.Key, *computebeta.Firewall, ...Option) error -} - -// NewMockBetaFirewalls returns a new mock for Firewalls. -func NewMockBetaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockBetaFirewalls { - mock := &MockBetaFirewalls{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaFirewalls is the mock for Firewalls. -type MockBetaFirewalls struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockFirewallsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls, options ...Option) (bool, *computebeta.Firewall, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaFirewalls, options ...Option) (bool, []*computebeta.Firewall, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Firewall, m *MockBetaFirewalls, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computebeta.Firewall, *MockBetaFirewalls, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computebeta.Firewall, *MockBetaFirewalls, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Firewall, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaFirewalls %v not found", key), - } - klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Firewall, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Firewall - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Firewall, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaFirewalls %v exists", key), - } - klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "firewalls") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "firewalls", key) - - m.Objects[*key] = &MockFirewallsObj{obj} - klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaFirewalls %v not found", key), - } - klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaFirewalls) Obj(o *computebeta.Firewall) *MockFirewallsObj { - return &MockFirewallsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Firewall, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.Firewall, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaFirewalls is a simplifying adapter for the GCE Firewalls. -type GCEBetaFirewalls struct { - s *Service -} - -// Get the Firewall named by key. -func (g *GCEBetaFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Firewalls", - } - - klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Firewalls.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Firewall objects. -func (g *GCEBetaFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Firewalls", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.Firewalls.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Firewall - f := func(l *computebeta.FirewallList) error { - klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Firewall with key of value obj. -func (g *GCEBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Firewalls.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Firewall referenced by key. -func (g *GCEBetaFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Firewalls.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEBetaFirewalls. -func (g *GCEBetaFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaFirewalls.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEBetaFirewalls.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Firewalls.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaFirewalls. -func (g *GCEBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaFirewalls.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Firewalls.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Firewalls is an interface that allows for mocking of Firewalls. -type Firewalls interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Firewall, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Firewall, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Firewall, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computega.Firewall, ...Option) error - Update(context.Context, *meta.Key, *computega.Firewall, ...Option) error -} - -// NewMockFirewalls returns a new mock for Firewalls. -func NewMockFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockFirewalls { - mock := &MockFirewalls{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockFirewalls is the mock for Firewalls. -type MockFirewalls struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockFirewallsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockFirewalls, options ...Option) (bool, *computega.Firewall, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockFirewalls, options ...Option) (bool, []*computega.Firewall, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Firewall, m *MockFirewalls, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockFirewalls, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computega.Firewall, *MockFirewalls, ...Option) error - UpdateHook func(context.Context, *meta.Key, *computega.Firewall, *MockFirewalls, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Firewall, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockFirewalls %v not found", key), - } - klog.V(5).Infof("MockFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Firewall, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockFirewalls.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Firewall - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computega.Firewall, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockFirewalls %v exists", key), - } - klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "firewalls") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "firewalls", key) - - m.Objects[*key] = &MockFirewallsObj{obj} - klog.V(5).Infof("MockFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockFirewalls %v not found", key), - } - klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockFirewalls.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockFirewalls) Obj(o *computega.Firewall) *MockFirewallsObj { - return &MockFirewallsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Firewall, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Update is a mock for the corresponding method. -func (m *MockFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computega.Firewall, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEFirewalls is a simplifying adapter for the GCE Firewalls. -type GCEFirewalls struct { - s *Service -} - -// Get the Firewall named by key. -func (g *GCEFirewalls) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Firewalls", - } - - klog.V(5).Infof("GCEFirewalls.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Firewalls.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Firewall objects. -func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Firewall, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Firewalls", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEFirewalls.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Firewalls.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Firewall - f := func(l *computega.FirewallList) error { - klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Firewall with key of value obj. -func (g *GCEFirewalls) Insert(ctx context.Context, key *meta.Key, obj *computega.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEFirewalls.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Firewalls.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Firewall referenced by key. -func (g *GCEFirewalls) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEFirewalls.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Firewalls.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEFirewalls.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEFirewalls. -func (g *GCEFirewalls) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEFirewalls.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEFirewalls.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEFirewalls.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Firewalls.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEFirewalls.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Update is a method on GCEFirewalls. -func (g *GCEFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *computega.Firewall, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEFirewalls.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEFirewalls.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Firewalls") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "Firewalls", - } - klog.V(5).Infof("GCEFirewalls.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Firewalls.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaNetworkFirewallPolicies is an interface that allows for mocking of NetworkFirewallPolicies. -type AlphaNetworkFirewallPolicies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AddAssociation(context.Context, *meta.Key, *computealpha.FirewallPolicyAssociation, ...Option) error - AddRule(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, ...Option) error - CloneRules(context.Context, *meta.Key, ...Option) error - GetAssociation(context.Context, *meta.Key, ...Option) (*computealpha.FirewallPolicyAssociation, error) - GetIamPolicy(context.Context, *meta.Key, ...Option) (*computealpha.Policy, error) - GetRule(context.Context, *meta.Key, ...Option) (*computealpha.FirewallPolicyRule, error) - Patch(context.Context, *meta.Key, *computealpha.FirewallPolicy, ...Option) error - PatchRule(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, ...Option) error - RemoveAssociation(context.Context, *meta.Key, ...Option) error - RemoveRule(context.Context, *meta.Key, ...Option) error - SetIamPolicy(context.Context, *meta.Key, *computealpha.GlobalSetPolicyRequest, ...Option) (*computealpha.Policy, error) - TestIamPermissions(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, ...Option) (*computealpha.TestPermissionsResponse, error) -} - -// NewMockAlphaNetworkFirewallPolicies returns a new mock for NetworkFirewallPolicies. -func NewMockAlphaNetworkFirewallPolicies(pr ProjectRouter, objs map[meta.Key]*MockNetworkFirewallPoliciesObj) *MockAlphaNetworkFirewallPolicies { - mock := &MockAlphaNetworkFirewallPolicies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaNetworkFirewallPolicies is the mock for NetworkFirewallPolicies. -type MockAlphaNetworkFirewallPolicies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworkFirewallPoliciesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkFirewallPolicies, options ...Option) (bool, *computealpha.FirewallPolicy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworkFirewallPolicies, options ...Option) (bool, []*computealpha.FirewallPolicy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, m *MockAlphaNetworkFirewallPolicies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkFirewallPolicies, options ...Option) (bool, error) - AddAssociationHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyAssociation, *MockAlphaNetworkFirewallPolicies, ...Option) error - AddRuleHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, *MockAlphaNetworkFirewallPolicies, ...Option) error - CloneRulesHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) error - GetAssociationHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) (*computealpha.FirewallPolicyAssociation, error) - GetIamPolicyHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) (*computealpha.Policy, error) - GetRuleHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) (*computealpha.FirewallPolicyRule, error) - PatchHook func(context.Context, *meta.Key, *computealpha.FirewallPolicy, *MockAlphaNetworkFirewallPolicies, ...Option) error - PatchRuleHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, *MockAlphaNetworkFirewallPolicies, ...Option) error - RemoveAssociationHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) error - RemoveRuleHook func(context.Context, *meta.Key, *MockAlphaNetworkFirewallPolicies, ...Option) error - SetIamPolicyHook func(context.Context, *meta.Key, *computealpha.GlobalSetPolicyRequest, *MockAlphaNetworkFirewallPolicies, ...Option) (*computealpha.Policy, error) - TestIamPermissionsHook func(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, *MockAlphaNetworkFirewallPolicies, ...Option) (*computealpha.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaNetworkFirewallPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworkFirewallPolicies %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaNetworkFirewallPolicies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.FirewallPolicy - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaNetworkFirewallPolicies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaNetworkFirewallPolicies %v exists", key), - } - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "networkFirewallPolicies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "networkFirewallPolicies", key) - - m.Objects[*key] = &MockNetworkFirewallPoliciesObj{obj} - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaNetworkFirewallPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworkFirewallPolicies %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaNetworkFirewallPolicies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaNetworkFirewallPolicies) Obj(o *computealpha.FirewallPolicy) *MockNetworkFirewallPoliciesObj { - return &MockNetworkFirewallPoliciesObj{o} -} - -// AddAssociation is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) AddAssociation(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyAssociation, options ...Option) error { - if m.AddAssociationHook != nil { - return m.AddAssociationHook(ctx, key, arg0, m) - } - return nil -} - -// AddRule is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - if m.AddRuleHook != nil { - return m.AddRuleHook(ctx, key, arg0, m) - } - return nil -} - -// CloneRules is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) CloneRules(ctx context.Context, key *meta.Key, options ...Option) error { - if m.CloneRulesHook != nil { - return m.CloneRulesHook(ctx, key, m) - } - return nil -} - -// GetAssociation is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) GetAssociation(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyAssociation, error) { - if m.GetAssociationHook != nil { - return m.GetAssociationHook(ctx, key, m) - } - return nil, fmt.Errorf("GetAssociationHook must be set") -} - -// GetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - if m.GetIamPolicyHook != nil { - return m.GetIamPolicyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetIamPolicyHook must be set") -} - -// GetRule is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyRule, error) { - if m.GetRuleHook != nil { - return m.GetRuleHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRuleHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// PatchRule is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - if m.PatchRuleHook != nil { - return m.PatchRuleHook(ctx, key, arg0, m) - } - return nil -} - -// RemoveAssociation is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) RemoveAssociation(ctx context.Context, key *meta.Key, options ...Option) error { - if m.RemoveAssociationHook != nil { - return m.RemoveAssociationHook(ctx, key, m) - } - return nil -} - -// RemoveRule is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - if m.RemoveRuleHook != nil { - return m.RemoveRuleHook(ctx, key, m) - } - return nil -} - -// SetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - if m.SetIamPolicyHook != nil { - return m.SetIamPolicyHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("SetIamPolicyHook must be set") -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockAlphaNetworkFirewallPolicies) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEAlphaNetworkFirewallPolicies is a simplifying adapter for the GCE NetworkFirewallPolicies. -type GCEAlphaNetworkFirewallPolicies struct { - s *Service -} - -// Get the FirewallPolicy named by key. -func (g *GCEAlphaNetworkFirewallPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all FirewallPolicy objects. -func (g *GCEAlphaNetworkFirewallPolicies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.NetworkFirewallPolicies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.FirewallPolicy - f := func(l *computealpha.FirewallPolicyList) error { - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert FirewallPolicy with key of value obj. -func (g *GCEAlphaNetworkFirewallPolicies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.NetworkFirewallPolicies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the FirewallPolicy referenced by key. -func (g *GCEAlphaNetworkFirewallPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AddAssociation is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) AddAssociation(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyAssociation, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddAssociation", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.AddAssociation(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AddRule is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddRule", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.AddRule(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// CloneRules is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) CloneRules(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "CloneRules", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.CloneRules(projectID, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.CloneRules(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// GetAssociation is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) GetAssociation(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyAssociation, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.GetAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetAssociation", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.GetAssociation(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetAssociation(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetIamPolicy is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.GetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetIamPolicy", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.GetIamPolicy(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetRule is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.GetRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRule", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.GetRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.GetRule(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.GetRule(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// PatchRule is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "PatchRule", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.PatchRule(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveAssociation is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) RemoveAssociation(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveAssociation", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.RemoveAssociation(projectID, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveRule is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveRule", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkFirewallPolicies.RemoveRule(projectID, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetIamPolicy is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.SetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.SetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetIamPolicy", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.SetIamPolicy(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// TestIamPermissions is a method on GCEAlphaNetworkFirewallPolicies. -func (g *GCEAlphaNetworkFirewallPolicies) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkFirewallPolicies.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("alpha"), - Service: "NetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkFirewallPolicies.TestIamPermissions(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// AlphaRegionNetworkFirewallPolicies is an interface that allows for mocking of RegionNetworkFirewallPolicies. -type AlphaRegionNetworkFirewallPolicies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AddAssociation(context.Context, *meta.Key, *computealpha.FirewallPolicyAssociation, ...Option) error - AddRule(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, ...Option) error - CloneRules(context.Context, *meta.Key, ...Option) error - GetAssociation(context.Context, *meta.Key, ...Option) (*computealpha.FirewallPolicyAssociation, error) - GetIamPolicy(context.Context, *meta.Key, ...Option) (*computealpha.Policy, error) - GetRule(context.Context, *meta.Key, ...Option) (*computealpha.FirewallPolicyRule, error) - Patch(context.Context, *meta.Key, *computealpha.FirewallPolicy, ...Option) error - PatchRule(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, ...Option) error - RemoveAssociation(context.Context, *meta.Key, ...Option) error - RemoveRule(context.Context, *meta.Key, ...Option) error - SetIamPolicy(context.Context, *meta.Key, *computealpha.RegionSetPolicyRequest, ...Option) (*computealpha.Policy, error) - TestIamPermissions(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, ...Option) (*computealpha.TestPermissionsResponse, error) -} - -// NewMockAlphaRegionNetworkFirewallPolicies returns a new mock for RegionNetworkFirewallPolicies. -func NewMockAlphaRegionNetworkFirewallPolicies(pr ProjectRouter, objs map[meta.Key]*MockRegionNetworkFirewallPoliciesObj) *MockAlphaRegionNetworkFirewallPolicies { - mock := &MockAlphaRegionNetworkFirewallPolicies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionNetworkFirewallPolicies is the mock for RegionNetworkFirewallPolicies. -type MockAlphaRegionNetworkFirewallPolicies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionNetworkFirewallPoliciesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionNetworkFirewallPolicies, options ...Option) (bool, *computealpha.FirewallPolicy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionNetworkFirewallPolicies, options ...Option) (bool, []*computealpha.FirewallPolicy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, m *MockAlphaRegionNetworkFirewallPolicies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionNetworkFirewallPolicies, options ...Option) (bool, error) - AddAssociationHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyAssociation, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - AddRuleHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - CloneRulesHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - GetAssociationHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) (*computealpha.FirewallPolicyAssociation, error) - GetIamPolicyHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) (*computealpha.Policy, error) - GetRuleHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) (*computealpha.FirewallPolicyRule, error) - PatchHook func(context.Context, *meta.Key, *computealpha.FirewallPolicy, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - PatchRuleHook func(context.Context, *meta.Key, *computealpha.FirewallPolicyRule, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - RemoveAssociationHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - RemoveRuleHook func(context.Context, *meta.Key, *MockAlphaRegionNetworkFirewallPolicies, ...Option) error - SetIamPolicyHook func(context.Context, *meta.Key, *computealpha.RegionSetPolicyRequest, *MockAlphaRegionNetworkFirewallPolicies, ...Option) (*computealpha.Policy, error) - TestIamPermissionsHook func(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, *MockAlphaRegionNetworkFirewallPolicies, ...Option) (*computealpha.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionNetworkFirewallPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionNetworkFirewallPolicies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionNetworkFirewallPolicies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.FirewallPolicy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionNetworkFirewallPolicies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionNetworkFirewallPolicies %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "regionNetworkFirewallPolicies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "regionNetworkFirewallPolicies", key) - - m.Objects[*key] = &MockRegionNetworkFirewallPoliciesObj{obj} - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionNetworkFirewallPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionNetworkFirewallPolicies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionNetworkFirewallPolicies) Obj(o *computealpha.FirewallPolicy) *MockRegionNetworkFirewallPoliciesObj { - return &MockRegionNetworkFirewallPoliciesObj{o} -} - -// AddAssociation is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) AddAssociation(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyAssociation, options ...Option) error { - if m.AddAssociationHook != nil { - return m.AddAssociationHook(ctx, key, arg0, m) - } - return nil -} - -// AddRule is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - if m.AddRuleHook != nil { - return m.AddRuleHook(ctx, key, arg0, m) - } - return nil -} - -// CloneRules is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) CloneRules(ctx context.Context, key *meta.Key, options ...Option) error { - if m.CloneRulesHook != nil { - return m.CloneRulesHook(ctx, key, m) - } - return nil -} - -// GetAssociation is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) GetAssociation(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyAssociation, error) { - if m.GetAssociationHook != nil { - return m.GetAssociationHook(ctx, key, m) - } - return nil, fmt.Errorf("GetAssociationHook must be set") -} - -// GetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - if m.GetIamPolicyHook != nil { - return m.GetIamPolicyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetIamPolicyHook must be set") -} - -// GetRule is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyRule, error) { - if m.GetRuleHook != nil { - return m.GetRuleHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRuleHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// PatchRule is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - if m.PatchRuleHook != nil { - return m.PatchRuleHook(ctx, key, arg0, m) - } - return nil -} - -// RemoveAssociation is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) RemoveAssociation(ctx context.Context, key *meta.Key, options ...Option) error { - if m.RemoveAssociationHook != nil { - return m.RemoveAssociationHook(ctx, key, m) - } - return nil -} - -// RemoveRule is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - if m.RemoveRuleHook != nil { - return m.RemoveRuleHook(ctx, key, m) - } - return nil -} - -// SetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - if m.SetIamPolicyHook != nil { - return m.SetIamPolicyHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("SetIamPolicyHook must be set") -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockAlphaRegionNetworkFirewallPolicies) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEAlphaRegionNetworkFirewallPolicies is a simplifying adapter for the GCE RegionNetworkFirewallPolicies. -type GCEAlphaRegionNetworkFirewallPolicies struct { - s *Service -} - -// Get the FirewallPolicy named by key. -func (g *GCEAlphaRegionNetworkFirewallPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all FirewallPolicy objects. -func (g *GCEAlphaRegionNetworkFirewallPolicies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.FirewallPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionNetworkFirewallPolicies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.FirewallPolicy - f := func(l *computealpha.FirewallPolicyList) error { - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert FirewallPolicy with key of value obj. -func (g *GCEAlphaRegionNetworkFirewallPolicies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.FirewallPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionNetworkFirewallPolicies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the FirewallPolicy referenced by key. -func (g *GCEAlphaRegionNetworkFirewallPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AddAssociation is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) AddAssociation(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyAssociation, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddAssociation", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.AddAssociation(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AddRule is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddRule", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.AddRule(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// CloneRules is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) CloneRules(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "CloneRules", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.CloneRules(projectID, key.Region, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.CloneRules(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// GetAssociation is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) GetAssociation(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyAssociation, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetAssociation", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.GetAssociation(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetAssociation(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetIamPolicy is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetIamPolicy", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.GetIamPolicy(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetRule is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.FirewallPolicyRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRule", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.GetRule(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.GetRule(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// PatchRule is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computealpha.FirewallPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "PatchRule", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.PatchRule(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveAssociation is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) RemoveAssociation(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveAssociation", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.RemoveAssociation(projectID, key.Region, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveAssociation(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveRule is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveRule", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.RemoveRule(projectID, key.Region, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetIamPolicy is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.SetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.SetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetIamPolicy", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.SetIamPolicy(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.SetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// TestIamPermissions is a method on GCEAlphaRegionNetworkFirewallPolicies. -func (g *GCEAlphaRegionNetworkFirewallPolicies) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionNetworkFirewallPolicies.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionNetworkFirewallPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("alpha"), - Service: "RegionNetworkFirewallPolicies", - } - klog.V(5).Infof("GCEAlphaRegionNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionNetworkFirewallPolicies.TestIamPermissions(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionNetworkFirewallPolicies.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// ForwardingRules is an interface that allows for mocking of ForwardingRules. -type ForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computega.RegionSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computega.TargetReference, ...Option) error -} - -// NewMockForwardingRules returns a new mock for ForwardingRules. -func NewMockForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockForwardingRules { - mock := &MockForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockForwardingRules is the mock for ForwardingRules. -type MockForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules, options ...Option) (bool, *computega.ForwardingRule, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockForwardingRules, options ...Option) (bool, []*computega.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, m *MockForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computega.RegionSetLabelsRequest, *MockForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computega.TargetReference, *MockForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockForwardingRules %v not found", key), - } - klog.V(5).Infof("MockForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.ForwardingRule - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockForwardingRules %v exists", key), - } - klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockForwardingRulesObj{obj} - klog.V(5).Infof("MockForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockForwardingRules %v not found", key), - } - klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockForwardingRules) Obj(o *computega.ForwardingRule) *MockForwardingRulesObj { - return &MockForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.RegionSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computega.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEForwardingRules is a simplifying adapter for the GCE ForwardingRules. -type GCEForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - - klog.V(5).Infof("GCEForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.ForwardingRules.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEForwardingRules.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.ForwardingRules.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.ForwardingRule - f := func(l *computega.ForwardingRuleList) error { - klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.ForwardingRules.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.ForwardingRules.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEForwardingRules. -func (g *GCEForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.RegionSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.ForwardingRules.SetLabels(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEForwardingRules. -func (g *GCEForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computega.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("ga"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaForwardingRules is an interface that allows for mocking of ForwardingRules. -type AlphaForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computealpha.RegionSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computealpha.TargetReference, ...Option) error -} - -// NewMockAlphaForwardingRules returns a new mock for ForwardingRules. -func NewMockAlphaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockAlphaForwardingRules { - mock := &MockAlphaForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaForwardingRules is the mock for ForwardingRules. -type MockAlphaForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules, options ...Option) (bool, *computealpha.ForwardingRule, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaForwardingRules, options ...Option) (bool, []*computealpha.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, m *MockAlphaForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computealpha.RegionSetLabelsRequest, *MockAlphaForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computealpha.TargetReference, *MockAlphaForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key), - } - klog.V(5).Infof("MockAlphaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.ForwardingRule - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaForwardingRules %v exists", key), - } - klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockForwardingRulesObj{obj} - klog.V(5).Infof("MockAlphaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaForwardingRules %v not found", key), - } - klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaForwardingRules) Obj(o *computealpha.ForwardingRule) *MockForwardingRulesObj { - return &MockForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockAlphaForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaForwardingRules is a simplifying adapter for the GCE ForwardingRules. -type GCEAlphaForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEAlphaForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - - klog.V(5).Infof("GCEAlphaForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.ForwardingRules.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEAlphaForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.ForwardingRules.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.ForwardingRule - f := func(l *computealpha.ForwardingRuleList) error { - klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEAlphaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.ForwardingRules.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEAlphaForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEAlphaForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.ForwardingRules.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEAlphaForwardingRules. -func (g *GCEAlphaForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.ForwardingRules.SetLabels(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEAlphaForwardingRules. -func (g *GCEAlphaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("alpha"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaForwardingRules is an interface that allows for mocking of ForwardingRules. -type BetaForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computebeta.RegionSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computebeta.TargetReference, ...Option) error -} - -// NewMockBetaForwardingRules returns a new mock for ForwardingRules. -func NewMockBetaForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockForwardingRulesObj) *MockBetaForwardingRules { - mock := &MockBetaForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaForwardingRules is the mock for ForwardingRules. -type MockBetaForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules, options ...Option) (bool, *computebeta.ForwardingRule, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaForwardingRules, options ...Option) (bool, []*computebeta.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, m *MockBetaForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computebeta.RegionSetLabelsRequest, *MockBetaForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computebeta.TargetReference, *MockBetaForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key), - } - klog.V(5).Infof("MockBetaForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.ForwardingRule - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaForwardingRules.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaForwardingRules %v exists", key), - } - klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockForwardingRulesObj{obj} - klog.V(5).Infof("MockBetaForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaForwardingRules %v not found", key), - } - klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaForwardingRules) Obj(o *computebeta.ForwardingRule) *MockForwardingRulesObj { - return &MockForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockBetaForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.RegionSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaForwardingRules is a simplifying adapter for the GCE ForwardingRules. -type GCEBetaForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEBetaForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - - klog.V(5).Infof("GCEBetaForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.ForwardingRules.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEBetaForwardingRules) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaForwardingRules.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.ForwardingRules.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.ForwardingRule - f := func(l *computebeta.ForwardingRuleList) error { - klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEBetaForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.ForwardingRules.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEBetaForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEBetaForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.ForwardingRules.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEBetaForwardingRules. -func (g *GCEBetaForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.RegionSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.ForwardingRules.SetLabels(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEBetaForwardingRules. -func (g *GCEBetaForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("beta"), - Service: "ForwardingRules", - } - klog.V(5).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.ForwardingRules.SetTarget(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules. -type AlphaGlobalForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computealpha.GlobalSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computealpha.TargetReference, ...Option) error -} - -// NewMockAlphaGlobalForwardingRules returns a new mock for GlobalForwardingRules. -func NewMockAlphaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockAlphaGlobalForwardingRules { - mock := &MockAlphaGlobalForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaGlobalForwardingRules is the mock for GlobalForwardingRules. -type MockAlphaGlobalForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules, options ...Option) (bool, *computealpha.ForwardingRule, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaGlobalForwardingRules, options ...Option) (bool, []*computealpha.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, m *MockAlphaGlobalForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computealpha.GlobalSetLabelsRequest, *MockAlphaGlobalForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computealpha.TargetReference, *MockAlphaGlobalForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.ForwardingRule - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v exists", key), - } - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockGlobalForwardingRulesObj{obj} - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaGlobalForwardingRules) Obj(o *computealpha.ForwardingRule) *MockGlobalForwardingRulesObj { - return &MockGlobalForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockAlphaGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules. -type GCEAlphaGlobalForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEAlphaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.GlobalForwardingRules.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.GlobalForwardingRules.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.ForwardingRule - f := func(l *computealpha.ForwardingRuleList) error { - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEAlphaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.GlobalForwardingRules.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEAlphaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalForwardingRules.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEAlphaGlobalForwardingRules. -func (g *GCEAlphaGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalForwardingRules.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEAlphaGlobalForwardingRules. -func (g *GCEAlphaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("alpha"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaGlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules. -type BetaGlobalForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computebeta.GlobalSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computebeta.TargetReference, ...Option) error -} - -// NewMockBetaGlobalForwardingRules returns a new mock for GlobalForwardingRules. -func NewMockBetaGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockBetaGlobalForwardingRules { - mock := &MockBetaGlobalForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaGlobalForwardingRules is the mock for GlobalForwardingRules. -type MockBetaGlobalForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules, options ...Option) (bool, *computebeta.ForwardingRule, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaGlobalForwardingRules, options ...Option) (bool, []*computebeta.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, m *MockBetaGlobalForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computebeta.GlobalSetLabelsRequest, *MockBetaGlobalForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computebeta.TargetReference, *MockBetaGlobalForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.ForwardingRule - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v exists", key), - } - klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockGlobalForwardingRulesObj{obj} - klog.V(5).Infof("MockBetaGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaGlobalForwardingRules) Obj(o *computebeta.ForwardingRule) *MockGlobalForwardingRulesObj { - return &MockGlobalForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockBetaGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules. -type GCEBetaGlobalForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEBetaGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.GlobalForwardingRules.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.GlobalForwardingRules.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.ForwardingRule - f := func(l *computebeta.ForwardingRuleList) error { - klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEBetaGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.GlobalForwardingRules.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEBetaGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalForwardingRules.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEBetaGlobalForwardingRules. -func (g *GCEBetaGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalForwardingRules.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEBetaGlobalForwardingRules. -func (g *GCEBetaGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("beta"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// GlobalForwardingRules is an interface that allows for mocking of GlobalForwardingRules. -type GlobalForwardingRules interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetLabels(context.Context, *meta.Key, *computega.GlobalSetLabelsRequest, ...Option) error - SetTarget(context.Context, *meta.Key, *computega.TargetReference, ...Option) error -} - -// NewMockGlobalForwardingRules returns a new mock for GlobalForwardingRules. -func NewMockGlobalForwardingRules(pr ProjectRouter, objs map[meta.Key]*MockGlobalForwardingRulesObj) *MockGlobalForwardingRules { - mock := &MockGlobalForwardingRules{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockGlobalForwardingRules is the mock for GlobalForwardingRules. -type MockGlobalForwardingRules struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalForwardingRulesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules, options ...Option) (bool, *computega.ForwardingRule, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockGlobalForwardingRules, options ...Option) (bool, []*computega.ForwardingRule, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, m *MockGlobalForwardingRules, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalForwardingRules, options ...Option) (bool, error) - SetLabelsHook func(context.Context, *meta.Key, *computega.GlobalSetLabelsRequest, *MockGlobalForwardingRules, ...Option) error - SetTargetHook func(context.Context, *meta.Key, *computega.TargetReference, *MockGlobalForwardingRules, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockGlobalForwardingRules.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.ForwardingRule - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockGlobalForwardingRules.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockGlobalForwardingRules %v exists", key), - } - klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "forwardingRules") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "forwardingRules", key) - - m.Objects[*key] = &MockGlobalForwardingRulesObj{obj} - klog.V(5).Infof("MockGlobalForwardingRules.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalForwardingRules %v not found", key), - } - klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockGlobalForwardingRules.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockGlobalForwardingRules) Obj(o *computega.ForwardingRule) *MockGlobalForwardingRulesObj { - return &MockGlobalForwardingRulesObj{o} -} - -// SetLabels is a mock for the corresponding method. -func (m *MockGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// SetTarget is a mock for the corresponding method. -func (m *MockGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computega.TargetReference, options ...Option) error { - if m.SetTargetHook != nil { - return m.SetTargetHook(ctx, key, arg0, m) - } - return nil -} - -// GCEGlobalForwardingRules is a simplifying adapter for the GCE GlobalForwardingRules. -type GCEGlobalForwardingRules struct { - s *Service -} - -// Get the ForwardingRule named by key. -func (g *GCEGlobalForwardingRules) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalForwardingRules.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - - klog.V(5).Infof("GCEGlobalForwardingRules.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.GlobalForwardingRules.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEGlobalForwardingRules.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ForwardingRule objects. -func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.ForwardingRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.GlobalForwardingRules.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.ForwardingRule - f := func(l *computega.ForwardingRuleList) error { - klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ForwardingRule with key of value obj. -func (g *GCEGlobalForwardingRules) Insert(ctx context.Context, key *meta.Key, obj *computega.ForwardingRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.GlobalForwardingRules.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalForwardingRules.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ForwardingRule referenced by key. -func (g *GCEGlobalForwardingRules) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalForwardingRules.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEGlobalForwardingRules.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalForwardingRules.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalForwardingRules.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetLabels is a method on GCEGlobalForwardingRules. -func (g *GCEGlobalForwardingRules) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalForwardingRules.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEGlobalForwardingRules.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetTarget is a method on GCEGlobalForwardingRules. -func (g *GCEGlobalForwardingRules) SetTarget(ctx context.Context, key *meta.Key, arg0 *computega.TargetReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalForwardingRules") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetTarget", - Version: meta.Version("ga"), - Service: "GlobalForwardingRules", - } - klog.V(5).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalForwardingRules.SetTarget(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEGlobalForwardingRules.SetTarget(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// HealthChecks is an interface that allows for mocking of HealthChecks. -type HealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.HealthCheck, ...Option) error -} - -// NewMockHealthChecks returns a new mock for HealthChecks. -func NewMockHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockHealthChecks { - mock := &MockHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockHealthChecks is the mock for HealthChecks. -type MockHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks, options ...Option) (bool, *computega.HealthCheck, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockHealthChecks, options ...Option) (bool, []*computega.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, m *MockHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.HealthCheck, *MockHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.HealthCheck - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockHealthChecks %v exists", key), - } - klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "healthChecks", key) - - m.Objects[*key] = &MockHealthChecksObj{obj} - klog.V(5).Infof("MockHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockHealthChecks) Obj(o *computega.HealthCheck) *MockHealthChecksObj { - return &MockHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEHealthChecks is a simplifying adapter for the GCE HealthChecks. -type GCEHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCEHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "HealthChecks", - } - - klog.V(5).Infof("GCEHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.HealthChecks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHealthChecks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "HealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEHealthChecks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.HealthChecks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.HealthCheck - f := func(l *computega.HealthCheckList) error { - klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCEHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.HealthChecks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCEHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HealthChecks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEHealthChecks. -func (g *GCEHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HealthChecks.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaHealthChecks is an interface that allows for mocking of HealthChecks. -type AlphaHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computealpha.HealthCheck, ...Option) error -} - -// NewMockAlphaHealthChecks returns a new mock for HealthChecks. -func NewMockAlphaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockAlphaHealthChecks { - mock := &MockAlphaHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaHealthChecks is the mock for HealthChecks. -type MockAlphaHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks, options ...Option) (bool, *computealpha.HealthCheck, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaHealthChecks, options ...Option) (bool, []*computealpha.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, m *MockAlphaHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computealpha.HealthCheck, *MockAlphaHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key), - } - klog.V(5).Infof("MockAlphaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.HealthCheck - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaHealthChecks %v exists", key), - } - klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "healthChecks", key) - - m.Objects[*key] = &MockHealthChecksObj{obj} - klog.V(5).Infof("MockAlphaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaHealthChecks %v not found", key), - } - klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaHealthChecks) Obj(o *computealpha.HealthCheck) *MockHealthChecksObj { - return &MockHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaHealthChecks is a simplifying adapter for the GCE HealthChecks. -type GCEAlphaHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCEAlphaHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "HealthChecks", - } - - klog.V(5).Infof("GCEAlphaHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.HealthChecks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "HealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.HealthChecks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.HealthCheck - f := func(l *computealpha.HealthCheckList) error { - klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCEAlphaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.HealthChecks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCEAlphaHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEAlphaHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.HealthChecks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaHealthChecks. -func (g *GCEAlphaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.HealthChecks.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaHealthChecks is an interface that allows for mocking of HealthChecks. -type BetaHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computebeta.HealthCheck, ...Option) error -} - -// NewMockBetaHealthChecks returns a new mock for HealthChecks. -func NewMockBetaHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHealthChecksObj) *MockBetaHealthChecks { - mock := &MockBetaHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaHealthChecks is the mock for HealthChecks. -type MockBetaHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks, options ...Option) (bool, *computebeta.HealthCheck, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaHealthChecks, options ...Option) (bool, []*computebeta.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, m *MockBetaHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computebeta.HealthCheck, *MockBetaHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key), - } - klog.V(5).Infof("MockBetaHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.HealthCheck - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaHealthChecks %v exists", key), - } - klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "healthChecks", key) - - m.Objects[*key] = &MockHealthChecksObj{obj} - klog.V(5).Infof("MockBetaHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaHealthChecks %v not found", key), - } - klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaHealthChecks) Obj(o *computebeta.HealthCheck) *MockHealthChecksObj { - return &MockHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaHealthChecks is a simplifying adapter for the GCE HealthChecks. -type GCEBetaHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCEBetaHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "HealthChecks", - } - - klog.V(5).Infof("GCEBetaHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.HealthChecks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCEBetaHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "HealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaHealthChecks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.HealthChecks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.HealthCheck - f := func(l *computebeta.HealthCheckList) error { - klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCEBetaHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "HealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.HealthChecks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCEBetaHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEBetaHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.HealthChecks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaHealthChecks. -func (g *GCEBetaHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "HealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "HealthChecks", - } - klog.V(5).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.HealthChecks.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks. -type AlphaRegionHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computealpha.HealthCheck, ...Option) error -} - -// NewMockAlphaRegionHealthChecks returns a new mock for RegionHealthChecks. -func NewMockAlphaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockAlphaRegionHealthChecks { - mock := &MockAlphaRegionHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionHealthChecks is the mock for RegionHealthChecks. -type MockAlphaRegionHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks, options ...Option) (bool, *computealpha.HealthCheck, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionHealthChecks, options ...Option) (bool, []*computealpha.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, m *MockAlphaRegionHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computealpha.HealthCheck, *MockAlphaRegionHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.HealthCheck - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "healthChecks", key) - - m.Objects[*key] = &MockRegionHealthChecksObj{obj} - klog.V(5).Infof("MockAlphaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionHealthChecks) Obj(o *computealpha.HealthCheck) *MockRegionHealthChecksObj { - return &MockRegionHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks. -type GCEAlphaRegionHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCEAlphaRegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionHealthChecks", - } - - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionHealthChecks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCEAlphaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionHealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionHealthChecks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.HealthCheck - f := func(l *computealpha.HealthCheckList) error { - klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCEAlphaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionHealthChecks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCEAlphaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionHealthChecks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaRegionHealthChecks. -func (g *GCEAlphaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaRegionHealthChecks is an interface that allows for mocking of RegionHealthChecks. -type BetaRegionHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computebeta.HealthCheck, ...Option) error -} - -// NewMockBetaRegionHealthChecks returns a new mock for RegionHealthChecks. -func NewMockBetaRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockBetaRegionHealthChecks { - mock := &MockBetaRegionHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionHealthChecks is the mock for RegionHealthChecks. -type MockBetaRegionHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks, options ...Option) (bool, *computebeta.HealthCheck, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionHealthChecks, options ...Option) (bool, []*computebeta.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, m *MockBetaRegionHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computebeta.HealthCheck, *MockBetaRegionHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockBetaRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.HealthCheck - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionHealthChecks %v exists", key), - } - klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "healthChecks", key) - - m.Objects[*key] = &MockRegionHealthChecksObj{obj} - klog.V(5).Infof("MockBetaRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionHealthChecks) Obj(o *computebeta.HealthCheck) *MockRegionHealthChecksObj { - return &MockRegionHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaRegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks. -type GCEBetaRegionHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCEBetaRegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionHealthChecks", - } - - klog.V(5).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionHealthChecks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCEBetaRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionHealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionHealthChecks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.HealthCheck - f := func(l *computebeta.HealthCheckList) error { - klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCEBetaRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionHealthChecks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCEBetaRegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionHealthChecks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaRegionHealthChecks. -func (g *GCEBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionHealthChecks is an interface that allows for mocking of RegionHealthChecks. -type RegionHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.HealthCheck, ...Option) error -} - -// NewMockRegionHealthChecks returns a new mock for RegionHealthChecks. -func NewMockRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockRegionHealthChecks { - mock := &MockRegionHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionHealthChecks is the mock for RegionHealthChecks. -type MockRegionHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks, options ...Option) (bool, *computega.HealthCheck, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionHealthChecks, options ...Option) (bool, []*computega.HealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, m *MockRegionHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.HealthCheck, *MockRegionHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.HealthCheck - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionHealthChecks %v exists", key), - } - klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "healthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "healthChecks", key) - - m.Objects[*key] = &MockRegionHealthChecksObj{obj} - klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key), - } - klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionHealthChecks) Obj(o *computega.HealthCheck) *MockRegionHealthChecksObj { - return &MockRegionHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks. -type GCERegionHealthChecks struct { - s *Service -} - -// Get the HealthCheck named by key. -func (g *GCERegionHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionHealthChecks", - } - - klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionHealthChecks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HealthCheck objects. -func (g *GCERegionHealthChecks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.HealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionHealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionHealthChecks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.HealthCheck - f := func(l *computega.HealthCheckList) error { - klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HealthCheck with key of value obj. -func (g *GCERegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionHealthChecks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HealthCheck referenced by key. -func (g *GCERegionHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionHealthChecks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCERegionHealthChecks. -func (g *GCERegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "RegionHealthChecks", - } - klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// HttpHealthChecks is an interface that allows for mocking of HttpHealthChecks. -type HttpHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpHealthCheck, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpHealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.HttpHealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.HttpHealthCheck, ...Option) error -} - -// NewMockHttpHealthChecks returns a new mock for HttpHealthChecks. -func NewMockHttpHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpHealthChecksObj) *MockHttpHealthChecks { - mock := &MockHttpHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockHttpHealthChecks is the mock for HttpHealthChecks. -type MockHttpHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockHttpHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks, options ...Option) (bool, *computega.HttpHealthCheck, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockHttpHealthChecks, options ...Option) (bool, []*computega.HttpHealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.HttpHealthCheck, m *MockHttpHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.HttpHealthCheck, *MockHttpHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockHttpHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpHealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHttpHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockHttpHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpHealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.HttpHealthCheck - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockHttpHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HttpHealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockHttpHealthChecks %v exists", key), - } - klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "httpHealthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "httpHealthChecks", key) - - m.Objects[*key] = &MockHttpHealthChecksObj{obj} - klog.V(5).Infof("MockHttpHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockHttpHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHttpHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockHttpHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockHttpHealthChecks) Obj(o *computega.HttpHealthCheck) *MockHttpHealthChecksObj { - return &MockHttpHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HttpHealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEHttpHealthChecks is a simplifying adapter for the GCE HttpHealthChecks. -type GCEHttpHealthChecks struct { - s *Service -} - -// Get the HttpHealthCheck named by key. -func (g *GCEHttpHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpHealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHttpHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "HttpHealthChecks", - } - - klog.V(5).Infof("GCEHttpHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.HttpHealthChecks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEHttpHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HttpHealthCheck objects. -func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpHealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "HttpHealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEHttpHealthChecks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.HttpHealthChecks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.HttpHealthCheck - f := func(l *computega.HttpHealthCheckList) error { - klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HttpHealthCheck with key of value obj. -func (g *GCEHttpHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HttpHealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "HttpHealthChecks", - } - klog.V(5).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.HttpHealthChecks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHttpHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HttpHealthCheck referenced by key. -func (g *GCEHttpHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHttpHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "HttpHealthChecks", - } - klog.V(5).Infof("GCEHttpHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HttpHealthChecks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHttpHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEHttpHealthChecks. -func (g *GCEHttpHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HttpHealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHttpHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "HttpHealthChecks", - } - klog.V(5).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HttpHealthChecks.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEHttpHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// HttpsHealthChecks is an interface that allows for mocking of HttpsHealthChecks. -type HttpsHealthChecks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpsHealthCheck, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpsHealthCheck, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.HttpsHealthCheck, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.HttpsHealthCheck, ...Option) error -} - -// NewMockHttpsHealthChecks returns a new mock for HttpsHealthChecks. -func NewMockHttpsHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockHttpsHealthChecksObj) *MockHttpsHealthChecks { - mock := &MockHttpsHealthChecks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockHttpsHealthChecks is the mock for HttpsHealthChecks. -type MockHttpsHealthChecks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockHttpsHealthChecksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks, options ...Option) (bool, *computega.HttpsHealthCheck, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockHttpsHealthChecks, options ...Option) (bool, []*computega.HttpsHealthCheck, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.HttpsHealthCheck, m *MockHttpsHealthChecks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockHttpsHealthChecks, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.HttpsHealthCheck, *MockHttpsHealthChecks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockHttpsHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpsHealthCheck, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHttpsHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockHttpsHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpsHealthCheck, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.HttpsHealthCheck - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockHttpsHealthChecks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HttpsHealthCheck, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockHttpsHealthChecks %v exists", key), - } - klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "httpsHealthChecks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "httpsHealthChecks", key) - - m.Objects[*key] = &MockHttpsHealthChecksObj{obj} - klog.V(5).Infof("MockHttpsHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockHttpsHealthChecks %v not found", key), - } - klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockHttpsHealthChecks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockHttpsHealthChecks) Obj(o *computega.HttpsHealthCheck) *MockHttpsHealthChecksObj { - return &MockHttpsHealthChecksObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HttpsHealthCheck, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEHttpsHealthChecks is a simplifying adapter for the GCE HttpsHealthChecks. -type GCEHttpsHealthChecks struct { - s *Service -} - -// Get the HttpsHealthCheck named by key. -func (g *GCEHttpsHealthChecks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.HttpsHealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHttpsHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpsHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "HttpsHealthChecks", - } - - klog.V(5).Infof("GCEHttpsHealthChecks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.HttpsHealthChecks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEHttpsHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all HttpsHealthCheck objects. -func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.HttpsHealthCheck, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpsHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "HttpsHealthChecks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.HttpsHealthChecks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.HttpsHealthCheck - f := func(l *computega.HttpsHealthCheckList) error { - klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert HttpsHealthCheck with key of value obj. -func (g *GCEHttpsHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *computega.HttpsHealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpsHealthChecks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "HttpsHealthChecks", - } - klog.V(5).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.HttpsHealthChecks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHttpsHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the HttpsHealthCheck referenced by key. -func (g *GCEHttpsHealthChecks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEHttpsHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpsHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "HttpsHealthChecks", - } - klog.V(5).Infof("GCEHttpsHealthChecks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HttpsHealthChecks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEHttpsHealthChecks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEHttpsHealthChecks. -func (g *GCEHttpsHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *computega.HttpsHealthCheck, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEHttpsHealthChecks.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "HttpsHealthChecks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "HttpsHealthChecks", - } - klog.V(5).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.HttpsHealthChecks.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEHttpsHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// InstanceGroups is an interface that allows for mocking of InstanceGroups. -type InstanceGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroup, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AddInstances(context.Context, *meta.Key, *computega.InstanceGroupsAddInstancesRequest, ...Option) error - ListInstances(context.Context, *meta.Key, *computega.InstanceGroupsListInstancesRequest, *filter.F, ...Option) ([]*computega.InstanceWithNamedPorts, error) - RemoveInstances(context.Context, *meta.Key, *computega.InstanceGroupsRemoveInstancesRequest, ...Option) error - SetNamedPorts(context.Context, *meta.Key, *computega.InstanceGroupsSetNamedPortsRequest, ...Option) error -} - -// NewMockInstanceGroups returns a new mock for InstanceGroups. -func NewMockInstanceGroups(pr ProjectRouter, objs map[meta.Key]*MockInstanceGroupsObj) *MockInstanceGroups { - mock := &MockInstanceGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockInstanceGroups is the mock for InstanceGroups. -type MockInstanceGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstanceGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups, options ...Option) (bool, *computega.InstanceGroup, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstanceGroups, options ...Option) (bool, []*computega.InstanceGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.InstanceGroup, m *MockInstanceGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroups, options ...Option) (bool, error) - AddInstancesHook func(context.Context, *meta.Key, *computega.InstanceGroupsAddInstancesRequest, *MockInstanceGroups, ...Option) error - ListInstancesHook func(context.Context, *meta.Key, *computega.InstanceGroupsListInstancesRequest, *filter.F, *MockInstanceGroups, ...Option) ([]*computega.InstanceWithNamedPorts, error) - RemoveInstancesHook func(context.Context, *meta.Key, *computega.InstanceGroupsRemoveInstancesRequest, *MockInstanceGroups, ...Option) error - SetNamedPortsHook func(context.Context, *meta.Key, *computega.InstanceGroupsSetNamedPortsRequest, *MockInstanceGroups, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockInstanceGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceGroups %v not found", key), - } - klog.V(5).Infof("MockInstanceGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockInstanceGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.InstanceGroup - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockInstanceGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockInstanceGroups %v exists", key), - } - klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "instanceGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "instanceGroups", key) - - m.Objects[*key] = &MockInstanceGroupsObj{obj} - klog.V(5).Infof("MockInstanceGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockInstanceGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceGroups %v not found", key), - } - klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockInstanceGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockInstanceGroups) Obj(o *computega.InstanceGroup) *MockInstanceGroupsObj { - return &MockInstanceGroupsObj{o} -} - -// AddInstances is a mock for the corresponding method. -func (m *MockInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsAddInstancesRequest, options ...Option) error { - if m.AddInstancesHook != nil { - return m.AddInstancesHook(ctx, key, arg0, m) - } - return nil -} - -// ListInstances is a mock for the corresponding method. -func (m *MockInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsListInstancesRequest, fl *filter.F, options ...Option) ([]*computega.InstanceWithNamedPorts, error) { - if m.ListInstancesHook != nil { - return m.ListInstancesHook(ctx, key, arg0, fl, m) - } - return nil, nil -} - -// RemoveInstances is a mock for the corresponding method. -func (m *MockInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsRemoveInstancesRequest, options ...Option) error { - if m.RemoveInstancesHook != nil { - return m.RemoveInstancesHook(ctx, key, arg0, m) - } - return nil -} - -// SetNamedPorts is a mock for the corresponding method. -func (m *MockInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsSetNamedPortsRequest, options ...Option) error { - if m.SetNamedPortsHook != nil { - return m.SetNamedPortsHook(ctx, key, arg0, m) - } - return nil -} - -// GCEInstanceGroups is a simplifying adapter for the GCE InstanceGroups. -type GCEInstanceGroups struct { - s *Service -} - -// Get the InstanceGroup named by key. -func (g *GCEInstanceGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - - klog.V(5).Infof("GCEInstanceGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.InstanceGroups.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEInstanceGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all InstanceGroup objects. -func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEInstanceGroups.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.GA.InstanceGroups.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.InstanceGroup - f := func(l *computega.InstanceGroupList) error { - klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEInstanceGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert InstanceGroup with key of value obj. -func (g *GCEInstanceGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.InstanceGroups.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the InstanceGroup referenced by key. -func (g *GCEInstanceGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroups.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AddInstances is a method on GCEInstanceGroups. -func (g *GCEInstanceGroups) AddInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsAddInstancesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.AddInstances(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddInstances", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroups.AddInstances(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroups.AddInstances(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListInstances is a method on GCEInstanceGroups. -func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsListInstancesRequest, fl *filter.F, options ...Option) ([]*computega.InstanceWithNamedPorts, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.ListInstances(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListInstances", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.InstanceGroups.ListInstances(projectID, key.Zone, key.Name, arg0) - var all []*computega.InstanceWithNamedPorts - f := func(l *computega.InstanceGroupsListInstances) error { - klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// RemoveInstances is a method on GCEInstanceGroups. -func (g *GCEInstanceGroups) RemoveInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsRemoveInstancesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveInstances", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroups.RemoveInstances(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroups.RemoveInstances(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetNamedPorts is a method on GCEInstanceGroups. -func (g *GCEInstanceGroups) SetNamedPorts(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupsSetNamedPortsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetNamedPorts", - Version: meta.Version("ga"), - Service: "InstanceGroups", - } - klog.V(5).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroups.SetNamedPorts(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroups.SetNamedPorts(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Instances is an interface that allows for mocking of Instances. -type Instances interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Instance, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Instance, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Instance, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachDisk(context.Context, *meta.Key, *computega.AttachedDisk, ...Option) error - DetachDisk(context.Context, *meta.Key, string, ...Option) error -} - -// NewMockInstances returns a new mock for Instances. -func NewMockInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockInstances { - mock := &MockInstances{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockInstances is the mock for Instances. -type MockInstances struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstancesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockInstances, options ...Option) (bool, *computega.Instance, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstances, options ...Option) (bool, []*computega.Instance, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Instance, m *MockInstances, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstances, options ...Option) (bool, error) - AttachDiskHook func(context.Context, *meta.Key, *computega.AttachedDisk, *MockInstances, ...Option) error - DetachDiskHook func(context.Context, *meta.Key, string, *MockInstances, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Instance, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstances %v not found", key), - } - klog.V(5).Infof("MockInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Instance, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Instance - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockInstances) Insert(ctx context.Context, key *meta.Key, obj *computega.Instance, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockInstances %v exists", key), - } - klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "instances") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "instances", key) - - m.Objects[*key] = &MockInstancesObj{obj} - klog.V(5).Infof("MockInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstances %v not found", key), - } - klog.V(5).Infof("MockInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockInstances.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockInstances) Obj(o *computega.Instance) *MockInstancesObj { - return &MockInstancesObj{o} -} - -// AttachDisk is a mock for the corresponding method. -func (m *MockInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computega.AttachedDisk, options ...Option) error { - if m.AttachDiskHook != nil { - return m.AttachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// DetachDisk is a mock for the corresponding method. -func (m *MockInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DetachDiskHook != nil { - return m.DetachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// GCEInstances is a simplifying adapter for the GCE Instances. -type GCEInstances struct { - s *Service -} - -// Get the Instance named by key. -func (g *GCEInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Instances", - } - - klog.V(5).Infof("GCEInstances.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Instances.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Instance objects. -func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Instances", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEInstances.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.GA.Instances.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Instance - f := func(l *computega.InstanceList) error { - klog.V(5).Infof("GCEInstances.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Instance with key of value obj. -func (g *GCEInstances) Insert(ctx context.Context, key *meta.Key, obj *computega.Instance, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Instances", - } - klog.V(5).Infof("GCEInstances.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Instances.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstances.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Instance referenced by key. -func (g *GCEInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Instances", - } - klog.V(5).Infof("GCEInstances.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Instances.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstances.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachDisk is a method on GCEInstances. -func (g *GCEInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computega.AttachedDisk, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstances.AttachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachDisk", - Version: meta.Version("ga"), - Service: "Instances", - } - klog.V(5).Infof("GCEInstances.AttachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachDisk is a method on GCEInstances. -func (g *GCEInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstances.DetachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachDisk", - Version: meta.Version("ga"), - Service: "Instances", - } - klog.V(5).Infof("GCEInstances.DetachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaInstances is an interface that allows for mocking of Instances. -type BetaInstances interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Instance, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.Instance, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Instance, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachDisk(context.Context, *meta.Key, *computebeta.AttachedDisk, ...Option) error - DetachDisk(context.Context, *meta.Key, string, ...Option) error - UpdateNetworkInterface(context.Context, *meta.Key, string, *computebeta.NetworkInterface, ...Option) error -} - -// NewMockBetaInstances returns a new mock for Instances. -func NewMockBetaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockBetaInstances { - mock := &MockBetaInstances{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaInstances is the mock for Instances. -type MockBetaInstances struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstancesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances, options ...Option) (bool, *computebeta.Instance, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaInstances, options ...Option) (bool, []*computebeta.Instance, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Instance, m *MockBetaInstances, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaInstances, options ...Option) (bool, error) - AttachDiskHook func(context.Context, *meta.Key, *computebeta.AttachedDisk, *MockBetaInstances, ...Option) error - DetachDiskHook func(context.Context, *meta.Key, string, *MockBetaInstances, ...Option) error - UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *computebeta.NetworkInterface, *MockBetaInstances, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Instance, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaInstances %v not found", key), - } - klog.V(5).Infof("MockBetaInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockBetaInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.Instance, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Instance - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Instance, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaInstances %v exists", key), - } - klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "instances") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "instances", key) - - m.Objects[*key] = &MockInstancesObj{obj} - klog.V(5).Infof("MockBetaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaInstances %v not found", key), - } - klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaInstances.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaInstances) Obj(o *computebeta.Instance) *MockInstancesObj { - return &MockInstancesObj{o} -} - -// AttachDisk is a mock for the corresponding method. -func (m *MockBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computebeta.AttachedDisk, options ...Option) error { - if m.AttachDiskHook != nil { - return m.AttachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// DetachDisk is a mock for the corresponding method. -func (m *MockBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DetachDiskHook != nil { - return m.DetachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// UpdateNetworkInterface is a mock for the corresponding method. -func (m *MockBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *computebeta.NetworkInterface, options ...Option) error { - if m.UpdateNetworkInterfaceHook != nil { - return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m) - } - return nil -} - -// GCEBetaInstances is a simplifying adapter for the GCE Instances. -type GCEBetaInstances struct { - s *Service -} - -// Get the Instance named by key. -func (g *GCEBetaInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Instances", - } - - klog.V(5).Infof("GCEBetaInstances.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Instances.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Instance objects. -func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Instances", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaInstances.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.Beta.Instances.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Instance - f := func(l *computebeta.InstanceList) error { - klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Instance with key of value obj. -func (g *GCEBetaInstances) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Instance, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Instances", - } - klog.V(5).Infof("GCEBetaInstances.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Instances.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Instance referenced by key. -func (g *GCEBetaInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Instances", - } - klog.V(5).Infof("GCEBetaInstances.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Instances.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachDisk is a method on GCEBetaInstances. -func (g *GCEBetaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computebeta.AttachedDisk, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.AttachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachDisk", - Version: meta.Version("beta"), - Service: "Instances", - } - klog.V(5).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachDisk is a method on GCEBetaInstances. -func (g *GCEBetaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.DetachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachDisk", - Version: meta.Version("beta"), - Service: "Instances", - } - klog.V(5).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// UpdateNetworkInterface is a method on GCEBetaInstances. -func (g *GCEBetaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *computebeta.NetworkInterface, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "UpdateNetworkInterface", - Version: meta.Version("beta"), - Service: "Instances", - } - klog.V(5).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaInstances is an interface that allows for mocking of Instances. -type AlphaInstances interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Instance, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.Instance, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Instance, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachDisk(context.Context, *meta.Key, *computealpha.AttachedDisk, ...Option) error - DetachDisk(context.Context, *meta.Key, string, ...Option) error - UpdateNetworkInterface(context.Context, *meta.Key, string, *computealpha.NetworkInterface, ...Option) error -} - -// NewMockAlphaInstances returns a new mock for Instances. -func NewMockAlphaInstances(pr ProjectRouter, objs map[meta.Key]*MockInstancesObj) *MockAlphaInstances { - mock := &MockAlphaInstances{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaInstances is the mock for Instances. -type MockAlphaInstances struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstancesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances, options ...Option) (bool, *computealpha.Instance, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaInstances, options ...Option) (bool, []*computealpha.Instance, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Instance, m *MockAlphaInstances, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaInstances, options ...Option) (bool, error) - AttachDiskHook func(context.Context, *meta.Key, *computealpha.AttachedDisk, *MockAlphaInstances, ...Option) error - DetachDiskHook func(context.Context, *meta.Key, string, *MockAlphaInstances, ...Option) error - UpdateNetworkInterfaceHook func(context.Context, *meta.Key, string, *computealpha.NetworkInterface, *MockAlphaInstances, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Instance, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaInstances %v not found", key), - } - klog.V(5).Infof("MockAlphaInstances.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockAlphaInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.Instance, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Instance - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaInstances.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Instance, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaInstances %v exists", key), - } - klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "instances") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "instances", key) - - m.Objects[*key] = &MockInstancesObj{obj} - klog.V(5).Infof("MockAlphaInstances.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaInstances %v not found", key), - } - klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaInstances.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaInstances) Obj(o *computealpha.Instance) *MockInstancesObj { - return &MockInstancesObj{o} -} - -// AttachDisk is a mock for the corresponding method. -func (m *MockAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computealpha.AttachedDisk, options ...Option) error { - if m.AttachDiskHook != nil { - return m.AttachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// DetachDisk is a mock for the corresponding method. -func (m *MockAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - if m.DetachDiskHook != nil { - return m.DetachDiskHook(ctx, key, arg0, m) - } - return nil -} - -// UpdateNetworkInterface is a mock for the corresponding method. -func (m *MockAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *computealpha.NetworkInterface, options ...Option) error { - if m.UpdateNetworkInterfaceHook != nil { - return m.UpdateNetworkInterfaceHook(ctx, key, arg0, arg1, m) - } - return nil -} - -// GCEAlphaInstances is a simplifying adapter for the GCE Instances. -type GCEAlphaInstances struct { - s *Service -} - -// Get the Instance named by key. -func (g *GCEAlphaInstances) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Instances", - } - - klog.V(5).Infof("GCEAlphaInstances.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Instances.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaInstances.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Instance objects. -func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.Instance, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Instances", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaInstances.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.Alpha.Instances.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Instance - f := func(l *computealpha.InstanceList) error { - klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaInstances.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Instance with key of value obj. -func (g *GCEAlphaInstances) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Instance, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Instances", - } - klog.V(5).Infof("GCEAlphaInstances.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Instances.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaInstances.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Instance referenced by key. -func (g *GCEAlphaInstances) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Instances", - } - klog.V(5).Infof("GCEAlphaInstances.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Instances.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaInstances.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachDisk is a method on GCEAlphaInstances. -func (g *GCEAlphaInstances) AttachDisk(ctx context.Context, key *meta.Key, arg0 *computealpha.AttachedDisk, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.AttachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachDisk", - Version: meta.Version("alpha"), - Service: "Instances", - } - klog.V(5).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Instances.AttachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaInstances.AttachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachDisk is a method on GCEAlphaInstances. -func (g *GCEAlphaInstances) DetachDisk(ctx context.Context, key *meta.Key, arg0 string, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.DetachDisk(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachDisk", - Version: meta.Version("alpha"), - Service: "Instances", - } - klog.V(5).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Instances.DetachDisk(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaInstances.DetachDisk(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// UpdateNetworkInterface is a method on GCEAlphaInstances. -func (g *GCEAlphaInstances) UpdateNetworkInterface(ctx context.Context, key *meta.Key, arg0 string, arg1 *computealpha.NetworkInterface, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Instances") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "UpdateNetworkInterface", - Version: meta.Version("alpha"), - Service: "Instances", - } - klog.V(5).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Instances.UpdateNetworkInterface(projectID, key.Zone, key.Name, arg0, arg1) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaInstances.UpdateNetworkInterface(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// InstanceGroupManagers is an interface that allows for mocking of InstanceGroupManagers. -type InstanceGroupManagers interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroupManager, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroupManager, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroupManager, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - CreateInstances(context.Context, *meta.Key, *computega.InstanceGroupManagersCreateInstancesRequest, ...Option) error - DeleteInstances(context.Context, *meta.Key, *computega.InstanceGroupManagersDeleteInstancesRequest, ...Option) error - Resize(context.Context, *meta.Key, int64, ...Option) error - SetInstanceTemplate(context.Context, *meta.Key, *computega.InstanceGroupManagersSetInstanceTemplateRequest, ...Option) error -} - -// NewMockInstanceGroupManagers returns a new mock for InstanceGroupManagers. -func NewMockInstanceGroupManagers(pr ProjectRouter, objs map[meta.Key]*MockInstanceGroupManagersObj) *MockInstanceGroupManagers { - mock := &MockInstanceGroupManagers{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockInstanceGroupManagers is the mock for InstanceGroupManagers. -type MockInstanceGroupManagers struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstanceGroupManagersObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroupManagers, options ...Option) (bool, *computega.InstanceGroupManager, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockInstanceGroupManagers, options ...Option) (bool, []*computega.InstanceGroupManager, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.InstanceGroupManager, m *MockInstanceGroupManagers, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstanceGroupManagers, options ...Option) (bool, error) - CreateInstancesHook func(context.Context, *meta.Key, *computega.InstanceGroupManagersCreateInstancesRequest, *MockInstanceGroupManagers, ...Option) error - DeleteInstancesHook func(context.Context, *meta.Key, *computega.InstanceGroupManagersDeleteInstancesRequest, *MockInstanceGroupManagers, ...Option) error - ResizeHook func(context.Context, *meta.Key, int64, *MockInstanceGroupManagers, ...Option) error - SetInstanceTemplateHook func(context.Context, *meta.Key, *computega.InstanceGroupManagersSetInstanceTemplateRequest, *MockInstanceGroupManagers, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockInstanceGroupManagers) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroupManager, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroupManagers.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockInstanceGroupManagers.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockInstanceGroupManagers.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceGroupManagers %v not found", key), - } - klog.V(5).Infof("MockInstanceGroupManagers.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockInstanceGroupManagers) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroupManager, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroupManagers.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockInstanceGroupManagers.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.InstanceGroupManager - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockInstanceGroupManagers.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockInstanceGroupManagers) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroupManager, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroupManagers.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockInstanceGroupManagers.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockInstanceGroupManagers %v exists", key), - } - klog.V(5).Infof("MockInstanceGroupManagers.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "instanceGroupManagers") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "instanceGroupManagers", key) - - m.Objects[*key] = &MockInstanceGroupManagersObj{obj} - klog.V(5).Infof("MockInstanceGroupManagers.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockInstanceGroupManagers) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceGroupManagers.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockInstanceGroupManagers.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceGroupManagers %v not found", key), - } - klog.V(5).Infof("MockInstanceGroupManagers.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockInstanceGroupManagers.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockInstanceGroupManagers) Obj(o *computega.InstanceGroupManager) *MockInstanceGroupManagersObj { - return &MockInstanceGroupManagersObj{o} -} - -// CreateInstances is a mock for the corresponding method. -func (m *MockInstanceGroupManagers) CreateInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersCreateInstancesRequest, options ...Option) error { - if m.CreateInstancesHook != nil { - return m.CreateInstancesHook(ctx, key, arg0, m) - } - return nil -} - -// DeleteInstances is a mock for the corresponding method. -func (m *MockInstanceGroupManagers) DeleteInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersDeleteInstancesRequest, options ...Option) error { - if m.DeleteInstancesHook != nil { - return m.DeleteInstancesHook(ctx, key, arg0, m) - } - return nil -} - -// Resize is a mock for the corresponding method. -func (m *MockInstanceGroupManagers) Resize(ctx context.Context, key *meta.Key, arg0 int64, options ...Option) error { - if m.ResizeHook != nil { - return m.ResizeHook(ctx, key, arg0, m) - } - return nil -} - -// SetInstanceTemplate is a mock for the corresponding method. -func (m *MockInstanceGroupManagers) SetInstanceTemplate(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersSetInstanceTemplateRequest, options ...Option) error { - if m.SetInstanceTemplateHook != nil { - return m.SetInstanceTemplateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEInstanceGroupManagers is a simplifying adapter for the GCE InstanceGroupManagers. -type GCEInstanceGroupManagers struct { - s *Service -} - -// Get the InstanceGroupManager named by key. -func (g *GCEInstanceGroupManagers) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceGroupManager, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - - klog.V(5).Infof("GCEInstanceGroupManagers.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.InstanceGroupManagers.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEInstanceGroupManagers.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all InstanceGroupManager objects. -func (g *GCEInstanceGroupManagers) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.InstanceGroupManager, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEInstanceGroupManagers.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.GA.InstanceGroupManagers.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.InstanceGroupManager - f := func(l *computega.InstanceGroupManagerList) error { - klog.V(5).Infof("GCEInstanceGroupManagers.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroupManagers.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEInstanceGroupManagers.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEInstanceGroupManagers.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert InstanceGroupManager with key of value obj. -func (g *GCEInstanceGroupManagers) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceGroupManager, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.InstanceGroupManagers.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceGroupManagers.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the InstanceGroupManager referenced by key. -func (g *GCEInstanceGroupManagers) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroupManagers.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceGroupManagers.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// CreateInstances is a method on GCEInstanceGroupManagers. -func (g *GCEInstanceGroupManagers) CreateInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersCreateInstancesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "CreateInstances", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroupManagers.CreateInstances(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroupManagers.CreateInstances(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DeleteInstances is a method on GCEInstanceGroupManagers. -func (g *GCEInstanceGroupManagers) DeleteInstances(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersDeleteInstancesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DeleteInstances", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroupManagers.DeleteInstances(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroupManagers.DeleteInstances(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Resize is a method on GCEInstanceGroupManagers. -func (g *GCEInstanceGroupManagers) Resize(ctx context.Context, key *meta.Key, arg0 int64, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.Resize(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.Resize(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Resize", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.Resize(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.Resize(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroupManagers.Resize(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroupManagers.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroupManagers.Resize(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetInstanceTemplate is a method on GCEInstanceGroupManagers. -func (g *GCEInstanceGroupManagers) SetInstanceTemplate(ctx context.Context, key *meta.Key, arg0 *computega.InstanceGroupManagersSetInstanceTemplateRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceGroupManagers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetInstanceTemplate", - Version: meta.Version("ga"), - Service: "InstanceGroupManagers", - } - klog.V(5).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceGroupManagers.SetInstanceTemplate(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEInstanceGroupManagers.SetInstanceTemplate(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// InstanceTemplates is an interface that allows for mocking of InstanceTemplates. -type InstanceTemplates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceTemplate, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.InstanceTemplate, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceTemplate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockInstanceTemplates returns a new mock for InstanceTemplates. -func NewMockInstanceTemplates(pr ProjectRouter, objs map[meta.Key]*MockInstanceTemplatesObj) *MockInstanceTemplates { - mock := &MockInstanceTemplates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockInstanceTemplates is the mock for InstanceTemplates. -type MockInstanceTemplates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockInstanceTemplatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockInstanceTemplates, options ...Option) (bool, *computega.InstanceTemplate, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockInstanceTemplates, options ...Option) (bool, []*computega.InstanceTemplate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.InstanceTemplate, m *MockInstanceTemplates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockInstanceTemplates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockInstanceTemplates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceTemplate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceTemplates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockInstanceTemplates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockInstanceTemplates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceTemplates %v not found", key), - } - klog.V(5).Infof("MockInstanceTemplates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockInstanceTemplates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.InstanceTemplate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockInstanceTemplates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockInstanceTemplates.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.InstanceTemplate - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockInstanceTemplates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockInstanceTemplates) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceTemplate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockInstanceTemplates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockInstanceTemplates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockInstanceTemplates %v exists", key), - } - klog.V(5).Infof("MockInstanceTemplates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "instanceTemplates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "instanceTemplates", key) - - m.Objects[*key] = &MockInstanceTemplatesObj{obj} - klog.V(5).Infof("MockInstanceTemplates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockInstanceTemplates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockInstanceTemplates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockInstanceTemplates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockInstanceTemplates %v not found", key), - } - klog.V(5).Infof("MockInstanceTemplates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockInstanceTemplates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockInstanceTemplates) Obj(o *computega.InstanceTemplate) *MockInstanceTemplatesObj { - return &MockInstanceTemplatesObj{o} -} - -// GCEInstanceTemplates is a simplifying adapter for the GCE InstanceTemplates. -type GCEInstanceTemplates struct { - s *Service -} - -// Get the InstanceTemplate named by key. -func (g *GCEInstanceTemplates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.InstanceTemplate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceTemplates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEInstanceTemplates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceTemplates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "InstanceTemplates", - } - - klog.V(5).Infof("GCEInstanceTemplates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceTemplates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.InstanceTemplates.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEInstanceTemplates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all InstanceTemplate objects. -func (g *GCEInstanceTemplates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.InstanceTemplate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceTemplates.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceTemplates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "InstanceTemplates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEInstanceTemplates.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.InstanceTemplates.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.InstanceTemplate - f := func(l *computega.InstanceTemplateList) error { - klog.V(5).Infof("GCEInstanceTemplates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEInstanceTemplates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEInstanceTemplates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEInstanceTemplates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert InstanceTemplate with key of value obj. -func (g *GCEInstanceTemplates) Insert(ctx context.Context, key *meta.Key, obj *computega.InstanceTemplate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceTemplates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceTemplates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceTemplates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "InstanceTemplates", - } - klog.V(5).Infof("GCEInstanceTemplates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceTemplates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.InstanceTemplates.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceTemplates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceTemplates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the InstanceTemplate referenced by key. -func (g *GCEInstanceTemplates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEInstanceTemplates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEInstanceTemplates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "InstanceTemplates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "InstanceTemplates", - } - klog.V(5).Infof("GCEInstanceTemplates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEInstanceTemplates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.InstanceTemplates.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEInstanceTemplates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEInstanceTemplates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Images is an interface that allows for mocking of Images. -type Images interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Image, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Image, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Image, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetFromFamily(context.Context, *meta.Key, ...Option) (*computega.Image, error) - GetIamPolicy(context.Context, *meta.Key, ...Option) (*computega.Policy, error) - Patch(context.Context, *meta.Key, *computega.Image, ...Option) error - SetIamPolicy(context.Context, *meta.Key, *computega.GlobalSetPolicyRequest, ...Option) (*computega.Policy, error) - SetLabels(context.Context, *meta.Key, *computega.GlobalSetLabelsRequest, ...Option) error - TestIamPermissions(context.Context, *meta.Key, *computega.TestPermissionsRequest, ...Option) (*computega.TestPermissionsResponse, error) -} - -// NewMockImages returns a new mock for Images. -func NewMockImages(pr ProjectRouter, objs map[meta.Key]*MockImagesObj) *MockImages { - mock := &MockImages{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockImages is the mock for Images. -type MockImages struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockImagesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockImages, options ...Option) (bool, *computega.Image, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockImages, options ...Option) (bool, []*computega.Image, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Image, m *MockImages, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockImages, options ...Option) (bool, error) - GetFromFamilyHook func(context.Context, *meta.Key, *MockImages, ...Option) (*computega.Image, error) - GetIamPolicyHook func(context.Context, *meta.Key, *MockImages, ...Option) (*computega.Policy, error) - PatchHook func(context.Context, *meta.Key, *computega.Image, *MockImages, ...Option) error - SetIamPolicyHook func(context.Context, *meta.Key, *computega.GlobalSetPolicyRequest, *MockImages, ...Option) (*computega.Policy, error) - SetLabelsHook func(context.Context, *meta.Key, *computega.GlobalSetLabelsRequest, *MockImages, ...Option) error - TestIamPermissionsHook func(context.Context, *meta.Key, *computega.TestPermissionsRequest, *MockImages, ...Option) (*computega.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Image, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockImages.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockImages.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockImages %v not found", key), - } - klog.V(5).Infof("MockImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Image, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockImages.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockImages.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Image - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockImages.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockImages) Insert(ctx context.Context, key *meta.Key, obj *computega.Image, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockImages %v exists", key), - } - klog.V(5).Infof("MockImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "Images") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "Images", key) - - m.Objects[*key] = &MockImagesObj{obj} - klog.V(5).Infof("MockImages.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockImages %v not found", key), - } - klog.V(5).Infof("MockImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockImages.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockImages) Obj(o *computega.Image) *MockImagesObj { - return &MockImagesObj{o} -} - -// GetFromFamily is a mock for the corresponding method. -func (m *MockImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computega.Image, error) { - if m.GetFromFamilyHook != nil { - return m.GetFromFamilyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetFromFamilyHook must be set") -} - -// GetIamPolicy is a mock for the corresponding method. -func (m *MockImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computega.Policy, error) { - if m.GetIamPolicyHook != nil { - return m.GetIamPolicyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetIamPolicyHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockImages) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Image, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetIamPolicy is a mock for the corresponding method. -func (m *MockImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetPolicyRequest, options ...Option) (*computega.Policy, error) { - if m.SetIamPolicyHook != nil { - return m.SetIamPolicyHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("SetIamPolicyHook must be set") -} - -// SetLabels is a mock for the corresponding method. -func (m *MockImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computega.TestPermissionsRequest, options ...Option) (*computega.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEImages is a simplifying adapter for the GCE Images. -type GCEImages struct { - s *Service -} - -// Get the Image named by key. -func (g *GCEImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Images", - } - - klog.V(5).Infof("GCEImages.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Images.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEImages.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Image objects. -func (g *GCEImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Images", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEImages.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Images.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Image - f := func(l *computega.ImageList) error { - klog.V(5).Infof("GCEImages.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEImages.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEImages.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Image with key of value obj. -func (g *GCEImages) Insert(ctx context.Context, key *meta.Key, obj *computega.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEImages.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Images.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEImages.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEImages.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Image referenced by key. -func (g *GCEImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEImages.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Images.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEImages.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetFromFamily is a method on GCEImages. -func (g *GCEImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computega.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.GetFromFamily(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.GetFromFamily(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetFromFamily", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.GetFromFamily(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.GetFromFamily(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Images.GetFromFamily(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.GetFromFamily(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetIamPolicy is a method on GCEImages. -func (g *GCEImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computega.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.GetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.GetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetIamPolicy", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.GetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.GetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Images.GetIamPolicy(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.GetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEImages. -func (g *GCEImages) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Images.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetIamPolicy is a method on GCEImages. -func (g *GCEImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetPolicyRequest, options ...Option) (*computega.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.SetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.SetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetIamPolicy", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.SetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.SetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Images.SetIamPolicy(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.SetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// SetLabels is a method on GCEImages. -func (g *GCEImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computega.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Images.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TestIamPermissions is a method on GCEImages. -func (g *GCEImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computega.TestPermissionsRequest, options ...Option) (*computega.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEImages.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEImages.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("ga"), - Service: "Images", - } - klog.V(5).Infof("GCEImages.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEImages.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Images.TestIamPermissions(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEImages.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// BetaImages is an interface that allows for mocking of Images. -type BetaImages interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Image, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Image, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Image, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetFromFamily(context.Context, *meta.Key, ...Option) (*computebeta.Image, error) - GetIamPolicy(context.Context, *meta.Key, ...Option) (*computebeta.Policy, error) - Patch(context.Context, *meta.Key, *computebeta.Image, ...Option) error - SetIamPolicy(context.Context, *meta.Key, *computebeta.GlobalSetPolicyRequest, ...Option) (*computebeta.Policy, error) - SetLabels(context.Context, *meta.Key, *computebeta.GlobalSetLabelsRequest, ...Option) error - TestIamPermissions(context.Context, *meta.Key, *computebeta.TestPermissionsRequest, ...Option) (*computebeta.TestPermissionsResponse, error) -} - -// NewMockBetaImages returns a new mock for Images. -func NewMockBetaImages(pr ProjectRouter, objs map[meta.Key]*MockImagesObj) *MockBetaImages { - mock := &MockBetaImages{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaImages is the mock for Images. -type MockBetaImages struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockImagesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaImages, options ...Option) (bool, *computebeta.Image, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaImages, options ...Option) (bool, []*computebeta.Image, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Image, m *MockBetaImages, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaImages, options ...Option) (bool, error) - GetFromFamilyHook func(context.Context, *meta.Key, *MockBetaImages, ...Option) (*computebeta.Image, error) - GetIamPolicyHook func(context.Context, *meta.Key, *MockBetaImages, ...Option) (*computebeta.Policy, error) - PatchHook func(context.Context, *meta.Key, *computebeta.Image, *MockBetaImages, ...Option) error - SetIamPolicyHook func(context.Context, *meta.Key, *computebeta.GlobalSetPolicyRequest, *MockBetaImages, ...Option) (*computebeta.Policy, error) - SetLabelsHook func(context.Context, *meta.Key, *computebeta.GlobalSetLabelsRequest, *MockBetaImages, ...Option) error - TestIamPermissionsHook func(context.Context, *meta.Key, *computebeta.TestPermissionsRequest, *MockBetaImages, ...Option) (*computebeta.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Image, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaImages.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaImages.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaImages %v not found", key), - } - klog.V(5).Infof("MockBetaImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Image, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaImages.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaImages.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Image - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaImages.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaImages) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Image, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaImages %v exists", key), - } - klog.V(5).Infof("MockBetaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "Images") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "Images", key) - - m.Objects[*key] = &MockImagesObj{obj} - klog.V(5).Infof("MockBetaImages.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaImages %v not found", key), - } - klog.V(5).Infof("MockBetaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaImages.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaImages) Obj(o *computebeta.Image) *MockImagesObj { - return &MockImagesObj{o} -} - -// GetFromFamily is a mock for the corresponding method. -func (m *MockBetaImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Image, error) { - if m.GetFromFamilyHook != nil { - return m.GetFromFamilyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetFromFamilyHook must be set") -} - -// GetIamPolicy is a mock for the corresponding method. -func (m *MockBetaImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Policy, error) { - if m.GetIamPolicyHook != nil { - return m.GetIamPolicyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetIamPolicyHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaImages) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Image, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetIamPolicy is a mock for the corresponding method. -func (m *MockBetaImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetPolicyRequest, options ...Option) (*computebeta.Policy, error) { - if m.SetIamPolicyHook != nil { - return m.SetIamPolicyHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("SetIamPolicyHook must be set") -} - -// SetLabels is a mock for the corresponding method. -func (m *MockBetaImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockBetaImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computebeta.TestPermissionsRequest, options ...Option) (*computebeta.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEBetaImages is a simplifying adapter for the GCE Images. -type GCEBetaImages struct { - s *Service -} - -// Get the Image named by key. -func (g *GCEBetaImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Images", - } - - klog.V(5).Infof("GCEBetaImages.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Images.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaImages.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Image objects. -func (g *GCEBetaImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Images", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaImages.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.Images.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Image - f := func(l *computebeta.ImageList) error { - klog.V(5).Infof("GCEBetaImages.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaImages.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaImages.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Image with key of value obj. -func (g *GCEBetaImages) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Images.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaImages.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaImages.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Image referenced by key. -func (g *GCEBetaImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Images.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaImages.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetFromFamily is a method on GCEBetaImages. -func (g *GCEBetaImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.GetFromFamily(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.GetFromFamily(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetFromFamily", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.GetFromFamily(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.GetFromFamily(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Images.GetFromFamily(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.GetFromFamily(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetIamPolicy is a method on GCEBetaImages. -func (g *GCEBetaImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.GetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.GetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetIamPolicy", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.GetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.GetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Images.GetIamPolicy(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.GetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEBetaImages. -func (g *GCEBetaImages) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Images.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetIamPolicy is a method on GCEBetaImages. -func (g *GCEBetaImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetPolicyRequest, options ...Option) (*computebeta.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.SetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.SetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetIamPolicy", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.SetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.SetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Images.SetIamPolicy(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.SetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// SetLabels is a method on GCEBetaImages. -func (g *GCEBetaImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Images.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TestIamPermissions is a method on GCEBetaImages. -func (g *GCEBetaImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computebeta.TestPermissionsRequest, options ...Option) (*computebeta.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaImages.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaImages.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("beta"), - Service: "Images", - } - klog.V(5).Infof("GCEBetaImages.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaImages.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Images.TestIamPermissions(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaImages.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// AlphaImages is an interface that allows for mocking of Images. -type AlphaImages interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Image, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Image, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Image, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - GetFromFamily(context.Context, *meta.Key, ...Option) (*computealpha.Image, error) - GetIamPolicy(context.Context, *meta.Key, ...Option) (*computealpha.Policy, error) - Patch(context.Context, *meta.Key, *computealpha.Image, ...Option) error - SetIamPolicy(context.Context, *meta.Key, *computealpha.GlobalSetPolicyRequest, ...Option) (*computealpha.Policy, error) - SetLabels(context.Context, *meta.Key, *computealpha.GlobalSetLabelsRequest, ...Option) error - TestIamPermissions(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, ...Option) (*computealpha.TestPermissionsResponse, error) -} - -// NewMockAlphaImages returns a new mock for Images. -func NewMockAlphaImages(pr ProjectRouter, objs map[meta.Key]*MockImagesObj) *MockAlphaImages { - mock := &MockAlphaImages{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaImages is the mock for Images. -type MockAlphaImages struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockImagesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaImages, options ...Option) (bool, *computealpha.Image, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaImages, options ...Option) (bool, []*computealpha.Image, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Image, m *MockAlphaImages, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaImages, options ...Option) (bool, error) - GetFromFamilyHook func(context.Context, *meta.Key, *MockAlphaImages, ...Option) (*computealpha.Image, error) - GetIamPolicyHook func(context.Context, *meta.Key, *MockAlphaImages, ...Option) (*computealpha.Policy, error) - PatchHook func(context.Context, *meta.Key, *computealpha.Image, *MockAlphaImages, ...Option) error - SetIamPolicyHook func(context.Context, *meta.Key, *computealpha.GlobalSetPolicyRequest, *MockAlphaImages, ...Option) (*computealpha.Policy, error) - SetLabelsHook func(context.Context, *meta.Key, *computealpha.GlobalSetLabelsRequest, *MockAlphaImages, ...Option) error - TestIamPermissionsHook func(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, *MockAlphaImages, ...Option) (*computealpha.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Image, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaImages.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaImages.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaImages %v not found", key), - } - klog.V(5).Infof("MockAlphaImages.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Image, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaImages.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaImages.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Image - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaImages.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaImages) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Image, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaImages %v exists", key), - } - klog.V(5).Infof("MockAlphaImages.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "Images") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "Images", key) - - m.Objects[*key] = &MockImagesObj{obj} - klog.V(5).Infof("MockAlphaImages.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaImages %v not found", key), - } - klog.V(5).Infof("MockAlphaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaImages.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaImages) Obj(o *computealpha.Image) *MockImagesObj { - return &MockImagesObj{o} -} - -// GetFromFamily is a mock for the corresponding method. -func (m *MockAlphaImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Image, error) { - if m.GetFromFamilyHook != nil { - return m.GetFromFamilyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetFromFamilyHook must be set") -} - -// GetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - if m.GetIamPolicyHook != nil { - return m.GetIamPolicyHook(ctx, key, m) - } - return nil, fmt.Errorf("GetIamPolicyHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaImages) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Image, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetIamPolicy is a mock for the corresponding method. -func (m *MockAlphaImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - if m.SetIamPolicyHook != nil { - return m.SetIamPolicyHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("SetIamPolicyHook must be set") -} - -// SetLabels is a mock for the corresponding method. -func (m *MockAlphaImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetLabelsRequest, options ...Option) error { - if m.SetLabelsHook != nil { - return m.SetLabelsHook(ctx, key, arg0, m) - } - return nil -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockAlphaImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEAlphaImages is a simplifying adapter for the GCE Images. -type GCEAlphaImages struct { - s *Service -} - -// Get the Image named by key. -func (g *GCEAlphaImages) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Images", - } - - klog.V(5).Infof("GCEAlphaImages.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Images.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaImages.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Image objects. -func (g *GCEAlphaImages) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Images", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaImages.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.Images.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Image - f := func(l *computealpha.ImageList) error { - klog.V(5).Infof("GCEAlphaImages.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaImages.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaImages.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Image with key of value obj. -func (g *GCEAlphaImages) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Images.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaImages.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaImages.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Image referenced by key. -func (g *GCEAlphaImages) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Images.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaImages.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaImages.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// GetFromFamily is a method on GCEAlphaImages. -func (g *GCEAlphaImages) GetFromFamily(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Image, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.GetFromFamily(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.GetFromFamily(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetFromFamily", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.GetFromFamily(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.GetFromFamily(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Images.GetFromFamily(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.GetFromFamily(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// GetIamPolicy is a method on GCEAlphaImages. -func (g *GCEAlphaImages) GetIamPolicy(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.GetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.GetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetIamPolicy", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.GetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.GetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Images.GetIamPolicy(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.GetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEAlphaImages. -func (g *GCEAlphaImages) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Image, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Images.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaImages.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetIamPolicy is a method on GCEAlphaImages. -func (g *GCEAlphaImages) SetIamPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetPolicyRequest, options ...Option) (*computealpha.Policy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.SetIamPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.SetIamPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetIamPolicy", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.SetIamPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.SetIamPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Images.SetIamPolicy(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.SetIamPolicy(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// SetLabels is a method on GCEAlphaImages. -func (g *GCEAlphaImages) SetLabels(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalSetLabelsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.SetLabels(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.SetLabels(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetLabels", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.SetLabels(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.SetLabels(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Images.SetLabels(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaImages.SetLabels(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TestIamPermissions is a method on GCEAlphaImages. -func (g *GCEAlphaImages) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaImages.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaImages.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Images") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("alpha"), - Service: "Images", - } - klog.V(5).Infof("GCEAlphaImages.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaImages.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Images.TestIamPermissions(projectID, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaImages.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// AlphaNetworks is an interface that allows for mocking of Networks. -type AlphaNetworks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Network, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Network, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Network, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockAlphaNetworks returns a new mock for Networks. -func NewMockAlphaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockAlphaNetworks { - mock := &MockAlphaNetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaNetworks is the mock for Networks. -type MockAlphaNetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks, options ...Option) (bool, *computealpha.Network, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworks, options ...Option) (bool, []*computealpha.Network, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Network, m *MockAlphaNetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworks, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaNetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Network, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworks %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaNetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Network, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Network - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Network, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaNetworks %v exists", key), - } - klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "networks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "networks", key) - - m.Objects[*key] = &MockNetworksObj{obj} - klog.V(5).Infof("MockAlphaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaNetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworks %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaNetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaNetworks) Obj(o *computealpha.Network) *MockNetworksObj { - return &MockNetworksObj{o} -} - -// GCEAlphaNetworks is a simplifying adapter for the GCE Networks. -type GCEAlphaNetworks struct { - s *Service -} - -// Get the Network named by key. -func (g *GCEAlphaNetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Networks", - } - - klog.V(5).Infof("GCEAlphaNetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Networks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Network objects. -func (g *GCEAlphaNetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Networks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaNetworks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.Networks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Network - f := func(l *computealpha.NetworkList) error { - klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Network with key of value obj. -func (g *GCEAlphaNetworks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Network, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Networks", - } - klog.V(5).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Networks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Network referenced by key. -func (g *GCEAlphaNetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Networks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Networks", - } - klog.V(5).Infof("GCEAlphaNetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Networks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BetaNetworks is an interface that allows for mocking of Networks. -type BetaNetworks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Network, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Network, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Network, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockBetaNetworks returns a new mock for Networks. -func NewMockBetaNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockBetaNetworks { - mock := &MockBetaNetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaNetworks is the mock for Networks. -type MockBetaNetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks, options ...Option) (bool, *computebeta.Network, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworks, options ...Option) (bool, []*computebeta.Network, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Network, m *MockBetaNetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworks, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaNetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Network, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaNetworks %v not found", key), - } - klog.V(5).Infof("MockBetaNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaNetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Network, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Network - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Network, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaNetworks %v exists", key), - } - klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "networks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "networks", key) - - m.Objects[*key] = &MockNetworksObj{obj} - klog.V(5).Infof("MockBetaNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaNetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaNetworks %v not found", key), - } - klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaNetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaNetworks) Obj(o *computebeta.Network) *MockNetworksObj { - return &MockNetworksObj{o} -} - -// GCEBetaNetworks is a simplifying adapter for the GCE Networks. -type GCEBetaNetworks struct { - s *Service -} - -// Get the Network named by key. -func (g *GCEBetaNetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Networks", - } - - klog.V(5).Infof("GCEBetaNetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Networks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaNetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Network objects. -func (g *GCEBetaNetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Networks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaNetworks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.Networks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Network - f := func(l *computebeta.NetworkList) error { - klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaNetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Network with key of value obj. -func (g *GCEBetaNetworks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Network, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Networks", - } - klog.V(5).Infof("GCEBetaNetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Networks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaNetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Network referenced by key. -func (g *GCEBetaNetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Networks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Networks", - } - klog.V(5).Infof("GCEBetaNetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Networks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Networks is an interface that allows for mocking of Networks. -type Networks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Network, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Network, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Network, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockNetworks returns a new mock for Networks. -func NewMockNetworks(pr ProjectRouter, objs map[meta.Key]*MockNetworksObj) *MockNetworks { - mock := &MockNetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockNetworks is the mock for Networks. -type MockNetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockNetworks, options ...Option) (bool, *computega.Network, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockNetworks, options ...Option) (bool, []*computega.Network, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Network, m *MockNetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworks, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockNetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Network, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockNetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockNetworks %v not found", key), - } - klog.V(5).Infof("MockNetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockNetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Network, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockNetworks.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Network - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockNetworks.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockNetworks) Insert(ctx context.Context, key *meta.Key, obj *computega.Network, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockNetworks %v exists", key), - } - klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "networks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "networks", key) - - m.Objects[*key] = &MockNetworksObj{obj} - klog.V(5).Infof("MockNetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockNetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockNetworks %v not found", key), - } - klog.V(5).Infof("MockNetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockNetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockNetworks) Obj(o *computega.Network) *MockNetworksObj { - return &MockNetworksObj{o} -} - -// GCENetworks is a simplifying adapter for the GCE Networks. -type GCENetworks struct { - s *Service -} - -// Get the Network named by key. -func (g *GCENetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCENetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Networks", - } - - klog.V(5).Infof("GCENetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Networks.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCENetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Network objects. -func (g *GCENetworks) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Network, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworks.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Networks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCENetworks.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Networks.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Network - f := func(l *computega.NetworkList) error { - klog.V(5).Infof("GCENetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCENetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Network with key of value obj. -func (g *GCENetworks) Insert(ctx context.Context, key *meta.Key, obj *computega.Network, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCENetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Networks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Networks", - } - klog.V(5).Infof("GCENetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Networks.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCENetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCENetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Network referenced by key. -func (g *GCENetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCENetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Networks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Networks", - } - klog.V(5).Infof("GCENetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Networks.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCENetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AlphaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups. -type AlphaNetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.NetworkEndpointGroup, error) - AttachNetworkEndpoints(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F, ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) -} - -// NewMockAlphaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups. -func NewMockAlphaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockAlphaNetworkEndpointGroups { - mock := &MockAlphaNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaNetworkEndpointGroups is the mock for NetworkEndpointGroups. -type MockAlphaNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups, options ...Option) (bool, *computealpha.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockAlphaNetworkEndpointGroups, options ...Option) (bool, []*computealpha.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, m *MockAlphaNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaNetworkEndpointGroups, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaNetworkEndpointGroups, options ...Option) (bool, map[string][]*computealpha.NetworkEndpointGroup, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsAttachEndpointsRequest, *MockAlphaNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsDetachEndpointsRequest, *MockAlphaNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *computealpha.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockAlphaNetworkEndpointGroups, ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.NetworkEndpointGroup - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.NetworkEndpointGroup, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computealpha.NetworkEndpointGroup{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - if err != nil { - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToAlpha()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToAlpha()) - } - klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaNetworkEndpointGroups) Obj(o *computealpha.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj { - return &MockNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m) - } - return nil, nil -} - -// GCEAlphaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups. -type GCEAlphaNetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCEAlphaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCEAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.Alpha.NetworkEndpointGroups.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.NetworkEndpointGroup - f := func(l *computealpha.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCEAlphaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.NetworkEndpointGroups.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCEAlphaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Alpha.NetworkEndpointGroups.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computealpha.NetworkEndpointGroup{} - f := func(l *computealpha.NetworkEndpointGroupAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.NetworkEndpointGroups...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AttachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups. -func (g *GCEAlphaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups. -func (g *GCEAlphaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCEAlphaNetworkEndpointGroups. -func (g *GCEAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - var all []*computealpha.NetworkEndpointWithHealthStatus - f := func(l *computealpha.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// BetaNetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups. -type BetaNetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.NetworkEndpointGroup, error) - AttachNetworkEndpoints(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsListEndpointsRequest, *filter.F, ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) -} - -// NewMockBetaNetworkEndpointGroups returns a new mock for NetworkEndpointGroups. -func NewMockBetaNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockBetaNetworkEndpointGroups { - mock := &MockBetaNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaNetworkEndpointGroups is the mock for NetworkEndpointGroups. -type MockBetaNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups, options ...Option) (bool, *computebeta.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockBetaNetworkEndpointGroups, options ...Option) (bool, []*computebeta.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, m *MockBetaNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaNetworkEndpointGroups, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaNetworkEndpointGroups, options ...Option) (bool, map[string][]*computebeta.NetworkEndpointGroup, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsAttachEndpointsRequest, *MockBetaNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsDetachEndpointsRequest, *MockBetaNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *computebeta.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockBetaNetworkEndpointGroups, ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.NetworkEndpointGroup - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.NetworkEndpointGroup, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computebeta.NetworkEndpointGroup{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToBeta().SelfLink) - if err != nil { - klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToBeta()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToBeta()) - } - klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaNetworkEndpointGroups) Obj(o *computebeta.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj { - return &MockNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m) - } - return nil, nil -} - -// GCEBetaNetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups. -type GCEBetaNetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCEBetaNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCEBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.Beta.NetworkEndpointGroups.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.NetworkEndpointGroup - f := func(l *computebeta.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCEBetaNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.NetworkEndpointGroups.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCEBetaNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Beta.NetworkEndpointGroups.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computebeta.NetworkEndpointGroup{} - f := func(l *computebeta.NetworkEndpointGroupAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.NetworkEndpointGroups...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AttachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups. -func (g *GCEBetaNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups. -func (g *GCEBetaNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCEBetaNetworkEndpointGroups. -func (g *GCEBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("beta"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - var all []*computebeta.NetworkEndpointWithHealthStatus - f := func(l *computebeta.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// NetworkEndpointGroups is an interface that allows for mocking of NetworkEndpointGroups. -type NetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) - List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.NetworkEndpointGroup, error) - AttachNetworkEndpoints(context.Context, *meta.Key, *computega.NetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computega.NetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *computega.NetworkEndpointGroupsListEndpointsRequest, *filter.F, ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) -} - -// NewMockNetworkEndpointGroups returns a new mock for NetworkEndpointGroups. -func NewMockNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockNetworkEndpointGroupsObj) *MockNetworkEndpointGroups { - mock := &MockNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockNetworkEndpointGroups is the mock for NetworkEndpointGroups. -type MockNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups, options ...Option) (bool, *computega.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, zone string, fl *filter.F, m *MockNetworkEndpointGroups, options ...Option) (bool, []*computega.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, m *MockNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockNetworkEndpointGroups, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockNetworkEndpointGroups, options ...Option) (bool, map[string][]*computega.NetworkEndpointGroup, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computega.NetworkEndpointGroupsAttachEndpointsRequest, *MockNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computega.NetworkEndpointGroupsDetachEndpointsRequest, *MockNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *computega.NetworkEndpointGroupsListEndpointsRequest, *filter.F, *MockNetworkEndpointGroups, ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given zone. -func (m *MockNetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, zone, fl, m, options...); intercept { - klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], %v", ctx, zone, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = nil, %v", ctx, zone, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.NetworkEndpointGroup - for key, obj := range m.Objects { - if key.Zone != zone { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockNetworkEndpointGroups.List(%v, %q, %v) = [%v items], nil", ctx, zone, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.NetworkEndpointGroup, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computega.NetworkEndpointGroup{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToGA().SelfLink) - if err != nil { - klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToGA()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToGA()) - } - klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockNetworkEndpointGroups) Obj(o *computega.NetworkEndpointGroup) *MockNetworkEndpointGroupsObj { - return &MockNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, arg0, fl, m) - } - return nil, nil -} - -// GCENetworkEndpointGroups is a simplifying adapter for the GCE NetworkEndpointGroups. -type GCENetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCENetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCENetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.NetworkEndpointGroups.Get(projectID, key.Zone, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCENetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCENetworkEndpointGroups) List(ctx context.Context, zone string, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v, %v) called", ctx, zone, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, zone, fl, projectID, ck) - call := g.s.GA.NetworkEndpointGroups.List(projectID, zone) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.NetworkEndpointGroup - f := func(l *computega.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCENetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.NetworkEndpointGroups.Insert(projectID, key.Zone, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCENetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCENetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCENetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.NetworkEndpointGroups.Delete(projectID, key.Zone, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCENetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCENetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - - klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.GA.NetworkEndpointGroups.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computega.NetworkEndpointGroup{} - f := func(l *computega.NetworkEndpointGroupAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.NetworkEndpointGroups...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// AttachNetworkEndpoints is a method on GCENetworkEndpointGroups. -func (g *GCENetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.NetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCENetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCENetworkEndpointGroups. -func (g *GCENetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.NetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCENetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCENetworkEndpointGroups. -func (g *GCENetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.NetworkEndpointGroupsListEndpointsRequest, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "NetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("ga"), - Service: "NetworkEndpointGroups", - } - klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.NetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Zone, key.Name, arg0) - var all []*computega.NetworkEndpointWithHealthStatus - f := func(l *computega.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// AlphaGlobalNetworkEndpointGroups is an interface that allows for mocking of GlobalNetworkEndpointGroups. -type AlphaGlobalNetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachNetworkEndpoints(context.Context, *meta.Key, *computealpha.GlobalNetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computealpha.GlobalNetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *filter.F, ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) -} - -// NewMockAlphaGlobalNetworkEndpointGroups returns a new mock for GlobalNetworkEndpointGroups. -func NewMockAlphaGlobalNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockGlobalNetworkEndpointGroupsObj) *MockAlphaGlobalNetworkEndpointGroups { - mock := &MockAlphaGlobalNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaGlobalNetworkEndpointGroups is the mock for GlobalNetworkEndpointGroups. -type MockAlphaGlobalNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalNetworkEndpointGroups, options ...Option) (bool, *computealpha.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaGlobalNetworkEndpointGroups, options ...Option) (bool, []*computealpha.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, m *MockAlphaGlobalNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaGlobalNetworkEndpointGroups, options ...Option) (bool, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computealpha.GlobalNetworkEndpointGroupsAttachEndpointsRequest, *MockAlphaGlobalNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computealpha.GlobalNetworkEndpointGroupsDetachEndpointsRequest, *MockAlphaGlobalNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *filter.F, *MockAlphaGlobalNetworkEndpointGroups, ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.NetworkEndpointGroup - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaGlobalNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockGlobalNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaGlobalNetworkEndpointGroups) Obj(o *computealpha.NetworkEndpointGroup) *MockGlobalNetworkEndpointGroupsObj { - return &MockGlobalNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockAlphaGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, fl, m) - } - return nil, nil -} - -// GCEAlphaGlobalNetworkEndpointGroups is a simplifying adapter for the GCE GlobalNetworkEndpointGroups. -type GCEAlphaGlobalNetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCEAlphaGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.GlobalNetworkEndpointGroups.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCEAlphaGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.GlobalNetworkEndpointGroups.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.NetworkEndpointGroup - f := func(l *computealpha.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCEAlphaGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computealpha.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.GlobalNetworkEndpointGroups.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCEAlphaGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalNetworkEndpointGroups.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachNetworkEndpoints is a method on GCEAlphaGlobalNetworkEndpointGroups. -func (g *GCEAlphaGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalNetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCEAlphaGlobalNetworkEndpointGroups. -func (g *GCEAlphaGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computealpha.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.GlobalNetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCEAlphaGlobalNetworkEndpointGroups. -func (g *GCEAlphaGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computealpha.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("alpha"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.GlobalNetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Name) - var all []*computealpha.NetworkEndpointWithHealthStatus - f := func(l *computealpha.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// BetaGlobalNetworkEndpointGroups is an interface that allows for mocking of GlobalNetworkEndpointGroups. -type BetaGlobalNetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachNetworkEndpoints(context.Context, *meta.Key, *computebeta.GlobalNetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computebeta.GlobalNetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *filter.F, ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) -} - -// NewMockBetaGlobalNetworkEndpointGroups returns a new mock for GlobalNetworkEndpointGroups. -func NewMockBetaGlobalNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockGlobalNetworkEndpointGroupsObj) *MockBetaGlobalNetworkEndpointGroups { - mock := &MockBetaGlobalNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaGlobalNetworkEndpointGroups is the mock for GlobalNetworkEndpointGroups. -type MockBetaGlobalNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalNetworkEndpointGroups, options ...Option) (bool, *computebeta.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaGlobalNetworkEndpointGroups, options ...Option) (bool, []*computebeta.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, m *MockBetaGlobalNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaGlobalNetworkEndpointGroups, options ...Option) (bool, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computebeta.GlobalNetworkEndpointGroupsAttachEndpointsRequest, *MockBetaGlobalNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computebeta.GlobalNetworkEndpointGroupsDetachEndpointsRequest, *MockBetaGlobalNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *filter.F, *MockBetaGlobalNetworkEndpointGroups, ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.NetworkEndpointGroup - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaGlobalNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockGlobalNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaGlobalNetworkEndpointGroups) Obj(o *computebeta.NetworkEndpointGroup) *MockGlobalNetworkEndpointGroupsObj { - return &MockGlobalNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockBetaGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, fl, m) - } - return nil, nil -} - -// GCEBetaGlobalNetworkEndpointGroups is a simplifying adapter for the GCE GlobalNetworkEndpointGroups. -type GCEBetaGlobalNetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCEBetaGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.GlobalNetworkEndpointGroups.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCEBetaGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.GlobalNetworkEndpointGroups.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.NetworkEndpointGroup - f := func(l *computebeta.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCEBetaGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computebeta.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.GlobalNetworkEndpointGroups.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCEBetaGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalNetworkEndpointGroups.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachNetworkEndpoints is a method on GCEBetaGlobalNetworkEndpointGroups. -func (g *GCEBetaGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalNetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCEBetaGlobalNetworkEndpointGroups. -func (g *GCEBetaGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computebeta.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.GlobalNetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCEBetaGlobalNetworkEndpointGroups. -func (g *GCEBetaGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computebeta.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("beta"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.GlobalNetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Name) - var all []*computebeta.NetworkEndpointWithHealthStatus - f := func(l *computebeta.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// GlobalNetworkEndpointGroups is an interface that allows for mocking of GlobalNetworkEndpointGroups. -type GlobalNetworkEndpointGroups interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AttachNetworkEndpoints(context.Context, *meta.Key, *computega.GlobalNetworkEndpointGroupsAttachEndpointsRequest, ...Option) error - DetachNetworkEndpoints(context.Context, *meta.Key, *computega.GlobalNetworkEndpointGroupsDetachEndpointsRequest, ...Option) error - ListNetworkEndpoints(context.Context, *meta.Key, *filter.F, ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) -} - -// NewMockGlobalNetworkEndpointGroups returns a new mock for GlobalNetworkEndpointGroups. -func NewMockGlobalNetworkEndpointGroups(pr ProjectRouter, objs map[meta.Key]*MockGlobalNetworkEndpointGroupsObj) *MockGlobalNetworkEndpointGroups { - mock := &MockGlobalNetworkEndpointGroups{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockGlobalNetworkEndpointGroups is the mock for GlobalNetworkEndpointGroups. -type MockGlobalNetworkEndpointGroups struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockGlobalNetworkEndpointGroupsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockGlobalNetworkEndpointGroups, options ...Option) (bool, *computega.NetworkEndpointGroup, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockGlobalNetworkEndpointGroups, options ...Option) (bool, []*computega.NetworkEndpointGroup, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, m *MockGlobalNetworkEndpointGroups, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockGlobalNetworkEndpointGroups, options ...Option) (bool, error) - AttachNetworkEndpointsHook func(context.Context, *meta.Key, *computega.GlobalNetworkEndpointGroupsAttachEndpointsRequest, *MockGlobalNetworkEndpointGroups, ...Option) error - DetachNetworkEndpointsHook func(context.Context, *meta.Key, *computega.GlobalNetworkEndpointGroupsDetachEndpointsRequest, *MockGlobalNetworkEndpointGroups, ...Option) error - ListNetworkEndpointsHook func(context.Context, *meta.Key, *filter.F, *MockGlobalNetworkEndpointGroups, ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.NetworkEndpointGroup - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockGlobalNetworkEndpointGroups %v exists", key), - } - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "networkEndpointGroups") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "networkEndpointGroups", key) - - m.Objects[*key] = &MockGlobalNetworkEndpointGroupsObj{obj} - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockGlobalNetworkEndpointGroups %v not found", key), - } - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockGlobalNetworkEndpointGroups.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockGlobalNetworkEndpointGroups) Obj(o *computega.NetworkEndpointGroup) *MockGlobalNetworkEndpointGroupsObj { - return &MockGlobalNetworkEndpointGroupsObj{o} -} - -// AttachNetworkEndpoints is a mock for the corresponding method. -func (m *MockGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - if m.AttachNetworkEndpointsHook != nil { - return m.AttachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// DetachNetworkEndpoints is a mock for the corresponding method. -func (m *MockGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - if m.DetachNetworkEndpointsHook != nil { - return m.DetachNetworkEndpointsHook(ctx, key, arg0, m) - } - return nil -} - -// ListNetworkEndpoints is a mock for the corresponding method. -func (m *MockGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) { - if m.ListNetworkEndpointsHook != nil { - return m.ListNetworkEndpointsHook(ctx, key, fl, m) - } - return nil, nil -} - -// GCEGlobalNetworkEndpointGroups is a simplifying adapter for the GCE GlobalNetworkEndpointGroups. -type GCEGlobalNetworkEndpointGroups struct { - s *Service -} - -// Get the NetworkEndpointGroup named by key. -func (g *GCEGlobalNetworkEndpointGroups) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.GlobalNetworkEndpointGroups.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all NetworkEndpointGroup objects. -func (g *GCEGlobalNetworkEndpointGroups) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointGroup, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.GlobalNetworkEndpointGroups.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.NetworkEndpointGroup - f := func(l *computega.NetworkEndpointGroupList) error { - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert NetworkEndpointGroup with key of value obj. -func (g *GCEGlobalNetworkEndpointGroups) Insert(ctx context.Context, key *meta.Key, obj *computega.NetworkEndpointGroup, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.GlobalNetworkEndpointGroups.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the NetworkEndpointGroup referenced by key. -func (g *GCEGlobalNetworkEndpointGroups) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalNetworkEndpointGroups.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AttachNetworkEndpoints is a method on GCEGlobalNetworkEndpointGroups. -func (g *GCEGlobalNetworkEndpointGroups) AttachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.GlobalNetworkEndpointGroupsAttachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AttachNetworkEndpoints", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalNetworkEndpointGroups.AttachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.AttachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// DetachNetworkEndpoints is a method on GCEGlobalNetworkEndpointGroups. -func (g *GCEGlobalNetworkEndpointGroups) DetachNetworkEndpoints(ctx context.Context, key *meta.Key, arg0 *computega.GlobalNetworkEndpointGroupsDetachEndpointsRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "DetachNetworkEndpoints", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.GlobalNetworkEndpointGroups.DetachNetworkEndpoints(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.DetachNetworkEndpoints(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ListNetworkEndpoints is a method on GCEGlobalNetworkEndpointGroups. -func (g *GCEGlobalNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key *meta.Key, fl *filter.F, options ...Option) ([]*computega.NetworkEndpointWithHealthStatus, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "GlobalNetworkEndpointGroups") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListNetworkEndpoints", - Version: meta.Version("ga"), - Service: "GlobalNetworkEndpointGroups", - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.GlobalNetworkEndpointGroups.ListNetworkEndpoints(projectID, key.Name) - var all []*computega.NetworkEndpointWithHealthStatus - f := func(l *computega.NetworkEndpointGroupsListNetworkEndpoints) error { - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...): page %+v", ctx, key, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEGlobalNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, asStr, nil) - } - return all, nil -} - -// Projects is an interface that allows for mocking of Projects. -type Projects interface { - // ProjectsOps is an interface with additional non-CRUD type methods. - // This interface is expected to be implemented by hand (non-autogenerated). - ProjectsOps -} - -// NewMockProjects returns a new mock for Projects. -func NewMockProjects(pr ProjectRouter, objs map[meta.Key]*MockProjectsObj) *MockProjects { - mock := &MockProjects{ - ProjectRouter: pr, - - Objects: objs, - } - return mock -} - -// MockProjects is the mock for Projects. -type MockProjects struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockProjectsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Obj wraps the object for use in the mock. -func (m *MockProjects) Obj(o *computega.Project) *MockProjectsObj { - return &MockProjectsObj{o} -} - -// GCEProjects is a simplifying adapter for the GCE Projects. -type GCEProjects struct { - s *Service -} - -// Regions is an interface that allows for mocking of Regions. -type Regions interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Region, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Region, error) -} - -// NewMockRegions returns a new mock for Regions. -func NewMockRegions(pr ProjectRouter, objs map[meta.Key]*MockRegionsObj) *MockRegions { - mock := &MockRegions{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - } - return mock -} - -// MockRegions is the mock for Regions. -type MockRegions struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegions, options ...Option) (bool, *computega.Region, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockRegions, options ...Option) (bool, []*computega.Region, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegions) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Region, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegions.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegions %v not found", key), - } - klog.V(5).Infof("MockRegions.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockRegions) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Region, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegions.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Region - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegions.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegions) Obj(o *computega.Region) *MockRegionsObj { - return &MockRegionsObj{o} -} - -// GCERegions is a simplifying adapter for the GCE Regions. -type GCERegions struct { - s *Service -} - -// Get the Region named by key. -func (g *GCERegions) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Region, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegions.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegions.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Regions") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Regions", - } - - klog.V(5).Infof("GCERegions.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegions.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Regions.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegions.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Region objects. -func (g *GCERegions) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Region, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegions.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Regions") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Regions", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegions.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Regions.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Region - f := func(l *computega.RegionList) error { - klog.V(5).Infof("GCERegions.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegions.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegions.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// AlphaRouters is an interface that allows for mocking of Routers. -type AlphaRouters interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Router, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Router, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Router, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Router, error) - GetRouterStatus(context.Context, *meta.Key, ...Option) (*computealpha.RouterStatusResponse, error) - Patch(context.Context, *meta.Key, *computealpha.Router, ...Option) error - Preview(context.Context, *meta.Key, *computealpha.Router, ...Option) (*computealpha.RoutersPreviewResponse, error) - TestIamPermissions(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, ...Option) (*computealpha.TestPermissionsResponse, error) -} - -// NewMockAlphaRouters returns a new mock for Routers. -func NewMockAlphaRouters(pr ProjectRouter, objs map[meta.Key]*MockRoutersObj) *MockAlphaRouters { - mock := &MockAlphaRouters{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRouters is the mock for Routers. -type MockAlphaRouters struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRoutersObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRouters, options ...Option) (bool, *computealpha.Router, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRouters, options ...Option) (bool, []*computealpha.Router, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Router, m *MockAlphaRouters, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRouters, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockAlphaRouters, options ...Option) (bool, map[string][]*computealpha.Router, error) - GetRouterStatusHook func(context.Context, *meta.Key, *MockAlphaRouters, ...Option) (*computealpha.RouterStatusResponse, error) - PatchHook func(context.Context, *meta.Key, *computealpha.Router, *MockAlphaRouters, ...Option) error - PreviewHook func(context.Context, *meta.Key, *computealpha.Router, *MockAlphaRouters, ...Option) (*computealpha.RoutersPreviewResponse, error) - TestIamPermissionsHook func(context.Context, *meta.Key, *computealpha.TestPermissionsRequest, *MockAlphaRouters, ...Option) (*computealpha.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Router, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRouters.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRouters.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRouters %v not found", key), - } - klog.V(5).Infof("MockAlphaRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Router, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRouters.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRouters.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Router - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRouters.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRouters) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Router, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRouters %v exists", key), - } - klog.V(5).Infof("MockAlphaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "routers") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "routers", key) - - m.Objects[*key] = &MockRoutersObj{obj} - klog.V(5).Infof("MockAlphaRouters.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRouters %v not found", key), - } - klog.V(5).Infof("MockAlphaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRouters.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockAlphaRouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Router, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockAlphaRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computealpha.Router{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - if err != nil { - klog.V(5).Infof("MockAlphaRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToAlpha()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToAlpha()) - } - klog.V(5).Infof("MockAlphaRouters.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRouters) Obj(o *computealpha.Router) *MockRoutersObj { - return &MockRoutersObj{o} -} - -// GetRouterStatus is a mock for the corresponding method. -func (m *MockAlphaRouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.RouterStatusResponse, error) { - if m.GetRouterStatusHook != nil { - return m.GetRouterStatusHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRouterStatusHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaRouters) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Router, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Preview is a mock for the corresponding method. -func (m *MockAlphaRouters) Preview(ctx context.Context, key *meta.Key, arg0 *computealpha.Router, options ...Option) (*computealpha.RoutersPreviewResponse, error) { - if m.PreviewHook != nil { - return m.PreviewHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("PreviewHook must be set") -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockAlphaRouters) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEAlphaRouters is a simplifying adapter for the GCE Routers. -type GCEAlphaRouters struct { - s *Service -} - -// Get the Router named by key. -func (g *GCEAlphaRouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Routers", - } - - klog.V(5).Infof("GCEAlphaRouters.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Routers.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRouters.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Router objects. -func (g *GCEAlphaRouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Routers", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRouters.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.Routers.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Router - f := func(l *computealpha.RouterList) error { - klog.V(5).Infof("GCEAlphaRouters.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRouters.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRouters.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Router with key of value obj. -func (g *GCEAlphaRouters) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Routers.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRouters.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRouters.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Router referenced by key. -func (g *GCEAlphaRouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Routers.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEAlphaRouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computealpha.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("alpha"), - Service: "Routers", - } - - klog.V(5).Infof("GCEAlphaRouters.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEAlphaRouters.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Alpha.Routers.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computealpha.Router{} - f := func(l *computealpha.RouterAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEAlphaRouters.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Routers...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// GetRouterStatus is a method on GCEAlphaRouters. -func (g *GCEAlphaRouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.RouterStatusResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.GetRouterStatus(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.GetRouterStatus(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRouterStatus", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.GetRouterStatus(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.GetRouterStatus(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Routers.GetRouterStatus(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.GetRouterStatus(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEAlphaRouters. -func (g *GCEAlphaRouters) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Routers.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Preview is a method on GCEAlphaRouters. -func (g *GCEAlphaRouters) Preview(ctx context.Context, key *meta.Key, arg0 *computealpha.Router, options ...Option) (*computealpha.RoutersPreviewResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.Preview(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.Preview(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Preview", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.Preview(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.Preview(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Routers.Preview(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.Preview(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// TestIamPermissions is a method on GCEAlphaRouters. -func (g *GCEAlphaRouters) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computealpha.TestPermissionsRequest, options ...Option) (*computealpha.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRouters.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRouters.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("alpha"), - Service: "Routers", - } - klog.V(5).Infof("GCEAlphaRouters.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRouters.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Routers.TestIamPermissions(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRouters.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// BetaRouters is an interface that allows for mocking of Routers. -type BetaRouters interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Router, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Router, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Router, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Router, error) - GetRouterStatus(context.Context, *meta.Key, ...Option) (*computebeta.RouterStatusResponse, error) - Patch(context.Context, *meta.Key, *computebeta.Router, ...Option) error - Preview(context.Context, *meta.Key, *computebeta.Router, ...Option) (*computebeta.RoutersPreviewResponse, error) - TestIamPermissions(context.Context, *meta.Key, *computebeta.TestPermissionsRequest, ...Option) (*computebeta.TestPermissionsResponse, error) -} - -// NewMockBetaRouters returns a new mock for Routers. -func NewMockBetaRouters(pr ProjectRouter, objs map[meta.Key]*MockRoutersObj) *MockBetaRouters { - mock := &MockBetaRouters{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRouters is the mock for Routers. -type MockBetaRouters struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRoutersObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRouters, options ...Option) (bool, *computebeta.Router, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRouters, options ...Option) (bool, []*computebeta.Router, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Router, m *MockBetaRouters, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRouters, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockBetaRouters, options ...Option) (bool, map[string][]*computebeta.Router, error) - GetRouterStatusHook func(context.Context, *meta.Key, *MockBetaRouters, ...Option) (*computebeta.RouterStatusResponse, error) - PatchHook func(context.Context, *meta.Key, *computebeta.Router, *MockBetaRouters, ...Option) error - PreviewHook func(context.Context, *meta.Key, *computebeta.Router, *MockBetaRouters, ...Option) (*computebeta.RoutersPreviewResponse, error) - TestIamPermissionsHook func(context.Context, *meta.Key, *computebeta.TestPermissionsRequest, *MockBetaRouters, ...Option) (*computebeta.TestPermissionsResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Router, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRouters.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRouters.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRouters %v not found", key), - } - klog.V(5).Infof("MockBetaRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Router, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRouters.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRouters.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Router - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRouters.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRouters) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Router, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRouters %v exists", key), - } - klog.V(5).Infof("MockBetaRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "routers") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "routers", key) - - m.Objects[*key] = &MockRoutersObj{obj} - klog.V(5).Infof("MockBetaRouters.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRouters %v not found", key), - } - klog.V(5).Infof("MockBetaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRouters.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockBetaRouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Router, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockBetaRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computebeta.Router{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToBeta().SelfLink) - if err != nil { - klog.V(5).Infof("MockBetaRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToBeta()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToBeta()) - } - klog.V(5).Infof("MockBetaRouters.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRouters) Obj(o *computebeta.Router) *MockRoutersObj { - return &MockRoutersObj{o} -} - -// GetRouterStatus is a mock for the corresponding method. -func (m *MockBetaRouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.RouterStatusResponse, error) { - if m.GetRouterStatusHook != nil { - return m.GetRouterStatusHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRouterStatusHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaRouters) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Router, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Preview is a mock for the corresponding method. -func (m *MockBetaRouters) Preview(ctx context.Context, key *meta.Key, arg0 *computebeta.Router, options ...Option) (*computebeta.RoutersPreviewResponse, error) { - if m.PreviewHook != nil { - return m.PreviewHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("PreviewHook must be set") -} - -// TestIamPermissions is a mock for the corresponding method. -func (m *MockBetaRouters) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computebeta.TestPermissionsRequest, options ...Option) (*computebeta.TestPermissionsResponse, error) { - if m.TestIamPermissionsHook != nil { - return m.TestIamPermissionsHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("TestIamPermissionsHook must be set") -} - -// GCEBetaRouters is a simplifying adapter for the GCE Routers. -type GCEBetaRouters struct { - s *Service -} - -// Get the Router named by key. -func (g *GCEBetaRouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Routers", - } - - klog.V(5).Infof("GCEBetaRouters.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Routers.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRouters.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Router objects. -func (g *GCEBetaRouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Routers", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRouters.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.Routers.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Router - f := func(l *computebeta.RouterList) error { - klog.V(5).Infof("GCEBetaRouters.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRouters.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRouters.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Router with key of value obj. -func (g *GCEBetaRouters) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Routers.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRouters.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRouters.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Router referenced by key. -func (g *GCEBetaRouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Routers.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRouters.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCEBetaRouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computebeta.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("beta"), - Service: "Routers", - } - - klog.V(5).Infof("GCEBetaRouters.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCEBetaRouters.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.Beta.Routers.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computebeta.Router{} - f := func(l *computebeta.RouterAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCEBetaRouters.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Routers...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// GetRouterStatus is a method on GCEBetaRouters. -func (g *GCEBetaRouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.RouterStatusResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.GetRouterStatus(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.GetRouterStatus(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRouterStatus", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.GetRouterStatus(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.GetRouterStatus(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Routers.GetRouterStatus(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.GetRouterStatus(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEBetaRouters. -func (g *GCEBetaRouters) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Routers.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Preview is a method on GCEBetaRouters. -func (g *GCEBetaRouters) Preview(ctx context.Context, key *meta.Key, arg0 *computebeta.Router, options ...Option) (*computebeta.RoutersPreviewResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.Preview(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.Preview(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Preview", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.Preview(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.Preview(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Routers.Preview(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.Preview(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// TestIamPermissions is a method on GCEBetaRouters. -func (g *GCEBetaRouters) TestIamPermissions(ctx context.Context, key *meta.Key, arg0 *computebeta.TestPermissionsRequest, options ...Option) (*computebeta.TestPermissionsResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRouters.TestIamPermissions(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRouters.TestIamPermissions(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "TestIamPermissions", - Version: meta.Version("beta"), - Service: "Routers", - } - klog.V(5).Infof("GCEBetaRouters.TestIamPermissions(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRouters.TestIamPermissions(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Routers.TestIamPermissions(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRouters.TestIamPermissions(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Routers is an interface that allows for mocking of Routers. -type Routers interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Router, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Router, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Router, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Router, error) - GetRouterStatus(context.Context, *meta.Key, ...Option) (*computega.RouterStatusResponse, error) - Patch(context.Context, *meta.Key, *computega.Router, ...Option) error - Preview(context.Context, *meta.Key, *computega.Router, ...Option) (*computega.RoutersPreviewResponse, error) -} - -// NewMockRouters returns a new mock for Routers. -func NewMockRouters(pr ProjectRouter, objs map[meta.Key]*MockRoutersObj) *MockRouters { - mock := &MockRouters{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRouters is the mock for Routers. -type MockRouters struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRoutersObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - AggregatedListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRouters, options ...Option) (bool, *computega.Router, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRouters, options ...Option) (bool, []*computega.Router, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Router, m *MockRouters, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRouters, options ...Option) (bool, error) - AggregatedListHook func(ctx context.Context, fl *filter.F, m *MockRouters, options ...Option) (bool, map[string][]*computega.Router, error) - GetRouterStatusHook func(context.Context, *meta.Key, *MockRouters, ...Option) (*computega.RouterStatusResponse, error) - PatchHook func(context.Context, *meta.Key, *computega.Router, *MockRouters, ...Option) error - PreviewHook func(context.Context, *meta.Key, *computega.Router, *MockRouters, ...Option) (*computega.RoutersPreviewResponse, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Router, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRouters.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRouters.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRouters %v not found", key), - } - klog.V(5).Infof("MockRouters.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Router, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRouters.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRouters.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Router - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRouters.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRouters) Insert(ctx context.Context, key *meta.Key, obj *computega.Router, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRouters %v exists", key), - } - klog.V(5).Infof("MockRouters.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "routers") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "routers", key) - - m.Objects[*key] = &MockRoutersObj{obj} - klog.V(5).Infof("MockRouters.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRouters %v not found", key), - } - klog.V(5).Infof("MockRouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRouters.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// AggregatedList is a mock for AggregatedList. -func (m *MockRouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Router, error) { - if m.AggregatedListHook != nil { - if intercept, objs, err := m.AggregatedListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockRouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.AggregatedListError != nil { - err := *m.AggregatedListError - klog.V(5).Infof("MockRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - - objs := map[string][]*computega.Router{} - for _, obj := range m.Objects { - res, err := ParseResourceURL(obj.ToGA().SelfLink) - if err != nil { - klog.V(5).Infof("MockRouters.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) - return nil, err - } - if !fl.Match(obj.ToGA()) { - continue - } - location := aggregatedListKey(res.Key) - objs[location] = append(objs[location], obj.ToGA()) - } - klog.V(5).Infof("MockRouters.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRouters) Obj(o *computega.Router) *MockRoutersObj { - return &MockRoutersObj{o} -} - -// GetRouterStatus is a mock for the corresponding method. -func (m *MockRouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computega.RouterStatusResponse, error) { - if m.GetRouterStatusHook != nil { - return m.GetRouterStatusHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRouterStatusHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockRouters) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Router, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// Preview is a mock for the corresponding method. -func (m *MockRouters) Preview(ctx context.Context, key *meta.Key, arg0 *computega.Router, options ...Option) (*computega.RoutersPreviewResponse, error) { - if m.PreviewHook != nil { - return m.PreviewHook(ctx, key, arg0, m) - } - return nil, fmt.Errorf("PreviewHook must be set") -} - -// GCERouters is a simplifying adapter for the GCE Routers. -type GCERouters struct { - s *Service -} - -// Get the Router named by key. -func (g *GCERouters) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERouters.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Routers", - } - - klog.V(5).Infof("GCERouters.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Routers.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERouters.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Router objects. -func (g *GCERouters) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Routers", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERouters.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.Routers.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Router - f := func(l *computega.RouterList) error { - klog.V(5).Infof("GCERouters.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERouters.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERouters.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERouters.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Router with key of value obj. -func (g *GCERouters) Insert(ctx context.Context, key *meta.Key, obj *computega.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERouters.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Routers", - } - klog.V(5).Infof("GCERouters.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Routers.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERouters.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERouters.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Router referenced by key. -func (g *GCERouters) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERouters.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Routers", - } - klog.V(5).Infof("GCERouters.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Routers.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERouters.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERouters.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AggregatedList lists all resources of the given type across all locations. -func (g *GCERouters) AggregatedList(ctx context.Context, fl *filter.F, options ...Option) (map[string][]*computega.Router, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.AggregatedList(%v, %v) called", ctx, fl) - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AggregatedList", - Version: meta.Version("ga"), - Service: "Routers", - } - - klog.V(5).Infof("GCERouters.AggregatedList(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(5).Infof("GCERouters.AggregatedList(%v, %v): RateLimiter error: %v", ctx, fl, err) - return nil, err - } - - call := g.s.GA.Routers.AggregatedList(projectID) - call.Context(ctx) - if fl != filter.None { - call.Filter(fl.String()) - } - - all := map[string][]*computega.Router{} - f := func(l *computega.RouterAggregatedList) error { - for k, v := range l.Items { - klog.V(5).Infof("GCERouters.AggregatedList(%v, %v): page[%v]%+v", ctx, fl, k, v) - all[k] = append(all[k], v.Routers...) - } - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERouters.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERouters.AggregatedList(%v, %v) = %v, %v", ctx, fl, asStr, nil) - } - return all, nil -} - -// GetRouterStatus is a method on GCERouters. -func (g *GCERouters) GetRouterStatus(ctx context.Context, key *meta.Key, options ...Option) (*computega.RouterStatusResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.GetRouterStatus(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERouters.GetRouterStatus(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRouterStatus", - Version: meta.Version("ga"), - Service: "Routers", - } - klog.V(5).Infof("GCERouters.GetRouterStatus(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.GetRouterStatus(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Routers.GetRouterStatus(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERouters.GetRouterStatus(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCERouters. -func (g *GCERouters) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Router, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERouters.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "Routers", - } - klog.V(5).Infof("GCERouters.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Routers.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERouters.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Preview is a method on GCERouters. -func (g *GCERouters) Preview(ctx context.Context, key *meta.Key, arg0 *computega.Router, options ...Option) (*computega.RoutersPreviewResponse, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERouters.Preview(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERouters.Preview(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routers") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Preview", - Version: meta.Version("ga"), - Service: "Routers", - } - klog.V(5).Infof("GCERouters.Preview(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERouters.Preview(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Routers.Preview(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERouters.Preview(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Routes is an interface that allows for mocking of Routes. -type Routes interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Route, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Route, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Route, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockRoutes returns a new mock for Routes. -func NewMockRoutes(pr ProjectRouter, objs map[meta.Key]*MockRoutesObj) *MockRoutes { - mock := &MockRoutes{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRoutes is the mock for Routes. -type MockRoutes struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRoutesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRoutes, options ...Option) (bool, *computega.Route, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockRoutes, options ...Option) (bool, []*computega.Route, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Route, m *MockRoutes, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRoutes, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Route, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRoutes.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRoutes %v not found", key), - } - klog.V(5).Infof("MockRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockRoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Route, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRoutes.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Route - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRoutes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRoutes) Insert(ctx context.Context, key *meta.Key, obj *computega.Route, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRoutes %v exists", key), - } - klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "routes") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "routes", key) - - m.Objects[*key] = &MockRoutesObj{obj} - klog.V(5).Infof("MockRoutes.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRoutes %v not found", key), - } - klog.V(5).Infof("MockRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRoutes.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRoutes) Obj(o *computega.Route) *MockRoutesObj { - return &MockRoutesObj{o} -} - -// GCERoutes is a simplifying adapter for the GCE Routes. -type GCERoutes struct { - s *Service -} - -// Get the Route named by key. -func (g *GCERoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Route, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERoutes.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERoutes.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Routes", - } - - klog.V(5).Infof("GCERoutes.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERoutes.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Routes.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERoutes.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Route objects. -func (g *GCERoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Route, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERoutes.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Routes", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERoutes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Routes.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Route - f := func(l *computega.RouteList) error { - klog.V(5).Infof("GCERoutes.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERoutes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Route with key of value obj. -func (g *GCERoutes) Insert(ctx context.Context, key *meta.Key, obj *computega.Route, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERoutes.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERoutes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Routes", - } - klog.V(5).Infof("GCERoutes.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Routes.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERoutes.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERoutes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Route referenced by key. -func (g *GCERoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERoutes.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERoutes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Routes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Routes", - } - klog.V(5).Infof("GCERoutes.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERoutes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Routes.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERoutes.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BetaSecurityPolicies is an interface that allows for mocking of SecurityPolicies. -type BetaSecurityPolicies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SecurityPolicy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SecurityPolicy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.SecurityPolicy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AddRule(context.Context, *meta.Key, *computebeta.SecurityPolicyRule, ...Option) error - GetRule(context.Context, *meta.Key, ...Option) (*computebeta.SecurityPolicyRule, error) - Patch(context.Context, *meta.Key, *computebeta.SecurityPolicy, ...Option) error - PatchRule(context.Context, *meta.Key, *computebeta.SecurityPolicyRule, ...Option) error - RemoveRule(context.Context, *meta.Key, ...Option) error -} - -// NewMockBetaSecurityPolicies returns a new mock for SecurityPolicies. -func NewMockBetaSecurityPolicies(pr ProjectRouter, objs map[meta.Key]*MockSecurityPoliciesObj) *MockBetaSecurityPolicies { - mock := &MockBetaSecurityPolicies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaSecurityPolicies is the mock for SecurityPolicies. -type MockBetaSecurityPolicies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSecurityPoliciesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies, options ...Option) (bool, *computebeta.SecurityPolicy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSecurityPolicies, options ...Option) (bool, []*computebeta.SecurityPolicy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.SecurityPolicy, m *MockBetaSecurityPolicies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSecurityPolicies, options ...Option) (bool, error) - AddRuleHook func(context.Context, *meta.Key, *computebeta.SecurityPolicyRule, *MockBetaSecurityPolicies, ...Option) error - GetRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies, ...Option) (*computebeta.SecurityPolicyRule, error) - PatchHook func(context.Context, *meta.Key, *computebeta.SecurityPolicy, *MockBetaSecurityPolicies, ...Option) error - PatchRuleHook func(context.Context, *meta.Key, *computebeta.SecurityPolicyRule, *MockBetaSecurityPolicies, ...Option) error - RemoveRuleHook func(context.Context, *meta.Key, *MockBetaSecurityPolicies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SecurityPolicy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key), - } - klog.V(5).Infof("MockBetaSecurityPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaSecurityPolicies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SecurityPolicy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.SecurityPolicy - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaSecurityPolicies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SecurityPolicy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaSecurityPolicies %v exists", key), - } - klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "securityPolicies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "securityPolicies", key) - - m.Objects[*key] = &MockSecurityPoliciesObj{obj} - klog.V(5).Infof("MockBetaSecurityPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSecurityPolicies %v not found", key), - } - klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaSecurityPolicies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaSecurityPolicies) Obj(o *computebeta.SecurityPolicy) *MockSecurityPoliciesObj { - return &MockSecurityPoliciesObj{o} -} - -// AddRule is a mock for the corresponding method. -func (m *MockBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyRule, options ...Option) error { - if m.AddRuleHook != nil { - return m.AddRuleHook(ctx, key, arg0, m) - } - return nil -} - -// GetRule is a mock for the corresponding method. -func (m *MockBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SecurityPolicyRule, error) { - if m.GetRuleHook != nil { - return m.GetRuleHook(ctx, key, m) - } - return nil, fmt.Errorf("GetRuleHook must be set") -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// PatchRule is a mock for the corresponding method. -func (m *MockBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyRule, options ...Option) error { - if m.PatchRuleHook != nil { - return m.PatchRuleHook(ctx, key, arg0, m) - } - return nil -} - -// RemoveRule is a mock for the corresponding method. -func (m *MockBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - if m.RemoveRuleHook != nil { - return m.RemoveRuleHook(ctx, key, m) - } - return nil -} - -// GCEBetaSecurityPolicies is a simplifying adapter for the GCE SecurityPolicies. -type GCEBetaSecurityPolicies struct { - s *Service -} - -// Get the SecurityPolicy named by key. -func (g *GCEBetaSecurityPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SecurityPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - - klog.V(5).Infof("GCEBetaSecurityPolicies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.SecurityPolicies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaSecurityPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SecurityPolicy objects. -func (g *GCEBetaSecurityPolicies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SecurityPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.SecurityPolicies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.SecurityPolicy - f := func(l *computebeta.SecurityPolicyList) error { - klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SecurityPolicy with key of value obj. -func (g *GCEBetaSecurityPolicies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SecurityPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.SecurityPolicies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSecurityPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SecurityPolicy referenced by key. -func (g *GCEBetaSecurityPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SecurityPolicies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSecurityPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AddRule is a method on GCEBetaSecurityPolicies. -func (g *GCEBetaSecurityPolicies) AddRule(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddRule", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SecurityPolicies.AddRule(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaSecurityPolicies.AddRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// GetRule is a method on GCEBetaSecurityPolicies. -func (g *GCEBetaSecurityPolicies) GetRule(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SecurityPolicyRule, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "GetRule", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.SecurityPolicies.GetRule(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.GetRule(%v, %v, ...) = %+v, %v", ctx, key, v, err) - return v, err -} - -// Patch is a method on GCEBetaSecurityPolicies. -func (g *GCEBetaSecurityPolicies) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SecurityPolicies.Patch(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaSecurityPolicies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// PatchRule is a method on GCEBetaSecurityPolicies. -func (g *GCEBetaSecurityPolicies) PatchRule(ctx context.Context, key *meta.Key, arg0 *computebeta.SecurityPolicyRule, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "PatchRule", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SecurityPolicies.PatchRule(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaSecurityPolicies.PatchRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveRule is a method on GCEBetaSecurityPolicies. -func (g *GCEBetaSecurityPolicies) RemoveRule(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SecurityPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveRule", - Version: meta.Version("beta"), - Service: "SecurityPolicies", - } - klog.V(5).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SecurityPolicies.RemoveRule(projectID, key.Name) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaSecurityPolicies.RemoveRule(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// ServiceAttachments is an interface that allows for mocking of ServiceAttachments. -type ServiceAttachments interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ServiceAttachment, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ServiceAttachment, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.ServiceAttachment, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computega.ServiceAttachment, ...Option) error -} - -// NewMockServiceAttachments returns a new mock for ServiceAttachments. -func NewMockServiceAttachments(pr ProjectRouter, objs map[meta.Key]*MockServiceAttachmentsObj) *MockServiceAttachments { - mock := &MockServiceAttachments{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockServiceAttachments is the mock for ServiceAttachments. -type MockServiceAttachments struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockServiceAttachmentsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockServiceAttachments, options ...Option) (bool, *computega.ServiceAttachment, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockServiceAttachments, options ...Option) (bool, []*computega.ServiceAttachment, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.ServiceAttachment, m *MockServiceAttachments, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockServiceAttachments, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computega.ServiceAttachment, *MockServiceAttachments, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ServiceAttachment, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockServiceAttachments.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockServiceAttachments.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ServiceAttachment, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockServiceAttachments.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockServiceAttachments.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.ServiceAttachment - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockServiceAttachments.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computega.ServiceAttachment, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockServiceAttachments %v exists", key), - } - klog.V(5).Infof("MockServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "serviceAttachments") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "serviceAttachments", key) - - m.Objects[*key] = &MockServiceAttachmentsObj{obj} - klog.V(5).Infof("MockServiceAttachments.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockServiceAttachments.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockServiceAttachments) Obj(o *computega.ServiceAttachment) *MockServiceAttachmentsObj { - return &MockServiceAttachmentsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computega.ServiceAttachment, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCEServiceAttachments is a simplifying adapter for the GCE ServiceAttachments. -type GCEServiceAttachments struct { - s *Service -} - -// Get the ServiceAttachment named by key. -func (g *GCEServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEServiceAttachments.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEServiceAttachments.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "ServiceAttachments", - } - - klog.V(5).Infof("GCEServiceAttachments.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEServiceAttachments.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.ServiceAttachments.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEServiceAttachments.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ServiceAttachment objects. -func (g *GCEServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEServiceAttachments.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "ServiceAttachments", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEServiceAttachments.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.ServiceAttachments.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.ServiceAttachment - f := func(l *computega.ServiceAttachmentList) error { - klog.V(5).Infof("GCEServiceAttachments.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEServiceAttachments.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ServiceAttachment with key of value obj. -func (g *GCEServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computega.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEServiceAttachments.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEServiceAttachments.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEServiceAttachments.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEServiceAttachments.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.ServiceAttachments.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEServiceAttachments.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEServiceAttachments.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ServiceAttachment referenced by key. -func (g *GCEServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEServiceAttachments.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEServiceAttachments.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEServiceAttachments.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEServiceAttachments.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.ServiceAttachments.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEServiceAttachments. -func (g *GCEServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computega.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEServiceAttachments.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEServiceAttachments.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEServiceAttachments.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEServiceAttachments.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.ServiceAttachments.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaServiceAttachments is an interface that allows for mocking of ServiceAttachments. -type BetaServiceAttachments interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ServiceAttachment, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ServiceAttachment, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.ServiceAttachment, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computebeta.ServiceAttachment, ...Option) error -} - -// NewMockBetaServiceAttachments returns a new mock for ServiceAttachments. -func NewMockBetaServiceAttachments(pr ProjectRouter, objs map[meta.Key]*MockServiceAttachmentsObj) *MockBetaServiceAttachments { - mock := &MockBetaServiceAttachments{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaServiceAttachments is the mock for ServiceAttachments. -type MockBetaServiceAttachments struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockServiceAttachmentsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaServiceAttachments, options ...Option) (bool, *computebeta.ServiceAttachment, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaServiceAttachments, options ...Option) (bool, []*computebeta.ServiceAttachment, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.ServiceAttachment, m *MockBetaServiceAttachments, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaServiceAttachments, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computebeta.ServiceAttachment, *MockBetaServiceAttachments, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ServiceAttachment, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaServiceAttachments.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaServiceAttachments.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockBetaServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ServiceAttachment, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaServiceAttachments.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaServiceAttachments.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.ServiceAttachment - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaServiceAttachments.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ServiceAttachment, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaServiceAttachments %v exists", key), - } - klog.V(5).Infof("MockBetaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "serviceAttachments") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "serviceAttachments", key) - - m.Objects[*key] = &MockServiceAttachmentsObj{obj} - klog.V(5).Infof("MockBetaServiceAttachments.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockBetaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaServiceAttachments.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaServiceAttachments) Obj(o *computebeta.ServiceAttachment) *MockServiceAttachmentsObj { - return &MockServiceAttachmentsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.ServiceAttachment, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaServiceAttachments is a simplifying adapter for the GCE ServiceAttachments. -type GCEBetaServiceAttachments struct { - s *Service -} - -// Get the ServiceAttachment named by key. -func (g *GCEBetaServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaServiceAttachments.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaServiceAttachments.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "ServiceAttachments", - } - - klog.V(5).Infof("GCEBetaServiceAttachments.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.ServiceAttachments.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaServiceAttachments.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ServiceAttachment objects. -func (g *GCEBetaServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaServiceAttachments.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "ServiceAttachments", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaServiceAttachments.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.ServiceAttachments.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.ServiceAttachment - f := func(l *computebeta.ServiceAttachmentList) error { - klog.V(5).Infof("GCEBetaServiceAttachments.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaServiceAttachments.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ServiceAttachment with key of value obj. -func (g *GCEBetaServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computebeta.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaServiceAttachments.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaServiceAttachments.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEBetaServiceAttachments.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.ServiceAttachments.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaServiceAttachments.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ServiceAttachment referenced by key. -func (g *GCEBetaServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaServiceAttachments.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaServiceAttachments.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEBetaServiceAttachments.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.ServiceAttachments.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEBetaServiceAttachments. -func (g *GCEBetaServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaServiceAttachments.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaServiceAttachments.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEBetaServiceAttachments.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaServiceAttachments.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.ServiceAttachments.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaServiceAttachments is an interface that allows for mocking of ServiceAttachments. -type AlphaServiceAttachments interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ServiceAttachment, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ServiceAttachment, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.ServiceAttachment, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computealpha.ServiceAttachment, ...Option) error -} - -// NewMockAlphaServiceAttachments returns a new mock for ServiceAttachments. -func NewMockAlphaServiceAttachments(pr ProjectRouter, objs map[meta.Key]*MockServiceAttachmentsObj) *MockAlphaServiceAttachments { - mock := &MockAlphaServiceAttachments{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaServiceAttachments is the mock for ServiceAttachments. -type MockAlphaServiceAttachments struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockServiceAttachmentsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaServiceAttachments, options ...Option) (bool, *computealpha.ServiceAttachment, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaServiceAttachments, options ...Option) (bool, []*computealpha.ServiceAttachment, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.ServiceAttachment, m *MockAlphaServiceAttachments, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaServiceAttachments, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computealpha.ServiceAttachment, *MockAlphaServiceAttachments, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ServiceAttachment, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaServiceAttachments.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaServiceAttachments.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockAlphaServiceAttachments.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ServiceAttachment, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaServiceAttachments.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaServiceAttachments.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.ServiceAttachment - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaServiceAttachments.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ServiceAttachment, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaServiceAttachments %v exists", key), - } - klog.V(5).Infof("MockAlphaServiceAttachments.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "serviceAttachments") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "serviceAttachments", key) - - m.Objects[*key] = &MockServiceAttachmentsObj{obj} - klog.V(5).Infof("MockAlphaServiceAttachments.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaServiceAttachments %v not found", key), - } - klog.V(5).Infof("MockAlphaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaServiceAttachments.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaServiceAttachments) Obj(o *computealpha.ServiceAttachment) *MockServiceAttachmentsObj { - return &MockServiceAttachmentsObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.ServiceAttachment, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaServiceAttachments is a simplifying adapter for the GCE ServiceAttachments. -type GCEAlphaServiceAttachments struct { - s *Service -} - -// Get the ServiceAttachment named by key. -func (g *GCEAlphaServiceAttachments) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaServiceAttachments.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaServiceAttachments.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "ServiceAttachments", - } - - klog.V(5).Infof("GCEAlphaServiceAttachments.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.ServiceAttachments.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaServiceAttachments.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all ServiceAttachment objects. -func (g *GCEAlphaServiceAttachments) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.ServiceAttachment, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaServiceAttachments.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "ServiceAttachments", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaServiceAttachments.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.ServiceAttachments.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.ServiceAttachment - f := func(l *computealpha.ServiceAttachmentList) error { - klog.V(5).Infof("GCEAlphaServiceAttachments.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaServiceAttachments.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaServiceAttachments.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert ServiceAttachment with key of value obj. -func (g *GCEAlphaServiceAttachments) Insert(ctx context.Context, key *meta.Key, obj *computealpha.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ServiceAttachments") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.ServiceAttachments.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaServiceAttachments.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the ServiceAttachment referenced by key. -func (g *GCEAlphaServiceAttachments) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaServiceAttachments.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaServiceAttachments.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEAlphaServiceAttachments.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.ServiceAttachments.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaServiceAttachments.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEAlphaServiceAttachments. -func (g *GCEAlphaServiceAttachments) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.ServiceAttachment, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "ServiceAttachments") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "ServiceAttachments", - } - klog.V(5).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.ServiceAttachments.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaServiceAttachments.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SslCertificates is an interface that allows for mocking of SslCertificates. -type SslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockSslCertificates returns a new mock for SslCertificates. -func NewMockSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockSslCertificates { - mock := &MockSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockSslCertificates is the mock for SslCertificates. -type MockSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates, options ...Option) (bool, *computega.SslCertificate, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockSslCertificates, options ...Option) (bool, []*computega.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, m *MockSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSslCertificates %v not found", key), - } - klog.V(5).Infof("MockSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockSslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.SslCertificate - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockSslCertificates %v exists", key), - } - klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockSslCertificatesObj{obj} - klog.V(5).Infof("MockSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSslCertificates %v not found", key), - } - klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockSslCertificates) Obj(o *computega.SslCertificate) *MockSslCertificatesObj { - return &MockSslCertificatesObj{o} -} - -// GCESslCertificates is a simplifying adapter for the GCE SslCertificates. -type GCESslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCESslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCESslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "SslCertificates", - } - - klog.V(5).Infof("GCESslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.SslCertificates.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCESslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslCertificates.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "SslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCESslCertificates.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.SslCertificates.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.SslCertificate - f := func(l *computega.SslCertificateList) error { - klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCESslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCESslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCESslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCESslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.SslCertificates.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCESslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCESslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCESslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.SslCertificates.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BetaSslCertificates is an interface that allows for mocking of SslCertificates. -type BetaSslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockBetaSslCertificates returns a new mock for SslCertificates. -func NewMockBetaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockBetaSslCertificates { - mock := &MockBetaSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaSslCertificates is the mock for SslCertificates. -type MockBetaSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates, options ...Option) (bool, *computebeta.SslCertificate, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaSslCertificates, options ...Option) (bool, []*computebeta.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, m *MockBetaSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key), - } - klog.V(5).Infof("MockBetaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaSslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.SslCertificate - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaSslCertificates %v exists", key), - } - klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockSslCertificatesObj{obj} - klog.V(5).Infof("MockBetaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSslCertificates %v not found", key), - } - klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaSslCertificates) Obj(o *computebeta.SslCertificate) *MockSslCertificatesObj { - return &MockSslCertificatesObj{o} -} - -// GCEBetaSslCertificates is a simplifying adapter for the GCE SslCertificates. -type GCEBetaSslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCEBetaSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "SslCertificates", - } - - klog.V(5).Infof("GCEBetaSslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.SslCertificates.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCEBetaSslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "SslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaSslCertificates.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.SslCertificates.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.SslCertificate - f := func(l *computebeta.SslCertificateList) error { - klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCEBetaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.SslCertificates.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCEBetaSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "SslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCEBetaSslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.SslCertificates.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AlphaSslCertificates is an interface that allows for mocking of SslCertificates. -type AlphaSslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockAlphaSslCertificates returns a new mock for SslCertificates. -func NewMockAlphaSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockSslCertificatesObj) *MockAlphaSslCertificates { - mock := &MockAlphaSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaSslCertificates is the mock for SslCertificates. -type MockAlphaSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates, options ...Option) (bool, *computealpha.SslCertificate, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaSslCertificates, options ...Option) (bool, []*computealpha.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, m *MockAlphaSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key), - } - klog.V(5).Infof("MockAlphaSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaSslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.SslCertificate - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaSslCertificates.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaSslCertificates %v exists", key), - } - klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockSslCertificatesObj{obj} - klog.V(5).Infof("MockAlphaSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaSslCertificates %v not found", key), - } - klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaSslCertificates) Obj(o *computealpha.SslCertificate) *MockSslCertificatesObj { - return &MockSslCertificatesObj{o} -} - -// GCEAlphaSslCertificates is a simplifying adapter for the GCE SslCertificates. -type GCEAlphaSslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCEAlphaSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "SslCertificates", - } - - klog.V(5).Infof("GCEAlphaSslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.SslCertificates.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCEAlphaSslCertificates) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "SslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.SslCertificates.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.SslCertificate - f := func(l *computealpha.SslCertificateList) error { - klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCEAlphaSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "SslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.SslCertificates.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCEAlphaSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "SslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "SslCertificates", - } - klog.V(5).Infof("GCEAlphaSslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.SslCertificates.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AlphaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates. -type AlphaRegionSslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockAlphaRegionSslCertificates returns a new mock for RegionSslCertificates. -func NewMockAlphaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockAlphaRegionSslCertificates { - mock := &MockAlphaRegionSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionSslCertificates is the mock for RegionSslCertificates. -type MockAlphaRegionSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates, options ...Option) (bool, *computealpha.SslCertificate, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionSslCertificates, options ...Option) (bool, []*computealpha.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, m *MockAlphaRegionSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.SslCertificate - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockRegionSslCertificatesObj{obj} - klog.V(5).Infof("MockAlphaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionSslCertificates) Obj(o *computealpha.SslCertificate) *MockRegionSslCertificatesObj { - return &MockRegionSslCertificatesObj{o} -} - -// GCEAlphaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates. -type GCEAlphaRegionSslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCEAlphaRegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionSslCertificates", - } - - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionSslCertificates.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCEAlphaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionSslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionSslCertificates.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.SslCertificate - f := func(l *computealpha.SslCertificateList) error { - klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCEAlphaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computealpha.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionSslCertificates.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCEAlphaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionSslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionSslCertificates.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// BetaRegionSslCertificates is an interface that allows for mocking of RegionSslCertificates. -type BetaRegionSslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockBetaRegionSslCertificates returns a new mock for RegionSslCertificates. -func NewMockBetaRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockBetaRegionSslCertificates { - mock := &MockBetaRegionSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionSslCertificates is the mock for RegionSslCertificates. -type MockBetaRegionSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates, options ...Option) (bool, *computebeta.SslCertificate, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionSslCertificates, options ...Option) (bool, []*computebeta.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, m *MockBetaRegionSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockBetaRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.SslCertificate - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionSslCertificates %v exists", key), - } - klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockRegionSslCertificatesObj{obj} - klog.V(5).Infof("MockBetaRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionSslCertificates) Obj(o *computebeta.SslCertificate) *MockRegionSslCertificatesObj { - return &MockRegionSslCertificatesObj{o} -} - -// GCEBetaRegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates. -type GCEBetaRegionSslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCEBetaRegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionSslCertificates", - } - - klog.V(5).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionSslCertificates.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCEBetaRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionSslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionSslCertificates.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.SslCertificate - f := func(l *computebeta.SslCertificateList) error { - klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCEBetaRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computebeta.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionSslCertificates.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCEBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionSslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionSslCertificates.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// RegionSslCertificates is an interface that allows for mocking of RegionSslCertificates. -type RegionSslCertificates interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockRegionSslCertificates returns a new mock for RegionSslCertificates. -func NewMockRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockRegionSslCertificates { - mock := &MockRegionSslCertificates{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionSslCertificates is the mock for RegionSslCertificates. -type MockRegionSslCertificates struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionSslCertificatesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates, options ...Option) (bool, *computega.SslCertificate, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionSslCertificates, options ...Option) (bool, []*computega.SslCertificate, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, m *MockRegionSslCertificates, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.SslCertificate - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionSslCertificates %v exists", key), - } - klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "sslCertificates") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "sslCertificates", key) - - m.Objects[*key] = &MockRegionSslCertificatesObj{obj} - klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key), - } - klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionSslCertificates) Obj(o *computega.SslCertificate) *MockRegionSslCertificatesObj { - return &MockRegionSslCertificatesObj{o} -} - -// GCERegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates. -type GCERegionSslCertificates struct { - s *Service -} - -// Get the SslCertificate named by key. -func (g *GCERegionSslCertificates) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionSslCertificates", - } - - klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionSslCertificates.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all SslCertificate objects. -func (g *GCERegionSslCertificates) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.SslCertificate, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionSslCertificates", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionSslCertificates.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.SslCertificate - f := func(l *computega.SslCertificateList) error { - klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert SslCertificate with key of value obj. -func (g *GCERegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *computega.SslCertificate, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslCertificates") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionSslCertificates.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslCertificate referenced by key. -func (g *GCERegionSslCertificates) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslCertificates") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionSslCertificates", - } - klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionSslCertificates.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SslPolicies is an interface that allows for mocking of SslPolicies. -type SslPolicies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockSslPolicies returns a new mock for SslPolicies. -func NewMockSslPolicies(pr ProjectRouter, objs map[meta.Key]*MockSslPoliciesObj) *MockSslPolicies { - mock := &MockSslPolicies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockSslPolicies is the mock for SslPolicies. -type MockSslPolicies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSslPoliciesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies, options ...Option) (bool, *computega.SslPolicy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, m *MockSslPolicies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockSslPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSslPolicies %v not found", key), - } - klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockSslPolicies) Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockSslPolicies %v exists", key), - } - klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "sslPolicies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "sslPolicies", key) - - m.Objects[*key] = &MockSslPoliciesObj{obj} - klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockSslPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSslPolicies %v not found", key), - } - klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockSslPolicies) Obj(o *computega.SslPolicy) *MockSslPoliciesObj { - return &MockSslPoliciesObj{o} -} - -// GCESslPolicies is a simplifying adapter for the GCE SslPolicies. -type GCESslPolicies struct { - s *Service -} - -// Get the SslPolicy named by key. -func (g *GCESslPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslPolicies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCESslPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "SslPolicies", - } - - klog.V(5).Infof("GCESslPolicies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.SslPolicies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCESslPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// Insert SslPolicy with key of value obj. -func (g *GCESslPolicies) Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCESslPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "SslPolicies", - } - klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.SslPolicies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslPolicy referenced by key. -func (g *GCESslPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESslPolicies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCESslPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "SslPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "SslPolicies", - } - klog.V(5).Infof("GCESslPolicies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESslPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.SslPolicies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// RegionSslPolicies is an interface that allows for mocking of RegionSslPolicies. -type RegionSslPolicies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error -} - -// NewMockRegionSslPolicies returns a new mock for RegionSslPolicies. -func NewMockRegionSslPolicies(pr ProjectRouter, objs map[meta.Key]*MockRegionSslPoliciesObj) *MockRegionSslPolicies { - mock := &MockRegionSslPolicies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionSslPolicies is the mock for RegionSslPolicies. -type MockRegionSslPolicies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionSslPoliciesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionSslPolicies, options ...Option) (bool, *computega.SslPolicy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, m *MockRegionSslPolicies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionSslPolicies, options ...Option) (bool, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionSslPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionSslPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionSslPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionSslPolicies %v not found", key), - } - klog.V(5).Infof("MockRegionSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionSslPolicies) Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionSslPolicies %v exists", key), - } - klog.V(5).Infof("MockRegionSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "sslPolicies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "sslPolicies", key) - - m.Objects[*key] = &MockRegionSslPoliciesObj{obj} - klog.V(5).Infof("MockRegionSslPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionSslPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionSslPolicies %v not found", key), - } - klog.V(5).Infof("MockRegionSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionSslPolicies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionSslPolicies) Obj(o *computega.SslPolicy) *MockRegionSslPoliciesObj { - return &MockRegionSslPoliciesObj{o} -} - -// GCERegionSslPolicies is a simplifying adapter for the GCE RegionSslPolicies. -type GCERegionSslPolicies struct { - s *Service -} - -// Get the SslPolicy named by key. -func (g *GCERegionSslPolicies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.SslPolicy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslPolicies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionSslPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionSslPolicies", - } - - klog.V(5).Infof("GCERegionSslPolicies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionSslPolicies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionSslPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// Insert SslPolicy with key of value obj. -func (g *GCERegionSslPolicies) Insert(ctx context.Context, key *meta.Key, obj *computega.SslPolicy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslPolicies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionSslPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslPolicies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionSslPolicies", - } - klog.V(5).Infof("GCERegionSslPolicies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionSslPolicies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionSslPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionSslPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the SslPolicy referenced by key. -func (g *GCERegionSslPolicies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionSslPolicies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionSslPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionSslPolicies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionSslPolicies", - } - klog.V(5).Infof("GCERegionSslPolicies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionSslPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionSslPolicies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionSslPolicies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AlphaSubnetworks is an interface that allows for mocking of Subnetworks. -type AlphaSubnetworks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Subnetwork, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Subnetwork, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.Subnetwork, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UsableSubnetwork, error) - Patch(context.Context, *meta.Key, *computealpha.Subnetwork, ...Option) error -} - -// NewMockAlphaSubnetworks returns a new mock for Subnetworks. -func NewMockAlphaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockAlphaSubnetworks { - mock := &MockAlphaSubnetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaSubnetworks is the mock for Subnetworks. -type MockAlphaSubnetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSubnetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - ListUsableError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks, options ...Option) (bool, *computealpha.Subnetwork, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaSubnetworks, options ...Option) (bool, []*computealpha.Subnetwork, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.Subnetwork, m *MockAlphaSubnetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaSubnetworks, options ...Option) (bool, error) - ListUsableHook func(ctx context.Context, fl *filter.F, m *MockAlphaSubnetworks, options ...Option) (bool, []*computealpha.UsableSubnetwork, error) - PatchHook func(context.Context, *meta.Key, *computealpha.Subnetwork, *MockAlphaSubnetworks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaSubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Subnetwork, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key), - } - klog.V(5).Infof("MockAlphaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Subnetwork, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.Subnetwork - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Subnetwork, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaSubnetworks %v exists", key), - } - klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "subnetworks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "subnetworks", key) - - m.Objects[*key] = &MockSubnetworksObj{obj} - klog.V(5).Infof("MockAlphaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaSubnetworks %v not found", key), - } - klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaSubnetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// List all of the objects in the mock. -func (m *MockAlphaSubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UsableSubnetwork, error) { - if m.ListUsableHook != nil { - if intercept, objs, err := m.ListUsableHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaSubnetworks.ListUsable(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaSubnetworks.ListUsable(%v, %v) = nil, %v", ctx, fl, err) - return nil, *m.ListError - } - - var objs []*computealpha.UsableSubnetwork - - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - alphaObj := obj.ToAlpha() - dest := &computealpha.UsableSubnetwork{} - // Convert to Usable type to avoid separate Usable struct - if err := copyViaJSON(dest, alphaObj); err != nil { - klog.Errorf("Could not convert %T to *computealpha.UsableSubnetwork via JSON: %v", alphaObj, err) - } - objs = append(objs, dest) - } - klog.V(5).Infof("MockAlphaSubnetworks.ListUsable(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaSubnetworks) Obj(o *computealpha.Subnetwork) *MockSubnetworksObj { - return &MockSubnetworksObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaSubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Subnetwork, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaSubnetworks is a simplifying adapter for the GCE Subnetworks. -type GCEAlphaSubnetworks struct { - s *Service -} - -// Get the Subnetwork named by key. -func (g *GCEAlphaSubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - - klog.V(5).Infof("GCEAlphaSubnetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.Subnetworks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Subnetwork objects. -func (g *GCEAlphaSubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.Subnetworks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.Subnetwork - f := func(l *computealpha.SubnetworkList) error { - klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Subnetwork with key of value obj. -func (g *GCEAlphaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computealpha.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.Subnetworks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Subnetwork referenced by key. -func (g *GCEAlphaSubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEAlphaSubnetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Subnetworks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// List all Usable Subnetwork objects. -func (g *GCEAlphaSubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UsableSubnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.ListUsable(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListUsable", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - - klog.V(5).Infof("GCEAlphaSubnetworks.ListUsable(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.Subnetworks.ListUsable(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - var all []*computealpha.UsableSubnetwork - f := func(l *computealpha.UsableSubnetworksAggregatedList) error { - klog.V(5).Infof("GCEAlphaSubnetworks.ListUsable(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaSubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaSubnetworks.ListUsable(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaSubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Patch is a method on GCEAlphaSubnetworks. -func (g *GCEAlphaSubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaSubnetworks.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaSubnetworks.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEAlphaSubnetworks.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaSubnetworks.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.Subnetworks.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaSubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaSubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaSubnetworks is an interface that allows for mocking of Subnetworks. -type BetaSubnetworks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Subnetwork, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Subnetwork, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.Subnetwork, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UsableSubnetwork, error) - Patch(context.Context, *meta.Key, *computebeta.Subnetwork, ...Option) error -} - -// NewMockBetaSubnetworks returns a new mock for Subnetworks. -func NewMockBetaSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockBetaSubnetworks { - mock := &MockBetaSubnetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaSubnetworks is the mock for Subnetworks. -type MockBetaSubnetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSubnetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - ListUsableError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks, options ...Option) (bool, *computebeta.Subnetwork, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaSubnetworks, options ...Option) (bool, []*computebeta.Subnetwork, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.Subnetwork, m *MockBetaSubnetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaSubnetworks, options ...Option) (bool, error) - ListUsableHook func(ctx context.Context, fl *filter.F, m *MockBetaSubnetworks, options ...Option) (bool, []*computebeta.UsableSubnetwork, error) - PatchHook func(context.Context, *meta.Key, *computebeta.Subnetwork, *MockBetaSubnetworks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaSubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Subnetwork, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key), - } - klog.V(5).Infof("MockBetaSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Subnetwork, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.Subnetwork - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Subnetwork, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaSubnetworks %v exists", key), - } - klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "subnetworks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "subnetworks", key) - - m.Objects[*key] = &MockSubnetworksObj{obj} - klog.V(5).Infof("MockBetaSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaSubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaSubnetworks %v not found", key), - } - klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaSubnetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// List all of the objects in the mock. -func (m *MockBetaSubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UsableSubnetwork, error) { - if m.ListUsableHook != nil { - if intercept, objs, err := m.ListUsableHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaSubnetworks.ListUsable(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaSubnetworks.ListUsable(%v, %v) = nil, %v", ctx, fl, err) - return nil, *m.ListError - } - - var objs []*computebeta.UsableSubnetwork - - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - betaObj := obj.ToBeta() - dest := &computebeta.UsableSubnetwork{} - // Convert to Usable type to avoid separate Usable struct - if err := copyViaJSON(dest, betaObj); err != nil { - klog.Errorf("Could not convert %T to *computebeta.UsableSubnetwork via JSON: %v", betaObj, err) - } - objs = append(objs, dest) - } - klog.V(5).Infof("MockBetaSubnetworks.ListUsable(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaSubnetworks) Obj(o *computebeta.Subnetwork) *MockSubnetworksObj { - return &MockSubnetworksObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaSubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Subnetwork, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaSubnetworks is a simplifying adapter for the GCE Subnetworks. -type GCEBetaSubnetworks struct { - s *Service -} - -// Get the Subnetwork named by key. -func (g *GCEBetaSubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - - klog.V(5).Infof("GCEBetaSubnetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.Subnetworks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaSubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Subnetwork objects. -func (g *GCEBetaSubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaSubnetworks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.Subnetworks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.Subnetwork - f := func(l *computebeta.SubnetworkList) error { - klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Subnetwork with key of value obj. -func (g *GCEBetaSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computebeta.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.Subnetworks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Subnetwork referenced by key. -func (g *GCEBetaSubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaSubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEBetaSubnetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Subnetworks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// List all Usable Subnetwork objects. -func (g *GCEBetaSubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UsableSubnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.ListUsable(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListUsable", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - - klog.V(5).Infof("GCEBetaSubnetworks.ListUsable(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.Subnetworks.ListUsable(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - var all []*computebeta.UsableSubnetwork - f := func(l *computebeta.UsableSubnetworksAggregatedList) error { - klog.V(5).Infof("GCEBetaSubnetworks.ListUsable(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaSubnetworks.ListUsable(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaSubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Patch is a method on GCEBetaSubnetworks. -func (g *GCEBetaSubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaSubnetworks.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaSubnetworks.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCEBetaSubnetworks.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaSubnetworks.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.Subnetworks.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaSubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaSubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Subnetworks is an interface that allows for mocking of Subnetworks. -type Subnetworks interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Subnetwork, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Subnetwork, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.Subnetwork, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UsableSubnetwork, error) - Patch(context.Context, *meta.Key, *computega.Subnetwork, ...Option) error -} - -// NewMockSubnetworks returns a new mock for Subnetworks. -func NewMockSubnetworks(pr ProjectRouter, objs map[meta.Key]*MockSubnetworksObj) *MockSubnetworks { - mock := &MockSubnetworks{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockSubnetworks is the mock for Subnetworks. -type MockSubnetworks struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockSubnetworksObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - ListUsableError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks, options ...Option) (bool, *computega.Subnetwork, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockSubnetworks, options ...Option) (bool, []*computega.Subnetwork, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.Subnetwork, m *MockSubnetworks, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockSubnetworks, options ...Option) (bool, error) - ListUsableHook func(ctx context.Context, fl *filter.F, m *MockSubnetworks, options ...Option) (bool, []*computega.UsableSubnetwork, error) - PatchHook func(context.Context, *meta.Key, *computega.Subnetwork, *MockSubnetworks, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockSubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Subnetwork, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSubnetworks %v not found", key), - } - klog.V(5).Infof("MockSubnetworks.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockSubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Subnetwork, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Subnetwork - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockSubnetworks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockSubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computega.Subnetwork, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockSubnetworks %v exists", key), - } - klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "subnetworks") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "subnetworks", key) - - m.Objects[*key] = &MockSubnetworksObj{obj} - klog.V(5).Infof("MockSubnetworks.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockSubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockSubnetworks %v not found", key), - } - klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockSubnetworks.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// List all of the objects in the mock. -func (m *MockSubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UsableSubnetwork, error) { - if m.ListUsableHook != nil { - if intercept, objs, err := m.ListUsableHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockSubnetworks.ListUsable(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockSubnetworks.ListUsable(%v, %v) = nil, %v", ctx, fl, err) - return nil, *m.ListError - } - - var objs []*computega.UsableSubnetwork - - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - gaObj := obj.ToGA() - dest := &computega.UsableSubnetwork{} - // Convert to Usable type to avoid separate Usable struct - if err := copyViaJSON(dest, gaObj); err != nil { - klog.Errorf("Could not convert %T to *computega.UsableSubnetwork via JSON: %v", gaObj, err) - } - objs = append(objs, dest) - } - klog.V(5).Infof("MockSubnetworks.ListUsable(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockSubnetworks) Obj(o *computega.Subnetwork) *MockSubnetworksObj { - return &MockSubnetworksObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockSubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Subnetwork, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// GCESubnetworks is a simplifying adapter for the GCE Subnetworks. -type GCESubnetworks struct { - s *Service -} - -// Get the Subnetwork named by key. -func (g *GCESubnetworks) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCESubnetworks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - - klog.V(5).Infof("GCESubnetworks.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESubnetworks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Subnetworks.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCESubnetworks.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Subnetwork objects. -func (g *GCESubnetworks) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.Subnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCESubnetworks.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.Subnetworks.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Subnetwork - f := func(l *computega.SubnetworkList) error { - klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCESubnetworks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Subnetwork with key of value obj. -func (g *GCESubnetworks) Insert(ctx context.Context, key *meta.Key, obj *computega.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCESubnetworks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCESubnetworks.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.Subnetworks.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESubnetworks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Subnetwork referenced by key. -func (g *GCESubnetworks) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCESubnetworks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCESubnetworks.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESubnetworks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Subnetworks.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCESubnetworks.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// List all Usable Subnetwork objects. -func (g *GCESubnetworks) ListUsable(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UsableSubnetwork, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.ListUsable(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "ListUsable", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - - klog.V(5).Infof("GCESubnetworks.ListUsable(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Subnetworks.ListUsable(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - var all []*computega.UsableSubnetwork - f := func(l *computega.UsableSubnetworksAggregatedList) error { - klog.V(5).Infof("GCESubnetworks.ListUsable(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCESubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCESubnetworks.ListUsable(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCESubnetworks.ListUsable(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Patch is a method on GCESubnetworks. -func (g *GCESubnetworks) Patch(ctx context.Context, key *meta.Key, arg0 *computega.Subnetwork, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCESubnetworks.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCESubnetworks.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Subnetworks") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "Subnetworks", - } - klog.V(5).Infof("GCESubnetworks.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCESubnetworks.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.Subnetworks.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCESubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCESubnetworks.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies. -type AlphaTargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computealpha.UrlMapReference, ...Option) error -} - -// NewMockAlphaTargetHttpProxies returns a new mock for TargetHttpProxies. -func NewMockAlphaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockAlphaTargetHttpProxies { - mock := &MockAlphaTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaTargetHttpProxies is the mock for TargetHttpProxies. -type MockAlphaTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies, options ...Option) (bool, *computealpha.TargetHttpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpProxies, options ...Option) (bool, []*computealpha.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, m *MockAlphaTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computealpha.UrlMapReference, *MockAlphaTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.TargetHttpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockAlphaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaTargetHttpProxies) Obj(o *computealpha.TargetHttpProxy) *MockTargetHttpProxiesObj { - return &MockTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies. -type GCEAlphaTargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCEAlphaTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "TargetHttpProxies", - } - - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.TargetHttpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCEAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "TargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.TargetHttpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.TargetHttpProxy - f := func(l *computealpha.TargetHttpProxyList) error { - klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCEAlphaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.TargetHttpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCEAlphaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEAlphaTargetHttpProxies. -func (g *GCEAlphaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("alpha"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaTargetHttpProxies is an interface that allows for mocking of TargetHttpProxies. -type BetaTargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computebeta.UrlMapReference, ...Option) error -} - -// NewMockBetaTargetHttpProxies returns a new mock for TargetHttpProxies. -func NewMockBetaTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockBetaTargetHttpProxies { - mock := &MockBetaTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaTargetHttpProxies is the mock for TargetHttpProxies. -type MockBetaTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies, options ...Option) (bool, *computebeta.TargetHttpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpProxies, options ...Option) (bool, []*computebeta.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, m *MockBetaTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computebeta.UrlMapReference, *MockBetaTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.TargetHttpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockBetaTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaTargetHttpProxies) Obj(o *computebeta.TargetHttpProxy) *MockTargetHttpProxiesObj { - return &MockTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaTargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies. -type GCEBetaTargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCEBetaTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "TargetHttpProxies", - } - - klog.V(5).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.TargetHttpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCEBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "TargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.TargetHttpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.TargetHttpProxy - f := func(l *computebeta.TargetHttpProxyList) error { - klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCEBetaTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.TargetHttpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCEBetaTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEBetaTargetHttpProxies. -func (g *GCEBetaTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("beta"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TargetHttpProxies is an interface that allows for mocking of TargetHttpProxies. -type TargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computega.UrlMapReference, ...Option) error -} - -// NewMockTargetHttpProxies returns a new mock for TargetHttpProxies. -func NewMockTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpProxiesObj) *MockTargetHttpProxies { - mock := &MockTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockTargetHttpProxies is the mock for TargetHttpProxies. -type MockTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies, options ...Option) (bool, *computega.TargetHttpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpProxies, options ...Option) (bool, []*computega.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, m *MockTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computega.UrlMapReference, *MockTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockTargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetHttpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockTargetHttpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockTargetHttpProxies) Obj(o *computega.TargetHttpProxy) *MockTargetHttpProxiesObj { - return &MockTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCETargetHttpProxies is a simplifying adapter for the GCE TargetHttpProxies. -type GCETargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCETargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "TargetHttpProxies", - } - - klog.V(5).Infof("GCETargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.TargetHttpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCETargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "TargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCETargetHttpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.TargetHttpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetHttpProxy - f := func(l *computega.TargetHttpProxyList) error { - klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCETargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCETargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.TargetHttpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCETargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCETargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCETargetHttpProxies. -func (g *GCETargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("ga"), - Service: "TargetHttpProxies", - } - klog.V(5).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies. -type AlphaRegionTargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computealpha.UrlMapReference, ...Option) error -} - -// NewMockAlphaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies. -func NewMockAlphaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockAlphaRegionTargetHttpProxies { - mock := &MockAlphaRegionTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies. -type MockAlphaRegionTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies, options ...Option) (bool, *computealpha.TargetHttpProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpProxies, options ...Option) (bool, []*computealpha.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, m *MockAlphaRegionTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computealpha.UrlMapReference, *MockAlphaRegionTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.TargetHttpProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionTargetHttpProxies) Obj(o *computealpha.TargetHttpProxy) *MockRegionTargetHttpProxiesObj { - return &MockRegionTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies. -type GCEAlphaRegionTargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCEAlphaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpProxies", - } - - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCEAlphaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionTargetHttpProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.TargetHttpProxy - f := func(l *computealpha.TargetHttpProxyList) error { - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCEAlphaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionTargetHttpProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCEAlphaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEAlphaRegionTargetHttpProxies. -func (g *GCEAlphaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaRegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies. -type BetaRegionTargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computebeta.UrlMapReference, ...Option) error -} - -// NewMockBetaRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies. -func NewMockBetaRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockBetaRegionTargetHttpProxies { - mock := &MockBetaRegionTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionTargetHttpProxies is the mock for RegionTargetHttpProxies. -type MockBetaRegionTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies, options ...Option) (bool, *computebeta.TargetHttpProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpProxies, options ...Option) (bool, []*computebeta.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, m *MockBetaRegionTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computebeta.UrlMapReference, *MockBetaRegionTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.TargetHttpProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionTargetHttpProxies) Obj(o *computebeta.TargetHttpProxy) *MockRegionTargetHttpProxiesObj { - return &MockRegionTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaRegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies. -type GCEBetaRegionTargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCEBetaRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionTargetHttpProxies", - } - - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCEBetaRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionTargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionTargetHttpProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.TargetHttpProxy - f := func(l *computebeta.TargetHttpProxyList) error { - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCEBetaRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionTargetHttpProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCEBetaRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEBetaRegionTargetHttpProxies. -func (g *GCEBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("beta"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies. -type RegionTargetHttpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetUrlMap(context.Context, *meta.Key, *computega.UrlMapReference, ...Option) error -} - -// NewMockRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies. -func NewMockRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockRegionTargetHttpProxies { - mock := &MockRegionTargetHttpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionTargetHttpProxies is the mock for RegionTargetHttpProxies. -type MockRegionTargetHttpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies, options ...Option) (bool, *computega.TargetHttpProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpProxies, options ...Option) (bool, []*computega.TargetHttpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, m *MockRegionTargetHttpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies, options ...Option) (bool, error) - SetUrlMapHook func(context.Context, *meta.Key, *computega.UrlMapReference, *MockRegionTargetHttpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetHttpProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionTargetHttpProxies %v exists", key), - } - klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetHttpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetHttpProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj} - klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key), - } - klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionTargetHttpProxies) Obj(o *computega.TargetHttpProxy) *MockRegionTargetHttpProxiesObj { - return &MockRegionTargetHttpProxiesObj{o} -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies. -type GCERegionTargetHttpProxies struct { - s *Service -} - -// Get the TargetHttpProxy named by key. -func (g *GCERegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionTargetHttpProxies", - } - - klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpProxy objects. -func (g *GCERegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionTargetHttpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionTargetHttpProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetHttpProxy - f := func(l *computega.TargetHttpProxyList) error { - klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpProxy with key of value obj. -func (g *GCERegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionTargetHttpProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpProxy referenced by key. -func (g *GCERegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCERegionTargetHttpProxies. -func (g *GCERegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("ga"), - Service: "RegionTargetHttpProxies", - } - klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies. -type TargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetCertificateMap(context.Context, *meta.Key, *computega.TargetHttpsProxiesSetCertificateMapRequest, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computega.TargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetSslPolicy(context.Context, *meta.Key, *computega.SslPolicyReference, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computega.UrlMapReference, ...Option) error -} - -// NewMockTargetHttpsProxies returns a new mock for TargetHttpsProxies. -func NewMockTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockTargetHttpsProxies { - mock := &MockTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockTargetHttpsProxies is the mock for TargetHttpsProxies. -type MockTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies, options ...Option) (bool, *computega.TargetHttpsProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockTargetHttpsProxies, options ...Option) (bool, []*computega.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, m *MockTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies, options ...Option) (bool, error) - SetCertificateMapHook func(context.Context, *meta.Key, *computega.TargetHttpsProxiesSetCertificateMapRequest, *MockTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computega.TargetHttpsProxiesSetSslCertificatesRequest, *MockTargetHttpsProxies, ...Option) error - SetSslPolicyHook func(context.Context, *meta.Key, *computega.SslPolicyReference, *MockTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computega.UrlMapReference, *MockTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockTargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetHttpsProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockTargetHttpsProxies) Obj(o *computega.TargetHttpsProxy) *MockTargetHttpsProxiesObj { - return &MockTargetHttpsProxiesObj{o} -} - -// SetCertificateMap is a mock for the corresponding method. -func (m *MockTargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - if m.SetCertificateMapHook != nil { - return m.SetCertificateMapHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslPolicy is a mock for the corresponding method. -func (m *MockTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computega.SslPolicyReference, options ...Option) error { - if m.SetSslPolicyHook != nil { - return m.SetSslPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCETargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies. -type GCETargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCETargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - - klog.V(5).Infof("GCETargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.TargetHttpsProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCETargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCETargetHttpsProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.TargetHttpsProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetHttpsProxy - f := func(l *computega.TargetHttpsProxyList) error { - klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCETargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.TargetHttpsProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCETargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpsProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetCertificateMap is a method on GCETargetHttpsProxies. -func (g *GCETargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetCertificateMap", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpsProxies.SetCertificateMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCETargetHttpsProxies. -func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslPolicy is a method on GCETargetHttpsProxies. -func (g *GCETargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computega.SslPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslPolicy", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCETargetHttpsProxies. -func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("ga"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies. -type AlphaTargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetCertificateMap(context.Context, *meta.Key, *computealpha.TargetHttpsProxiesSetCertificateMapRequest, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computealpha.TargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetSslPolicy(context.Context, *meta.Key, *computealpha.SslPolicyReference, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computealpha.UrlMapReference, ...Option) error -} - -// NewMockAlphaTargetHttpsProxies returns a new mock for TargetHttpsProxies. -func NewMockAlphaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockAlphaTargetHttpsProxies { - mock := &MockAlphaTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaTargetHttpsProxies is the mock for TargetHttpsProxies. -type MockAlphaTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies, options ...Option) (bool, *computealpha.TargetHttpsProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetHttpsProxies, options ...Option) (bool, []*computealpha.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, m *MockAlphaTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies, options ...Option) (bool, error) - SetCertificateMapHook func(context.Context, *meta.Key, *computealpha.TargetHttpsProxiesSetCertificateMapRequest, *MockAlphaTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computealpha.TargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaTargetHttpsProxies, ...Option) error - SetSslPolicyHook func(context.Context, *meta.Key, *computealpha.SslPolicyReference, *MockAlphaTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computealpha.UrlMapReference, *MockAlphaTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.TargetHttpsProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaTargetHttpsProxies) Obj(o *computealpha.TargetHttpsProxy) *MockTargetHttpsProxiesObj { - return &MockTargetHttpsProxiesObj{o} -} - -// SetCertificateMap is a mock for the corresponding method. -func (m *MockAlphaTargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - if m.SetCertificateMapHook != nil { - return m.SetCertificateMapHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslPolicy is a mock for the corresponding method. -func (m *MockAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.SslPolicyReference, options ...Option) error { - if m.SetSslPolicyHook != nil { - return m.SetSslPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies. -type GCEAlphaTargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCEAlphaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.TargetHttpsProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCEAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.TargetHttpsProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.TargetHttpsProxy - f := func(l *computealpha.TargetHttpsProxyList) error { - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCEAlphaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.TargetHttpsProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCEAlphaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpsProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetCertificateMap is a method on GCEAlphaTargetHttpsProxies. -func (g *GCEAlphaTargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetCertificateMap", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpsProxies.SetCertificateMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCEAlphaTargetHttpsProxies. -func (g *GCEAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslPolicy is a method on GCEAlphaTargetHttpsProxies. -func (g *GCEAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computealpha.SslPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslPolicy", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEAlphaTargetHttpsProxies. -func (g *GCEAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("alpha"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaTargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies. -type BetaTargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetCertificateMap(context.Context, *meta.Key, *computebeta.TargetHttpsProxiesSetCertificateMapRequest, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computebeta.TargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetSslPolicy(context.Context, *meta.Key, *computebeta.SslPolicyReference, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computebeta.UrlMapReference, ...Option) error -} - -// NewMockBetaTargetHttpsProxies returns a new mock for TargetHttpsProxies. -func NewMockBetaTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetHttpsProxiesObj) *MockBetaTargetHttpsProxies { - mock := &MockBetaTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaTargetHttpsProxies is the mock for TargetHttpsProxies. -type MockBetaTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies, options ...Option) (bool, *computebeta.TargetHttpsProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetHttpsProxies, options ...Option) (bool, []*computebeta.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, m *MockBetaTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies, options ...Option) (bool, error) - SetCertificateMapHook func(context.Context, *meta.Key, *computebeta.TargetHttpsProxiesSetCertificateMapRequest, *MockBetaTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computebeta.TargetHttpsProxiesSetSslCertificatesRequest, *MockBetaTargetHttpsProxies, ...Option) error - SetSslPolicyHook func(context.Context, *meta.Key, *computebeta.SslPolicyReference, *MockBetaTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computebeta.UrlMapReference, *MockBetaTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.TargetHttpsProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaTargetHttpsProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockBetaTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaTargetHttpsProxies) Obj(o *computebeta.TargetHttpsProxy) *MockTargetHttpsProxiesObj { - return &MockTargetHttpsProxiesObj{o} -} - -// SetCertificateMap is a mock for the corresponding method. -func (m *MockBetaTargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - if m.SetCertificateMapHook != nil { - return m.SetCertificateMapHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslPolicy is a mock for the corresponding method. -func (m *MockBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.SslPolicyReference, options ...Option) error { - if m.SetSslPolicyHook != nil { - return m.SetSslPolicyHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaTargetHttpsProxies is a simplifying adapter for the GCE TargetHttpsProxies. -type GCEBetaTargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCEBetaTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.TargetHttpsProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCEBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.TargetHttpsProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.TargetHttpsProxy - f := func(l *computebeta.TargetHttpsProxyList) error { - klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCEBetaTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.TargetHttpsProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCEBetaTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpsProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetCertificateMap is a method on GCEBetaTargetHttpsProxies. -func (g *GCEBetaTargetHttpsProxies) SetCertificateMap(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxiesSetCertificateMapRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetCertificateMap", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpsProxies.SetCertificateMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetCertificateMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCEBetaTargetHttpsProxies. -func (g *GCEBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpsProxies.SetSslCertificates(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslPolicy is a method on GCEBetaTargetHttpsProxies. -func (g *GCEBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *computebeta.SslPolicyReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslPolicy", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEBetaTargetHttpsProxies. -func (g *GCEBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("beta"), - Service: "TargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetHttpsProxies.SetUrlMap(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies. -type AlphaRegionTargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computealpha.TargetHttpsProxy, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computealpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computealpha.UrlMapReference, ...Option) error -} - -// NewMockAlphaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies. -func NewMockAlphaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockAlphaRegionTargetHttpsProxies { - mock := &MockAlphaRegionTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies. -type MockAlphaRegionTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies, options ...Option) (bool, *computealpha.TargetHttpsProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionTargetHttpsProxies, options ...Option) (bool, []*computealpha.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, m *MockAlphaRegionTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionTargetHttpsProxies, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computealpha.TargetHttpsProxy, *MockAlphaRegionTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computealpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaRegionTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computealpha.UrlMapReference, *MockAlphaRegionTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.TargetHttpsProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionTargetHttpsProxies) Obj(o *computealpha.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj { - return &MockRegionTargetHttpsProxiesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockAlphaRegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies. -type GCEAlphaRegionTargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCEAlphaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCEAlphaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionTargetHttpsProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.TargetHttpsProxy - f := func(l *computealpha.TargetHttpsProxyList) error { - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCEAlphaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCEAlphaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEAlphaRegionTargetHttpsProxies. -func (g *GCEAlphaRegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpsProxies.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCEAlphaRegionTargetHttpsProxies. -func (g *GCEAlphaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computealpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEAlphaRegionTargetHttpsProxies. -func (g *GCEAlphaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("alpha"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaRegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies. -type BetaRegionTargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computebeta.TargetHttpsProxy, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computebeta.RegionTargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computebeta.UrlMapReference, ...Option) error -} - -// NewMockBetaRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies. -func NewMockBetaRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockBetaRegionTargetHttpsProxies { - mock := &MockBetaRegionTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies. -type MockBetaRegionTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies, options ...Option) (bool, *computebeta.TargetHttpsProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionTargetHttpsProxies, options ...Option) (bool, []*computebeta.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, m *MockBetaRegionTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionTargetHttpsProxies, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computebeta.TargetHttpsProxy, *MockBetaRegionTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computebeta.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockBetaRegionTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computebeta.UrlMapReference, *MockBetaRegionTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.TargetHttpsProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionTargetHttpsProxies) Obj(o *computebeta.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj { - return &MockRegionTargetHttpsProxiesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaRegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computebeta.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaRegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies. -type GCEBetaRegionTargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCEBetaRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCEBetaRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionTargetHttpsProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.TargetHttpsProxy - f := func(l *computebeta.TargetHttpsProxyList) error { - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCEBetaRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCEBetaRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCEBetaRegionTargetHttpsProxies. -func (g *GCEBetaRegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpsProxies.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCEBetaRegionTargetHttpsProxies. -func (g *GCEBetaRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computebeta.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCEBetaRegionTargetHttpsProxies. -func (g *GCEBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("beta"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies. -type RegionTargetHttpsProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *computega.TargetHttpsProxy, ...Option) error - SetSslCertificates(context.Context, *meta.Key, *computega.RegionTargetHttpsProxiesSetSslCertificatesRequest, ...Option) error - SetUrlMap(context.Context, *meta.Key, *computega.UrlMapReference, ...Option) error -} - -// NewMockRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies. -func NewMockRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockRegionTargetHttpsProxies { - mock := &MockRegionTargetHttpsProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies. -type MockRegionTargetHttpsProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies, options ...Option) (bool, *computega.TargetHttpsProxy, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpsProxies, options ...Option) (bool, []*computega.TargetHttpsProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, m *MockRegionTargetHttpsProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *computega.TargetHttpsProxy, *MockRegionTargetHttpsProxies, ...Option) error - SetSslCertificatesHook func(context.Context, *meta.Key, *computega.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockRegionTargetHttpsProxies, ...Option) error - SetUrlMapHook func(context.Context, *meta.Key, *computega.UrlMapReference, *MockRegionTargetHttpsProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetHttpsProxy - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v exists", key), - } - klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetHttpsProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetHttpsProxies", key) - - m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj} - klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key), - } - klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionTargetHttpsProxies) Obj(o *computega.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj { - return &MockRegionTargetHttpsProxiesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockRegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxy, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// SetSslCertificates is a mock for the corresponding method. -func (m *MockRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computega.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - if m.SetSslCertificatesHook != nil { - return m.SetSslCertificatesHook(ctx, key, arg0, m) - } - return nil -} - -// SetUrlMap is a mock for the corresponding method. -func (m *MockRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - if m.SetUrlMapHook != nil { - return m.SetUrlMapHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies. -type GCERegionTargetHttpsProxies struct { - s *Service -} - -// Get the TargetHttpsProxy named by key. -func (g *GCERegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - - klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetHttpsProxy objects. -func (g *GCERegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetHttpsProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionTargetHttpsProxies.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetHttpsProxy - f := func(l *computega.TargetHttpsProxyList) error { - klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetHttpsProxy with key of value obj. -func (g *GCERegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetHttpsProxy referenced by key. -func (g *GCERegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on GCERegionTargetHttpsProxies. -func (g *GCERegionTargetHttpsProxies) Patch(ctx context.Context, key *meta.Key, arg0 *computega.TargetHttpsProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpsProxies.Patch(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionTargetHttpsProxies.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetSslCertificates is a method on GCERegionTargetHttpsProxies. -func (g *GCERegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *computega.RegionTargetHttpsProxiesSetSslCertificatesRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetSslCertificates", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// SetUrlMap is a method on GCERegionTargetHttpsProxies. -func (g *GCERegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *computega.UrlMapReference, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionTargetHttpsProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetUrlMap", - Version: meta.Version("ga"), - Service: "RegionTargetHttpsProxies", - } - klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TargetPools is an interface that allows for mocking of TargetPools. -type TargetPools interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetPool, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetPool, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetPool, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - AddInstance(context.Context, *meta.Key, *computega.TargetPoolsAddInstanceRequest, ...Option) error - RemoveInstance(context.Context, *meta.Key, *computega.TargetPoolsRemoveInstanceRequest, ...Option) error -} - -// NewMockTargetPools returns a new mock for TargetPools. -func NewMockTargetPools(pr ProjectRouter, objs map[meta.Key]*MockTargetPoolsObj) *MockTargetPools { - mock := &MockTargetPools{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockTargetPools is the mock for TargetPools. -type MockTargetPools struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetPoolsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockTargetPools, options ...Option) (bool, *computega.TargetPool, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockTargetPools, options ...Option) (bool, []*computega.TargetPool, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetPool, m *MockTargetPools, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetPools, options ...Option) (bool, error) - AddInstanceHook func(context.Context, *meta.Key, *computega.TargetPoolsAddInstanceRequest, *MockTargetPools, ...Option) error - RemoveInstanceHook func(context.Context, *meta.Key, *computega.TargetPoolsRemoveInstanceRequest, *MockTargetPools, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockTargetPools) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetPool, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockTargetPools.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetPools %v not found", key), - } - klog.V(5).Infof("MockTargetPools.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockTargetPools) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetPool, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetPool - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockTargetPools.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockTargetPools) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetPool, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockTargetPools %v exists", key), - } - klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetPools") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetPools", key) - - m.Objects[*key] = &MockTargetPoolsObj{obj} - klog.V(5).Infof("MockTargetPools.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockTargetPools) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetPools %v not found", key), - } - klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockTargetPools.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockTargetPools) Obj(o *computega.TargetPool) *MockTargetPoolsObj { - return &MockTargetPoolsObj{o} -} - -// AddInstance is a mock for the corresponding method. -func (m *MockTargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *computega.TargetPoolsAddInstanceRequest, options ...Option) error { - if m.AddInstanceHook != nil { - return m.AddInstanceHook(ctx, key, arg0, m) - } - return nil -} - -// RemoveInstance is a mock for the corresponding method. -func (m *MockTargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *computega.TargetPoolsRemoveInstanceRequest, options ...Option) error { - if m.RemoveInstanceHook != nil { - return m.RemoveInstanceHook(ctx, key, arg0, m) - } - return nil -} - -// GCETargetPools is a simplifying adapter for the GCE TargetPools. -type GCETargetPools struct { - s *Service -} - -// Get the TargetPool named by key. -func (g *GCETargetPools) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetPool, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetPools.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "TargetPools", - } - - klog.V(5).Infof("GCETargetPools.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetPools.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.TargetPools.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCETargetPools.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetPool objects. -func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.TargetPool, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "TargetPools", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCETargetPools.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.TargetPools.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetPool - f := func(l *computega.TargetPoolList) error { - klog.V(5).Infof("GCETargetPools.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCETargetPools.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetPool with key of value obj. -func (g *GCETargetPools) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetPool, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetPools.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "TargetPools", - } - klog.V(5).Infof("GCETargetPools.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.TargetPools.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetPools.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetPools.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetPool referenced by key. -func (g *GCETargetPools) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetPools.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "TargetPools", - } - klog.V(5).Infof("GCETargetPools.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetPools.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetPools.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetPools.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// AddInstance is a method on GCETargetPools. -func (g *GCETargetPools) AddInstance(ctx context.Context, key *meta.Key, arg0 *computega.TargetPoolsAddInstanceRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetPools.AddInstance(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "AddInstance", - Version: meta.Version("ga"), - Service: "TargetPools", - } - klog.V(5).Infof("GCETargetPools.AddInstance(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetPools.AddInstance(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetPools.AddInstance(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RemoveInstance is a method on GCETargetPools. -func (g *GCETargetPools) RemoveInstance(ctx context.Context, key *meta.Key, arg0 *computega.TargetPoolsRemoveInstanceRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetPools.RemoveInstance(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetPools") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "RemoveInstance", - Version: meta.Version("ga"), - Service: "TargetPools", - } - klog.V(5).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetPools.RemoveInstance(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetPools.RemoveInstance(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaTargetTcpProxies is an interface that allows for mocking of TargetTcpProxies. -type AlphaTargetTcpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetTcpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetTcpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetTcpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetBackendService(context.Context, *meta.Key, *computealpha.TargetTcpProxiesSetBackendServiceRequest, ...Option) error -} - -// NewMockAlphaTargetTcpProxies returns a new mock for TargetTcpProxies. -func NewMockAlphaTargetTcpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetTcpProxiesObj) *MockAlphaTargetTcpProxies { - mock := &MockAlphaTargetTcpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaTargetTcpProxies is the mock for TargetTcpProxies. -type MockAlphaTargetTcpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetTcpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetTcpProxies, options ...Option) (bool, *computealpha.TargetTcpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaTargetTcpProxies, options ...Option) (bool, []*computealpha.TargetTcpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.TargetTcpProxy, m *MockAlphaTargetTcpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetTcpProxies, options ...Option) (bool, error) - SetBackendServiceHook func(context.Context, *meta.Key, *computealpha.TargetTcpProxiesSetBackendServiceRequest, *MockAlphaTargetTcpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaTargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetTcpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaTargetTcpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaTargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetTcpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetTcpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaTargetTcpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.TargetTcpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaTargetTcpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaTargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetTcpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaTargetTcpProxies %v exists", key), - } - klog.V(5).Infof("MockAlphaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "targetTcpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "targetTcpProxies", key) - - m.Objects[*key] = &MockTargetTcpProxiesObj{obj} - klog.V(5).Infof("MockAlphaTargetTcpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaTargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockAlphaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaTargetTcpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaTargetTcpProxies) Obj(o *computealpha.TargetTcpProxy) *MockTargetTcpProxiesObj { - return &MockTargetTcpProxiesObj{o} -} - -// SetBackendService is a mock for the corresponding method. -func (m *MockAlphaTargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - if m.SetBackendServiceHook != nil { - return m.SetBackendServiceHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaTargetTcpProxies is a simplifying adapter for the GCE TargetTcpProxies. -type GCEAlphaTargetTcpProxies struct { - s *Service -} - -// Get the TargetTcpProxy named by key. -func (g *GCEAlphaTargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetTcpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "TargetTcpProxies", - } - - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.TargetTcpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetTcpProxy objects. -func (g *GCEAlphaTargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetTcpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "TargetTcpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaTargetTcpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.TargetTcpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.TargetTcpProxy - f := func(l *computealpha.TargetTcpProxyList) error { - klog.V(5).Infof("GCEAlphaTargetTcpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaTargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetTcpProxy with key of value obj. -func (g *GCEAlphaTargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computealpha.TargetTcpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.TargetTcpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetTcpProxy referenced by key. -func (g *GCEAlphaTargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetTcpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetBackendService is a method on GCEAlphaTargetTcpProxies. -func (g *GCEAlphaTargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computealpha.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetBackendService", - Version: meta.Version("alpha"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.TargetTcpProxies.SetBackendService(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaTargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaTargetTcpProxies is an interface that allows for mocking of TargetTcpProxies. -type BetaTargetTcpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetTcpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetTcpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetTcpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetBackendService(context.Context, *meta.Key, *computebeta.TargetTcpProxiesSetBackendServiceRequest, ...Option) error -} - -// NewMockBetaTargetTcpProxies returns a new mock for TargetTcpProxies. -func NewMockBetaTargetTcpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetTcpProxiesObj) *MockBetaTargetTcpProxies { - mock := &MockBetaTargetTcpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaTargetTcpProxies is the mock for TargetTcpProxies. -type MockBetaTargetTcpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetTcpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetTcpProxies, options ...Option) (bool, *computebeta.TargetTcpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTargetTcpProxies, options ...Option) (bool, []*computebeta.TargetTcpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.TargetTcpProxy, m *MockBetaTargetTcpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetTcpProxies, options ...Option) (bool, error) - SetBackendServiceHook func(context.Context, *meta.Key, *computebeta.TargetTcpProxiesSetBackendServiceRequest, *MockBetaTargetTcpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaTargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetTcpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetTcpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaTargetTcpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaTargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetTcpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetTcpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaTargetTcpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.TargetTcpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaTargetTcpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaTargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetTcpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaTargetTcpProxies %v exists", key), - } - klog.V(5).Infof("MockBetaTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "targetTcpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "targetTcpProxies", key) - - m.Objects[*key] = &MockTargetTcpProxiesObj{obj} - klog.V(5).Infof("MockBetaTargetTcpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaTargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockBetaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaTargetTcpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaTargetTcpProxies) Obj(o *computebeta.TargetTcpProxy) *MockTargetTcpProxiesObj { - return &MockTargetTcpProxiesObj{o} -} - -// SetBackendService is a mock for the corresponding method. -func (m *MockBetaTargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - if m.SetBackendServiceHook != nil { - return m.SetBackendServiceHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaTargetTcpProxies is a simplifying adapter for the GCE TargetTcpProxies. -type GCEBetaTargetTcpProxies struct { - s *Service -} - -// Get the TargetTcpProxy named by key. -func (g *GCEBetaTargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetTcpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetTcpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "TargetTcpProxies", - } - - klog.V(5).Infof("GCEBetaTargetTcpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.TargetTcpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaTargetTcpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetTcpProxy objects. -func (g *GCEBetaTargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetTcpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "TargetTcpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaTargetTcpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.TargetTcpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.TargetTcpProxy - f := func(l *computebeta.TargetTcpProxyList) error { - klog.V(5).Infof("GCEBetaTargetTcpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaTargetTcpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaTargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetTcpProxy with key of value obj. -func (g *GCEBetaTargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computebeta.TargetTcpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.TargetTcpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetTcpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetTcpProxy referenced by key. -func (g *GCEBetaTargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetTcpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetBackendService is a method on GCEBetaTargetTcpProxies. -func (g *GCEBetaTargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computebeta.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetBackendService", - Version: meta.Version("beta"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.TargetTcpProxies.SetBackendService(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaTargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// TargetTcpProxies is an interface that allows for mocking of TargetTcpProxies. -type TargetTcpProxies interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetTcpProxy, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetTcpProxy, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.TargetTcpProxy, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - SetBackendService(context.Context, *meta.Key, *computega.TargetTcpProxiesSetBackendServiceRequest, ...Option) error -} - -// NewMockTargetTcpProxies returns a new mock for TargetTcpProxies. -func NewMockTargetTcpProxies(pr ProjectRouter, objs map[meta.Key]*MockTargetTcpProxiesObj) *MockTargetTcpProxies { - mock := &MockTargetTcpProxies{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockTargetTcpProxies is the mock for TargetTcpProxies. -type MockTargetTcpProxies struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTargetTcpProxiesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockTargetTcpProxies, options ...Option) (bool, *computega.TargetTcpProxy, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockTargetTcpProxies, options ...Option) (bool, []*computega.TargetTcpProxy, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.TargetTcpProxy, m *MockTargetTcpProxies, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetTcpProxies, options ...Option) (bool, error) - SetBackendServiceHook func(context.Context, *meta.Key, *computega.TargetTcpProxiesSetBackendServiceRequest, *MockTargetTcpProxies, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockTargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetTcpProxy, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetTcpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockTargetTcpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockTargetTcpProxies.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockTargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetTcpProxy, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockTargetTcpProxies.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockTargetTcpProxies.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.TargetTcpProxy - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockTargetTcpProxies.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockTargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetTcpProxy, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockTargetTcpProxies %v exists", key), - } - klog.V(5).Infof("MockTargetTcpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "targetTcpProxies") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "targetTcpProxies", key) - - m.Objects[*key] = &MockTargetTcpProxiesObj{obj} - klog.V(5).Infof("MockTargetTcpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockTargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTargetTcpProxies %v not found", key), - } - klog.V(5).Infof("MockTargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockTargetTcpProxies.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockTargetTcpProxies) Obj(o *computega.TargetTcpProxy) *MockTargetTcpProxiesObj { - return &MockTargetTcpProxiesObj{o} -} - -// SetBackendService is a mock for the corresponding method. -func (m *MockTargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computega.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - if m.SetBackendServiceHook != nil { - return m.SetBackendServiceHook(ctx, key, arg0, m) - } - return nil -} - -// GCETargetTcpProxies is a simplifying adapter for the GCE TargetTcpProxies. -type GCETargetTcpProxies struct { - s *Service -} - -// Get the TargetTcpProxy named by key. -func (g *GCETargetTcpProxies) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetTcpProxies.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetTcpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "TargetTcpProxies", - } - - klog.V(5).Infof("GCETargetTcpProxies.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetTcpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.TargetTcpProxies.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCETargetTcpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TargetTcpProxy objects. -func (g *GCETargetTcpProxies) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.TargetTcpProxy, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetTcpProxies.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "TargetTcpProxies", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCETargetTcpProxies.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.TargetTcpProxies.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.TargetTcpProxy - f := func(l *computega.TargetTcpProxyList) error { - klog.V(5).Infof("GCETargetTcpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCETargetTcpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCETargetTcpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TargetTcpProxy with key of value obj. -func (g *GCETargetTcpProxies) Insert(ctx context.Context, key *meta.Key, obj *computega.TargetTcpProxy, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetTcpProxies.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetTcpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetTcpProxies") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCETargetTcpProxies.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetTcpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.TargetTcpProxies.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetTcpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetTcpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TargetTcpProxy referenced by key. -func (g *GCETargetTcpProxies) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetTcpProxies.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCETargetTcpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCETargetTcpProxies.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetTcpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetTcpProxies.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCETargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCETargetTcpProxies.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// SetBackendService is a method on GCETargetTcpProxies. -func (g *GCETargetTcpProxies) SetBackendService(ctx context.Context, key *meta.Key, arg0 *computega.TargetTcpProxiesSetBackendServiceRequest, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TargetTcpProxies") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "SetBackendService", - Version: meta.Version("ga"), - Service: "TargetTcpProxies", - } - klog.V(5).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.TargetTcpProxies.SetBackendService(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCETargetTcpProxies.SetBackendService(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaUrlMaps is an interface that allows for mocking of UrlMaps. -type AlphaUrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computealpha.UrlMap, ...Option) error -} - -// NewMockAlphaUrlMaps returns a new mock for UrlMaps. -func NewMockAlphaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockAlphaUrlMaps { - mock := &MockAlphaUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaUrlMaps is the mock for UrlMaps. -type MockAlphaUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps, options ...Option) (bool, *computealpha.UrlMap, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaUrlMaps, options ...Option) (bool, []*computealpha.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, m *MockAlphaUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computealpha.UrlMap, *MockAlphaUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key), - } - klog.V(5).Infof("MockAlphaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockAlphaUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.UrlMap - for _, obj := range m.Objects { - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaUrlMaps %v exists", key), - } - klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "urlMaps", key) - - m.Objects[*key] = &MockUrlMapsObj{obj} - klog.V(5).Infof("MockAlphaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaUrlMaps %v not found", key), - } - klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaUrlMaps) Obj(o *computealpha.UrlMap) *MockUrlMapsObj { - return &MockUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaUrlMaps is a simplifying adapter for the GCE UrlMaps. -type GCEAlphaUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCEAlphaUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "UrlMaps", - } - - klog.V(5).Infof("GCEAlphaUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.UrlMaps.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCEAlphaUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "UrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Alpha.UrlMaps.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.UrlMap - f := func(l *computealpha.UrlMapList) error { - klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCEAlphaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.UrlMaps.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCEAlphaUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEAlphaUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.UrlMaps.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaUrlMaps. -func (g *GCEAlphaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.UrlMaps.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaUrlMaps is an interface that allows for mocking of UrlMaps. -type BetaUrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computebeta.UrlMap, ...Option) error -} - -// NewMockBetaUrlMaps returns a new mock for UrlMaps. -func NewMockBetaUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockBetaUrlMaps { - mock := &MockBetaUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaUrlMaps is the mock for UrlMaps. -type MockBetaUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps, options ...Option) (bool, *computebeta.UrlMap, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaUrlMaps, options ...Option) (bool, []*computebeta.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, m *MockBetaUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computebeta.UrlMap, *MockBetaUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key), - } - klog.V(5).Infof("MockBetaUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.UrlMap - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaUrlMaps %v exists", key), - } - klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "urlMaps", key) - - m.Objects[*key] = &MockUrlMapsObj{obj} - klog.V(5).Infof("MockBetaUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaUrlMaps %v not found", key), - } - klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaUrlMaps) Obj(o *computebeta.UrlMap) *MockUrlMapsObj { - return &MockUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaUrlMaps is a simplifying adapter for the GCE UrlMaps. -type GCEBetaUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCEBetaUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "UrlMaps", - } - - klog.V(5).Infof("GCEBetaUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.UrlMaps.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCEBetaUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "UrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaUrlMaps.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.Beta.UrlMaps.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.UrlMap - f := func(l *computebeta.UrlMapList) error { - klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCEBetaUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.UrlMaps.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCEBetaUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEBetaUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.UrlMaps.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaUrlMaps. -func (g *GCEBetaUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.UrlMaps.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// UrlMaps is an interface that allows for mocking of UrlMaps. -type UrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.UrlMap, ...Option) error -} - -// NewMockUrlMaps returns a new mock for UrlMaps. -func NewMockUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockUrlMapsObj) *MockUrlMaps { - mock := &MockUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockUrlMaps is the mock for UrlMaps. -type MockUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps, options ...Option) (bool, *computega.UrlMap, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockUrlMaps, options ...Option) (bool, []*computega.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.UrlMap, m *MockUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.UrlMap, *MockUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockUrlMaps %v not found", key), - } - klog.V(5).Infof("MockUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockUrlMaps.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.UrlMap - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockUrlMaps.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockUrlMaps %v exists", key), - } - klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "urlMaps", key) - - m.Objects[*key] = &MockUrlMapsObj{obj} - klog.V(5).Infof("MockUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockUrlMaps %v not found", key), - } - klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockUrlMaps) Obj(o *computega.UrlMap) *MockUrlMapsObj { - return &MockUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computega.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEUrlMaps is a simplifying adapter for the GCE UrlMaps. -type GCEUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCEUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "UrlMaps", - } - - klog.V(5).Infof("GCEUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.UrlMaps.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEUrlMaps.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "UrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEUrlMaps.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.UrlMaps.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.UrlMap - f := func(l *computega.UrlMapList) error { - klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCEUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "UrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.UrlMaps.Insert(projectID, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCEUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.UrlMaps.Delete(projectID, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEUrlMaps. -func (g *GCEUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computega.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "UrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "UrlMaps", - } - klog.V(5).Infof("GCEUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.UrlMaps.Update(projectID, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// AlphaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps. -type AlphaRegionUrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computealpha.UrlMap, ...Option) error -} - -// NewMockAlphaRegionUrlMaps returns a new mock for RegionUrlMaps. -func NewMockAlphaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockAlphaRegionUrlMaps { - mock := &MockAlphaRegionUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockAlphaRegionUrlMaps is the mock for RegionUrlMaps. -type MockAlphaRegionUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps, options ...Option) (bool, *computealpha.UrlMap, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockAlphaRegionUrlMaps, options ...Option) (bool, []*computealpha.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, m *MockAlphaRegionUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaRegionUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computealpha.UrlMap, *MockAlphaRegionUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToAlpha() - klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computealpha.UrlMap - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToAlpha()) { - continue - } - objs = append(objs, obj.ToAlpha()) - } - - klog.V(5).Infof("MockAlphaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v exists", key), - } - klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "alpha", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionAlpha, projectID, "urlMaps", key) - - m.Objects[*key] = &MockRegionUrlMapsObj{obj} - klog.V(5).Infof("MockAlphaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockAlphaRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockAlphaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockAlphaRegionUrlMaps) Obj(o *computealpha.UrlMap) *MockRegionUrlMapsObj { - return &MockRegionUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEAlphaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps. -type GCEAlphaRegionUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCEAlphaRegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computealpha.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("alpha"), - Service: "RegionUrlMaps", - } - - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Alpha.RegionUrlMaps.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCEAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computealpha.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("alpha"), - Service: "RegionUrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Alpha.RegionUrlMaps.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computealpha.UrlMap - f := func(l *computealpha.UrlMapList) error { - klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCEAlphaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computealpha.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("alpha"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Alpha.RegionUrlMaps.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCEAlphaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("alpha"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionUrlMaps.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEAlphaRegionUrlMaps. -func (g *GCEAlphaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computealpha.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "alpha", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("alpha"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Alpha.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEAlphaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaRegionUrlMaps is an interface that allows for mocking of RegionUrlMaps. -type BetaRegionUrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computebeta.UrlMap, ...Option) error -} - -// NewMockBetaRegionUrlMaps returns a new mock for RegionUrlMaps. -func NewMockBetaRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockBetaRegionUrlMaps { - mock := &MockBetaRegionUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaRegionUrlMaps is the mock for RegionUrlMaps. -type MockBetaRegionUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps, options ...Option) (bool, *computebeta.UrlMap, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockBetaRegionUrlMaps, options ...Option) (bool, []*computebeta.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, m *MockBetaRegionUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaRegionUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computebeta.UrlMap, *MockBetaRegionUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockBetaRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computebeta.UrlMap - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaRegionUrlMaps %v exists", key), - } - klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionBeta, projectID, "urlMaps", key) - - m.Objects[*key] = &MockRegionUrlMapsObj{obj} - klog.V(5).Infof("MockBetaRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaRegionUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaRegionUrlMaps) Obj(o *computebeta.UrlMap) *MockRegionUrlMapsObj { - return &MockRegionUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCEBetaRegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps. -type GCEBetaRegionUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCEBetaRegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computebeta.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "RegionUrlMaps", - } - - klog.V(5).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.Beta.RegionUrlMaps.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEBetaRegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCEBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computebeta.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "RegionUrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.Beta.RegionUrlMaps.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computebeta.UrlMap - f := func(l *computebeta.UrlMapList) error { - klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCEBetaRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computebeta.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.Beta.RegionUrlMaps.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCEBetaRegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionUrlMaps.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCEBetaRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCEBetaRegionUrlMaps. -func (g *GCEBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computebeta.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("beta"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.Beta.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCEBetaRegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// RegionUrlMaps is an interface that allows for mocking of RegionUrlMaps. -type RegionUrlMaps interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) - List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) - Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Update(context.Context, *meta.Key, *computega.UrlMap, ...Option) error -} - -// NewMockRegionUrlMaps returns a new mock for RegionUrlMaps. -func NewMockRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockRegionUrlMaps { - mock := &MockRegionUrlMaps{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockRegionUrlMaps is the mock for RegionUrlMaps. -type MockRegionUrlMaps struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockRegionUrlMapsObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps, options ...Option) (bool, *computega.UrlMap, error) - ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionUrlMaps, options ...Option) (bool, []*computega.UrlMap, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *computega.UrlMap, m *MockRegionUrlMaps, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps, options ...Option) (bool, error) - UpdateHook func(context.Context, *meta.Key, *computega.UrlMap, *MockRegionUrlMaps, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockRegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock in the given region. -func (m *MockRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, region, fl, m, options...); intercept { - klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.UrlMap - for key, obj := range m.Objects { - if key.Region != region { - continue - } - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockRegionUrlMaps %v exists", key), - } - klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "urlMaps") - obj.SelfLink = SelfLinkWithGroup("compute", meta.VersionGA, projectID, "urlMaps", key) - - m.Objects[*key] = &MockRegionUrlMapsObj{obj} - klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockRegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key), - } - klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockRegionUrlMaps) Obj(o *computega.UrlMap) *MockRegionUrlMapsObj { - return &MockRegionUrlMapsObj{o} -} - -// Update is a mock for the corresponding method. -func (m *MockRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computega.UrlMap, options ...Option) error { - if m.UpdateHook != nil { - return m.UpdateHook(ctx, key, arg0, m) - } - return nil -} - -// GCERegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps. -type GCERegionUrlMaps struct { - s *Service -} - -// Get the UrlMap named by key. -func (g *GCERegionUrlMaps) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "RegionUrlMaps", - } - - klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.RegionUrlMaps.Get(projectID, key.Region, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all UrlMap objects. -func (g *GCERegionUrlMaps) List(ctx context.Context, region string, fl *filter.F, options ...Option) ([]*computega.UrlMap, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v, %v) called", ctx, region, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "RegionUrlMaps", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck) - call := g.s.GA.RegionUrlMaps.List(projectID, region) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.UrlMap - f := func(l *computega.UrlMapList) error { - klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert UrlMap with key of value obj. -func (g *GCERegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *computega.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionUrlMaps") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - call := g.s.GA.RegionUrlMaps.Insert(projectID, key.Region, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the UrlMap referenced by key. -func (g *GCERegionUrlMaps) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("GCERegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionUrlMaps.Delete(projectID, key.Region, key.Name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Update is a method on GCERegionUrlMaps. -func (g *GCERegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *computega.UrlMap, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCERegionUrlMaps.Update(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "RegionUrlMaps") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Update", - Version: meta.Version("ga"), - Service: "RegionUrlMaps", - } - klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - call := g.s.GA.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Zones is an interface that allows for mocking of Zones. -type Zones interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Zone, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Zone, error) -} - -// NewMockZones returns a new mock for Zones. -func NewMockZones(pr ProjectRouter, objs map[meta.Key]*MockZonesObj) *MockZones { - mock := &MockZones{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - } - return mock -} - -// MockZones is the mock for Zones. -type MockZones struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockZonesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockZones, options ...Option) (bool, *computega.Zone, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockZones, options ...Option) (bool, []*computega.Zone, error) - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockZones) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Zone, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockZones.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockZones.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockZones.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockZones %v not found", key), - } - klog.V(5).Infof("MockZones.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockZones) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Zone, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockZones.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockZones.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*computega.Zone - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockZones.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Obj wraps the object for use in the mock. -func (m *MockZones) Obj(o *computega.Zone) *MockZonesObj { - return &MockZonesObj{o} -} - -// GCEZones is a simplifying adapter for the GCE Zones. -type GCEZones struct { - s *Service -} - -// Get the Zone named by key. -func (g *GCEZones) Get(ctx context.Context, key *meta.Key, options ...Option) (*computega.Zone, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEZones.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("GCEZones.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Zones") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Zones", - } - - klog.V(5).Infof("GCEZones.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("GCEZones.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - call := g.s.GA.Zones.Get(projectID, key.Name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("GCEZones.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Zone objects. -func (g *GCEZones) List(ctx context.Context, fl *filter.F, options ...Option) ([]*computega.Zone, error) { - opts := mergeOptions(options) - klog.V(5).Infof("GCEZones.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Zones") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Zones", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("GCEZones.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.GA.Zones.List(projectID) - if fl != filter.None { - call.Filter(fl.String()) - } - - var all []*computega.Zone - f := func(l *computega.ZoneList) error { - klog.V(5).Infof("GCEZones.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Items...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("GCEZones.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("GCEZones.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("GCEZones.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// TcpRoutes is an interface that allows for mocking of TcpRoutes. -type TcpRoutes interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.TcpRoute, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.TcpRoute, error) - Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.TcpRoute, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *networkservicesga.TcpRoute, ...Option) error -} - -// NewMockTcpRoutes returns a new mock for TcpRoutes. -func NewMockTcpRoutes(pr ProjectRouter, objs map[meta.Key]*MockTcpRoutesObj) *MockTcpRoutes { - mock := &MockTcpRoutes{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockTcpRoutes is the mock for TcpRoutes. -type MockTcpRoutes struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTcpRoutesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockTcpRoutes, options ...Option) (bool, *networkservicesga.TcpRoute, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockTcpRoutes, options ...Option) (bool, []*networkservicesga.TcpRoute, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *networkservicesga.TcpRoute, m *MockTcpRoutes, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockTcpRoutes, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *networkservicesga.TcpRoute, *MockTcpRoutes, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockTcpRoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.TcpRoute, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTcpRoutes.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockTcpRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockTcpRoutes.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTcpRoutes %v not found", key), - } - klog.V(5).Infof("MockTcpRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.TcpRoute, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockTcpRoutes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockTcpRoutes.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*networkservicesga.TcpRoute - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockTcpRoutes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockTcpRoutes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.TcpRoute, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockTcpRoutes %v exists", key), - } - klog.V(5).Infof("MockTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "tcpRoutes") - obj.SelfLink = SelfLinkWithGroup("networkservices", meta.VersionGA, projectID, "tcpRoutes", key) - - m.Objects[*key] = &MockTcpRoutesObj{obj} - klog.V(5).Infof("MockTcpRoutes.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockTcpRoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockTcpRoutes %v not found", key), - } - klog.V(5).Infof("MockTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockTcpRoutes.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockTcpRoutes) Obj(o *networkservicesga.TcpRoute) *MockTcpRoutesObj { - return &MockTcpRoutesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockTcpRoutes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesga.TcpRoute, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// TDTcpRoutes is a simplifying adapter for the GCE TcpRoutes. -type TDTcpRoutes struct { - s *Service -} - -// Get the TcpRoute named by key. -func (g *TDTcpRoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.TcpRoute, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDTcpRoutes.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDTcpRoutes.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "TcpRoutes", - } - - klog.V(5).Infof("TDTcpRoutes.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDTcpRoutes.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.TcpRoutes.Get(name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("TDTcpRoutes.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TcpRoute objects. -func (g *TDTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.TcpRoute, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDTcpRoutes.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "TcpRoutes", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("TDTcpRoutes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.NetworkServicesGA.TcpRoutes.List(projectID) - - var all []*networkservicesga.TcpRoute - f := func(l *networkservicesga.ListTcpRoutesResponse) error { - klog.V(5).Infof("TDTcpRoutes.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.TcpRoutes...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDTcpRoutes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("TDTcpRoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("TDTcpRoutes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TcpRoute with key of value obj. -func (g *TDTcpRoutes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.TcpRoute, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDTcpRoutes.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("TDTcpRoutes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDTcpRoutes.Create(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDTcpRoutes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - parent := fmt.Sprintf("projects/%s/locations/global", projectID) - call := g.s.NetworkServicesGA.TcpRoutes.Create(parent, obj) - call.TcpRouteId(obj.Name) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDTcpRoutes.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDTcpRoutes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TcpRoute referenced by key. -func (g *TDTcpRoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDTcpRoutes.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("TDTcpRoutes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TcpRoutes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDTcpRoutes.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDTcpRoutes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.TcpRoutes.Delete(name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on TDTcpRoutes. -func (g *TDTcpRoutes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesga.TcpRoute, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDTcpRoutes.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDTcpRoutes.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "TcpRoutes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDTcpRoutes.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDTcpRoutes.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.TcpRoutes.Patch(name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDTcpRoutes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("TDTcpRoutes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaTcpRoutes is an interface that allows for mocking of TcpRoutes. -type BetaTcpRoutes interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.TcpRoute, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.TcpRoute, error) - Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.TcpRoute, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *networkservicesbeta.TcpRoute, ...Option) error -} - -// NewMockBetaTcpRoutes returns a new mock for TcpRoutes. -func NewMockBetaTcpRoutes(pr ProjectRouter, objs map[meta.Key]*MockTcpRoutesObj) *MockBetaTcpRoutes { - mock := &MockBetaTcpRoutes{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaTcpRoutes is the mock for TcpRoutes. -type MockBetaTcpRoutes struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockTcpRoutesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaTcpRoutes, options ...Option) (bool, *networkservicesbeta.TcpRoute, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaTcpRoutes, options ...Option) (bool, []*networkservicesbeta.TcpRoute, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *networkservicesbeta.TcpRoute, m *MockBetaTcpRoutes, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTcpRoutes, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *networkservicesbeta.TcpRoute, *MockBetaTcpRoutes, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaTcpRoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.TcpRoute, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTcpRoutes.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaTcpRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaTcpRoutes.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTcpRoutes %v not found", key), - } - klog.V(5).Infof("MockBetaTcpRoutes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.TcpRoute, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaTcpRoutes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaTcpRoutes.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*networkservicesbeta.TcpRoute - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaTcpRoutes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaTcpRoutes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.TcpRoute, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaTcpRoutes %v exists", key), - } - klog.V(5).Infof("MockBetaTcpRoutes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "tcpRoutes") - obj.SelfLink = SelfLinkWithGroup("networkservices", meta.VersionBeta, projectID, "tcpRoutes", key) - - m.Objects[*key] = &MockTcpRoutesObj{obj} - klog.V(5).Infof("MockBetaTcpRoutes.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaTcpRoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaTcpRoutes %v not found", key), - } - klog.V(5).Infof("MockBetaTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaTcpRoutes.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaTcpRoutes) Obj(o *networkservicesbeta.TcpRoute) *MockTcpRoutesObj { - return &MockTcpRoutesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaTcpRoutes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesbeta.TcpRoute, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// TDBetaTcpRoutes is a simplifying adapter for the GCE TcpRoutes. -type TDBetaTcpRoutes struct { - s *Service -} - -// Get the TcpRoute named by key. -func (g *TDBetaTcpRoutes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.TcpRoute, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaTcpRoutes.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDBetaTcpRoutes.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "TcpRoutes", - } - - klog.V(5).Infof("TDBetaTcpRoutes.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.TcpRoutes.Get(name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("TDBetaTcpRoutes.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all TcpRoute objects. -func (g *TDBetaTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.TcpRoute, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaTcpRoutes.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "TcpRoutes", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("TDBetaTcpRoutes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.NetworkServicesBeta.TcpRoutes.List(projectID) - - var all []*networkservicesbeta.TcpRoute - f := func(l *networkservicesbeta.ListTcpRoutesResponse) error { - klog.V(5).Infof("TDBetaTcpRoutes.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.TcpRoutes...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDBetaTcpRoutes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("TDBetaTcpRoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("TDBetaTcpRoutes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert TcpRoute with key of value obj. -func (g *TDBetaTcpRoutes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.TcpRoute, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaTcpRoutes.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("TDBetaTcpRoutes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TcpRoutes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDBetaTcpRoutes.Create(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - parent := fmt.Sprintf("projects/%s/locations/global", projectID) - call := g.s.NetworkServicesBeta.TcpRoutes.Create(parent, obj) - call.TcpRouteId(obj.Name) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDBetaTcpRoutes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the TcpRoute referenced by key. -func (g *TDBetaTcpRoutes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaTcpRoutes.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("TDBetaTcpRoutes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TcpRoutes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDBetaTcpRoutes.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.TcpRoutes.Delete(name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDBetaTcpRoutes.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on TDBetaTcpRoutes. -func (g *TDBetaTcpRoutes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesbeta.TcpRoute, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaTcpRoutes.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDBetaTcpRoutes.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "TcpRoutes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "TcpRoutes", - } - klog.V(5).Infof("TDBetaTcpRoutes.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaTcpRoutes.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/tcpRoutes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.TcpRoutes.Patch(name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDBetaTcpRoutes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("TDBetaTcpRoutes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// Meshes is an interface that allows for mocking of Meshes. -type Meshes interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.Mesh, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.Mesh, error) - Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.Mesh, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *networkservicesga.Mesh, ...Option) error -} - -// NewMockMeshes returns a new mock for Meshes. -func NewMockMeshes(pr ProjectRouter, objs map[meta.Key]*MockMeshesObj) *MockMeshes { - mock := &MockMeshes{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockMeshes is the mock for Meshes. -type MockMeshes struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockMeshesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockMeshes, options ...Option) (bool, *networkservicesga.Mesh, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockMeshes, options ...Option) (bool, []*networkservicesga.Mesh, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *networkservicesga.Mesh, m *MockMeshes, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockMeshes, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *networkservicesga.Mesh, *MockMeshes, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockMeshes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.Mesh, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockMeshes.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockMeshes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToGA() - klog.V(5).Infof("MockMeshes.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockMeshes %v not found", key), - } - klog.V(5).Infof("MockMeshes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockMeshes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.Mesh, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockMeshes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockMeshes.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*networkservicesga.Mesh - for _, obj := range m.Objects { - if !fl.Match(obj.ToGA()) { - continue - } - objs = append(objs, obj.ToGA()) - } - - klog.V(5).Infof("MockMeshes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockMeshes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.Mesh, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockMeshes %v exists", key), - } - klog.V(5).Infof("MockMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "ga", "meshes") - obj.SelfLink = SelfLinkWithGroup("networkservices", meta.VersionGA, projectID, "meshes", key) - - m.Objects[*key] = &MockMeshesObj{obj} - klog.V(5).Infof("MockMeshes.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockMeshes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockMeshes %v not found", key), - } - klog.V(5).Infof("MockMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockMeshes.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockMeshes) Obj(o *networkservicesga.Mesh) *MockMeshesObj { - return &MockMeshesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockMeshes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesga.Mesh, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// TDMeshes is a simplifying adapter for the GCE Meshes. -type TDMeshes struct { - s *Service -} - -// Get the Mesh named by key. -func (g *TDMeshes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesga.Mesh, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDMeshes.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDMeshes.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("ga"), - Service: "Meshes", - } - - klog.V(5).Infof("TDMeshes.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDMeshes.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.Meshes.Get(name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("TDMeshes.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Mesh objects. -func (g *TDMeshes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesga.Mesh, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDMeshes.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("ga"), - Service: "Meshes", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("TDMeshes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.NetworkServicesGA.Meshes.List(projectID) - - var all []*networkservicesga.Mesh - f := func(l *networkservicesga.ListMeshesResponse) error { - klog.V(5).Infof("TDMeshes.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Meshes...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDMeshes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("TDMeshes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("TDMeshes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Mesh with key of value obj. -func (g *TDMeshes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesga.Mesh, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDMeshes.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("TDMeshes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("ga"), - Service: "Meshes", - } - klog.V(5).Infof("TDMeshes.Create(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDMeshes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - parent := fmt.Sprintf("projects/%s/locations/global", projectID) - call := g.s.NetworkServicesGA.Meshes.Create(parent, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDMeshes.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDMeshes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Mesh referenced by key. -func (g *TDMeshes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDMeshes.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("TDMeshes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Meshes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("ga"), - Service: "Meshes", - } - klog.V(5).Infof("TDMeshes.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDMeshes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.Meshes.Delete(name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on TDMeshes. -func (g *TDMeshes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesga.Mesh, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDMeshes.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDMeshes.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "ga", "Meshes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("ga"), - Service: "Meshes", - } - klog.V(5).Infof("TDMeshes.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDMeshes.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesGA.Meshes.Patch(name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDMeshes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("TDMeshes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// BetaMeshes is an interface that allows for mocking of Meshes. -type BetaMeshes interface { - Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.Mesh, error) - List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.Mesh, error) - Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.Mesh, options ...Option) error - Delete(ctx context.Context, key *meta.Key, options ...Option) error - Patch(context.Context, *meta.Key, *networkservicesbeta.Mesh, ...Option) error -} - -// NewMockBetaMeshes returns a new mock for Meshes. -func NewMockBetaMeshes(pr ProjectRouter, objs map[meta.Key]*MockMeshesObj) *MockBetaMeshes { - mock := &MockBetaMeshes{ - ProjectRouter: pr, - - Objects: objs, - GetError: map[meta.Key]error{}, - InsertError: map[meta.Key]error{}, - DeleteError: map[meta.Key]error{}, - } - return mock -} - -// MockBetaMeshes is the mock for Meshes. -type MockBetaMeshes struct { - Lock sync.Mutex - - ProjectRouter ProjectRouter - - // Objects maintained by the mock. - Objects map[meta.Key]*MockMeshesObj - - // If an entry exists for the given key and operation, then the error - // will be returned instead of the operation. - GetError map[meta.Key]error - ListError *error - InsertError map[meta.Key]error - DeleteError map[meta.Key]error - - // xxxHook allow you to intercept the standard processing of the mock in - // order to add your own logic. Return (true, _, _) to prevent the normal - // execution flow of the mock. Return (false, nil, nil) to continue with - // normal mock behavior/ after the hook function executes. - GetHook func(ctx context.Context, key *meta.Key, m *MockBetaMeshes, options ...Option) (bool, *networkservicesbeta.Mesh, error) - ListHook func(ctx context.Context, fl *filter.F, m *MockBetaMeshes, options ...Option) (bool, []*networkservicesbeta.Mesh, error) - InsertHook func(ctx context.Context, key *meta.Key, obj *networkservicesbeta.Mesh, m *MockBetaMeshes, options ...Option) (bool, error) - DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaMeshes, options ...Option) (bool, error) - PatchHook func(context.Context, *meta.Key, *networkservicesbeta.Mesh, *MockBetaMeshes, ...Option) error - - // X is extra state that can be used as part of the mock. Generated code - // will not use this field. - X interface{} -} - -// Get returns the object from the mock. -func (m *MockBetaMeshes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.Mesh, error) { - if m.GetHook != nil { - if intercept, obj, err := m.GetHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaMeshes.Get(%v, %s) = %+v, %v", ctx, key, obj, err) - return obj, err - } - } - if !key.Valid() { - return nil, fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.GetError[*key]; ok { - klog.V(5).Infof("MockBetaMeshes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err - } - if obj, ok := m.Objects[*key]; ok { - typedObj := obj.ToBeta() - klog.V(5).Infof("MockBetaMeshes.Get(%v, %s) = %+v, nil", ctx, key, typedObj) - return typedObj, nil - } - - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaMeshes %v not found", key), - } - klog.V(5).Infof("MockBetaMeshes.Get(%v, %s) = nil, %v", ctx, key, err) - return nil, err -} - -// List all of the objects in the mock. -func (m *MockBetaMeshes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.Mesh, error) { - if m.ListHook != nil { - if intercept, objs, err := m.ListHook(ctx, fl, m, options...); intercept { - klog.V(5).Infof("MockBetaMeshes.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) - return objs, err - } - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if m.ListError != nil { - err := *m.ListError - klog.V(5).Infof("MockBetaMeshes.List(%v, %v) = nil, %v", ctx, fl, err) - - return nil, *m.ListError - } - - var objs []*networkservicesbeta.Mesh - for _, obj := range m.Objects { - if !fl.Match(obj.ToBeta()) { - continue - } - objs = append(objs, obj.ToBeta()) - } - - klog.V(5).Infof("MockBetaMeshes.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) - return objs, nil -} - -// Insert is a mock for inserting/creating a new object. -func (m *MockBetaMeshes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.Mesh, options ...Option) error { - if m.InsertHook != nil { - if intercept, err := m.InsertHook(ctx, key, obj, m, options...); intercept { - klog.V(5).Infof("MockBetaMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - } - opts := mergeOptions(options) - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.InsertError[*key]; ok { - klog.V(5).Infof("MockBetaMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - if _, ok := m.Objects[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockBetaMeshes %v exists", key), - } - klog.V(5).Infof("MockBetaMeshes.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) - return err - } - - obj.Name = key.Name - projectID := getProjectID(ctx, m.ProjectRouter, opts, "beta", "meshes") - obj.SelfLink = SelfLinkWithGroup("networkservices", meta.VersionBeta, projectID, "meshes", key) - - m.Objects[*key] = &MockMeshesObj{obj} - klog.V(5).Infof("MockBetaMeshes.Insert(%v, %v, %+v) = nil", ctx, key, obj) - return nil -} - -// Delete is a mock for deleting the object. -func (m *MockBetaMeshes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - if m.DeleteHook != nil { - if intercept, err := m.DeleteHook(ctx, key, m, options...); intercept { - klog.V(5).Infof("MockBetaMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - } - if !key.Valid() { - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - m.Lock.Lock() - defer m.Lock.Unlock() - - if err, ok := m.DeleteError[*key]; ok { - klog.V(5).Infof("MockBetaMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - if _, ok := m.Objects[*key]; !ok { - err := &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("MockBetaMeshes %v not found", key), - } - klog.V(5).Infof("MockBetaMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - delete(m.Objects, *key) - klog.V(5).Infof("MockBetaMeshes.Delete(%v, %v) = nil", ctx, key) - return nil -} - -// Obj wraps the object for use in the mock. -func (m *MockBetaMeshes) Obj(o *networkservicesbeta.Mesh) *MockMeshesObj { - return &MockMeshesObj{o} -} - -// Patch is a mock for the corresponding method. -func (m *MockBetaMeshes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesbeta.Mesh, options ...Option) error { - if m.PatchHook != nil { - return m.PatchHook(ctx, key, arg0, m) - } - return nil -} - -// TDBetaMeshes is a simplifying adapter for the GCE Meshes. -type TDBetaMeshes struct { - s *Service -} - -// Get the Mesh named by key. -func (g *TDBetaMeshes) Get(ctx context.Context, key *meta.Key, options ...Option) (*networkservicesbeta.Mesh, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaMeshes.Get(%v, %v, %v): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDBetaMeshes.Get(%v, %v): key is invalid (%#v)", ctx, key, key) - return nil, fmt.Errorf("invalid GCE key (%#v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Get", - Version: meta.Version("beta"), - Service: "Meshes", - } - - klog.V(5).Infof("TDBetaMeshes.Get(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaMeshes.Get(%v, %v): RateLimiter error: %v", ctx, key, err) - return nil, err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.Meshes.Get(name) - call.Context(ctx) - v, err := call.Do() - klog.V(4).Infof("TDBetaMeshes.Get(%v, %v) = %+v, %v", ctx, key, v, err) - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - return v, err -} - -// List all Mesh objects. -func (g *TDBetaMeshes) List(ctx context.Context, fl *filter.F, options ...Option) ([]*networkservicesbeta.Mesh, error) { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaMeshes.List(%v, %v, %v) called", ctx, fl, opts) - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "List", - Version: meta.Version("beta"), - Service: "Meshes", - } - - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - return nil, err - } - klog.V(5).Infof("TDBetaMeshes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck) - call := g.s.NetworkServicesBeta.Meshes.List(projectID) - - var all []*networkservicesbeta.Mesh - f := func(l *networkservicesbeta.ListMeshesResponse) error { - klog.V(5).Infof("TDBetaMeshes.List(%v, ..., %v): page %+v", ctx, fl, l) - all = append(all, l.Meshes...) - return nil - } - if err := call.Pages(ctx, f); err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDBetaMeshes.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) - return nil, err - } - - callObserverEnd(ctx, ck, nil) - g.s.RateLimiter.Observe(ctx, nil, ck) - - if kLogEnabled(4) { - klog.V(4).Infof("TDBetaMeshes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if kLogEnabled(5) { - var asStr []string - for _, o := range all { - asStr = append(asStr, fmt.Sprintf("%+v", o)) - } - klog.V(5).Infof("TDBetaMeshes.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) - } - - return all, nil -} - -// Insert Mesh with key of value obj. -func (g *TDBetaMeshes) Insert(ctx context.Context, key *meta.Key, obj *networkservicesbeta.Mesh, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaMeshes.Insert(%v, %v, %+v, %v): called", ctx, key, obj, opts) - if !key.Valid() { - klog.V(2).Infof("TDBetaMeshes.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Meshes") - - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Insert", - Version: meta.Version("beta"), - Service: "Meshes", - } - klog.V(5).Infof("TDBetaMeshes.Create(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaMeshes.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - obj.Name = key.Name - parent := fmt.Sprintf("projects/%s/locations/global", projectID) - call := g.s.NetworkServicesBeta.Meshes.Create(parent, obj) - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDBetaMeshes.Insert(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDBetaMeshes.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) - return err -} - -// Delete the Mesh referenced by key. -func (g *TDBetaMeshes) Delete(ctx context.Context, key *meta.Key, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaMeshes.Delete(%v, %v, %v): called", ctx, key, opts) - if !key.Valid() { - klog.V(2).Infof("TDBetaMeshes.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Meshes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Delete", - Version: meta.Version("beta"), - Service: "Meshes", - } - klog.V(5).Infof("TDBetaMeshes.Delete(%v, %v): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaMeshes.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.Meshes.Delete(name) - - call.Context(ctx) - - op, err := call.Do() - - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - if err != nil { - klog.V(4).Infof("TDBetaMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - klog.V(4).Infof("TDBetaMeshes.Delete(%v, %v) = %v", ctx, key, err) - return err -} - -// Patch is a method on TDBetaMeshes. -func (g *TDBetaMeshes) Patch(ctx context.Context, key *meta.Key, arg0 *networkservicesbeta.Mesh, options ...Option) error { - opts := mergeOptions(options) - klog.V(5).Infof("TDBetaMeshes.Patch(%v, %v, %v, ...): called", ctx, key, opts) - - if !key.Valid() { - klog.V(2).Infof("TDBetaMeshes.Patch(%v, %v, %v, ...): key is invalid (%#v)", ctx, key, opts, key) - return fmt.Errorf("invalid GCE key (%+v)", key) - } - projectID := getProjectID(ctx, g.s.ProjectRouter, opts, "beta", "Meshes") - ck := &CallContextKey{ - ProjectID: projectID, - Operation: "Patch", - Version: meta.Version("beta"), - Service: "Meshes", - } - klog.V(5).Infof("TDBetaMeshes.Patch(%v, %v, ...): projectID = %v, ck = %+v", ctx, key, projectID, ck) - callObserverStart(ctx, ck) - if err := g.s.RateLimiter.Accept(ctx, ck); err != nil { - klog.V(4).Infof("TDBetaMeshes.Patch(%v, %v, ...): RateLimiter error: %v", ctx, key, err) - return err - } - name := fmt.Sprintf("projects/%s/locations/global/meshes/%s", projectID, key.Name) - call := g.s.NetworkServicesBeta.Meshes.Patch(name, arg0) - call.Context(ctx) - op, err := call.Do() - - if err != nil { - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) - - klog.V(4).Infof("TDBetaMeshes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err - } - - err = g.s.WaitForCompletion(ctx, op) - callObserverEnd(ctx, ck, err) - g.s.RateLimiter.Observe(ctx, err, ck) // XXX - - klog.V(4).Infof("TDBetaMeshes.Patch(%v, %v, ...) = %+v", ctx, key, err) - return err -} - -// NewAddressesResourceID creates a ResourceID for the Addresses resource. -func NewAddressesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "addresses", key} -} - -// NewBackendServicesResourceID creates a ResourceID for the BackendServices resource. -func NewBackendServicesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "backendServices", key} -} - -// NewDisksResourceID creates a ResourceID for the Disks resource. -func NewDisksResourceID(project, zone, name string) *ResourceID { - key := meta.ZonalKey(name, zone) - return &ResourceID{project, "compute", "disks", key} -} - -// NewFirewallsResourceID creates a ResourceID for the Firewalls resource. -func NewFirewallsResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "firewalls", key} -} - -// NewForwardingRulesResourceID creates a ResourceID for the ForwardingRules resource. -func NewForwardingRulesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "forwardingRules", key} -} - -// NewGlobalAddressesResourceID creates a ResourceID for the GlobalAddresses resource. -func NewGlobalAddressesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "addresses", key} -} - -// NewGlobalForwardingRulesResourceID creates a ResourceID for the GlobalForwardingRules resource. -func NewGlobalForwardingRulesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "forwardingRules", key} -} - -// NewGlobalNetworkEndpointGroupsResourceID creates a ResourceID for the GlobalNetworkEndpointGroups resource. -func NewGlobalNetworkEndpointGroupsResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "networkEndpointGroups", key} -} - -// NewHealthChecksResourceID creates a ResourceID for the HealthChecks resource. -func NewHealthChecksResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "healthChecks", key} -} - -// NewHttpHealthChecksResourceID creates a ResourceID for the HttpHealthChecks resource. -func NewHttpHealthChecksResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "httpHealthChecks", key} -} - -// NewHttpsHealthChecksResourceID creates a ResourceID for the HttpsHealthChecks resource. -func NewHttpsHealthChecksResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "httpsHealthChecks", key} -} - -// NewImagesResourceID creates a ResourceID for the Images resource. -func NewImagesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "Images", key} -} - -// NewInstanceGroupManagersResourceID creates a ResourceID for the InstanceGroupManagers resource. -func NewInstanceGroupManagersResourceID(project, zone, name string) *ResourceID { - key := meta.ZonalKey(name, zone) - return &ResourceID{project, "compute", "instanceGroupManagers", key} -} - -// NewInstanceGroupsResourceID creates a ResourceID for the InstanceGroups resource. -func NewInstanceGroupsResourceID(project, zone, name string) *ResourceID { - key := meta.ZonalKey(name, zone) - return &ResourceID{project, "compute", "instanceGroups", key} -} - -// NewInstanceTemplatesResourceID creates a ResourceID for the InstanceTemplates resource. -func NewInstanceTemplatesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "instanceTemplates", key} -} - -// NewInstancesResourceID creates a ResourceID for the Instances resource. -func NewInstancesResourceID(project, zone, name string) *ResourceID { - key := meta.ZonalKey(name, zone) - return &ResourceID{project, "compute", "instances", key} -} - -// NewMeshesResourceID creates a ResourceID for the Meshes resource. -func NewMeshesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "networkservices", "meshes", key} -} - -// NewNetworkEndpointGroupsResourceID creates a ResourceID for the NetworkEndpointGroups resource. -func NewNetworkEndpointGroupsResourceID(project, zone, name string) *ResourceID { - key := meta.ZonalKey(name, zone) - return &ResourceID{project, "compute", "networkEndpointGroups", key} -} - -// NewNetworkFirewallPoliciesResourceID creates a ResourceID for the NetworkFirewallPolicies resource. -func NewNetworkFirewallPoliciesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "networkFirewallPolicies", key} -} - -// NewNetworksResourceID creates a ResourceID for the Networks resource. -func NewNetworksResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "networks", key} -} - -// NewProjectsResourceID creates a ResourceID for the Projects resource. -func NewProjectsResourceID(project string) *ResourceID { - var key *meta.Key - return &ResourceID{project, "compute", "projects", key} -} - -// NewRegionBackendServicesResourceID creates a ResourceID for the RegionBackendServices resource. -func NewRegionBackendServicesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "backendServices", key} -} - -// NewRegionDisksResourceID creates a ResourceID for the RegionDisks resource. -func NewRegionDisksResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "disks", key} -} - -// NewRegionHealthChecksResourceID creates a ResourceID for the RegionHealthChecks resource. -func NewRegionHealthChecksResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "healthChecks", key} -} - -// NewRegionNetworkFirewallPoliciesResourceID creates a ResourceID for the RegionNetworkFirewallPolicies resource. -func NewRegionNetworkFirewallPoliciesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "regionNetworkFirewallPolicies", key} -} - -// NewRegionSslCertificatesResourceID creates a ResourceID for the RegionSslCertificates resource. -func NewRegionSslCertificatesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "sslCertificates", key} -} - -// NewRegionSslPoliciesResourceID creates a ResourceID for the RegionSslPolicies resource. -func NewRegionSslPoliciesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "sslPolicies", key} -} - -// NewRegionTargetHttpProxiesResourceID creates a ResourceID for the RegionTargetHttpProxies resource. -func NewRegionTargetHttpProxiesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "targetHttpProxies", key} -} - -// NewRegionTargetHttpsProxiesResourceID creates a ResourceID for the RegionTargetHttpsProxies resource. -func NewRegionTargetHttpsProxiesResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "targetHttpsProxies", key} -} - -// NewRegionUrlMapsResourceID creates a ResourceID for the RegionUrlMaps resource. -func NewRegionUrlMapsResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "urlMaps", key} -} - -// NewRegionsResourceID creates a ResourceID for the Regions resource. -func NewRegionsResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "regions", key} -} - -// NewRoutersResourceID creates a ResourceID for the Routers resource. -func NewRoutersResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "routers", key} -} - -// NewRoutesResourceID creates a ResourceID for the Routes resource. -func NewRoutesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "routes", key} -} - -// NewSecurityPoliciesResourceID creates a ResourceID for the SecurityPolicies resource. -func NewSecurityPoliciesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "securityPolicies", key} -} - -// NewServiceAttachmentsResourceID creates a ResourceID for the ServiceAttachments resource. -func NewServiceAttachmentsResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "serviceAttachments", key} -} - -// NewSslCertificatesResourceID creates a ResourceID for the SslCertificates resource. -func NewSslCertificatesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "sslCertificates", key} -} - -// NewSslPoliciesResourceID creates a ResourceID for the SslPolicies resource. -func NewSslPoliciesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "sslPolicies", key} -} - -// NewSubnetworksResourceID creates a ResourceID for the Subnetworks resource. -func NewSubnetworksResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "subnetworks", key} -} - -// NewTargetHttpProxiesResourceID creates a ResourceID for the TargetHttpProxies resource. -func NewTargetHttpProxiesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "targetHttpProxies", key} -} - -// NewTargetHttpsProxiesResourceID creates a ResourceID for the TargetHttpsProxies resource. -func NewTargetHttpsProxiesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "targetHttpsProxies", key} -} - -// NewTargetPoolsResourceID creates a ResourceID for the TargetPools resource. -func NewTargetPoolsResourceID(project, region, name string) *ResourceID { - key := meta.RegionalKey(name, region) - return &ResourceID{project, "compute", "targetPools", key} -} - -// NewTargetTcpProxiesResourceID creates a ResourceID for the TargetTcpProxies resource. -func NewTargetTcpProxiesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "targetTcpProxies", key} -} - -// NewTcpRoutesResourceID creates a ResourceID for the TcpRoutes resource. -func NewTcpRoutesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "networkservices", "tcpRoutes", key} -} - -// NewUrlMapsResourceID creates a ResourceID for the UrlMaps resource. -func NewUrlMapsResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "urlMaps", key} -} - -// NewZonesResourceID creates a ResourceID for the Zones resource. -func NewZonesResourceID(project, name string) *ResourceID { - key := meta.GlobalKey(name) - return &ResourceID{project, "compute", "zones", key} -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/compute_services.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/compute_services.go deleted file mode 100644 index dd1a43cd6305e..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/compute_services.go +++ /dev/null @@ -1,1125 +0,0 @@ -/* -Copyright 2023 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "reflect" - - alpha "google.golang.org/api/compute/v0.alpha" - beta "google.golang.org/api/compute/v0.beta" - ga "google.golang.org/api/compute/v1" -) - -func init() { - for _, s := range ComputeServices { - s.APIGroup = APIGroupCompute - } - AllServices = append(AllServices, ComputeServices...) -} - -var ComputeServices = []*ServiceInfo{ - { - Object: "Address", - Service: "Addresses", - Resource: "addresses", - keyType: Regional, - serviceType: reflect.TypeOf(&ga.AddressesService{}), - options: AggregatedList, - }, - { - Object: "Address", - Service: "Addresses", - Resource: "addresses", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.AddressesService{}), - options: AggregatedList, - }, - { - Object: "Address", - Service: "Addresses", - Resource: "addresses", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.AddressesService{}), - options: AggregatedList, - }, - { - Object: "Address", - Service: "GlobalAddresses", - Resource: "addresses", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.GlobalAddressesService{}), - }, - { - Object: "Address", - Service: "GlobalAddresses", - Resource: "addresses", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.GlobalAddressesService{}), - }, - { - Object: "Address", - Service: "GlobalAddresses", - Resource: "addresses", - keyType: Global, - serviceType: reflect.TypeOf(&ga.GlobalAddressesService{}), - }, - { - Object: "BackendService", - Service: "BackendServices", - Resource: "backendServices", - keyType: Global, - serviceType: reflect.TypeOf(&ga.BackendServicesService{}), - additionalMethods: []string{ - "GetHealth", - "Patch", - "Update", - "SetSecurityPolicy", - "AddSignedUrlKey", - "DeleteSignedUrlKey", - }, - options: AggregatedList, - }, - { - Object: "BackendService", - Service: "BackendServices", - Resource: "backendServices", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.BackendServicesService{}), - additionalMethods: []string{ - "Patch", - "Update", - "SetSecurityPolicy", - "AddSignedUrlKey", - "DeleteSignedUrlKey", - }, - options: AggregatedList, - }, - { - Object: "BackendService", - Service: "BackendServices", - Resource: "backendServices", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.BackendServicesService{}), - additionalMethods: []string{ - "Patch", - "Update", - "SetSecurityPolicy", - "AddSignedUrlKey", - "DeleteSignedUrlKey", - }, - options: AggregatedList, - }, - { - Object: "BackendService", - Service: "RegionBackendServices", - Resource: "backendServices", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionBackendServicesService{}), - additionalMethods: []string{ - "GetHealth", - "Patch", - "Update", - }, - }, - { - Object: "BackendService", - Service: "RegionBackendServices", - Resource: "backendServices", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionBackendServicesService{}), - additionalMethods: []string{ - "GetHealth", - "Patch", - "Update", - }, - }, - { - Object: "BackendService", - Service: "RegionBackendServices", - Resource: "backendServices", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionBackendServicesService{}), - additionalMethods: []string{ - "GetHealth", - "Patch", - "Update", - }, - }, - { - Object: "Disk", - Service: "Disks", - Resource: "disks", - keyType: Zonal, - serviceType: reflect.TypeOf(&ga.DisksService{}), - additionalMethods: []string{ - "Resize", - }, - }, - { - Object: "Disk", - Service: "RegionDisks", - Resource: "disks", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionDisksService{}), - additionalMethods: []string{ - "Resize", - }, - }, - { - Object: "Firewall", - Service: "Firewalls", - Resource: "firewalls", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.FirewallsService{}), - additionalMethods: []string{ - "Update", - "Patch", - }, - }, - { - Object: "Firewall", - Service: "Firewalls", - Resource: "firewalls", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.FirewallsService{}), - additionalMethods: []string{ - "Update", - "Patch", - }, - }, - { - Object: "Firewall", - Service: "Firewalls", - Resource: "firewalls", - keyType: Global, - serviceType: reflect.TypeOf(&ga.FirewallsService{}), - additionalMethods: []string{ - "Update", - "Patch", - }, - }, - { - Object: "FirewallPolicy", - Service: "NetworkFirewallPolicies", - Resource: "networkFirewallPolicies", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.NetworkFirewallPoliciesService{}), - additionalMethods: []string{ - "Patch", - "GetRule", - "AddRule", - "PatchRule", - "CloneRules", - "RemoveRule", - "GetAssociation", - "AddAssociation", - "RemoveAssociation", - "GetIamPolicy", - "SetIamPolicy", - "TestIamPermissions", - }, - }, - { - Object: "FirewallPolicy", - Service: "RegionNetworkFirewallPolicies", - Resource: "regionNetworkFirewallPolicies", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionNetworkFirewallPoliciesService{}), - additionalMethods: []string{ - "Patch", - "GetRule", - "AddRule", - "PatchRule", - "CloneRules", - "RemoveRule", - "GetAssociation", - "AddAssociation", - "RemoveAssociation", - "GetIamPolicy", - "SetIamPolicy", - "TestIamPermissions", - }, - }, - { - Object: "ForwardingRule", - Service: "ForwardingRules", - Resource: "forwardingRules", - keyType: Regional, - serviceType: reflect.TypeOf(&ga.ForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "ForwardingRule", - Service: "ForwardingRules", - Resource: "forwardingRules", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.ForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "ForwardingRule", - Service: "ForwardingRules", - Resource: "forwardingRules", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.ForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "ForwardingRule", - Service: "GlobalForwardingRules", - Resource: "forwardingRules", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.GlobalForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "ForwardingRule", - Service: "GlobalForwardingRules", - Resource: "forwardingRules", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.GlobalForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "ForwardingRule", - Service: "GlobalForwardingRules", - Resource: "forwardingRules", - keyType: Global, - serviceType: reflect.TypeOf(&ga.GlobalForwardingRulesService{}), - additionalMethods: []string{ - "SetTarget", - "SetLabels", - }, - }, - { - Object: "HealthCheck", - Service: "HealthChecks", - Resource: "healthChecks", - keyType: Global, - serviceType: reflect.TypeOf(&ga.HealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HealthCheck", - Service: "HealthChecks", - Resource: "healthChecks", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.HealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HealthCheck", - Service: "HealthChecks", - Resource: "healthChecks", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.HealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HealthCheck", - Service: "RegionHealthChecks", - Resource: "healthChecks", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionHealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HealthCheck", - Service: "RegionHealthChecks", - Resource: "healthChecks", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionHealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HealthCheck", - Service: "RegionHealthChecks", - Resource: "healthChecks", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionHealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HttpHealthCheck", - Service: "HttpHealthChecks", - Resource: "httpHealthChecks", - keyType: Global, - serviceType: reflect.TypeOf(&ga.HttpHealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "HttpsHealthCheck", - Service: "HttpsHealthChecks", - Resource: "httpsHealthChecks", - keyType: Global, - serviceType: reflect.TypeOf(&ga.HttpsHealthChecksService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "InstanceGroup", - Service: "InstanceGroups", - Resource: "instanceGroups", - keyType: Zonal, - serviceType: reflect.TypeOf(&ga.InstanceGroupsService{}), - additionalMethods: []string{ - "AddInstances", - "ListInstances", - "RemoveInstances", - "SetNamedPorts", - }, - }, - { - Object: "Instance", - Service: "Instances", - Resource: "instances", - keyType: Zonal, - serviceType: reflect.TypeOf(&ga.InstancesService{}), - additionalMethods: []string{ - "AttachDisk", - "DetachDisk", - }, - }, - { - Object: "Instance", - Service: "Instances", - Resource: "instances", - version: VersionBeta, - keyType: Zonal, - serviceType: reflect.TypeOf(&beta.InstancesService{}), - additionalMethods: []string{ - "AttachDisk", - "DetachDisk", - "UpdateNetworkInterface", - }, - }, - { - Object: "Instance", - Service: "Instances", - Resource: "instances", - version: VersionAlpha, - keyType: Zonal, - serviceType: reflect.TypeOf(&alpha.InstancesService{}), - additionalMethods: []string{ - "AttachDisk", - "DetachDisk", - "UpdateNetworkInterface", - }, - }, - { - Object: "InstanceGroupManager", - Service: "InstanceGroupManagers", - Resource: "instanceGroupManagers", - keyType: Zonal, - serviceType: reflect.TypeOf(&ga.InstanceGroupManagersService{}), - additionalMethods: []string{ - "CreateInstances", - "DeleteInstances", - "Resize", - "SetInstanceTemplate", - }, - }, - { - Object: "InstanceTemplate", - Service: "InstanceTemplates", - Resource: "instanceTemplates", - keyType: Global, - serviceType: reflect.TypeOf(&ga.InstanceTemplatesService{}), - }, - { - Object: "Image", - Service: "Images", - Resource: "Images", - keyType: Global, - serviceType: reflect.TypeOf(&ga.ImagesService{}), - additionalMethods: []string{ - "GetFromFamily", - "GetIamPolicy", - "Patch", - "SetIamPolicy", - "SetLabels", - "TestIamPermissions", - }, - }, - { - Object: "Image", - Service: "Images", - Resource: "Images", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.ImagesService{}), - additionalMethods: []string{ - "GetFromFamily", - "GetIamPolicy", - "Patch", - "SetIamPolicy", - "SetLabels", - "TestIamPermissions", - }, - }, - { - Object: "Image", - Service: "Images", - Resource: "Images", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.ImagesService{}), - additionalMethods: []string{ - "GetFromFamily", - "GetIamPolicy", - "Patch", - "SetIamPolicy", - "SetLabels", - "TestIamPermissions", - }, - }, - { - Object: "Network", - Service: "Networks", - Resource: "networks", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.NetworksService{}), - }, - { - Object: "Network", - Service: "Networks", - Resource: "networks", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.NetworksService{}), - }, - { - Object: "Network", - Service: "Networks", - Resource: "networks", - version: VersionGA, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.NetworksService{}), - }, - { - Object: "NetworkEndpointGroup", - Service: "NetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionAlpha, - keyType: Zonal, - serviceType: reflect.TypeOf(&alpha.NetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - options: AggregatedList, - }, - { - Object: "NetworkEndpointGroup", - Service: "NetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionBeta, - keyType: Zonal, - serviceType: reflect.TypeOf(&beta.NetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - options: AggregatedList, - }, - { - Object: "NetworkEndpointGroup", - Service: "NetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionGA, - keyType: Zonal, - serviceType: reflect.TypeOf(&ga.NetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - options: AggregatedList, - }, - { - Object: "NetworkEndpointGroup", - Service: "GlobalNetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.GlobalNetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - }, - { - Object: "NetworkEndpointGroup", - Service: "GlobalNetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.GlobalNetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - }, - { - Object: "NetworkEndpointGroup", - Service: "GlobalNetworkEndpointGroups", - Resource: "networkEndpointGroups", - version: VersionGA, - keyType: Global, - serviceType: reflect.TypeOf(&ga.GlobalNetworkEndpointGroupsService{}), - additionalMethods: []string{ - "AttachNetworkEndpoints", - "DetachNetworkEndpoints", - "ListNetworkEndpoints", - }, - }, - { - Object: "Project", - Service: "Projects", - Resource: "projects", - keyType: Global, - // Generate only the stub with no methods. - options: NoGet | NoList | NoInsert | NoDelete | CustomOps, - serviceType: reflect.TypeOf(&ga.ProjectsService{}), - }, - { - Object: "Region", - Service: "Regions", - Resource: "regions", - keyType: Global, - options: ReadOnly, - serviceType: reflect.TypeOf(&ga.RegionsService{}), - }, - { - Object: "Router", - Service: "Routers", - Resource: "routers", - keyType: Regional, - version: VersionAlpha, - options: AggregatedList, - serviceType: reflect.TypeOf(&alpha.RoutersService{}), - additionalMethods: []string{ - "Patch", - "Preview", - "GetRouterStatus", - "TestIamPermissions", - }, - }, - { - Object: "Router", - Service: "Routers", - Resource: "routers", - keyType: Regional, - version: VersionBeta, - options: AggregatedList, - serviceType: reflect.TypeOf(&beta.RoutersService{}), - additionalMethods: []string{ - "Patch", - "Preview", - "GetRouterStatus", - "TestIamPermissions", - }, - }, - { - Object: "Router", - Service: "Routers", - Resource: "routers", - keyType: Regional, - version: VersionGA, - options: AggregatedList, - serviceType: reflect.TypeOf(&ga.RoutersService{}), - additionalMethods: []string{ - "Patch", - "Preview", - "GetRouterStatus", - }, - }, - { - Object: "Route", - Service: "Routes", - Resource: "routes", - keyType: Global, - serviceType: reflect.TypeOf(&ga.RoutesService{}), - }, - { - Object: "SecurityPolicy", - Service: "SecurityPolicies", - Resource: "securityPolicies", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.SecurityPoliciesService{}), - additionalMethods: []string{ - "AddRule", - "GetRule", - "Patch", - "PatchRule", - "RemoveRule", - }, - }, - { - Object: "ServiceAttachment", - Service: "ServiceAttachments", - Resource: "serviceAttachments", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.ServiceAttachmentsService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "ServiceAttachment", - Service: "ServiceAttachments", - Resource: "serviceAttachments", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.ServiceAttachmentsService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "ServiceAttachment", - Service: "ServiceAttachments", - Resource: "serviceAttachments", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.ServiceAttachmentsService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "SslCertificate", - Service: "SslCertificates", - Resource: "sslCertificates", - keyType: Global, - serviceType: reflect.TypeOf(&ga.SslCertificatesService{}), - }, - { - Object: "SslCertificate", - Service: "SslCertificates", - Resource: "sslCertificates", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.SslCertificatesService{}), - }, - { - Object: "SslCertificate", - Service: "SslCertificates", - Resource: "sslCertificates", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.SslCertificatesService{}), - }, - { - Object: "SslCertificate", - Service: "RegionSslCertificates", - Resource: "sslCertificates", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionSslCertificatesService{}), - }, - { - Object: "SslCertificate", - Service: "RegionSslCertificates", - Resource: "sslCertificates", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionSslCertificatesService{}), - }, - { - Object: "SslCertificate", - Service: "RegionSslCertificates", - Resource: "sslCertificates", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionSslCertificatesService{}), - }, - { - Object: "SslPolicy", - Service: "SslPolicies", - Resource: "sslPolicies", - keyType: Global, - serviceType: reflect.TypeOf(&ga.SslPoliciesService{}), - options: NoList, // List() naming convention is different in GCE API for this resource - }, - { - Object: "SslPolicy", - Service: "RegionSslPolicies", - Resource: "sslPolicies", - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionSslPoliciesService{}), - options: NoList, // List() naming convention is different in GCE API for this resource - }, - { - Object: "Subnetwork", - Service: "Subnetworks", - Resource: "subnetworks", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.SubnetworksService{}), - options: ListUsable, - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "Subnetwork", - Service: "Subnetworks", - Resource: "subnetworks", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.SubnetworksService{}), - options: ListUsable, - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "Subnetwork", - Service: "Subnetworks", - Resource: "subnetworks", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.SubnetworksService{}), - options: ListUsable, - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "TargetHttpProxy", - Service: "TargetHttpProxies", - Resource: "targetHttpProxies", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.TargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpProxy", - Service: "TargetHttpProxies", - Resource: "targetHttpProxies", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.TargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpProxy", - Service: "TargetHttpProxies", - Resource: "targetHttpProxies", - keyType: Global, - serviceType: reflect.TypeOf(&ga.TargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpProxy", - Service: "RegionTargetHttpProxies", - Resource: "targetHttpProxies", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionTargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpProxy", - Service: "RegionTargetHttpProxies", - Resource: "targetHttpProxies", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionTargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpProxy", - Service: "RegionTargetHttpProxies", - Resource: "targetHttpProxies", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionTargetHttpProxiesService{}), - additionalMethods: []string{ - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "TargetHttpsProxies", - Resource: "targetHttpsProxies", - keyType: Global, - serviceType: reflect.TypeOf(&ga.TargetHttpsProxiesService{}), - additionalMethods: []string{ - "SetCertificateMap", - "SetSslCertificates", - "SetSslPolicy", - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "TargetHttpsProxies", - Resource: "targetHttpsProxies", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.TargetHttpsProxiesService{}), - additionalMethods: []string{ - "SetCertificateMap", - "SetSslCertificates", - "SetSslPolicy", - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "TargetHttpsProxies", - Resource: "targetHttpsProxies", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.TargetHttpsProxiesService{}), - additionalMethods: []string{ - "SetCertificateMap", - "SetSslCertificates", - "SetSslPolicy", - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "RegionTargetHttpsProxies", - Resource: "targetHttpsProxies", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionTargetHttpsProxiesService{}), - additionalMethods: []string{ - "Patch", - "SetSslCertificates", - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "RegionTargetHttpsProxies", - Resource: "targetHttpsProxies", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionTargetHttpsProxiesService{}), - additionalMethods: []string{ - "Patch", - "SetSslCertificates", - "SetUrlMap", - }, - }, - { - Object: "TargetHttpsProxy", - Service: "RegionTargetHttpsProxies", - Resource: "targetHttpsProxies", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionTargetHttpsProxiesService{}), - additionalMethods: []string{ - "Patch", - "SetSslCertificates", - "SetUrlMap", - }, - }, - { - Object: "TargetPool", - Service: "TargetPools", - Resource: "targetPools", - keyType: Regional, - serviceType: reflect.TypeOf(&ga.TargetPoolsService{}), - additionalMethods: []string{ - "AddInstance", - "RemoveInstance", - }, - }, - { - Object: "TargetTcpProxy", - Service: "TargetTcpProxies", - Resource: "targetTcpProxies", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.TargetTcpProxiesService{}), - additionalMethods: []string{ - "SetBackendService", - }, - }, - { - Object: "TargetTcpProxy", - Service: "TargetTcpProxies", - Resource: "targetTcpProxies", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.TargetTcpProxiesService{}), - additionalMethods: []string{ - "SetBackendService", - }, - }, - { - Object: "TargetTcpProxy", - Service: "TargetTcpProxies", - Resource: "targetTcpProxies", - version: VersionGA, - keyType: Global, - serviceType: reflect.TypeOf(&ga.TargetTcpProxiesService{}), - additionalMethods: []string{ - "SetBackendService", - }, - }, - { - Object: "UrlMap", - Service: "UrlMaps", - Resource: "urlMaps", - version: VersionAlpha, - keyType: Global, - serviceType: reflect.TypeOf(&alpha.UrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "UrlMap", - Service: "UrlMaps", - Resource: "urlMaps", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.UrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "UrlMap", - Service: "UrlMaps", - Resource: "urlMaps", - keyType: Global, - serviceType: reflect.TypeOf(&ga.UrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "UrlMap", - Service: "RegionUrlMaps", - Resource: "urlMaps", - version: VersionAlpha, - keyType: Regional, - serviceType: reflect.TypeOf(&alpha.RegionUrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "UrlMap", - Service: "RegionUrlMaps", - Resource: "urlMaps", - version: VersionBeta, - keyType: Regional, - serviceType: reflect.TypeOf(&beta.RegionUrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "UrlMap", - Service: "RegionUrlMaps", - Resource: "urlMaps", - version: VersionGA, - keyType: Regional, - serviceType: reflect.TypeOf(&ga.RegionUrlMapsService{}), - additionalMethods: []string{ - "Update", - }, - }, - { - Object: "Zone", - Service: "Zones", - Resource: "zones", - keyType: Global, - options: ReadOnly, - serviceType: reflect.TypeOf(&ga.ZonesService{}), - }, -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/doc.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/doc.go deleted file mode 100644 index 7633da38a059d..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package meta contains the meta description of the GCE cloud types to -// generate code for. -package meta diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/key.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/key.go deleted file mode 100644 index b6a94ba062c78..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/key.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - "regexp" -) - -// Key for a GCP resource. -type Key struct { - Name string - Zone string - Region string -} - -// KeyType is the type of the key. -type KeyType string - -const ( - // Zonal key type. - Zonal = "zonal" - // Regional key type. - Regional = "regional" - // Global key type. - Global = "global" -) - -var ( - // locationRegexp is the format of regions/zone names in GCE. - locationRegexp = regexp.MustCompile("^[a-z](?:[-a-z0-9]+)?$") -) - -// ZonalKey returns the key for a zonal resource. -func ZonalKey(name, zone string) *Key { - return &Key{name, zone, ""} -} - -// RegionalKey returns the key for a regional resource. -func RegionalKey(name, region string) *Key { - return &Key{name, "", region} -} - -// GlobalKey returns the key for a global resource. -func GlobalKey(name string) *Key { - return &Key{name, "", ""} -} - -// Type returns the type of the key. -func (k *Key) Type() KeyType { - switch { - case k.Zone != "": - return Zonal - case k.Region != "": - return Regional - default: - return Global - } -} - -// String returns a string representation of the key. -func (k Key) String() string { - switch k.Type() { - case Zonal: - return fmt.Sprintf("Key{%q, zone: %q}", k.Name, k.Zone) - case Regional: - return fmt.Sprintf("Key{%q, region: %q}", k.Name, k.Region) - default: - return fmt.Sprintf("Key{%q}", k.Name) - } -} - -// Valid is true if the key is valid. -func (k *Key) Valid() bool { - if k.Zone != "" && k.Region != "" { - return false - } - switch { - case k.Region != "": - return locationRegexp.Match([]byte(k.Region)) - case k.Zone != "": - return locationRegexp.Match([]byte(k.Zone)) - } - return true -} - -// KeysToMap creates a map[Key]bool from a list of keys. -func KeysToMap(keys ...Key) map[Key]bool { - ret := map[Key]bool{} - for _, k := range keys { - ret[k] = true - } - return ret -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go deleted file mode 100644 index 58809ff76e486..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -const ( - // NoGet prevents the Get() method from being generated. - NoGet = 1 << iota - // NoList prevents the List() method from being generated. - NoList = 1 << iota - // NoDelete prevents the Delete() method from being generated. - NoDelete = 1 << iota - // NoInsert prevents the Insert() method from being generated. - NoInsert = 1 << iota - // CustomOps specifies that an empty interface xxxOps will be generated to - // enable custom method calls to be attached to the generated service - // interface. - CustomOps = 1 << iota - // AggregatedList will generated a method for AggregatedList(). - AggregatedList = 1 << iota - // ListUsable will generate a method for ListUsable(). - ListUsable = 1 << iota - - // ReadOnly specifies that the given resource is read-only and should not - // have insert() or delete() methods generated for the wrapper. - ReadOnly = NoDelete | NoInsert -) - -// Version of the API (ga, alpha, beta). -type Version string - -const ( - // VersionGA is the GA API version. - VersionGA Version = "ga" - // VersionAlpha is the alpha API version. - VersionAlpha Version = "alpha" - // VersionBeta is the beta API version. - VersionBeta Version = "beta" -) - -// APIGroup is the API Group of the resource. When unspecified, "compute" is assumed. -type APIGroup string - -const ( - // APIGroupCompute is the compute API group. - APIGroupCompute APIGroup = "compute" - - // APIGroupNetworkServices is the networkservices API group. - APIGroupNetworkServices APIGroup = "networkservices" -) - -// AllVersions is a list of all versions of the GCP APIs. -var AllVersions = []Version{ - VersionGA, - VersionAlpha, - VersionBeta, -} - -// AllServices are a list of all the services to generate code for. Keep -// this list in lexicographical order by object type. -var AllServices = []*ServiceInfo{} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/method.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/method.go deleted file mode 100644 index ff3e6f38d88b0..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/method.go +++ /dev/null @@ -1,345 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - "reflect" - "strings" -) - -func newArg(t reflect.Type) *arg { - ret := &arg{} - - // Dereference the pointer types to get at the underlying concrete type. -Loop: - for { - switch t.Kind() { - case reflect.Pointer: - ret.numPtr++ - t = t.Elem() - default: - ret.pkg = t.PkgPath() - ret.typeName += t.Name() - break Loop - } - } - return ret -} - -type arg struct { - pkg, typeName string - numPtr int -} - -func (a *arg) normalizedPkg() string { - if a.pkg == "" { - return "" - } - - // Strip the repo.../vendor/ prefix from the package path if present. - parts := strings.Split(a.pkg, "/") - // Remove vendor prefix. - for i := 0; i < len(parts); i++ { - if parts[i] == "vendor" { - parts = parts[i+1:] - break - } - } - switch strings.Join(parts, "/") { - case "google.golang.org/api/compute/v1": - return "computega." - case "google.golang.org/api/compute/v0.alpha": - return "computealpha." - case "google.golang.org/api/compute/v0.beta": - return "computebeta." - case "google.golang.org/api/networkservices/v1": - return "networkservicesga." - case "google.golang.org/api/networkservices/v1beta1": - return "networkservicesbeta." - default: - panic(fmt.Errorf("unhandled package %q", a.pkg)) - } -} - -func (a *arg) String() string { - var ret string - for i := 0; i < a.numPtr; i++ { - ret += "*" - } - ret += a.normalizedPkg() - ret += a.typeName - return ret -} - -// newMethod returns a newly initialized method. -func newMethod(s *ServiceInfo, m reflect.Method) *Method { - ret := &Method{ - ServiceInfo: s, - m: m, - kind: MethodOperation, - ReturnType: "", - } - ret.init() - return ret -} - -// MethodKind is the type of method that we are generated code for. -type MethodKind int - -const ( - // MethodOperation is a long running method that returns an operation. - MethodOperation MethodKind = iota - // MethodGet is a method that immediately returns some data. - MethodGet MethodKind = iota - // MethodPaged is a method that returns a paged set of data. - MethodPaged MethodKind = iota -) - -// Method is used to generate the calling code for non-standard methods. -type Method struct { - *ServiceInfo - m reflect.Method - - kind MethodKind - // ReturnType is the return type for the method. - ReturnType string - // ItemType is the type of the individual elements returns from a - // Pages() call. This is only applicable for MethodPaged kind. - ItemType string -} - -// IsOperation is true if the method is an Operation. -func (m *Method) IsOperation() bool { - return m.kind == MethodOperation -} - -// IsPaged is true if the method paged. -func (m *Method) IsPaged() bool { - return m.kind == MethodPaged -} - -// IsGet is true if the method simple get. -func (m *Method) IsGet() bool { - return m.kind == MethodGet -} - -// argsSkip is the number of arguments to skip when generating the -// synthesized method. -func (m *Method) argsSkip() int { - if m.ServiceInfo.APIGroup == APIGroupNetworkServices { - return 2 - } - switch m.keyType { - case Zonal: - return 4 - case Regional: - return 4 - case Global: - return 3 - } - panic(fmt.Errorf("invalid KeyType %v", m.keyType)) -} - -// args return a list of arguments to the method, skipping the first skip -// elements. If nameArgs is true, then the arguments will include a generated -// parameter name (arg). prefix will be added to the parameters. -func (m *Method) args(skip int, nameArgs bool, prefix []string) []string { - var args []*arg - fType := m.m.Func.Type() - for i := 0; i < fType.NumIn(); i++ { - t := fType.In(i) - args = append(args, newArg(t)) - } - - var a []string - for i := skip; i < fType.NumIn(); i++ { - if nameArgs { - a = append(a, fmt.Sprintf("arg%d %s", i-skip, args[i])) - } else { - a = append(a, args[i].String()) - } - } - return append(prefix, a...) -} - -// init the method. This performs some rudimentary static checking as well as -// determines the kind of method by looking at the shape (method signature) of -// the object. -func (m *Method) init() { - fType := m.m.Func.Type() - if fType.NumIn() < m.argsSkip() { - err := fmt.Errorf("method %q.%q, arity = %d which is less than required (< %d)", - m.Service, m.Name(), fType.NumIn(), m.argsSkip()) - panic(err) - } - // Skipped args should all be string (they will be projectID, zone, region etc). - for i := 1; i < m.argsSkip(); i++ { - if fType.In(i).Kind() != reflect.String { - panic(fmt.Errorf("method %q.%q: skipped args can only be strings", m.Service, m.Name())) - } - } - // Return of the method must return a single value of type *xxxCall. - if fType.NumOut() != 1 || fType.Out(0).Kind() != reflect.Pointer || !strings.HasSuffix(fType.Out(0).Elem().Name(), "Call") { - panic(fmt.Errorf("method %q.%q: generator only supports methods returning an *xxxCall object", - m.Service, m.Name())) - } - returnType := fType.Out(0) - returnTypeName := fType.Out(0).Elem().Name() - // xxxCall must have a Do() method. - doMethod, ok := returnType.MethodByName("Do") - if !ok { - panic(fmt.Errorf("method %q.%q: return type %q does not have a Do() method", - m.Service, m.Name(), returnTypeName)) - } - _, hasPages := returnType.MethodByName("Pages") - // Do() method must return (*T, error). - switch doMethod.Func.Type().NumOut() { - case 2: - out0 := doMethod.Func.Type().Out(0) - if out0.Kind() != reflect.Pointer { - panic(fmt.Errorf("method %q.%q: return type %q of Do() = S, _; S must be pointer type (%v)", - m.Service, m.Name(), returnTypeName, out0)) - } - m.ReturnType = out0.Elem().Name() - switch { - case out0.Elem().Name() == "Operation": - m.kind = MethodOperation - case hasPages: - m.kind = MethodPaged - // Pages() returns a xxxList that has the actual list - // of objects in the xxxList.Items field. - listType := out0.Elem() - itemsField, ok := listType.FieldByName("Items") - if !ok { - panic(fmt.Errorf("method %q.%q: paged return type %q does not have a .Items field", m.Service, m.Name(), listType.Name())) - } - // itemsField will be a []*ItemType. Dereference to - // extract the ItemType. - itemsType := itemsField.Type - if itemsType.Kind() != reflect.Slice || itemsType.Elem().Kind() != reflect.Pointer { - panic(fmt.Errorf("method %q.%q: paged return type %q.Items is not an array of pointers", m.Service, m.Name(), listType.Name())) - } - m.ItemType = itemsType.Elem().Elem().Name() - default: - m.kind = MethodGet - } - // Second argument must be "error". - if doMethod.Func.Type().Out(1).Name() != "error" { - panic(fmt.Errorf("method %q.%q: return type %q of Do() = S, T; T must be 'error'", - m.Service, m.Name(), returnTypeName)) - } - default: - panic(fmt.Errorf("method %q.%q: %q Do() return type is not handled by the generator", - m.Service, m.Name(), returnTypeName)) - } -} - -// Name is the name of the method. -func (m *Method) Name() string { - return m.m.Name -} - -// CallArgs is a list of comma separated "argN" used for calling the method. -// For example, if the method has two additional arguments, this will return -// "arg0, arg1". -func (m *Method) CallArgs() string { - var args []string - for i := m.argsSkip(); i < m.m.Func.Type().NumIn(); i++ { - args = append(args, fmt.Sprintf("arg%d", i-m.argsSkip())) - } - if len(args) == 0 { - return "" - } - return fmt.Sprintf(", %s", strings.Join(args, ", ")) -} - -// MockHookName is the name of the hook function in the mock. -func (m *Method) MockHookName() string { - return m.m.Name + "Hook" -} - -// MockHook is the definition of the hook function. -func (m *Method) MockHook() string { - args := m.args(m.argsSkip(), false, []string{ - "context.Context", - "*meta.Key", - }) - if m.kind == MethodPaged { - args = append(args, "*filter.F") - } - args = append(args, fmt.Sprintf("*%s", m.MockWrapType())) - args = append(args, "...Option") - - switch m.kind { - case MethodOperation: - return fmt.Sprintf("%v func(%v) error", m.MockHookName(), strings.Join(args, ", ")) - case MethodGet: - return fmt.Sprintf("%v func(%v) (*%v%v.%v, error)", m.MockHookName(), strings.Join(args, ", "), m.APIGroup, m.Version(), m.ReturnType) - case MethodPaged: - return fmt.Sprintf("%v func(%v) ([]*%v%v.%v, error)", m.MockHookName(), strings.Join(args, ", "), m.APIGroup, m.Version(), m.ItemType) - default: - panic(fmt.Errorf("invalid method kind: %v", m.kind)) - } -} - -// FcnArgs is the function signature for the definition of the method. -func (m *Method) FcnArgs() string { - args := m.args(m.argsSkip(), true, []string{ - "ctx context.Context", - "key *meta.Key", - }) - if m.kind == MethodPaged { - args = append(args, "fl *filter.F") - } - args = append(args, "options ...Option") - - switch m.kind { - case MethodOperation: - return fmt.Sprintf("%v(%v) error", m.m.Name, strings.Join(args, ", ")) - case MethodGet: - return fmt.Sprintf("%v(%v) (*%v%v.%v, error)", m.m.Name, strings.Join(args, ", "), m.APIGroup, m.Version(), m.ReturnType) - case MethodPaged: - return fmt.Sprintf("%v(%v) ([]*%v%v.%v, error)", m.m.Name, strings.Join(args, ", "), m.APIGroup, m.Version(), m.ItemType) - default: - panic(fmt.Errorf("invalid method kind: %v", m.kind)) - } -} - -// InterfaceFunc is the function declaration of the method in the interface. -func (m *Method) InterfaceFunc() string { - args := []string{ - "context.Context", - "*meta.Key", - } - args = m.args(m.argsSkip(), false, args) - if m.kind == MethodPaged { - args = append(args, "*filter.F") - } - args = append(args, "...Option") - - switch m.kind { - case MethodOperation: - return fmt.Sprintf("%v(%v) error", m.m.Name, strings.Join(args, ", ")) - case MethodGet: - return fmt.Sprintf("%v(%v) (*%v%v.%v, error)", m.m.Name, strings.Join(args, ", "), m.APIGroup, m.Version(), m.ReturnType) - case MethodPaged: - return fmt.Sprintf("%v(%v) ([]*%v%v.%v, error)", m.m.Name, strings.Join(args, ", "), m.APIGroup, m.Version(), m.ItemType) - default: - panic(fmt.Errorf("invalid method kind: %v", m.kind)) - } -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/network_services.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/network_services.go deleted file mode 100644 index 85983bc0778e1..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/network_services.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2023 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "reflect" - - ga "google.golang.org/api/networkservices/v1" - beta "google.golang.org/api/networkservices/v1beta1" -) - -func init() { - for _, s := range NetworkServices { - s.APIGroup = APIGroupNetworkServices - } - AllServices = append(AllServices, NetworkServices...) -} - -var NetworkServices = []*ServiceInfo{ - { - Object: "TcpRoute", - Service: "TcpRoutes", - Resource: "tcpRoutes", - version: VersionGA, - keyType: Global, - serviceType: reflect.TypeOf(&ga.ProjectsLocationsTcpRoutesService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "TcpRoute", - Service: "TcpRoutes", - Resource: "tcpRoutes", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.ProjectsLocationsTcpRoutesService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "Mesh", - Service: "Meshes", - Resource: "meshes", - version: VersionGA, - keyType: Global, - serviceType: reflect.TypeOf(&ga.ProjectsLocationsMeshesService{}), - additionalMethods: []string{ - "Patch", - }, - }, - { - Object: "Mesh", - Service: "Meshes", - Resource: "meshes", - version: VersionBeta, - keyType: Global, - serviceType: reflect.TypeOf(&beta.ProjectsLocationsMeshesService{}), - additionalMethods: []string{ - "Patch", - }, - }, -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/service.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/service.go deleted file mode 100644 index 2602dc6c94aee..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/service.go +++ /dev/null @@ -1,362 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "errors" - "fmt" - "reflect" - "sort" - "unicode" -) - -// ServiceInfo defines the entry for a Service that code will be generated for. -type ServiceInfo struct { - // Object is the Go name of the object type that the service deals - // with. Example: "ForwardingRule". - Object string - // Service is the Go name of the service struct i.e. where the methods - // are defined. Examples: "GlobalForwardingRules". - Service string - // Resource is the plural noun of the resource in the API URL (e.g. - // "forwardingRules"). - Resource string - // APIGroup is the API group of the resource. - APIGroup APIGroup - // version if unspecified will be assumed to be VersionGA. - version Version - keyType KeyType - serviceType reflect.Type - - additionalMethods []string - options int - aggregatedListField string -} - -// Version returns the version of the Service, defaulting to GA if APIVersion -// is empty. -func (i *ServiceInfo) Version() Version { - if i.version == "" { - return VersionGA - } - return i.version -} - -// VersionTitle returns the capitalized golang CamelCase name for the version. -func (i *ServiceInfo) VersionTitle() string { - switch i.Version() { - case VersionGA: - return "GA" - case VersionAlpha: - return "Alpha" - case VersionBeta: - return "Beta" - } - panic(fmt.Errorf("invalid version %q", i.Version())) -} - -// GroupVersionTitle returns the capitalized golang CamelCase name for the API Group version. -func (i *ServiceInfo) GroupVersionTitle() string { - prefix := "" - if i.APIGroup == APIGroupNetworkServices { - prefix = "NetworkServices" - } - return prefix + i.VersionTitle() -} - -// WrapType is the name of the wrapper service type. -func (i *ServiceInfo) WrapType() string { - switch i.Version() { - case VersionGA: - return i.Service - case VersionAlpha: - return "Alpha" + i.Service - case VersionBeta: - return "Beta" + i.Service - } - return "Invalid" -} - -// WrapTypeOps is the name of the additional operations type. -func (i *ServiceInfo) WrapTypeOps() string { - return i.WrapType() + "Ops" -} - -// FQObjectType is fully qualified name of the object (e.g. compute.Instance). -func (i *ServiceInfo) FQObjectType() string { - return fmt.Sprintf("%v%v.%v", i.APIGroup, i.Version(), i.Object) -} - -// ObjectListType is the compute List type for the object (contains Items field). -func (i *ServiceInfo) ObjectListType() string { - if i.IsNetworkServices() { - return fmt.Sprintf("%v%v.List%vResponse", i.APIGroup, i.Version(), i.Service) - } - return fmt.Sprintf("%v%v.%vList", i.APIGroup, i.Version(), i.Object) -} - -// ObjectListType is the compute List type for the object (contains Items field). -func (i *ServiceInfo) ListItemName() string { - if i.IsNetworkServices() { - return i.Service - } - return "Items" -} - -func (i *ServiceInfo) NetworkServicesFmt() string { - var scope string - switch i.keyType { - case Global: - scope = "global" - } - - runes := []rune(i.Service) - serviceLower := append([]rune{unicode.ToLower(runes[0])}, runes[1:]...) - - return `projects/%s/locations/` + scope + `/` + string(serviceLower) + `/%s` -} - -// ObjectAggregatedListType is the compute List type for the object (contains Items field). -func (i *ServiceInfo) ObjectAggregatedListType() string { - return fmt.Sprintf("%v%v.%vAggregatedList", i.APIGroup, i.Version(), i.Object) -} - -// ObjectListUsableType is the compute List type for the object (contains Items field). -func (i *ServiceInfo) ObjectListUsableType() string { - return fmt.Sprintf("%v%v.Usable%vAggregatedList", i.APIGroup, i.version, i.Service) -} - -// FQListUsableObjectType is fully qualified name of the object (e.g. compute.Instance). -func (i *ServiceInfo) FQListUsableObjectType() string { - return fmt.Sprintf("%v%v.Usable%v", i.APIGroup, i.Version(), i.Object) -} - -// MockWrapType is the name of the concrete mock for this type. -func (i *ServiceInfo) MockWrapType() string { - return "Mock" + i.WrapType() -} - -// MockField is the name of the field in the mock struct. -func (i *ServiceInfo) MockField() string { - return "Mock" + i.WrapType() -} - -// GCPWrapType is the name of the GCP wrapper type. -func (i *ServiceInfo) GCPWrapType() string { - if i.APIGroup == APIGroupNetworkServices { - return "TD" + i.WrapType() - } - return "GCE" + i.WrapType() -} - -// Field is the name of the GCP struct. -func (i *ServiceInfo) Field() string { - if i.APIGroup == APIGroupNetworkServices { - return "td" + i.WrapType() - } - return "gce" + i.WrapType() -} - -// Methods returns a list of additional methods to generate code for. -func (i *ServiceInfo) Methods() []*Method { - methods := map[string]bool{} - for _, m := range i.additionalMethods { - methods[m] = true - } - - var ret []*Method - for j := 0; j < i.serviceType.NumMethod(); j++ { - m := i.serviceType.Method(j) - if _, ok := methods[m.Name]; !ok { - continue - } - ret = append(ret, newMethod(i, m)) - methods[m.Name] = false - } - - for k, b := range methods { - if b { - panic(fmt.Errorf("method %q was not found in service %q", k, i.Service)) - } - } - - return ret -} - -// KeyIsGlobal is true if the key is global. -func (i *ServiceInfo) KeyIsGlobal() bool { - return i.keyType == Global -} - -// KeyIsRegional is true if the key is regional. -func (i *ServiceInfo) KeyIsRegional() bool { - return i.keyType == Regional -} - -// KeyIsZonal is true if the key is zonal. -func (i *ServiceInfo) KeyIsZonal() bool { - return i.keyType == Zonal -} - -// NetworkServices is true if the APIGroup is networkservices. -func (i *ServiceInfo) IsNetworkServices() bool { - return i.APIGroup == APIGroupNetworkServices -} - -// KeyIsProject is true if the key represents the project resource. -func (i *ServiceInfo) KeyIsProject() bool { - // Projects are a special resource for ResourceId because there is no 'key' value. This func - // is used by the generator to not accept a key parameter. - return i.Service == "Projects" -} - -// MakeKey returns the call used to create the appropriate key type. -func (i *ServiceInfo) MakeKey(name, location string) string { - switch i.keyType { - case Global: - return fmt.Sprintf("GlobalKey(%q)", name) - case Regional: - return fmt.Sprintf("RegionalKey(%q, %q)", name, location) - case Zonal: - return fmt.Sprintf("ZonalKey(%q, %q)", name, location) - } - return "Invalid" -} - -// GenerateGet is true if the method is to be generated. -func (i *ServiceInfo) GenerateGet() bool { - return i.options&NoGet == 0 -} - -// GenerateList is true if the method is to be generated. -func (i *ServiceInfo) GenerateList() bool { - return i.options&NoList == 0 -} - -// GenerateDelete is true if the method is to be generated. -func (i *ServiceInfo) GenerateDelete() bool { - return i.options&NoDelete == 0 -} - -// GenerateInsert is true if the method is to be generated. -func (i *ServiceInfo) GenerateInsert() bool { - return i.options&NoInsert == 0 -} - -// GenerateCustomOps is true if we should generated a xxxOps interface for -// adding additional methods to the generated interface. -func (i *ServiceInfo) GenerateCustomOps() bool { - return i.options&CustomOps != 0 -} - -// AggregatedList is true if the method is to be generated. -func (i *ServiceInfo) AggregatedList() bool { - return i.options&AggregatedList != 0 -} - -// AggregatedListField is the name of the field used for the aggregated list -// call. This is typically the same as the name of the service, but can be -// customized by setting the aggregatedListField field. -func (i *ServiceInfo) AggregatedListField() string { - if i.aggregatedListField == "" { - return i.Service - } - return i.aggregatedListField -} - -// ListUsable is true if ListUsable is set. -func (i *ServiceInfo) ListUsable() bool { - return i.options&ListUsable != 0 -} - -// ServiceGroup is a grouping of the same service but at different API versions. -type ServiceGroup struct { - Alpha *ServiceInfo - Beta *ServiceInfo - GA *ServiceInfo -} - -// Service returns any ServiceInfo string belonging to the ServiceGroup. -func (sg *ServiceGroup) Service() string { - return sg.ServiceInfo().Service -} - -// ServiceInfo returns any ServiceInfo object belonging to the ServiceGroup. -func (sg *ServiceGroup) ServiceInfo() *ServiceInfo { - switch { - case sg.GA != nil: - return sg.GA - case sg.Alpha != nil: - return sg.Alpha - case sg.Beta != nil: - return sg.Beta - default: - panic(errors.New("service group is empty")) - } -} - -// HasGA returns true if this object has a GA representation. -func (sg *ServiceGroup) HasGA() bool { - return sg.GA != nil -} - -// HasAlpha returns true if this object has a Alpha representation. -func (sg *ServiceGroup) HasAlpha() bool { - return sg.Alpha != nil -} - -// HasBeta returns true if this object has a Beta representation. -func (sg *ServiceGroup) HasBeta() bool { - return sg.Beta != nil -} - -// groupServices together by version. -func groupServices(services []*ServiceInfo) map[string]*ServiceGroup { - ret := map[string]*ServiceGroup{} - for _, si := range services { - if _, ok := ret[si.Service]; !ok { - ret[si.Service] = &ServiceGroup{} - } - group := ret[si.Service] - switch si.Version() { - case VersionAlpha: - group.Alpha = si - case VersionBeta: - group.Beta = si - case VersionGA: - group.GA = si - } - } - return ret -} - -// AllServicesByGroup is a map of service name to ServicesGroup. -var AllServicesByGroup map[string]*ServiceGroup - -// SortedServicesGroups is a slice of Servicegroup sorted by Service name. -var SortedServicesGroups []*ServiceGroup - -func init() { - AllServicesByGroup = groupServices(AllServices) - - for _, sg := range AllServicesByGroup { - SortedServicesGroups = append(SortedServicesGroups, sg) - } - sort.Slice(SortedServicesGroups, func(i, j int) bool { - return SortedServicesGroups[i].Service() < SortedServicesGroups[j].Service() - }) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go deleted file mode 100644 index d8faa86561431..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go +++ /dev/null @@ -1,1605 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package mock encapsulates mocks for testing GCE provider functionality. -// These methods are used to override the mock objects' methods in order to -// intercept the standard processing and to add custom logic for test purposes. -// -// // Example usage: -// -// cloud := cloud.NewMockGCE() -// cloud.MockTargetPools.AddInstanceHook = mock.AddInstanceHook -package mock - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "sync" - - cloud "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - alpha "google.golang.org/api/compute/v0.alpha" - beta "google.golang.org/api/compute/v0.beta" - ga "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" -) - -var ( - // InUseError is a shared variable with error code StatusBadRequest for error verification. - InUseError = &googleapi.Error{Code: http.StatusBadRequest, Message: "It's being used by god."} - // InternalServerError is shared variable with error code StatusInternalServerError for error verification. - InternalServerError = &googleapi.Error{Code: http.StatusInternalServerError} - // UnauthorizedErr wraps a Google API error with code StatusForbidden. - UnauthorizedErr = &googleapi.Error{Code: http.StatusForbidden} -) - -// gceObject is an abstraction of all GCE API object in go client -type gceObject interface { - MarshalJSON() ([]byte, error) -} - -// AttachDiskHook mocks attaching a disk to an instance -func AttachDiskHook(ctx context.Context, key *meta.Key, req *ga.AttachedDisk, m *cloud.MockInstances, options ...cloud.Option) error { - instance, err := m.Get(ctx, key) - if err != nil { - return err - } - instance.Disks = append(instance.Disks, req) - return nil -} - -// Verify AttachDiskHook implements cloud.MockInstances.AttachDiskHook. -var _ = cloud.MockInstances{ - AttachDiskHook: AttachDiskHook, -} - -// DetachDiskHook mocks detaching a disk from an instance -func DetachDiskHook(ctx context.Context, key *meta.Key, diskName string, m *cloud.MockInstances, options ...cloud.Option) error { - instance, err := m.Get(ctx, key) - if err != nil { - return err - } - for i, disk := range instance.Disks { - if disk.DeviceName == diskName { - instance.Disks = append(instance.Disks[:i], instance.Disks[i+1:]...) - return nil - } - } - return &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("Disk: %s was not found in Instance %s", diskName, key.String()), - } -} - -// Verify DetachDiskHook implements cloud.MockInstances.DetachDiskHook. -var _ = cloud.MockInstances{ - DetachDiskHook: DetachDiskHook, -} - -// AddInstanceHook mocks adding a Instance to MockTargetPools -func AddInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsAddInstanceRequest, m *cloud.MockTargetPools, options ...cloud.Option) error { - pool, err := m.Get(ctx, key) - if err != nil { - return &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("Key: %s was not found in TargetPools", key.String()), - } - } - - for _, instance := range req.Instances { - pool.Instances = append(pool.Instances, instance.Instance) - } - - return nil -} - -// Verify AddInstanceHook implements cloud.MockTargetPools.AddInstanceHook. -var _ = cloud.MockTargetPools{ - AddInstanceHook: AddInstanceHook, -} - -// RemoveInstanceHook mocks removing a Instance from MockTargetPools -func RemoveInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsRemoveInstanceRequest, m *cloud.MockTargetPools, options ...cloud.Option) error { - pool, err := m.Get(ctx, key) - if err != nil { - return &googleapi.Error{ - Code: http.StatusNotFound, - Message: fmt.Sprintf("Key: %s was not found in TargetPools", key.String()), - } - } - - for _, instanceToRemove := range req.Instances { - for i, instance := range pool.Instances { - if instanceToRemove.Instance == instance { - // Delete instance from pool.Instances without preserving order - pool.Instances[i] = pool.Instances[len(pool.Instances)-1] - pool.Instances = pool.Instances[:len(pool.Instances)-1] - break - } - } - } - - return nil -} - -// Verify RemoveInstanceHook implements cloud.MockTargetPools.RemoveInstanceHook. -var _ = cloud.MockTargetPools{ - RemoveInstanceHook: RemoveInstanceHook, -} - -func convertAndInsertAlphaForwardingRule(key *meta.Key, obj gceObject, mRules map[meta.Key]*cloud.MockForwardingRulesObj, version meta.Version, projectID string) (bool, error) { - if !key.Valid() { - return true, fmt.Errorf("invalid GCE key (%+v)", key) - } - - if _, ok := mRules[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockForwardingRule %v exists", key), - } - return true, err - } - - enc, err := obj.MarshalJSON() - if err != nil { - return true, err - } - var fwdRule alpha.ForwardingRule - if err := json.Unmarshal(enc, &fwdRule); err != nil { - return true, err - } - // Set the default values for the Alpha fields. - if fwdRule.NetworkTier == "" { - fwdRule.NetworkTier = cloud.NetworkTierDefault.ToGCEValue() - } - - fwdRule.Name = key.Name - if fwdRule.SelfLink == "" { - fwdRule.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, version, projectID, "forwardingRules", key) - } - - mRules[*key] = &cloud.MockForwardingRulesObj{Obj: fwdRule} - return true, nil -} - -// InsertFwdRuleHook mocks inserting a ForwardingRule. ForwardingRules are -// expected to default to Premium tier if no NetworkTier is specified. -func InsertFwdRuleHook(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *cloud.MockForwardingRules, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionGA, "forwardingRules") - return convertAndInsertAlphaForwardingRule(key, obj, m.Objects, meta.VersionGA, projectID) -} - -// Verify InsertFwdRuleHook implements cloud.MockForwardingRules.InsertHook. -var _ = cloud.MockForwardingRules{ - InsertHook: InsertFwdRuleHook, -} - -// InsertBetaFwdRuleHook mocks inserting a BetaForwardingRule. -func InsertBetaFwdRuleHook(ctx context.Context, key *meta.Key, obj *beta.ForwardingRule, m *cloud.MockBetaForwardingRules, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionBeta, "forwardingRules") - return convertAndInsertAlphaForwardingRule(key, obj, m.Objects, meta.VersionBeta, projectID) -} - -// Verify InsertBetaFwdRuleHook implements cloud.MockBetaForwardingRules.InsertHook. -var _ = cloud.MockBetaForwardingRules{ - InsertHook: InsertBetaFwdRuleHook, -} - -// InsertAlphaFwdRuleHook mocks inserting an AlphaForwardingRule. -func InsertAlphaFwdRuleHook(ctx context.Context, key *meta.Key, obj *alpha.ForwardingRule, m *cloud.MockAlphaForwardingRules, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionAlpha, "forwardingRules") - return convertAndInsertAlphaForwardingRule(key, obj, m.Objects, meta.VersionAlpha, projectID) -} - -// Verify InsertAlphaFwdRuleHook implements cloud.MockAlphaForwardingRules.InsertHook. -var _ = cloud.MockAlphaForwardingRules{ - InsertHook: InsertAlphaFwdRuleHook, -} - -// AddressAttributes maps from Address key to a map of Instances -type AddressAttributes struct { - IPCounter int // Used to assign Addresses with no IP a unique IP address -} - -func convertAndInsertAlphaAddress(key *meta.Key, obj gceObject, mAddrs map[meta.Key]*cloud.MockAddressesObj, version meta.Version, projectID string, addressAttrs AddressAttributes) (bool, error) { - if !key.Valid() { - return true, fmt.Errorf("invalid GCE key (%+v)", key) - } - - if _, ok := mAddrs[*key]; ok { - err := &googleapi.Error{ - Code: http.StatusConflict, - Message: fmt.Sprintf("MockAddresses %v exists", key), - } - return true, err - } - - enc, err := obj.MarshalJSON() - if err != nil { - return true, err - } - var addr alpha.Address - if err := json.Unmarshal(enc, &addr); err != nil { - return true, err - } - - // Set default address type if not present. - if addr.AddressType == "" { - addr.AddressType = string(cloud.SchemeExternal) - } - - var existingAddresses []*ga.Address - for _, obj := range mAddrs { - existingAddresses = append(existingAddresses, obj.ToGA()) - } - - for _, existingAddr := range existingAddresses { - if addr.Address == existingAddr.Address { - msg := fmt.Sprintf("MockAddresses IP %v in use", addr.Address) - - // When the IP is already in use, this call returns a StatusBadRequest - // if the address is an external address, and StatusConflict if an - // internal address. This is to be consistent with actual GCE API. - errorCode := http.StatusConflict - if addr.AddressType == string(cloud.SchemeExternal) { - errorCode = http.StatusBadRequest - } - - return true, &googleapi.Error{Code: errorCode, Message: msg} - } - } - - // Set default values used in tests - addr.Name = key.Name - if addr.SelfLink == "" { - addr.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, version, projectID, "addresses", key) - } - - if addr.Address == "" { - if addr.IpVersion == "IPV6" { - addr.Address = fmt.Sprintf("1111:2222:3333:4444:5555:%d:0:0", addressAttrs.IPCounter) - addr.PrefixLength = 96 - } else { - addr.Address = fmt.Sprintf("1.2.3.%d", addressAttrs.IPCounter) - } - addressAttrs.IPCounter++ - } - - // Set the default values for the Alpha fields. - if addr.NetworkTier == "" { - addr.NetworkTier = cloud.NetworkTierDefault.ToGCEValue() - } - - mAddrs[*key] = &cloud.MockAddressesObj{Obj: addr} - return true, nil -} - -// InsertAddressHook mocks inserting an Address. -func InsertAddressHook(ctx context.Context, key *meta.Key, obj *ga.Address, m *cloud.MockAddresses, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionGA, "addresses") - return convertAndInsertAlphaAddress(key, obj, m.Objects, meta.VersionGA, projectID, m.X.(AddressAttributes)) -} - -// Verify InsertAddressHook implements cloud.MockAddresses.InsertHook. -var _ = cloud.MockAddresses{ - InsertHook: InsertAddressHook, -} - -// InsertBetaAddressHook mocks inserting a BetaAddress. -func InsertBetaAddressHook(ctx context.Context, key *meta.Key, obj *beta.Address, m *cloud.MockBetaAddresses, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionBeta, "addresses") - return convertAndInsertAlphaAddress(key, obj, m.Objects, meta.VersionBeta, projectID, m.X.(AddressAttributes)) -} - -// Verify InsertBetaAddressHook implements MockBetaAddresses.InsertHook. -var _ = cloud.MockBetaAddresses{ - InsertHook: InsertBetaAddressHook, -} - -// InsertAlphaAddressHook mocks inserting an Address. Addresses are expected to -// default to Premium tier if no NetworkTier is specified. -func InsertAlphaAddressHook(ctx context.Context, key *meta.Key, obj *alpha.Address, m *cloud.MockAlphaAddresses, options ...cloud.Option) (bool, error) { - m.Lock.Lock() - defer m.Lock.Unlock() - - projectID := m.ProjectRouter.ProjectID(ctx, meta.VersionBeta, "addresses") - return convertAndInsertAlphaAddress(key, obj, m.Objects, meta.VersionAlpha, projectID, m.X.(AddressAttributes)) -} - -// Verify InsertAlphaAddressHook implements MockAlphaAddresses.InsertHook. -var _ = cloud.MockAlphaAddresses{ - InsertHook: InsertAlphaAddressHook, -} - -// InstanceGroupAttributes maps from InstanceGroup key to a map of Instances -type InstanceGroupAttributes struct { - InstanceMap map[meta.Key]map[string]*ga.InstanceWithNamedPorts - Lock *sync.Mutex -} - -// AddInstances adds a list of Instances passed by InstanceReference -func (igAttrs *InstanceGroupAttributes) AddInstances(key *meta.Key, instanceRefs []*ga.InstanceReference) error { - igAttrs.Lock.Lock() - defer igAttrs.Lock.Unlock() - - instancesWithNamedPorts, ok := igAttrs.InstanceMap[*key] - if !ok { - instancesWithNamedPorts = make(map[string]*ga.InstanceWithNamedPorts) - } - - for _, instance := range instanceRefs { - iWithPort := &ga.InstanceWithNamedPorts{ - Instance: instance.Instance, - } - - instancesWithNamedPorts[instance.Instance] = iWithPort - } - - igAttrs.InstanceMap[*key] = instancesWithNamedPorts - return nil -} - -// RemoveInstances removes a list of Instances passed by InstanceReference -func (igAttrs *InstanceGroupAttributes) RemoveInstances(key *meta.Key, instanceRefs []*ga.InstanceReference) error { - igAttrs.Lock.Lock() - defer igAttrs.Lock.Unlock() - - instancesWithNamedPorts, ok := igAttrs.InstanceMap[*key] - if !ok { - instancesWithNamedPorts = make(map[string]*ga.InstanceWithNamedPorts) - } - - for _, instanceToRemove := range instanceRefs { - if _, ok := instancesWithNamedPorts[instanceToRemove.Instance]; ok { - delete(instancesWithNamedPorts, instanceToRemove.Instance) - } else { - return &googleapi.Error{ - Code: http.StatusBadRequest, - Message: fmt.Sprintf("%s is not a member of %s", instanceToRemove.Instance, key.String()), - } - } - } - - igAttrs.InstanceMap[*key] = instancesWithNamedPorts - return nil -} - -// List gets a list of InstanceWithNamedPorts -func (igAttrs *InstanceGroupAttributes) List(key *meta.Key) []*ga.InstanceWithNamedPorts { - igAttrs.Lock.Lock() - defer igAttrs.Lock.Unlock() - - instancesWithNamedPorts, ok := igAttrs.InstanceMap[*key] - if !ok { - instancesWithNamedPorts = make(map[string]*ga.InstanceWithNamedPorts) - } - - var instanceList []*ga.InstanceWithNamedPorts - for _, val := range instancesWithNamedPorts { - instanceList = append(instanceList, val) - } - - return instanceList -} - -// AddInstancesHook mocks adding instances from an InstanceGroup -func AddInstancesHook(ctx context.Context, key *meta.Key, req *ga.InstanceGroupsAddInstancesRequest, m *cloud.MockInstanceGroups, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - var attrs InstanceGroupAttributes - attrs = m.X.(InstanceGroupAttributes) - attrs.AddInstances(key, req.Instances) - m.X = attrs - return nil -} - -// Verify AddInstancesHook implements MockInstanceGroups.AddInstancesHook. -var _ = cloud.MockInstanceGroups{ - AddInstancesHook: AddInstancesHook, -} - -// ListInstancesHook mocks listing instances from an InstanceGroup -func ListInstancesHook(ctx context.Context, key *meta.Key, req *ga.InstanceGroupsListInstancesRequest, filter *filter.F, m *cloud.MockInstanceGroups, options ...cloud.Option) ([]*ga.InstanceWithNamedPorts, error) { - _, err := m.Get(ctx, key) - if err != nil { - return nil, err - } - - var attrs InstanceGroupAttributes - attrs = m.X.(InstanceGroupAttributes) - instances := attrs.List(key) - - return instances, nil -} - -// Verify ListInstancesHook implements MockInstanceGroups.ListInstancesHook. -var _ = cloud.MockInstanceGroups{ - ListInstancesHook: ListInstancesHook, -} - -// RemoveInstancesHook mocks removing instances from an InstanceGroup -func RemoveInstancesHook(ctx context.Context, key *meta.Key, req *ga.InstanceGroupsRemoveInstancesRequest, m *cloud.MockInstanceGroups, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - var attrs InstanceGroupAttributes - attrs = m.X.(InstanceGroupAttributes) - attrs.RemoveInstances(key, req.Instances) - m.X = attrs - return nil -} - -// Verify RemoveInstancesHook implements MockInstanceGroups.RemoveInstancesHook. -var _ = cloud.MockInstanceGroups{ - RemoveInstancesHook: RemoveInstancesHook, -} - -// UpdateFirewallHook defines the hook for updating a Firewall. It replaces the -// object with the same key in the mock with the updated object. -func UpdateFirewallHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockFirewalls, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "firewalls") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "firewalls", key) - - m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj} - return nil -} - -// Verify UpdateFirewallHook implements MockFirewalls.UpdateHook. -var _ = cloud.MockFirewalls{ - UpdateHook: UpdateFirewallHook, -} - -// UpdateAlphaFirewallHook defines the hook for updating an alpha Firewall. It replaces the -// object with the same key in the mock with the updated object. -func UpdateAlphaFirewallHook(ctx context.Context, key *meta.Key, obj *alpha.Firewall, m *cloud.MockAlphaFirewalls, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "firewalls") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "firewalls", key) - - m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaFirewallHook implements MockAlphaFirewalls.UpdateHook. -var _ = cloud.MockAlphaFirewalls{ - UpdateHook: UpdateAlphaFirewallHook, -} - -// UpdateBetaFirewallHook defines the hook for updating a beta Firewall. It replaces the -// object with the same key in the mock with the updated object. -func UpdateBetaFirewallHook(ctx context.Context, key *meta.Key, obj *beta.Firewall, m *cloud.MockBetaFirewalls, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "firewalls") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "firewalls", key) - - m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj} - return nil -} - -// Verify UpdateBetaFirewallHook implements MockBetaFirewalls.UpdateHook. -var _ = cloud.MockBetaFirewalls{ - UpdateHook: UpdateBetaFirewallHook, -} - -// UpdateHealthCheckHook defines the hook for updating a HealthCheck. It -// replaces the object with the same key in the mock with the updated object. -func UpdateHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockHealthChecks, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateHealthCheckHook implements MockHealthChecks.UpdateHook. -var _ = cloud.MockHealthChecks{ - UpdateHook: UpdateHealthCheckHook, -} - -// UpdateAlphaHealthCheckHook defines the hook for updating an alpha HealthCheck. -// It replaces the object with the same key in the mock with the updated object. -func UpdateAlphaHealthCheckHook(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *cloud.MockAlphaHealthChecks, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaHealthCheckHook implements MockAlphaHealthChecks.UpdateHook. -var _ = cloud.MockAlphaHealthChecks{ - UpdateHook: UpdateAlphaHealthCheckHook, -} - -// UpdateAlphaRegionHealthCheckHook defines the hook for updating an alpha HealthCheck. -// It replaces the object with the same key in the mock with the updated object. -func UpdateAlphaRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *alpha.HealthCheck, m *cloud.MockAlphaRegionHealthChecks, options ...cloud.Option) error { - if _, err := m.Get(ctx, key); err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockRegionHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaRegionHealthCheckHook implements MockAlphaRegionHealthChecks.UpdateHook. -var _ = cloud.MockAlphaRegionHealthChecks{ - UpdateHook: UpdateAlphaRegionHealthCheckHook, -} - -// UpdateBetaHealthCheckHook defines the hook for updating a HealthCheck. It -// replaces the object with the same key in the mock with the updated object. -func UpdateBetaHealthCheckHook(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *cloud.MockBetaHealthChecks, options ...cloud.Option) error { - if _, err := m.Get(ctx, key); err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateBetaHealthCheckHook implements MockBetaHealthChecks.UpdateHook. -var _ = cloud.MockBetaHealthChecks{ - UpdateHook: UpdateBetaHealthCheckHook, -} - -// UpdateBetaRegionHealthCheckHook defines the hook for updating a HealthCheck. It -// replaces the object with the same key in the mock with the updated object. -func UpdateBetaRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *beta.HealthCheck, m *cloud.MockBetaRegionHealthChecks, options ...cloud.Option) error { - if _, err := m.Get(ctx, key); err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockRegionHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateBetaRegionHealthCheckHook implements MockBetaRegionHealthChecks.UpdateHook. -var _ = cloud.MockBetaRegionHealthChecks{ - UpdateHook: UpdateBetaRegionHealthCheckHook, -} - -// UpdateRegionHealthCheckHook defines the hook for updating a HealthCheck. It -// replaces the object with the same key in the mock with the updated object. -func UpdateRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockRegionHealthChecks, options ...cloud.Option) error { - if _, err := m.Get(ctx, key); err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "healthChecks", key) - - m.Objects[*key] = &cloud.MockRegionHealthChecksObj{Obj: obj} - return nil -} - -// Verify UpdateRegionHealthCheckHook implements MockRegionHealthChecks.UpdateHook. -var _ = cloud.MockRegionHealthChecks{ - UpdateHook: UpdateRegionHealthCheckHook, -} - -// UpdateRegionBackendServiceHook defines the hook for updating a Region -// BackendsService. It replaces the object with the same key in the mock with -// the updated object. -func UpdateRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *cloud.MockRegionBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockRegionBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateRegionBackendServiceHook implements MockRegionBackendServices.UpdateHook. -var _ = cloud.MockRegionBackendServices{ - UpdateHook: UpdateRegionBackendServiceHook, -} - -// UpdateAlphaRegionBackendServiceHook defines the hook for updating a Region -// BackendsService. It replaces the object with the same key in the mock with -// the updated object. -func UpdateAlphaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *cloud.MockAlphaRegionBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockRegionBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaRegionBackendServiceHook implements MockAlphaRegionBackendServices.UpdateHook. -var _ = cloud.MockAlphaRegionBackendServices{ - UpdateHook: UpdateAlphaRegionBackendServiceHook, -} - -// UpdateBetaRegionBackendServiceHook defines the hook for updating a Region -// BackendsService. It replaces the object with the same key in the mock with -// the updated object. -func UpdateBetaRegionBackendServiceHook(ctx context.Context, key *meta.Key, obj *beta.BackendService, m *cloud.MockBetaRegionBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockRegionBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateBetaRegionBackendServiceHook implements MockBetaRegionBackendServices.UpdateHook. -var _ = cloud.MockBetaRegionBackendServices{ - UpdateHook: UpdateBetaRegionBackendServiceHook, -} - -// UpdateBackendServiceHook defines the hook for updating a BackendService. -// It replaces the object with the same key in the mock with the updated object. -func UpdateBackendServiceHook(ctx context.Context, key *meta.Key, obj *ga.BackendService, m *cloud.MockBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateRegionBackendServiceHook implements MockRegionBackendServices.UpdateHook. -var _ = cloud.MockRegionBackendServices{ - UpdateHook: UpdateRegionBackendServiceHook, -} - -// UpdateAlphaBackendServiceHook defines the hook for updating an alpha BackendService. -// It replaces the object with the same key in the mock with the updated object. -func UpdateAlphaBackendServiceHook(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *cloud.MockAlphaBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaBackendServiceHook implements MockAlphaBackendServices.UpdateHook. -var _ = cloud.MockAlphaBackendServices{ - UpdateHook: UpdateAlphaBackendServiceHook, -} - -// UpdateBetaBackendServiceHook defines the hook for updating an beta BackendService. -// It replaces the object with the same key in the mock with the updated object. -func UpdateBetaBackendServiceHook(ctx context.Context, key *meta.Key, obj *beta.BackendService, m *cloud.MockBetaBackendServices, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "backendServices") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "backendServices", key) - - m.Objects[*key] = &cloud.MockBackendServicesObj{Obj: obj} - return nil -} - -// Verify UpdateBetaBackendServiceHook implements MockBetaBackendServices.UpdateHook. -var _ = cloud.MockBetaBackendServices{ - UpdateHook: UpdateBetaBackendServiceHook, -} - -// UpdateURLMapHook defines the hook for updating a UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateURLMapHook(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *cloud.MockUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateURLMapHook implements MockUrlMaps.UpdateHook. -var _ = cloud.MockUrlMaps{ - UpdateHook: UpdateURLMapHook, -} - -// UpdateAlphaURLMapHook defines the hook for updating an alpha UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateAlphaURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *cloud.MockAlphaUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaURLMapHook implements MockAlphaUrlMaps.UpdateHook. -var _ = cloud.MockAlphaUrlMaps{ - UpdateHook: UpdateAlphaURLMapHook, -} - -// UpdateBetaURLMapHook defines the hook for updating a beta UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateBetaURLMapHook(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *cloud.MockBetaUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateBetaURLMapHook implements MockBetaUrlMaps.UpdateHook. -var _ = cloud.MockBetaUrlMaps{ - UpdateHook: UpdateBetaURLMapHook, -} - -// UpdateAlphaRegionURLMapHook defines the hook for updating an alpha UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateAlphaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *cloud.MockAlphaRegionUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionAlpha, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateAlphaRegionURLMapHook implements MockAlphaRegionUrlMaps.UpdateHook. -var _ = cloud.MockAlphaRegionUrlMaps{ - UpdateHook: UpdateAlphaRegionURLMapHook, -} - -// UpdateBetaRegionURLMapHook defines the hook for updating an alpha UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateBetaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *cloud.MockBetaRegionUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionBeta, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateBetaRegionURLMapHook implements MockBetaRegionUrlMaps.UpdateHook. -var _ = cloud.MockBetaRegionUrlMaps{ - UpdateHook: UpdateBetaRegionURLMapHook, -} - -// UpdateRegionURLMapHook defines the hook for updating a GA Regional UrlMap. -// It replaces the object with the same key in the mock with the updated object. -func UpdateRegionURLMapHook(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *cloud.MockRegionUrlMaps, options ...cloud.Option) error { - _, err := m.Get(ctx, key) - if err != nil { - return err - } - - obj.Name = key.Name - projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps") - obj.SelfLink = cloud.SelfLinkWithGroup(meta.APIGroupCompute, meta.VersionGA, projectID, "urlMaps", key) - - m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj} - return nil -} - -// Verify UpdateRegionURLMapHook implements MockRegionUrlMaps.UpdateHook. -var _ = cloud.MockRegionUrlMaps{ - UpdateHook: UpdateRegionURLMapHook, -} - -// SetTargetGlobalForwardingRuleHook defines the hook for setting the target proxy for a GlobalForwardingRule. -func SetTargetGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *ga.TargetReference, m *cloud.MockGlobalForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = obj.Target - return nil -} - -// Verify SetTargetGlobalForwardingRuleHook implements MockGlobalForwardingRules.SetTargetHook. -var _ = cloud.MockGlobalForwardingRules{ - SetTargetHook: SetTargetGlobalForwardingRuleHook, -} - -// SetTargetForwardingRuleHook defines the hook for setting the target proxy for a ForwardingRule. -func SetTargetForwardingRuleHook(ctx context.Context, key *meta.Key, obj *ga.TargetReference, m *cloud.MockForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = obj.Target - return nil -} - -// Verify SetTargetForwardingRuleHook implements MockForwardingRules.SetTargetHook. -var _ = cloud.MockForwardingRules{ - SetTargetHook: SetTargetForwardingRuleHook, -} - -// SetTargetAlphaForwardingRuleHook defines the hook for setting the target proxy for an Alpha ForwardingRule. -func SetTargetAlphaForwardingRuleHook(ctx context.Context, key *meta.Key, obj *alpha.TargetReference, m *cloud.MockAlphaForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = obj.Target - return nil -} - -// Verify SetTargetAlphaForwardingRuleHook implements MockAlphaForwardingRules.SetTargetHook. -var _ = cloud.MockAlphaForwardingRules{ - SetTargetHook: SetTargetAlphaForwardingRuleHook, -} - -// SetTargetBetaForwardingRuleHook defines the hook for setting the target proxy for an Alpha ForwardingRule. -func SetTargetBetaForwardingRuleHook(ctx context.Context, key *meta.Key, obj *beta.TargetReference, m *cloud.MockBetaForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = obj.Target - return nil -} - -// Verify SetTargetBetaForwardingRuleHook implements MockBetaForwardingRules.SetTargetHook. -var _ = cloud.MockBetaForwardingRules{ - SetTargetHook: SetTargetBetaForwardingRuleHook, -} - -// SetTargetAlphaGlobalForwardingRuleHook defines the hook for setting the target proxy for an alpha GlobalForwardingRule. -func SetTargetAlphaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, ref *alpha.TargetReference, m *cloud.MockAlphaGlobalForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = ref.Target - return nil -} - -// Verify SetTargetAlphaGlobalForwardingRuleHook implements MockAlphaGlobalForwardingRules.SetTargetHook. -var _ = cloud.MockAlphaGlobalForwardingRules{ - SetTargetHook: SetTargetAlphaGlobalForwardingRuleHook, -} - -// SetTargetBetaGlobalForwardingRuleHook defines the hook for setting the target proxy for a beta GlobalForwardingRule. -func SetTargetBetaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *beta.TargetReference, m *cloud.MockBetaGlobalForwardingRules, options ...cloud.Option) error { - fw, err := m.Get(ctx, key) - if err != nil { - return err - } - - fw.Target = obj.Target - return nil -} - -// Verify SetTargetBetaGlobalForwardingRuleHook implements MockBetaGlobalForwardingRules.SetTargetHook. -var _ = cloud.MockBetaGlobalForwardingRules{ - SetTargetHook: SetTargetBetaGlobalForwardingRuleHook, -} - -// SetURLMapTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. -func SetURLMapTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapTargetHTTPProxyHook implements MockTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockTargetHttpProxies{ - SetUrlMapHook: SetURLMapTargetHTTPProxyHook, -} - -// SetURLMapTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy. -func SetURLMapTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapTargetHTTPSProxyHook implements MockTargetHttpsProxies.SetUrlMapHook. -var _ = cloud.MockTargetHttpsProxies{ - SetUrlMapHook: SetURLMapTargetHTTPSProxyHook, -} - -// SetURLMapAlphaRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy. -func SetURLMapAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapAlphaRegionTargetHTTPSProxyHook implements MockAlphaRegionTargetHttpsProxies.SetUrlMapHook. -var _ = cloud.MockAlphaRegionTargetHttpsProxies{ - SetUrlMapHook: SetURLMapAlphaRegionTargetHTTPSProxyHook, -} - -// SetURLMapBetaRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy. -func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapBetaRegionTargetHTTPSProxyHook implements MockBetaRegionTargetHttpsProxies.SetUrlMapHook. -var _ = cloud.MockBetaRegionTargetHttpsProxies{ - SetUrlMapHook: SetURLMapBetaRegionTargetHTTPSProxyHook, -} - -// SetURLMapRegionTargetHTTPSProxyHook defines the hook for setting the url map for a TargetHttpsProxy. -func SetURLMapRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapRegionTargetHTTPSProxyHook implements MockRegionTargetHttpsProxies.SetUrlMapHook. -var _ = cloud.MockRegionTargetHttpsProxies{ - SetUrlMapHook: SetURLMapRegionTargetHTTPSProxyHook, -} - -// SetURLMapAlphaTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. -func SetURLMapAlphaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapAlphaTargetHTTPProxyHook implements MockAlphaTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockAlphaTargetHttpProxies{ - SetUrlMapHook: SetURLMapAlphaTargetHTTPProxyHook, -} - -// SetURLMapBetaTargetHTTPProxyHook defines the hook for setting the url map for a beta TargetHttpProxy. -func SetURLMapBetaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapBetaTargetHTTPProxyHook implements MockBetaTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockBetaTargetHttpProxies{ - SetUrlMapHook: SetURLMapBetaTargetHTTPProxyHook, -} - -// SetURLMapBetaTargetHTTPSProxyHook defines the hook for setting the url map for a beta TargetHttpsProxy. -func SetURLMapBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapBetaTargetHTTPSProxyHook implements MockBetaTargetHttpsProxies.SetUrlMapHook. -var _ = cloud.MockBetaTargetHttpsProxies{ - SetUrlMapHook: SetURLMapBetaTargetHTTPSProxyHook, -} - -// SetURLMapAlphaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. -func SetURLMapAlphaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaRegionTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapAlphaRegionTargetHTTPProxyHook implements MockAlphaRegionTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockAlphaRegionTargetHttpProxies{ - SetUrlMapHook: SetURLMapAlphaRegionTargetHTTPProxyHook, -} - -// SetURLMapBetaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. -func SetURLMapBetaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaRegionTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapBetaRegionTargetHTTPProxyHook implements MockBetaRegionTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockBetaRegionTargetHttpProxies{ - SetUrlMapHook: SetURLMapBetaRegionTargetHTTPProxyHook, -} - -// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. -func SetURLMapRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.UrlMap = ref.UrlMap - return nil -} - -// Verify SetURLMapRegionTargetHTTPProxyHook implements MockRegionTargetHttpProxies.SetUrlMapHook. -var _ = cloud.MockRegionTargetHttpProxies{ - SetUrlMapHook: SetURLMapRegionTargetHTTPProxyHook, -} - -// SetBackendServiceAlphaTargetTCPProxyHook defines the hook for setting the backend service for an alpha TargetTcpProxy. -func SetBackendServiceAlphaTargetTCPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.TargetTcpProxiesSetBackendServiceRequest, m *cloud.MockAlphaTargetTcpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.Service = ref.Service - return nil -} - -// Verify SetBackendServiceAlphaTargetTCPProxyHook implements MockAlphaTargetTcpProxies.SetBackendServiceHook. -var _ = cloud.MockAlphaTargetTcpProxies{ - SetBackendServiceHook: SetBackendServiceAlphaTargetTCPProxyHook, -} - -// SetBackendServiceBetaTargetTCPProxyHook defines the hook for setting the backend service for a beta TargetTcpProxy. -func SetBackendServiceBetaTargetTCPProxyHook(ctx context.Context, key *meta.Key, ref *beta.TargetTcpProxiesSetBackendServiceRequest, m *cloud.MockBetaTargetTcpProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.Service = ref.Service - return nil -} - -// Verify SetBackendServiceBetaTargetTCPProxyHook implements MockBetaTargetTcpProxies.SetBackendServiceHook. -var _ = cloud.MockBetaTargetTcpProxies{ - SetBackendServiceHook: SetBackendServiceBetaTargetTCPProxyHook, -} - -// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateTargetHTTPSProxyHook implements MockTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateTargetHTTPSProxyHook, -} - -// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateAlphaTargetHTTPSProxyHook implements MockAlphaTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockAlphaTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateAlphaTargetHTTPSProxyHook, -} - -// SetSslCertificateBetaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateBetaTargetHTTPSProxyHook implements MockBetaTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockBetaTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateBetaTargetHTTPSProxyHook, -} - -// SetSslCertificateAlphaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateAlphaRegionTargetHTTPSProxyHook implements MockAlphaRegionTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockAlphaRegionTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateAlphaRegionTargetHTTPSProxyHook, -} - -// SetSslCertificateBetaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateBetaRegionTargetHTTPSProxyHook implements MockBetaRegionTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockBetaRegionTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateBetaRegionTargetHTTPSProxyHook, -} - -// SetSslCertificateRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockRegionTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.SslCertificates = req.SslCertificates - return nil -} - -// Verify SetSslCertificateRegionTargetHTTPSProxyHook implements MockRegionTargetHttpsProxies.SetSslCertificatesHook. -var _ = cloud.MockRegionTargetHttpsProxies{ - SetSslCertificatesHook: SetSslCertificateRegionTargetHTTPSProxyHook, -} - -// SetSslPolicyTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslPolicyTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.SslPolicyReference, m *cloud.MockTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - - tp.SslPolicy = ref.SslPolicy - return nil -} - -// Verify SetSslPolicyTargetHTTPSProxyHook implements MockTargetHttpsProxies.SetSslPolicyHook. -var _ = cloud.MockTargetHttpsProxies{ - SetSslPolicyHook: SetSslPolicyTargetHTTPSProxyHook, -} - -// SetSslPolicyAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslPolicyAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.SslPolicyReference, m *cloud.MockAlphaTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - tp.SslPolicy = ref.SslPolicy - return nil -} - -// Verify SetSslPolicyAlphaTargetHTTPSProxyHook implements MockAlphaTargetHttpsProxies.SetSslPolicyHook. -var _ = cloud.MockAlphaTargetHttpsProxies{ - SetSslPolicyHook: SetSslPolicyAlphaTargetHTTPSProxyHook, -} - -// SetSslPolicyBetaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. -func SetSslPolicyBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.SslPolicyReference, m *cloud.MockBetaTargetHttpsProxies, options ...cloud.Option) error { - tp, err := m.Get(ctx, key) - if err != nil { - return err - } - tp.SslPolicy = ref.SslPolicy - return nil -} - -// Verify SetSslPolicyBetaTargetHTTPSProxyHook implements MockBetaTargetHttpsProxies.SetSslPolicyHook. -var _ = cloud.MockBetaTargetHttpsProxies{ - SetSslPolicyHook: SetSslPolicyBetaTargetHTTPSProxyHook, -} - -// InsertFirewallsUnauthorizedErrHook mocks firewall insertion. A forbidden error will be thrown as return. -func InsertFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockFirewalls, options ...cloud.Option) (bool, error) { - return true, &googleapi.Error{Code: http.StatusForbidden} -} - -// Verify InsertFirewallsUnauthorizedErrHook implements MockFirewalls.InsertHook. -var _ = cloud.MockFirewalls{ - InsertHook: InsertFirewallsUnauthorizedErrHook, -} - -// UpdateFirewallsUnauthorizedErrHook mocks firewall updating. A forbidden error will be thrown as return. -func UpdateFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockFirewalls, options ...cloud.Option) error { - return &googleapi.Error{Code: http.StatusForbidden} -} - -// Verify UpdateFirewallsUnauthorizedErrHook implements MockFirewalls.UpdateHook. -var _ = cloud.MockFirewalls{ - UpdateHook: UpdateFirewallsUnauthorizedErrHook, -} - -// DeleteFirewallsUnauthorizedErrHook mocks firewall deletion. A forbidden error will be thrown as return. -func DeleteFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, m *cloud.MockFirewalls, options ...cloud.Option) (bool, error) { - return true, &googleapi.Error{Code: http.StatusForbidden} -} - -// Verify DeleteFirewallsUnauthorizedErrHook implements MockFirewalls.DeleteHook. -var _ = cloud.MockFirewalls{ - DeleteHook: DeleteFirewallsUnauthorizedErrHook, -} - -// GetFirewallsUnauthorizedErrHook mocks firewall information retrival. A forbidden error will be thrown as return. -func GetFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, m *cloud.MockFirewalls, options ...cloud.Option) (bool, *ga.Firewall, error) { - return true, nil, &googleapi.Error{Code: http.StatusForbidden} -} - -// Verify GetFirewallsUnauthorizedErrHook implements MockFirewalls.GetHook. -var _ = cloud.MockFirewalls{ - GetHook: GetFirewallsUnauthorizedErrHook, -} - -// GetTargetPoolInternalErrHook mocks getting target pool. It returns a internal server error. -func GetTargetPoolInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockTargetPools, options ...cloud.Option) (bool, *ga.TargetPool, error) { - return true, nil, InternalServerError -} - -// Verify GetTargetPoolInternalErrHook implements MockTargetPools.GetHook. -var _ = cloud.MockTargetPools{ - GetHook: GetTargetPoolInternalErrHook, -} - -// GetForwardingRulesInternalErrHook mocks getting forwarding rules and returns an internal server error. -func GetForwardingRulesInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockForwardingRules, options ...cloud.Option) (bool, *ga.ForwardingRule, error) { - return true, nil, InternalServerError -} - -// Verify GetForwardingRulesInternalErrHook implements MockForwardingRules.GetHook. -var _ = cloud.MockForwardingRules{ - GetHook: GetForwardingRulesInternalErrHook, -} - -// GetAddressesInternalErrHook mocks getting network address and returns an internal server error. -func GetAddressesInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockAddresses, options ...cloud.Option) (bool, *ga.Address, error) { - return true, nil, InternalServerError -} - -// Verify GetAddressesInternalErrHook implements MockAddresses.GetHook. -var _ = cloud.MockAddresses{ - GetHook: GetAddressesInternalErrHook, -} - -// GetHTTPHealthChecksInternalErrHook mocks getting http health check and returns an internal server error. -func GetHTTPHealthChecksInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockHttpHealthChecks, options ...cloud.Option) (bool, *ga.HttpHealthCheck, error) { - return true, nil, InternalServerError -} - -// Verify GetHTTPHealthChecksInternalErrHook implements MockHttpHealthChecks.GetHook. -var _ = cloud.MockHttpHealthChecks{ - GetHook: GetHTTPHealthChecksInternalErrHook, -} - -// InsertTargetPoolsInternalErrHook mocks getting target pool and returns an internal server error. -func InsertTargetPoolsInternalErrHook(ctx context.Context, key *meta.Key, obj *ga.TargetPool, m *cloud.MockTargetPools, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify InsertTargetPoolsInternalErrHook implements MockTargetPools.InsertHook. -var _ = cloud.MockTargetPools{ - InsertHook: InsertTargetPoolsInternalErrHook, -} - -// InsertForwardingRulesInternalErrHook mocks getting forwarding rule and returns an internal server error. -func InsertForwardingRulesInternalErrHook(ctx context.Context, key *meta.Key, obj *ga.ForwardingRule, m *cloud.MockForwardingRules, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify InsertForwardingRulesInternalErrHook implements MockForwardingRules.InsertHook. -var _ = cloud.MockForwardingRules{ - InsertHook: InsertForwardingRulesInternalErrHook, -} - -// DeleteAddressesNotFoundErrHook mocks deleting network address and returns a not found error. -func DeleteAddressesNotFoundErrHook(ctx context.Context, key *meta.Key, m *cloud.MockAddresses, options ...cloud.Option) (bool, error) { - return true, &googleapi.Error{Code: http.StatusNotFound} -} - -// Verify DeleteAddressesNotFoundErrHook implements MockAddresses.DeleteHook. -var _ = cloud.MockAddresses{ - DeleteHook: DeleteAddressesNotFoundErrHook, -} - -// DeleteAddressesInternalErrHook mocks deleting address and returns an internal server error. -func DeleteAddressesInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockAddresses, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify DeleteAddressesInternalErrHook implements MockAddresses.DeleteHook. -var _ = cloud.MockAddresses{ - DeleteHook: DeleteAddressesInternalErrHook, -} - -// InsertAlphaBackendServiceUnauthorizedErrHook mocks inserting an alpha BackendService and returns a forbidden error. -func InsertAlphaBackendServiceUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *cloud.MockAlphaBackendServices, options ...cloud.Option) (bool, error) { - return true, UnauthorizedErr -} - -// Verify InsertAlphaBackendServiceUnauthorizedErrHook implements MockAlphaBackendServices.InsertHook. -var _ = cloud.MockAlphaBackendServices{ - InsertHook: InsertAlphaBackendServiceUnauthorizedErrHook, -} - -// UpdateAlphaBackendServiceUnauthorizedErrHook mocks updating an alpha BackendService and returns a forbidden error. -func UpdateAlphaBackendServiceUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *alpha.BackendService, m *cloud.MockAlphaBackendServices, options ...cloud.Option) error { - return UnauthorizedErr -} - -// Verify UpdateAlphaBackendServiceUnauthorizedErrHook implements MockAlphaBackendServices.UpdateHook. -var _ = cloud.MockAlphaBackendServices{ - UpdateHook: UpdateAlphaBackendServiceUnauthorizedErrHook, -} - -// GetRegionBackendServicesErrHook mocks getting region backend service and returns an internal server error. -func GetRegionBackendServicesErrHook(ctx context.Context, key *meta.Key, m *cloud.MockRegionBackendServices, options ...cloud.Option) (bool, *ga.BackendService, error) { - return true, nil, InternalServerError -} - -// Verify GetRegionBackendServicesErrHook implements MockRegionBackendServices.GetHook. -var _ = cloud.MockRegionBackendServices{ - GetHook: GetRegionBackendServicesErrHook, -} - -// UpdateRegionBackendServicesErrHook mocks updating a reegion backend service and returns an internal server error. -func UpdateRegionBackendServicesErrHook(ctx context.Context, key *meta.Key, svc *ga.BackendService, m *cloud.MockRegionBackendServices, options ...cloud.Option) error { - return InternalServerError -} - -// Verify UpdateRegionBackendServicesErrHook implements MockRegionBackendServices.UpdateHook. -var _ = cloud.MockRegionBackendServices{ - UpdateHook: UpdateRegionBackendServicesErrHook, -} - -// DeleteRegionBackendServicesErrHook mocks deleting region backend service and returns an internal server error. -func DeleteRegionBackendServicesErrHook(ctx context.Context, key *meta.Key, m *cloud.MockRegionBackendServices, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify DeleteRegionBackendServicesErrHook implements MockRegionBackendServices.DeleteHook. -var _ = cloud.MockRegionBackendServices{ - DeleteHook: DeleteRegionBackendServicesErrHook, -} - -// DeleteRegionBackendServicesInUseErrHook mocks deleting region backend service and returns an InUseError. -func DeleteRegionBackendServicesInUseErrHook(ctx context.Context, key *meta.Key, m *cloud.MockRegionBackendServices, options ...cloud.Option) (bool, error) { - return true, InUseError -} - -// Verify DeleteRegionBackendServicesInUseErrHook implements MockRegionBackendServices.DeleteHook. -var _ = cloud.MockRegionBackendServices{ - DeleteHook: DeleteRegionBackendServicesInUseErrHook, -} - -// GetInstanceGroupInternalErrHook mocks getting instance group and returns an internal server error. -func GetInstanceGroupInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockInstanceGroups, options ...cloud.Option) (bool, *ga.InstanceGroup, error) { - return true, nil, InternalServerError -} - -// Verify GetInstanceGroupInternalErrHook implements MockInstanceGroups.GetHook. -var _ = cloud.MockInstanceGroups{ - GetHook: GetInstanceGroupInternalErrHook, -} - -// GetHealthChecksInternalErrHook mocks getting health check and returns an internal server erorr. -func GetHealthChecksInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockHealthChecks, options ...cloud.Option) (bool, *ga.HealthCheck, error) { - return true, nil, InternalServerError -} - -// Verify GetHealthChecksInternalErrHook implements MockHealthChecks.GetHook. -var _ = cloud.MockHealthChecks{ - GetHook: GetHealthChecksInternalErrHook, -} - -// DeleteHealthChecksInternalErrHook mocks deleting health check and returns an internal server error. -func DeleteHealthChecksInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockHealthChecks, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify DeleteHealthChecksInternalErrHook implements MockHealthChecks.DeleteHook. -var _ = cloud.MockHealthChecks{ - DeleteHook: DeleteHealthChecksInternalErrHook, -} - -// DeleteHealthChecksInuseErrHook mocks deleting health check and returns an in use error. -func DeleteHealthChecksInuseErrHook(ctx context.Context, key *meta.Key, m *cloud.MockHealthChecks, options ...cloud.Option) (bool, error) { - return true, InUseError -} - -// Verify DeleteHealthChecksInuseErrHook implements MockHealthChecks.DeleteHook. -var _ = cloud.MockHealthChecks{ - DeleteHook: DeleteHealthChecksInuseErrHook, -} - -// DeleteForwardingRuleErrHook mocks deleting forwarding rule and returns an internal server error. -func DeleteForwardingRuleErrHook(ctx context.Context, key *meta.Key, m *cloud.MockForwardingRules, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify DeleteForwardingRuleErrHook implements MockForwardingRules.DeleteHook. -var _ = cloud.MockForwardingRules{ - DeleteHook: DeleteForwardingRuleErrHook, -} - -// ListZonesInternalErrHook mocks listing zone and returns an internal server error. -func ListZonesInternalErrHook(ctx context.Context, fl *filter.F, m *cloud.MockZones, options ...cloud.Option) (bool, []*ga.Zone, error) { - return true, []*ga.Zone{}, InternalServerError -} - -// Verify ListZonesInternalErrHook implements MockZones.ListHook. -var _ = cloud.MockZones{ - ListHook: ListZonesInternalErrHook, -} - -// DeleteInstanceGroupInternalErrHook mocks deleting instance group and returns an internal server error. -func DeleteInstanceGroupInternalErrHook(ctx context.Context, key *meta.Key, m *cloud.MockInstanceGroups, options ...cloud.Option) (bool, error) { - return true, InternalServerError -} - -// Verify DeleteInstanceGroupInternalErrHook implements MockInstanceGroups.DeleteHook. -var _ = cloud.MockInstanceGroups{ - DeleteHook: DeleteInstanceGroupInternalErrHook, -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/observe.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/observe.go deleted file mode 100644 index 561422dd37338..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/observe.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2023 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "fmt" -) - -// CallObserver is called between the start and end of the operation. -type CallObserver interface { - // Start event for a call to the API. This happens before the - // RateLimiter.Accept(). - Start(ctx context.Context, key *RateLimitKey) - - // End event for a call to the API. This happens after the - // operation is finished. - End(ctx context.Context, key *RateLimitKey, err error) -} - -type contextKey string - -var callObserverContextKey = contextKey("call observer") - -// WithCallObserver adds a CallObserver that will be called on the -// operation being called. -// -// type obs struct{} -// func (o *obs) Start(...) { fmt.Println("start") } -// func (o *obs) End(...) { fmt.Println("end") } -// -// ctx := WithCallObserver(ctx, &obs{}) -// g.Addresses.Insert(ctx, ...) -func WithCallObserver(ctx context.Context, obs CallObserver) context.Context { - return context.WithValue(ctx, callObserverContextKey, obs) -} - -func callObserverStart(ctx context.Context, key *CallContextKey) { - obj := ctx.Value(callObserverContextKey) - if obj == nil { - return - } - co, ok := obj.(CallObserver) - if !ok { - panic(fmt.Sprintf("expected CallObserver, got %T", obj)) - } - co.Start(ctx, key) -} - -func callObserverEnd(ctx context.Context, key *CallContextKey, err error) { - obj := ctx.Value(callObserverContextKey) - if obj == nil { - return - } - co, ok := obj.(CallObserver) - if !ok { - panic(fmt.Sprintf("expected CallObserver, got %T", obj)) - } - co.End(ctx, key, err) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go deleted file mode 100644 index 11ec0921c9f22..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go +++ /dev/null @@ -1,276 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "fmt" - - "k8s.io/klog/v2" - - alpha "google.golang.org/api/compute/v0.alpha" - beta "google.golang.org/api/compute/v0.beta" - ga "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -const ( - operationStatusDone = "DONE" -) - -var ( - // OperationsUseWait set to true to switch to using /Wait vs /Get. This should be a - // transparent change to the clients and this option will be removed once we have - // confidence that there are no issues with switching to the new method. - OperationsUseWait = true -) - -// operation is a GCE operation that can be watied on. -type operation interface { - // isDone queries GCE for the done status. This call can block. - isDone(ctx context.Context) (bool, error) - // error returns the resulting error of the operation. This may be nil if the operations - // was successful. - error() error - // rateLimitKey returns the rate limit key to use for the given operation. - // This rate limit will govern how fast the server will be polled for - // operation completion status. - rateLimitKey() *RateLimitKey -} - -type gaOperation struct { - s *Service - projectID string - key *meta.Key - err error -} - -func (o *gaOperation) String() string { - return fmt.Sprintf("gaOperation{%q, %v}", o.projectID, o.key) -} - -func (o *gaOperation) isDone(ctx context.Context) (bool, error) { - var ( - op *ga.Operation - err error - ) - - if OperationsUseWait { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.GA.RegionOperations.Wait(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.RegionOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.GA.ZoneOperations.Wait(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.ZoneOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.GA.GlobalOperations.Wait(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.GlobalOperations.Wait(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } else { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.GA.RegionOperations.Get(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.RegionOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.GA.ZoneOperations.Get(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.ZoneOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.GA.GlobalOperations.Get(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("GA.GlobalOperations.Get(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } - - if err != nil { - return false, err - } - if op == nil || op.Status != operationStatusDone { - return false, nil - } - - if op.Error != nil && len(op.Error.Errors) > 0 && op.Error.Errors[0] != nil { - e := op.Error.Errors[0] - o.err = &googleapi.Error{Code: int(op.HttpErrorStatusCode), Message: fmt.Sprintf("%v - %v", e.Code, e.Message)} - } - return true, nil -} - -func (o *gaOperation) rateLimitKey() *RateLimitKey { - return &RateLimitKey{ - ProjectID: o.projectID, - Operation: "Get", - Service: "Operations", - Version: meta.VersionGA, - } -} - -func (o *gaOperation) error() error { - return o.err -} - -type alphaOperation struct { - s *Service - projectID string - key *meta.Key - err error -} - -func (o *alphaOperation) String() string { - return fmt.Sprintf("alphaOperation{%q, %v}", o.projectID, o.key) -} - -func (o *alphaOperation) isDone(ctx context.Context) (bool, error) { - var ( - op *alpha.Operation - err error - ) - - if OperationsUseWait { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.Alpha.RegionOperations.Wait(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.RegionOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.Alpha.ZoneOperations.Wait(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.ZoneOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.Alpha.GlobalOperations.Wait(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.GlobalOperations.Wait(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } else { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.Alpha.RegionOperations.Get(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.RegionOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.Alpha.ZoneOperations.Get(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.ZoneOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.Alpha.GlobalOperations.Get(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Alpha.GlobalOperations.Get(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } - - if err != nil { - return false, err - } - if op == nil || op.Status != operationStatusDone { - return false, nil - } - - if op.Error != nil && len(op.Error.Errors) > 0 && op.Error.Errors[0] != nil { - e := op.Error.Errors[0] - o.err = &googleapi.Error{Code: int(op.HttpErrorStatusCode), Message: fmt.Sprintf("%v - %v", e.Code, e.Message)} - } - return true, nil -} - -func (o *alphaOperation) rateLimitKey() *RateLimitKey { - return &RateLimitKey{ - ProjectID: o.projectID, - Operation: "Get", - Service: "Operations", - Version: meta.VersionAlpha, - } -} - -func (o *alphaOperation) error() error { - return o.err -} - -type betaOperation struct { - s *Service - projectID string - key *meta.Key - err error -} - -func (o *betaOperation) String() string { - return fmt.Sprintf("betaOperation{%q, %v}", o.projectID, o.key) -} - -func (o *betaOperation) isDone(ctx context.Context) (bool, error) { - var ( - op *beta.Operation - err error - ) - - if OperationsUseWait { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.Beta.RegionOperations.Wait(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.RegionOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.Beta.ZoneOperations.Wait(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.ZoneOperations.Wait(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.Beta.GlobalOperations.Wait(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.GlobalOperations.Wait(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } else { - switch o.key.Type() { - case meta.Regional: - op, err = o.s.Beta.RegionOperations.Get(o.projectID, o.key.Region, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.RegionOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Region, o.key.Name, op, err, ctx) - case meta.Zonal: - op, err = o.s.Beta.ZoneOperations.Get(o.projectID, o.key.Zone, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.ZoneOperations.Get(%v, %v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Zone, o.key.Name, op, err, ctx) - case meta.Global: - op, err = o.s.Beta.GlobalOperations.Get(o.projectID, o.key.Name).Context(ctx).Do() - klog.V(5).Infof("Beta.GlobalOperations.Get(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - } - if err != nil { - return false, err - } - if op == nil || op.Status != operationStatusDone { - return false, nil - } - - if op.Error != nil && len(op.Error.Errors) > 0 && op.Error.Errors[0] != nil { - e := op.Error.Errors[0] - o.err = &googleapi.Error{Code: int(op.HttpErrorStatusCode), Message: fmt.Sprintf("%v - %v", e.Code, e.Message)} - } - return true, nil -} - -func (o *betaOperation) rateLimitKey() *RateLimitKey { - return &RateLimitKey{ - ProjectID: o.projectID, - Operation: "Get", - Service: "Operations", - Version: meta.VersionBeta, - } -} - -func (o *betaOperation) error() error { - return o.err -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op_networkservices.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op_networkservices.go deleted file mode 100644 index e26ece56c577f..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op_networkservices.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright 2023 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "fmt" - "strings" - - "k8s.io/klog/v2" - - "google.golang.org/api/googleapi" - "google.golang.org/api/networkservices/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -type networkServicesOperation struct { - s *Service - projectID string - key *meta.Key - err error -} - -func (o *networkServicesOperation) String() string { - return fmt.Sprintf("networkServicesOperation{%q, %s}", o.projectID, o.key) -} - -func (o *networkServicesOperation) isDone(ctx context.Context) (bool, error) { - var ( - op *networkservices.Operation - err error - ) - - fqname := fmt.Sprintf("projects/%s/locations/global/operations/%s", o.projectID, o.key.Name) - klog.V(5).Infof("isDone %q", fqname) - - switch o.key.Type() { - case meta.Global: - op, err = o.s.NetworkServicesGA.Operations.Get(fqname).Context(ctx).Do() - klog.V(5).Infof("GA.GlobalOperations.Get(%v, %v) = %+v, %v; ctx = %v", o.projectID, o.key.Name, op, err, ctx) - default: - return false, fmt.Errorf("invalid key type: %#v", o.key) - } - - if err != nil { - return false, err - } - - if op == nil || !op.Done { - return false, nil - } - - if op.Error != nil { - o.err = &googleapi.Error{ - Code: int(op.Error.Code), - Message: fmt.Sprintf("%v - %v", op.Error.Code, op.Error.Message), - } - } - return true, nil -} - -func (o *networkServicesOperation) rateLimitKey() *RateLimitKey { - return &RateLimitKey{ - ProjectID: o.projectID, - Operation: "Get", - Service: "Operations", - Version: meta.VersionGA, - } -} - -func (o *networkServicesOperation) error() error { - return o.err -} - -type networkServiceOpURLParseResult struct { - projectID string - key *meta.Key -} - -// parseNetworkServiceOpURL parses the URL of the network services operation. -// This is different than the `compute` API paths. -func parseNetworkServiceOpURL(name string) (*networkServiceOpURLParseResult, error) { - // Format: projects//locations/global/operations/ - // 0 1 2 3 4 5 - split := strings.Split(name, "/") - const pieces = 6 - if len(split) != pieces { - return nil, fmt.Errorf("invalid op URL %q, want %d pieces, got %d", name, 6, len(split)) - } - if split[0] != "projects" || split[2] != "locations" || split[4] != "operations" { - return nil, fmt.Errorf("invalid op URL %q, did not match expected format", name) - } - if split[3] != "global" { - return nil, fmt.Errorf("only global ops are supported (URL was %q)", name) - } - return &networkServiceOpURLParseResult{ - projectID: split[1], - key: meta.GlobalKey(split[5]), - }, nil -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/option.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/option.go deleted file mode 100644 index ff7e3d2b9f976..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/option.go +++ /dev/null @@ -1,27 +0,0 @@ -package cloud - -// Option are optional parameters to the generated methods. -type Option interface { - mergeInto(all *allOptions) -} - -// allOptions that can be configured for the generated methods. -type allOptions struct { - projectID string -} - -// ForceProjectID forces the projectID to be used in the call to be the one -// specified. This ignores the default routing done by the ProjectRouter. -func ForceProjectID(projectID string) Option { return projectIDOption(projectID) } - -type projectIDOption string - -func (opt projectIDOption) mergeInto(all *allOptions) { all.projectID = string(opt) } - -func mergeOptions(options []Option) allOptions { - var ret allOptions - for _, opt := range options { - opt.mergeInto(&ret) - } - return ret -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/project.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/project.go deleted file mode 100644 index d0ce602581baf..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/project.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -// ProjectRouter routes service calls to the appropriate GCE project. -type ProjectRouter interface { - // ProjectID returns the project ID (non-numeric) to be used for a call - // to an API (version,service). Example tuples: ("ga", "ForwardingRules"), - // ("alpha", "GlobalAddresses"). - // - // This allows for plumbing different service calls to the appropriate - // project, for instance, networking services to a separate project - // than instance management. - ProjectID(ctx context.Context, version meta.Version, service string) string -} - -// SingleProjectRouter routes all service calls to the same project ID. -type SingleProjectRouter struct { - ID string -} - -// ProjectID returns the project ID to be used for a call to the API. -func (r *SingleProjectRouter) ProjectID(ctx context.Context, version meta.Version, service string) string { - return r.ID -} - -func getProjectID(ctx context.Context, pr ProjectRouter, opt allOptions, version meta.Version, service string) string { - if opt.projectID != "" { - return opt.projectID - } - return pr.ProjectID(ctx, version, service) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/ratelimit.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/ratelimit.go deleted file mode 100644 index 3af4796e7f9cb..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/ratelimit.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "time" -) - -// RateLimitKey is a key identifying the operation to be rate limited. The rate limit -// queue will be determined based on the contents of RateKey. -// -// This type will be removed in a future release. Please change all -// references to CallContextKey. -type RateLimitKey = CallContextKey - -// RateLimiter is the interface for a rate limiting policy. -type RateLimiter interface { - // Accept uses the RateLimitKey to derive a sleep time for the calling - // goroutine. This call will block until the operation is ready for - // execution. - // - // Accept returns an error if the given context ctx was canceled - // while waiting for acceptance into the queue. - Accept(ctx context.Context, key *RateLimitKey) error - // Observe uses the RateLimitKey to handle response results, which may affect - // the sleep time for the Accept function. - Observe(ctx context.Context, err error, key *RateLimitKey) -} - -// acceptor is an object which blocks within Accept until a call is allowed to run. -// Accept is a behavior of the flowcontrol.RateLimiter interface. -type acceptor interface { - // Accept blocks until a call is allowed to run. - Accept() -} - -// AcceptRateLimiter wraps an Acceptor with RateLimiter parameters. -type AcceptRateLimiter struct { - // Acceptor is the underlying rate limiter. - Acceptor acceptor -} - -// Accept wraps an Acceptor and blocks on Accept or context.Done(). Key is ignored. -func (rl *AcceptRateLimiter) Accept(ctx context.Context, _ *RateLimitKey) error { - ch := make(chan struct{}) - go func() { - rl.Acceptor.Accept() - close(ch) - }() - select { - case <-ch: - break - case <-ctx.Done(): - return ctx.Err() - } - return nil -} - -// Observe does nothing. -func (rl *AcceptRateLimiter) Observe(context.Context, error, *RateLimitKey) { -} - -// NopRateLimiter is a rate limiter that performs no rate limiting. -type NopRateLimiter struct { -} - -// Accept everything immediately. -func (*NopRateLimiter) Accept(context.Context, *RateLimitKey) error { - return nil -} - -// Observe does nothing. -func (*NopRateLimiter) Observe(context.Context, error, *RateLimitKey) { -} - -// MinimumRateLimiter wraps a RateLimiter and will only call its Accept until the minimum -// duration has been met or the context is cancelled. -type MinimumRateLimiter struct { - // RateLimiter is the underlying ratelimiter which is called after the mininum time is reacehd. - RateLimiter RateLimiter - // Minimum is the minimum wait time before the underlying ratelimiter is called. - Minimum time.Duration -} - -// Accept blocks on the minimum duration and context. Once the minimum duration is met, -// the func is blocked on the underlying ratelimiter. -func (m *MinimumRateLimiter) Accept(ctx context.Context, key *RateLimitKey) error { - select { - case <-time.After(m.Minimum): - return m.RateLimiter.Accept(ctx, key) - case <-ctx.Done(): - return ctx.Err() - } -} - -// Observe just passes error to the underlying ratelimiter. -func (m *MinimumRateLimiter) Observe(ctx context.Context, err error, key *RateLimitKey) { - m.RateLimiter.Observe(ctx, err, key) -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go deleted file mode 100644 index 11411b7f15c96..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "context" - "fmt" - "net/http" - "time" - - alpha "google.golang.org/api/compute/v0.alpha" - beta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - ga "google.golang.org/api/compute/v1" - "google.golang.org/api/networkservices/v1" - networkservicesga "google.golang.org/api/networkservices/v1" - networkservicesbeta "google.golang.org/api/networkservices/v1beta1" - "google.golang.org/api/option" - "k8s.io/klog/v2" -) - -// Service is the top-level adapter for all of the different compute API -// versions. -type Service struct { - GA *ga.Service - Alpha *alpha.Service - Beta *beta.Service - NetworkServicesGA *networkservicesga.ProjectsLocationsService - NetworkServicesBeta *networkservicesbeta.ProjectsLocationsService - ProjectRouter ProjectRouter - RateLimiter RateLimiter -} - -// NewService returns a new Service instance initialized with from an HTTP -// client to the API endpoints. -func NewService(ctx context.Context, client *http.Client, pr ProjectRouter, rl RateLimiter) (*Service, error) { - alpha, err := alpha.NewService(ctx, option.WithHTTPClient(client)) - if err != nil { - return nil, err - } - beta, err := beta.NewService(ctx, option.WithHTTPClient(client)) - if err != nil { - return nil, err - } - ga, err := compute.NewService(ctx, option.WithHTTPClient(client)) - if err != nil { - return nil, err - } - - nsGA, err := networkservicesga.NewService(ctx, option.WithHTTPClient(client)) - if err != nil { - return nil, err - } - nsBeta, err := networkservicesbeta.NewService(ctx, option.WithHTTPClient(client)) - if err != nil { - return nil, err - } - - svc := &Service{ - GA: ga, - Alpha: alpha, - Beta: beta, - NetworkServicesGA: nsGA.Projects.Locations, - NetworkServicesBeta: nsBeta.Projects.Locations, - ProjectRouter: pr, - RateLimiter: rl, - } - - return svc, nil -} - -// wrapOperation wraps a GCE anyOP in a version generic operation type. -func (s *Service) wrapOperation(anyOp any) (operation, error) { - switch o := anyOp.(type) { - case *ga.Operation: - r, err := ParseResourceURL(o.SelfLink) - if err != nil { - return nil, fmt.Errorf("wrapOperation: %w", err) - } - return &gaOperation{ - s: s, - projectID: r.ProjectID, - key: r.Key, - }, nil - case *alpha.Operation: - r, err := ParseResourceURL(o.SelfLink) - if err != nil { - return nil, fmt.Errorf("wrapOperation: %w", err) - } - return &alphaOperation{ - s: s, - projectID: r.ProjectID, - key: r.Key, - }, nil - case *beta.Operation: - r, err := ParseResourceURL(o.SelfLink) - if err != nil { - return nil, fmt.Errorf("wrapOperation: %w", err) - } - return &betaOperation{ - s: s, projectID: r.ProjectID, - key: r.Key, - }, nil - case *networkservices.Operation: - result, err := parseNetworkServiceOpURL(o.Name) - if err != nil { - return nil, fmt.Errorf("wrapOperation: %w", err) - } - return &networkServicesOperation{ - s: s, - projectID: result.projectID, - key: result.key, - }, nil - case *networkservicesbeta.Operation: - result, err := parseNetworkServiceOpURL(o.Name) - if err != nil { - return nil, fmt.Errorf("wrapOperation: %w", err) - } - // Reuse the GA operation stream for Beta. - return &networkServicesOperation{ - s: s, - projectID: result.projectID, - key: result.key, - }, nil - default: - return nil, fmt.Errorf("invalid type %T", anyOp) - } -} - -// WaitForCompletion of a long running operation. This will poll the state of -// GCE for the completion status of the given operation. genericOp can be one -// of alpha, beta, ga Operation types. -func (s *Service) WaitForCompletion(ctx context.Context, genericOp interface{}) error { - op, err := s.wrapOperation(genericOp) - if err != nil { - klog.Errorf("wrapOperation(%+v) error: %v", genericOp, err) - return err - } - - return s.pollOperation(ctx, op) -} - -// pollOperation calls operations.isDone until the function comes back true or context is Done. -// If an error occurs retrieving the operation, the loop will continue until the context is done. -// This is to prevent a transient error from bubbling up to controller-level logic. -func (s *Service) pollOperation(ctx context.Context, op operation) error { - start := time.Now() - var pollCount int - for { - // Check if context has been cancelled. Note that ctx.Done() must be checked before - // returning ctx.Err(). - select { - case <-ctx.Done(): - klog.V(5).Infof("op.pollOperation(%v, %v) not completed, poll count = %d, ctx.Err = %v (%v elapsed)", ctx, op, pollCount, ctx.Err(), time.Since(start)) - return ctx.Err() - default: - // ctx is not canceled, continue immediately - } - - pollCount++ - klog.V(5).Infof("op.isDone(%v) waiting; op = %v, poll count = %d (%v elapsed)", ctx, op, pollCount, time.Since(start)) - s.RateLimiter.Accept(ctx, op.rateLimitKey()) - switch done, err := op.isDone(ctx); { - case err != nil: - klog.V(5).Infof("op.isDone(%v) error; op = %v, poll count = %d, err = %v, retrying (%v elapsed)", ctx, op, pollCount, err, time.Since(start)) - s.RateLimiter.Observe(ctx, err, op.rateLimitKey()) - return err - case done: - klog.V(5).Infof("op.isDone(%v) complete; op = %v, poll count = %d, op.err = %v (%v elapsed)", ctx, op, pollCount, op.error(), time.Since(start)) - s.RateLimiter.Observe(ctx, op.error(), op.rateLimitKey()) - return op.error() - } - } -} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go deleted file mode 100644 index c5718ea9f5bd9..0000000000000 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go +++ /dev/null @@ -1,340 +0,0 @@ -/* -Copyright 2018 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cloud - -import ( - "encoding/json" - "fmt" - "regexp" - "strings" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -var ( - domainPrefix = "https://www.googleapis.com" - computePrefix = "https://www.googleapis.com/compute" - networkServicesPrefix = "https://www.googleapis.com/networkservices" -) - -// SetAPIDomain sets the root of the URL for the API. The default domain is -// "https://www.googleapis.com". -func SetAPIDomain(domain string) { - domainPrefix = domain - computePrefix = domain + "/compute" - networkServicesPrefix = domain + "/networkservices" -} - -// ResourceID identifies a GCE resource as parsed from compute resource URL. -type ResourceID struct { - ProjectID string - // APIGroup identifies the API Group of the resource. - APIGroup meta.APIGroup - Resource string - Key *meta.Key -} - -// Equal returns true if two resource IDs are equal. -func (r *ResourceID) Equal(other *ResourceID) bool { - switch { - case r == nil && other == nil: - return true - case r == nil || other == nil: - return false - case r.ProjectID != other.ProjectID || r.Resource != other.Resource || r.APIGroup != other.APIGroup: - return false - case r.Key != nil && other.Key != nil: - return *r.Key == *other.Key - case r.Key == nil && other.Key == nil: - return true - default: - return false - } -} - -// ResourceMapKey is a flat ResourceID that can be used as a key in maps. -type ResourceMapKey struct { - ProjectID string - APIGroup meta.APIGroup - Resource string - Name string - Zone string - Region string -} - -func (rk ResourceMapKey) ToID() *ResourceID { - return &ResourceID{ - ProjectID: rk.ProjectID, - APIGroup: rk.APIGroup, - Resource: rk.Resource, - Key: &meta.Key{Name: rk.Name, Zone: rk.Zone, Region: rk.Region}, - } -} - -// MapKey returns a flat key that can be used for referencing in maps. -func (r *ResourceID) MapKey() ResourceMapKey { - return ResourceMapKey{ - ProjectID: r.ProjectID, - APIGroup: r.APIGroup, - Resource: r.Resource, - Name: r.Key.Name, - Zone: r.Key.Zone, - Region: r.Key.Region, - } -} - -// RelativeResourceName returns the relative resource name string -// representing this ResourceID. -// Deprecated: Use SelfLink instead -func (r *ResourceID) RelativeResourceName() string { - return RelativeResourceName(r.ProjectID, r.Resource, r.Key) -} - -// ResourcePath returns the resource path representing this ResourceID. -// Deprecated: Use SelfLink instead -func (r *ResourceID) ResourcePath() string { - return ResourcePath(r.Resource, r.Key) -} - -// SelfLink returns a URL representing the resource and defaults to Compute API -// Group if no API Group is specified. -func (r *ResourceID) SelfLink(ver meta.Version) string { - apiGroup := r.APIGroup - if apiGroup == "" { - apiGroup = meta.APIGroupCompute - } - return SelfLinkWithGroup(apiGroup, ver, r.ProjectID, r.Resource, r.Key) -} - -func (r *ResourceID) String() string { - prefix := fmt.Sprintf("%s:%s", r.Resource, r.ProjectID) - if r.APIGroup != "" { - prefix = fmt.Sprintf("%s/%s", r.APIGroup, prefix) - } - switch r.Key.Type() { - case meta.Zonal: - return fmt.Sprintf("%s/%s/%s", prefix, r.Key.Zone, r.Key.Name) - case meta.Regional: - return fmt.Sprintf("%s/%s/%s", prefix, r.Key.Region, r.Key.Name) - } - return fmt.Sprintf("%s/%s", prefix, r.Key.Name) -} - -// apiGroupRegex is used to extract the API Group out of a Resource URL. -// This regex expects API Group to be followed ine one of 2 patterns: -// /projects/ path or legacy one .googleapis.com//projects/. -// Unfortunately it cannot predict what comes before the API -// group since that is configurable via SetAPIDomain. -// legacyApiGroupRegex is used to extract API Group from legacy path in format -var apiGroupRegex = regexp.MustCompile(`([a-z]*)(\.googleapis\.com)?\/(alpha|beta|v1|v1alpha1|v1beta1)/projects`) - -// ParseResourceURL parses resource URLs of the following formats: -// -// global// -// regions/// -// zones/// -// projects/ -// projects//global// -// projects//regions/// -// projects//zones/// -// [https://www.googleapis.com//]/projects//global// -// [https://www.googleapis.com//]/projects//regions/// -// [https://www.googleapis.com//]/projects//zones/// -// [https://.googleapis.com/]/projects//global// -// [https://.googleapis.com/]/projects//regions/// -// [https://.googleapis.com/]/projects//zones/// -// -// Note that ParseResourceURL can't round trip partial paths that do not -// include an API Group. -func ParseResourceURL(url string) (*ResourceID, error) { - matches := apiGroupRegex.FindStringSubmatch(url) - apiGroup, err := apiGroupFromMatches(matches) - if err != nil { - return nil, fmt.Errorf("ParseResourceURL(%q) returned error: %v", url, err) - } - return parseURL(url, apiGroup) -} - -func apiGroupFromMatches(matches []string) (meta.APIGroup, error) { - if len(matches) < 2 { - return meta.APIGroup(""), nil - } - - switch matches[1] { - case "compute": - return meta.APIGroupCompute, nil - case "networkservices": - return meta.APIGroupNetworkServices, nil - } - return meta.APIGroup(""), fmt.Errorf("matches does not contain a supported API Group: %v", matches) -} - -func parseURL(url string, apiGroup meta.APIGroup) (*ResourceID, error) { - errNotValid := fmt.Errorf("%q is not a valid resource URL", url) - // Trim prefix off URL leaving "projects/..." - projectsIndex := strings.Index(url, "/projects/") - if projectsIndex >= 0 { - url = url[projectsIndex+1:] - } - - parts := strings.Split(url, "/") - if len(parts) < 2 || len(parts) > 6 { - return nil, errNotValid - } - - ret := &ResourceID{APIGroup: apiGroup} - scopedName := parts - if parts[0] == "projects" { - ret.Resource = "projects" - ret.ProjectID = parts[1] - scopedName = parts[2:] - - if len(scopedName) == 0 { - return ret, nil - } - } - - switch scopedName[0] { - case "global": - if len(scopedName) != 3 { - return nil, errNotValid - } - ret.Resource = scopedName[1] - ret.Key = meta.GlobalKey(scopedName[2]) - return ret, nil - case "regions": - switch len(scopedName) { - case 2: - ret.Resource = "regions" - ret.Key = meta.GlobalKey(scopedName[1]) - return ret, nil - case 4: - ret.Resource = scopedName[2] - ret.Key = meta.RegionalKey(scopedName[3], scopedName[1]) - return ret, nil - default: - return nil, errNotValid - } - case "zones": - switch len(scopedName) { - case 2: - ret.Resource = "zones" - ret.Key = meta.GlobalKey(scopedName[1]) - return ret, nil - case 4: - ret.Resource = scopedName[2] - ret.Key = meta.ZonalKey(scopedName[3], scopedName[1]) - return ret, nil - default: - return nil, errNotValid - } - } - return nil, errNotValid -} - -func copyViaJSON(dest, src interface{}) error { - bytes, err := json.Marshal(src) - if err != nil { - return err - } - return json.Unmarshal(bytes, dest) -} - -// ResourcePath returns the path starting from the location. -// Example: regions/us-central1/subnetworks/my-subnet -// Deprecated: Use SelfLinkWithGroup instead -func ResourcePath(resource string, key *meta.Key) string { - switch resource { - case "zones", "regions": - return fmt.Sprintf("%s/%s", resource, key.Name) - case "projects": - return "invalid-resource" - } - - switch key.Type() { - case meta.Zonal: - return fmt.Sprintf("zones/%s/%s/%s", key.Zone, resource, key.Name) - case meta.Regional: - return fmt.Sprintf("regions/%s/%s/%s", key.Region, resource, key.Name) - case meta.Global: - return fmt.Sprintf("global/%s/%s", resource, key.Name) - } - return "invalid-key-type" -} - -// RelativeResourceName returns the path starting from project. -// Example: projects/my-project/regions/us-central1/subnetworks/my-subnet -// Deprecated: Use SelfLinkWithGroup instead -func RelativeResourceName(project, resource string, key *meta.Key) string { - switch resource { - case "projects": - return fmt.Sprintf("projects/%s", project) - default: - return fmt.Sprintf("projects/%s/%s", project, ResourcePath(resource, key)) - } -} - -// SelfLink returns a URL representing the resource and assumes Compute API Group. -// Deprecated: Use SelfLinkWithGroup instead -func SelfLink(ver meta.Version, project, resource string, key *meta.Key) string { - return SelfLinkWithGroup(meta.APIGroupCompute, ver, project, resource, key) -} - -// SelfLinkWithGroup returns the self link URL for the given object. -func SelfLinkWithGroup(apiGroup meta.APIGroup, ver meta.Version, project, resource string, key *meta.Key) string { - var prefix string - - switch apiGroup { - case meta.APIGroupCompute: - prefix = computePrefix - case meta.APIGroupNetworkServices: - prefix = networkServicesPrefix - default: - prefix = domainPrefix + "/invalid-apigroup" - } - - switch ver { - case meta.VersionAlpha: - prefix = prefix + "/alpha" - case meta.VersionBeta: - if apiGroup == meta.APIGroupNetworkServices { - prefix = prefix + "/v1beta1" - } else { - prefix = prefix + "/beta" - } - case meta.VersionGA: - prefix = prefix + "/v1" - default: - prefix = "invalid-version" - } - - return fmt.Sprintf("%s/%s", prefix, RelativeResourceName(project, resource, key)) -} - -// aggregatedListKey return the aggregated list key based on the resource key. -func aggregatedListKey(k *meta.Key) string { - switch k.Type() { - case meta.Regional: - return fmt.Sprintf("regions/%s", k.Region) - case meta.Zonal: - return fmt.Sprintf("zones/%s", k.Zone) - case meta.Global: - return "global" - default: - return "unknownScope" - } -} diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json deleted file mode 100644 index 66fb1c9863120..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json +++ /dev/null @@ -1,124084 +0,0 @@ -{ - "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." - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Cloud Storage and see the email address for your Google Account" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Cloud Storage and see the email address of your Google Account" - } - } - } - }, - "basePath": "/compute/alpha/", - "baseUrl": "https://compute.googleapis.com/compute/alpha/", - "batchPath": "batch/compute/alpha", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "compute:alpha", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://compute.mtls.googleapis.com/", - "name": "compute", - "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" - }, - "userIp": { - "description": "Legacy name for parameter that has been superseded by `quotaUser`.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "acceleratorTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of accelerator types.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/acceleratorTypes", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/acceleratorTypes", - "response": { - "$ref": "AcceleratorTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified accelerator type.", - "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.get", - "parameterOrder": [ - "project", - "zone", - "acceleratorType" - ], - "parameters": { - "acceleratorType": { - "description": "Name of the accelerator type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of accelerator types that are available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/acceleratorTypes", - "response": { - "$ref": "AcceleratorTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "addresses": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of addresses.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/addresses", - "httpMethod": "GET", - "id": "compute.addresses.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/addresses", - "response": { - "$ref": "AddressAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - "httpMethod": "DELETE", - "id": "compute.addresses.delete", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - "httpMethod": "GET", - "id": "compute.addresses.get", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}", - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an address resource in the specified project by using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/addresses", - "httpMethod": "POST", - "id": "compute.addresses.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses", - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of addresses contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/addresses", - "httpMethod": "GET", - "id": "compute.addresses.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/addresses", - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", - "httpMethod": "POST", - "id": "compute.addresses.move", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to move.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Source project ID which the Address is moved from.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}/move", - "request": { - "$ref": "RegionAddressesMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an Address. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.addresses.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.addresses.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "advice": { - "methods": { - "calendarMode": { - "description": "Advise how, where and when to create the requested amount of instances\nwith specified accelerators, within the specified time and location limits.\nThe method recommends creating future reservations for the requested\nresources.", - "flatPath": "projects/{project}/regions/{region}/advice/calendarMode", - "httpMethod": "POST", - "id": "compute.advice.calendarMode", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/advice/calendarMode", - "request": { - "$ref": "CalendarModeAdviceRequest" - }, - "response": { - "$ref": "CalendarModeAdviceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "capacity": { - "description": "Advice on making real-time decisions (such as choosing zone or\nmachine types) during deployment to maximize your chances of obtaining\ncapacity.", - "flatPath": "projects/{project}/regions/{region}/advice/capacity", - "httpMethod": "POST", - "id": "compute.advice.capacity", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/advice/capacity", - "request": { - "$ref": "CapacityAdviceRequest" - }, - "response": { - "$ref": "CapacityAdviceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "autoscalers": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of autoscalers.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/autoscalers", - "httpMethod": "GET", - "id": "compute.autoscalers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/autoscalers", - "response": { - "$ref": "AutoscalerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified autoscaler.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "id": "compute.autoscalers.delete", - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified autoscaler resource.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "id": "compute.autoscalers.get", - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an autoscaler in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "POST", - "id": "compute.autoscalers.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of autoscalers contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "GET", - "id": "compute.autoscalers.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "response": { - "$ref": "AutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates an autoscaler in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "PATCH", - "id": "compute.autoscalers.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to patch.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.autoscalers.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an autoscaler in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "PUT", - "id": "compute.autoscalers.update", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to update.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendBuckets": { - "methods": { - "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend\nbucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendBuckets.addSignedUrlKey", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all BackendBucket resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/backendBuckets", - "httpMethod": "GET", - "id": "compute.backendBuckets.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/backendBuckets", - "response": { - "$ref": "BackendBucketAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified BackendBucket resource.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "id": "compute.backendBuckets.delete", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend\nbucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendBuckets.deleteSignedUrlKey", - "parameterOrder": [ - "project", - "backendBucket", - "keyName" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "keyName": { - "description": "The name of the Signed URL Key to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified BackendBucket resource.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "id": "compute.backendBuckets.get", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.backendBuckets.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a BackendBucket resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/backendBuckets", - "httpMethod": "POST", - "id": "compute.backendBuckets.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/backendBuckets", - "httpMethod": "GET", - "id": "compute.backendBuckets.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendBuckets", - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend buckets in the specified project.", - "flatPath": "projects/{project}/global/backendBuckets/listUsable", - "httpMethod": "GET", - "id": "compute.backendBuckets.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendBuckets/listUsable", - "response": { - "$ref": "BackendBucketListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "id": "compute.backendBuckets.patch", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setEdgeSecurityPolicy": { - "description": "Sets the edge security policy for the specified backend bucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendBuckets.setEdgeSecurityPolicy", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.backendBuckets.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.backendBuckets.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PUT", - "id": "compute.backendBuckets.update", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendServices": { - "methods": { - "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend\nservice.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendServices.addSignedUrlKey", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all BackendService resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/backendServices", - "httpMethod": "GET", - "id": "compute.backendServices.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/backendServices", - "response": { - "$ref": "BackendServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified BackendService resource.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "DELETE", - "id": "compute.backendServices.delete", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend\nservice.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendServices.deleteSignedUrlKey", - "parameterOrder": [ - "project", - "backendService", - "keyName" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "keyName": { - "description": "The name of the Signed URL Key to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified BackendService resource.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "GET", - "id": "compute.backendServices.get", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveSecurityPolicies": { - "description": "Returns effective security policies applied to this backend service.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", - "httpMethod": "GET", - "id": "compute.backendServices.getEffectiveSecurityPolicies", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the Backend Service for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", - "response": { - "$ref": "BackendServicesGetEffectiveSecurityPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for this\nBackendService.\n\nExample request body:\n\n{\n \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\"\n}", - "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "id": "compute.backendServices.getHealth", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the queried instance belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/getHealth", - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.backendServices.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a BackendService resource in the specified project using\nthe data included in the request. For more information, see\nBackend services overview.", - "flatPath": "projects/{project}/global/backendServices", - "httpMethod": "POST", - "id": "compute.backendServices.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendService resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/backendServices", - "httpMethod": "GET", - "id": "compute.backendServices.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendServices", - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend services in the specified project.", - "flatPath": "projects/{project}/global/backendServices/listUsable", - "httpMethod": "GET", - "id": "compute.backendServices.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendServices/listUsable", - "response": { - "$ref": "BackendServiceListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified BackendService resource with the data included in the\nrequest. For more information, see \nBackend services overview. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "PATCH", - "id": "compute.backendServices.patch", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setEdgeSecurityPolicy": { - "description": "Sets the edge security policy for the specified backend service.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setEdgeSecurityPolicy", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the edge security policy\nshould be set. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified backend\nservice. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setSecurityPolicy", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.backendServices.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified BackendService resource with the data included in the\nrequest. For more information, seeBackend\nservices overview.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "PUT", - "id": "compute.backendServices.update", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "crossSiteNetworks": { - "methods": { - "delete": { - "description": "Deletes the specified cross-site network in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "DELETE", - "id": "compute.crossSiteNetworks.delete", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified cross-site network in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "GET", - "id": "compute.crossSiteNetworks.get", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "response": { - "$ref": "CrossSiteNetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a cross-site network in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/crossSiteNetworks", - "httpMethod": "POST", - "id": "compute.crossSiteNetworks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks", - "request": { - "$ref": "CrossSiteNetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the cross-site networks for a project in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks", - "httpMethod": "GET", - "id": "compute.crossSiteNetworks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks", - "response": { - "$ref": "CrossSiteNetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified cross-site network with the data included in\nthe request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "PATCH", - "id": "compute.crossSiteNetworks.patch", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "request": { - "$ref": "CrossSiteNetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskSettings": { - "methods": { - "get": { - "description": "Get Zonal Disk Settings.", - "flatPath": "projects/{project}/zones/{zone}/diskSettings", - "httpMethod": "GET", - "id": "compute.diskSettings.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskSettings", - "response": { - "$ref": "DiskSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Zonal Disk Settings", - "flatPath": "projects/{project}/zones/{zone}/diskSettings", - "httpMethod": "PATCH", - "id": "compute.diskSettings.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskSettings", - "request": { - "$ref": "DiskSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of disk types.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/diskTypes", - "httpMethod": "GET", - "id": "compute.diskTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/diskTypes", - "response": { - "$ref": "DiskTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified disk type.", - "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - "httpMethod": "GET", - "id": "compute.diskTypes.get", - "parameterOrder": [ - "project", - "zone", - "diskType" - ], - "parameters": { - "diskType": { - "description": "Name of the disk type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of disk types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/diskTypes", - "httpMethod": "GET", - "id": "compute.diskTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskTypes", - "response": { - "$ref": "DiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "disks": { - "methods": { - "addResourcePolicies": { - "description": "Adds existing resource policies to a disk. You can only add one\npolicy which will be applied to this disk for scheduling snapshot\ncreation.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.disks.addResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - "request": { - "$ref": "DisksAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of persistent disks.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/disks", - "httpMethod": "GET", - "id": "compute.disks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/disks", - "response": { - "$ref": "DiskAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "bulkInsert": { - "description": "Bulk create a set of disks.", - "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", - "httpMethod": "POST", - "id": "compute.disks.bulkInsert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/bulkInsert", - "request": { - "$ref": "BulkInsertDiskResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkSetLabels": { - "description": "Sets the labels on many disks at once. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/disks/bulkSetLabels", - "httpMethod": "POST", - "id": "compute.disks.bulkSetLabels", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/bulkSetLabels", - "request": { - "$ref": "BulkZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk. For regular snapshot\ncreation, consider using snapshots.insert\ninstead, as that method supports more features, such as creating snapshots\nin a project different from the source disk project.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "id": "compute.disks.createSnapshot", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to snapshot.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent snapshot by\ninforming the OS to prepare for the snapshot process.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified persistent disk. Deleting a disk removes its data\npermanently and is irreversible. However, deleting a disk does not\ndelete any snapshots\npreviously made from the disk. You must separatelydelete\nsnapshots.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "DELETE", - "id": "compute.disks.delete", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to delete.", - "location": "path", - "pattern": "\\S{1,66}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified persistent disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "GET", - "id": "compute.disks.get", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAsyncReplicationStatus": { - "description": "Gets the status of current async replication for a given device.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/getAsyncReplicationStatus", - "httpMethod": "GET", - "id": "compute.disks.getAsyncReplicationStatus", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the Disk resource whose Async replication details are requested.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/getAsyncReplicationStatus", - "response": { - "$ref": "GetAsyncReplicationStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.disks.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a persistent disk in the specified project using the data\nin the request. You can create a disk from a source\n(sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by\nomitting all properties. You can also create a disk that is larger than\nthe default size by specifying the sizeGb property.", - "flatPath": "projects/{project}/zones/{zone}/disks", - "httpMethod": "POST", - "id": "compute.disks.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceImage": { - "description": "Source image to restore onto a disk. This field is optional.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of persistent disks contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/disks", - "httpMethod": "GET", - "id": "compute.disks.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks", - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from a disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.disks.removeResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", - "request": { - "$ref": "DisksRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the specified persistent disk.\nYou can only increase the size of the disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", - "httpMethod": "POST", - "id": "compute.disks.resize", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", - "request": { - "$ref": "DisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.disks.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a disk. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.disks.setLabels", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startAsyncReplication": { - "description": "Starts asynchronous replication.\nMust be invoked on the primary disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.startAsyncReplication", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - "request": { - "$ref": "DisksStartAsyncReplicationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopAsyncReplication": { - "description": "Stops asynchronous replication.\nCan be invoked either on the primary or on the secondary disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.stopAsyncReplication", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopGroupAsyncReplication": { - "description": "Stops asynchronous replication for a consistency group of disks.\nCan be invoked either in the primary or secondary scope.", - "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.stopGroupAsyncReplication", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request. This must be the zone of the primary\nor secondary disks in the consistency group.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - "request": { - "$ref": "DisksStopGroupAsyncReplicationResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.disks.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified disk with the data included in the request.\nThe update is performed only on selected fields included as part\nof update-mask. Only the following fields can be modified: user_license.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "PATCH", - "id": "compute.disks.update", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateKmsKey": { - "description": "Rotates the customer-managed\nencryption key to the latest version for the specified persistent disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/updateKmsKey", - "httpMethod": "POST", - "id": "compute.disks.updateKmsKey", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the Disk resource, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/updateKmsKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "waitForReplicationCatchUp": { - "description": "Wait for replication to catch up on the secondary disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/waitForReplicationCatchUp", - "httpMethod": "POST", - "id": "compute.disks.waitForReplicationCatchUp", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/waitForReplicationCatchUp", - "request": { - "$ref": "WaitForReplicationCatchUpRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "externalVpnGateways": { - "methods": { - "delete": { - "description": "Deletes the specified externalVpnGateway.", - "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "httpMethod": "DELETE", - "id": "compute.externalVpnGateways.delete", - "parameterOrder": [ - "project", - "externalVpnGateway" - ], - "parameters": { - "externalVpnGateway": { - "description": "Name of the externalVpnGateways to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified externalVpnGateway. Get a list of available\nexternalVpnGateways by making a list() request.", - "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "httpMethod": "GET", - "id": "compute.externalVpnGateways.get", - "parameterOrder": [ - "project", - "externalVpnGateway" - ], - "parameters": { - "externalVpnGateway": { - "description": "Name of the externalVpnGateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "response": { - "$ref": "ExternalVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ExternalVpnGateway in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/externalVpnGateways", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways", - "request": { - "$ref": "ExternalVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of ExternalVpnGateway available to the specified\nproject.", - "flatPath": "projects/{project}/global/externalVpnGateways", - "httpMethod": "GET", - "id": "compute.externalVpnGateways.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/externalVpnGateways", - "response": { - "$ref": "ExternalVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addPacketMirroringRule": { - "description": "Inserts a packet mirroring rule into a firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.firewallPolicies.cloneRules", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.firewallPolicies.delete", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "forceStartProgressiveRollout": { - "description": "Starts a brand new progressive rollout of hierarchical firewall policy.\nThis API will return an error when there is an ongoing progressive rollout.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/forceStartProgressiveRollout", - "httpMethod": "POST", - "id": "compute.firewallPolicies.forceStartProgressiveRollout", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the target firewall policy.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/forceStartProgressiveRollout", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.firewallPolicies.get", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPacketMirroringRule": { - "description": "Gets a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "locations/global/firewallPolicies", - "httpMethod": "POST", - "id": "compute.firewallPolicies.insert", - "parameters": { - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified\nfolder or organization.", - "flatPath": "locations/global/firewallPolicies", - "httpMethod": "GET", - "id": "compute.firewallPolicies.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.", - "flatPath": "locations/global/firewallPolicies/listAssociations", - "httpMethod": "GET", - "id": "compute.firewallPolicies.listAssociations", - "parameters": { - "includeInheritedPolicies": { - "description": "If set to \"true\", the response will contain a list of all associations for\nthe containing folders and the containing organization of the target. The\nparameter has no effect if the target is an organization.", - "location": "query", - "type": "boolean" - }, - "targetResource": { - "description": "The target resource to list associations. It is an organization, or a\nfolder.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/listAssociations", - "response": { - "$ref": "FirewallPoliciesListAssociationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", - "httpMethod": "POST", - "id": "compute.firewallPolicies.move", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "The new parent of the firewall policy. The ID can be either be\n\"folders/[FOLDER_ID]\" if the parent is a folder or\n\"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/move", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.firewallPolicies.patch", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPacketMirroringRule": { - "description": "Patches a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.patchPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.patchRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removeAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePacketMirroringRule": { - "description": "Deletes a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removePacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removeRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.firewallPolicies.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalOrganizationSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.firewallPolicies.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewalls": { - "methods": { - "delete": { - "description": "Deletes the specified firewall.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "DELETE", - "id": "compute.firewalls.delete", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified firewall.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "GET", - "id": "compute.firewalls.get", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "response": { - "$ref": "Firewall" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a firewall rule in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/firewalls", - "httpMethod": "POST", - "id": "compute.firewalls.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of firewall rules available to the specified\nproject.", - "flatPath": "projects/{project}/global/firewalls", - "httpMethod": "GET", - "id": "compute.firewalls.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/firewalls", - "response": { - "$ref": "FirewallList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified firewall rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "PATCH", - "id": "compute.firewalls.patch", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.firewalls.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified firewall rule with the data included in the\nrequest.\nNote that all fields will be updated if using PUT, even fields that are not\nspecified. To update individual fields, please use PATCH instead.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "PUT", - "id": "compute.firewalls.update", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "forwardingRules": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of forwarding rules.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/forwardingRules", - "httpMethod": "GET", - "id": "compute.forwardingRules.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/forwardingRules", - "response": { - "$ref": "ForwardingRuleAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified ForwardingRule resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "id": "compute.forwardingRules.delete", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified ForwardingRule resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "id": "compute.forwardingRules.get", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ForwardingRule resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules", - "httpMethod": "POST", - "id": "compute.forwardingRules.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of ForwardingRule resources available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules", - "httpMethod": "GET", - "id": "compute.forwardingRules.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules", - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified forwarding rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules. Currently, you can only\npatch the network_tier field.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "id": "compute.forwardingRules.patch", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels,\nread the \nLabeling Resources documentation.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.forwardingRules.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "description": "Changes target URL for forwarding rule. The new target should be of the\nsame type as the old target.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "id": "compute.forwardingRules.setTarget", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource in which target is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.forwardingRules.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "futureReservations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of future reservations.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/futureReservations", - "httpMethod": "GET", - "id": "compute.futureReservations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/futureReservations", - "response": { - "$ref": "FutureReservationsAggregatedListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "cancel": { - "description": "Cancel the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", - "httpMethod": "POST", - "id": "compute.futureReservations.cancel", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "DELETE", - "id": "compute.futureReservations.delete", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves information about the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "GET", - "id": "compute.futureReservations.get", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "response": { - "$ref": "FutureReservation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new Future Reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations", - "httpMethod": "POST", - "id": "compute.futureReservations.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations", - "request": { - "$ref": "FutureReservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list of all the future reservations that have been configured for the\nspecified project in specified zone.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations", - "httpMethod": "GET", - "id": "compute.futureReservations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations", - "response": { - "$ref": "FutureReservationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "PATCH", - "id": "compute.futureReservations.update", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the reservation to update. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "request": { - "$ref": "FutureReservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalAddresses": { - "methods": { - "delete": { - "description": "Deletes the specified address resource.", - "flatPath": "projects/{project}/global/addresses/{address}", - "httpMethod": "DELETE", - "id": "compute.globalAddresses.delete", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified address resource.", - "flatPath": "projects/{project}/global/addresses/{address}", - "httpMethod": "GET", - "id": "compute.globalAddresses.get", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}", - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getOwnerInstance": { - "description": "Find owner instance from given ip address", - "flatPath": "projects/{project}/global/addresses/getOwnerInstance", - "httpMethod": "GET", - "id": "compute.globalAddresses.getOwnerInstance", - "parameterOrder": [ - "project" - ], - "parameters": { - "ipAddress": { - "description": "The VM IP address.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/getOwnerInstance", - "response": { - "$ref": "GetOwnerInstanceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an address resource in the specified project by using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/addresses", - "httpMethod": "POST", - "id": "compute.globalAddresses.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses", - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of global addresses.", - "flatPath": "projects/{project}/global/addresses", - "httpMethod": "GET", - "id": "compute.globalAddresses.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/addresses", - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified address resource from one project to another project.", - "flatPath": "projects/{project}/global/addresses/{address}/move", - "httpMethod": "POST", - "id": "compute.globalAddresses.move", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to move.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Source project ID which the Address is moved from.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}/move", - "request": { - "$ref": "GlobalAddressesMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.globalAddresses.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.globalAddresses.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalFolderOperations": { - "methods": { - "get": { - "description": "Retrieves the specified Operations resource.", - "flatPath": "folders/{foldersId}/global/operations/{operation}", - "httpMethod": "GET", - "id": "compute.globalFolderOperations.get", - "parameterOrder": [ - "folder", - "operation" - ], - "parameters": { - "folder": { - "description": "Folder ID for this request.", - "location": "path", - "pattern": "folders/[0-9]{0,20}", - "required": true, - "type": "string" - }, - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "{+folder}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\nfolder.", - "flatPath": "folders/{foldersId}/global/operations", - "httpMethod": "GET", - "id": "compute.globalFolderOperations.list", - "parameterOrder": [ - "folder" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "folder": { - "description": "Folder ID for this request.", - "location": "path", - "pattern": "folders/[0-9]{0,20}", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "{+folder}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalForwardingRules": { - "methods": { - "delete": { - "description": "Deletes the specified GlobalForwardingRule resource.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "id": "compute.globalForwardingRules.delete", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified GlobalForwardingRule resource. Gets a list of\navailable forwarding rules by making a list() request.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "id": "compute.globalForwardingRules.get", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a GlobalForwardingRule resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/forwardingRules", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of GlobalForwardingRule resources available to the\nspecified project.", - "flatPath": "projects/{project}/global/forwardingRules", - "httpMethod": "GET", - "id": "compute.globalForwardingRules.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/forwardingRules", - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified forwarding rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules. Currently, you can only\npatch the network_tier field.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "id": "compute.globalForwardingRules.patch", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels,\nread the \nLabeling resources documentation.", - "flatPath": "projects/{project}/global/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "description": "Changes target URL for the GlobalForwardingRule resource. The new target\nshould be of the same type as the old target.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.setTarget", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource in which target is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalNetworkEndpointGroups": { - "methods": { - "attachNetworkEndpoints": { - "description": "Attach a network endpoint to the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "GlobalNetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group.Note that the NEG cannot be\ndeleted if there are backend services referencing it.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.globalNetworkEndpointGroups.delete", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach the network endpoint from the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are removing network\nendpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "GlobalNetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.globalNetworkEndpointGroups.get", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/global/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of network endpoint groups that are located in the\nspecified project.", - "flatPath": "projects/{project}/global/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.globalNetworkEndpointGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOperations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all operations.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/operations", - "httpMethod": "GET", - "id": "compute.globalOperations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/operations", - "response": { - "$ref": "OperationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Operations resource.", - "flatPath": "projects/{project}/global/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.globalOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified Operations resource.", - "flatPath": "projects/{project}/global/operations/{operation}", - "httpMethod": "GET", - "id": "compute.globalOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\nproject.", - "flatPath": "projects/{project}/global/operations", - "httpMethod": "GET", - "id": "compute.globalOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method differs from the\n`GET` method in that it waits for no more than the default\ndeadline (2 minutes) and then returns the current state of the operation,\nwhich might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/global/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.globalOperations.wait", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOrganizationOperations": { - "methods": { - "delete": { - "description": "Deletes the specified Operations resource.", - "flatPath": "locations/global/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.globalOrganizationOperations.delete", - "parameterOrder": [ - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations\nby making a `list()` request.", - "flatPath": "locations/global/operations/{operation}", - "httpMethod": "GET", - "id": "compute.globalOrganizationOperations.get", - "parameterOrder": [ - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return. Parent is derived from this\nfield.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request. Not used. Parent is derived from resource_id.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\norganization.", - "flatPath": "locations/global/operations", - "httpMethod": "GET", - "id": "compute.globalOrganizationOperations.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalPublicDelegatedPrefixes": { - "methods": { - "delete": { - "description": "Deletes the specified global PublicDelegatedPrefix.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "DELETE", - "id": "compute.globalPublicDelegatedPrefixes.delete", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified global PublicDelegatedPrefix resource.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "GET", - "id": "compute.globalPublicDelegatedPrefixes.get", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "PublicDelegatedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a global PublicDelegatedPrefix in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes", - "httpMethod": "POST", - "id": "compute.globalPublicDelegatedPrefixes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the global PublicDelegatedPrefixes for a project.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.globalPublicDelegatedPrefixes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified global PublicDelegatedPrefix resource with the data\nincluded in the request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "PATCH", - "id": "compute.globalPublicDelegatedPrefixes.patch", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalVmExtensionPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all VM Extension Policy resources\navailable to the specified project.\n\nTo prevent failure, it's recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vmExtensionPolicies", - "response": { - "$ref": "VmExtensionPolicyAggregatedListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Purge scoped resources (zonal policies) from a global VM extension\npolicy, and then delete the global VM extension policy. Purge of the scoped\nresources is a pre-condition of the global VM extension policy deletion.\nThe deletion of the global VM extension policy happens after the purge\nrollout is done, so it's not a part of the LRO. It's an automatic process\nthat triggers in the backend.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", - "httpMethod": "POST", - "id": "compute.globalVmExtensionPolicies.delete", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the global VM extension policy to purge scoped resources for.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", - "request": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutInput" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a global VM extension policy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.get", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the GlobalVmExtensionPolicy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "response": { - "$ref": "GlobalVmExtensionPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new project level GlobalVmExtensionPolicy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies", - "httpMethod": "POST", - "id": "compute.globalVmExtensionPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies", - "request": { - "$ref": "GlobalVmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists global VM extension policies.", - "flatPath": "projects/{project}/global/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies", - "response": { - "$ref": "GlobalVmExtensionPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a global VM extension policy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "httpMethod": "PATCH", - "id": "compute.globalVmExtensionPolicies.update", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the global VM extension policy to update.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "request": { - "$ref": "GlobalVmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "haControllers": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the HaControllers in the specified\nproject across all regions.", - "flatPath": "projects/{project}/aggregated/haControllers", - "httpMethod": "GET", - "id": "compute.haControllers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/haControllers", - "response": { - "$ref": "HaControllersAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes an HaController in the specified project.", - "flatPath": "projects/{project}/regions/{region}/haControllers/{haController}", - "httpMethod": "DELETE", - "id": "compute.haControllers.delete", - "parameterOrder": [ - "project", - "region", - "haController" - ], - "parameters": { - "haController": { - "description": "Name of the HaController resource to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/haControllers/{haController}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "failover": { - "description": "Fails over a VM targeted by the specified HaController to the selected\nzone.", - "flatPath": "projects/{project}/regions/{region}/haControllers/{haController}/failover", - "httpMethod": "POST", - "id": "compute.haControllers.failover", - "parameterOrder": [ - "project", - "region", - "haController" - ], - "parameters": { - "haController": { - "description": "ID of the HaController resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/haControllers/{haController}/failover", - "request": { - "$ref": "HaControllersFailoverRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all the details of a specific HaController.", - "flatPath": "projects/{project}/regions/{region}/haControllers/{haController}", - "httpMethod": "GET", - "id": "compute.haControllers.get", - "parameterOrder": [ - "project", - "region", - "haController" - ], - "parameters": { - "haController": { - "description": "Name of the HaController resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/haControllers/{haController}", - "response": { - "$ref": "HaController" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates HaController in the specified project.", - "flatPath": "projects/{project}/regions/{region}/haControllers", - "httpMethod": "POST", - "id": "compute.haControllers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/haControllers", - "request": { - "$ref": "HaController" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all HaControllers in the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/haControllers", - "httpMethod": "GET", - "id": "compute.haControllers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/haControllers", - "response": { - "$ref": "HaControllersList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates HaController in the specified project.", - "flatPath": "projects/{project}/regions/{region}/haControllers/{haController}", - "httpMethod": "PATCH", - "id": "compute.haControllers.patch", - "parameterOrder": [ - "project", - "region", - "haController" - ], - "parameters": { - "haController": { - "description": "ID of the HaController resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/haControllers/{haController}", - "request": { - "$ref": "HaController" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "healthChecks": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthCheck resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthChecks", - "httpMethod": "GET", - "id": "compute.healthChecks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthChecks", - "response": { - "$ref": "HealthChecksAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthCheck resource.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "id": "compute.healthChecks.delete", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthCheck resource.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "GET", - "id": "compute.healthChecks.get", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/healthChecks", - "httpMethod": "POST", - "id": "compute.healthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/healthChecks", - "httpMethod": "GET", - "id": "compute.healthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/healthChecks", - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "id": "compute.healthChecks.patch", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.healthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "id": "compute.healthChecks.update", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.httpHealthChecks.delete", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HttpHealthCheck resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "GET", - "id": "compute.httpHealthChecks.get", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "response": { - "$ref": "HttpHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpHealthChecks", - "httpMethod": "POST", - "id": "compute.httpHealthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/httpHealthChecks", - "httpMethod": "GET", - "id": "compute.httpHealthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/httpHealthChecks", - "response": { - "$ref": "HttpHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.httpHealthChecks.patch", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.httpHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PUT", - "id": "compute.httpHealthChecks.update", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpsHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.httpsHealthChecks.delete", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HttpsHealthCheck resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "GET", - "id": "compute.httpsHealthChecks.get", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "response": { - "$ref": "HttpsHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpsHealthChecks", - "httpMethod": "POST", - "id": "compute.httpsHealthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/httpsHealthChecks", - "httpMethod": "GET", - "id": "compute.httpsHealthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/httpsHealthChecks", - "response": { - "$ref": "HttpsHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.httpsHealthChecks.patch", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.httpsHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PUT", - "id": "compute.httpsHealthChecks.update", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "imageFamilyViews": { - "methods": { - "get": { - "description": "Returns the latest image that is part of an image family, is not\ndeprecated and is rolled out in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", - "httpMethod": "GET", - "id": "compute.imageFamilyViews.get", - "parameterOrder": [ - "project", - "zone", - "family" - ], - "parameters": { - "family": { - "description": "Name of the image family to search for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", - "response": { - "$ref": "ImageFamilyView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "images": { - "methods": { - "delete": { - "description": "Deletes the specified image.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "DELETE", - "id": "compute.images.delete", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deprecate": { - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - "flatPath": "projects/{project}/global/images/{image}/deprecate", - "httpMethod": "POST", - "id": "compute.images.deprecate", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Image name.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}/deprecate", - "request": { - "$ref": "DeprecationStatus" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified image.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "GET", - "id": "compute.images.get", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getFromFamily": { - "description": "Returns the latest image that is part of an image family and is not\ndeprecated. For more information on image families, seePublic\nimage families documentation.", - "flatPath": "projects/{project}/global/images/family/{family}", - "httpMethod": "GET", - "id": "compute.images.getFromFamily", - "parameterOrder": [ - "project", - "family" - ], - "parameters": { - "family": { - "description": "Name of the image family to search for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "The image project that the image belongs to. For example, to get a CentOS\nimage, specify centos-cloud as the image project.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/family/{family}", - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/images/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.images.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an image in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/images", - "httpMethod": "POST", - "id": "compute.images.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "forceCreate": { - "description": "Force image creation if true.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images", - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of custom images\navailable to the specified project. Custom images are images you\ncreate that belong to your project. This method does not\nget any images that belong to other projects, including publicly-available\nimages, like Debian 8. If you want to get a list of publicly-available\nimages, use this method to make a request to the respective image project,\nsuch as debian-cloud or windows-cloud.", - "flatPath": "projects/{project}/global/images", - "httpMethod": "GET", - "id": "compute.images.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The zone query parameter.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "path": "projects/{project}/global/images", - "response": { - "$ref": "ImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified image with the data included in the request.\nOnly the following fields can be modified: family, description,\ndeprecation status.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "PATCH", - "id": "compute.images.patch", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/images/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.images.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an image. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/images/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.images.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/images/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.images.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagerResizeRequests": { - "methods": { - "cancel": { - "description": "Cancels the specified resize request and removes it from the queue.\nCancelled resize request does no longer wait for the resources to be\nprovisioned. Cancel is only possible for requests that are accepted in the\nqueue.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "httpMethod": "POST", - "id": "compute.instanceGroupManagerResizeRequests.cancel", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to cancel.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified, inactive resize request. Requests that are still\nactive cannot be deleted. Deleting request does not delete instances that\nwere provisioned previously.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "DELETE", - "id": "compute.instanceGroupManagerResizeRequests.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to delete.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified resize request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "GET", - "id": "compute.instanceGroupManagerResizeRequests.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the href=\"/compute/docs/regions-zones/#available\"\u003ezone\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new resize request that starts provisioning VMs immediately\nor queues VM creation.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "POST", - "id": "compute.instanceGroupManagerResizeRequests.insert", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group to which the resize request will\nbe added.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located and where the resize request will be created.\nName should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "request": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of resize requests that are contained in the\nmanaged instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "GET", - "id": "compute.instanceGroupManagerResizeRequests.list", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "response": { - "$ref": "InstanceGroupManagerResizeRequestsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "description": "Flags the specified instances to be removed from the\nmanaged instance group. Abandoning an instance does not delete the\ninstance, but it does remove the instance from any target pools that are\napplied by the managed instance group. This method reduces thetargetSize of the managed instance group by the\nnumber of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have\nnot yet been removed from the group. You must separately verify the\nstatus of the abandoning action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.abandonInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of managed instance groups and groups them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceGroupManagers", - "response": { - "$ref": "InstanceGroupManagerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "applyUpdatesToInstances": { - "description": "Applies changes to selected instances on the managed instance group.\nThis method can be used to apply new overrides and/or new versions.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.applyUpdatesToInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located. Should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "request": { - "$ref": "InstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createInstances": { - "description": "Creates instances with per-instance configurations in this managed instance\ngroup. Instances are created using the current instance template. Thecreate instances operation is marked DONE if thecreateInstances request is successful. The underlying actions\ntake additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances\nmethod.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.createInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "request": { - "$ref": "InstanceGroupManagersCreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified managed instance group and all of the instances\nin that group. Note that the instance group must not belong to a\nbackend service. Read\nDeleting an instance group for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "id": "compute.instanceGroupManagers.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "description": "Flags the specified instances in the managed instance group for immediate\ndeletion. The instances are also removed from any target\npools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of\ninstances that you delete. This operation is marked as DONE\nwhen the action is scheduled even if the instances are still being deleted.\nYou must separately verify the status of the deleting action\nwith thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.deleteInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configurations for the managed instance\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance\ngroup is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified managed instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAvailableAcceleratorTopologies": { - "description": "Returns information about available accelerator topologies for a given MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", - "parameterOrder": [ - "project", - "zone", - "resourceId" - ], - "parameters": { - "project": { - "description": "Required. Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resourceId": { - "description": "Required. The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Required. The name of thezone where the managed\ninstance group is located.\nName should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies", - "response": { - "$ref": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a managed instance group using the information that you specify\nin the request. After the group is created, instances in the group are\ncreated using the specified instance template.\nThis operation is marked as DONE when the group is created\neven if the instances in the group have not yet been created. You\nmust separately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nA managed instance group can have up to 1000 VM instances per group. Please\ncontact Cloud Support if you need an increase in\nthis limit.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of managed instance groups that are contained within the\nspecified project and zone.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers", - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given managed\ninstance group. The filter and orderBy query\nparameters are not supported.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.listErrors", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035, or an\nunsigned long integer: must match regexp pattern:\n(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "response": { - "$ref": "InstanceGroupManagersListErrorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance\nin the list has a currentAction, which indicates the action\nthat the managed instance group is performing on the instance. For example,\nif the group is still creating an instance, the currentAction\nis CREATING. If a previous action failed, the\nlist displays the errors for that failed action. The orderBy\nquery parameter is not supported. The `pageToken` query parameter is\nsupported only if the group's `listManagedInstancesResults` field is set\nto `PAGINATED`.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.listManagedInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "response": { - "$ref": "InstanceGroupManagersListManagedInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configurations defined for the managed\ninstance group. The orderBy query parameter is not supported.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.listPerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "response": { - "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is patched\neven if the instances in the group are still in the process of being\npatched. You must separately verify the status of the individual instances\nwith thelistManagedInstances\nmethod. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "id": "compute.instanceGroupManagers.patch", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nyou want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPerInstanceConfigs": { - "description": "Inserts or patches per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersPatchPerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "recreateInstances": { - "description": "Flags the specified VM instances in the managed instance group to be\nimmediately recreated. Each instance is recreated using the group's current\nconfiguration. This operation is marked as DONE when the flag\nis set even if the instances have not yet been recreated. You must\nseparately verify the status of each instance by checking itscurrentAction field; for more information, see Checking\nthe status of managed instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.recreateInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the managed instance group. If you increase the size, the group\ncreates new instances using the current instance template. If you decrease\nthe size, the group deletes instances. The resize operation is markedDONE when the resize actions are scheduled even if the group\nhas not yet added or deleted any instances. You must separately\nverify the status of the creating or deleting\nactions with thelistmanagedinstances\nmethod.\n\nWhen resizing down, the instance group arbitrarily chooses the order in\nwhich VMs are deleted. The group takes into account some VM attributes when\nmaking the selection including:\n\n+ The status of the VM instance.\n+ The health of the VM instance.\n+ The instance template version the VM is based on.\n+ For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resize", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "size": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "description": "Resizes the managed instance group with advanced configuration options like\ndisabling creation retries. This is an extended version of theresize method.\n\nIf you increase the size of the instance group, the group creates new\ninstances using the current instance template. If you decrease the size,\nthe group deletes instances. The resize operation is markedDONE when the resize actions are scheduled even if the group\nhas not yet added or deleted any instances. You must separately\nverify the status of the creating,creatingWithoutRetries, or deleting actions with\nthe get\norlistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resizeAdvanced", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "request": { - "$ref": "InstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resumeInstances": { - "description": "Flags the specified instances in the managed instance group to be\nresumed. This method increases thetargetSize and decreases the targetSuspendedSize\nof the managed instance group by the number of instances that you resume.\nThe resumeInstances operation is marked DONE if\nthe resumeInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are suspended. For\nexample, if an instance was previously suspended using the suspendInstances\nmethod, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resumeInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "request": { - "$ref": "InstanceGroupManagersResumeInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "deprecated": true, - "description": "Motifies the autohealing policy for the instances in this managed\ninstance group.\n[Deprecated] This method is deprecated. UseinstanceGroupManagers.patch instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "request": { - "$ref": "InstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this\ngroup. The templates for existing instances in the group do not change\nunless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance\ngroup are assigned. The target pools automatically apply to all of the\ninstances in the managed instance group. This operation is markedDONE when you make the request even if the instances have not\nyet been added to their target pools. The change might take some time to\napply to all of the instances in the group depending on the size of the\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setTargetPools", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startInstances": { - "description": "Flags the specified instances in the managed instance group to be\nstarted. This method increases thetargetSize and decreases the targetStoppedSize\nof the managed instance group by the number of instances that you start.\nThe startInstances operation is marked DONE if\nthe startInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are stopped. For\nexample, if an instance was previously stopped using the stopInstances\nmethod, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.startInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "request": { - "$ref": "InstanceGroupManagersStartInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately stopped. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetStoppedSize\nof the managed instance group by the number of instances that you stop.\nThe stopInstances operation is marked DONE if\nthe stopInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays stopping the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is stopped.\n\nStopped instances can be started using the startInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.stopInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "request": { - "$ref": "InstanceGroupManagersStopInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspendInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately suspended. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetSuspendedSize\nof the managed instance group by the number of instances that you suspend.\nThe suspendInstances operation is marked DONE if\nthe suspendInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays suspension of the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.suspendInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "request": { - "$ref": "InstanceGroupManagersSuspendInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is updated\neven if the instances in the group have not yet been updated. You must\nseparately verify the status of the individual instances with thelistManagedInstances\nmethod.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "id": "compute.instanceGroupManagers.update", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "description": "Inserts or updates per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the\ninstances in the instance group must be in the same network/subnetwork.\nRead \nAdding instances for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.addInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where you are adding instances.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "request": { - "$ref": "InstanceGroupsAddInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceGroups", - "httpMethod": "GET", - "id": "compute.instanceGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceGroups", - "response": { - "$ref": "InstanceGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified instance group. The instances in the group are not\ndeleted. Note that instance group must not belong to a backend service.\nRead\nDeleting an instance group for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "DELETE", - "id": "compute.instanceGroups.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified zonal instance group. Get a list of available zonal\ninstance groups by making a list() request.\n\nFor managed instance groups, use theinstanceGroupManagers\nor regionInstanceGroupManagers\nmethods instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "id": "compute.instanceGroups.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups", - "httpMethod": "POST", - "id": "compute.instanceGroups.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups", - "request": { - "$ref": "InstanceGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of zonal instance group resources contained within the\nspecified zone.\n\nFor managed instance groups, use theinstanceGroupManagers\nor regionInstanceGroupManagers\nmethods instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups", - "httpMethod": "GET", - "id": "compute.instanceGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups", - "response": { - "$ref": "InstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "description": "Lists the instances in the specified instance group.\nThe orderBy query parameter is not supported.\nThe filter query parameter is supported, but only for\nexpressions that use `eq` (equal) or `ne` (not equal) operators.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.listInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroup": { - "description": "The name of the instance group from which you want to generate a list\nof included instances.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "request": { - "$ref": "InstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "InstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeInstances": { - "description": "Removes one or more instances from the specified instance group, but does\nnot delete those instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.removeInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where the specified instances will be\nremoved.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "request": { - "$ref": "InstanceGroupsRemoveInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNamedPorts": { - "description": "Sets the named ports for the specified instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "id": "compute.instanceGroups.setNamedPorts", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where the named ports are updated.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "request": { - "$ref": "InstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceSettings": { - "methods": { - "get": { - "description": "Get Instance settings.", - "flatPath": "projects/{project}/zones/{zone}/instanceSettings", - "httpMethod": "GET", - "id": "compute.instanceSettings.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceSettings", - "response": { - "$ref": "InstanceSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Instance settings", - "flatPath": "projects/{project}/zones/{zone}/instanceSettings", - "httpMethod": "PATCH", - "id": "compute.instanceSettings.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The zone scoping this request. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceSettings", - "request": { - "$ref": "InstanceSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceTemplates": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all InstanceTemplates resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceTemplates", - "httpMethod": "GET", - "id": "compute.instanceTemplates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceTemplates", - "response": { - "$ref": "InstanceTemplateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is\npermanent and cannot be undone. It is not possible to delete templates\nthat are already in use by a managed instance group.", - "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "id": "compute.instanceTemplates.delete", - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified instance template.", - "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "id": "compute.instanceTemplates.get", - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instanceTemplates.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance template in the specified project using the\ndata that is included in the request. If you are creating a new template to\nupdate an existing instance group, your new instance template must use the\nsame network or, if applicable, the same subnetwork as the original\ntemplate.", - "flatPath": "projects/{project}/global/instanceTemplates", - "httpMethod": "POST", - "id": "compute.instanceTemplates.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates", - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of instance templates that are contained within\nthe specified project.", - "flatPath": "projects/{project}/global/instanceTemplates", - "httpMethod": "GET", - "id": "compute.instanceTemplates.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates", - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instanceTemplates.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceTemplates.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instances": { - "methods": { - "addAccessConfig": { - "description": "Adds an access config to an instance's network interface.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.addAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to add to this instance.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addNetworkInterface": { - "description": "Adds one dynamic network interface to an active instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface", - "httpMethod": "POST", - "id": "compute.instances.addNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request stored as resource_id.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface", - "request": { - "$ref": "NetworkInterface" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addResourcePolicies": { - "description": "Adds existing resource policies to an instance. You can only add one\npolicy right now which will be applied to this instance for scheduling live\nmigrations.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.instances.addResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", - "request": { - "$ref": "InstancesAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the instances in your project\nacross all regions and zones.\n\nThe performance of this method degrades when a filter is specified on a\nproject that has a very large number of instances.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instances", - "httpMethod": "GET", - "id": "compute.instances.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instances", - "response": { - "$ref": "InstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachDisk": { - "description": "Attaches an existing Disk resource to an instance. You must first\ncreate the disk before you can attach it. It is not possible to create\nand attach a disk at the same time. For more information, readAdding a\npersistent disk to your instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - "httpMethod": "POST", - "id": "compute.instances.attachDisk", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "forceAttach": { - "description": "Whether to force attach the regional disk even if it's currently attached\nto another instance. If you try to force attach a zonal disk to an\ninstance, you will receive an error.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - "request": { - "$ref": "AttachedDisk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkInsert": { - "description": "Creates multiple instances. Count specifies the number of instances to\ncreate. For more information, seeAbout bulk\ncreation of VMs.", - "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", - "httpMethod": "POST", - "id": "compute.instances.bulkInsert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/bulkInsert", - "request": { - "$ref": "BulkInsertInstanceResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified Instance resource. For more information, seeDeleting\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "DELETE", - "id": "compute.instances.delete", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "noGracefulShutdown": { - "description": "If set to true, Graceful Shutdown is skipped.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteAccessConfig": { - "description": "Deletes an access config from an instance's network interface.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.deleteAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "accessConfig", - "networkInterface" - ], - "parameters": { - "accessConfig": { - "description": "The name of the access config to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteNetworkInterface": { - "description": "Deletes one dynamic network interface from an active instance.\nInstancesDeleteNetworkInterfaceRequest indicates:\n- instance from which to delete, using project+zone+resource_id fields;\n- dynamic network interface to be deleted, using network_interface_name\nfield;", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface", - "httpMethod": "POST", - "id": "compute.instances.deleteNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterfaceName" - ], - "parameters": { - "instance": { - "description": "The instance name for this request stored as resource_id.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "networkInterfaceName": { - "description": "The name of the dynamic network interface to be deleted from the instance.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachDisk": { - "description": "Detaches a disk from an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", - "httpMethod": "POST", - "id": "compute.instances.detachDisk", - "parameterOrder": [ - "project", - "zone", - "instance", - "deviceName" - ], - "parameters": { - "deviceName": { - "description": "The device name of the disk to detach. Make a get() request on\nthe instance to view currently attached disks and device names.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "Instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Instance resource.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "GET", - "id": "compute.instances.get", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns effective firewalls applied to an interface of the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.instances.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to get the effective firewalls.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", - "response": { - "$ref": "InstancesGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getGuestAttributes": { - "description": "Returns the specified guest attributes entry.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "httpMethod": "GET", - "id": "compute.instances.getGuestAttributes", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "queryPath": { - "description": "Specifies the guest attributes path to be queried.", - "location": "query", - "type": "string" - }, - "variableKey": { - "description": "Specifies the key for the guest attributes entry.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "response": { - "$ref": "GuestAttributes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instances.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPartnerMetadata": { - "description": "Gets partner metadata of the specified instance and namespaces.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata", - "httpMethod": "GET", - "id": "compute.instances.getPartnerMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "namespaces": { - "description": "Comma separated partner metadata namespaces.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata", - "response": { - "$ref": "PartnerMetadata" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getScreenshot": { - "description": "Returns the screenshot from the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", - "httpMethod": "GET", - "id": "compute.instances.getScreenshot", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", - "response": { - "$ref": "Screenshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getSerialPortOutput": { - "description": "Returns the last 1 MB of serial port output from the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", - "httpMethod": "GET", - "id": "compute.instances.getSerialPortOutput", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "port": { - "default": "1", - "description": "Specifies which COM or serial port to retrieve data from.", - "format": "int32", - "location": "query", - "maximum": "4", - "minimum": "1", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "start": { - "description": "Specifies the starting byte position of the output to return. To start with\nthe first byte of output to the specified port, omit this field or set it\nto `0`.\n\nIf the output for that byte position is available, this field matches the\n`start` parameter sent with the request. If the amount of serial console\noutput exceeds the size of the buffer (1 MB), the oldest output is\ndiscarded and is no longer available. If the requested start position\nrefers to discarded output, the start position is adjusted to the oldest\noutput still available, and the adjusted start position is returned as the\n`start` property value.\n\nYou can also provide a negative start position, which translates to the\nmost recent number of bytes written to the serial port. For example, -3 is\ninterpreted as the most recent 3 bytes written to the serial console. Note\nthat the negative start is bounded by the retained buffer size, and the\nreturned serial console output will not exceed the max buffer size.", - "format": "int64", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", - "response": { - "$ref": "SerialPortOutput" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getShieldedInstanceIdentity": { - "description": "Returns the Shielded Instance Identity of an instance", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", - "httpMethod": "GET", - "id": "compute.instances.getShieldedInstanceIdentity", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", - "response": { - "$ref": "ShieldedInstanceIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getShieldedVmIdentity": { - "description": "Returns the Shielded VM Identity of an instance", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - "httpMethod": "GET", - "id": "compute.instances.getShieldedVmIdentity", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - "response": { - "$ref": "ShieldedVmIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances", - "httpMethod": "POST", - "id": "compute.instances.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceInstanceTemplate": { - "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the\nfollowing are all valid URLs to an instance template:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate", - "location": "query", - "type": "string" - }, - "sourceMachineImage": { - "description": "Specifies the machine image to use to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the\nfollowing are all valid URLs to a machine image:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage\n - projects/project/global/global/machineImages/machineImage\n - global/machineImages/machineImage", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances", - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of instances contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instances", - "httpMethod": "GET", - "id": "compute.instances.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances", - "response": { - "$ref": "InstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listReferrers": { - "description": "Retrieves a list of resources that refer to the VM instance specified in\nthe request. For example, if the VM instance is part of a managed or\nunmanaged instance group, the referrers list includes the instance group.\nFor more information, readViewing\nreferrers to VM instances.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/referrers", - "httpMethod": "GET", - "id": "compute.instances.listReferrers", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Name of the target instance scoping this request, or '-' if the\nrequest should span over all instances in the container.", - "location": "path", - "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/referrers", - "response": { - "$ref": "InstanceListReferrers" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patchPartnerMetadata": { - "description": "Patches partner metadata of the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata", - "httpMethod": "POST", - "id": "compute.instances.patchPartnerMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata", - "request": { - "$ref": "PartnerMetadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "performMaintenance": { - "description": "Perform a manual maintenance on the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance", - "httpMethod": "POST", - "id": "compute.instances.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.instances.removeResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", - "request": { - "$ref": "InstancesRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reportHostAsFaulty": { - "description": "Mark the host as faulty and try to restart the instance on a new host.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty", - "httpMethod": "POST", - "id": "compute.instances.reportHostAsFaulty", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty", - "request": { - "$ref": "InstancesReportHostAsFaultyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reset": { - "description": "Performs a reset on the instance. This is a hard reset. The VM\ndoes not do a graceful shutdown. For more information, seeResetting\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", - "httpMethod": "POST", - "id": "compute.instances.reset", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/reset", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resume": { - "description": "Resumes an instance that was suspended using theinstances().suspend\nmethod.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/resume", - "httpMethod": "POST", - "id": "compute.instances.resume", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to resume.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/resume", - "request": { - "$ref": "InstancesResumeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "sendDiagnosticInterrupt": { - "description": "Sends diagnostic interrupt to the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", - "httpMethod": "POST", - "id": "compute.instances.sendDiagnosticInterrupt", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDeletionProtection": { - "description": "Sets deletion protection on the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", - "httpMethod": "POST", - "id": "compute.instances.setDeletionProtection", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "deletionProtection": { - "default": "true", - "description": "Whether the resource should be protected against deletion.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDiskAutoDelete": { - "description": "Sets the auto-delete flag for a disk attached to an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "httpMethod": "POST", - "id": "compute.instances.setDiskAutoDelete", - "parameterOrder": [ - "project", - "zone", - "instance", - "autoDelete", - "deviceName" - ], - "parameters": { - "autoDelete": { - "description": "Whether to auto-delete the disk when the instance is deleted.", - "location": "query", - "required": true, - "type": "boolean" - }, - "deviceName": { - "description": "The device name of the disk to modify. Make a get() request\non the instance to view currently attached disks and device names.", - "location": "query", - "pattern": "\\w[\\w.-]{0,254}", - "required": true, - "type": "string" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instances.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets labels on an instance. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", - "httpMethod": "POST", - "id": "compute.instances.setLabels", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", - "request": { - "$ref": "InstancesSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineResources": { - "description": "Changes the number and/or type of accelerator for a stopped instance to the\nvalues specified in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", - "httpMethod": "POST", - "id": "compute.instances.setMachineResources", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", - "request": { - "$ref": "InstancesSetMachineResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineType": { - "description": "Changes the machine type for a stopped instance to the machine\ntype specified in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", - "httpMethod": "POST", - "id": "compute.instances.setMachineType", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", - "request": { - "$ref": "InstancesSetMachineTypeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMetadata": { - "description": "Sets metadata for the specified instance to the data included\nin the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", - "httpMethod": "POST", - "id": "compute.instances.setMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMinCpuPlatform": { - "description": "Changes the minimum CPU platform that this instance should use.\nThis method can only\nbe called on a stopped instance. For more information, readSpecifying a\nMinimum CPU Platform.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "httpMethod": "POST", - "id": "compute.instances.setMinCpuPlatform", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "request": { - "$ref": "InstancesSetMinCpuPlatformRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setName": { - "description": "Sets name of an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setName", - "httpMethod": "POST", - "id": "compute.instances.setName", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setName", - "request": { - "$ref": "InstancesSetNameRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setScheduling": { - "description": "Sets an instance's scheduling options. You can only call this method on astopped instance,\nthat is, a VM instance that is in a `TERMINATED` state. SeeInstance Life\nCycle for more information on the possible instance states.\nFor more information about setting scheduling options for a VM, seeSet\nVM host maintenance policy.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", - "httpMethod": "POST", - "id": "compute.instances.setScheduling", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", - "request": { - "$ref": "Scheduling" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified instance.\nFor more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.instances.setSecurityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the Instance resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", - "request": { - "$ref": "InstancesSetSecurityPolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setServiceAccount": { - "description": "Sets the service account on the instance. For more information,\nreadChanging\nthe service account and access scopes for an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "httpMethod": "POST", - "id": "compute.instances.setServiceAccount", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "request": { - "$ref": "InstancesSetServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setShieldedInstanceIntegrityPolicy": { - "description": "Sets the Shielded Instance integrity policy for an instance. You can\nonly use this method on a running instance. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - "httpMethod": "PATCH", - "id": "compute.instances.setShieldedInstanceIntegrityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - "request": { - "$ref": "ShieldedInstanceIntegrityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setShieldedVmIntegrityPolicy": { - "description": "Sets the Shielded VM integrity policy for a VM instance. You can\nonly use this method on a running VM instance. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", - "httpMethod": "PATCH", - "id": "compute.instances.setShieldedVmIntegrityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", - "request": { - "$ref": "ShieldedVmIntegrityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTags": { - "description": "Sets network tags\nfor the specified instance to the data included in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - "httpMethod": "POST", - "id": "compute.instances.setTags", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - "request": { - "$ref": "Tags" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "simulateMaintenanceEvent": { - "description": "Simulates a host maintenance event on a VM. For more information, see\nSimulate a host maintenance event.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - "httpMethod": "POST", - "id": "compute.instances.simulateMaintenanceEvent", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "withExtendedNotifications": { - "description": "Determines whether the customers receive notifications before migration.\nOnly applicable to SF vms.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "start": { - "description": "Starts an instance that was stopped using theinstances().stop\nmethod. For more information, seeRestart an\ninstance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", - "httpMethod": "POST", - "id": "compute.instances.start", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/start", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startWithEncryptionKey": { - "description": "Starts an instance that was stopped using theinstances().stop\nmethod. For more information, seeRestart an\ninstance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "httpMethod": "POST", - "id": "compute.instances.startWithEncryptionKey", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "request": { - "$ref": "InstancesStartWithEncryptionKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stop": { - "description": "Stops a running instance, shutting it down cleanly, and allows\nyou to restart the instance at a later time. Stopped instances do not incur\nVM usage charges while they are stopped. However, resources that the VM is\nusing, such as persistent disks and static IP addresses, will continue to\nbe charged until they are deleted. For more information, seeStopping\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/stop", - "httpMethod": "POST", - "id": "compute.instances.stop", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "discardLocalSsd": { - "description": "This property is required if the instance has any attached Local SSD disks.\nIf false, Local SSD data will be preserved when the instance is suspended.\nIf true, the contents of any attached Local SSD disks will be discarded.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Name of the instance resource to stop.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "noGracefulShutdown": { - "description": "If set to true, Graceful Shutdown is skipped.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/stop", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspend": { - "description": "This method suspends a running instance, saving its state to persistent\nstorage, and allows you to resume the instance at a later time. Suspended\ninstances have no compute costs (cores or RAM), and incur only storage\ncharges for the saved VM memory and localSSD data. Any charged resources\nthe virtual machine was using, such as persistent disks and static IP\naddresses, will continue to be charged while the instance is suspended.\nFor more information, see\nSuspending and resuming an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/suspend", - "httpMethod": "POST", - "id": "compute.instances.suspend", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "discardLocalSsd": { - "description": "This property is required if the instance has any attached Local SSD disks.\nIf false, Local SSD data will be preserved when the instance is suspended.\nIf true, the contents of any attached Local SSD disks will be discarded.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Name of the instance resource to suspend.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/suspend", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instances.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an instance only if the necessary resources are available. This\nmethod can update only a specific set of instance properties. See\nUpdating a running instance for a list of updatable instance\nproperties.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "PUT", - "id": "compute.instances.update", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "clearSecureTag": { - "description": "Whether to clear secure tags from the instance.\n\nThis property if set to true will clear secure tags regardless of theresource.secure_tags.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Name of the instance resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "minimalAction": { - "description": "Specifies the action to take when updating an instance even if the\nupdated properties do not require it. If not specified, then\nCompute Engine acts based on the minimum action that the updated\nproperties require.", - "enum": [ - "INVALID", - "NO_EFFECT", - "REFRESH", - "RESTART" - ], - "enumDescriptions": [ - "", - "No changes can be made to the instance.", - "The instance will not restart.", - "The instance will restart." - ], - "location": "query", - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "Specifies the most disruptive action that can be taken on the instance\nas part of the update. Compute Engine returns an error if the\ninstance properties require a more disruptive action as part of the\ninstance update. Valid options from lowest to highest are\nNO_EFFECT, REFRESH, and RESTART.", - "enum": [ - "INVALID", - "NO_EFFECT", - "REFRESH", - "RESTART" - ], - "enumDescriptions": [ - "", - "No changes can be made to the instance.", - "The instance will not restart.", - "The instance will restart." - ], - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateAccessConfig": { - "description": "Updates the specified access config from an instance's network interface\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.updateAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface where the access config is attached.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateDisplayDevice": { - "description": "Updates the Display config for a VM instance. You can\nonly use this method on a stopped VM instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - "httpMethod": "PATCH", - "id": "compute.instances.updateDisplayDevice", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - "request": { - "$ref": "DisplayDevice" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateNetworkInterface": { - "description": "Updates an instance's network interface. This method can only update an\ninterface's alias IP range and attached network. See Modifying\nalias IP ranges for an existing instance for instructions on\nchanging alias IP ranges. See Migrating\na VM between networks for instructions on migrating an interface.\nThis method follows PATCH semantics.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - "httpMethod": "PATCH", - "id": "compute.instances.updateNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to update.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - "request": { - "$ref": "NetworkInterface" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateShieldedInstanceConfig": { - "description": "Updates the Shielded Instance config for an instance. You can\nonly use this method on a stopped instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", - "httpMethod": "PATCH", - "id": "compute.instances.updateShieldedInstanceConfig", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", - "request": { - "$ref": "ShieldedInstanceConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateShieldedVmConfig": { - "description": "Updates the Shielded VM config for a VM instance. You can\nonly use this method on a stopped VM instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", - "httpMethod": "PATCH", - "id": "compute.instances.updateShieldedVmConfig", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", - "request": { - "$ref": "ShieldedVmConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instantSnapshotGroups": { - "methods": { - "delete": { - "description": "deletes a Zonal InstantSnapshotGroup resource", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", - "httpMethod": "DELETE", - "id": "compute.instantSnapshotGroups.delete", - "parameterOrder": [ - "project", - "zone", - "instantSnapshotGroup" - ], - "parameters": { - "instantSnapshotGroup": { - "description": "Name of the InstantSnapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "returns the specified InstantSnapshotGroup resource in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", - "httpMethod": "GET", - "id": "compute.instantSnapshotGroups.get", - "parameterOrder": [ - "project", - "zone", - "instantSnapshotGroup" - ], - "parameters": { - "instantSnapshotGroup": { - "description": "Name of the InstantSnapshotGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", - "response": { - "$ref": "InstantSnapshotGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instantSnapshotGroups.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "inserts a Zonal InstantSnapshotGroup resource", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups", - "httpMethod": "POST", - "id": "compute.instantSnapshotGroups.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceConsistencyGroup": { - "description": "begin_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups", - "request": { - "$ref": "InstantSnapshotGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "retrieves the list of InstantSnapshotGroup resources contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups", - "httpMethod": "GET", - "id": "compute.instantSnapshotGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups", - "response": { - "$ref": "ListInstantSnapshotGroups" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instantSnapshotGroups.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instantSnapshotGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instantSnapshots": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of instantSnapshots.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instantSnapshots", - "httpMethod": "GET", - "id": "compute.instantSnapshots.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instantSnapshots", - "response": { - "$ref": "InstantSnapshotAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting\na single instantSnapshot might not necessarily delete all the data on that\ninstantSnapshot. If any data on the instantSnapshot that is marked for\ndeletion is needed for subsequent instantSnapshots, the data will be moved\nto the next corresponding instantSnapshot.\n\nFor more information, seeDeleting\ninstantSnapshots.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "httpMethod": "DELETE", - "id": "compute.instantSnapshots.delete", - "parameterOrder": [ - "project", - "zone", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InstantSnapshot resource in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "httpMethod": "GET", - "id": "compute.instantSnapshots.get", - "parameterOrder": [ - "project", - "zone", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "InstantSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instantSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instant snapshot in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", - "httpMethod": "POST", - "id": "compute.instantSnapshots.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots", - "request": { - "$ref": "InstantSnapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of InstantSnapshot resources contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", - "httpMethod": "GET", - "id": "compute.instantSnapshots.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots", - "response": { - "$ref": "InstantSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instantSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a instantSnapshot in the given zone. To learn more about\nlabels, read the Labeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.instantSnapshots.setLabels", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instantSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectAttachmentGroups": { - "methods": { - "createMembers": { - "description": "Create Interconnect Attachments with redundancy by creating them in a\nspecified interconnect attachment group.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.createMembers", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the group resource to create members for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers", - "request": { - "$ref": "InterconnectAttachmentGroupsCreateMembersRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified InterconnectAttachmentGroup in the given scope", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "DELETE", - "id": "compute.interconnectAttachmentGroups.delete", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InterconnectAttachmentGroup resource in the given\nscope.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.get", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "response": { - "$ref": "InterconnectAttachmentGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getOperationalStatus": { - "description": "Returns the InterconnectAttachmentStatuses for the specified\nInterconnectAttachmentGroup resource.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.getOperationalStatus", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the interconnectAttachmentGroup resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus", - "response": { - "$ref": "InterconnectAttachmentGroupsGetOperationalStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a InterconnectAttachmentGroup in the specified project in the given\nscope using the parameters that are included in the request.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups", - "request": { - "$ref": "InterconnectAttachmentGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the InterconnectAttachmentGroups for a project in the given scope.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups", - "response": { - "$ref": "InterconnectAttachmentGroupsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified InterconnectAttachmentGroup resource with the data\nincluded in the request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "PATCH", - "id": "compute.interconnectAttachmentGroups.patch", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "request": { - "$ref": "InterconnectAttachmentGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/interconnectAttachments", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/interconnectAttachments", - "response": { - "$ref": "InterconnectAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "DELETE", - "id": "compute.interconnectAttachments.delete", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.get", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "response": { - "$ref": "InterconnectAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", - "request": { - "$ref": "InterconnectAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of interconnect attachments contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", - "response": { - "$ref": "InterconnectAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified interconnect attachment with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "PATCH", - "id": "compute.interconnectAttachments.patch", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "request": { - "$ref": "InterconnectAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an InterconnectAttachment. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectGroups": { - "methods": { - "createMembers": { - "description": "Create Interconnects with redundancy by creating them in a specified\ninterconnect group.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers", - "httpMethod": "POST", - "id": "compute.interconnectGroups.createMembers", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the group resource to create members for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers", - "request": { - "$ref": "InterconnectGroupsCreateMembersRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified InterconnectGroup in the given scope", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "DELETE", - "id": "compute.interconnectGroups.delete", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InterconnectGroup resource in the given scope.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "GET", - "id": "compute.interconnectGroups.get", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "response": { - "$ref": "InterconnectGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnectGroups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getOperationalStatus": { - "description": "Returns the interconnectStatuses for the specified\nInterconnectGroup.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus", - "httpMethod": "GET", - "id": "compute.interconnectGroups.getOperationalStatus", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the interconnectGroup resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus", - "response": { - "$ref": "InterconnectGroupsGetOperationalStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a InterconnectGroup in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/interconnectGroups", - "httpMethod": "POST", - "id": "compute.interconnectGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups", - "request": { - "$ref": "InterconnectGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the InterconnectGroups for a project in the given scope.", - "flatPath": "projects/{project}/global/interconnectGroups", - "httpMethod": "GET", - "id": "compute.interconnectGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectGroups", - "response": { - "$ref": "InterconnectGroupsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified InterconnectGroup resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "PATCH", - "id": "compute.interconnectGroups.patch", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "request": { - "$ref": "InterconnectGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnectGroups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectGroups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectLocations": { - "methods": { - "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of\navailable interconnect locations by making a list() request.", - "flatPath": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "httpMethod": "GET", - "id": "compute.interconnectLocations.get", - "parameterOrder": [ - "project", - "interconnectLocation" - ], - "parameters": { - "interconnectLocation": { - "description": "Name of the interconnect location to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "response": { - "$ref": "InterconnectLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of interconnect locations available to the specified\nproject.", - "flatPath": "projects/{project}/global/interconnectLocations", - "httpMethod": "GET", - "id": "compute.interconnectLocations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectLocations", - "response": { - "$ref": "InterconnectLocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectRemoteLocations": { - "methods": { - "get": { - "description": "Returns the details for the specified interconnect remote location. Gets a\nlist of available interconnect remote locations by making alist() request.", - "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", - "httpMethod": "GET", - "id": "compute.interconnectRemoteLocations.get", - "parameterOrder": [ - "project", - "interconnectRemoteLocation" - ], - "parameters": { - "interconnectRemoteLocation": { - "description": "Name of the interconnect remote location to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", - "response": { - "$ref": "InterconnectRemoteLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of interconnect remote locations available to the\nspecified project.", - "flatPath": "projects/{project}/global/interconnectRemoteLocations", - "httpMethod": "GET", - "id": "compute.interconnectRemoteLocations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectRemoteLocations", - "response": { - "$ref": "InterconnectRemoteLocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnects": { - "methods": { - "delete": { - "description": "Deletes the specified Interconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "DELETE", - "id": "compute.interconnects.delete", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Interconnect. Get a list of available Interconnects\nby making a list() request.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "GET", - "id": "compute.interconnects.get", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "response": { - "$ref": "Interconnect" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified\nInterconnect.\n\nIn the event of a\nglobal outage, do not use this API to make decisions about where to\nredirect your network traffic.\n\nUnlike a VLAN attachment, which is regional, a Cloud Interconnect\nconnection is a global resource. A global outage can prevent this\nAPI from functioning properly.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", - "httpMethod": "GET", - "id": "compute.interconnects.getDiagnostics", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", - "response": { - "$ref": "InterconnectsGetDiagnosticsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/interconnects/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnects.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getMacsecConfig": { - "description": "Returns the interconnectMacsecConfig for the specified\nInterconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig", - "httpMethod": "GET", - "id": "compute.interconnects.getMacsecConfig", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig", - "response": { - "$ref": "InterconnectsGetMacsecConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an Interconnect in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/interconnects", - "httpMethod": "POST", - "id": "compute.interconnects.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects", - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Interconnects available to the specified project.", - "flatPath": "projects/{project}/global/interconnects", - "httpMethod": "GET", - "id": "compute.interconnects.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnects", - "response": { - "$ref": "InterconnectList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified Interconnect with the data included in the request.\nThis method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "PATCH", - "id": "compute.interconnects.patch", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/interconnects/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnects.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an Interconnect. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/global/interconnects/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.interconnects.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnects/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnects.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenseCodes": { - "methods": { - "get": { - "description": "Return a specified license code. License codes are mirrored across\nall projects that have permissions to read the License Code.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{licenseCode}", - "httpMethod": "GET", - "id": "compute.licenseCodes.get", - "parameterOrder": [ - "project", - "licenseCode" - ], - "parameters": { - "licenseCode": { - "description": "Number corresponding to the License code resource to return.", - "location": "path", - "pattern": "[0-9]{0,61}?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{licenseCode}", - "response": { - "$ref": "LicenseCode" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.licenseCodes.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.licenseCodes.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.licenseCodes.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenses": { - "methods": { - "delete": { - "description": "Deletes the specified license.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "DELETE", - "id": "compute.licenses.delete", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "Name of the license resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified License resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "GET", - "id": "compute.licenses.get", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "Name of the License resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "response": { - "$ref": "License" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.licenses.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a License resource in the specified project.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses", - "httpMethod": "POST", - "id": "compute.licenses.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses", - "request": { - "$ref": "License" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "description": "Retrieves the list of licenses\navailable in the specified project. This method does not\nget any licenses that belong to other projects, including licenses attached\nto publicly-available images, like Debian 9. If you want to get a list of\npublicly-available licenses, use this method to make a request to the\nrespective image project, such as debian-cloud orwindows-cloud.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses", - "httpMethod": "GET", - "id": "compute.licenses.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/licenses", - "response": { - "$ref": "LicensesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.licenses.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.licenses.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a License resource in the specified project.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "PATCH", - "id": "compute.licenses.update", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "The license name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "request": { - "$ref": "License" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "machineImages": { - "methods": { - "delete": { - "description": "Deletes the specified machine image. Deleting a machine image is permanent\nand cannot be undone.", - "flatPath": "projects/{project}/global/machineImages/{machineImage}", - "httpMethod": "DELETE", - "id": "compute.machineImages.delete", - "parameterOrder": [ - "project", - "machineImage" - ], - "parameters": { - "machineImage": { - "description": "The name of the machine image to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{machineImage}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified machine image.", - "flatPath": "projects/{project}/global/machineImages/{machineImage}", - "httpMethod": "GET", - "id": "compute.machineImages.get", - "parameterOrder": [ - "project", - "machineImage" - ], - "parameters": { - "machineImage": { - "description": "The name of the machine image.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{machineImage}", - "response": { - "$ref": "MachineImage" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/machineImages/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.machineImages.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a machine image in the specified project using the\ndata that is included in the request. If you are creating a new machine\nimage to update an existing instance, your new machine image should use the\nsame network or, if applicable, the same subnetwork as the original\ninstance.", - "flatPath": "projects/{project}/global/machineImages", - "httpMethod": "POST", - "id": "compute.machineImages.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceInstance": { - "description": "Required. Source instance that is used to create the machine image from.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages", - "request": { - "$ref": "MachineImage" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of machine images that are contained within\nthe specified project.", - "flatPath": "projects/{project}/global/machineImages", - "httpMethod": "GET", - "id": "compute.machineImages.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/machineImages", - "response": { - "$ref": "MachineImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/machineImages/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.machineImages.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a machine image. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/machineImages/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.machineImages.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/machineImages/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.machineImages.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "machineTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of machine types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/machineTypes", - "httpMethod": "GET", - "id": "compute.machineTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/machineTypes", - "response": { - "$ref": "MachineTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified machine type.", - "flatPath": "projects/{project}/zones/{zone}/machineTypes/{machineType}", - "httpMethod": "GET", - "id": "compute.machineTypes.get", - "parameterOrder": [ - "project", - "zone", - "machineType" - ], - "parameters": { - "machineType": { - "description": "Name of the machine type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/machineTypes/{machineType}", - "response": { - "$ref": "MachineType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of machine types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/machineTypes", - "httpMethod": "GET", - "id": "compute.machineTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/machineTypes", - "response": { - "$ref": "MachineTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NetworkAttachment resources,\nregional and global, available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkAttachments", - "httpMethod": "GET", - "id": "compute.networkAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkAttachments", - "response": { - "$ref": "NetworkAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NetworkAttachment in the given scope", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "DELETE", - "id": "compute.networkAttachments.delete", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NetworkAttachment resource in the given scope.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "GET", - "id": "compute.networkAttachments.get", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "response": { - "$ref": "NetworkAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.networkAttachments.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NetworkAttachment in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments", - "httpMethod": "POST", - "id": "compute.networkAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments", - "request": { - "$ref": "NetworkAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the NetworkAttachments for a project in the given scope.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments", - "httpMethod": "GET", - "id": "compute.networkAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments", - "response": { - "$ref": "NetworkAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified NetworkAttachment resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "PATCH", - "id": "compute.networkAttachments.patch", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "request": { - "$ref": "NetworkAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.networkAttachments.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkEdgeSecurityServices": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to\nthe specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", - "httpMethod": "GET", - "id": "compute.networkEdgeSecurityServices.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkEdgeSecurityServices", - "response": { - "$ref": "NetworkEdgeSecurityServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified service.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "DELETE", - "id": "compute.networkEdgeSecurityServices.delete", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets a specified NetworkEdgeSecurityService.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "GET", - "id": "compute.networkEdgeSecurityServices.get", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "response": { - "$ref": "NetworkEdgeSecurityService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new service in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", - "httpMethod": "POST", - "id": "compute.networkEdgeSecurityServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", - "request": { - "$ref": "NetworkEdgeSecurityService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "PATCH", - "id": "compute.networkEdgeSecurityServices.patch", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "request": { - "$ref": "NetworkEdgeSecurityService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "networkEndpointGroups": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of network endpoint groups and sorts them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group. The network endpoints in the\nNEG and the VM instances they belong to are not terminated when the NEG is\ndeleted. Note that the NEG cannot be deleted if there are backend services\nreferencing it.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.networkEndpointGroups.delete", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach a list of network endpoints from the specified network endpoint\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are removing network\nendpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.get", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of network endpoint groups that are located in the\nspecified project and zone.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsListEndpointsRequest" - }, - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkFirewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "associatedPolicyToBeReplaced": { - "description": "Name of the firewall policy associated with the target network to swap\nassociation with. This field is mutually exclusive with\n'replace_existing_association'.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addPacketMirroringRule": { - "description": "Inserts a packet mirroring rule into a firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of network firewall policies, listing network\nfirewall policies from all applicable scopes (global and regional) and\ngrouping the results per scope.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/firewallPolicies", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/firewallPolicies", - "response": { - "$ref": "NetworkFirewallPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.cloneRules", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.networkFirewallPolicies.delete", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.get", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPacketMirroringRule": { - "description": "Gets a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/global/firewallPolicies", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified project.", - "flatPath": "projects/{project}/global/firewallPolicies", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.networkFirewallPolicies.patch", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchAssociation": { - "description": "Updates an association for the specified network firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.patchAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPacketMirroringRule": { - "description": "Patches a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.patchPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.patchRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removeAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePacketMirroringRule": { - "description": "Deletes a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removePacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removeRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkProfiles": { - "methods": { - "get": { - "description": "Returns the specified network profile.", - "flatPath": "projects/{project}/global/networkProfiles/{networkProfile}", - "httpMethod": "GET", - "id": "compute.networkProfiles.get", - "parameterOrder": [ - "project", - "networkProfile" - ], - "parameters": { - "networkProfile": { - "description": "Name of the network profile to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networkProfiles/{networkProfile}", - "response": { - "$ref": "NetworkProfile" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of network profiles available to the specified\nproject.", - "flatPath": "projects/{project}/global/networkProfiles", - "httpMethod": "GET", - "id": "compute.networkProfiles.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkProfiles", - "response": { - "$ref": "NetworkProfilesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networks": { - "methods": { - "addPeering": { - "description": "Adds a peering to the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/addPeering", - "httpMethod": "POST", - "id": "compute.networks.addPeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to add peering to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/addPeering", - "request": { - "$ref": "NetworksAddPeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cancelRequestRemovePeering": { - "description": "Cancel requests to remove a peering from the specified network. Applicable\nonly for PeeringConnection with update_strategy=CONSENSUS. Cancels a\nrequest to remove a peering from the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/cancelRequestRemovePeering", - "httpMethod": "POST", - "id": "compute.networks.cancelRequestRemovePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to remove peering from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/cancelRequestRemovePeering", - "request": { - "$ref": "NetworksCancelRequestRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "DELETE", - "id": "compute.networks.delete", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "GET", - "id": "compute.networks.get", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "response": { - "$ref": "Network" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns the effective firewalls on a given network.", - "flatPath": "projects/{project}/global/networks/{network}/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.networks.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/getEffectiveFirewalls", - "response": { - "$ref": "NetworksGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/networks", - "httpMethod": "POST", - "id": "compute.networks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks", - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of networks available to the specified project.", - "flatPath": "projects/{project}/global/networks", - "httpMethod": "GET", - "id": "compute.networks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networks", - "response": { - "$ref": "NetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listIpAddresses": { - "description": "Lists the internal IP addresses in the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/listIpAddresses", - "httpMethod": "GET", - "id": "compute.networks.listIpAddresses", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "network": { - "description": "Name of the network for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "types": { - "description": "(Optional) types filter separate by comma, valid values are: SUBNETWORK,\nRESERVED, PEER_USED, PEER_RESERVED, REMOTE_USED, REMOTE_RESERVED.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/listIpAddresses", - "response": { - "$ref": "IpAddressesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listIpOwners": { - "description": "Lists the internal IP owners in the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/listIpOwners", - "httpMethod": "GET", - "id": "compute.networks.listIpOwners", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "ipCidrRange": { - "description": "(Optional) IP CIDR range filter, example: \"10.128.10.0/30\".", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "network": { - "description": "Name of the network to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "ownerProjects": { - "description": "(Optional) Project IDs filter, example: \"project-1,project-2\".", - "location": "query", - "type": "string" - }, - "ownerTypes": { - "description": "(Optional) Owner types filter, example: \"instance,forwardingRule\".", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "subnetName": { - "description": "(Optional) Subnetwork name filter.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "subnetRegion": { - "description": "(Optional) Subnetwork region filter.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/listIpOwners", - "response": { - "$ref": "IpOwnerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPeeringRoutes": { - "description": "Lists the peering routes exchanged over peering connection.", - "flatPath": "projects/{project}/global/networks/{network}/listPeeringRoutes", - "httpMethod": "GET", - "id": "compute.networks.listPeeringRoutes", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "direction": { - "description": "The direction of the exchanged routes.", - "enum": [ - "INCOMING", - "OUTGOING" - ], - "enumDescriptions": [ - "For routes exported from peer network.", - "For routes exported from local network." - ], - "location": "query", - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "network": { - "description": "Name of the network for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "peeringName": { - "description": "The response will show routes exchanged over the given peering connection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region of the request. The response will include all subnet routes,\nstatic routes and dynamic routes in the region.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networks/{network}/listPeeringRoutes", - "response": { - "$ref": "ExchangedPeeringRoutesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified network with the data included in the request.\nOnly routingConfig can be modified.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "PATCH", - "id": "compute.networks.patch", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePeering": { - "description": "Removes a peering from the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/removePeering", - "httpMethod": "POST", - "id": "compute.networks.removePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to remove peering from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/removePeering", - "request": { - "$ref": "NetworksRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "requestRemovePeering": { - "description": "Requests to remove a peering from the specified network. Applicable only\nfor PeeringConnection with update_strategy=CONSENSUS.", - "flatPath": "projects/{project}/global/networks/{network}/requestRemovePeering", - "httpMethod": "POST", - "id": "compute.networks.requestRemovePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to remove peering from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/requestRemovePeering", - "request": { - "$ref": "NetworksRequestRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "switchToCustomMode": { - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - "flatPath": "projects/{project}/global/networks/{network}/switchToCustomMode", - "httpMethod": "POST", - "id": "compute.networks.switchToCustomMode", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to be updated.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/switchToCustomMode", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/networks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "updatePeering": { - "description": "Updates the specified network peering with the data included in the\nrequest. You can only modify the NetworkPeering.export_custom_routes field\nand the NetworkPeering.import_custom_routes field.", - "flatPath": "projects/{project}/global/networks/{network}/updatePeering", - "httpMethod": "PATCH", - "id": "compute.networks.updatePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource which the updated peering is belonging to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/updatePeering", - "request": { - "$ref": "NetworksUpdatePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "nodeGroups": { - "methods": { - "addNodes": { - "description": "Adds specified number of nodes to the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.addNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes", - "request": { - "$ref": "NodeGroupsAddNodesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of node groups.\nNote: use nodeGroups.listNodes for more details about each group.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeGroups", - "httpMethod": "GET", - "id": "compute.nodeGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeGroups", - "response": { - "$ref": "NodeGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NodeGroup resource.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "DELETE", - "id": "compute.nodeGroups.delete", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteNodes": { - "description": "Deletes specified nodes from the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.deleteNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes will be deleted.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes", - "request": { - "$ref": "NodeGroupsDeleteNodesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NodeGroup. Get a list of available NodeGroups\nby making a list() request.\nNote: the \"nodes\" field should not be used. Use nodeGroups.listNodes\ninstead.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "GET", - "id": "compute.nodeGroups.get", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the node group to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "response": { - "$ref": "NodeGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.nodeGroups.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NodeGroup resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups", - "httpMethod": "POST", - "id": "compute.nodeGroups.insert", - "parameterOrder": [ - "project", - "zone", - "initialNodeCount" - ], - "parameters": { - "initialNodeCount": { - "description": "Initial count of nodes in the node group.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups", - "request": { - "$ref": "NodeGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of node groups available to the specified project.\nNote: use nodeGroups.listNodes for more details about each group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups", - "httpMethod": "GET", - "id": "compute.nodeGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups", - "response": { - "$ref": "NodeGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNodes": { - "description": "Lists nodes in the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.listNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes you want to list.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes", - "response": { - "$ref": "NodeGroupsListNodes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "PATCH", - "id": "compute.nodeGroups.patch", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "request": { - "$ref": "NodeGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "performMaintenance": { - "description": "Perform maintenance on a subset of nodes in the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance", - "httpMethod": "POST", - "id": "compute.nodeGroups.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the node group scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance", - "request": { - "$ref": "NodeGroupsPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.nodeGroups.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNodeTemplate": { - "description": "Updates the node template of the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate", - "httpMethod": "POST", - "id": "compute.nodeGroups.setNodeTemplate", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate", - "request": { - "$ref": "NodeGroupsSetNodeTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "simulateMaintenanceEvent": { - "description": "Simulates maintenance event on specified nodes from the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", - "httpMethod": "POST", - "id": "compute.nodeGroups.simulateMaintenanceEvent", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes will go under maintenance\nsimulation.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", - "request": { - "$ref": "NodeGroupsSimulateMaintenanceEventRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.nodeGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "nodeTemplates": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of node templates.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeTemplates", - "httpMethod": "GET", - "id": "compute.nodeTemplates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeTemplates", - "response": { - "$ref": "NodeTemplateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NodeTemplate resource.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "httpMethod": "DELETE", - "id": "compute.nodeTemplates.delete", - "parameterOrder": [ - "project", - "region", - "nodeTemplate" - ], - "parameters": { - "nodeTemplate": { - "description": "Name of the NodeTemplate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified node template.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "httpMethod": "GET", - "id": "compute.nodeTemplates.get", - "parameterOrder": [ - "project", - "region", - "nodeTemplate" - ], - "parameters": { - "nodeTemplate": { - "description": "Name of the node template to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "response": { - "$ref": "NodeTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.nodeTemplates.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NodeTemplate resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates", - "httpMethod": "POST", - "id": "compute.nodeTemplates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates", - "request": { - "$ref": "NodeTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of node templates available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates", - "httpMethod": "GET", - "id": "compute.nodeTemplates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates", - "response": { - "$ref": "NodeTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.nodeTemplates.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.nodeTemplates.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "nodeTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of node types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeTypes", - "httpMethod": "GET", - "id": "compute.nodeTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeTypes", - "response": { - "$ref": "NodeTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified node type.", - "flatPath": "projects/{project}/zones/{zone}/nodeTypes/{nodeType}", - "httpMethod": "GET", - "id": "compute.nodeTypes.get", - "parameterOrder": [ - "project", - "zone", - "nodeType" - ], - "parameters": { - "nodeType": { - "description": "Name of the node type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeTypes/{nodeType}", - "response": { - "$ref": "NodeType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of node types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/nodeTypes", - "httpMethod": "GET", - "id": "compute.nodeTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeTypes", - "response": { - "$ref": "NodeTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "organizationSecurityPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.addAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/addAssociation", - "request": { - "$ref": "SecurityPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addRule instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.addRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "copyRules": { - "description": "Copies rules to the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.cloneRules\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/copyRules", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.copyRules", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "sourceSecurityPolicy": { - "description": "The security policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/copyRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.\n\nUse this API to remove Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to remove firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.delete instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.organizationSecurityPolicies.delete", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.get instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.get", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.getAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.getAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "name": { - "description": "The name of the association to get from the security policy.", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/getAssociation", - "response": { - "$ref": "SecurityPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.getRule instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.getRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse this API to add Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to add firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.insert instead.", - "flatPath": "locations/global/securityPolicies", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.insert", - "parameters": { - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified\norganization.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.list instead.", - "flatPath": "locations/global/securityPolicies", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.listAssociations\ninstead.", - "flatPath": "locations/global/securityPolicies/listAssociations", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.listAssociations", - "parameters": { - "targetResource": { - "description": "The target resource to list associations. It is an organization, or a\nfolder.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/listAssociations", - "response": { - "$ref": "OrganizationSecurityPoliciesListAssociationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF)\nexpressions.", - "flatPath": "locations/global/securityPolicies/listPreconfiguredExpressionSets", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/securityPolicies/listPreconfiguredExpressionSets", - "response": { - "$ref": "SecurityPoliciesListPreconfiguredExpressionSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.move instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/move", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.move", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "parentId": { - "description": "The new parent of the security policy.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/move", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patch instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.organizationSecurityPolicies.patch", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patchRule\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.patchRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.removeAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeRule\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.removeRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "packetMirrorings": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of packetMirrorings.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/packetMirrorings", - "httpMethod": "GET", - "id": "compute.packetMirrorings.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/packetMirrorings", - "response": { - "$ref": "PacketMirroringAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified PacketMirroring resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "DELETE", - "id": "compute.packetMirrorings.delete", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PacketMirroring resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "GET", - "id": "compute.packetMirrorings.get", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "response": { - "$ref": "PacketMirroring" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PacketMirroring resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings", - "httpMethod": "POST", - "id": "compute.packetMirrorings.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings", - "request": { - "$ref": "PacketMirroring" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of PacketMirroring resources available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings", - "httpMethod": "GET", - "id": "compute.packetMirrorings.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings", - "response": { - "$ref": "PacketMirroringList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified PacketMirroring resource with the data included in\nthe request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "PATCH", - "id": "compute.packetMirrorings.patch", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "request": { - "$ref": "PacketMirroring" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.packetMirrorings.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "previewFeatures": { - "methods": { - "get": { - "description": "Returns the details of the given PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures/{previewFeature}", - "httpMethod": "GET", - "id": "compute.previewFeatures.get", - "parameterOrder": [ - "project", - "previewFeature" - ], - "parameters": { - "previewFeature": { - "description": "Name of the PreviewFeature for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/previewFeatures/{previewFeature}", - "response": { - "$ref": "PreviewFeature" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Returns the details of the given PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures", - "httpMethod": "GET", - "id": "compute.previewFeatures.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/previewFeatures", - "response": { - "$ref": "PreviewFeatureList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Patches the given PreviewFeature. This method is used to enable or disable\na PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures/{previewFeature}", - "httpMethod": "PATCH", - "id": "compute.previewFeatures.update", - "parameterOrder": [ - "project", - "previewFeature" - ], - "parameters": { - "previewFeature": { - "description": "Name of the PreviewFeature for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/previewFeatures/{previewFeature}", - "request": { - "$ref": "PreviewFeature" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "projects": { - "methods": { - "disableXpnHost": { - "description": "Disable this project as a shared VPC host project.", - "flatPath": "projects/{project}/disableXpnHost", - "httpMethod": "POST", - "id": "compute.projects.disableXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/disableXpnHost", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "disableXpnResource": { - "description": "Disable a service resource (also known as service project) associated with\nthis host project.", - "flatPath": "projects/{project}/disableXpnResource", - "httpMethod": "POST", - "id": "compute.projects.disableXpnResource", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/disableXpnResource", - "request": { - "$ref": "ProjectsDisableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnHost": { - "description": "Enable this project as a shared VPC host project.", - "flatPath": "projects/{project}/enableXpnHost", - "httpMethod": "POST", - "id": "compute.projects.enableXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/enableXpnHost", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnResource": { - "description": "Enable service resource (a.k.a service project) for a host project, so that\nsubnets in the host project can be used by instances in the service\nproject.", - "flatPath": "projects/{project}/enableXpnResource", - "httpMethod": "POST", - "id": "compute.projects.enableXpnResource", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/enableXpnResource", - "request": { - "$ref": "ProjectsEnableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Project resource.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information (the `quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.", - "flatPath": "projects/{project}", - "httpMethod": "GET", - "id": "compute.projects.get", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}", - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getXpnHost": { - "description": "Gets the shared VPC host project that this project links to. May be empty\nif no link exists.", - "flatPath": "projects/{project}/getXpnHost", - "httpMethod": "GET", - "id": "compute.projects.getXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/getXpnHost", - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "getXpnResources": { - "description": "Gets service resources (a.k.a service project) associated with this host\nproject.", - "flatPath": "projects/{project}/getXpnResources", - "httpMethod": "GET", - "id": "compute.projects.getXpnResources", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/getXpnResources", - "response": { - "$ref": "ProjectsGetXpnResources" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "listXpnHosts": { - "description": "Lists all shared VPC host projects visible to the user in an organization.", - "flatPath": "projects/{project}/listXpnHosts", - "httpMethod": "POST", - "id": "compute.projects.listXpnHosts", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/listXpnHosts", - "request": { - "$ref": "ProjectsListXpnHostsRequest" - }, - "response": { - "$ref": "XpnHostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveDisk": { - "deprecated": true, - "description": "Moves a persistent disk from one zone to another.\n*Note*: The moveDisk API will be deprecated on September 29, 2026.\n\nStarting September 29, 2025, you can't use the moveDisk API on new\nprojects. To move a disk to a different region or zone, follow the steps in\n[Change the location of a\ndisk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).\n\nProjects that already use the moveDisk API can continue usage until\nSeptember 29, 2026.\n\nStarting November 1, 2025, API responses will include a warning message in\nthe response body about the upcoming deprecation. You can skip the message\nto continue using the service without interruption.", - "flatPath": "projects/{project}/moveDisk", - "httpMethod": "POST", - "id": "compute.projects.moveDisk", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/moveDisk", - "request": { - "$ref": "DiskMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveInstance": { - "deprecated": true, - "description": "Moves an instance and its attached persistent disks from one zone to\nanother.\n*Note*: Moving VMs or disks by using this method might\n cause unexpected behavior. For more information, see the [known\n issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).\n[Deprecated] This method is deprecated. See [moving instance across\nzones](/compute/docs/instances/moving-instance-across-zones) instead.", - "flatPath": "projects/{project}/moveInstance", - "httpMethod": "POST", - "id": "compute.projects.moveInstance", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/moveInstance", - "request": { - "$ref": "InstanceMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCloudArmorTier": { - "description": "Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the\nbilling account of the project must be subscribed to Cloud Armor\nEnterprise. See Subscribing\nto Cloud Armor Enterprise for more information.", - "flatPath": "projects/{project}/setCloudArmorTier", - "httpMethod": "POST", - "id": "compute.projects.setCloudArmorTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setCloudArmorTier", - "request": { - "$ref": "ProjectsSetCloudArmorTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCommonInstanceMetadata": { - "description": "Sets metadata common to all instances within the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/setCommonInstanceMetadata", - "httpMethod": "POST", - "id": "compute.projects.setCommonInstanceMetadata", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setCommonInstanceMetadata", - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDefaultNetworkTier": { - "description": "Sets the default network tier of the project. The default network tier is\nused when an address/forwardingRule/instance is created without specifying\nthe network tier field.", - "flatPath": "projects/{project}/setDefaultNetworkTier", - "httpMethod": "POST", - "id": "compute.projects.setDefaultNetworkTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setDefaultNetworkTier", - "request": { - "$ref": "ProjectsSetDefaultNetworkTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDefaultServiceAccount": { - "description": "Sets the default service account of the project. The default service\naccount is used when a VM instance is created with the service account\nemail address set to \"default\".", - "flatPath": "projects/{project}/setDefaultServiceAccount", - "httpMethod": "POST", - "id": "compute.projects.setDefaultServiceAccount", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setDefaultServiceAccount", - "request": { - "$ref": "ProjectsSetDefaultServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setManagedProtectionTier": { - "description": "Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set\nPLUS or above the billing account of the project must be subscribed to\nManaged Protection Plus. See Subscribing\nto Managed Protection Plus for more information.", - "flatPath": "projects/{project}/setManagedProtectionTier", - "httpMethod": "POST", - "id": "compute.projects.setManagedProtectionTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setManagedProtectionTier", - "request": { - "$ref": "ProjectsSetManagedProtectionTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUsageExportBucket": { - "description": "Enables the usage export feature and sets theusage export bucket\nwhere reports are stored. If you provide an empty request body using this\nmethod, the usage export feature will be disabled.", - "flatPath": "projects/{project}/setUsageExportBucket", - "httpMethod": "POST", - "id": "compute.projects.setUsageExportBucket", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setUsageExportBucket", - "request": { - "$ref": "UsageExportLocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "publicAdvertisedPrefixes": { - "methods": { - "announce": { - "description": "Announces the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.announce", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "The name of the public advertised prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "DELETE", - "id": "compute.publicAdvertisedPrefixes.delete", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PublicAdvertisedPrefix resource.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "GET", - "id": "compute.publicAdvertisedPrefixes.get", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "response": { - "$ref": "PublicAdvertisedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PublicAdvertisedPrefix in the specified project\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes", - "request": { - "$ref": "PublicAdvertisedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the PublicAdvertisedPrefixes for a project.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes", - "httpMethod": "GET", - "id": "compute.publicAdvertisedPrefixes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes", - "response": { - "$ref": "PublicAdvertisedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified Router resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "PATCH", - "id": "compute.publicAdvertisedPrefixes.patch", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "request": { - "$ref": "PublicAdvertisedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "withdraw": { - "description": "Withdraws the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.withdraw", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "The name of the public advertised prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "publicDelegatedPrefixes": { - "methods": { - "aggregatedList": { - "description": "Lists all PublicDelegatedPrefix resources owned by the specific project\nacross all scopes.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "announce": { - "description": "Announces the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.announce", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "The name of the public delegated prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion where\nthe public delegated prefix is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "DELETE", - "id": "compute.publicDelegatedPrefixes.delete", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PublicDelegatedPrefix resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.get", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "PublicDelegatedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PublicDelegatedPrefix in the specified project in the given\nregion using the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the PublicDelegatedPrefixes for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified PublicDelegatedPrefix resource with the data included\nin the request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "PATCH", - "id": "compute.publicDelegatedPrefixes.patch", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "withdraw": { - "description": "Withdraws the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.withdraw", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "The name of the public delegated prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion where\nthe public delegated prefix is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "recoverableSnapshots": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the RecoverableSnapshots in your\nproject across all regions and global scope.", - "flatPath": "projects/{project}/aggregated/recoverableSnapshots", - "httpMethod": "GET", - "id": "compute.recoverableSnapshots.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/recoverableSnapshots", - "response": { - "$ref": "RecoverableSnapshotAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified RecoverableSnapshot. Deleting a recoverable snapshot\nwill delete the underlying PD snapshot and is irreversible.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}", - "httpMethod": "DELETE", - "id": "compute.recoverableSnapshots.delete", - "parameterOrder": [ - "project", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the recoverable Snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified RecoverableSnapshot resource.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}", - "httpMethod": "GET", - "id": "compute.recoverableSnapshots.get", - "parameterOrder": [ - "project", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}", - "response": { - "$ref": "RecoverableSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.recoverableSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of all of the RecoverableSnapshots in your project.", - "flatPath": "projects/{project}/global/recoverableSnapshots", - "httpMethod": "GET", - "id": "compute.recoverableSnapshots.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/recoverableSnapshots", - "response": { - "$ref": "RecoverableSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recover": { - "description": "Recovers the specified RecoverableSnapshot.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}/recover", - "httpMethod": "POST", - "id": "compute.recoverableSnapshots.recover", - "parameterOrder": [ - "project", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project Id of the request", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the recoverable resource to recover", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshotName": { - "description": "Optional. Name of the snapshot after the recovery\nThe name will be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name will be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter will be a lowercase letter, and all following characters can be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}/recover", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.recoverableSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/recoverableSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.recoverableSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/recoverableSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionAutoscalers": { - "methods": { - "delete": { - "description": "Deletes the specified autoscaler.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "id": "compute.regionAutoscalers.delete", - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified autoscaler.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "id": "compute.regionAutoscalers.get", - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an autoscaler in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "POST", - "id": "compute.regionAutoscalers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of autoscalers contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "GET", - "id": "compute.regionAutoscalers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "response": { - "$ref": "RegionAutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates an autoscaler in the specified project using\nthe data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "PATCH", - "id": "compute.regionAutoscalers.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to patch.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionAutoscalers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an autoscaler in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "PUT", - "id": "compute.regionAutoscalers.update", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to update.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionBackendBuckets": { - "methods": { - "delete": { - "description": "Deletes the specified regional BackendBucket resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "id": "compute.regionBackendBuckets.delete", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "forceDelete": { - "description": "Force delete the backend bucket even if it is still in use by other\nresources. It's intended to be used internally only for requests from\nwipeout.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional BackendBucket resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.get", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a RegionBackendBucket in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified\nproject in the given region.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets", - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend buckets in the specified project in\nthe given region.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/listUsable", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.listUsable", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/listUsable", - "response": { - "$ref": "BackendBucketListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "id": "compute.regionBackendBuckets.patch", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionBackendServices": { - "methods": { - "delete": { - "description": "Deletes the specified regional BackendService resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "DELETE", - "id": "compute.regionBackendServices.delete", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional BackendService resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "GET", - "id": "compute.regionBackendServices.get", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for this\nregional BackendService.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "id": "compute.regionBackendServices.getHealth", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource for which to get health.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth", - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionBackendServices.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a regional BackendService resource in the specified project using\nthe data included in the request. For more information, see\nBackend services overview.", - "flatPath": "projects/{project}/regions/{region}/backendServices", - "httpMethod": "POST", - "id": "compute.regionBackendServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of regional BackendService resources available to the\nspecified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/backendServices", - "httpMethod": "GET", - "id": "compute.regionBackendServices.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendServices", - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend services in the specified project in\nthe given region.", - "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", - "httpMethod": "GET", - "id": "compute.regionBackendServices.listUsable", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/listUsable", - "response": { - "$ref": "BackendServiceListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional BackendService resource with the data\nincluded in the request. For more information, see \nUnderstanding backend services This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PATCH", - "id": "compute.regionBackendServices.patch", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendServices.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified backend\nservice. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendServices.setSecurityPolicy", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionBackendServices.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified regional BackendService resource with the data\nincluded in the request. For more information,\nsee \nBackend services overview.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PUT", - "id": "compute.regionBackendServices.update", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCommitments": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of commitments by region.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/commitments", - "httpMethod": "GET", - "id": "compute.regionCommitments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/commitments", - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "calculateCancellationFee": { - "description": "Calculate cancellation fee for the specified commitment.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}/calculateCancellationFee", - "httpMethod": "POST", - "id": "compute.regionCommitments.calculateCancellationFee", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}/calculateCancellationFee", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cancel": { - "description": "Cancel the specified commitment.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}/cancel", - "httpMethod": "POST", - "id": "compute.regionCommitments.cancel", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified commitment resource.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "GET", - "id": "compute.regionCommitments.get", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}", - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a commitment in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/commitments", - "httpMethod": "POST", - "id": "compute.regionCommitments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments", - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of commitments contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/commitments", - "httpMethod": "GET", - "id": "compute.regionCommitments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/commitments", - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionCommitments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified commitment with the data included in the request.\nUpdate is performed only on selected fields included as part of\nupdate-mask. Only the following fields can be updated: auto_renew and plan.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "PATCH", - "id": "compute.regionCommitments.update", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment that you want to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}", - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateReservations": { - "description": "Transfers GPUs or Local SSD disks between reservations that are attached\nto the same commitment.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations", - "httpMethod": "POST", - "id": "compute.regionCommitments.updateReservations", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment for which the reservations are being updated.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations", - "request": { - "$ref": "RegionCommitmentsUpdateReservationsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCompositeHealthChecks": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all CompositeHealthCheck resources (all\nregional) available to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/compositeHealthChecks", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/compositeHealthChecks", - "response": { - "$ref": "CompositeHealthCheckAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified CompositeHealthCheck in the given region", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.regionCompositeHealthChecks.delete", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified CompositeHealthCheck resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.get", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "response": { - "$ref": "CompositeHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a CompositeHealthCheck in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks", - "httpMethod": "POST", - "id": "compute.regionCompositeHealthChecks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks", - "request": { - "$ref": "CompositeHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the CompositeHealthChecks for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks", - "response": { - "$ref": "CompositeHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional CompositeHealthCheck resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.regionCompositeHealthChecks.patch", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "request": { - "$ref": "CompositeHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionCompositeHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDiskSettings": { - "methods": { - "get": { - "description": "Get Regional Disk Settings.", - "flatPath": "projects/{project}/regions/{region}/diskSettings", - "httpMethod": "GET", - "id": "compute.regionDiskSettings.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskSettings", - "response": { - "$ref": "DiskSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Regional Disk Settings", - "flatPath": "projects/{project}/regions/{region}/diskSettings", - "httpMethod": "PATCH", - "id": "compute.regionDiskSettings.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskSettings", - "request": { - "$ref": "DiskSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionDiskTypes": { - "methods": { - "get": { - "description": "Returns the specified regional disk type.", - "flatPath": "projects/{project}/regions/{region}/diskTypes/{diskType}", - "httpMethod": "GET", - "id": "compute.regionDiskTypes.get", - "parameterOrder": [ - "project", - "region", - "diskType" - ], - "parameters": { - "diskType": { - "description": "Name of the disk type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskTypes/{diskType}", - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of regional disk types available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/diskTypes", - "httpMethod": "GET", - "id": "compute.regionDiskTypes.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/diskTypes", - "response": { - "$ref": "RegionDiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDisks": { - "methods": { - "addResourcePolicies": { - "description": "Adds existing resource policies to a regional disk. You can only add one\npolicy which will be applied to this disk for scheduling snapshot\ncreation.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.regionDisks.addResourcePolicies", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies", - "request": { - "$ref": "RegionDisksAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkInsert": { - "description": "Bulk create a set of disks.", - "flatPath": "projects/{project}/regions/{region}/disks/bulkInsert", - "httpMethod": "POST", - "id": "compute.regionDisks.bulkInsert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/bulkInsert", - "request": { - "$ref": "BulkInsertDiskResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk. For regular snapshot\ncreation, consider using snapshots.insert\ninstead, as that method supports more features, such as creating snapshots\nin a project different from the source disk project.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "id": "compute.regionDisks.createSnapshot", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to snapshot.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "guestFlush": { - "description": "[Input Only] Specifies to create an application consistent snapshot by\ninforming the OS to prepare for the snapshot process.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/createSnapshot", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified regional persistent disk. Deleting a regional disk\nremoves all the replicas of its data permanently and is irreversible.\nHowever, deleting a disk does not delete anysnapshots\npreviously made from the disk. You must separatelydelete\nsnapshots.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "DELETE", - "id": "compute.regionDisks.delete", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to delete.", - "location": "path", - "pattern": "\\S{1,66}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns a specified regional persistent disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "GET", - "id": "compute.regionDisks.get", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAsyncReplicationStatus": { - "description": "Gets the status of current async replication for a given device.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/getAsyncReplicationStatus", - "httpMethod": "GET", - "id": "compute.regionDisks.getAsyncReplicationStatus", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the Disk resource whose Async replication details are requested.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/getAsyncReplicationStatus", - "response": { - "$ref": "GetAsyncReplicationStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionDisks.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a persistent regional disk in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/disks", - "httpMethod": "POST", - "id": "compute.regionDisks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceImage": { - "description": "Source image to restore onto a disk. This field is optional.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of persistent disks contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/disks", - "httpMethod": "GET", - "id": "compute.regionDisks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/disks", - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from a regional disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.regionDisks.removeResourcePolicies", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies", - "request": { - "$ref": "RegionDisksRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the specified regional persistent disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/resize", - "httpMethod": "POST", - "id": "compute.regionDisks.resize", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "The project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/resize", - "request": { - "$ref": "RegionDisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionDisks.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the target regional disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionDisks.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startAsyncReplication": { - "description": "Starts asynchronous replication.\nMust be invoked on the primary disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.startAsyncReplication", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication", - "request": { - "$ref": "RegionDisksStartAsyncReplicationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopAsyncReplication": { - "description": "Stops asynchronous replication.\nCan be invoked either on the primary or on the secondary disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.stopAsyncReplication", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopGroupAsyncReplication": { - "description": "Stops asynchronous replication for a consistency group of disks.\nCan be invoked either in the primary or secondary scope.", - "flatPath": "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.stopGroupAsyncReplication", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request. This must be the region of the\nprimary or secondary disks in the consistency group.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication", - "request": { - "$ref": "DisksStopGroupAsyncReplicationResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionDisks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Update the specified disk with the data included in the request. Update is\nperformed only on selected fields included as part of update-mask. Only the\nfollowing fields can be modified: user_license.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "PATCH", - "id": "compute.regionDisks.update", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateKmsKey": { - "description": "Rotates the customer-managed\nencryption key to the latest version for the specified persistent disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/updateKmsKey", - "httpMethod": "POST", - "id": "compute.regionDisks.updateKmsKey", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the Disk resource, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/updateKmsKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "waitForReplicationCatchUp": { - "description": "Wait for replication to catch up on the secondary disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/waitForReplicationCatchUp", - "httpMethod": "POST", - "id": "compute.regionDisks.waitForReplicationCatchUp", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/waitForReplicationCatchUp", - "request": { - "$ref": "RegionWaitForReplicationCatchUpRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionHealthAggregationPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthAggregationPolicy resources,\nregional and global, available to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthAggregationPolicies", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthAggregationPolicies", - "response": { - "$ref": "HealthAggregationPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthAggregationPolicy in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionHealthAggregationPolicies.delete", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthAggregationPolicy resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.get", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "response": { - "$ref": "HealthAggregationPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a HealthAggregationPolicy in the specified project in the given\nregion using the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies", - "httpMethod": "POST", - "id": "compute.regionHealthAggregationPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies", - "request": { - "$ref": "HealthAggregationPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the HealthAggregationPolicies for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies", - "response": { - "$ref": "HealthAggregationPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthAggregationPolicy\nresource with the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionHealthAggregationPolicies.patch", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "request": { - "$ref": "HealthAggregationPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthAggregationPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionHealthCheckServices": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthCheckService resources,\nregional and global, available to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthCheckServices", - "httpMethod": "GET", - "id": "compute.regionHealthCheckServices.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthCheckServices", - "response": { - "$ref": "HealthCheckServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified regional HealthCheckService.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "DELETE", - "id": "compute.regionHealthCheckServices.delete", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to delete. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional HealthCheckService resource.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "GET", - "id": "compute.regionHealthCheckServices.get", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "response": { - "$ref": "HealthCheckService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a regional HealthCheckService resource in the\nspecified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices", - "httpMethod": "POST", - "id": "compute.regionHealthCheckServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices", - "request": { - "$ref": "HealthCheckService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the HealthCheckService resources that have been\nconfigured for the specified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices", - "httpMethod": "GET", - "id": "compute.regionHealthCheckServices.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices", - "response": { - "$ref": "HealthCheckServicesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthCheckService resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "PATCH", - "id": "compute.regionHealthCheckServices.patch", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "request": { - "$ref": "HealthCheckService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthCheckServices.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HealthCheck resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "id": "compute.regionHealthChecks.delete", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthCheck resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "GET", - "id": "compute.regionHealthChecks.get", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/healthChecks", - "httpMethod": "POST", - "id": "compute.regionHealthChecks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/healthChecks", - "httpMethod": "GET", - "id": "compute.regionHealthChecks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks", - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "id": "compute.regionHealthChecks.patch", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "id": "compute.regionHealthChecks.update", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionHealthSources": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthSource resources (all\nregional) available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthSources", - "httpMethod": "GET", - "id": "compute.regionHealthSources.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthSources", - "response": { - "$ref": "HealthSourceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthSource in the given region", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "DELETE", - "id": "compute.regionHealthSources.delete", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthSource resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "GET", - "id": "compute.regionHealthSources.get", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "response": { - "$ref": "HealthSource" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a HealthSource in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthSources", - "httpMethod": "POST", - "id": "compute.regionHealthSources.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources", - "request": { - "$ref": "HealthSource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the HealthSources for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthSources", - "httpMethod": "GET", - "id": "compute.regionHealthSources.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthSources", - "response": { - "$ref": "HealthSourceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthSource resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "PATCH", - "id": "compute.regionHealthSources.patch", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "request": { - "$ref": "HealthSource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthSources.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagerResizeRequests": { - "methods": { - "cancel": { - "description": "Cancels the specified resize request.\nCancelled resize request no longer waits for the resources to be\nprovisioned. Cancel is only possible for requests that are in accepted\nstate.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagerResizeRequests.cancel", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to cancel.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified, inactive resize request. Requests that are still\nactive cannot be deleted. Deleting request does not delete instances that\nwere provisioned previously.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceGroupManagerResizeRequests.delete", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to delete.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified resize request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagerResizeRequests.get", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new Resize Request that starts provisioning VMs immediately\nor queues VM creation.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagerResizeRequests.insert", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to which the resize request is scoped.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "request": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of Resize Requests that are contained in the\nmanaged instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagerResizeRequests.list", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "response": { - "$ref": "RegionInstanceGroupManagerResizeRequestsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagers": { - "methods": { - "abandonInstances": { - "description": "Flags the specified instances to be immediately removed from the managed\ninstance group. Abandoning an instance does not delete the\ninstance, but it does remove the instance from any target pools that are\napplied by the managed instance group. This method reduces thetargetSize of the managed instance group by the\nnumber of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have\nnot yet been removed from the group. You must separately verify the\nstatus of the abandoning action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.abandonInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "request": { - "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "applyUpdatesToInstances": { - "description": "Apply updates to selected instances the managed instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "request": { - "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createInstances": { - "description": "Creates instances with per-instance configurations in this regional managed\ninstance group. Instances are created using the current instance template.\nThe create instances operation is marked DONE if\nthe createInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances\nmethod.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.createInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "request": { - "$ref": "RegionInstanceGroupManagersCreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified managed instance group and all of the instances\nin that group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceGroupManagers.delete", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately deleted. The instances are also removed from any target\npools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of\ninstances that you delete.\nThe deleteInstances operation is marked DONE if\nthe deleteInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of thedeleting action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.deleteInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "request": { - "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configurations for the managed instance\ngroup.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerDeleteInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified managed instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.get", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to return.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a managed instance group using the information that you specify\nin the request. After the group is created, instances in the group are\ncreated using the specified instance template.\nThis operation is marked as DONE when the group is created\neven if the instances in the group have not yet been created. You must\nseparately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nA regional managed instance group can contain up to 2000 instances.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of managed instance groups that are contained\nwithin the specified region.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers", - "response": { - "$ref": "RegionInstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given regional\nmanaged instance group. The filter andorderBy query parameters are not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.listErrors", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035, or an\nunsigned long integer: must match regexp pattern:\n(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nThis should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "response": { - "$ref": "RegionInstanceGroupManagersListErrorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are\nscheduled to be created. The list includes any current actions\nthat the group has scheduled for its instances. The orderBy\nquery parameter is not supported. The `pageToken` query parameter is\nsupported only if the group's `listManagedInstancesResults` field is set\nto `PAGINATED`.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.listManagedInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "response": { - "$ref": "RegionInstanceGroupManagersListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configurations defined for the managed\ninstance group. The orderBy query parameter is not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "response": { - "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is patched\neven if the instances in the group are still in the process of being\npatched. You must separately verify the status of the individual instances\nwith the listmanagedinstances\nmethod. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "id": "compute.regionInstanceGroupManagers.patch", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPerInstanceConfigs": { - "description": "Inserts or patches per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerPatchInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "recreateInstances": { - "description": "Flags the specified VM instances in the managed instance group to be\nimmediately recreated. Each instance is recreated using the group's current\nconfiguration. This operation is marked as DONE when the flag\nis set even if the instances have not yet been recreated. You must\nseparately verify the status of each instance by checking itscurrentAction field; for more information, see Checking\nthe status of managed instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.recreateInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "request": { - "$ref": "RegionInstanceGroupManagersRecreateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Changes the intended size of the managed instance group. If you increase\nthe size, the group creates new instances using the current instance\ntemplate. If you decrease the size, the group deletes one or more\ninstances.\n\nThe resize operation is marked DONE if theresize request is successful. The underlying actions take\nadditional time. You must separately verify the status of thecreating or deleting actions with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resize", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "size" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "size": { - "description": "Number of instances that should exist in this instance group\nmanager.", - "format": "int32", - "location": "query", - "minimum": "0", - "required": true, - "type": "integer" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "description": "Resizes the regional managed instance group with advanced configuration\noptions like disabling creation retries. This is an extended version of theresize method.\n\nIf you increase the size, the group creates new instances using the current\ninstance template. If you decrease the size, the group deletes one or more\ninstances.\n\nThe resize operation is marked DONE if theresize request is successful. The underlying actions take\nadditional time. You must separately verify the status of thecreating or deleting actions with the get\norlistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resizeAdvanced", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "request": { - "$ref": "RegionInstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resumeInstances": { - "description": "Flags the specified instances in the managed instance group to be\nresumed. This method increases thetargetSize and decreases the targetSuspendedSize\nof the managed instance group by the number of instances that you resume.\nThe resumeInstances operation is marked DONE if\nthe resumeInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are suspended. For\nexample, if an instance was previously suspended using the suspendInstances\nmethod, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resumeInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "request": { - "$ref": "RegionInstanceGroupManagersResumeInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "deprecated": true, - "description": "Modifies the autohealing policy for the instances in this managed\ninstance group.\n[Deprecated] This method is deprecated. UseregionInstanceGroupManagers.patch instead.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "request": { - "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating\ninstances in this group. Existing instances are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are\nassigned. Existing instances in the group are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setTargetPools", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "request": { - "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startInstances": { - "description": "Flags the specified instances in the managed instance group to be\nstarted. This method increases thetargetSize and decreases the targetStoppedSize\nof the managed instance group by the number of instances that you start.\nThe startInstances operation is marked DONE if\nthe startInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are stopped. For\nexample, if an instance was previously stopped using the stopInstances\nmethod, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.startInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "request": { - "$ref": "RegionInstanceGroupManagersStartInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately stopped. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetStoppedSize\nof the managed instance group by the number of instances that you stop.\nThe stopInstances operation is marked DONE if\nthe stopInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays stopping the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is stopped.\n\nStopped instances can be started using the startInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.stopInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "request": { - "$ref": "RegionInstanceGroupManagersStopInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspendInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately suspended. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetSuspendedSize\nof the managed instance group by the number of instances that you suspend.\nThe suspendInstances operation is marked DONE if\nthe suspendInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays suspension of the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.suspendInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "request": { - "$ref": "RegionInstanceGroupManagersSuspendInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is updated\neven if the instances in the group have not yet been updated. You must\nseparately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "id": "compute.regionInstanceGroupManagers.update", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "description": "Inserts or updates per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstanceGroups": { - "methods": { - "get": { - "description": "Returns the specified instance group resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroups.get", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "Name of the instance group resource to return.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of instance group resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups", - "httpMethod": "GET", - "id": "compute.regionInstanceGroups.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups", - "response": { - "$ref": "RegionInstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "description": "Lists the instances in the specified instance group and displays\ninformation about the named ports. Depending on the specified options, this\nmethod can list all instances or only the instances that are running.\nThe orderBy query parameter is not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.listInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroup": { - "description": "Name of the regional instance group for which we want to list the\ninstances.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "request": { - "$ref": "RegionInstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "RegionInstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setNamedPorts": { - "description": "Sets the named ports for the specified regional instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.setNamedPorts", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the regional instance group where the named ports are updated.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "request": { - "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceTemplates": { - "methods": { - "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is\npermanent and cannot be undone.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceTemplates.delete", - "parameterOrder": [ - "project", - "region", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified instance template.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "id": "compute.regionInstanceTemplates.get", - "parameterOrder": [ - "project", - "region", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance template in the specified project and region using the\nglobal instance template whose URL is included in the request.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates", - "httpMethod": "POST", - "id": "compute.regionInstanceTemplates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates", - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of instance templates that are contained within the\nspecified project and region.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates", - "httpMethod": "GET", - "id": "compute.regionInstanceTemplates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the regions for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates", - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstances": { - "methods": { - "bulkInsert": { - "description": "Creates multiple instances in a given region. Count specifies the number of\ninstances to create.", - "flatPath": "projects/{project}/regions/{region}/instances/bulkInsert", - "httpMethod": "POST", - "id": "compute.regionInstances.bulkInsert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instances/bulkInsert", - "request": { - "$ref": "BulkInsertInstanceResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstantSnapshotGroups": { - "methods": { - "delete": { - "description": "deletes a Regional InstantSnapshotGroup resource", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}", - "httpMethod": "DELETE", - "id": "compute.regionInstantSnapshotGroups.delete", - "parameterOrder": [ - "project", - "region", - "instantSnapshotGroup" - ], - "parameters": { - "instantSnapshotGroup": { - "description": "Name of the InstantSnapshotGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "returns the specified InstantSnapshotGroup resource in the specified\nregion.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshotGroups.get", - "parameterOrder": [ - "project", - "region", - "instantSnapshotGroup" - ], - "parameters": { - "instantSnapshotGroup": { - "description": "Name of the InstantSnapshotGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}", - "response": { - "$ref": "InstantSnapshotGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshotGroups.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "creates a Regional InstantSnapshotGroup resource", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshotGroups.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceConsistencyGroup": { - "description": "begin_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups", - "request": { - "$ref": "InstantSnapshotGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "retrieves the list of InstantSnapshotGroup resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshotGroups.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups", - "response": { - "$ref": "ListInstantSnapshotGroups" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshotGroups.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshotGroups.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstantSnapshots": { - "methods": { - "delete": { - "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting\na single instantSnapshot might not necessarily delete all the data on that\ninstantSnapshot. If any data on the instantSnapshot that is marked for\ndeletion is needed for subsequent instantSnapshots, the data will be moved\nto the next corresponding instantSnapshot.\n\nFor more information, seeDeleting\ninstantSnapshots.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "httpMethod": "DELETE", - "id": "compute.regionInstantSnapshots.delete", - "parameterOrder": [ - "project", - "region", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InstantSnapshot resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.get", - "parameterOrder": [ - "project", - "region", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "InstantSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instant snapshot in the specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots", - "request": { - "$ref": "InstantSnapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of InstantSnapshot resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots", - "response": { - "$ref": "InstantSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a instantSnapshot in the given region. To learn more\nabout labels, read the Labeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionMultiMigMembers": { - "methods": { - "get": { - "description": "Retrieves information about the specified multi-MIG member.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}", - "httpMethod": "GET", - "id": "compute.regionMultiMigMembers.get", - "parameterOrder": [ - "project", - "region", - "multiMig", - "multiMigMember" - ], - "parameters": { - "multiMig": { - "description": "The name of the multi-MIG.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "multiMigMember": { - "description": "The name of the multi-MIG member.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request. Region name should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}", - "response": { - "$ref": "MultiMigMember" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of members of a specific multi-MIG.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers", - "httpMethod": "GET", - "id": "compute.regionMultiMigMembers.list", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "multiMig": { - "description": "The name of the multi-MIG.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request. Region name should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers", - "response": { - "$ref": "MultiMigMemberList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionMultiMigs": { - "methods": { - "delete": { - "description": "Deletes a multi-MIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "DELETE", - "id": "compute.regionMultiMigs.delete", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the multi-MIG to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all the details of a specific multi-MIG.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.get", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the multi-MIG resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "MultiMig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a multi-MIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "POST", - "id": "compute.regionMultiMigs.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents you from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "request": { - "$ref": "MultiMig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of multi-MIGs in a project and region.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "response": { - "$ref": "MultiMigsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkEndpointGroups": { - "methods": { - "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "RegionNetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group. Note that the NEG cannot be\ndeleted if it is configured as a backend of a backend service.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkEndpointGroups.delete", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach the network endpoint from the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group you are detaching network\nendpoints from. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "RegionNetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.regionNetworkEndpointGroups.get", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of regional network endpoint groups available to the\nspecified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.regionNetworkEndpointGroups.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkFirewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.addAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "associatedPolicyToBeReplaced": { - "description": "Name of the firewall policy associated with the target network to swap\nassociation with. This field is mutually exclusive with\n'replace_existing_association'.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association already exists.\nThis is false by default, in which case an error will be returned if an\nassociation already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.addRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.cloneRules", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkFirewallPolicies.delete", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.get", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns the effective firewalls on a given network.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "region", - "network" - ], - "parameters": { - "network": { - "description": "Network reference", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls", - "response": { - "$ref": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new network firewall policy in the specified project and region.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the network firewall policies that have been configured\nfor the specified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionNetworkFirewallPolicies.patch", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchAssociation": { - "description": "Updates an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.patchAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.patchRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.removeAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the association that will be removed.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.removeRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.addAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation", - "request": { - "$ref": "NetworkPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addTrafficClassificationRule": { - "description": "Inserts a rule into a network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.addTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule", - "request": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of network policies.\n\nTo prevent failure, it's recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkPolicies", - "response": { - "$ref": "NetworkPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkPolicies.delete", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.get", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "response": { - "$ref": "NetworkPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.getAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "name": { - "description": "The name of the association to get from the network policy.", - "location": "query", - "type": "string" - }, - "networkPolicy": { - "description": "Name of the network policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation", - "response": { - "$ref": "NetworkPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getTrafficClassificationRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.getTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the network policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule", - "response": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies", - "request": { - "$ref": "NetworkPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified project\nin the given region.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies", - "response": { - "$ref": "NetworkPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the\nrequest.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionNetworkPolicies.patch", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "request": { - "$ref": "NetworkPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchTrafficClassificationRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.patchTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the traffic classification rule to patch. Only rules with\na priority value between 1 and 2147482647 (inclusive) can be patched.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule", - "request": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.removeAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "name": { - "description": "Name for the association that will be removed.", - "location": "query", - "type": "string" - }, - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeTrafficClassificationRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.removeTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the network policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionNotificationEndpoints": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NotificationEndpoint resources,\nregional and global, available to the specified project.", - "flatPath": "projects/{project}/aggregated/notificationEndpoints", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/notificationEndpoints", - "response": { - "$ref": "NotificationEndpointAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NotificationEndpoint in the given region", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "httpMethod": "DELETE", - "id": "compute.regionNotificationEndpoints.delete", - "parameterOrder": [ - "project", - "region", - "notificationEndpoint" - ], - "parameters": { - "notificationEndpoint": { - "description": "Name of the NotificationEndpoint resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NotificationEndpoint resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.get", - "parameterOrder": [ - "project", - "region", - "notificationEndpoint" - ], - "parameters": { - "notificationEndpoint": { - "description": "Name of the NotificationEndpoint resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "response": { - "$ref": "NotificationEndpoint" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a NotificationEndpoint in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints", - "httpMethod": "POST", - "id": "compute.regionNotificationEndpoints.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints", - "request": { - "$ref": "NotificationEndpoint" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the NotificationEndpoints for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints", - "response": { - "$ref": "NotificationEndpointList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionNotificationEndpoints.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionOperations": { - "methods": { - "delete": { - "description": "Deletes the specified region-specific Operations resource.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.regionOperations.delete", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified region-specific Operations resource.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.regionOperations.get", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/operations", - "httpMethod": "GET", - "id": "compute.regionOperations.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method differs from the\n`GET` method in that it waits for no more than the default\ndeadline (2 minutes) and then returns the current state of the operation,\nwhich might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.regionOperations.wait", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionRecoverableSnapshots": { - "methods": { - "delete": { - "description": "Deletes the specified RecoverableSnapshot. Deleting a recoverable snapshot\nwill delete the underlying PD snapshot and is irreversible.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", - "httpMethod": "DELETE", - "id": "compute.regionRecoverableSnapshots.delete", - "parameterOrder": [ - "project", - "region", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the recoverable Snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified RecoverableSnapshot resource.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", - "httpMethod": "GET", - "id": "compute.regionRecoverableSnapshots.get", - "parameterOrder": [ - "project", - "region", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}", - "response": { - "$ref": "RecoverableSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionRecoverableSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of RecoverableSnapshot resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots", - "httpMethod": "GET", - "id": "compute.regionRecoverableSnapshots.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots", - "response": { - "$ref": "RecoverableSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "recover": { - "description": "Recovers the specified RecoverableSnapshot.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover", - "httpMethod": "POST", - "id": "compute.regionRecoverableSnapshots.recover", - "parameterOrder": [ - "project", - "region", - "recoverableSnapshot" - ], - "parameters": { - "project": { - "description": "Project Id of the request", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "recoverableSnapshot": { - "description": "Name of the recoverable resource to recover", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshotName": { - "description": "Optional. Name of the snapshot after the recovery\nThe name will be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name will be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter will be a lowercase letter, and all following characters can be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionRecoverableSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionRecoverableSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionSecurityPolicies": { - "methods": { - "addRule": { - "description": "Inserts a rule into a security policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.addRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionSecurityPolicies.delete", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.get", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.getRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified project\nand region.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request. To\nclear fields in the policy, leave the fields empty and specify them in the\nupdateMask. This cannot be used to be update the rules in the policy.\nPlease use the per rule methods like addRule, patchRule, and removeRule\ninstead.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionSecurityPolicies.patch", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority. To clear fields in the rule,\nleave the fields empty and specify them in the updateMask.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.patchRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.removeRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels,\nread the Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionSnapshotSettings": { - "methods": { - "get": { - "description": "Get region snapshot settings.", - "flatPath": "projects/{project}/regions/{region}/snapshotSettings", - "httpMethod": "GET", - "id": "compute.regionSnapshotSettings.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshotSettings", - "response": { - "$ref": "SnapshotSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch region snapshot settings.", - "flatPath": "projects/{project}/regions/{region}/snapshotSettings", - "httpMethod": "PATCH", - "id": "compute.regionSnapshotSettings.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshotSettings", - "request": { - "$ref": "SnapshotSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionSnapshots": { - "methods": { - "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting\na single snapshot might not necessarily delete all the data on that\nsnapshot. If any data on the snapshot that is marked for deletion is\nneeded for subsequent snapshots, the data will be moved to the next\ncorresponding snapshot.\n\nFor more information, seeDeleting\nsnapshots.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "httpMethod": "DELETE", - "id": "compute.regionSnapshots.delete", - "parameterOrder": [ - "project", - "region", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Snapshot resource.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "httpMethod": "GET", - "id": "compute.regionSnapshots.get", - "parameterOrder": [ - "project", - "region", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a snapshot in the specified region using the data included\nin the request.", - "flatPath": "projects/{project}/regions/{region}/snapshots", - "httpMethod": "POST", - "id": "compute.regionSnapshots.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Snapshot resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/snapshots", - "httpMethod": "GET", - "id": "compute.regionSnapshots.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/snapshots", - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a regional snapshot. To learn more about labels, read\nthe Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionSnapshots.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "updateKmsKey": { - "description": "Rotates the customer-managed\nencryption key to the latest version for the specified snapshot.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{snapshot}/updateKmsKey", - "httpMethod": "POST", - "id": "compute.regionSnapshots.updateKmsKey", - "parameterOrder": [ - "project", - "region", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the snapshot resource to update. Should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{snapshot}/updateKmsKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionSslCertificates": { - "methods": { - "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "id": "compute.regionSslCertificates.delete", - "parameterOrder": [ - "project", - "region", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get\na list of available SSL certificates by making a list()\nrequest.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "id": "compute.regionSslCertificates.get", - "parameterOrder": [ - "project", - "region", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using\nthe data included in the request", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", - "httpMethod": "POST", - "id": "compute.regionSslCertificates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates", - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified\nproject in the specified region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", - "httpMethod": "GET", - "id": "compute.regionSslCertificates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates", - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource and region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSslCertificates.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionSslPolicies": { - "methods": { - "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted\nonly if it is not in use by any TargetHttpsProxy or TargetSslProxy\nresources.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionSslPolicies.delete", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to delete. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.get", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "response": { - "$ref": "SslPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project and region using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies", - "httpMethod": "POST", - "id": "compute.regionSslPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the SSL policies that have been configured for the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies", - "response": { - "$ref": "SslPoliciesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using\ncustom profile.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.listAvailableFeatures", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures", - "response": { - "$ref": "SslPoliciesListAvailableFeaturesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionSslPolicies.patch", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSslPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetHttpProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetHttpProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.get", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpProxy resources available\nto the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetHttpsProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetHttpsProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.get", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available\nto the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified regional TargetHttpsProxy resource with the data\nincluded in the request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.regionTargetHttpsProxies.patch", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setSslCertificates", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set an\nSslCertificates resource for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "request": { - "$ref": "RegionTargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetTcpProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetTcpProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetTcpProxies.get", - "parameterOrder": [ - "project", - "region", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies", - "httpMethod": "POST", - "id": "compute.regionTargetTcpProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies", - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of TargetTcpProxy resources\navailable to the specified project in a given region.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.regionTargetTcpProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetTcpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionUrlMaps": { - "methods": { - "delete": { - "description": "Deletes the specified UrlMap resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "id": "compute.regionUrlMaps.delete", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified UrlMap resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "GET", - "id": "compute.regionUrlMaps.get", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a UrlMap resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/urlMaps", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path,\nscoped to the specified UrlMap.\n\nFor more information, see [Invalidating cached\ncontent](/cdn/docs/invalidating-cached-content).", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.invalidateCache", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache", - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of UrlMap resources available to the specified\nproject in the specified region.", - "flatPath": "projects/{project}/regions/{region}/urlMaps", - "httpMethod": "GET", - "id": "compute.regionUrlMaps.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps", - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified UrlMap resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "id": "compute.regionUrlMaps.patch", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified UrlMap resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "PUT", - "id": "compute.regionUrlMaps.update", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the\nprovided UrlMap will be run. Calling this method does NOT create the\nUrlMap.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.validate", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to be validated as.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate", - "request": { - "$ref": "RegionUrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionZones": { - "methods": { - "list": { - "description": "Retrieves the list of Zone resources under the specific region available to\nthe specified project.", - "flatPath": "projects/{project}/regions/{region}/zones", - "httpMethod": "GET", - "id": "compute.regionZones.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/zones", - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regions": { - "methods": { - "get": { - "description": "Returns the specified Region resource.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information (the `quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.\n\nThis method fails if the quota information is unavailable for the region\nand if the organization policy constraint\ncompute.requireBasicQuotaInResponse is enforced. This\nconstraint, when enforced, disables the fail-open behaviour when quota\ninformation (the `items.quotas` field) is unavailable for the region.\nIt is recommended to use the default setting\nfor the constraint unless your application requires the fail-closed\nbehaviour for this method.", - "flatPath": "projects/{project}/regions/{region}", - "httpMethod": "GET", - "id": "compute.regions.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}", - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of region resources available to the specified project.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information\n(the `items.quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.\n\nThis method fails if the quota information is unavailable for the region\nand if the organization policy constraint\ncompute.requireBasicQuotaInResponse is enforced. This\nconstraint, when enforced, disables the fail-open behaviour when quota\ninformation (the `items.quotas` field) is unavailable for the region.\nIt is recommended to use the default setting\nfor the constraint unless your application requires the fail-closed\nbehaviour for this method.", - "flatPath": "projects/{project}/regions", - "httpMethod": "GET", - "id": "compute.regions.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions", - "response": { - "$ref": "RegionList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "reliabilityRisks": { - "methods": { - "get": { - "description": "Returns the specified ReliabilityRisk resource.", - "flatPath": "projects/{project}/global/reliabilityRisks/{reliabilityRisk}", - "httpMethod": "GET", - "id": "compute.reliabilityRisks.get", - "parameterOrder": [ - "project", - "reliabilityRisk" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "reliabilityRisk": { - "description": "Name of the ReliabilityRisk resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/reliabilityRisks/{reliabilityRisk}", - "response": { - "$ref": "ReliabilityRisk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of reliabilityRisks available in the specified project.", - "flatPath": "projects/{project}/global/reliabilityRisks", - "httpMethod": "GET", - "id": "compute.reliabilityRisks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/reliabilityRisks", - "response": { - "$ref": "ReliabilityRisksListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "reservationBlocks": { - "methods": { - "get": { - "description": "Retrieves information about the specified reservation block.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", - "httpMethod": "GET", - "id": "compute.reservationBlocks.get", - "parameterOrder": [ - "project", - "zone", - "reservation", - "reservationBlock" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationBlock": { - "description": "The name of the reservation block.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the Block.", - "enum": [ - "BASIC", - "BLOCK_VIEW_UNSPECIFIED", - "FULL" - ], - "enumDescriptions": [ - "This view includes basic information about the reservation block", - "The default / unset value. The API will default to the BASIC view.", - "Includes detailed topology view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", - "response": { - "$ref": "ReservationBlocksGetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of reservation blocks under a single reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", - "httpMethod": "GET", - "id": "compute.reservationBlocks.list", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", - "response": { - "$ref": "ReservationBlocksListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Allows customers to perform maintenance on a reservation block", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservationBlocks.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "reservation", - "reservationBlock" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationBlock": { - "description": "The name of the reservation block.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", - "request": { - "$ref": "ReservationsBlocksPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "reservationSubBlocks": { - "methods": { - "get": { - "description": "Retrieves information about the specified reservation subBlock.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}", - "httpMethod": "GET", - "id": "compute.reservationSubBlocks.get", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the subBlock.", - "enum": [ - "SUB_BLOCK_VIEW_BASIC", - "SUB_BLOCK_VIEW_FULL", - "SUB_BLOCK_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "This view includes basic information about the reservation sub block", - "Includes detailed topology view.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}", - "response": { - "$ref": "ReservationSubBlocksGetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of reservation subBlocks under a single reservation.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks", - "httpMethod": "GET", - "id": "compute.reservationSubBlocks.list", - "parameterOrder": [ - "project", - "zone", - "parentName" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks", - "response": { - "$ref": "ReservationSubBlocksListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Allows customers to perform maintenance on a reservation subBlock", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reportFaulty": { - "description": "Allows customers to report a faulty subBlock.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.reportFaulty", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty", - "request": { - "$ref": "ReservationSubBlocksReportFaultyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "reservations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of reservations.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/reservations", - "httpMethod": "GET", - "id": "compute.reservations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/reservations", - "response": { - "$ref": "ReservationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "DELETE", - "id": "compute.reservations.delete", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves information about the specified reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "GET", - "id": "compute.reservations.get", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to retrieve.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "response": { - "$ref": "Reservation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.reservations.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new reservation. For more information, readReserving zonal\nresources.", - "flatPath": "projects/{project}/zones/{zone}/reservations", - "httpMethod": "POST", - "id": "compute.reservations.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations", - "request": { - "$ref": "Reservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list of all the reservations that have been configured for the\nspecified project in specified zone.", - "flatPath": "projects/{project}/zones/{zone}/reservations", - "httpMethod": "GET", - "id": "compute.reservations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations", - "response": { - "$ref": "ReservationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Perform maintenance on an extended reservation", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservations.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", - "request": { - "$ref": "ReservationsPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the reservation (applicable to standalone reservations only). For\nmore information, readModifying\nreservations.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/resize", - "httpMethod": "POST", - "id": "compute.reservations.resize", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/resize", - "request": { - "$ref": "ReservationsResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.reservations.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.reservations.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Update share settings of the reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "PATCH", - "id": "compute.reservations.update", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "request": { - "$ref": "Reservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "resourcePolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of resource policies.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/resourcePolicies", - "httpMethod": "GET", - "id": "compute.resourcePolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/resourcePolicies", - "response": { - "$ref": "ResourcePolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "DELETE", - "id": "compute.resourcePolicies.delete", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resourcePolicy": { - "description": "Name of the resource policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves all information of the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "GET", - "id": "compute.resourcePolicies.get", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resourcePolicy": { - "description": "Name of the resource policy to retrieve.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "response": { - "$ref": "ResourcePolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.resourcePolicies.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies", - "httpMethod": "POST", - "id": "compute.resourcePolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies", - "request": { - "$ref": "ResourcePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list all the resource policies that have been configured for the\nspecified project in specified region.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies", - "httpMethod": "GET", - "id": "compute.resourcePolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies", - "response": { - "$ref": "ResourcePolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Modify the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "PATCH", - "id": "compute.resourcePolicies.patch", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resourcePolicy": { - "description": "Id of the resource policy to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "request": { - "$ref": "ResourcePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.resourcePolicies.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.resourcePolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "rolloutPlans": { - "methods": { - "delete": { - "description": "Deletes a RolloutPlan.", - "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "httpMethod": "DELETE", - "id": "compute.rolloutPlans.delete", - "parameterOrder": [ - "project", - "rolloutPlan" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rolloutPlan": { - "description": "Name of the RolloutPlan resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a single project-scoped RolloutPlan.", - "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "httpMethod": "GET", - "id": "compute.rolloutPlans.get", - "parameterOrder": [ - "project", - "rolloutPlan" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "rolloutPlan": { - "description": "Name of the persistent rollout plan to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "response": { - "$ref": "RolloutPlan" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new RolloutPlan in a given project and location.", - "flatPath": "projects/{project}/global/rolloutPlans", - "httpMethod": "POST", - "id": "compute.rolloutPlans.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans", - "request": { - "$ref": "RolloutPlan" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists RolloutPlans in a given project and location.", - "flatPath": "projects/{project}/global/rolloutPlans", - "httpMethod": "GET", - "id": "compute.rolloutPlans.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/rolloutPlans", - "response": { - "$ref": "RolloutPlansListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "rollouts": { - "methods": { - "cancel": { - "description": "Cancels a Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "PATCH", - "id": "compute.rollouts.cancel", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rollback": { - "description": "Optional. If true, then the ongoing rollout must be rolled back. Else, just cancel\nthe rollout without taking any further actions. Note that products must\nsupport at least one of these options, however, it does not need to support\nboth.", - "location": "query", - "type": "boolean" - }, - "rollout": { - "description": "Name of the Rollout resource to cancel.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes a Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "DELETE", - "id": "compute.rollouts.delete", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rollout": { - "description": "Name of the Rollout resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a single project-scoped Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "GET", - "id": "compute.rollouts.get", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "rollout": { - "description": "Name of the persistent rollout to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Rollout" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Lists Rollouts in a given project and location.", - "flatPath": "projects/{project}/global/rollouts", - "httpMethod": "GET", - "id": "compute.rollouts.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/rollouts", - "response": { - "$ref": "RolloutsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "routers": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of routers.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/routers", - "httpMethod": "GET", - "id": "compute.routers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/routers", - "response": { - "$ref": "RouterAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Router resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "DELETE", - "id": "compute.routers.delete", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteNamedSet": { - "description": "Deletes Named Set", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/deleteNamedSet", - "httpMethod": "POST", - "id": "compute.routers.deleteNamedSet", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "namedSet": { - "description": "The Named Set name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Named Set is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/deleteNamedSet", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteRoutePolicy": { - "description": "Deletes Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.deleteRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "policy": { - "description": "The Policy name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Router resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "GET", - "id": "compute.routers.get", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "response": { - "$ref": "Router" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getNamedSet": { - "description": "Returns specified Named Set", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNamedSet", - "httpMethod": "GET", - "id": "compute.routers.getNamedSet", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "namedSet": { - "description": "The Named Set name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query for the named set. The name should\nconform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getNamedSet", - "response": { - "$ref": "RoutersGetNamedSetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getNatIpInfo": { - "description": "Retrieves runtime NAT IP information.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", - "httpMethod": "GET", - "id": "compute.routers.getNatIpInfo", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "natName": { - "description": "Name of the nat service to filter the NAT IP information.\nIf it is omitted, all nats for this router will be returned.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query for Nat IP information. The name\nshould conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", - "response": { - "$ref": "NatIpInfoResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", - "httpMethod": "GET", - "id": "compute.routers.getNatMappingInfo", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "natName": { - "description": "Name of the nat service to filter the Nat Mapping information.\nIf it is omitted, all nats for this router will be returned.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "router": { - "description": "Name of the Router resource to query for Nat Mapping information of\nVM endpoints.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", - "response": { - "$ref": "VmEndpointNatMappingsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRoutePolicy": { - "description": "Returns specified Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", - "httpMethod": "GET", - "id": "compute.routers.getRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "policy": { - "description": "The Policy name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query for the route policy. The name should\nconform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", - "response": { - "$ref": "RoutersGetRoutePolicyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRouterStatus": { - "description": "Retrieves runtime information of the specified router.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRouterStatus", - "httpMethod": "GET", - "id": "compute.routers.getRouterStatus", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getRouterStatus", - "response": { - "$ref": "RouterStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a Router resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/routers", - "httpMethod": "POST", - "id": "compute.routers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of Router resources available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/routers", - "httpMethod": "GET", - "id": "compute.routers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/routers", - "response": { - "$ref": "RouterList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listBgpRoutes": { - "description": "Retrieves a list of router bgp routes available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", - "httpMethod": "GET", - "id": "compute.routers.listBgpRoutes", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "addressFamily": { - "default": "UNSPECIFIED_IP_VERSION", - "description": "(Required) limit results to this address family (either IPv4 or IPv6)", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_IP_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "location": "query", - "type": "string" - }, - "destinationPrefix": { - "description": "Limit results to destinations that are subnets of this CIDR range", - "location": "query", - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "peer": { - "description": "(Required) limit results to the BGP peer with the given name.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "policyApplied": { - "default": "true", - "description": "When true, the method returns post-policy routes. Otherwise, it returns\npre-policy routes.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "routeType": { - "default": "UNSPECIFIED_ROUTE_TYPE", - "description": "(Required) limit results to this type of route (either LEARNED or\nADVERTISED)", - "enum": [ - "ADVERTISED", - "LEARNED", - "UNSPECIFIED_ROUTE_TYPE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "location": "query", - "type": "string" - }, - "router": { - "description": "Name or id of the resource for this request.\nName should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", - "response": { - "$ref": "RoutersListBgpRoutes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNamedSets": { - "description": "Retrieves a list of router named set subresources available to the\nspecified project.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/listNamedSets", - "httpMethod": "GET", - "id": "compute.routers.listNamedSets", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "router": { - "description": "Name or id of the resource for this request.\nName should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/listNamedSets", - "response": { - "$ref": "RoutersListNamedSets" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listRoutePolicies": { - "description": "Retrieves a list of router route policy subresources available to the\nspecified project.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", - "httpMethod": "GET", - "id": "compute.routers.listRoutePolicies", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "router": { - "description": "Name or id of the resource for this request.\nName should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", - "response": { - "$ref": "RoutersListRoutePolicies" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified Router resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "PATCH", - "id": "compute.routers.patch", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchNamedSet": { - "description": "Patches Named Set", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/patchNamedSet", - "httpMethod": "POST", - "id": "compute.routers.patchNamedSet", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Named Set is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/patchNamedSet", - "request": { - "$ref": "NamedSet" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRoutePolicy": { - "description": "Patches Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.patchRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", - "request": { - "$ref": "RoutePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "preview": { - "description": "Preview fields auto-generated during router create andupdate operations.\nCalling this method does NOT create or update the router.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/preview", - "httpMethod": "POST", - "id": "compute.routers.preview", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/preview", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "RoutersPreviewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.routers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified Router resource with the data included in the\nrequest. This method conforms toPUT semantics, which requests that the state of the\ntarget resource be created or replaced with the state defined by the\nrepresentation enclosed in the request message payload.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "PUT", - "id": "compute.routers.update", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateNamedSet": { - "description": "Updates or creates new Named Set", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/updateNamedSet", - "httpMethod": "POST", - "id": "compute.routers.updateNamedSet", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Named Set is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/updateNamedSet", - "request": { - "$ref": "NamedSet" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateRoutePolicy": { - "description": "Updates or creates new Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.updateRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", - "request": { - "$ref": "RoutePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "routes": { - "methods": { - "delete": { - "description": "Deletes the specified Route resource.", - "flatPath": "projects/{project}/global/routes/{route}", - "httpMethod": "DELETE", - "id": "compute.routes.delete", - "parameterOrder": [ - "project", - "route" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "route": { - "description": "Name of the Route resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{route}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Route resource.", - "flatPath": "projects/{project}/global/routes/{route}", - "httpMethod": "GET", - "id": "compute.routes.get", - "parameterOrder": [ - "project", - "route" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "route": { - "description": "Name of the Route resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{route}", - "response": { - "$ref": "Route" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a Route resource in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/routes", - "httpMethod": "POST", - "id": "compute.routes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/routes", - "request": { - "$ref": "Route" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Route resources available to the specified project.", - "flatPath": "projects/{project}/global/routes", - "httpMethod": "GET", - "id": "compute.routes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/routes", - "response": { - "$ref": "RouteList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/routes/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.routes.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "securityPolicies": { - "methods": { - "addRule": { - "description": "Inserts a rule into a security policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.addRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all SecurityPolicy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/securityPolicies", - "httpMethod": "GET", - "id": "compute.securityPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/securityPolicies", - "response": { - "$ref": "SecurityPoliciesAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.securityPolicies.delete", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.securityPolicies.get", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.securityPolicies.getRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/global/securityPolicies", - "httpMethod": "POST", - "id": "compute.securityPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified project.", - "flatPath": "projects/{project}/global/securityPolicies", - "httpMethod": "GET", - "id": "compute.securityPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF)\nexpressions.", - "flatPath": "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets", - "httpMethod": "GET", - "id": "compute.securityPolicies.listPreconfiguredExpressionSets", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets", - "response": { - "$ref": "SecurityPoliciesListPreconfiguredExpressionSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request. To\nclear fields in the policy, leave the fields empty and specify them in the\nupdateMask. This cannot be used to be update the rules in the policy.\nPlease use the per rule methods like addRule, patchRule, and removeRule\ninstead.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.securityPolicies.patch", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority. To clear fields in the rule,\nleave the fields empty and specify them in the updateMask.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.patchRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.removeRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels,\nread the Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/global/securityPolicies/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.securityPolicies.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/securityPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.securityPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "serviceAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all ServiceAttachment resources,\nregional and global, available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/serviceAttachments", - "httpMethod": "GET", - "id": "compute.serviceAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/serviceAttachments", - "response": { - "$ref": "ServiceAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified ServiceAttachment in the given scope", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "DELETE", - "id": "compute.serviceAttachments.delete", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "serviceAttachment": { - "description": "Name of the ServiceAttachment resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified ServiceAttachment resource in the given scope.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "GET", - "id": "compute.serviceAttachments.get", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "serviceAttachment": { - "description": "Name of the ServiceAttachment resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "showNatIps": { - "description": "Indicates whether NAT IPs should be included in the response.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "response": { - "$ref": "ServiceAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.serviceAttachments.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ServiceAttachment in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments", - "httpMethod": "POST", - "id": "compute.serviceAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments", - "request": { - "$ref": "ServiceAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the ServiceAttachments for a project in the given scope.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments", - "httpMethod": "GET", - "id": "compute.serviceAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments", - "response": { - "$ref": "ServiceAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified ServiceAttachment resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "PATCH", - "id": "compute.serviceAttachments.patch", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region scoping this request and should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "serviceAttachment": { - "description": "The resource id of the ServiceAttachment to patch. It should conform to\nRFC1035 resource name or be a string form on an unsigned long number.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "request": { - "$ref": "ServiceAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.serviceAttachments.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.serviceAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshotGroups": { - "methods": { - "delete": { - "description": "Deletes the specified SnapshotGroup resource", - "flatPath": "projects/{project}/global/snapshotGroups/{snapshotGroup}", - "httpMethod": "DELETE", - "id": "compute.snapshotGroups.delete", - "parameterOrder": [ - "project", - "snapshotGroup" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshotGroup": { - "description": "Name of the SnapshotGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups/{snapshotGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "returns the specified SnapshotGroup resource.", - "flatPath": "projects/{project}/global/snapshotGroups/{snapshotGroup}", - "httpMethod": "GET", - "id": "compute.snapshotGroups.get", - "parameterOrder": [ - "project", - "snapshotGroup" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "snapshotGroup": { - "description": "Name of the SnapshotGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups/{snapshotGroup}", - "response": { - "$ref": "SnapshotGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/snapshotGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.snapshotGroups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a snapshot group in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/snapshotGroups", - "httpMethod": "POST", - "id": "compute.snapshotGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups", - "request": { - "$ref": "SnapshotGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "retrieves the list of SnapshotGroup resources contained within\nthe specified project.", - "flatPath": "projects/{project}/global/snapshotGroups", - "httpMethod": "GET", - "id": "compute.snapshotGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/snapshotGroups", - "response": { - "$ref": "ListSnapshotGroups" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/snapshotGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.snapshotGroups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/snapshotGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.snapshotGroups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshotSettings": { - "methods": { - "get": { - "description": "Get snapshot settings.", - "flatPath": "projects/{project}/global/snapshotSettings", - "httpMethod": "GET", - "id": "compute.snapshotSettings.get", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotSettings", - "response": { - "$ref": "SnapshotSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch snapshot settings.", - "flatPath": "projects/{project}/global/snapshotSettings", - "httpMethod": "PATCH", - "id": "compute.snapshotSettings.patch", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotSettings", - "request": { - "$ref": "SnapshotSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "snapshots": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the snapshots in your project\nacross all regions and global scope.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/snapshots", - "httpMethod": "GET", - "id": "compute.snapshots.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/snapshots", - "response": { - "$ref": "SnapshotAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting\na single snapshot might not necessarily delete all the data on that\nsnapshot. If any data on the snapshot that is marked for deletion is\nneeded for subsequent snapshots, the data will be moved to the next\ncorresponding snapshot.\n\nFor more information, seeDeleting\nsnapshots.", - "flatPath": "projects/{project}/global/snapshots/{snapshot}", - "httpMethod": "DELETE", - "id": "compute.snapshots.delete", - "parameterOrder": [ - "project", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{snapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Snapshot resource.", - "flatPath": "projects/{project}/global/snapshots/{snapshot}", - "httpMethod": "GET", - "id": "compute.snapshots.get", - "parameterOrder": [ - "project", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{snapshot}", - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/snapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.snapshots.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a snapshot in the specified project using the data included\nin the request. For regular snapshot creation, consider using this method\ninstead of disks.createSnapshot,\nas this method supports more features, such as creating snapshots in a\nproject different from the source disk project.", - "flatPath": "projects/{project}/global/snapshots", - "httpMethod": "POST", - "id": "compute.snapshots.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Snapshot resources contained within\nthe specified project.", - "flatPath": "projects/{project}/global/snapshots", - "httpMethod": "GET", - "id": "compute.snapshots.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/snapshots", - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/snapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.snapshots.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a snapshot. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.snapshots.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.snapshots.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "updateKmsKey": { - "description": "Rotates the customer-managed\nencryption key to the latest version for the specified snapshot.", - "flatPath": "projects/{project}/global/snapshots/{snapshot}/updateKmsKey", - "httpMethod": "POST", - "id": "compute.snapshots.updateKmsKey", - "parameterOrder": [ - "project", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the snapshot resource to update. Should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{snapshot}/updateKmsKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "sslCertificates": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all SslCertificate resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/sslCertificates", - "httpMethod": "GET", - "id": "compute.sslCertificates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/sslCertificates", - "response": { - "$ref": "SslCertificateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified SslCertificate resource.", - "flatPath": "projects/{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "id": "compute.sslCertificates.delete", - "parameterOrder": [ - "project", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{sslCertificate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified SslCertificate resource.", - "flatPath": "projects/{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "id": "compute.sslCertificates.get", - "parameterOrder": [ - "project", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{sslCertificate}", - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a SslCertificate resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/sslCertificates", - "httpMethod": "POST", - "id": "compute.sslCertificates.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates", - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/sslCertificates", - "httpMethod": "GET", - "id": "compute.sslCertificates.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslCertificates", - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.sslCertificates.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "sslPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all SslPolicy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/sslPolicies", - "httpMethod": "GET", - "id": "compute.sslPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/sslPolicies", - "response": { - "$ref": "SslPoliciesAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted\nonly if it is not in use by any TargetHttpsProxy or TargetSslProxy\nresources.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "DELETE", - "id": "compute.sslPolicies.delete", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to delete. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "GET", - "id": "compute.sslPolicies.get", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "response": { - "$ref": "SslPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Returns the specified SSL policy resource.", - "flatPath": "projects/{project}/global/sslPolicies", - "httpMethod": "POST", - "id": "compute.sslPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the SSL policies that have been configured for the specified\nproject.", - "flatPath": "projects/{project}/global/sslPolicies", - "httpMethod": "GET", - "id": "compute.sslPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslPolicies", - "response": { - "$ref": "SslPoliciesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using\ncustom profile.", - "flatPath": "projects/{project}/global/sslPolicies/listAvailableFeatures", - "httpMethod": "GET", - "id": "compute.sslPolicies.listAvailableFeatures", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslPolicies/listAvailableFeatures", - "response": { - "$ref": "SslPoliciesListAvailableFeaturesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "PATCH", - "id": "compute.sslPolicies.patch", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/sslPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.sslPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "storagePoolTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of storage pool types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/storagePoolTypes", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/storagePoolTypes", - "response": { - "$ref": "StoragePoolTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified storage pool type.", - "flatPath": "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.get", - "parameterOrder": [ - "project", - "zone", - "storagePoolType" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "storagePoolType": { - "description": "Name of the storage pool type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}", - "response": { - "$ref": "StoragePoolType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of storage pool types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/storagePoolTypes", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePoolTypes", - "response": { - "$ref": "StoragePoolTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "storagePools": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of storage pools.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/storagePools", - "httpMethod": "GET", - "id": "compute.storagePools.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/storagePools", - "response": { - "$ref": "StoragePoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified storage pool. Deleting a storagePool\nremoves its data permanently and is irreversible. However, deleting a\nstoragePool does not delete any snapshots previously\nmade from the storagePool. You must separately delete\nsnapshots.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "DELETE", - "id": "compute.storagePools.delete", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "storagePool": { - "description": "Name of the storage pool to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns a specified storage pool. Gets a list of available\nstorage pools by making a list() request.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "GET", - "id": "compute.storagePools.get", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "storagePool": { - "description": "Name of the storage pool to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "response": { - "$ref": "StoragePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.storagePools.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a storage pool in the specified project using the data\nin the request.", - "flatPath": "projects/{project}/zones/{zone}/storagePools", - "httpMethod": "POST", - "id": "compute.storagePools.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools", - "request": { - "$ref": "StoragePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of storage pools contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/storagePools", - "httpMethod": "GET", - "id": "compute.storagePools.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools", - "response": { - "$ref": "StoragePoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listDisks": { - "description": "Lists the disks in a specified storage pool.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks", - "httpMethod": "GET", - "id": "compute.storagePools.listDisks", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "storagePool": { - "description": "Name of the storage pool to list disks of.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks", - "response": { - "$ref": "StoragePoolListDisks" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.storagePools.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a storage pools. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.storagePools.setLabels", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/setLabels", - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.storagePools.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified storagePool with the data included in the request.\nThe update is performed only on selected fields included as part\nof update-mask. Only the following fields can be modified:\npool_provisioned_capacity_gb, pool_provisioned_iops and\npool_provisioned_throughput.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "PATCH", - "id": "compute.storagePools.update", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "storagePool": { - "description": "The storagePool name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "request": { - "$ref": "StoragePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "subnetworks": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of subnetworks.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/subnetworks", - "httpMethod": "GET", - "id": "compute.subnetworks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/aggregated/subnetworks", - "response": { - "$ref": "SubnetworkAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified subnetwork.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "DELETE", - "id": "compute.subnetworks.delete", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "expandIpCidrRange": { - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "httpMethod": "POST", - "id": "compute.subnetworks.expandIpCidrRange", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "request": { - "$ref": "SubnetworksExpandIpCidrRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified subnetwork.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "GET", - "id": "compute.subnetworks.get", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "response": { - "$ref": "Subnetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.subnetworks.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a subnetwork in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/subnetworks", - "httpMethod": "POST", - "id": "compute.subnetworks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks", - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of subnetworks available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/subnetworks", - "httpMethod": "GET", - "id": "compute.subnetworks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks", - "response": { - "$ref": "SubnetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves an aggregated list of all usable subnetworks in the project.", - "flatPath": "projects/{project}/aggregated/subnetworks/listUsable", - "httpMethod": "GET", - "id": "compute.subnetworks.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProject": { - "description": "The project id or project number in which the subnetwork is intended to be\nused. Only applied for Shared VPC. See [Shared VPC\ndocumentation](https://cloud.google.com/vpc/docs/shared-vpc/)", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/subnetworks/listUsable", - "response": { - "$ref": "UsableSubnetworksAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified subnetwork with the data included in the request.\nOnly certain fields can be updated with a patch request\nas indicated in the field descriptions.\nYou must specify the current fingerprint of the\nsubnetwork resource being patched.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "PATCH", - "id": "compute.subnetworks.patch", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "drainTimeoutSeconds": { - "description": "The drain timeout specifies the upper bound in seconds on the amount of\ntime allowed to drain connections from the current ACTIVE subnetwork\nto the current BACKUP subnetwork. The drain timeout is only applicable\nwhen the following conditions are true:\n - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER\n - the subnetwork being patched has role = BACKUP\n - the patch request is setting the role to ACTIVE. Note that after this\n patch operation the roles of the ACTIVE and BACKUP subnetworks will be\n swapped.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.subnetworks.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setPrivateIpGoogleAccess": { - "description": "Set whether VMs in this subnet can access Google services without assigning\nexternal IP addresses through Private Google Access.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "httpMethod": "POST", - "id": "compute.subnetworks.setPrivateIpGoogleAccess", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "request": { - "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.subnetworks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetGrpcProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetGrpcProxy in the given scope", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "DELETE", - "id": "compute.targetGrpcProxies.delete", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetGrpcProxy resource in the given scope.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "GET", - "id": "compute.targetGrpcProxies.get", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "response": { - "$ref": "TargetGrpcProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetGrpcProxy in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/targetGrpcProxies", - "httpMethod": "POST", - "id": "compute.targetGrpcProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies", - "request": { - "$ref": "TargetGrpcProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the TargetGrpcProxies for a project in the given scope.", - "flatPath": "projects/{project}/global/targetGrpcProxies", - "httpMethod": "GET", - "id": "compute.targetGrpcProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetGrpcProxies", - "response": { - "$ref": "TargetGrpcProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetGrpcProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "PATCH", - "id": "compute.targetGrpcProxies.patch", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "request": { - "$ref": "TargetGrpcProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetGrpcProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetHttpProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "id": "compute.targetHttpProxies.delete", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.get", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpProxy resource in the specified\nproject using the data included in the request.", - "flatPath": "projects/{project}/global/targetHttpProxies", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpProxy resources available\nto the specified project.", - "flatPath": "projects/{project}/global/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetHttpProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "PATCH", - "id": "compute.targetHttpProxies.patch", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpsProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "id": "compute.targetHttpsProxies.delete", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.get", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified\nproject using the data included in the request.", - "flatPath": "projects/{project}/global/targetHttpsProxies", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpsProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetHttpsProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.targetHttpsProxies.patch", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCertificateMap": { - "description": "Changes the Certificate Map for TargetHttpsProxy.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setCertificateMap", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose CertificateMap is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap", - "request": { - "$ref": "TargetHttpsProxiesSetCertificateMapRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setQuicOverride": { - "description": "Sets the QUIC override policy for TargetHttpsProxy.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setQuicOverride", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for.\nThe name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - "request": { - "$ref": "TargetHttpsProxiesSetQuicOverrideRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setSslCertificates", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set an\nSslCertificates resource for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "request": { - "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslPolicy": { - "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the\nserver-side support for SSL features. This affects connections between\nclients and the HTTPS proxy load balancer. They do not affect the\nconnection between the load balancer and the backends.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setSslPolicy", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose SSL policy is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy", - "request": { - "$ref": "SslPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", - "flatPath": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setUrlMap", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose URL map is\nto be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetInstances": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of target instances.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetInstances", - "httpMethod": "GET", - "id": "compute.targetInstances.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetInstances", - "response": { - "$ref": "TargetInstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetInstance resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "DELETE", - "id": "compute.targetInstances.delete", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetInstance resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "GET", - "id": "compute.targetInstances.get", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "response": { - "$ref": "TargetInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetInstance resource in the specified project and zone using\nthe data included in the request.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances", - "httpMethod": "POST", - "id": "compute.targetInstances.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances", - "request": { - "$ref": "TargetInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of TargetInstance resources available to the specified\nproject and zone.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances", - "httpMethod": "GET", - "id": "compute.targetInstances.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances", - "response": { - "$ref": "TargetInstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified target\ninstance. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.targetInstances.setSecurityPolicy", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetInstances.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetPools": { - "methods": { - "addHealthCheck": { - "description": "Adds health check URLs to a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "httpMethod": "POST", - "id": "compute.targetPools.addHealthCheck", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the target pool to add a health check to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "request": { - "$ref": "TargetPoolsAddHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addInstance": { - "description": "Adds an instance to a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "httpMethod": "POST", - "id": "compute.targetPools.addInstance", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to add instances to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "request": { - "$ref": "TargetPoolsAddInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of target pools.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetPools", - "httpMethod": "GET", - "id": "compute.targetPools.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetPools", - "response": { - "$ref": "TargetPoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "DELETE", - "id": "compute.targetPools.delete", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "GET", - "id": "compute.targetPools.get", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "response": { - "$ref": "TargetPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for each IP for the\ninstance that is referenced by the given target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "httpMethod": "POST", - "id": "compute.targetPools.getHealth", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to which the queried instance belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "request": { - "$ref": "InstanceReference" - }, - "response": { - "$ref": "TargetPoolInstanceHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a target pool in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetPools", - "httpMethod": "POST", - "id": "compute.targetPools.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools", - "request": { - "$ref": "TargetPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of target pools available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/targetPools", - "httpMethod": "GET", - "id": "compute.targetPools.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetPools", - "response": { - "$ref": "TargetPoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeHealthCheck": { - "description": "Removes health check URL from a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "httpMethod": "POST", - "id": "compute.targetPools.removeHealthCheck", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the target pool to remove health checks from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "request": { - "$ref": "TargetPoolsRemoveHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeInstance": { - "description": "Removes instance URL from a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "httpMethod": "POST", - "id": "compute.targetPools.removeInstance", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to remove instances from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "request": { - "$ref": "TargetPoolsRemoveInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setBackup": { - "description": "Changes a backup target pool's configurations.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "httpMethod": "POST", - "id": "compute.targetPools.setBackup", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "failoverRatio": { - "description": "New failoverRatio value for the target pool.", - "format": "float", - "location": "query", - "type": "number" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to set a backup pool for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified target pool.\nFor more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.targetPools.setSecurityPolicy", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetPools.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetSslProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetSslProxy resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "DELETE", - "id": "compute.targetSslProxies.delete", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetSslProxy resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "GET", - "id": "compute.targetSslProxies.get", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "response": { - "$ref": "TargetSslProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetSslProxy resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/targetSslProxies", - "httpMethod": "POST", - "id": "compute.targetSslProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies", - "request": { - "$ref": "TargetSslProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetSslProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetSslProxies", - "httpMethod": "GET", - "id": "compute.targetSslProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetSslProxies", - "response": { - "$ref": "TargetSslProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "description": "Changes the BackendService for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setBackendService", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose BackendService resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "request": { - "$ref": "TargetSslProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCertificateMap": { - "description": "Changes the Certificate Map for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setCertificateMap", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose CertificateMap is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap", - "request": { - "$ref": "TargetSslProxiesSetCertificateMapRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setProxyHeader", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "request": { - "$ref": "TargetSslProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Changes SslCertificates for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setSslCertificates", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose SslCertificate resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "request": { - "$ref": "TargetSslProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslPolicy": { - "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the\nserver-side support for SSL features. This affects connections between\nclients and the load balancer. They do not affect the\nconnection between the load balancer and the backends.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setSslPolicy", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose SSL policy is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy", - "request": { - "$ref": "SslPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetSslProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetTcpProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetTcpProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "id": "compute.targetTcpProxies.delete", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.get", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/targetTcpProxies", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies", - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetTcpProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "description": "Changes the BackendService for TargetTcpProxy.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.setBackendService", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource whose BackendService resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "request": { - "$ref": "TargetTcpProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.setProxyHeader", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "request": { - "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetVpnGateways": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of target VPN gateways.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetVpnGateways", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetVpnGateways", - "response": { - "$ref": "TargetVpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified target VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "DELETE", - "id": "compute.targetVpnGateways.delete", - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetVpnGateway": { - "description": "Name of the target VPN gateway to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified target VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.get", - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetVpnGateway": { - "description": "Name of the target VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "response": { - "$ref": "TargetVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a target VPN gateway in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways", - "request": { - "$ref": "TargetVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of target VPN gateways available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways", - "response": { - "$ref": "TargetVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "urlMaps": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all UrlMap resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/urlMaps", - "httpMethod": "GET", - "id": "compute.urlMaps.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/urlMaps", - "response": { - "$ref": "UrlMapsAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified UrlMap resource.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "id": "compute.urlMaps.delete", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified UrlMap resource.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "GET", - "id": "compute.urlMaps.get", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a UrlMap resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/urlMaps", - "httpMethod": "POST", - "id": "compute.urlMaps.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path,\nscoped to the specified UrlMap.\n\nFor more information, see [Invalidating cached\ncontent](/cdn/docs/invalidating-cached-content).", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "id": "compute.urlMaps.invalidateCache", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}/invalidateCache", - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of UrlMap resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/urlMaps", - "httpMethod": "GET", - "id": "compute.urlMaps.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/urlMaps", - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified UrlMap resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "id": "compute.urlMaps.patch", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.urlMaps.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified UrlMap resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "PUT", - "id": "compute.urlMaps.update", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the\nprovided UrlMap will be run. Calling this method does NOT create the\nUrlMap.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "id": "compute.urlMaps.validate", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to be validated as.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}/validate", - "request": { - "$ref": "UrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "vpnGateways": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of VPN gateways.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vpnGateways", - "httpMethod": "GET", - "id": "compute.vpnGateways.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vpnGateways", - "response": { - "$ref": "VpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "httpMethod": "DELETE", - "id": "compute.vpnGateways.delete", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "httpMethod": "GET", - "id": "compute.vpnGateways.get", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "response": { - "$ref": "VpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getStatus": { - "description": "Returns the status for the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", - "httpMethod": "GET", - "id": "compute.vpnGateways.getStatus", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", - "response": { - "$ref": "VpnGatewaysGetStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a VPN gateway in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways", - "httpMethod": "POST", - "id": "compute.vpnGateways.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways", - "request": { - "$ref": "VpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of VPN gateways available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways", - "httpMethod": "GET", - "id": "compute.vpnGateways.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways", - "response": { - "$ref": "VpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a VpnGateway. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.vpnGateways.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.vpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "vpnTunnels": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of VPN tunnels.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vpnTunnels", - "httpMethod": "GET", - "id": "compute.vpnTunnels.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vpnTunnels", - "response": { - "$ref": "VpnTunnelAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified VpnTunnel resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "DELETE", - "id": "compute.vpnTunnels.delete", - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vpnTunnel": { - "description": "Name of the VpnTunnel resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified VpnTunnel resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "GET", - "id": "compute.vpnTunnels.get", - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnTunnel": { - "description": "Name of the VpnTunnel resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "response": { - "$ref": "VpnTunnel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a VpnTunnel resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels", - "httpMethod": "POST", - "id": "compute.vpnTunnels.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels", - "request": { - "$ref": "VpnTunnel" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of VpnTunnel resources contained in the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels", - "httpMethod": "GET", - "id": "compute.vpnTunnels.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels", - "response": { - "$ref": "VpnTunnelList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a VpnTunnel. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.vpnTunnels.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.vpnTunnels.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "wireGroups": { - "methods": { - "delete": { - "description": "Deletes the specified wire group in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "DELETE", - "id": "compute.wireGroups.delete", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "wireGroup": { - "description": "Name of the wire group resource to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets the specified wire group resource in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "GET", - "id": "compute.wireGroups.get", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "wireGroup": { - "description": "Name of the wire group resource to return.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "response": { - "$ref": "WireGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a wire group in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "httpMethod": "POST", - "id": "compute.wireGroups.insert", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "request": { - "$ref": "WireGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the wire groups for a project in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "httpMethod": "GET", - "id": "compute.wireGroups.list", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "response": { - "$ref": "WireGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified wire group resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "PATCH", - "id": "compute.wireGroups.patch", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it.", - "location": "query", - "type": "boolean" - }, - "wireGroup": { - "description": "Name of the WireGroups resource to patch.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "request": { - "$ref": "WireGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "zoneFolderOperations": { - "methods": { - "get": { - "description": "Retrieves the specified Operations resource.", - "flatPath": "folders/{foldersId}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.zoneFolderOperations.get", - "parameterOrder": [ - "folder", - "zone", - "operation" - ], - "parameters": { - "folder": { - "description": "Folder ID for this request.", - "location": "path", - "pattern": "folders/[0-9]{0,20}", - "required": true, - "type": "string" - }, - "operation": { - "description": "Name of the Operations resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{+folder}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\nfolder.", - "flatPath": "folders/{foldersId}/zones/{zone}/operations", - "httpMethod": "GET", - "id": "compute.zoneFolderOperations.list", - "parameterOrder": [ - "folder", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "folder": { - "description": "Folder ID for this request.", - "location": "path", - "pattern": "folders/[0-9]{0,20}", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{+folder}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneOperations": { - "methods": { - "delete": { - "description": "Deletes the specified zone-specific Operations resource.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.zoneOperations.delete", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified zone-specific Operations resource.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.zoneOperations.get", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/operations", - "httpMethod": "GET", - "id": "compute.zoneOperations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method waits for no more than the\n2 minutes and then returns the current state of the\noperation, which might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.zoneOperations.wait", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneOrganizationOperations": { - "methods": { - "get": { - "description": "Retrieves the specified Operations resource.", - "flatPath": "organizations/{organizationsId}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.zoneOrganizationOperations.get", - "parameterOrder": [ - "organization", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return. Parent is derived from this\nfield.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "organization": { - "description": "Organization ID for this request.", - "location": "path", - "pattern": "organizations/[0-9]{0,20}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{+organization}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\norganization.", - "flatPath": "organizations/{organizationsId}/zones/{zone}/operations", - "httpMethod": "GET", - "id": "compute.zoneOrganizationOperations.list", - "parameterOrder": [ - "organization", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "organization": { - "description": "Organization ID for this request.", - "location": "path", - "pattern": "^organizations/[^/]+$", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "{+organization}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneQueuedResources": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the queued resources in a project\nacross all zones.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/queuedResources", - "httpMethod": "GET", - "id": "compute.zoneQueuedResources.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/queuedResources", - "response": { - "$ref": "QueuedResourcesAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "cancel": { - "description": "Cancels a QueuedResource. Only a resource in ACCEPTED state may be\ncancelled.", - "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/cancel", - "httpMethod": "POST", - "id": "compute.zoneQueuedResources.cancel", - "parameterOrder": [ - "project", - "zone", - "queuedResource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "queuedResource": { - "description": "Name of the QueuedResource to cancel.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with\nthe exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes a QueuedResource. For a QueuedResource in ACCEPTED state, call\ncancel on the resource before deleting, to make sure no VMs have been\nprovisioned and may require cleaning up. For a QueuedResource in\nPROVISIONING state the request to delete is registered for execution\nfollowing the provisioning.", - "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", - "httpMethod": "DELETE", - "id": "compute.zoneQueuedResources.delete", - "parameterOrder": [ - "project", - "zone", - "queuedResource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "queuedResource": { - "description": "Name of the QueuedResource to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with\nthe exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified QueuedResource resource.", - "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", - "httpMethod": "GET", - "id": "compute.zoneQueuedResources.get", - "parameterOrder": [ - "project", - "zone", - "queuedResource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "queuedResource": { - "description": "Name of the QueuedResource resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", - "response": { - "$ref": "QueuedResource" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a QueuedResource.", - "flatPath": "projects/{project}/zones/{zone}/queuedResources", - "httpMethod": "POST", - "id": "compute.zoneQueuedResources.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with\nthe exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/queuedResources", - "request": { - "$ref": "QueuedResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of QueuedResource resources.", - "flatPath": "projects/{project}/zones/{zone}/queuedResources", - "httpMethod": "GET", - "id": "compute.zoneQueuedResources.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/queuedResources", - "response": { - "$ref": "QueuedResourceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneVmExtensionPolicies": { - "methods": { - "delete": { - "description": "Deletes a specified zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "DELETE", - "id": "compute.zoneVmExtensionPolicies.delete", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the zone VM extension policy to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves details of a specific zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "GET", - "id": "compute.zoneVmExtensionPolicies.get", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the VM extension policy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "response": { - "$ref": "VmExtensionPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new zone-level VM extension policy within a project.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "httpMethod": "POST", - "id": "compute.zoneVmExtensionPolicies.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "request": { - "$ref": "VmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all VM extension policies within a specific zone for a project.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.zoneVmExtensionPolicies.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "response": { - "$ref": "VmExtensionPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Modifies an existing zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "PATCH", - "id": "compute.zoneVmExtensionPolicies.update", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the zone VM extension policy to update.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "request": { - "$ref": "VmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "zones": { - "methods": { - "get": { - "description": "Returns the specified Zone resource.", - "flatPath": "projects/{project}/zones/{zone}", - "httpMethod": "GET", - "id": "compute.zones.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}", - "response": { - "$ref": "Zone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of Zone resources available to the specified project.", - "flatPath": "projects/{project}/zones", - "httpMethod": "GET", - "id": "compute.zones.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/zones", - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - } - }, - "revision": "20251110", - "rootUrl": "https://compute.googleapis.com/", - "schemas": { - "AWSV4Signature": { - "description": "Contains the configurations necessary to generate a signature for access to\nprivate storage buckets that support Signature Version 4 for authentication.\nThe service name for generating the authentication header will always default\nto 's3'.", - "id": "AWSV4Signature", - "properties": { - "accessKey": { - "description": "The access key used for s3 bucket authentication. Required for updating or\ncreating a backend that uses AWS v4 signature authentication, but will not\nbe returned as part of the configuration when queried with a REST API GET\nrequest.\n\n@InputOnly", - "type": "string" - }, - "accessKeyId": { - "description": "The identifier of an access key used for s3 bucket authentication.", - "type": "string" - }, - "accessKeyVersion": { - "description": "The optional version identifier for the access key. You can use this to\nkeep track of different iterations of your access key.", - "type": "string" - }, - "originRegion": { - "description": "The name of the cloud region of your origin. This is a free-form field with\nthe name of the region your cloud uses to host your origin. For example,\n\"us-east-1\" for AWS or \"us-ashburn-1\" for OCI.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorConfig": { - "description": "A specification of the type and number of accelerator cards attached to the\ninstance.", - "id": "AcceleratorConfig", - "properties": { - "acceleratorCount": { - "description": "The number of the guest accelerator cards exposed to this instance.", - "format": "int32", - "type": "integer" - }, - "acceleratorType": { - "description": "Full or partial URL of the accelerator type resource to attach to this\ninstance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100\nIf you are creating an instance template, specify only the\naccelerator name.\nSee GPUs on Compute Engine\nfor a full list of accelerator types.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfo": { - "description": "Info for accelerator topologies within a densely packed reservation.", - "id": "AcceleratorTopologiesInfo", - "properties": { - "acceleratorTopologyInfos": { - "description": "Info for each accelerator topology.", - "items": { - "$ref": "AcceleratorTopologiesInfoAcceleratorTopologyInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfoAcceleratorTopologyInfo": { - "description": "Info for a slice of a given topology.", - "id": "AcceleratorTopologiesInfoAcceleratorTopologyInfo", - "properties": { - "acceleratorTopology": { - "description": "The accelerator topology.", - "type": "string" - }, - "infoPerTopologyStates": { - "description": "Info for each topology state.", - "items": { - "$ref": "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState" - }, - "type": "array" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState": { - "description": "Info for each topology state.", - "id": "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", - "properties": { - "count": { - "description": "The number of accelerator topologies in this state.", - "format": "int32", - "type": "integer" - }, - "state": { - "description": "The state of the accelerator topology.", - "enum": [ - "AVAILABLE", - "RUNNING", - "TOPOLOGY_STATE_UNSPECIFIED", - "UNHEALTHY" - ], - "enumDescriptions": [ - "The accelerator topology is available.", - "The accelerator topology is running.", - "The state of the topology is unspecified.", - "The accelerator topology is unhealthy." - ], - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorType": { - "description": "Represents an Accelerator Type resource.\n\nGoogle Cloud Platform provides graphics processing units (accelerators) that\nyou can add to VM instances to improve or accelerate performance when working\nwith intensive workloads. For more information, readGPUs on Compute Engine.", - "id": "AcceleratorType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this accelerator type." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#acceleratorType", - "description": "[Output Only] The type of the resource. Alwayscompute#acceleratorType for accelerator types.", - "type": "string" - }, - "maximumCardsPerInstance": { - "description": "[Output Only] Maximum number of accelerator cards allowed per instance.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined, fully qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the accelerator type resides,\nsuch as us-central1-a.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorTypeAggregatedList": { - "id": "AcceleratorTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AcceleratorTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of accelerator types." - }, - "description": "A list of AcceleratorTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#acceleratorTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#acceleratorTypeAggregatedList for aggregated lists of\naccelerator types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AcceleratorTypeList": { - "description": "Contains a list of accelerator types.", - "id": "AcceleratorTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of AcceleratorType resources.", - "items": { - "$ref": "AcceleratorType" - }, - "type": "array" - }, - "kind": { - "default": "compute#acceleratorTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#acceleratorTypeList for lists of accelerator types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AcceleratorTypesScopedList": { - "id": "AcceleratorTypesScopedList", - "properties": { - "acceleratorTypes": { - "description": "[Output Only] A list of accelerator types contained in this scope.", - "items": { - "$ref": "AcceleratorType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the accelerator\ntypes list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AccessConfig": { - "description": "An access configuration attached to an instance's network interface.\nOnly one access config per instance is supported.", - "id": "AccessConfig", - "properties": { - "externalIpv6": { - "description": "Applies to ipv6AccessConfigs only.\nThe first IPv6 address of the external IPv6 range associated\nwith this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To\nuse a static external IP address, it must be unused and in the same region\nas the instance's zone. If not specified, Google Cloud will automatically\nassign an external IPv6 address from the instance's subnetwork.", - "type": "string" - }, - "externalIpv6PrefixLength": { - "description": "Applies to ipv6AccessConfigs only. The prefix length of the\nexternal IPv6 range.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#accessConfig", - "description": "[Output Only] Type of the resource. Alwayscompute#accessConfig for access configs.", - "type": "string" - }, - "name": { - "description": "The name of this access configuration. In accessConfigs\n(IPv4), the default and recommended name is External NAT, but\nyou can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the\nrecommend name is External IPv6.", - "type": "string" - }, - "natIP": { - "description": "Applies to accessConfigs (IPv4) only. Anexternal IP\naddress associated with this instance. Specify an unused static\nexternal IP address available to the project or leave this field undefined\nto use an IP from a shared ephemeral IP address pool. If you specify a\nstatic external IP address, it must live in the same region as the zone of\nthe instance.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring this access\nconfiguration and can only take the following values: PREMIUM,STANDARD.\n\nIf an AccessConfig is specified without a valid external IP address, an\nephemeral IP will be created with this networkTier.\n\nIf an AccessConfig with a valid external IP address is specified, it must\nmatch that of the networkTier associated with the Address resource owning\nthat IP.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "publicDnsName": { - "description": "[Output Only] The public DNS domain name for the instance.", - "type": "string" - }, - "publicPtrDomainName": { - "description": "The DNS domain name for the public PTR record.\n\nYou can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for\nfirst IP in associated external IPv6 range.", - "type": "string" - }, - "securityPolicy": { - "description": "The resource URL for the security policy associated with this access\nconfig.", - "type": "string" - }, - "setPublicDns": { - "description": "Specifies whether a public DNS 'A' record should be created for the\nexternal IP address of this access configuration.", - "type": "boolean" - }, - "setPublicPtr": { - "description": "Specifies whether a public DNS 'PTR' record should be created to map the\nexternal IP address of the instance to a DNS domain name.\n\nThis field is not used in ipv6AccessConfig. A default PTR\nrecord will be created if the VM has external IPv6 range associated.", - "type": "boolean" - }, - "type": { - "description": "The type of configuration. In accessConfigs (IPv4), the\ndefault and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option isDIRECT_IPV6.", - "enum": [ - "DIRECT_IPV6", - "ONE_TO_ONE_NAT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Address": { - "description": "Represents an IP Address resource.\n\nGoogle Compute Engine has two IP Address resources:\n\n* [Global (external and\ninternal)](https://cloud.google.com/compute/docs/reference/rest/alpha/globalAddresses)\n* [Regional (external and\ninternal)](https://cloud.google.com/compute/docs/reference/rest/alpha/addresses)\n\nFor more information, see\nReserving a static external IP address.", - "id": "Address", - "properties": { - "address": { - "description": "The static IP address represented by this resource.", - "type": "string" - }, - "addressType": { - "description": "The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL.", - "enum": [ - "DNS_FORWARDING", - "EXTERNAL", - "INTERNAL", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "DNS resolver address in the subnetwork.", - "A publicly visible external IP address.", - "A private network IP address, for use with an Instance or Internal Load\nBalancer forwarding rule.", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipCollection": { - "description": "Reference to the source of external IPv4 addresses,\nlike a PublicDelegatedPrefix (PDP) for BYOIP.\nThe PDP must support enhanced IPv4 allocations.\n\nUse one of the following formats to specify a PDP when reserving an\nexternal IPv4 address using BYOIP.\n \n - \n Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name\n - \n Partial URL, as in\n \n \n - projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name\n - regions/region/publicDelegatedPrefixes/pdp-name", - "type": "string" - }, - "ipVersion": { - "description": "The IP version that will be used by this address. Valid options areIPV4 or IPV6.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "ipv6EndpointType": { - "description": "The endpoint type of this address, which should be VM\nor NETLB. This is used for deciding which type of endpoint\nthis address can be used after the external IPv6 address reservation.", - "enum": [ - "NETLB", - "VM" - ], - "enumDescriptions": [ - "Reserved IPv6 address can be used on network load balancer.", - "Reserved IPv6 address can be used on VM." - ], - "type": "string" - }, - "kind": { - "default": "compute#address", - "description": "[Output Only] Type of the resource. Always compute#address for\naddresses.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this Address, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an Address.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.addresses.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character\nmust be a lowercase letter, and all following characters (except for the\nlast character) must be a dash, lowercase letter, or digit. The last\ncharacter must be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network in which to reserve the address. This field can\nonly be used with INTERNAL type with theVPC_PEERING purpose.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring this address and\ncan only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier;\nglobal external IP addresses are always Premium Tier; regional external IP\naddresses can be either Standard or Premium Tier.\n\nIf this field is not specified, it is assumed to be PREMIUM.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "prefixLength": { - "description": "The prefix length if the resource represents an IP range.", - "format": "int32", - "type": "integer" - }, - "purpose": { - "description": "The purpose of this resource, which can be one of the following values:\n \n \n - GCE_ENDPOINT for addresses that are used by VM\n instances, alias IP ranges, load balancers, and similar resources.\n - DNS_RESOLVER for a DNS resolver address in a subnetwork\n for a Cloud DNS inbound\n forwarder IP addresses (regional internal IP address in a subnet of\n a VPC network)\n - VPC_PEERING for global internal IP addresses used for\n \n private services access allocated ranges.\n - NAT_AUTO for the regional external IP addresses used by\n Cloud NAT when allocating addresses using\n \n automatic NAT IP address allocation.\n - IPSEC_INTERCONNECT for addresses created from a private\n IP range that are reserved for a VLAN attachment in an\n *HA VPN over Cloud Interconnect* configuration. These addresses\n are regional resources.\n - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned\n to multiple internal forwarding rules.\n - `PRIVATE_SERVICE_CONNECT` for a private network address that is\n used to configure Private Service Connect. Only global internal addresses\n can use this purpose.", - "enum": [ - "APPLICATION_AND_PROXY_LOAD_BALANCERS", - "DNS_RESOLVER", - "GCE_ENDPOINT", - "IPSEC_INTERCONNECT", - "NAT_AUTO", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS", - "SHARED_LOADBALANCER_VIP", - "SYSTEM_MANAGED", - "VPC_PEERING" - ], - "enumDescriptions": [ - "The global external address can only be assigned to Global External\nApplication or Proxy Load Balancer forwarding rules. This is the default\nvalue for global external addresses.", - "DNS resolver address in the subnetwork.", - "VM internal/alias IP, Internal LB service IP, etc.", - "A regional internal IP address range reserved for the VLAN attachment\nthat is used in HA VPN over Cloud Interconnect. This regional\ninternal IP address range must not overlap with any IP address range\nof subnet/route in the VPC network and its peering networks. After the\nVLAN attachment is created with the reserved IP address range, when\ncreating a new VPN gateway, its interface IP address is allocated\nfrom the associated VLAN attachment’s IP address range.", - "External IP automatically reserved for Cloud NAT.", - "The global external address can only be assigned to Global External\nPassthrough Network Load Balancer forwarding rules, as an Availability\nGroup 0 address.", - "The global external address can only be assigned to Global External\nPassthrough Network Load Balancer forwarding rules, as an Availability\nGroup 1 address.", - "A private network IP address that can be used to configure Private\nService Connect. This purpose can be specified only forGLOBAL addresses of Type INTERNAL", - "A regional internal IP address range reserved for Serverless.", - "A private network IP address that can be shared by multiple Internal\nLoad Balancer forwarding rules.", - "A regional internal IP address that is reserved and managed by Google\nCloud. It can not be assigned to Google Cloud compute resources such as\nVM and internal load balancer.", - "IP range for peer networks." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of the region where a regional address resides.\nFor regional addresses, you must specify the region as a path parameter in\nthe HTTP request URL. *This field is not applicable to global\naddresses.*", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the address, which can be one ofRESERVING, RESERVED, or IN_USE.\nAn address that is RESERVING is currently in the process of\nbeing reserved. A RESERVED address is currently reserved and\navailable to use. An IN_USE address is currently being used\nby another resource and is not available.", - "enum": [ - "IN_USE", - "RESERVED", - "RESERVING" - ], - "enumDescriptions": [ - "Address is being used by another resource and is not available.", - "Address is reserved and available to use.", - "Address is being reserved." - ], - "type": "string" - }, - "subnetwork": { - "description": "The URL of the subnetwork in which to reserve the address. If an IP address\nis specified, it must be within the subnetwork's IP range. This field can\nonly be used with INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose.", - "type": "string" - }, - "users": { - "description": "[Output Only] The URLs of the resources that are using this address.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AddressAggregatedList": { - "id": "AddressAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AddressesScopedList", - "description": "[Output Only] Name of the scope containing this set of addresses." - }, - "description": "A list of AddressesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#addressAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#addressAggregatedList for aggregated lists of\naddresses.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AddressList": { - "description": "Contains a list of addresses.", - "id": "AddressList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Address resources.", - "items": { - "$ref": "Address" - }, - "type": "array" - }, - "kind": { - "default": "compute#addressList", - "description": "[Output Only] Type of resource. Always compute#addressList for\nlists of addresses.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AddressesScopedList": { - "id": "AddressesScopedList", - "properties": { - "addresses": { - "description": "[Output Only] A list of addresses contained in this scope.", - "items": { - "$ref": "Address" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AdvancedMachineFeatures": { - "description": "Specifies options for controlling advanced machine features.\nOptions that would traditionally be configured in a BIOS belong\nhere. Features that require operating system support may have\ncorresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or\ndisabled).", - "id": "AdvancedMachineFeatures", - "properties": { - "enableNestedVirtualization": { - "description": "Whether to enable nested virtualization or not (default is false).", - "type": "boolean" - }, - "enableUefiNetworking": { - "description": "Whether to enable UEFI networking for instance creation.", - "type": "boolean" - }, - "enableWatchdogTimer": { - "description": "Whether to enable the watchdog timer.", - "type": "boolean" - }, - "numaNodeCount": { - "description": "The number of vNUMA nodes.", - "format": "int32", - "type": "integer" - }, - "performanceMonitoringUnit": { - "description": "Type of Performance Monitoring Unit requested on instance.", - "enum": [ - "ARCHITECTURAL", - "ENHANCED", - "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "Architecturally defined non-LLC events.", - "Most documented core/L2 and LLC events.", - "", - "Most documented core/L2 events." - ], - "type": "string" - }, - "threadsPerCore": { - "description": "The number of threads per physical core. To disable simultaneous\nmultithreading (SMT) set this to 1. If unset, the maximum number\nof threads supported per core by the underlying processor is\nassumed.", - "format": "int32", - "type": "integer" - }, - "turboMode": { - "description": "Turbo frequency mode to use for the instance.\nSupported modes include:\n* ALL_CORE_MAX\n\nUsing empty string or not setting this field will use the platform-specific\ndefault turbo mode.", - "type": "string" - }, - "visibleCoreCount": { - "description": "The number of physical cores to expose to an instance. Multiply by\nthe number of threads per core to compute the total number of virtual\nCPUs to expose to the instance. If unset, the number of cores is\ninferred from the instance's nominal CPU count and the underlying\nplatform's SMT width.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AliasIpRange": { - "description": "An alias IP range attached to an instance's network interface.", - "id": "AliasIpRange", - "properties": { - "ipCidrRange": { - "description": "The IP alias ranges to allocate for this interface. This IP CIDR range\nmust belong to the specified subnetwork and cannot contain IP addresses\nreserved by system or used by other network interfaces. This range may be\na single IP address (such as 10.2.3.4), a netmask (such as/24) or a CIDR-formatted string (such as10.1.2.0/24).", - "type": "string" - }, - "subnetworkRangeName": { - "description": "The name of a subnetwork secondary IP range from which to allocate an IP\nalias range. If not specified, the primary range of the subnetwork is used.", - "type": "string" - } - }, - "type": "object" - }, - "AllocationAggregateReservation": { - "description": "This reservation type is specified by total resource amounts (e.g. total\ncount of CPUs) and can account for multiple instance SKUs. In other words,\none can create instances of varying shapes against this reservation.", - "id": "AllocationAggregateReservation", - "properties": { - "hostCount": { - "description": "Count of reserved hosts of specified VM family. The host has fixed number\nof accelerators based on the accelerator/vm-family selected.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances\nrunning on the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "inUseInstanceCount": { - "description": "Number of instances currently in use in this reservation.", - "format": "int32", - "type": "integer" - }, - "inUseResources": { - "description": "[Output only] List of resources currently in use.", - "items": { - "$ref": "AllocationAggregateReservationReservedResourceInfo" - }, - "type": "array" - }, - "reservedResources": { - "description": "List of reserved resources (CPUs, memory, accelerators).", - "items": { - "$ref": "AllocationAggregateReservationReservedResourceInfo" - }, - "type": "array" - }, - "vmFamily": { - "description": "The VM family that all instances scheduled against this reservation must\nbelong to.", - "enum": [ - "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", - "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "workloadType": { - "description": "The workload type of the instances that will target this reservation.", - "enum": [ - "BATCH", - "SERVING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Reserved resources will be optimized for BATCH workloads, such as ML\ntraining.", - "Reserved resources will be optimized for SERVING workloads, such as ML\ninference.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationAggregateReservationReservedResourceInfo": { - "id": "AllocationAggregateReservationReservedResourceInfo", - "properties": { - "accelerator": { - "$ref": "AllocationAggregateReservationReservedResourceInfoAccelerator", - "description": "Properties of accelerator resources in this reservation." - } - }, - "type": "object" - }, - "AllocationAggregateReservationReservedResourceInfoAccelerator": { - "id": "AllocationAggregateReservationReservedResourceInfoAccelerator", - "properties": { - "acceleratorCount": { - "description": "Number of accelerators of specified type.", - "format": "int32", - "type": "integer" - }, - "acceleratorType": { - "description": "Full or partial URL to accelerator type. e.g.\n\"projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l\"", - "type": "string" - } - }, - "type": "object" - }, - "AllocationReservationSharingPolicy": { - "id": "AllocationReservationSharingPolicy", - "properties": { - "serviceShareType": { - "description": "Sharing config for all Google Cloud services.", - "enum": [ - "ALLOW_ALL", - "DISALLOW_ALL", - "SERVICE_SHARE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Allow all Google Cloud managed services to share reservations.", - "[Default] Disallow sharing with all Google Cloud services.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "AllocationResourceStatus", - "properties": { - "aggregateAllocation": { - "$ref": "AllocationResourceStatusAggregateAllocation", - "description": "Properties of this aggregatereservation." - }, - "healthInfo": { - "$ref": "AllocationResourceStatusHealthInfo", - "description": "[Output only] Health information for the reservation." - }, - "reservationBlockCount": { - "description": "The number of reservation blocks associated with this reservation.", - "format": "int32", - "type": "integer" - }, - "reservationMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "Maintenance information for this reservation" - }, - "specificSkuAllocation": { - "$ref": "AllocationResourceStatusSpecificSKUAllocation", - "description": "Allocation Properties of this reservation." - } - }, - "type": "object" - }, - "AllocationResourceStatusAggregateAllocation": { - "description": "Contains Properties set for the aggregate reservation.", - "id": "AllocationResourceStatusAggregateAllocation", - "properties": { - "utilizations": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Per service utilization breakdown. The Key is the Google Cloud managed\nservice name.", - "type": "object" - } - }, - "type": "object" - }, - "AllocationResourceStatusHealthInfo": { - "description": "Health information for the reservation.", - "id": "AllocationResourceStatusHealthInfo", - "properties": { - "degradedBlockCount": { - "description": "The number of reservation blocks that are degraded.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation is degraded.", - "The reservation is healthy.", - "The health status of the reservation is unspecified." - ], - "type": "string" - }, - "healthyBlockCount": { - "description": "The number of reservation blocks that are healthy.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AllocationResourceStatusSpecificSKUAllocation": { - "description": "Contains Properties set for the reservation.", - "id": "AllocationResourceStatusSpecificSKUAllocation", - "properties": { - "sourceInstanceTemplateId": { - "description": "ID of the instance template used to populate reservation properties.", - "type": "string" - }, - "utilizations": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Per service utilization breakdown. The Key is the Google Cloud managed\nservice name.", - "type": "object" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk": { - "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", - "properties": { - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int64", - "type": "string" - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME. The default isSCSI.\nFor performance characteristics of SCSI over NVMe, seeLocal SSD performance.", - "enum": [ - "NVDIMM", - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationReservedInstanceProperties": { - "description": "Properties of the SKU instances being reserved.\nNext ID: 9", - "id": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "properties": { - "guestAccelerators": { - "description": "Specifies accelerator type and count.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "localSsds": { - "description": "Specifies amount of local ssd to reserve with each instance. The type\nof disk is local-ssd.", - "items": { - "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the allocation close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "machineType": { - "description": "Specifies type of machine (name only) which has fixed number of vCPUs\nand fixed amount of memory. This also includes specifying custom\nmachine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", - "type": "string" - }, - "maintenanceFreezeDurationHours": { - "description": "Specifies the number of hours after reservation creation where\ninstances using the reservation won't be scheduled for maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted\nvalues are: `PERIODIC`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "minCpuPlatform": { - "description": "Minimum cpu platform the reservation.", - "type": "string" - } - }, - "type": "object" - }, - "AllocationSpecificSKUReservation": { - "description": "This reservation type allows to pre allocate specific instance\n configuration.", - "id": "AllocationSpecificSKUReservation", - "properties": { - "assuredCount": { - "description": "[Output Only] Indicates how many instances are actually usable currently.", - "format": "int64", - "type": "string" - }, - "count": { - "description": "Specifies the number of resources that are allocated.", - "format": "int64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] Indicates how many instances are in use.", - "format": "int64", - "type": "string" - }, - "instanceProperties": { - "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "The instance properties for the reservation." - }, - "sourceInstanceTemplate": { - "description": "Specifies the instance template to create the reservation. If you use\nthis field, you must exclude the instanceProperties field.\n\nThis field is optional, and it can be a full or partial URL. For example,\nthe following are all valid URLs to an instance template: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate", - "type": "string" - } - }, - "type": "object" - }, - "AsyncReplicationStatus": { - "id": "AsyncReplicationStatus", - "properties": { - "diskPairReplicationState": { - "$ref": "DiskPairReplicationState" - }, - "lastReplicationDetails": { - "$ref": "ReplicationDetails" - } - }, - "type": "object" - }, - "AttachedDisk": { - "description": "An instance-attached disk resource.", - "id": "AttachedDisk", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the attached disk. Valid values are ARM64\nor X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "boot": { - "description": "Indicates that this is a boot disk. The virtual machine will use the first\npartition of the disk for its root filesystem.", - "type": "boolean" - }, - "deviceName": { - "description": "Specifies a unique device name of your choice that is reflected into the/dev/disk/by-id/google-* tree of a Linux operating system\nrunning within the instance. This name can be used to reference the device\nfor mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this\ndisk, in the form persistent-disk-x, where x is a number\nassigned by Google Compute Engine. This field is only applicable for\npersistent disks.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts a disk using acustomer-supplied\nencryption key.\n\nIf you are creating a new disk, this field encrypts the new disk using\nan encryption key that you provide. If you are attaching an existing\ndisk that is already encrypted, this field decrypts the disk using\nthe customer-supplied encryption key.\n\nIf you encrypt a disk using a customer-supplied key, you must provide the\nsame key again when you attempt to use this resource at a later time. For\nexample, you must provide the key when you create a snapshot or an image\nfrom the disk or when you attach the disk to a virtual machine instance.\n\nIf you do not provide an encryption key, then the disk will be encrypted\nusing an automatically generated key and you do not need to provide a key\nto use the disk later.\n\nNote:\n\nInstance templates do not storecustomer-supplied\nencryption keys, so you cannot use your own keys to encrypt disks in amanaged instance group.\n\nYou cannot create VMs that have disks with customer-supplied keys using\nthe bulk\ninsert method." - }, - "diskSizeGb": { - "description": "The size of the disk in GB.", - "format": "int64", - "type": "string" - }, - "forceAttach": { - "description": "[Input Only] Whether to force attach the regional disk even if it's\ncurrently attached to another instance. If you try to force attach a zonal\ndisk to an instance, you will receive an error.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "index": { - "description": "[Output Only] A zero-based index to this disk, where 0 is reserved for the\nboot disk. If you have many disks attached to an instance, each\ndisk would have a unique index number.", - "format": "int32", - "type": "integer" - }, - "initializeParams": { - "$ref": "AttachedDiskInitializeParams", - "description": "[Input Only] Specifies the parameters for a new disk that will be created\nalongside the new instance. Use initialization parameters to create boot\ndisks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property;\nyou can only define one or the other, but not both." - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME. For most machine types, the\ndefault is SCSI. Local SSDs can use either NVME or SCSI.\nIn certain configurations, persistent disks can use NVMe. For more\ninformation, seeAbout\npersistent disks.", - "enum": [ - "NVDIMM", - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#attachedDisk", - "description": "[Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.", - "type": "string" - }, - "licenses": { - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locked": { - "description": "[Output Only] Whether to indicate the attached disk is locked. The locked\ndisk is not allowed to be detached from the instance, or to be used as the\nsource of the snapshot creation, and the image creation. The instance with\nat least one locked attached disk is not allow to be used as source of\nmachine image creation, instant snapshot creation, and not allowed to be\ndeleted with --keep-disk parameter set to true for locked disks.", - "type": "boolean" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. If not specified, the default is to attach the disk\nin READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple virtual machines can use\na disk in read-only mode at a time.", - "*[Default]* Attaches this disk in read-write mode. Only one\nvirtual machine at a time can be attached to a disk in read-write mode." - ], - "type": "string" - }, - "savedState": { - "description": "For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this\nfield is set to PRESERVED if the LocalSSD data has been saved\nto a persistent location by customer request. (see the\ndiscard_local_ssd option on Stop/Suspend).\nRead-only in the api.", - "enum": [ - "DISK_SAVED_STATE_UNSPECIFIED", - "PRESERVED" - ], - "enumDescriptions": [ - "*[Default]* Disk state has not been preserved.", - "Disk state has been preserved." - ], - "type": "string" - }, - "shieldedInstanceInitialState": { - "$ref": "InitialStateConfig", - "description": "[Output Only] shielded vm initial state stored on disk" - }, - "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk\nresource. When creating a new instance boot disk, one ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source\nis required.\n\nIf desired, you can also attach existing non-root persistent disks using\nthis property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name for zonal disk,\nand the URL for regional disk.", - "type": "string" - }, - "type": { - "description": "Specifies the type of the disk, either SCRATCH orPERSISTENT. If not specified, the default isPERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "userLicenses": { - "description": "[Output Only] A list of user provided licenses. It represents a list of\nURLs to the license resource. Unlike regular licenses, user provided\nlicenses can be modified after the disk is created.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AttachedDiskInitializeParams": { - "description": "[Input Only] Specifies the parameters for a new disk that will be created\nalongside the new instance. Use initialization parameters to create boot\ndisks or local SSDs attached to the new instance.\n\nThis field is persisted and returned for instanceTemplate and not returned\nin the context of instance.\n\nThis property is mutually exclusive with the source property;\nyou can only define one or the other, but not both.", - "id": "AttachedDiskInitializeParams", - "properties": { - "architecture": { - "description": "The architecture of the attached disk. Valid values are\narm64 or x86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "description": { - "description": "An optional description. Provide this property when creating the disk.", - "type": "string" - }, - "diskName": { - "description": "Specifies the disk name. If not specified, the default is to use the name\nof the instance. If a disk with the same name already exists in the given\nregion, the existing disk is attached to the new instance and the\nnew disk is not created.", - "type": "string" - }, - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB. The size must be at least\n10 GB. If you specify a sourceImage, which is required for\nboot disks, the default size is the size of the sourceImage.\nIf you do not specify a sourceImage, the default disk size\nis 500 GB.", - "format": "int64", - "type": "string" - }, - "diskType": { - "description": "Specifies the disk type to use to create the instance. If not specified,\nthe default is pd-standard, specified using the full URL.\nFor example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard\n\n\nFor a full list of acceptable values, seePersistent disk\ntypes. If you specify this field when creating a VM, you can provide\neither the full or partial URL. For example, the following values are\nvalid:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n - projects/project/zones/zone/diskTypes/diskType \n - zones/zone/diskTypes/diskType\n\n\nIf you specify this field when creating or updating an instance template\nor all-instances configuration, specify the type of the disk, not the\nURL. For example: pd-standard.", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this disk is using confidential compute mode.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.\n\nGuest OS features are applied by merginginitializeParams.guestOsFeatures anddisks.guestOsFeatures", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "interface": { - "deprecated": true, - "description": "[Deprecated] Specifies the disk interface to use for attaching this disk,\nwhich is either SCSI or NVME. The default isSCSI.", - "enum": [ - "NVME", - "SCSI", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this disk. These can be later modified by thedisks.setLabels method. This field is only applicable for\npersistent disks.", - "type": "object" - }, - "licenseCodes": { - "description": "Integer license codes indicating which licenses are attached to this\ndisk.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "A list of publicly visible licenses. Reserved for Google's use.", - "items": { - "type": "string" - }, - "type": "array" - }, - "multiWriter": { - "description": "Indicates whether or not the disk can be read/write attached to\nmore than one instance.", - "type": "boolean" - }, - "onUpdateAction": { - "description": "Specifies which action to take on instance update with this disk. Default\nis to use the existing disk.", - "enum": [ - "RECREATE_DISK", - "RECREATE_DISK_IF_SOURCE_CHANGED", - "USE_EXISTING_DISK" - ], - "enumDescriptions": [ - "Always recreate the disk.", - "Recreate the disk if source (image, snapshot) of this disk is different\nfrom source of existing disk.", - "Use the existing disk, this is the default behaviour." - ], - "type": "string" - }, - "provisionedIops": { - "description": "Indicates how many IOPS to provision for the disk. This sets the number\nof I/O operations per second that the disk can handle. Values must be\nbetween 10,000 and 120,000. For more details, see theExtreme persistent\ndisk documentation.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "Indicates how much throughput to provision for the disk. This sets the\nnumber of throughput mb per second that the disk can handle. Values must\ngreater than or equal to 1.", - "format": "int64", - "type": "string" - }, - "replicaZones": { - "description": "Required for each regional disk associated with the instance. Specify\nthe URLs of the zones where the disk should be replicated to.\nYou must provide exactly two replica zones, and one zone must be the same\nas the instance zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the disk. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT\n\u0026 PATCH) when empty.", - "type": "object" - }, - "resourcePolicies": { - "description": "Resource policies applied to this disk for automatic snapshot creations.\nSpecified using the full or partial URL. For instance template, specify\nonly the resource policy name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceImage": { - "description": "The source image to create this disk. When creating a new instance boot\ndisk, one of initializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source\nis required.\n\nTo create a disk with one of the public operating system\nimages, specify the image by its family name. For example, specifyfamily/debian-9 to use the latest Debian 9 image:\n\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the\nimage name in the following format:\n\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns\nthe latest version of the image in that family. Replace the image name\nwith family/family-name:\n\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source image. Required if the source image is\nprotected by a customer-supplied encryption key.\n\nInstanceTemplate and InstancePropertiesPatch do not storecustomer-supplied\nencryption keys, so you cannot create disks for instances in a managed instance group if the\nsource images are encrypted with your own keys." - }, - "sourceInstantSnapshot": { - "description": "The source instant-snapshot to create this disk. When creating a new\ninstance boot disk, one of initializeParams.sourceSnapshot\nor initializeParams.sourceInstantSnapshotinitializeParams.sourceImage or disks.source\nis required.\n\nTo create a disk with a snapshot that you created, specify the\nsnapshot name in the following format:\n\nus-central1-a/instantSnapshots/my-backup\n\n\nIf the source instant-snapshot is deleted later, this field will not be\nset.", - "type": "string" - }, - "sourceSnapshot": { - "description": "The source snapshot to create this disk. When creating a new instance\nboot disk, one of initializeParams.sourceSnapshot orinitializeParams.sourceImage or disks.source\nis required.\n\nTo create a disk with a snapshot that you created, specify the\nsnapshot name in the following format:\n\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.\n\nNote: You cannot create VMs in bulk using a snapshot as the source. Use\nan image instead when you create VMs using\nthe bulk\ninsert method.", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source snapshot." - }, - "storagePool": { - "description": "The storage pool in which the new disk is created. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool\n - projects/project/zones/zone/storagePools/storagePool \n - zones/zone/storagePools/storagePool", - "type": "string" - } - }, - "type": "object" - }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n },\n {\n \"log_type\": \"ADMIN_READ\"\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\"\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts `jose@example.com` from DATA_READ logging, and\n`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.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", - "id": "AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "ADMIN_READ", - "DATA_READ", - "DATA_WRITE", - "LOG_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Admin reads. Example: CloudIAM getIamPolicy", - "Data reads. Example: CloudSQL Users list", - "Data writes. Example: CloudSQL Users create", - "Default case. Should never be this." - ], - "type": "string" - } - }, - "type": "object" - }, - "AuthenticationPolicy": { - "description": "[Deprecated] The authentication settings for the backend service.\nThe authentication settings for the backend service.", - "id": "AuthenticationPolicy", - "properties": { - "origins": { - "description": "List of authentication methods that can be used for origin authentication.\nSimilar to peers, these will be evaluated in order the first valid one\nwill be used to set origin identity. If none of these methods pass, the\nrequest will be rejected with authentication failed error (401). Leave the\nlist empty if origin authentication is not required.", - "items": { - "$ref": "OriginAuthenticationMethod" - }, - "type": "array" - }, - "peers": { - "description": "List of authentication methods that can be used for peer authentication.\nThey will be evaluated in order the first valid one will be used to set\npeer identity. If none of these methods pass, the request will be rejected\nwith authentication failed error (401). Leave the list empty if peer\nauthentication is not required.", - "items": { - "$ref": "PeerAuthenticationMethod" - }, - "type": "array" - }, - "principalBinding": { - "description": "Define whether peer or origin identity should be used for principal.\nDefault value is USE_PEER. If peer (or origin) identity is not available,\neither because peer/origin authentication is not defined, or failed,\nprincipal will be left unset. In other words, binding rule does not affect\nthe decision to accept or reject request. This field can be set to one of\nthe following:\nUSE_PEER: Principal will be set to the identity from peer authentication.\nUSE_ORIGIN: Principal will be set to the identity from origin\n authentication.", - "enum": [ - "INVALID", - "USE_ORIGIN", - "USE_PEER" - ], - "enumDescriptions": [ - "", - "Principal will be set to the identity from origin authentication.", - "Principal will be set to the identity from peer authentication." - ], - "type": "string" - }, - "serverTlsContext": { - "$ref": "TlsContext", - "description": "Configures the mechanism to obtain server-side security certificates and\nidentity information." - } - }, - "type": "object" - }, - "AuthorizationConfig": { - "description": "[Deprecated] Authorization configuration provides service-level and\nmethod-level access control for a service.\ncontrol for a service.", - "id": "AuthorizationConfig", - "properties": { - "policies": { - "description": "List of RbacPolicies.", - "items": { - "$ref": "RbacPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "Autoscaler": { - "description": "Represents an Autoscaler resource.\n\nGoogle Compute Engine has two Autoscaler resources:\n\n* [Zonal](/compute/docs/reference/rest/alpha/autoscalers)\n* [Regional](/compute/docs/reference/rest/alpha/regionAutoscalers)\n\nUse autoscalers to automatically add or delete instances from a\nmanaged instance group according to your defined autoscaling policy.\nFor more information, read Autoscaling Groups of Instances.\n\nFor zonal managed instance groups resource, use the autoscaler\nresource.\n\nFor regional managed instance groups, use theregionAutoscalers resource.", - "id": "Autoscaler", - "properties": { - "autoscalingPolicy": { - "$ref": "AutoscalingPolicy", - "description": "The configuration parameters for the autoscaling algorithm. You can define\none or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#autoscaler", - "description": "[Output Only] Type of the resource. Always compute#autoscaler\nfor autoscalers.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.autoscalers.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "recommendedSize": { - "description": "[Output Only] Target recommended MIG size (number of instances) computed by\nautoscaler. Autoscaler calculates the recommended MIG size even when the\nautoscaling policy mode is different from ON. This field is empty when\nautoscaler is not connected to an existing managed instance group or\nautoscaler did not generate its prediction.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URL of theregion\nwhere the instance group resides (for autoscalers living in regional\nscope).", - "type": "string" - }, - "scalingScheduleStatus": { - "additionalProperties": { - "$ref": "ScalingScheduleStatus" - }, - "description": "[Output Only] Status information of existing scaling schedules.", - "type": "object" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the autoscaler configuration. Current set of\npossible values:\n \n - PENDING:\n Autoscaler backend hasn't read new/updated configuration.\n - DELETING:\n Configuration is being deleted.\n - ACTIVE:\n Configuration is acknowledged to be effective. Some warnings might\n be present in the statusDetails field.\n - ERROR:\n Configuration has errors. Actionable for users. Details are present in\n the statusDetails field.\n\n\nNew values might be added in the future.", - "enum": [ - "ACTIVE", - "DELETING", - "ERROR", - "PENDING" - ], - "enumDescriptions": [ - "Configuration is acknowledged to be effective", - "Configuration is being deleted", - "Configuration has errors. Actionable for users.", - "Autoscaler backend hasn't read new/updated configuration" - ], - "type": "string" - }, - "statusDetails": { - "description": "[Output Only] Human-readable details about the current state of the\nautoscaler. Read the documentation forCommonly\nreturned status messages for examples of status messages you might\nencounter.", - "items": { - "$ref": "AutoscalerStatusDetails" - }, - "type": "array" - }, - "target": { - "description": "URL of the managed instance group that this autoscaler will scale. This\nfield is required when creating an autoscaler.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of thezone\nwhere the instance group resides (for autoscalers living in zonal scope).", - "type": "string" - } - }, - "type": "object" - }, - "AutoscalerAggregatedList": { - "id": "AutoscalerAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AutoscalersScopedList", - "description": "[Output Only] Name of the scope containing this set of autoscalers." - }, - "description": "A list of AutoscalersScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#autoscalerAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#autoscalerAggregatedList for aggregated lists of\nautoscalers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalerList": { - "description": "Contains a list of Autoscaler resources.", - "id": "AutoscalerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "kind": { - "default": "compute#autoscalerList", - "description": "[Output Only] Type of resource. Always compute#autoscalerList\nfor lists of autoscalers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalerStatusDetails": { - "id": "AutoscalerStatusDetails", - "properties": { - "message": { - "description": "The status message.", - "type": "string" - }, - "type": { - "description": "The type of error, warning, or notice returned. Current set of possible\nvalues:\n \n - ALL_INSTANCES_UNHEALTHY (WARNING):\n All instances in the instance group are unhealthy (not in RUNNING\n state).\n - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):\n There is no backend service attached to the instance group.\n - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):\n Autoscaler recommends a size greater than maxNumReplicas.\n - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):\n The custom metric samples are not exported often enough to be\n a credible base for autoscaling.\n - CUSTOM_METRIC_INVALID (ERROR):\n The custom metric that was specified does not exist or does not have\n the necessary labels.\n - MIN_EQUALS_MAX (WARNING):\n The minNumReplicas is equal to maxNumReplicas. This means the\n autoscaler cannot add or remove instances from the instance group.\n - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):\n The autoscaler did not receive any data from the custom metric\n configured for autoscaling.\n - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):\n The autoscaler is configured to scale based on a load balancing signal\n but the instance group has not received any requests from the load\n balancer.\n - MODE_OFF (WARNING):\n Autoscaling is turned off. The number of instances in the group won't\n change automatically. The autoscaling configuration is preserved.\n - MODE_ONLY_UP (WARNING):\n Autoscaling is in the \"Autoscale only out\" mode. The autoscaler can add\n instances but not remove any.\n - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):\n The instance group cannot be autoscaled because it has more than one\n backend service attached to it.\n - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):\n There is insufficient quota for the necessary resources, such as CPU or\n number of instances.\n - REGION_RESOURCE_STOCKOUT (ERROR):\n Shown only for regional autoscalers: there is a resource stockout in\n the chosen region.\n - SCALING_TARGET_DOES_NOT_EXIST (ERROR):\n The target to be scaled does not exist.\n - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION\n (ERROR): Autoscaling does not work with an HTTP/S load balancer that\n has been configured for maxRate.\n - ZONE_RESOURCE_STOCKOUT (ERROR):\n For zonal autoscalers: there is a resource stockout in the chosen zone.\n For regional autoscalers: in at least one of the zones you're using\n there is a resource stockout.\n\n\nNew values might be added in the future. Some of the values might not be\navailable in all API versions.", - "enum": [ - "ALL_INSTANCES_UNHEALTHY", - "BACKEND_SERVICE_DOES_NOT_EXIST", - "CAPPED_AT_MAX_NUM_REPLICAS", - "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", - "CUSTOM_METRIC_INVALID", - "MIN_EQUALS_MAX", - "MISSING_CUSTOM_METRIC_DATA_POINTS", - "MISSING_LOAD_BALANCING_DATA_POINTS", - "MODE_OFF", - "MODE_ONLY_SCALE_OUT", - "MODE_ONLY_UP", - "MORE_THAN_ONE_BACKEND_SERVICE", - "NOT_ENOUGH_QUOTA_AVAILABLE", - "REGION_RESOURCE_STOCKOUT", - "SCALING_TARGET_DOES_NOT_EXIST", - "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX", - "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN", - "UNKNOWN", - "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", - "ZONE_RESOURCE_STOCKOUT" - ], - "enumDescriptions": [ - "All instances in the instance group are unhealthy (not in RUNNING state).", - "There is no backend service attached to the instance group.", - "Autoscaler recommends a size greater than maxNumReplicas.", - "The custom metric samples are not exported often enough to be a credible\nbase for autoscaling.", - "The custom metric that was specified does not exist or does not have the\nnecessary labels.", - "The minNumReplicas is equal to maxNumReplicas. This means the autoscaler\ncannot add or remove instances from the instance group.", - "The autoscaler did not receive any data from the custom metric configured\nfor autoscaling.", - "The autoscaler is configured to scale based on a load balancing signal\nbut the instance group has not received any requests from the load\nbalancer.", - "Autoscaling is turned off. The number of instances in the group won't\nchange automatically. The autoscaling configuration is preserved.", - "Autoscaling is in the \"Autoscale only scale out\" mode.\nInstances in the group will be only added.", - "Autoscaling is in the \"Autoscale only out\" mode. Instances in the group\nwill be only added.", - "The instance group cannot be autoscaled because it has more than one\nbackend service attached to it.", - "There is insufficient quota for the necessary resources, such as CPU or\nnumber of instances.", - "Showed only for regional autoscalers: there is a resource stockout in\nthe chosen region.", - "The target to be scaled does not exist.", - "For some scaling schedules minRequiredReplicas is greater than\nmaxNumReplicas. Autoscaler always recommends at most maxNumReplicas\ninstances.", - "For some scaling schedules minRequiredReplicas is less than\nminNumReplicas. Autoscaler always recommends at least minNumReplicas\ninstances.", - "", - "Autoscaling does not work with an HTTP/S load balancer that has been\nconfigured for maxRate.", - "For zonal autoscalers: there is a resource stockout in the chosen zone.\nFor regional autoscalers: in at least one of the zones you're using there\nis a resource stockout." - ], - "type": "string" - } - }, - "type": "object" - }, - "AutoscalersScopedList": { - "id": "AutoscalersScopedList", - "properties": { - "autoscalers": { - "description": "[Output Only] A list of autoscalers contained in this scope.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of autoscalers\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalingPolicy": { - "description": "Cloud Autoscaler policy.", - "id": "AutoscalingPolicy", - "properties": { - "coolDownPeriodSec": { - "description": "The number of seconds that your application takes to initialize on a VM\ninstance. This is referred to as the\n[initialization period](/compute/docs/autoscaler#cool_down_period).\nSpecifying an accurate initialization period improves\nautoscaler decisions. For example, when scaling out, the autoscaler ignores\ndata from VMs that are still initializing because those VMs might not yet\nrepresent normal usage of your application. The default initialization\nperiod is 60 seconds.\n\nInitialization periods might vary because of numerous\nfactors. We recommend that you test how long your application takes to\ninitialize. To do this, create a VM and time your application's startup\nprocess.", - "format": "int32", - "type": "integer" - }, - "cpuUtilization": { - "$ref": "AutoscalingPolicyCpuUtilization", - "description": "Defines the CPU utilization policy that allows the autoscaler to scale\nbased on the average CPU utilization of a managed instance group." - }, - "customMetricUtilizations": { - "description": "Configuration parameters of autoscaling based on a custom metric.", - "items": { - "$ref": "AutoscalingPolicyCustomMetricUtilization" - }, - "type": "array" - }, - "loadBalancingUtilization": { - "$ref": "AutoscalingPolicyLoadBalancingUtilization", - "description": "Configuration parameters of autoscaling based on load balancer." - }, - "maxNumReplicas": { - "description": "The maximum number of instances that the autoscaler can scale out to. This\nis required when creating or updating an autoscaler. The maximum number\nof replicas must not be lower than minimal number of replicas.", - "format": "int32", - "type": "integer" - }, - "minNumReplicas": { - "description": "The minimum number of replicas that the autoscaler can scale in to.\nThis cannot be less than 0. If not provided, autoscaler chooses a\ndefault value depending on maximum number of instances allowed.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "Defines the operating mode for this policy.\nThe following modes are available:\n \n - OFF: Disables the autoscaler but maintains its\n configuration.\n - ONLY_SCALE_OUT: Restricts the autoscaler to add\n VM instances only.\n - ON: Enables all autoscaler activities according to its\n policy.\n\n\nFor more information, see \n\"Turning off or restricting an autoscaler\"", - "enum": [ - "OFF", - "ON", - "ONLY_SCALE_OUT", - "ONLY_UP" - ], - "enumDescriptions": [ - "Do not automatically scale the MIG in or out.\nThe recommended_size field contains the size of MIG that would be set if\nthe actuation mode was enabled.", - "Automatically scale the MIG in and out according to the policy.", - "Automatically create VMs according to the policy, but do not scale\nthe MIG in.", - "Automatically create VMs according to the policy, but do not scale\nthe MIG in." - ], - "type": "string" - }, - "scaleDownControl": { - "$ref": "AutoscalingPolicyScaleDownControl" - }, - "scaleInControl": { - "$ref": "AutoscalingPolicyScaleInControl" - }, - "scalingSchedules": { - "additionalProperties": { - "$ref": "AutoscalingPolicyScalingSchedule" - }, - "description": "Scaling schedules defined for an autoscaler. Multiple schedules\ncan be set on an autoscaler, and they can overlap. During overlapping\nperiods the greatest min_required_replicas of all scaling schedules is\napplied. Up to 128 scaling schedules are allowed.", - "type": "object" - } - }, - "type": "object" - }, - "AutoscalingPolicyCpuUtilization": { - "description": "CPU utilization policy.", - "id": "AutoscalingPolicyCpuUtilization", - "properties": { - "predictiveMethod": { - "description": "Indicates whether predictive autoscaling based on CPU metric is enabled.\nValid values are:\n\n* NONE (default). No predictive method is used. The autoscaler scales the\ngroup to meet current demand based on real-time metrics.\n* OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by\nmonitoring daily and weekly load patterns and scaling out ahead of\nanticipated demand.", - "enum": [ - "NONE", - "OPTIMIZE_AVAILABILITY", - "PREDICTIVE_METHOD_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "No predictive method is used. The autoscaler scales the group to meet\ncurrent demand based on real-time metrics", - "Predictive autoscaling improves availability by monitoring daily and\nweekly load patterns and scaling out ahead of anticipated demand.", - "", - "Predictive autoscaling improves availability by monitoring daily and\nweekly load patterns and scaling out ahead of anticipated demand.\n\nThis value is being DEPRECATED - it won't be promoted to beta and v1. Use\nOPTIMIZE_AVAILABILITY instead." - ], - "type": "string" - }, - "utilizationTarget": { - "description": "The target CPU utilization that the autoscaler maintains. Must be\na float value in the range (0, 1]. If not specified, the default is0.6.\n\nIf the CPU level is below the target utilization, the autoscaler scales\nin the number of instances until it reaches the minimum number of\ninstances you specified or until the average CPU of your instances\nreaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler\nscales out until it reaches the maximum number of instances you\nspecified or until the average utilization reaches the target\nutilization.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "AutoscalingPolicyCustomMetricUtilization": { - "description": "Custom utilization metric policy.", - "id": "AutoscalingPolicyCustomMetricUtilization", - "properties": { - "filter": { - "description": "A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is\nused to select a specific TimeSeries for the purpose of autoscaling and\nto determine whether the metric is exporting per-instance or\nper-group data.\n\nFor the filter to be valid for autoscaling purposes, the following rules\napply:\n \n \n - You can only use the AND operator for joining\n selectors.\n - You can only use direct equality comparison operator\n (=) without any functions for each selector.\n - You can specify the metric in both the filter string and in the\n metric field. However, if specified in both places, the metric must\n be identical.\n - The monitored resource type\n determines what kind of values are expected for the metric. If it is\n a gce_instance, the autoscaler expects the metric to\n include a separate TimeSeries for each instance in a group. In such a\n case, you cannot filter on resource labels.\n \n \n If the resource type is any other value, the autoscaler expects\n this metric to contain values that apply to the entire autoscaled\n instance group and resource label filtering can be performed to\n point autoscaler at the correct TimeSeries to scale upon. This is\n called a *per-group metric* for the purpose of autoscaling.\n \n If not specified, the type defaults to\n gce_instance.\n\n\n\nTry to provide a filter that is selective enough to pick just one\nTimeSeries for the autoscaled group or for each of the instances (if you\nare using gce_instance resource type). If multiple\nTimeSeries are returned upon the query execution, the autoscaler will sum\ntheir respective values to obtain its scaling value.", - "type": "string" - }, - "metric": { - "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric\ncannot have negative values.\n\nThe metric must have a value type of INT64 orDOUBLE.", - "type": "string" - }, - "singleInstanceAssignment": { - "description": "If scaling is based on a per-group metric value that represents the\ntotal amount of work to be done or resource usage, set this value to an\namount assigned for a single instance of the scaled group. Autoscaler\nkeeps the number of instances proportional to the value of this\nmetric. The metric itself does not change value due to group\nresizing.\n\nA good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages\nor a custom metric exporting the total number of requests coming to\nyour instances.\n\nA bad example would be a metric exporting an average or median latency,\nsince this value can't include a chunk assignable to a single instance,\nit could be better used with utilization_target instead.", - "format": "double", - "type": "number" - }, - "utilizationTarget": { - "description": "The target value of the metric that autoscaler maintains. This\nmust be a positive value. A utilization metric scales number of\nvirtual machines handling requests to increase or decrease\nproportionally to the metric.\n\nFor example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.\nThe autoscaler works to keep this value constant for each of the\ninstances.", - "format": "double", - "type": "number" - }, - "utilizationTargetType": { - "description": "Defines how target utilization value is expressed for a Stackdriver\nMonitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.", - "enum": [ - "DELTA_PER_MINUTE", - "DELTA_PER_SECOND", - "GAUGE" - ], - "enumDescriptions": [ - "Sets the utilization target value for a cumulative or delta metric,\nexpressed as the rate of growth per minute.", - "Sets the utilization target value for a cumulative or delta metric,\nexpressed as the rate of growth per second.", - "Sets the utilization target value for a gauge metric. The autoscaler\nwill collect the average utilization of the virtual machines from the\nlast couple of minutes, and compare the value to the utilization\ntarget value to perform autoscaling." - ], - "type": "string" - } - }, - "type": "object" - }, - "AutoscalingPolicyLoadBalancingUtilization": { - "description": "Configuration parameters of autoscaling based on load balancing.", - "id": "AutoscalingPolicyLoadBalancingUtilization", - "properties": { - "utilizationTarget": { - "description": "Fraction of backend capacity utilization (set in HTTP(S) load balancing\nconfiguration) that the autoscaler maintains. Must be a positive float\nvalue. If not defined, the default is 0.8.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "AutoscalingPolicyScaleDownControl": { - "description": "Configuration that allows for slower scale in so that even if Autoscaler\nrecommends an abrupt scale in of a MIG, it will be throttled as specified\nby the parameters below.", - "id": "AutoscalingPolicyScaleDownControl", - "properties": { - "maxScaledDownReplicas": { - "$ref": "FixedOrPercent", - "description": "Maximum allowed number (or %) of VMs that can be deducted from the peak\nrecommendation during the window autoscaler looks at when computing\nrecommendations. Possibly all these VMs can be deleted at once so user\nservice needs to be prepared to lose that many VMs in one step." - }, - "timeWindowSec": { - "description": "How far back autoscaling looks when computing recommendations to\ninclude directives regarding slower scale in, as described above.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AutoscalingPolicyScaleInControl": { - "description": "Configuration that allows for slower scale in so that even if Autoscaler\nrecommends an abrupt scale in of a MIG, it will be throttled as specified\nby the parameters below.", - "id": "AutoscalingPolicyScaleInControl", - "properties": { - "maxScaledInReplicas": { - "$ref": "FixedOrPercent", - "description": "Maximum allowed number (or %) of VMs that can be deducted from the peak\nrecommendation during the window autoscaler looks at when computing\nrecommendations. Possibly all these VMs can be deleted at once so user\nservice needs to be prepared to lose that many VMs in one step." - }, - "timeWindowSec": { - "description": "How far back autoscaling looks when computing recommendations to\ninclude directives regarding slower scale in, as described above.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AutoscalingPolicyScalingSchedule": { - "description": "Scaling based on user-defined schedule. The message describes a single\nscaling schedule. A scaling schedule changes the minimum number of VM\ninstances an autoscaler can recommend, which can trigger scaling out.", - "id": "AutoscalingPolicyScalingSchedule", - "properties": { - "description": { - "description": "A description of a scaling schedule.", - "type": "string" - }, - "disabled": { - "description": "A boolean value that specifies whether a scaling schedule can influence\nautoscaler recommendations. If set to true, then a scaling schedule has\nno effect. This field is optional, and its value is false by default.", - "type": "boolean" - }, - "durationSec": { - "description": "The duration of time intervals, in seconds, for which this\nscaling schedule is to run. The minimum allowed value is 300.\nThis field is required.", - "format": "int32", - "type": "integer" - }, - "minRequiredReplicas": { - "description": "The minimum number of VM instances that the autoscaler will\nrecommend in time intervals starting according to schedule. This field is\nrequired.", - "format": "int32", - "type": "integer" - }, - "schedule": { - "description": "The start timestamps of time intervals when this scaling\nschedule is to provide a scaling signal. This field uses the extended\ncron format (with an optional year field). The expression can describe a\nsingle timestamp if the optional year is set, in which case the scaling\nschedule runs once. The schedule is interpreted with respect to\ntime_zone. This field is required. Note: These timestamps only describe\nwhen autoscaler starts providing the scaling signal. The VMs\nneed additional time to become serving.", - "type": "string" - }, - "timeZone": { - "description": "The time zone to use when interpreting the schedule.\nThe value of this field must be a time zone name from the tz database:\nhttps://en.wikipedia.org/wiki/Tz_database. This field is assigned a\ndefault value of \"UTC\" if left empty.", - "type": "string" - } - }, - "type": "object" - }, - "Backend": { - "description": "Message containing information of one individual backend.", - "id": "Backend", - "properties": { - "balancingMode": { - "description": "Specifies how to determine whether the backend of a load balancer can\nhandle additional traffic or is fully loaded. For usage guidelines, see\nConnection balancing mode.\n\nBackends must use compatible balancing modes. For more information, see\nSupported balancing modes and target capacity settings and\nRestrictions and guidance for instance groups.\n\nNote: Currently, if you use the API to configure incompatible balancing\nmodes, the configuration might be accepted even though it has no impact\nand is ignored. Specifically, Backend.maxUtilization is ignored when\nBackend.balancingMode is RATE. In the future, this incompatible combination\nwill be rejected.", - "enum": [ - "CONNECTION", - "CUSTOM_METRICS", - "IN_FLIGHT", - "RATE", - "UTILIZATION" - ], - "enumDescriptions": [ - "Balance based on the number of simultaneous connections.", - "Based on custom defined and reported metrics.", - "Balance based on the number of in-flight requests.", - "Balance based on requests per second (RPS).", - "Balance based on the backend utilization." - ], - "type": "string" - }, - "capacityScaler": { - "description": "A multiplier applied to the backend's target capacity of its balancing\nmode.\nThe default value is 1, which means the group serves up to\n100% of its configured capacity (depending onbalancingMode). A setting of 0 means the group is\ncompletely drained, offering 0% of its available capacity. The valid ranges\nare 0.0 and [0.1,1.0].\nYou cannot configure a setting larger than 0 and smaller than0.1.\nYou cannot configure a setting of 0 when there is only one\nbackend attached to the backend service.\n\nNot available with backends that don't support using abalancingMode. This includes backends such as global\ninternet NEGs, regional serverless NEGs, and PSC NEGs.", - "format": "float", - "type": "number" - }, - "customMetrics": { - "description": "List of custom metrics that are used for CUSTOM_METRICS\nBalancingMode.", - "items": { - "$ref": "BackendCustomMetric" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "failover": { - "description": "This field designates whether this is a failover backend. More than one\nfailover backend can be configured for a given BackendService.", - "type": "boolean" - }, - "group": { - "description": "The fully-qualified URL of aninstance\ngroup or network endpoint\ngroup (NEG) resource. To determine what types of backends a load\nbalancer supports, see the [Backend services\noverview](https://cloud.google.com/load-balancing/docs/backend-service#backends).\n\nYou must use the *fully-qualified* URL (starting withhttps://www.googleapis.com/) to specify the instance group\nor NEG. Partial URLs are not supported.\n\nIf haPolicy is specified, backends must refer to NEG resources of type\nGCE_VM_IP.", - "type": "string" - }, - "maxConnections": { - "description": "Defines a target maximum number of simultaneous connections. For usage\nguidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode. Not available if the backend'sbalancingMode is RATE.", - "format": "int32", - "type": "integer" - }, - "maxConnectionsPerEndpoint": { - "description": "Defines a target maximum number of simultaneous connections. For usage\nguidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isRATE.", - "format": "int32", - "type": "integer" - }, - "maxConnectionsPerInstance": { - "description": "Defines a target maximum number of simultaneous connections.\nFor usage guidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isRATE.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequests": { - "description": "Defines a maximum number of in-flight requests for the whole NEG or\ninstance group. Not available if backend's balancingMode isRATE or CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequestsPerEndpoint": { - "description": "Defines a maximum number of in-flight requests for a single endpoint.\nNot available if backend's balancingMode is RATE\nor CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequestsPerInstance": { - "description": "Defines a maximum number of in-flight requests for a single VM.\nNot available if backend's balancingMode is RATE\nor CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxRate": { - "description": "Defines a maximum number of HTTP requests per second (RPS). For\nusage guidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxRatePerEndpoint": { - "description": "Defines a maximum target for requests per second (RPS). For usage\nguidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "float", - "type": "number" - }, - "maxRatePerInstance": { - "description": "Defines a maximum target for requests per second (RPS). For usage\nguidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "float", - "type": "number" - }, - "maxUtilization": { - "description": "Optional parameter to define a target capacity for theUTILIZATION balancing mode. The valid range is[0.0, 1.0].\n\nFor usage guidelines, seeUtilization\nbalancing mode.", - "format": "float", - "type": "number" - }, - "preference": { - "description": "This field indicates whether this backend should be fully utilized before\nsending traffic to backends with default preference. The possible values\nare:\n \n - PREFERRED: Backends with this preference level will be\n filled up to their capacity limits first, based on RTT.\n - DEFAULT: If preferred backends don't have enough\n capacity, backends in this layer would be used and traffic would be\n assigned based on the load balancing algorithm you use. This is the\n default", - "enum": [ - "DEFAULT", - "PREFERENCE_UNSPECIFIED", - "PREFERRED" - ], - "enumDescriptions": [ - "No preference.", - "If preference is unspecified, we set it to the DEFAULT value", - "Traffic will be sent to this backend first." - ], - "type": "string" - }, - "trafficDuration": { - "enum": [ - "LONG", - "SHORT", - "TRAFFIC_DURATION_UNSPECIFIED" - ], - "enumDescriptions": [ - "Most of the requests are expected to take more than multiple seconds to\nfinish.", - "Most requests are expected to finish with a sub-second latency.", - "Traffic duration is unspecified." - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendBucket": { - "description": "Represents a Cloud Storage Bucket resource.\n\nThis Cloud Storage bucket resource is referenced by a URL map of a load\nbalancer. For more information, readBackend Buckets.", - "id": "BackendBucket", - "properties": { - "bucketName": { - "description": "Cloud Storage bucket name.", - "type": "string" - }, - "cdnPolicy": { - "$ref": "BackendBucketCdnPolicy", - "description": "Cloud CDN configuration for this BackendBucket." - }, - "compressionMode": { - "description": "Compress text responses using Brotli or gzip compression, based on\nthe client's Accept-Encoding header.", - "enum": [ - "AUTOMATIC", - "DISABLED" - ], - "enumDescriptions": [ - "Automatically uses the best compression based on the Accept-Encoding\nheader sent by the client.", - "Disables compression. Existing compressed responses cached by\nCloud CDN will not be served to clients." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customResponseHeaders": { - "description": "Headers that the Application Load Balancer should add to proxied responses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client\nwhen the resource is created.", - "type": "string" - }, - "edgeSecurityPolicy": { - "description": "[Output Only] The resource URL for the edge security policy associated with\nthis backend bucket.", - "type": "string" - }, - "enableCdn": { - "description": "If true, enable Cloud CDN for this BackendBucket.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#backendBucket", - "description": "Type of the resource.", - "type": "string" - }, - "loadBalancingScheme": { - "description": "The value can only be INTERNAL_MANAGED for cross-region internal layer 7\nload balancer.\n\nIf loadBalancingScheme is not specified, the backend bucket can be used by\nclassic global external load balancers, or global application external load\nbalancers, or both.", - "enum": [ - "EXTERNAL_MANAGED", - "INTERNAL_MANAGED" - ], - "enumDescriptions": [ - "Signifies that this will be used for regional external Application Load\nBalancers.", - "Signifies that this will be used for internal Application Load Balancers." - ], - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "BackendBucketParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the regional backend bucket\nresides. This field is not applicable to global backend buckets.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "usedBy": { - "description": "[Output Only] List of resources referencing that backend bucket.", - "items": { - "$ref": "BackendBucketUsedBy" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketAggregatedList": { - "id": "BackendBucketAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "BackendBucketsScopedList", - "description": "Name of the scope containing this set of BackendBuckets." - }, - "description": "A list of BackendBucketsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#backendBucketAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicy": { - "description": "Message containing Cloud CDN configuration for a backend bucket.", - "id": "BackendBucketCdnPolicy", - "properties": { - "bypassCacheOnRequestHeaders": { - "description": "Bypass the cache when the specified request headers are matched - e.g.\nPragma or Authorization headers. Up to 5 headers can be specified.\nThe cache is bypassed for all cdnPolicy.cacheMode settings.", - "items": { - "$ref": "BackendBucketCdnPolicyBypassCacheOnRequestHeader" - }, - "type": "array" - }, - "cacheKeyPolicy": { - "$ref": "BackendBucketCdnPolicyCacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - }, - "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend.\nThe possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching\nheaders to cache content. Responses without these headers will not be\ncached at Google's edge, and will require a full trip to the origin on\nevery request, potentially impacting performance and increasing load on\nthe origin server.FORCE_CACHE_ALL Cache all content, ignoring any \"private\",\n\"no-store\" or \"no-cache\" directives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content,\nincluding common image formats, media (video and audio), and web assets\n(JavaScript and CSS). Requests and responses that are marked as\nuncacheable, as well as dynamic content (including HTML), will not be\ncached.\n\nIf no value is provided for cdnPolicy.cacheMode, it defaults\nto CACHE_ALL_STATIC.", - "enum": [ - "CACHE_ALL_STATIC", - "FORCE_CACHE_ALL", - "INVALID_CACHE_MODE", - "USE_ORIGIN_HEADERS" - ], - "enumDescriptions": [ - "Automatically cache static content, including common image formats,\nmedia (video and audio), and web assets (JavaScript and CSS).\nRequests and responses that are marked as uncacheable, as well as\ndynamic content (including HTML), will not be cached.", - "Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\"\ndirectives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.", - "", - "Requires the origin to set valid caching headers to cache content.\nResponses without these headers will not be cached at Google's edge,\nand will require a full trip to the origin on every request,\npotentially impacting performance and increasing load on the\norigin server." - ], - "type": "string" - }, - "clientTtl": { - "description": "Specifies a separate client (e.g. browser client) maximum TTL. This is\nused to clamp the max-age (or Expires) value sent to the client. With\nFORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the\nresponse max-age directive, along with a \"public\" directive. For\ncacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age\nfrom the origin (if specified), or else sets the response max-age\ndirective to the lesser of the client_ttl and default_ttl, and also\nensures a \"public\" cache-control directive is present.\nIf a client TTL is not specified, a default value (1 hour) will be used.\nThe maximum allowed value is 31,622,400s (1 year).", - "format": "int32", - "type": "integer" - }, - "defaultTtl": { - "description": "Specifies the default TTL for cached content served by this origin for\nresponses that do not have an existing valid TTL (max-age or s-maxage).\nSetting a TTL of \"0\" means \"always revalidate\".\nThe value of defaultTTL cannot be set to a value greater than that of\nmaxTTL, but can be equal.\nWhen the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL\nwill overwrite the TTL set in all responses. The maximum allowed value is\n31,622,400s (1 year), noting that infrequently accessed objects may be\nevicted from the cache before the defined TTL.", - "format": "int32", - "type": "integer" - }, - "maxTtl": { - "description": "Specifies the maximum allowed TTL for cached content served by this\norigin.\nCache directives that attempt to set a max-age or s-maxage higher than\nthis, or an Expires header more than maxTTL seconds in the future will\nbe capped at the value of maxTTL, as if it were the value of an\ns-maxage Cache-Control directive.\nHeaders sent to the client will not be modified.\nSetting a TTL of \"0\" means \"always revalidate\".\nThe maximum allowed value is 31,622,400s (1 year), noting that\ninfrequently accessed objects may be evicted from the cache before\nthe defined TTL.", - "format": "int32", - "type": "integer" - }, - "negativeCaching": { - "description": "Negative caching allows per-status code TTLs to be set, in order\nto apply fine-grained caching for common errors or redirects.\nThis can reduce the load on your origin and improve end-user\nexperience by reducing response latency.\nWhen the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS,\nnegative caching applies to responses with the specified response code\nthat lack any Cache-Control, Expires, or Pragma: no-cache directives.\nWhen the cache mode is set to FORCE_CACHE_ALL, negative caching applies\nto all responses with the specified response code, and override any\ncaching headers.\nBy default, Cloud CDN will apply the following default TTLs to these\nstatus codes:\nHTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m\nHTTP 404 (Not Found), 410 (Gone),\n451 (Unavailable For Legal Reasons): 120s\nHTTP 405 (Method Not Found), 501 (Not Implemented): 60s.\nThese defaults can be overridden in negative_caching_policy.", - "type": "boolean" - }, - "negativeCachingPolicy": { - "description": "Sets a cache TTL for the specified HTTP status code.\nnegative_caching must be enabled to configure negative_caching_policy.\nOmitting the policy and leaving negative_caching enabled will use\nCloud CDN's default cache TTLs.\nNote that when specifying an explicit negative_caching_policy, you\nshould take care to specify a cache TTL for all response codes\nthat you wish to cache. Cloud CDN will not apply any default\nnegative caching when a policy exists.", - "items": { - "$ref": "BackendBucketCdnPolicyNegativeCachingPolicy" - }, - "type": "array" - }, - "requestCoalescing": { - "description": "If true then Cloud CDN will combine multiple concurrent cache fill\nrequests into a small number of requests to the origin.", - "type": "boolean" - }, - "serveWhileStale": { - "description": "Serve existing content from the cache (if available) when revalidating\ncontent with the origin, or when an error is encountered when refreshing\nthe cache.\nThis setting defines the default \"max-stale\" duration for any cached\nresponses that do not specify a max-stale directive. Stale responses that\nexceed the TTL configured here will not be served. The default limit\n(max-stale) is 86400s (1 day), which will allow stale content to be\nserved up to this limit beyond the max-age (or s-maxage) of a cached\nresponse.\nThe maximum allowed value is 604800 (1 week).\nSet this to zero (0) to disable serve-while-stale.", - "format": "int32", - "type": "integer" - }, - "signedUrlCacheMaxAgeSec": { - "description": "Maximum number of seconds the response to a signed URL request will be\nconsidered fresh. After this time period, the response will be\nrevalidated before being served. Defaults to 1hr (3600s). When serving\nresponses to signed URL requests, Cloud CDN will internally behave as\nthough all responses from this backend had a \"Cache-Control:\npublic, max-age=[TTL]\" header, regardless of any existing\nCache-Control header. The actual headers served in responses will not be\naltered.", - "format": "int64", - "type": "string" - }, - "signedUrlKeyNames": { - "description": "[Output Only] Names of the keys for signing request URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyBypassCacheOnRequestHeader": { - "description": "Bypass the cache when the specified request headers are present,\ne.g. Pragma or Authorization headers. Values are case insensitive.\nThe presence of such a header overrides the cache_mode setting.", - "id": "BackendBucketCdnPolicyBypassCacheOnRequestHeader", - "properties": { - "headerName": { - "description": "The header field name to match on when bypassing cache.\nValues are case-insensitive.", - "type": "string" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyCacheKeyPolicy": { - "description": "Message containing what to include in the cache key for a request for\nCloud CDN.", - "id": "BackendBucketCdnPolicyCacheKeyPolicy", - "properties": { - "includeHttpHeaders": { - "description": "Allows HTTP request headers (by name) to be used in the cache key.", - "items": { - "type": "string" - }, - "type": "array" - }, - "queryStringWhitelist": { - "description": "Names of query string parameters to include in cache keys. Default\nparameters are always included. '\u0026' and '=' will be percent encoded\nand not treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyNegativeCachingPolicy": { - "description": "Specify CDN TTLs for response error codes.", - "id": "BackendBucketCdnPolicyNegativeCachingPolicy", - "properties": { - "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes\n300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be\nspecified as values, and you cannot specify a status code more than\nonce.", - "format": "int32", - "type": "integer" - }, - "ttl": { - "description": "The TTL (in seconds) for which to cache responses with the\ncorresponding status code.\nThe maximum allowed value is 1800s (30 minutes), noting that\ninfrequently accessed objects may be evicted from the cache before the\ndefined TTL.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BackendBucketList": { - "description": "Contains a list of BackendBucket resources.", - "id": "BackendBucketList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendBucketList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketListUsable": { - "id": "BackendBucketListUsable", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableBackendBucketList", - "description": "[Output Only] Type of resource. Alwayscompute#usableBackendBucketList for lists of usable backend\nbuckets.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketParams": { - "description": "Additional Backend Bucket parameters.", - "id": "BackendBucketParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketUsedBy": { - "id": "BackendBucketUsedBy", - "properties": { - "reference": { - "description": "[Output Only] Server-defined URL for UrlMaps referencing that\nBackendBucket.", - "type": "string" - } - }, - "type": "object" - }, - "BackendBucketsScopedList": { - "id": "BackendBucketsScopedList", - "properties": { - "backendBuckets": { - "description": "A list of BackendBuckets contained in this scope.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendCustomMetric": { - "description": "Custom Metrics are used for CUSTOM_METRICS balancing_mode.", - "id": "BackendCustomMetric", - "properties": { - "dryRun": { - "description": "If true, the metric data is collected and reported to Cloud\nMonitoring, but is not used for load balancing.", - "type": "boolean" - }, - "maxUtilization": { - "description": "Optional parameter to define a target utilization for the Custom Metrics\nbalancing mode. The valid range is [0.0, 1.0].", - "format": "float", - "type": "number" - }, - "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters\nlong and match the regular expression\n`[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the\nfirst character must be a lowercase letter, and all following\ncharacters must be a dash, period, underscore, lowercase letter, or\ndigit, except the last character, which cannot be a dash, period, or\nunderscore. For usage guidelines, see Custom Metrics balancing mode. This\nfield can only be used for a global or regional backend service with the\nloadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "BackendService": { - "description": "Represents a Backend Service resource.\n\nA backend service defines how Google Cloud load balancers distribute traffic.\nThe backend service configuration contains a set of values, such as the\nprotocol used to connect to backends, various distribution and session\nsettings, health checks, and timeouts. These settings provide fine-grained\ncontrol over how your load balancer behaves. Most of the settings have\ndefault values that allow for easy configuration if you need to get started\nquickly.\n\nBackend services in Google Compute Engine can be either regionally or\nglobally scoped.\n\n* [Global](https://cloud.google.com/compute/docs/reference/rest/alpha/backendServices)\n* [Regional](https://cloud.google.com/compute/docs/reference/rest/alpha/regionBackendServices)\n\nFor more information, seeBackend\nServices.", - "id": "BackendService", - "properties": { - "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds. This setting is applicable to Application\nLoad Balancers and Traffic Director and requires\nGENERATED_COOKIE or HTTP_COOKIE session affinity.\n\nIf set to 0, the cookie is non-persistent and lasts only until\nthe end of the browser session (or equivalent). The maximum allowed value\nis two weeks (1,209,600).\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "allowMultinetwork": { - "description": "A boolean flag enabling multi-network mesh. This field is only allowed with\nload balancing scheme set to INTERNAL_SELF_MANAGED.", - "type": "boolean" - }, - "backends": { - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - }, - "type": "array" - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService. Only available for\nspecified load balancer types." - }, - "circuitBreakers": { - "$ref": "CircuitBreakers" - }, - "compressionMode": { - "description": "Compress text responses using Brotli or gzip compression, based on\nthe client's Accept-Encoding header.", - "enum": [ - "AUTOMATIC", - "DISABLED" - ], - "enumDescriptions": [ - "Automatically uses the best compression based on the Accept-Encoding\nheader sent by the client.", - "Disables compression. Existing compressed responses cached by\nCloud CDN will not be served to clients." - ], - "type": "string" - }, - "connectionDraining": { - "$ref": "ConnectionDraining", - "description": "connectionDraining cannot be specified with haPolicy." - }, - "connectionTrackingPolicy": { - "$ref": "BackendServiceConnectionTrackingPolicy", - "description": "Connection Tracking configuration for this BackendService. Connection\ntracking policy settings are only available for external passthrough\nNetwork Load Balancers and internal passthrough Network Load Balancers.\n\nconnectionTrackingPolicy cannot be specified with haPolicy." - }, - "consistentHash": { - "$ref": "ConsistentHashLoadBalancerSettings", - "description": "Consistent Hash-based load balancing can be used to provide soft session\naffinity based on HTTP headers, cookies or other properties. This load\nbalancing policy is applicable only for HTTP connections. The affinity to a\nparticular destination host will be lost when one or more hosts are\nadded/removed from the destination service. This field specifies parameters\nthat control consistent hashing. This field is only applicable whenlocalityLbPolicy is set to MAGLEV orRING_HASH.\n\nThis field is applicable to either:\n \n - A regional backend service with the service_protocol set to HTTP,\n HTTPS, HTTP2 or H2C, and load_balancing_scheme set to\n INTERNAL_MANAGED. \n - A global backend service with the\n load_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customMetrics": { - "description": "List of custom metrics that are used for theWEIGHTED_ROUND_ROBIN locality_lb_policy.", - "items": { - "$ref": "BackendServiceCustomMetric" - }, - "type": "array" - }, - "customRequestHeaders": { - "description": "Headers that the load balancer adds to proxied requests. See [Creating\ncustom\nheaders](https://cloud.google.com/load-balancing/docs/custom-headers).", - "items": { - "type": "string" - }, - "type": "array" - }, - "customResponseHeaders": { - "description": "Headers that the load balancer adds to proxied responses. See [Creating\ncustom\nheaders](https://cloud.google.com/load-balancing/docs/custom-headers).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "dynamicForwarding": { - "$ref": "BackendServiceDynamicForwarding", - "description": "Dynamic forwarding configuration. This field is used to configure the\nbackend service with dynamic forwarding feature which together with Service\nExtension allows customized and complex routing logic." - }, - "edgeSecurityPolicy": { - "description": "[Output Only] The resource URL for the edge security policy associated with\nthis backend service.", - "type": "string" - }, - "enableCDN": { - "description": "If true, enables Cloud CDN for the backend service of a\nglobal external Application Load Balancer.", - "type": "boolean" - }, - "externalManagedMigrationState": { - "description": "Specifies the canary migration state. Possible values are PREPARE,\nTEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC.\n\nTo begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be\nchanged to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before\nthe loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate traffic by percentage using\nexternalManagedMigrationTestingPercentage.\n\nRolling back a migration requires the states to be set in reverse order. So\nchanging the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to\nbe set to TEST_ALL_TRAFFIC at the same time. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate some traffic back to\nEXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", - "enum": [ - "PREPARE", - "TEST_ALL_TRAFFIC", - "TEST_BY_PERCENTAGE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "externalManagedMigrationTestingPercentage": { - "description": "Determines the fraction of requests that should be processed by the Global\nexternal Application Load Balancer.\n\nThe value of this field must be in the range [0, 100].\n\nSession affinity options will slightly affect this routing behavior, for\nmore details, see:Session\nAffinity.\n\nThis value can only be set if the loadBalancingScheme in the BackendService\nis set to EXTERNAL (when using the classic Application Load Balancer) and\nthe migration state is TEST_BY_PERCENTAGE.", - "format": "float", - "type": "number" - }, - "failoverPolicy": { - "$ref": "BackendServiceFailoverPolicy", - "description": "Requires at least one backend instance group to be defined\nas a backup (failover) backend.\nFor load balancers that have configurable failover:\n[Internal passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\n\nfailoverPolicy cannot be specified with haPolicy." - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a BackendService. An up-to-date fingerprint must be provided in\norder to update the BackendService, otherwise the request will\nfail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a BackendService.", - "format": "byte", - "type": "string" - }, - "haPolicy": { - "$ref": "BackendServiceHAPolicy", - "description": "Configures self-managed High Availability (HA) for External and Internal\nProtocol Forwarding.\n\nThe backends of this regional backend service must only specify zonal\nnetwork endpoint groups (NEGs) of type GCE_VM_IP.\n\nWhen haPolicy is set for an Internal Passthrough Network Load Balancer, the\nregional backend service must set the network field. All zonal NEGs must\nbelong to the same network. However, individual NEGs can\nbelong to different subnetworks of that network.\n\nWhen haPolicy is specified, the set of attached network endpoints across\nall backends comprise an High Availability domain from which one endpoint\nis selected as the active endpoint (the leader) that receives all\ntraffic.\n\nhaPolicy can be added only at backend service creation time. Once set up,\nit cannot be deleted.\n\nNote that haPolicy is not for load balancing, and therefore cannot be\nspecified with sessionAffinity, connectionTrackingPolicy, and\nfailoverPolicy.\n\nhaPolicy requires customers to be responsible for tracking backend\nendpoint health and electing a leader among the healthy endpoints.\nTherefore, haPolicy cannot be specified with healthChecks.\n\nhaPolicy can only be specified for External Passthrough Network Load\nBalancers and Internal Passthrough Network Load Balancers." - }, - "healthChecks": { - "description": "The list of URLs to the healthChecks, httpHealthChecks (legacy), or\nhttpsHealthChecks (legacy) resource for health checking this backend\nservice. Not all backend services support legacy health checks. See\nLoad balancer guide. Currently, at most one health check can be\nspecified for each backend service. Backend services with\ninstance group or zonal NEG backends must have a health check unless\nhaPolicy is specified. Backend services with internet or serverless NEG\nbackends must not have a health check.\n\nhealthChecks[] cannot be specified with haPolicy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "iap": { - "$ref": "BackendServiceIAP", - "description": "The configurations for Identity-Aware Proxy on this resource.\nNot available for internal passthrough Network Load Balancers and external\npassthrough Network Load Balancers." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipAddressSelectionPolicy": { - "description": "Specifies a preference for traffic sent from the proxy to the backend (or\nfrom the client to the backend for proxyless gRPC).\nThe possible values are:\n \n - IPV4_ONLY: Only send IPv4 traffic to the backends of the\n backend service (Instance Group, Managed Instance Group, Network Endpoint\n Group), regardless of traffic from the client to the proxy. Only IPv4\n health checks are used to check the health of the backends. This is the\n default setting.\n - PREFER_IPV6: Prioritize the connection to the endpoint's\n IPv6 address over its IPv4 address (provided there is a healthy IPv6\n address).\n - IPV6_ONLY: Only send IPv6 traffic to the backends of the\n backend service (Instance Group, Managed Instance Group, Network Endpoint\n Group), regardless of traffic from the client to the proxy. Only IPv6\n health checks are used to check the health of the backends.\n\n\n\nThis field is applicable to either:\n \n - Advanced global external Application Load Balancer (load balancing\n scheme EXTERNAL_MANAGED), \n - Regional external Application Load\n Balancer, \n - Internal proxy Network Load Balancer (load balancing\n scheme INTERNAL_MANAGED), \n - Regional internal Application Load\n Balancer (load balancing scheme INTERNAL_MANAGED), \n - Traffic\n Director with Envoy proxies and proxyless gRPC (load balancing scheme\n INTERNAL_SELF_MANAGED).", - "enum": [ - "IPV4_ONLY", - "IPV6_ONLY", - "IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED", - "PREFER_IPV6" - ], - "enumDescriptions": [ - "Only send IPv4 traffic to the backends of the Backend Service\n(Instance Group, Managed Instance Group, Network Endpoint Group)\nregardless of traffic from the client to the proxy.\nOnly IPv4 health-checks are used to check the health of the backends.\nThis is the default setting.", - "Only send IPv6 traffic to the backends of the Backend Service\n(Instance Group, Managed Instance Group, Network Endpoint Group)\nregardless of traffic from the client to the proxy. Only IPv6\nhealth-checks are used to check the health of the backends.", - "Unspecified IP address selection policy.", - "Prioritize the connection to the endpoints IPv6 address\nover its IPv4 address (provided there is a healthy IPv6 address)." - ], - "type": "string" - }, - "kind": { - "default": "compute#backendService", - "description": "[Output Only] Type of resource. Always compute#backendService\nfor backend services.", - "type": "string" - }, - "loadBalancingScheme": { - "description": "Specifies the load balancer type. A backend service\ncreated for one type of load balancer cannot be used with another.\nFor more information, refer toChoosing\na load balancer.", - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "EXTERNAL_PASSTHROUGH", - "INTERNAL", - "INTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "Signifies that this will be used for classic Application Load Balancers,\nglobal external proxy Network Load Balancers,\nor external passthrough Network Load Balancers.", - "Signifies that this will be used for global external Application Load\nBalancers, regional external Application Load Balancers, or regional\nexternal proxy Network Load Balancers.", - "Signifies that this will be used for global external passthrough Network\nLoad Balancers.", - "Signifies that this will be used for internal passthrough Network Load\nBalancers.", - "Signifies that this will be used for internal Application Load Balancers.", - "Signifies that this will be used by Traffic Director.", - "" - ], - "type": "string" - }, - "localityLbPolicies": { - "description": "A list of locality load-balancing policies to be used in order of\npreference. When you use localityLbPolicies, you must set at least one\nvalue for either the localityLbPolicies[].policy or the\nlocalityLbPolicies[].customPolicy field. localityLbPolicies overrides any\nvalue set in the localityLbPolicy field.\n\nFor an example of how to use this field, seeDefine\na list of preferred policies.\n\nCaution: This field and its children are intended for use in a service mesh\nthat includes gRPC clients only. Envoy proxies can't use backend services\nthat have this configuration.", - "items": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfig" - }, - "type": "array" - }, - "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The\npossible values are:\n \n - ROUND_ROBIN: This is a simple policy in which each healthy\n backend is selected in round robin order. This is the default.\n - LEAST_REQUEST: An O(1) algorithm which\n selects two random healthy hosts and picks the host which has fewer active\n requests.\n - RING_HASH: The ring/modulo hash load balancer implements\n consistent hashing to backends. The algorithm has the property that the\n addition/removal of a host from a set of N hosts only affects 1/N of the\n requests.\n - RANDOM: The load balancer selects a random healthy\n host.\n - ORIGINAL_DESTINATION: Backend host is selected\n based on the client connection metadata, i.e., connections are opened to\n the same address as the destination address of the incoming connection\n before the connection was redirected to the load balancer.\n - MAGLEV: used as a drop in replacement for the ring hash\n load balancer. Maglev is not as stable as ring hash but has faster table\n lookup build times and host selection times. For more information about\n Maglev, see Maglev:\n A Fast and Reliable Software Network Load Balancer.\n - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin\n Load Balancing using weights computed from Backend reported Custom Metrics.\n If set, the Backend Service responses are expected to contain non-standard\n HTTP response header field Endpoint-Load-Metrics. The reported\n metrics to use for computing the weights are specified via thecustomMetrics field.\n \n This field is applicable to either:\n - A regional backend service with the service_protocol set to HTTP,\n HTTPS, HTTP2 or H2C, and load_balancing_scheme set to\n INTERNAL_MANAGED. \n - A global backend service with the\n load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or\n EXTERNAL_MANAGED.\n \n \n If sessionAffinity is not configured—that is, if session\n affinity remains at the default value of NONE—then the\n default value for localityLbPolicy\n is ROUND_ROBIN. If session affinity is set to a value other\n than NONE,\n then the default value for localityLbPolicy isMAGLEV.\n \n Only ROUND_ROBIN and RING_HASH are supported\n when the backend service is referenced by a URL map that is bound to\n target gRPC proxy that has validateForProxyless field set to true.\n \n localityLbPolicy cannot be specified with haPolicy.", - "enum": [ - "INVALID_LB_POLICY", - "LEAST_REQUEST", - "MAGLEV", - "ORIGINAL_DESTINATION", - "RANDOM", - "RING_HASH", - "ROUND_ROBIN", - "WEIGHTED_GCP_RENDEZVOUS", - "WEIGHTED_MAGLEV", - "WEIGHTED_ROUND_ROBIN" - ], - "enumDescriptions": [ - "", - "An O(1) algorithm which selects two random healthy hosts and\npicks the host which has fewer active requests.", - "This algorithm implements consistent hashing to backends. Maglev can be\nused as a drop in replacement for the ring hash load balancer. Maglev is\nnot as stable as ring hash but has faster table lookup build times and\nhost selection times. For more information about Maglev, seeMaglev:\nA Fast and Reliable Software Network Load Balancer.", - "Backend host is selected based on the client connection metadata, i.e.,\nconnections are opened to the same address as the destination address of\nthe incoming connection before the connection was redirected to the load\nbalancer.", - "The load balancer selects a random healthy host.", - "The ring/modulo hash load balancer implements consistent hashing to\nbackends. The algorithm has the property that the addition/removal\nof a host from a set of N hosts only affects 1/N of the requests.", - "This is a simple policy in which each healthy backend is selected\nin round robin order. This is the default.", - "Per-instance weighted Load Balancing via health check reported weights.\nIn internal passthrough network load balancing, it is weighted\nrendezvous hashing.\nThis option is only supported in internal passthrough network load\nbalancing.", - "Per-instance weighted Load Balancing via health check reported weights.\nIf set, the Backend Service must configure a non legacy HTTP-based Health\nCheck, and health check replies are expected to contain non-standard HTTP\nresponse header field X-Load-Balancing-Endpoint-Weight to specify the\nper-instance weights.\nIf set, Load Balancing is weighted based on the\nper-instance weights reported in the last processed health check replies,\nas long as every instance either reported a valid weight or had\nUNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight.\nThis option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed\nfrom Backend reported Custom Metrics. If set, the Backend Service\nresponses are expected to contain non-standard HTTP response header field\nEndpoint-Load-Metrics. The reported metrics\nto use for computing the weights are specified via the\ncustomMetrics fields." - ], - "type": "string" - }, - "logConfig": { - "$ref": "BackendServiceLogConfig", - "description": "This field denotes the logging options for the load balancer traffic served\nby this backend service. If logging is enabled, logs will be exported to\nStackdriver." - }, - "maxStreamDuration": { - "$ref": "Duration", - "description": "Specifies the default maximum duration (timeout) for streams to this\nservice. Duration is computed from the beginning of the stream until the\nresponse has been completely processed, including all retries. A stream\nthat does not complete in this duration is closed.\n\nIf not specified, there will be no timeout limit, i.e. the maximum\nduration is infinite.\n\nThis value can be overridden in the PathMatcher configuration of the\nUrlMap that references this backend service.\n\nThis field is only allowed when the loadBalancingScheme of\nthe backend service is INTERNAL_SELF_MANAGED." - }, - "metadatas": { - "additionalProperties": { - "type": "string" - }, - "description": "Deployment metadata associated with the resource to be set by a GKE hub\ncontroller and read by the backend RCTH", - "type": "object" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network to which this backend service belongs.\n\nThis field must be set for Internal Passthrough Network Load Balancers when\nthe haPolicy is enabled, and for External Passthrough Network Load\nBalancers when the haPolicy fastIpMove is enabled.\n\nThis field can only be specified when the load balancing scheme is set toINTERNAL, or when the load balancing scheme is set toEXTERNAL and haPolicy fastIpMove is enabled.", - "type": "string" - }, - "networkPassThroughLbTrafficPolicy": { - "$ref": "BackendServiceNetworkPassThroughLbTrafficPolicy", - "description": "Configures traffic steering properties of internal passthrough Network\nLoad Balancers.\n\nnetworkPassThroughLbTrafficPolicy cannot be specified with haPolicy." - }, - "outlierDetection": { - "$ref": "OutlierDetection", - "description": "Settings controlling the ejection of unhealthy backend endpoints from the\nload balancing pool of each individual proxy instance that processes the\ntraffic for the given backend service. If not set, this feature is\nconsidered disabled.\n\nResults of the outlier detection algorithm (ejection of endpoints from the\nload balancing pool and returning them back to the pool) are executed\nindependently by each proxy instance of the load balancer. In most cases,\nmore than one proxy instance handles the traffic received by a backend\nservice. Thus, it is possible that an unhealthy endpoint is detected and\nejected by only some of the proxies, and while this happens, other proxies\nmay continue to send requests to the same unhealthy endpoint until they\ndetect and eject the unhealthy endpoint.\n\nApplicable backend endpoints can be:\n \n - VM instances in an Instance Group\n - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT)\n - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT)\n - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud\n Functions Services \n - Private Service Connect NEGs, that resolve to\n Google-managed regional API endpoints or managed services published using\n Private Service Connect\n\n\n\nApplicable backend service types can be:\n \n - A global backend service with the loadBalancingScheme set to\n INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. \n - A regional backend\n service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and\n loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not\n supported for Serverless NEGs.\n\n\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true." - }, - "params": { - "$ref": "BackendServiceParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "port": { - "deprecated": true, - "description": "Deprecated in favor of portName. The TCP port to connect on\nthe backend. The default value is 80.\nFor internal passthrough Network Load Balancers and external passthrough\nNetwork Load Balancers, omit port.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "A named port on a backend instance group representing the port for\ncommunication to the backend VMs in that group. The\nnamed port must be [defined on each backend instance\ngroup](https://cloud.google.com/load-balancing/docs/backend-service#named_ports).\nThis parameter has no meaning if the backends are NEGs. For internal\npassthrough Network Load Balancers and external passthrough Network Load\nBalancers, omit port_name.", - "type": "string" - }, - "protocol": { - "description": "The protocol this BackendService uses to communicate\nwith backends.\n\nPossible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC.\ndepending on the chosen load balancer or Traffic Director configuration.\nRefer to the documentation for the load balancers or for Traffic Director\nfor more information.\n\nMust be set to GRPC when the backend service is referenced by a URL map\nthat is bound to target gRPC proxy.", - "enum": [ - "ALL", - "GRPC", - "H2C", - "HTTP", - "HTTP2", - "HTTPS", - "SSL", - "TCP", - "UDP", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "ALL includes TCP, UDP, ICMP, ESP, AH and SCTP. Note that this\nshould never be used together with target_xx_proxies.", - "gRPC (available for Traffic Director).", - "HTTP2 over cleartext", - "", - "HTTP/2 with SSL.", - "", - "TCP proxying with SSL.", - "TCP proxying or TCP pass-through.", - "UDP.", - "If a Backend Service has UNSPECIFIED as its protocol, it can be used with\nany L3/L4 Forwarding Rules." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional backend service\nresides. This field is not applicable to global backend services.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\nbackend service.", - "type": "string" - }, - "securitySettings": { - "$ref": "SecuritySettings", - "description": "This field specifies the security settings that apply to this backend\nservice. This field is applicable to a global backend service with the\nload_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serviceBindings": { - "description": "URLs of networkservices.ServiceBinding resources.\n\nCan only be set if load balancing scheme is INTERNAL_SELF_MANAGED.\nIf set, lists of backends and health checks must be both empty.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceLbPolicy": { - "description": "URL to networkservices.ServiceLbPolicy resource.\n\nCan only be set if load balancing scheme is EXTERNAL_MANAGED,\nINTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.", - "type": "string" - }, - "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nOnly NONE and HEADER_FIELD are supported\nwhen the backend service is referenced by a URL map that is bound to\ntarget gRPC proxy that has validateForProxyless field set to true.\n\nFor more details, see:\n[Session\nAffinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).\n\nsessionAffinity cannot be specified with haPolicy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_NO_DESTINATION", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "HEADER_FIELD", - "HTTP_COOKIE", - "NONE", - "STRONG_COOKIE_AFFINITY" - ], - "enumDescriptions": [ - "2-tuple hash on packet's source and destination IP addresses. Connections\nfrom the same source IP address to the same destination IP address will be\nserved by the same backend VM while that VM remains healthy.", - "1-tuple hash only on packet's source IP address. Connections from the\nsame source IP address will be served by the same backend VM while that VM\nremains healthy. This option can only be used for Internal TCP/UDP\nLoad Balancing.", - "5-tuple hash on packet's source and destination IP addresses, IP protocol,\nand source and destination ports. Connections for the same IP protocol\nfrom the same source IP address and port to the same destination IP address\nand port will be served by the same backend VM while that VM remains\nhealthy. This option cannot be used for HTTP(S) load balancing.", - "3-tuple hash on packet's source and destination IP addresses, and IP\nprotocol. Connections for the same IP protocol from the same source IP\naddress to the same destination IP address will be served by the same\nbackend VM while that VM remains healthy. This option cannot be used for\nHTTP(S) load balancing.", - "Hash based on a cookie generated by the L7 loadbalancer.\nOnly valid for HTTP(S) load balancing.", - "The hash is based on a user specified header field.", - "The hash is based on a user provided cookie.", - "No session affinity. Connections from the same client IP may go\nto any instance in the pool.", - "Strong cookie-based affinity. Connections bearing the same cookie will be\nserved by the same backend VM while that VM remains healthy, as long as the\ncookie has not expired." - ], - "type": "string" - }, - "strongSessionAffinityCookie": { - "$ref": "BackendServiceHttpCookie", - "description": "Describes the HTTP cookie used for stateful session affinity. This field is\napplicable and required if the sessionAffinity is set toSTRONG_COOKIE_AFFINITY." - }, - "subsetting": { - "$ref": "Subsetting", - "description": "subsetting cannot be specified with haPolicy." - }, - "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the\ntype of load balancer. For more information see,\nBackend service settings.\nThe default is 30 seconds.\nThe full range of timeout values allowed goes from 1\nthrough 2,147,483,647 seconds.\n\nThis value can be overridden in the PathMatcher configuration of the\nUrlMap that references this backend service.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.\nInstead, use maxStreamDuration.", - "format": "int32", - "type": "integer" - }, - "tlsSettings": { - "$ref": "BackendServiceTlsSettings", - "description": "Configuration for Backend Authenticated TLS and mTLS. May only be specified\nwhen the backend protocol is SSL, HTTPS or HTTP2." - }, - "usedBy": { - "description": "[Output Only] List of resources referencing given backend service.", - "items": { - "$ref": "BackendServiceUsedBy" - }, - "type": "array" - }, - "vpcNetworkScope": { - "description": "The network scope of the backends that can be added to the backend\nservice. This field can be either GLOBAL_VPC_NETWORK orREGIONAL_VPC_NETWORK.\n\nA backend service with the VPC scope set to GLOBAL_VPC_NETWORK\nis only allowed to have backends in global VPC networks.\n\nWhen the VPC scope is set to REGIONAL_VPC_NETWORK the backend\nservice is only allowed to have backends in regional networks in the same\nscope as the backend service.\nNote: if not specified then GLOBAL_VPC_NETWORK will be used.", - "enum": [ - "GLOBAL_VPC_NETWORK", - "REGIONAL_VPC_NETWORK" - ], - "enumDescriptions": [ - "The backend service can only have backends in global VPCs", - "The backend service can only have backends in regional VPCs" - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceAggregatedList": { - "description": "Contains a list of BackendServicesScopedList.", - "id": "BackendServiceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." - }, - "description": "A list of BackendServicesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#backendServiceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicy": { - "description": "Message containing Cloud CDN configuration for a backend service.", - "id": "BackendServiceCdnPolicy", - "properties": { - "bypassCacheOnRequestHeaders": { - "description": "Bypass the cache when the specified request headers are matched - e.g.\nPragma or Authorization headers. Up to 5 headers can be specified.\nThe cache is bypassed for all cdnPolicy.cacheMode settings.", - "items": { - "$ref": "BackendServiceCdnPolicyBypassCacheOnRequestHeader" - }, - "type": "array" - }, - "cacheKeyPolicy": { - "$ref": "CacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - }, - "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend.\nThe possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching\nheaders to cache content. Responses without these headers will not be\ncached at Google's edge, and will require a full trip to the origin on\nevery request, potentially impacting performance and increasing load on\nthe origin server.FORCE_CACHE_ALL Cache all content, ignoring any \"private\",\n\"no-store\" or \"no-cache\" directives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content,\nincluding common image formats, media (video and audio), and web assets\n(JavaScript and CSS). Requests and responses that are marked as\nuncacheable, as well as dynamic content (including HTML), will not be\ncached.\n\nIf no value is provided for cdnPolicy.cacheMode, it defaults\nto CACHE_ALL_STATIC.", - "enum": [ - "CACHE_ALL_STATIC", - "FORCE_CACHE_ALL", - "INVALID_CACHE_MODE", - "USE_ORIGIN_HEADERS" - ], - "enumDescriptions": [ - "Automatically cache static content, including common image formats,\nmedia (video and audio), and web assets (JavaScript and CSS).\nRequests and responses that are marked as uncacheable, as well as\ndynamic content (including HTML), will not be cached.", - "Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\"\ndirectives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.", - "", - "Requires the origin to set valid caching headers to cache content.\nResponses without these headers will not be cached at Google's edge,\nand will require a full trip to the origin on every request,\npotentially impacting performance and increasing load on the\norigin server." - ], - "type": "string" - }, - "clientTtl": { - "description": "Specifies a separate client (e.g. browser client) maximum TTL. This is\nused to clamp the max-age (or Expires) value sent to the client. With\nFORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the\nresponse max-age directive, along with a \"public\" directive. For\ncacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age\nfrom the origin (if specified), or else sets the response max-age\ndirective to the lesser of the client_ttl and default_ttl, and also\nensures a \"public\" cache-control directive is present.\nIf a client TTL is not specified, a default value (1 hour) will be used.\nThe maximum allowed value is 31,622,400s (1 year).", - "format": "int32", - "type": "integer" - }, - "defaultTtl": { - "description": "Specifies the default TTL for cached content served by this origin for\nresponses that do not have an existing valid TTL (max-age or s-maxage).\nSetting a TTL of \"0\" means \"always revalidate\".\nThe value of defaultTTL cannot be set to a value greater than that of\nmaxTTL, but can be equal.\nWhen the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL\nwill overwrite the TTL set in all responses. The maximum allowed value is\n31,622,400s (1 year), noting that infrequently accessed objects may be\nevicted from the cache before the defined TTL.", - "format": "int32", - "type": "integer" - }, - "maxTtl": { - "description": "Specifies the maximum allowed TTL for cached content served by this\norigin.\nCache directives that attempt to set a max-age or s-maxage higher than\nthis, or an Expires header more than maxTTL seconds in the future will\nbe capped at the value of maxTTL, as if it were the value of an\ns-maxage Cache-Control directive.\nHeaders sent to the client will not be modified.\nSetting a TTL of \"0\" means \"always revalidate\".\nThe maximum allowed value is 31,622,400s (1 year), noting that\ninfrequently accessed objects may be evicted from the cache before\nthe defined TTL.", - "format": "int32", - "type": "integer" - }, - "negativeCaching": { - "description": "Negative caching allows per-status code TTLs to be set, in order\nto apply fine-grained caching for common errors or redirects.\nThis can reduce the load on your origin and improve end-user\nexperience by reducing response latency.\nWhen the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS,\nnegative caching applies to responses with the specified response code\nthat lack any Cache-Control, Expires, or Pragma: no-cache directives.\nWhen the cache mode is set to FORCE_CACHE_ALL, negative caching applies\nto all responses with the specified response code, and override any\ncaching headers.\nBy default, Cloud CDN will apply the following default TTLs to these\nstatus codes:\nHTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m\nHTTP 404 (Not Found), 410 (Gone),\n451 (Unavailable For Legal Reasons): 120s\nHTTP 405 (Method Not Found), 501 (Not Implemented): 60s.\nThese defaults can be overridden in negative_caching_policy.", - "type": "boolean" - }, - "negativeCachingPolicy": { - "description": "Sets a cache TTL for the specified HTTP status code.\nnegative_caching must be enabled to configure negative_caching_policy.\nOmitting the policy and leaving negative_caching enabled will use\nCloud CDN's default cache TTLs.\nNote that when specifying an explicit negative_caching_policy, you\nshould take care to specify a cache TTL for all response codes\nthat you wish to cache. Cloud CDN will not apply any default\nnegative caching when a policy exists.", - "items": { - "$ref": "BackendServiceCdnPolicyNegativeCachingPolicy" - }, - "type": "array" - }, - "requestCoalescing": { - "description": "If true then Cloud CDN will combine multiple concurrent cache fill\nrequests into a small number of requests to the origin.", - "type": "boolean" - }, - "serveWhileStale": { - "description": "Serve existing content from the cache (if available) when revalidating\ncontent with the origin, or when an error is encountered when refreshing\nthe cache.\nThis setting defines the default \"max-stale\" duration for any cached\nresponses that do not specify a max-stale directive. Stale responses that\nexceed the TTL configured here will not be served. The default limit\n(max-stale) is 86400s (1 day), which will allow stale content to be\nserved up to this limit beyond the max-age (or s-maxage) of a cached\nresponse.\nThe maximum allowed value is 604800 (1 week).\nSet this to zero (0) to disable serve-while-stale.", - "format": "int32", - "type": "integer" - }, - "signedUrlCacheMaxAgeSec": { - "description": "Maximum number of seconds the response to a signed URL request will be\nconsidered fresh. After this time period, the response will be\nrevalidated before being served. Defaults to 1hr (3600s). When serving\nresponses to signed URL requests, Cloud CDN will internally behave as\nthough all responses from this backend had a \"Cache-Control:\npublic, max-age=[TTL]\" header, regardless of any existing\nCache-Control header. The actual headers served in responses will not be\naltered.", - "format": "int64", - "type": "string" - }, - "signedUrlKeyNames": { - "description": "[Output Only] Names of the keys for signing request URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicyBypassCacheOnRequestHeader": { - "description": "Bypass the cache when the specified request headers are present,\ne.g. Pragma or Authorization headers. Values are case insensitive.\nThe presence of such a header overrides the cache_mode setting.", - "id": "BackendServiceCdnPolicyBypassCacheOnRequestHeader", - "properties": { - "headerName": { - "description": "The header field name to match on when bypassing cache.\nValues are case-insensitive.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicyNegativeCachingPolicy": { - "description": "Specify CDN TTLs for response error codes.", - "id": "BackendServiceCdnPolicyNegativeCachingPolicy", - "properties": { - "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes\n300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be\nspecified as values, and you cannot specify a status code more than\nonce.", - "format": "int32", - "type": "integer" - }, - "ttl": { - "description": "The TTL (in seconds) for which to cache responses with the\ncorresponding status code.\nThe maximum allowed value is 1800s (30 minutes), noting that\ninfrequently accessed objects may be evicted from the cache before the\ndefined TTL.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BackendServiceConnectionTrackingPolicy": { - "description": "Connection Tracking configuration for this BackendService.", - "id": "BackendServiceConnectionTrackingPolicy", - "properties": { - "connectionPersistenceOnUnhealthyBackends": { - "description": "Specifies connection persistence when backends are unhealthy. The default\nvalue is DEFAULT_FOR_PROTOCOL.\n\nIf set to DEFAULT_FOR_PROTOCOL, the existing connections\npersist on unhealthy backends only for connection-oriented protocols\n(TCP and SCTP) and only if the Tracking Mode isPER_CONNECTION (default tracking mode) or the Session\nAffinity is configured for 5-tuple. They do not persist forUDP.\n\nIf set to NEVER_PERSIST, after a backend becomes unhealthy,\nthe existing connections on the unhealthy backend are never persisted on\nthe unhealthy backend. They are always diverted to newly selected healthy\nbackends (unless all backends are unhealthy).\n\nIf set to ALWAYS_PERSIST, existing connections always\npersist on unhealthy backends regardless of protocol and session\naffinity. It is generally not recommended to use this mode overriding the\ndefault.\n\nFor more details, see [Connection Persistence for Network Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#connection-persistence)\nand [Connection Persistence for Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal#connection-persistence).", - "enum": [ - "ALWAYS_PERSIST", - "DEFAULT_FOR_PROTOCOL", - "NEVER_PERSIST" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "enableStrongAffinity": { - "description": "Enable Strong Session Affinity for external passthrough Network Load\nBalancers. This option is not available publicly.", - "type": "boolean" - }, - "idleTimeoutSec": { - "description": "Specifies how long to keep a Connection Tracking entry while there is no\nmatching traffic (in seconds).\n\nFor internal passthrough Network Load Balancers:\n \n - The minimum (default) is 10 minutes and the maximum is 16 hours.\n - It can be set only if Connection Tracking is less than 5-tuple\n (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or CLIENT_IP_PROTO, and Tracking\n Mode is PER_SESSION).\n\n\n\nFor external passthrough Network Load Balancers the default is 60\nseconds. This option is not available publicly.", - "format": "int32", - "type": "integer" - }, - "trackingMode": { - "description": "Specifies the key used for connection tracking. There are two\noptions:\n \n - PER_CONNECTION: This is the default mode. The Connection\n Tracking is performed as per the Connection Key (default Hash Method) for\n the specific protocol.\n - PER_SESSION: The Connection Tracking is performed as per\n the configured Session Affinity. It matches the configured Session\n Affinity.\n\n\n\nFor more details, see [Tracking Mode for Network Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#tracking-mode)\nand [Tracking Mode for Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal#tracking-mode).", - "enum": [ - "INVALID_TRACKING_MODE", - "PER_CONNECTION", - "PER_SESSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceCustomMetric": { - "description": "Custom Metrics are used for WEIGHTED_ROUND_ROBIN\nlocality_lb_policy.", - "id": "BackendServiceCustomMetric", - "properties": { - "dryRun": { - "description": "If true, the metric data is not used for load balancing.", - "type": "boolean" - }, - "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters\nlong and match the regular expression\n`[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the\nfirst character must be a lowercase letter, and all following\ncharacters must be a dash, period, underscore, lowercase letter, or\ndigit, except the last character, which cannot be a dash, period, or\nunderscore. For usage guidelines, see Custom Metrics balancing mode. This\nfield can only be used for a global or regional backend service with the\nloadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceDynamicForwarding": { - "description": "Defines a dynamic forwarding configuration for the backend service.", - "id": "BackendServiceDynamicForwarding", - "properties": { - "ipPortSelection": { - "$ref": "BackendServiceDynamicForwardingIpPortSelection", - "description": "IP:PORT based dynamic forwarding configuration." - } - }, - "type": "object" - }, - "BackendServiceDynamicForwardingIpPortSelection": { - "description": "Defines a IP:PORT based dynamic forwarding configuration for the backend\nservice. Some ranges are restricted: Restricted\nranges.", - "id": "BackendServiceDynamicForwardingIpPortSelection", - "properties": { - "enabled": { - "description": "A boolean flag enabling IP:PORT based dynamic forwarding.", - "type": "boolean" - } - }, - "type": "object" - }, - "BackendServiceFailoverPolicy": { - "description": "For load balancers that have configurable\nfailover:\n[Internal passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\nOn failover or failback, this field indicates whether connection draining\nwill be honored. Google Cloud has a fixed connection draining timeout of\n10 minutes. A setting of true terminates existing TCP\nconnections to the active pool during failover and failback, immediately\ndraining traffic. A setting of false allows existing TCP\nconnections to persist, even on VMs no longer in the active pool, for up\nto the duration of the connection draining timeout (10 minutes).", - "id": "BackendServiceFailoverPolicy", - "properties": { - "disableConnectionDrainOnFailover": { - "description": "This can be set to true only if the protocol isTCP.\n\nThe default is false.", - "type": "boolean" - }, - "dropTrafficIfUnhealthy": { - "description": "If set to true, connections to the\nload balancer are dropped when all primary and all backup backend VMs are\nunhealthy.If set to false, connections are distributed\namong all primary VMs when all primary and all backup backend VMs are\n unhealthy.\nFor load balancers that have configurable\nfailover:\n[Internal passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\nThe default is false.", - "type": "boolean" - }, - "failoverRatio": { - "description": "The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a\nfailover when the number of healthy primary VMs equals zero.\nFor all other values, the load balancer performs a failover when the\ntotal number of healthy primary VMs is less than this ratio.\nFor load balancers that have configurable\nfailover:\n[Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceGroupHealth": { - "id": "BackendServiceGroupHealth", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata defined as annotations on the network endpoint group.", - "type": "object" - }, - "healthStatus": { - "description": "Health state of the backend instances or endpoints in requested instance or\nnetwork endpoint group, determined based on configured health checks.", - "items": { - "$ref": "HealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendServiceGroupHealth", - "description": "[Output Only] Type of resource. Alwayscompute#backendServiceGroupHealth for the health of backend\nservices.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceHAPolicy": { - "id": "BackendServiceHAPolicy", - "properties": { - "fastIPMove": { - "description": "Specifies whether fast IP move is enabled, and if so, the mechanism to\nachieve it.\n\nSupported values are:\n \n - DISABLED: Fast IP Move is disabled. You can only use the\n haPolicy.leader API to update the leader.\n - \u003eGARP_RA: Provides a method to very quickly define a new network\n endpoint as the leader. This method is faster than updating the leader\n using the haPolicy.leader API. Fast IP move works as follows: The VM\n hosting the network endpoint that should become the new leader sends\n either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router\n Advertisement(RA) packet (IPv6). Google Cloud immediately but\n temporarily associates the forwarding rule IP address with that VM, and\n both new and in-flight packets are quickly delivered to that VM.\n\n\n\nNote the important properties of the Fast IP Move functionality:\n \n - The GARP/RA-initiated re-routing stays active for approximately 20\n minutes. After triggering fast failover, you must also\n appropriately set the haPolicy.leader.\n - The new leader instance should continue to send GARP/RA packets\n periodically every 10 seconds until at least 10 minutes after updating\n the haPolicy.leader (but stop immediately if it is no longer the leader).\n - After triggering a fast failover, we recommend that you wait at least\n 3 seconds before sending another GARP/RA packet from a different VM\n instance to avoid race conditions.\n - Don't send GARP/RA packets from different VM\n instances at the same time. If multiple instances continue to send\n GARP/RA packets, traffic might be routed to different destinations in an\n alternating order. This condition ceases when a single instance\n issues a GARP/RA packet.\n - The GARP/RA request always takes priority over the leader API.\n Using the haPolicy.leader API to change the leader to a different\n instance will have no effect until the GARP/RA request becomes\n inactive.\n - The GARP/RA packets should follow the GARP/RA\n Packet Specifications..\n - When multiple forwarding rules refer to a regional backend service,\n you need only send a GARP or RA packet for a single forwarding rule\n virtual IP. The virtual IPs for all forwarding rules targeting the same\n backend service will also be moved to the sender of the GARP or RA\n packet. \n\n\n\nThe following are the Fast IP Move limitations (that is, when fastIPMove\nis not DISABLED):\n \n - Multiple forwarding rules cannot use the same IP address if one of\n them refers to a regional backend service with fastIPMove.\n - The regional backend service must set the network field, and all\n NEGs must belong to that network. However, individual\n NEGs can belong to different subnetworks of that network. \n - The maximum number of network endpoints across all backends of a\n backend service with fastIPMove is 32.\n - The maximum number of backend services with fastIPMove that can have\n the same network endpoint attached to one of its backends is 64.\n - The maximum number of backend services with fastIPMove in a VPC in a\n region is 64.\n - The network endpoints that are attached to a backend of a backend\n service with fastIPMove cannot resolve to Gen3+ machines for IPv6.\n - Traffic directed to the leader by a static route next hop will not be\n redirected to a new leader by fast failover. Such traffic will only be\n redirected once an haPolicy.leader update has taken effect. Only traffic\n to the forwarding rule's virtual IP will be redirected to a new leader by\n fast failover.\n\n\nhaPolicy.fastIPMove can be set only at backend service creation time.\nOnce set, it cannot be updated.\n\nBy default, fastIpMove is set to DISABLED.", - "enum": [ - "DISABLED", - "GARP_RA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "leader": { - "$ref": "BackendServiceHAPolicyLeader", - "description": "Selects one of the network endpoints attached to the backend NEGs of\nthis service as the active endpoint (the leader) that receives all\ntraffic.\n\nWhen the leader changes, there is no connection draining to persist\nexisting connections on the old leader.\n\nYou are responsible for selecting a suitable endpoint as the\nleader. For example, preferring a healthy endpoint over unhealthy ones.\nNote that this service does not track backend endpoint health, and\nselects the configured leader unconditionally." - } - }, - "type": "object" - }, - "BackendServiceHAPolicyLeader": { - "id": "BackendServiceHAPolicyLeader", - "properties": { - "backendGroup": { - "description": "A fully-qualified URL (starting with https://www.googleapis.com/)\nof the zonal Network Endpoint Group (NEG) with `GCE_VM_IP` endpoints\nthat the leader is attached to.\n\nThe leader's backendGroup must already be specified as a backend of\nthis backend service. Removing a backend that is designated as the\nleader's backendGroup is not permitted.", - "type": "string" - }, - "networkEndpoint": { - "$ref": "BackendServiceHAPolicyLeaderNetworkEndpoint", - "description": "The network endpoint within the leader.backendGroup that is\ndesignated as the leader.\n\nThis network endpoint cannot be detached from the NEG specified in\nthe haPolicy.leader.backendGroup until the leader is updated with\nanother network endpoint, or the leader is removed from the haPolicy." - } - }, - "type": "object" - }, - "BackendServiceHAPolicyLeaderNetworkEndpoint": { - "id": "BackendServiceHAPolicyLeaderNetworkEndpoint", - "properties": { - "instance": { - "description": "The name of the VM instance of the leader network endpoint. The\ninstance must already be attached to the NEG specified in the\nhaPolicy.leader.backendGroup.\n\nThe name must be 1-63 characters long, and comply with RFC1035.\nAuthorization requires the following IAM permission on the\nspecified resource instance: compute.instances.use", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceHttpCookie": { - "description": "The HTTP cookie used for stateful session affinity.", - "id": "BackendServiceHttpCookie", - "properties": { - "name": { - "description": "Name of the cookie.", - "type": "string" - }, - "path": { - "description": "Path to set for the cookie.", - "type": "string" - }, - "ttl": { - "$ref": "Duration", - "description": "Lifetime of the cookie." - } - }, - "type": "object" - }, - "BackendServiceIAP": { - "description": "Identity-Aware Proxy", - "id": "BackendServiceIAP", - "properties": { - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all\nincoming requests.", - "type": "boolean" - }, - "oauth2ClientId": { - "description": "OAuth2 client ID to use for the authentication flow.", - "type": "string" - }, - "oauth2ClientInfo": { - "$ref": "BackendServiceIAPOAuth2ClientInfo", - "description": "[Input Only] OAuth client info required to generate client id to be used\nfor IAP." - }, - "oauth2ClientSecret": { - "description": "OAuth2 client secret to use for the authentication flow.\nFor security reasons, this value cannot be retrieved via the API.\nInstead, the SHA-256 hash of the value is returned in the\noauth2ClientSecretSha256 field.\n\n@InputOnly", - "type": "string" - }, - "oauth2ClientSecretSha256": { - "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceIAPOAuth2ClientInfo": { - "id": "BackendServiceIAPOAuth2ClientInfo", - "properties": { - "applicationName": { - "description": "Application name to be used in OAuth consent screen.", - "type": "string" - }, - "clientName": { - "description": "Name of the client to be generated.\nOptional - If not provided, the name will be autogenerated by the\nbackend.", - "type": "string" - }, - "developerEmailAddress": { - "description": "Developer's information to be used in OAuth consent screen.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceList": { - "description": "Contains a list of BackendService resources.", - "id": "BackendServiceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendServiceList", - "description": "[Output Only] Type of resource. Alwayscompute#backendServiceList for lists of backend services.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceListUsable": { - "description": "Contains a list of usable BackendService resources.", - "id": "BackendServiceListUsable", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableBackendServiceList", - "description": "[Output Only] Type of resource. Alwayscompute#usableBackendServiceList for lists of usable backend\nservices.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfig": { - "description": "Container for either a built-in LB policy supported by gRPC or Envoy or\na custom one implemented by the end user.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfig", - "properties": { - "customPolicy": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" - }, - "policy": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy": { - "description": "The configuration for a custom policy implemented by the user and\ndeployed with the client.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", - "properties": { - "data": { - "description": "An optional, arbitrary JSON object with configuration data, understood\nby a locally installed custom policy implementation.", - "type": "string" - }, - "name": { - "description": "Identifies the custom policy.\n\nThe value should match the name of a custom implementation registered\non the gRPC clients. It should follow protocol buffer message naming\nconventions and include the full path (for example,\nmyorg.CustomLbPolicy). The maximum length is 256 characters.\n\nDo not specify the same custom policy more than once for a\nbackend. If you do, the configuration is rejected.\n\nFor an example of how to use this field, seeUse\na custom policy.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfigPolicy": { - "description": "The configuration for a built-in load balancing policy.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy", - "properties": { - "name": { - "description": "The name of a locality load-balancing policy. Valid values include\nROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information\nabout these values, see the description of localityLbPolicy.\n\nDo not specify the same policy more than once for a\nbackend. If you do, the configuration is rejected.", - "enum": [ - "INVALID_LB_POLICY", - "LEAST_REQUEST", - "MAGLEV", - "ORIGINAL_DESTINATION", - "RANDOM", - "RING_HASH", - "ROUND_ROBIN", - "WEIGHTED_GCP_RENDEZVOUS", - "WEIGHTED_MAGLEV", - "WEIGHTED_ROUND_ROBIN" - ], - "enumDescriptions": [ - "", - "An O(1) algorithm which selects two random healthy hosts and\npicks the host which has fewer active requests.", - "This algorithm implements consistent hashing to backends. Maglev can be\nused as a drop in replacement for the ring hash load balancer. Maglev is\nnot as stable as ring hash but has faster table lookup build times and\nhost selection times. For more information about Maglev, seeMaglev:\nA Fast and Reliable Software Network Load Balancer.", - "Backend host is selected based on the client connection metadata, i.e.,\nconnections are opened to the same address as the destination address of\nthe incoming connection before the connection was redirected to the load\nbalancer.", - "The load balancer selects a random healthy host.", - "The ring/modulo hash load balancer implements consistent hashing to\nbackends. The algorithm has the property that the addition/removal\nof a host from a set of N hosts only affects 1/N of the requests.", - "This is a simple policy in which each healthy backend is selected\nin round robin order. This is the default.", - "Per-instance weighted Load Balancing via health check reported weights.\nIn internal passthrough network load balancing, it is weighted\nrendezvous hashing.\nThis option is only supported in internal passthrough network load\nbalancing.", - "Per-instance weighted Load Balancing via health check reported weights.\nIf set, the Backend Service must configure a non legacy HTTP-based Health\nCheck, and health check replies are expected to contain non-standard HTTP\nresponse header field X-Load-Balancing-Endpoint-Weight to specify the\nper-instance weights.\nIf set, Load Balancing is weighted based on the\nper-instance weights reported in the last processed health check replies,\nas long as every instance either reported a valid weight or had\nUNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight.\nThis option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed\nfrom Backend reported Custom Metrics. If set, the Backend Service\nresponses are expected to contain non-standard HTTP response header field\nEndpoint-Load-Metrics. The reported metrics\nto use for computing the weights are specified via the\ncustomMetrics fields." - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceLogConfig": { - "description": "The available logging options for the load balancer traffic served by this\nbackend service.", - "id": "BackendServiceLogConfig", - "properties": { - "enable": { - "description": "Denotes whether to enable logging for the load balancer\ntraffic served by this backend service. The default value is false.", - "type": "boolean" - }, - "optional": { - "deprecated": true, - "description": "Deprecated in favor of optionalMode.\nThis field can only be specified if logging is enabled for this backend\nservice. Configures whether all, none or a subset of optional fields\nshould be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL,\nEXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.", - "enum": [ - "CUSTOM", - "EXCLUDE_ALL_OPTIONAL", - "INCLUDE_ALL_OPTIONAL", - "UNSPECIFIED_OPTIONAL_MODE" - ], - "enumDescriptions": [ - "A subset of optional fields.", - "None optional fields.", - "All optional fields.", - "" - ], - "type": "string" - }, - "optionalFields": { - "description": "This field can only be specified if logging is enabled for this backend\nservice and \"logConfig.optionalMode\" was set to CUSTOM. Contains a list\nof optional fields you want to include in the logs. For example:\nserverInstance, serverGkeDetails.cluster,\nserverGkeDetails.pod.podNamespace", - "items": { - "type": "string" - }, - "type": "array" - }, - "optionalMode": { - "description": "This field can only be specified if logging is enabled for this backend\nservice. Configures whether all, none or a subset of optional fields\nshould be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL,\nEXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.", - "enum": [ - "CUSTOM", - "EXCLUDE_ALL_OPTIONAL", - "INCLUDE_ALL_OPTIONAL", - "UNSPECIFIED_OPTIONAL_MODE" - ], - "enumDescriptions": [ - "A subset of optional fields.", - "None optional fields.", - "All optional fields.", - "" - ], - "type": "string" - }, - "sampleRate": { - "description": "This field can only be specified if logging is enabled for this backend\nservice. The value of the field must be in [0, 1]. This configures the\nsampling rate of requests to the load balancer where 1.0 means all logged\nrequests are reported and 0.0 means no logged requests are reported. The\ndefault value is 1.0.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceNetworkPassThroughLbTrafficPolicy": { - "id": "BackendServiceNetworkPassThroughLbTrafficPolicy", - "properties": { - "zonalAffinity": { - "$ref": "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", - "description": "When configured, new connections are load balanced across healthy backend\nendpoints in the local zone." - } - }, - "type": "object" - }, - "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity": { - "id": "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", - "properties": { - "spillover": { - "description": "This field indicates whether zonal affinity is enabled or not. The\npossible values are:\n \n - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity\n is disabled. The load balancer distributes new connections to all\n healthy backend endpoints across all zones.\n - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is\n enabled. The load balancer distributes new connections to all healthy\n backend endpoints in the local zone only. If there are no healthy\n backend endpoints in the local zone, the load balancer distributes\n new connections to all backend endpoints in the local zone.\n - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is\n enabled. The load balancer distributes new connections to all healthy\n backend endpoints in the local zone only. If there aren't enough\n healthy backend endpoints in the local zone, the load balancer\n distributes new connections to all healthy backend endpoints across all\n zones.", - "enum": [ - "ZONAL_AFFINITY_DISABLED", - "ZONAL_AFFINITY_SPILL_CROSS_ZONE", - "ZONAL_AFFINITY_STAY_WITHIN_ZONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "spilloverRatio": { - "description": "The value of the field must be in [0, 1]. When the ratio of the count\nof healthy backend endpoints in a zone to the count of backend\nendpoints in that same zone is equal to or above this threshold, the\nload balancer distributes new connections to all healthy endpoints in\nthe local zone only. When the ratio of the count of healthy backend\nendpoints in a zone to the count of backend endpoints in that same\nzone is below this threshold, the load balancer distributes all new\nconnections to all healthy endpoints across all zones.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceParams": { - "description": "Additional Backend Service parameters.", - "id": "BackendServiceParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceReference": { - "id": "BackendServiceReference", - "properties": { - "backendService": { - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceTlsSettings": { - "id": "BackendServiceTlsSettings", - "properties": { - "authenticationConfig": { - "description": "Reference to the BackendAuthenticationConfig resource from the\nnetworksecurity.googleapis.com namespace. Can be used in authenticating\nTLS connections to the backend, as specified by the authenticationMode\nfield. Can only be specified if authenticationMode is not NONE.", - "type": "string" - }, - "identity": { - "description": "Assigns the Managed Identity for the BackendService Workload.\n\n\nUse this property to configure the load balancer back-end to use\ncertificates and roots of trust provisioned by the Managed Workload\nIdentity system. \n\n The `identity` property is the\nfully-specified SPIFFE ID to use in the SVID presented by the Load\nBalancer Workload. \n\n The SPIFFE ID must be a resource starting with the\n`trustDomain` property value, followed by the path to the Managed\nWorkload Identity. \n\n Supported SPIFFE ID format: \n \n - //\u003ctrust_domain\u003e/ns/\u003cnamespace\u003e/sa/\u003csubject\u003e\n\n\nThe Trust Domain within the Managed Identity must refer to a valid\nWorkload Identity Pool. The TrustConfig and CertificateIssuanceConfig\nwill be inherited from the Workload Identity Pool. \n\n Restrictions: \n \n - If you set the `identity` property, you cannot manually set\n the following fields: \n - tlsSettings.sni\n - tlsSettings.subjectAltNames\n - tlsSettings.authenticationConfig\n \n\nWhen defining a `identity` for a RegionBackendServices, the\ncorresponding Workload Identity Pool must have a ca_pool\nconfigured in the same region. \n\n The system will set up a read-onlytlsSettings.authenticationConfig for the Managed Identity.", - "type": "string" - }, - "sni": { - "description": "Server Name Indication - see RFC3546 section 3.1. If set, the load\nbalancer sends this string as the SNI hostname in the TLS connection to\nthe backend, and requires that this string match a Subject Alternative\nName (SAN) in the backend's server certificate. With a Regional Internet\nNEG backend, if the SNI is specified here, the load balancer uses it\nregardless of whether the Regional Internet NEG is specified with FQDN or\nIP address and port. When both sni and subjectAltNames[] are specified,\nthe load balancer matches the backend certificate's SAN only to\nsubjectAltNames[].", - "type": "string" - }, - "subjectAltNames": { - "description": "A list of Subject Alternative Names (SANs) that the Load Balancer\nverifies during a TLS handshake with the backend. When the server\npresents its X.509 certificate to the Load Balancer, the Load Balancer\ninspects the certificate's SAN field, and requires that at least one SAN\nmatch one of the subjectAltNames in the list. This field is limited to 5\nentries. When both sni and subjectAltNames[] are specified, the load\nbalancer matches the backend certificate's SAN only to subjectAltNames[].", - "items": { - "$ref": "BackendServiceTlsSettingsSubjectAltName" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServiceTlsSettingsSubjectAltName": { - "description": "A Subject Alternative Name that the load balancer matches against the SAN\nfield in the TLS certificate provided by the backend, specified as either\na DNS name or a URI, in accordance with RFC 5280 4.2.1.6", - "id": "BackendServiceTlsSettingsSubjectAltName", - "properties": { - "dnsName": { - "description": "The SAN specified as a DNS Name.", - "type": "string" - }, - "uniformResourceIdentifier": { - "description": "The SAN specified as a URI.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceUsedBy": { - "id": "BackendServiceUsedBy", - "properties": { - "reference": { - "description": "[Output Only] Server-defined URL for resources referencing given\nBackendService like UrlMaps, TargetTcpProxies, TargetSslProxies\nand ForwardingRule.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServicesGetEffectiveSecurityPoliciesResponse": { - "id": "BackendServicesGetEffectiveSecurityPoliciesResponse", - "properties": { - "securityPolicies": { - "description": "Effective security policies for the backend service.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServicesScopedList": { - "id": "BackendServicesScopedList", - "properties": { - "backendServices": { - "description": "A list of BackendServices contained in this scope.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BfdPacket": { - "id": "BfdPacket", - "properties": { - "authenticationPresent": { - "description": "The Authentication Present bit of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "type": "boolean" - }, - "controlPlaneIndependent": { - "description": "The Control Plane Independent bit of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "type": "boolean" - }, - "demand": { - "description": "The demand bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "diagnostic": { - "description": "The diagnostic code specifies the local system's reason for the last change\nin session state. This allows remote systems to determine the reason that\nthe previous session failed, for example. These diagnostic codes are\nspecified in section 4.1 ofRFC5880", - "enum": [ - "ADMINISTRATIVELY_DOWN", - "CONCATENATED_PATH_DOWN", - "CONTROL_DETECTION_TIME_EXPIRED", - "DIAGNOSTIC_UNSPECIFIED", - "ECHO_FUNCTION_FAILED", - "FORWARDING_PLANE_RESET", - "NEIGHBOR_SIGNALED_SESSION_DOWN", - "NO_DIAGNOSTIC", - "PATH_DOWN", - "REVERSE_CONCATENATED_PATH_DOWN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "final": { - "description": "The Final bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "length": { - "description": "The length of the BFD Control packet in bytes. This is specified in section\n4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minEchoRxIntervalMs": { - "description": "The Required Min Echo RX Interval value in the BFD packet. This is\nspecified in section 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minRxIntervalMs": { - "description": "The Required Min RX Interval value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minTxIntervalMs": { - "description": "The Desired Min TX Interval value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "multiplier": { - "description": "The detection time multiplier of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "multipoint": { - "description": "The multipoint bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "myDiscriminator": { - "description": "The My Discriminator value in the BFD packet. This is specified in section\n4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "poll": { - "description": "The Poll bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "state": { - "description": "The current BFD session state as seen by the transmitting system. These\nstates are specified in section 4.1 ofRFC5880", - "enum": [ - "ADMIN_DOWN", - "DOWN", - "INIT", - "STATE_UNSPECIFIED", - "UP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "version": { - "description": "The version number of the BFD protocol, as specified in section 4.1 ofRFC5880.", - "format": "uint32", - "type": "integer" - }, - "yourDiscriminator": { - "description": "The Your Discriminator value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "BfdStatus": { - "description": "Next free: 15", - "id": "BfdStatus", - "properties": { - "bfdSessionInitializationMode": { - "description": "The BFD session initialization mode for this BGP peer.\nIf set to ACTIVE, the Cloud Router will initiate the BFD session for\nthis BGP peer. If set to PASSIVE, the Cloud Router will wait for the\npeer router to initiate the BFD session for this BGP peer. If set to\nDISABLED, BFD is disabled for this BGP peer.", - "enum": [ - "ACTIVE", - "DISABLED", - "PASSIVE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "configUpdateTimestampMicros": { - "description": "Unix timestamp of the most recent config update.", - "format": "int64", - "type": "string" - }, - "controlPacketCounts": { - "$ref": "BfdStatusPacketCounts", - "description": "Control packet counts for the current BFD session." - }, - "controlPacketIntervals": { - "description": "Inter-packet time interval statistics for control packets.", - "items": { - "$ref": "PacketIntervals" - }, - "type": "array" - }, - "echoPacketCounts": { - "$ref": "BfdStatusPacketCounts", - "description": "Echo packet counts for the current BFD session." - }, - "echoPacketIntervals": { - "description": "Inter-packet time interval statistics for echo packets.", - "items": { - "$ref": "PacketIntervals" - }, - "type": "array" - }, - "localDiagnostic": { - "description": "The diagnostic code specifies the local system's reason for the last change\nin session state. This allows remote systems to determine the reason that\nthe previous session failed, for example. These diagnostic codes are\nspecified in section 4.1 ofRFC5880", - "enum": [ - "ADMINISTRATIVELY_DOWN", - "CONCATENATED_PATH_DOWN", - "CONTROL_DETECTION_TIME_EXPIRED", - "DIAGNOSTIC_UNSPECIFIED", - "ECHO_FUNCTION_FAILED", - "FORWARDING_PLANE_RESET", - "NEIGHBOR_SIGNALED_SESSION_DOWN", - "NO_DIAGNOSTIC", - "PATH_DOWN", - "REVERSE_CONCATENATED_PATH_DOWN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "localState": { - "description": "The current BFD session state as seen by the transmitting system. These\nstates are specified in section 4.1 ofRFC5880", - "enum": [ - "ADMIN_DOWN", - "DOWN", - "INIT", - "STATE_UNSPECIFIED", - "UP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "negotiatedLocalControlTxIntervalMs": { - "description": "Negotiated transmit interval for control packets.", - "format": "uint32", - "type": "integer" - }, - "negotiatedLocalEchoTxIntervalMs": { - "description": "Negotiated transmit interval for echo packets.", - "format": "uint32", - "type": "integer" - }, - "rxPacket": { - "$ref": "BfdPacket", - "description": "The most recent Rx control packet for this BFD session." - }, - "txPacket": { - "$ref": "BfdPacket", - "description": "The most recent Tx control packet for this BFD session." - }, - "uptimeMs": { - "description": "Session uptime in milliseconds. Value will be 0 if session is not up.", - "format": "int64", - "type": "string" - }, - "usingEchoMode": { - "description": "Indicates if echo mode is currently being used.", - "type": "boolean" - } - }, - "type": "object" - }, - "BfdStatusPacketCounts": { - "id": "BfdStatusPacketCounts", - "properties": { - "numRx": { - "description": "Number of packets received since the beginning of the current BFD\nsession.", - "format": "uint32", - "type": "integer" - }, - "numRxRejected": { - "description": "Number of packets received that were rejected because of errors since the\nbeginning of the current BFD session.", - "format": "uint32", - "type": "integer" - }, - "numRxSuccessful": { - "description": "Number of packets received that were successfully processed since the\nbeginning of the current BFD session.", - "format": "uint32", - "type": "integer" - }, - "numTx": { - "description": "Number of packets transmitted since the beginning of the current BFD\nsession.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "BgpRoute": { - "id": "BgpRoute", - "properties": { - "asPaths": { - "description": "[Output only] AS-PATH for the route", - "items": { - "$ref": "BgpRouteAsPath" - }, - "type": "array" - }, - "communities": { - "description": "[Output only] BGP communities in human-readable A:B format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destination": { - "$ref": "BgpRouteNetworkLayerReachabilityInformation", - "description": "[Output only] Destination IP range for the route, in human-readable CIDR\nformat" - }, - "med": { - "description": "[Output only] BGP multi-exit discriminator", - "format": "uint32", - "type": "integer" - }, - "origin": { - "description": "[Output only] BGP origin (EGP, IGP or INCOMPLETE)", - "enum": [ - "BGP_ORIGIN_EGP", - "BGP_ORIGIN_IGP", - "BGP_ORIGIN_INCOMPLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BgpRouteAsPath": { - "id": "BgpRouteAsPath", - "properties": { - "asns": { - "description": "[Output only] ASNs in the path segment. When type is SEQUENCE, these are\nordered.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "asns32": { - "description": "[Output only] ASNs in the path segment. This field is for better\nsupport of 32 bit ASNs as the other asns field suffers from overflow when\nthe ASN is larger. When type is SEQUENCE, these are ordered.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "type": { - "description": "[Output only] Type of AS-PATH segment (SEQUENCE or SET)", - "enum": [ - "AS_PATH_TYPE_SEQUENCE", - "AS_PATH_TYPE_SET" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BgpRouteNetworkLayerReachabilityInformation": { - "description": "Network Layer Reachability Information (NLRI) for a route.", - "id": "BgpRouteNetworkLayerReachabilityInformation", - "properties": { - "pathId": { - "description": "If the BGP session supports multiple paths (RFC 7911), the path\nidentifier for this route.", - "format": "uint32", - "type": "integer" - }, - "prefix": { - "description": "Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16.", - "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.\n\nIf the condition evaluates to `true`, then this binding applies to the\ncurrent request.\n\nIf the condition evaluates to `false`, then this binding does not apply to\nthe current request. However, a different role binding might grant the same\nrole to one or more of the principals in this binding.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies)." - }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n Does not include identities that come from external identity providers\n (IdPs) through identity federation.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@example.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a Google\n service account. For example,\n `my-other-app@appspot.gserviceaccount.com`.\n\n* `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An\n identifier for a\n [Kubernetes service\n account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).\n For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n\n\n\n* `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:\n A single identity in a workforce identity pool.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:\n All workforce identities in a group.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:\n All workforce identities with a specific attribute value.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:\n All identities in a workforce identity pool.\n\n* `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:\n A single identity in a workload identity pool.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:\n A workload identity pool group.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:\n All identities in a workload identity pool with a certain attribute.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:\n All identities in a workload identity pool.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a user that has been recently deleted. For\n example, `alice@example.com?uid=123456789012345678901`. If the user is\n recovered, this value reverts to `user:{emailid}` and the recovered user\n retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus\n unique identifier) representing a service account that has been recently\n deleted. For example,\n `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.\n If the service account is undeleted, this value reverts to\n `serviceAccount:{emailid}` and the undeleted service account retains the\n role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a Google group that has been recently\n deleted. For example, `admins@example.com?uid=123456789012345678901`. If\n the group is recovered, this value reverts to `group:{emailid}` and the\n recovered group retains the role in the binding.\n\n* `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:\n Deleted single identity in a workforce identity pool. For example,\n `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\n\nFor an overview of the IAM roles and permissions, see the\n[IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For\na list of the available pre-defined roles, see\n[here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertDiskResource": { - "description": "A transient resource used in compute.disks.bulkInsert and\ncompute.regionDisks.bulkInsert. It is only used to process\nrequests and is not persisted.", - "id": "BulkInsertDiskResource", - "properties": { - "instantSnapshotGroupParameters": { - "$ref": "InstantSnapshotGroupParameters", - "description": "The parameters for the instant snapshot group." - }, - "snapshotGroupParameters": { - "$ref": "SnapshotGroupParameters", - "description": "The parameters for the snapshot group." - }, - "sourceConsistencyGroupPolicy": { - "description": "The URL of the DiskConsistencyGroupPolicy for the group of disks to clone.\nThis may be a full or partial URL, such as:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertInstanceResource": { - "description": "A transient resource used in compute.instances.bulkInsert and\ncompute.regionInstances.bulkInsert . This resource is not persisted\nanywhere, it is used only for processing the requests.", - "id": "BulkInsertInstanceResource", - "properties": { - "count": { - "description": "The maximum number of instances to create.", - "format": "int64", - "type": "string" - }, - "instanceFlexibilityPolicy": { - "$ref": "InstanceFlexibilityPolicy", - "description": "A flexible specification of machine type of instances to create." - }, - "instanceProperties": { - "$ref": "InstanceProperties", - "description": "The instance properties defining the VM instances to be created. Required\nif sourceInstanceTemplate is not provided." - }, - "locationPolicy": { - "$ref": "LocationPolicy", - "description": "Policy for choosing target zone. For more information, seeCreate VMs in\nbulk." - }, - "minCount": { - "description": "The minimum number of instances to create. If no min_count is\nspecified then count is used as the default value. Ifmin_count instances cannot be created, then no instances will\nbe created and instances already created will be deleted.", - "format": "int64", - "type": "string" - }, - "namePattern": { - "description": "The string pattern used for the names of the VMs.\nEither name_pattern or per_instance_properties\nmust be set. The pattern must contain one continuous sequence of\nplaceholder hash characters (#) with each character corresponding to one\ndigit of the generated instance name. Example: a name_pattern\nof inst-#### generates instance names such asinst-0001 and inst-0002. If existing instances\nin the same project and zone have names that match the name pattern\nthen the generated instance numbers start after the biggest\nexisting number. For example, if there exists an instance with nameinst-0050, then instance names generated using the patterninst-#### begin with inst-0051. The name pattern\nplaceholder #...# can contain up to 18 characters.", - "type": "string" - }, - "perInstanceProperties": { - "additionalProperties": { - "$ref": "BulkInsertInstanceResourcePerInstanceProperties" - }, - "description": "Per-instance properties to be set on individual instances.\nKeys of this map specify requested instance names.\nCan be empty if name_pattern is used.", - "type": "object" - }, - "sourceInstanceTemplate": { - "description": "Specifies the instance template from which to create instances. You may\ncombine sourceInstanceTemplate withinstanceProperties to override specific values from an\nexisting instance template. Bulk API follows the semantics of JSON Merge\nPatch described by RFC\n7396.\n\nIt can be a full or partial URL. For example, the following are\nall valid URLs to an instance template: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate\n\n\n\nThis field is optional.", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertInstanceResourcePerInstanceProperties": { - "description": "Per-instance properties to be set on individual instances.\nTo be extended in the future.", - "id": "BulkInsertInstanceResourcePerInstanceProperties", - "properties": { - "hostname": { - "description": "Specifies the hostname of the instance. More details in:\nhttps://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention", - "type": "string" - }, - "name": { - "description": "This field is only temporary. It will be removed. Do not use it.", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertOperationStatus": { - "id": "BulkInsertOperationStatus", - "properties": { - "createdVmCount": { - "description": "[Output Only] Count of VMs successfully created so far.", - "format": "int32", - "type": "integer" - }, - "deletedVmCount": { - "description": "[Output Only] Count of VMs that got deleted during rollback.", - "format": "int32", - "type": "integer" - }, - "failedToCreateVmCount": { - "description": "[Output Only] Count of VMs that started creating but encountered an\nerror.", - "format": "int32", - "type": "integer" - }, - "status": { - "description": "[Output Only] Creation status of BulkInsert operation - information\nif the flow is rolling forward or rolling back.", - "enum": [ - "CREATING", - "DONE", - "ROLLING_BACK", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "Rolling forward - creating VMs.", - "Done", - "Rolling back - cleaning up after an error.", - "" - ], - "type": "string" - }, - "targetVmCount": { - "description": "[Output Only] Count of VMs originally planned to be created.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BulkSetLabelsRequest": { - "id": "BulkSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You may\noptionally provide an up-to-date fingerprint hash in order to update or\nchange labels. Make a get() request to the resource to get the\nlatest fingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "BulkZoneSetLabelsRequest": { - "id": "BulkZoneSetLabelsRequest", - "properties": { - "requests": { - "items": { - "$ref": "BulkSetLabelsRequest" - }, - "type": "array" - } - }, - "type": "object" - }, - "BundledLocalSsds": { - "id": "BundledLocalSsds", - "properties": { - "defaultInterface": { - "description": "The default disk interface if the interface is not specified.", - "type": "string" - }, - "partitionCount": { - "description": "The number of partitions.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "CacheInvalidationRule": { - "id": "CacheInvalidationRule", - "properties": { - "cacheTags": { - "description": "A list of cache tags used to identify cached objects.\n\n \n - Cache tags are specified when the response is first cached, by setting\n the `Cache-Tag` response header at the origin.\n - Multiple cache tags in the same invalidation request are treated as\n Boolean `OR` - for example, `tag1 OR tag2 OR tag3`.\n - If other fields are also specified, these are treated as Boolean `AND`\n with any tags.\n\n\nUp to 10 tags can be specified in a single invalidation request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "host": { - "description": "If set, this invalidation rule will only apply to requests with a Host\nheader matching host.", - "type": "string" - }, - "path": { - "type": "string" - } - }, - "type": "object" - }, - "CacheKeyPolicy": { - "description": "Message containing what to include in the cache key for a request for Cloud\nCDN.", - "id": "CacheKeyPolicy", - "properties": { - "includeHost": { - "description": "If true, requests to different hosts will be cached separately.", - "type": "boolean" - }, - "includeHttpHeaders": { - "description": "Allows HTTP request headers (by name) to be used in the cache key.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includeNamedCookies": { - "description": "Allows HTTP cookies (by name) to be used in the cache key.\nThe name=value pair will be used in the cache key Cloud CDN generates.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includeProtocol": { - "description": "If true, http and https requests will be cached separately.", - "type": "boolean" - }, - "includeQueryString": { - "description": "If true, include query string parameters in the cache key according to\nquery_string_whitelist and query_string_blacklist. If neither is set, the\nentire query string will be included. If false, the query string will be\nexcluded from the cache key entirely.", - "type": "boolean" - }, - "queryStringBlacklist": { - "description": "Names of query string parameters to exclude in cache keys. All other\nparameters will be included. Either specify query_string_whitelist or\nquery_string_blacklist, not both. '\u0026' and '=' will be percent encoded and\nnot treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - }, - "queryStringWhitelist": { - "description": "Names of query string parameters to include in cache keys. All other\nparameters will be excluded. Either specify query_string_whitelist or\nquery_string_blacklist, not both. '\u0026' and '=' will be percent encoded and\nnot treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CalendarModeAdviceRequest": { - "description": "A request to recommend the best way to consume the specified resources in the\nfuture.", - "id": "CalendarModeAdviceRequest", - "properties": { - "futureResourcesSpecs": { - "additionalProperties": { - "$ref": "FutureResourcesSpec" - }, - "description": "Specification of resources to create in the future.\nThe key of the map is an arbitrary string specified by the caller.\nValue of the map is a specification of required resources and their\nconstraints. Currently only one value is allowed in this map.", - "type": "object" - } - }, - "type": "object" - }, - "CalendarModeAdviceResponse": { - "description": "A response containing the recommended way of creating the specified resources\nin the future. It contains (will contain) multiple recommendations that can\nbe analyzed by the customer and the best one can be picked.", - "id": "CalendarModeAdviceResponse", - "properties": { - "recommendations": { - "description": "Recommendations where, how and when to create the requested resources\nin order to maximize their obtainability and minimize cost.", - "items": { - "$ref": "CalendarModeRecommendation" - }, - "type": "array" - } - }, - "type": "object" - }, - "CalendarModeRecommendation": { - "description": "A single recommendation to create requested resources. Contains detailed\nrecommendations for every future resources specification specified in\nCalendarModeAdviceRequest.", - "id": "CalendarModeRecommendation", - "properties": { - "recommendationsPerSpec": { - "additionalProperties": { - "$ref": "FutureResourcesRecommendation" - }, - "description": "Recommendations for every future resource specification passed in\nCalendarModeAdviceRequest. Keys of the map correspond to keys\nspecified in the request.", - "type": "object" - } - }, - "type": "object" - }, - "CallCredentials": { - "description": "[Deprecated] gRPC call credentials to access the SDS server.\ngRPC call credentials to access the SDS server.", - "id": "CallCredentials", - "properties": { - "callCredentialType": { - "description": "The type of call credentials to use for GRPC requests to the SDS server.\nThis field can be set to one of the following:\n \n - GCE_VM: The local GCE VM service account credentials are used to access\n the SDS server.\n - FROM_PLUGIN: Custom authenticator credentials are used to access the\n SDS server.", - "enum": [ - "FROM_PLUGIN", - "GCE_VM", - "INVALID" - ], - "enumDescriptions": [ - "Custom authenticator credentials are used to access the SDS server.", - "The local GCE VM service account credentials are used to access the SDS\nserver.", - "" - ], - "type": "string" - }, - "fromPlugin": { - "$ref": "MetadataCredentialsFromPlugin", - "description": "Custom authenticator credentials. Valid if callCredentialType is\nFROM_PLUGIN." - } - }, - "type": "object" - }, - "CapacityAdviceRequest": { - "description": "A request to provide Assistant Scores. These scores determine VM\nobtainability and preemption likelihood.", - "id": "CapacityAdviceRequest", - "properties": { - "distributionPolicy": { - "$ref": "CapacityAdviceRequestDistributionPolicy", - "description": "Policy specifying the distribution of instances across\nzones within the requested region." - }, - "instanceFlexibilityPolicy": { - "$ref": "CapacityAdviceRequestInstanceFlexibilityPolicy", - "description": "Policy for instance selectors." - }, - "instanceProperties": { - "$ref": "CapacityAdviceRequestInstanceProperties", - "description": "Instance properties for this request." - }, - "size": { - "description": "Size of requested capacity.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "CapacityAdviceRequestDistributionPolicy": { - "id": "CapacityAdviceRequestDistributionPolicy", - "properties": { - "targetShape": { - "description": "The distribution shape to which the group converges.\nYou can only specify the following values: ANY,ANY_SINGLE_ZONE.", - "enum": [ - "ANY", - "ANY_SINGLE_ZONE", - "BALANCED", - "TARGET_SHAPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The group picks zones for creating VM instances to fulfill the\nrequested number of VMs within present resource constraints and to\nmaximize utilization of unused zonal reservations. Recommended for\nbatch workloads that do not require high availability.", - "The group creates all VM instances within a single zone. The zone is\nselected based on the present resource constraints and to maximize\nutilization of unused zonal reservations.\nRecommended for batch workloads with heavy interprocess communication.", - "The group prioritizes acquisition of resources, scheduling VMs in zones\nwhere resources are available while distributing VMs as evenly as\npossible across selected zones to minimize the impact of zonal failure.\nRecommended for highly available serving workloads.", - "" - ], - "type": "string" - }, - "zones": { - "description": "Zones where Capacity Advisor looks for capacity.", - "items": { - "$ref": "CapacityAdviceRequestDistributionPolicyZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, - "CapacityAdviceRequestDistributionPolicyZoneConfiguration": { - "id": "CapacityAdviceRequestDistributionPolicyZoneConfiguration", - "properties": { - "zone": { - "description": "The URL of the zone. It can be a\npartial or full URL. For example, the following are valid values: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n - projects/project/zones/zone \n - zones/zone", - "type": "string" - } - }, - "type": "object" - }, - "CapacityAdviceRequestInstanceFlexibilityPolicy": { - "description": "Specification of alternative, flexible instance subsets.", - "id": "CapacityAdviceRequestInstanceFlexibilityPolicy", - "properties": { - "instanceSelections": { - "additionalProperties": { - "$ref": "CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection" - }, - "description": "Named instance selections configure properties.\nThe key is an arbitrary, unique RFC1035 string that identifies the\ninstance selection.", - "type": "object" - } - }, - "type": "object" - }, - "CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection": { - "description": "Machine specification.", - "id": "CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection", - "properties": { - "machineTypes": { - "description": "Full machine-type names, e.g. \"n1-standard-16\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CapacityAdviceRequestInstanceProperties": { - "description": "Instance provisining properties.", - "id": "CapacityAdviceRequestInstanceProperties", - "properties": { - "scheduling": { - "$ref": "CapacityAdviceRequestInstancePropertiesScheduling", - "description": "Specifies the scheduling options." - } - }, - "type": "object" - }, - "CapacityAdviceRequestInstancePropertiesScheduling": { - "description": "Defines the instance scheduling options.", - "id": "CapacityAdviceRequestInstancePropertiesScheduling", - "properties": { - "provisioningModel": { - "description": "Specifies the provisioning model of the instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - } - }, - "type": "object" - }, - "CapacityAdviceResponse": { - "description": "A response contains multiple scoring recommendations.", - "id": "CapacityAdviceResponse", - "properties": { - "recommendations": { - "description": "Initially the API will provide one recommendation which balances the\nindividual scores according to service provider's preference.", - "items": { - "$ref": "CapacityAdviceResponseRecommendation" - }, - "type": "array" - } - }, - "type": "object" - }, - "CapacityAdviceResponseRecommendation": { - "id": "CapacityAdviceResponseRecommendation", - "properties": { - "scores": { - "$ref": "CapacityAdviceResponseRecommendationScores" - }, - "shards": { - "items": { - "$ref": "CapacityAdviceResponseRecommendationShard" - }, - "type": "array" - } - }, - "type": "object" - }, - "CapacityAdviceResponseRecommendationScores": { - "description": "The Scores message groups information about a shard of capacity.", - "id": "CapacityAdviceResponseRecommendationScores", - "properties": { - "obtainability": { - "description": "The obtainability score indicates the likelihood of successfully\nobtaining (provisioning) the requested number of VMs.\nThe score range is 0.0 through 1.0. Higher is better.", - "format": "double", - "type": "number" - }, - "uptimeScore": { - "description": "The uptime score indicates the likelihood that your Spot VMs will\ncontinue to run without preemption within the next few hours. For more\ninformation about the preemption process, see Preemption\nof Spot VMs.\nThe score range is 0.0 through 1.0. Higher is better.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "CapacityAdviceResponseRecommendationShard": { - "description": "Shards represent blocks of uniform capacity in recommendations.\nEach shard is for a single zone, single instance selection, and\na single machine shape. Each shard defines a size expressed as the\nnumber of VMs.", - "id": "CapacityAdviceResponseRecommendationShard", - "properties": { - "instanceCount": { - "format": "int32", - "type": "integer" - }, - "machineType": { - "description": "The machine type corresponds to the instance selection in the request.", - "type": "string" - }, - "provisioningModel": { - "description": "The provisioning model that you want to view recommendations for.\nSet to: SPOT.\n\nFor more information, see\nCompute Engine instances provisioning models.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - }, - "zone": { - "description": "The zone name for this shard.", - "type": "string" - } - }, - "type": "object" - }, - "ChannelCredentials": { - "description": "[Deprecated] gRPC channel credentials to access the SDS server.\ngRPC channel credentials to access the SDS server.", - "id": "ChannelCredentials", - "properties": { - "certificates": { - "$ref": "TlsCertificatePaths", - "description": "The call credentials to access the SDS server." - }, - "channelCredentialType": { - "description": "The channel credentials to access the SDS server. This field can be set\nto one of the following:\nCERTIFICATES: Use TLS certificates to access the SDS server.\nGCE_VM: Use local GCE VM credentials to access the SDS server.", - "enum": [ - "CERTIFICATES", - "GCE_VM", - "INVALID" - ], - "enumDescriptions": [ - "Use TLS certificates to access the SDS server.", - "Use local GCE VM credentials to access the SDS server.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "CircuitBreakers": { - "description": "Settings controlling the volume of requests, connections and retries to this\nbackend service.", - "id": "CircuitBreakers", - "properties": { - "connectTimeout": { - "$ref": "Duration", - "description": "The timeout for new network connections to hosts." - }, - "maxConnections": { - "description": "The maximum number of connections to the backend service. If not specified,\nthere is no limit.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxPendingRequests": { - "description": "The maximum number of pending requests allowed to the backend service. If\nnot specified, there is no limit.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxRequests": { - "description": "The maximum number of parallel requests that allowed to the backend\nservice. If not specified, there is no limit.", - "format": "int32", - "type": "integer" - }, - "maxRequestsPerConnection": { - "description": "Maximum requests for a single connection to the backend service.\nThis parameter is respected by both the HTTP/1.1 and HTTP/2\nimplementations. If not specified, there is no limit. Setting this\nparameter to 1 will effectively disable keep alive.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxRetries": { - "description": "The maximum number of parallel retries allowed to the backend cluster. If\nnot specified, the default is 1.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ClientTlsSettings": { - "description": "[Deprecated] The client side authentication settings for connection\noriginating from the backend service.\nthe backend service.", - "id": "ClientTlsSettings", - "properties": { - "clientTlsContext": { - "$ref": "TlsContext", - "description": "Configures the mechanism to obtain client-side security certificates and\nidentity information. This field is only applicable when mode is set to\nMUTUAL." - }, - "mode": { - "description": "Indicates whether connections to this port should be secured using TLS.\nThe value of this field determines how TLS is enforced. This can be set\nto one of the following values: DISABLE: Do not setup a TLS connection to\nthe backends.\nSIMPLE: Originate a TLS connection to the backends.\nMUTUAL: Secure connections to the backends using mutual TLS by presenting\n client certificates for authentication.", - "enum": [ - "DISABLE", - "INVALID", - "MUTUAL", - "SIMPLE" - ], - "enumDescriptions": [ - "Do not setup a TLS connection to the backends.", - "", - "Secure connections to the backends using mutual TLS by presenting\nclient certificates for authentication.", - "Originate a TLS connection to the backends." - ], - "type": "string" - }, - "sni": { - "description": "SNI string to present to the server during TLS handshake. This field is\napplicable only when mode is SIMPLE or MUTUAL.", - "type": "string" - }, - "subjectAltNames": { - "description": "A list of alternate names to verify the subject identity in the\ncertificate.If specified,\nthe proxy will verify that the server certificate's subject alt name\nmatches one of the specified values. This field is applicable only when\nmode is SIMPLE or MUTUAL.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Commitment": { - "description": "Represents a regional resource-based commitment resource.\n\nCreating this commitment resource means that you are purchasing a\nresource-based committed use contract, with an explicit start and end time.\nYou can purchase resource-based commitments for both hardware and software\nresources. For more information, read\nResource-based committed use discounts", - "id": "Commitment", - "properties": { - "autoRenew": { - "description": "Specifies whether to automatically renew the commitment at the end of its\ncurrent term. The default value is false. If you set the field\nto true, each time your commitment reaches the end of its\nterm, Compute Engine automatically renews it for another term. You can\nupdate this field anytime before the commitment expires. For example, if\nthe commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you can\nupdate this field until 11:59 PM UTC-8 on January 2, 2027.", - "type": "boolean" - }, - "category": { - "description": "The category of the commitment; specifies whether the commitment is for\nhardware or software resources. Category MACHINE specifies\nthat you are committing to hardware machine resources such asVCPU or MEMORY, listed in resources.\nCategory LICENSE specifies that you are committing to software\nlicenses, listed in licenseResources.\nNote that if you specify MACHINE commitments, then you must\nalso specify a type to indicate the machine series of the\nhardware resource that you are committing to.", - "enum": [ - "CATEGORY_UNSPECIFIED", - "LICENSE", - "MACHINE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customEndTimestamp": { - "description": "[Input Only] Optional, specifies the requested commitment end time inRFC3339 text format. Use this option when the desired\ncommitment's end date is later than the start date + term duration.", - "type": "string" - }, - "description": { - "description": "An optional description of the commitment. You can provide this property\nwhen you create the resource.", - "type": "string" - }, - "endTimestamp": { - "description": "[Output Only] Commitment end time inRFC3339\ntext format.", - "type": "string" - }, - "existingReservations": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#commitment", - "description": "[Output Only] Type of the resource. Always compute#commitment\nfor commitments.", - "type": "string" - }, - "licenseResource": { - "$ref": "LicenseResourceCommitment", - "description": "The license specification required as part of a license commitment." - }, - "mergeSourceCommitments": { - "description": "The list of source commitments that you are merging to create the new\nmerged commitment. For more information, see\nMerging commitments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Name of the commitment. You must specify a name when you purchase the\ncommitment. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "plan": { - "description": "The minimum time duration that you commit to purchasing resources.\nThe plan that you choose determines the preset term length of the\ncommitment (which is 1 year or 3 years) and affects the discount rate that\nyou receive for your resources. Committing to a longer time duration\ntypically gives you a higher discount rate. The supported values for this\nfield are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 years).", - "enum": [ - "INVALID", - "SIXTY_MONTH", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH", - "TWENTY_FOUR_MONTH" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the commitment and committed\nresources are located.", - "type": "string" - }, - "reservations": { - "description": "The list of new reservations that you want to create and attach to this\ncommitment.\n\nYou must attach reservations to your commitment if your commitment\nspecifies any GPUs or Local SSD disks. For more information, see \nAttach reservations to resource-based commitments.\n\nSpecify this property only if you want to create new\nreservations to attach. To attach existing reservations, specify theexistingReservations property instead.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "CommitmentResourceStatus", - "description": "[Output Only] Status information for Commitment resource." - }, - "resources": { - "description": "The list of all the hardware resources, with their types and amounts, that\nyou want to commit to. Specify as a separate entry in the list for each\nindividual resource type.", - "items": { - "$ref": "ResourceCommitment" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "splitSourceCommitment": { - "description": "The source commitment from which you are transferring resources to create\nthe new split commitment. For more information, see \nSplit commitments.", - "type": "string" - }, - "startTimestamp": { - "description": "[Output Only] Commitment start time inRFC3339\ntext format.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the commitment with regards to eventual expiration\n(each commitment has an end date defined). Status can be one of the\nfollowing values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED.", - "enum": [ - "ACTIVE", - "CANCELED_EARLY_TERMINATION", - "CANCELING", - "CANCELLED", - "CREATING", - "EXPIRED", - "NOT_YET_ACTIVE" - ], - "enumDescriptions": [ - "", - "", - "", - "Deprecate CANCELED status. Will use separate status to differentiate\ncancel by mergeCud or manual cancellation.", - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - }, - "type": { - "description": "The type of commitment; specifies the\nmachine series for which you want to commit to purchasing resources.\nThe choice of machine series affects the discount rate and the eligible\nresource types.\n\n The type must be one of the following:ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D,\n COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE,GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3.\nFor example, type MEMORY_OPTIMIZED specifies a commitment\nthat applies only to eligible resources of memory optimized M1 and M2\nmachine series. Type GENERAL_PURPOSE specifies a commitment\nthat applies only to eligible resources of general purpose N1 machine\nseries.", - "enum": [ - "ACCELERATOR_OPTIMIZED", - "ACCELERATOR_OPTIMIZED_A3", - "ACCELERATOR_OPTIMIZED_A3_MEGA", - "ACCELERATOR_OPTIMIZED_A3_ULTRA", - "ACCELERATOR_OPTIMIZED_A4", - "ACCELERATOR_OPTIMIZED_A4X", - "ACCELERATOR_OPTIMIZED_A4X_MAX", - "COMPUTE_OPTIMIZED", - "COMPUTE_OPTIMIZED_C2D", - "COMPUTE_OPTIMIZED_C3", - "COMPUTE_OPTIMIZED_C3D", - "COMPUTE_OPTIMIZED_H3", - "COMPUTE_OPTIMIZED_H4D", - "GENERAL_PURPOSE", - "GENERAL_PURPOSE_C4", - "GENERAL_PURPOSE_C4A", - "GENERAL_PURPOSE_C4D", - "GENERAL_PURPOSE_E2", - "GENERAL_PURPOSE_N2", - "GENERAL_PURPOSE_N2D", - "GENERAL_PURPOSE_N4", - "GENERAL_PURPOSE_N4D", - "GENERAL_PURPOSE_T2D", - "GRAPHICS_OPTIMIZED", - "GRAPHICS_OPTIMIZED_G4", - "MEMORY_OPTIMIZED", - "MEMORY_OPTIMIZED_M3", - "MEMORY_OPTIMIZED_M4", - "MEMORY_OPTIMIZED_M4_6TB", - "MEMORY_OPTIMIZED_X4", - "MEMORY_OPTIMIZED_X4_16TB", - "MEMORY_OPTIMIZED_X4_24TB", - "MEMORY_OPTIMIZED_X4_32TB", - "STORAGE_OPTIMIZED_Z3", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Note for internal users: When adding a new enum Type for v1, make sure\nto also add it in the comment for the `optional Type type` definition.\nThis ensures that the public documentation displays the new enum Type." - ], - "type": "string" - } - }, - "type": "object" - }, - "CommitmentAggregatedList": { - "id": "CommitmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "CommitmentsScopedList", - "description": "[Output Only] Name of the scope containing this set of commitments." - }, - "description": "A list of CommitmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#commitmentAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#commitmentAggregatedList for aggregated lists of\ncommitments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CommitmentList": { - "description": "Contains a list of Commitment resources.", - "id": "CommitmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Commitment resources.", - "items": { - "$ref": "Commitment" - }, - "type": "array" - }, - "kind": { - "default": "compute#commitmentList", - "description": "[Output Only] Type of resource. Always compute#commitmentList\nfor lists of commitments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CommitmentResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "CommitmentResourceStatus", - "properties": { - "cancellationInformation": { - "$ref": "CommitmentResourceStatusCancellationInformation", - "description": "[Output Only] An optional, contains all the needed information\nof cancellation." - }, - "customTermEligibilityEndTimestamp": { - "description": "[Output Only] Indicates the end time of customer's eligibility to send\ncustom term requests in RFC3339 text format. Term extension requests that\n(not the end time in the request) after this time will be rejected.", - "type": "string" - } - }, - "type": "object" - }, - "CommitmentResourceStatusCancellationInformation": { - "id": "CommitmentResourceStatusCancellationInformation", - "properties": { - "canceledCommitment": { - "$ref": "Money", - "description": "[Output Only] An optional amount of CUDs canceled so far in the last\n365 days." - }, - "canceledCommitmentLastUpdatedTimestamp": { - "description": "[Output Only] An optional last update time of canceled_commitment.RFC3339 text format.", - "type": "string" - }, - "cancellationCap": { - "$ref": "Money", - "description": "[Output Only] An optional,the cancellation cap for how much\ncommitments can be canceled in a rolling 365 per billing account." - }, - "cancellationFee": { - "$ref": "Money", - "description": "[Output Only] An optional, cancellation fee." - }, - "cancellationFeeExpirationTimestamp": { - "description": "[Output Only] An optional, cancellation fee expiration time.RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "CommitmentsScopedList": { - "id": "CommitmentsScopedList", - "properties": { - "commitments": { - "description": "[Output Only] The list of commitments contained in this scope.", - "items": { - "$ref": "Commitment" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of commitments\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthCheck": { - "description": "Represents a composite health check.\n\nA composite health check resource specifies the health source resources and\nthe health destination resource to which the aggregated health result from\nthe health source resources is delivered.", - "id": "CompositeHealthCheck", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a CompositeHealthCheck. An up-to-date fingerprint\nmust be provided in order to patch the CompositeHealthCheck; Otherwise,\nthe request will fail with error 412 conditionNotMet. To see\nthe latest fingerprint, make a get() request to retrieve the\nCompositeHealthCheck.", - "format": "byte", - "type": "string" - }, - "healthDestination": { - "description": "URL to the destination resource. Must be set. Must be aForwardingRule. The ForwardingRule must have\nload balancing scheme INTERNAL orINTERNAL_MANAGED and must be regional and in the same region\nas the CompositeHealthCheck (cross-region deployment forINTERNAL_MANAGED is not supported). Can be mutated.", - "type": "string" - }, - "healthSources": { - "description": "URLs to the HealthSource resources whose results are AND'ed.\nI.e. he aggregated result is is HEALTHY only if all sources\nare HEALTHY. Must have at least 1. Must not have more than 10.\nMust be regional and in the same region as theCompositeHealthCheck. Can be mutated.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#compositeHealthCheck", - "description": "[Output Only] Type of the resource. Alwayscompute#compositeHealthCheck for composite health checks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the composite health check resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "CompositeHealthCheckAggregatedList": { - "description": "Contains a list of CompositeHealthChecksScopedList.", - "id": "CompositeHealthCheckAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "CompositeHealthChecksScopedList", - "description": "Name of the scope containing this set of CompositeHealthChecks." - }, - "description": "A list of CompositeHealthChecksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#compositeHealthCheckAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthCheckList": { - "id": "CompositeHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of CompositeHealthCheck resources.", - "items": { - "$ref": "CompositeHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#compositeHealthCheckList", - "description": "[Output Only] Type of the resource. Alwayscompute#compositeHealthCheck for composite health checks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthChecksScopedList": { - "id": "CompositeHealthChecksScopedList", - "properties": { - "compositeHealthChecks": { - "description": "A list of CompositeHealthChecks contained in this scope.", - "items": { - "$ref": "CompositeHealthCheck" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of composite health checks\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ConfidentialInstanceConfig": { - "description": "A set of Confidential Instance options.", - "id": "ConfidentialInstanceConfig", - "properties": { - "confidentialInstanceType": { - "description": "Defines the type of technology used by the confidential instance.", - "enum": [ - "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", - "SEV", - "SEV_SNP", - "TDX" - ], - "enumDescriptions": [ - "No type specified. Do not use this value.", - "AMD Secure Encrypted Virtualization.", - "AMD Secure Encrypted Virtualization - Secure Nested Paging.", - "Intel Trust Domain eXtension." - ], - "type": "string" - }, - "confidentialParavisorConfig": { - "$ref": "ConfidentialParavisorConfig", - "description": "Defines a set of Confidential Paravisor (SVSM) options." - }, - "enableConfidentialCompute": { - "description": "Defines whether the instance should have confidential compute enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "ConfidentialParavisorConfig": { - "description": "A set of Confidential Paravisor (SVSM) options.", - "id": "ConfidentialParavisorConfig", - "properties": { - "confidentialTpmType": { - "enum": [ - "CONFIDENTIAL_TPM_TYPE_UNSPECIFIED", - "EPHEMERAL", - "NO_CC_TPM" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "sevSnpIrqMode": { - "enum": [ - "RESTRICTED", - "SEV_SNP_IRQ_MODE_UNSPECIFIED", - "UNRESTRICTED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ConnectionDraining": { - "description": "Message containing connection draining configuration.", - "id": "ConnectionDraining", - "properties": { - "drainingTimeoutSec": { - "description": "Configures a duration timeout for existing requests on a removed backend\ninstance. For supported load balancers and protocols, as described inEnabling\nconnection draining.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ConsistentHashLoadBalancerSettings": { - "description": "This message defines settings for a consistent hash style load balancer.", - "id": "ConsistentHashLoadBalancerSettings", - "properties": { - "httpCookie": { - "$ref": "ConsistentHashLoadBalancerSettingsHttpCookie", - "description": "Hash is based on HTTP Cookie. This field describes a HTTP cookie that will\nbe used as the hash key for the consistent hash load balancer. If the\ncookie is not present, it will be generated. This field is applicable if\nthe sessionAffinity is set to HTTP_COOKIE.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true." - }, - "httpHeaderName": { - "description": "The hash based on the value of the specified header field. This field is\napplicable if the sessionAffinity is set toHEADER_FIELD.", - "type": "string" - }, - "minimumRingSize": { - "description": "The minimum number of virtual nodes to use for the hash ring. Defaults to\n1024. Larger ring sizes result in more granular load distributions. If the\nnumber of hosts in the load balancing pool is larger than the ring size,\neach host will be assigned a single virtual node.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ConsistentHashLoadBalancerSettingsHttpCookie": { - "description": "The information about the HTTP Cookie on which the hash function is based\nfor load balancing policies that use a consistent hash.", - "id": "ConsistentHashLoadBalancerSettingsHttpCookie", - "properties": { - "name": { - "description": "Name of the cookie.", - "type": "string" - }, - "path": { - "description": "Path to set for the cookie.", - "type": "string" - }, - "ttl": { - "$ref": "Duration", - "description": "Lifetime of the cookie." - } - }, - "type": "object" - }, - "CorsPolicy": { - "description": "The specification for allowing client-side cross-origin requests. For more\ninformation about the W3C recommendation for cross-origin resource sharing\n(CORS), see Fetch API Living\nStandard.", - "id": "CorsPolicy", - "properties": { - "allowCredentials": { - "description": "In response to a preflight request, setting this to true\nindicates that\nthe actual request can include user credentials. This field translates to\nthe Access-Control-Allow-Credentials header.\n\nDefault is false.", - "type": "boolean" - }, - "allowHeaders": { - "description": "Specifies the content for the Access-Control-Allow-Headers\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowMethods": { - "description": "Specifies the content for the Access-Control-Allow-Methods\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOriginRegexes": { - "description": "Specifies a regular expression that matches allowed origins. For\nmore information, see regular expression syntax. \n\nAn origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOrigins": { - "description": "Specifies the list of origins that is allowed to do CORS requests.\n\nAn origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "disabled": { - "description": "If true, disables the CORS policy.\nThe default value is false, which indicates that the CORS\npolicy is in effect.", - "type": "boolean" - }, - "exposeHeaders": { - "description": "Specifies the content for the Access-Control-Expose-Headers\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxAge": { - "description": "Specifies how long results of a preflight request can be cached in\nseconds. This field translates to the Access-Control-Max-Age\nheader.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "CrossSiteNetwork": { - "description": "A resource that represents a cross-site network.\n\nYou can use cross-site networks to connect your on-premises networks to\neach other through Interconnect connections.", - "id": "CrossSiteNetwork", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of the cross-site network.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#crossSiteNetwork", - "description": "[Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for cross-site networks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "CrossSiteNetworkList": { - "description": "Response to the list request that contains a list of cross-site networks.", - "id": "CrossSiteNetworkList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of CrossSiteNetwork resources.", - "items": { - "$ref": "CrossSiteNetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#crossSiteNetwork", - "description": "[Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for cross-site networks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CustomErrorResponsePolicy": { - "description": "Specifies the custom error response policy that must be applied when the\nbackend service or backend bucket responds with an error.", - "id": "CustomErrorResponsePolicy", - "properties": { - "errorResponseRules": { - "description": "Specifies rules for returning error responses.\n\nIn a given policy, if you specify rules for both a range of error codes\nas well as rules for specific error codes then rules with specific error\ncodes have a higher priority. For example, assume that you configure a rule\nfor 401 (Un-authorized) code, and another for all 4 series\nerror codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.\nHowever if the backend service returns a 403, the rule for4xx takes effect.", - "items": { - "$ref": "CustomErrorResponsePolicyCustomErrorResponseRule" - }, - "type": "array" - }, - "errorService": { - "description": "The full or partial URL to the BackendBucket resource that\ncontains the custom error content. Examples are:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket\n - compute/v1/projects/project/global/backendBuckets/myBackendBucket\n - global/backendBuckets/myBackendBucket\n\nIf errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,\nan errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService. \n\nIf load balancer cannot reach\nthe backendBucket, a simple Not Found Error will\nbe returned, with the original response code (oroverrideResponseCode if configured).\n\nerrorService is not supported for internal or regionalHTTP/HTTPS load balancers.", - "type": "string" - } - }, - "type": "object" - }, - "CustomErrorResponsePolicyCustomErrorResponseRule": { - "description": "Specifies the mapping between the response code that will be returned along\nwith the custom error content and the response code returned by the backend\nservice.", - "id": "CustomErrorResponsePolicyCustomErrorResponseRule", - "properties": { - "matchResponseCodes": { - "description": "Valid values include:\n \n \n - A number between 400 and 599: For example\n 401 or 503, in which case the load balancer\n applies the policy if the error code exactly matches this value.\n - 5xx: Load Balancer will apply the policy if the\n backend service responds with any response code in the range of\n 500 to 599. \n - 4xx: Load\n Balancer will apply the policy if the backend service responds with any\n response code in the range of 400 to\n 499.\n\nValues must be unique within matchResponseCodes and across allerrorResponseRules ofCustomErrorResponsePolicy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "overrideResponseCode": { - "description": "The HTTP status code returned with the response containing the custom\nerror content. If overrideResponseCode is not supplied, the\nsame response code returned by the original backend bucket or backend\nservice is returned to the client.", - "format": "int32", - "type": "integer" - }, - "path": { - "description": "The full path to a file within backendBucket . For example:/errors/defaultError.html \n\npath must start\nwith a leading slash. path cannot have trailing slashes.\n\nIf the file is not available in backendBucket or the\nload balancer cannot reach the BackendBucket, a simpleNot Found Error is returned to the client. \n\nThe value must\nbe from 1 to 1024 characters", - "type": "string" - } - }, - "type": "object" - }, - "CustomerEncryptionKey": { - "id": "CustomerEncryptionKey", - "properties": { - "kmsKeyName": { - "description": "The name of the encryption key that is stored in Google Cloud KMS.\nFor example:\n\n\"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n\nThe fully-qualifed key name may be returned for resource GET requests. For \nexample: \n\n\"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n/cryptoKeyVersions/1", - "type": "string" - }, - "kmsKeyServiceAccount": { - "description": "The service account being used for the encryption request for the given KMS\nkey. If absent, the Compute Engine default service account is used.\nFor example:\n\n\"kmsKeyServiceAccount\": \"name@project_id.iam.gserviceaccount.com/", - "type": "string" - }, - "rawKey": { - "description": "Specifies a 256-bit customer-supplied\nencryption key, encoded in RFC\n4648 base64 to either encrypt or decrypt this resource. You can\nprovide either the rawKey or thersaEncryptedKey.\nFor example:\n\n\"rawKey\":\n\"SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=\"", - "type": "string" - }, - "rsaEncryptedKey": { - "description": "Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit\ncustomer-supplied encryption key to either encrypt or decrypt this\nresource. You can provide either the rawKey or thersaEncryptedKey.\nFor example:\n\n\"rsaEncryptedKey\":\n\"ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH\nz0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD\nD6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==\"\n\nThe key must meet the following requirements before you can provide it to \nCompute Engine: \n \n 1. The key is wrapped using a RSA public key certificate provided by \n Google. \n 2. After being wrapped, the key must be encoded in RFC 4648 base64 \n encoding. \n\nGets the RSA public key certificate provided by Google at: \n\n\nhttps://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem", - "type": "string" - }, - "sha256": { - "description": "[Output only] TheRFC\n4648 base64 encoded SHA-256 hash of the customer-supplied\nencryption key that protects this resource.", - "type": "string" - } - }, - "type": "object" - }, - "CustomerEncryptionKeyProtectedDisk": { - "id": "CustomerEncryptionKeyProtectedDisk", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with the disk with acustomer-supplied\nencryption key." - }, - "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk\nresource. This field is only applicable for persistent disks.\nFor example:\n\n\"source\": \"/compute/v1/projects/project_id/zones/zone/disks/\ndisk_name", - "type": "string" - } - }, - "type": "object" - }, - "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of\nday and time zone are either specified elsewhere or are insignificant. The\ndate is relative to the Gregorian Calendar. This can represent one of the\nfollowing:\n\n* A full date, with non-zero year, month, and day values.\n* A month and day, with a zero year (for example, an anniversary).\n* A year on its own, with a zero month and a zero day.\n* A year and month, with a zero day (for example, a credit card expiration\n date).\n\nRelated types:\n\n* google.type.TimeOfDay\n* google.type.DateTime\n* google.protobuf.Timestamp", - "id": "Date", - "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0\nto specify a year by itself or a year and month where the day isn't\nsignificant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a\nmonth and day.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without\na year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "DeprecationStatus": { - "description": "Deprecation status for a public resource.", - "id": "DeprecationStatus", - "properties": { - "deleted": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to DELETED. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "deprecated": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to DEPRECATED. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "obsolete": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to OBSOLETE. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "replacement": { - "description": "The URL of the suggested replacement for a deprecated resource.\nThe suggested replacement resource must be the same kind of resource as the\ndeprecated resource.", - "type": "string" - }, - "state": { - "description": "The deprecation state of this resource. This can be ACTIVE,DEPRECATED, OBSOLETE, or DELETED.\nOperations which communicate the end of life date for an image, can useACTIVE. Operations which create a new resource using aDEPRECATED resource will return successfully, but with a\nwarning indicating the deprecated resource and recommending its\nreplacement. Operations which use OBSOLETE orDELETED resources will be rejected and result in an error.", - "enum": [ - "ACTIVE", - "DELETED", - "DEPRECATED", - "OBSOLETE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "stateOverride": { - "$ref": "RolloutPolicy", - "description": "The rollout policy for this deprecation. This policy is only enforced by\nimage family views. The rollout policy restricts the zones where the\nassociated resource is considered in a deprecated state. When the rollout\npolicy does not include the user specified zone, or if the zone is rolled\nout, the associated resource is considered in a deprecated state.\n\nThe rollout policy for this deprecation is read-only, except for\nallowlisted users. This field might not be configured. To view the latest\nnon-deprecated image in a specific zone, use theimageFamilyViews.get method." - } - }, - "type": "object" - }, - "Disk": { - "description": "Represents a Persistent Disk resource.\n\nGoogle Compute Engine has two Disk resources:\n\n* [Zonal](/compute/docs/reference/rest/alpha/disks)\n* [Regional](/compute/docs/reference/rest/alpha/regionDisks)\n\nPersistent disks are required for running your VM instances.\nCreate both boot and non-boot (data) persistent disks. For more information,\nread Persistent Disks. For more\nstorage options, read Storage options.\n\nThe disks resource represents a zonal persistent disk.\nFor more information, readZonal persistent disks.\n\nThe regionDisks resource represents a\nregional persistent disk. For more information, read\nRegional resources.", - "id": "Disk", - "properties": { - "accessMode": { - "description": "The access mode of the disk.\n \n \n - READ_WRITE_SINGLE: The default AccessMode, means the\n disk can be attached to single instance in RW mode.\n - READ_WRITE_MANY: The AccessMode means the disk can be\n attached to multiple instances in RW mode.\n - READ_ONLY_MANY: The AccessMode means the disk can be\n attached to multiple instances in RO mode.\n\n\nThe AccessMode is only valid for Hyperdisk disk types.", - "enum": [ - "READ_ONLY_MANY", - "READ_WRITE_MANY", - "READ_WRITE_SINGLE" - ], - "enumDescriptions": [ - "The AccessMode means the disk can be attached to multiple instances in RO\nmode.", - "The AccessMode means the disk can be attached to multiple instances in RW\nmode.", - "The default AccessMode, means the disk can be attached to single instance\nin RW mode." - ], - "type": "string" - }, - "architecture": { - "description": "The architecture of the disk. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "asyncPrimaryDisk": { - "$ref": "DiskAsyncReplication", - "description": "Disk asynchronously replicated into this disk." - }, - "asyncSecondaryDisks": { - "additionalProperties": { - "$ref": "DiskAsyncReplicationList" - }, - "description": "[Output Only] A list of disks this disk is asynchronously replicated to.", - "type": "object" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the disk using a\ncustomer-supplied encryption key or a \ncustomer-managed encryption key.\n\nEncryption keys do not protect access to metadata of the disk.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the\nsame key if you use the disk later. For example, to create a disk snapshot,\nto create a disk image, to create a machine image, or to attach the disk to\na virtual machine.\n\nAfter you encrypt a disk with a customer-managed key, thediskEncryptionKey.kmsKeyName is set to a key *version*\nname once the disk is created. The disk is encrypted with this version of\nthe key. In the response, diskEncryptionKey.kmsKeyName appears\nin the following format:\n\n\"diskEncryptionKey.kmsKeyName\":\n\"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n/cryptoKeysVersions/version\n\nIf you do not provide an encryption key when creating the disk, then the \ndisk is encrypted using an automatically generated key and you don't need \nto provide a key to use the disk later." - }, - "enableConfidentialCompute": { - "description": "Whether this disk is using confidential compute mode.", - "type": "boolean" - }, - "eraseWindowsVssSignature": { - "description": "Specifies whether the disk restored from a source snapshot should erase\nWindows specific VSS signature.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interface": { - "deprecated": true, - "description": "[Deprecated] Specifies the disk interface to use for attaching this disk,\nwhich is either SCSI or NVME. The default isSCSI.", - "enum": [ - "NVME", - "SCSI", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#disk", - "description": "[Output Only] Type of the resource. Always compute#disk for\ndisks.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this disk, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a disk.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this disk. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "lastAttachTimestamp": { - "description": "[Output Only] Last attach timestamp inRFC3339\ntext format.", - "type": "string" - }, - "lastDetachTimestamp": { - "description": "[Output Only] Last detach timestamp inRFC3339\ntext format.", - "type": "string" - }, - "licenseCodes": { - "description": "Integer license codes indicating which licenses are attached to this disk.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "A list of publicly visible licenses. Reserved for Google's use.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the disk close to other resources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "locked": { - "description": "[Output Only] The field indicates if the disk is created from a locked\nsource image. Attachment of a disk created from a locked source image will\ncause the following operations to become irreversibly prohibited:\n \n - R/W or R/O disk attachment to any other instance\n - Disk detachment. And the disk can only be deleted when the instance\n is deleted\n - Creation of images or snapshots\n - Disk cloning\n\n\n\nFurthermore, the instance with at least one disk with locked flag set to\ntrue will be prohibited from performing the operations below:\n \n - Further attachment of secondary disks.\n - Detachment of any disks\n - Create machine images\n - Create instance template\n - Delete the instance with --keep-disk parameter set to true for locked\n disks\n - Attach a locked disk with --auto-delete parameter set to false", - "type": "boolean" - }, - "multiWriter": { - "description": "Indicates whether or not the disk can be read/write attached to\nmore than one instance.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.disks.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "options": { - "description": "Internal use only.", - "type": "string" - }, - "params": { - "$ref": "DiskParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "physicalBlockSizeBytes": { - "description": "Physical block size of the persistent disk, in bytes.\nIf not present in a request, a default value is used.\nThe currently supported size is 4096, other sizes may be added in\nthe future.\nIf an unsupported value is requested, the error message will list\nthe supported values for the caller's project.", - "format": "int64", - "type": "string" - }, - "provisionedIops": { - "description": "Indicates how many IOPS to provision for the disk. This sets the number\nof I/O operations per second that the disk can handle. Values must be\nbetween 10,000 and 120,000. For more details, see theExtreme persistent\ndisk documentation.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "Indicates how much throughput to provision for the disk. This sets the\nnumber of throughput mb per second that the disk can handle. Values must be\ngreater than or equal to 1.", - "format": "int64", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the disk resides. Only applicable for\nregional resources.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "replicaZones": { - "description": "URLs of the zones where the disk should be replicated to. Only applicable\nfor regional resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourcePolicies": { - "description": "Resource policies applied to this disk for automatic snapshot creations.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "DiskResourceStatus", - "description": "[Output Only] Status information for the disk resource." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sizeGb": { - "description": "Size, in GB, of the persistent disk. You can specify\nthis field when creating a persistent disk using thesourceImage, sourceSnapshot, orsourceDisk parameter, or specify it alone to create an empty\npersistent disk.\n\nIf you specify this field along with a source, the value ofsizeGb must not be less than the size of the\nsource.\nAcceptable values are greater than 0.", - "format": "int64", - "type": "string" - }, - "sourceConsistencyGroupPolicy": { - "description": "[Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk\nthat was created using a consistency group.", - "type": "string" - }, - "sourceConsistencyGroupPolicyId": { - "description": "[Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk\nthat was created using a consistency group.", - "type": "string" - }, - "sourceDisk": { - "description": "The source disk used to create this disk. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The unique ID of the disk used to create this disk. This\nvalue identifies the exact disk that was used to create this persistent\ndisk. For example, if you created the persistent disk from a disk that\nwas later deleted and recreated under the same name, the source disk ID\nwould identify the exact version of the disk that was used.", - "type": "string" - }, - "sourceImage": { - "description": "The source image used to create this disk. If the source image is\ndeleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify\nthe image by its family name. For example, specifyfamily/debian-9 to use the latest Debian 9 image:\n\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the\nimage name in the following format:\n\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns\nthe latest version of the image in that family. Replace the image name\nwith family/family-name:\n\nglobal/images/family/my-image-family", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source image. Required if the source image is\nprotected by a customer-supplied encryption key." - }, - "sourceImageId": { - "description": "[Output Only] The ID value of the image used to create this disk. This\nvalue identifies the exact image that was used to create this persistent\ndisk. For example, if you created the persistent disk from an image that\nwas later deleted and recreated under the same name, the source image ID\nwould identify the exact version of the image that was used.", - "type": "string" - }, - "sourceInstantSnapshot": { - "description": "The source instant snapshot used to create this disk. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot\n - projects/project/zones/zone/instantSnapshots/instantSnapshot \n - zones/zone/instantSnapshots/instantSnapshot", - "type": "string" - }, - "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this\ndisk. This value identifies the exact instant snapshot that was used to\ncreate this persistent disk. For example, if you created the persistent\ndisk from an instant snapshot that was later deleted and recreated under\nthe same name, the source instant snapshot ID would identify the exact\nversion of the instant snapshot that was used.", - "type": "string" - }, - "sourceMachineImage": { - "description": "The machine image to create the disk from. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/machineImages/machineImage \n - projects/project/global/machineImages/machineImage\n - global/machineImages/machineImage", - "type": "string" - }, - "sourceMachineImageDiskDeviceName": { - "description": "Input only. The device name of a disk within a given machine image. The\nsource_machine_image must be specified.", - "type": "string" - }, - "sourceMachineImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source machine image. Required if the source\nmachine image is protected by a customer-supplied encryption key." - }, - "sourceMachineImageId": { - "description": "[Output Only] The unique ID of the machine image used to create this disk.\nThis value identifies the exact machine image that was used to create this\npersistent disk. For example, if you created the persistent disk from a\nmachine image that was later deleted and recreated under the same name, the\nsource machine image ID would identify the exact version of the machine\nimage that was used.", - "type": "string" - }, - "sourceSnapshot": { - "description": "The source snapshot used to create this disk. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n - projects/project/global/snapshots/snapshot\n - global/snapshots/snapshot", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source snapshot. Required if the source snapshot\nis protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "description": "[Output Only] The unique ID of the snapshot used to create this disk. This\nvalue identifies the exact snapshot that was used to create this persistent\ndisk. For example, if you created the persistent disk from a snapshot that\nwas later deleted and recreated under the same name, the source snapshot ID\nwould identify the exact version of the snapshot that was used.", - "type": "string" - }, - "sourceStorageObject": { - "description": "The full Google Cloud Storage URI where the disk image is stored. This file\nmust be a gzip-compressed tarball whose name ends in .tar.gz or virtual\nmachine disk whose name ends in vmdk. Valid URIs may start with gs:// or\nhttps://storage.googleapis.com/. This flag is not optimized for creating\nmultiple disks from a source storage object. To create many disks from a\nsource storage object, use gcloud compute images\nimport instead.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of disk creation.\n \n \n - CREATING: Disk is provisioning.\n - RESTORING: Source data is being copied into the\n disk.\n - FAILED: Disk creation failed.\n - READY: Disk is ready for use.\n - DELETING: Disk is deleting.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "RESTORING", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "Disk is provisioning", - "Disk is deleting.", - "Disk creation failed.", - "Disk is ready for use.", - "Source data is being copied into the disk.", - "Disk is currently unavailable and cannot be accessed, attached or\ndetached." - ], - "type": "string" - }, - "storagePool": { - "description": "The storage pool in which the new disk is created. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool\n - projects/project/zones/zone/storagePools/storagePool \n - zones/zone/storagePools/storagePool", - "type": "string" - }, - "storageType": { - "description": "[Deprecated] Storage type of the persistent disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": { - "description": "URL of the disk type resource describing which disk type to use to create\nthe disk. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk\ntypes.", - "type": "string" - }, - "userLicenses": { - "description": "A list of publicly visible user-licenses. Unlike regular licenses, user\nprovided licenses can be modified after the disk is created. This includes\na list of URLs to the license resource. For example, to provide a debian\nlicense:\n\nhttps://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch", - "items": { - "type": "string" - }, - "type": "array" - }, - "users": { - "description": "[Output Only] Links to the users of the disk (attached instances)\nin form:projects/project/zones/zone/instances/instance", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the disk resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "DiskAggregatedList": { - "id": "DiskAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "DisksScopedList", - "description": "[Output Only] Name of the scope containing this set of disks." - }, - "description": "A list of DisksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#diskAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#diskAggregatedList for aggregated lists of persistent\ndisks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskAsyncReplication": { - "id": "DiskAsyncReplication", - "properties": { - "consistencyGroupPolicy": { - "description": "[Output Only] URL of the DiskConsistencyGroupPolicy if replication was\nstarted on the disk as a member of a group.", - "type": "string" - }, - "consistencyGroupPolicyId": { - "description": "[Output Only] ID of the DiskConsistencyGroupPolicy if replication was\nstarted on the disk as a member of a group.", - "type": "string" - }, - "disk": { - "description": "The other disk asynchronously replicated to or from the current disk.\nYou can provide this as a partial or full URL to the resource.\nFor example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - }, - "diskId": { - "description": "[Output Only] The unique ID of the other disk asynchronously replicated\nto or from the current disk. This value identifies the exact disk that\nwas used to create this replication. For example, if you started\nreplicating the persistent disk from a disk that was later deleted and\nrecreated under the same name, the disk ID would identify the exact\nversion of the disk that was used.", - "type": "string" - } - }, - "type": "object" - }, - "DiskAsyncReplicationList": { - "id": "DiskAsyncReplicationList", - "properties": { - "asyncReplicationDisk": { - "$ref": "DiskAsyncReplication" - } - }, - "type": "object" - }, - "DiskInstantiationConfig": { - "description": "A specification of the desired way to instantiate a disk in the instance\ntemplate when its created from a source instance.", - "id": "DiskInstantiationConfig", - "properties": { - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "customImage": { - "description": "The custom source image to be used to restore this disk when instantiating\nthis instance template.", - "type": "string" - }, - "deviceName": { - "description": "Specifies the device name of the disk to which the configurations apply to.", - "type": "string" - }, - "instantiateFrom": { - "description": "Specifies whether to include the disk and what image to use. Possible\nvalues are:\n \n \n - source-image: to use the same image that was used to\n create the source instance's corresponding disk. Applicable to the boot\n disk and additional read-write disks.\n - source-image-family: to use the same image family that\n was used to create the source instance's corresponding disk. Applicable\n to the boot disk and additional read-write disks.\n - custom-image: to use a user-provided image url for disk\n creation. Applicable to the boot disk and additional read-write\n disks. \n - attach-read-only: to attach a read-only\n disk. Applicable to read-only disks.\n - do-not-include: to exclude a disk from the template.\n Applicable to additional read-write disks, local SSDs, and read-only\n disks.", - "enum": [ - "ATTACH_READ_ONLY", - "BLANK", - "CUSTOM_IMAGE", - "DEFAULT", - "DO_NOT_INCLUDE", - "SOURCE_IMAGE", - "SOURCE_IMAGE_FAMILY" - ], - "enumDescriptions": [ - "Attach the existing disk in read-only mode. The request will fail if the\ndisk was attached in read-write mode on the source instance. Applicable\nto: read-only disks.", - "Create a blank disk. The disk will be created unformatted. Applicable to:\nadditional read-write disks, local SSDs.", - "Use the custom image specified in the custom_image field. Applicable to:\nboot disk, additional read-write disks.", - "Use the default instantiation option for the corresponding type of disk.\nFor boot disk and any other R/W disks, new custom images will be created\nfrom each disk. For read-only disks, they will be attached in read-only\nmode. Local SSD disks will be created as blank volumes.", - "Do not include the disk in the instance template. Applicable to:\nadditional read-write disks, local SSDs, read-only disks.", - "Use the same source image used for creation of the source instance's\ncorresponding disk. The request will fail if the source VM's disk was\ncreated from a snapshot. Applicable to: boot disk, additional read-write\ndisks.", - "Use the same source image family used for creation of the source\ninstance's corresponding disk. The request will fail if the source image\nof the source disk does not belong to any image family. Applicable to:\nboot disk, additional read-write disks." - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskList": { - "description": "A list of Disk resources.", - "id": "DiskList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Disk resources.", - "items": { - "$ref": "Disk" - }, - "type": "array" - }, - "kind": { - "default": "compute#diskList", - "description": "[Output Only] Type of resource. Always compute#diskList for\nlists of disks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskMoveRequest": { - "id": "DiskMoveRequest", - "properties": { - "destinationZone": { - "description": "The URL of the destination zone to move the disk. This can be a full or\npartial URL. For example, the following are all valid URLs to a zone:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n - projects/project/zones/zone \n - zones/zone", - "type": "string" - }, - "targetDisk": { - "description": "The URL of the target disk to move. This can be a full or partial URL.\nFor example, the following are all valid URLs to a disk:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "DiskPairReplicationState": { - "id": "DiskPairReplicationState", - "properties": { - "dataReplicationState": { - "description": "[Output Only] The status of disk creation.\n \n \n - ASYNC_REPLICATION_STATE_INITIALIZING: The device is\n doing the initial replication after starting the\n replication.\n \n - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The\n primary disk is healthily replicating to the secondary device i.e.\n last_replication_time is within RPO.\n \n - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN:\n The replication is lagging above the SLO limit due to the disk's change\n rate being above the supported limit.\n \n - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING:\n The replication is lagging, and the RPO is not being met due to some\n internal issue.\n \n - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The\n replication is completely stuck due to some internal error.\n \n - ASYNC_REPLICATION_STATE_STOPPING: The replication\n is under the process of being stopped. This is a transient state.\n \n - ASYNC_REPLICATION_STATE_STOPPED: The replication\n between the disk-pairs have stopped.\n \n - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN:\n The replication is lagging above the SLO limit for the disk in the\n consistency group due to disk's change rate being above the supported\n limit.", - "enum": [ - "ASYNC_REPLICATION_STATE_INITIALIZING", - "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN", - "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN", - "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING", - "ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY", - "ASYNC_REPLICATION_STATE_REPLICATION_STUCK", - "ASYNC_REPLICATION_STATE_STOPPED", - "ASYNC_REPLICATION_STATE_STOPPING", - "ASYNC_REPLICATION_STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The device is doing the initial replication after starting the\nreplication.", - "The replication is lagging behind (last_replication_time \u003e RPO) for the\ndisk in a consistency group because some other disk is writing the data at\na rate above the supported limit.", - "The replication is lagging behind (last_replication_time \u003e RPO), because\nthe disk's change rate is above the supported limit.", - "The replication is lagging, and the RPO is not being met due to some\ninternal issue.", - "The primary disk is healthily replicating to the secondary device i.e.\nlast_replication_time is within RPO.", - "The replication is completely stuck due to some internal error.", - "The replication between the disk-pairs have stopped.", - "The replication is under the process of being stopped. This is a\ntransient sate.", - "" - ], - "type": "string" - }, - "replicationDiskPair": { - "$ref": "ReplicationDiskPair" - } - }, - "type": "object" - }, - "DiskParams": { - "description": "Additional disk params.", - "id": "DiskParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the disk. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "DiskResourceStatus": { - "id": "DiskResourceStatus", - "properties": { - "asyncPrimaryDisk": { - "$ref": "DiskResourceStatusAsyncReplicationStatus" - }, - "asyncSecondaryDisks": { - "additionalProperties": { - "$ref": "DiskResourceStatusAsyncReplicationStatus" - }, - "description": "Key: disk, value: AsyncReplicationStatus message", - "type": "object" - }, - "usedBytes": { - "description": "[Output Only] Space used by data stored in the disk (in bytes). Note that\nthis field is set only when the disk is in a storage pool.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "DiskResourceStatusAsyncReplicationStatus": { - "id": "DiskResourceStatusAsyncReplicationStatus", - "properties": { - "state": { - "enum": [ - "ACTIVE", - "CREATED", - "STARTING", - "STATE_UNSPECIFIED", - "STOPPED", - "STOPPING" - ], - "enumDescriptions": [ - "Replication is active.", - "Secondary disk is created and is waiting for replication to start.", - "Replication is starting.", - "", - "Replication is stopped.", - "Replication is stopping." - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskSettings": { - "id": "DiskSettings", - "properties": { - "accessLocation": { - "$ref": "DiskSettingsAccessLocation", - "description": "Policy of which locations are allowed to create regional\nsnapshots." - }, - "defaultResourcePolicies": { - "additionalProperties": { - "$ref": "DiskSettingsResourcePolicyDetails" - }, - "description": "An optional parameter for storing the default resource policies that\nwill be used for the Disks created in the given scope.\n\nThe Key is a string type, provided by customers to uniquely identify the\ndefault Resource Policy entry.\n\nThe Value is a Default ResourcePolicyDetails Object used to represent the\ndetailed information of the Resource Policy entry.", - "type": "object" - } - }, - "type": "object" - }, - "DiskSettingsAccessLocation": { - "description": "AccessLocation is only used for regional snapshot. It contains which\nregions are allowed to create a regional snapshot from disks located in the\ngiven region/zone.\nIt includes key-value pairs designed to store the following structure. The\nkeys should match their corresponding values, which must be provided:\naccess_location: {\n locations {\n us-central1 {\n region: \"us-central1\"\n },\n asia-west2 {\n region: \"asia-west2\"\n }\n }\n}", - "id": "DiskSettingsAccessLocation", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "DiskSettingsAccessLocationAccessLocationPreference" - }, - "description": "List of regions that can create a regional\nsnapshot from the current region", - "type": "object" - }, - "policy": { - "description": "Policy of which location is allowed to access snapshot.", - "enum": [ - "ALL_REGIONS", - "POLICY_UNSPECIFIED", - "SPECIFIC_REGIONS" - ], - "enumDescriptions": [ - "Any regions will be able to access the source location.", - "", - "Only allowlisted regions will be able to create region scoped\nsnapshots" - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskSettingsAccessLocationAccessLocationPreference": { - "description": "A structure for specifying an allowed target region to create snapshot.", - "id": "DiskSettingsAccessLocationAccessLocationPreference", - "properties": { - "region": { - "description": "Accessible region name", - "type": "string" - } - }, - "type": "object" - }, - "DiskSettingsResourcePolicyDetails": { - "description": "This is the object for storing the detail information about the\nResource Policy that will be set as default ones for the Disks\nthat is using the DiskSettings.\n\nIt contains:\n- one target Resource Policy referenced by its Fully-Qualified URL,\n- [output only] Disk Types that will be excluded from using this\n Resource Policy,\n- Other filtering support (e.g. Label filtering) for Default Resource\n Policy can be added here as well", - "id": "DiskSettingsResourcePolicyDetails", - "properties": { - "excludedDiskTypes": { - "description": "[Output Only] A list of Disk Types that will be excluded from applying\nthe Resource Policy referenced here.\nIf absent, Disks created in any DiskType can use the referenced\ndefault Resource Policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourcePolicy": { - "description": "The target Resource Policies identified by their Fully-Qualified URL.", - "type": "string" - } - }, - "type": "object" - }, - "DiskType": { - "description": "Represents a Disk Type resource.\n\nGoogle Compute Engine has two Disk Type resources:\n\n* [Regional](/compute/docs/reference/rest/alpha/regionDiskTypes)\n* [Zonal](/compute/docs/reference/rest/alpha/diskTypes)\n\nYou can choose from a variety of disk types based on your needs.\nFor more information, readStorage options.\n\nThe diskTypes resource represents disk types for a zonal\npersistent disk.\nFor more information, readZonal persistent disks.\n\nThe regionDiskTypes resource represents disk types for a\nregional persistent disk. For more information, read Regional persistent disks.", - "id": "DiskType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultDiskSizeGb": { - "description": "[Output Only] Server-defined default disk size in GB.", - "format": "int64", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this disk type." - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#diskType", - "description": "[Output Only] Type of the resource. Always compute#diskType\nfor disk types.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the disk type resides. Only\napplicable for regional resources.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "validDiskSize": { - "description": "[Output Only] An optional textual description of the valid disk size,\nsuch as \"10GB-10TB\".", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the disk type resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "DiskTypeAggregatedList": { - "id": "DiskTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "DiskTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of disk types." - }, - "description": "A list of DiskTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#diskTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#diskTypeAggregatedList.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskTypeList": { - "description": "Contains a list of disk types.", - "id": "DiskTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "kind": { - "default": "compute#diskTypeList", - "description": "[Output Only] Type of resource. Always compute#diskTypeList\nfor disk types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskTypesScopedList": { - "id": "DiskTypesScopedList", - "properties": { - "diskTypes": { - "description": "[Output Only] A list of disk types contained in this scope.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of disk types\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DisksAddResourcePoliciesRequest": { - "id": "DisksAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Full or relative path to the resource policy to be added to this disk. You\ncan only specify one resource policy.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "DisksRemoveResourcePoliciesRequest": { - "id": "DisksRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "DisksResizeRequest": { - "id": "DisksResizeRequest", - "properties": { - "sizeGb": { - "description": "The new size of the persistent disk, which is specified in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "DisksScopedList": { - "id": "DisksScopedList", - "properties": { - "disks": { - "description": "[Output Only] A list of disks contained in this scope.", - "items": { - "$ref": "Disk" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of disks when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DisksStartAsyncReplicationRequest": { - "id": "DisksStartAsyncReplicationRequest", - "properties": { - "asyncSecondaryDisk": { - "description": "The secondary disk to start asynchronous replication to.\nYou can provide this as a partial or full URL to the resource. For example,\nthe following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "DisksStopGroupAsyncReplicationResource": { - "description": "A transient resource used in compute.disks.stopGroupAsyncReplication and\ncompute.regionDisks.stopGroupAsyncReplication. It is only used to process\nrequests and is not persisted.", - "id": "DisksStopGroupAsyncReplicationResource", - "properties": { - "resourcePolicy": { - "description": "The URL of the DiskConsistencyGroupPolicy for the group of disks to stop.\nThis may be a full or partial URL, such as:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "DisplayDevice": { - "description": "A set of Display Device options", - "id": "DisplayDevice", - "properties": { - "enableDisplay": { - "description": "Defines whether the instance has Display enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "DistributionPolicy": { - "id": "DistributionPolicy", - "properties": { - "targetShape": { - "description": "The distribution shape to which the group converges either proactively or\non resize events (depending on the value set inupdatePolicy.instanceRedistributionType).", - "enum": [ - "ANY", - "ANY_SINGLE_ZONE", - "BALANCED", - "EVEN" - ], - "enumDescriptions": [ - "The group picks zones for creating VM instances to fulfill the requested\nnumber of VMs within present resource constraints and to maximize\nutilization of unused zonal reservations. Recommended for batch workloads\nthat do not require high availability.", - "The group creates all VM instances within a single zone. The zone is\nselected based on the present resource constraints and to maximize\nutilization of unused zonal reservations.\nRecommended for batch workloads with heavy interprocess communication.", - "The group prioritizes acquisition of resources, scheduling VMs in zones\nwhere resources are available while distributing VMs as evenly as\npossible across selected zones to minimize the impact of zonal failure.\nRecommended for highly available serving workloads.", - "The group schedules VM instance creation and deletion to achieve and\nmaintain an even number of managed instances across the selected zones.\nThe distribution is even when the number of managed instances does not\ndiffer by more than 1 between any two zones. Recommended for highly\navailable serving workloads." - ], - "type": "string" - }, - "zones": { - "description": "Zones where the regional managed instance group will create and manage\nits instances.", - "items": { - "$ref": "DistributionPolicyZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, - "DistributionPolicyZoneConfiguration": { - "id": "DistributionPolicyZoneConfiguration", - "properties": { - "zone": { - "annotations": { - "required": [ - "compute.regionInstanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.update" - ] - }, - "description": "The URL of thezone.\nThe zone must exist in the region where the managed instance group is\nlocated.", - "type": "string" - } - }, - "type": "object" - }, - "Duration": { - "description": "A Duration represents a fixed-length span of time represented\nas a count of seconds and fractions of seconds at nanosecond\nresolution. It is independent of any calendar and concepts like \"day\"\nor \"month\". Range is approximately 10,000 years.", - "id": "Duration", - "properties": { - "nanos": { - "description": "Span of time that's a fraction of a second at nanosecond resolution.\nDurations less than one second are represented with a 0\n`seconds` field and a positive `nanos` field. Must be from 0\nto 999,999,999 inclusive.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Span of time at a resolution of a second. Must be from 0\nto 315,576,000,000 inclusive. Note: these bounds are computed from:\n60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ErrorInfo": { - "description": "Describes the cause of the error with structured details.\n\nExample of an error when contacting the \"pubsub.googleapis.com\" API when it\nis not enabled:\n\n { \"reason\": \"API_DISABLED\"\n \"domain\": \"googleapis.com\"\n \"metadata\": {\n \"resource\": \"projects/123\",\n \"service\": \"pubsub.googleapis.com\"\n }\n }\n\nThis response indicates that the pubsub.googleapis.com API is not enabled.\n\nExample of an error that is returned when attempting to create a Spanner\ninstance in a region that is out of stock:\n\n { \"reason\": \"STOCKOUT\"\n \"domain\": \"spanner.googleapis.com\",\n \"metadata\": {\n \"availableRegions\": \"us-central1,us-east2\"\n }\n }", - "id": "ErrorInfo", - "properties": { - "domain": { - "description": "The logical grouping to which the \"reason\" belongs. The error domain\nis typically the registered service name of the tool or product that\ngenerates the error. Example: \"pubsub.googleapis.com\". If the error is\ngenerated by some common infrastructure, the error domain must be a\nglobally unique value that identifies the infrastructure. For Google API\ninfrastructure, the error domain is \"googleapis.com\".", - "type": "string" - }, - "metadatas": { - "additionalProperties": { - "type": "string" - }, - "description": "Additional structured details about this error.\n\nKeys must match a regular expression of `a-z+` but should\nideally be lowerCamelCase. Also, they must be limited to 64 characters in\nlength. When identifying the current value of an exceeded limit, the units\nshould be contained in the key, not the value. For example, rather than\n`{\"instanceLimit\": \"100/request\"}`, should be returned as,\n`{\"instanceLimitPerRequest\": \"100\"}`, if the client exceeds the number of\ninstances that can be created in a single (batch) request.", - "type": "object" - }, - "reason": { - "description": "The reason of the error. This is a constant value that identifies the\nproximate cause of the error. Error reasons are unique within a particular\ndomain of errors. This should be at most 63 characters and match a\nregular expression of `A-Z+[A-Z0-9]`, which represents\nUPPER_SNAKE_CASE.", - "type": "string" - } - }, - "type": "object" - }, - "ExchangedPeeringRoute": { - "id": "ExchangedPeeringRoute", - "properties": { - "destRange": { - "description": "The destination range of the route.", - "type": "string" - }, - "imported": { - "description": "True if the peering route has been imported from a peer. The actual import\nhappens if the field networkPeering.importCustomRoutes is true\nfor this network, and networkPeering.exportCustomRoutes is\ntrue for the peer network, and the import does not result in a route\nconflict.", - "type": "boolean" - }, - "nextHopRegion": { - "description": "The region of peering route next hop, only applies to dynamic routes.", - "type": "string" - }, - "priority": { - "description": "The priority of the peering route.", - "format": "uint32", - "type": "integer" - }, - "type": { - "description": "The type of the peering route.", - "enum": [ - "DYNAMIC_PEERING_ROUTE", - "STATIC_PEERING_ROUTE", - "SUBNET_PEERING_ROUTE" - ], - "enumDescriptions": [ - "For routes exported from local network.", - "The peering route.", - "The peering route corresponding to subnetwork range." - ], - "type": "string" - } - }, - "type": "object" - }, - "ExchangedPeeringRoutesList": { - "id": "ExchangedPeeringRoutesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ExchangedPeeringRoute resources.", - "items": { - "$ref": "ExchangedPeeringRoute" - }, - "type": "array" - }, - "kind": { - "default": "compute#exchangedPeeringRoutesList", - "description": "[Output Only] Type of resource. Alwayscompute#exchangedPeeringRoutesList for exchanged peering\nroutes lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL)\nsyntax. CEL is a C-like expression language. The syntax and semantics of CEL\nare documented at https://github.com/google/cel-spec.\n\nExample (Comparison):\n\n title: \"Summary size limit\"\n description: \"Determines if a summary is less than 100 chars\"\n expression: \"document.summary.size() \u003c 100\"\n\nExample (Equality):\n\n title: \"Requestor is owner\"\n description: \"Determines if requestor is the document owner\"\n expression: \"document.owner == request.auth.claims.email\"\n\nExample (Logic):\n\n title: \"Public documents\"\n description: \"Determine whether the document should be publicly visible\"\n expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\"\n\nExample (Data Manipulation):\n\n title: \"Notification string\"\n description: \"Create a notification string with a timestamp.\"\n expression: \"'New message received at ' + string(document.create_time)\"\n\nThe exact variables and functions that may be referenced within an expression\nare determined by the service that evaluates it. See the service\ndocumentation for additional information.", - "id": "Expr", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language\nsyntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error\nreporting, 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\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGateway": { - "description": "Represents an external VPN gateway.\n\nExternal VPN gateway is the on-premises VPN gateway(s) or another cloud\nprovider's VPN gateway that connects to your Google Cloud VPN gateway.\n\nTo create a highly available VPN from Google Cloud Platform to your\nVPN gateway or another cloud provider's VPN gateway, you must create a\nexternal VPN gateway resource with information about the other gateway.\n\nFor more information about using external VPN gateways, see\nCreating an HA VPN gateway and tunnel pair to a peer VPN.", - "id": "ExternalVpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interfaces": { - "description": "A list of interfaces for this external VPN gateway.\n\nIf your peer-side gateway is an on-premises gateway and non-AWS cloud\nproviders' gateway, at most two interfaces can be provided for an external\nVPN gateway. If your peer side is an AWS virtual private gateway, four\ninterfaces should be provided for an external VPN gateway.", - "items": { - "$ref": "ExternalVpnGatewayInterface" - }, - "type": "array" - }, - "kind": { - "default": "compute#externalVpnGateway", - "description": "[Output Only] Type of the resource. Alwayscompute#externalVpnGateway for externalVpnGateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this ExternalVpnGateway,\nwhich is essentially a hash of the labels set used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an ExternalVpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.externalVpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "ExternalVpnGatewayParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "redundancyType": { - "description": "Indicates the user-supplied redundancy type of this external VPN gateway.", - "enum": [ - "FOUR_IPS_REDUNDANCY", - "SINGLE_IP_INTERNALLY_REDUNDANT", - "TWO_IPS_REDUNDANCY" - ], - "enumDescriptions": [ - "The external VPN gateway has four public IP addresses; at the time of\nwriting this API, the AWS virtual private gateway is an example which has\nfour public IP addresses for high availability connections; there should\nbe two VPN connections in the AWS virtual private gateway , each AWS VPN\nconnection has two public IP addresses; please make sure to put two\npublic IP addresses from one AWS VPN connection into interfaces 0 and 1\nof this external VPN gateway, and put the other two public IP addresses\nfrom another AWS VPN connection into interfaces 2 and 3 of this external\nVPN gateway. When displaying highly available configuration status\nfor the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN\ngateway, Google will always detect whether interfaces 0 and 1 are\nconnected on one interface of HA Cloud VPN gateway, and detect whether\ninterfaces 2 and 3 are connected to another interface of the HA Cloud VPN\ngateway.", - "The external VPN gateway has only one public IP address which internally\nprovide redundancy or failover.", - "The external VPN gateway has two public IP addresses which are redundant\nwith each other, the following two types of setup on your on-premises\nside would have this type of redundancy:\n(1) Two separate on-premises gateways, each with one public IP address,\n the two on-premises gateways are redundant with each other.\n(2) A single on-premise gateway with two public IP addresses that are\n redundant with eatch other." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGatewayInterface": { - "description": "The interface for the external VPN gateway.", - "id": "ExternalVpnGatewayInterface", - "properties": { - "id": { - "description": "The numeric ID of this interface.\nThe allowed input values for this id for different redundancy types of\nexternal VPN gateway:\n \n - SINGLE_IP_INTERNALLY_REDUNDANT - 0\n - TWO_IPS_REDUNDANCY - 0, 1\n - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3", - "format": "uint32", - "type": "integer" - }, - "ipAddress": { - "description": "IP address of the interface in the external VPN gateway. Only IPv4 is\nsupported. This IP address can be either from your on-premise gateway or\nanother Cloud provider's VPN gateway, it cannot be an IP address from\nGoogle Compute Engine.", - "type": "string" - }, - "ipv6Address": { - "description": "IPv6 address of the interface in the external VPN gateway. This IPv6\naddress can be either from your on-premise gateway or another Cloud\nprovider's VPN gateway, it cannot be an IP address from Google Compute\nEngine. Must specify an IPv6 address (not IPV4-mapped) using any format\ndescribed in RFC 4291 (e.g. 2001:db8:0:0:2d9:51:0:0). The output format\nis RFC 5952 format (e.g. 2001:db8::2d9:51:0:0).", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGatewayList": { - "description": "Response to the list request, and contains a list of externalVpnGateways.", - "id": "ExternalVpnGatewayList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ExternalVpnGateway resources.", - "items": { - "$ref": "ExternalVpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#externalVpnGatewayList", - "description": "[Output Only] Type of resource. Always compute#externalVpnGatewayList for lists of externalVpnGateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ExternalVpnGatewayParams": { - "id": "ExternalVpnGatewayParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "FileContentBuffer": { - "id": "FileContentBuffer", - "properties": { - "content": { - "description": "The raw content in the secure keys file.", - "format": "byte", - "type": "string" - }, - "fileType": { - "description": "The file type of source file.", - "enum": [ - "BIN", - "UNDEFINED", - "X509" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Firewall": { - "description": "Represents a Firewall Rule resource.\n\nFirewall rules allow or deny ingress traffic to, and egress traffic from your\ninstances. For more information, readFirewall rules.", - "id": "Firewall", - "properties": { - "allowed": { - "description": "The list of ALLOW rules specified by this firewall. Each rule specifies a\nprotocol and port-range tuple that describes a permitted connection.", - "items": { - "properties": { - "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be one of the\nfollowing well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies.\nThis field is only applicable for the UDP or TCP protocol.\nEach entry must be either an integer or a range.\nIf not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"],\nand [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "denied": { - "description": "The list of DENY rules specified by this firewall. Each rule specifies a\nprotocol and port-range tuple that describes a denied connection.", - "items": { - "properties": { - "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be one of the\nfollowing well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies.\nThis field is only applicable for the UDP or TCP protocol.\nEach entry must be either an integer or a range.\nIf not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"],\nand [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "destinationRanges": { - "description": "If destination ranges are specified, the firewall rule applies only to\ntraffic that has destination IP address in these ranges. These ranges must\nbe expressed inCIDR format. Both IPv4 and IPv6 are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "direction": { - "description": "Direction of traffic to which this firewall applies, either `INGRESS` or\n`EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot\nspecify the sourceTags fields.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "Indicates that firewall should apply to outgoing traffic.", - "Indicates that firewall should apply to incoming traffic." - ], - "type": "string" - }, - "disabled": { - "description": "Denotes whether the firewall rule is disabled. When set to true, the\nfirewall rule is not enforced and the network behaves as if it did not\nexist. If this is unspecified, the firewall rule will be enabled.", - "type": "boolean" - }, - "enableLogging": { - "deprecated": true, - "description": "Deprecated in favor of enable in LogConfig.\nThis field denotes whether to enable logging for a particular\nfirewall rule. If logging is enabled, logs will be exported t\nCloud Logging.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#firewall", - "description": "[Output Only] Type of the resource. Always compute#firewall\nfor firewall rules.", - "type": "string" - }, - "logConfig": { - "$ref": "FirewallLogConfig", - "description": "This field denotes the logging options for a particular firewall rule. If\nlogging is enabled, logs will be exported to Cloud Logging." - }, - "name": { - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character\nmust be a lowercase letter, and all following characters (except for the\nlast character) must be a dash, lowercase letter, or digit. The last\ncharacter must be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "URL of the network resource for this firewall rule. If not\nspecified when creating a firewall rule, the default network\nis used:\n\nglobal/networks/default\n\nIf you choose to specify this field, you can specify the network as a full \nor partial URL. For example, the following are all valid URLs: \n \n - \n https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n - projects/myproject/global/networks/my-network \n - global/networks/default", - "type": "string" - }, - "params": { - "$ref": "FirewallParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "priority": { - "description": "Priority for this rule.\nThis is an integer between `0` and `65535`, both inclusive.\nThe default value is `1000`.\nRelative priorities determine which rule takes effect if multiple rules\napply. Lower values indicate higher priority. For example, a rule with\npriority `0` has higher precedence than a rule with priority `1`.\nDENY rules take precedence over ALLOW rules if they have equal priority.\nNote that VPC networks have implied\nrules with a priority of `65535`. To avoid conflicts with the implied\nrules, use a priority number less than `65535`.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "sourceRanges": { - "description": "If source ranges are specified, the firewall rule applies only to traffic\nthat has a source IP address in these ranges. These ranges must be\nexpressed inCIDR format. One or both of sourceRanges\nand sourceTags may be set.\nIf both fields are set, the rule applies to traffic that has a\nsource IP address within sourceRanges OR a source IP\nfrom a resource with a matching tag listed in thesourceTags field. The connection does not need to match\nboth fields for the rule to\napply. Both IPv4 and IPv6 are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceServiceAccounts": { - "description": "If source service accounts are specified, the firewall rules apply only to\ntraffic originating from an instance with a service account in this list.\nSource service accounts cannot be used to control traffic to an instance's\nexternal IP address because service accounts are associated with an\ninstance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.\nIf both are set, the firewall applies to traffic that\nhas a source IP address within the sourceRanges OR a source\nIP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match\nboth fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceTags": { - "description": "If source tags are specified, the firewall rule applies only to traffic\nwith source IPs that match the primary network interfaces of VM instances\nthat have the tag and are in the same VPC network.\nSource tags cannot be used to control traffic to an instance's external IP\naddress, it only applies to traffic between instances in the same virtual\nnetwork. Because tags are associated with instances, not IP addresses.\nOne or both of sourceRanges and sourceTags may be\nset. If both fields are set, the firewall applies to traffic that has a\nsource IP address within sourceRanges OR a source IP from a\nresource with a matching tag listed in the sourceTags\nfield. The connection does not need to match both fields for the\nfirewall to apply.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating sets of instances located in the\nnetwork that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.\nIf neither targetServiceAccounts nor targetTags\nare specified, the firewall rule applies to all instances on the specified\nnetwork.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetTags": { - "description": "A list of tags that controls which instances the firewall rule\napplies to. If targetTags are specified, then the firewall\nrule applies only to instances in the VPC network that have one of those\ntags. If no targetTags are specified, the firewall rule\napplies to all instances on the specified network.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallList": { - "description": "Contains a list of firewalls.", - "id": "FirewallList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Firewall resources.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallList", - "description": "[Output Only] Type of resource. Always compute#firewallList\nfor lists of firewalls.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallLogConfig": { - "description": "The available logging options for a firewall rule.", - "id": "FirewallLogConfig", - "properties": { - "enable": { - "description": "This field denotes whether to enable logging for a particular firewall\nrule.", - "type": "boolean" - }, - "metadata": { - "description": "This field can only be specified for a particular firewall rule if\nlogging is enabled for that rule. This field denotes whether to include\nor exclude metadata for firewall logs.", - "enum": [ - "EXCLUDE_ALL_METADATA", - "INCLUDE_ALL_METADATA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FirewallParams": { - "description": "Additional firewall parameters.", - "id": "FirewallParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "FirewallPoliciesListAssociationsResponse": { - "id": "FirewallPoliciesListAssociationsResponse", - "properties": { - "associations": { - "description": "A list of associations.", - "items": { - "$ref": "FirewallPolicyAssociation" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallPoliciesListAssociationsResponse", - "description": "[Output Only] Type of firewallPolicy associations. Alwayscompute#FirewallPoliciesListAssociations for lists of\nfirewallPolicy associations.", - "type": "string" - } - }, - "type": "object" - }, - "FirewallPoliciesScopedList": { - "id": "FirewallPoliciesScopedList", - "properties": { - "firewallPolicies": { - "description": "A list of firewall policies contained in this scope.", - "items": { - "$ref": "FirewallPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of firewall policies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallPolicy": { - "description": "Represents a Firewall Policy resource.", - "id": "FirewallPolicy", - "properties": { - "associations": { - "description": "A list of associations that belong to this firewall policy.", - "items": { - "$ref": "FirewallPolicyAssociation" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "Deprecated, please use short name instead. User-provided name of the\nOrganization firewall policy. The name should be unique in the organization\nin which the firewall policy is created.\nThis field is not applicable to network firewall policies.\nThis name must be set on creation and cannot be changed.\nThe name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which\nmeans the first character must be a lowercase letter, and all following\ncharacters must be a dash, lowercase letter, or digit, except the last\ncharacter, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the\nfirewall policy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#firewallPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies", - "type": "string" - }, - "name": { - "description": "Name of the resource. For Organization Firewall Policies it's a\n[Output Only] numeric ID allocated by Google Cloud which uniquely\nidentifies the Organization Firewall Policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "A list of packet mirroring rules that belong to this policy.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "parent": { - "description": "[Output Only] The parent of the firewall policy.\nThis field is not applicable to network firewall policies.", - "type": "string" - }, - "policySource": { - "description": "[Output Only] Source of this Firewall Policy. USER_DEFINED if\ncreated by a Cloud user, or SYSTEM if created by managed\nservices like GKE.", - "enum": [ - "SYSTEM", - "USER_DEFINED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "policyType": { - "description": "The type of the firewall policy. This field can be eitherVPC_POLICY or RDMA_ROCE_POLICY.\n\nNote: if not specified then VPC_POLICY will be used.", - "enum": [ - "RDMA_FALCON_POLICY", - "RDMA_ROCE_POLICY", - "ULL_POLICY", - "VPC_POLICY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional firewall policy resides.\nThis field is not applicable to global firewall policies.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Total count of all firewall policy rule tuples. A firewall\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "A list of rules that belong to this policy.\nThere must always be a default rule (rule with priority 2147483647 and\nmatch \"*\"). If no rules are provided when creating a firewall policy, a\ndefault rule with action \"allow\" will be added.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shortName": { - "description": "User-provided name of the Organization firewall policy. The name should be\nunique in the organization in which the firewall policy is created.\nThis field is not applicable to network firewall policies.\nThis name must be set on creation and cannot be changed. The name must be\n1-63 characters long, and comply with RFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "vpcNetworkScope": { - "description": "The scope of networks allowed to be associated with the firewall\npolicy. This field can be either GLOBAL_VPC_NETWORK orREGIONAL_VPC_NETWORK.\n\nA firewall policy with the VPC scope set to GLOBAL_VPC_NETWORK\nis allowed to be attached only to global networks.\n\nWhen the VPC scope is set to REGIONAL_VPC_NETWORK the firewall\npolicy is allowed to be attached only to regional networks in the same\nscope as the firewall policy.\n\nNote: if not specified then GLOBAL_VPC_NETWORK will be used.", - "enum": [ - "GLOBAL_VPC_NETWORK", - "REGIONAL_VPC_NETWORK" - ], - "enumDescriptions": [ - "The firewall policy is allowed to be attached only to global networks.", - "The firewall policy is allowed to be attached only to regional networks\nin the same scope as the firewall policy. This option is applicable only\nto regional firewall policies." - ], - "type": "string" - } - }, - "type": "object" - }, - "FirewallPolicyAssociation": { - "id": "FirewallPolicyAssociation", - "properties": { - "attachmentTarget": { - "description": "The target that the firewall policy is attached to.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy of the association.", - "type": "string" - }, - "firewallPolicyId": { - "description": "[Output Only] The firewall policy ID of the association.", - "type": "string" - }, - "name": { - "description": "The name for an association.", - "type": "string" - }, - "priority": { - "description": "An integer indicating the priority of an association. The priority\nmust be a positive value between 1 and 2147483647.\nFirewall Policies are evaluated from highest to lowest priority where 1\nis the highest priority and 2147483647 is the lowest priority.\nThe default value is `1000`. If two associations have the same priority\nthen lexicographical order on association names is applied.", - "format": "int32", - "type": "integer" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy of the association.", - "type": "string" - } - }, - "type": "object" - }, - "FirewallPolicyList": { - "id": "FirewallPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of FirewallPolicy resources.", - "items": { - "$ref": "FirewallPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#firewallPolicyList for listsof FirewallPolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallPolicyRule": { - "description": "Represents a rule that describes one or more match conditions along with\nthe action to be taken when traffic matches this condition (allow or deny).", - "id": "FirewallPolicyRule", - "properties": { - "action": { - "description": "The Action to perform when the client connection triggers the rule.\nValid actions for firewall rules are: \"allow\", \"deny\",\n\"apply_security_profile_group\" and \"goto_next\".\nValid actions for packet mirroring rules are: \"mirror\", \"do_not_mirror\"\nand \"goto_next\".", - "type": "string" - }, - "description": { - "description": "An optional description for this resource.", - "type": "string" - }, - "direction": { - "description": "The direction in which this rule applies.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "disabled": { - "description": "Denotes whether the firewall policy rule is disabled. When set to true,\nthe firewall policy rule is not enforced and traffic behaves as if it did\nnot exist. If this is unspecified, the firewall policy rule will be\nenabled.", - "type": "boolean" - }, - "enableLogging": { - "description": "Denotes whether to enable logging for a particular rule. If logging is\nenabled, logs will be exported to the configured export destination in\nStackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you\ncannot enable logging on \"goto_next\" rules.", - "type": "boolean" - }, - "kind": { - "default": "compute#firewallPolicyRule", - "description": "[Output only] Type of the resource. Returnscompute#firewallPolicyRule for firewall rules andcompute#packetMirroringRule for packet mirroring rules.", - "type": "string" - }, - "match": { - "$ref": "FirewallPolicyRuleMatcher", - "description": "A match condition that incoming traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 0 and 2147483647.\nRules are evaluated from highest to lowest priority where 0 is the\nhighest priority and 2147483647 is the lowest priority.", - "format": "int32", - "type": "integer" - }, - "ruleName": { - "description": "An optional name for the rule. This field is not a unique identifier\nand can be updated.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Calculation of the complexity of a single firewall policy\nrule.", - "format": "int32", - "type": "integer" - }, - "securityProfileGroup": { - "description": "A fully-qualified URL of a SecurityProfile resource instance.\nExample:\nhttps://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group\nMust be specified if action is one of 'apply_security_profile_group' or\n'mirror'. Cannot be specified for other actions.", - "type": "string" - }, - "targetForwardingRules": { - "description": "A list of forwarding rules to which this rule applies.\nThis field allows you to control which load balancers get this rule.\nFor example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule\n - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule\n - projects/project/global/\n forwardingRules/forwardingRule\n - projects/project/regions/region/forwardingRules/\n forwardingRule", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetResources": { - "description": "A list of network resource URLs to which this rule applies. This field\nallows you to control which network's VMs get this rule. If this field\nis left blank, all VMs within the organization will receive the rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetSecureTags": { - "description": "A list of secure tags that controls which instances the firewall rule\napplies to. If targetSecureTag are specified, then the\nfirewall rule applies only to instances in the VPC network that have one\nof those EFFECTIVE secure tags, if all the target_secure_tag are in\nINEFFECTIVE state, then this rule will be ignored.targetSecureTag may not be set at the same time astargetServiceAccounts.\nIf neither targetServiceAccounts nortargetSecureTag are specified, the firewall rule applies\nto all instances on the specified network.\nMaximum number of target label tags allowed is 256.", - "items": { - "$ref": "FirewallPolicyRuleSecureTag" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetType": { - "description": "Target types of the firewall policy rule.\nDefault value is INSTANCES.", - "enum": [ - "INSTANCES", - "INTERNAL_MANAGED_LB" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "tlsInspect": { - "description": "Boolean flag indicating if the traffic should be TLS decrypted.\nCan be set only if action = 'apply_security_profile_group' and cannot\nbe set for other actions.", - "type": "boolean" - } - }, - "type": "object" - }, - "FirewallPolicyRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "FirewallPolicyRuleMatcher", - "properties": { - "destAddressGroups": { - "description": "Address groups which should be matched against the traffic destination.\nMaximum number of destination address groups is 10.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destFqdns": { - "description": "Fully Qualified Domain Name (FQDN) which should be matched against\ntraffic destination.\nMaximum number of destination fqdn allowed is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destIpRanges": { - "description": "CIDR IP address range.\nMaximum number of destination CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destNetworkContext": { - "description": "Network context of the traffic destination. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - NON_INTERNET", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "destNetworkScope": { - "description": "Network scope of the traffic destination.", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "destNetworkType": { - "description": "Network type of the traffic destination. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - NON_INTERNET", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "destRegionCodes": { - "description": "Region codes whose IP addresses will be used to match for destination\nof traffic. Should be specified as 2 letter country code defined as per\nISO 3166 alpha-2 country codes. ex.\"US\"\nMaximum number of dest region codes allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destThreatIntelligences": { - "description": "Names of Network Threat Intelligence lists.\nThe IPs in these lists will be matched against traffic destination.", - "items": { - "type": "string" - }, - "type": "array" - }, - "layer4Configs": { - "description": "Pairs of IP protocols and ports that the rule should match.", - "items": { - "$ref": "FirewallPolicyRuleMatcherLayer4Config" - }, - "type": "array" - }, - "srcAddressGroups": { - "description": "Address groups which should be matched against the traffic source.\nMaximum number of source address groups is 10.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcFqdns": { - "description": "Fully Qualified Domain Name (FQDN) which should be matched against\ntraffic source.\nMaximum number of source fqdn allowed is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of source CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcNetworkContext": { - "description": "Network context of the traffic source. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - INTRA_VPC\n - NON_INTERNET\n - VPC_NETWORKS", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "srcNetworkScope": { - "description": "Network scope of the traffic source.", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "srcNetworkType": { - "description": "Network type of the traffic source. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - INTRA_VPC\n - NON_INTERNET\n - VPC_NETWORKS", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "srcNetworks": { - "description": "Networks of the traffic source. It can be either a full or partial url.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcRegionCodes": { - "description": "Region codes whose IP addresses will be used to match for source\nof traffic. Should be specified as 2 letter country code defined as per\nISO 3166 alpha-2 country codes. ex.\"US\"\nMaximum number of source region codes allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcSecureTags": { - "description": "List of secure tag values, which should be matched at the source\nof the traffic.\nFor INGRESS rule, if all the srcSecureTag are INEFFECTIVE,\nand there is no srcIpRange, this rule will be ignored.\nMaximum number of source tag values allowed is 256.", - "items": { - "$ref": "FirewallPolicyRuleSecureTag" - }, - "type": "array" - }, - "srcThreatIntelligences": { - "description": "Names of Network Threat Intelligence lists.\nThe IPs in these lists will be matched against traffic source.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallPolicyRuleMatcherLayer4Config": { - "id": "FirewallPolicyRuleMatcherLayer4Config", - "properties": { - "ipProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be\none of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP\nprotocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP or TCP protocol. Each entry must be either\nan integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallPolicyRuleSecureTag": { - "id": "FirewallPolicyRuleSecureTag", - "properties": { - "name": { - "description": "Name of the secure tag, created with TagManager's TagValue API.", - "pattern": "tagValues/[0-9]+", - "type": "string" - }, - "state": { - "description": "[Output Only] State of the secure tag, either `EFFECTIVE` or\n`INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted\nor its network is deleted.", - "enum": [ - "EFFECTIVE", - "INEFFECTIVE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FixedOrPercent": { - "description": "Encapsulates numeric value that can be either absolute or relative.", - "id": "FixedOrPercent", - "properties": { - "calculated": { - "description": "[Output Only] Absolute value of VM instances calculated based on the\nspecific mode.\n\n \n \n - If the value is fixed, then the calculated\n value is equal to the fixed value.\n - If the value is a percent, then the\n calculated\n value is percent/100 * targetSize. For example,\n the calculated value of a 80% of a managed instance group\n with 150 instances would be (80/100 * 150) = 120 VM instances. If there\n is a remainder, the number is rounded.", - "format": "int32", - "type": "integer" - }, - "fixed": { - "description": "Specifies a fixed number of VM instances. This must be a positive integer.", - "format": "int32", - "type": "integer" - }, - "percent": { - "description": "Specifies a percentage of instances between 0 to 100%, inclusive. For\nexample, specify 80 for 80%.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "FlexibleTimeRange": { - "description": "A flexible specification of a time range that has 3 points of\nflexibility: (1) a flexible start time, (2) a flexible end time, (3) a\nflexible duration.\n\nIt is possible to specify a contradictory time range that cannot be matched\nby any Interval. This causes a validation error.", - "id": "FlexibleTimeRange", - "properties": { - "endTimeNotEarlierThan": { - "format": "google-datetime", - "type": "string" - }, - "endTimeNotLaterThan": { - "format": "google-datetime", - "type": "string" - }, - "maxDuration": { - "format": "google-duration", - "type": "string" - }, - "minDuration": { - "format": "google-duration", - "type": "string" - }, - "startTimeNotEarlierThan": { - "format": "google-datetime", - "type": "string" - }, - "startTimeNotLaterThan": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRule": { - "description": "Represents a Forwarding Rule resource.\n\nForwarding rule resources in Google Cloud can be either regional or global in\nscope:\n\n* [Global](https://cloud.google.com/compute/docs/reference/rest/alpha/globalForwardingRules)\n* [Regional](https://cloud.google.com/compute/docs/reference/rest/alpha/forwardingRules)\n\nA forwarding rule and its corresponding IP address represent the frontend\nconfiguration of a Google Cloud load balancer.\nForwarding rules can also reference target instances and Cloud VPN Classic\ngateways (targetVpnGateway).\n\nFor more information, read\nForwarding rule concepts and\nUsing protocol forwarding.", - "id": "ForwardingRule", - "properties": { - "IPAddress": { - "description": "IP address for which this forwarding rule accepts traffic. When a client\nsends traffic to this IP address, the forwarding rule directs the traffic\nto the referenced target or backendService.\nWhile creating a forwarding rule, specifying an IPAddress is\nrequired under the following circumstances:\n\n \n - When the target is set to targetGrpcProxy andvalidateForProxyless is set to true, theIPAddress should be set to 0.0.0.0.\n - When the target is a Private Service Connect Google APIs\n bundle, you must specify an IPAddress.\n\n\nOtherwise, you can optionally specify an IP address that references an\nexisting static (reserved) IP address resource. When omitted, Google Cloud\nassigns an ephemeral IP address.\n\nUse one of the following formats to specify an IP address while creating a\nforwarding rule:\n\n* IP address number, as in `100.1.2.3`\n* IPv6 address range, as in `2600:1234::/96`\n* Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name\n* Partial URL or by name, as in:\n \n - projects/project_id/regions/region/addresses/address-name\n - regions/region/addresses/address-name\n - global/addresses/address-name\n - address-name\n\n\n\nThe forwarding rule's target or backendService,\nand in most cases, also the loadBalancingScheme, determine the\ntype of IP address that you can use. For detailed information, see\n[IP address\nspecifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).\n\nWhen reading an IPAddress, the API always returns the IP\naddress number.", - "type": "string" - }, - "IPProtocol": { - "description": "The IP protocol to which this rule applies.\n\nFor protocol forwarding, valid\noptions are TCP, UDP, ESP,AH, SCTP, ICMP andL3_DEFAULT.\n\nThe valid IP protocols are different for different load balancing products\nas described in [Load balancing\nfeatures](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends).", - "enum": [ - "AH", - "ALL", - "ESP", - "ICMP", - "L3_DEFAULT", - "SCTP", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "allPorts": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe allPorts field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, SCTP, or L3_DEFAULT.\n - It's applicable only to the following products: internal passthrough\n Network Load Balancers, backend service-based external passthrough Network\n Load Balancers, and internal and external protocol forwarding.\n - Set this field to true to allow packets addressed to any port or\n packets lacking destination port information (for example, UDP fragments\n after the first fragment) to be forwarded to the backends configured with\n this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to true.", - "type": "boolean" - }, - "allowGlobalAccess": { - "description": "If set to true, clients can access the internal passthrough Network Load\nBalancers, the regional internal Application Load Balancer, and the\nregional internal proxy Network Load Balancer from all regions.\nIf false, only allows access from the local region the load balancer is\nlocated at. Note that for INTERNAL_MANAGED forwarding rules, this field\ncannot be changed after the forwarding rule is created.", - "type": "boolean" - }, - "allowPscGlobalAccess": { - "description": "This is used in PSC consumer ForwardingRule to control whether the PSC\nendpoint can be accessed from another region.", - "type": "boolean" - }, - "allowPscPacketInjection": { - "deprecated": true, - "description": "This is used in PSC consumer ForwardingRule to control whether the producer\nis allowed to inject packets into the consumer's network. If set to true,\nthe target service attachment must have tunneling enabled and\nTunnelingConfig.RoutingMode set to PACKET_INJECTION\nNon-PSC forwarding rules should not use this field.\n\nThis field was never released to any customers and is deprecated and\nwill be removed in the future.", - "type": "boolean" - }, - "availabilityGroup": { - "description": "[Output Only] Specifies the availability group of the forwarding rule. This\nfield is for use by global external passthrough load balancers (load\nbalancing scheme EXTERNAL_PASSTHROUGH) and is set for the child forwarding\nrules only.", - "enum": [ - "AVAILABILITY_GROUP0", - "AVAILABILITY_GROUP1", - "AVAILABILITY_GROUP_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "backendService": { - "description": "Identifies the backend service to which the forwarding rule sends traffic.\nRequired for internal and external passthrough Network Load Balancers;\nmust be omitted for all other load balancer types.", - "type": "string" - }, - "baseForwardingRule": { - "description": "[Output Only] The URL for the corresponding base forwarding rule. By base\nforwarding rule, we mean the forwarding rule that has the same IP address,\nprotocol, and port settings with the current forwarding rule, but without\nsourceIPRanges specified.\nAlways empty if the current forwarding rule does not have sourceIPRanges\nspecified.", - "type": "string" - }, - "childForwardingRules": { - "description": "[Output Only] Applicable only to the parent forwarding rule of global\nexternal passthrough load balancers. This field contains the list of child\nforwarding rule URLs associated with the parent forwarding rule: one for\neach availability group. AVAILABILITY_GROUP0 will be the first element, and\nAVAILABILITY_GROUP1 will be the second element.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "externalManagedBackendBucketMigrationState": { - "description": "Specifies the canary migration state for the backend buckets attached to\nthis forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, and\nTEST_ALL_TRAFFIC.\n\nTo begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be\nchanged to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before\nthe loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets\nattached to this forwarding rule by percentage using\nexternalManagedBackendBucketMigrationTestingPercentage.\n\nRolling back a migration requires the states to be set in reverse order. So\nchanging the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to\nbe set to TEST_ALL_TRAFFIC at the same time. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate some traffic back to\nEXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", - "enum": [ - "PREPARE", - "TEST_ALL_TRAFFIC", - "TEST_BY_PERCENTAGE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "externalManagedBackendBucketMigrationTestingPercentage": { - "description": "Determines the fraction of requests to backend buckets that should be\nprocessed by the global external Application Load Balancer.\n\nThe value of this field must be in the range [0, 100].\n\nThis value can only be set if the loadBalancingScheme in the BackendService\nis set to EXTERNAL (when using the classic Application Load Balancer) and\nthe migration state is TEST_BY_PERCENTAGE.", - "format": "float", - "type": "number" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a ForwardingRule. Include the fingerprint in patch request to\nensure that you do not overwrite changes that were applied from another\nconcurrent request.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a ForwardingRule.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipCollection": { - "description": "Resource reference of a PublicDelegatedPrefix. The PDP must\nbe a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode.\n\nUse one of the following formats to specify a sub-PDP when creating an IPv6\nNetLB forwarding rule using BYOIP:\nFull resource URL, as inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name\nPartial URL, as in:\n \n - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - regions/region/publicDelegatedPrefixes/sub-pdp-name", - "type": "string" - }, - "ipVersion": { - "description": "The IP Version that will be used by this forwarding rule. Valid options\nare IPV4 or IPV6.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "isMirroringCollector": { - "description": "Indicates whether or not this load balancer can be used as a collector for\npacket mirroring. To prevent mirroring loops, instances behind this\nload balancer will not have their traffic mirrored even if aPacketMirroring rule applies to them.\nThis can only be set to true for load balancers that have theirloadBalancingScheme set to INTERNAL.", - "type": "boolean" - }, - "kind": { - "default": "compute#forwardingRule", - "description": "[Output Only] Type of the resource. Alwayscompute#forwardingRule for forwarding rule resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this resource, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a ForwardingRule.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "loadBalancingScheme": { - "description": "Specifies the forwarding rule type.\n\nFor more information about forwarding rules, refer to\nForwarding rule concepts.", - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "EXTERNAL_PASSTHROUGH", - "INTERNAL", - "INTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "metadataFilters": { - "description": "Opaque filter criteria used by load balancer to restrict routing\nconfiguration to a limited set of xDS\ncompliant clients. In their xDS requests to load balancer, xDS clients\npresent node\nmetadata. When there is a match, the relevant configuration\nis made available to those proxies. Otherwise, all the resources (e.g.TargetHttpProxy, UrlMap)\nreferenced by the ForwardingRule are not visible to\nthose proxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least one of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata. If multiplemetadataFilters are specified, all of them need to be satisfied\nin order to be considered a match.\n\nmetadataFilters specified here will be applifed before\nthose specified in the UrlMap that thisForwardingRule references.\n\nmetadataFilters only applies to Loadbalancers that have\ntheir loadBalancingScheme set toINTERNAL_SELF_MANAGED.", - "items": { - "$ref": "MetadataFilter" - }, - "type": "array" - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.\n\nFor Private Service Connect forwarding rules that forward traffic to Google\nAPIs, the forwarding rule name must be a 1-20 characters string with\nlowercase letters and numbers and must start with a letter.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "This field is not used for global external load balancing.\n\nFor internal passthrough Network Load Balancers, this field identifies the\nnetwork that the load balanced IP should belong to for this forwarding\nrule.\nIf the subnetwork is specified, the network of the subnetwork will be used.\nIf neither subnetwork nor this field is specified, the default network will\nbe used.\n\nFor Private Service Connect forwarding rules that forward traffic to Google\nAPIs, a network must be provided.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring\nthis load balancer and can only take the following values:PREMIUM, STANDARD.\n\nFor regional ForwardingRule, the valid values are PREMIUM andSTANDARD. For GlobalForwardingRule, the valid value isPREMIUM.\n\nIf this field is not specified, it is assumed to be PREMIUM.\nIf IPAddress is specified, this value must be equal to the\nnetworkTier of the Address.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "noAutomateDnsZone": { - "description": "This is used in PSC consumer ForwardingRule to control whether it should\ntry to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use\nthis field. Once set, this field is not mutable.", - "type": "boolean" - }, - "parentForwardingRule": { - "description": "[Output Only] Applicable only to the child forwarding rules of global external\npassthrough load balancers. This field contains the URL of the parent\nforwarding rule.", - "type": "string" - }, - "portRange": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe portRange field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, or SCTP, and\n - It's applicable only to the following products: external passthrough\n Network Load Balancers, internal and external proxy Network Load Balancers,\n internal and external Application Load Balancers, external protocol\n forwarding, and Classic VPN.\n - Some products have restrictions on what ports can be used. See \n port specifications for details.\n\n\n\nFor external forwarding rules, two or more forwarding rules cannot use the\nsame [IPAddress, IPProtocol] pair, and cannot have overlappingportRanges.\n\nFor internal forwarding rules within the same VPC network, two or more\nforwarding rules cannot use the same [IPAddress, IPProtocol]\npair, and cannot have overlapping portRanges.\n\n@pattern: \\\\d+(?:-\\\\d+)?", - "type": "string" - }, - "ports": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe ports field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, or SCTP, and\n - It's applicable only to the following products: internal passthrough\n Network Load Balancers, backend service-based external passthrough Network\n Load Balancers, and internal protocol forwarding.\n - You can specify a list of up to five ports by number, separated by\n commas. The ports can be contiguous or discontiguous.\n\n\n\nFor external forwarding rules, two or more forwarding rules cannot use the\nsame [IPAddress, IPProtocol] pair if they share at least one\nport number.\n\nFor internal forwarding rules within the same VPC network, two or more\nforwarding rules cannot use the same [IPAddress, IPProtocol]\npair if they share at least one port number.\n\n@pattern: \\\\d+(?:-\\\\d+)?", - "items": { - "type": "string" - }, - "type": "array" - }, - "pscConnectionId": { - "description": "[Output Only] The PSC connection id of the PSC forwarding rule.", - "format": "uint64", - "type": "string" - }, - "pscConnectionStatus": { - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer and will not serve traffic\ngoing forward.", - "The connection has been accepted by the producer, but the producer needs\nto take further action before the forwarding rule can serve traffic.", - "The connection is pending acceptance by the producer.", - "The connection has been rejected by the producer.", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional forwarding rule resides.\nThis field is not applicable to global forwarding rules.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serviceDirectoryRegistrations": { - "description": "Service Directory resources to register this forwarding rule with.\nCurrently, only supports a single Service Directory resource.", - "items": { - "$ref": "ForwardingRuleServiceDirectoryRegistration" - }, - "type": "array" - }, - "serviceLabel": { - "description": "An optional prefix to the service name for this forwarding rule.\nIf specified, the prefix is the first label of the fully qualified service\nname.\n\nThe label must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the label must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.\n\nThis field is only used for internal load balancing.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "serviceName": { - "description": "[Output Only]\nThe internal fully qualified service name for this forwarding rule.\n\nThis field is only used for internal load balancing.", - "type": "string" - }, - "sourceIpRanges": { - "description": "If not empty, this forwarding rule will only forward the traffic when the\nsource IP address matches one of the IP addresses or CIDR ranges set here.\nNote that a forwarding rule can only have up to 64 source IP ranges, and\nthis field can only be used with a regional forwarding rule whose scheme isEXTERNAL.\nEach source_ip_range entry should be either an IP address (for\nexample, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).", - "items": { - "type": "string" - }, - "type": "array" - }, - "subnetwork": { - "description": "This field identifies the subnetwork that the load balanced IP should\nbelong to for this forwarding rule, used with internal load balancers and\nexternal passthrough Network Load Balancers with IPv6.\n\nIf the network specified is in auto subnet mode, this field is optional.\nHowever, a subnetwork must be specified if the network is in custom subnet\nmode or when creating external forwarding rule with IPv6.", - "type": "string" - }, - "target": { - "description": "The URL of the target resource to receive the matched traffic. For\nregional forwarding rules, this target must be in the same region as the\nforwarding rule. For global forwarding rules, this target must be a global\nload balancing resource.\n\nThe forwarded traffic must be of a type appropriate to the target object.\n \n \n - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).\n - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle:\n \n \n - vpc-sc - APIs that support VPC Service Controls. \n - all-apis - All supported Google APIs. \n \n \n - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment.", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRuleAggregatedList": { - "id": "ForwardingRuleAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ForwardingRulesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of ForwardingRulesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#forwardingRuleAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#forwardingRuleAggregatedList for lists of forwarding rules.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ForwardingRuleList": { - "description": "Contains a list of ForwardingRule resources.", - "id": "ForwardingRuleList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ForwardingRule resources.", - "items": { - "$ref": "ForwardingRule" - }, - "type": "array" - }, - "kind": { - "default": "compute#forwardingRuleList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ForwardingRuleReference": { - "id": "ForwardingRuleReference", - "properties": { - "forwardingRule": { - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRuleServiceDirectoryRegistration": { - "description": "Describes the auto-registration of the forwarding rule to Service Directory.\nThe region and project of the Service Directory resource generated from\nthis registration will be the same as this forwarding rule.", - "id": "ForwardingRuleServiceDirectoryRegistration", - "properties": { - "namespace": { - "description": "Service Directory namespace to register the forwarding rule under.", - "type": "string" - }, - "service": { - "description": "Service Directory service to register the forwarding rule under.", - "type": "string" - }, - "serviceDirectoryRegion": { - "description": "[Optional] Service Directory region to register this global forwarding\nrule under. Default to \"us-central1\". Only used for PSC for Google APIs.\nAll PSC for Google APIs forwarding rules on the same network should use\nthe same Service Directory region.", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRulesScopedList": { - "id": "ForwardingRulesScopedList", - "properties": { - "forwardingRules": { - "description": "A list of forwarding rules contained in this scope.", - "items": { - "$ref": "ForwardingRule" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of forwarding rules when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservation": { - "id": "FutureReservation", - "properties": { - "aggregateReservation": { - "$ref": "AllocationAggregateReservation", - "description": "Aggregate reservation details for the future reservation." - }, - "autoCreatedReservationsDeleteTime": { - "description": "Future timestamp when the FR auto-created reservations will be deleted by\nCompute Engine. Format of this field must be a valid\nhref=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339 value.", - "type": "string" - }, - "autoCreatedReservationsDuration": { - "$ref": "Duration", - "description": "Specifies the duration of auto-created reservations.\nIt represents relative time to future reservation start_time when\nauto-created reservations will be automatically deleted by Compute\nEngine. Duration time unit is represented as a count of seconds\nand fractions of seconds at nanosecond resolution." - }, - "autoDeleteAutoCreatedReservations": { - "description": "Setting for enabling or disabling automatic deletion for auto-created\nreservation. If set to true, auto-created reservations will be\ndeleted at Future Reservation's end time (default) or at user's defined\ntimestamp if any of the\n[auto_created_reservations_delete_time, auto_created_reservations_duration]\nvalues is specified.\nFor keeping auto-created reservation indefinitely, this value should be set\nto false.", - "type": "boolean" - }, - "commitmentInfo": { - "$ref": "FutureReservationCommitmentInfo", - "description": "If not present, then FR will not deliver a new commitment or update an\nexisting commitment." - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this future reservation inRFC3339\ntext format.", - "type": "string" - }, - "deploymentType": { - "description": "Type of the deployment requested as part of future reservation.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the future reservation.", - "type": "string" - }, - "enableEmergentMaintenance": { - "description": "Indicates if this group of VMs have emergent maintenance enabled.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] A unique identifier for this future reservation. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#futureReservation", - "description": "[Output Only] Type of the resource. Alwayscompute#futureReservation for future reservations.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namePrefix": { - "description": "Name prefix for the reservations to be created at the time of\ndelivery. The name prefix must comply with RFC1035.\nMaximum allowed length for name prefix is 20. Automatically created\nreservations name format will be -date-####.", - "type": "string" - }, - "planningStatus": { - "description": "Planning state before being submitted for evaluation", - "enum": [ - "DRAFT", - "PLANNING_STATUS_UNSPECIFIED", - "SUBMITTED" - ], - "enumDescriptions": [ - "Future Reservation is being drafted.", - "", - "Future Reservation has been submitted for evaluation by GCP." - ], - "type": "string" - }, - "protectionTier": { - "description": "Protection tier for the workload.", - "enum": [ - "CAPACITY_OPTIMIZED", - "PROTECTION_TIER_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling)\nat the data center during normal operating conditions. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload may be disrupted. As a consequence, it has a\nweaker availability SLO than STANDARD.", - "Unspecified protection tier.", - "STANDARD protection for workload that should be protected by redundancies\n(e.g. power, cooling) at the data center level. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload is expected to continue as normal using the\nredundancies." - ], - "type": "string" - }, - "reservationMode": { - "description": "The reservation mode which determines reservation-termination behavior and\nexpected pricing.", - "enum": [ - "CALENDAR", - "DEFAULT", - "RESERVATION_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delivered reservations will delivered at specified start time and\nterminated at specified end time along with terminating the VMs running\non it.", - "The delivered reservations do not terminate VMs at the end of\nreservations. This is default mode.", - "" - ], - "type": "string" - }, - "reservationName": { - "description": "Name of reservations where the capacity is provisioned at the time of\ndelivery of future reservations. If the reservation with the given name\ndoes not exist already, it is created automatically at the time of Approval\nwith INACTIVE state till specified start-time. Either provide the\nreservation_name or a name_prefix.", - "type": "string" - }, - "schedulingType": { - "description": "Maintenance information for this reservation", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "List of Projects/Folders to share with." - }, - "specificReservationRequired": { - "description": "Indicates whether the auto-created reservation can be consumed by VMs with\naffinity for \"any\" reservation. If the field is set, then only VMs that\ntarget the reservation by name can consume from the delivered reservation.", - "type": "boolean" - }, - "specificSkuProperties": { - "$ref": "FutureReservationSpecificSKUProperties", - "description": "Future Reservation configuration to indicate instance properties and\ntotal count." - }, - "status": { - "$ref": "FutureReservationStatus", - "description": "[Output only] Status of the Future Reservation" - }, - "timeWindow": { - "$ref": "FutureReservationTimeWindow", - "description": "Time window for this Future Reservation." - }, - "zone": { - "description": "[Output Only] URL of the Zone where this future reservation resides.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationCommitmentInfo": { - "id": "FutureReservationCommitmentInfo", - "properties": { - "commitmentName": { - "description": "name of the commitment where capacity is being delivered to.", - "type": "string" - }, - "commitmentPlan": { - "description": "Indicates if a Commitment needs to be created as part of FR delivery. If\nthis field is not present, then no\ncommitment needs to be created.", - "enum": [ - "INVALID", - "SIXTY_MONTH", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH", - "TWENTY_FOUR_MONTH" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "previousCommitmentTerms": { - "description": "Only applicable if FR is delivering to the same reservation. If set, all\nparent commitments will be extended to match the end date of the plan for\nthis commitment.", - "enum": [ - "EXTEND", - "PREVIOUSCOMMITMENTTERM_UNSPECIFIED" - ], - "enumDescriptions": [ - "All associated parent Committed Used Discount(s) end-date/term will be\nextended to the end-time of this future reservation. Default is to\nextend previous commitment(s) time to the end_time of the reservation.", - "No changes to associated parents Committed Used Discount(s) terms." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationSpecificSKUProperties": { - "id": "FutureReservationSpecificSKUProperties", - "properties": { - "instanceProperties": { - "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "Properties of the SKU instances being reserved." - }, - "sourceInstanceTemplate": { - "description": "The instance template that will be used to populate the\nReservedInstanceProperties of the future reservation", - "type": "string" - }, - "totalCount": { - "description": "Total number of instances for which capacity assurance is requested at a\nfuture time period.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatus": { - "description": "[Output only] Represents status related to the future reservation.", - "id": "FutureReservationStatus", - "properties": { - "amendmentStatus": { - "description": "[Output Only] The current status of the requested amendment.", - "enum": [ - "AMENDMENT_APPROVED", - "AMENDMENT_DECLINED", - "AMENDMENT_IN_REVIEW", - "AMENDMENT_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The requested amendment to the Future Resevation has been approved and\napplied by GCP.", - "The requested amendment to the Future Reservation has been declined by\nGCP and the original state was restored.", - "The requested amendment to the Future Reservation is currently being\nreviewd by GCP.", - "" - ], - "type": "string" - }, - "autoCreatedReservations": { - "description": "Fully qualified urls of the automatically created reservations at\nstart_time.", - "items": { - "type": "string" - }, - "type": "array" - }, - "existingMatchingUsageInfo": { - "$ref": "FutureReservationStatusExistingMatchingUsageInfo", - "description": "[Output Only] Represents the existing matching usage for the future\nreservation." - }, - "fulfilledCount": { - "description": "This count indicates the fulfilled capacity so far. This is set during\n\"PROVISIONING\" state. This count also includes capacity delivered as part\nof existing matching reservations.", - "format": "int64", - "type": "string" - }, - "lastKnownGoodState": { - "$ref": "FutureReservationStatusLastKnownGoodState", - "description": "[Output Only] This field represents the future reservation before an\namendment was requested. If the amendment is declined, the Future\nReservation will be reverted to the last known good state. The last known\ngood state is not set when updating a future reservation whose\nProcurement Status is DRAFTING." - }, - "lockTime": { - "description": "Time when Future Reservation would become LOCKED, after which no\nmodifications to Future Reservation will be allowed. Applicable only\nafter the Future Reservation is in the APPROVED state. The lock_time is\nan RFC3339 string. The procurement_status will transition to PROCURING\nstate at this time.", - "type": "string" - }, - "procurementStatus": { - "description": "Current state of this Future Reservation", - "enum": [ - "APPROVED", - "CANCELLED", - "COMMITTED", - "DECLINED", - "DRAFTING", - "FAILED", - "FAILED_PARTIALLY_FULFILLED", - "FULFILLED", - "PENDING_AMENDMENT_APPROVAL", - "PENDING_APPROVAL", - "PROCUREMENT_STATUS_UNSPECIFIED", - "PROCURING", - "PROVISIONING" - ], - "enumDescriptions": [ - "Future reservation is approved by GCP.", - "Future reservation is cancelled by the customer.", - "Future reservation is committed by the customer.", - "Future reservation is rejected by GCP.", - "Related status for PlanningStatus.Draft. Transitions to\nPENDING_APPROVAL upon user submitting FR.", - "Future reservation failed. No additional reservations were provided.", - "Future reservation is partially fulfilled. Additional reservations were\nprovided but did not reach total_count reserved instance slots.", - "Future reservation is fulfilled completely.", - "An Amendment to the Future Reservation has been requested. If the\nAmendment is declined, the Future Reservation will be restored to the\nlast known good state.", - "Future reservation is pending approval by GCP.", - "", - "Future reservation is being procured by GCP. Beyond this point, Future\nreservation is locked and no further modifications are allowed.", - "Future reservation capacity is being provisioned. This state will be\nentered after start_time, while reservations are being created to\nprovide total_count reserved instance slots. This state will not\npersist past start_time + 24h." - ], - "type": "string" - }, - "specificSkuProperties": { - "$ref": "FutureReservationStatusSpecificSKUProperties" - } - }, - "type": "object" - }, - "FutureReservationStatusExistingMatchingUsageInfo": { - "description": "[Output Only] Represents the existing matching usage for the future\nreservation.", - "id": "FutureReservationStatusExistingMatchingUsageInfo", - "properties": { - "count": { - "description": "Count to represent min(FR total_count,\nmatching_reserved_capacity+matching_unreserved_instances)", - "format": "int64", - "type": "string" - }, - "timestamp": { - "description": "Timestamp when the matching usage was calculated", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatusLastKnownGoodState": { - "description": "The state that the future reservation will be reverted to should the\namendment be declined.", - "id": "FutureReservationStatusLastKnownGoodState", - "properties": { - "description": { - "description": "[Output Only] The description of the FutureReservation before an\namendment was requested.", - "type": "string" - }, - "existingMatchingUsageInfo": { - "$ref": "FutureReservationStatusExistingMatchingUsageInfo", - "description": "[Output Only] Represents the matching usage for the future\nreservation before an amendment was requested." - }, - "futureReservationSpecs": { - "$ref": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" - }, - "lockTime": { - "description": "[Output Only] The lock time of the FutureReservation before an\namendment was requested.", - "type": "string" - }, - "namePrefix": { - "description": "[Output Only] The name prefix of the Future Reservation before an\namendment was requested.", - "type": "string" - }, - "procurementStatus": { - "description": "[Output Only] The status of the last known good state for the Future\nReservation.", - "enum": [ - "APPROVED", - "CANCELLED", - "COMMITTED", - "DECLINED", - "DRAFTING", - "FAILED", - "FAILED_PARTIALLY_FULFILLED", - "FULFILLED", - "PENDING_AMENDMENT_APPROVAL", - "PENDING_APPROVAL", - "PROCUREMENT_STATUS_UNSPECIFIED", - "PROCURING", - "PROVISIONING" - ], - "enumDescriptions": [ - "Future reservation is approved by GCP.", - "Future reservation is cancelled by the customer.", - "Future reservation is committed by the customer.", - "Future reservation is rejected by GCP.", - "Related status for PlanningStatus.Draft. Transitions to\nPENDING_APPROVAL upon user submitting FR.", - "Future reservation failed. No additional reservations were provided.", - "Future reservation is partially fulfilled. Additional reservations were\nprovided but did not reach total_count reserved instance slots.", - "Future reservation is fulfilled completely.", - "An Amendment to the Future Reservation has been requested. If the\nAmendment is declined, the Future Reservation will be restored to the\nlast known good state.", - "Future reservation is pending approval by GCP.", - "", - "Future reservation is being procured by GCP. Beyond this point, Future\nreservation is locked and no further modifications are allowed.", - "Future reservation capacity is being provisioned. This state will be\nentered after start_time, while reservations are being created to\nprovide total_count reserved instance slots. This state will not\npersist past start_time + 24h." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs": { - "description": "The properties of the last known good state for the Future Reservation.", - "id": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", - "properties": { - "shareSettings": { - "$ref": "ShareSettings", - "description": "[Output Only] The previous share settings of the Future Reservation." - }, - "specificSkuProperties": { - "$ref": "FutureReservationSpecificSKUProperties", - "description": "[Output Only] The previous instance related properties of the\nFuture Reservation." - }, - "timeWindow": { - "$ref": "FutureReservationTimeWindow", - "description": "[Output Only] The previous time window of the Future Reservation." - } - }, - "type": "object" - }, - "FutureReservationStatusSpecificSKUProperties": { - "description": "Properties to be set for the Future Reservation.", - "id": "FutureReservationStatusSpecificSKUProperties", - "properties": { - "sourceInstanceTemplateId": { - "description": "ID of the instance template used to populate the Future Reservation\nproperties.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationTimeWindow": { - "id": "FutureReservationTimeWindow", - "properties": { - "duration": { - "$ref": "Duration" - }, - "endTime": { - "type": "string" - }, - "startTime": { - "description": "Start time of the Future Reservation. The start_time is an RFC3339\nstring.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationsAggregatedListResponse": { - "description": "Contains a list of future reservations.", - "id": "FutureReservationsAggregatedListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "FutureReservationsScopedList", - "description": "Name of the scope containing this set of future reservations." - }, - "description": "A list of Future reservation resources.", - "type": "object" - }, - "kind": { - "default": "compute#futureReservationsAggregatedListResponse", - "description": "[Output Only] Type of resource. Alwayscompute#futureReservationsAggregatedListResponse for future\nresevation aggregated list response.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservationsListResponse": { - "id": "FutureReservationsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of future reservation resources.", - "items": { - "$ref": "FutureReservation" - }, - "type": "array" - }, - "kind": { - "default": "compute#futureReservationsListResponse", - "description": "[Output Only] Type of resource.Alwayscompute#FutureReservationsListResponse for lists of\nreservations", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservationsScopedList": { - "id": "FutureReservationsScopedList", - "properties": { - "futureReservations": { - "description": "A list of future reservations contained in this scope.", - "items": { - "$ref": "FutureReservation" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of future reservations when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureResourcesRecommendation": { - "description": "Recommendation for single resources specification, to be created in the\nfuture.", - "id": "FutureResourcesRecommendation", - "properties": { - "endTime": { - "format": "google-datetime", - "type": "string" - }, - "location": { - "description": "The advised location for resource usage. When a zone, in format\n'zones/'.\nIf not set, it means that no location is recommended - see\nother_locations for details.", - "type": "string" - }, - "otherLocations": { - "additionalProperties": { - "$ref": "FutureResourcesRecommendationOtherLocation" - }, - "description": "List of locations in the request scope that were not\nrecommended. Keys of the map are zones, in format 'zones/'.\nThe values are status information indicating the recommendation status.", - "type": "object" - }, - "recommendationId": { - "description": "Unique id of the recommendation, a UUID string generated by the API.", - "type": "string" - }, - "recommendationType": { - "description": "Type of recommendation. Currently only FUTURE_RESERVATION is supported.", - "enum": [ - "FUTURE_RESERVATION", - "RECOMMENDATION_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "A Future Reservation is recommended.", - "Default value, unused." - ], - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesRecommendationOtherLocation": { - "description": "Information about recommendation status for locations\nthat were allowed but not used by the response.", - "id": "FutureResourcesRecommendationOtherLocation", - "properties": { - "details": { - "description": "Details (human readable) describing the situation.\nFor example, if status is CONDITION_NOT_MET, then\ndetails contain information about the parameters of the time window\nthat did not meet the required conditions.", - "type": "string" - }, - "status": { - "description": "Status of recommendation in this location.", - "enum": [ - "CONDITIONS_NOT_MET", - "NOT_SUPPORTED", - "NO_CAPACITY", - "OTHER_LOCATION_STATUS_UNDEFINED", - "RECOMMENDED" - ], - "enumDescriptions": [ - "The requested resources are offered in this location\nbut the requested time window is does not meet the required conditions.", - "The requested resources are not offered in this location.\nRetrying the request will not change this status.", - "The requested resources are offered in this location\nand the requested time window is accepted\nbut there is no capacity within the requested time window.", - "Default value, unused.", - "The requested resources are offered in this location\nand it is possible to request them. However, another location\nwas better and was recommended." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpec": { - "description": "Specification of resources to be created at some time in the future within an\noptionally specified set of locations, and within the specified time range.", - "id": "FutureResourcesSpec", - "properties": { - "deploymentType": { - "description": "Indicates if the reservation allocation strategy is static (DENSE) or\ndynamic (STANDARD). Defaults to DENSE.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "locationPolicy": { - "$ref": "FutureResourcesSpecLocationPolicy", - "description": "Optional location policy allowing to exclude some zone(s) in which\nthe resources must not be created." - }, - "targetResources": { - "$ref": "FutureResourcesSpecTargetResources", - "description": "Specification of the reserved resources." - }, - "timeRangeSpec": { - "$ref": "FlexibleTimeRange", - "description": "Specification of a time range in which the resources may be created.\nThe time range specifies start of resource use and planned end of resource\nuse." - } - }, - "type": "object" - }, - "FutureResourcesSpecAggregateResources": { - "id": "FutureResourcesSpecAggregateResources", - "properties": { - "acceleratorCount": { - "description": "Size of the request, in accelerator (chip) count.", - "format": "int64", - "type": "string" - }, - "vmFamily": { - "description": "The VM family that all instances scheduled against this reservation\nmust belong to. Use for TPU reservations.", - "enum": [ - "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", - "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "workloadType": { - "description": "Workload type. Use for TPU reservations.", - "enum": [ - "BATCH", - "SERVING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Reserved resources will be optimized for BATCH workloads, such as ML\ntraining.", - "Reserved resources will be optimized for SERVING workloads, such as ML\ninference.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocalSsdPartition": { - "id": "FutureResourcesSpecLocalSsdPartition", - "properties": { - "diskInterface": { - "description": "Disk interface. Defaults to SCSI.", - "enum": [ - "NVDIMM", - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "diskSizeGb": { - "description": "The size of the disk in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocationPolicy": { - "description": "Specification of locations to create resources in.", - "id": "FutureResourcesSpecLocationPolicy", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "FutureResourcesSpecLocationPolicyLocation" - }, - "description": "Preferences for specified locations.\nKeys of the map are locations - zones, in format of 'zones/'.\nValues are preferences for the zones.\nIf a zone is not specified in this map, it is ALLOWed.", - "type": "object" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocationPolicyLocation": { - "description": "Preference for a single specified location.", - "id": "FutureResourcesSpecLocationPolicyLocation", - "properties": { - "preference": { - "description": "Preference for this location.", - "enum": [ - "ALLOW", - "DENY", - "PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Location is allowed for use.", - "Location is prohibited.", - "Default value, unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecSpecificSKUResources": { - "id": "FutureResourcesSpecSpecificSKUResources", - "properties": { - "instanceCount": { - "description": "Size of the request, in instance count.", - "format": "int64", - "type": "string" - }, - "localSsdPartitions": { - "description": "Local SSD partitions. You do not have to include SSD partitions that\nare built in the machine type.", - "items": { - "$ref": "FutureResourcesSpecLocalSsdPartition" - }, - "type": "array" - }, - "machineType": { - "description": "The machine type to use for instances that will use the reservation.\nThis field only accepts machine type names. e.g. n2-standard-4\nand does not accept machine type full or partial url. e.g.\nprojects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4.\nUse for GPU reservations.", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecTargetResources": { - "description": "Specification of reserved resources.", - "id": "FutureResourcesSpecTargetResources", - "properties": { - "aggregateResources": { - "$ref": "FutureResourcesSpecAggregateResources" - }, - "specificSkuResources": { - "$ref": "FutureResourcesSpecSpecificSKUResources" - } - }, - "type": "object" - }, - "GRPCHealthCheck": { - "id": "GRPCHealthCheck", - "properties": { - "grpcServiceName": { - "description": "The gRPC service name for the health check. This field is optional. The\nvalue of grpc_service_name has the following meanings by convention: \n\n- Empty service_name means the overall status of all services at the\nbackend. \n\n- Non-empty service_name means the health of that gRPC service, as defined\nby the owner of the service. \n\nThe grpc_service_name can only be ASCII.", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. Valid\nvalues are 1 through 65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - } - }, - "type": "object" - }, - "GRPCTLSHealthCheck": { - "id": "GRPCTLSHealthCheck", - "properties": { - "grpcServiceName": { - "description": "The gRPC service name for the health check. This field is optional. The\nvalue of grpc_service_name has the following meanings by convention: \n\n- Empty service_name means the overall status of all services at the\nbackend. \n\n- Non-empty service_name means the health of that gRPC service, as defined\nby the owner of the service. \n\nThe grpc_service_name can only be ASCII.", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. Valid\nvalues are 1 through 65535.", - "format": "int32", - "type": "integer" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - } - }, - "type": "object" - }, - "GetAsyncReplicationStatusResponse": { - "id": "GetAsyncReplicationStatusResponse", - "properties": { - "asyncReplicationStatus": { - "$ref": "AsyncReplicationStatus" - }, - "etag": { - "description": "end_interface: MixerGetResponseWithEtagBuilder", - "type": "string" - } - }, - "type": "object" - }, - "GetOwnerInstanceResponse": { - "id": "GetOwnerInstanceResponse", - "properties": { - "instance": { - "description": "Full instance resource URL.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalAddressesMoveRequest": { - "id": "GlobalAddressesMoveRequest", - "properties": { - "description": { - "description": "An optional destination address description if intended to be different\nfrom the source.", - "type": "string" - }, - "destinationAddress": { - "description": "The URL of the destination address to move to. This can be a full or\npartial URL. For example, the following are all valid URLs to a address:\n \n - https://www.googleapis.com/compute/v1/projects/project/global/addresses/address \n - projects/project/global/addresses/address\n\n\nNote that destination project must be different from the source project. So/global/addresses/address is not valid partial url.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalNetworkEndpointGroupsAttachEndpointsRequest": { - "id": "GlobalNetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "GlobalNetworkEndpointGroupsDetachEndpointsRequest": { - "id": "GlobalNetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "GlobalOrganizationSetPolicyRequest": { - "id": "GlobalOrganizationSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "GlobalSetLabelsRequest": { - "id": "GlobalSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash when updating or changing\nlabels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the\nresource to get the latest fingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A list of labels to apply for this resource. Each label must comply with\nthe\nrequirements for labels. For example,\"webserver-frontend\": \"images\". A label value can also be\nempty (e.g. \"my-label\": \"\").", - "type": "object" - } - }, - "type": "object" - }, - "GlobalSetPolicyRequest": { - "id": "GlobalSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicy": { - "description": "Message describing GlobalVmExtensionPolicy object.", - "id": "GlobalVmExtensionPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "extensionPolicies": { - "additionalProperties": { - "$ref": "GlobalVmExtensionPolicyExtensionPolicy" - }, - "description": "Required. Map from extension (eg: \"cloudops\") to its policy configuration.\nThe key is the name of the extension.", - "type": "object" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSelectors": { - "description": "Optional. Selector to target VMs for a policy.\nThere is a logical \"AND\" between instance_selectors.", - "items": { - "$ref": "GlobalVmExtensionPolicyInstanceSelector" - }, - "type": "array" - }, - "kind": { - "default": "compute#globalVmExtensionPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#globalVmExtensionPolicy for globalVmExtensionPolicies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "priority": { - "description": "Optional. Used to resolve conflicts when multiple policies are active for the same\nextension. Defaults to 0.\n\nLarger the number, higher the priority. When the priority is the same,\nthe policy with the newer create time has higher priority.", - "format": "int32", - "type": "integer" - }, - "rolloutOperation": { - "$ref": "GlobalVmExtensionPolicyRolloutOperation", - "description": "Required. The rollout strategy and status." - }, - "scopedResourceStatus": { - "description": "[Output Only] The scoped resource status. It's only for tracking the\npurging status of the policy.", - "enum": [ - "SCOPED_RESOURCE_STATUS_DELETING", - "SCOPED_RESOURCE_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The zonal policies are being deleted.", - "Default value. This value is unused." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "updateTimestamp": { - "description": "[Output Only] Update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyExtensionPolicy": { - "description": "Policy for a single extension.", - "id": "GlobalVmExtensionPolicyExtensionPolicy", - "properties": { - "pinnedVersion": { - "description": "Optional. The version pinning for the extension.\nIf empty, the extension will be installed with the latest version\nreleased by the extension producer.", - "type": "string" - }, - "stringConfig": { - "description": "Optional. String configuration. Any string payload that the extension\nunderstands.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyInstanceSelector": { - "description": "Selector to target VMs for a zone VM extension policy.", - "id": "GlobalVmExtensionPolicyInstanceSelector", - "properties": { - "labelSelector": { - "$ref": "GlobalVmExtensionPolicyLabelSelector", - "description": "Optional. Labels within the LabelSelector are OR'd." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyLabelSelector": { - "description": "A LabelSelector is applicable for a VM only if it matches all labels in\nthe LabelSelector.", - "id": "GlobalVmExtensionPolicyLabelSelector", - "properties": { - "inclusionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels as key value pairs.\nA VM should contain all the pairs specified in this map to be selected;\nLabels within the LabelSelector are OR'ed.", - "type": "object" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyList": { - "description": "Response to list global VM extension policy resources.", - "id": "GlobalVmExtensionPolicyList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of GlobalVmExtensionPolicy resources.", - "items": { - "$ref": "GlobalVmExtensionPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#globalVmExtensionPolicyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperation": { - "description": "Represents the rollout operation", - "id": "GlobalVmExtensionPolicyRolloutOperation", - "properties": { - "rolloutInput": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutInput", - "description": "Required. The rollout input which defines the rollout plan." - }, - "rolloutStatus": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", - "description": "[Output Only] The rollout status of the policy." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutInput": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutInput", - "properties": { - "conflictBehavior": { - "description": "Optional. [Optional] Specifies the behavior of the Rollout if a conflict is\ndetected in a project during a Rollout. It can be one of the following\nvalues:\n1) empty : don't overwrite the local value if conflict happens. This is\nthe default behavior.\n2) \"overwrite\" : Overwrite the local value with the rollout value.\nThe concept of \"conflict\" applies to:\n1) Insert action. If the zonal policy already exists when Insert\nhappens, it's a conflict.\n2) Update action. If the zonal policy was updated out of band by a\nzonal API, it's a conflict.", - "type": "string" - }, - "name": { - "description": "Optional. The name of the rollout plan.\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "predefinedRolloutPlan": { - "description": "Optional. Predefined rollout plan.", - "enum": [ - "FAST_ROLLOUT", - "ROLLOUT_PLAN_UNSPECIFIED", - "SLOW_ROLLOUT" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "retryUuid": { - "description": "Optional. The UUID of the retry action. Only set it if this is a retry\nfor an existing resource. This is for the user re-populate the resource\nwithout changes. An error will be returned if the retry_uuid is set but\nthe resource get modified.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutStatus": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", - "properties": { - "currentRollouts": { - "description": "[Output Only] The current rollouts for the latest version of the\nresource. There should be only one current rollout, but for\nscalability, we make it repeated.", - "items": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" - }, - "type": "array" - }, - "previousRollout": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", - "description": "[Output Only] The last completed rollout resource. This field will not\nbe populated until the first rollout is completed." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", - "properties": { - "rollout": { - "description": "[Output Only] The name of the rollout.\nEx. projects//locations/global/rollouts/.", - "type": "string" - }, - "rolloutPlan": { - "description": "[Output Only] The name of the rollout plan.\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "state": { - "description": "[Output Only] The overall state of the rollout.", - "enum": [ - "STATE_CANCELLED", - "STATE_COMPLETED", - "STATE_FAILED", - "STATE_PAUSED", - "STATE_PROCESSING", - "STATE_UNKNOWN", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Iteration was explicitly cancelled.", - "Iteration completed, with all actions being successful.", - "Iteration completed, with failures.", - "The rollout is paused.", - "Iteration is in progress.", - "Impossible to determine current state of the iteration.", - "Default value. This value is unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "GroupMaintenanceInfo": { - "description": "Maintenance Info for ReservationBlocks.", - "id": "GroupMaintenanceInfo", - "properties": { - "instanceMaintenanceOngoingCount": { - "description": "Describes number of instances that have ongoing maintenance.", - "format": "int32", - "type": "integer" - }, - "instanceMaintenancePendingCount": { - "description": "Describes number of instances that have pending maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceOngoingCount": { - "description": "Progress for ongoing maintenance for this group of VMs/hosts.\nDescribes number of hosts in the block that have ongoing maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenancePendingCount": { - "description": "Progress for ongoing maintenance for this group of VMs/hosts.\nDescribes number of hosts in the block that have pending maintenance.", - "format": "int32", - "type": "integer" - }, - "schedulingType": { - "description": "The type of maintenance for the reservation.", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "subblockInfraMaintenanceOngoingCount": { - "description": "Describes number of subblock Infrastructure that has ongoing maintenance.\nHere, Subblock Infrastructure Maintenance pertains to upstream hardware\ncontained in the Subblock that is necessary for a VM Family(e.g. NVLink\nDomains). Not all VM Families will support this field.", - "format": "int32", - "type": "integer" - }, - "subblockInfraMaintenancePendingCount": { - "description": "Describes number of subblock Infrastructure that has pending maintenance.\n Here, Subblock Infrastructure Maintenance pertains to upstream hardware\n contained in the Subblock that is necessary for a VM Family (e.g. NVLink\n Domains). Not all VM Families will support this field.", - "format": "int32", - "type": "integer" - }, - "upcomingGroupMaintenance": { - "$ref": "UpcomingMaintenance", - "description": "Maintenance information on this group of VMs." - } - }, - "type": "object" - }, - "GrpcServiceConfig": { - "description": "[Deprecated] gRPC config to access the SDS server.\ngRPC config to access the SDS server.", - "id": "GrpcServiceConfig", - "properties": { - "callCredentials": { - "$ref": "CallCredentials", - "description": "The call credentials to access the SDS server." - }, - "channelCredentials": { - "$ref": "ChannelCredentials", - "description": "The channel credentials to access the SDS server." - }, - "targetUri": { - "description": "The target URI of the SDS server.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributes": { - "description": "A guest attributes entry.", - "id": "GuestAttributes", - "properties": { - "kind": { - "default": "compute#guestAttributes", - "description": "[Output Only] Type of the resource. Alwayscompute#guestAttributes for guest attributes entry.", - "type": "string" - }, - "queryPath": { - "description": "The path to be queried. This can be the default namespace ('') or a\nnested namespace ('\\/') or a specified key\n('\\/\\').", - "type": "string" - }, - "queryValue": { - "$ref": "GuestAttributesValue", - "description": "[Output Only] The value of the requested queried path." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "variableKey": { - "description": "The key to search for.", - "type": "string" - }, - "variableValue": { - "description": "[Output Only] The value found for the requested key.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesEntry": { - "description": "A guest attributes namespace/key/value entry.", - "id": "GuestAttributesEntry", - "properties": { - "key": { - "description": "Key for the guest attribute entry.", - "type": "string" - }, - "namespace": { - "description": "Namespace for the guest attribute entry.", - "type": "string" - }, - "value": { - "description": "Value for the guest attribute entry.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesValue": { - "description": "Array of guest attribute namespace/key/value tuples.", - "id": "GuestAttributesValue", - "properties": { - "items": { - "items": { - "$ref": "GuestAttributesEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "GuestOsFeature": { - "description": "Guest OS features.", - "id": "GuestOsFeature", - "properties": { - "type": { - "description": "The ID of a supported feature. To add multiple values, use commas to\nseparate values. Set to one or more of the following values:\n \n - VIRTIO_SCSI_MULTIQUEUE\n - WINDOWS\n - MULTI_IP_SUBNET\n - UEFI_COMPATIBLE\n - GVNIC\n - SEV_CAPABLE\n - SUSPEND_RESUME_COMPATIBLE\n - SEV_LIVE_MIGRATABLE_V2\n - SEV_SNP_CAPABLE\n - TDX_CAPABLE\n - IDPF\n - SNP_SVSM_CAPABLE\n\n\nFor more information, see\nEnabling guest operating system features.", - "enum": [ - "BARE_METAL_LINUX_COMPATIBLE", - "FEATURE_TYPE_UNSPECIFIED", - "GVNIC", - "IDPF", - "MULTI_IP_SUBNET", - "SECURE_BOOT", - "SEV_CAPABLE", - "SEV_LIVE_MIGRATABLE", - "SEV_LIVE_MIGRATABLE_V2", - "SEV_SNP_CAPABLE", - "SNP_SVSM_CAPABLE", - "TDX_CAPABLE", - "UEFI_COMPATIBLE", - "VIRTIO_SCSI_MULTIQUEUE", - "WINDOWS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "HTTP2HealthCheck": { - "id": "HTTP2HealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTP/2 health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTP/2 health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTP/2 health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - }, - "weightReportMode": { - "description": "Weight report mode. used for weighted Load Balancing.", - "enum": [ - "DISABLE", - "DRY_RUN", - "ENABLE" - ], - "enumDescriptions": [ - "Health Checker will not parse the header field.", - "Health Checker will parse and report the weight in the header field, but\nload balancing will not be based on the weights and will use equal\nweights.", - "Health Checker will try to parse and report the weight in the header\nfield, and load balancing will be based on the weights as long as all\nbackends have a valid weight or only a subset of backends has the\nUNAVAILABLE_WEIGHT WeightError. The latter case is to continue the\nweighted load balancing while some backends are in TIMEOUT or UNKNOWN\nhealth status." - ], - "type": "string" - } - }, - "type": "object" - }, - "HTTPHealthCheck": { - "id": "HTTPHealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTP health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 80. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Also supported in legacy HTTP health checks for target pools.\nThe health check supports all backends supported by the backend service\nprovided the backend can be health checked. For example,GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT\nnetwork endpoint groups, and instance group backends. \nUSE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for pass-through load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTP health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTP health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - }, - "weightReportMode": { - "description": "Weight report mode. used for weighted Load Balancing.", - "enum": [ - "DISABLE", - "DRY_RUN", - "ENABLE" - ], - "enumDescriptions": [ - "Health Checker will not parse the header field.", - "Health Checker will parse and report the weight in the header field, but\nload balancing will not be based on the weights and will use equal\nweights.", - "Health Checker will try to parse and report the weight in the header\nfield, and load balancing will be based on the weights as long as all\nbackends have a valid weight or only a subset of backends has the\nUNAVAILABLE_WEIGHT WeightError. The latter case is to continue the\nweighted load balancing while some backends are in TIMEOUT or UNKNOWN\nhealth status." - ], - "type": "string" - } - }, - "type": "object" - }, - "HTTPSHealthCheck": { - "id": "HTTPSHealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTPS health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTPS health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTPS health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - }, - "weightReportMode": { - "description": "Weight report mode. used for weighted Load Balancing.", - "enum": [ - "DISABLE", - "DRY_RUN", - "ENABLE" - ], - "enumDescriptions": [ - "Health Checker will not parse the header field.", - "Health Checker will parse and report the weight in the header field, but\nload balancing will not be based on the weights and will use equal\nweights.", - "Health Checker will try to parse and report the weight in the header\nfield, and load balancing will be based on the weights as long as all\nbackends have a valid weight or only a subset of backends has the\nUNAVAILABLE_WEIGHT WeightError. The latter case is to continue the\nweighted load balancing while some backends are in TIMEOUT or UNKNOWN\nhealth status." - ], - "type": "string" - } - }, - "type": "object" - }, - "HaController": { - "description": "HaController handles failover for a VM Instance.", - "id": "HaController", - "properties": { - "backendServices": { - "description": "Advanced configuration option. If specified, these Backend Services need to\nbe pre-created and configured as managed.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "failoverInitiation": { - "description": "Indicates how failover should be initiated.", - "enum": [ - "FAILOVER_INITIATION_UNSPECIFIED", - "MANUAL_ONLY" - ], - "enumDescriptions": [ - "", - "Failover will be initiated only when compute.haControllers.failover\nmethod is called." - ], - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceName": { - "description": "Name of the instance that HaController is in charge of.\nIf not specified the HaController's resource name will be used instead.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "kind": { - "default": "compute#HaController", - "description": "[Output Only] Type of the resource. Alwayscompute#haController for HaControllers.", - "type": "string" - }, - "name": { - "description": "Name of the resource.\nProvided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkingAutoConfiguration": { - "$ref": "HaControllerNetworkingAutoConfiguration", - "description": "Basic networking configuration. Required backend services and forwarding\nrules will be automatically created with default parameters." - }, - "region": { - "description": "[Output Only] URL of the region where the resource resides.\nYou must specify this field as part of the HTTP request URL.\nIt is not settable as a field in the request body.", - "type": "string" - }, - "secondaryZoneCapacity": { - "description": "Indicates the capacity guarantees in the secondary zone.", - "enum": [ - "BEST_EFFORT", - "SECONDARY_ZONE_CAPACITY_UNSPECIFIED" - ], - "enumDescriptions": [ - "Failover will succeed only if at the time of failover the secondary zone\nhas enough capacity to host the instance.", - "" - ], - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "$ref": "HaControllerStatus", - "description": "[Output Only] Status information for the HaController resource." - }, - "zoneConfigurations": { - "additionalProperties": { - "$ref": "HaControllerZoneConfiguration" - }, - "description": "Map of zone configurations\nKey: name of the zone\nValue: ZoneConfiguration", - "type": "object" - } - }, - "type": "object" - }, - "HaControllerNetworkingAutoConfiguration": { - "description": "Basic networking configuration. Required backend services and forwarding\nrules will be automatically created with default parameters.", - "id": "HaControllerNetworkingAutoConfiguration", - "properties": { - "internal": { - "$ref": "HaControllerNetworkingAutoConfigurationInternal", - "description": "Internal networking configuration" - } - }, - "type": "object" - }, - "HaControllerNetworkingAutoConfigurationInternal": { - "description": "Internal networking configuration", - "id": "HaControllerNetworkingAutoConfigurationInternal", - "properties": { - "ipAddress": { - "description": "Optional. IP addresses will be automatically allocated according to\nStackType if not provided.", - "type": "string" - }, - "ipv6Address": { - "type": "string" - }, - "stackType": { - "description": "Determine which IP addresses to automatically create. Field and option\nnaming consistent with NetworkInterface configuration on Instances.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "The HA Controller Networking Endpoint will be assigned with both IPv4\nand IPv6 addresses.", - "The HA Controller Networking Endpoint will only be assigned with IPv4\naddress.", - "The HA Controller Networking Endpoint will only be assigned with IPv6\naddress." - ], - "type": "string" - } - }, - "type": "object" - }, - "HaControllerStatus": { - "description": "Contains information about current status of the HaController.", - "id": "HaControllerStatus", - "properties": { - "failoverProgress": { - "$ref": "HaControllerStatusFailoverProgress", - "description": "[Output Only] Contains the details of the ongoing failover. This message\nis not displayed if failover is NOT in progress." - }, - "lastFailoverInfo": { - "$ref": "HaControllerStatusFailoverProgress", - "description": "[Output Only] Contains the details of the last successful failover." - }, - "ongoingFailover": { - "description": "[Output Only] Indicates if the failover is currently in-progress.", - "type": "boolean" - }, - "primaryInstance": { - "description": "[Output Only] The URL to the instance that is intended to be primary at\nthis moment. Primary instance will be changed at the very beginning of a\nfailover operation.", - "type": "string" - }, - "primaryZone": { - "description": "[Output Only] The name of the zone that is intended to be primary at this\nmoment. Primary zone will be changed at the very beginning of a failover\noperation. The zone may not be operational in the middle of a failover\noperation.", - "type": "string" - }, - "readyForFailover": { - "description": "[Output Only] Indicates if the resource is ready for initiating a\nfailover to the secondary zone.", - "type": "boolean" - }, - "zoneStatus": { - "additionalProperties": { - "$ref": "HaControllerStatusZoneStatus" - }, - "description": "[Output Only] Map of zone statuses.\nKey: name of the zone\nValue: ZoneStatus", - "type": "object" - } - }, - "type": "object" - }, - "HaControllerStatusFailoverProgress": { - "description": "Contains information about the current failover operation.", - "id": "HaControllerStatusFailoverProgress", - "properties": { - "failoverCompleteTimestamp": { - "description": "[Output Only] Timestamp of the failover completion.\nFilled only if the failover is completed, in lastFailoverInfo.", - "format": "google-datetime", - "type": "string" - }, - "failoverTrigger": { - "description": "[Output Only] Indicates if failover has been triggered automatically or\nmanually.", - "enum": [ - "AUTOMATIC", - "FAILOVER_TRIGGER_UNSPECIFIED", - "MANUAL" - ], - "enumDescriptions": [ - "Failover has been triggered automatically.", - "", - "Failover has been triggered manually." - ], - "type": "string" - }, - "failoverTriggerTimestamp": { - "description": "[Output Only] Timestamp of the last failover trigger.", - "format": "google-datetime", - "type": "string" - }, - "lastFailoverAttempt": { - "$ref": "HaControllerStatusFailoverProgressLastFailoverAttempt", - "description": "[Output Only] Contains details of the last failed failover. This field\nis filled only if the current failover is failing" - } - }, - "type": "object" - }, - "HaControllerStatusFailoverProgressLastFailoverAttempt": { - "id": "HaControllerStatusFailoverProgressLastFailoverAttempt", - "properties": { - "errors": { - "description": "[Output Only] Encountered errors during the last attempt to process\nfailover.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Show timestamp only if there is an error.RFC3339\ntext format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "HaControllerStatusZoneStatus": { - "description": "Contains the status of a specific zone.", - "id": "HaControllerStatusZoneStatus", - "properties": { - "isPrimary": { - "description": "[Output Only] Indicates if the zone is primary at this moment.", - "type": "boolean" - }, - "isZoneReady": { - "description": "[Output Only] Indicates if the zone is ready for initiating a failover.", - "type": "boolean" - }, - "lastError": { - "$ref": "HaControllerStatusZoneStatusLastError", - "description": "[Output Only] This field is filled only if the current operation is\nfailing." - } - }, - "type": "object" - }, - "HaControllerStatusZoneStatusLastError": { - "description": "Contains details of the last failed operation.", - "id": "HaControllerStatusZoneStatusLastError", - "properties": { - "errors": { - "description": "[Output Only] Encountered errors.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Show timestamp only if there is an error.RFC3339\ntext format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "HaControllerZoneConfiguration": { - "description": "Config for a zone that the HaController may use for running the VM\ninstance.", - "id": "HaControllerZoneConfiguration", - "properties": { - "nodeAffinities": { - "description": "A set of node affinity configurations. Refer toConfiguring node\naffinity for more information.\nOverrides reservationAffinity.", - "items": { - "$ref": "HaControllerZoneConfigurationNodeAffinity" - }, - "type": "array" - }, - "reservationAffinity": { - "$ref": "HaControllerZoneConfigurationReservationAffinity", - "description": "Specifies the reservations that the instance can consume from." - } - }, - "type": "object" - }, - "HaControllerZoneConfigurationNodeAffinity": { - "description": "Node Affinity: the configuration of desired nodes onto which the\n Instance could be scheduled.\n This message should be an exact copy of the Instances representation\n of NodeAffinity.\nLINT.IfChange(HaControllerNodeAffinityMixer)", - "id": "HaControllerZoneConfigurationNodeAffinity", - "properties": { - "key": { - "description": "Corresponds to the label key of Node resource.", - "type": "string" - }, - "operator": { - "description": "Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity.", - "enum": [ - "IN", - "NOT_IN", - "OPERATOR_UNSPECIFIED" - ], - "enumDescriptions": [ - "Requires Compute Engine to seek for matched nodes.", - "Requires Compute Engine to avoid certain nodes.", - "" - ], - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of Node resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HaControllerZoneConfigurationReservationAffinity": { - "description": "Specifies the reservations that this instance can consume from.\nThis message should be an exact copy of the Instances representation\nof AllocationAffinity.\nLINT.IfChange(HaControllerAllocationAffinityMixer)", - "id": "HaControllerZoneConfigurationReservationAffinity", - "properties": { - "consumeReservationType": { - "description": "Specifies the type of reservation from which this instance can consume\nresources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See\nConsuming reserved instances for examples.", - "enum": [ - "ANY_RESERVATION", - "NO_RESERVATION", - "SPECIFIC_RESERVATION", - "SPECIFIC_THEN_ANY_RESERVATION", - "SPECIFIC_THEN_NO_RESERVATION", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Consume any allocation available.", - "Do not consume from any allocated capacity.", - "Must consume from a specific reservation. Must specify key value\nfields for specifying the reservations.", - "Prefer to consume from a specific reservation, but still consume any\nreservation available if the specified reservation is not available\nor exhausted. Must specify key value fields for specifying the\nreservations.", - "Prefer to consume from a specific reservation, but still consume\nfrom the on-demand pool if the specified reservation is exhausted.\nMust specify key value fields for specifying the reservations.", - "" - ], - "type": "string" - }, - "key": { - "description": "Corresponds to the label key of a reservation resource. To target aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the key and specify\nthe name of your reservation as its value.", - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of a reservation resource. This can be\neither a name to a reservation in the same project or\n\"projects/different-project/reservations/some-reservation-name\" to\ntarget a shared reservation in the same zone but in a different\nproject.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HaControllersAggregatedList": { - "id": "HaControllersAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HaControllersScopedList", - "description": "Name of the scope containing this set of ha controllers." - }, - "description": "A list of HaControllersScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#haControllersAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#haControllersAggregatedList for lists of\nHaControllers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HaControllersFailoverRequest": { - "id": "HaControllersFailoverRequest", - "properties": { - "failoverToZone": { - "description": "Name of the destination zone for the failover.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "primaryZone": { - "deprecated": true, - "description": "Name of the destination zone for the failover.\nDeprecated: use failover_to_zone instead.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "type": "object" - }, - "HaControllersList": { - "id": "HaControllersList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HaControllers in the specified project and region.", - "items": { - "$ref": "HaController" - }, - "type": "array" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results formaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HaControllersScopedList": { - "id": "HaControllersScopedList", - "properties": { - "haControllers": { - "description": "List of HaControllers contained in this scope.", - "items": { - "$ref": "HaController" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthAggregationPoliciesScopedList": { - "id": "HealthAggregationPoliciesScopedList", - "properties": { - "healthAggregationPolicies": { - "description": "A list of HealthAggregationPolicys contained in this scope.", - "items": { - "$ref": "HealthAggregationPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of health aggregation\npolicies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthAggregationPolicy": { - "description": "Represents a health aggregation policy.\n\nA health aggregation policy resource defines a policy to aggregate health.\n\nFor more information, see\nHealth checks overview.", - "id": "HealthAggregationPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthAggregationPolicy. An up-to-date fingerprint\nmust be provided in order to patch the HealthAggregationPolicy; Otherwise,\nthe request will fail with error 412 conditionNotMet. To see\nthe latest fingerprint, make a get() request to retrieve the\nHealthAggregationPolicy.", - "format": "byte", - "type": "string" - }, - "healthyPercentThreshold": { - "description": "Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the threshold (as a\npercentage) of healthy endpoints required in order to consider the\naggregated health result HEALTHY. Defaults to 60. Must be in\nrange [0, 100]. Not applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional,\nand will be set to the default if unspecified. Note that both this\nthreshold and minHealthyThreshold must be satisfied in order\nfor HEALTHY to be the aggregated result. \"Endpoints\" refers to network\nendpoints within a Network Endpoint Group or instances within an Instance\nGroup.", - "format": "uint32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthAggregationPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation\npolicies.", - "type": "string" - }, - "minHealthyThreshold": { - "description": "Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the minimum number of\nhealthy endpoints required in order to consider the aggregated health\nresult HEALTHY. Defaults to 1. Must be positive. Not\napplicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional,\nand will be set to the default if unspecified. Note that both this\nthreshold and healthyPercentThreshold must be satisfied in\norder for HEALTHY to be the aggregated result. \"Endpoints\" refers to\nnetwork endpoints within a Network Endpoint Group or instances within an\nInstance Group.", - "format": "uint32", - "type": "integer" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "policyType": { - "description": "Specifies the type of the healthAggregationPolicy. The only allowed value\nfor global resources is DNS_PUBLIC_IP_POLICY. The only allowed\nvalue for regional resources is BACKEND_SERVICE_POLICY. Must\nbe specified when the healthAggregationPolicy is created, and cannot be\nmutated.", - "enum": [ - "BACKEND_SERVICE_POLICY", - "DNS_PUBLIC_IP_POLICY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the health aggregation policy\nresides. This field applies only to the regional resource. You must specify\nthis field as part of the HTTP request URL. It is not settable as a field\nin the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "HealthAggregationPolicyAggregatedList": { - "description": "Contains a list of HealthAggregationPoliciesScopedList.", - "id": "HealthAggregationPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthAggregationPoliciesScopedList", - "description": "Name of the scope containing this set of HealthAggregationPolicies." - }, - "description": "A list of HealthAggregationPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthAggregationPolicyAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthAggregationPolicyList": { - "id": "HealthAggregationPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthAggregationPolicy resources.", - "items": { - "$ref": "HealthAggregationPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthAggregationPolicyList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation\npolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheck": { - "description": "Represents a health check resource.\n\nGoogle Compute Engine has two health check resources:\n\n* [Regional](/compute/docs/reference/rest/alpha/regionHealthChecks)\n* [Global](/compute/docs/reference/rest/alpha/healthChecks)\n\nThese health check resources can be used for load balancing and for\nautohealing VMs in a managed instance group (MIG).\n\n**Load balancing**\n\nHealth check requirements vary depending on the type of load balancer. For\ndetails about the type of health check supported for\neach load balancer and corresponding backend type,\nsee Health\nchecks overview: Load balancer guide.\n\n**Autohealing in MIGs**\n\nThe health checks that you use for autohealing VMs in a MIG can be either\nregional or global. For more information, see Set up an\napplication health check and autohealing.\n\nFor more information, seeHealth checks\noverview.", - "id": "HealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is 5\nseconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "grpcHealthCheck": { - "$ref": "GRPCHealthCheck" - }, - "grpcTlsHealthCheck": { - "$ref": "GRPCTLSHealthCheck" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "http2HealthCheck": { - "$ref": "HTTP2HealthCheck" - }, - "httpHealthCheck": { - "$ref": "HTTPHealthCheck" - }, - "httpsHealthCheck": { - "$ref": "HTTPSHealthCheck" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthCheck", - "description": "Type of the resource.", - "type": "string" - }, - "logConfig": { - "$ref": "HealthCheckLogConfig", - "description": "Configure logging on this health check." - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nFor example, a name that is 1-63 characters long, matches the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise complies with\nRFC1035. This regular expression describes a name where the first\ncharacter is a lowercase letter, and all following characters are a dash,\nlowercase letter, or digit, except the last character, which isn't a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] Region where the health check resides. Not applicable to\nglobal health checks.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "sourceRegions": { - "description": "The list of cloud regions from which health checks are performed. If any\nregions are specified, then exactly 3 regions should be specified. The\nregion names must be valid names of Google Cloud regions.\nThis can only be set for global health check.\nIf this list is non-empty, then there are restrictions\non what other health check fields are supported and what other resources\ncan use this health check:\n \n - SSL, HTTP2, and GRPC protocols are not supported.\n - The TCP request field is not supported.\n - The proxyHeader field for HTTP, HTTPS, and TCP is not\n supported.\n - The checkIntervalSec field must be at least 30.\n - The health check cannot be used with BackendService nor with managed\n instance group auto-healing.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslHealthCheck": { - "$ref": "SSLHealthCheck" - }, - "tcpHealthCheck": { - "$ref": "TCPHealthCheck" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is\n5 seconds. It is invalid for timeoutSec to have greater\nvalue than checkIntervalSec.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "Specifies the type of the healthCheck, either TCP,SSL, HTTP, HTTPS,HTTP2 or GRPC. Exactly one of the\nprotocol-specific health check fields must be specified, which must matchtype field.", - "enum": [ - "GRPC", - "GRPC_WITH_TLS", - "HTTP", - "HTTP2", - "HTTPS", - "INVALID", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "udpHealthCheck": { - "$ref": "UDPHealthCheck" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this many\nconsecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HealthCheckList": { - "description": "Contains a list of HealthCheck resources.", - "id": "HealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthCheck resources.", - "items": { - "$ref": "HealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheckLogConfig": { - "description": "Configuration of logging on a health check. If logging is enabled, logs\nwill be exported to Stackdriver.", - "id": "HealthCheckLogConfig", - "properties": { - "enable": { - "description": "Indicates whether or not to export logs. This is false by default, which\nmeans no health check logging will be done.", - "type": "boolean" - } - }, - "type": "object" - }, - "HealthCheckReference": { - "description": "A full or valid partial URL to a health check. For example, the following are\nvalid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check\n - projects/project-id/global/httpHealthChecks/health-check\n - global/httpHealthChecks/health-check", - "id": "HealthCheckReference", - "properties": { - "healthCheck": { - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckService": { - "description": "Represents a Health-Check as a Service resource.", - "id": "HealthCheckService", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthCheckService. An up-to-date fingerprint must\nbe provided in order to patch/update the HealthCheckService; Otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nHealthCheckService.", - "format": "byte", - "type": "string" - }, - "healthChecks": { - "description": "A list of URLs to the HealthCheck resources. Must have\nat least one HealthCheck, and not more than 10 for regionalHealthCheckService, and not more than 1 for globalHealthCheckService.HealthCheck resources must haveportSpecification=USE_SERVING_PORT orportSpecification=USE_FIXED_PORT. For\nregional HealthCheckService, theHealthCheck must be regional and in the same\nregion. For global HealthCheckService,HealthCheck must be global. Mix of regional and globalHealthChecks is not supported. Multiple regionalHealthChecks must belong to the same region. RegionalHealthChecks must belong to the same region as zones ofNetworkEndpointGroups. For globalHealthCheckService using globalINTERNET_IP_PORT NetworkEndpointGroups, the\nglobal HealthChecks must specify sourceRegions,\nand HealthChecks that specify sourceRegions can\nonly be used with global INTERNET_IP_PORTNetworkEndpointGroups.", - "items": { - "type": "string" - }, - "type": "array" - }, - "healthStatusAggregationPolicy": { - "description": "Optional. Policy for how the results from multiple health checks\nfor the same endpoint are aggregated. Defaults to NO_AGGREGATION\nif unspecified.\n \n - NO_AGGREGATION. An EndpointHealth message is\n returned for each pair in the health check\n service.\n - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY.\n\n.\nThis is only allowed with regional HealthCheckService.", - "enum": [ - "AND", - "NO_AGGREGATION" - ], - "enumDescriptions": [ - "If any backend's health check reports UNHEALTHY,\nthen UNHEALTHY is the HealthState of\nthe entire health check service. If all backend's are healthy,\nthe HealthState of the health check service isHEALTHY.", - "An EndpointHealth message is returned for each\nbackend in the health check service." - ], - "type": "string" - }, - "healthStatusAggregationStrategy": { - "deprecated": true, - "description": "This field is deprecated. Use health_status_aggregation_policy\ninstead.\n\nPolicy for how the results from multiple health checks for the\nsame endpoint are aggregated.\n \n - NO_AGGREGATION. An EndpointHealth\n message is returned for each backend in the health check\n service.\n - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If\n all backend's are healthy, the HealthState of the\n health check service is HEALTHY.\n\n.", - "enum": [ - "AND", - "NO_AGGREGATION" - ], - "enumDescriptions": [ - "This is deprecated. Use health_status_aggregation_policy instead.\nIf any backend's health check reports UNHEALTHY,\nthen UNHEALTHY is the HealthState of\nthe entire health check service. If all backend's are healthy,\nthe HealthState of the health check service isHEALTHY.", - "This is deprecated. Use health_status_aggregation_policy instead.\nAn EndpointHealth message is returned for each\nbackend in the health check service." - ], - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthCheckService", - "description": "[Output only] Type of the resource. Alwayscompute#healthCheckServicefor health check services.", - "type": "string" - }, - "name": { - "description": "Name of the resource. The name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkEndpointGroups": { - "description": "A list of URLs to the NetworkEndpointGroup\nresources. Must not have more than 100. For regionalHealthCheckService, NEGs must be in\nzones in the region of the HealthCheckService. For globalHealthCheckServices, the NetworkEndpointGroups\nmust be global INTERNET_IP_PORT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notificationEndpoints": { - "description": "A list of URLs to the NotificationEndpoint\nresources. Must not have more than 10. A list of endpoints for\nreceiving notifications of change in health status. For regionalHealthCheckService,NotificationEndpoint must be regional and in the\nsame region. For global HealthCheckService,NotificationEndpoint must be global.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the health check service\nresides. This field is not applicable to global health check services.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckServiceAggregatedList": { - "description": "Contains a list of HealthCheckServicesScopedList.", - "id": "HealthCheckServiceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthCheckServicesScopedList", - "description": "Name of the scope containing this set of HealthCheckServices." - }, - "description": "A list of HealthCheckServicesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthCheckServiceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheckServiceReference": { - "description": "A full or valid partial URL to a health check service. For example, the\nfollowing are valid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service\n - projects/project-id/regions/us-west1/healthCheckServices/health-check-service\n - regions/us-west1/healthCheckServices/health-check-service", - "id": "HealthCheckServiceReference", - "properties": { - "healthCheckService": { - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckServicesList": { - "id": "HealthCheckServicesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthCheckService resources.", - "items": { - "$ref": "HealthCheckService" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthCheckServicesList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthCheckServicesList for lists of\nHealthCheckServices.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheckServicesScopedList": { - "id": "HealthCheckServicesScopedList", - "properties": { - "resources": { - "description": "A list of HealthCheckServices contained in this scope.", - "items": { - "$ref": "HealthCheckService" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthChecksAggregatedList": { - "id": "HealthChecksAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthChecksScopedList", - "description": "Name of the scope containing this set of HealthChecks." - }, - "description": "A list of HealthChecksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthChecksAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthChecksScopedList": { - "id": "HealthChecksScopedList", - "properties": { - "healthChecks": { - "description": "A list of HealthChecks contained in this scope.", - "items": { - "$ref": "HealthCheck" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSource": { - "description": "Represents a health source.\n\nA health source resource specifies the source resources and the health\naggregation policy applied to the source resources to determine the\naggregated health status.", - "id": "HealthSource", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthSource. An up-to-date fingerprint\nmust be provided in order to patch the HealthSource; Otherwise, the request\nwill fail with error 412 conditionNotMet. To see the latest\nfingerprint, make a get() request to retrieve the\nHealthSource.", - "format": "byte", - "type": "string" - }, - "healthAggregationPolicy": { - "description": "URL to the HealthAggregationPolicy resource. Must be set. Must\nbe regional and in the same region as the HealthSource. Can be\nmutated.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthSource", - "description": "[Output Only] Type of the resource. Alwayscompute#healthSource for health sources.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the health source resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "sourceType": { - "description": "Specifies the type of the HealthSource. The only allowed value\nis BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated.", - "enum": [ - "BACKEND_SERVICE" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "sources": { - "description": "URLs to the source resources. Must be size 1. Must be aBackendService if\nthe sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional\nand in the same region as the HealthSource (cross-region\ndeployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be\nmutated.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HealthSourceAggregatedList": { - "description": "Contains a list of HealthSourcesScopedList.", - "id": "HealthSourceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthSourcesScopedList", - "description": "Name of the scope containing this set of HealthSources." - }, - "description": "A list of HealthSourcesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthSourceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSourceList": { - "id": "HealthSourceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthSource resources.", - "items": { - "$ref": "HealthSource" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthSourceList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthSource for health sources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSourcesScopedList": { - "id": "HealthSourcesScopedList", - "properties": { - "healthSources": { - "description": "A list of HealthSources contained in this scope.", - "items": { - "$ref": "HealthSource" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nhealth sources when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthStatus": { - "id": "HealthStatus", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata defined as annotations for network endpoint.", - "type": "object" - }, - "forwardingRule": { - "description": "URL of the forwarding rule associated with the health status of the\ninstance.", - "type": "string" - }, - "forwardingRuleIp": { - "description": "A forwarding rule IP address assigned to this instance.", - "type": "string" - }, - "healthState": { - "description": "Health state of the IPv4 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "instance": { - "description": "URL of the instance resource.", - "type": "string" - }, - "ipAddress": { - "description": "For target pool based Network Load Balancing, it indicates the forwarding\nrule's IP address assigned to this instance. For other types of load\nbalancing, the field indicates VM internal ip.", - "type": "string" - }, - "ipv6Address": { - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the IPv6 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "port": { - "description": "The named port of the instance group, not necessarily the port that is\nhealth-checked.", - "format": "int32", - "type": "integer" - }, - "weight": { - "type": "string" - }, - "weightError": { - "enum": [ - "INVALID_WEIGHT", - "MISSING_WEIGHT", - "UNAVAILABLE_WEIGHT", - "WEIGHT_NONE" - ], - "enumDescriptions": [ - "The response to a Health Check probe had the HTTP response header field\nX-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not\na non-negative single-precision floating-point number in decimal string\nrepresentation).", - "The response to a Health Check probe did not have the HTTP response\nheader field X-Load-Balancing-Endpoint-Weight.", - "This is the value when the accompanied health status is either TIMEOUT\n(i.e.,the Health Check probe was not able to get a response in time) or\nUNKNOWN. For the latter, it should be typically because there has not\nbeen sufficient time to parse and report the weight for a new backend\n(which is with 0.0.0.0 ip address). However, it can be also due to an\noutage case for which the health status is explicitly reset to UNKNOWN.", - "This is the default value when WeightReportMode is DISABLE,\nand is also the initial value when WeightReportMode has just updated to\nENABLE or DRY_RUN and there has not been\nsufficient time to parse and report the backend weight." - ], - "type": "string" - } - }, - "type": "object" - }, - "HealthStatusForNetworkEndpoint": { - "id": "HealthStatusForNetworkEndpoint", - "properties": { - "backendService": { - "$ref": "BackendServiceReference", - "description": "URL of the backend service associated with the health state of the network\nendpoint." - }, - "forwardingRule": { - "$ref": "ForwardingRuleReference", - "description": "URL of the forwarding rule associated with the health state of the network\nendpoint." - }, - "healthCheck": { - "$ref": "HealthCheckReference", - "description": "URL of the health check associated with the health state of the network\nendpoint." - }, - "healthCheckService": { - "$ref": "HealthCheckServiceReference", - "description": "URL of the health check service associated with the health state of the\nnetwork endpoint." - }, - "healthState": { - "description": "Health state of the network endpoint determined based on the health checks\nconfigured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the ipv6 network endpoint determined based on the health\nchecks configured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - } - }, - "type": "object" - }, - "Help": { - "description": "Provides links to documentation or for performing an out of band action.\n\nFor example, if a quota check failed with an error indicating the calling\nproject hasn't enabled the accessed service, this can contain a URL pointing\ndirectly to the right place in the developer console to flip the bit.", - "id": "Help", - "properties": { - "links": { - "description": "URL(s) pointing to additional information on handling the current error.", - "items": { - "$ref": "HelpLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "HelpLink": { - "description": "Describes a URL link.", - "id": "HelpLink", - "properties": { - "description": { - "description": "Describes what the link offers.", - "type": "string" - }, - "url": { - "description": "The URL of the link.", - "type": "string" - } - }, - "type": "object" - }, - "HostRule": { - "description": "UrlMaps\nA host-matching rule for a URL. If matched, will use the namedPathMatcher to select the BackendService.", - "id": "HostRule", - "properties": { - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "hosts": { - "description": "The list of host patterns to match. They must be valid hostnames with\noptional port numbers in the format host:port.* matches any string of ([a-z0-9-.]*). In\nthat case, * must be the first character, and if followed by\nanything, the immediate following character must be either -\nor ..\n\n* based matching is not supported when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pathMatcher": { - "description": "The name of the PathMatcher to use to match the path portion\nof the URL if the hostRule matches the URL's host portion.", - "type": "string" - } - }, - "type": "object" - }, - "HttpFaultAbort": { - "description": "Specification for how requests are aborted as part of fault injection.", - "id": "HttpFaultAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request.\n\nThe value must be from 200 to 599 inclusive.\n\nFor gRPC protocol, the gRPC status code is mapped to HTTP status code\naccording to this \nmapping table. HTTP status 200 is mapped to gRPC status\nUNKNOWN. Injecting an OK status is currently not supported by\nTraffic Director.", - "format": "uint32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests\nthat is aborted as part of fault injection.\n\nThe value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultDelay": { - "description": "Specifies the delay introduced by the load balancer before forwarding the\nrequest to the backend service as part of fault injection.", - "id": "HttpFaultDelay", - "properties": { - "fixedDelay": { - "$ref": "Duration", - "description": "Specifies the value of the fixed delay interval." - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests for\nwhich a delay is introduced as part of fault injection.\n\nThe value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultInjection": { - "description": "The specification for fault injection introduced into traffic to test\nthe resiliency of clients to backend service failure. As part of fault\ninjection, when clients send requests to a backend service, delays can be\nintroduced by the load balancer on a percentage of requests before sending\nthose request to the backend service. Similarly requests from clients can be\naborted by the load balancer for a percentage of requests.", - "id": "HttpFaultInjection", - "properties": { - "abort": { - "$ref": "HttpFaultAbort", - "description": "The specification for how client requests are aborted as part of fault\ninjection." - }, - "delay": { - "$ref": "HttpFaultDelay", - "description": "The specification for how client requests are delayed as part of fault\ninjection, before being sent to a backend service." - } - }, - "type": "object" - }, - "HttpFilterConfig": { - "description": "HttpFilterConfiguration supplies additional contextual settings\nfor networkservices.HttpFilter resources enabled by Traffic\nDirector.", - "id": "HttpFilterConfig", - "properties": { - "config": { - "description": "The configuration needed to enable thenetworkservices.HttpFilter resource. The configuration must be\nYAML formatted and only contain fields defined in the protobuf identified\nin configTypeUrl", - "type": "string" - }, - "configTypeUrl": { - "description": "The fully qualified versioned proto3 type url of the protobuf that the\nfilter expects for its contextual settings, for example:type.googleapis.com/google.protobuf.Struct", - "type": "string" - }, - "filterName": { - "description": "Name of the networkservices.HttpFilter resource this\nconfiguration belongs to. This name must be known to the xDS client.\nExample: envoy.wasm", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderAction": { - "description": "The request and response header transformations that take effect before\nthe request is passed along to the selected backendService.", - "id": "HttpHeaderAction", - "properties": { - "requestHeadersToAdd": { - "description": "Headers to add to a matching request before forwarding the request to thebackendService.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "requestHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the\nrequest before forwarding the request to the backendService.", - "items": { - "type": "string" - }, - "type": "array" - }, - "responseHeadersToAdd": { - "description": "Headers to add the response before sending the response back to the\nclient.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "responseHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the\nresponse before sending the response back to the client.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpHeaderMatch": { - "description": "matchRule criteria for request header matches.", - "id": "HttpHeaderMatch", - "properties": { - "exactMatch": { - "description": "The value should exactly match contents of exactMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - }, - "headerName": { - "description": "The name of the HTTP header to match.\n\nFor matching against the HTTP request's authority, use a headerMatch\nwith the header name \":authority\".\n\nFor matching a request's method, use the headerName \":method\".\n\nWhen the URL map is bound to a target gRPC proxy that has\nthe validateForProxyless field set to true, only\nnon-binary\nuser-specified custom metadata and the `content-type` header are supported.\nThe following transport-level headers cannot be used in header matching\nrules:\n`:authority`, `:method`, `:path`, `:scheme`, `user-agent`,\n`accept-encoding`, `content-encoding`, `grpc-accept-encoding`,\n`grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`,\n`grpc-timeout` and `grpc-trace-bin`.", - "type": "string" - }, - "invertMatch": { - "description": "If set to false, the headerMatch is considered a\nmatch if the preceding match criteria are met. If set to true,\nthe headerMatch is considered a match if the preceding\nmatch criteria are NOT met.\n\nThe default setting is false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The value of the header must start with the contents ofprefixMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - }, - "presentMatch": { - "description": "A header with the contents of headerName must exist. The\nmatch takes place whether or not the request's header has a value.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "boolean" - }, - "rangeMatch": { - "$ref": "Int64RangeMatch", - "description": "The header value must be an integer and its value must be in the range\nspecified in rangeMatch. If the header does not contain an\ninteger, number or is empty, the match fails.\n\nFor example for a range [-5, 0]\n \n \n - -3 will match.\n - 0 will not match.\n - 0.25 will not match.\n - -3someString will not match.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nrangeMatch is not supported for load balancers\nthat have loadBalancingScheme set to EXTERNAL." - }, - "regexMatch": { - "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - }, - "suffixMatch": { - "description": "The value of the header must end with the contents ofsuffixMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderOption": { - "description": "Specification determining how headers are added to requests or responses.", - "id": "HttpHeaderOption", - "properties": { - "headerName": { - "description": "The name of the header.", - "type": "string" - }, - "headerValue": { - "description": "The value of the header to add.", - "type": "string" - }, - "replace": { - "description": "If false, headerValue is appended to any values\nthat already\nexist for the header. If true, headerValue is set for the\nheader, discarding any values that were set for that header.\n\nThe default value is true,\nunless a variable is present in headerValue,\nin which case the default value is false.\n.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpHealthCheck": { - "description": "Represents a legacy HTTP Health Check resource.\n\nLegacy HTTP health checks are now only required by target pool-based network\nload balancers. For all other load balancers, including backend service-based\nnetwork load balancers, and for managed instance group auto-healing, you must\nuse modern (non-legacy) health checks.\n\nFor more information, seeHealth checks\noverview.", - "id": "HttpHealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is5 seconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "host": { - "description": "The value of the host header in the HTTP health check request. If left\nempty (default value), the public IP on behalf of which this health check\nis performed will be used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#httpHealthCheck", - "description": "[Output Only] Type of the resource. Alwayscompute#httpHealthCheck for HTTP health checks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "port": { - "description": "The TCP port number for the HTTP health check request. The default value is80.", - "format": "int32", - "type": "integer" - }, - "requestPath": { - "description": "The request path of the HTTP health check request. The default value is/. This field does not support query\nparameters. Must comply withRFC3986.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is5 seconds. It is invalid for timeoutSec to have\ngreater value than checkIntervalSec.", - "format": "int32", - "type": "integer" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this\nmany consecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpHealthCheckList": { - "description": "Contains a list of HttpHealthCheck resources.", - "id": "HttpHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#httpHealthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HttpQueryParameterMatch": { - "description": "HttpRouteRuleMatch criteria for a request's query parameter.", - "id": "HttpQueryParameterMatch", - "properties": { - "exactMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter exactly matches the contents of exactMatch.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.", - "type": "string" - }, - "name": { - "description": "The name of the query parameter to match. The query parameter must exist in\nthe request, in the absence of which the request match fails.", - "type": "string" - }, - "presentMatch": { - "description": "Specifies that the queryParameterMatch matches if the\nrequest contains the query parameter, irrespective of whether the\nparameter has a value or not.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.", - "type": "boolean" - }, - "regexMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRedirectAction": { - "description": "Specifies settings for an HTTP redirect.", - "id": "HttpRedirectAction", - "properties": { - "hostRedirect": { - "description": "The host that is used in the redirect response instead of the one that\nwas supplied in the request.\n\nThe value must be from 1 to 255\ncharacters.", - "type": "string" - }, - "httpsRedirect": { - "description": "If set to true, the URL scheme in the redirected request is\nset to HTTPS.\nIf set to false, the URL scheme of the redirected request\nremains the same as that of the request.\n\nThis must only be set for URL maps used inTargetHttpProxys. Setting this true forTargetHttpsProxy is not permitted.\n\nThe default is set to false.", - "type": "boolean" - }, - "pathRedirect": { - "description": "The path that is used in the redirect response instead of the one\nthat was supplied in the request.\n\npathRedirect cannot be supplied together withprefixRedirect. Supply one alone or neither. If neither is\nsupplied, the path of the original request is used for the redirect.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "prefixRedirect": { - "description": "The prefix that replaces the prefixMatch specified in\nthe HttpRouteRuleMatch, retaining the remaining portion\nof the URL before redirecting the request.\n\nprefixRedirect cannot be supplied together withpathRedirect. Supply one alone or neither. If neither is\nsupplied, the path of the original request is used for the redirect.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "redirectResponseCode": { - "description": "The HTTP Status code to use for this RedirectAction.\n\nSupported values are:\n \n - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds\n to 301.\n - FOUND, which corresponds to 302.\n - SEE_OTHER which corresponds to 303.\n - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request\n method is retained.\n - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request\n method is retained.", - "enum": [ - "FOUND", - "MOVED_PERMANENTLY_DEFAULT", - "PERMANENT_REDIRECT", - "SEE_OTHER", - "TEMPORARY_REDIRECT" - ], - "enumDescriptions": [ - "Http Status Code 302 - Found.", - "Http Status Code 301 - Moved Permanently.", - "Http Status Code 308 - Permanent Redirect maintaining HTTP method.", - "Http Status Code 303 - See Other.", - "Http Status Code 307 - Temporary Redirect maintaining HTTP method." - ], - "type": "string" - }, - "stripQuery": { - "description": "If set to true, any accompanying query portion of the original\nURL is\nremoved before redirecting the request. If set to false, the\nquery portion of the original URL is retained.\n\nThe default is set to false.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpRetryPolicy": { - "description": "The retry policy associates with HttpRouteRule", - "id": "HttpRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number retries. This number must be \u003e 0.\nIf not specified, defaults to 1.", - "format": "uint32", - "type": "integer" - }, - "perTryTimeout": { - "$ref": "Duration", - "description": "Specifies a non-zero timeout per retry attempt.\n\nIf not specified, will use the timeout set in theHttpRouteAction field.\nIf timeout in the HttpRouteAction field is not set, this field\nuses the largest timeout\namong all backend services associated with the route.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "retryConditions": { - "description": "Specifies one or more conditions when this retry policy applies. Valid\nvalues are:\n \n - 5xx: retry is attempted if the instance or endpoint\n responds with any 5xx response code, or if the instance or\n endpoint does not respond at all. For example, disconnects, reset, read\n timeout, connection failure, and refused streams.\n - gateway-error: Similar to 5xx, but only\n applies to response codes 502, 503 or504.\n - connect-failure: a retry is attempted on failures\n connecting to the instance or endpoint. For example, connection\n timeouts.\n - retriable-4xx: a retry is attempted if the instance\n or endpoint responds with a 4xx response code.\n The only error that you can retry is error code 409.\n - refused-stream: a retry is attempted if the instance\n or endpoint resets the stream with a REFUSED_STREAM error\n code. This reset type indicates that it is safe to retry.\n - cancelled: a retry is attempted if the gRPC status\n code in the response header is set to cancelled.\n - deadline-exceeded: a retry is attempted if the gRPC\n status code in the response header is set todeadline-exceeded.\n - internal: a retry is attempted if the gRPC\n status code in the response header is set tointernal.\n - resource-exhausted: a retry is attempted if the gRPC\n status code in the response header is set toresource-exhausted.\n - unavailable: a retry is attempted if the gRPC\n status code in the response header is set tounavailable.\n\nOnly the following codes are supported when the URL map is bound to\ntarget gRPC proxy that has validateForProxyless field set to true.\n \n - cancelled\n - deadline-exceeded\n - internal\n - resource-exhausted\n - unavailable", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteAction": { - "id": "HttpRouteAction", - "properties": { - "corsPolicy": { - "$ref": "CorsPolicy", - "description": "The specification for allowing client-side cross-origin requests. For more\ninformation about the W3C recommendation for cross-origin resource sharing\n(CORS), see Fetch API Living\nStandard.\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "faultInjectionPolicy": { - "$ref": "HttpFaultInjection", - "description": "The specification for fault injection introduced into traffic to test\nthe resiliency of clients to backend service failure. As part of fault\ninjection, when clients send requests to a backend service, delays can be\nintroduced by a load balancer on a percentage of requests before sending\nthose requests to the backend service. Similarly requests from clients can\nbe aborted by the load balancer for a percentage of requests.timeout and retry_policy is ignored by clients\nthat are configured with a fault_injection_policy if:\n1. The traffic is generated by fault injection AND\n2. The fault injection is not a delay fault injection.\nFault injection is not supported with the classic Application Load Balancer\n. To see which load balancers support fault injection,\nsee Load\nbalancing: Routing and traffic management features." - }, - "maxStreamDuration": { - "$ref": "Duration", - "description": "Specifies the maximum duration (timeout) for streams on the selected route.\nUnlike the timeout field where the timeout duration starts\nfrom the time the request has been fully processed (known as*end-of-stream*),\nthe duration in this field is computed from the beginning of the stream\nuntil the response has been processed, including all retries. A\nstream that does not complete in this duration is closed.\n\nIf not specified, this field uses the maximummaxStreamDuration value among all backend services associated\nwith the route.\n\nThis field is only allowed if the Url map is used with backend services\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED." - }, - "requestMirrorPolicy": { - "$ref": "RequestMirrorPolicy", - "description": "Specifies the policy on how requests intended for the route's backends\nare shadowed to a separate mirrored backend service. The load balancer does\nnot wait for responses from the shadow service. Before sending traffic\nto the shadow service, the host / authority header is suffixed with-shadow.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "retryPolicy": { - "$ref": "HttpRetryPolicy", - "description": "Specifies the retry policy associated with this route." - }, - "timeout": { - "$ref": "Duration", - "description": "Specifies the timeout for the selected route. Timeout is computed from the\ntime the request has been fully processed (known as *end-of-stream*)\nup until the response has been processed. Timeout includes\nall retries.\n\nIf not specified, this field uses the largest timeout among all backend\nservices associated with the route.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "urlRewrite": { - "$ref": "UrlRewrite", - "description": "The spec to modify the URL of the request, before forwarding the request\nto the matched service.\n\n urlRewrite is the only action supported in UrlMaps\nfor classic Application Load Balancers.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "weightedBackendServices": { - "description": "A list of weighted backend services to send traffic to when a route match\noccurs. The weights determine the fraction of traffic that flows to\ntheir corresponding backend service. If all traffic needs to\ngo to a single backend service, there must be oneweightedBackendService with weight set to a non-zero number.\n\nAfter a backend service is identified and before forwarding\nthe request to\nthe backend service, advanced routing actions such as URL rewrites and\nheader transformations are applied depending on additional settings\nspecified in this HttpRouteAction.", - "items": { - "$ref": "WeightedBackendService" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteRule": { - "description": "The HttpRouteRule setting specifies how to match an HTTP request\nand the corresponding routing action that load balancing proxies perform.", - "id": "HttpRouteRule", - "properties": { - "customErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "customErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nIf a policy for an\nerror code is not configured for the RouteRule, a policy for\nthe error code configured inpathMatcher.defaultCustomErrorResponsePolicy is applied. If\none is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the policy\nconfigured in UrlMap.defaultCustomErrorResponsePolicy takes\neffect. \n\nFor example, consider a UrlMap with the following configuration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy are configured\n with policies for 5xx and 4xx errors\n - A RouteRule for /coming_soon/ is configured for the\n error code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in RouteRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect. \n\nWhen\nused in conjunction withrouteRules.routeAction.retryPolicy, retries take\nprecedence. Only once all retries are exhausted, thecustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the customErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ncustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "description": { - "description": "The short description conveying the intent of this routeRule.\n\n\nThe description can have a maximum length of 1024 characters.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backendService.\n\nThe headerAction value specified here is applied before the\nmatching pathMatchers[].headerAction and afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction\n\nHeaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "httpFilterConfigs": { - "description": "Outbound route specific configuration fornetworkservices.HttpFilter resources enabled by Traffic\nDirector. httpFilterConfigs only applies for load balancers\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule for\nmore details.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "HttpFilterConfig" - }, - "type": "array" - }, - "httpFilterMetadata": { - "description": "Outbound route specific metadata supplied tonetworkservices.HttpFilter resources enabled by Traffic\nDirector. httpFilterMetadata only applies for load balancers\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule for\nmore details. \n\n The only configTypeUrl supported istype.googleapis.com/google.protobuf.Struct\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "HttpFilterConfig" - }, - "type": "array" - }, - "matchRules": { - "description": "The list of criteria for matching attributes of a request to thisrouteRule. This list has OR semantics: the request matches\nthis routeRule when any of thematchRules are satisfied. However predicates within\na given matchRule have AND semantics. All predicates\nwithin a matchRule must match for the request to\nmatch the rule.", - "items": { - "$ref": "HttpRouteRuleMatch" - }, - "type": "array" - }, - "priority": { - "description": "For routeRules within a given pathMatcher,\npriority determines the order in which a load balancer interpretsrouteRules. RouteRules are evaluated in order\nof priority, from the lowest to highest number. The priority of a\nrule decreases as its number increases (1, 2, 3, N+1). The first rule\nthat matches the request is applied.\n\n\nYou cannot configure two or more routeRules with the same priority.\nPriority for each rule must be set to a number from 0 to 2147483647\ninclusive.\n\n\nPriority numbers can have gaps, which enable you to add or remove rules\nin the future without affecting the rest of the rules. For example, 1, 2,\n3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you\ncould add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future\nwithout any impact on existing rules.", - "format": "int32", - "type": "integer" - }, - "routeAction": { - "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer\nperforms advanced routing actions, such as URL rewrites and header\ntransformations, before forwarding the request to the selected backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a route rule'srouteAction." - }, - "service": { - "description": "The full or partial URL of the backend service resource to which traffic\nis directed if this rule is matched. If routeAction is\nalso specified, advanced routing actions, such as URL rewrites,\ntake effect before sending the request to the backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.", - "type": "string" - }, - "urlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When this rule is matched, the request is redirected to a URL\nspecified by urlRedirect.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - } - }, - "type": "object" - }, - "HttpRouteRuleMatch": { - "description": "HttpRouteRuleMatch specifies a set of criteria for matching\nrequests to an HttpRouteRule. All specified criteria must\nbe satisfied for a match to occur.", - "id": "HttpRouteRuleMatch", - "properties": { - "fullPathMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.", - "type": "string" - }, - "headerMatches": { - "description": "Specifies a list of header match criteria, all of which must match\ncorresponding headers in the request.", - "items": { - "$ref": "HttpHeaderMatch" - }, - "type": "array" - }, - "ignoreCase": { - "description": "Specifies that prefixMatch and fullPathMatch\nmatches are case sensitive.\n\nThe default value is false.\n\nignoreCase must not be used with regexMatch.\n\nNot supported when the URL map is bound to a target gRPC proxy.", - "type": "boolean" - }, - "metadataFilters": { - "description": "Opaque filter criteria used by the load balancer to restrict routing\nconfiguration to a limited set of xDS\ncompliant clients. In their xDS requests to the load balancer, xDS clients\npresent node\nmetadata. When there is a match, the relevant routing configuration\nis made available to those proxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least one of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata. If multiple\nmetadata filters are specified, all of them need to be\nsatisfied in order to be considered a match.\n\nmetadataFilters specified here is applied after those\nspecified in ForwardingRule that refers to theUrlMap this HttpRouteRuleMatch belongs to.\n\nmetadataFilters only applies to load balancers that haveloadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "MetadataFilter" - }, - "type": "array" - }, - "pathTemplateMatch": { - "description": "If specified, the route is a pattern match expression that must match the\n:path header once the query string is removed.\n\n A pattern match allows you to match\n \n \n - The value must be between 1 and 1024 characters\n - The pattern must start with a leading slash (\"/\")\n - There may be no more than 5 operators in pattern\n\n Precisely one ofprefix_match, full_path_match,regex_match or path_template_match must be set.", - "type": "string" - }, - "prefixMatch": { - "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\nspecified.", - "type": "string" - }, - "queryParameterMatches": { - "description": "Specifies a list of query parameter match criteria, all of which must\nmatch corresponding query parameters in the request.\n\nNot supported when the URL map is bound to a target gRPC proxy.", - "items": { - "$ref": "HttpQueryParameterMatch" - }, - "type": "array" - }, - "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "HttpsHealthCheck": { - "description": "Represents a legacy HTTPS Health Check resource.\n\nLegacy HTTPS health checks have been deprecated. If you are using a target\npool-based network load balancer, you must use a legacy HTTP (not HTTPS)\nhealth check. For all other load balancers, including backend service-based\nnetwork load balancers, and for managed instance group auto-healing, you must\nuse modern (non-legacy) health checks.\n\nFor more information, seeHealth checks\noverview.", - "id": "HttpsHealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is 5\nseconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "host": { - "description": "The value of the host header in the HTTPS health check request. If left\nempty (default value), the public IP on behalf of which this health check\nis performed will be used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#httpsHealthCheck", - "description": "Type of the resource.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "port": { - "description": "The TCP port number for the HTTPS health check request. The default value\nis 443.", - "format": "int32", - "type": "integer" - }, - "requestPath": { - "description": "The request path of the HTTPS health check request. The default value is\n\"/\". Must comply withRFC3986.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is\n5 seconds. It is invalid for timeoutSec to have a greater value than\ncheckIntervalSec.", - "format": "int32", - "type": "integer" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this\nmany consecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpsHealthCheckList": { - "description": "Contains a list of HttpsHealthCheck resources.", - "id": "HttpsHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HttpsHealthCheck resources.", - "items": { - "$ref": "HttpsHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#httpsHealthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Image": { - "description": "Represents an Image resource.\n\nYou can use images to create boot disks for your VM instances.\nFor more information, read Images.", - "id": "Image", - "properties": { - "architecture": { - "description": "The architecture of the image. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "archiveSizeBytes": { - "description": "Size of the image tar.gz archive stored in Google Cloud\nStorage (in bytes).", - "format": "int64", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this image." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "Size of the image when restored onto a persistent disk (in GB).", - "format": "int64", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this image is created from a confidential compute mode disk.\n[Output Only]: This field is not set by user, but from source disk.", - "type": "boolean" - }, - "family": { - "description": "The name of the image family to which this image belongs. The image\nfamily name can be from a publicly managed image family provided by\nCompute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family.\nFor more information, see Image\nfamily best practices.\n\nWhen creating disks, you can specify an image family instead of a specific\nimage name. The image family always returns its latest image that is not\ndeprecated. The name of the image family must comply with RFC1035.", - "type": "string" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. To see a list of available options, see theguestOSfeatures[].type parameter.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "imageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the image using acustomer-supplied\nencryption key.\n\nAfter you encrypt an image with a customer-supplied key, you must provide\nthe same key if you use the image later (e.g. to create a disk from\nthe image).\n\nCustomer-supplied encryption keys do not protect access to metadata\nof the disk.\n\nIf you do not provide an encryption key when creating the image, then the\ndisk will be encrypted using an automatically generated key and you do not\nneed to provide a key to use the image later." - }, - "kind": { - "default": "compute#image", - "description": "[Output Only] Type of the resource. Always compute#image for\nimages.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this image, which is\nessentially a hash of the labels used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an image.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this image. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "licenseCodes": { - "description": "Integer license codes indicating which licenses are attached to this image.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "Any applicable license URI.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locked": { - "description": "A flag for marketplace VM disk created from the image, which is designed\nfor marketplace VM disk to prevent the proprietary data on the disk from\nbeing accessed unwantedly. The flag will be inherited by the disk created\nfrom the image.\n\nThe disk with locked flag set to true will be prohibited from performing\nthe operations below:\n \n - R/W or R/O disk attach\n - Disk detach, if disk is created via create-on-create\n - Create images\n - Create snapshots\n - Create disk clone (create disk from the current disk)\n\n\n\nThe image with the locked field set to true will be prohibited from\nperforming the operations below:\n \n - Create images from the current image\n - Update the locked field for the current image\n\n\n\nThe instance with at least one disk with locked flag set to true will be\nprohibited from performing the operations below:\n \n - Secondary disk attach\n - Create instant snapshot\n - Create machine images\n - Create instance template\n - Delete the instance with --keep-disk parameter set to true", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.images.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "ImageParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "rawDisk": { - "description": "The parameters of the raw disk image.", - "properties": { - "containerType": { - "description": "The format used to encode and transmit the block device, which should beTAR. This is just a container and transmission format and not\na runtime format. Provided by the client when the disk image is created.", - "enum": [ - "TAR" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "sha1Checksum": { - "deprecated": true, - "description": "[Deprecated] This field is deprecated.\nAn optional SHA1 checksum of the disk image before unpackaging provided\nby the client when the disk image is created.", - "pattern": "[a-f0-9]{40}", - "type": "string" - }, - "source": { - "description": "The full Google Cloud Storage URL where the raw disk image archive is\nstored.\nThe following are valid formats for the URL:\n \n - https://storage.googleapis.com/bucket_name/image_archive_name\n - https://storage.googleapis.com/bucket_name/folder_name/image_archive_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - } - }, - "type": "object" - }, - "rolloutOverride": { - "$ref": "RolloutPolicy", - "description": "A rollout policy to apply to this image. When specified, the rollout policy\noverrides per-zone references to the image via the associated image family.\nThe rollout policy restricts the zones where this image is accessible when\nusing a zonal image family reference. When the rollout policy does not\ninclude the user specified zone, or if the zone is rolled out, this image\nis accessible.\n\nThe rollout policy for this image is read-only, except for allowlisted\nusers. This field might not be configured. To view the latest\nnon-deprecated image in a specific zone, use theimageFamilyViews.get method." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "shieldedInstanceInitialState": { - "$ref": "InitialStateConfig", - "description": "Set the secure boot keys of shielded instance." - }, - "sourceDisk": { - "description": "URL of the source disk used to create this image.\nFor example, the following are valid values:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "description": "[Output Only]\nThe ID value of the disk used to create this image. This value may be used\nto determine whether the image was taken from the current or a previous\ninstance of a given disk name.", - "type": "string" - }, - "sourceImage": { - "description": "URL of the source image used to create this image.\nThe following are valid formats for the URL:\n \n - https://www.googleapis.com/compute/v1/projects/project_id/global/\n images/image_name\n - projects/project_id/global/images/image_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the\nsource image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "description": "[Output Only]\nThe ID value of the image used to create this image. This value may be used\nto determine whether the image was taken from the current or a previous\ninstance of a given image name.", - "type": "string" - }, - "sourceSnapshot": { - "description": "URL of the source snapshot used to create this image.\nThe following are valid formats for the URL:\n \n - https://www.googleapis.com/compute/v1/projects/project_id/global/\n snapshots/snapshot_name\n - projects/project_id/global/snapshots/snapshot_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source snapshot. Required if\nthe source snapshot is protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "description": "[Output Only]\nThe ID value of the snapshot used to create this image. This value may be\nused to determine whether the snapshot was taken from the current or a\nprevious instance of a given snapshot name.", - "type": "string" - }, - "sourceType": { - "default": "RAW", - "description": "The type of the image used to create this disk. The\ndefault and only valid value is RAW.", - "enum": [ - "RAW" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the image. An image can be used to create other\nresources, such as instances, only after the image has been successfully\ncreated and the status is set to READY. Possible\nvalues are FAILED, PENDING, orREADY.", - "enum": [ - "DELETING", - "FAILED", - "PENDING", - "READY" - ], - "enumDescriptions": [ - "Image is deleting.", - "Image creation failed due to an error.", - "Image hasn't been created as yet.", - "Image has been successfully created." - ], - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the image (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLicenses": { - "description": "A list of publicly visible user-licenses. Unlike regular licenses, user\nprovided licenses can be modified after the disk is created. This includes\na list of URLs to the license resource. For example, to provide a debian\nlicense:\n\nhttps://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ImageFamilyView": { - "id": "ImageFamilyView", - "properties": { - "image": { - "$ref": "Image", - "description": "The latest image that is part of the specified image family in the\nrequested location, and that is not deprecated." - } - }, - "type": "object" - }, - "ImageList": { - "description": "Contains a list of images.", - "id": "ImageList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Image resources.", - "items": { - "$ref": "Image" - }, - "type": "array" - }, - "kind": { - "default": "compute#imageList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ImageParams": { - "description": "Additional image params.", - "id": "ImageParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the image. Tag keys and values have\nthe same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "InitialStateConfig": { - "description": "Initial State for shielded instance,\nthese are public keys which are safe to store in public", - "id": "InitialStateConfig", - "properties": { - "dbs": { - "description": "The Key Database (db).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "dbxs": { - "description": "The forbidden key database (dbx).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "keks": { - "description": "The Key Exchange Key (KEK).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "pk": { - "$ref": "FileContentBuffer", - "description": "The Platform Key (PK)." - } - }, - "type": "object" - }, - "Instance": { - "description": "Represents an Instance resource.\n\nAn instance is a virtual machine that is hosted on Google Cloud Platform.\nFor more information, readVirtual Machine Instances.", - "id": "Instance", - "properties": { - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Controls for advanced machine-related behavior features." - }, - "canIpForward": { - "description": "Allows this instance to send and receive packets with non-matching\ndestination or source IPs. This is required if you plan to use this\ninstance to forward routes. For more information, seeEnabling IP Forwarding.", - "type": "boolean" - }, - "confidentialInstanceConfig": { - "$ref": "ConfidentialInstanceConfig" - }, - "cpuPlatform": { - "description": "[Output Only] The CPU platform used by this instance.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "deletionProtection": { - "description": "Whether the resource should be protected against deletion.", - "type": "boolean" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "disks": { - "description": "Array of disks associated with this instance. Persistent disks must be\ncreated before you can assign them.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "displayDevice": { - "$ref": "DisplayDevice", - "description": "Enables display device for the instance." - }, - "eraseWindowsVssSignature": { - "description": "Specifies whether the disks restored from source snapshots or source\nmachine image should erase Windows specific VSS signature.", - "type": "boolean" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe instance's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update the instance. You must always provide an\nup-to-date fingerprint hash in order to update the instance.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "guestAccelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "hostname": { - "description": "Specifies the hostname of the instance. The specified hostname must be\nRFC1035 compliant. If hostname is not specified, the default hostname is\n[INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and\n[INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "identity": { - "deprecated": true, - "type": "string" - }, - "identityCertificate": { - "deprecated": true, - "type": "boolean" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts suspended data for an instance with acustomer-managed\nencryption key.\n\nIf you are creating a new instance, this field will encrypt the local SSD\nand in-memory contents of the instance during the suspend operation.\n\nIf you do not provide an encryption key when creating the instance, then\nthe local SSD and in-memory contents will be encrypted using\nan automatically generated key during the suspend operation." - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "kind": { - "default": "compute#instance", - "description": "[Output Only] Type of the resource. Always compute#instance\nfor instances.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for this request, which is essentially a hash of\nthe label's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this instance. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "lastStartTimestamp": { - "description": "[Output Only] Last start timestamp inRFC3339 text format.", - "type": "string" - }, - "lastStopTimestamp": { - "description": "[Output Only] Last stop timestamp inRFC3339 text format.", - "type": "string" - }, - "lastSuspendedTimestamp": { - "description": "[Output Only] Last suspended timestamp inRFC3339 text format.", - "type": "string" - }, - "machineType": { - "description": "Full or partial URL of the machine type resource to use for this instance,\nin the format:zones/zone/machineTypes/machine-type. This is provided by the client\nwhen the instance is created. For example, the following is a valid partial\nurl to a predefined\nmachine type:\n\nzones/us-central1-f/machineTypes/n1-standard-1\n\n\nTo create acustom\nmachine type, provide a URL to a machine type in the following format,\nwhere CPUS is 1 or an even number up to 32 (2,\n4, 6, ... 24, etc), and MEMORY is the total\nmemory for this instance. Memory must be a multiple of 256 MB and must\nbe supplied in MB (e.g. 5 GB of memory is 5120 MB):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY\n\n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120\nFor a full list of restrictions, read theSpecifications\nfor custom machine types.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs assigned\nto this instance. This includes metadata keys that were explicitly defined\nfor the instance." - }, - "minCpuPlatform": { - "description": "Specifies aminimum CPU\nplatform for the VM instance. Applicable values are the friendly names\nof CPU platforms, such as minCpuPlatform: \"Intel\nHaswell\" or minCpuPlatform: \"Intel Sandy\nBridge\".", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network configurations for this instance. These specify how\ninterfaces are configured to interact with other network services, such as\nconnecting to the internet. Multiple interfaces are supported\nper instance.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "networkPerformanceConfig": { - "$ref": "NetworkPerformanceConfig" - }, - "params": { - "$ref": "InstanceParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance. A map from a subdomain\n(namespace) to entries map.", - "type": "object" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "preservedStateSizeGb": { - "description": "Total amount of preserved state for SUSPENDED instances.\nRead-only in the api.", - "format": "int64", - "type": "string" - }, - "privateIpv6GoogleAccess": { - "description": "The private IPv6 google access type for the VM.\nIf not specified, use INHERIT_FROM_SUBNETWORK as default.", - "enum": [ - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", - "INHERIT_FROM_SUBNETWORK" - ], - "enumDescriptions": [ - "Bidirectional private IPv6 access to/from Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Outbound private IPv6 access from VMs in this subnet to Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Each network interface inherits PrivateIpv6GoogleAccess from its\nsubnetwork." - ], - "type": "string" - }, - "reservationAffinity": { - "$ref": "ReservationAffinity", - "description": "Specifies the reservations that this instance can consume from." - }, - "resourcePolicies": { - "description": "Resource policies applied to this instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "ResourceStatus", - "description": "[Output Only] Specifies values set for instance attributes as\ncompared to the values requested by user in the corresponding input only\nfield." - }, - "satisfiesPzi": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Sets the scheduling options for this instance." - }, - "secureTags": { - "description": "[Input Only] Secure tags to apply to this instance. These can be later\nmodified by the update method.\nMaximum number of secure tags allowed is 50.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serviceAccounts": { - "description": "A list of service accounts, with their specified scopes, authorized for\nthis instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed\nthrough the metadata server and used to authenticate applications on the\ninstance. SeeService Accounts\nfor more information.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "serviceIntegrationSpecs": { - "additionalProperties": { - "$ref": "ServiceIntegrationSpec" - }, - "description": "Mapping of user-defined keys to specifications for service integrations.\nCurrently only a single key-value pair is supported.", - "type": "object" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig" - }, - "shieldedInstanceIntegrityPolicy": { - "$ref": "ShieldedInstanceIntegrityPolicy" - }, - "shieldedVmConfig": { - "$ref": "ShieldedVmConfig", - "description": "Deprecating, please use shielded_instance_config." - }, - "shieldedVmIntegrityPolicy": { - "$ref": "ShieldedVmIntegrityPolicy", - "description": "Deprecating, please use shielded_instance_integrity_policy." - }, - "sourceMachineImage": { - "description": "Source machine image", - "type": "string" - }, - "sourceMachineImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Source machine image encryption key when creating an instance from a\nmachine image." - }, - "startRestricted": { - "description": "[Output Only] Whether a VM has been restricted for start because Compute\nEngine has detected suspicious activity.", - "type": "boolean" - }, - "status": { - "description": "[Output Only] The status of the instance. One of the\nfollowing values: PROVISIONING, STAGING,RUNNING, STOPPING, SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about the status of the\ninstance, see \nInstance life cycle.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - }, - "tags": { - "$ref": "Tags", - "description": "Tags to apply to this instance. Tags are used to identify valid\nsources or targets for network firewalls and are specified by the client\nduring instance creation. The tags can be later modified by the setTags\nmethod. Each tag within the list must comply withRFC1035.\nMultiple tags can be specified via the 'tags.items' field." - }, - "upcomingMaintenance": { - "$ref": "UpcomingMaintenance", - "description": "[Output Only] DEPRECATED: Please useresource_status.upcoming_maintenance instead. Specifies\nupcoming maintenance for the instance." - }, - "workloadIdentityConfig": { - "$ref": "WorkloadIdentityConfig" - }, - "zone": { - "description": "[Output Only] URL of the zone where the instance resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceAggregatedList": { - "id": "InstanceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstancesScopedList", - "description": "[Output Only] Name of the scope containing this set of instances." - }, - "description": "An object that contains a list of instances scoped by zone.", - "type": "object" - }, - "kind": { - "default": "compute#instanceAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#instanceAggregatedList for aggregated lists of\nInstance resources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceConsumptionData": { - "id": "InstanceConsumptionData", - "properties": { - "consumptionInfo": { - "$ref": "InstanceConsumptionInfo", - "description": "Resources consumed by the instance." - }, - "instance": { - "description": "Server-defined URL for the instance.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceConsumptionInfo": { - "id": "InstanceConsumptionInfo", - "properties": { - "guestCpus": { - "description": "The number of virtual CPUs that are available to the instance.", - "format": "int32", - "type": "integer" - }, - "localSsdGb": { - "description": "The amount of local SSD storage available to the instance,\ndefined in GiB.", - "format": "int32", - "type": "integer" - }, - "memoryMb": { - "description": "The amount of physical memory available to the instance,\ndefined in MiB.", - "format": "int32", - "type": "integer" - }, - "minNodeCpus": { - "description": "The minimal guaranteed number of virtual CPUs that are reserved.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceFlexibilityPolicy": { - "description": "A flexible specification of machine types for instances to create.", - "id": "InstanceFlexibilityPolicy", - "properties": { - "instanceSelections": { - "additionalProperties": { - "$ref": "InstanceFlexibilityPolicyInstanceSelection" - }, - "description": "Specification of alternative, flexible instance subsets.\nOne of them will be selected to create the instances\nbased on various criteria, like:\n- ranks,\n- location policy,\n- current capacity,\n- available reservations (you can specify affinity in\nInstanceProperties),\n- SWAN/GOOSE limitations.\nKey is an arbitrary, unique RFC1035 string that identifies the instance\nselection.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceFlexibilityPolicyInstanceSelection": { - "description": "Specification of machine type to use. Every position inside this message\nis an alternative.\nThe count specified in the shape flexibility must not exceed the number\nof entries in per_instance_properties or the capacity of the\nname_pattern, if used.", - "id": "InstanceFlexibilityPolicyInstanceSelection", - "properties": { - "disks": { - "description": "Disks to be attached to the instances created from in this selection.\nThey override the disks specified in the instance properties.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineTypes": { - "description": "Alternative machine types to use for instances that are created from\nthese properties. This field only accepts a machine type names, for\nexample `n2-standard-4` and not URLs or partial URLs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "rank": { - "description": "Rank when prioritizing the shape flexibilities.\nThe instance selections with rank are considered\nfirst, in the ascending order of the rank.\nIf not set, defaults to 0.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroup": { - "description": "Represents an Instance Group resource.\n\nInstance Groups can be used to configure a target forload\nbalancing.\n\nInstance groups can either be managed or unmanaged.\n\nTo create \nmanaged instance groups, use the instanceGroupManager orregionInstanceGroupManager resource instead.\n\nUse zonal unmanaged instance groups if you need to applyload\nbalancing to groups of heterogeneous instances or if you need to manage\nthe instances yourself. You cannot create regional unmanaged instance groups.\n\nFor more information, readInstance\ngroups.", - "id": "InstanceGroup", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this instance group inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the named ports. The system\nuses this fingerprint to detect conflicts when multiple users change the\nnamed ports concurrently.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this instance group, generated\nby the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instanceGroup", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroup for instance groups.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - }, - "description": "The name of the instance group. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namedPorts": { - "description": "Optional. Assigns a name to a port number. For example:{name: \"http\", port: 80}\n\nThis\nallows the system to reference ports by the assigned name instead of a\nport number. Named ports can also contain multiple ports. For example:[{name: \"app1\", port: 8080}, {name:\n\"app1\", port: 8081}, {name: \"app2\", port:\n8082}]\n\nNamed ports apply to all instances in this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "network": { - "description": "[Output Only] The URL of the network to which all instances in the\ninstance group belong. If your instance has multiple network interfaces,\nthen the network and subnetwork fields only refer to the\nnetwork and subnet used by your primary interface (nic0).", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the instance group is located (for regional resources).", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] The URL for this instance group. The server generates\nthis URL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "size": { - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32", - "type": "integer" - }, - "subnetwork": { - "description": "[Output Only] The URL of the subnetwork to which all instances in the\ninstance group belong. If your instance has multiple network interfaces,\nthen the network and subnetwork fields only refer to the\nnetwork and subnet used by your primary interface (nic0).", - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of thezone\nwhere the instance group is located (for zonal resources).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - }, - "description": "A list of InstanceGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceGroupAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupAggregatedList for aggregated lists of\ninstance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupList": { - "description": "A list of InstanceGroup resources.", - "id": "InstanceGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupList for instance group lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManager": { - "description": "Represents a Managed Instance Group resource.\n\nAn instance group is a collection of VM instances that you can manage as a\nsingle entity. For more information, readInstance groups.\n\nFor zonal Managed Instance Group, use the instanceGroupManagers\nresource.\n\nFor regional Managed Instance Group, use theregionInstanceGroupManagers resource.", - "id": "InstanceGroupManager", - "properties": { - "allInstancesConfig": { - "$ref": "InstanceGroupManagerAllInstancesConfig", - "description": "Specifies configuration that overrides the instance template configuration\nfor the group." - }, - "autoHealingPolicies": { - "description": "The autohealing policy for this managed instance group. You can specify\nonly one value.", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - }, - "baseInstanceName": { - "description": "The base instance name is a prefix that you want to attach to the names of\nall VMs in a MIG. The maximum character length is 58 and the name must\ncomply with RFC1035 format.\n\nWhen a VM is created in the group, the MIG appends a hyphen and a random\nfour-character string to the base instance name. If you want the MIG to\nassign sequential numbers instead of a random string, then end the base\ninstance name with a hyphen followed by one or more hash symbols. The hash\nsymbols indicate the number of digits. For example, a base instance name of\n\"vm-###\" results in \"vm-001\" as a VM name.\n@pattern\n[a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this managed instance group inRFC3339\ntext format.", - "type": "string" - }, - "currentActions": { - "$ref": "InstanceGroupManagerActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances\nin this managed instance group that are scheduled for each of those\nactions." - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "distributionPolicy": { - "$ref": "DistributionPolicy", - "description": "Policy specifying the intended distribution of managed instances across\nzones in a regional managed instance group." - }, - "failoverAction": { - "description": "The action to perform in case of zone failure. Only one value is supported,NO_FAILOVER. The default is NO_FAILOVER.", - "enum": [ - "NO_FAILOVER", - "UNKNOWN" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. This field may be used in optimistic locking.\nIt will be ignored when inserting an InstanceGroupManager. An up-to-date\nfingerprint must be provided in order to update the InstanceGroupManager,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an InstanceGroupManager.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "instanceFlexibilityPolicy": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicy", - "description": "Instance flexibility allowing MIG to create VMs from multiple\ntypes of machines.\nInstance flexibility configuration on MIG overrides instance\ntemplate configuration." - }, - "instanceGroup": { - "description": "[Output Only] The URL of the Instance Group resource.", - "type": "string" - }, - "instanceLifecyclePolicy": { - "$ref": "InstanceGroupManagerInstanceLifecyclePolicy", - "description": "The repair policy for this managed instance group." - }, - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create all new instances\nin the managed instance group. The templates for existing instances in the\ngroup do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "type": "string" - }, - "kind": { - "default": "compute#instanceGroupManager", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManager for managed instance groups.", - "type": "string" - }, - "listManagedInstancesResults": { - "description": "Pagination behavior of the listManagedInstances API method for\nthis managed instance group.", - "enum": [ - "PAGELESS", - "PAGINATED" - ], - "enumDescriptions": [ - "(Default) Pagination is disabled for the group'slistManagedInstances API method. maxResults\nand pageToken query parameters are ignored and all\ninstances are returned in a single response.", - "Pagination is enabled for the group's listManagedInstances\nAPI method. maxResults and pageToken query\nparameters are respected." - ], - "type": "string" - }, - "multiMig": { - "description": "URL to the multi-MIG that this Managed Instance Group belongs to.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - }, - "description": "The name of the managed instance group. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namedPorts": { - "description": "[Output Only] Named ports configured on the Instance Groups complementary\nto this Instance Group Manager.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "params": { - "$ref": "InstanceGroupManagerParams", - "description": "Input only. Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the managed instance group resides (for regional resources).", - "type": "string" - }, - "resourcePolicies": { - "$ref": "InstanceGroupManagerResourcePolicies", - "description": "Resource policies for this managed instance group." - }, - "satisfiesPzi": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] The URL for this managed instance group. The server defines\nthis URL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serviceAccount": { - "description": "The service account to be used as credentials for all operations performed\nby the managed instance group on instances. The service accounts needs all\npermissions required to create and delete instances.\nBy default, the service account\n{projectNumber}@cloudservices.gserviceaccount.com is used.", - "type": "string" - }, - "standbyPolicy": { - "$ref": "InstanceGroupManagerStandbyPolicy", - "description": "Standby policy for stopped and suspended instances." - }, - "statefulPolicy": { - "$ref": "StatefulPolicy", - "description": "Stateful configuration for this Instanced Group Manager" - }, - "status": { - "$ref": "InstanceGroupManagerStatus", - "description": "[Output Only] The status of this managed instance group." - }, - "targetPools": { - "description": "The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically\napply to all of the instances in the managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetSize": { - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - }, - "description": "The target number of running instances for this managed instance group.\nYou can reduce this number by using the instanceGroupManager\ndeleteInstances or abandonInstances methods. Resizing the group also\nchanges this number.", - "format": "int32", - "type": "integer" - }, - "targetSizePolicy": { - "$ref": "InstanceGroupManagerTargetSizePolicy", - "description": "The policy that specifies how the MIG creates its VMs to achieve the target\nsize." - }, - "targetSizeUnit": { - "description": "The unit of measure for the target size.", - "enum": [ - "INSTANCE", - "VCPU" - ], - "enumDescriptions": [ - "[Default] TargetSize is the target number of instances.", - "TargetSize is the target count of vCPUs of VMs." - ], - "type": "string" - }, - "targetStoppedSize": { - "description": "The target number of stopped instances for this managed instance group.\nThis number changes when you: \n \n - Stop instance using the stopInstances\n method or start instances using the startInstances\n method.\n - Manually change the targetStoppedSize using the update\n method.", - "format": "int32", - "type": "integer" - }, - "targetSuspendedSize": { - "description": "The target number of suspended instances for this managed instance group.\nThis number changes when you: \n \n - Suspend instance using the suspendInstances\n method or resume instances using the resumeInstances\n method.\n - Manually change the targetSuspendedSize using the update\n method.", - "format": "int32", - "type": "integer" - }, - "updatePolicy": { - "$ref": "InstanceGroupManagerUpdatePolicy", - "description": "The update policy for this managed instance group." - }, - "versions": { - "description": "Specifies the instance templates used by this managed instance group to\ncreate instances.\n\nEach version is defined by an instanceTemplate and aname. Every version can appear at most once per instance\ngroup. This field overrides the top-level instanceTemplate\nfield. Read more about therelationships\nbetween these fields. Exactly one version must leave thetargetSize field unset. That version will be applied to all\nremaining instances. For more information, read aboutcanary\nupdates.", - "items": { - "$ref": "InstanceGroupManagerVersion" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of azone\nwhere the managed instance group is located (for zonal resources).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerActionsSummary": { - "id": "InstanceGroupManagerActionsSummary", - "properties": { - "abandoning": { - "description": "[Output Only] The total number of instances in the managed instance group\nthat are scheduled to be abandoned. Abandoning an instance removes it\nfrom the managed instance group without deleting it.", - "format": "int32", - "type": "integer" - }, - "creating": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be created or are currently being created. If the group\nfails to create any of these instances, it tries again until it creates\nthe instance successfully.\n\nIf you have disabled creation retries, this field will not be populated;\ninstead, the creatingWithoutRetries field will be populated.", - "format": "int32", - "type": "integer" - }, - "creatingAtomically": { - "description": "[Output Only] The number of instances that the managed instance group\nwill attempt to create atomically, in a batch mode. If the desired count\nof instances can not be created, entire batch will be deleted and the\ngroup will decrease its targetSize value accordingly.", - "format": "int32", - "type": "integer" - }, - "creatingWithoutRetries": { - "description": "[Output Only] The number of instances that the managed instance group\nwill attempt to create. The group attempts to create each instance\nonly once. If the group fails to create any of these instances, it\ndecreases the group's targetSize value accordingly.", - "format": "int32", - "type": "integer" - }, - "deleting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be deleted or are currently being deleted.", - "format": "int32", - "type": "integer" - }, - "none": { - "description": "[Output Only] The number of instances in the managed instance group that\nare running and have no scheduled actions.", - "format": "int32", - "type": "integer" - }, - "queuing": { - "description": "[Output Only] The number of instances that the managed instance group\nis currently queuing.", - "format": "int32", - "type": "integer" - }, - "recreating": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be recreated or are currently being being recreated.\nRecreating an instance deletes the existing root persistent disk\nand creates a new disk from the image that is defined in the\ninstance template.", - "format": "int32", - "type": "integer" - }, - "refreshing": { - "description": "[Output Only] The number of instances in the managed instance group that\nare being reconfigured with properties that do not require a restart\nor a recreate action. For example, setting or removing target\npools for the instance.", - "format": "int32", - "type": "integer" - }, - "restarting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be restarted or are currently being restarted.", - "format": "int32", - "type": "integer" - }, - "resuming": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be resumed or are currently being resumed.", - "format": "int32", - "type": "integer" - }, - "starting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be started or are currently being started.", - "format": "int32", - "type": "integer" - }, - "stopping": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be stopped or are currently being stopped.", - "format": "int32", - "type": "integer" - }, - "suspending": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be suspended or are currently being suspended.", - "format": "int32", - "type": "integer" - }, - "verifying": { - "description": "[Output Only] The number of instances in the managed instance group that\nare being verified. See the managedInstances[].currentAction\nproperty in the listManagedInstances method documentation.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerAggregatedList": { - "id": "InstanceGroupManagerAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceGroupManagersScopedList", - "description": "[Output Only] The name of the scope that contains this set of managed\ninstance groups." - }, - "description": "A list of InstanceGroupManagersScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceGroupManagerAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManagerAggregatedList for an aggregated\nlist of managed instance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerAllInstancesConfig": { - "id": "InstanceGroupManagerAllInstancesConfig", - "properties": { - "properties": { - "$ref": "InstancePropertiesPatch", - "description": "Properties to set on all instances in the group.\n\nYou can add or modify properties using theinstanceGroupManagers.patch orregionInstanceGroupManagers.patch. After settingallInstancesConfig on the group, you must update the group's\ninstances to apply the configuration. To apply the configuration, set the\ngroup's updatePolicy.type field to use proactive updates or\nuse the applyUpdatesToInstances method." - } - }, - "type": "object" - }, - "InstanceGroupManagerAutoHealingPolicy": { - "id": "InstanceGroupManagerAutoHealingPolicy", - "properties": { - "autoHealingTriggers": { - "$ref": "InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers", - "description": "Restricts what triggers autohealing." - }, - "healthCheck": { - "description": "The URL for the health check that signals autohealing.", - "type": "string" - }, - "initialDelaySec": { - "description": "The initial delay is the number of seconds that a new VM takes to\ninitialize and run its startup script. During a VM's initial delay\nperiod, the MIG ignores unsuccessful health checks because the VM might\nbe in the startup process. This prevents the MIG from prematurely\nrecreating a VM. If the health check receives a healthy response during\nthe initial delay, it indicates that the startup process is complete and\nthe VM is ready. The value of initial delay must be between 0 and 3600\nseconds. The default value is 0.", - "format": "int32", - "type": "integer" - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "Maximum number of instances that can be unavailable when autohealing.\nWhen 'percent' is used, the value is rounded if necessary.\nThe instance is considered available if all of the following conditions\nare satisfied:\n 1. Instance's status is RUNNING.\n 2. Instance's currentAction is NONE (in particular its liveness health\n check result was observed to be HEALTHY at least once as it passed\n VERIFYING).\n 3. There is no outgoing action on an instance triggered by IGM.\n\nBy default, number of concurrently autohealed instances is smaller than\nthe managed instance group target size. However, if a zonal managed\ninstance group has only one instance, or a regional managed instance\ngroup has only one instance per zone, autohealing will recreate these\ninstances when they become unhealthy." - } - }, - "type": "object" - }, - "InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers": { - "id": "InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers", - "properties": { - "onHealthCheck": { - "description": "If you have configured an application-based health check for the group,\nthis field controls whether to trigger VM autohealing based on a failed\nhealth check. Valid values are: \n \n - ON (default): The group recreates running VMs that\n fail the application-based health check.\n - OFF: When set to OFF, you can still observe instance\n health state, but the group does not recreate VMs that fail the\n application-based health check. This is useful for troubleshooting and\n setting up your health check configuration.", - "enum": [ - "OFF", - "ON" - ], - "enumDescriptions": [ - "When set to OFF, you can still observe instance health state, but the\ngroup does not recreate VMs that fail the application-based health\ncheck. This is useful for troubleshooting and setting up your health\ncheck configuration.", - "(Default) The group recreates running VMs that fail the group's\napplication-based health check." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicy": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicy", - "properties": { - "instanceSelectionLists": { - "additionalProperties": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection" - }, - "description": "Named instance selections configuring properties that the group will use\nwhen creating new VMs.", - "type": "object" - }, - "instanceSelections": { - "additionalProperties": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection" - }, - "description": "Named instance selections configuring properties that the group will use\nwhen creating new VMs.", - "type": "object" - }, - "provisioningModelMix": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", - "description": "Provisioning model configuration used by this managed instance group to\ncreate instances." - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection", - "properties": { - "disks": { - "description": "List of disks to be attached to the instances created from this\nselection.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineTypes": { - "description": "Full machine-type names, e.g. \"n1-standard-16\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "minCpuPlatform": { - "description": "Name of the minimum CPU platform to be used by this instance selection.\ne.g. 'Intel Ice Lake'.", - "type": "string" - }, - "rank": { - "description": "Preference of this instance selection. Lower number means higher\npreference. MIG will first try to create a VM based on the machine-type\nwith lowest rank and fallback to next rank based on availability.\nMachine types and instance selections with the same rank have the same\npreference.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", - "properties": { - "standardCapacityBase": { - "description": "The base capacity that will always use Standard VMs to avoid risk of\nmore preemption than the minimum capacity user needs. MIG will create\nonly Standard VMs until it reaches standard_capacity_base and only\nthen will start using standard_capacity_percent_above_base to mix Spot\nwith Standard VMs.", - "format": "int32", - "type": "integer" - }, - "standardCapacityPercentAboveBase": { - "description": "The percentage of target capacity that should use Standard VM. The\nremaining percentage will use Spot VMs. The percentage applies only to\nthe capacity above standard_capacity_base.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceLifecyclePolicy": { - "id": "InstanceGroupManagerInstanceLifecyclePolicy", - "properties": { - "defaultActionOnFailure": { - "description": "The action that a MIG performs on a failed VM. If the value of the onFailedHealthCheck field\nis `DEFAULT_ACTION`, then the same action also applies to the VMs on which your application\nfails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed\nVM by recreating it. For more information, see about repairing VMs in a MIG. - DO_NOTHING: MIG\ndoes not repair a failed VM.", - "enum": [ - "DELETE", - "DO_NOTHING", - "REPAIR" - ], - "enumDescriptions": [ - "MIG deletes a failed or an unhealthy VM. Deleting the VM decreases\nthe target size of the MIG.", - "MIG does not repair a failed VM.", - "(default): MIG automatically repairs a failed VM by recreating it. For more information,\nsee about repairing VMs in a MIG." - ], - "type": "string" - }, - "forceUpdateOnRepair": { - "description": "A bit indicating whether to forcefully apply the group's latest\nconfiguration when repairing a VM. Valid options are:\n\n \n \n - NO (default): If configuration updates are available, they are not\n forcefully applied during repair. Instead, configuration updates are\n applied according to the group's update policy.\n \n - YES: If configuration updates are available, they are applied\n during repair.", - "enum": [ - "NO", - "YES" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "metadataBasedReadinessSignal": { - "$ref": "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal", - "deprecated": true, - "description": "The configuration for metadata based readiness signal sent by the\ninstance during initialization when stopping / suspending an instance.\nThe Instance Group Manager will wait for a signal that indicates\nsuccessful initialization before stopping / suspending an instance.\n\nIf a successful readiness signal is not sent before timeout, the\ncorresponding instance will not be stopped / suspended. Instead,\nan error will be visible in the lastAttempt.errors field of\nthe managed instance in the listmanagedinstances\nmethod.\n\nIf metadataBasedReadinessSignal.timeoutSec is unset,\nthe Instance Group Manager will directly proceed to suspend / stop\ninstances, skipping initialization on them." - }, - "onFailedHealthCheck": { - "description": "The action that a MIG performs on an unhealthy VM. A VM is marked as\nunhealthy when the application running on that VM fails a health check.\nValid values are:\n \n - DEFAULT_ACTION (default): MIG uses the same action\n configured for instanceLifecyclePolicy.defaultActionOnFailure field.\n - REPAIR: MIG automatically repairs an unhealthy VM by\n recreating it.\n - DO_NOTHING: MIG doesn't repair an unhealthy VM.\n For more information, see \n About repairing VMs in a MIG.", - "enum": [ - "DEFAULT_ACTION", - "DO_NOTHING", - "REPAIR" - ], - "enumDescriptions": [ - "(Default) MIG uses the same action configured for\ninstanceLifecyclePolicy.defaultActionOnFailure field.", - "MIG doesn't repair an unhealthy VM.", - "MIG automatically repairs an unhealthy VM by recreating it." - ], - "type": "string" - }, - "onRepair": { - "$ref": "InstanceGroupManagerInstanceLifecyclePolicyOnRepair", - "description": "Configuration for VM repairs in the MIG." - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal": { - "deprecated": true, - "id": "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal", - "properties": { - "timeoutSec": { - "description": "The number of seconds to wait for a readiness signal during\ninitialization before timing out.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceLifecyclePolicyOnRepair": { - "description": "Configuration for VM repairs in the MIG.", - "id": "InstanceGroupManagerInstanceLifecyclePolicyOnRepair", - "properties": { - "allowChangingZone": { - "description": "Specifies whether the MIG can change a VM's zone during a repair.\nValid values are:\n \n - NO (default): MIG cannot change a VM's zone during a\n repair.\n - YES: MIG can select a different zone for the VM during\n a repair.", - "enum": [ - "NO", - "YES" - ], - "enumDescriptions": [ - "[Default] MIG cannot change a VM's zone during a repair.", - "MIG can select a different zone for the VM during a repair." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerList": { - "description": "[Output Only] A list of managed instance groups.", - "id": "InstanceGroupManagerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerList", - "description": "[Output Only] The resource type, which is always\ncompute#instanceGroupManagerList for a list of managed instance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerParams": { - "description": "Input only additional params for instance group manager creation.", - "id": "InstanceGroupManagerParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to bind to the managed instance group. The tags are\nkey-value pairs. Keys must be in the format tagKeys/123 and values in the\nformat tagValues/456. For more information, seeManage tags\nfor resources.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequest": { - "description": "InstanceGroupManagerResizeRequest represents a request to create\na number of VMs: either immediately or by queuing the request for the\nspecified time. This resize request is nested under InstanceGroupManager\nand the VMs created by this request are added to the owning\nInstanceGroupManager.", - "id": "InstanceGroupManagerResizeRequest", - "properties": { - "count": { - "deprecated": true, - "description": "This field is deprecated, please use resize_by instead.\nThe count of instances to create as part of this resize request.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this resize request inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "instances": { - "description": "The names of instances to be created by this resize request. The number of\nnames specified determines the number of instances to create. The group's\ntarget size will be increased by this number. This field cannot be used\ntogether with 'resize_by'.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerResizeRequest", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManagerResizeRequest for\nresize requests.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroupManagerResizeRequests.insert" - ] - }, - "description": "The name of this resize request. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "queuingPolicy": { - "$ref": "QueuingPolicy", - "deprecated": true, - "description": "This field is deprecated, ResizeRequests would not be provisioned\nimmediately and would stay in the queue until explicitly cancelled. When\nset, defines queing parameters for the requested deferred capacity. When\nunset, the request starts provisioning immediately, or fails if immediate\nprovisioning is not possible." - }, - "region": { - "description": "[Output Only] The URL of aregion\nwhere the resize request is located. Populated only for regional resize\nrequests.", - "type": "string" - }, - "requestedRunDuration": { - "$ref": "Duration", - "description": "Requested run duration for instances that will be created by this request.\nAt the end of the run duration instance will be deleted." - }, - "resizeBy": { - "description": "The number of instances to be created by this resize request. The group's\ntarget size will be increased by this number. This field cannot be used\ntogether with 'instances'.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] The URL for this resize request. The server defines\nthis URL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "state": { - "description": "[Output only] Current state of the request.", - "enum": [ - "ACCEPTED", - "CANCELLED", - "CREATING", - "DELETING", - "FAILED", - "PROVISIONING", - "STATE_UNSPECIFIED", - "SUCCEEDED" - ], - "enumDeprecated": [ - false, - false, - false, - true, - false, - true, - false, - false - ], - "enumDescriptions": [ - "The request was created successfully and was accepted for provisioning\nwhen the capacity becomes available.", - "The request is cancelled.", - "Resize request is being created and may still fail creation.", - "The value is deprecated. ResizeRequests would not change state while\nbeing deleted.\nThe request is being deleted.", - "The request failed before or during provisioning. If the request fails\nduring provisioning, any VMs that were created during provisioning are\nrolled back and removed from the MIG.", - "The value is deprecated. ResizeRequests would stay in the ACCEPTED state\nduring provisioning attempts.\nThe target resource(s) are being provisioned.", - "Default value. This value should never be returned.", - "The request succeeded." - ], - "type": "string" - }, - "status": { - "$ref": "InstanceGroupManagerResizeRequestStatus", - "description": "[Output only] Status of the request." - }, - "zone": { - "description": "[Output Only] The URL of azone\nwhere the resize request is located. Populated only for zonal resize\nrequests.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestStatus": { - "id": "InstanceGroupManagerResizeRequestStatus", - "properties": { - "error": { - "description": "[Output only] Fatal errors encountered during the queueing or\nprovisioning phases of the ResizeRequest that caused the transition to\nthe FAILED state. Contrary to the last_attempt errors, this field is\nfinal and errors are never removed from here, as the ResizeRequest is not\ngoing to retry.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "lastAttempt": { - "$ref": "InstanceGroupManagerResizeRequestStatusLastAttempt", - "description": "[Output only] Information about the last attempt to fulfill the request.\nThe value is temporary since the ResizeRequest can retry, as long as it's\nstill active and the last attempt value can either be cleared or replaced\nwith a different error. Since ResizeRequest retries infrequently, the\nvalue may be stale and no longer show an active problem. The value is\ncleared when ResizeRequest transitions to the final state (becomes\ninactive). If the final state is FAILED the error describing it will be\nstorred in the \"error\" field only." - }, - "queuingPolicy": { - "$ref": "QueuingPolicy", - "deprecated": true, - "description": "This field is deprecated, setting queueing policy is no longer supported.\nConstraints for the time when the instances start provisioning. Always\nexposed as absolute time." - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestStatusLastAttempt": { - "id": "InstanceGroupManagerResizeRequestStatusLastAttempt", - "properties": { - "error": { - "description": "Errors that prevented the ResizeRequest to be fulfilled.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestsListResponse": { - "description": "[Output Only] A list of resize requests.", - "id": "InstanceGroupManagerResizeRequestsListResponse", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of resize request resources.", - "items": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerResizeRequestList", - "description": "[Output Only] Type of the resource. Alwayscompute#instanceGroupManagerResizeRequestList for\na list of resize requests.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResourcePolicies": { - "id": "InstanceGroupManagerResourcePolicies", - "properties": { - "workloadPolicy": { - "description": "The URL of the workload policy that is specified for this managed\ninstance group.\nIt can be a full or partial URL. For example, the following are\nall valid URLs to a workload policy: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n - projects/project/regions/region/resourcePolicies/resourcePolicy\n - regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStandbyPolicy": { - "id": "InstanceGroupManagerStandbyPolicy", - "properties": { - "initialDelaySec": { - "description": "Specifies the number of seconds that the MIG should wait to suspend or\nstop a VM after that VM was created. The initial delay gives the\ninitialization script the time to prepare your VM for a quick scale out.\nThe value of initial delay must be between 0 and 3600 seconds. The\ndefault value is 0.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "Defines how a MIG resumes or starts VMs from a standby pool when the\ngroup scales out. The default mode is `MANUAL`.", - "enum": [ - "MANUAL", - "SCALE_OUT_POOL" - ], - "enumDescriptions": [ - "MIG does not automatically resume or start VMs in the standby pool when\nthe group scales out.", - "MIG automatically resumes or starts VMs in the standby pool when the\ngroup scales out, and replenishes the standby pool afterwards." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatus": { - "id": "InstanceGroupManagerStatus", - "properties": { - "allInstancesConfig": { - "$ref": "InstanceGroupManagerStatusAllInstancesConfig", - "description": "[Output only] Status of all-instances configuration on the group." - }, - "autoscaler": { - "description": "[Output Only] The URL of theAutoscaler\nthat targets this instance group manager.", - "type": "string" - }, - "bulkInstanceOperation": { - "$ref": "InstanceGroupManagerStatusBulkInstanceOperation", - "description": "[Output Only] The status of bulk instance operation." - }, - "isStable": { - "description": "[Output Only] A bit indicating whether the managed instance group is in a\nstable state. A stable state means that: none of the instances in the\nmanaged instance group is currently undergoing any type of change (for\nexample, creation, restart, or deletion); no future changes are scheduled\nfor instances in the managed instance group; and the managed instance\ngroup itself is not being modified.", - "type": "boolean" - }, - "stateful": { - "$ref": "InstanceGroupManagerStatusStateful", - "description": "[Output Only] Stateful status of the given Instance Group Manager." - }, - "versionTarget": { - "$ref": "InstanceGroupManagerStatusVersionTarget", - "description": "[Output Only] A status of consistency of Instances' versions with their\ntarget version specified by version field on Instance Group\nManager." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusAllInstancesConfig": { - "id": "InstanceGroupManagerStatusAllInstancesConfig", - "properties": { - "currentRevision": { - "description": "[Output Only] Current all-instances configuration revision.\nThis value is in RFC3339 text format.", - "type": "string" - }, - "effective": { - "description": "[Output Only] A bit indicating whether this configuration has\nbeen applied to all managed instances in the group.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusBulkInstanceOperation": { - "description": "Bulk instance operation is the creation of VMs in a MIG when the\ntargetSizePolicy.mode is set to BULK.", - "id": "InstanceGroupManagerStatusBulkInstanceOperation", - "properties": { - "inProgress": { - "description": "[Output Only] Informs whether bulk instance operation is in progress.", - "type": "boolean" - }, - "lastProgressCheck": { - "$ref": "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", - "description": "[Output Only] Information from the last progress check of bulk instance\noperation." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck": { - "id": "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", - "properties": { - "error": { - "description": "[Output Only] Errors encountered during bulk instance operation.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Timestamp of the last progress check of bulk instance\noperation. Timestamp is in RFC3339 text format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusStateful": { - "id": "InstanceGroupManagerStatusStateful", - "properties": { - "hasStatefulConfig": { - "description": "[Output Only] A bit indicating whether the managed instance group\nhas stateful configuration, that is, if you have configured any items\nin a stateful policy or in per-instance configs.\nThe group might report that it has no stateful configuration even when\nthere is still some preserved state on a managed instance, for example,\nif you have deleted all PICs but not yet applied those deletions.", - "type": "boolean" - }, - "isStateful": { - "deprecated": true, - "description": "[Output Only] A bit indicating whether the managed instance group\nhas stateful configuration, that is, if you have configured any items\nin a stateful policy or in per-instance configs.\nThe group might report that it has no stateful configuration even when\nthere is still some preserved state on a managed instance, for example,\nif you have deleted all PICs but not yet applied those deletions. This\nfield is deprecated in favor of has_stateful_config.", - "type": "boolean" - }, - "perInstanceConfigs": { - "$ref": "InstanceGroupManagerStatusStatefulPerInstanceConfigs", - "description": "[Output Only] Status of per-instance configurations on the instances." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusStatefulPerInstanceConfigs": { - "id": "InstanceGroupManagerStatusStatefulPerInstanceConfigs", - "properties": { - "allEffective": { - "description": "A bit indicating if all of the group's per-instance configurations\n(listed in the output of a listPerInstanceConfigs API call) have\nstatus EFFECTIVE or there are no per-instance-configs.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusVersionTarget": { - "id": "InstanceGroupManagerStatusVersionTarget", - "properties": { - "isReached": { - "description": "[Output Only] A bit indicating whether version target has been reached\nin this managed instance group, i.e. all instances are in their target\nversion. Instances' target version are specified byversion field on Instance Group Manager.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerTargetSizePolicy": { - "id": "InstanceGroupManagerTargetSizePolicy", - "properties": { - "mode": { - "description": "The mode of target size policy based on which the MIG creates its VMs\nindividually or all at once.", - "enum": [ - "BULK", - "INDIVIDUAL", - "UNSPECIFIED_MODE" - ], - "enumDescriptions": [ - "The mode in which the MIG creates VMs all at once. In this mode, if the\nMIG is unable to create even one VM, the MIG waits until all VMs can be\ncreated at the same time.", - "The mode in which the MIG creates VMs individually. In this mode, if\nthe MIG is unable to create a VM, the MIG will continue to create the\nother VMs in the group. This is the default mode.", - "If mode is unspecified, MIG will behave as in the default `INDIVIDUAL`\nmode." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerUpdatePolicy": { - "id": "InstanceGroupManagerUpdatePolicy", - "properties": { - "instanceRedistributionType": { - "description": "The \ninstance redistribution policy for regional managed instance groups.\nValid values are: \n \n - PROACTIVE (default): The group attempts to maintain an\n even distribution of VM instances across zones in the region.\n - NONE: For non-autoscaled groups, proactive\n redistribution is disabled.", - "enum": [ - "NONE", - "PROACTIVE" - ], - "enumDescriptions": [ - "No action is being proactively performed in order to bring this IGM\nto its target instance distribution.", - "This IGM will actively converge to its target instance distribution." - ], - "type": "string" - }, - "maxSurge": { - "$ref": "FixedOrPercent", - "description": "The maximum number of instances that can be created above the specifiedtargetSize during the update process. This value can be\neither a fixed number or, if the group has 10 or more instances, a\npercentage. If you set a percentage, the number of instances is rounded\nif necessary. The default value for maxSurge is a fixed\nvalue equal to the number of zones in which the managed instance group\noperates.\n\nAt least one of either maxSurge ormaxUnavailable must be greater than 0. Learn more about maxSurge." - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "The maximum number of instances that can be unavailable during the update\nprocess. An instance is considered available if all of the following\nconditions are satisfied:\n\n \n \n - The instance's status is\n RUNNING. \n - If there is a health\n check on the instance group, the instance's health check status\n must be HEALTHY at least once. If there is no health check\n on the group, then the instance only needs to have a status of\n RUNNING to be considered available.\n\n\nThis value can be either a fixed number or, if the group has 10 or more\ninstances, a percentage. If you set a percentage, the number of instances\nis rounded if necessary. The default value formaxUnavailable is a fixed value equal to the number of zones\nin which the managed instance group operates.\n\nAt least one of either maxSurge ormaxUnavailable must be greater than 0. Learn more about maxUnavailable." - }, - "minReadySec": { - "description": "Minimum number of seconds to wait for after a newly created instance\nbecomes available. This value must be from range [0, 3600].", - "format": "int32", - "type": "integer" - }, - "minimalAction": { - "description": "Minimal action to be taken on an instance. Use this option to minimize\ndisruption as much as possible or to apply a more disruptive action than\nis necessary.\n \n - To limit disruption as much as possible, set the minimal action toREFRESH. If your update requires a more disruptive action,\n Compute Engine performs the necessary action to execute the update.\n - To apply a more disruptive action than is strictly necessary, set the\n minimal action to RESTART or REPLACE. For\n example, Compute Engine does not need to restart a VM to change its\n metadata. But if your application reads instance metadata only when a VM\n is restarted, you can set the minimal action to RESTART in\n order to pick up metadata changes.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "Most disruptive action that is allowed to be taken on an instance.\nYou can specify either NONE to forbid any actions,REFRESH to avoid restarting the VM and to limit disruption\nas much as possible. RESTART to allow actions that can be\napplied without instance replacing or REPLACE to allow all\npossible actions. If the Updater determines that the minimal update\naction needed is more disruptive than most disruptive allowed action you\nspecify it will not perform the update at all.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "replacementMethod": { - "description": "What action should be used to replace instances.\nSee minimal_action.REPLACE", - "enum": [ - "RECREATE", - "SUBSTITUTE" - ], - "enumDescriptions": [ - "Instances will be recreated (with the same name)", - "Default option: instances will be deleted and created (with a new name)" - ], - "type": "string" - }, - "type": { - "description": "The type\nof update process. You can specify either PROACTIVE so\nthat the MIG automatically updates VMs to the latest configurations orOPPORTUNISTIC so that you can select the VMs that you want\nto update.", - "enum": [ - "OPPORTUNISTIC", - "PROACTIVE" - ], - "enumDescriptions": [ - "MIG will apply new configurations\nto existing VMs only when you selectively target specific or all VMs to\nbe updated.", - "MIG will automatically apply new configurations\nto all or a subset of existing VMs and also to new VMs that are added\nto the group." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerVersion": { - "id": "InstanceGroupManagerVersion", - "properties": { - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create new instances in\nthe managed instance group until the `targetSize` for this version is\nreached. The templates for existing instances in the group do not change\nunless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE; in those cases,\nexisting instances are updated until the `targetSize` for this version is\nreached.", - "type": "string" - }, - "name": { - "description": "Name of the version. Unique among all versions in the scope of this\nmanaged instance group.", - "type": "string" - }, - "tag": { - "description": "Tag describing the version. Used to trigger rollout of a target version\neven if instance_template remains unchanged.\nDeprecated in favor of 'name'.", - "type": "string" - }, - "targetSize": { - "$ref": "FixedOrPercent", - "description": "Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created\nfrom the template will be equal to:\n \n \n - If expressed as a fixed number, the minimum of either\n targetSize.fixed or\n instanceGroupManager.targetSize is used.\n - if expressed as a percent, the targetSize\n would be (targetSize.percent/100 *\n InstanceGroupManager.targetSize) If there is a remainder, the\n number is rounded.\n \n If unset, this version will update any remaining instances not\nupdated by another version. ReadStarting\na canary update for more information." - } - }, - "type": "object" - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to abandon. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersApplyUpdatesRequest": { - "description": "InstanceGroupManagers.applyUpdatesToInstances", - "id": "InstanceGroupManagersApplyUpdatesRequest", - "properties": { - "allInstances": { - "description": "Flag to update all instances instead of specified list of “instances”.\nIf the flag is set to true then the instances may not be specified\nin the request.", - "type": "boolean" - }, - "instances": { - "description": "The list of URLs of one or more instances for which you want to apply\nupdates. Each URL can be a full URL or a partial URL, such aszones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "maximalAction": { - "description": "The maximal action that should be performed on the instances.\nBy default REPLACE.\nThis field is deprecated, please use most_disruptive_allowed_action.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "minimalAction": { - "description": "The minimal action that you want to perform on each instance during the\nupdate:\n \n \n - REPLACE: At minimum, delete the instance and create it\n again. \n - RESTART: Stop the instance and start it\n again. \n - REFRESH: Do not stop the instance and limit\n disruption as much as possible. \n - NONE: Do not\n disrupt the instance at all.\n\n\nBy default, the minimum action is NONE. If your update\nrequires a more disruptive action than you set with this flag, the\nnecessary action is performed to execute the update.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that you want to perform on each instance during\nthe update:\n \n \n - REPLACE: Delete the instance and create it again.\n - RESTART: Stop the instance and start it again.\n - REFRESH: Do not stop the instance and limit disruption\n as much as possible. \n - NONE: Do not disrupt the\n instance at all.\n\n\nBy default, the most disruptive allowed action is REPLACE. If\nyour update requires a more disruptive action than you set with this flag,\nthe update request will fail.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersCreateInstancesRequest": { - "description": "InstanceGroupManagers.createInstances", - "id": "InstanceGroupManagersCreateInstancesRequest", - "properties": { - "instances": { - "description": "[Required] List of specifications of per-instance configs.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "properties": { - "instanceNames": { - "description": "The list of instance names to delete. Queued instances do not have URL and\ncan be deleted only by name. You cannot specify both URLs and names in a\nsingle request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "instances": { - "description": "The URLs of one or more instances to delete. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].\nQueued instances do not have URL and can be deleted only by name.\nOne cannot specify both URLs and names in a single request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "skipInstancesOnValidationError": { - "description": "Specifies whether the request should proceed despite the inclusion of\ninstances that are not members of the group or that are already in the\nprocess of being deleted or abandoned. If this field is set to `false` and\nsuch an instance is specified in the request, the operation fails. The\noperation always fails if the request contains a malformed instance URL or\na reference to an instance that exists in a zone or region other than the\ngroup's zone or region.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagersDeletePerInstanceConfigsReq": { - "description": "InstanceGroupManagers.deletePerInstanceConfigs", - "id": "InstanceGroupManagersDeletePerInstanceConfigsReq", - "properties": { - "names": { - "description": "The list of instance names for which we want to delete per-instance configs\non this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse": { - "id": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", - "properties": { - "acceleratorTopologiesInfo": { - "additionalProperties": { - "$ref": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo" - }, - "description": "The accelerator topology information returned per id of the topology\nlocation.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo": { - "id": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", - "properties": { - "acceleratorTopology": { - "description": "Topology in the format of: \"16x16\", \"4x4x4\", etc.", - "type": "string" - }, - "acceleratorTopologyHealth": { - "enum": [ - "DEGRADED", - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "All VM are in RUNNING state, but there is an issue with\nthe inter-chip connectivity that makes this part\nof the infrastructure ready to use as a working\ninter-chip connected group only in a degraded mode.\nThis is allowed only for Instances configured with ICI\nresiliency", - "All VM are in RUNNING state, there are no issues with the\ninter-chip connectivity.", - "Some VMs may not be in RUNNING state, or there is an\nissue with the inter-chip connectivity that makes this\npart of the infrastructure unsuitable for forming a\nworking inter-chip connected group." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListErrorsResponse": { - "id": "InstanceGroupManagersListErrorsResponse", - "properties": { - "items": { - "description": "[Output Only] The list of errors of the managed instance group.", - "items": { - "$ref": "InstanceManagedByIgmError" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListManagedInstancesResponse": { - "id": "InstanceGroupManagersListManagedInstancesResponse", - "properties": { - "managedInstances": { - "description": "[Output Only] The list of instances in the managed instance group.", - "items": { - "$ref": "ManagedInstance" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListPerInstanceConfigsResp": { - "id": "InstanceGroupManagersListPerInstanceConfigsResp", - "properties": { - "items": { - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersPatchPerInstanceConfigsReq": { - "description": "InstanceGroupManagers.patchPerInstanceConfigs", - "id": "InstanceGroupManagersPatchPerInstanceConfigsReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to recreate. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersResizeAdvancedRequest": { - "id": "InstanceGroupManagersResizeAdvancedRequest", - "properties": { - "noCreationRetries": { - "description": "If this flag is true, the managed instance group attempts to create all\ninstances initiated by this resize request only once. If there is an error\nduring creation, the managed instance group does not retry create this\ninstance, and we will decrease the targetSize of the request\ninstead. If the flag is false, the group attempts to recreate each instance\ncontinuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance.\nAfter an instance is successfully created while this flag is enabled, the\ninstance behaves the same way as all the other instances created with a\nregular resize request. In particular, if a running instance dies\nunexpectedly at a later time and needs to be recreated, this mode does not\naffect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not\ninfluence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling\nthe get or listManagedInstances API.", - "type": "boolean" - }, - "targetSize": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagersResumeInstancesRequest": { - "id": "InstanceGroupManagersResumeInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to resume. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "properties": { - "instanceGroupManagers": { - "description": "[Output Only] The list of managed instance groups that are contained in\nthe specified project and zone.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] The warning that replaces the list of managed instance\ngroups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetAutoHealingRequest": { - "id": "InstanceGroupManagersSetAutoHealingRequest", - "properties": { - "autoHealingPolicies": { - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "properties": { - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create all new instances\nin the managed instance group. The templates for existing instances in the\ngroup do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the target pools information. Use this optional\nproperty to prevent conflicts when multiple users change the target pools\nsettings concurrently. Obtain the fingerprint with theinstanceGroupManagers.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another\nconcurrent request.", - "format": "byte", - "type": "string" - }, - "targetPools": { - "description": "The list of target pool URLs that instances in this managed instance group\nbelong to. The managed instance group applies these target pools to all\nof the instances in the group. Existing instances and new instances in the\ngroup all receive these target pool settings.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersStartInstancesRequest": { - "id": "InstanceGroupManagersStartInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to start. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersStopInstancesRequest": { - "id": "InstanceGroupManagersStopInstancesRequest", - "properties": { - "forceStop": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nstop the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to stop. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersSuspendInstancesRequest": { - "id": "InstanceGroupManagersSuspendInstancesRequest", - "properties": { - "forceSuspend": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nsuspend the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to suspend. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersUpdatePerInstanceConfigsReq": { - "description": "InstanceGroupManagers.updatePerInstanceConfigs", - "id": "InstanceGroupManagersUpdatePerInstanceConfigsReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsAddInstancesRequest": { - "id": "InstanceGroupsAddInstancesRequest", - "properties": { - "instances": { - "description": "The list of instances to add to the instance group.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsListInstances": { - "id": "InstanceGroupsListInstances", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupsListInstances", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupsListInstances for the list of instances\nin the specified instance group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupsListInstancesRequest": { - "id": "InstanceGroupsListInstancesRequest", - "properties": { - "instanceState": { - "description": "A filter for the state of the instances in the instance group. Valid\noptions are ALL or RUNNING. If you do not specify\nthis parameter the list includes all instances regardless of their state.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "Includes all instances in the generated list regardless of their state.", - "Includes instances in the generated list only if they have a RUNNING\nstate." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupsRemoveInstancesRequest": { - "id": "InstanceGroupsRemoveInstancesRequest", - "properties": { - "instances": { - "description": "The list of instances to remove from the instance group.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsScopedList": { - "id": "InstanceGroupsScopedList", - "properties": { - "instanceGroups": { - "description": "[Output Only] The list ofinstance\ngroups that are contained in this scope.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of\ninstance groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupsSetNamedPortsRequest": { - "id": "InstanceGroupsSetNamedPortsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the named ports information for this instance group.\nUse this optional property to prevent conflicts when multiple users change\nthe named ports settings concurrently. Obtain the fingerprint with theinstanceGroups.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another concurrent request.\nA request with an incorrect fingerprint will fail with error412 conditionNotMet.", - "format": "byte", - "type": "string" - }, - "namedPorts": { - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceList": { - "description": "Contains a list of instances.", - "id": "InstanceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Instance resources.", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceList", - "description": "[Output Only] Type of resource. Always compute#instanceList\nfor lists of Instance resources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceListReferrers": { - "description": "Contains a list of instance referrers.", - "id": "InstanceListReferrers", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Reference resources.", - "items": { - "$ref": "Reference" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceListReferrers", - "description": "[Output Only] Type of resource. Alwayscompute#instanceListReferrers for lists of Instance referrers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceManagedByIgmError": { - "id": "InstanceManagedByIgmError", - "properties": { - "error": { - "$ref": "InstanceManagedByIgmErrorManagedInstanceError", - "description": "[Output Only] Contents of the error." - }, - "instanceActionDetails": { - "$ref": "InstanceManagedByIgmErrorInstanceActionDetails", - "description": "[Output Only] Details of the instance action that triggered this error.\nMay be null, if the error was not caused by an action on an instance.\nThis field is optional." - }, - "timestamp": { - "description": "[Output Only] The time that this error occurred.\nThis value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceManagedByIgmErrorInstanceActionDetails": { - "id": "InstanceManagedByIgmErrorInstanceActionDetails", - "properties": { - "action": { - "description": "[Output Only] Action that managed instance group was executing on\nthe instance when the error occurred. Possible values:", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_ATOMICALLY", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "QUEUING", - "RECREATING", - "REFRESHING", - "RESTARTING", - "RESUMING", - "STARTING", - "STOPPING", - "SUSPENDING", - "VERIFYING" - ], - "enumDescriptions": [ - "The managed instance group is abandoning this instance. The instance\nwill be removed from the instance group and from any target pools that\nare associated with this group.", - "The managed instance group is creating this instance. If the group\nfails to create this instance, it will try again until it is\nsuccessful.", - "The managed instance group is creating this instance atomically.", - "The managed instance group is attempting to create this instance\nonly once. If the group fails to create this instance, it does\nnot try again and the group's targetSize value is\ndecreased.", - "The managed instance group is permanently deleting this instance.", - "The managed instance group has not scheduled any actions for this\ninstance.", - "The managed instance group is queuing this instance.", - "The managed instance group is recreating this instance.", - "The managed instance group is applying configuration changes to the\ninstance without stopping it. For example, the group can update the\ntarget pool list for an instance without stopping that instance.", - "The managed instance group is restarting this instance.", - "The managed instance group is resuming this instance.", - "The managed instance group is starting this instance.", - "The managed instance group is stopping this instance.", - "The managed instance group is suspending this instance.", - "The managed instance group is verifying this already created instance.\nVerification happens every time the instance is (re)created or restarted\nand consists of:\n 1. Waiting until health check specified as part of this managed instance\n group's autohealing policy reports HEALTHY.\n Note: Applies only if autohealing policy has a health check specified\n 2. Waiting for addition verification steps performed as post-instance\n creation (subject to future extensions)." - ], - "type": "string" - }, - "instance": { - "description": "[Output Only] The URL of the instance.\nThe URL can be set even if the instance has not yet been created.", - "type": "string" - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Version this instance was created from, or was being\ncreated from, but the creation failed. Corresponds to one of the versions\nthat were set on the Instance Group Manager resource at the time this\ninstance was being created." - } - }, - "type": "object" - }, - "InstanceManagedByIgmErrorManagedInstanceError": { - "id": "InstanceManagedByIgmErrorManagedInstanceError", - "properties": { - "code": { - "description": "[Output Only] Error code.", - "type": "string" - }, - "message": { - "description": "[Output Only] Error message.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceMoveRequest": { - "id": "InstanceMoveRequest", - "properties": { - "destinationZone": { - "description": "The URL of the destination zone to move the instance. This can be a full or\npartial URL. For example, the following are all valid URLs to a zone:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n - projects/project/zones/zone \n - zones/zone", - "type": "string" - }, - "targetInstance": { - "description": "The URL of the target instance to move. This can be a full or partial URL.\nFor example, the following are all valid URLs to an instance:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance \n - zones/zone/instances/instance", - "type": "string" - } - }, - "type": "object" - }, - "InstanceParams": { - "description": "Additional instance params.", - "id": "InstanceParams", - "properties": { - "requestValidForDuration": { - "$ref": "Duration", - "description": "Relative deadline for waiting for capacity. Relevant only for\nInstances.Insert API." - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the instance. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceProperties": { - "id": "InstanceProperties", - "properties": { - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Controls for advanced machine-related behavior features.\nNote that for MachineImage, this is not supported yet." - }, - "canIpForward": { - "description": "Enables instances created based on these properties to send packets with\nsource IP addresses other than their own and receive packets with\ndestination IP addresses other than their own. If these instances will be\nused as an IP gateway or it will be set as the next-hop in a Route\nresource, specify true. If unsure, leave this set tofalse. See theEnable IP forwarding\ndocumentation for more information.", - "type": "boolean" - }, - "confidentialInstanceConfig": { - "$ref": "ConfidentialInstanceConfig", - "description": "Specifies the Confidential Instance options.\nNote that for MachineImage, this is not supported yet." - }, - "description": { - "description": "An optional text description for the instances that are created from these\nproperties.", - "type": "string" - }, - "disks": { - "description": "An array of disks that are associated with the instances that are created\nfrom these properties.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "displayDevice": { - "$ref": "DisplayDevice", - "description": "Display Device properties to enable support\nfor remote display products like: Teradici,\nVNC and TeamViewer\nNote that for MachineImage, this is not supported yet." - }, - "guestAccelerators": { - "description": "A list of guest accelerator cards' type and count to use for instances\ncreated from these properties.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "identity": { - "deprecated": true, - "type": "string" - }, - "identityCertificate": { - "deprecated": true, - "type": "boolean" - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to instances that are created from these properties.", - "type": "object" - }, - "machineType": { - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - }, - "description": "The machine type to use for instances that are created from these\nproperties.\nThis field only accepts a machine type name, for example `n2-standard-4`.\nIf you use the machine type full or partial URL, for example\n`projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4`,\nthe request will result in an `INTERNAL_ERROR`.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from\nthese properties. These pairs can consist of custom metadata or predefined\nkeys. SeeProject and\ninstance metadata for more information." - }, - "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by instances. The instance may be\nscheduled on the specified or newer cpu/platform. Applicable values are the\nfriendly names of CPU platforms, such asminCpuPlatform: \"Intel Haswell\" orminCpuPlatform: \"Intel Sandy Bridge\". For more\ninformation, read Specifying a\nMinimum CPU Platform.", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "networkPerformanceConfig": { - "$ref": "NetworkPerformanceConfig", - "description": "Note that for MachineImage, this is not supported yet." - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance properties. A map from a\nsubdomain (namespace) to entries map.", - "type": "object" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "privateIpv6GoogleAccess": { - "description": "The private IPv6 google access type for VMs.\nIf not specified, use INHERIT_FROM_SUBNETWORK as default.\nNote that for MachineImage, this is not supported yet.", - "enum": [ - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", - "INHERIT_FROM_SUBNETWORK" - ], - "enumDescriptions": [ - "Bidirectional private IPv6 access to/from Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Outbound private IPv6 access from VMs in this subnet to Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Each network interface inherits PrivateIpv6GoogleAccess from its\nsubnetwork." - ], - "type": "string" - }, - "reservationAffinity": { - "$ref": "ReservationAffinity", - "description": "Specifies the reservations that instances can consume from.\nNote that for MachineImage, this is not supported yet." - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the instance. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - }, - "resourcePolicies": { - "description": "Resource policies (names, not URLs) applied to instances created from\nthese properties.\nNote that for MachineImage, this is not supported yet.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from\nthese properties." - }, - "secureTags": { - "description": "[Input Only] Secure tags to apply to this instance.\nMaximum number of secure tags allowed is 50.\nNote that for MachineImage, this is not supported yet.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccounts": { - "description": "A list of service accounts with specified scopes. Access tokens for these\nservice accounts are available to the instances that are created from\nthese properties. Use metadata queries to obtain the access tokens for\nthese instances.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "serviceIntegrationSpecs": { - "additionalProperties": { - "$ref": "ServiceIntegrationSpec" - }, - "description": "Mapping of user defined keys to ServiceIntegrationSpec.", - "type": "object" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig", - "description": "Note that for MachineImage, this is not supported yet." - }, - "shieldedVmConfig": { - "$ref": "ShieldedVmConfig", - "description": "Specifies the Shielded VM options for the instances that are created from\nthese properties." - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from these\nproperties. The tags identify valid sources or targets for network\nfirewalls. The setTags method can modify this list of tags. Each tag within\nthe list must comply with RFC1035." - }, - "workloadIdentityConfig": { - "$ref": "WorkloadIdentityConfig" - } - }, - "type": "object" - }, - "InstancePropertiesPatch": { - "description": "Represents the change that you want to make to the instance properties.", - "id": "InstancePropertiesPatch", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The label key-value pairs that you want to patch onto the instance.", - "type": "object" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "The metadata key-value pairs that you want to patch onto the instance. For\nmore information, see Project and\ninstance metadata.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceReference": { - "id": "InstanceReference", - "properties": { - "instance": { - "description": "The URL for a specific instance.\n@required compute.instancegroups.addInstances/removeInstances", - "type": "string" - } - }, - "type": "object" - }, - "InstanceSettings": { - "description": "Represents a Instance Settings resource. You can use instance settings to\nconfigure default settings for Compute Engine VM instances. For example, you\ncan use it to configure default machine type of Compute Engine VM instances.", - "id": "InstanceSettings", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "fingerprint": { - "description": "Specifies a fingerprint for instance settings, which is essentially a hash\nof the instance settings resource's contents and used for optimistic\nlocking. The fingerprint is initially generated by Compute Engine and\nchanges after every request to modify or update the instance settings\nresource. You must always provide an up-to-date fingerprint hash in order\nto update or change the resource, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve the resource.", - "format": "byte", - "type": "string" - }, - "kind": { - "default": "compute#instanceSettings", - "description": "[Output Only] Type of the resource. Alwayscompute#instance_settings for instance settings.", - "type": "string" - }, - "metadata": { - "$ref": "InstanceSettingsMetadata", - "description": "The metadata key/value pairs assigned to all the instances in the\ncorresponding scope." - }, - "zone": { - "description": "[Output Only] URL of the zone where the resource resides\nYou must specify this field as part of the HTTP request URL. It is not\nsettable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceSettingsMetadata": { - "id": "InstanceSettingsMetadata", - "properties": { - "items": { - "additionalProperties": { - "type": "string" - }, - "description": "A metadata key/value items map.\nThe total size of all keys and values must be less than 512KB.", - "type": "object" - }, - "kind": { - "default": "compute#metadata", - "description": "[Output Only] Type of the resource. Always compute#metadata\nfor metadata.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceTemplate": { - "description": "Represents an Instance Template resource.\n\nGoogle Compute Engine has two Instance Template resources:\n\n* [Global](/compute/docs/reference/rest/alpha/instanceTemplates)\n* [Regional](/compute/docs/reference/rest/alpha/regionInstanceTemplates)\n\nYou can reuse a global instance template in\ndifferent regions whereas you can use a regional instance template in a\nspecified region only. If you want to reduce cross-region dependency or\nachieve data residency, use a regional instance template.\n\nTo create VMs, managed instance groups, and reservations, you can use either\nglobal or regional instance templates.\n\nFor more information, readInstance Templates.", - "id": "InstanceTemplate", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this instance template inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this instance template. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instanceTemplate", - "description": "[Output Only] The resource type, which is alwayscompute#instanceTemplate for instance templates.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "properties": { - "$ref": "InstanceProperties", - "description": "The instance properties for this instance template." - }, - "region": { - "description": "[Output Only] URL of the region where the instance template resides. Only\napplicable for regional resources.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] The URL for this instance template. The server defines this\nURL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "sourceInstance": { - "description": "The source instance used to create the template. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance", - "type": "string" - }, - "sourceInstanceParams": { - "$ref": "SourceInstanceParams", - "description": "The source instance params to use to create this instance template." - } - }, - "type": "object" - }, - "InstanceTemplateAggregatedList": { - "description": "Contains a list of InstanceTemplatesScopedList.", - "id": "InstanceTemplateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceTemplatesScopedList", - "description": "The name of the scope that contains this set of instance templates." - }, - "description": "A list of InstanceTemplatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceTemplateAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceTemplateList": { - "description": "A list of instance templates.", - "id": "InstanceTemplateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceTemplate resources.", - "items": { - "$ref": "InstanceTemplate" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceTemplateList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceTemplatesListResponse for instance template\nlists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceTemplatesScopedList": { - "id": "InstanceTemplatesScopedList", - "properties": { - "instanceTemplates": { - "description": "[Output Only] A list of instance templates that are contained within\nthe specified project and zone.", - "items": { - "$ref": "InstanceTemplate" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of instance\ntemplates when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", - "properties": { - "instance": { - "description": "[Output Only] The URL of the instance.", - "type": "string" - }, - "namedPorts": { - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "status": { - "description": "[Output Only] The status of the instance.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstancesAddResourcePoliciesRequest": { - "id": "InstancesAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be added to this instance.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesBulkInsertOperationMetadata": { - "id": "InstancesBulkInsertOperationMetadata", - "properties": { - "perLocationStatus": { - "additionalProperties": { - "$ref": "BulkInsertOperationStatus" - }, - "description": "Status information per location (location name is key).\nExample key: zones/us-central1-a", - "type": "object" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponse": { - "id": "InstancesGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output Only] Effective firewalls from firewall policies.", - "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the instance.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "organizationFirewalls": { - "description": "Effective firewalls from organization policies.", - "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output Only] The packet mirroring rules that apply to the instance.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output Only] The rules that apply to the instance. Only rules that\ntarget the specific VM instance are returned if target service accounts\nor target secure tags are specified in the rules.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy.", - "type": "string" - }, - "type": { - "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY,\nNETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.", - "enum": [ - "HIERARCHY", - "NETWORK", - "NETWORK_REGIONAL", - "SYSTEM_GLOBAL", - "SYSTEM_REGIONAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { - "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", - "id": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", - "properties": { - "id": { - "description": "The unique identifier for the security policy. This\nidentifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesRemoveResourcePoliciesRequest": { - "id": "InstancesRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this instance.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesReportHostAsFaultyRequest": { - "id": "InstancesReportHostAsFaultyRequest", - "properties": { - "actionHint": { - "description": "The action hint to report the host as faulty.", - "enum": [ - "ACTION_HINT_UNSPECIFIED", - "DIAGNOSE_AND_REPAIR", - "EXECUTE_ALL_RECOMMENDED_SCANS" - ], - "enumDescriptions": [ - "Default value. Euivalent to DIAGNOSE_AND_REPAIR.", - "The action hint to diagnose and repair the host.", - "The action hint to execute recommended scans without sending the machine\nthrough hwops." - ], - "type": "string" - }, - "disruptionSchedule": { - "description": "The disruption schedule for the VM. Required field, only allows IMMEDIATE.", - "enum": [ - "DISRUPTION_SCHEDULE_UNSPECIFIED", - "FUTURE", - "IMMEDIATE" - ], - "enumDescriptions": [ - "Not used. Required as per aip/126.", - "Delay disruption for caller control. Will be default soon.", - "Default value. Disrupt the VM immediately." - ], - "type": "string" - }, - "faultReasons": { - "items": { - "$ref": "InstancesReportHostAsFaultyRequestFaultReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesReportHostAsFaultyRequestFaultReason": { - "id": "InstancesReportHostAsFaultyRequestFaultReason", - "properties": { - "behavior": { - "enum": [ - "BEHAVIOR_UNSPECIFIED", - "PERFORMANCE", - "SILENT_DATA_CORRUPTION", - "UNRECOVERABLE_GPU_ERROR" - ], - "enumDescriptions": [ - "Public reportable behaviors", - "", - "", - "" - ], - "type": "string" - }, - "description": { - "type": "string" - } - }, - "type": "object" - }, - "InstancesResumeRequest": { - "id": "InstancesResumeRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with acustomer-supplied\nencryption key.\n\nIn order to resume the instance, the disk url and its corresponding key\nmust be provided.\n\nIf the disk is not protected with a customer-supplied encryption key it\nshould not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with an instance that is protected with acustomer-supplied\nencryption key.\n\nIf the instance you are starting is protected with a customer-supplied\nencryption key, the correct key must be provided otherwise the\ninstance resume will not succeed." - } - }, - "type": "object" - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "properties": { - "instances": { - "description": "[Output Only] A list of instances contained in this scope.", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of instances\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "Fingerprint of the previous set of labels for this resource,\nused to prevent conflicts. Provide the latest fingerprint value when making\na request to add or change labels.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "properties": { - "guestAccelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "properties": { - "machineType": { - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of\nmachine types. For example:zones/us-central1-f/machineTypes/n1-standard-1", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetMinCpuPlatformRequest": { - "id": "InstancesSetMinCpuPlatformRequest", - "properties": { - "minCpuPlatform": { - "description": "Minimum cpu/platform this instance should be started at.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetNameRequest": { - "id": "InstancesSetNameRequest", - "properties": { - "currentName": { - "description": "The current name of this resource, used to prevent conflicts. Provide the\nlatest name when making a request to change name.", - "type": "string" - }, - "name": { - "description": "The name to be applied to the instance. Needs to be RFC 1035 compliant.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetSecurityPolicyRequest": { - "id": "InstancesSetSecurityPolicyRequest", - "properties": { - "networkInterfaces": { - "description": "The network interfaces that the security policy will be applied to. Network\ninterfaces use the nicN naming format. You can only set a\nsecurity policy for network interfaces with an access config.", - "items": { - "type": "string" - }, - "type": "array" - }, - "securityPolicy": { - "description": "A full or partial URL to a security policy to add to this instance.\nIf this field is set to an empty string it will remove the associated\nsecurity policy.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "scopes": { - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with acustomer-supplied\nencryption key.\n\nIn order to start the instance, the disk url and its corresponding key must\nbe provided.\n\nIf the disk is not protected with a customer-supplied encryption key it\nshould not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with an instance that is protected with acustomer-supplied\nencryption key.\n\nIf the instance you are starting is protected with a customer-supplied\nencryption key, the correct key must be provided otherwise the\ninstance start will not succeed." - } - }, - "type": "object" - }, - "InstantSnapshot": { - "description": "Represents a InstantSnapshot resource.\n\nYou can use instant snapshots to create disk rollback points quickly..", - "id": "InstantSnapshot", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the instant snapshot. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "[Output Only] Size of the source disk, specified in GB.", - "format": "int64", - "type": "string" - }, - "guestFlush": { - "description": "Whether to attempt an application consistent instant snapshot by\ninforming the OS to prepare for the snapshot process.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instantSnapshot", - "description": "[Output Only] Type of the resource. Alwayscompute#instantSnapshot for InstantSnapshot resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this InstantSnapshot, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a InstantSnapshot.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this InstantSnapshot. These can be later modified by\nthe setLabels method.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the instant snapshot resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "resourceStatus": { - "$ref": "InstantSnapshotResourceStatus", - "description": "[Output Only] Status information for the instant snapshot resource." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sourceDisk": { - "description": "URL of the source disk used to create this instant snapshot.\nNote that the source disk must be in the same zone/region as the\ninstant snapshot to be created. This can be a full or valid partial URL.\nFor example, the following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The ID value of the disk used to create this InstantSnapshot.\nThis value may be used to determine whether the InstantSnapshot\nwas taken from the current or a previous instance of a given disk name.", - "type": "string" - }, - "sourceInstantSnapshotGroup": { - "description": "[Output Only] URL of the source instant snapshot this instant snapshot is\npart of. Note that the source instant snapshot group must be in the same\nzone/region as the instant snapshot to be created. This can be a full or\nvalid partial URL.", - "type": "string" - }, - "sourceInstantSnapshotGroupId": { - "description": "[Output Only] The ID value of the source instant snapshot group this\nInstantSnapshot is part of. This value may be used to determine whether the\nInstantSnapshot was created as part of an InstantSnapshotGroup creation.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the instantSnapshot. This can beCREATING, DELETING, FAILED, orREADY.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "InstantSnapshot creation is in progress.", - "InstantSnapshot is currently being deleted.", - "InstantSnapshot creation failed.", - "InstantSnapshot has been created successfully.", - "InstantSnapshot is currently unavailable and cannot be used for\nDisk restoration" - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the instant snapshot resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotAggregatedList": { - "id": "InstantSnapshotAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstantSnapshotsScopedList", - "description": "[Output Only] Name of the scope containing this set of instantSnapshots." - }, - "description": "A list of InstantSnapshotsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instantSnapshotAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#instantSnapshotAggregatedList for aggregated lists of\ninstantSnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstantSnapshotGroup": { - "description": "Represents an InstantSnapshotGroup resource.\n\nAn instant snapshot group is a set of instant snapshots that represents a\npoint in time state of a consistency group.", - "id": "InstantSnapshotGroup", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "Optional. An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instantSnapshotGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#instantSnapshotGroup for InstantSnapshotGroup\nresources.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the instant snapshot group resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "resourceStatus": { - "$ref": "InstantSnapshotGroupResourceStatus" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sourceConsistencyGroup": { - "type": "string" - }, - "status": { - "description": "[Output Only]", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "INVALID", - "READY", - "UNKNOWN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the instant snapshot group resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotGroupParameters": { - "id": "InstantSnapshotGroupParameters", - "properties": { - "sourceInstantSnapshotGroup": { - "description": "The source instant snapshot group used to create disks. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshotGroups/instantSnapshotGroup\n - projects/project/zones/zone/instantSnapshotGroups/instantSnapshotGroup\n - zones/zone/instantSnapshotGroups/instantSnapshotGroup", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotGroupResourceStatus": { - "id": "InstantSnapshotGroupResourceStatus", - "properties": { - "consistencyMembershipResolutionTime": { - "description": "[Output Only]", - "format": "google-datetime", - "type": "string" - }, - "sourceInfo": { - "$ref": "InstantSnapshotGroupSourceInfo", - "description": "[Output Only]" - } - }, - "type": "object" - }, - "InstantSnapshotGroupSourceInfo": { - "id": "InstantSnapshotGroupSourceInfo", - "properties": { - "consistencyGroup": { - "type": "string" - }, - "consistencyGroupId": { - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotList": { - "description": "Contains a list of InstantSnapshot resources.", - "id": "InstantSnapshotList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstantSnapshot resources.", - "items": { - "$ref": "InstantSnapshot" - }, - "type": "array" - }, - "kind": { - "default": "compute#instantSnapshotList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstantSnapshotResourceStatus": { - "id": "InstantSnapshotResourceStatus", - "properties": { - "storageSizeBytes": { - "description": "[Output Only] The storage size of this instant snapshot.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotsScopedList": { - "id": "InstantSnapshotsScopedList", - "properties": { - "instantSnapshots": { - "description": "[Output Only] A list of instantSnapshots contained in this scope.", - "items": { - "$ref": "InstantSnapshot" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of\ninstantSnapshots when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Int64RangeMatch": { - "description": "HttpRouteRuleMatch criteria for field values that must stay\nwithin the specified integer range.", - "id": "Int64RangeMatch", - "properties": { - "rangeEnd": { - "description": "The end of the range (exclusive) in signed long integer format.", - "format": "int64", - "type": "string" - }, - "rangeStart": { - "description": "The start of the range (inclusive) in signed long integer format.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "Interconnect": { - "description": "Represents an Interconnect resource.\n\nAn Interconnect resource is a dedicated connection between the Google\nCloud network and your on-premises network. For more information, read the\nDedicated Interconnect Overview.", - "id": "Interconnect", - "properties": { - "aaiEnabled": { - "description": "Enable or disable the application awareness feature on this Cloud\nInterconnect.", - "type": "boolean" - }, - "adminEnabled": { - "description": "Administrative status of the interconnect. When this is set to true, the\nInterconnect is functional and can carry traffic.\nWhen set to false, no packets can be carried over the interconnect and\nno BGP routes are exchanged over it. By default, the status is set to true.", - "type": "boolean" - }, - "applicationAwareInterconnect": { - "$ref": "InterconnectApplicationAwareInterconnect", - "description": "Configuration information for application awareness on this Cloud\nInterconnect." - }, - "availableFeatures": { - "description": "[Output only] List of features available for this Interconnect connection,\nwhich can take one of the following values:\n \n - IF_MACSEC: If present, then the Interconnect connection is\n provisioned on MACsec capable hardware ports. If not present, then the\n Interconnect connection is provisioned on non-MACsec capable ports. Any\n attempt to enable MACsec will fail.\n - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is\n provisioned exclusively for Cross-Site Networking. Any attempt to configure\n VLAN attachments will fail. If not present, then the Interconnect\n connection is not provisioned for Cross-Site Networking. Any attempt to use\n it for Cross-Site Networking will fail.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "circuitInfos": { - "description": "[Output Only] A list of CircuitInfo objects, that describe the individual\ncircuits in this LAG.", - "items": { - "$ref": "InterconnectCircuitInfo" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customerName": { - "description": "Customer name, to put in the Letter of Authorization as the party\nauthorized to request a crossconnect.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "expectedOutages": { - "description": "[Output Only] A list of outages expected for this Interconnect.", - "items": { - "$ref": "InterconnectOutageNotification" - }, - "type": "array" - }, - "googleIpAddress": { - "description": "[Output Only] IP address configured on the Google side of the Interconnect\nlink. This can be used only for ping tests.", - "type": "string" - }, - "googleReferenceId": { - "description": "[Output Only] Google reference ID to be used when raising support tickets\nwith Google or otherwise to debug backend connectivity issues.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interconnectAttachments": { - "description": "[Output Only] A list of the URLs of all InterconnectAttachments configured\nto use this Interconnect.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnectGroups": { - "description": "[Output Only] URLs of InterconnectGroups that include this Interconnect.\nOrder is arbitrary and items are unique.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnectType": { - "description": "Type of interconnect, which can take one of the following values:\n \n - PARTNER: A partner-managed interconnection shared between customers\n though a partner.\n - DEDICATED: A dedicated physical interconnection with the\n customer.\n\n\nNote that a value IT_PRIVATE has been deprecated in favor of DEDICATED.", - "enum": [ - "DEDICATED", - "IT_PRIVATE", - "PARTNER" - ], - "enumDescriptions": [ - "A dedicated physical interconnection with the customer.", - "[Deprecated] A private, physical interconnection with the customer.", - "A partner-managed interconnection shared between customers via partner." - ], - "type": "string" - }, - "kind": { - "default": "compute#interconnect", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnect for interconnects.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this Interconnect, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an Interconnect.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "linkType": { - "description": "Type of link requested, which can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics\n - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics.\n - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics.\n\n\n Note that this field indicates the speed of each of\nthe links in the bundle, not the speed of the entire bundle.", - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "location": { - "description": "URL of the InterconnectLocation object that represents where this\nconnection is to be provisioned.", - "type": "string" - }, - "macsec": { - "$ref": "InterconnectMacsec", - "description": "Configuration that enables Media Access Control security (MACsec) on the\nCloud Interconnect connection between Google and your on-premises router." - }, - "macsecEnabled": { - "description": "Enable or disable MACsec on this Interconnect connection. MACsec enablement\nfails if the MACsec object is not specified.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.interconnects.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance\nnotifications regarding this Interconnect. If specified, this will be used\nfor notifications in addition to all other forms described, such as\nCloud Monitoring logs alerting and Cloud Notifications. This field is\nrequired for users who sign up for Cloud Interconnect using\nworkforce identity federation.", - "type": "string" - }, - "operationalStatus": { - "description": "[Output Only] The current status of this Interconnect's functionality,\nwhich can take one of the following values:\n \n - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to\n use. Attachments may be provisioned on this Interconnect.\n\n- OS_UNPROVISIONED: An Interconnect that has not completed turnup. No\nattachments may be provisioned on this Interconnect.\n- OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal\nmaintenance. No attachments may be provisioned or updated on this\nInterconnect.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "The interconnect is valid, turned up, and ready to use. Attachments may\nbe provisioned on this interconnect.", - "The interconnect has not completed turnup. No attachments may be\nprovisioned on this interconnect." - ], - "type": "string" - }, - "params": { - "$ref": "InterconnectParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "peerIpAddress": { - "description": "[Output Only] IP address configured on the customer side of the\nInterconnect link. The customer should configure this IP address during\nturnup when prompted by Google NOC. This can be used only for ping tests.", - "type": "string" - }, - "provisionedLinkCount": { - "description": "[Output Only] Number of links actually provisioned in this interconnect.", - "format": "int32", - "type": "integer" - }, - "remoteLocation": { - "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies the\nlocation outside of Google's network that the interconnect is connected to.", - "type": "string" - }, - "requestedFeatures": { - "description": "Optional. This parameter can be provided only with Interconnect INSERT. It\nisn't valid for Interconnect PATCH. List of features requested for this\nInterconnect connection, which can take one of the following values:\n \n - IF_MACSEC: If specified, then the connection is created on MACsec\n capable hardware ports. If not specified, non-MACsec capable ports will\n also be considered.\n - IF_CROSS_SITE_NETWORK: If specified, then the connection is created\n exclusively for Cross-Site Networking. The connection can not be used for\n Cross-Site Networking unless this feature is specified.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "requestedLinkCount": { - "description": "Target number of physical links in the link bundle, as requested by the\ncustomer.", - "format": "int32", - "type": "integer" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of Interconnect functionality, which can\ntake one of the following values:\n \n - ACTIVE: The Interconnect is valid, turned up and ready to use.\n Attachments may be provisioned on this Interconnect.\n - UNPROVISIONED: The Interconnect has not completed turnup. No\n attachments may be provisioned on this Interconnect.\n - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance.\n No attachments may be provisioned or updated on this\n Interconnect.", - "enum": [ - "ACTIVE", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "The interconnect is valid, turned up, and ready to use. Attachments may\nbe provisioned on this interconnect.", - "The interconnect has not completed turnup. No attachments may be\nprovisioned on this interconnect." - ], - "type": "string" - }, - "subzone": { - "description": "Specific subzone in the InterconnectLocation that represents where\nthis connection is to be provisioned.", - "enum": [ - "SUBZONE_A", - "SUBZONE_B" - ], - "enumDescriptions": [ - "Subzone A.", - "Subzone B." - ], - "type": "string" - }, - "wireGroups": { - "description": "[Output Only] A list of the URLs of all CrossSiteNetwork WireGroups\nconfigured to use this Interconnect. The Interconnect cannot be deleted if\nthis list is non-empty.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnect": { - "description": "Configuration information for application awareness on this Cloud\nInterconnect.", - "id": "InterconnectApplicationAwareInterconnect", - "properties": { - "bandwidthPercentagePolicy": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" - }, - "profileDescription": { - "description": "Description for the application awareness profile on this Cloud\nInterconnect.", - "type": "string" - }, - "shapeAveragePercentages": { - "description": "Optional field to specify a list of shape average percentages to be\napplied in conjunction with StrictPriorityPolicy or\nBandwidthPercentagePolicy.", - "items": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentage" - }, - "type": "array" - }, - "strictPriorityPolicy": { - "$ref": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectBandwidthPercentage": { - "description": "Specify bandwidth percentages [1-100] for various traffic classes in\nBandwidthPercentagePolicy. The sum of all percentages must equal 100.\nAll traffic classes must have a percentage value specified.", - "id": "InterconnectApplicationAwareInterconnectBandwidthPercentage", - "properties": { - "percentage": { - "description": "Bandwidth percentage for a specific traffic class.", - "format": "uint32", - "type": "integer" - }, - "trafficClass": { - "description": "TrafficClass whose bandwidth percentage is being specified.", - "enum": [ - "TC1", - "TC2", - "TC3", - "TC4", - "TC5", - "TC6" - ], - "enumDescriptions": [ - "Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx.", - "Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx.", - "Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx.", - "Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx.", - "Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx.", - "Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy": { - "id": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy", - "properties": { - "bandwidthPercentages": { - "description": "Specify bandwidth percentages for various traffic classes for queuing\ntype Bandwidth Percent.", - "items": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentage" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectStrictPriorityPolicy": { - "description": "Specify configuration for StrictPriorityPolicy.", - "id": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy", - "properties": {}, - "type": "object" - }, - "InterconnectAttachment": { - "description": "Represents an Interconnect Attachment (VLAN) resource.\n\nYou can use Interconnect attachments (VLANS) to connect your Virtual Private\nCloud networks to your on-premises networks through an Interconnect.\nFor more information, read\nCreating VLAN Attachments.", - "id": "InterconnectAttachment", - "properties": { - "adminEnabled": { - "description": "Determines whether this Attachment will carry packets.\nNot present for PARTNER_PROVIDER.", - "type": "boolean" - }, - "attachmentGroup": { - "description": "[Output Only] URL of the AttachmentGroup that includes this Attachment.", - "type": "string" - }, - "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For\nattachments of type DEDICATED, the user can set the bandwidth.\nFor attachments of type PARTNER, the Google Partner that is operating\nthe interconnect must set the bandwidth.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,\nand can take one of the following values:\n \n - BPS_50M: 50 Mbit/s\n - BPS_100M: 100 Mbit/s\n - BPS_200M: 200 Mbit/s\n - BPS_300M: 300 Mbit/s\n - BPS_400M: 400 Mbit/s\n - BPS_500M: 500 Mbit/s\n - BPS_1G: 1 Gbit/s\n - BPS_2G: 2 Gbit/s\n - BPS_5G: 5 Gbit/s\n - BPS_10G: 10 Gbit/s\n - BPS_20G: 20 Gbit/s\n - BPS_50G: 50 Gbit/s\n - BPS_100G: 100 Gbit/s", - "enum": [ - "BPS_100G", - "BPS_100M", - "BPS_10G", - "BPS_1G", - "BPS_200M", - "BPS_20G", - "BPS_2G", - "BPS_300M", - "BPS_400G", - "BPS_400M", - "BPS_500M", - "BPS_50G", - "BPS_50M", - "BPS_5G" - ], - "enumDescriptions": [ - "100 Gbit/s", - "100 Mbit/s", - "10 Gbit/s", - "1 Gbit/s", - "200 Mbit/s", - "20 Gbit/s", - "2 Gbit/s", - "300 Mbit/s", - "400 Gbit/s", - "400 Mbit/s", - "500 Mbit/s", - "50 Gbit/s", - "50 Mbit/s", - "5 Gbit/s" - ], - "type": "string" - }, - "candidateCloudRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address must be the same.\n - Max prefix length is 31.", - "type": "string" - }, - "candidateCloudRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address must be the same.\n - Max prefix length is 126.", - "type": "string" - }, - "candidateCustomerRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the customer router\ninterface for this interconnect attachment.", - "type": "string" - }, - "candidateCustomerRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the customer router\ninterface for this interconnect attachment.", - "type": "string" - }, - "candidateIpv6Subnets": { - "description": "This field is not available.", - "items": { - "type": "string" - }, - "type": "array" - }, - "candidateSubnets": { - "description": "Input only. Up to 16 candidate prefixes that can be used to restrict the allocation\nof cloudRouterIpAddress and customerRouterIpAddress for this attachment.\nAll prefixes must be within link-local address space (169.254.0.0/16) and\nmust be /29 or shorter (/28, /27, etc). Google will attempt to select an\nunused /29 from the supplied candidate prefix(es). The request will fail if\nall possible /29s are in use on Google's edge. If not supplied, Google will\nrandomly select an unused /29 from all of link-local space.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cloudRouterIpAddress": { - "description": "[Output Only] IPv4 address + prefix length to be configured on Cloud Router\nInterface for this interconnect attachment.", - "type": "string" - }, - "cloudRouterIpv6Address": { - "description": "[Output Only] IPv6 address + prefix length to be configured on Cloud\nRouter Interface for this interconnect attachment.", - "type": "string" - }, - "cloudRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "configurationConstraints": { - "$ref": "InterconnectAttachmentConfigurationConstraints", - "description": "[Output Only] Constraints for this attachment, if any. The attachment does\nnot work if these constraints are not met." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customerRouterIpAddress": { - "description": "[Output Only] IPv4 address + prefix length to be configured on the customer\nrouter subinterface for this interconnect attachment.", - "type": "string" - }, - "customerRouterIpv6Address": { - "description": "[Output Only] IPv6 address + prefix length to be configured on the\ncustomer router subinterface for this interconnect attachment.", - "type": "string" - }, - "customerRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "dataplaneVersion": { - "description": "[Output Only] Dataplane version for this InterconnectAttachment. This\nfield is only present for Dataplane version 2 and higher. Absence of this\nfield in the API output indicates that the Dataplane is version 1.", - "format": "int32", - "type": "integer" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "edgeAvailabilityDomain": { - "description": "Input only. Desired availability domain for the attachment. Only available for type\nPARTNER, at creation time, and can take one of the following values:\n \n - AVAILABILITY_DOMAIN_ANY\n - AVAILABILITY_DOMAIN_1\n - AVAILABILITY_DOMAIN_2\n\n\nFor improved reliability, customers should configure a pair of attachments,\none per availability domain. The selected availability domain will be\nprovided to the Partner via the pairing key, so that the provisioned\ncircuit will lie in the specified domain. If not specified, the value will\ndefault to AVAILABILITY_DOMAIN_ANY.", - "enum": [ - "AVAILABILITY_DOMAIN_1", - "AVAILABILITY_DOMAIN_2", - "AVAILABILITY_DOMAIN_ANY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "encryption": { - "description": "Indicates the user-supplied encryption option of this VLAN attachment\n(interconnectAttachment). Can only be specified at attachment creation\nfor PARTNER or DEDICATED attachments.\nPossible values are:\n \n - NONE - This is the default value, which means that the\n VLAN attachment carries unencrypted traffic. VMs are able to send\n traffic to, or receive traffic from, such a VLAN attachment.\n - IPSEC - The VLAN attachment carries only encrypted\n traffic that is encrypted by an IPsec device, such as an HA VPN gateway or\n third-party IPsec VPN. VMs cannot directly send traffic to, or receive\n traffic from, such a VLAN attachment. To use *HA VPN over Cloud\n Interconnect*, the VLAN attachment must be created with this\n option.", - "enum": [ - "IPSEC", - "NONE" - ], - "enumDescriptions": [ - "The interconnect attachment will carry only encrypted traffic that is\nencrypted by an IPsec device such as HA VPN gateway;\nVMs cannot directly send traffic to or receive traffic from such an\ninterconnect attachment. To use HA VPN over Cloud Interconnect,\nthe interconnect attachment must be created with this option.", - "This is the default value, which means the Interconnect Attachment will\ncarry unencrypted traffic. VMs will be able to send traffic to or receive\ntraffic from such interconnect attachment." - ], - "type": "string" - }, - "googleReferenceId": { - "deprecated": true, - "description": "[Output Only] Google reference ID, to be used when raising support tickets\nwith Google or otherwise to debug backend connectivity issues.\n[Deprecated] This field is not used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interconnect": { - "description": "URL of the underlying Interconnect object that this attachment's traffic\nwill traverse through.", - "type": "string" - }, - "ipsecInternalAddresses": { - "description": "A list of URLs of addresses that have been reserved for the VLAN\nattachment. Used only for the VLAN attachment that has the encryption\noption as IPSEC. The addresses must be regional internal IP address ranges.\nWhen creating an HA VPN gateway over the VLAN attachment, if the attachment\nis configured to use a regional internal IP address, then the VPN gateway's\nIP address is allocated from the IP address range specified here. For\nexample, if the HA VPN gateway's interface 0 is paired to this VLAN\nattachment, then a regional internal IP address for the VPN gateway\ninterface 0 will be allocated from the IP address specified for this\nVLAN attachment.\nIf this field is not specified when creating the VLAN attachment, then\nlater on when creating an HA VPN gateway on this VLAN attachment, the HA\nVPN gateway's IP address is allocated from the regional external IP address\npool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachment", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectAttachment for interconnect attachments.", - "type": "string" - }, - "l2Forwarding": { - "$ref": "InterconnectAttachmentL2Forwarding", - "description": "L2 Interconnect Attachment related config. This field is required if the\ntype is L2_DEDICATED.\n\nThe configuration specifies how VLAN tags (like dot1q, qinq, or dot1ad)\nwithin L2 packets are mapped to the destination appliances IP addresses.\nThe packet is then encapsulated with the appliance IP address and sent to\nthe edge appliance." - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this InterconnectAttachment,\nwhich is essentially a hash of the labels set used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an InterconnectAttachment.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "mtu": { - "description": "Maximum Transmission Unit (MTU), in bytes, of packets passing through this\ninterconnect attachment.\nValid values are 1440, 1460, 1500, and 8896. If not specified,\nthe value will default to 1440.", - "format": "int32", - "type": "integer" - }, - "multicastEnabled": { - "description": "Whether or not to permit multicast traffic for this attachment. Multicast\npackets will be dropped if this is not enabled.", - "type": "boolean" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "operationalStatus": { - "description": "[Output Only] The current status of whether or not this interconnect\nattachment is functional, which can take one of the following values:\n \n - OS_ACTIVE: The attachment has been turned up and is ready to\n use. \n - OS_UNPROVISIONED: The attachment is not ready to use yet,\n because turnup is not complete.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "Indicates that attachment has been turned up and is ready to\nuse.", - "Indicates that attachment is not ready to use yet, because\nturnup is not complete." - ], - "type": "string" - }, - "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not\npresent for DEDICATED].\nThe opaque identifier of a PARTNER attachment used to initiate\nprovisioning with a selected partner.\nOf the form \"XXXXX/region/domain\"", - "type": "string" - }, - "params": { - "$ref": "InterconnectAttachmentParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "partnerAsn": { - "description": "Optional BGP ASN for the router supplied by a Layer 3 Partner if they\nconfigured BGP on behalf of the customer.\nOutput only for PARTNER type, input only for PARTNER_PROVIDER, not\navailable for DEDICATED.", - "format": "int64", - "type": "string" - }, - "partnerMetadata": { - "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display\nto customers.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER, not\navailable for DEDICATED." - }, - "privateInterconnectInfo": { - "$ref": "InterconnectAttachmentPrivateInfo", - "description": "[Output Only] Information specific to an InterconnectAttachment.\nThis property is populated if the interconnect that\nthis is attached to is of type DEDICATED." - }, - "region": { - "description": "[Output Only] URL of the region where the regional interconnect attachment\nresides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "remoteService": { - "description": "[Output Only]\nIf the attachment is on a Cross-Cloud Interconnect connection, this field\ncontains the interconnect's remote location service provider. Example\nvalues: \"Amazon Web Services\" \"Microsoft Azure\".\n\nThe field is set only for attachments on Cross-Cloud Interconnect\nconnections. Its value is copied from the InterconnectRemoteLocation\nremoteService field.", - "type": "string" - }, - "router": { - "description": "URL of the Cloud Router to be used for dynamic routing. This router must be\nin the same region as this InterconnectAttachment. The\nInterconnectAttachment will automatically connect the Interconnect to the\nnetwork \u0026 region within which the Cloud Router is configured.", - "type": "string" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "stackType": { - "description": "The stack type for this interconnect attachment to identify whether the\nIPv6 feature is enabled or not. If not specified, IPV4_ONLY\nwill be used.\n\nThis field can be both set at interconnect attachments creation and\nupdate interconnect attachment operations.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "The interconnect attachment can have both IPv4 and IPv6 addresses.", - "The interconnect attachment will only be assigned IPv4 addresses." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of this attachment's functionality.\nEnum values ACTIVE and UNPROVISIONED are shared by DEDICATED/PRIVATE,\nPARTNER, and PARTNER_PROVIDER interconnect attachments, while enum values\nPENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used\nfor only PARTNER and PARTNER_PROVIDER interconnect attachments.\nThis state can take one of the following values:\n \n - ACTIVE: The attachment has been turned up and is ready to use.\n - UNPROVISIONED: The attachment is not ready to use yet, because turnup\n is not complete.\n - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet\n been configured on the Partner side.\n - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of\n provisioning after a PARTNER_PROVIDER attachment was created that\n references it. \n - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER\n attachment that is waiting for a customer to activate it. \n - DEFUNCT:\n The attachment was deleted externally and is no longer functional. This\n could be because the associated Interconnect was removed, or because the\n other side of a Partner attachment was deleted.", - "enum": [ - "ACTIVE", - "DEFUNCT", - "PARTNER_REQUEST_RECEIVED", - "PENDING_CUSTOMER", - "PENDING_PARTNER", - "STATE_UNSPECIFIED", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "Indicates that attachment has been turned up and is ready to use.", - "The attachment was deleted externally and is no longer functional.\nThis could be because the associated Interconnect was wiped out,\nor because the other side of a Partner attachment was deleted.", - "A PARTNER attachment is in the process of provisioning after a\nPARTNER_PROVIDER attachment was created that references it.", - "PARTNER or PARTNER_PROVIDER attachment that is waiting for the customer\nto activate.", - "A newly created PARTNER attachment that has not yet been configured on\nthe Partner side.", - "", - "Indicates that attachment is not ready to use yet, because turnup is not\ncomplete." - ], - "type": "string" - }, - "subnetLength": { - "description": "Input only. Length of the IPv4 subnet mask.\nAllowed values:\n \n \n - 29 (default)\n - 30\n\nThe default value is 29, except for Cross-Cloud Interconnect\nconnections that use an InterconnectRemoteLocation with a\nconstraints.subnetLengthRange.min equal to 30. For example,\nconnections that use an Azure remote location fall into this\ncategory. In these cases, the default value is 30, and requesting\n29 returns an error.\n\nWhere both 29 and 30 are allowed, 29 is preferred, because it gives\nGoogle Cloud Support more debugging visibility.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of interconnect attachment this is, which can take one of the\nfollowing values:\n \n - DEDICATED: an attachment to a Dedicated Interconnect.\n - PARTNER: an attachment to a Partner Interconnect, created by the\n customer.\n - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by\n the partner.\n\n- L2_DEDICATED: a L2 attachment to a Dedicated Interconnect.", - "enum": [ - "DEDICATED", - "L2_DEDICATED", - "PARTNER", - "PARTNER_PROVIDER" - ], - "enumDescriptions": [ - "Attachment to a dedicated interconnect.", - "Attachment to a dedicated interconnect, forwarding L2 packets.", - "Attachment to a partner interconnect, created by the customer.", - "Attachment to a partner interconnect, created by the partner." - ], - "type": "string" - }, - "vlanTag8021q": { - "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4093.\nOnly specified at creation time.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentAggregatedList": { - "id": "InterconnectAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InterconnectAttachmentsScopedList", - "description": "Name of the scope containing this set of interconnect attachments." - }, - "description": "A list of InterconnectAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#interconnectAttachmentAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectAttachmentAggregatedList for aggregated\nlists of interconnect attachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraints": { - "id": "InterconnectAttachmentConfigurationConstraints", - "properties": { - "bgpMd5": { - "description": "[Output Only] Whether the attachment's BGP session\nrequires/allows/disallows BGP MD5 authentication. This can take one of\nthe following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED.\n\nFor example, a Cross-Cloud Interconnect connection to a remote cloud\nprovider that requires BGP MD5 authentication has the\ninterconnectRemoteLocation attachment_configuration_constraints.bgp_md5\nfield set to MD5_REQUIRED, and that property is propagated to the\nattachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is\nreturned if MD5 is requested.", - "enum": [ - "MD5_OPTIONAL", - "MD5_REQUIRED", - "MD5_UNSUPPORTED" - ], - "enumDescriptions": [ - "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be\nconfigured.", - "MD5_REQUIRED: BGP MD5 authentication must be configured.", - "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" - ], - "type": "string" - }, - "bgpPeerAsnRanges": { - "description": "[Output Only] List of ASN ranges that the remote location is known to\nsupport. Formatted as an array of inclusive ranges {min: min-value, max:\nmax-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}]\nallows the peer ASN to be 123 or anything in the range 64512-65534.\n\nThis field is only advisory. Although the API accepts other ranges, these\nare the ranges that we recommend.", - "items": { - "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { - "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", - "properties": { - "max": { - "format": "uint32", - "type": "integer" - }, - "min": { - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroup": { - "description": "An interconnect attachment group resource allows customers to create,\nanalyze, and expand highly available deployments.", - "id": "InterconnectAttachmentGroup", - "properties": { - "attachments": { - "additionalProperties": { - "$ref": "InterconnectAttachmentGroupAttachment" - }, - "description": "Attachments in the AttachmentGroup. Keys are arbitrary user-specified\nstrings. Users are encouraged, but not required, to use their preferred\nformat for resource links as keys.\nNote that there are add-members and remove-members methods in gcloud.\nThe size of this map is limited by an \"Attachments per group\" quota.", - "type": "object" - }, - "configured": { - "$ref": "InterconnectAttachmentGroupConfigured" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Opaque system-generated token that uniquely identifies the configuration.\nIf provided when patching a configuration in update mode, the provided\ntoken must match the current token or the update is rejected. This provides\na reliable means of doing read-modify-write (optimistic locking) as\ndescribed byAIP 154.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "intent": { - "$ref": "InterconnectAttachmentGroupIntent" - }, - "interconnectGroup": { - "description": "The URL of an InterconnectGroup that groups these Attachments'\nInterconnects. Customers do not need to set this unless directed by\nGoogle Support.", - "type": "string" - }, - "kind": { - "default": "compute#interconnectAttachmentGroup", - "description": "[Output Only] Type of the resource. Always\ncompute#interconnectAttachmentGroup.", - "type": "string" - }, - "logicalStructure": { - "$ref": "InterconnectAttachmentGroupLogicalStructure" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupAttachment": { - "description": "An Attachment in this AttachmentGroup.", - "id": "InterconnectAttachmentGroupAttachment", - "properties": { - "attachment": { - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfigured": { - "description": "[Output Only] The redundancy this group is configured to support. The way a\nuser queries what SLA their Attachment gets is by looking at this field of\nthe Attachment's AttachmentGroup.", - "id": "InterconnectAttachmentGroupConfigured", - "properties": { - "availabilitySla": { - "$ref": "InterconnectAttachmentGroupConfiguredAvailabilitySLA" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfiguredAvailabilitySLA": { - "description": "[Output Only] Which SLA this group is configured to support, and why this\ngroup does or does not meet that SLA's requirements.", - "id": "InterconnectAttachmentGroupConfiguredAvailabilitySLA", - "properties": { - "effectiveSla": { - "enum": [ - "EFFECTIVE_SLA_UNSPECIFIED", - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intendedSlaBlockers": { - "items": { - "$ref": "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers": { - "description": "[Output Only] Reasons why configuration.availabilitySLA.sla differs from\nintent.availabilitySLA. This list is empty if and only if those are the\nsame.", - "id": "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers", - "properties": { - "attachments": { - "description": "[Output Only] URLs of any particular Attachments to explain this\nblocker in more detail.", - "items": { - "type": "string" - }, - "type": "array" - }, - "blockerType": { - "enum": [ - "BLOCKER_TYPE_UNSPECIFIED", - "INCOMPATIBLE_METROS", - "INCOMPATIBLE_REGIONS", - "MISSING_GLOBAL_ROUTING", - "NO_ATTACHMENTS", - "NO_ATTACHMENTS_IN_METRO_AND_ZONE", - "OTHER" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "documentationLink": { - "description": "[Output Only] The url of Google Cloud public documentation explaining\nthis requirement. This is set for every type of requirement.", - "type": "string" - }, - "explanation": { - "description": "[Output Only] A human-readable explanation of this requirement and\nwhy it's not met. This is set for every type of requirement.", - "type": "string" - }, - "metros": { - "description": "[Output Only] Metros used to explain this blocker in more detail.\nThese are three-letter lowercase strings like \"iad\". This will be set\nfor some blockers (like NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does\nnot apply to others.", - "items": { - "type": "string" - }, - "type": "array" - }, - "regions": { - "description": "[Output Only] Regions used to explain this blocker in more\ndetail. These are region names formatted like \"us-central1\". This\nwill be set for some blockers (like INCOMPATIBLE_REGIONS) but does\nnot apply to others.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zones": { - "description": "[Output Only] Zones used to explain this blocker in more detail.\nFormat is \"zone1\" and/or \"zone2\". This will be set for some blockers\n(like MISSING_ZONE) but does not apply to others.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupIntent": { - "description": "The user's intent for this AttachmentGroup. This is the only required field\nbesides the name that must be specified on group creation.", - "id": "InterconnectAttachmentGroupIntent", - "properties": { - "availabilitySla": { - "enum": [ - "AVAILABILITY_SLA_UNSPECIFIED", - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructure": { - "description": "[Output Only] An analysis of the logical layout of Attachments in this\ngroup. Every Attachment in the group is shown once in this structure.", - "id": "InterconnectAttachmentGroupLogicalStructure", - "properties": { - "regions": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegion" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegion": { - "description": "[Output Only] The regions Attachments in this group are in.", - "id": "InterconnectAttachmentGroupLogicalStructureRegion", - "properties": { - "metros": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetro" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] The name of a region, like \"us-central1\".", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetro": { - "description": "[Output Only] The metros of Attachments in this group in this region.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetro", - "properties": { - "facilities": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility" - }, - "type": "array" - }, - "metro": { - "description": "[Output Only] The name of the metro, as a three-letter lowercase\nstring like \"iad\". This is the first component of the location of an\nInterconnect.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility": { - "description": "[Output Only] The facilities used for this group's Attachments'\nInterconnects.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility", - "properties": { - "facility": { - "description": "[Output Only] The name of a facility, like \"iad-1234\".", - "type": "string" - }, - "zones": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone": { - "description": "[Output Only] The zones that Attachments in this group are present\nin, in the given facilities. This is inherited from their\nInterconnects.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone", - "properties": { - "attachments": { - "description": "[Output Only] URLs of Attachments in the given zone, to the given\nregion, on Interconnects in the given facility and metro. Every\nAttachment in the AG has such an entry.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The name of a zone, either \"zone1\" or \"zone2\".", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsCreateMembers": { - "id": "InterconnectAttachmentGroupsCreateMembers", - "properties": { - "attachments": { - "description": "Parameters for the specific Attachments to create.", - "items": { - "$ref": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput" - }, - "type": "array" - }, - "intentMismatchBehavior": { - "description": "How to behave when configured.availabilitySLA.effectiveSLA would not equal\nintent.availabilitySLA after this call.", - "enum": [ - "CREATE", - "REJECT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "templateAttachment": { - "$ref": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput", - "description": "Default parameters for the Attachments to create in this call." - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput": { - "description": "LINT.IfChange\nParameters used to create an InterconnectAttachment. This is similar to\nInterconnectAttachment, but the region field used here is not output only\nand all other output only fields are excluded.", - "id": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput", - "properties": { - "adminEnabled": { - "description": "Determines whether this Attachment will carry packets.\nNot present for PARTNER_PROVIDER.", - "type": "boolean" - }, - "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For\nattachments of type DEDICATED, the user can set the bandwidth.\nFor attachments of type PARTNER, the Google Partner that is operating\nthe interconnect must set the bandwidth.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,\nand can take one of the following values:\n \n - BPS_50M: 50 Mbit/s\n - BPS_100M: 100 Mbit/s\n - BPS_200M: 200 Mbit/s\n - BPS_300M: 300 Mbit/s\n - BPS_400M: 400 Mbit/s\n - BPS_500M: 500 Mbit/s\n - BPS_1G: 1 Gbit/s\n - BPS_2G: 2 Gbit/s\n - BPS_5G: 5 Gbit/s\n - BPS_10G: 10 Gbit/s\n - BPS_20G: 20 Gbit/s\n - BPS_50G: 50 Gbit/s\n - BPS_100G: 100 Gbit/s", - "enum": [ - "BPS_100G", - "BPS_100M", - "BPS_10G", - "BPS_1G", - "BPS_200M", - "BPS_20G", - "BPS_2G", - "BPS_300M", - "BPS_400G", - "BPS_400M", - "BPS_500M", - "BPS_50G", - "BPS_50M", - "BPS_5G" - ], - "enumDescriptions": [ - "100 Gbit/s", - "100 Mbit/s", - "10 Gbit/s", - "1 Gbit/s", - "200 Mbit/s", - "20 Gbit/s", - "2 Gbit/s", - "300 Mbit/s", - "400 Gbit/s", - "400 Mbit/s", - "500 Mbit/s", - "50 Gbit/s", - "50 Mbit/s", - "5 Gbit/s" - ], - "type": "string" - }, - "candidateCloudRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address must be the same.\n - Max prefix length is 31.", - "type": "string" - }, - "candidateCloudRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address must be the same.\n - Max prefix length is 126.", - "type": "string" - }, - "candidateCustomerRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the customer\nrouter interface for this interconnect attachment.", - "type": "string" - }, - "candidateCustomerRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the customer\nrouter interface for this interconnect attachment.", - "type": "string" - }, - "candidateIpv6Subnets": { - "description": "This field is not available.", - "items": { - "type": "string" - }, - "type": "array" - }, - "candidateSubnets": { - "description": "Input only. Up to 16 candidate prefixes that can be used to restrict the allocation\nof cloudRouterIpAddress and customerRouterIpAddress for this attachment.\nAll prefixes must be within link-local address space (169.254.0.0/16) and\nmust be /29 or shorter (/28, /27, etc). Google will attempt to select an\nunused /29 from the supplied candidate prefix(es). The request will fail\nif all possible /29s are in use on Google's edge. If not supplied, Google\nwill randomly select an unused /29 from all of link-local space.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cloudRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "customerRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "edgeAvailabilityDomain": { - "description": "Input only. Desired availability domain for the attachment. Only available for type\nPARTNER, at creation time, and can take one of the following values:\n \n - AVAILABILITY_DOMAIN_ANY\n - AVAILABILITY_DOMAIN_1\n - AVAILABILITY_DOMAIN_2\n\n\nFor improved reliability, customers should configure a pair of\nattachments, one per availability domain. The selected availability\ndomain will be provided to the Partner via the pairing key, so that the\nprovisioned circuit will lie in the specified domain. If not specified,\nthe value will default to AVAILABILITY_DOMAIN_ANY.", - "enum": [ - "AVAILABILITY_DOMAIN_1", - "AVAILABILITY_DOMAIN_2", - "AVAILABILITY_DOMAIN_ANY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "encryption": { - "description": "Indicates the user-supplied encryption option of this VLAN attachment\n(interconnectAttachment). Can only be specified at attachment creation\nfor PARTNER or DEDICATED attachments.\nPossible values are:\n \n - alpha - This is the default value, which means that\n the VLAN attachment carries unencrypted traffic. VMs are able to send\n traffic to, or receive traffic from, such a VLAN attachment.\n - IPSEC - The VLAN attachment carries only encrypted\n traffic that is encrypted by an IPsec device, such as an HA VPN gateway\n or third-party IPsec VPN. VMs cannot directly send traffic to, or receive\n traffic from, such a VLAN attachment. To use *HA VPN over Cloud\n Interconnect*, the VLAN attachment must be created with this\n option.", - "enum": [ - "IPSEC", - "NONE" - ], - "enumDescriptions": [ - "The interconnect attachment will carry only encrypted traffic that is\nencrypted by an IPsec device such as HA VPN gateway;\nVMs cannot directly send traffic to or receive traffic from such an\ninterconnect attachment. To use HA VPN over Cloud Interconnect,\nthe interconnect attachment must be created with this option.", - "This is the default value, which means the Interconnect Attachment will\ncarry unencrypted traffic. VMs will be able to send traffic to or receive\ntraffic from such interconnect attachment." - ], - "type": "string" - }, - "interconnect": { - "description": "URL of the underlying Interconnect object that this attachment's traffic\nwill traverse through.", - "type": "string" - }, - "ipsecInternalAddresses": { - "description": "A list of URLs of addresses that have been reserved for the VLAN\nattachment. Used only for the VLAN attachment that has the encryption\noption as IPSEC. The addresses must be regional internal IP address\nranges. When creating an HA VPN gateway over the VLAN attachment, if the\nattachment is configured to use a regional internal IP address, then the\nVPN gateway's IP address is allocated from the IP address range specified\nhere. For example, if the HA VPN gateway's interface 0 is paired to this\nVLAN attachment, then a regional internal IP address for the VPN gateway\ninterface 0 will be allocated from the IP address specified for this\nVLAN attachment.\nIf this field is not specified when creating the VLAN attachment, then\nlater on when creating an HA VPN gateway on this VLAN attachment, the HA\nVPN gateway's IP address is allocated from the regional external IP\naddress pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "l2Forwarding": { - "$ref": "InterconnectAttachmentL2Forwarding", - "description": "L2 Interconnect Attachment related config. This field is required if the\ntype is L2_DEDICATED.\n\nThe configuration specifies how VLAN tags (like dot1q, qinq, or dot1ad)\nwithin L2 packets are mapped to the destination appliances IP addresses.\nThe packet is then encapsulated with the appliance IP address and sent to\nthe edge appliance." - }, - "mtu": { - "description": "Maximum Transmission Unit (MTU), in bytes, of packets passing through\nthis interconnect attachment. Valid values are 1440, 1460,\n1500, or 8896. If not specified, the value will default to 1440.", - "format": "int32", - "type": "integer" - }, - "multicastEnabled": { - "description": "Whether or not to permit multicast traffic for this attachment. Multicast\npackets will be dropped if this is not enabled.", - "type": "boolean" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is\ncreated. Must be set on either the template_attachment or on each\nspecific attachment. If set, the name must be 1-63 characters long, and\ncomply with RFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "type": "string" - }, - "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not\npresent for DEDICATED].\nThe opaque identifier of a PARTNER attachment used to initiate\nprovisioning with a selected partner.\nOf the form \"XXXXX/region/domain\"", - "type": "string" - }, - "partnerAsn": { - "description": "Optional BGP ASN for the router supplied by a Layer 3 Partner if they\nconfigured BGP on behalf of the customer.\nOutput only for PARTNER type, input only for PARTNER_PROVIDER, not\navailable for DEDICATED.", - "format": "int64", - "type": "string" - }, - "partnerMetadata": { - "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display\nto customers.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER, not\navailable for DEDICATED." - }, - "region": { - "description": "The region that the Attachment is in.", - "type": "string" - }, - "router": { - "description": "URL of the Cloud Router to be used for dynamic routing. This router must\nbe in the same region as this InterconnectAttachment. The\nInterconnectAttachment will automatically connect the Interconnect to the\nnetwork \u0026 region within which the Cloud Router is configured.", - "type": "string" - }, - "stackType": { - "description": "The stack type for this interconnect attachment to identify whether the\nIPv6 feature is enabled or not. If not specified, IPV4_ONLY\nwill be used.\n\nThis field can be both set at interconnect attachments creation and\nupdate interconnect attachment operations.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "The interconnect attachment can have both IPv4 and IPv6 addresses.", - "The interconnect attachment will only be assigned IPv4 addresses." - ], - "type": "string" - }, - "subnetLength": { - "description": "Input only. Length of the IPv4 subnet mask.\nAllowed values:\n \n \n - 29 (default)\n - 30\n\nThe default value is 29, except for Cross-Cloud Interconnect\nconnections that use an InterconnectRemoteLocation with a\nconstraints.subnetLengthRange.min equal to 30. For example,\nconnections that use an Azure remote location fall into this\ncategory. In these cases, the default value is 30, and requesting\n29 returns an error.\n\nWhere both 29 and 30 are allowed, 29 is preferred, because it gives\nGoogle Cloud Support more debugging visibility.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of interconnect attachment this is, which can take one of the\nfollowing values:\n \n - DEDICATED: an attachment to a Dedicated Interconnect.\n - PARTNER: an attachment to a Partner Interconnect, created by the\n customer.\n - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by\n the partner.", - "enum": [ - "DEDICATED", - "L2_DEDICATED", - "PARTNER", - "PARTNER_PROVIDER" - ], - "enumDescriptions": [ - "Attachment to a dedicated interconnect.", - "Attachment to a dedicated interconnect, forwarding L2 packets.", - "Attachment to a partner interconnect, created by the customer.", - "Attachment to a partner interconnect, created by the partner." - ], - "type": "string" - }, - "vlanTag8021q": { - "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4093.\nOnly specified at creation time.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsCreateMembersRequest": { - "id": "InterconnectAttachmentGroupsCreateMembersRequest", - "properties": { - "request": { - "$ref": "InterconnectAttachmentGroupsCreateMembers" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsGetOperationalStatusResponse": { - "description": "Response for the InterconnectAttachmentGroupsGetOperationalStatusResponse.", - "id": "InterconnectAttachmentGroupsGetOperationalStatusResponse", - "properties": { - "etag": { - "type": "string" - }, - "result": { - "$ref": "InterconnectAttachmentGroupsOperationalStatus" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsListResponse": { - "id": "InterconnectAttachmentGroupsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectAttachmentGroup resources.", - "items": { - "$ref": "InterconnectAttachmentGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachmentGroup", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface:\nMixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsOperationalStatus": { - "id": "InterconnectAttachmentGroupsOperationalStatus", - "properties": { - "attachmentStatuses": { - "items": { - "$ref": "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus" - }, - "type": "array" - }, - "configured": { - "$ref": "InterconnectAttachmentGroupConfigured" - }, - "groupStatus": { - "description": "Summarizes the status of the group.", - "enum": [ - "DEGRADED", - "FULLY_DOWN", - "FULLY_UP", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intent": { - "$ref": "InterconnectAttachmentGroupIntent" - }, - "operational": { - "$ref": "InterconnectAttachmentGroupConfigured", - "description": "The operational state of the group, including only active Attachments." - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus": { - "description": "The status of one Attachment in the group. List order is arbitrary.", - "id": "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", - "properties": { - "adminEnabled": { - "description": "Whether this Attachment is enabled. This becomes false when the customer\ndrains their Attachment.", - "type": "boolean" - }, - "attachment": { - "description": "The URL of the Attachment being described.", - "type": "string" - }, - "isActive": { - "description": "Whether this Attachment is participating in the redundant configuration.\nThis will be ACTIVE if and only if the status below is CONNECTION_UP.\nAny INACTIVE Attachments are excluded from the analysis that generates\noperational.availabilitySLA.", - "enum": [ - "ACTIVE", - "INACTIVE", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "status": { - "description": "Whether this Attachment is active, and if so, whether BGP is up.", - "enum": [ - "ATTACHMENT_STATUS_UNKNOWN", - "CONNECTION_DISABLED", - "CONNECTION_DOWN", - "CONNECTION_UP", - "DEFUNCT", - "IPSEC_CONFIGURATION_NEEDED_STATUS", - "IPSEC_READY_TO_RESUME_FLOW_STATUS", - "IPV4_DOWN_IPV6_UP", - "IPV4_UP_IPV6_DOWN", - "PARTNER_REQUEST_RECEIVED", - "PENDING_CUSTOMER", - "PENDING_PARTNER", - "PROVISIONED", - "ROUTER_CONFIGURATION_BROKEN", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2Forwarding": { - "description": "L2 Interconnect Attachment related configuration.", - "id": "InterconnectAttachmentL2Forwarding", - "properties": { - "applianceMappings": { - "additionalProperties": { - "$ref": "InterconnectAttachmentL2ForwardingApplianceMapping" - }, - "description": "Optional. A map of VLAN tags to appliances and optional inner mapping\nrules. If VLANs are not explicitly mapped to any appliance, the\ndefaultApplianceIpAddress is used.\n\nEach VLAN tag can be a single number or a range of numbers in the range\nof 1 to 4094, e.g., \"1\" or \"4001-4094\". Non-empty and non-overlapping\nVLAN tag ranges are enforced, and violating operations will be rejected.\n\nThe VLAN tags in the Ethernet header must use an ethertype value of\n0x88A8 or 0x8100.", - "type": "object" - }, - "defaultApplianceIpAddress": { - "description": "Optional. A single IPv4 or IPv6 address used as the default destination\nIP when there is no VLAN mapping result found.\n\nUnset field (null-value) indicates the unmatched packet should be\ndropped.", - "type": "string" - }, - "geneveHeader": { - "$ref": "InterconnectAttachmentL2ForwardingGeneveHeader", - "description": "Optional. It represents the structure of a Geneve (Generic Network\nVirtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various\nprotocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization\nenvironments." - }, - "network": { - "description": "Required. Resource URL of the network to which this attachment belongs.", - "type": "string" - }, - "tunnelEndpointIpAddress": { - "description": "Required. A single IPv4 or IPv6 address. This address will be used as the\nsource IP address for packets sent to the appliances, and must be used as\nthe destination IP address for packets that should be sent out through\nthis attachment.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingApplianceMapping": { - "description": "Two-level VLAN-to-Appliance mapping rule.", - "id": "InterconnectAttachmentL2ForwardingApplianceMapping", - "properties": { - "applianceIpAddress": { - "description": "Optional. A single IPv4 or IPv6 address used as the destination IP\naddress for ingress packets that match on a VLAN tag, but do not match\na more specific inner VLAN tag.\n\nUnset field (null-value) indicates both VLAN tags are required to be\nmapped. Otherwise, defaultApplianceIpAddress is used.", - "type": "string" - }, - "innerVlanToApplianceMappings": { - "description": "Optional. Used to match against the inner VLAN when the packet\ncontains two VLAN tags.\n\nA list of mapping rules from inner VLAN tags to IP addresses. If the\ninner VLAN is not explicitly mapped to an IP address range, the\napplianceIpAddress is used.", - "items": { - "$ref": "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping" - }, - "type": "array" - }, - "name": { - "description": "Optional. The name of this appliance mapping rule.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping": { - "description": "The inner VLAN-to-Appliance mapping.", - "id": "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", - "properties": { - "innerApplianceIpAddress": { - "description": "Required in this object. A single IPv4 or IPv6 address used as the\ndestination IP address for ingress packets that match on both VLAN\ntags.", - "type": "string" - }, - "innerVlanTags": { - "description": "Required in this object. Used to match the inner VLAN tag on the\npacket. Each entry can be a single number or a range of numbers in\nthe range of 1 to 4094, e.g., [\"1\", \"4001-4094\"] is valid. Non-empty\nand Non-overlapping VLAN tag ranges are enforced, and violating\noperations will be rejected.\n\nThe inner VLAN tags must have an ethertype value of 0x8100.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingGeneveHeader": { - "description": "GeneveHeader related configurations.", - "id": "InterconnectAttachmentL2ForwardingGeneveHeader", - "properties": { - "vni": { - "description": "Optional. VNI is a 24-bit unique virtual network identifier, from 0 to\n16,777,215.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentList": { - "description": "Response to the list request, and contains a list of interconnect\nattachments.", - "id": "InterconnectAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectAttachment resources.", - "items": { - "$ref": "InterconnectAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachmentList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectAttachmentList for lists of interconnect\nattachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentParams": { - "description": "Additional interconnect attachment parameters.", - "id": "InterconnectAttachmentParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentPartnerMetadata": { - "description": "Informational metadata about Partner attachments from Partners to display\nto customers. These fields are propagated from PARTNER_PROVIDER\nattachments to their corresponding PARTNER attachments.", - "id": "InterconnectAttachmentPartnerMetadata", - "properties": { - "interconnectName": { - "description": "Plain text name of the Interconnect this attachment is connected to, as\ndisplayed in the Partner's portal. For instance \"Chicago 1\".\nThis value may be validated to match approved Partner values.", - "type": "string" - }, - "partnerName": { - "description": "Plain text name of the Partner providing this attachment.\nThis value may be validated to match approved Partner values.", - "type": "string" - }, - "portalUrl": { - "description": "URL of the Partner's portal for this Attachment. Partners may customise\nthis to be a deep link to the specific resource on the Partner portal.\nThis value may be validated to match approved Partner values.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentPrivateInfo": { - "description": "Information for an interconnect attachment when this belongs to an\ninterconnect of type DEDICATED.", - "id": "InterconnectAttachmentPrivateInfo", - "properties": { - "tag8021q": { - "description": "[Output Only] 802.1q encapsulation tag to be used for traffic between\nGoogle and the customer, going to and from this network and region.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentsScopedList": { - "id": "InterconnectAttachmentsScopedList", - "properties": { - "interconnectAttachments": { - "description": "A list of interconnect attachments contained in this scope.", - "items": { - "$ref": "InterconnectAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectCircuitInfo": { - "description": "Describes a single physical circuit between the Customer and Google.\nCircuitInfo objects are created by Google, so all fields are output only.", - "id": "InterconnectCircuitInfo", - "properties": { - "customerDemarcId": { - "description": "Customer-side demarc ID for this circuit.", - "type": "string" - }, - "googleCircuitId": { - "description": "Google-assigned unique ID for this circuit. Assigned at circuit turn-up.", - "type": "string" - }, - "googleDemarcId": { - "description": "Google-side demarc ID for this circuit. Assigned at circuit turn-up and\nprovided by Google to the customer in the LOA.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnostics": { - "description": "Diagnostics information about the Interconnect connection, which contains\ndetailed and current technical information about Google's side of the\nconnection.", - "id": "InterconnectDiagnostics", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects,\ndescribing individual neighbors currently seen by the Google router in\nthe ARP cache for the Interconnect.\nThis will be empty when the Interconnect is not bundled.", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "bundleAggregationType": { - "description": "The aggregation type of the bundle interface.", - "enum": [ - "BUNDLE_AGGREGATION_TYPE_LACP", - "BUNDLE_AGGREGATION_TYPE_STATIC" - ], - "enumDescriptions": [ - "LACP is enabled.", - "LACP is disabled." - ], - "type": "string" - }, - "bundleOperationalStatus": { - "description": "The operational status of the bundle interface.", - "enum": [ - "BUNDLE_OPERATIONAL_STATUS_DOWN", - "BUNDLE_OPERATIONAL_STATUS_UP" - ], - "enumDescriptions": [ - "If bundleAggregationType is LACP: LACP is not established and/or all\nlinks in the bundle have DOWN operational status. If\nbundleAggregationType is STATIC: one or more links in the bundle has\nDOWN operational status.", - "If bundleAggregationType is LACP: LACP is established and at least one\nlink in the bundle has UP operational status. If bundleAggregationType\nis STATIC: all links in the bundle (typically just one) have UP\noperational status." - ], - "type": "string" - }, - "links": { - "description": "A list of InterconnectDiagnostics.LinkStatus objects,\ndescribing the status for each link on the Interconnect.", - "items": { - "$ref": "InterconnectDiagnosticsLinkStatus" - }, - "type": "array" - }, - "macAddress": { - "description": "The MAC address of the Interconnect's bundle interface.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsARPEntry": { - "description": "Describing the ARP neighbor entries seen on this link", - "id": "InterconnectDiagnosticsARPEntry", - "properties": { - "ipAddress": { - "description": "The IP address of this ARP neighbor.", - "type": "string" - }, - "macAddress": { - "description": "The MAC address of this ARP neighbor.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkLACPStatus": { - "id": "InterconnectDiagnosticsLinkLACPStatus", - "properties": { - "googleSystemId": { - "description": "System ID of the port on Google's side of the LACP exchange.", - "type": "string" - }, - "neighborSystemId": { - "description": "System ID of the port on the neighbor's side of the LACP exchange.", - "type": "string" - }, - "state": { - "description": "The state of a LACP link, which can take one of the following values:\n \n - ACTIVE: The link is configured and active within the bundle.\n - DETACHED: The link is not configured within the bundle. This means\n that the rest of the object should be empty.", - "enum": [ - "ACTIVE", - "DETACHED" - ], - "enumDescriptions": [ - "The link is configured and active within the bundle.", - "The link is not configured within the bundle, this means the rest of\nthe object should be empty." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkOpticalPower": { - "id": "InterconnectDiagnosticsLinkOpticalPower", - "properties": { - "state": { - "description": "The status of the current value when compared to the warning and alarm\nlevels for the receiving or transmitting transceiver. Possible states\ninclude:\n \n \n - OK: The value has not crossed a warning threshold.\n - LOW_WARNING: The value has crossed below the low\n warning threshold. \n - HIGH_WARNING: The value has\n crossed above the high warning threshold.\n - LOW_ALARM: The value has crossed below the low alarm\n threshold.\n - HIGH_ALARM: The value has crossed above the high alarm\n threshold.", - "enum": [ - "HIGH_ALARM", - "HIGH_WARNING", - "LOW_ALARM", - "LOW_WARNING", - "OK" - ], - "enumDescriptions": [ - "The value has crossed above the high alarm threshold.", - "The value of the current optical power has crossed above the high\nwarning threshold.", - "The value of the current optical power has crossed below the low alarm\nthreshold.", - "The value of the current optical power has crossed below the low\nwarning threshold.", - "The value of the current optical power has not crossed a warning\nthreshold." - ], - "type": "string" - }, - "value": { - "description": "Value of the current receiving or transmitting optical power, read in\ndBm. Take a known good optical value, give it a 10% margin and trigger\nwarnings relative to that value. In general, a -7dBm warning and a -11dBm\nalarm are good optical value estimates for most links.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkStatus": { - "id": "InterconnectDiagnosticsLinkStatus", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects,\ndescribing the ARP neighbor entries seen on this link.\nThis will be empty if the link is bundled", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "circuitId": { - "description": "The unique ID for this link assigned during turn up by Google.", - "type": "string" - }, - "googleDemarc": { - "description": "The Demarc address assigned by Google and provided in the LoA.", - "type": "string" - }, - "lacpStatus": { - "$ref": "InterconnectDiagnosticsLinkLACPStatus" - }, - "macsec": { - "$ref": "InterconnectDiagnosticsMacsecStatus", - "description": "Describes the status of MACsec encryption on this link." - }, - "operationalStatus": { - "description": "The operational status of the link.", - "enum": [ - "LINK_OPERATIONAL_STATUS_DOWN", - "LINK_OPERATIONAL_STATUS_UP" - ], - "enumDescriptions": [ - "The interface is unable to communicate with the remote end.", - "The interface has low level communication with the remote end." - ], - "type": "string" - }, - "receivingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower", - "description": "An InterconnectDiagnostics.LinkOpticalPower object,\ndescribing the current value and status of the received light level." - }, - "transmittingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower", - "description": "An InterconnectDiagnostics.LinkOpticalPower object,\ndescribing the current value and status of the transmitted light level." - } - }, - "type": "object" - }, - "InterconnectDiagnosticsMacsecStatus": { - "description": "Describes the status of MACsec encryption on the link.", - "id": "InterconnectDiagnosticsMacsecStatus", - "properties": { - "ckn": { - "description": "Indicates the Connectivity Association Key Name (CKN)\ncurrently being used if MACsec is operational.", - "type": "string" - }, - "operational": { - "description": "Indicates whether or not MACsec is operational on this link.", - "type": "boolean" - } - }, - "type": "object" - }, - "InterconnectGroup": { - "description": "An interconnect group resource allows customers to create, analyze, and\nexpand their redundant connections.", - "id": "InterconnectGroup", - "properties": { - "configured": { - "$ref": "InterconnectGroupConfigured" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Opaque system-generated token that uniquely identifies the configuration.\nIf provided when patching a configuration in update mode, the provided\ntoken must match the current token or the update is rejected. This provides\na reliable means of doing read-modify-write (optimistic locking) as\ndescribed by AIP 154.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "intent": { - "$ref": "InterconnectGroupIntent" - }, - "interconnects": { - "additionalProperties": { - "$ref": "InterconnectGroupInterconnect" - }, - "description": "Interconnects in the InterconnectGroup. Keys are arbitrary user-specified\nstrings. Users are encouraged, but not required, to use their preferred\nformat for resource links as keys.\nNote that there are add-members and remove-members methods in gcloud.\nThe size of this map is limited by an \"Interconnects per group\" quota.", - "type": "object" - }, - "kind": { - "default": "compute#InterconnectGroup", - "description": "[Output Only] Type of the resource. Always compute#InterconnectGroup", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.interconnectGroups.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalStructure": { - "$ref": "InterconnectGroupPhysicalStructure" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupConfigured": { - "description": "[Output Only] The status of the group as configured. This has the same\nstructure as the operational field reported by the OperationalStatus\nmethod, but does not take into account the operational status of each\nresource.", - "id": "InterconnectGroupConfigured", - "properties": { - "topologyCapability": { - "$ref": "InterconnectGroupConfiguredTopologyCapability" - } - }, - "type": "object" - }, - "InterconnectGroupConfiguredTopologyCapability": { - "description": "[Output Only] How reliable this topology is configured to be, and why\nthis group does or does not meet the requirements for the intended\ncapability.", - "id": "InterconnectGroupConfiguredTopologyCapability", - "properties": { - "intendedCapabilityBlockers": { - "items": { - "$ref": "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" - }, - "type": "array" - }, - "supportedSla": { - "enum": [ - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers": { - "description": "[Output Only] Reasons why configuration.topologyCapability.sla differs\nfrom intent.topologyCapability. This list is empty if and only if those\nare the same.", - "id": "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", - "properties": { - "blockerType": { - "enum": [ - "INCOMPATIBLE_METROS", - "NOT_AVAILABLE", - "NO_INTERCONNECTS", - "NO_INTERCONNECTS_IN_METRO_AND_ZONE", - "OTHER", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "documentationLink": { - "description": "[Output Only] The url of Google Cloud public documentation explaining\nthis requirement. This is set for every type of requirement.", - "type": "string" - }, - "explanation": { - "description": "[Output Only] A human-readable explanation of this requirement and\nwhy it's not met. This is set for every type of requirement.", - "type": "string" - }, - "facilities": { - "description": "[Output Only] Facilities used to explain this blocker in more detail.\nLike physicalStructure.metros.facilities.facility, this is a numeric\nstring like \"5467\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnects": { - "description": "[Output Only] Interconnects used to explain this blocker in more\ndetail.", - "items": { - "type": "string" - }, - "type": "array" - }, - "metros": { - "description": "[Output Only] Metros used to explain this blocker in more detail.\nThese are three-letter lowercase strings like \"iad\". A blocker like\nINCOMPATIBLE_METROS will specify the problematic metros in this\nfield.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zones": { - "description": "[Output Only] Zones used to explain this blocker in more detail.\nZone names are \"zone1\" and/or \"zone2\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupIntent": { - "description": "The user's intent for this group. This is the only required field besides\nthe name that must be specified on group creation.", - "id": "InterconnectGroupIntent", - "properties": { - "topologyCapability": { - "enum": [ - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupInterconnect": { - "description": "An Interconnect in this InterconnectGroup.", - "id": "InterconnectGroupInterconnect", - "properties": { - "interconnect": { - "description": "The URL of an Interconnect in this group. All Interconnects in the group\nare unique.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructure": { - "description": "[Output Only] An analysis of the physical layout of Interconnects in this\ngroup. Every Interconnect in the group is shown once in this structure.", - "id": "InterconnectGroupPhysicalStructure", - "properties": { - "metros": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetros" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetros": { - "description": "[Output Only] The metros Interconnects in this group are in.", - "id": "InterconnectGroupPhysicalStructureMetros", - "properties": { - "facilities": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetrosFacilities" - }, - "type": "array" - }, - "metro": { - "description": "[Output Only] The name of the metro, as a three-letter lowercase string\nlike \"iad\". This is the first component of the location of\nInterconnects underneath this.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetrosFacilities": { - "description": "[Output Only] The facilities Interconnects in this metro are present\nin.", - "id": "InterconnectGroupPhysicalStructureMetrosFacilities", - "properties": { - "facility": { - "description": "[Output Only] The ID of this facility, as a numeric string like\n\"5467\". This is the third component of the location of Interconnects\nin this facility.", - "type": "string" - }, - "zones": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetrosFacilitiesZones": { - "description": "[Output Only] The zones that Interconnects in this facility are\npresent in.", - "id": "InterconnectGroupPhysicalStructureMetrosFacilitiesZones", - "properties": { - "interconnects": { - "description": "[Output Only] URLs of Interconnects in this redundancy group in the\ngiven metro, facility, and zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The name of the zone, either \"zone1\" or \"zone2\".\nThis is the second component of the location of Interconnects in\nthis facility.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembers": { - "id": "InterconnectGroupsCreateMembers", - "properties": { - "intentMismatchBehavior": { - "description": "How to behave when configured.topologyCapability.supportedSLA would not\nequal intent.topologyCapability after this call.", - "enum": [ - "CREATE", - "REJECT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "interconnects": { - "items": { - "$ref": "InterconnectGroupsCreateMembersInterconnectInput" - }, - "type": "array" - }, - "templateInterconnect": { - "$ref": "InterconnectGroupsCreateMembersInterconnectInput", - "description": "Parameters for the Interconnects to create." - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembersInterconnectInput": { - "description": "LINT.IfChange", - "id": "InterconnectGroupsCreateMembersInterconnectInput", - "properties": { - "adminEnabled": { - "description": "Administrative status of the interconnect. When this is set to true, the\nInterconnect is functional and can carry traffic.\nWhen set to false, no packets can be carried over the interconnect and\nno BGP routes are exchanged over it. By default, the status is set to\ntrue.", - "type": "boolean" - }, - "customerName": { - "description": "Customer name, to put in the Letter of Authorization as the party\nauthorized to request a crossconnect.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "facility": { - "description": "A zone-free location to use for all Interconnects created in this call,\nlike \"iad-1234\".", - "type": "string" - }, - "interconnectType": { - "description": "Type of interconnect, which can take one of the following values:\n \n - PARTNER: A partner-managed interconnection shared between\n customers though a partner. \n - DEDICATED: A dedicated physical\n interconnection with the customer.\n\n Note that a value IT_PRIVATE\nhas been deprecated in favor of DEDICATED.", - "enum": [ - "DEDICATED", - "IT_PRIVATE", - "PARTNER" - ], - "enumDescriptions": [ - "A dedicated physical interconnection with the customer.", - "[Deprecated] A private, physical interconnection with the customer.", - "A partner-managed interconnection shared between customers via partner." - ], - "type": "string" - }, - "linkType": { - "description": "Type of link requested, which can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics\n - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics.\n - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4\n optics.\n\n Note that this field indicates the speed of each of the\nlinks in the bundle, not the speed of the entire bundle.", - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "name": { - "description": "Name of the Interconnects to be created. This must be specified on the\ntemplate and/or on each individual interconnect. The name, if not empty,\nmust be 1-63 characters long, and comply with RFC1035.\nSpecifically, any nonempty name must be 1-63 characters long and match\nthe regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "type": "string" - }, - "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance\nnotifications regarding this Interconnect. If specified, this will be\nused for notifications in addition to all other forms described, such as\nCloud Monitoring logs alerting and Cloud Notifications. This field is\nrequired for users who sign up for Cloud Interconnect using\nworkforce identity federation.", - "type": "string" - }, - "remoteLocation": { - "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies\nthe location outside of Google's network that the interconnect is\nconnected to.", - "type": "string" - }, - "requestedFeatures": { - "description": "Optional. List of features requested for this Interconnect connection,\nwhich can take one of the following values:\n \n - IF_MACSEC: If specified, then the connection is created on MACsec\n capable hardware ports. If not specified, non-MACsec capable ports will\n also be considered.\n - IF_CROSS_SITE_NETWORK: If specified, then the connection is created\n exclusively for Cross-Site Networking. The connection can not be used for\n Cross-Site Networking unless this feature is specified.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "requestedLinkCount": { - "description": "Target number of physical links in the link bundle, as requested by the\ncustomer.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembersRequest": { - "id": "InterconnectGroupsCreateMembersRequest", - "properties": { - "request": { - "$ref": "InterconnectGroupsCreateMembers" - } - }, - "type": "object" - }, - "InterconnectGroupsGetOperationalStatusResponse": { - "description": "Response for the InterconnectGroupsGetOperationalStatusResponse.", - "id": "InterconnectGroupsGetOperationalStatusResponse", - "properties": { - "etag": { - "type": "string" - }, - "result": { - "$ref": "InterconnectGroupsOperationalStatus" - } - }, - "type": "object" - }, - "InterconnectGroupsListResponse": { - "id": "InterconnectGroupsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectGroup resources.", - "items": { - "$ref": "InterconnectGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#InterconnectGroup", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectGroupsOperationalStatus": { - "description": "Request to get the status of the interconnect group with extra detail.", - "id": "InterconnectGroupsOperationalStatus", - "properties": { - "configured": { - "$ref": "InterconnectGroupConfigured", - "description": "The configuration analysis, as returned by Get." - }, - "groupStatus": { - "description": "Summarizes the status of the group.", - "enum": [ - "DEGRADED", - "FULLY_DOWN", - "FULLY_UP", - "GROUPS_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intent": { - "$ref": "InterconnectGroupIntent", - "description": "The intent of the resource, as returned by Get." - }, - "interconnectStatuses": { - "items": { - "$ref": "InterconnectGroupsOperationalStatusInterconnectStatus" - }, - "type": "array" - }, - "operational": { - "$ref": "InterconnectGroupConfigured", - "description": "The operational state of the group, including only active Interconnects." - } - }, - "type": "object" - }, - "InterconnectGroupsOperationalStatusInterconnectStatus": { - "description": "The status of one Interconnect in the group. The order is arbitrary.", - "id": "InterconnectGroupsOperationalStatusInterconnectStatus", - "properties": { - "adminEnabled": { - "description": "Whether the Interconnect is enabled.", - "type": "boolean" - }, - "diagnostics": { - "$ref": "InterconnectDiagnostics", - "description": "The diagnostics of the Interconnect, as returned by the existing\nget-diagnostics method." - }, - "interconnect": { - "description": "The URL of the Interconnect being described.", - "type": "string" - }, - "isActive": { - "description": "Whether this interconnect is participating in the redundant\nconfiguration.", - "enum": [ - "ACTIVE", - "INACTIVE", - "IS_ACTIVE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectList": { - "description": "Response to the list request, and contains a list of interconnects.", - "id": "InterconnectList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Interconnect resources.", - "items": { - "$ref": "Interconnect" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectList for lists of interconnects.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectLocation": { - "description": "Represents an Interconnect Attachment (VLAN) Location resource.\n\nYou can use this resource to find location details about an Interconnect\nattachment (VLAN). For more information about interconnect attachments, read\nCreating VLAN Attachments.", - "id": "InterconnectLocation", - "properties": { - "address": { - "description": "[Output Only] The postal address of the Point of Presence, each line in\nthe address is separated by a newline character.", - "type": "string" - }, - "availabilityZone": { - "description": "[Output Only] Availability zone for this InterconnectLocation. Within a\nmetropolitan area (metro), maintenance will not be simultaneously scheduled\nin more than one availability zone. Example: \"zone1\" or \"zone2\".", - "type": "string" - }, - "availableFeatures": { - "description": "[Output only] List of features available at this InterconnectLocation,\nwhich can take one of the following values:\n \n - IF_MACSEC\n - IF_CROSS_SITE_NETWORK", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "availableLinkTypes": { - "description": "[Output only] List of link types available at this InterconnectLocation,\nwhich can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR\n - LINK_TYPE_ETHERNET_100G_LR\n - LINK_TYPE_ETHERNET_400G_LR4", - "items": { - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "type": "array" - }, - "city": { - "description": "[Output Only] Metropolitan area designator that indicates which city an\ninterconnect is located.\nFor example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", - "type": "string" - }, - "continent": { - "description": "[Output Only] Continent for this location, which can take one of the\nfollowing values:\n \n - AFRICA\n - ASIA_PAC\n - EUROPE\n - NORTH_AMERICA\n - SOUTH_AMERICA", - "enum": [ - "AFRICA", - "ASIA_PAC", - "C_AFRICA", - "C_ASIA_PAC", - "C_EUROPE", - "C_NORTH_AMERICA", - "C_SOUTH_AMERICA", - "EUROPE", - "NORTH_AMERICA", - "SOUTH_AMERICA" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "crossSiteInterconnectInfos": { - "description": "[Output Only] A list of InterconnectLocation.CrossSiteInterconnectInfo\nobjects, that describe where Cross-Site Interconnect wires may connect to\nfrom this location and associated connection parameters. Cross-Site\nInterconnect isn't allowed to locations which are not listed.", - "items": { - "$ref": "InterconnectLocationCrossSiteInterconnectInfo" - }, - "type": "array" - }, - "description": { - "description": "[Output Only] An optional description of the resource.", - "type": "string" - }, - "facilityProvider": { - "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", - "type": "string" - }, - "facilityProviderFacilityId": { - "description": "[Output Only] A provider-assigned Identifier for this facility (e.g.,\nAshburn-DC1).", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#interconnectLocation", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectLocation for interconnect locations.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "peeringdbFacilityId": { - "description": "[Output Only] The peeringdb identifier for this facility (corresponding\nwith a netfac type in peeringdb).", - "type": "string" - }, - "regionInfos": { - "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that\ndescribe parameters pertaining to the relation between this\nInterconnectLocation and various Google Cloud regions.", - "items": { - "$ref": "InterconnectLocationRegionInfo" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "singleRegionProductionCriticalPeerLocations": { - "description": "[Output Only] URLs of the other locations that can pair up with this\nlocation to support Single-Region 99.99% SLA. E.g. iad-zone1-1 and\niad-zone2-5467 are Single-Region 99.99% peer locations of each other.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "[Output Only] The status of this InterconnectLocation, which can take one\nof the following values:\n \n - CLOSED: The InterconnectLocation is closed and is unavailable for\n provisioning new Interconnects.\n - AVAILABLE: The InterconnectLocation is available for provisioning new\n Interconnects.", - "enum": [ - "AVAILABLE", - "CLOSED" - ], - "enumDescriptions": [ - "The InterconnectLocation is available for provisioning new Interconnects.", - "The InterconnectLocation is closed for provisioning new Interconnects." - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - } - }, - "type": "object" - }, - "InterconnectLocationCrossSiteInterconnectInfo": { - "description": "Information about Cross-Site Interconnect wires which may be created\nbetween the containing location and another remote location.", - "id": "InterconnectLocationCrossSiteInterconnectInfo", - "properties": { - "city": { - "description": "The remote location for Cross-Site Interconnect wires. This specifies an\nInterconnectLocation city (metropolitan area designator), which itself\nmay match multiple InterconnectLocations.", - "type": "string" - }, - "maxSingleFlowGbps": { - "description": "The maximum gbps for a single flow to this metro.\nThis limits the total bandwidth which may be configured per wire.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectLocationList": { - "description": "Response to the list request, and contains a list of interconnect locations.", - "id": "InterconnectLocationList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectLocation resources.", - "items": { - "$ref": "InterconnectLocation" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectLocationList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectLocationList for lists of interconnect\nlocations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectLocationRegionInfo": { - "description": "Information about any potential InterconnectAttachments between an\nInterconnect at a specific InterconnectLocation, and a specific Cloud\nRegion.", - "id": "InterconnectLocationRegionInfo", - "properties": { - "expectedRttMs": { - "description": "Expected round-trip time in milliseconds, from this InterconnectLocation\nto a VM in this region.", - "format": "int64", - "type": "string" - }, - "l2ForwardingEnabled": { - "description": "Identifies whether L2 Interconnect Attachments can be created in this\nregion for interconnects that are in this location.", - "type": "boolean" - }, - "locationPresence": { - "description": "Identifies the network presence of this location.", - "enum": [ - "GLOBAL", - "LOCAL_REGION", - "LP_GLOBAL", - "LP_LOCAL_REGION" - ], - "enumDescriptions": [ - "This region is not in any common network presence with this\nInterconnectLocation.", - "This region shares the same regional network presence as this\nInterconnectLocation.", - "[Deprecated] This region is not in any common network presence with\nthis InterconnectLocation.", - "[Deprecated] This region shares the same regional network presence as\nthis InterconnectLocation." - ], - "type": "string" - }, - "region": { - "description": "URL for the region of this location.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectMacsec": { - "description": "Configuration information for enabling Media Access Control security\n(MACsec) on this Cloud Interconnect connection between Google and your\non-premises router.", - "id": "InterconnectMacsec", - "properties": { - "failOpen": { - "description": "If set to true, the Interconnect connection is configured with ashould-secure MACsec security policy, that allows the Google\nrouter to fallback to cleartext traffic if the MKA session cannot be\nestablished. By default, the Interconnect connection is configured with amust-secure security policy that drops all traffic if the\nMKA session cannot be established with your router.", - "type": "boolean" - }, - "preSharedKeys": { - "description": "Required. A keychain placeholder describing a set of named key objects\nalong with their start times. A MACsec CKN/CAK is generated for each\nkey in the key chain. Google router automatically picks the key with\nthe most recent startTime when establishing or re-establishing a MACsec\nsecure link.", - "items": { - "$ref": "InterconnectMacsecPreSharedKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectMacsecConfig": { - "description": "MACsec configuration information for the Interconnect connection. Contains\nthe generated Connectivity Association Key Name (CKN) and the key (CAK) for\nthis Interconnect connection.", - "id": "InterconnectMacsecConfig", - "properties": { - "preSharedKeys": { - "description": "A keychain placeholder describing a set of named key objects\nalong with their start times. A MACsec CKN/CAK is generated for each key in\nthe key chain. Google router automatically picks the key with the most\nrecent startTime when establishing or re-establishing a MACsec secure link.", - "items": { - "$ref": "InterconnectMacsecConfigPreSharedKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectMacsecConfigPreSharedKey": { - "description": "Describes a pre-shared key used to setup MACsec in static connectivity\nassociation key (CAK) mode.", - "id": "InterconnectMacsecConfigPreSharedKey", - "properties": { - "cak": { - "description": "An auto-generated Connectivity Association Key (CAK) for this key.", - "type": "string" - }, - "ckn": { - "description": "An auto-generated Connectivity Association Key Name (CKN) for this key.", - "type": "string" - }, - "name": { - "description": "User provided name for this pre-shared key.", - "type": "string" - }, - "startTime": { - "description": "User provided timestamp on or after which this key is valid.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectMacsecPreSharedKey": { - "description": "Describes a pre-shared key used to setup MACsec in static connectivity\nassociation key (CAK) mode.", - "id": "InterconnectMacsecPreSharedKey", - "properties": { - "name": { - "description": "Required. A name for this pre-shared key.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be\na dash.", - "type": "string" - }, - "startTime": { - "description": "A RFC3339 timestamp on or after which the key is\nvalid. startTime can be in the future. If the keychain has a single\nkey, startTime can be omitted. If the keychain has multiple keys,\nstartTime is mandatory for each key. The start times of keys must be in\nincreasing order. The start times of two consecutive keys must be\nat least 6 hours apart.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectOutageNotification": { - "description": "Description of a planned outage on this Interconnect.", - "id": "InterconnectOutageNotification", - "properties": { - "affectedCircuits": { - "description": "If issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit\nIDs that will be affected.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "A description about the purpose of the outage.", - "type": "string" - }, - "endTime": { - "description": "Scheduled end time for the outage (milliseconds since Unix\nepoch).", - "format": "int64", - "type": "string" - }, - "issueType": { - "description": "Form this outage is expected to take, which can take one of the following\nvalues:\n \n - OUTAGE: The Interconnect may be completely out of service for\n some or all of the specified window.\n - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole\n should remain up, but with reduced bandwidth.\n\n\nNote that the versions of this enum prefixed with \"IT_\" have been\ndeprecated in favor of the unprefixed values.", - "enum": [ - "IT_OUTAGE", - "IT_PARTIAL_OUTAGE", - "OUTAGE", - "PARTIAL_OUTAGE" - ], - "enumDescriptions": [ - "[Deprecated] The Interconnect may be completely out of service for some\nor all of the specified window.", - "[Deprecated] Some circuits comprising the Interconnect will be out of\nservice during the expected window. The interconnect as a whole should\nremain up, albeit with reduced bandwidth.", - "The Interconnect may be completely out of service for some or all of\nthe specified window.", - "Some circuits comprising the Interconnect will be out of service during\nthe expected window. The interconnect as a whole should remain\nup, albeit with reduced bandwidth." - ], - "type": "string" - }, - "name": { - "description": "Unique identifier for this outage notification.", - "type": "string" - }, - "source": { - "description": "The party that generated this notification, which can take the following\nvalue:\n \n - GOOGLE: this notification as generated by Google.\n\n\nNote that the value of NSRC_GOOGLE has been deprecated in favor of\nGOOGLE.", - "enum": [ - "GOOGLE", - "NSRC_GOOGLE" - ], - "enumDescriptions": [ - "This notification was generated by Google.", - "[Deprecated] This notification was generated by Google." - ], - "type": "string" - }, - "startTime": { - "description": "Scheduled start time for the outage (milliseconds since Unix\nepoch).", - "format": "int64", - "type": "string" - }, - "state": { - "description": "State of this notification, which can take one of the following values:\n \n - ACTIVE: This outage notification is active. The event could be in\n the past, present, or future. See start_time and end_time for\n scheduling.\n - CANCELLED: The outage associated with this notification was cancelled\n before the outage was due to start.\n - COMPLETED: The outage associated with this notification is complete.\n\n\nNote that the versions of this enum prefixed with \"NS_\" have been\ndeprecated in favor of the unprefixed values.", - "enum": [ - "ACTIVE", - "CANCELLED", - "COMPLETED", - "NS_ACTIVE", - "NS_CANCELED" - ], - "enumDescriptions": [ - "This outage notification is active. The event could be in the future,\npresent, or past. See start_time and end_time for scheduling.", - "The outage associated with this notification was cancelled before the\noutage was due to start.", - "The outage associated with this notification is complete.", - "[Deprecated] This outage notification is active. The event could be in\nthe future, present, or past. See start_time and end_time for\nscheduling.", - "[Deprecated] The outage associated with this notification was canceled\nbefore the outage was due to start." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectParams": { - "description": "Additional interconnect parameters.", - "id": "InterconnectParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "InterconnectRemoteLocation": { - "description": "Represents a Cross-Cloud Interconnect Remote Location resource.\n\nYou can use this resource to find remote location details about an\nInterconnect attachment (VLAN).", - "id": "InterconnectRemoteLocation", - "properties": { - "address": { - "description": "[Output Only] The postal address of the Point of Presence, each line in\nthe address is separated by a newline character.", - "type": "string" - }, - "attachmentConfigurationConstraints": { - "$ref": "InterconnectAttachmentConfigurationConstraints", - "description": "[Output Only] Subset of fields from InterconnectAttachment's\n|configurationConstraints| field that apply to all attachments for this\nremote location." - }, - "city": { - "description": "[Output Only] Metropolitan area designator that indicates which city an\ninterconnect is located.\nFor example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", - "type": "string" - }, - "constraints": { - "$ref": "InterconnectRemoteLocationConstraints", - "description": "[Output Only] Constraints on the parameters for creating Cross-Cloud\nInterconnect and associated InterconnectAttachments." - }, - "continent": { - "description": "[Output Only] Continent for this location, which can take one of the\nfollowing values:\n \n - AFRICA\n - ASIA_PAC\n - EUROPE\n - NORTH_AMERICA\n - SOUTH_AMERICA", - "enum": [ - "AFRICA", - "ASIA_PAC", - "EUROPE", - "NORTH_AMERICA", - "SOUTH_AMERICA" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] An optional description of the resource.", - "type": "string" - }, - "facilityProvider": { - "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", - "type": "string" - }, - "facilityProviderFacilityId": { - "description": "[Output Only] A provider-assigned Identifier for this facility (e.g.,\nAshburn-DC1).", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#interconnectRemoteLocation", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectRemoteLocation for interconnect remote\nlocations.", - "type": "string" - }, - "lacp": { - "description": "[Output Only] Link Aggregation Control Protocol (LACP) constraints, which\ncan take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED", - "enum": [ - "LACP_SUPPORTED", - "LACP_UNSUPPORTED" - ], - "enumDescriptions": [ - "LACP_SUPPORTED: LACP is supported, and enabled by default on\nthe Cross-Cloud Interconnect.", - "LACP_UNSUPPORTED: LACP is not supported and is not be enabled on this\nport. GetDiagnostics shows bundleAggregationType as \"static\". GCP does\nnot support LAGs without LACP, so requestedLinkCount must be 1." - ], - "type": "string" - }, - "maxLagSize100Gbps": { - "description": "[Output Only]\nThe maximum number of 100 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 100 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_100_gbps.", - "format": "int32", - "type": "integer" - }, - "maxLagSize10Gbps": { - "description": "[Output Only]\nThe maximum number of 10 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 10 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_10_gbps.", - "format": "int32", - "type": "integer" - }, - "maxLagSize400Gbps": { - "description": "[Output Only]\nThe maximum number of 400 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 400 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_400_gbps.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "peeringdbFacilityId": { - "description": "[Output Only] The peeringdb identifier for this facility (corresponding\nwith a netfac type in peeringdb).", - "type": "string" - }, - "permittedConnections": { - "description": "[Output Only] Permitted connections.", - "items": { - "$ref": "InterconnectRemoteLocationPermittedConnections" - }, - "type": "array" - }, - "remoteService": { - "description": "[Output Only] Indicates the service provider present at the remote\nlocation. Example values: \"Amazon Web Services\", \"Microsoft Azure\".", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of this InterconnectRemoteLocation, which can take\none of the following values:\n \n - CLOSED: The InterconnectRemoteLocation is closed and is unavailable\n for provisioning new Cross-Cloud Interconnects. \n - AVAILABLE: The\n InterconnectRemoteLocation is available for provisioning new\n Cross-Cloud Interconnects.", - "enum": [ - "AVAILABLE", - "CLOSED" - ], - "enumDescriptions": [ - "The InterconnectRemoteLocation is available for provisioning new\nCross-Cloud Interconnects.", - "The InterconnectRemoteLocation is closed for provisioning new\nCross-Cloud Interconnects." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationConstraints": { - "id": "InterconnectRemoteLocationConstraints", - "properties": { - "portPairRemoteLocation": { - "description": "[Output Only] Port pair remote location constraints, which can take one\nof the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION,\nPORT_PAIR_MATCHING_REMOTE_LOCATION.\n\nGoogle Cloud API refers only to individual ports, but the UI uses this\nfield when ordering a pair of ports, to prevent users from accidentally\nordering something that is incompatible with their cloud provider.\nSpecifically, when ordering a redundant pair of Cross-Cloud Interconnect\nports, and one of them uses a remote location with\nportPairMatchingRemoteLocation set to matching, the UI requires that\nboth ports use the same remote location.", - "enum": [ - "PORT_PAIR_MATCHING_REMOTE_LOCATION", - "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - ], - "enumDescriptions": [ - "If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider\nallocates ports in pairs, and the user should choose the same remote\nlocation for both ports.", - "If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision\na redundant pair of Cross-Cloud Interconnects using two different\nremote locations in the same city." - ], - "type": "string" - }, - "portPairVlan": { - "description": "[Output Only] Port pair VLAN constraints, which can take one of the\nfollowing values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN", - "enum": [ - "PORT_PAIR_MATCHING_VLAN", - "PORT_PAIR_UNCONSTRAINED_VLAN" - ], - "enumDescriptions": [ - "If PORT_PAIR_MATCHING_VLAN, the Interconnect for this attachment is\npart of a pair of ports that should have matching VLAN allocations.\nThis occurs with Cross-Cloud Interconnect to Azure remote locations.\nWhile GCP's API does not explicitly group pairs of ports, the UI uses\nthis field to ensure matching VLAN ids when configuring a redundant\nVLAN pair.", - "PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint." - ], - "type": "string" - }, - "subnetLengthRange": { - "$ref": "InterconnectRemoteLocationConstraintsSubnetLengthRange", - "description": "[Output Only]\n\n[min-length, max-length] \n\nThe minimum and maximum value (inclusive) for the IPv4 subnet\nlength.\n\n For example, an interconnectRemoteLocation for Azure has {min: 30,\nmax:\n30} because Azure requires /30 subnets. \n\nThis range specifies the values supported by both cloud providers.\nInterconnect currently supports /29 and /30 IPv4 subnet lengths. If a\nremote cloud has no constraint on IPv4 subnet length, the range would\nthus be {min: 29, max: 30}." - } - }, - "type": "object" - }, - "InterconnectRemoteLocationConstraintsSubnetLengthRange": { - "id": "InterconnectRemoteLocationConstraintsSubnetLengthRange", - "properties": { - "max": { - "format": "int32", - "type": "integer" - }, - "min": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationList": { - "description": "Response to the list request, and contains a list of interconnect remote\nlocations.", - "id": "InterconnectRemoteLocationList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectRemoteLocation resources.", - "items": { - "$ref": "InterconnectRemoteLocation" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectRemoteLocationList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectRemoteLocationList for lists of\ninterconnect remote locations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token lets you get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationPermittedConnections": { - "id": "InterconnectRemoteLocationPermittedConnections", - "properties": { - "interconnectLocation": { - "description": "[Output Only] URL of an Interconnect location that is permitted to\nconnect to this Interconnect remote location.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectsGetDiagnosticsResponse": { - "description": "Response for the InterconnectsGetDiagnosticsRequest.", - "id": "InterconnectsGetDiagnosticsResponse", - "properties": { - "result": { - "$ref": "InterconnectDiagnostics" - } - }, - "type": "object" - }, - "InterconnectsGetMacsecConfigResponse": { - "description": "Response for the InterconnectsGetMacsecConfigRequest.", - "id": "InterconnectsGetMacsecConfigResponse", - "properties": { - "etag": { - "description": "end_interface: MixerGetResponseWithEtagBuilder", - "type": "string" - }, - "result": { - "$ref": "InterconnectMacsecConfig" - } - }, - "type": "object" - }, - "InternalIpAddress": { - "id": "InternalIpAddress", - "properties": { - "cidr": { - "description": "IP CIDR address or range.", - "type": "string" - }, - "owner": { - "description": "The owner of the internal IP address.", - "type": "string" - }, - "purpose": { - "description": "The purpose of the internal IP address if applicable.", - "type": "string" - }, - "region": { - "description": "The region of the internal IP address if applicable.", - "type": "string" - }, - "type": { - "description": "The type of the internal IP address.", - "enum": [ - "PEER_RESERVED", - "PEER_USED", - "REMOTE_RESERVED", - "REMOTE_USED", - "RESERVED", - "SUBNETWORK", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Reserved IP ranges on peer networks.", - "Used IP ranges on peer networks, including peer subnetwork IP ranges.", - "Reserved IP ranges on peer networks of peer networks.", - "Used IP ranges on peer networks of peer networks.", - "Reserved IP ranges on local network.", - "Subnetwork IP ranges on local network.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InternalIpOwner": { - "id": "InternalIpOwner", - "properties": { - "ipCidrRange": { - "description": "IP CIDR range being owned.", - "type": "string" - }, - "owners": { - "description": "URLs of the IP owners of the IP CIDR range.", - "items": { - "type": "string" - }, - "type": "array" - }, - "systemOwned": { - "description": "Whether this IP CIDR range is reserved for system use.", - "type": "boolean" - } - }, - "type": "object" - }, - "IpAddressesList": { - "id": "IpAddressesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InternalIpAddress resources.", - "items": { - "$ref": "InternalIpAddress" - }, - "type": "array" - }, - "kind": { - "default": "compute#ipAddressesList", - "description": "[Output Only] Type of resource. Always compute#ipAddressesList\nfor IP addresses lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "IpOwnerList": { - "description": "Contains a list of IP owners.", - "id": "IpOwnerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InternalIpOwner resources.", - "items": { - "$ref": "InternalIpOwner" - }, - "type": "array" - }, - "kind": { - "default": "compute#ipOwnerList", - "description": "[Output Only] Type of resource. Always compute#ipOwnerList for\nlists of IP owners.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Jwt": { - "description": "[Deprecated] JWT configuration for origin authentication.\nJWT configuration for origin authentication.", - "id": "Jwt", - "properties": { - "audiences": { - "description": "A JWT containing any of these audiences will be accepted. The service name\nwill be accepted if audiences is empty.\nExamples: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "description": "Identifies the issuer that issued the JWT, which is usually a URL or an\nemail address.\nExamples: https://securetoken.google.com,\n 1234567-compute@developer.gserviceaccount.com", - "type": "string" - }, - "jwksPublicKeys": { - "description": "The provider's public key set to validate the signature of the JWT.", - "type": "string" - }, - "jwtHeaders": { - "description": "jwt_headers and jwt_params define where to extract the JWT from an HTTP\nrequest. If no explicit location is specified, the following default\nlocations are tried in order:\n\n1. The Authorization header using the Bearer schema. See `here\n `_. Example:\n\n Authorization: Bearer .\n\n2. `access_token` query parameter. See `this\n`_\n\nMultiple JWTs can be verified for a request. Each JWT has to be extracted\nfrom the locations its issuer specified or from the default locations.\n\nThis field is set if JWT is sent in a request header. This field specifies\nthe header name. For example, if `header=x-goog-iap-jwt-assertion`, the\nheader format will be x-goog-iap-jwt-assertion: .", - "items": { - "$ref": "JwtHeader" - }, - "type": "array" - }, - "jwtParams": { - "description": "This field is set if JWT is sent in a query parameter. This field specifies\nthe query parameter name. For example, if jwt_params[0] is jwt_token, the\nJWT format in the query parameter is /path?jwt_token=.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "JwtHeader": { - "description": "[Deprecated] This message specifies a header location to extract JWT token.\nThis message specifies a header location to extract JWT token.", - "id": "JwtHeader", - "properties": { - "name": { - "description": "The HTTP header name.", - "type": "string" - }, - "valuePrefix": { - "description": "The value prefix. The value format is \"value_prefix\"\nFor example, for \"Authorization: Bearer \", value_prefix=\"Bearer \"\nwith a space at the end.", - "type": "string" - } - }, - "type": "object" - }, - "License": { - "description": "Represents a License resource.\n\nA License represents billing and aggregate usage data forpublic andmarketplace images.\n *Caution* This resource is intended for\nuse only by third-party partners who are creatingCloud Marketplace\nimages.", - "id": "License", - "properties": { - "allowedReplacementLicenses": { - "description": "Specifies licenseCodes of licenses that can replace this license. Note:\nsuch replacements are allowed even if removable_from_disk is false.", - "items": { - "type": "string" - }, - "type": "array" - }, - "appendableToDisk": { - "description": "If true, this license can be appended to an existing disk's set of\nlicenses.", - "type": "boolean" - }, - "chargesUseFee": { - "description": "[Output Only] Deprecated. This field no longer reflects whether a license\ncharges a usage fee.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client\nwhen the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "incompatibleLicenses": { - "description": "Specifies licenseCodes of licenses that are incompatible with this license.\nIf a license is incompatible with this license, it cannot be attached to\nthe same disk or image.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#license", - "description": "[Output Only] Type of resource. Always compute#license for\nlicenses.", - "type": "string" - }, - "licenseCode": { - "description": "[Output Only] The unique code used to attach this license to images,\nsnapshots, and disks.", - "format": "uint64", - "type": "string" - }, - "minimumRetention": { - "$ref": "Duration", - "description": "If set, this license will be unable to be removed or replaced once attached\nto a disk until the minimum_retention period has passed." - }, - "multiTenantOnly": { - "description": "If true, this license can only be used on VMs on multi tenant nodes.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.images.insert" - ] - }, - "description": "Name of the resource. The name must be 1-63 characters long and\ncomply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "osLicense": { - "description": "If true, indicates this is an OS license. Only one OS license can be\nattached to a disk or image at a time.", - "type": "boolean" - }, - "removableFromDisk": { - "description": "If true, this license can be removed from a disk's set of licenses, with no\nreplacement license needed.", - "type": "boolean" - }, - "requiredCoattachedLicenses": { - "description": "Specifies the set of permissible coattached licenseCodes of licenses that\nsatisfy the coattachment requirement of this license. At least one license\nfrom the set must be attached to the same disk or image as this license.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceRequirements": { - "$ref": "LicenseResourceRequirements", - "description": "[Input Only] Deprecated." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "soleTenantOnly": { - "description": "If true, this license can only be used on VMs on sole tenant nodes.", - "type": "boolean" - }, - "transferable": { - "description": "If false, licenses will not be copied from the source resource when\ncreating an image from a disk, disk from snapshot, or snapshot from disk.", - "type": "boolean" - }, - "updateTimestamp": { - "description": "[Output Only] Last update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseCode": { - "description": "Represents a License Code resource.\n\nA License Code is a unique identifier used to represent alicense\nresource.\n *Caution* This resource is intended for\nuse only by third-party partners who are creatingCloud Marketplace\nimages.", - "id": "LicenseCode", - "properties": { - "allowedReplacementLicenses": { - "description": "Specifies licenseCodes of licenses that can replace this license. Note:\nsuch replacements are allowed even if removable_from_disk is false.", - "items": { - "type": "string" - }, - "type": "array" - }, - "appendableToDisk": { - "description": "If true, this license can be appended to an existing disk's set of\nlicenses.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] Description of this License Code.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "incompatibleLicenses": { - "description": "Specifies licenseCodes of licenses that are incompatible with this license.\nIf a license is incompatible with this license, it cannot be attached to\nthe same disk or image.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#licenseCode", - "description": "[Output Only] Type of resource. Always compute#licenseCode for\nlicenses.", - "type": "string" - }, - "licenseAlias": { - "description": "[Output Only] URL and description aliases of Licenses with the same\nLicense Code.", - "items": { - "$ref": "LicenseCodeLicenseAlias" - }, - "type": "array" - }, - "minimumRetention": { - "$ref": "Duration", - "description": "If set, this license will be unable to be removed or replaced once attached\nto a disk until the minimum_retention period has passed." - }, - "multiTenantOnly": { - "description": "If true, this license can only be used on VMs on multi tenant nodes.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.licenses.insert" - ] - }, - "description": "[Output Only] Name of the resource. The name is 1-20 characters long and\nmust be a valid 64 bit integer.", - "pattern": "[0-9]{0,20}?", - "type": "string" - }, - "osLicense": { - "description": "If true, indicates this is an OS license. Only one OS license can be\nattached to a disk or image at a time.", - "type": "boolean" - }, - "removableFromDisk": { - "description": "If true, this license can be removed from a disk's set of licenses, with no\nreplacement license needed.", - "type": "boolean" - }, - "requiredCoattachedLicenses": { - "description": "Specifies the set of permissible coattached licenseCodes of licenses that\nsatisfy the coattachment requirement of this license. At least one license\nfrom the set must be attached to the same disk or image as this license.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "soleTenantOnly": { - "description": "If true, this license can only be used on VMs on sole tenant nodes.", - "type": "boolean" - }, - "state": { - "description": "[Output Only] Current state of this License Code.", - "enum": [ - "DISABLED", - "ENABLED", - "RESTRICTED", - "STATE_UNSPECIFIED", - "TERMINATED" - ], - "enumDescriptions": [ - "Machines are not allowed to attach boot disks with this License Code.\nRequests to create new resources with this license will be rejected.", - "Use is allowed for anyone with USE_READ_ONLY access to this License Code.", - "Use of this license is limited to a project whitelist.", - "", - "Reserved state." - ], - "type": "string" - }, - "transferable": { - "description": "[Output Only] If true, the license will remain attached when creating\nimages or snapshots from disks. Otherwise, the license is not transferred.", - "type": "boolean" - }, - "updateTimestamp": { - "description": "[Output Only] Last update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseCodeLicenseAlias": { - "id": "LicenseCodeLicenseAlias", - "properties": { - "description": { - "description": "[Output Only] Description of this License Code.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] URL of license corresponding to this License Code.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseResourceCommitment": { - "description": "Commitment for a particular license resource.", - "id": "LicenseResourceCommitment", - "properties": { - "amount": { - "description": "The number of licenses you plan to purchase.", - "format": "int64", - "type": "string" - }, - "coresPerLicense": { - "description": "The number of cores per license.", - "type": "string" - }, - "license": { - "description": "The applicable license URI.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseResourceRequirements": { - "id": "LicenseResourceRequirements", - "properties": { - "minGuestCpuCount": { - "description": "[Input Only] Deprecated. This field no longer reflects the minimum number\nof guest cpus required to use the Instance.", - "format": "int32", - "type": "integer" - }, - "minMemoryMb": { - "description": "[Input Only] Deprecated. This field no longer reflects the minimum memory\nrequired to use the Instance.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "LicensesListResponse": { - "id": "LicensesListResponse", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of License resources.", - "items": { - "$ref": "License" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ListInstantSnapshotGroups": { - "description": "Contains a list of InstantSnapshotGroup resources.", - "id": "ListInstantSnapshotGroups", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstantSnapshotGroup resources.", - "items": { - "$ref": "InstantSnapshotGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#instantSnapshotGroupsList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ListSnapshotGroups": { - "description": "Contains a list of SnapshotGroup resources.", - "id": "ListSnapshotGroups", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SnapshotGroup resources.", - "items": { - "$ref": "SnapshotGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#snapshotGroupsList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "LocalDisk": { - "id": "LocalDisk", - "properties": { - "diskCount": { - "description": "Specifies the number of such disks.", - "format": "int32", - "type": "integer" - }, - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int32", - "type": "integer" - }, - "diskType": { - "description": "Specifies the desired disk type on the node. This disk type must be a\nlocal storage type (e.g.: local-ssd).\nNote that for nodeTemplates, this should be the name of the disk type and\nnot its URL.", - "type": "string" - } - }, - "type": "object" - }, - "LocalizedMessage": { - "description": "Provides a localized error message that is safe to return to the user\nwhich can be attached to an RPC error.", - "id": "LocalizedMessage", - "properties": { - "locale": { - "description": "The locale used following the specification defined at\nhttps://www.rfc-editor.org/rfc/bcp/bcp47.txt.\nExamples are: \"en-US\", \"fr-CH\", \"es-MX\"", - "type": "string" - }, - "message": { - "description": "The localized error message in the above locale.", - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicy": { - "description": "Configuration for location policy among multiple possible locations\n(e.g. preferences for zone selection among zones in a single region).", - "id": "LocationPolicy", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "LocationPolicyLocation" - }, - "description": "Location configurations mapped by location name.\nCurrently only zone names are supported and must be represented as valid\ninternal URLs, such as zones/us-central1-a.", - "type": "object" - }, - "targetShape": { - "description": "Strategy for distributing VMs across zones in a region.", - "enum": [ - "ANY", - "ANY_SINGLE_ZONE", - "BALANCED" - ], - "enumDescriptions": [ - "GCE picks zones for creating VM instances to fulfill the requested\nnumber of VMs within present resource constraints and to maximize\nutilization of unused zonal reservations. Recommended for batch workloads\nthat do not require high availability.", - "GCE always selects a single zone for all the VMs, optimizing for resource\nquotas, available reservations and general capacity. Recommended for\nbatch workloads that cannot tollerate distribution over multiple zones.\nThis the default shape in Bulk Insert and Capacity Advisor APIs.", - "GCE prioritizes acquisition of resources, scheduling VMs in zones\nwhere resources are available while distributing VMs as evenly as\npossible across allowed zones to minimize the impact of zonal failure.\nRecommended for highly available serving workloads." - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicyLocation": { - "id": "LocationPolicyLocation", - "properties": { - "constraints": { - "$ref": "LocationPolicyLocationConstraints", - "description": "Constraints that the caller requires on the result distribution\nin this zone." - }, - "names": { - "description": "Names of resources to be put in the location.\nMust contain unique, correct resource names.\nIf used, targetShape must be left unset.", - "items": { - "type": "string" - }, - "type": "array" - }, - "preference": { - "description": "Preference for a given location. Set to either ALLOW orDENY.", - "enum": [ - "ALLOW", - "DENY", - "PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Location is allowed for use.", - "Location is prohibited.", - "Default value, unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicyLocationConstraints": { - "description": "Per-zone constraints on location policy for this zone.", - "id": "LocationPolicyLocationConstraints", - "properties": { - "maxCount": { - "description": "Maximum number of items that are allowed to be placed in this zone.\nThe value must be non-negative.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "MachineImage": { - "description": "Represents a machine image resource.\n\nA machine image is a Compute Engine resource that stores all the\nconfiguration, metadata, permissions, and data from one or more disks\nrequired to create a Virtual machine (VM) instance. For more information, seeMachine images.", - "id": "MachineImage", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this machine image inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent machine image by\ninforming the OS to prepare for the snapshot process.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] A unique identifier for this machine image. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "instanceProperties": { - "$ref": "InstanceProperties", - "description": "[Output Only] Properties of source instance" - }, - "kind": { - "default": "compute#machineImage", - "description": "[Output Only] The resource type, which is alwayscompute#machineImage for machine image.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this machine image, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\nmachine image.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this machine image. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "machineImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the machine image using acustomer-supplied\nencryption key.\n\nAfter you encrypt a machine image using a customer-supplied key, you must\nprovide the same key if you use the machine image later. For example, you\nmust provide the encryption key when you create an instance from the\nencrypted machine image in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the\nmachine image.\n\nIf you do not provide an encryption key when creating the machine image,\nthen the machine image will be encrypted using an automatically generated\nkey and you do not need to provide a key to use the machine image later." - }, - "name": { - "annotations": { - "required": [ - "compute.machineImages.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "MachineImageParams", - "description": "Input only. [Input Only] Additional parameters that are passed in the request, but are\nnot persisted in the resource." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "savedDisks": { - "description": "An array of Machine Image specific properties for disks attached to the\nsource instance", - "items": { - "$ref": "SavedDisk" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] The URL for this machine image. The server defines this URL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "sourceDiskEncryptionKeys": { - "description": "[Input Only] Thecustomer-supplied\nencryption key of the disks attached to the source instance. Required\nif the source disk is protected by a customer-supplied encryption key.", - "items": { - "$ref": "SourceDiskEncryptionKey" - }, - "type": "array" - }, - "sourceInstance": { - "description": "The source instance used to create the machine image. You can provide this\nas a partial or full URL to the resource. For example, the following are\nvalid values: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance", - "type": "string" - }, - "sourceInstanceProperties": { - "$ref": "SourceInstanceProperties", - "description": "[Output Only] DEPRECATED: Please use instance_properties\ninstead for source instance related properties. New properties will not be\nadded to this field." - }, - "status": { - "description": "[Output Only] The status of the machine image. One of the following values:INVALID, CREATING, READY,DELETING, and UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "storageLocations": { - "description": "The regional or multi-regional Cloud Storage bucket location where themachine image is\nstored.", - "items": { - "type": "string" - }, - "type": "array" - }, - "totalStorageBytes": { - "description": "[Output Only] Total size of the storage used by the machine image.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "MachineImageList": { - "description": "A list of machine images.", - "id": "MachineImageList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of MachineImage resources.", - "items": { - "$ref": "MachineImage" - }, - "type": "array" - }, - "kind": { - "default": "compute#machineImageList", - "description": "[Output Only] The resource type, which is alwayscompute#machineImagesListResponse for machine image lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineImageParams": { - "description": "Machine Image parameters", - "id": "MachineImageParams", - "properties": { - "excludedDisks": { - "description": "Input only. [Input Only] Specifies the list of disk device names that must be\nexcluded from the new machine image.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedDisks": { - "description": "Input only. [Input Only] Specifies the list of disk device names that must be\nincluded with the new machine image.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MachineType": { - "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance\nand pricing requirements. For more information, readMachine Types.", - "id": "MachineType", - "properties": { - "accelerators": { - "description": "[Output Only] A list of accelerator configurations assigned to this\nmachine type.", - "items": { - "properties": { - "guestAcceleratorCount": { - "description": "Number of accelerator cards exposed to the guest.", - "format": "int32", - "type": "integer" - }, - "guestAcceleratorType": { - "description": "The accelerator type resource name, not a full URL, e.g.nvidia-tesla-t4.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "architecture": { - "description": "[Output Only] The architecture of the machine type.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "bundledLocalSsds": { - "$ref": "BundledLocalSsds", - "description": "[Output Only] The configuration of bundled local SSD for the machine type." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this machine type.\nOnly applicable if the machine type is unavailable." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "guestCpus": { - "description": "[Output Only] The number of virtual CPUs that are available to the\ninstance.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "isSharedCpu": { - "description": "[Output Only] Whether this machine type has a shared CPU. SeeShared-core machine\ntypes for more information.", - "type": "boolean" - }, - "kind": { - "default": "compute#machineType", - "description": "[Output Only] The type of the resource. Alwayscompute#machineType for machine types.", - "type": "string" - }, - "maximumPersistentDisks": { - "description": "[Output Only] Maximum persistent disks allowed.", - "format": "int32", - "type": "integer" - }, - "maximumPersistentDisksSizeGb": { - "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", - "format": "int64", - "type": "string" - }, - "memoryMb": { - "description": "[Output Only] The amount of physical memory available to the instance,\ndefined in MB.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the machine type resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "MachineTypeAggregatedList": { - "id": "MachineTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "MachineTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of machine types." - }, - "description": "A list of MachineTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#machineTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#machineTypeAggregatedList for aggregated lists of\nmachine types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineTypeList": { - "description": "Contains a list of machine types.", - "id": "MachineTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of MachineType resources.", - "items": { - "$ref": "MachineType" - }, - "type": "array" - }, - "kind": { - "default": "compute#machineTypeList", - "description": "[Output Only] Type of resource. Always compute#machineTypeList\nfor lists of machine types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "properties": { - "machineTypes": { - "description": "[Output Only] A list of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the machine types\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ManagedInstance": { - "description": "A Managed Instance resource.", - "id": "ManagedInstance", - "properties": { - "allInstancesConfig": { - "$ref": "ManagedInstanceAllInstancesConfig", - "description": "[Output Only] Current all-instances configuration revision applied to this\ninstance." - }, - "currentAction": { - "description": "[Output Only] The current action that the managed instance group has\nscheduled for the instance. Possible values:\n \n - NONE The instance is running, and the managed\n instance group does not have any scheduled actions for this instance.\n - CREATING The managed instance group is creating this\n instance. If the group fails to create this instance, it will try again\n until it is successful.\n - CREATING_WITHOUT_RETRIES The managed instance group\n is attempting to create this instance only once. If the group fails\n to create this instance, it does not try again and the group'stargetSize value is decreased instead.\n - RECREATING The managed instance group is recreating\n this instance.\n - DELETING The managed instance group is permanently\n deleting this instance.\n - ABANDONING The managed instance group is abandoning\n this instance. The instance will be removed from the instance group\n and from any target pools that are associated with this group.\n - RESTARTING The managed instance group is restarting\n the instance.\n - REFRESHING The managed instance group is applying\n configuration changes to the instance without stopping it. For example,\n the group can update the target pool list for an instance without\n stopping that instance.\n - VERIFYING The managed instance group has created the\n instance and it is in the process of being verified.", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_ATOMICALLY", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "QUEUING", - "RECREATING", - "REFRESHING", - "RESTARTING", - "RESUMING", - "STARTING", - "STOPPING", - "SUSPENDING", - "VERIFYING" - ], - "enumDescriptions": [ - "The managed instance group is abandoning this instance. The instance\nwill be removed from the instance group and from any target pools that\nare associated with this group.", - "The managed instance group is creating this instance. If the group\nfails to create this instance, it will try again until it is\nsuccessful.", - "The managed instance group is creating this instance atomically.", - "The managed instance group is attempting to create this instance\nonly once. If the group fails to create this instance, it does\nnot try again and the group's targetSize value is\ndecreased.", - "The managed instance group is permanently deleting this instance.", - "The managed instance group has not scheduled any actions for this\ninstance.", - "The managed instance group is queuing this instance.", - "The managed instance group is recreating this instance.", - "The managed instance group is applying configuration changes to the\ninstance without stopping it. For example, the group can update the\ntarget pool list for an instance without stopping that instance.", - "The managed instance group is restarting this instance.", - "The managed instance group is resuming this instance.", - "The managed instance group is starting this instance.", - "The managed instance group is stopping this instance.", - "The managed instance group is suspending this instance.", - "The managed instance group is verifying this already created instance.\nVerification happens every time the instance is (re)created or restarted\nand consists of:\n 1. Waiting until health check specified as part of this managed instance\n group's autohealing policy reports HEALTHY.\n Note: Applies only if autohealing policy has a health check specified\n 2. Waiting for addition verification steps performed as post-instance\n creation (subject to future extensions)." - ], - "type": "string" - }, - "currentActionDetails": { - "$ref": "ManagedInstanceCurrentActionDetails" - }, - "id": { - "description": "[Output only] The unique identifier for this resource. This field is empty\nwhen instance does not exist.", - "format": "uint64", - "type": "string" - }, - "instance": { - "description": "[Output Only] The URL of the instance. The URL can exist even if the\ninstance has not yet been created.", - "type": "string" - }, - "instanceFlexibilityOverride": { - "$ref": "ManagedInstanceInstanceFlexibilityOverride", - "deprecated": true, - "description": "[Output Only] The overrides to instance properties resulting from\nInstanceFlexibilityPolicy." - }, - "instanceHealth": { - "description": "[Output Only] Health state of the instance per health-check.", - "items": { - "$ref": "ManagedInstanceInstanceHealth" - }, - "type": "array" - }, - "instanceStatus": { - "description": "[Output Only] The status of the instance. This field is empty when\nthe instance does not exist.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - }, - "instanceTemplate": { - "deprecated": true, - "description": "[Output Only] The intended template of the instance. This field is empty\nwhen current_action is one of { DELETING, ABANDONING }.", - "type": "string" - }, - "lastAttempt": { - "$ref": "ManagedInstanceLastAttempt", - "description": "[Output Only] Information about the last attempt to create or delete\nthe instance." - }, - "name": { - "description": "[Output Only] The name of the instance. The name always exists even if the\ninstance has not yet been created.", - "type": "string" - }, - "preservedStateFromConfig": { - "$ref": "PreservedState", - "description": "[Output Only] Preserved state applied from per-instance config\nfor this instance." - }, - "preservedStateFromPolicy": { - "$ref": "PreservedState", - "description": "[Output Only] Preserved state generated based on stateful policy\nfor this instance." - }, - "propertiesFromFlexibilityPolicy": { - "$ref": "ManagedInstancePropertiesFromFlexibilityPolicy", - "description": "[Output Only] Instance properties selected for this instance resulting from\nInstanceFlexibilityPolicy." - }, - "scheduling": { - "$ref": "ManagedInstanceScheduling", - "description": "[Output Only] Information about the termination timestamp of the instance,\nif applicable." - }, - "sizeInUnit": { - "description": "[Output only] The size of the VM represented by this Managed Instance.\nThis is how much this Managed Instance contributes to the\nsize of the group.", - "format": "float", - "type": "number" - }, - "tag": { - "deprecated": true, - "description": "[Output Only] Tag describing the version.", - "type": "string" - }, - "targetStatus": { - "description": "[Output Only] The eventual status of the instance. The instance group\nmanager will not be identified as stable till each managed instance reaches\nits targetStatus.", - "enum": [ - "ABANDONED", - "DELETED", - "RUNNING", - "STOPPED", - "SUSPENDED" - ], - "enumDescriptions": [ - "The managed instance will eventually be ABANDONED, i.e. dissociated\nfrom the managed instance group.", - "The managed instance will eventually be DELETED.", - "The managed instance will eventually reach status RUNNING.", - "The managed instance will eventually reach status TERMINATED.", - "The managed instance will eventually reach status SUSPENDED." - ], - "type": "string" - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Intended version of this instance." - } - }, - "type": "object" - }, - "ManagedInstanceAllInstancesConfig": { - "id": "ManagedInstanceAllInstancesConfig", - "properties": { - "revision": { - "description": "[Output Only] Current all-instances configuration revision.\nThis value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceCurrentActionDetails": { - "id": "ManagedInstanceCurrentActionDetails", - "properties": { - "methodName": { - "type": "string" - }, - "trigger": { - "description": "[Output Only] Details of the current action that the managed instance\ngroup has scheduled for the instance. Contains trigger for the current\naction, and methodName in case it was triggered by API call. Possible\nvalues for trigger:\n \n - API Any API call.\n - PROACTIVE_UPDATE Proactive updater scheduled an update\n on this managed instance.\n - AUTOSCALING Instance being deleted/created after a\n decision from the Autoscaler.\n - REDISTRIBUTION The regional managed instance group is\n moving instances between zones to restore balance.\n - STANDBY_REFILL The managed instance group is refilling\n the Standby Pool (stopped/suspended virtual machines) after scale\n up.\n - MAINTENANCE Manual maintenance.\n - FAILED_CREATION The managed instance group is handling\n failed instance creation.\n - INSTANCE_FAILURE The managed instance group is handling\n instance failure, according to\n the Instance Lifecycle Policy.\n - FAILED_HEALTH_CHECK The managed instance group is\n handling failed health check, according to the Instance Lifecycle\n Policy.\n - TERMINATION_TIMESTAMP Instance reached termination time,\n thus managed instance group stops/deletes it.", - "enum": [ - "API", - "AUTOSCALING", - "FAILED_CREATION", - "FAILED_HEALTH_CHECK", - "INSTANCE_FAILURE", - "MAINTENANCE", - "NONE", - "PROACTIVE_UPDATE", - "REDISTRIBUTION", - "STANDBY_REFILL", - "TERMINATION_TIMESTAMP" - ], - "enumDescriptions": [ - "Any API call.", - "Instance being deleted/created after a decision from the Autoscaler.", - "The managed instance group is handling failed instance creation.", - "The managed instance group is handling failed health check, according\nto the Instance Lifecycle Policy.", - "The managed instance group is handling instance failure, according to\nthe Instance Lifecycle Policy.", - "Manual maintenance.", - "Default value, not visible externally.", - "Proactive updater scheduled an update on this managed instance.", - "The regional managed instance group is moving instances between zones\nto restore balance.", - "The managed instance group is refilling the Standby Pool\n(stopped/suspended virtual machines) after scale up.", - "Instance reached termination time, thus managed instance group\nstops/deletes it." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceInstanceFlexibilityOverride": { - "id": "ManagedInstanceInstanceFlexibilityOverride", - "properties": { - "disks": { - "description": "List of disks to be attached to the instance.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineType": { - "description": "The machine type to be used for this instance.", - "type": "string" - }, - "minCpuPlatform": { - "description": "Name of the minimum CPU platform to be used by this instance.\ne.g. 'Intel Ice Lake'.", - "type": "string" - }, - "provisioningModel": { - "description": "The provisioning model to be used for this instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceInstanceHealth": { - "id": "ManagedInstanceInstanceHealth", - "properties": { - "detailedHealthState": { - "description": "[Output Only] The current detailed instance health state.", - "enum": [ - "DRAINING", - "HEALTHY", - "TIMEOUT", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "The instance is being drained. The existing connections to the instance\nhave time to complete, but the new ones are being refused.", - "The instance is reachable i.e. a connection to the application health\nchecking endpoint can be established, and conforms to the requirements\ndefined by the health check.", - "The instance is unreachable i.e. a connection to the application health\nchecking endpoint cannot be established, or the server does not respond\nwithin the specified timeout.", - "The instance is reachable, but does not conform to the requirements\ndefined by the health check.", - "The health checking system is aware of the instance but its health is\nnot known at the moment." - ], - "type": "string" - }, - "healthCheck": { - "description": "[Output Only] The URL for the health check that verifies whether the\ninstance is healthy.", - "type": "string" - }, - "healthState": { - "deprecated": true, - "description": "[Output Only] The current instance health state.\nThis field will not get promoted to beta/GA and might be removed from\nalpha APIs after 01/12/2019. Please use detailed_health_state field\ninstead.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "The instance is reachable i.e. a connection to the application health\nchecking endpoint can be established, and conforms to the requirements\ndefined by the health check.", - "The instance is reachable, but does not conform to the requirements\ndefined by the health check." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceLastAttempt": { - "id": "ManagedInstanceLastAttempt", - "properties": { - "errors": { - "description": "[Output Only] Encountered errors during the last attempt to create or\ndelete the instance.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ManagedInstancePropertiesFromFlexibilityPolicy": { - "id": "ManagedInstancePropertiesFromFlexibilityPolicy", - "properties": { - "disks": { - "description": "List of disks to be attached to the instance.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineType": { - "description": "The machine type to be used for this instance.", - "type": "string" - }, - "minCpuPlatform": { - "description": "Name of the minimum CPU platform to be used by this instance.\ne.g. 'Intel Ice Lake'.", - "type": "string" - }, - "provisioningModel": { - "description": "The provisioning model to be used for this instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceScheduling": { - "id": "ManagedInstanceScheduling", - "properties": { - "terminationTimestamp": { - "description": "[Output Only] The timestamp at which the managed instance will be\nterminated. This is in RFC3339 text format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceVersion": { - "id": "ManagedInstanceVersion", - "properties": { - "instanceTemplate": { - "description": "[Output Only] The intended template of the instance. This field is empty\nwhen current_action is one of { DELETING, ABANDONING }.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the version.", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "A metadata key/value entry.", - "id": "Metadata", - "properties": { - "fingerprint": { - "description": "Specifies a fingerprint for this request, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve the resource.", - "format": "byte", - "type": "string" - }, - "items": { - "description": "Array of key/value pairs. The total size of all keys and values must be\nless than 512 KB.", - "items": { - "description": "Metadata", - "properties": { - "key": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Key for the metadata entry. Keys must conform to the following\nregexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length.\nThis is reflected as part of a URL in the metadata server. Additionally, to\navoid ambiguity, keys must not conflict with any other metadata keys\nfor the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "type": "string" - }, - "value": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Value for the metadata entry. These are free-form strings, and only\nhave meaning as interpreted by the image running in the instance. The\nonly restriction placed on values is that their size must be less than\nor equal to 262144 bytes (256 KiB).", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "kind": { - "default": "compute#metadata", - "description": "[Output Only] Type of the resource. Always compute#metadata\nfor metadata.", - "type": "string" - } - }, - "type": "object" - }, - "MetadataCredentialsFromPlugin": { - "description": "[Deprecated] Custom authenticator credentials.\nCustom authenticator credentials.", - "id": "MetadataCredentialsFromPlugin", - "properties": { - "name": { - "description": "Plugin name.", - "type": "string" - }, - "structConfig": { - "description": "A text proto that conforms to a Struct type definition interpreted by the\nplugin.", - "type": "string" - } - }, - "type": "object" - }, - "MetadataFilter": { - "description": "Opaque filter criteria used by load balancers to restrict routing\nconfiguration to a limited set of load balancing proxies. Proxies and\nsidecars involved in load balancing would typically present metadata to the\nload balancers that need to match criteria specified here. If a match takes\nplace, the relevant configuration is made available to those\nproxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least\none of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata.\n\nAn example for using metadataFilters would be: if\nload balancing involves\nEnvoys, they receive routing configuration when values inmetadataFilters match values supplied in of their XDS requests to loadbalancers.", - "id": "MetadataFilter", - "properties": { - "filterLabels": { - "description": "The list of label value pairs that must match labels in the provided\nmetadata based on filterMatchCriteria\n\nThis list must not be empty and can have at the most 64 entries.", - "items": { - "$ref": "MetadataFilterLabelMatch" - }, - "type": "array" - }, - "filterMatchCriteria": { - "description": "Specifies how individual filter label matches\nwithin the list of filterLabels and contributes toward the\noverall metadataFilter match.\n\n Supported values are:\n \n - MATCH_ANY: at least one of the filterLabels\n must have a matching label in the provided metadata.\n - MATCH_ALL: all filterLabels must have\n matching labels in the provided metadata.", - "enum": [ - "MATCH_ALL", - "MATCH_ANY", - "NOT_SET" - ], - "enumDescriptions": [ - "Specifies that all filterLabels must match for themetadataFilter to be considered a match.", - "Specifies that any filterLabel must match for themetadataFilter to be considered a match.", - "Indicates that the match criteria was not set. AmetadataFilter must never be created with this value." - ], - "type": "string" - } - }, - "type": "object" - }, - "MetadataFilterLabelMatch": { - "description": "MetadataFilter label name value pairs that are expected\nto match corresponding labels presented as metadata to the load balancer.", - "id": "MetadataFilterLabelMatch", - "properties": { - "name": { - "description": "Name of metadata label.\n\n The name can have a maximum length of 1024 characters and must be at\nleast 1 character long.", - "type": "string" - }, - "value": { - "description": "The value of the label must match the specified value.\n\nvalue can have a maximum length of 1024 characters.", - "type": "string" - } - }, - "type": "object" - }, - "Money": { - "description": "Represents an amount of money with its currency type.", - "id": "Money", - "properties": { - "currencyCode": { - "description": "The three-letter currency code defined in ISO 4217.", - "type": "string" - }, - "nanos": { - "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "format": "int32", - "type": "integer" - }, - "units": { - "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "MultiMig": { - "description": "Multi-MIG represents a group of managed instance groups.", - "id": "MultiMig", - "properties": { - "creationTimestamp": { - "description": "[Output only] The creation timestamp of this multi-MIG in RFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output only] The unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#multiMig", - "description": "[Output only] Type of the resource. Alwayscompute#multiMig for multi-MIGs.", - "type": "string" - }, - "name": { - "description": "The name of the multi-MIG.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output only] The URL of the region where the resource resides. You must\nspecify this field as part of the HTTP request URL. You cannot set the\nregion as a field in the request body.", - "type": "string" - }, - "resourcePolicies": { - "$ref": "MultiMigResourcePolicies", - "description": "Resource policies for this multi-MIG." - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "$ref": "MultiMigStatus" - } - }, - "type": "object" - }, - "MultiMigMember": { - "description": "Represents a Multi-MIG member resource.", - "id": "MultiMigMember", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp of this multi-MIG member inRFC3339 text format.", - "type": "string" - }, - "id": { - "description": "[Output only] The unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#multiMigMember", - "description": "Type of the resource. Alwayscompute#multiMigMember for a list of multi-MIG members.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of this multi-MIG member generated by\nGoogle Compute Engine.", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of the region where the multi-MIG resides.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "status": { - "$ref": "MultiMigMemberStatus", - "description": "[Output Only] The status of this multi-MIG member" - } - }, - "type": "object" - }, - "MultiMigMemberList": { - "id": "MultiMigMemberList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of multi-MIG member resources.", - "items": { - "$ref": "MultiMigMember" - }, - "type": "array" - }, - "kind": { - "default": "compute#multiMigMemberList", - "description": "Type of the resource. Alwayscompute#multiMigMember for a list of multi-MIG members.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MultiMigMemberStatus": { - "id": "MultiMigMemberStatus", - "properties": { - "instanceGroupManager": { - "description": "[Output Only] URL of member instance group manager", - "type": "string" - } - }, - "type": "object" - }, - "MultiMigResourcePolicies": { - "description": "Resource policies message for a multi-MIG. Specifies the workload policy\nconfiguration of the multi-MIG.", - "id": "MultiMigResourcePolicies", - "properties": { - "workloadPolicy": { - "description": "The URL of the workload policy for this multi-MIG.\nIt can be a full or partial URL. For example, the following are\nall valid URLs to a workload policy: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n - projects/project/regions/region/resourcePolicies/resourcePolicy\n - regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "MultiMigStatus": { - "id": "MultiMigStatus", - "properties": { - "appliedAcceleratorTopologies": { - "description": "[Output Only] The accelerator topology applied to this multi-MIG.\nCurrently only one accelerator topology is supported.", - "items": { - "$ref": "MultiMigStatusAcceleratorTopology" - }, - "type": "array" - }, - "memberInstanceGroupManagers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "membersCount": { - "description": "[Output Only] The number of instance group manager members in this\nmulti-MIG.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "MultiMigStatusAcceleratorTopology": { - "id": "MultiMigStatusAcceleratorTopology", - "properties": { - "acceleratorTopology": { - "description": "[Output Only] Topology in the format of: \"16x16\", \"4x4x4\", etc.\nThe value is the same as configured in the WorkloadPolicy.", - "type": "string" - }, - "acceleratorTopologyState": { - "description": "[Output Only] The state of the accelerator topology.", - "enum": [ - "ACTIVATING", - "ACTIVE", - "ACTIVE_DEGRADED", - "DEACTIVATING", - "FAILED", - "INCOMPLETE" - ], - "enumDescriptions": [ - "The accelerator topology is being activated.", - "The accelerator topology is active.", - "The accelerator topology is active but operating in degraded mode.", - "The accelerator topology is being deactivated.", - "The accelerator topology failed.", - "The configuration is incomplete and the accelerator topology cannot\nbe activated due to insufficient number of running VMs." - ], - "type": "string" - }, - "acceleratorTopologyStateLastCheck": { - "$ref": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck", - "description": "[Output Only] The result of the latest accelerator topology state\ncheck." - } - }, - "type": "object" - }, - "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck": { - "id": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck", - "properties": { - "error": { - "description": "[Output Only] Encountered errors on the last state check.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Timestamp is shown only if there is an error. The field\nhas // RFC3339 //\ntext format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "MultiMigsList": { - "id": "MultiMigsList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of multi-MIGs in the specified project and region.", - "items": { - "$ref": "MultiMig" - }, - "type": "array" - }, - "kind": { - "default": "compute#multiMigList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results formaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MutualTls": { - "description": "[Deprecated] Configuration for the mutual Tls mode for peer authentication.\nConfiguration for the mutual Tls mode for peer authentication.", - "id": "MutualTls", - "properties": { - "mode": { - "description": "Specifies if the server TLS is configured to be strict or permissive. This\nfield can be set to one of the following:\nSTRICT: Client certificate must be presented, connection is in TLS.\nPERMISSIVE: Client certificate can be omitted, connection can be either\n plaintext or TLS.", - "enum": [ - "INVALID", - "PERMISSIVE", - "STRICT" - ], - "enumDescriptions": [ - "", - "Client certificate can be omitted, connection can be either plaintext or\nTLS.", - "Client certificate must be presented, connection is in TLS." - ], - "type": "string" - } - }, - "type": "object" - }, - "NamedPort": { - "description": "The named port. For example: \u003c\"http\", 80\u003e.", - "id": "NamedPort", - "properties": { - "name": { - "description": "The name for this named port.\nThe name must be 1-63 characters long, and comply withRFC1035.", - "type": "string" - }, - "port": { - "description": "The port number, which can be a value between 1 and 65535.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NamedSet": { - "id": "NamedSet", - "properties": { - "description": { - "description": "An optional description of named set.", - "type": "string" - }, - "elements": { - "description": "CEL expressions that are comparable to constructs of this set's type\n(see Policy Language).", - "items": { - "$ref": "Expr" - }, - "type": "array" - }, - "fingerprint": { - "description": "A fingerprint for the Named Set being applied to this Router, which is\nessentially a hash of the Named Set used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes\nafter every request to modify or update the Named Set. You must always\nprovide an up-to-date fingerprint hash in order to update or change\nlabels.\n\nTo see the latest fingerprint, make a getNamedSet() request\nto retrieve a Named Set.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "This set's name, which must be a resource ID segment and unique within all\nnamed sets owned by the Router. Name should conform to RFC1035.", - "type": "string" - }, - "type": { - "description": "This named set's type", - "enum": [ - "NAMED_SET_TYPE_COMMUNITY", - "NAMED_SET_TYPE_PREFIX" - ], - "enumDescriptions": [ - "The Named Set is a Community Named Set.", - "The Named Set is a Prefix Named Set." - ], - "type": "string" - } - }, - "type": "object" - }, - "NatIpInfo": { - "description": "Contains NAT IP information of a NAT config (i.e. usage status, mode).", - "id": "NatIpInfo", - "properties": { - "natIpInfoMappings": { - "description": "A list of all NAT IPs assigned to this NAT config.", - "items": { - "$ref": "NatIpInfoNatIpInfoMapping" - }, - "type": "array" - }, - "natName": { - "description": "Name of the NAT config which the NAT IP belongs to.", - "type": "string" - } - }, - "type": "object" - }, - "NatIpInfoNatIpInfoMapping": { - "description": "Contains information of a NAT IP.", - "id": "NatIpInfoNatIpInfoMapping", - "properties": { - "mode": { - "description": "Specifies whether NAT IP is auto or manual.", - "enum": [ - "AUTO", - "MANUAL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "natIp": { - "description": "NAT IP address. For example: 203.0.113.11.", - "type": "string" - }, - "usage": { - "description": "Specifies whether NAT IP is currently serving at least one endpoint or\nnot.", - "enum": [ - "IN_USE", - "UNUSED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NatIpInfoResponse": { - "id": "NatIpInfoResponse", - "properties": { - "result": { - "description": "[Output Only] A list of NAT IP information.", - "items": { - "$ref": "NatIpInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "Network": { - "description": "Represents a VPC Network resource.\n\nNetworks connect resources to each other and to the internet. For more\ninformation, readVirtual Private Cloud (VPC) Network.", - "id": "Network", - "properties": { - "IPv4Range": { - "deprecated": true, - "description": "Deprecated in favor of subnet mode networks.\nThe range of internal addresses that are legal on this network. This\nrange is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is\ncreated.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", - "type": "string" - }, - "autoCreateSubnetworks": { - "description": "Must be set to create a VPC network. If not set, a legacy network is\ncreated.\n\nWhen set to true, the VPC network is created in auto mode.\nWhen set to false, the VPC network is created in custom mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet\nhas a predetermined range as described inAuto mode VPC network IP ranges.\n\nFor custom mode VPC networks, you can add subnets using the subnetworksinsert\nmethod.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "enableUlaInternalIpv6": { - "description": "Enable ULA internal ipv6 on this network. Enabling this feature will assign\na /48 from google defined ULA prefix fd20::/20.\n.", - "type": "boolean" - }, - "firewallPolicy": { - "description": "[Output Only] URL of the firewall policy the network is associated with.", - "type": "string" - }, - "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network,\nselected by Google Cloud.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "internalIpv6Range": { - "description": "When enabling ula internal ipv6, caller optionally can specify the /48\nrange they want from the google defined ULA prefix fd20::/20. The input\nmust be a valid /48 ULA IPv6 address and must be within the fd20::/20.\nOperation will fail if the speficied /48 is already in used by another\nresource. If the field is not speficied, then a /48 range will be randomly\nallocated from fd20::/20 and returned via this field.\n.", - "type": "string" - }, - "kind": { - "default": "compute#network", - "description": "[Output Only] Type of the resource. Always compute#network for\nnetworks.", - "type": "string" - }, - "mtu": { - "description": "Maximum Transmission Unit in bytes.\nThe minimum value for this field is 1300 and the maximum value is 8896.\nThe suggested value is 1500, which is the default MTU used on the\nInternet, or 8896 if you want to use Jumbo frames. If unspecified, the\nvalue defaults to 1460.", - "format": "int32", - "type": "integer" - }, - "name": { - "annotations": { - "required": [ - "compute.networks.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all following characters (except for the last\ncharacter) must be a dash, lowercase letter, or digit. The last character\nmust be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkFirewallPolicyEnforcementOrder": { - "description": "The network firewall policy enforcement order. Can be either\nAFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to\nAFTER_CLASSIC_FIREWALL if the field is not specified.", - "enum": [ - "AFTER_CLASSIC_FIREWALL", - "BEFORE_CLASSIC_FIREWALL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "networkProfile": { - "description": "A full or partial URL of the network profile to apply to this network.\nThis field can be set only at resource creation time. For example, the\nfollowing are valid URLs: \n \n - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name}\n - projects/{project_id}/global/networkProfiles/{network_profile_name}", - "type": "string" - }, - "params": { - "$ref": "NetworkParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "peerings": { - "description": "[Output Only] A list of network peerings for the resource.", - "items": { - "$ref": "NetworkPeering" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the regional network resides.\nThis field is not applicable to global network.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "routingConfig": { - "$ref": "NetworkRoutingConfig", - "description": "The network-level routing configuration for this network. Used by Cloud\nRouter to determine what type of network-wide routing behavior to enforce." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "subnetworks": { - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks\nin this VPC network.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkAttachment": { - "description": "NetworkAttachments\nA network attachment resource ...", - "id": "NetworkAttachment", - "properties": { - "connectionEndpoints": { - "description": "[Output Only] An array of connections for all the producers connected\nto this network attachment.", - "items": { - "$ref": "NetworkAttachmentConnectedEndpoint" - }, - "type": "array" - }, - "connectionPreference": { - "enum": [ - "ACCEPT_AUTOMATIC", - "ACCEPT_MANUAL", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored\nin this object. This field is used in optimistic locking. An up-to-date\nfingerprint must be provided in order to patch.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkAttachment", - "description": "[Output Only] Type of the resource.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.networkAttachments.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "[Output Only] The URL of the network which the Network Attachment\nbelongs to. Practically it is inferred by fetching the network of the first\nsubnetwork associated. Because it is required that all the subnetworks must\nbe from the same network, it is assured that the Network Attachment belongs\nto the same network as all the subnetworks.", - "type": "string" - }, - "producerAcceptLists": { - "description": "Projects that are allowed to connect to this network attachment.\nThe project can be specified using its id or number.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerRejectLists": { - "description": "Projects that are not allowed to connect to this network attachment.\nThe project can be specified using its id or number.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the network attachment resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "subnetworks": { - "description": "An array of URLs where each entry is the URL of a subnet\nprovided by the service consumer to use for\nendpoints in the producers that connect to this network attachment.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkAttachmentAggregatedList": { - "description": "Contains a list of NetworkAttachmentsScopedList.", - "id": "NetworkAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkAttachmentsScopedList", - "description": "Name of the scope containing this set of NetworkAttachments." - }, - "description": "A list of NetworkAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkAttachmentAggregatedList", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkAttachmentConnectedEndpoint": { - "description": "[Output Only] A connection connected to this network attachment.", - "id": "NetworkAttachmentConnectedEndpoint", - "properties": { - "ipAddress": { - "description": "The IPv4 address assigned to the producer instance network interface.\nThis value will be a range in case of Serverless.", - "type": "string" - }, - "ipv6Address": { - "description": "The IPv6 address assigned to the producer instance network interface.\nThis is only assigned when the stack types of both the instance network\ninterface and the consumer subnet are IPv4_IPv6.", - "type": "string" - }, - "projectIdOrNum": { - "description": "The project id or number of the interface to which the IP was assigned.", - "type": "string" - }, - "secondaryIpCidrRanges": { - "description": "Alias IP ranges from the same subnetwork.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "The status of a connected endpoint to this network attachment.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The consumer allows traffic from the producer to reach its VPC.", - "The consumer network attachment no longer exists.", - "The consumer needs to take further action before traffic can be served.", - "The consumer neither allows nor prohibits traffic\nfrom the producer to reach its VPC.", - "The consumer prohibits traffic from the producer to reach its VPC.", - "" - ], - "type": "string" - }, - "subnetwork": { - "description": "The subnetwork used to assign the IP to the producer\ninstance network interface.", - "type": "string" - }, - "subnetworkCidrRange": { - "description": "[Output Only] The CIDR range of the subnet from which the IPv4 internal\nIP was allocated from.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkAttachmentList": { - "id": "NetworkAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkAttachment resources.", - "items": { - "$ref": "NetworkAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkAttachmentList", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkAttachmentsScopedList": { - "id": "NetworkAttachmentsScopedList", - "properties": { - "networkAttachments": { - "description": "A list of NetworkAttachments contained in this scope.", - "items": { - "$ref": "NetworkAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nnetwork attachments when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityService": { - "description": "Represents a Google Cloud Armor network edge security service resource.", - "id": "NetworkEdgeSecurityService", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a NetworkEdgeSecurityService. An up-to-date fingerprint must be\nprovided in order to update the NetworkEdgeSecurityService,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a NetworkEdgeSecurityService.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkEdgeSecurityService", - "description": "[Output only] Type of the resource. Alwayscompute#networkEdgeSecurityService for\nNetworkEdgeSecurityServices", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the resource resides. You must\nspecify this field as part of the HTTP request URL. It is not settable as a\nfield in the request body.", - "type": "string" - }, - "securityPolicy": { - "description": "The resource URL for the network edge security service associated with this\nnetwork edge security service.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityServiceAggregatedList": { - "id": "NetworkEdgeSecurityServiceAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkEdgeSecurityServicesScopedList", - "description": "Name of the scope containing this set of security policies." - }, - "description": "A list of NetworkEdgeSecurityServicesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkEdgeSecurityServiceAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkEdgeSecurityServiceAggregatedList for lists of\nNetwork Edge Security Services.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityServicesScopedList": { - "id": "NetworkEdgeSecurityServicesScopedList", - "properties": { - "networkEdgeSecurityServices": { - "description": "A list of NetworkEdgeSecurityServices contained in this scope.", - "items": { - "$ref": "NetworkEdgeSecurityService" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nsecurity policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpoint": { - "description": "The network endpoint.", - "id": "NetworkEndpoint", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional metadata defined as annotations on the network endpoint.", - "type": "object" - }, - "clientDestinationPort": { - "description": "Represents the port number to which PSC consumer sends packets.\n\nOptional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.", - "format": "int32", - "type": "integer" - }, - "fqdn": { - "description": "Optional fully qualified domain name of network endpoint. This can only be\nspecified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.", - "type": "string" - }, - "instance": { - "description": "The name or a URL of VM instance of this network endpoint.\nOptional, the field presence depends on the network endpoint type. The\nfield is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT.\n\nThe instance must be in the same zone of network endpoint group (for zonal\nNEGs) or in the zone within the region of the NEG (for regional NEGs).\nIf the ipAddress is specified, it must belongs to the VM\ninstance.\n\nThe name must be 1-63 characters long, and comply withRFC1035\nor be a valid URL pointing to an existing instance.", - "type": "string" - }, - "ipAddress": { - "description": "Optional IPv4 address of network endpoint. The IP address must belong to a\nVM in Compute Engine (either the primary IP or as part of an aliased IP\nrange). If the IP address is not specified, then the primary IP address for\nthe VM instance in the network that the network endpoint group belongs to\nwill be used.\n\nThis field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP\naddress of the attached VM instance that matches the subnetwork of the NEG.\nThe primary internal IP address from any NIC of a multi-NIC VM instance can\nbe added to a NEG as long as it matches the NEG subnetwork.", - "type": "string" - }, - "ipv6Address": { - "description": "Optional IPv6 address of network endpoint.", - "type": "string" - }, - "port": { - "description": "Optional port number of network endpoint. If not specified, the\ndefaultPort for the network endpoint group will be used.\n\nThis field can not be set for network endpoints of typeGCE_VM_IP.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.\n\nA network endpoint group (NEG) defines how a set of endpoints should be\nreached, whether they are reachable, and where they are located.\nFor more information about using NEGs for different use cases, seeNetwork endpoint groups overview.", - "id": "NetworkEndpointGroup", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Metadata defined as annotations on the network endpoint group.", - "type": "object" - }, - "appEngine": { - "$ref": "NetworkEndpointGroupAppEngine", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "cloudFunction": { - "$ref": "NetworkEndpointGroupCloudFunction", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "cloudRun": { - "$ref": "NetworkEndpointGroupCloudRun", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultPort": { - "description": "The default port used if the port number is not specified in the network\nendpoint.\n\nOptional. If the network endpoint type is either GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this\nfield must not be specified.", - "format": "int32", - "type": "integer" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkEndpointGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#networkEndpointGroup for network endpoint group.", - "type": "string" - }, - "loadBalancer": { - "$ref": "NetworkEndpointGroupLbNetworkEndpointGroup", - "deprecated": true, - "description": "This field is only valid when the network endpoint group is used for load\nbalancing.\n[Deprecated] This field is deprecated." - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "type": "string" - }, - "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong.\nUses default project network if unspecified.", - "type": "string" - }, - "networkEndpointType": { - "description": "Type of network endpoints in this network endpoint group. Can be one ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT,INTERNET_IP_PORT, SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP.", - "enum": [ - "GCE_VM_IP", - "GCE_VM_IP_PORT", - "GCE_VM_IP_PORTMAP", - "INTERNET_FQDN_PORT", - "INTERNET_IP_PORT", - "NON_GCP_PRIVATE_IP_PORT", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS" - ], - "enumDescriptions": [ - "The network endpoint is represented by an IP address.", - "The network endpoint is represented by IP address and port pair.", - "The network endpoint is represented by an IP, Port and Client Destination\nPort.", - "The network endpoint is represented by fully qualified domain name and\nport.", - "The network endpoint is represented by an internet IP address and port.", - "The network endpoint is represented by an IP address and port. The\nendpoint belongs to a VM or pod running in a customer's on-premises.", - "The network endpoint is either public Google APIs or\nservices exposed by other GCP Project with a Service Attachment.\nThe connection is set up by private service connect", - "The network endpoint is handled by specified serverless infrastructure." - ], - "type": "string" - }, - "pscData": { - "$ref": "NetworkEndpointGroupPscData", - "description": "Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT." - }, - "pscTargetService": { - "description": "The target service url used to set up private service connection to\na Google API or a PSC Producer Service Attachment.\nAn example value is: asia-northeast3-cloudkms.googleapis.com.\n\nOptional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT.", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the network endpoint group is located.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serverlessDeployment": { - "$ref": "NetworkEndpointGroupServerlessDeployment", - "description": "Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine, cloudFunction orserverlessDeployment may be set." - }, - "size": { - "description": "[Output only] Number of network endpoints in the network endpoint group.", - "format": "int32", - "type": "integer" - }, - "subnetwork": { - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG\nbelong.", - "type": "string" - }, - "type": { - "description": "Specify the type of this network endpoint group. OnlyLOAD_BALANCING is valid for now.", - "enum": [ - "LOAD_BALANCING" - ], - "enumDescriptions": [ - "The network endpoint group is a backend of a load balancer." - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of thezone\nwhere the network endpoint group is located.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupAggregatedList": { - "id": "NetworkEndpointGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkEndpointGroupsScopedList", - "description": "The name of the scope that contains this set of network endpoint groups." - }, - "description": "A list of NetworkEndpointGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkEndpointGroupAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupAggregatedList for aggregated\nlists of network endpoint groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupAppEngine": { - "description": "Configuration for an App Engine network endpoint group (NEG).\nThe service is optional, may be provided explicitly or in the\nURL mask. The version is optional and can only be provided\nexplicitly or in the URL mask when service is present.\n\nNote: App Engine service must be in the same project and located in the\nsame region as the Serverless NEG.", - "id": "NetworkEndpointGroupAppEngine", - "properties": { - "service": { - "description": "Optional serving service.\n\nThe service name is case-sensitive and must be 1-63\ncharacters long.\n\nExample value: default, my-service.", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse service and version fields\nfrom a request URL. URL mask allows for routing to multiple App Engine\nservices without having to create multiple Network Endpoint Groups and\nbackend services.\n\nFor example, the request URLsfoo1-dot-appname.appspot.com/v1 andfoo1-dot-appname.appspot.com/v2 can be backed by the same\nServerless NEG with URL mask\u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e.\nThe URL mask will parse them to { service = \"foo1\", version = \"v1\"\n} and { service = \"foo1\", version = \"v2\" }\nrespectively.", - "type": "string" - }, - "version": { - "description": "Optional serving version.\n\nThe version name is case-sensitive and must be 1-100\ncharacters long.\n\nExample value: v1, v2.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupCloudFunction": { - "description": "Configuration for a Cloud Function network endpoint group (NEG).\nThe function must be provided explicitly or in the URL mask.\n\nNote: Cloud Function must be in the same project and located in the same\nregion as the Serverless NEG.", - "id": "NetworkEndpointGroupCloudFunction", - "properties": { - "function": { - "description": "A user-defined name of the Cloud Function.\n\nThe function name is case-sensitive and must be 1-63\ncharacters long.\n\nExample value: func1.", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse function field from a request URL. URL\nmask allows for routing to multiple Cloud Functions without having to\ncreate multiple Network Endpoint Groups and backend services.\n\nFor example, request URLs mydomain.com/function1 andmydomain.com/function2 can be backed by the same\nServerless NEG with URL mask /\u003cfunction\u003e. The URL\nmask will parse them to { function = \"function1\" } and{ function = \"function2\" } respectively.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupCloudRun": { - "description": "Configuration for a Cloud Run network endpoint group (NEG).\nThe service must be provided explicitly or in the URL mask.\nThe tag is optional, may be provided explicitly or in the URL\nmask.\n\nNote: Cloud Run service must be in the same project and located in the same\nregion as the Serverless NEG.", - "id": "NetworkEndpointGroupCloudRun", - "properties": { - "service": { - "description": "Cloud Run service is the main resource of Cloud Run.\n\nThe service must be 1-63 characters long, and comply withRFC1035.\n\nExample value: \"run-service\".", - "type": "string" - }, - "tag": { - "description": "Optional Cloud Run tag represents the \"named-revision\" to provide additional\nfine-grained traffic routing information.\n\nThe tag must be 1-63 characters long, and comply withRFC1035.\n\nExample value: \"revision-0010\".", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse \u003cservice\u003e and\u003ctag\u003e fields from a request URL. URL mask allows for\nrouting to multiple Run services without having to create multiple\nnetwork endpoint groups and backend services.\n\nFor example, request URLs foo1.domain.com/bar1 andfoo1.domain.com/bar2 can be backed by the same Serverless\nNetwork Endpoint Group (NEG) with URL mask\u003ctag\u003e.domain.com/\u003cservice\u003e. The URL mask will\nparse them to { service=\"bar1\", tag=\"foo1\" } and {\nservice=\"bar2\", tag=\"foo2\" } respectively.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupLbNetworkEndpointGroup": { - "description": "Load balancing specific fields for network endpoint group.", - "id": "NetworkEndpointGroupLbNetworkEndpointGroup", - "properties": { - "defaultPort": { - "deprecated": true, - "description": "The default port used if the port number is not specified in the network\nendpoint.\n\nIf the network endpoint type is either GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this\nfield must not be specified.\n[Deprecated] This field is deprecated.", - "format": "int32", - "type": "integer" - }, - "network": { - "deprecated": true, - "description": "The URL of the network to which all network endpoints in the NEG belong.\nUses default project network if unspecified.\n[Deprecated] This field is deprecated.", - "type": "string" - }, - "subnetwork": { - "deprecated": true, - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG\nbelong.\n[Deprecated] This field is deprecated.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "[Output Only] The URL of thezone\nwhere the network endpoint group is located.\n[Deprecated] This field is deprecated.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupList": { - "id": "NetworkEndpointGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkEndpointGroup resources.", - "items": { - "$ref": "NetworkEndpointGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkEndpointGroupList", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupList for network endpoint group\nlists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupPscData": { - "description": "All data that is specifically relevant to only network endpoint groups of\ntype PRIVATE_SERVICE_CONNECT.", - "id": "NetworkEndpointGroupPscData", - "properties": { - "consumerPscAddress": { - "description": "[Output Only] Address allocated from given subnetwork for PSC. This IP\naddress acts as a VIP for a PSC NEG, allowing it to act as an endpoint in\nL7 PSC-XLB.", - "type": "string" - }, - "producerPort": { - "description": "The psc producer port is used to connect PSC NEG with specific port on\nthe PSC Producer side; should only be used for the\nPRIVATE_SERVICE_CONNECT NEG type", - "format": "int32", - "type": "integer" - }, - "pscConnectionId": { - "description": "[Output Only] The PSC connection id of the PSC Network Endpoint Group\nConsumer.", - "format": "uint64", - "type": "string" - }, - "pscConnectionStatus": { - "description": "[Output Only] The connection status of the PSC Forwarding Rule.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer and will not serve\ntraffic going forward.", - "The connection has been accepted by the producer, but the producer\nneeds to take further action before the forwarding rule can serve\ntraffic.", - "The connection is pending acceptance by the producer.", - "The connection has been rejected by the producer.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupServerlessDeployment": { - "description": "Configuration for a serverless network endpoint group (NEG). Theplatform must be provided.\n\nNote: The target backend service must be in the same project and located in\nthe same region as the Serverless NEG.", - "id": "NetworkEndpointGroupServerlessDeployment", - "properties": { - "platform": { - "description": "The platform of the backend target(s) of this NEG.\nThe only supported value is\nAPI Gateway: apigateway.googleapis.com.", - "type": "string" - }, - "resource": { - "description": "The user-defined name of the workload/instance. This value must be\nprovided explicitly or in the urlMask. The resource\nidentified by this value is platform-specific and is as follows:\n\n \n \n 1. API Gateway: The gateway ID\n 2. App Engine: The service name\n 3. Cloud Functions: The function name\n 4. Cloud Run: The service name", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse platform-specific fields from a request URL. URL mask\nallows for routing to multiple resources on the same serverless platform\nwithout having to create multiple Network Endpoint Groups and backend\nresources. The fields parsed by this template are platform-specific and\nare as follows:\n\n \n \n 1. API Gateway: The gateway ID\n 2. App Engine: The service and version\n 3. Cloud Functions: The function name\n 4. Cloud Run: The service and tag", - "type": "string" - }, - "version": { - "description": "The optional resource version. The version identified by this value is\nplatform-specific and is follows:\n\n \n \n 1. API Gateway: Unused\n 2. App Engine: The service version\n 3. Cloud Functions: Unused\n 4. Cloud Run: The service tag", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsAttachEndpointsRequest": { - "id": "NetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsDetachEndpointsRequest": { - "id": "NetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListEndpointsRequest": { - "id": "NetworkEndpointGroupsListEndpointsRequest", - "properties": { - "endpointFilters": { - "description": "Optional list of endpoints to query.\nThis is a more efficient but also limited version of filter parameter.\nEndpoints in the filter must have ip_address and port fields populated,\nother fields are not supported.", - "items": { - "$ref": "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter" - }, - "type": "array" - }, - "healthStatus": { - "description": "Optional query parameter for showing the health status of each network\nendpoint. Valid options are SKIP or SHOW. If you\ndon't specify this parameter, the health status of network endpoints will\nnot be provided.", - "enum": [ - "SHOW", - "SKIP" - ], - "enumDescriptions": [ - "Show the health status for each network endpoint. Impacts latency of the\ncall.", - "Health status for network endpoints will not be provided." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter": { - "id": "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter", - "properties": { - "networkEndpoint": { - "$ref": "NetworkEndpoint" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListNetworkEndpoints": { - "id": "NetworkEndpointGroupsListNetworkEndpoints", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkEndpointWithHealthStatus resources.", - "items": { - "$ref": "NetworkEndpointWithHealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkEndpointGroupsListNetworkEndpoints", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupsListNetworkEndpoints for the list\nof network endpoints in the specified network endpoint group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsScopedList": { - "id": "NetworkEndpointGroupsScopedList", - "properties": { - "networkEndpointGroups": { - "description": "[Output Only] The list ofnetwork\nendpoint groups that are contained in this scope.", - "items": { - "$ref": "NetworkEndpointGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of network\nendpoint groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointWithHealthStatus": { - "id": "NetworkEndpointWithHealthStatus", - "properties": { - "healths": { - "description": "[Output only] The health status of network endpoint.\n\nOptional. Displayed only if the network endpoint has centralized health\nchecking configured.", - "items": { - "$ref": "HealthStatusForNetworkEndpoint" - }, - "type": "array" - }, - "networkEndpoint": { - "$ref": "NetworkEndpoint", - "description": "[Output only] The network endpoint." - } - }, - "type": "object" - }, - "NetworkFirewallPolicyAggregatedList": { - "id": "NetworkFirewallPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "FirewallPoliciesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of FirewallPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkFirewallPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkFirewallPoliciesAggregatedList for lists of\nnetwork firewall policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkInterface": { - "description": "A network interface resource attached to an instance.", - "id": "NetworkInterface", - "properties": { - "accessConfigs": { - "description": "An array of configurations for this interface. Currently, only one access\nconfig, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have\nno external internet access.", - "items": { - "$ref": "AccessConfig" - }, - "type": "array" - }, - "aliasIpRanges": { - "description": "An array of alias IP ranges for this network interface.\nYou can only specify this field for network interfaces in VPC networks.", - "items": { - "$ref": "AliasIpRange" - }, - "type": "array" - }, - "enableVpcScopedDns": { - "description": "Optional. If true, DNS resolution will be enabled over this interface. Only valid\nwith network_attachment.", - "type": "boolean" - }, - "fingerprint": { - "description": "Fingerprint hash of contents stored in this network interface.\nThis field will be ignored when inserting an Instance or\nadding a NetworkInterface. An up-to-date\nfingerprint must be provided in order to update theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.", - "format": "byte", - "type": "string" - }, - "igmpQuery": { - "description": "Indicate whether igmp query is enabled on the network interface\nor not. If enabled, also indicates the version of IGMP supported.", - "enum": [ - "IGMP_QUERY_DISABLED", - "IGMP_QUERY_V2" - ], - "enumDescriptions": [ - "The network interface has disabled IGMP query.", - "The network interface has enabled IGMP query - v2." - ], - "type": "string" - }, - "internalIpv6PrefixLength": { - "description": "The prefix length of the primary internal IPv6 range.", - "format": "int32", - "type": "integer" - }, - "ipv6AccessConfigs": { - "description": "An array of IPv6 access configurations for this interface. Currently, only\none IPv6 access config, DIRECT_IPV6, is supported. If there\nis no ipv6AccessConfig specified, then this instance will\nhave no external IPv6 Internet access.", - "items": { - "$ref": "AccessConfig" - }, - "type": "array" - }, - "ipv6AccessType": { - "description": "[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be\naccessed from the Internet. This field is always inherited from its\nsubnetwork.\n\nValid only if stackType is IPV4_IPV6.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "This network interface can have external IPv6.", - "This network interface can have internal IPv6." - ], - "type": "string" - }, - "ipv6Address": { - "description": "An IPv6 internal network address for this network interface. To\nuse a static internal IP address, it must be unused and in the same region\nas the instance's zone. If not specified, Google Cloud will automatically\nassign an internal IPv6 address from the instance's subnetwork.", - "type": "string" - }, - "kind": { - "default": "compute#networkInterface", - "description": "[Output Only] Type of the resource. Alwayscompute#networkInterface for network interfaces.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the network interface, which is generated by the\nserver. For a VM, the network interface uses the nicN naming\nformat. Where N is a value between 0 and7. The default interface value is nic0.", - "type": "string" - }, - "network": { - "description": "URL of the VPC network resource for this instance. When creating an\ninstance, if neither the network nor the subnetwork is specified, the\ndefault network global/networks/default is used. If the\nselected project doesn't have the default network, you must specify a\nnetwork or subnet. If the network is not specified but the subnetwork is\nspecified, the network is inferred.\n\nIf you specify this property, you can specify the network as\na full or partial URL. For example, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/networks/network\n - projects/project/global/networks/network\n - global/networks/default", - "type": "string" - }, - "networkAttachment": { - "description": "The URL of the network attachment that this interface should connect\nto in the following format:\nprojects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.", - "type": "string" - }, - "networkIP": { - "description": "An IPv4 internal IP address to assign to the instance for this network\ninterface. If not specified by the user, an unused internal IP is\nassigned by the system.", - "type": "string" - }, - "nicType": { - "description": "The type of vNIC to be used on this interface. This may be gVNIC or\nVirtioNet.", - "enum": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "UNSPECIFIED_NIC_TYPE", - "VIRTIO_NET" - ], - "enumDescriptions": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "No type specified.", - "VIRTIO" - ], - "type": "string" - }, - "parentNicName": { - "description": "Name of the parent network interface of a dynamic network interface.", - "type": "string" - }, - "queueCount": { - "description": "The networking queue count that's specified by users for the network\ninterface. Both Rx and Tx queues will be set to this number. It'll be empty\nif not specified by the users.", - "format": "int32", - "type": "integer" - }, - "stackType": { - "description": "The stack type for this network interface. To assign only IPv4 addresses,\nuse IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_IPV6. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at instance creation and update network\ninterface operations.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "The network interface can have both IPv4 and IPv6 addresses.", - "The network interface will only be assigned IPv4 addresses.", - "The network interface will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "subinterfaces": { - "description": "SubInterfaces help enable L2 communication for the instance over\nsubnetworks that support L2. Every network interface will get a default\nuntagged (vlan not specified) subinterface. Users can specify additional\ntagged subinterfaces which are sub-fields to the Network Interface.", - "items": { - "$ref": "NetworkInterfaceSubInterface" - }, - "type": "array" - }, - "subnetwork": { - "description": "The URL of the Subnetwork resource for this instance. If the network\nresource is inlegacy\nmode, do not specify this field. If the network is in auto subnet\nmode, specifying the subnetwork is optional. If the network is in custom\nsubnet mode, specifying the subnetwork is required. If you specify this\nfield, you can specify the subnetwork as a full or partial URL. For\nexample, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n - regions/region/subnetworks/subnetwork", - "type": "string" - }, - "vlan": { - "description": "VLAN tag of a dynamic network interface, must be an integer in the range\nfrom 2 to 255 inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NetworkInterfaceSubInterface": { - "id": "NetworkInterfaceSubInterface", - "properties": { - "ipAddress": { - "description": "An IPv4 internal IP address to assign to the instance for this\nsubinterface. If specified, ip_allocation_mode should be set to\nALLOCATE_IP.", - "type": "string" - }, - "ipAllocationMode": { - "enum": [ - "ALLOCATE_IP", - "DO_NOT_ALLOCATE_IP", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Allocates an internal IPv4 IP address from subnets secondary IP Range.", - "No IP allocation is done for the subinterface.", - "" - ], - "type": "string" - }, - "subnetwork": { - "description": "If specified, this subnetwork must belong to the same network\nas that of the network interface.\nIf not specified the subnet of network interface will be used.\nIf you specify this property, you can specify the subnetwork as a full\nor partial URL. For example, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n - regions/region/subnetworks/subnetwork", - "type": "string" - }, - "vlan": { - "description": "VLAN tag. Should match the VLAN(s) supported by the subnetwork to which\nthis subinterface is connecting.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NetworkList": { - "description": "Contains a list of networks.", - "id": "NetworkList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Network resources.", - "items": { - "$ref": "Network" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkList", - "description": "[Output Only] Type of resource. Always compute#networkList for\nlists of networks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkParams": { - "description": "Additional network parameters.", - "id": "NetworkParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "NetworkPeering": { - "description": "A network peering attached to a network resource. The message includes the\npeering name, peer network, peering state, and a flag indicating whether\nGoogle Compute Engine should automatically create routes for the peering.", - "id": "NetworkPeering", - "properties": { - "advertisePeerSubnetsViaRouters": { - "description": "Whether Cloud Routers in this network can automatically advertise subnets\nfrom the peer network.", - "type": "boolean" - }, - "autoCreateRoutes": { - "description": "This field will be deprecated soon. Use theexchange_subnet_routes field instead.\nIndicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "connectionStatus": { - "$ref": "NetworkPeeringConnectionStatus", - "description": "[Output Only] The effective state of the peering connection\nas a whole." - }, - "exchangeSubnetRoutes": { - "description": "Indicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "exportCustomRoutes": { - "description": "Whether to export the custom routes to peer network. The default value is\nfalse.", - "type": "boolean" - }, - "exportSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are exported. The default value\nis true, all subnet routes are exported.IPv4\nspecial-use ranges are always\nexported to peers and are not controlled by this field.", - "type": "boolean" - }, - "importCustomRoutes": { - "description": "Whether to import the custom routes from peer network. The default value is\nfalse.", - "type": "boolean" - }, - "importSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are imported. The default value\nis false.IPv4\nspecial-use ranges are always\nimported from peers and are not controlled by this field.", - "type": "boolean" - }, - "name": { - "description": "Name of this peering. Provided by the client when the peering is created.\nThe name must comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all the following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "type": "string" - }, - "network": { - "description": "The URL of the peer network. It can be either full URL or partial URL. The\npeer network may belong to a different project. If the partial URL does not\ncontain project, it is assumed that the peer network is in the same project\nas the current network.", - "type": "string" - }, - "peerMtu": { - "description": "[Output Only] Maximum Transmission Unit in bytes of the peer network.", - "format": "int32", - "type": "integer" - }, - "stackType": { - "description": "Which IP version(s) of traffic and routes are allowed to be imported or\nexported between peer networks. The default value is IPV4_ONLY.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "This Peering will allow IPv4 traffic and routes to be\nexchanged. Additionally if the matching peering is\nIPV4_IPV6, IPv6 traffic and routes will be exchanged as\nwell.", - "This Peering will only allow IPv4 traffic and routes to be\nexchanged, even if the matching peering is IPV4_IPV6." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The\npeering is `ACTIVE` when there's a matching configuration in the peer\nnetwork.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "Matching configuration exists on the peer.", - "There is no matching configuration on the peer, including the case when\npeer does not exist." - ], - "type": "string" - }, - "stateDetails": { - "description": "[Output Only] Details about the current state of the peering.", - "type": "string" - }, - "updateStrategy": { - "description": "The update strategy determines the semantics for updates and deletes to the\npeering connection configuration.", - "enum": [ - "CONSENSUS", - "INDEPENDENT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Updates are reflected in the local peering but aren't applied to the\npeering connection until a complementary change is made to the\nmatching peering.\nTo delete a peering with the consensus update strategy, both the peerings\nmust request the deletion of the peering before the peering can be\ndeleted.", - "In this mode, changes to the peering configuration can\nbe unilaterally altered by changing either side of the peering.\nThis is the default value if the field is unspecified.", - "Peerings with update strategy UNSPECIFIED are created with\nupdate strategy INDEPENDENT." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatus": { - "description": "[Output Only] Describes the state of a peering connection, not just the\nlocal peering. This field provides information about the effective settings\nfor the connection as a whole, including pending delete/update requests for\nCONSENSUS peerings.", - "id": "NetworkPeeringConnectionStatus", - "properties": { - "consensusState": { - "$ref": "NetworkPeeringConnectionStatusConsensusState", - "description": "The consensus state contains information about the status of update\nand delete for a consensus peering connection." - }, - "trafficConfiguration": { - "$ref": "NetworkPeeringConnectionStatusTrafficConfiguration", - "description": "The active connectivity settings for the peering connection based on the\nsettings of the network peerings." - }, - "updateStrategy": { - "description": "The update strategy determines the update/delete semantics for this\npeering connection.", - "enum": [ - "CONSENSUS", - "INDEPENDENT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Updates are reflected in the local peering but aren't applied to the\npeering connection until a complementary change is made to the\nmatching peering.\nTo delete a peering with the consensus update strategy, both the peerings\nmust request the deletion of the peering before the peering can be\ndeleted.", - "In this mode, changes to the peering configuration can\nbe unilaterally altered by changing either side of the peering.\nThis is the default value if the field is unspecified.", - "Peerings with update strategy UNSPECIFIED are created with\nupdate strategy INDEPENDENT." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatusConsensusState": { - "description": "The status of update/delete for a consensus peering connection. Only set\nwhen connection_status.update_strategy isCONSENSUS or a network peering is proposing to update the\nstrategy to CONSENSUS.", - "id": "NetworkPeeringConnectionStatusConsensusState", - "properties": { - "deleteStatus": { - "description": "The status of the delete request.", - "enum": [ - "DELETE_ACKNOWLEDGED", - "DELETE_STATUS_UNSPECIFIED", - "LOCAL_CANCEL_REQUESTED", - "LOCAL_DELETE_REQUESTED", - "PEER_CANCEL_REQUESTED", - "PEER_DELETE_REQUESTED" - ], - "enumDescriptions": [ - "Both network admins have agreed this consensus peering connection can\nbe deleted.", - "", - "The local network admin requested to cancel their delete request\nafter DELETE_ACKNOWLEDGED.", - "Network admin has requested deletion of this peering connection.", - "The peer network admin requested to cancel their delete request after\nDELETE_ACKNOWLEDGED.", - "The peer network admin has requested deletion of this peering\nconnection." - ], - "type": "string" - }, - "updateStatus": { - "description": "The status of the update request.", - "enum": [ - "IN_SYNC", - "PENDING_LOCAL_ACKNOWLEDMENT", - "PENDING_PEER_ACKNOWLEDGEMENT", - "UPDATE_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "No pending configuration update proposals to the peering connection.", - "The peer network admin has made an updatePeering call. The change is\nawaiting acknowledgment from this peering's network admin.", - "The local network admin has made an updatePeering call. The change\nis awaiting acknowledgment from the peer network admin.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatusTrafficConfiguration": { - "id": "NetworkPeeringConnectionStatusTrafficConfiguration", - "properties": { - "exportCustomRoutesToPeer": { - "description": "Whether custom routes are being exported to the peer network.", - "type": "boolean" - }, - "exportSubnetRoutesWithPublicIpToPeer": { - "description": "Whether subnet routes with public IP ranges are being exported to the\npeer network.", - "type": "boolean" - }, - "importCustomRoutesFromPeer": { - "description": "Whether custom routes are being imported from the peer network.", - "type": "boolean" - }, - "importSubnetRoutesWithPublicIpFromPeer": { - "description": "Whether subnet routes with public IP ranges are being imported\nfrom the peer network.", - "type": "boolean" - }, - "stackType": { - "description": "Which IP version(s) of traffic and routes are being imported or\nexported between peer networks.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "This Peering will allow IPv4 traffic and routes to be\nexchanged. Additionally if the matching peering is\nIPV4_IPV6, IPv6 traffic and routes will be exchanged as\nwell.", - "This Peering will only allow IPv4 traffic and routes to be\nexchanged, even if the matching peering is IPV4_IPV6." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPerformanceConfig": { - "id": "NetworkPerformanceConfig", - "properties": { - "externalIpEgressBandwidthTier": { - "enum": [ - "DEFAULT", - "TIER_1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "totalEgressBandwidthTier": { - "enum": [ - "DEFAULT", - "TIER_1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPoliciesScopedList": { - "id": "NetworkPoliciesScopedList", - "properties": { - "networkPolicies": { - "description": "A list of network policies contained in this scope.", - "items": { - "$ref": "NetworkPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of network policies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicy": { - "description": "Represents a Network Policy resource.", - "id": "NetworkPolicy", - "properties": { - "associations": { - "description": "[Output Only] A list of associations that belong to this network policy.", - "items": { - "$ref": "NetworkPolicyAssociation" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#networkPolicy for network policies", - "type": "string" - }, - "name": { - "description": "Name of the resource.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional network policy resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Total count of all network policy rule tuples. A network\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "trafficClassificationRules": { - "description": "[Output Only] A list of traffic classification rules that belong to this\npolicy.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyAggregatedList": { - "id": "NetworkPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkPoliciesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of NetworkPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkPolicyAggregatedList for lists of\nnetwork policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicyAssociation": { - "id": "NetworkPolicyAssociation", - "properties": { - "attachmentTarget": { - "description": "The target that the network policy is attached to.", - "type": "string" - }, - "name": { - "description": "The name for an association.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicyList": { - "id": "NetworkPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkPolicy resources.", - "items": { - "$ref": "NetworkPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#networkPolicyList for lists of network policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRule": { - "description": "Represents a traffic classification rule that describes one or more match\nconditions along with the action to be taken when traffic matches this\ncondition.", - "id": "NetworkPolicyTrafficClassificationRule", - "properties": { - "action": { - "$ref": "NetworkPolicyTrafficClassificationRuleAction", - "description": "The Action to perform when the client connection triggers the rule." - }, - "description": { - "description": "An optional description for this resource.", - "type": "string" - }, - "disabled": { - "description": "Denotes whether the network policy rule is disabled. When set to true,\nthe network policy rule is not enforced and traffic behaves as if it did\nnot exist. If this is unspecified, the network policy rule will be\nenabled.", - "type": "boolean" - }, - "kind": { - "default": "compute#networkPolicyTrafficClassificationRule", - "description": "[Output only] Type of the resource. Alwayscompute#networkPolicyTrafficClassificationRule for network\npolicy traffic classification rules", - "type": "string" - }, - "match": { - "$ref": "NetworkPolicyTrafficClassificationRuleMatcher", - "description": "A match condition that outgoing traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 1 and 2147482647.\nThe priority values from 2147482648 to 2147483647 (1000) are reserved for\nsystem default network policy rules. Rules are evaluated from highest to\nlowest priority where 1 is the highest priority and 2147483647 is the\nlowest priority.", - "format": "int32", - "type": "integer" - }, - "ruleName": { - "description": "An optional name for the rule. This field is not a unique identifier\nand can be updated.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Calculation of the complexity of a single network policy\nrule.", - "format": "int32", - "type": "integer" - }, - "targetSecureTags": { - "description": "A list of secure tags that controls which instances the traffic\nclassification rule applies to. If targetSecureTag are\nspecified, then the traffic classification rule applies only to instances\nin the VPC network that have one of those EFFECTIVE secure tags, if all\nthe targetSecureTag are in INEFFECTIVE state, then this rule\nwill be ignored. targetSecureTag may not be set at the same\ntime as targetServiceAccounts. If neithertargetServiceAccounts nor targetSecureTag are\nspecified, the traffic classification rule applies to all instances on\nthe specified network. Maximum number of target label tags allowed is\n256.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRuleSecureTag" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleAction": { - "id": "NetworkPolicyTrafficClassificationRuleAction", - "properties": { - "dscpMode": { - "description": "DSCP mode. When set to AUTO, the DSCP value will be picked\nautomatically based on selected trafficClass. Otherwise,dscpValue needs to be explicitly specified.", - "enum": [ - "AUTO", - "CUSTOM" - ], - "enumDescriptions": [ - "DSCP value will be automatically picked up based on configured\ntraffic_class.", - "Allows to specify custom DSCP value from selected traffic_class\nrange." - ], - "type": "string" - }, - "dscpValue": { - "description": "Custom DSCP value from 0-63 range.", - "format": "int32", - "type": "integer" - }, - "trafficClass": { - "description": "The traffic class that should be applied to the matching packet.", - "enum": [ - "TC1", - "TC2", - "TC3", - "TC4", - "TC5", - "TC6" - ], - "enumDescriptions": [ - "Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx.", - "Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx.", - "Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx.", - "Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx.", - "Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx.", - "Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx." - ], - "type": "string" - }, - "type": { - "description": "Always \"apply_traffic_classification\" for traffic classification rules.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "NetworkPolicyTrafficClassificationRuleMatcher", - "properties": { - "destIpRanges": { - "description": "CIDR IP address range.\nMaximum number of destination CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "layer4Configs": { - "description": "Pairs of IP protocols and ports that the rule should match.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of source CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config": { - "id": "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config", - "properties": { - "ipProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a traffic classification rule. This value can\neither be one of the following well known protocol strings\n(tcp, udp, icmp,esp, ah, ipip,sctp), or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP, TCP or SCTP protocol. Each entry must be\neither an integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleSecureTag": { - "id": "NetworkPolicyTrafficClassificationRuleSecureTag", - "properties": { - "name": { - "description": "Name of the secure tag, created with TagManager's TagValue API.", - "pattern": "tagValues/[0-9]+", - "type": "string" - }, - "state": { - "description": "[Output Only] State of the secure tag, either `EFFECTIVE` or\n`INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted\nor its network is deleted.", - "enum": [ - "EFFECTIVE", - "INEFFECTIVE", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfile": { - "description": "NetworkProfile represents a Google managed network profile resource.", - "id": "NetworkProfile", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "features": { - "$ref": "NetworkProfileNetworkFeatures", - "description": "[Output Only] Features supported by the network." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkProfile", - "description": "[Output Only] Type of the resource. Alwayscompute#networkProfile for network profiles.", - "type": "string" - }, - "location": { - "$ref": "NetworkProfileLocation", - "description": "[Output Only] Location to which the network is restricted." - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "profileType": { - "$ref": "NetworkProfileProfileType", - "description": "[Output Only] Type of the network profile." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileLocation": { - "id": "NetworkProfileLocation", - "properties": { - "name": { - "type": "string" - }, - "scope": { - "enum": [ - "REGION", - "ZONE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileNetworkFeatures": { - "id": "NetworkProfileNetworkFeatures", - "properties": { - "addressPurposes": { - "description": "Specifies what address purposes are supported. If empty, all address\npurposes are supported.", - "items": { - "enum": [ - "APPLICATION_AND_PROXY_LOAD_BALANCERS", - "DNS_RESOLVER", - "GCE_ENDPOINT", - "IPSEC_INTERCONNECT", - "NAT_AUTO", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS", - "SHARED_LOADBALANCER_VIP", - "SYSTEM_MANAGED", - "VPC_PEERING" - ], - "enumDescriptions": [ - "The global external address can only be assigned to Global External\nApplication or Proxy Load Balancer forwarding rules. This is the default\nvalue for global external addresses.", - "DNS resolver address in the subnetwork.", - "VM internal/alias IP, Internal LB service IP, etc.", - "A regional internal IP address range reserved for the VLAN attachment\nthat is used in HA VPN over Cloud Interconnect. This regional\ninternal IP address range must not overlap with any IP address range\nof subnet/route in the VPC network and its peering networks. After the\nVLAN attachment is created with the reserved IP address range, when\ncreating a new VPN gateway, its interface IP address is allocated\nfrom the associated VLAN attachment’s IP address range.", - "External IP automatically reserved for Cloud NAT.", - "The global external address can only be assigned to Global External\nPassthrough Network Load Balancer forwarding rules, as an Availability\nGroup 0 address.", - "The global external address can only be assigned to Global External\nPassthrough Network Load Balancer forwarding rules, as an Availability\nGroup 1 address.", - "A private network IP address that can be used to configure Private\nService Connect. This purpose can be specified only forGLOBAL addresses of Type INTERNAL", - "A regional internal IP address range reserved for Serverless.", - "A private network IP address that can be shared by multiple Internal\nLoad Balancer forwarding rules.", - "A regional internal IP address that is reserved and managed by Google\nCloud. It can not be assigned to Google Cloud compute resources such as\nVM and internal load balancer.", - "IP range for peer networks." - ], - "type": "string" - }, - "type": "array" - }, - "allowAddressCreation": { - "description": "Specifies whether address creation is allowed.", - "enum": [ - "ADDRESS_CREATION_ALLOWED", - "ADDRESS_CREATION_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowAliasIpRanges": { - "description": "Specifies whether alias IP ranges (and secondary address ranges) are\nallowed.", - "enum": [ - "ALIAS_IP_RANGES_ALLOWED", - "ALIAS_IP_RANGES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowAutoModeSubnet": { - "description": "Specifies whether auto mode subnet creation is allowed.", - "enum": [ - "AUTO_MODE_SUBNET_ALLOWED", - "AUTO_MODE_SUBNET_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowClassDFirewalls": { - "description": "Specifies whether firewalls for Class D address ranges are supported.", - "enum": [ - "CLASS_D_FIREWALLS_ALLOWED", - "CLASS_D_FIREWALLS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowCloudNat": { - "description": "Specifies whether cloud NAT creation is allowed.", - "enum": [ - "CLOUD_NAT_ALLOWED", - "CLOUD_NAT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowCloudRouter": { - "description": "Specifies whether cloud router creation is allowed.", - "enum": [ - "CLOUD_ROUTER_ALLOWED", - "CLOUD_ROUTER_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowDefaultNicAttachment": { - "description": "Specifies whether default NIC attachment is allowed.", - "enum": [ - "DEFAULT_NIC_ATTACHMENT_ALLOWED", - "DEFAULT_NIC_ATTACHMENT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowExternalIpAccess": { - "description": "Specifies whether VMs are allowed to have external IP access on network\ninterfaces connected to this VPC.", - "enum": [ - "EXTERNAL_IP_ACCESS_ALLOWED", - "EXTERNAL_IP_ACCESS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowFirewallPolicy": { - "description": "Specifies whether firewall policy can be attached to the network.", - "enum": [ - "FIREWALL_POLICY_ALLOWED", - "FIREWALL_POLICY_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowInterconnect": { - "description": "Specifies whether Cloud Interconnect creation is allowed.", - "enum": [ - "INTERCONNECT_ALLOWED", - "INTERCONNECT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowIpForwarding": { - "description": "Specifies whether IP forwarding is allowed.", - "enum": [ - "IP_FORWARDING_ALLOWED", - "IP_FORWARDING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowLoadBalancing": { - "description": "Specifies whether cloud load balancing is allowed.", - "enum": [ - "LOAD_BALANCING_ALLOWED", - "LOAD_BALANCING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowMultiNicInSameNetwork": { - "description": "Specifies whether multi-nic in the same network is allowed.", - "enum": [ - "MULTI_NIC_IN_SAME_NETWORK_ALLOWED", - "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowMultiNicInSameSubnetwork": { - "description": "Specifies whether multi-nic in the same subnetwork is allowed.", - "enum": [ - "MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED", - "MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowMulticast": { - "description": "Specifies whether multicast is allowed.", - "enum": [ - "MULTICAST_ALLOWED", - "MULTICAST_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowNcc": { - "description": "Specifies whether NCC is allowed.", - "enum": [ - "NCC_ALLOWED", - "NCC_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowNetworkMigration": { - "description": "Specifies whether VM network migration is allowed.", - "enum": [ - "NETWORK_MIGRATION_ALLOWED", - "NETWORK_MIGRATION_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPacketMirroring": { - "description": "Specifies whether Packet Mirroring 1.0 is supported.", - "enum": [ - "PACKET_MIRRORING_ALLOWED", - "PACKET_MIRRORING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPrivateGoogleAccess": { - "description": "Specifies whether private Google access is allowed.", - "enum": [ - "PRIVATE_GOOGLE_ACCESS_ALLOWED", - "PRIVATE_GOOGLE_ACCESS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPsc": { - "description": "Specifies whether PSC creation is allowed.", - "enum": [ - "PSC_ALLOWED", - "PSC_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowSameNetworkUnicast": { - "description": "Specifies whether unicast within the same network is allowed.", - "enum": [ - "SAME_NETWORK_UNICAST_ALLOWED", - "SAME_NETWORK_UNICAST_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowStaticRoutes": { - "description": "Specifies whether static route creation is allowed.", - "enum": [ - "STATIC_ROUTES_ALLOWED", - "STATIC_ROUTES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowSubInterfaces": { - "description": "Specifies whether sub interfaces are allowed.", - "enum": [ - "SUBINTERFACES_ALLOWED", - "SUBINTERFACES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowSubnetworkCreation": { - "description": "Specifies whether subnetwork creation is allowed.", - "enum": [ - "SUBNETWORK_CREATION_ALLOWED", - "SUBNETWORK_CREATION_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowVpcFirewallRules": { - "description": "Specifies whether VPC firewall rules can be created under the network.", - "enum": [ - "VPC_FIREWALL_RULES_ALLOWED", - "VPC_FIREWALL_RULES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowVpcPeering": { - "description": "Specifies whether VPC peering is allowed.", - "enum": [ - "VPC_PEERING_ALLOWED", - "VPC_PEERING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowVpn": { - "description": "Specifies whether VPN creation is allowed.", - "enum": [ - "VPN_ALLOWED", - "VPN_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "firewallPolicyTypes": { - "items": { - "enum": [ - "RDMA_FALCON_POLICY", - "RDMA_ROCE_POLICY", - "ULL_POLICY", - "VPC_POLICY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "interfaceTypes": { - "description": "If set, limits the interface types that the network supports. If\nempty, all interface types are supported.", - "items": { - "enum": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "UNSPECIFIED_NIC_TYPE", - "VIRTIO_NET" - ], - "enumDescriptions": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "No type specified.", - "VIRTIO" - ], - "type": "string" - }, - "type": "array" - }, - "multicast": { - "description": "Specifies which type of multicast is supported.", - "enum": [ - "MULTICAST_SDN", - "MULTICAST_ULL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "predefinedNetworkInternalIpv6Range": { - "description": "Specifies a predefined internal IPv6 range for the network.", - "type": "string" - }, - "predefinedSubnetworkRanges": { - "description": "Predefined subnetwork ranges for the network.", - "items": { - "$ref": "NetworkProfileNetworkFeaturesPredefinedSubnetworkRange" - }, - "type": "array" - }, - "subnetPurposes": { - "description": "Specifies which subnetwork purposes are supported.", - "items": { - "enum": [ - "SUBNET_PURPOSE_CUSTOM_HARDWARE", - "SUBNET_PURPOSE_PRIVATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "subnetStackTypes": { - "description": "Specifies which subnetwork stack types are supported.", - "items": { - "enum": [ - "SUBNET_STACK_TYPE_IPV4_IPV6", - "SUBNET_STACK_TYPE_IPV4_ONLY", - "SUBNET_STACK_TYPE_IPV6_ONLY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "subnetworkPurposes": { - "description": "Specifies which subnetwork purposes are supported.", - "items": { - "enum": [ - "AGGREGATE", - "CLOUD_EXTENSION", - "CUSTOM_HARDWARE_LINK", - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnetwork used to aggregate multiple private subnetworks.", - "Subnetworks created for Cloud Extension Machines.", - "Subnetwork used for Custom Hardware Link.", - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "type": "array" - }, - "subnetworkStackTypes": { - "description": "Specifies which subnetwork stack types are supported.", - "items": { - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "type": "array" - }, - "unicast": { - "description": "Specifies which type of unicast is supported.", - "enum": [ - "UNICAST_SDN", - "UNICAST_ULL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileNetworkFeaturesPredefinedSubnetworkRange": { - "id": "NetworkProfileNetworkFeaturesPredefinedSubnetworkRange", - "properties": { - "ipv6Range": { - "description": "The IPv6 range of the predefined subnetwork.", - "type": "string" - }, - "namePrefix": { - "description": "The naming prefix of the predefined subnetwork.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileProfileType": { - "id": "NetworkProfileProfileType", - "properties": { - "networkType": { - "enum": [ - "RDMA", - "ULL", - "VPC" - ], - "enumDescriptions": [ - "RDMA network.", - "ULL network.", - "VPC network." - ], - "type": "string" - }, - "rdmaSubtype": { - "enum": [ - "FALCON", - "ROCE", - "ROCE_METAL" - ], - "enumDescriptions": [ - "RDMA over Falcon.", - "RDMA over Converged Ethernet (RoCE).", - "RDMA over RoCE for Bare Metal." - ], - "type": "string" - }, - "ullSubtype": { - "enum": [ - "OPERATOR", - "PARTICIPANT" - ], - "enumDescriptions": [ - "Exchange operator.", - "Exchange participant." - ], - "type": "string" - }, - "vpcSubtype": { - "enum": [ - "REGIONAL" - ], - "enumDescriptions": [ - "Regionally bound VPC network." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfilesListResponse": { - "description": "Contains a list of network profiles.", - "id": "NetworkProfilesListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkProfile resources.", - "items": { - "$ref": "NetworkProfile" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkProfileList", - "description": "[Output Only] Type of resource. Alwayscompute#networkProfileList for network profiles.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value\nfor\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken\nto\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkRoutingConfig": { - "description": "A routing configuration attached to a network resource. The message\nincludes the list of routers associated with the network, and a flag\nindicating the type of routing behavior to enforce network-wide.", - "id": "NetworkRoutingConfig", - "properties": { - "bgpAlwaysCompareMed": { - "description": "Enable comparison of Multi-Exit Discriminators (MED) across routes with\ndifferent neighbor ASNs when using the STANDARD BGP best path selection\nalgorithm.", - "type": "boolean" - }, - "bgpBestPathSelectionMode": { - "description": "The BGP best path selection algorithm to be employed within this network\nfor dynamic routes learned by Cloud Routers. Can be LEGACY\n(default) or STANDARD.", - "enum": [ - "LEGACY", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "bgpInterRegionCost": { - "description": "Allows to define a preferred approach for handling inter-region cost in\nthe selection process when using the STANDARD BGP best path\nselection algorithm. Can be DEFAULT orADD_COST_TO_MED.", - "enum": [ - "ADD_COST_TO_MED", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "effectiveBgpAlwaysCompareMed": { - "description": "[Output Only] Effective value of the bgp_always_compare_med\nfield.", - "type": "boolean" - }, - "effectiveBgpInterRegionCost": { - "description": "[Output Only] Effective value of the bgp_inter_region_cost\nfield.", - "enum": [ - "ADD_COST_TO_MED", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL,\nthis network's Cloud Routers will only advertise routes with subnets\nof this network in the same region as the router. If set toGLOBAL, this network's Cloud Routers will advertise\nroutes with all subnets of this network, across regions.", - "enum": [ - "GLOBAL", - "REGIONAL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworksAddPeeringRequest": { - "id": "NetworksAddPeeringRequest", - "properties": { - "autoCreateRoutes": { - "description": "This field will be deprecated soon. Useexchange_subnet_routes in network_peering\ninstead.\nIndicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "exportCustomRoutes": { - "description": "This field will be deprecated soon. Useexport_custom_routes in network_peering instead.\nWhether to export the custom routes to peer network.", - "type": "boolean" - }, - "importCustomRoutes": { - "description": "This field will be deprecated soon. Useimport_custom_routes in network_peering instead.\nWhether to import the custom routes from peer network.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.networks.addPeering" - ] - }, - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - }, - "networkPeering": { - "$ref": "NetworkPeering", - "description": "Network peering parameters.\nIn order to specify route policies for peering using import and export\ncustom routes, you must specify all peering related parameters\n(name, peer network,exchange_subnet_routes) in the network_peering\nfield.\nThe corresponding fields in NetworksAddPeeringRequest will be\ndeprecated soon." - }, - "peerNetwork": { - "description": "URL of the peer network. It can be either full URL or partial URL. The\npeer network may belong to a different project. If the partial URL does not\ncontain project, it is assumed that the peer network is in the same project\nas the current network.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksCancelRequestRemovePeeringRequest": { - "id": "NetworksCancelRequestRemovePeeringRequest", - "properties": { - "name": { - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponse": { - "id": "NetworksGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output Only] Effective firewalls from firewall policy. It returns Global\nNetwork Firewall Policies and Hierarchical Firewall Policies. UseregionNetworkFirewallPolicies.getEffectiveFirewalls to get\nRegional Network Firewall Policies as well.", - "items": { - "$ref": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the network.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "organizationFirewalls": { - "description": "Effective firewalls from organization policies.", - "items": { - "$ref": "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output Only] The packet mirroring rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output Only] The rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy.", - "type": "string" - }, - "type": { - "description": "[Output Only] The type of the firewall policy.", - "enum": [ - "HIERARCHY", - "NETWORK", - "SYSTEM", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { - "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", - "id": "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the security policy. This\nidentifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworksRemovePeeringRequest": { - "id": "NetworksRemovePeeringRequest", - "properties": { - "name": { - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksRequestRemovePeeringRequest": { - "id": "NetworksRequestRemovePeeringRequest", - "properties": { - "name": { - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksUpdatePeeringRequest": { - "id": "NetworksUpdatePeeringRequest", - "properties": { - "networkPeering": { - "$ref": "NetworkPeering" - } - }, - "type": "object" - }, - "NodeGroup": { - "description": "Represents a sole-tenant Node Group resource.\n\nA sole-tenant node is a physical server that is dedicated to\nhosting VM instances only for your specific project. Use sole-tenant nodes to\nkeep your instances physically separated from instances in other projects, or\nto group your instances together on the same host hardware. For more\ninformation, readSole-tenant nodes.", - "id": "NodeGroup", - "properties": { - "autoscalingPolicy": { - "$ref": "NodeGroupAutoscalingPolicy", - "description": "Specifies how autoscaling should behave." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeGroup", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeGroup for node group.", - "type": "string" - }, - "locationHint": { - "description": "An opaque location hint used to place the Node close to other\nresources.\nThis field is for use by internal tools that use the public API.\nThe location hint here on the NodeGroup overrides any location_hint\npresent in the NodeTemplate.", - "type": "string" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted values\nare: `AS_NEEDED` and `RECURRENT`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "maintenancePolicy": { - "description": "Specifies how to handle instances when a node in the group undergoes\nmaintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP.\nThe default value is DEFAULT. For more information, see\nMaintenance policies.", - "enum": [ - "DEFAULT", - "MAINTENANCE_POLICY_UNSPECIFIED", - "MIGRATE_WITHIN_NODE_GROUP", - "RESTART_IN_PLACE" - ], - "enumDescriptions": [ - "Allow the node and corresponding instances to retain default\nmaintenance behavior.", - "", - "When maintenance must be done on a node, the instances on that node will\nbe moved to other nodes in the group.\nInstances with onHostMaintenance = MIGRATE will live migrate to their\ndestinations while instances with onHostMaintenance = TERMINATE will\nterminate and then restart on their destination nodes if\nautomaticRestart = true.", - "Instances in this group will restart on the same node when maintenance\nhas completed. Instances must have onHostMaintenance = TERMINATE, and\nthey will only restart if automaticRestart = true." - ], - "type": "string" - }, - "maintenanceWindow": { - "$ref": "NodeGroupMaintenanceWindow" - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "type": "string" - }, - "nodeTemplate": { - "description": "URL of the node template to create the node group from.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "Share-settings for the node group" - }, - "size": { - "description": "[Output Only] The total number of nodes in the node group.", - "format": "int32", - "type": "integer" - }, - "status": { - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the node group resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupAggregatedList": { - "id": "NodeGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeGroupsScopedList", - "description": "[Output Only] Name of the scope containing this set of node groups." - }, - "description": "A list of NodeGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeGroupAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeGroupAggregatedList for aggregated lists of node\ngroups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupAutoscalingPolicy": { - "id": "NodeGroupAutoscalingPolicy", - "properties": { - "maxNodes": { - "description": "The maximum number of nodes that the group should have. Must be set if\nautoscaling is enabled. Maximum value allowed is 100.", - "format": "int32", - "type": "integer" - }, - "minNodes": { - "description": "The minimum number of nodes that the group should have.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "The autoscaling mode. Set to one of: ON, OFF,\nor ONLY_SCALE_OUT. For more information, see \nAutoscaler modes.", - "enum": [ - "MODE_UNSPECIFIED", - "OFF", - "ON", - "ONLY_SCALE_OUT" - ], - "enumDescriptions": [ - "", - "Autoscaling is disabled.", - "Autocaling is fully enabled.", - "Autoscaling will only scale out and will not remove nodes." - ], - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupList": { - "description": "Contains a list of nodeGroups.", - "id": "NodeGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeGroup resources.", - "items": { - "$ref": "NodeGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeGroupList", - "description": "[Output Only] Type of resource.Always compute#nodeGroupList\nfor lists of node groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupMaintenanceWindow": { - "description": "Time window specified for daily maintenance operations. GCE's internal\nmaintenance will be performed within this window.", - "id": "NodeGroupMaintenanceWindow", - "properties": { - "duration": { - "deprecated": true, - "description": "[Output only] A predetermined duration for the window, automatically\nchosen to be the smallest possible in the given scenario.", - "type": "string" - }, - "maintenanceDuration": { - "$ref": "Duration", - "description": "[Output only] A predetermined duration for the window, automatically\nchosen to be the smallest possible in the given scenario." - }, - "startTime": { - "description": "Start time of the window. This must be in UTC format that resolves to one\nof 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For\nexample, both 13:00-5 and 08:00 are valid.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupNode": { - "id": "NodeGroupNode", - "properties": { - "accelerators": { - "description": "Accelerators for this node.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "consumedResources": { - "$ref": "InstanceConsumptionInfo", - "description": "Node resources that are reserved by all instances." - }, - "cpuOvercommitType": { - "description": "CPU overcommit.", - "enum": [ - "CPU_OVERCOMMIT_TYPE_UNSPECIFIED", - "ENABLED", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "disks": { - "description": "Local disk configurations.", - "items": { - "$ref": "LocalDisk" - }, - "type": "array" - }, - "instanceConsumptionData": { - "description": "Instance data that shows consumed resources on the node.", - "items": { - "$ref": "InstanceConsumptionData" - }, - "type": "array" - }, - "instances": { - "description": "Instances scheduled on this node.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the node.", - "type": "string" - }, - "nodeType": { - "description": "The type of this node.", - "type": "string" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "serverBinding": { - "$ref": "ServerBinding", - "description": "Binding properties for the physical server." - }, - "serverId": { - "description": "Server ID associated with this node.", - "type": "string" - }, - "status": { - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "REPAIRING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "totalResources": { - "$ref": "InstanceConsumptionInfo", - "description": "Total amount of available resources on the node." - }, - "upcomingMaintenance": { - "$ref": "UpcomingMaintenance", - "description": "[Output Only] The information about an upcoming maintenance event." - } - }, - "type": "object" - }, - "NodeGroupsAddNodesRequest": { - "id": "NodeGroupsAddNodesRequest", - "properties": { - "additionalNodeCount": { - "description": "Count of additional nodes to be added to the node group.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NodeGroupsDeleteNodesRequest": { - "id": "NodeGroupsDeleteNodesRequest", - "properties": { - "nodes": { - "description": "Names of the nodes to delete.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeGroupsListNodes": { - "id": "NodeGroupsListNodes", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Node resources.", - "items": { - "$ref": "NodeGroupNode" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeGroupsListNodes", - "description": "[Output Only] The resource type, which is alwayscompute.nodeGroupsListNodes for the list of nodes in the\nspecified node group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupsPerformMaintenanceRequest": { - "id": "NodeGroupsPerformMaintenanceRequest", - "properties": { - "nodes": { - "description": "[Required] List of nodes affected by the call.", - "items": { - "type": "string" - }, - "type": "array" - }, - "startTime": { - "description": "The start time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupsScopedList": { - "id": "NodeGroupsScopedList", - "properties": { - "nodeGroups": { - "description": "[Output Only] A list of node groups contained in this scope.", - "items": { - "$ref": "NodeGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the nodeGroup\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupsSetNodeTemplateRequest": { - "id": "NodeGroupsSetNodeTemplateRequest", - "properties": { - "nodeTemplate": { - "description": "Full or partial URL of the node template resource to be updated for this\nnode group.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupsSimulateMaintenanceEventRequest": { - "id": "NodeGroupsSimulateMaintenanceEventRequest", - "properties": { - "nodes": { - "description": "Names of the nodes to go under maintenance simulation.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeTemplate": { - "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For\nmore information, readCreating node groups\nand instances.", - "id": "NodeTemplate", - "properties": { - "accelerators": { - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "cpuOvercommitType": { - "description": "CPU overcommit.", - "enum": [ - "CPU_OVERCOMMIT_TYPE_UNSPECIFIED", - "ENABLED", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "disks": { - "items": { - "$ref": "LocalDisk" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeTemplate", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeTemplate for node templates.", - "type": "string" - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "type": "string" - }, - "nodeAffinityLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to use for node affinity, which will be used in instance scheduling.", - "type": "object" - }, - "nodeType": { - "description": "The node type to use for nodes group that are created from this template.", - "type": "string" - }, - "nodeTypeFlexibility": { - "$ref": "NodeTemplateNodeTypeFlexibility", - "description": "Do not use. Instead, use the node_type property." - }, - "region": { - "description": "[Output Only] The name of the region where the node template resides,\nsuch as us-central1.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serverBinding": { - "$ref": "ServerBinding", - "description": "Sets the binding properties for the physical server. Valid values include:\n \n - *[Default]* RESTART_NODE_ON_ANY_SERVER:\n Restarts VMs on any available\n physical server\n - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same\n physical server whenever possible\n\n\n\nSee Sole-tenant\nnode options for more information." - }, - "status": { - "description": "[Output Only] The status of the node template. One of the following values:CREATING, READY, and DELETING.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated.", - "The node template is currently being deleted.", - "Invalid status.", - "The node template is ready." - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - } - }, - "type": "object" - }, - "NodeTemplateAggregatedList": { - "id": "NodeTemplateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeTemplatesScopedList", - "description": "[Output Only] Name of the scope containing this set of node templates." - }, - "description": "A list of NodeTemplatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeTemplateAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeTemplateAggregatedList for aggregated lists of\nnode templates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTemplateList": { - "description": "Contains a list of node templates.", - "id": "NodeTemplateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeTemplate resources.", - "items": { - "$ref": "NodeTemplate" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeTemplateList", - "description": "[Output Only] Type of resource.Always compute#nodeTemplateList\nfor lists of node templates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTemplateNodeTypeFlexibility": { - "id": "NodeTemplateNodeTypeFlexibility", - "properties": { - "cpus": { - "type": "string" - }, - "localSsd": { - "type": "string" - }, - "memory": { - "type": "string" - } - }, - "type": "object" - }, - "NodeTemplatesScopedList": { - "id": "NodeTemplatesScopedList", - "properties": { - "nodeTemplates": { - "description": "[Output Only] A list of node templates contained in this scope.", - "items": { - "$ref": "NodeTemplate" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the node templates\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeType": { - "description": "Represent a sole-tenant Node Type resource.\n\nEach node within a node group must have a node type. A node type specifies\nthe total amount of cores and memory for that node. Currently, the only\navailable node type is n1-node-96-624 node type that has 96\nvCPUs and 624 GB of memory, available in multiple zones. For more information\nreadNode types.", - "id": "NodeType", - "properties": { - "cpuPlatform": { - "description": "[Output Only] The CPU platform used by this node type.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this node type." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "guestCpus": { - "description": "[Output Only] The number of virtual CPUs that are available to the node\ntype.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeType", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeType for node types.", - "type": "string" - }, - "localSsdGb": { - "description": "[Output Only] Local SSD available to the node type, defined in GB.", - "format": "int32", - "type": "integer" - }, - "maxVms": { - "description": "[Output Only] Maximum number of VMs that can be created for this node type.", - "format": "int32", - "type": "integer" - }, - "memoryMb": { - "description": "[Output Only] The amount of physical memory available to the node type,\ndefined in MB.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the node type resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "NodeTypeAggregatedList": { - "id": "NodeTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of node types." - }, - "description": "A list of NodeTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeTypeAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeTypeAggregatedList for aggregated lists of node\ntypes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTypeList": { - "description": "Contains a list of node types.", - "id": "NodeTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeType resources.", - "items": { - "$ref": "NodeType" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeTypeList", - "description": "[Output Only] Type of resource.Always compute#nodeTypeList for\nlists of node types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTypesScopedList": { - "id": "NodeTypesScopedList", - "properties": { - "nodeTypes": { - "description": "[Output Only] A list of node types contained in this scope.", - "items": { - "$ref": "NodeType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the node types\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NotificationEndpoint": { - "description": "Represents a notification endpoint.\n\nA notification endpoint resource defines an endpoint to receive notifications\nwhen there are status changes detected by the associated health check\nservice.\n\nFor more information, see\nHealth checks overview.", - "id": "NotificationEndpoint", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "grpcSettings": { - "$ref": "NotificationEndpointGrpcSettings", - "description": "Settings of the gRPC notification endpoint including the endpoint URL and\nthe retry duration." - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#notificationEndpoint", - "description": "[Output Only] Type of the resource. Alwayscompute#notificationEndpoint for notification endpoints.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the notification endpoint resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "NotificationEndpointAggregatedList": { - "description": "Contains a list of NotificationEndpointsScopedList.", - "id": "NotificationEndpointAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NotificationEndpointsScopedList", - "description": "Name of the scope containing this set of NotificationEndpoints." - }, - "description": "A list of NotificationEndpointsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#notificationEndpointAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NotificationEndpointGrpcSettings": { - "description": "Represents a gRPC setting that describes one gRPC notification endpoint and\nthe retry duration attempting to send notification to this endpoint.", - "id": "NotificationEndpointGrpcSettings", - "properties": { - "authority": { - "description": "Optional. If specified, this field is used to set the authority header by\nthe sender of notifications. See\nhttps://tools.ietf.org/html/rfc7540#section-8.1.2.3", - "type": "string" - }, - "endpoint": { - "description": "Endpoint to which gRPC notifications are sent. This must be a valid\ngRPCLB DNS name.", - "type": "string" - }, - "payloadName": { - "description": "Optional. If specified, this field is used to populate the \"name\" field\nin gRPC requests.", - "type": "string" - }, - "resendInterval": { - "$ref": "Duration", - "description": "Optional. This field is used to configure how often to send a full update\nof all non-healthy backends. If unspecified, full updates are not sent.\nIf specified, must be in the range between 600 seconds to 3600 seconds.\nNanos are disallowed. Can only be set for regional notification\nendpoints." - }, - "retryDurationSec": { - "description": "How much time (in seconds) is spent attempting notification retries\nuntil a successful response is received. Default is 30s. Limit is 20m\n(1200s). Must be a positive number.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "NotificationEndpointList": { - "id": "NotificationEndpointList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NotificationEndpoint resources.", - "items": { - "$ref": "NotificationEndpoint" - }, - "type": "array" - }, - "kind": { - "default": "compute#notificationEndpointList", - "description": "[Output Only] Type of the resource. Alwayscompute#notificationEndpoint for notification endpoints.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NotificationEndpointsScopedList": { - "id": "NotificationEndpointsScopedList", - "properties": { - "resources": { - "description": "A list of NotificationEndpoints contained in this scope.", - "items": { - "$ref": "NotificationEndpoint" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nnotification endpoints when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Operation": { - "description": "Represents an Operation resource.\n\nGoogle Compute Engine has three Operation resources:\n\n* [Global](/compute/docs/reference/rest/alpha/globalOperations)\n* [Regional](/compute/docs/reference/rest/alpha/regionOperations)\n* [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)\n\nYou can use an operation resource to manage asynchronous API requests.\nFor more information, readHandling\nAPI responses.\n\nOperations can be global, regional or zonal.\n \n - For global operations, use the `globalOperations`\n resource. \n - For regional operations, use the\n `regionOperations` resource. \n - For zonal operations, use\n the `zoneOperations` resource.\n\n\n\nFor more information, read\nGlobal, Regional, and Zonal Resources.\n\nNote that completed Operation resources have a limited \nretention period.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] The value of `requestId` if you provided it in the request.\nNot present otherwise.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Deprecated] This field is deprecated.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is\nset when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is inRFC3339\ntext format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation,\nthis field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error\nmessage that was returned, such as `NOT FOUND`.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error\nstatus code that was returned. For example, a `404` means the\nresource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the operation. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested.\nThis value is inRFC3339\ntext format.", - "type": "string" - }, - "instancesBulkInsertOperationMetadata": { - "$ref": "InstancesBulkInsertOperationMetadata" - }, - "kind": { - "default": "compute#operation", - "description": "[Output Only] Type of the resource. Always `compute#operation` for\nOperation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the operation.", - "type": "string" - }, - "operationGroupId": { - "description": "[Output Only] An ID that represents a group of operations, such as when a\ngroup of operations results from a `bulkInsert` API request.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as `insert`,\n`update`, or `delete`, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100.\nThere is no requirement that this be linear or support any granularity of\noperations. This should not be used to guess when the operation will be\ncomplete. This number should monotonically increase as the operation\nprogresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only\napplicable when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "setCommonInstanceMetadataOperationMetadata": { - "$ref": "SetCommonInstanceMetadataOperationMetadata", - "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata,\nthis field will contain information on all underlying zonal actions and\ntheir state." - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server.\nThis value is inRFC3339\ntext format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the\nfollowing:\n`PENDING`, `RUNNING`, or `DONE`.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the\noperation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation\nof the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies. For\noperations related to creating a snapshot, this points to the disk\nthat the snapshot was created from.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example:\n`user@example.com` or\n`alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the\noperation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only\napplicable when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationAggregatedList": { - "id": "OperationAggregatedList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "OperationsScopedList", - "description": "[Output Only] Name of the scope containing this set of operations." - }, - "description": "[Output Only] A map of scoped operation lists.", - "type": "object" - }, - "kind": { - "default": "compute#operationAggregatedList", - "description": "[Output Only] Type of resource. Always `compute#operationAggregatedList`\nfor aggregated lists of operations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger than\n`maxResults`, use the `nextPageToken` as a value for\nthe query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "compute#operationList", - "description": "[Output Only] Type of resource. Always `compute#operations` for Operations\nresource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger than\n`maxResults`, use the `nextPageToken` as a value for\nthe query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OperationsScopedList": { - "id": "OperationsScopedList", - "properties": { - "operations": { - "description": "[Output Only] A list of operations contained in this scope.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of operations\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OrganizationSecurityPoliciesListAssociationsResponse": { - "id": "OrganizationSecurityPoliciesListAssociationsResponse", - "properties": { - "associations": { - "description": "A list of associations.", - "items": { - "$ref": "SecurityPolicyAssociation" - }, - "type": "array" - }, - "kind": { - "default": "compute#organizationSecurityPoliciesListAssociationsResponse", - "description": "[Output Only] Type of securityPolicy associations. Alwayscompute#organizationSecurityPoliciesListAssociations for lists\nof securityPolicy associations.", - "type": "string" - } - }, - "type": "object" - }, - "OriginAuthenticationMethod": { - "description": "[Deprecated] Configuration for the origin authentication method.\nConfiguration for the origin authentication method.", - "id": "OriginAuthenticationMethod", - "properties": { - "jwt": { - "$ref": "Jwt" - } - }, - "type": "object" - }, - "OutlierDetection": { - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing\npool for the backend service.", - "id": "OutlierDetection", - "properties": { - "baseEjectionTime": { - "$ref": "Duration", - "description": "The base time that a backend endpoint is ejected for. Defaults to 30000ms\nor 30s.\n\nAfter a backend endpoint is returned back to the load balancing pool, it\ncan be ejected again in another ejection analysis. Thus, the total ejection\ntime is equal to the base ejection time multiplied by the number of times\nthe backend endpoint has been ejected. Defaults to 30000ms or 30s." - }, - "consecutiveErrors": { - "description": "Number of consecutive errors before a backend endpoint is ejected from the\nload balancing pool. When the backend endpoint is accessed over HTTP, a 5xx\nreturn code qualifies as an error. Defaults to 5.", - "format": "int32", - "type": "integer" - }, - "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or\nconnection errors that are mapped to one of those status codes) before a\nconsecutive gateway failure ejection occurs. Defaults to 3.", - "format": "int32", - "type": "integer" - }, - "enforcingConsecutiveErrors": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through consecutive 5xx. This setting can be\nused to disable ejection or to ramp it up slowly. Defaults to 0.", - "format": "int32", - "type": "integer" - }, - "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through consecutive gateway failures. This\nsetting can be used to disable ejection or to ramp it up slowly. Defaults\nto 100.", - "format": "int32", - "type": "integer" - }, - "enforcingSuccessRate": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through success rate statistics. This setting\ncan be used to disable ejection or to ramp it up slowly. Defaults to 100.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "interval": { - "$ref": "Duration", - "description": "Time interval between ejection analysis sweeps. This can result in both new\nejections and backend endpoints being returned to service. The interval is\nequal to the number of seconds as defined in\noutlierDetection.interval.seconds plus the number of nanoseconds as defined\nin outlierDetection.interval.nanos. Defaults to 1 second." - }, - "maxEjectionPercent": { - "description": "Maximum percentage of backend endpoints in the load balancing pool for the\nbackend service that can be ejected if the ejection conditions are met.\nDefaults to 50%.", - "format": "int32", - "type": "integer" - }, - "successRateMinimumHosts": { - "description": "The number of backend endpoints in the load balancing pool that must have\nenough request volume to detect success rate outliers. If the number of\nbackend endpoints is fewer than this setting, outlier detection via success\nrate statistics is not performed for any backend endpoint in the load\nbalancing pool. Defaults to 5.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "successRateRequestVolume": { - "description": "The minimum number of total requests that must be collected in one interval\n(as defined by the interval duration above) to include this backend\nendpoint in success rate based outlier detection. If the volume is lower\nthan this setting, outlier detection via success rate statistics is not\nperformed for that backend endpoint. Defaults to 100.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "successRateStdevFactor": { - "description": "This factor is used to determine the ejection threshold for success rate\noutlier ejection. The ejection threshold is the difference between the mean\nsuccess rate, and the product of this factor and the standard deviation of\nthe mean success rate: mean - (stdev * successRateStdevFactor). This factor\nis divided by a thousand to get a double. That is, if the desired factor\nis 1.9, the runtime value should be 1900. Defaults to 1900.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PacketIntervals": { - "description": "Next free: 7", - "id": "PacketIntervals", - "properties": { - "avgMs": { - "description": "Average observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "duration": { - "description": "From how long ago in the past these intervals were observed.", - "enum": [ - "DURATION_UNSPECIFIED", - "HOUR", - "MAX", - "MINUTE" - ], - "enumDescriptions": [ - "", - "", - "From BfdSession object creation time.", - "" - ], - "type": "string" - }, - "maxMs": { - "description": "Maximum observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "minMs": { - "description": "Minimum observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "numIntervals": { - "description": "Number of inter-packet intervals from which these statistics were derived.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "The type of packets for which inter-packet intervals were computed.", - "enum": [ - "LOOPBACK", - "RECEIVE", - "TRANSMIT", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Only applies to Echo packets. This shows the intervals between sending\nand receiving the same packet.", - "Intervals between received packets.", - "Intervals between transmitted packets.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroring": { - "description": "Represents a Packet Mirroring resource.\n\nPacket Mirroring clones the traffic of specified instances in your Virtual\nPrivate Cloud (VPC) network and forwards it to a collector destination,\nsuch as an instance group of an internal TCP/UDP load balancer, for analysis\nor examination.\nFor more information about setting up Packet Mirroring, seeUsing Packet Mirroring.", - "id": "PacketMirroring", - "properties": { - "collectorIlb": { - "$ref": "PacketMirroringForwardingRuleInfo", - "description": "The Forwarding Rule resource of typeloadBalancingScheme=INTERNAL that will be used as collector\nfor mirrored traffic.\nThe specified forwarding rule must have isMirroringCollector\nset to true." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enable": { - "description": "Indicates whether or not this packet mirroring takes effect.\nIf set to FALSE, this packet mirroring policy will not be enforced on the\nnetwork.\n\nThe default is TRUE.", - "enum": [ - "FALSE", - "TRUE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "filter": { - "$ref": "PacketMirroringFilter", - "description": "Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#packetMirroring", - "description": "[Output Only] Type of the resource. Alwayscompute#packetMirroring for packet mirrorings.", - "type": "string" - }, - "mirroredResources": { - "$ref": "PacketMirroringMirroredResourceInfo", - "description": "PacketMirroring mirroredResourceInfos.\nMirroredResourceInfo specifies a set of mirrored VM instances, subnetworks\nand/or tags for which traffic from/to all VM instances will be mirrored." - }, - "name": { - "annotations": { - "required": [ - "compute.packetMirrorings.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "$ref": "PacketMirroringNetworkInfo", - "annotations": { - "required": [ - "compute.packetMirrorings.insert" - ] - }, - "description": "Specifies the mirrored VPC network. Only packets in this network will be\nmirrored. All mirrored VMs should have a NIC in the given network.\nAll mirrored subnetworks should belong to the given network." - }, - "priority": { - "description": "The priority of applying this configuration. Priority is used to break ties\nin cases where there is more than one matching rule. In the case of two\nrules that apply for a given Instance, the one with the lowest-numbered\npriority value wins.\n\nDefault value is 1000. Valid range is 0 through 65535.", - "format": "uint32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URI of the region where the packetMirroring resides.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringAggregatedList": { - "description": "Contains a list of packetMirrorings.", - "id": "PacketMirroringAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "PacketMirroringsScopedList", - "description": "Name of the scope containing this set of packetMirrorings." - }, - "description": "A list of PacketMirroring resources.", - "type": "object" - }, - "kind": { - "default": "compute#packetMirroringAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PacketMirroringFilter": { - "id": "PacketMirroringFilter", - "properties": { - "IPProtocols": { - "description": "Protocols that apply as filter on mirrored traffic.\nIf no protocols are specified, all traffic that matches the specified\nCIDR ranges is mirrored.\nIf neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is\nmirrored.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cidrRanges": { - "description": "One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source\n(ingress) or destination (egress) IP in the IP header. If no ranges are\nspecified, all IPv4 traffic that matches the specified IPProtocols is\nmirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4\ntraffic is mirrored. To mirror all IPv4 and IPv6 traffic, use\n\"0.0.0.0/0,::/0\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "direction": { - "description": "Direction of traffic to mirror, either INGRESS, EGRESS, or BOTH.\nThe default is BOTH.", - "enum": [ - "BOTH", - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "Default, both directions are mirrored.", - "Only egress traffic is mirrored.", - "Only ingress traffic is mirrored." - ], - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringForwardingRuleInfo": { - "id": "PacketMirroringForwardingRuleInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the forwarding rule; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the forwarding rule representing the ILB\nconfigured as destination of the mirrored traffic.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringList": { - "description": "Contains a list of PacketMirroring resources.", - "id": "PacketMirroringList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PacketMirroring resources.", - "items": { - "$ref": "PacketMirroring" - }, - "type": "array" - }, - "kind": { - "default": "compute#packetMirroringList", - "description": "[Output Only] Type of resource. Always compute#packetMirroring\nfor packetMirrorings.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfo": { - "id": "PacketMirroringMirroredResourceInfo", - "properties": { - "instances": { - "description": "A set of virtual machine instances that are being mirrored.\nThey must live in zones contained in the same region as this\npacketMirroring.\n\nNote that this config will apply only to those network interfaces of the\nInstances that belong to the network specified in this packetMirroring.\n\nYou may specify a maximum of 50 Instances.", - "items": { - "$ref": "PacketMirroringMirroredResourceInfoInstanceInfo" - }, - "type": "array" - }, - "subnetworks": { - "description": "A set of subnetworks for which traffic from/to all VM instances will be\nmirrored. They must live in the same region as this packetMirroring.\n\nYou may specify a maximum of 5 subnetworks.", - "items": { - "$ref": "PacketMirroringMirroredResourceInfoSubnetInfo" - }, - "type": "array" - }, - "tags": { - "description": "A set of mirrored tags. Traffic from/to all VM instances that have one or\nmore of these tags will be mirrored.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfoInstanceInfo": { - "id": "PacketMirroringMirroredResourceInfoInstanceInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the instance; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the virtual machine instance which is being mirrored.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfoSubnetInfo": { - "id": "PacketMirroringMirroredResourceInfoSubnetInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the subnetwork; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the subnetwork for which\ntraffic from/to all VM instances will be mirrored.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringNetworkInfo": { - "id": "PacketMirroringNetworkInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the network; defined by the server.", - "type": "string" - }, - "url": { - "description": "URL of the network resource.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringsScopedList": { - "id": "PacketMirroringsScopedList", - "properties": { - "packetMirrorings": { - "description": "A list of packetMirrorings contained in this scope.", - "items": { - "$ref": "PacketMirroring" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of packetMirrorings when the\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PartnerMetadata": { - "description": "Model definition of partner_metadata field.\nTo be used in dedicated Partner Metadata methods and to be inlined in\nthe Instance and InstanceTemplate resources.", - "id": "PartnerMetadata", - "properties": { - "fingerprint": { - "description": "Instance-level hash to be used for optimistic\nlocking.", - "format": "byte", - "type": "string" - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance. A map from a subdomain to\nentries map. Subdomain name must be compliant withRFC1035\ndefinition. The total size of all keys and values must be less than 2MB.\nSubdomain 'metadata.compute.googleapis.com' is reserverd for instance's\nmetadata.", - "type": "object" - } - }, - "type": "object" - }, - "PathMatcher": { - "description": "A matcher for the path portion of the URL. The BackendService\nfrom the longest-matched rule will serve the URL. If no rule was matched, the\ndefault service is used.", - "id": "PathMatcher", - "properties": { - "defaultCustomErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "defaultCustomErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nThis policy takes\neffect at the PathMatcher level and applies only when no\npolicy has been defined for the error code at lower levels likeRouteRule and PathRule within thisPathMatcher. If an error code does not have a policy defined\nin defaultCustomErrorResponsePolicy, then a policy defined for\nthe error code in UrlMap.defaultCustomErrorResponsePolicy\ntakes effect. \n\nFor example, consider a UrlMap with the following\nconfiguration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy is configured\n with policies for 5xx and 4xx errors\n - A RouteRule for /coming_soon/ is configured for the\n error code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in RouteRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect. \n\nWhen\nused in conjunction withpathMatcher.defaultRouteAction.retryPolicy, retries take\nprecedence. Only once all retries are exhausted, thedefaultCustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the defaultCustomErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ndefaultCustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "defaultRouteAction": { - "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the \npathRules or routeRules match. The load balancer\nperforms advanced routing actions, such as URL rewrites and\nheader transformations, before forwarding the request to the\nselected backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a path matcher'sdefaultRouteAction." - }, - "defaultService": { - "description": "The full or partial URL to the BackendService resource. This\nURL is used if none of the pathRules orrouteRules defined by this PathMatcher are\nmatched. For example, the\nfollowing are all valid URLs to a BackendService resource:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService\n - compute/v1/projects/project/global/backendServices/backendService\n - global/backendServices/backendService\n\n\nIf defaultRouteAction is also specified, advanced\nrouting actions, such as URL rewrites, take effect before sending the\nrequest to the backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nAuthorization requires one or more of the following Google IAM permissions on the\nspecified resource default_service: \n \n \n - compute.backendBuckets.use\n - compute.backendServices.use", - "type": "string" - }, - "defaultUrlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules orrouteRules match, the request is redirected to a URL specified\nby defaultUrlRedirect.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backend service.\n\nHeaderAction specified here are applied after the matchingHttpRouteRule HeaderAction and before theHeaderAction in the UrlMap\n\nHeaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "name": { - "description": "The name to which this PathMatcher is referred by theHostRule.", - "type": "string" - }, - "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules\nwhen routing based on simple path matching is all that's required. The\norder by which path rules are specified does not matter. Matches are always\ndone on the longest-path-first basis.\n\nFor example: a pathRule with a path /a/b/c/* will match\nbefore /a/b/* irrespective of the order in which those paths appear in this\nlist.\n\nWithin a given pathMatcher, only one ofpathRules or routeRules must be set.", - "items": { - "$ref": "PathRule" - }, - "type": "array" - }, - "routeRules": { - "description": "The list of HTTP route rules. Use this list instead ofpathRules when advanced route matching and routing actions are\ndesired. routeRules are evaluated in order of priority, from\nthe lowest to highest number.\n\nWithin a given pathMatcher, you can set only one ofpathRules or routeRules.", - "items": { - "$ref": "HttpRouteRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "PathRule": { - "description": "A path-matching rule for a URL. If matched, will use the specifiedBackendService to handle the traffic arriving at this URL.", - "id": "PathRule", - "properties": { - "customErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "customErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nIf a policy for an\nerror code is not configured for the PathRule, a policy for\nthe error code configured inpathMatcher.defaultCustomErrorResponsePolicy is applied. If\none is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the policy\nconfigured in UrlMap.defaultCustomErrorResponsePolicy takes\neffect. \n\nFor example, consider a UrlMap with the following configuration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy are configured\n with policies for 5xx and 4xx errors\n - A PathRule for /coming_soon/ is configured for the error\n code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in PathRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect.\n\ncustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "paths": { - "description": "The list of path patterns to match. Each must start with /\nand the only place a * is allowed is at the end following\na /. The string fed to the path matcher does not include\nany text after the first ? or #, and\nthose chars are not allowed here.", - "items": { - "type": "string" - }, - "type": "array" - }, - "routeAction": { - "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer\nperforms advanced routing actions, such as URL rewrites and header\ntransformations, before forwarding the request to the selected\nbackend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a path rule'srouteAction." - }, - "service": { - "description": "The full or partial URL of the backend service resource to which traffic\nis directed if this rule is matched. If routeAction is\nalso specified, advanced routing actions, such as URL rewrites,\ntake effect before sending the request to the backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.", - "type": "string" - }, - "urlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL\nspecified by urlRedirect.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - } - }, - "type": "object" - }, - "PeerAuthenticationMethod": { - "description": "[Deprecated] Configuration for the peer authentication method.\nConfiguration for the peer authentication method.", - "id": "PeerAuthenticationMethod", - "properties": { - "mtls": { - "$ref": "MutualTls", - "description": "Set if mTLS is used for peer authentication." - } - }, - "type": "object" - }, - "PerInstanceConfig": { - "id": "PerInstanceConfig", - "properties": { - "fingerprint": { - "description": "Fingerprint of this per-instance config. This field can be used in\noptimistic locking. It is ignored when inserting a per-instance\nconfig. An up-to-date fingerprint must be provided in order to update an\nexisting per-instance configuration or the field needs to be unset.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "The name of a per-instance configuration and its corresponding instance.\nServes as a merge key during UpdatePerInstanceConfigs\noperations, that is, if a per-instance configuration with the same name\nexists then it will be updated, otherwise a new one will be created for the\nVM instance with the same name. An attempt to create a per-instance\nconfiguration for a VM instance that either doesn't exist or is not part\nof the group will result in an error.", - "type": "string" - }, - "preservedState": { - "$ref": "PreservedState", - "description": "The intended preserved state for the given instance. Does not contain\npreserved state generated from a stateful policy." - }, - "status": { - "description": "The status of applying this per-instance configuration on the corresponding\nmanaged instance.", - "enum": [ - "APPLYING", - "DELETING", - "EFFECTIVE", - "NONE", - "UNAPPLIED", - "UNAPPLIED_DELETION" - ], - "enumDescriptions": [ - "The per-instance configuration is being applied to the instance, but is\nnot yet effective, possibly waiting for the instance to, for example,REFRESH.", - "The per-instance configuration deletion is being applied on the instance,\npossibly waiting for the instance to, for example, REFRESH.", - "The per-instance configuration is effective on the instance, meaning that\nall disks, ips and metadata specified in this configuration are attached\nor set on the instance.", - "*[Default]* The default status, when no per-instance configuration\nexists.", - "The per-instance configuration is set on an instance but not been applied\nyet.", - "The per-instance configuration has been deleted, but the deletion is not\nyet applied." - ], - "type": "string" - } - }, - "type": "object" - }, - "Permission": { - "description": "[Deprecated] All fields defined in a permission are ANDed.", - "id": "Permission", - "properties": { - "constraints": { - "description": "Extra custom constraints. The constraints are ANDed together.", - "items": { - "$ref": "PermissionConstraint" - }, - "type": "array" - }, - "hosts": { - "description": "Used in Ingress or Egress Gateway cases to specify hosts that the policy\napplies to. Exact match, prefix match, and suffix match are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "methods": { - "description": "HTTP method.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notHosts": { - "description": "Negate of hosts. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notMethods": { - "description": "Negate of methods. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notPaths": { - "description": "Negate of paths. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notPorts": { - "description": "Negate of ports. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "description": "HTTP request paths or gRPC methods.\nExact match, prefix match, and suffix match are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "ports": { - "description": "Port names or numbers.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PermissionConstraint": { - "description": "Custom constraint that specifies a key and a list of allowed values for\nIstio attributes.", - "id": "PermissionConstraint", - "properties": { - "key": { - "description": "Key of the constraint.", - "type": "string" - }, - "values": { - "description": "A list of allowed values.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members`, or principals, to a single `role`. Principals can be user\naccounts, service accounts, Google groups, and domains (such as G Suite). A\n`role` is a named list of permissions; each `role` can be an IAM predefined\nrole or a user-created custom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a\n`condition`, which is a logical expression that allows access to a resource\nonly if the expression evaluates to `true`. A condition can add constraints\nbased on attributes of the request, the resource, or both. To learn which\nresources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n```\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\n \"user:eve@example.com\"\n ],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n```\n\n**YAML example:**\n\n```\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n etag: BwWWja0YfJA=\n version: 3\n```\n\nFor a description of IAM and its features, see the\n[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,\nmay specify a `condition` that determines how and when the `bindings` are\napplied. Each of the `bindings` must contain at least one principal.\n\nThe `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250\nof these principals can be Google groups. Each occurrence of a principal\ncounts towards these limits. For example, if the `bindings` grant 50\ndifferent roles to `user:alice@example.com`, and not to any other\nprincipal, then you can add another 1,450 principals to the `bindings` in\nthe `Policy`.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PreconfiguredWafSet": { - "id": "PreconfiguredWafSet", - "properties": { - "expressionSets": { - "description": "List of entities that are currently supported for WAF rules.", - "items": { - "$ref": "WafExpressionSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "PreservedState": { - "description": "Preserved state for a given instance.", - "id": "PreservedState", - "properties": { - "disks": { - "additionalProperties": { - "$ref": "PreservedStatePreservedDisk" - }, - "description": "Preserved disks defined for this instance.\nThis map is keyed with the device names of the disks.", - "type": "object" - }, - "externalIPs": { - "additionalProperties": { - "$ref": "PreservedStatePreservedNetworkIp" - }, - "description": "Preserved external IPs defined for this instance.\nThis map is keyed with the name of the network interface.", - "type": "object" - }, - "internalIPs": { - "additionalProperties": { - "$ref": "PreservedStatePreservedNetworkIp" - }, - "description": "Preserved internal IPs defined for this instance.\nThis map is keyed with the name of the network interface.", - "type": "object" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Preserved metadata defined for this instance.", - "type": "object" - } - }, - "type": "object" - }, - "PreservedStatePreservedDisk": { - "id": "PreservedStatePreservedDisk", - "properties": { - "autoDelete": { - "description": "These stateful disks will never be deleted during autohealing,\nupdate, instance recreate operations. This flag is used to configure\nif the disk should be deleted after it is no longer used by the group,\ne.g. when the given instance or the whole MIG is deleted.\nNote: disks attached in READ_ONLY mode cannot be\nauto-deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. If not specified, the default is to attach the\ndisk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple VM instances can use\na disk in READ_ONLY mode at a time.", - "*[Default]* Attaches this disk in READ_WRITE mode. Only\none VM instance at a time can be attached to a disk inREAD_WRITE mode." - ], - "type": "string" - }, - "source": { - "description": "The URL of the disk resource that is stateful and should be attached\nto the VM instance.", - "type": "string" - } - }, - "type": "object" - }, - "PreservedStatePreservedNetworkIp": { - "id": "PreservedStatePreservedNetworkIp", - "properties": { - "autoDelete": { - "description": "These stateful IPs will never be released during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the IP reservation should be deleted\nafter it is no longer used by the group, e.g. when the given instance\nor the whole group is deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "ipAddress": { - "$ref": "PreservedStatePreservedNetworkIpIpAddress", - "description": "Ip address representation" - } - }, - "type": "object" - }, - "PreservedStatePreservedNetworkIpIpAddress": { - "id": "PreservedStatePreservedNetworkIpIpAddress", - "properties": { - "address": { - "description": "The URL of the reservation for this IP address.", - "type": "string" - }, - "literal": { - "description": "An IPv4 internal network address to assign to the instance for this\nnetwork interface.", - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeature": { - "description": "Represents a single Google Compute Engine preview feature.", - "id": "PreviewFeature", - "properties": { - "activationStatus": { - "description": "Specifies whether the feature is enabled or disabled.", - "enum": [ - "ACTIVATION_STATE_UNSPECIFIED", - "DISABLED", - "ENABLED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] Description of the feature.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#previewFeature", - "description": "[Output only] The type of the feature. Always \"compute#previewFeature\" for\npreview features.", - "type": "string" - }, - "name": { - "description": "Name of the feature.", - "type": "string" - }, - "rolloutOperation": { - "$ref": "PreviewFeatureRolloutOperation", - "description": "Rollout operation of the feature." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "$ref": "PreviewFeatureStatus", - "description": "[Output only] Status of the feature." - } - }, - "type": "object" - }, - "PreviewFeatureList": { - "id": "PreviewFeatureList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PreviewFeature resources.", - "items": { - "$ref": "PreviewFeature" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperation": { - "description": "Represents the rollout operation", - "id": "PreviewFeatureRolloutOperation", - "properties": { - "rolloutInput": { - "$ref": "PreviewFeatureRolloutOperationRolloutInput", - "description": "Input only. The input for the rollout operation." - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutInput": { - "description": "Represents the input for the rollout operation.", - "id": "PreviewFeatureRolloutOperationRolloutInput", - "properties": { - "name": { - "description": "The name of the rollout plan\nEx.\norganizations//locations/global/rolloutPlans/\nEx.\nfolders//locations/global/rolloutPlans/\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "predefinedRolloutPlan": { - "description": "Predefined rollout plan.", - "enum": [ - "ROLLOUT_PLAN_FAST_ROLLOUT", - "ROLLOUT_PLAN_TWO_DAY_ROLLOUT", - "ROLLOUT_PLAN_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeatureStatus": { - "description": "[Output Only] The status of the feature.", - "id": "PreviewFeatureStatus", - "properties": { - "description": { - "description": "[Output Only] The description of the feature.", - "type": "string" - }, - "helpLink": { - "description": "[Output Only] Link to the public documentation for the feature.", - "type": "string" - }, - "releaseStatus": { - "$ref": "PreviewFeatureStatusReleaseStatus" - } - }, - "type": "object" - }, - "PreviewFeatureStatusReleaseStatus": { - "description": "[Output Only] The release status of the feature.", - "id": "PreviewFeatureStatusReleaseStatus", - "properties": { - "stage": { - "description": "[Output Only] The stage of the feature.", - "enum": [ - "DEPRECATED", - "GA", - "PREVIEW", - "STAGE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "updateDate": { - "$ref": "Date", - "description": "Output only. The last date when a feature transitioned between ReleaseStatuses.", - "readOnly": true - } - }, - "type": "object" - }, - "Principal": { - "description": "[Deprecated] All fields defined in a principal are ANDed.", - "id": "Principal", - "properties": { - "condition": { - "description": "An expression to specify custom condition.", - "type": "string" - }, - "groups": { - "description": "The groups the principal belongs to.\nExact match, prefix match, and suffix match are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "ips": { - "description": "IPv4 or IPv6 address or range (In CIDR format)", - "items": { - "type": "string" - }, - "type": "array" - }, - "namespaces": { - "description": "The namespaces. Exact match, prefix match, and suffix match are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notGroups": { - "description": "Negate of groups. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notIps": { - "description": "Negate of IPs. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notNamespaces": { - "description": "Negate of namespaces. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notUsers": { - "description": "Negate of users. Specifies exclusions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "A map of Istio attribute to expected values. Exact match, prefix match, and\nsuffix match are supported for values. For example,\n`request.headers[version]: \"v1\"`. The properties are ANDed together.", - "type": "object" - }, - "users": { - "description": "The user names/IDs or service accounts.\nExact match, prefix match, and suffix match are supported.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Project": { - "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform\nenvironment. For more information, read about the \nResource Hierarchy.", - "id": "Project", - "properties": { - "cloudArmorTier": { - "description": "[Output Only] The Cloud Armor tier for this project. It can be one of the\nfollowing values: CA_STANDARD,CA_ENTERPRISE_PAYGO.\n\nIf this field is not specified, it is assumed to beCA_STANDARD.", - "enum": [ - "CA_ENTERPRISE_ANNUAL", - "CA_ENTERPRISE_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Enterprise tier protection billed annually.", - "Enterprise tier protection billed monthly.", - "Standard protection." - ], - "type": "string" - }, - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this\nproject. See Custom\nmetadata for more information." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultNetworkTier": { - "description": "This signifies the default network tier used for configuring resources of\nthe project and can only take the following values:PREMIUM, STANDARD. Initially the default network\ntier is PREMIUM.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "defaultServiceAccount": { - "description": "[Output Only] Default service account used by VMs running in this project.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource.", - "type": "string" - }, - "enabledFeatures": { - "description": "An optional list of restricted features enabled for use on this project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server. This is *not* the project ID, and is\njust a unique ID used by Compute Engine to identify resources.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#project", - "description": "[Output Only] Type of the resource. Always compute#project for\nprojects.", - "type": "string" - }, - "managedProtectionTier": { - "description": "[Output Only] The Cloud Armor Managed Protection (CAMP) tier for\nthis project. It can be one of the following values:CA_STANDARD, CAMP_PLUS_PAYGO.\n\nIf this field is not specified, it is assumed to beCA_STANDARD.", - "enum": [ - "CAMP_PLUS_ANNUAL", - "CAMP_PLUS_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Plus tier protection annual.", - "Plus tier protection monthly.", - "Standard protection." - ], - "type": "string" - }, - "name": { - "description": "The project ID. For example: my-example-project. Use the\nproject ID to make requests to Compute Engine.", - "type": "string" - }, - "quotas": { - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "An optional naming prefix for daily usage reports and the Google Cloud\nStorage bucket where they are stored." - }, - "vmDnsSetting": { - "description": "[Output Only] Default internal DNS setting used by VMs running in\nthis project.", - "enum": [ - "GLOBAL_DEFAULT", - "UNSPECIFIED_VM_DNS_SETTING", - "ZONAL_DEFAULT", - "ZONAL_ONLY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "xpnProjectStatus": { - "description": "[Output Only] The role this project has in a shared VPC configuration.\nCurrently, only projects with the host role, which is specified by the\nvalue HOST, are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "properties": { - "kind": { - "default": "compute#projectsGetXpnResources", - "description": "[Output Only] Type of resource. Alwayscompute#projectsGetXpnResources for lists of service resources\n(a.k.a service projects)", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "resources": { - "description": "Service resources (a.k.a service projects) attached to this project as\ntheir shared VPC host.", - "items": { - "$ref": "XpnResourceId" - }, - "type": "array" - } - }, - "type": "object" - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "properties": { - "organization": { - "description": "Optional organization ID managed by Cloud Resource Manager, for which to\nlist shared VPC host projects. If not specified, the organization will be\ninferred from the project.", - "type": "string" - }, - "returnPartialPage": { - "description": "Opt-in for partial page behavior which provides a partial filled page\n(number of items on which may be smaller than maxResults) within the API\ndeadline. If opt-in, then the user should rely on if nextPageToken is empty\nin the response to determine if there is a next page. Empty page is also\nvalid and possible. The default value is false.", - "type": "boolean" - } - }, - "type": "object" - }, - "ProjectsSetCloudArmorTierRequest": { - "id": "ProjectsSetCloudArmorTierRequest", - "properties": { - "cloudArmorTier": { - "description": "Managed protection tier to be set.", - "enum": [ - "CA_ENTERPRISE_ANNUAL", - "CA_ENTERPRISE_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Enterprise tier protection billed annually.", - "Enterprise tier protection billed monthly.", - "Standard protection." - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetDefaultNetworkTierRequest": { - "id": "ProjectsSetDefaultNetworkTierRequest", - "properties": { - "networkTier": { - "description": "Default network tier to be set.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetDefaultServiceAccountRequest": { - "id": "ProjectsSetDefaultServiceAccountRequest", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetManagedProtectionTierRequest": { - "id": "ProjectsSetManagedProtectionTierRequest", - "properties": { - "managedProtectionTier": { - "description": "Managed protection tier to be set.", - "enum": [ - "CAMP_PLUS_ANNUAL", - "CAMP_PLUS_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Plus tier protection annual.", - "Plus tier protection monthly.", - "Standard protection." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefix": { - "description": "A public advertised prefix represents an aggregated IP prefix or netblock\nwhich customers bring to cloud. The IP prefix is a single unit of route\nadvertisement and is announced globally to the internet.", - "id": "PublicAdvertisedPrefix", - "properties": { - "byoipApiVersion": { - "description": "[Output Only] The version of BYOIP API.", - "enum": [ - "V1", - "V2" - ], - "enumDescriptions": [ - "This public advertised prefix can be used to create both regional and\nglobal public delegated prefixes. It usually takes 4 weeks to create or\ndelete a public delegated prefix. The BGP status cannot be changed.", - "This public advertised prefix can only be used to create regional public\ndelegated prefixes. Public delegated prefix creation and deletion takes\nminutes and the BGP status can be modified." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "dnsVerificationIp": { - "description": "The address to be used for reverse DNS verification.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a new PublicAdvertisedPrefix. An up-to-date\nfingerprint must be provided in order to update thePublicAdvertisedPrefix, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a PublicAdvertisedPrefix.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "ipCidrRange": { - "description": "The address range, in CIDR format, represented by this public advertised\nprefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "The internet access type for IPv6 Public Advertised Prefixes.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "Default IPv6 access type. The prefix will be announced to the internet.\nAll children Public Delegated Prefixes will have IPv6 access type as\nEXTERNAL.", - "The prefix will not be announced to the internet. Prefix will be used\nprivately within Cloud. All children Public Delegated Prefixes\nwill have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "kind": { - "default": "compute#publicAdvertisedPrefix", - "description": "[Output Only] Type of the resource. Alwayscompute#publicAdvertisedPrefix for public advertised prefixes.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.publicAdvertisedPrefixes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "pdpScope": { - "description": "Specifies how child public delegated prefix will be scoped. It could\nbe one of following values:\n \n \n - `REGIONAL`: The public delegated prefix is regional only. The\n provisioning will take a few minutes.\n - `GLOBAL`: The public delegated prefix is global only. The\n provisioning will take ~4 weeks.\n - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is\n BYOIP V1 legacy prefix. This is output only value and no longer\n supported in BYOIP V2.", - "enum": [ - "GLOBAL", - "GLOBAL_AND_REGIONAL", - "REGIONAL" - ], - "enumDescriptions": [ - "The public delegated prefix is global only. The provisioning will take ~4\nweeks.", - "The public delegated prefixes is BYOIP V1 legacy prefix. This is output\nonly value and no longer supported in BYOIP V2.", - "The public delegated prefix is regional only. The provisioning will take\na few minutes." - ], - "type": "string" - }, - "publicDelegatedPrefixs": { - "description": "[Output Only] The list of public delegated prefixes that exist for this\npublic advertised prefix.", - "items": { - "$ref": "PublicAdvertisedPrefixPublicDelegatedPrefix" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "sharedSecret": { - "description": "[Output Only] The shared secret to be used for reverse DNS verification.", - "type": "string" - }, - "status": { - "description": "The status of the public advertised prefix. Possible values include:\n \n \n - `INITIAL`: RPKI validation is complete.\n - `PTR_CONFIGURED`: User has configured the PTR.\n - `VALIDATED`: Reverse DNS lookup is successful.\n - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed.\n - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being\n configured.\n - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured.\n - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed.", - "enum": [ - "ANNOUNCED_TO_INTERNET", - "INITIAL", - "PREFIX_CONFIGURATION_COMPLETE", - "PREFIX_CONFIGURATION_IN_PROGRESS", - "PREFIX_REMOVAL_IN_PROGRESS", - "PTR_CONFIGURED", - "READY_TO_ANNOUNCE", - "REVERSE_DNS_LOOKUP_FAILED", - "VALIDATED" - ], - "enumDescriptions": [ - "The prefix is announced to Internet.", - "RPKI validation is complete.", - "The prefix is fully configured.", - "The prefix is being configured.", - "The prefix is being removed.", - "User has configured the PTR.", - "The prefix is currently withdrawn but ready to be announced.", - "Reverse DNS lookup failed.", - "Reverse DNS lookup is successful." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefixList": { - "id": "PublicAdvertisedPrefixList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PublicAdvertisedPrefix resources.", - "items": { - "$ref": "PublicAdvertisedPrefix" - }, - "type": "array" - }, - "kind": { - "default": "compute#publicAdvertisedPrefixList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicAdvertisedPrefix for public advertised prefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefixPublicDelegatedPrefix": { - "description": "Represents a CIDR range which can be used to assign addresses.", - "id": "PublicAdvertisedPrefixPublicDelegatedPrefix", - "properties": { - "ipRange": { - "description": "The IP address range of the public delegated prefix", - "type": "string" - }, - "name": { - "description": "The name of the public delegated prefix", - "type": "string" - }, - "project": { - "description": "The project number of the public delegated prefix", - "type": "string" - }, - "region": { - "description": "The region of the public delegated prefix if it is regional. If absent,\nthe prefix is global.", - "type": "string" - }, - "status": { - "description": "The status of the public delegated prefix. Possible values are:\n INITIALIZING: The public delegated prefix is being initialized and\n addresses cannot be created yet.\n ANNOUNCED: The public delegated prefix is active.", - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefix": { - "description": "A PublicDelegatedPrefix resource represents an IP block within a\nPublicAdvertisedPrefix that is configured within a single cloud scope\n(global or region). IPs in the block can be allocated to resources within\nthat scope. Public delegated prefixes may be further broken up into\nsmaller IP blocks in the same scope as the parent block.", - "id": "PublicDelegatedPrefix", - "properties": { - "allocatablePrefixLength": { - "description": "The allocatable prefix length supported by this public delegated prefix.\nThis field is optional and cannot be set for prefixes in DELEGATION mode.\nIt cannot be set for IPv4 prefixes either, and it always defaults to 32.", - "format": "int32", - "type": "integer" - }, - "byoipApiVersion": { - "description": "[Output Only] The version of BYOIP API.", - "enum": [ - "V1", - "V2" - ], - "enumDescriptions": [ - "This public delegated prefix usually takes 4 weeks to delete, and the BGP\nstatus cannot be changed. Announce and Withdraw APIs can not be used on\nthis prefix.", - "This public delegated prefix takes minutes to delete. Announce and\nWithdraw APIs can be used on this prefix to change the BGP status." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEnhancedIpv4Allocation": { - "description": "[Output Only] Whether this PDP supports enhanced IPv4 allocations.\nApplicable for IPv4 PDPs only.", - "type": "boolean" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a new PublicDelegatedPrefix. An up-to-date\nfingerprint must be provided in order to update thePublicDelegatedPrefix, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a PublicDelegatedPrefix.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "ipCidrRange": { - "description": "The IP address range, in CIDR format, represented by this public\ndelegated prefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "[Output Only] The internet access type for IPv6 Public Delegated Prefixes.\nInherited from parent prefix.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "The parent public advertised prefix will be announced to the internet.\nAll children public delegated prefixes will have IPv6 access type as\nEXTERNAL.", - "The parent public advertised prefix will not be announced to the\ninternet. Prefix will be used privately within Cloud. All children\npublic delegated prefixes will have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "isLiveMigration": { - "description": "If true, the prefix will be live migrated.", - "type": "boolean" - }, - "kind": { - "default": "compute#publicDelegatedPrefix", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefix for public delegated prefixes.", - "type": "string" - }, - "mode": { - "description": "The public delegated prefix mode for IPv6 only.", - "enum": [ - "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", - "EXTERNAL_IPV6_SUBNETWORK_CREATION", - "INTERNAL_IPV6_SUBNETWORK_CREATION" - ], - "enumDescriptions": [ - "The public delegated prefix is used for further sub-delegation only. Such\nprefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only.\nSuch prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual-mode subnetworks\nonly. Such prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual stack or IPv6-only\nsubnetwork with internal access only. Such prefixes cannot set\npublicDelegatedSubPrefixes and allocatablePrefixLength. Parent public\ndelegated prefix must have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.publicDelegatedPrefixes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "parentPrefix": { - "description": "The URL of parent prefix. Either PublicAdvertisedPrefix or\nPublicDelegatedPrefix.", - "type": "string" - }, - "publicDelegatedSubPrefixs": { - "description": "The list of sub public delegated prefixes that exist for this public\ndelegated prefix.", - "items": { - "$ref": "PublicDelegatedPrefixPublicDelegatedSubPrefix" - }, - "type": "array" - }, - "purpose": { - "description": "The purpose of the public delegated prefix.\n\nThis field can only be set for the top-level global public delegated\nprefix. It is an output-only field for the sub-delegates that inherit the\nvalue from the top-level global public delegated prefix. Once the value is\nset, it cannot be changed.\n\nThe field cannot be set for regional public delegated prefixes.\n\nThe supported values are:\n \n \n - APPLICATION_AND_PROXY_LOAD_BALANCERS: The global public\n delegated prefix can only be used by Global External Application and\n Proxy Load Balancers to allocate addresses for forwarding rules. This is\n the default value.\n - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0: The\n global public delegated prefix can only be used by Global External\n Passthrough Network Load Balancers to allocate Availability Group 0\n addresses for forwarding rules.\n - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1: The\n global public delegated prefix can only be used by Global External\n Passthrough Network Load Balancers to allocate Availability Group 1\n addresses for forwarding rules.", - "enum": [ - "APPLICATION_AND_PROXY_LOAD_BALANCERS", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - ], - "enumDescriptions": [ - "The global public delegated prefix can only be used by Global External\nApplication and Proxy Load Balancers to allocate addresses for forwarding\nrules. This is the default value.", - "The global public delegated prefix can only be used by Global External\nPassthrough Network Load Balancers to allocate Availability Group 0\naddresses for forwarding rules.", - "The global public delegated prefix can only be used by Global External\nPassthrough Network Load Balancers to allocate Availability Group 1\naddresses for forwarding rules." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the public delegated prefix resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the public delegated prefix, which can be one\nof following values:\n \n \n - `INITIALIZING` The public delegated prefix is being initialized and\n addresses cannot be created yet.\n - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration\n prefix and is active.\n - `ANNOUNCED` The public delegated prefix is announced and ready to\n use.\n - `DELETING` The public delegated prefix is being deprovsioned.\n - `ACTIVE` The public delegated prefix is ready to use.", - "enum": [ - "ACTIVE", - "ANNOUNCED", - "ANNOUNCED_TO_GOOGLE", - "ANNOUNCED_TO_INTERNET", - "DELETING", - "INITIALIZING", - "READY_TO_ANNOUNCE" - ], - "enumDescriptions": [ - "The public delegated prefix is ready to use.", - "The public delegated prefix is announced and ready to use.", - "The prefix is announced within Google network.", - "The prefix is announced to Internet and within Google.", - "The public delegated prefix is being deprovsioned.", - "The public delegated prefix is being initialized and addresses cannot be\ncreated yet.", - "The public delegated prefix is currently withdrawn but ready to be\nannounced." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixAggregatedList": { - "id": "PublicDelegatedPrefixAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "PublicDelegatedPrefixesScopedList", - "description": "[Output Only] Name of the scope containing this set of\nPublicDelegatedPrefixes." - }, - "description": "A list of PublicDelegatedPrefixesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#publicDelegatedPrefixAggregatedList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefixAggregatedList for aggregated\nlists of public delegated prefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixList": { - "id": "PublicDelegatedPrefixList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PublicDelegatedPrefix resources.", - "items": { - "$ref": "PublicDelegatedPrefix" - }, - "type": "array" - }, - "kind": { - "default": "compute#publicDelegatedPrefixList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefixList for public delegated\nprefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixPublicDelegatedSubPrefix": { - "description": "Represents a sub PublicDelegatedPrefix.", - "id": "PublicDelegatedPrefixPublicDelegatedSubPrefix", - "properties": { - "allocatablePrefixLength": { - "description": "The allocatable prefix length supported by this PublicDelegatedSubPrefix.", - "format": "int32", - "type": "integer" - }, - "delegateeProject": { - "description": "Name of the project scoping this PublicDelegatedSubPrefix.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEnhancedIpv4Allocation": { - "description": "[Output Only] Whether this PDP supports enhanced IPv4 allocations.\nApplicable for IPv4 PDPs only.", - "type": "boolean" - }, - "ipCidrRange": { - "description": "The IP address range, in CIDR format, represented by this sub public\ndelegated prefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "[Output Only] The internet access type for IPv6 Public Delegated Sub\nPrefixes. Inherited from parent prefix.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "The parent public advertised prefix will be announced to the internet.\nAll children public delegated prefixes will have IPv6 access type as\nEXTERNAL.", - "The parent public advertised prefix will not be announced to the\ninternet. Prefix will be used privately within Cloud. All children\npublic delegated prefixes will have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "isAddress": { - "description": "Whether the sub prefix is delegated to create Address resources in the\ndelegatee project.", - "type": "boolean" - }, - "mode": { - "description": "The PublicDelegatedSubPrefix mode for IPv6 only.", - "enum": [ - "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", - "EXTERNAL_IPV6_SUBNETWORK_CREATION", - "INTERNAL_IPV6_SUBNETWORK_CREATION" - ], - "enumDescriptions": [ - "The public delegated prefix is used for further sub-delegation only. Such\nprefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only.\nSuch prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual-mode subnetworks\nonly. Such prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual stack or IPv6-only\nsubnetwork with internal access only. Such prefixes cannot set\npublicDelegatedSubPrefixes and allocatablePrefixLength. Parent public\ndelegated prefix must have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "name": { - "description": "The name of the sub public delegated prefix.", - "type": "string" - }, - "purpose": { - "description": "[Output Only] The purpose of the sub public delegated prefix. Inherited\nfrom parent prefix.", - "enum": [ - "APPLICATION_AND_PROXY_LOAD_BALANCERS", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0", - "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - ], - "enumDescriptions": [ - "The global public delegated prefix can only be used by Global External\nApplication and Proxy Load Balancers to allocate addresses for forwarding\nrules. This is the default value.", - "The global public delegated prefix can only be used by Global External\nPassthrough Network Load Balancers to allocate Availability Group 0\naddresses for forwarding rules.", - "The global public delegated prefix can only be used by Global External\nPassthrough Network Load Balancers to allocate Availability Group 1\naddresses for forwarding rules." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] The region of the sub public delegated prefix if it is\nregional. If absent, the sub prefix is global.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the sub public delegated prefix.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixesScopedList": { - "id": "PublicDelegatedPrefixesScopedList", - "properties": { - "publicDelegatedPrefixes": { - "description": "[Output Only] A list of PublicDelegatedPrefixes contained in this scope.", - "items": { - "$ref": "PublicDelegatedPrefix" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of\npublic delegated prefixes when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "QueuedResource": { - "description": "QueuedResource represents a request for future capacity. The capacity is\ndelivered in the form of other GCE resources, either Instances or\nReservations.", - "id": "QueuedResource", - "properties": { - "bulkInsertInstanceResource": { - "$ref": "BulkInsertInstanceResource", - "description": "Specification of VM instances to create." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#queuedResource", - "description": "[Output Only] Type of the resource. Alwayscompute#queuedResource for QueuedResources.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "queuingPolicy": { - "$ref": "QueuingPolicy", - "description": "Queuing parameters for the requested capacity." - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "state": { - "description": "[Output only] High-level status of the request.", - "enum": [ - "ACCEPTED", - "CANCELLED", - "CREATING", - "DELETING", - "FAILED", - "PROVISIONING", - "STATE_UNSPECIFIED", - "SUCCEEDED" - ], - "enumDescriptions": [ - "The request was created successfully and was accepted for provisioning\nwhen the capacity becomes available.", - "The request was canceled by the user.", - "QueuedResource is being created and may still fail creation.", - "The request is being deleted.", - "The request failed before or during provisioning.", - "The target resource(s) are being provisioned.", - "", - "The request succeeded." - ], - "type": "string" - }, - "status": { - "$ref": "QueuedResourceStatus", - "description": "[Output only] Result of queuing and provisioning based on deferred\ncapacity." - }, - "zone": { - "description": "[Output Only] URL of the zone where the resource resides. Only applicable\nfor zonal resources. You must specify this field as part of the HTTP\nrequest URL. It is not settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "QueuedResourceList": { - "id": "QueuedResourceList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of QueuedResource resources.", - "items": { - "$ref": "QueuedResource" - }, - "type": "array" - }, - "kind": { - "default": "compute#queuedResourceList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results formaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "QueuedResourceStatus": { - "description": "[Output only] Result of queuing and provisioning based on deferred\ncapacity.", - "id": "QueuedResourceStatus", - "properties": { - "failedData": { - "$ref": "QueuedResourceStatusFailedData", - "description": "Additional status detail for the FAILED state." - }, - "provisioningOperations": { - "description": "[Output only] Fully qualified URL of the provisioning GCE operation to\ntrack the provisioning along with provisioning errors. The referenced\noperation may not exist after having been deleted or expired.", - "items": { - "type": "string" - }, - "type": "array" - }, - "queuingPolicy": { - "$ref": "QueuingPolicy", - "description": "Constraints for the time when the resource(s) start provisioning. Always\nexposed as absolute times." - } - }, - "type": "object" - }, - "QueuedResourceStatusFailedData": { - "description": "Additional status detail for the FAILED state.", - "id": "QueuedResourceStatusFailedData", - "properties": { - "error": { - "description": "The error(s) that caused the QueuedResource to enter the FAILED state.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "QueuedResourcesAggregatedList": { - "id": "QueuedResourcesAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "QueuedResourcesScopedList", - "description": "Name of the scope containing this set of queued resources." - }, - "description": "A list of QueuedResourcesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#queuedResources", - "description": "[Output Only] Type of resource. Alwayscompute#queuedResourcesAggregatedList for lists of\nQueuedResource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "QueuedResourcesScopedList": { - "id": "QueuedResourcesScopedList", - "properties": { - "queuedResources": { - "description": "List of QueuedResources contained in this scope.", - "items": { - "$ref": "QueuedResource" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "QueuingPolicy": { - "description": "Queuing parameters for the requested deferred capacity.", - "id": "QueuingPolicy", - "properties": { - "validUntilDuration": { - "$ref": "Duration", - "description": "Relative deadline for waiting for capacity." - }, - "validUntilTime": { - "description": "Absolute deadline for waiting for capacity inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "Quota": { - "description": "A quotas entry.", - "id": "Quota", - "properties": { - "limit": { - "description": "[Output Only] Quota limit for this metric.", - "format": "double", - "type": "number" - }, - "metric": { - "description": "[Output Only] Name of the quota metric.", - "enum": [ - "A2_CPUS", - "AFFINITY_GROUPS", - "AMD_S9300_GPUS", - "AUTOSCALERS", - "BACKEND_BUCKETS", - "BACKEND_SERVICES", - "C2D_CPUS", - "C2_CPUS", - "C3_CPUS", - "COMMITMENTS", - "COMMITTED_A2_CPUS", - "COMMITTED_C2D_CPUS", - "COMMITTED_C2_CPUS", - "COMMITTED_C3_CPUS", - "COMMITTED_CPUS", - "COMMITTED_E2_CPUS", - "COMMITTED_LICENSES", - "COMMITTED_LOCAL_SSD_TOTAL_GB", - "COMMITTED_M3_CPUS", - "COMMITTED_MEMORY_OPTIMIZED_CPUS", - "COMMITTED_N2A_CPUS", - "COMMITTED_N2D_CPUS", - "COMMITTED_N2_CPUS", - "COMMITTED_NVIDIA_A100_80GB_GPUS", - "COMMITTED_NVIDIA_A100_GPUS", - "COMMITTED_NVIDIA_H100_GPUS", - "COMMITTED_NVIDIA_K80_GPUS", - "COMMITTED_NVIDIA_L4_GPUS", - "COMMITTED_NVIDIA_P100_GPUS", - "COMMITTED_NVIDIA_P4_GPUS", - "COMMITTED_NVIDIA_T4_GPUS", - "COMMITTED_NVIDIA_V100_GPUS", - "COMMITTED_T2A_CPUS", - "COMMITTED_T2D_CPUS", - "COMMITTED_Z3_CPUS", - "CPUS", - "CPUS_ALL_REGIONS", - "DISKS_TOTAL_GB", - "E2_CPUS", - "EXTERNAL_MANAGED_FORWARDING_RULES", - "EXTERNAL_NETWORK_LB_FORWARDING_RULES", - "EXTERNAL_PROTOCOL_FORWARDING_RULES", - "EXTERNAL_VPN_GATEWAYS", - "FIREWALLS", - "FORWARDING_RULES", - "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES", - "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES", - "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES", - "GLOBAL_INTERNAL_ADDRESSES", - "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES", - "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES", - "GPUS_ALL_REGIONS", - "HDB_TOTAL_GB", - "HDB_TOTAL_IOPS", - "HDB_TOTAL_THROUGHPUT", - "HEALTH_CHECKS", - "IMAGES", - "INSTANCES", - "INSTANCE_GROUPS", - "INSTANCE_GROUP_MANAGERS", - "INSTANCE_TEMPLATES", - "INTERCONNECTS", - "INTERCONNECT_ATTACHMENTS_PER_REGION", - "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS", - "INTERCONNECT_TOTAL_GBPS", - "INTERNAL_ADDRESSES", - "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES", - "IN_PLACE_SNAPSHOTS", - "IN_USE_ADDRESSES", - "IN_USE_BACKUP_SCHEDULES", - "IN_USE_MAINTENANCE_WINDOWS", - "IN_USE_SNAPSHOT_SCHEDULES", - "LOCAL_SSD_TOTAL_GB", - "M1_CPUS", - "M2_CPUS", - "M3_CPUS", - "MACHINE_IMAGES", - "N2A_CPUS", - "N2D_CPUS", - "N2_CPUS", - "NETWORKS", - "NETWORK_ATTACHMENTS", - "NETWORK_ENDPOINT_GROUPS", - "NETWORK_FIREWALL_POLICIES", - "NET_LB_SECURITY_POLICIES_PER_REGION", - "NET_LB_SECURITY_POLICY_RULES_PER_REGION", - "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION", - "NODE_GROUPS", - "NODE_TEMPLATES", - "NVIDIA_A100_80GB_GPUS", - "NVIDIA_A100_GPUS", - "NVIDIA_K80_GPUS", - "NVIDIA_L4_GPUS", - "NVIDIA_P100_GPUS", - "NVIDIA_P100_VWS_GPUS", - "NVIDIA_P4_GPUS", - "NVIDIA_P4_VWS_GPUS", - "NVIDIA_T4_GPUS", - "NVIDIA_T4_VWS_GPUS", - "NVIDIA_V100_GPUS", - "PACKET_MIRRORINGS", - "PD_EXTREME_TOTAL_PROVISIONED_IOPS", - "PREEMPTIBLE_CPUS", - "PREEMPTIBLE_LOCAL_SSD_GB", - "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS", - "PREEMPTIBLE_NVIDIA_A100_GPUS", - "PREEMPTIBLE_NVIDIA_H100_GPUS", - "PREEMPTIBLE_NVIDIA_K80_GPUS", - "PREEMPTIBLE_NVIDIA_L4_GPUS", - "PREEMPTIBLE_NVIDIA_P100_GPUS", - "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_P4_GPUS", - "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_T4_GPUS", - "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_V100_GPUS", - "PREEMPTIBLE_TPU_LITE_DEVICE_V4", - "PREEMPTIBLE_TPU_LITE_DEVICE_V5", - "PREEMPTIBLE_TPU_LITE_PODSLICE_V5", - "PREEMPTIBLE_TPU_PODSLICE_V4", - "PRIVATE_V6_ACCESS_SUBNETWORKS", - "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK", - "PSC_INTERNAL_LB_FORWARDING_RULES", - "PUBLIC_ADVERTISED_PREFIXES", - "PUBLIC_DELEGATED_PREFIXES", - "QUEUED_RESOURCES", - "REGIONAL_AUTOSCALERS", - "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES", - "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES", - "REGIONAL_INSTANCE_GROUP_MANAGERS", - "REGIONAL_INTERNAL_LB_BACKEND_SERVICES", - "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES", - "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES", - "REGION_EXTERNAL_MANAGED_BACKEND_BUCKETS", - "REGION_INTERNAL_MANAGED_BACKEND_BUCKETS", - "RESERVATIONS", - "RESOURCE_POLICIES", - "ROUTERS", - "ROUTES", - "SECURITY_POLICIES", - "SECURITY_POLICIES_PER_REGION", - "SECURITY_POLICY_ADVANCED_RULES_PER_REGION", - "SECURITY_POLICY_CEVAL_RULES", - "SECURITY_POLICY_RULES", - "SECURITY_POLICY_RULES_PER_REGION", - "SERVICE_ATTACHMENTS", - "SNAPSHOTS", - "SSD_TOTAL_GB", - "SSL_CERTIFICATES", - "SSL_POLICIES", - "STATIC_ADDRESSES", - "STATIC_BYOIP_ADDRESSES", - "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES", - "SUBNETWORKS", - "T2A_CPUS", - "T2D_CPUS", - "TARGET_HTTPS_PROXIES", - "TARGET_HTTP_PROXIES", - "TARGET_INSTANCES", - "TARGET_POOLS", - "TARGET_SSL_PROXIES", - "TARGET_TCP_PROXIES", - "TARGET_VPN_GATEWAYS", - "TPU_LITE_DEVICE_V4", - "TPU_LITE_DEVICE_V5", - "TPU_LITE_PODSLICE_V5", - "TPU_PODSLICE_V4", - "URL_MAPS", - "VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES", - "VPN_GATEWAYS", - "VPN_TUNNELS", - "XPN_SERVICE_PROJECTS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Guest CPUs", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "The total number of snapshots allowed for a single project.", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "owner": { - "description": "[Output Only] Owning resource. This is the resource on which this quota\nis applied.", - "type": "string" - }, - "usage": { - "description": "[Output Only] Current usage of this metric.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "QuotaExceededInfo": { - "description": "Additional details for quota exceeded error for resource quota.", - "id": "QuotaExceededInfo", - "properties": { - "dimensions": { - "additionalProperties": { - "type": "string" - }, - "description": "The map holding related quota dimensions.", - "type": "object" - }, - "futureLimit": { - "description": "Future quota limit being rolled out. The limit's unit depends on the quota\n type or metric.", - "format": "double", - "type": "number" - }, - "limit": { - "description": "Current effective quota limit. The limit's unit depends on the quota type\nor metric.", - "format": "double", - "type": "number" - }, - "limitName": { - "description": "The name of the quota limit.", - "type": "string" - }, - "metricName": { - "description": "The Compute Engine quota metric name.", - "type": "string" - }, - "rolloutStatus": { - "description": "Rollout status of the future quota limit.", - "enum": [ - "IN_PROGRESS", - "ROLLOUT_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "IN_PROGRESS - A rollout is in process which will change the limit value\nto future limit.", - "ROLLOUT_STATUS_UNSPECIFIED - Rollout status is not specified. The default\nvalue." - ], - "type": "string" - } - }, - "type": "object" - }, - "RbacPolicy": { - "id": "RbacPolicy", - "properties": { - "name": { - "description": "Name of the RbacPolicy.", - "type": "string" - }, - "permissions": { - "description": "The list of permissions.", - "items": { - "$ref": "Permission" - }, - "type": "array" - }, - "principals": { - "description": "The list of principals.", - "items": { - "$ref": "Principal" - }, - "type": "array" - } - }, - "type": "object" - }, - "RecoverableSnapshot": { - "description": "Represents a RecoverableSnapshot resource.\n\nA RecoverableSnapshot represents a snapshot in recycle bin.", - "id": "RecoverableSnapshot", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "Optional. An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#recoverableSnapshot", - "description": "[Output Only] Type of the resource. Alwayscompute#recoverableSnapshot for RecoverableSnapshot\nresources.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the recoverable snapshot generated on the deletion of the snapshot.\nThe name will be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name will be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter will be a lowercase letter, and all following characters can be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "originalResource": { - "$ref": "RecoverableSnapshotOriginalSnapshot", - "description": "Output Only] The original snapshot resource." - }, - "purgeTimestamp": { - "description": "[Output Only] Purge timestamp of recoverable snapshot inRFC3339\ntext format.", - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. [Output Only] Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the recoverable snapshot.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "RECOVERING", - "UNKNOWN" - ], - "enumDescriptions": [ - "Recoverable Snapshot creation is in progress.", - "Recovered Snapshot is currently being deleted.", - "Recoverable Snapshot creation failed.", - "Recoverable Snapshot has been created successfully.", - "Recoverable Snapshot is currently being recovered.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RecoverableSnapshotAggregatedList": { - "id": "RecoverableSnapshotAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "RecoverableSnapshotsScopedList", - "description": "[Output Only] Name of the scope containing this set of\nrecoverablesnapshots." - }, - "description": "A list of RecoverableSnapshotsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#recoverableSnapshotAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#recoverableSnapshotAggregatedList for aggregated lists\nof recoverablesnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface:\nMixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RecoverableSnapshotList": { - "id": "RecoverableSnapshotList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of RecoverableSnapshots resources.", - "items": { - "$ref": "RecoverableSnapshot" - }, - "type": "array" - }, - "kind": { - "default": "compute#recoverableSnapshotList", - "description": "[Output Only] Type of resource. Alwayscompute#recoverableSnapshotList for lists of\nrecoverablesnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RecoverableSnapshotOriginalSnapshot": { - "id": "RecoverableSnapshotOriginalSnapshot", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the snapshot. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "autoCreated": { - "description": "[Output Only] Set to true if snapshots are automatically created by\napplying resource policy on the target disk.", - "type": "boolean" - }, - "autoCreatedBy": { - "description": "ResourceKey of the resource policy or flow which created this auto\nsnapshot", - "type": "string" - }, - "chainName": { - "description": "Creates the new snapshot in the snapshot chain labeled with the\nspecified name. The chain name must be 1-63 characters long and comply\nwith RFC1035. This is an uncommon option only for advanced service\nowners who needs to create separate snapshot chains, for example,\nfor chargeback tracking. When you describe your snapshot resource, this\nfield is visible only if it has a non-empty value.", - "type": "string" - }, - "creationSizeBytes": { - "description": "[Output Only] Size in bytes of the snapshot at creation time.", - "format": "int64", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "deletionTimestamp": { - "description": "[Output Only] Purge timestamp of recoverable snapshot inRFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "[Output Only] Size of the source disk, specified in GB.", - "format": "int64", - "type": "string" - }, - "downloadBytes": { - "description": "[Output Only] Number of bytes downloaded to restore a snapshot to a disk.", - "format": "int64", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this snapshot is created from a confidential compute mode disk.\n[Output Only]: This field is not set by user, but from source disk.", - "type": "boolean" - }, - "full": { - "description": "Indicates the created snapshot is a full snapshot.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "[Output Only] A list of features to enable on the guest operating system.\nApplicable only for bootable images. Read \nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the original snapshot. This\nidentifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this snapshot, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a snapshot.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this snapshot. These can be later modified by\nthe setLabels method.\nLabel values may be empty.", - "type": "object" - }, - "licenseCodes": { - "description": "[Output Only] Integer license codes indicating which licenses are\nattached to this snapshot.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "[Output Only] A list of public visible licenses that apply to this\nsnapshot.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxRetentionDays": { - "description": "Number of days the snapshot should be retained before being deleted\nautomatically.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Name of the original snapshot provided by the client. The name must be\n1-63 characters long, and comply with RFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the snapshot resides. Only\napplicable for regional snapshots.", - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using acustomer-supplied\nencryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must\nprovide the same key if you use the snapshot later. For example, you must\nprovide the encryption key when you create a disk from the encrypted\nsnapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata\nof the snapshot.\n\nIf you do not provide an encryption key when creating the snapshot, then\nthe snapshot will be encrypted using an automatically generated key and\nyou do not need to provide a key to use the snapshot later." - }, - "snapshotGroupId": { - "description": "[Output Only] The unique ID of the snapshot group that this snapshot\nbelongs to.", - "type": "string" - }, - "snapshotGroupName": { - "description": "[Output only] The snapshot group that this snapshot belongs to.", - "type": "string" - }, - "snapshotType": { - "description": "Indicates the type of the snapshot.", - "enum": [ - "ARCHIVE", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "sourceDisk": { - "description": "The source disk used to create this snapshot.", - "type": "string" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDiskForRecoveryCheckpoint": { - "description": "The source disk whose recovery checkpoint will be used to create this\nsnapshot.", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The ID value of the disk used to create this snapshot", - "type": "string" - }, - "sourceInstantSnapshot": { - "description": "The source instant snapshot used to create this snapshot.", - "type": "string" - }, - "sourceInstantSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Customer provided encryption key when creating Snapshot from Instant\nSnapshot." - }, - "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this\nsnapshot. This value identifies the exact instant snapshot that was used\nto create this persistent disk. For example, if you created the\npersistent disk from an instant snapshot that was later deleted and\nrecreated under the same name, the source instant snapshot ID would\nidentify the exact instant snapshot that was used.", - "type": "string" - }, - "sourceSnapshotSchedulePolicy": { - "description": "[Output Only] URL of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "sourceSnapshotSchedulePolicyId": { - "description": "[Output Only] ID of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] A size of the storage used by the snapshot.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the snapshot (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLicenses": { - "description": "[Output Only] A list of user provided licenses represented by a list of\nURLs to the license resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RecoverableSnapshotsScopedList": { - "id": "RecoverableSnapshotsScopedList", - "properties": { - "recoverablesnapshots": { - "description": "[Output Only] A list of recoverablesnapshots contained in this scope.", - "items": { - "$ref": "RecoverableSnapshot" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of\nrecoverablesnapshots when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Reference": { - "description": "Represents a reference to a resource.", - "id": "Reference", - "properties": { - "kind": { - "default": "compute#reference", - "description": "[Output Only] Type of the resource. Always compute#reference\nfor references.", - "type": "string" - }, - "referenceType": { - "description": "A description of the reference type with no implied semantics. Possible\nvalues include:\n \n \n 1. MEMBER_OF", - "type": "string" - }, - "referrer": { - "description": "URL of the resource which refers to the target.", - "type": "string" - }, - "target": { - "description": "URL of the resource to which this reference points.", - "type": "string" - } - }, - "type": "object" - }, - "Region": { - "description": "Represents a Region resource.\n\nA region is a geographical area where a resource is located. For more\ninformation, readRegions\nand Zones.", - "id": "Region", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this region." - }, - "description": { - "description": "[Output Only] Textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#region", - "description": "[Output Only] Type of the resource. Always compute#region for\nregions.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "quotaStatusWarning": { - "description": "[Output Only] Warning of fetching the `quotas` field for this region. This\nfield is populated only if fetching of the `quotas` field fails.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "quotas": { - "description": "[Output Only] Quotas assigned to this region.", - "items": { - "$ref": "Quota" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the region, either UP orDOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "zones": { - "description": "[Output Only] A list of zones available in this region, in the form of\nresource URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionAddressesMoveRequest": { - "id": "RegionAddressesMoveRequest", - "properties": { - "description": { - "description": "An optional destination address description if intended to be different\nfrom the source.", - "type": "string" - }, - "destinationAddress": { - "description": "The URL of the destination address to move to. This can be a full or\npartial URL. For example, the following are all valid URLs to a address:\n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n - projects/project/regions/region/addresses/address\n\n\nNote that destination project must be different from the source project. So/regions/region/addresses/address is not valid partial url.", - "type": "string" - } - }, - "type": "object" - }, - "RegionAutoscalerList": { - "description": "Contains a list of autoscalers.", - "id": "RegionAutoscalerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionAutoscalerList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionCommitmentsUpdateReservationsRequest": { - "id": "RegionCommitmentsUpdateReservationsRequest", - "properties": { - "reservations": { - "description": "A list of two reservations to transfer GPUs and Local SSD disks between.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDiskTypeList": { - "id": "RegionDiskTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionDiskTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#regionDiskTypeList for region disk types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionDisksAddResourcePoliciesRequest": { - "id": "RegionDisksAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be added to this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDisksRemoveResourcePoliciesRequest": { - "id": "RegionDisksRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDisksResizeRequest": { - "id": "RegionDisksResizeRequest", - "properties": { - "sizeGb": { - "description": "The new size of the regional persistent disk, which is specified in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "RegionDisksStartAsyncReplicationRequest": { - "id": "RegionDisksStartAsyncReplicationRequest", - "properties": { - "asyncSecondaryDisk": { - "description": "The secondary disk to start asynchronous replication to.\nYou can provide this as a partial or full URL to the resource. For example,\nthe following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupList": { - "description": "Contains a list of InstanceGroup resources.", - "id": "RegionInstanceGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupList", - "description": "The resource type.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerDeleteInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.deletePerInstanceConfigs", - "id": "RegionInstanceGroupManagerDeleteInstanceConfigReq", - "properties": { - "names": { - "description": "The list of instance names for which we want to delete per-instance configs\non this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerList": { - "description": "Contains a list of managed instance groups.", - "id": "RegionInstanceGroupManagerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupManagerList", - "description": "[Output Only] The resource type, which is always\ncompute#instanceGroupManagerList for a list of managed instance groups that\nexist in th regional scope.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerPatchInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.patchPerInstanceConfigs", - "id": "RegionInstanceGroupManagerPatchInstanceConfigReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerResizeRequestsListResponse": { - "id": "RegionInstanceGroupManagerResizeRequestsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Resize Request resources.", - "items": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupManagerResizeRequestList", - "description": "[Output Only] Type of the resource. Alwayscompute#regionInstanceGroupManagerResizeRequestList for\na list of Resize Requests.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerUpdateInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.updatePerInstanceConfigs", - "id": "RegionInstanceGroupManagerUpdateInstanceConfigReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersAbandonInstancesRequest": { - "id": "RegionInstanceGroupManagersAbandonInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to abandon. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersApplyUpdatesRequest": { - "description": "RegionInstanceGroupManagers.applyUpdatesToInstances", - "id": "RegionInstanceGroupManagersApplyUpdatesRequest", - "properties": { - "allInstances": { - "description": "Flag to update all instances instead of specified list of “instances”.\nIf the flag is set to true then the instances may not be specified\nin the request.", - "type": "boolean" - }, - "instances": { - "description": "The list of URLs of one or more instances for which you want to apply\nupdates. Each URL can be a full URL or a partial URL, such aszones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "maximalAction": { - "description": "The maximal action that should be performed on the instances.\nBy default REPLACE.\nThis field is deprecated, please use most_disruptive_allowed_action.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "minimalAction": { - "description": "The minimal action that you want to perform on each instance during the\nupdate:\n \n \n - REPLACE: At minimum, delete the instance and create it\n again. \n - RESTART: Stop the instance and start it\n again. \n - REFRESH: Do not stop the instance and limit\n disruption as much as possible. \n - NONE: Do not\n disrupt the instance at all.\n\n\nBy default, the minimum action is NONE. If your update\nrequires a more disruptive action than you set with this flag, the\nnecessary action is performed to execute the update.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that you want to perform on each instance during\nthe update:\n \n \n - REPLACE: Delete the instance and create it again.\n - RESTART: Stop the instance and start it again.\n - REFRESH: Do not stop the instance and limit disruption\n as much as possible. \n - NONE: Do not disrupt the\n instance at all.\n\n\nBy default, the most disruptive allowed action is REPLACE. If\nyour update requires a more disruptive action than you set with this flag,\nthe update request will fail.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersCreateInstancesRequest": { - "description": "RegionInstanceGroupManagers.createInstances", - "id": "RegionInstanceGroupManagersCreateInstancesRequest", - "properties": { - "instances": { - "description": "[Required] List of specifications of per-instance configs.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersDeleteInstancesRequest": { - "id": "RegionInstanceGroupManagersDeleteInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to delete. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "skipInstancesOnValidationError": { - "description": "Specifies whether the request should proceed despite the inclusion of\ninstances that are not members of the group or that are already in the\nprocess of being deleted or abandoned. If this field is set to `false` and\nsuch an instance is specified in the request, the operation fails. The\noperation always fails if the request contains a malformed instance URL or\na reference to an instance that exists in a zone or region other than the\ngroup's zone or region.", - "type": "boolean" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListErrorsResponse": { - "id": "RegionInstanceGroupManagersListErrorsResponse", - "properties": { - "items": { - "description": "[Output Only] The list of errors of the managed instance group.", - "items": { - "$ref": "InstanceManagedByIgmError" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListInstanceConfigsResp": { - "id": "RegionInstanceGroupManagersListInstanceConfigsResp", - "properties": { - "items": { - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListInstancesResponse": { - "id": "RegionInstanceGroupManagersListInstancesResponse", - "properties": { - "managedInstances": { - "description": "A list of managed instances.", - "items": { - "$ref": "ManagedInstance" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersRecreateRequest": { - "id": "RegionInstanceGroupManagersRecreateRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to recreate. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersResizeAdvancedRequest": { - "id": "RegionInstanceGroupManagersResizeAdvancedRequest", - "properties": { - "noCreationRetries": { - "description": "If this flag is true, the managed instance group attempts to create all\ninstances initiated by this resize request only once. If there is an error\nduring creation, the managed instance group does not retry create this\ninstance, and we will decrease the targetSize of the request\ninstead. If the flag is false, the group attempts to recreate each instance\ncontinuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance.\nAfter an instance is successfully created while this flag is enabled, the\ninstance behaves the same way as all the other instances created with a\nregular resize request. In particular, if a running instance dies\nunexpectedly at a later time and needs to be recreated, this mode does not\naffect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not\ninfluence other resize requests in any way.\n\nYou can see which instances ar being created in which mode by calling\nthe get or listManagedInstances API.", - "type": "boolean" - }, - "targetSize": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersResumeInstancesRequest": { - "id": "RegionInstanceGroupManagersResumeInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to resume. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetAutoHealingRequest": { - "id": "RegionInstanceGroupManagersSetAutoHealingRequest", - "properties": { - "autoHealingPolicies": { - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetTargetPoolsRequest": { - "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", - "properties": { - "fingerprint": { - "description": "Fingerprint of the target pools information, which is a hash of the\ncontents. This field is used for optimistic locking when you update the\ntarget pool entries. This field is optional.", - "format": "byte", - "type": "string" - }, - "targetPools": { - "description": "The URL of all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically\napply to all of the instances in the managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetTemplateRequest": { - "id": "RegionInstanceGroupManagersSetTemplateRequest", - "properties": { - "instanceTemplate": { - "description": "URL of the InstanceTemplate resource from which all new instances will be\ncreated.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersStartInstancesRequest": { - "id": "RegionInstanceGroupManagersStartInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to start. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersStopInstancesRequest": { - "id": "RegionInstanceGroupManagersStopInstancesRequest", - "properties": { - "forceStop": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nstop the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to stop. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSuspendInstancesRequest": { - "id": "RegionInstanceGroupManagersSuspendInstancesRequest", - "properties": { - "forceSuspend": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nsuspend the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to suspend. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupsListInstances": { - "id": "RegionInstanceGroupsListInstances", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupsListInstances", - "description": "The resource type.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupsListInstancesRequest": { - "id": "RegionInstanceGroupsListInstancesRequest", - "properties": { - "instanceState": { - "description": "Instances in which state should be returned. Valid options are:\n'ALL', 'RUNNING'. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "Matches any status of the instances, running, non-running and others.", - "Instance is in RUNNING state if it is running." - ], - "type": "string" - }, - "portName": { - "description": "Name of port user is interested in. It is optional. If it is set, only\ninformation about this ports will be returned. If it is not set, all the\nnamed ports will be returned.\nAlways lists all instances.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupsSetNamedPortsRequest": { - "id": "RegionInstanceGroupsSetNamedPortsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the named ports information for this instance group.\nUse this optional property to prevent conflicts when multiple users change\nthe named ports settings concurrently. Obtain the fingerprint with theinstanceGroups.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another\nconcurrent request.", - "format": "byte", - "type": "string" - }, - "namedPorts": { - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionList": { - "description": "Contains a list of region resources.", - "id": "RegionList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Region resources.", - "items": { - "$ref": "Region" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionList", - "description": "[Output Only] Type of resource. Always compute#regionList for\nlists of regions.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionNetworkEndpointGroupsAttachEndpointsRequest": { - "id": "RegionNetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkEndpointGroupsDetachEndpointsRequest": { - "id": "RegionNetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse": { - "id": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output only] Effective firewalls from firewall policy. It applies to\nRegional Network Firewall Policies in the specified region, Global Network\nFirewall Policies and Hierachial Firewall Policies which are associated\nwith the network.", - "items": { - "$ref": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the network.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "description": "[Output Only] The display name of the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output only] The packet mirroring rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output only] The rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "type": { - "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY,\nNETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.", - "enum": [ - "HIERARCHY", - "NETWORK", - "NETWORK_REGIONAL", - "SYSTEM_GLOBAL", - "SYSTEM_REGIONAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RegionSetLabelsRequest": { - "id": "RegionSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash in order to update or change\nlabels. Make a get() request to the resource to get the latest\nfingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "RegionSetPolicyRequest": { - "id": "RegionSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backwacd compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "RegionTargetHttpsProxiesSetSslCertificatesRequest": { - "id": "RegionTargetHttpsProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of SslCertificate resources to associate\nwith this TargetHttpsProxy resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionUrlMapsValidateRequest": { - "id": "RegionUrlMapsValidateRequest", - "properties": { - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - }, - "type": "object" - }, - "RegionWaitForReplicationCatchUpRequest": { - "id": "RegionWaitForReplicationCatchUpRequest", - "properties": { - "maxWaitDuration": { - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "ReliabilityRisk": { - "description": "Represents a ReliabilityRisk resource.", - "id": "ReliabilityRisk", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided when the\nresource is created.", - "type": "string" - }, - "details": { - "$ref": "RiskDetails", - "description": "[Output Only] Details of the reliability risk resource" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#reliabilityRisk", - "description": "[Output Only] Type of resource. Always compute#reliabilityRisk\nfor reliability risks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. The name must be 1-63 characters long and\ncomply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "recommendation": { - "$ref": "RiskRecommendation", - "description": "The recommendations to mitigate the risk." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "ReliabilityRisksListResponse": { - "id": "ReliabilityRisksListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ReliabilityRisk resources.", - "items": { - "$ref": "ReliabilityRisk" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReplicationDetails": { - "id": "ReplicationDetails", - "properties": { - "lastReplicationTime": { - "description": "The last sync time of the device pair.", - "format": "google-datetime", - "type": "string" - }, - "secondsSinceLastReplication": { - "description": "Replication lag in seconds. This will only be populated if device is in\nreplicating state. Note that the value is calculated sometime during\nrequest processing and at the instant the client receives the response,\nthe current replication_lag may have changed.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ReplicationDiskPair": { - "id": "ReplicationDiskPair", - "properties": { - "primaryDisk": { - "description": "URL of the primary disk.", - "type": "string" - }, - "secondaryDisk": { - "description": "URL of the secondary disk.", - "type": "string" - } - }, - "type": "object" - }, - "RequestMirrorPolicy": { - "description": "A policy that specifies how requests intended for the route's backends\nare shadowed to a separate mirrored backend service. The load balancer\ndoesn't wait for responses from the shadow service. Before sending traffic\nto the shadow service, the host or authority header is suffixed with-shadow.", - "id": "RequestMirrorPolicy", - "properties": { - "backendService": { - "description": "The full or partial URL to the BackendService resource being\nmirrored to.\n\nThe backend service configured for a mirroring\npolicy must reference backends that are of the same type as the original\nbackend service matched in the URL map.\n\nServerless NEG backends are not currently supported as a mirrored\nbackend service.", - "type": "string" - }, - "mirrorPercent": { - "description": "The percentage of requests to be mirrored to `backend_service`.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Reservation": { - "description": "Represents a reservation resource. A reservation ensures that capacity is\nheld in a specific zone even if the reserved VMs are not running. For more\ninformation, read Reserving zonal\nresources.", - "id": "Reservation", - "properties": { - "advancedDeploymentControl": { - "$ref": "ReservationAdvancedDeploymentControl", - "description": "Advanced control for cluster management, applicable only to DENSE\ndeployment type reservations." - }, - "aggregateReservation": { - "$ref": "AllocationAggregateReservation", - "description": "Reservation for aggregated resources, providing shape flexibility." - }, - "commitment": { - "description": "[Output Only] Full or partial URL to a parent commitment. This field\ndisplays for reservations that are tied to a commitment.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deleteAfterDuration": { - "$ref": "Duration", - "description": "Duration time relative to reservation creation when Compute Engine will\nautomatically delete this resource." - }, - "deleteAtTime": { - "description": "Absolute time in future when the reservation will be\n auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.", - "type": "string" - }, - "deploymentType": { - "description": "Specifies the deployment strategy for this reservation.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEmergentMaintenance": { - "description": "Indicates whether Compute Engine allows unplanned maintenance for your VMs;\nfor example, to fix hardware errors.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#reservation", - "description": "[Output Only] Type of the resource. Alwayscompute#reservations for reservations.", - "type": "string" - }, - "linkedCommitments": { - "description": "[Output Only] Full or partial URL to parent commitments. This field\ndisplays for reservations that are tied to multiple commitments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "protectionTier": { - "description": "Protection tier for the workload which specifies the workload expectations\nin the event of infrastructure failures at data center (e.g. power\nand/or cooling failures).", - "enum": [ - "CAPACITY_OPTIMIZED", - "PROTECTION_TIER_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling)\nat the data center during normal operating conditions. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload may be disrupted. As a consequence, it has a\nweaker availability SLO than STANDARD.", - "Unspecified protection tier.", - "STANDARD protection for workload that should be protected by redundancies\n(e.g. power, cooling) at the data center level. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload is expected to continue as normal using the\nredundancies." - ], - "type": "string" - }, - "reservationMode": { - "description": "[Output only] Indicates the reservation mode of the reservation.", - "enum": [ - "CALENDAR", - "DEFAULT", - "RESERVATION_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delivered reservations terminate at specified endtime along with\nterminating VMs running on it. The price for this reservation is\ndifferent from on-demand. Currently offered for A3+ GPUs and TPUs only.", - "The delivered reservations do not terminate VMs at the end of\nreservations. On-demand pricing and available for all VM families.\nThis is default mode.", - "" - ], - "type": "string" - }, - "reservationSharingPolicy": { - "$ref": "AllocationReservationSharingPolicy", - "description": "Specify the reservation sharing policy. If unspecified, the reservation\nwill not be shared with Google Cloud managed services." - }, - "resourcePolicies": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource policies to be added to this reservation. The key is defined by\nuser, and the value is resource policy url. This is to define placement\npolicy with reservation.", - "type": "object" - }, - "resourceStatus": { - "$ref": "AllocationResourceStatus", - "description": "[Output Only] Status information for Reservation resource." - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "schedulingType": { - "description": "The type of maintenance for the reservation.", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "Specify share-settings to create a shared reservation. This property is\noptional. For more information about the syntax and options for this\nfield and its subfields, see the guide for creating\na shared reservation." - }, - "specificReservation": { - "$ref": "AllocationSpecificSKUReservation", - "description": "Reservation for instances with specific machine shapes." - }, - "specificReservationRequired": { - "description": "Indicates whether the reservation can be consumed by VMs with affinity\nfor \"any\" reservation. If the field is set, then only VMs that target\nthe reservation by name can consume from this reservation.", - "type": "boolean" - }, - "status": { - "description": "[Output Only] The status of the reservation.\n \n \n - CREATING: Reservation resources are being\n allocated.\n - READY: Reservation resources have been allocated,\n and the reservation is ready for use.\n - DELETING: Reservation deletion is in progress.\n - UPDATING: Reservation update is in progress.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "UPDATING" - ], - "enumDescriptions": [ - "Reservation resources are being allocated.", - "Reservation deletion is in progress.", - "", - "Reservation resources have been allocated, and the reservation is ready\nfor use.", - "Reservation update is in progress." - ], - "type": "string" - }, - "zone": { - "description": "Zone in which the reservation resides. A zone must be provided if the\nreservation is created within a commitment.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationAdvancedDeploymentControl": { - "description": "Advance control for cluster management, applicable only to DENSE deployment\ntype reservations.", - "id": "ReservationAdvancedDeploymentControl", - "properties": { - "reservationOperationalMode": { - "description": "Indicates chosen reservation operational mode for the reservation.", - "enum": [ - "ALL_CAPACITY", - "HIGHLY_AVAILABLE_CAPACITY", - "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Google Cloud does not manage the failure of machines, but provides\nadditional capacity, which is not guaranteed to be available.", - "Google Cloud manages the failure of machines to provide high\navailability.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationAffinity": { - "description": "Specifies the reservations that this instance can consume from.", - "id": "ReservationAffinity", - "properties": { - "consumeReservationType": { - "description": "Specifies the type of reservation from which this instance can consume\nresources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See\nConsuming reserved instances for examples.", - "enum": [ - "ANY_RESERVATION", - "NO_RESERVATION", - "SPECIFIC_RESERVATION", - "SPECIFIC_THEN_ANY_RESERVATION", - "SPECIFIC_THEN_NO_RESERVATION", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Consume any allocation available.", - "Do not consume from any allocated capacity.", - "Must consume from a specific reservation. Must specify key value fields\nfor specifying the reservations.", - "Prefer to consume from a specific reservation, but still consume any\nreservation available if the specified reservation is not available or\nexhausted. Must specify key value fields for specifying the reservations.", - "Prefer to consume from a specific reservation, but still consume\nfrom the on-demand pool if the specified reservation is exhausted. Must\nspecify key value fields for specifying the reservations.", - "" - ], - "type": "string" - }, - "key": { - "description": "Corresponds to the label key of a reservation resource. To target aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the key and specify\nthe name of your reservation as its value.", - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of a reservation resource. This can be\neither a name to a reservation in the same project or\n\"projects/different-project/reservations/some-reservation-name\" to target a\nshared reservation in the same zone but in a different project.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationAggregatedList": { - "description": "Contains a list of reservations.", - "id": "ReservationAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ReservationsScopedList", - "description": "Name of the scope containing this set of reservations." - }, - "description": "A list of Allocation resources.", - "type": "object" - }, - "kind": { - "default": "compute#reservationAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationBlock": { - "description": "Represents a reservation block resource.", - "id": "ReservationBlock", - "properties": { - "count": { - "description": "[Output Only] The number of resources that are allocated in this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "healthInfo": { - "$ref": "ReservationBlockHealthInfo", - "description": "[Output Only] Health information for the reservation block." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] The number of instances that are currently in use on this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances running\non the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#reservationBlock", - "description": "[Output Only] Type of the resource. Alwayscompute#reservationBlock for reservation blocks.", - "type": "string" - }, - "locationPrefix": { - "deprecated": true, - "description": "[Output Only] Obfuscated location where this reservation block physically\nresides in format /CCCC/GGGG. This matches the tripod specified in the VM\ntopology information. Example: /USEAB1/0101/ is the location prefix in\n/USEAB1/0101/031/003", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of this reservation block generated by Google\nCompute Engine. The name must be 1-63 characters long, and comply with\nRFC1035 @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalTopology": { - "$ref": "ReservationBlockPhysicalTopology", - "description": "[Output Only] The physical topology of the reservation block." - }, - "reservationMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "[Output Only] Maintenance information for this reservation block." - }, - "reservationSubBlockCount": { - "description": "[Output Only] The number of reservation subBlocks associated with this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "reservationSubBlockInUseCount": { - "description": "[Output Only] The number of in-use reservation subBlocks associated with\nthis reservation block. If at least one VM is running on a subBlock, it is\nconsidered in-use.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the reservation block.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated for the reservation block.", - "Reservation block is currently being deleted.", - "", - "Reservation block has allocated all its resources." - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] Zone in which the reservation block resides.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlockHealthInfo": { - "description": "Health information for the reservation block.", - "id": "ReservationBlockHealthInfo", - "properties": { - "degradedSubBlockCount": { - "description": "The number of subBlocks that are degraded.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation block.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation block is degraded.", - "The reservation block is healthy.", - "The health status of the reservation block is unspecified." - ], - "type": "string" - }, - "healthySubBlockCount": { - "description": "The number of subBlocks that are healthy.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopology": { - "id": "ReservationBlockPhysicalTopology", - "properties": { - "block": { - "description": "The hash of the capacity block within the cluster.", - "type": "string" - }, - "cluster": { - "description": "The cluster name of the reservation block.", - "type": "string" - }, - "instances": { - "description": "The detailed instances information for a given Block", - "items": { - "$ref": "ReservationBlockPhysicalTopologyInstance" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopologyInstance": { - "description": "The instances information for a given Block", - "id": "ReservationBlockPhysicalTopologyInstance", - "properties": { - "instanceId": { - "description": "The InstanceId of the instance", - "format": "uint64", - "type": "string" - }, - "physicalHostTopology": { - "$ref": "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", - "description": "The PhysicalHostTopology of instances within a Block resource." - }, - "projectId": { - "description": "Project where the instance lives", - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology": { - "description": "The PhysicalHostTopology of the instance within a Block resource.", - "id": "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", - "properties": { - "host": { - "description": "Host hash for a given instance", - "type": "string" - }, - "subBlock": { - "description": "Sub block hash for a given instance", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlocksGetResponse": { - "id": "ReservationBlocksGetResponse", - "properties": { - "resource": { - "$ref": "ReservationBlock" - } - }, - "type": "object" - }, - "ReservationBlocksListResponse": { - "description": "A list of reservation blocks under a single reservation.", - "id": "ReservationBlocksListResponse", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of reservation block resources.", - "items": { - "$ref": "ReservationBlock" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationBlock", - "description": "Type of the resource. Alwayscompute#reservationBlock for a list of reservation blocks.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationList": { - "id": "ReservationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Allocation resources.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationList", - "description": "[Output Only] Type of resource.Always compute#reservationsList\nfor listsof reservations", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationSubBlock": { - "description": "Represents a reservation subBlock resource.", - "id": "ReservationSubBlock", - "properties": { - "acceleratorTopologiesInfo": { - "$ref": "AcceleratorTopologiesInfo", - "description": "[Output Only] Slice info for the reservation subBlock." - }, - "count": { - "description": "[Output Only] The number of hosts that are allocated in this\nreservation subBlock.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "healthInfo": { - "$ref": "ReservationSubBlockHealthInfo", - "description": "[Output Only] Health information for the reservation subBlock." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] The number of instances that are currently in use on this\nreservation subBlock.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances running\non the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#reservationSubBlock", - "description": "[Output Only] Type of the resource. Alwayscompute#reservationSubBlock for reservation subBlocks.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of this reservation subBlock generated by Google\nCompute Engine. The name must be 1-63 characters long, and comply with\nRFC1035 @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalTopology": { - "$ref": "ReservationSubBlockPhysicalTopology", - "description": "[Output Only] The physical topology of the reservation subBlock." - }, - "reservationSubBlockMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "Maintenance information for this reservation subBlock." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the reservation subBlock.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated for the reservation subBlock.", - "Reservation subBlock is currently being deleted.", - "", - "Reservation subBlock has allocated all its resources." - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] Zone in which the reservation subBlock resides.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationSubBlockHealthInfo": { - "description": "Health information for the reservation subBlock.", - "id": "ReservationSubBlockHealthInfo", - "properties": { - "degradedHostCount": { - "description": "The number of degraded hosts in the reservation subBlock.", - "format": "int32", - "type": "integer" - }, - "degradedInfraCount": { - "description": "The number of degraded infrastructure (e.g NV link domain) in the\nreservation subblock.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation subBlock.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation subBlock is degraded.", - "The reservation subBlock is healthy.", - "The health status of the reservation subBlock is unspecified." - ], - "type": "string" - }, - "healthyHostCount": { - "description": "The number of healthy hosts in the reservation subBlock.", - "format": "int32", - "type": "integer" - }, - "healthyInfraCount": { - "description": "The number of healthy infrastructure (e.g NV link domain) in the\nreservation subblock.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ReservationSubBlockPhysicalTopology": { - "id": "ReservationSubBlockPhysicalTopology", - "properties": { - "block": { - "description": "The hash of the capacity block within the cluster.", - "type": "string" - }, - "cluster": { - "description": "The cluster name of the reservation subBlock.", - "type": "string" - }, - "subBlock": { - "description": "The hash of the capacity sub-block within the capacity block.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationSubBlocksGetResponse": { - "id": "ReservationSubBlocksGetResponse", - "properties": { - "resource": { - "$ref": "ReservationSubBlock" - } - }, - "type": "object" - }, - "ReservationSubBlocksListResponse": { - "description": "A list of reservation subBlocks under a single reservation.", - "id": "ReservationSubBlocksListResponse", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of reservation subBlock resources.", - "items": { - "$ref": "ReservationSubBlock" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationSubBlock", - "description": "Type of the resource. Alwayscompute#reservationSubBlock for a list of reservation\nsubBlocks.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationSubBlocksReportFaultyRequest": { - "id": "ReservationSubBlocksReportFaultyRequest", - "properties": { - "disruptionSchedule": { - "description": "The disruption schedule for the subBlock.", - "enum": [ - "DISRUPTION_SCHEDULE_UNSPECIFIED", - "IMMEDIATE" - ], - "enumDescriptions": [ - "", - "All VMs will be disrupted immediately." - ], - "type": "string" - }, - "failureComponent": { - "description": "The component that experienced the fault.", - "enum": [ - "FAILURE_COMPONENT_UNSPECIFIED", - "MULTIPLE_FAULTY_HOSTS", - "NVLINK_SWITCH" - ], - "enumDescriptions": [ - "", - "Multiple hosts experienced the fault.", - "The NVLink switch experienced the fault." - ], - "type": "string" - }, - "faultReasons": { - "description": "The reasons for the fault experienced with the subBlock.", - "items": { - "$ref": "ReservationSubBlocksReportFaultyRequestFaultReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationSubBlocksReportFaultyRequestFaultReason": { - "description": "The reason for the fault experienced with the subBlock.", - "id": "ReservationSubBlocksReportFaultyRequestFaultReason", - "properties": { - "behavior": { - "description": "The behavior of the fault experienced with the subBlock.", - "enum": [ - "FAULT_BEHAVIOR_UNSPECIFIED", - "GPU_ERROR", - "PERFORMANCE", - "SILENT_DATA_CORRUPTION", - "SWITCH_FAILURE" - ], - "enumDescriptions": [ - "", - "The subBlock experienced a GPU error.", - "The subBlock experienced performance issues.", - "The subBlock experienced silent data corruption.", - "The subBlock experienced a switch failure." - ], - "type": "string" - }, - "description": { - "description": "The description of the fault experienced with the subBlock.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationsBlocksPerformMaintenanceRequest": { - "id": "ReservationsBlocksPerformMaintenanceRequest", - "properties": { - "maintenanceScope": { - "description": "Specifies if all, running or unused hosts are in scope for this request.", - "enum": [ - "ALL", - "MAINTENANCE_SCOPE_UNSPECIFIED", - "RUNNING_VMS", - "UNUSED_CAPACITY" - ], - "enumDescriptions": [ - "Trigger maintenance for all hosts belonging to this reservation\nirrespective of whether VMs are running on them or not.", - "Internal only", - "Trigger maintenance only on the hosts belonging to this reservation which\nhave VMs running on them.", - "Trigger maintenance only on the hosts belonging to this reservation which\ndo not have any VMs running on them. This is not allowed for Standard ExR" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationsPerformMaintenanceRequest": { - "id": "ReservationsPerformMaintenanceRequest", - "properties": { - "maintenanceScope": { - "description": "Specifies if all, running or unused hosts are in scope for this request.", - "enum": [ - "ALL", - "MAINTENANCE_SCOPE_UNSPECIFIED", - "RUNNING_VMS", - "UNUSED_CAPACITY" - ], - "enumDescriptions": [ - "Trigger maintenance for all hosts belonging to this reservation\nirrespective of whether VMs are running on them or not.", - "Internal only", - "Trigger maintenance only on the hosts belonging to this reservation which\nhave VMs running on them.", - "Trigger maintenance only on the hosts belonging to this reservation which\ndo not have any VMs running on them. This is not allowed for Standard ExR" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationsResizeRequest": { - "id": "ReservationsResizeRequest", - "properties": { - "specificSkuCount": { - "description": "Number of allocated resources can be resized with minimum = 1 and\nmaximum = 1000.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ReservationsScopedList": { - "id": "ReservationsScopedList", - "properties": { - "reservations": { - "description": "A list of reservations contained in this scope.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of reservations when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourceCommitment": { - "description": "Commitment for a particular hardware resource (a commitment is composed of\none or more of these).", - "id": "ResourceCommitment", - "properties": { - "acceleratorType": { - "description": "Name of the accelerator type or GPU resource. Specify this field only when\nthe type of hardware resource is ACCELERATOR.", - "type": "string" - }, - "amount": { - "description": "The quantity of the hardware resource that you want to commit to purchasing\n(in a type-dependent unit).\n \n - For vCPUs, you must specify an integer value.\n - For memory, you specify the amount of MB that you want. The value you\n specify must be a multiple of 256 MB, with up to 6.5 GB of\n memory per every vCPU.\n - For GPUs, you must specify an integer value.\n - For Local SSD disks, you must specify the amount in GB. The size of a\n single Local SSD disk is 375 GB.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "The type of hardware resource that you want to specify.\nYou can specify any of the following values:\n \n - VCPU\n - MEMORY\n - LOCAL_SSD\n - ACCELERATOR\n\n\n\nSpecify as a separate entry in the list for each\nindividual resource type.", - "enum": [ - "ACCELERATOR", - "LOCAL_SSD", - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "properties": { - "group": { - "description": "A URI referencing one of the instance groups or network endpoint groups\nlisted in the backend service.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePoliciesScopedList": { - "id": "ResourcePoliciesScopedList", - "properties": { - "resourcePolicies": { - "description": "A list of resourcePolicies contained in this scope.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of resourcePolicies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicy": { - "description": "Represents a Resource Policy resource. You can use resource policies to\nschedule actions for some Compute Engine resources. For example, you can\nuse them toschedule persistent disk\nsnapshots.", - "id": "ResourcePolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "type": "string" - }, - "diskConsistencyGroupPolicy": { - "$ref": "ResourcePolicyDiskConsistencyGroupPolicy", - "description": "Resource policy for disk consistency groups." - }, - "groupPlacementPolicy": { - "$ref": "ResourcePolicyGroupPlacementPolicy", - "description": "Resource policy for instances for placement configuration." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSchedulePolicy": { - "$ref": "ResourcePolicyInstanceSchedulePolicy", - "description": "Resource policy for scheduling instance operations." - }, - "kind": { - "default": "compute#resourcePolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "type": "string" - }, - "resourceStatus": { - "$ref": "ResourcePolicyResourceStatus", - "description": "[Output Only] The system status of the resource policy." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "snapshotSchedulePolicy": { - "$ref": "ResourcePolicySnapshotSchedulePolicy", - "description": "Resource policy for persistent disks for creating snapshots." - }, - "status": { - "description": "[Output Only] The status of resource policy creation.", - "enum": [ - "CREATING", - "DELETING", - "EXPIRED", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resource policy is being created.", - "Resource policy is being deleted.", - "Resource policy is expired and will not run again.", - "", - "Resource policy is ready to be used." - ], - "type": "string" - }, - "vmMaintenancePolicy": { - "$ref": "ResourcePolicyVmMaintenancePolicy", - "description": "Resource policy applicable to VMs for infrastructure maintenance." - }, - "workloadPolicy": { - "$ref": "ResourcePolicyWorkloadPolicy", - "description": "Resource policy for defining instance placement for MIGs." - } - }, - "type": "object" - }, - "ResourcePolicyAggregatedList": { - "description": "Contains a list of resourcePolicies.", - "id": "ResourcePolicyAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ResourcePoliciesScopedList", - "description": "Name of the scope containing this set of resourcePolicies." - }, - "description": "A list of ResourcePolicy resources.", - "type": "object" - }, - "kind": { - "default": "compute#resourcePolicyAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicyDailyCycle": { - "description": "Time window specified for daily operations.", - "id": "ResourcePolicyDailyCycle", - "properties": { - "daysInCycle": { - "description": "Defines a schedule with units measured in days. The value determines\nhow many days pass between the start of each cycle.", - "format": "int32", - "type": "integer" - }, - "duration": { - "description": "[Output only] A predetermined duration for the window, automatically\nchosen to be the smallest possible in the given scenario.", - "type": "string" - }, - "startTime": { - "description": "Start time of the window. This must be in UTC format that resolves to one\nof 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For\nexample, both 13:00-5 and 08:00 are valid.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyDiskConsistencyGroupPolicy": { - "description": "Resource policy for disk consistency groups.", - "id": "ResourcePolicyDiskConsistencyGroupPolicy", - "properties": {}, - "type": "object" - }, - "ResourcePolicyGroupPlacementPolicy": { - "description": "A GroupPlacementPolicy specifies resource placement configuration.\nIt specifies the failure bucket separation", - "id": "ResourcePolicyGroupPlacementPolicy", - "properties": { - "acceleratorTopologyMode": { - "description": "Specifies the connection mode for the accelerator topology. If not\nspecified, the default is AUTO_CONNECT.", - "enum": [ - "AUTO_CONNECT", - "PROVISION_ONLY" - ], - "enumDescriptions": [ - "The interconnected chips are pre-configured at the time of VM creation.", - "The interconnected chips are connected on demand. At the time of VM\ncreation, the chips are not connected." - ], - "type": "string" - }, - "availabilityDomainCount": { - "description": "The number of availability domains to spread instances across. If two\ninstances are in different availability domain, they are not in the same\nlow latency network.", - "format": "int32", - "type": "integer" - }, - "collocation": { - "description": "Specifies network collocation", - "enum": [ - "CLUSTERED", - "COLLOCATED", - "MAX_SPREAD", - "UNSPECIFIED_COLLOCATION" - ], - "enumDescriptions": [ - "Specifies collocation option that provides tight collocation\nwith minimum network latency.", - "", - "Specifies collocation option that provides spreading across clusters.", - "" - ], - "type": "string" - }, - "gpuTopology": { - "description": "Specifies the shape of the GPU slice, in slice based GPU families eg.\nA4X.", - "type": "string" - }, - "maxDistance": { - "description": "Specifies the number of max logical switches.", - "format": "int32", - "type": "integer" - }, - "scope": { - "description": "Scope specifies the availability domain to which the VMs should be\nspread.", - "enum": [ - "HOST", - "UNSPECIFIED_SCOPE" - ], - "enumDescriptions": [ - "Specifies availability domain scope across hosts.\nVMs will be spread across different hosts.", - "VMs will be spread across different instrastructure to not share power,\nhost and networking." - ], - "type": "string" - }, - "sliceCount": { - "description": "Specifies the number of slices in a multislice workload.", - "format": "int32", - "type": "integer" - }, - "tpuTopology": { - "description": "Specifies the shape of the TPU slice", - "type": "string" - }, - "vmCount": { - "description": "Number of VMs in this placement group. Google does not recommend that you\nuse this field unless you use a compact policy and you want your policy\nto work only if it contains this exact number of VMs.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ResourcePolicyHourlyCycle": { - "description": "Time window specified for hourly operations.", - "id": "ResourcePolicyHourlyCycle", - "properties": { - "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.", - "type": "string" - }, - "hoursInCycle": { - "description": "Defines a schedule with units measured in hours. The value determines\nhow many hours pass between the start of each cycle.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Time within the window to start the operations.\nIt must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyInstanceSchedulePolicy": { - "description": "An InstanceSchedulePolicy specifies when and how frequent certain\noperations are performed on the instance.", - "id": "ResourcePolicyInstanceSchedulePolicy", - "properties": { - "expirationTime": { - "description": "The expiration time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - }, - "startTime": { - "description": "The start time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - }, - "timeZone": { - "description": "Specifies the time zone to be used in interpreting Schedule.schedule.\nThe value of this field must be a time zone name from the tz database:\nhttps://wikipedia.org/wiki/Tz_database.", - "type": "string" - }, - "vmStartSchedule": { - "$ref": "ResourcePolicyInstanceSchedulePolicySchedule", - "description": "Specifies the schedule for starting instances." - }, - "vmStopSchedule": { - "$ref": "ResourcePolicyInstanceSchedulePolicySchedule", - "description": "Specifies the schedule for stopping instances." - } - }, - "type": "object" - }, - "ResourcePolicyInstanceSchedulePolicySchedule": { - "description": "Schedule for an instance operation.", - "id": "ResourcePolicyInstanceSchedulePolicySchedule", - "properties": { - "schedule": { - "description": "Specifies the frequency for the operation, using the unix-cron format.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyList": { - "id": "ResourcePolicyList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of ResourcePolicy resources.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#resourcePolicyList", - "description": "[Output Only] Type of resource.Alwayscompute#resourcePoliciesList for listsof resourcePolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicyResourceStatus": { - "description": "Contains output only fields.\nUse this sub-message for all output fields set on ResourcePolicy.\nThe internal structure of this \"status\" field should mimic the structure\nof ResourcePolicy proto specification.", - "id": "ResourcePolicyResourceStatus", - "properties": { - "instanceSchedulePolicy": { - "$ref": "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", - "description": "[Output Only] Specifies a set of output values reffering to\nthe instance_schedule_policy system status.\nThis field should have the same name as corresponding policy field." - } - }, - "type": "object" - }, - "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus": { - "id": "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", - "properties": { - "lastRunStartTime": { - "description": "[Output Only] The last time the schedule successfully ran.\nThe timestamp is an RFC3339 string.", - "type": "string" - }, - "nextRunStartTime": { - "description": "[Output Only] The next time the schedule is planned to run.\nThe actual time might be slightly different.\nThe timestamp is an RFC3339 string.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicy": { - "description": "A snapshot schedule policy specifies when and how frequently snapshots are\nto be created for the target disk. Also specifies how many and how long\nthese scheduled snapshots should be retained.", - "id": "ResourcePolicySnapshotSchedulePolicy", - "properties": { - "retentionPolicy": { - "$ref": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", - "description": "Retention policy applied to snapshots created by this resource policy." - }, - "schedule": { - "$ref": "ResourcePolicySnapshotSchedulePolicySchedule", - "description": "A Vm Maintenance Policy specifies what kind of infrastructure\nmaintenance we are allowed to perform on this VM and when. Schedule\nthat is applied to disks covered by this policy." - }, - "snapshotProperties": { - "$ref": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", - "description": "Properties with which snapshots are created such as labels, encryption\nkeys." - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicyRetentionPolicy": { - "description": "Policy for retention of scheduled snapshots.", - "id": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", - "properties": { - "maxRetentionDays": { - "description": "Maximum age of the snapshot that is allowed to be kept.", - "format": "int32", - "type": "integer" - }, - "onPolicySwitch": { - "deprecated": true, - "enum": [ - "DO_NOT_RETROACTIVELY_APPLY", - "RETROACTIVELY_APPLY", - "UNSPECIFIED_ON_POLICY_SWITCH" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "onSourceDiskDelete": { - "description": "Specifies the behavior to apply to scheduled snapshots when\nthe source disk is deleted.", - "enum": [ - "APPLY_RETENTION_POLICY", - "KEEP_AUTO_SNAPSHOTS", - "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicySchedule": { - "description": "A schedule for disks where the schedueled operations are performed.", - "id": "ResourcePolicySnapshotSchedulePolicySchedule", - "properties": { - "dailySchedule": { - "$ref": "ResourcePolicyDailyCycle" - }, - "hourlySchedule": { - "$ref": "ResourcePolicyHourlyCycle" - }, - "weeklySchedule": { - "$ref": "ResourcePolicyWeeklyCycle" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicySnapshotProperties": { - "description": "Specified snapshot properties for scheduled snapshots created by this\npolicy.", - "id": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", - "properties": { - "chainName": { - "description": "Chain name that the snapshot is created in.", - "type": "string" - }, - "guestFlush": { - "description": "Indication to perform a 'guest aware' snapshot.", - "type": "boolean" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to scheduled snapshots. These can be later modified\nby the setLabels method. Label values may be empty.", - "type": "object" - }, - "region": { - "description": "Region where the snapshot is scoped to.", - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the auto snapshot (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourcePolicyVmMaintenancePolicy": { - "id": "ResourcePolicyVmMaintenancePolicy", - "properties": { - "concurrencyControlGroup": { - "$ref": "ResourcePolicyVmMaintenancePolicyConcurrencyControl" - }, - "maintenanceWindow": { - "$ref": "ResourcePolicyVmMaintenancePolicyMaintenanceWindow", - "description": "Maintenance windows that are applied to VMs covered by this policy." - } - }, - "type": "object" - }, - "ResourcePolicyVmMaintenancePolicyConcurrencyControl": { - "description": "A concurrency control configuration. Defines a group config that, when\nattached to an instance, recognizes that instance as part of a group of\ninstances where only up the concurrency_limit of instances in that group\ncan undergo simultaneous maintenance.\nFor more information: go/concurrency-control-design-doc", - "id": "ResourcePolicyVmMaintenancePolicyConcurrencyControl", - "properties": { - "concurrencyLimit": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ResourcePolicyVmMaintenancePolicyMaintenanceWindow": { - "description": "A maintenance window for VMs. When set, we restrict our\nmaintenance operations to this window.", - "id": "ResourcePolicyVmMaintenancePolicyMaintenanceWindow", - "properties": { - "dailyMaintenanceWindow": { - "$ref": "ResourcePolicyDailyCycle" - } - }, - "type": "object" - }, - "ResourcePolicyWeeklyCycle": { - "description": "Time window specified for weekly operations.", - "id": "ResourcePolicyWeeklyCycle", - "properties": { - "dayOfWeeks": { - "description": "Up to 7 intervals/windows, one for each day of the week.", - "items": { - "$ref": "ResourcePolicyWeeklyCycleDayOfWeek" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourcePolicyWeeklyCycleDayOfWeek": { - "id": "ResourcePolicyWeeklyCycleDayOfWeek", - "properties": { - "day": { - "description": "Defines a schedule that runs on specific days of the week. Specify\none or more days. The following options are available:\nMONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.", - "enum": [ - "FRIDAY", - "INVALID", - "MONDAY", - "SATURDAY", - "SUNDAY", - "THURSDAY", - "TUESDAY", - "WEDNESDAY" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.", - "type": "string" - }, - "startTime": { - "description": "Time within the window to start the operations.\nIt must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyWorkloadPolicy": { - "description": "Represents the workload policy.", - "id": "ResourcePolicyWorkloadPolicy", - "properties": { - "acceleratorTopology": { - "description": "Specifies the topology required to create a partition for VMs that have\ninterconnected GPUs.", - "type": "string" - }, - "acceleratorTopologyMode": { - "description": "Specifies the connection mode for the accelerator topology. If not\nspecified, the default is AUTO_CONNECT.", - "enum": [ - "AUTO_CONNECT", - "PROVISION_ONLY" - ], - "enumDescriptions": [ - "The interconnected chips are pre-configured at the time of VM creation.", - "The interconnected chips are connected on demand. At the time of VM\ncreation, the chips are not connected." - ], - "type": "string" - }, - "maxTopologyDistance": { - "description": "Specifies the maximum distance between instances.", - "enum": [ - "BLOCK", - "CLUSTER", - "SUBBLOCK" - ], - "enumDescriptions": [ - "VMs must be provisioned in the same block.", - "VMs must be provisioned in the same cluster.", - "VMs must be provisioned in the same subblock." - ], - "type": "string" - }, - "type": { - "description": "Specifies the intent of the instance placement in the MIG.", - "enum": [ - "HIGH_AVAILABILITY", - "HIGH_THROUGHPUT" - ], - "enumDescriptions": [ - "MIG spreads out the instances as much as possible for high availability.", - "MIG provisions instances as close to each other as possible for high\nthroughput." - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatus": { - "description": "Contains output only fields.\nUse this sub-message for actual values set on Instance attributes as compared\nto the value requested by the user (intent) in their instance CRUD calls.", - "id": "ResourceStatus", - "properties": { - "acceleratorStatus": { - "description": "[Output Only] Accelerators status show results of GPU scans. These scans\nare specialized diagnostic tests designed to uncover latent manufacturing\ndefects or other issues that could potentially lead to data corruption or\nimpede the customer's ability to efficiently execute GPU workloads.", - "items": { - "$ref": "ResourceStatusAcceleratorStatus" - }, - "type": "array" - }, - "consumedReservation": { - "deprecated": true, - "description": "[Output Only] The full resource name of the reservation that this instance\nis consuming from.", - "type": "string" - }, - "consumedReservationBlock": { - "deprecated": true, - "description": "[Output Only] The full resource name of the reservation block that this\ninstance is consuming from.", - "type": "string" - }, - "effectiveInstanceMetadata": { - "$ref": "ResourceStatusEffectiveInstanceMetadata", - "description": "[Output Only] Effective metadata is a field that consolidates project,\nzonal instance settings, and instance-level predefined metadata keys to\nprovide the overridden value for those metadata keys at the instance level." - }, - "lastInstanceTerminationDetails": { - "$ref": "ResourceStatusLastInstanceTerminationDetails", - "description": "[Output Only] Contains last termination details why the instance was\nterminated." - }, - "physicalHost": { - "description": "[Output Only] The precise location of your instance within the zone's data\ncenter, including the block, sub-block, and host. The field is formatted as\nfollows: blockId/subBlockId/hostId.", - "type": "string" - }, - "physicalHostTopology": { - "$ref": "ResourceStatusPhysicalHostTopology", - "description": "[Output Only] A series of fields containing the global name of the Compute\nEngine cluster, as well as the ID of the block, sub-block, and host on\nwhich the running instance is located." - }, - "reservationConsumptionInfo": { - "$ref": "ResourceStatusReservationConsumptionInfo", - "description": "[Output Only] Reservation information that the instance is consuming from." - }, - "scheduling": { - "$ref": "ResourceStatusScheduling" - }, - "serviceIntegrationStatuses": { - "additionalProperties": { - "$ref": "ResourceStatusServiceIntegrationStatus" - }, - "description": "[Output Only] Represents the status of the service integration specs\ndefined by the user in instance.serviceIntegrationSpecs.", - "type": "object" - }, - "shutdownDetails": { - "$ref": "ResourceStatusShutdownDetails", - "description": "[Output Only] Details about the instance stopping state." - }, - "upcomingMaintenance": { - "$ref": "UpcomingMaintenance" - } - }, - "type": "object" - }, - "ResourceStatusAcceleratorStatus": { - "description": "The status of an individual accelerator resource.", - "id": "ResourceStatusAcceleratorStatus", - "properties": { - "passedScans": { - "description": "The details of scans that passed for an accelerator.", - "items": { - "$ref": "ResourceStatusAcceleratorStatusPassedScan" - }, - "type": "array" - }, - "recommendedScans": { - "description": "The details of recommended scans for an accelerator.", - "items": { - "$ref": "ResourceStatusAcceleratorStatusRecommendedScan" - }, - "type": "array" - }, - "serialNumber": { - "description": "The serial number of the accelerator.", - "type": "string" - }, - "uuid": { - "description": "The UUID of the accelerator.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusAcceleratorStatusPassedScan": { - "id": "ResourceStatusAcceleratorStatusPassedScan", - "properties": { - "endTime": { - "description": "The end time of the passed scan inRFC3339 text format.", - "type": "string" - }, - "name": { - "type": "string" - }, - "startTime": { - "description": "The start time of the passed scan inRFC3339 text format.", - "type": "string" - }, - "version": { - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusAcceleratorStatusRecommendedScan": { - "id": "ResourceStatusAcceleratorStatusRecommendedScan", - "properties": { - "estimatedDuration": { - "$ref": "Duration" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusEffectiveInstanceMetadata": { - "description": "Effective values of predefined metadata keys for an instance.", - "id": "ResourceStatusEffectiveInstanceMetadata", - "properties": { - "blockProjectSshKeysMetadataValue": { - "description": "Effective block-project-ssh-keys value at Instance level.", - "type": "boolean" - }, - "enableGuestAttributesMetadataValue": { - "description": "Effective enable-guest-attributes value at Instance level.", - "type": "boolean" - }, - "enableOsInventoryMetadataValue": { - "description": "Effective enable-os-inventory value at Instance level.", - "type": "boolean" - }, - "enableOsconfigMetadataValue": { - "description": "Effective enable-osconfig value at Instance level.", - "type": "boolean" - }, - "enableOsloginMetadataValue": { - "description": "Effective enable-oslogin value at Instance level.", - "type": "boolean" - }, - "serialPortEnableMetadataValue": { - "description": "Effective serial-port-enable value at Instance level.", - "type": "boolean" - }, - "serialPortLoggingEnableMetadataValue": { - "description": "Effective serial-port-logging-enable value at Instance level.", - "type": "boolean" - }, - "vmDnsSettingMetadataValue": { - "description": "Effective VM DNS setting at Instance level.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusLastInstanceTerminationDetails": { - "id": "ResourceStatusLastInstanceTerminationDetails", - "properties": { - "terminationReason": { - "description": "Reason for termination", - "enum": [ - "BAD_BILLING_ACCOUNT", - "CLOUD_ABUSE_DETECTED", - "DISK_ERROR", - "FREE_TRIAL_EXPIRED", - "INSTANCE_UPDATE_REQUIRED_RESTART", - "INTERNAL_ERROR", - "KMS_REJECTION", - "MANAGED_INSTANCE_GROUP", - "OS_TERMINATED", - "PREEMPTED", - "SCHEDULED_STOP", - "SHUTDOWN_DUE_TO_HOST_ERROR", - "SHUTDOWN_DUE_TO_MAINTENANCE", - "SHUTDOWN_DUE_TO_SHEDDING_EVENT", - "USER_TERMINATED" - ], - "enumDescriptions": [ - "Terminated due to bad billing", - "Terminated by Cloud Abuse team", - "Terminated due to disk errors", - "Terminated due to free trial expired", - "Instance.update initiated which required RESTART", - "Terminated due to internal error", - "Terminated due to Key Management Service (KMS) key failure.", - "Terminated by managed instance group", - "Terminated from the OS level", - "Terminated due to preemption", - "Terminated due to scheduled stop", - "Terminated due to host error", - "Terminated due to maintenance", - "Terminated due to shedding event", - "Terminated by user" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusPhysicalHostTopology": { - "description": "Represents the physical host topology of the host on which the VM is\nrunning.", - "id": "ResourceStatusPhysicalHostTopology", - "properties": { - "block": { - "description": "[Output Only] The ID of the block in which the running instance is\nlocated. Instances within the same block experience low network latency.", - "type": "string" - }, - "cluster": { - "description": "[Output Only] The global name of the Compute Engine cluster where the\nrunning instance is located.", - "type": "string" - }, - "host": { - "description": "[Output Only] The ID of the host on which the running instance is located.\nInstances on the same host experience the lowest possible network\nlatency.", - "type": "string" - }, - "subblock": { - "description": "[Output Only] The ID of the sub-block in which the running instance is\nlocated. Instances in the same sub-block experience lower network latency\nthan instances in the same block.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusReservationConsumptionInfo": { - "description": "Reservation consumption information that the instance is consuming from.", - "id": "ResourceStatusReservationConsumptionInfo", - "properties": { - "consumedReservation": { - "description": "[Output Only] The full resource name of the reservation that this\ninstance is consuming from.", - "type": "string" - }, - "consumedReservationBlock": { - "description": "[Output Only] The full resource name of the reservation block that this\ninstance is consuming from.", - "type": "string" - }, - "consumedReservationSubBlock": { - "description": "[Output Only] The full resource name of the reservation sub-block that\nthis instance is consuming from.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusScheduling": { - "id": "ResourceStatusScheduling", - "properties": { - "availabilityDomain": { - "description": "Specifies the availability domain to place the instance in. The value\nmust be a number between 1 and the number of availability domains\nspecified in the spread placement policy attached to the instance.", - "format": "int32", - "type": "integer" - }, - "terminationTimestamp": { - "description": "Time in future when the instance will be terminated inRFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusServiceIntegrationStatus": { - "description": "Represents the status of integration between instance and another service.\nSee go/gce-backupdr-design for more details.", - "id": "ResourceStatusServiceIntegrationStatus", - "properties": { - "backupDr": { - "$ref": "ResourceStatusServiceIntegrationStatusBackupDRStatus" - } - }, - "type": "object" - }, - "ResourceStatusServiceIntegrationStatusBackupDRStatus": { - "description": "Message defining compute perspective of the result of integration with\nBackup and DR. FAILED status indicates that the operation specified did\nnot complete correctly and should be retried with the same value.", - "id": "ResourceStatusServiceIntegrationStatusBackupDRStatus", - "properties": { - "integrationDetails": { - "description": "The PlanReference object created by Backup and DR to maintain the\nactual status of backups. May still be present if removing the backup\nplan fails.", - "type": "string" - }, - "state": { - "description": "Enum representing the registration state of a Backup and DR backup plan\nfor the instance.", - "enum": [ - "ACTIVE", - "CREATING", - "DELETING", - "FAILED", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The operation was successful and Backup and DR is trying to protect\nthe instance with the specified backup plan. Check\nresource pointed to in integration_details for more information.", - "GCE is trying to attach the backup plan to the instance.", - "GCE is trying to remove the backup plan from the instance.", - "The operation failed, specifying the same value inBackupDrSpec.plan again (including null for delete) will\nattempt to repair the integration", - "Default value, should not be found on instances." - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusShutdownDetails": { - "description": "Specifies if the instance is in `PENDING_STOP` state or there is a\nprogrammed stop scheduled.", - "id": "ResourceStatusShutdownDetails", - "properties": { - "maxDuration": { - "$ref": "Duration", - "description": "The duration for graceful shutdown. Only applicable when\n`stop_state=PENDING_STOP`." - }, - "requestTimestamp": { - "description": "Past timestamp indicating the beginning of current `stopState` in RFC3339 text format.", - "type": "string" - }, - "stopState": { - "description": "Current stopping state of the instance.", - "enum": [ - "PENDING_STOP", - "STOPPING" - ], - "enumDescriptions": [ - "The instance is gracefully shutting down.", - "The instance is stopping." - ], - "type": "string" - }, - "targetState": { - "description": "Target instance state.", - "enum": [ - "DELETED", - "STOPPED" - ], - "enumDescriptions": [ - "The instance will be deleted.", - "The instance will be stopped." - ], - "type": "string" - } - }, - "type": "object" - }, - "RiskDetails": { - "description": "Details about a risk.", - "id": "RiskDetails", - "properties": { - "duration": { - "description": "The duration of the risk since it was detected.", - "format": "google-duration", - "type": "string" - }, - "globalDnsInsight": { - "$ref": "RiskDetailsGlobalDnsInsight" - }, - "lastUpdateTimestamp": { - "description": "The last time the risk was updated.", - "format": "google-datetime", - "type": "string" - }, - "severity": { - "description": "The severity of the risk.", - "enum": [ - "CRITICAL", - "HIGH", - "LOW", - "MEDIUM", - "SEVERITY_UNSPECIFIED" - ], - "enumDescriptions": [ - "Critical severity.", - "High severity.", - "Low severity.", - "Medium severity.", - "No severity specified. The default value." - ], - "type": "string" - }, - "type": { - "description": "The type of risk.", - "enum": [ - "GLOBAL_DNS", - "RISK_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Risk type related to global DNS.", - "Default value. This value is unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "RiskDetailsGlobalDnsInsight": { - "id": "RiskDetailsGlobalDnsInsight", - "properties": { - "projectDefaultIsGlobalDns": { - "description": "Whether the project default DNS setting is global or not.", - "type": "boolean" - }, - "queryObservationWindow": { - "description": "The observation window for the query counts.", - "format": "google-duration", - "type": "string" - }, - "riskyQueryCount": { - "description": "The number of queries that are risky. This will always be less than\ntotal_query_count.", - "format": "int64", - "type": "string" - }, - "totalQueryCount": { - "description": "The total number of queries in the observation window.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "RiskRecommendation": { - "description": "Recommendation with reference url.", - "id": "RiskRecommendation", - "properties": { - "content": { - "description": "Mitigation guide for the risk.", - "type": "string" - }, - "referenceUrl": { - "description": "URL referencing a more detailed mitigation guide.", - "type": "string" - } - }, - "type": "object" - }, - "Rollout": { - "description": "Represent a Rollout resource.", - "id": "Rollout", - "properties": { - "cancellationTime": { - "description": "Output only. The timestamp at which the Rollout was cancelled.", - "readOnly": true, - "type": "string" - }, - "completionTime": { - "description": "Output only. The timestamp at which the Rollout was completed.", - "readOnly": true, - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "currentWaveNumber": { - "description": "Output only. The number of the currently running wave.\nEx. 1", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Output only. etag of the Rollout\nEx. abc1234", - "readOnly": true, - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#rollout", - "description": "[Output Only] Type of the resource. Always compute#rollout\nfor rollouts.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "rolloutEntity": { - "$ref": "RolloutRolloutEntity", - "description": "Required. The resource being rolled out." - }, - "rolloutPlan": { - "description": "Required. Rollout Plan used to model the Rollout.\nEx. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "state": { - "description": "Output only. The current state of the Rollout.", - "enum": [ - "CANCELLED", - "CANCELLING", - "CANCEL_FAILED", - "COMPLETED", - "COMPLETE_FAILED", - "COMPLETING", - "FAILED", - "PAUSED", - "PAUSE_FAILED", - "PAUSING", - "PROCESSING", - "READY", - "RESUMING", - "ROLLBACK_WAVE_FAILED", - "ROLLING_BACK", - "STATE_UNSPECIFIED", - "UNINITIALIZED", - "WAVE_FAILED" - ], - "enumDescriptions": [ - "The rollout is in a failure terminal state.", - "The rollout is being cancelled.", - "An attempted cancel operation was unsuccessful.", - "The rollout is in a successful terminal state.", - "An attempted complete operation was unsuccessful.", - "The rollout is being marked as completed.", - "The rollout completed with failures.", - "The rollout is paused.", - "An attempted pause operation was unsuccessful.", - "The rollout is being paused.", - "A wave is being processed by the product.", - "The rollout has been successfully initialized and is ready to start.", - "The rollout is being resumed after being paused.", - "An attempted rollback operation failed to complete successfully.", - "A wave rollback is in progress for this rollout.", - "Undefined default state. Should never be exposed to users.", - "The rollout has been created but is not yet ready to be started.", - "The product failed to process the wave." - ], - "readOnly": true, - "type": "string" - }, - "waveDetails": { - "description": "Output only. Details about each wave of the rollout.", - "items": { - "$ref": "RolloutWaveDetails" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlan": { - "description": "Message describing RolloutPlan object", - "id": "RolloutPlan", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#rolloutPlan", - "description": "[Output Only] Type of the resource. Always compute#rolloutPlan\nfor rolloutPlans.", - "type": "string" - }, - "locationScope": { - "description": "The location scope of the rollout plan. If not specified, the location\nscope is considered as ZONAL.", - "enum": [ - "LOCATION_SCOPE_UNSPECIFIED", - "REGIONAL", - "ZONAL" - ], - "enumDescriptions": [ - "Unspecified value. Considered as ZONAL.", - "Regional scope.", - "Zonal scope." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.rolloutPlans.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "waves": { - "description": "Required. The waves included in this rollout plan.", - "items": { - "$ref": "RolloutPlanWave" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWave": { - "description": "A single wave in a rollout plan.", - "id": "RolloutPlanWave", - "properties": { - "displayName": { - "description": "Optional. The display name of this wave of the rollout plan.", - "type": "string" - }, - "number": { - "description": "Output only. The wave number.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "orchestrationOptions": { - "$ref": "RolloutPlanWaveOrchestrationOptions", - "description": "Optional. The orchestration options for this wave." - }, - "selectors": { - "description": "Required. The selectors for this wave. There is a logical AND between each selector\ndefined in a wave, so a resource must satisfy the criteria of *all* the\nspecified selectors to be in scope for the wave.", - "items": { - "$ref": "RolloutPlanWaveSelector" - }, - "type": "array" - }, - "validation": { - "$ref": "RolloutPlanWaveValidation", - "description": "Required. The validation to be performed at the end of this wave." - } - }, - "type": "object" - }, - "RolloutPlanWaveOrchestrationOptions": { - "description": "Options to control the pace of orchestration of a wave. These options are\nrequired only if the resource being rolled out follows the Orchestrated\npattern.", - "id": "RolloutPlanWaveOrchestrationOptions", - "properties": { - "delays": { - "description": "Optional. Delays, if any, to be added between batches of projects. We allow\nmultiple Delays to be specified, letting users set separate delays\nbetween batches of projects corresponding to different locations and\nbatches of projects corresponding to the same location.", - "items": { - "$ref": "RolloutPlanWaveOrchestrationOptionsDelay" - }, - "type": "array" - }, - "maxConcurrentLocations": { - "description": "Optional. Maximum number of locations to be orchestrated in parallel.", - "format": "int64", - "type": "string" - }, - "maxConcurrentResourcesPerLocation": { - "description": "Optional. Maximum number of resources to be orchestrated per location in\nparallel.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveOrchestrationOptionsDelay": { - "description": "Options to control the delay, if any, between batches of projects.", - "id": "RolloutPlanWaveOrchestrationOptionsDelay", - "properties": { - "delimiter": { - "description": "Optional. Controls whether the delay should only be added between batches of\nprojects corresponding to different locations, or also between\nbatches of projects corresponding to the same location.\n\nMust be set to DELIMITER_UNSPECIFIED if no delay is to be added.", - "enum": [ - "DELIMITER_BATCH", - "DELIMITER_LOCATION", - "DELIMITER_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delay will also be added between batches of projects\ncorresponding to the same location.", - "The delay will only be added between batches of projects\ncorresponding to different locations.", - "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." - ], - "type": "string" - }, - "duration": { - "description": "Optional. The duration of the delay, if any, to be added between batches of\nprojects. A zero duration corresponds to no delay.", - "format": "google-duration", - "type": "string" - }, - "type": { - "description": "Optional. Controls whether the specified duration is to be added at the end of\neach batch, or if the total processing time for each batch will be\npadded if needed to meet the specified duration.\n\nMust be set to TYPE_UNSPECIFIED if no delay is to be added.", - "enum": [ - "TYPE_MINIMUM", - "TYPE_OFFSET", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The total processing time for each batch of projects will be padded\nif needed to meet the specified delay duration.", - "The specified delay will directly be added after each batch of\nprojects as specified by the delimiter.", - "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." - ], - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveSelector": { - "description": "A selector which specifies what resource(s) are included in a given wave.", - "id": "RolloutPlanWaveSelector", - "properties": { - "locationSelector": { - "$ref": "RolloutPlanWaveSelectorLocationSelector", - "description": "Optional. Roll out to resources by Cloud locations." - }, - "resourceHierarchySelector": { - "$ref": "RolloutPlanWaveSelectorResourceHierarchySelector", - "description": "Optional. Roll out to resources by Cloud Resource Manager resource hierarchy." - } - }, - "type": "object" - }, - "RolloutPlanWaveSelectorLocationSelector": { - "description": "Roll out to resources by location.", - "id": "RolloutPlanWaveSelectorLocationSelector", - "properties": { - "includedLocations": { - "description": "Optional. Example: \"us-central1-a\"", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWaveSelectorResourceHierarchySelector": { - "description": "Roll out to resources by Cloud Resource Manager resource hierarchy\nnodes such as projects, folders, orgs.", - "id": "RolloutPlanWaveSelectorResourceHierarchySelector", - "properties": { - "includedFolders": { - "description": "Optional. Format: \"folders/{folder_id}\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedOrganizations": { - "description": "Optional. Format: \"organizations/{organization_id}\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedProjects": { - "description": "Optional. Format: \"projects/{project_id}\"", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWaveValidation": { - "description": "The validation to be performed before progressing to the next wave.", - "id": "RolloutPlanWaveValidation", - "properties": { - "timeBasedValidationMetadata": { - "$ref": "RolloutPlanWaveValidationTimeBasedValidationMetadata", - "description": "Optional. Metadata required if type = \"time\"." - }, - "type": { - "description": "Required. The type of the validation. If a type of validation is associated with\na metadata object, the appropriate metadata field mapping to the\nvalidation type must be provided in the validation message. Possible\nvalues are in quotes below alongside an explanation:\n \"manual\": The system waits for an end-user approval API before\n progressing to the next wave.\n \"time\": The system waits for a user specified duration before\n progressing to the next wave. TimeBasedValidation must be provided.", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveValidationTimeBasedValidationMetadata": { - "description": "Metadata required if type = \"time\".", - "id": "RolloutPlanWaveValidationTimeBasedValidationMetadata", - "properties": { - "waitDuration": { - "description": "Optional. The duration that the system waits in between waves. This wait starts\nafter all changes in the wave are rolled out.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlansListResponse": { - "description": "Contains a list of RolloutPlan resources.", - "id": "RolloutPlansListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of RolloutPlan resources.", - "items": { - "$ref": "RolloutPlan" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RolloutPolicy": { - "description": "A rollout policy configuration.", - "id": "RolloutPolicy", - "properties": { - "defaultRolloutTime": { - "description": "An optional RFC3339 timestamp on or after which the update is\nconsidered rolled out to any zone that is not explicitly stated.", - "type": "string" - }, - "locationRolloutPolicies": { - "additionalProperties": { - "type": "string" - }, - "description": "Location based rollout policies to apply to the resource.\n\nCurrently only zone names are supported and must be represented\nas valid URLs, like: zones/us-central1-a.\n\nThe value expects an RFC3339 timestamp on or after which the update is\nconsidered rolled out to the specified location.", - "type": "object" - } - }, - "type": "object" - }, - "RolloutRolloutEntity": { - "description": "Specifications of the resource to roll out.", - "id": "RolloutRolloutEntity", - "properties": { - "orchestratedEntity": { - "$ref": "RolloutRolloutEntityOrchestratedEntity", - "description": "Optional. Entity details for products using the Orchestrated Integration model." - } - }, - "type": "object" - }, - "RolloutRolloutEntityOrchestratedEntity": { - "description": "This message is used if the resource type follows the Orchestrated\nintegration model with ProgressiveRollout.", - "id": "RolloutRolloutEntityOrchestratedEntity", - "properties": { - "conflictBehavior": { - "description": "Required. Specifies the behavior of the Rollout if an out of band update is\ndetected in a project during a Rollout. It can be one of the following\nvalues:\n1) overwrite : Overwrite the local value with the rollout value.\n2) no_overwrite : Do not overwrite the local value with the rollout\nvalue.", - "type": "string" - }, - "orchestrationAction": { - "description": "Required. Orchestration action during the Rollout. It can be one of the following\nvalues:\n1) \"update\": Resources will be updated by the rollout.\n2) \"delete\": Resources will be deleted by the rollout.", - "type": "string" - }, - "orchestrationSource": { - "description": "Required. Fully qualified resource name of the resource which contains the source\nof truth of the configuration being rolled out across\nlocations/projects. For example, in the case of a global Rollout which\nis applied across regions, this contains the name of the global\nresource created by the user which contains a payload for a resource\nthat is orchestrated across regions. This follows the following format:\n//.googleapis.com/projects//locations/global//\ne.g.\n//osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1", - "type": "string" - } - }, - "type": "object" - }, - "RolloutWaveDetails": { - "description": "Additional metadata about the status of each wave provided by the server.", - "id": "RolloutWaveDetails", - "properties": { - "orchestratedWaveDetails": { - "$ref": "RolloutWaveDetailsOrchestratedWaveDetails", - "description": "Output only. Additional details of the wave for products using the Orchestrated\nIntegration model.", - "readOnly": true - }, - "waveDisplayName": { - "description": "Output only. Wave name.\nEx. wave1", - "readOnly": true, - "type": "string" - }, - "waveNumber": { - "description": "Output only. System generated number for the wave.", - "format": "int64", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RolloutWaveDetailsOrchestratedWaveDetails": { - "description": "Details of the wave for products using the Orchestrated integration\nmodel.", - "id": "RolloutWaveDetailsOrchestratedWaveDetails", - "properties": { - "completedResourcesCount": { - "description": "Output only. Resource completed so far.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "estimatedTotalResourcesCount": { - "description": "Output only. Estimated total count of resources.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "failedLocations": { - "description": "Output only. Locations that failed during orchestration, and ProgressiveRollout\nstopped retrying. There may be some successful resources rolled out in\nthe wave as the location may have failed later in the Rollout.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "failedResourcesCount": { - "description": "Output only. Resources failed.", - "format": "int64", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RolloutsListResponse": { - "id": "RolloutsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Rollout resources.", - "items": { - "$ref": "Rollout" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Route": { - "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific\ndestination. This destination can be inside or outside the VPC network.\nFor more information, read theRoutes overview.", - "id": "Route", - "properties": { - "allowConflictingSubnetworks": { - "description": "Whether this route can conflict with existing subnetworks. Setting this to\ntrue allows this route to conflict with subnetworks that have already been\nconfigured on the corresponding network.", - "type": "boolean" - }, - "asPaths": { - "description": "[Output Only] AS path.", - "items": { - "$ref": "RouteAsPath" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "destRange": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "The destination range of outgoing packets that this route applies to. Both\nIPv4 and IPv6 are supported.\nMust specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291\nformat (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952\ncompressed format.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ilbRouteBehaviorOnUnhealthy": { - "description": "ILB route behavior when ILB is deemed unhealthy based on user specified\nthreshold on the Backend Service of the internal load balancing.", - "enum": [ - "DO_NOT_WITHDRAW_ROUTE_IF_ILB_UNHEALTHY", - "WITHDRAW_ROUTE_IF_ILB_UNHEALTHY" - ], - "enumDescriptions": [ - "Do not Withdraw route if the ILB is deemed unhealthy based on user\nspecified threshold on the Backend Service of the ILB. This is default\nbehavior for ilb as next hop route without IlbRouteBehavior.", - "Withdraw route if the ILB is deemed unhealthy based on user specified\nthreshold on the Backend Service of the internal load balancing.\n\nCurrently the withdrawn route will be reinserted when the backends are\nrestored to healthy. If you wish to prevent the re-insertion of the route\nand trigger the fall-back at your discretion, override the health result\nfrom the backends to signal as healthy only when ready to fallback." - ], - "type": "string" - }, - "kind": { - "default": "compute#route", - "description": "[Output Only] Type of this resource. Always compute#routes for\nRoute resources.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all following characters (except for the last\ncharacter) must be a dash, lowercase letter, or digit. The last character\nmust be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "Fully-qualified URL of the network that this route applies to.", - "type": "string" - }, - "nextHopGateway": { - "description": "The URL to a gateway that should handle matching packets.\nYou can only specify the internet gateway using a full or\npartial valid URL: projects/project/global/gateways/default-internet-gateway", - "type": "string" - }, - "nextHopHub": { - "description": "[Output Only] The full resource name of the Network Connectivity Center hub\nthat will handle matching packets.", - "type": "string" - }, - "nextHopIlb": { - "description": "The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL that should handle matching\npackets or the IP address of the forwarding Rule.\nFor example, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n - regions/region/forwardingRules/forwardingRule\n\n\nIf an IP address is provided, must specify an IPv4 address in dot-decimal\nnotation or an IPv6 address in RFC 4291 format. For example, the following\nare all valid IP addresses:\n \n \n - 10.128.0.56\n - 2001:db8::2d9:51:0:0\n - 2001:db8:0:0:2d9:51:0:0\n\n\nIPv6 addresses will be displayed using RFC 5952 compressed format (e.g.\n2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", - "type": "string" - }, - "nextHopInstance": { - "description": "The URL to an instance that should handle matching packets. You can specify\nthis as a full or partial URL.\nFor example: \nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/", - "type": "string" - }, - "nextHopInterRegionCost": { - "description": "[Output only] Internal fixed region-to-region cost that Google Cloud\ncalculates based on factors such as network performance, distance, and\navailable bandwidth between regions.", - "format": "uint32", - "type": "integer" - }, - "nextHopInterconnectAttachment": { - "description": "[Output Only] The URL to an InterconnectAttachment which is the next hop\nfor the route.\nThis field will only be populated for dynamic routes generated by\nCloud Router with a linked interconnectAttachment or the static route\ngenerated by each L2 Interconnect Attachment.", - "type": "string" - }, - "nextHopIp": { - "description": "The network IP address of an instance that should handle matching packets.\nBoth IPv6 address and IPv4 addresses are supported.\nMust specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or\nan IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or\n2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952\ncompressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an\nIPv4-mapped IPv6 address.", - "type": "string" - }, - "nextHopMed": { - "description": "[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates\nthe desirability of a particular route in a network.", - "format": "uint32", - "type": "integer" - }, - "nextHopNetwork": { - "description": "The URL of the local network if it should handle matching packets.", - "type": "string" - }, - "nextHopOrigin": { - "description": "[Output Only] Indicates the origin of the route. Can be IGP\n(Interior Gateway Protocol), EGP (Exterior Gateway Protocol),\nor INCOMPLETE.", - "enum": [ - "EGP", - "IGP", - "INCOMPLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "nextHopPeering": { - "description": "[Output Only] The network peering name that should handle matching packets,\nwhich should conform to RFC1035.", - "type": "string" - }, - "nextHopVpnTunnel": { - "description": "The URL to a VpnTunnel that should handle matching packets.", - "type": "string" - }, - "params": { - "$ref": "RouteParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "priority": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "The priority of this route. Priority is used to break ties in cases\nwhere there is more than one matching route of equal prefix length. In\ncases where multiple routes have equal prefix length, the one with the\nlowest-numbered priority value wins. The default value is `1000`. The\npriority value must be from `0` to `65535`, inclusive.", - "format": "uint32", - "type": "integer" - }, - "routeStatus": { - "description": "[Output only] The status of the route. This status only applies to\ndynamic routes learned by Cloud Routers. This status is not applicable\nto static routes.", - "enum": [ - "ACTIVE", - "DROPPED", - "INACTIVE", - "PENDING" - ], - "enumDescriptions": [ - "This route is processed and active.", - "The route is dropped due to the VPC exceeding the dynamic route limit.\n For dynamic route limit, please refer to the\nLearned route example", - "This route is processed but inactive due to failure from the backend. The\nbackend may have rejected the route", - "This route is being processed internally. The status will change once\nprocessed." - ], - "type": "string" - }, - "routeType": { - "description": "[Output Only] The type of this route, which can be one of the following\nvalues:\n- 'TRANSIT' for a transit route that this router learned from\nanother Cloud Router and will readvertise to one of its BGP peers \n- 'SUBNET' for a route from a subnet of the VPC \n- 'BGP' for a route learned from a BGP peer of this router \n- 'STATIC' for a static route", - "enum": [ - "BGP", - "STATIC", - "SUBNET", - "TRANSIT" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "tags": { - "description": "A list of instance tags to which this route applies.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warnings": { - "description": "[Output Only] If potential misconfigurations are detected for this\nroute, this field will be populated with warning messages.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouteAsPath": { - "id": "RouteAsPath", - "properties": { - "asLists": { - "description": "[Output Only] The AS numbers of the AS Path.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "pathSegmentType": { - "description": "[Output Only] The type of the AS Path, which can be one of the following\nvalues: \n- 'AS_SET': unordered set of autonomous systems that the route\nin has traversed \n- 'AS_SEQUENCE': ordered set of autonomous\nsystems that the route has traversed \n- 'AS_CONFED_SEQUENCE':\nordered set of Member Autonomous Systems in the local confederation that\nthe route has traversed \n- 'AS_CONFED_SET': unordered set of\nMember Autonomous Systems in the local confederation that the route has\ntraversed", - "enum": [ - "AS_CONFED_SEQUENCE", - "AS_CONFED_SET", - "AS_SEQUENCE", - "AS_SET" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RouteList": { - "description": "Contains a list of Route resources.", - "id": "RouteList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Route resources.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "kind": { - "default": "compute#routeList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouteParams": { - "description": "Additional route parameters.", - "id": "RouteParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "RoutePolicy": { - "id": "RoutePolicy", - "properties": { - "description": { - "description": "An optional description of route policy.", - "type": "string" - }, - "fingerprint": { - "description": "A fingerprint for the Route Policy being applied to this Router, which is\nessentially a hash of the Route Policy used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes\nafter every request to modify or update Route Policy. You must always\nprovide an up-to-date fingerprint hash in order to update or change\nlabels.\n\nTo see the latest fingerprint, make a getRoutePolicy() request\nto retrieve a Route Policy.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "Route Policy name, which must be a resource ID segment and unique\nwithin all the router's Route Policies. Name should conform to RFC1035.", - "type": "string" - }, - "terms": { - "description": "List of terms (the order in the list is not important, they are evaluated\nin order of priority). Order of policies is not retained and might change\nwhen getting policy later.", - "items": { - "$ref": "RoutePolicyPolicyTerm" - }, - "type": "array" - }, - "type": { - "enum": [ - "ROUTE_POLICY_TYPE_EXPORT", - "ROUTE_POLICY_TYPE_IMPORT" - ], - "enumDescriptions": [ - "The Route Policy is an Export Policy.", - "The Route Policy is an Import Policy." - ], - "type": "string" - } - }, - "type": "object" - }, - "RoutePolicyPolicyTerm": { - "id": "RoutePolicyPolicyTerm", - "properties": { - "actions": { - "description": "CEL expressions to evaluate to modify a route when this term matches.", - "items": { - "$ref": "Expr" - }, - "type": "array" - }, - "match": { - "$ref": "Expr", - "description": "CEL expression evaluated against a route to determine if this term\napplies. When not set, the term applies to all\nroutes." - }, - "priority": { - "description": "The evaluation priority for this term, which must be between 0\n(inclusive) and 2^31 (exclusive), and unique within the list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Router": { - "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read theCloud\nRouter overview.", - "id": "Router", - "properties": { - "bgp": { - "$ref": "RouterBgp", - "description": "BGP information specific to this router." - }, - "bgpPeers": { - "description": "BGP information that must be configured into the routing stack to\nestablish BGP peering. This information must specify the peer ASN and\neither the interface name, IP address, or peer IP address. Please refer toRFC4273.", - "items": { - "$ref": "RouterBgpPeer" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "encryptedInterconnectRouter": { - "description": "Indicates if a router is dedicated for use with encrypted VLAN\nattachments (interconnectAttachments).", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interfaces": { - "description": "Router interfaces.\nTo create a BGP peer that uses a router interface,\nthe interface must have one of the following fields specified:\n \n - linkedVpnTunnel\n - linkedInterconnectAttachment\n - subnetwork\n\n\nYou can create a router interface without any of these fields specified.\nHowever, you cannot create a BGP peer that uses that interface.", - "items": { - "$ref": "RouterInterface" - }, - "type": "array" - }, - "kind": { - "default": "compute#router", - "description": "[Output Only] Type of resource. Always compute#router for\nrouters.", - "type": "string" - }, - "md5AuthenticationKeys": { - "description": "Keys used for MD5 authentication.", - "items": { - "$ref": "RouterMd5AuthenticationKey" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nats": { - "description": "A list of NAT services created in this router.", - "items": { - "$ref": "RouterNat" - }, - "type": "array" - }, - "nccGateway": { - "description": "URI of the ncc_gateway to which this router associated.", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.routers.insert", - "compute.routers.update" - ] - }, - "description": "URI of the network to which this router belongs.", - "type": "string" - }, - "params": { - "$ref": "RouterParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URI of the region where the router resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "RouterAdvertisedIpRange": { - "description": "Description-tagged IP ranges for the router to advertise.", - "id": "RouterAdvertisedIpRange", - "properties": { - "description": { - "description": "User-specified description for the IP range.", - "type": "string" - }, - "range": { - "description": "The IP range to advertise. The value must be a CIDR-formatted string.", - "type": "string" - } - }, - "type": "object" - }, - "RouterAggregatedList": { - "description": "Contains a list of routers.", - "id": "RouterAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "RoutersScopedList", - "description": "Name of the scope containing this set of routers." - }, - "description": "A list of Router resources.", - "type": "object" - }, - "kind": { - "default": "compute#routerAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouterBgp": { - "id": "RouterBgp", - "properties": { - "advertiseMode": { - "description": "User-specified flag to indicate which mode to use for advertisement.\nThe options are DEFAULT or CUSTOM.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\nis advertised to all peers of the router.\nThese groups will be advertised in addition to any specified prefixes.\nLeave this field blank to advertise no custom groups.", - "items": { - "enum": [ - "ALL_PEER_VPC_SUBNETS", - "ALL_SUBNETS", - "ALL_VPC_SUBNETS" - ], - "enumDescriptions": [ - "Advertise peer subnets of the router's VPC.", - "Advertise all available subnets (including peer VPC subnets).", - "Advertise the router's own VPC subnets." - ], - "type": "string" - }, - "type": "array" - }, - "advertisedIpRanges": { - "description": "User-specified list of individual IP ranges to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\nis advertised to all peers of the router.\nThese IP ranges will be advertised in addition to any specified groups.\nLeave this field blank to advertise no custom IP ranges.", - "items": { - "$ref": "RouterAdvertisedIpRange" - }, - "type": "array" - }, - "asn": { - "description": "Local BGP Autonomous System Number (ASN).\nMust be anRFC6996 private ASN, either 16-bit or 32-bit. The\nvalue will be fixed for this router resource. All VPN tunnels that link\nto this router will have the same local ASN.", - "format": "uint32", - "type": "integer" - }, - "identifierRange": { - "description": "Explicitly specifies a range of valid BGP Identifiers for this Router. It\nis provided as a link-local IPv4 range (from 169.254.0.0/16), of size at\nleast /30, even if the BGP sessions are over IPv6. It must not overlap\nwith any IPv4 BGP session ranges.\n\n\nOther vendors commonly call this \"router ID\".", - "type": "string" - }, - "keepaliveInterval": { - "description": "The interval in seconds between BGP keepalive messages that are\nsent to the peer.\n\n\nHold time is three times the interval at which keepalive messages are\nsent, and the hold time is the maximum number of seconds allowed to\nelapse between successive keepalive messages that BGP receives from a\npeer.\n\n\nBGP will use the smaller of either the local hold time value or the\npeer's hold time value as the hold time for the BGP connection between\nthe two peers.\n\n\nIf set, this value must be between 20 and 60. The default is 20.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterBgpPeer": { - "id": "RouterBgpPeer", - "properties": { - "advertiseMode": { - "description": "User-specified flag to indicate which mode to use for advertisement.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode,\nwhich currently supports the following option:\n \n - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This\n excludes any routes learned for subnets that use\n VPC Network Peering.\n\n\nNote that this field can only be populated if advertise_mode is CUSTOM\nand overrides the list defined for the router (in the \"bgp\" message).\nThese groups are advertised in addition to any specified prefixes.\nLeave this field blank to advertise no custom groups.", - "items": { - "enum": [ - "ALL_PEER_VPC_SUBNETS", - "ALL_SUBNETS", - "ALL_VPC_SUBNETS" - ], - "enumDescriptions": [ - "Advertise peer subnets of the router's VPC.", - "Advertise all available subnets (including peer VPC subnets).", - "Advertise the router's own VPC subnets." - ], - "type": "string" - }, - "type": "array" - }, - "advertisedIpRanges": { - "description": "User-specified list of individual IP ranges to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\noverrides the list defined for the router (in the \"bgp\" message).\nThese IP ranges are advertised in addition to any specified groups.\nLeave this field blank to advertise no custom IP ranges.", - "items": { - "$ref": "RouterAdvertisedIpRange" - }, - "type": "array" - }, - "advertisedRoutePriority": { - "description": "The priority of routes advertised to this BGP peer. Where there is more\nthan one matching route of maximum length, the routes with the lowest\npriority value win.", - "format": "uint32", - "type": "integer" - }, - "bfd": { - "$ref": "RouterBgpPeerBfd", - "description": "BFD configuration for the BGP peering." - }, - "customLearnedIpRanges": { - "description": "A list of user-defined custom learned route IP address ranges for a BGP\nsession.", - "items": { - "$ref": "RouterBgpPeerCustomLearnedIpRange" - }, - "type": "array" - }, - "customLearnedRoutePriority": { - "description": "The user-defined custom learned route priority for a BGP session. This\nvalue is applied to all custom learned route ranges for the session.\nYou can choose a value from `0` to `65335`. If you don't provide a\nvalue, Google Cloud assigns a priority of `100` to the ranges.", - "format": "int32", - "type": "integer" - }, - "enable": { - "description": "The status of the BGP peer connection.\n\n\nIf set to FALSE, any active session with the peer is terminated and\nall associated routing information is removed. If set to TRUE, the\npeer connection can be established with routing information. The default\nis TRUE.", - "enum": [ - "FALSE", - "TRUE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "enableIpv4": { - "description": "Enable IPv4 traffic over BGP Peer. It is enabled by default if\nthe peerIpAddress is version 4.", - "type": "boolean" - }, - "enableIpv6": { - "description": "Enable IPv6 traffic over BGP Peer. It is enabled by default if the\npeerIpAddress is version 6.", - "type": "boolean" - }, - "exportPolicies": { - "description": "List of export policies applied to this peer, in the order they must be\nevaluated. The name must correspond to an existing policy that has\nROUTE_POLICY_TYPE_EXPORT type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "importPolicies": { - "description": "List of import policies applied to this peer, in the order they must be\nevaluated. The name must correspond to an existing policy that has\nROUTE_POLICY_TYPE_IMPORT type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interfaceName": { - "description": "Name of the interface the BGP peer is associated with.", - "type": "string" - }, - "ipAddress": { - "description": "IP address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "ipv4NexthopAddress": { - "description": "IPv4 address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "ipv6NexthopAddress": { - "description": "IPv6 address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "linkedCustomHardware": { - "description": "The linked custom hardware resource.\nThe URI of the custom hardware link attachment\nis where you will establish the BGP session from the Cloud Router.\nThis link attachment must reside in the same subnetwork as the associated\nrouter interface.", - "type": "string" - }, - "managementType": { - "description": "[Output Only] The resource that configures and manages this BGP peer.\n \n - MANAGED_BY_USER is the default value and can be managed by you\n or other users\n - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed\n by Cloud Interconnect, specifically by an InterconnectAttachment of type\n PARTNER. Google automatically creates, updates, and deletes this type of\n BGP peer when the PARTNER InterconnectAttachment is created, updated,\n or deleted.", - "enum": [ - "MANAGED_BY_ATTACHMENT", - "MANAGED_BY_USER" - ], - "enumDescriptions": [ - "The BGP peer is automatically created for PARTNER type\nInterconnectAttachment; Google will automatically create/delete\nthis BGP peer when the PARTNER InterconnectAttachment is\ncreated/deleted, and Google will update the ipAddress and\npeerIpAddress when the PARTNER InterconnectAttachment is provisioned.\nThis type of BGP peer cannot be created or deleted, but can be\nmodified for all fields except for name, ipAddress and peerIpAddress.", - "Default value, the BGP peer is manually created and managed by user." - ], - "type": "string" - }, - "md5AuthenticationKeyName": { - "description": "Present if MD5 authentication is enabled for the peering. Must be the\nname of one of the entries in the Router.md5_authentication_keys. The\nfield must comply with RFC1035.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of this BGP peer.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "peerAsn": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Peer BGP Autonomous System Number (ASN). Each BGP interface may use\na different value.", - "format": "uint32", - "type": "integer" - }, - "peerIpAddress": { - "description": "IP address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "peerIpv4NexthopAddress": { - "description": "IPv4 address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "peerIpv6NexthopAddress": { - "description": "IPv6 address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "routerApplianceInstance": { - "description": "URI of the VM instance that is used as third-party router\nappliances such as Next Gen Firewalls, Virtual Routers, or Router\nAppliances. The VM instance must be located in zones contained in the\nsame region as this Cloud Router.\nThe VM instance is the peer side of the BGP session.", - "type": "string" - } - }, - "type": "object" - }, - "RouterBgpPeerBfd": { - "id": "RouterBgpPeerBfd", - "properties": { - "minReceiveInterval": { - "description": "The minimum interval, in milliseconds, between BFD control packets\nreceived from the peer router. The actual value is negotiated between\nthe two routers and is equal to the greater of this value and the\ntransmit interval of the other router.\n\n\nIf set, this value must be between 1000 and 30000.\n\n\nThe default is 1000.", - "format": "uint32", - "type": "integer" - }, - "minTransmitInterval": { - "description": "The minimum interval, in milliseconds, between BFD control packets\ntransmitted to the peer router. The actual value is negotiated between\nthe two routers and is equal to the greater of this value and the\ncorresponding receive interval of the other router.\n\n\nIf set, this value must be between 1000 and 30000.\n\n\nThe default is 1000.", - "format": "uint32", - "type": "integer" - }, - "mode": { - "description": "The BFD session initialization mode for this BGP peer.\nIf set to ACTIVE, the Cloud Router will initiate the BFD session for\nthis BGP peer. If set to PASSIVE, the Cloud Router will wait for the\npeer router to initiate the BFD session for this BGP peer. If set to\nDISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.", - "enum": [ - "ACTIVE", - "DISABLED", - "PASSIVE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "multiplier": { - "description": "The number of consecutive BFD packets that must be missed\nbefore BFD declares that a peer is unavailable.\n\n\nIf set, the value must be a value between 5 and 16.\n\n\nThe default is 5.", - "format": "uint32", - "type": "integer" - }, - "packetMode": { - "description": "The BFD packet mode for this BGP peer.\nIf set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer.\nIn this mode, if the peer router also has BFD echo mode enabled, BFD\necho packets will be sent to the other router. If the peer router does\nnot have BFD echo mode enabled, only control packets will be sent. If\nset to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If\nthis router and the peer router have a multihop connection, this should\nbe set to CONTROL_ONLY as BFD echo mode is only supported on singlehop\nconnections. The default is CONTROL_AND_ECHO.", - "enum": [ - "CONTROL_AND_ECHO", - "CONTROL_ONLY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "sessionInitializationMode": { - "description": "The BFD session initialization mode for this BGP peer.\n\n\nIf set to ACTIVE, the Cloud Router will initiate the BFD session for\nthis BGP peer. If set to PASSIVE, the Cloud Router will wait for the\npeer router to initiate the BFD session for this BGP peer. If set to\nDISABLED, BFD is disabled for this BGP peer. The default is DISABLED.", - "enum": [ - "ACTIVE", - "DISABLED", - "PASSIVE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "slowTimerInterval": { - "description": "The minimum interval, in milliseconds, between BFD control packets\ntransmitted to and received from the peer router when BFD echo mode is\nenabled on both routers. The actual transmit and receive intervals are\nnegotiated between the two routers and are equal to the greater of this\nvalue and the corresponding interval on the other router.\nIf set, this value must be between 1000 and 30000.\nThe default is 5000.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterBgpPeerCustomLearnedIpRange": { - "id": "RouterBgpPeerCustomLearnedIpRange", - "properties": { - "range": { - "description": "The custom learned route IP address range. Must be a valid\nCIDR-formatted prefix. If an IP address is provided without a subnet\nmask, it is interpreted as, for IPv4, a `/32` singular IP address\nrange, and, for IPv6, `/128`.", - "type": "string" - } - }, - "type": "object" - }, - "RouterInterface": { - "id": "RouterInterface", - "properties": { - "ipRange": { - "description": "IP address and range of the interface.\n \n - For Internet Protocol version 4 (IPv4), the IP range must be in theRFC3927 link-local IP address space. The value must\n be a CIDR-formatted string, for example, 169.254.0.1/30.\n Note: Do not truncate the IP address, as it represents the IP address of\n the interface. \n - For Internet Protocol version 6 (IPv6), the value\n must be a unique local address (ULA) range from fdff:1::/64\n with a mask length of 126 or less. This value should be a CIDR-formatted\n string, for example, fdff:1::1/112. Within the router's\n VPC, this IPv6 prefix will be reserved exclusively for this connection\n and cannot be used for any other purpose.", - "type": "string" - }, - "ipVersion": { - "description": "IP version of this interface.", - "enum": [ - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "linkedInterconnectAttachment": { - "description": "URI of the linked Interconnect attachment. It must be in the same region\nas the router. Each interface can have one linked resource, which can be\na VPN tunnel, an Interconnect attachment, or a subnetwork.", - "type": "string" - }, - "linkedVpnTunnel": { - "description": "URI of the linked VPN tunnel, which must be in the same region as the\nrouter. Each interface can have one linked resource, which can be\na VPN tunnel, an Interconnect attachment, or a subnetwork.", - "type": "string" - }, - "managementType": { - "description": "[Output Only] The resource that configures and manages this interface.\n \n - MANAGED_BY_USER is the default value and can be managed directly\n by users.\n - MANAGED_BY_ATTACHMENT is an interface that is configured and\n managed by Cloud Interconnect, specifically, by an InterconnectAttachment\n of type PARTNER. Google automatically creates, updates, and deletes\n this type of interface when the PARTNER InterconnectAttachment is\n created, updated, or deleted.", - "enum": [ - "MANAGED_BY_ATTACHMENT", - "MANAGED_BY_USER" - ], - "enumDescriptions": [ - "The interface is automatically created for PARTNER type\nInterconnectAttachment, Google will automatically create/update/delete\nthis interface when the PARTNER InterconnectAttachment is\ncreated/provisioned/deleted.\nThis type of interface cannot be manually managed by user.", - "Default value, the interface is manually created and managed by user." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of this interface entry.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "privateIpAddress": { - "description": "The regional private internal IP address that is used to establish\nBGP sessions to a VM instance acting as a third-party\nRouter Appliance, such as a Next Gen Firewall, a Virtual Router, or\nan SD-WAN VM.", - "type": "string" - }, - "redundantInterface": { - "description": "Name of the interface that will be redundant with the current interface\nyou are creating. The redundantInterface must belong to the same Cloud\nRouter as the interface here. To establish the BGP session to a Router\nAppliance VM, you must create two BGP peers. The two BGP peers must be\nattached to two separate interfaces that are redundant with each other.\nThe redundant_interface must be 1-63 characters long, and comply withRFC1035. Specifically, the redundant_interface must\nbe 1-63 characters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "subnetwork": { - "description": "The URI of the subnetwork resource that this interface belongs to, which\nmust be in the same region as the Cloud Router.\nWhen you establish a BGP session to a VM instance using this interface,\nthe VM instance must belong to the same subnetwork as the subnetwork\nspecified here.", - "type": "string" - } - }, - "type": "object" - }, - "RouterList": { - "description": "Contains a list of Router resources.", - "id": "RouterList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Router resources.", - "items": { - "$ref": "Router" - }, - "type": "array" - }, - "kind": { - "default": "compute#routerList", - "description": "[Output Only] Type of resource. Always compute#router for\nrouters.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouterMd5AuthenticationKey": { - "id": "RouterMd5AuthenticationKey", - "properties": { - "key": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "[Input only] Value of the key.\n\nFor patch and update calls, it can be skipped to\ncopy the value from the previous configuration. This is allowed if the\nkey with the same name existed before the operation. Maximum length is 80\ncharacters. Can only contain printable ASCII characters.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert", - "compute.routers.update" - ] - }, - "description": "Name used to identify the key.\n\nMust be unique within a router. Must be referenced by exactly\none bgpPeer. Must comply withRFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "RouterNat": { - "description": "Represents a Nat resource. It enables the VMs within the specified\nsubnetworks to access Internet without external IP addresses. It specifies\na list of subnetworks (and the ranges within) that want to use NAT.\nCustomers can also provide the external IPs that would be used for NAT. GCP\nwould auto-allocate ephemeral IPs if no external IPs are provided.", - "id": "RouterNat", - "properties": { - "autoNetworkTier": { - "description": "The network tier to use when automatically reserving NAT IP addresses.\nMust be one of: PREMIUM, STANDARD.\nIf not specified, then the current \nproject-level default tier is used.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "SELECT", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Price competitive network tier, support for all networking products.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "drainNatIps": { - "description": "A list of URLs of the IP resources to be drained. These IPs\nmust be valid static external IPs that have been assigned to the NAT.\nThese IPs should be used for updating/patching a NAT only.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enableDynamicPortAllocation": { - "description": "Enable Dynamic Port Allocation.\n\n\nIf not specified, it is disabled by default.\n\n\nIf set to true,\n \n - Dynamic Port Allocation will be enabled on this NAT\n config.\n - enableEndpointIndependentMapping cannot be set to true.\n - If minPorts is set, minPortsPerVm must be set to a\n power of two greater than or equal to 32. If minPortsPerVm is not set, a\n minimum of 32 ports will be allocated to a VM from this NAT\n config.", - "type": "boolean" - }, - "enableEndpointIndependentMapping": { - "type": "boolean" - }, - "endpointTypes": { - "description": "List of NAT-ted endpoint types supported by the Nat Gateway. If the list\nis empty, then it will be equivalent to include ENDPOINT_TYPE_VM", - "items": { - "enum": [ - "ENDPOINT_TYPE_MANAGED_PROXY_LB", - "ENDPOINT_TYPE_SWG", - "ENDPOINT_TYPE_VM" - ], - "enumDescriptions": [ - "This is used for regional Application Load Balancers (internal and\nexternal) and regional proxy Network Load Balancers (internal and\nexternal) endpoints.", - "This is used for Secure Web Gateway endpoints.", - "This is the default." - ], - "type": "string" - }, - "type": "array" - }, - "icmpIdleTimeoutSec": { - "description": "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - }, - "logConfig": { - "$ref": "RouterNatLogConfig", - "description": "Configure logging on this NAT." - }, - "maxPortsPerVm": { - "description": "Maximum number of ports allocated to a VM from this NAT config when\nDynamic Port Allocation is enabled.\n\n\nIf Dynamic Port Allocation is not enabled, this field has no effect.\n\n\nIf Dynamic Port Allocation is enabled, and this field is set, it must be\nset to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm\nis not set.\n\n\nIf Dynamic Port Allocation is enabled and this field is not set,\na maximum of 65536 ports will be allocated to a VM from this NAT\nconfig.", - "format": "int32", - "type": "integer" - }, - "minPortsPerVm": { - "description": "Minimum number of ports allocated to a VM from this NAT config. If not\nset, a default number of ports is allocated to a VM. This is rounded\nup to the nearest power of 2. For example, if the value of this field is\n50, at least 64 ports are allocated to a VM.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this Nat service.\nThe name must be 1-63 characters long and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nat64Subnetworks": { - "description": "List of Subnetwork resources whose traffic should be translated by NAT64\nGateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is\nselected for the SubnetworkIpRangeToNat64Option above.", - "items": { - "$ref": "RouterNatSubnetworkToNat64" - }, - "type": "array" - }, - "natIpAllocateOption": { - "description": "Specify the NatIpAllocateOption, which can take one of the following\nvalues: \n \n - MANUAL_ONLY: Uses only Nat IP addresses provided by\n customers. When there are not enough specified Nat IPs, the Nat service\n fails for new VMs.\n - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers\n can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should\n be empty.", - "enum": [ - "AUTO_ONLY", - "MANUAL_ONLY" - ], - "enumDescriptions": [ - "Nat IPs are allocated by GCP; customers can not specify any Nat IPs.", - "Only use Nat IPs provided by customers. When specified Nat IPs are not\nenough then the Nat service fails for new VMs." - ], - "type": "string" - }, - "natIps": { - "description": "A list of URLs of the IP resources used for this Nat service. These IP\naddresses must be valid static external IP addresses assigned to the\nproject.", - "items": { - "type": "string" - }, - "type": "array" - }, - "rules": { - "description": "A list of rules associated with this NAT.", - "items": { - "$ref": "RouterNatRule" - }, - "type": "array" - }, - "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option, which can take one of the following values:\n \n - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every\n Subnetwork are allowed to Nat.\n - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges\n in every Subnetwork are allowed to Nat.\n - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat\n (specified in the field subnetwork below)\n\n\nThe default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED.\nNote that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there\nshould not be any other Router.Nat section in any Router for this network\nin this region.", - "enum": [ - "ALL_SUBNETWORKS_ALL_IP_RANGES", - "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", - "LIST_OF_SUBNETWORKS" - ], - "enumDescriptions": [ - "All the IP ranges in every Subnetwork are allowed to Nat.", - "All the primary IP ranges in every Subnetwork are allowed to Nat.", - "A list of Subnetworks are allowed to Nat (specified in the field\nsubnetwork below)" - ], - "type": "string" - }, - "sourceSubnetworkIpRangesToNat64": { - "description": "Specify the Nat option for NAT64, which can take one of the following\nvalues: \n \n - ALL_IPV6_SUBNETWORKS: All of the IP ranges in\n every Subnetwork are allowed to Nat.\n - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat\n (specified in the field nat64_subnetwork below)\n\n\nThe default is NAT64_OPTION_UNSPECIFIED.\nNote that if this field contains NAT64_ALL_V6_SUBNETWORKS no other\nRouter.Nat section in this region can also enable NAT64 for any\nSubnetworks in this network. Other Router.Nat sections can still be\npresent to enable NAT44 only.", - "enum": [ - "ALL_IPV6_SUBNETWORKS", - "LIST_OF_IPV6_SUBNETWORKS" - ], - "enumDescriptions": [ - "NAT64 is enabled for all the IPv6 subnet ranges.\nIn dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.", - "NAT64 is enabled for a list of IPv6 subnet ranges.\nIn dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.\nIf this option is used, the nat64_subnetworks field must be specified." - ], - "type": "string" - }, - "subnetworks": { - "description": "A list of Subnetwork resources whose traffic should be translated by NAT\nGateway. It is used only when LIST_OF_SUBNETWORKS is selected for the\nSubnetworkIpRangeToNatOption above.", - "items": { - "$ref": "RouterNatSubnetworkToNat" - }, - "type": "array" - }, - "tcpEstablishedIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP established connections. Defaults to 1200s\nif not set.", - "format": "int32", - "type": "integer" - }, - "tcpTimeWaitTimeoutSec": { - "description": "Timeout (in seconds) for TCP connections that are in TIME_WAIT state.\nDefaults to 120s if not set.", - "format": "int32", - "type": "integer" - }, - "tcpTransitoryIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP transitory connections. Defaults to 30s if\nnot set.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "Indicates whether this NAT is used for public or private IP\ntranslation. If unspecified, it defaults to PUBLIC.", - "enum": [ - "PRIVATE", - "PUBLIC" - ], - "enumDescriptions": [ - "NAT used for private IP translation.", - "NAT used for public IP translation.\nThis is the default." - ], - "type": "string" - }, - "udpIdleTimeoutSec": { - "description": "Timeout (in seconds) for UDP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterNatLogConfig": { - "description": "Configuration of logging on a NAT.", - "id": "RouterNatLogConfig", - "properties": { - "enable": { - "description": "Indicates whether or not to export logs. This is false by default.", - "type": "boolean" - }, - "filter": { - "description": "Specify the desired filtering of logs on this NAT. If unspecified,\nlogs are exported for all connections handled by this NAT.\nThis option can take one of the following values:\n \n - ERRORS_ONLY: Export logs only for connection failures.\n - TRANSLATIONS_ONLY: Export logs only for successful\n connections.\n - ALL: Export logs for all connections, successful and\n unsuccessful.", - "enum": [ - "ALL", - "ERRORS_ONLY", - "TRANSLATIONS_ONLY" - ], - "enumDescriptions": [ - "Export logs for all (successful and unsuccessful) connections.", - "Export logs for connection failures only.", - "Export logs for successful connections only." - ], - "type": "string" - } - }, - "type": "object" - }, - "RouterNatRule": { - "id": "RouterNatRule", - "properties": { - "action": { - "$ref": "RouterNatRuleAction", - "description": "The action to be enforced for traffic that matches this rule." - }, - "description": { - "description": "An optional description of this rule.", - "type": "string" - }, - "match": { - "description": "CEL expression that specifies the match condition that egress traffic\nfrom a VM is evaluated against. If it evaluates to true, the\ncorresponding `action` is enforced.\n\nThe following examples are valid match expressions for public NAT:\n\n`inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip,\n '2.2.0.0/16')`\n\n`destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'`\n\nThe following example is a valid match expression for private NAT:\n\n`nexthop.hub ==\n'//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`", - "type": "string" - }, - "ruleNumber": { - "description": "An integer uniquely identifying a rule in the list. The rule number\nmust be a positive value between 0 and 65000, and\nmust be unique among rules within a NAT.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterNatRuleAction": { - "id": "RouterNatRuleAction", - "properties": { - "sourceNatActiveIps": { - "description": "A list of URLs of the IP resources used for this NAT rule. These IP\naddresses must be valid static external IP addresses assigned to the\nproject.\nThis field is used for public NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatActiveRanges": { - "description": "A list of URLs of the subnetworks used as source ranges for this\nNAT Rule. These subnetworks must have purpose set to PRIVATE_NAT.\nThis field is used for private NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatDrainIps": { - "description": "A list of URLs of the IP resources to be drained. These IPs\nmust be valid static external IPs that have been assigned to the NAT.\nThese IPs should be used for updating/patching a NAT rule only.\nThis field is used for public NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatDrainRanges": { - "description": "A list of URLs of subnetworks representing source ranges to be\ndrained. This is only supported on patch/update, and these\nsubnetworks must have previously been used as active ranges in this\nNAT Rule.\nThis field is used for private NAT.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterNatSubnetworkToNat": { - "description": "Defines the IP ranges that want to use NAT for a subnetwork.", - "id": "RouterNatSubnetworkToNat", - "properties": { - "name": { - "description": "URL for the subnetwork resource that will use NAT.", - "type": "string" - }, - "secondaryIpRangeNames": { - "description": "A list of the secondary ranges of the Subnetwork that are allowed to\nuse NAT. This can be populated only if \"LIST_OF_SECONDARY_IP_RANGES\"\nis one of the values in source_ip_ranges_to_nat.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceIpRangesToNat": { - "description": "Specify the options for NAT ranges in the Subnetwork. All\noptions of a single value are valid except\nNAT_IP_RANGE_OPTION_UNSPECIFIED.\nThe only valid option with multiple values is: [\"PRIMARY_IP_RANGE\",\n\"LIST_OF_SECONDARY_IP_RANGES\"]\nDefault: [ALL_IP_RANGES]", - "items": { - "enum": [ - "ALL_IP_RANGES", - "LIST_OF_SECONDARY_IP_RANGES", - "PRIMARY_IP_RANGE" - ], - "enumDescriptions": [ - "The primary and all the secondary ranges are allowed to Nat.", - "A list of secondary ranges are allowed to Nat.", - "The primary range is allowed to Nat." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterNatSubnetworkToNat64": { - "description": "Specifies a subnetwork to enable NAT64.", - "id": "RouterNatSubnetworkToNat64", - "properties": { - "name": { - "description": "URL for the subnetwork resource that will use NAT64.", - "type": "string" - } - }, - "type": "object" - }, - "RouterParams": { - "description": "Additional router parameters.", - "id": "RouterParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nThe field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "RouterStatus": { - "id": "RouterStatus", - "properties": { - "bestRoutes": { - "description": "A list of the best dynamic routes for this Cloud Router's Virtual Private\nCloud (VPC) network in the same region as this Cloud Router.\n\nLists all of the best routes per prefix that are programmed into this\nregion's VPC data plane.\n\nWhen global dynamic routing mode is turned on in the VPC network, this list\ncan include cross-region dynamic routes from Cloud Routers in other\nregions.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bestRoutesForRouter": { - "description": "A list of the best BGP routes learned by this Cloud Router.\n\nIt is possible that routes listed might not be programmed into the data\nplane, if the Google Cloud control plane finds a more optimal route for a\nprefix than a route learned by this Cloud Router.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bgpPeerStatus": { - "items": { - "$ref": "RouterStatusBgpPeerStatus" - }, - "type": "array" - }, - "natStatus": { - "items": { - "$ref": "RouterStatusNatStatus" - }, - "type": "array" - }, - "nccGateway": { - "description": "URI of the ncc_gateway to which this router associated.", - "type": "string" - }, - "network": { - "description": "URI of the network to which this router belongs.", - "type": "string" - } - }, - "type": "object" - }, - "RouterStatusBgpPeerStatus": { - "id": "RouterStatusBgpPeerStatus", - "properties": { - "advertisedRoutes": { - "description": "Routes that were advertised to the remote BGP peer", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bfdStatus": { - "$ref": "BfdStatus" - }, - "enableIpv4": { - "description": "Enable IPv4 traffic over BGP Peer.\nIt is enabled by default if the peerIpAddress is version 4.", - "type": "boolean" - }, - "enableIpv6": { - "description": "Enable IPv6 traffic over BGP Peer.\nIt is enabled by default if the peerIpAddress is version 6.", - "type": "boolean" - }, - "ipAddress": { - "description": "IP address of the local BGP interface.", - "type": "string" - }, - "ipv4NexthopAddress": { - "description": "IPv4 address of the local BGP interface.", - "type": "string" - }, - "ipv6NexthopAddress": { - "description": "IPv6 address of the local BGP interface.", - "type": "string" - }, - "linkedCustomHardware": { - "description": "The URI of the linked custom hardware resource,\nCustomHardwareLinkAttachment. This CustomHardwareLinkAttachment resource\nis the one that will establish the BGP session from the Cloud Router.", - "type": "string" - }, - "linkedVpnTunnel": { - "description": "URL of the VPN tunnel that this BGP peer controls.", - "type": "string" - }, - "md5AuthEnabled": { - "description": "Informs whether MD5 authentication is enabled on this BGP peer.", - "type": "boolean" - }, - "name": { - "description": "Name of this BGP peer. Unique within the Routers resource.", - "type": "string" - }, - "numLearnedRoutes": { - "description": "Number of routes learned from the remote BGP Peer.", - "format": "uint32", - "type": "integer" - }, - "peerIpAddress": { - "description": "IP address of the remote BGP interface.", - "type": "string" - }, - "peerIpv4NexthopAddress": { - "description": "IPv4 address of the remote BGP interface.", - "type": "string" - }, - "peerIpv6NexthopAddress": { - "description": "IPv6 address of the remote BGP interface.", - "type": "string" - }, - "routerApplianceInstance": { - "description": "[Output only] URI of the VM instance that is used as third-party router\nappliances such as Next Gen Firewalls, Virtual Routers, or Router\nAppliances.\nThe VM instance is the peer side of the BGP session.", - "type": "string" - }, - "state": { - "description": "The state of the BGP session. For a list of possible values for this\nfield, seeBGP session states.", - "type": "string" - }, - "status": { - "description": "Status of the BGP peer: {UP, DOWN}", - "enum": [ - "DOWN", - "UNKNOWN", - "UP" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusReason": { - "description": "Indicates why particular status was returned.", - "enum": [ - "IPV4_PEER_ON_IPV6_ONLY_CONNECTION", - "IPV6_PEER_ON_IPV4_ONLY_CONNECTION", - "MD5_AUTH_INTERNAL_PROBLEM", - "STATUS_REASON_UNSPECIFIED" - ], - "enumDescriptions": [ - "BGP peer disabled because it requires IPv4 but the underlying\nconnection is IPv6-only.", - "BGP peer disabled because it requires IPv6 but the underlying\nconnection is IPv4-only.", - "Indicates internal problems with configuration of MD5 authentication.\nThis particular reason can only be returned when md5AuthEnabled is true\nand status is DOWN.", - "" - ], - "type": "string" - }, - "uptime": { - "description": "Time this session has been up.\nFormat:\n 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds", - "type": "string" - }, - "uptimeSeconds": { - "description": "Time this session has been up, in seconds.\nFormat:\n 145", - "type": "string" - } - }, - "type": "object" - }, - "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router.", - "id": "RouterStatusNatStatus", - "properties": { - "autoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT. Example: [\"1.1.1.1\", \"129.2.16.89\"]", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainAutoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainUserAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minExtraNatIpsNeeded": { - "description": "The number of extra IPs to allocate. This will be greater than 0 only if\nuser-specified IPs are NOT enough to allow all configured VMs to use NAT.\nThis value is meaningful only when auto-allocation of NAT IPs is *not*\nused.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this NAT.", - "type": "string" - }, - "numVmEndpointsWithNatMappings": { - "description": "Number of VM endpoints (i.e., Nics) that can use NAT.", - "format": "int32", - "type": "integer" - }, - "ruleStatus": { - "description": "Status of rules in this NAT.", - "items": { - "$ref": "RouterStatusNatStatusNatRuleStatus" - }, - "type": "array" - }, - "userAllocatedNatIpResources": { - "description": "A list of fully qualified URLs of reserved IP address resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "userAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT.\nThey will be raw IP strings like \"179.12.26.133\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterStatusNatStatusNatRuleStatus": { - "description": "Status of a NAT Rule contained in this NAT.", - "id": "RouterStatusNatStatusNatRuleStatus", - "properties": { - "activeNatIps": { - "description": "A list of active IPs for NAT.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainNatIps": { - "description": "A list of IPs for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minExtraIpsNeeded": { - "description": "The number of extra IPs to allocate. This will be greater than 0 only\nif the existing IPs in this NAT Rule are NOT enough to allow all\nconfigured VMs to use NAT.", - "format": "int32", - "type": "integer" - }, - "numVmEndpointsWithNatMappings": { - "description": "Number of VM endpoints (i.e., NICs) that have NAT Mappings from this\nNAT Rule.", - "format": "int32", - "type": "integer" - }, - "ruleNumber": { - "description": "Rule number of the rule.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterStatusResponse": { - "id": "RouterStatusResponse", - "properties": { - "kind": { - "default": "compute#routerStatusResponse", - "description": "Type of resource.", - "type": "string" - }, - "result": { - "$ref": "RouterStatus" - } - }, - "type": "object" - }, - "RoutersGetNamedSetResponse": { - "id": "RoutersGetNamedSetResponse", - "properties": { - "etag": { - "description": "end_interface: MixerGetResponseWithEtagBuilder", - "type": "string" - }, - "resource": { - "$ref": "NamedSet" - } - }, - "type": "object" - }, - "RoutersGetRoutePolicyResponse": { - "id": "RoutersGetRoutePolicyResponse", - "properties": { - "etag": { - "description": "end_interface: MixerGetResponseWithEtagBuilder", - "type": "string" - }, - "resource": { - "$ref": "RoutePolicy" - } - }, - "type": "object" - }, - "RoutersListBgpRoutes": { - "id": "RoutersListBgpRoutes", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#routersListBgpRoutes", - "description": "[Output Only] Type of resource. Alwayscompute#routersListBgpRoutes for lists of bgp routes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of bgp routes.", - "items": { - "$ref": "BgpRoute" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RoutersListNamedSets": { - "id": "RoutersListNamedSets", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#routersListNamedSets", - "description": "[Output Only] Type of resource. Alwayscompute#routersListNamedSets for lists of named sets.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of named sets.", - "items": { - "$ref": "NamedSet" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RoutersListRoutePolicies": { - "id": "RoutersListRoutePolicies", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#routersListRoutePolicies", - "description": "[Output Only] Type of resource. Alwayscompute#routersListRoutePolicies for lists of route policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of route policies.", - "items": { - "$ref": "RoutePolicy" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RoutersPreviewResponse": { - "id": "RoutersPreviewResponse", - "properties": { - "resource": { - "$ref": "Router", - "description": "Preview of given router." - } - }, - "type": "object" - }, - "RoutersScopedList": { - "id": "RoutersScopedList", - "properties": { - "routers": { - "description": "A list of routers contained in this scope.", - "items": { - "$ref": "Router" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of routers when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SSLHealthCheck": { - "id": "SSLHealthCheck", - "properties": { - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "request": { - "description": "Instructs the health check prober to send this exact ASCII string, up to\n1024 bytes in length, after establishing the TCP connection and SSL\nhandshake.", - "type": "string" - }, - "response": { - "description": "Creates a content-based SSL health check. In addition to establishing a\nTCP connection and the TLS handshake, you can configure the health check to\npass only when the backend sends this exact response ASCII string, up to\n1024 bytes in length. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", - "type": "string" - } - }, - "type": "object" - }, - "SavedAttachedDisk": { - "description": "DEPRECATED: Please use compute#savedDisk instead.\nAn instance-attached disk resource.", - "id": "SavedAttachedDisk", - "properties": { - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "boot": { - "description": "Indicates that this is a boot disk. The virtual machine will use the first\npartition of the disk for its root filesystem.", - "type": "boolean" - }, - "deviceName": { - "description": "Specifies the name of the disk attached to the source instance.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The encryption key for the disk." - }, - "diskSizeGb": { - "description": "The size of the disk in base-2 GB.", - "format": "int64", - "type": "string" - }, - "diskType": { - "description": "[Output Only] URL of the disk type resource. For example:projects/project/zones/zone/diskTypes/pd-standard or\npd-ssd", - "type": "string" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable only\nfor bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "index": { - "description": "Specifies zero-based index of the disk that is attached to the source\ninstance.", - "format": "int32", - "type": "integer" - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME.", - "enum": [ - "NVDIMM", - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#savedAttachedDisk", - "description": "[Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.", - "type": "string" - }, - "licenses": { - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mode": { - "description": "The mode in which this disk is attached to the source instance, eitherREAD_WRITE or READ_ONLY.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple virtual machines can use\na disk in read-only mode at a time.", - "*[Default]* Attaches this disk in read-write mode. Only one\nvirtual machine at a time can be attached to a disk in read-write mode." - ], - "type": "string" - }, - "source": { - "description": "Specifies a URL of the disk attached to the source instance.", - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] A size of the storage used by the disk's snapshot by this\nmachine image.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": { - "description": "Specifies the type of the attached disk, either SCRATCH orPERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SavedDisk": { - "description": "An instance-attached disk resource.", - "id": "SavedDisk", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the attached disk.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "kind": { - "default": "compute#savedDisk", - "description": "[Output Only] Type of the resource. Always compute#savedDisk\nfor attached disks.", - "type": "string" - }, - "sourceDisk": { - "description": "Specifies a URL of the disk attached to the source instance.", - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] Size of the individual disk snapshot used by this machine\nimage.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ScalingScheduleStatus": { - "id": "ScalingScheduleStatus", - "properties": { - "lastStartTime": { - "description": "[Output Only] The last time the scaling schedule became active.\nNote: this is a timestamp when a schedule actually became active, not when\nit was planned to do so.\nThe timestamp is in RFC3339\ntext format.", - "type": "string" - }, - "nextStartTime": { - "description": "[Output Only] The next time the scaling schedule is to become active.\nNote: this is a timestamp when a schedule is planned to run, but the actual\ntime might be slightly different.\nThe timestamp is in RFC3339\ntext format.", - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of a scaling schedule.", - "enum": [ - "ACTIVE", - "DISABLED", - "OBSOLETE", - "READY" - ], - "enumDescriptions": [ - "The current autoscaling recommendation is influenced by this scaling\nschedule.", - "This scaling schedule has been disabled by the user.", - "This scaling schedule will never become active again.", - "The current autoscaling recommendation is not influenced by this scaling\nschedule." - ], - "type": "string" - } - }, - "type": "object" - }, - "Scheduling": { - "description": "Sets the scheduling options for an Instance.", - "id": "Scheduling", - "properties": { - "automaticRestart": { - "description": "Specifies whether the instance should be automatically restarted if it is\nterminated by Compute Engine (not terminated by a user). You can only set\nthe automatic restart option for standard instances.Preemptible instances\ncannot be automatically restarted.\n\nBy default, this is set to true so an instance is\nautomatically restarted if it is terminated by Compute Engine.", - "type": "boolean" - }, - "availabilityDomain": { - "description": "Specifies the availability domain to place the instance in. The value\nmust be a number between 1 and the number of availability domains\nspecified in the spread placement policy attached to the instance.", - "format": "int32", - "type": "integer" - }, - "currentCpus": { - "description": "Current number of vCPUs available for VM.\n0 or unset means default vCPUs of the current machine type.", - "format": "int32", - "type": "integer" - }, - "currentMemoryMb": { - "description": "Current amount of memory (in MB) available for VM.\n0 or unset means default amount of memory of the current machine type.", - "format": "int64", - "type": "string" - }, - "gracefulShutdown": { - "$ref": "SchedulingGracefulShutdown" - }, - "hostErrorTimeoutSeconds": { - "description": "Specify the time in seconds for host error detection, the value must be\nwithin the range of [90, 330] with the increment of 30, if unset, the\ndefault behavior of host error recovery will be used.", - "format": "int32", - "type": "integer" - }, - "instanceTerminationAction": { - "description": "Specifies the termination action for the instance.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, - "latencyTolerant": { - "description": "Defines whether the instance is tolerant of higher cpu latency. This can\nonly be set during instance creation, or when the instance is not currently\nrunning. It must not be set if thepreemptible option is\nalso set.", - "type": "boolean" - }, - "localSsdRecoveryTimeout": { - "$ref": "Duration", - "description": "Specifies the maximum amount of time a Local Ssd Vm should wait while\nrecovery of the Local Ssd state is attempted. Its value should be in\nbetween 0 and 168 hours with hour granularity and the default value being 1\nhour." - }, - "locationHint": { - "description": "An opaque location hint used to place the instance close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "maintenanceFreezeDurationHours": { - "description": "Specifies the number of hours after VM instance creation where the VM won't\nbe scheduled for maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted values\nare: `PERIODIC`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "maxRunDuration": { - "$ref": "Duration", - "description": "Specifies the max run duration for the given instance. If specified,\nthe instance termination action will be performed at the end of the run\nduration." - }, - "minNodeCpus": { - "description": "The minimum number of virtual CPUs this instance will consume when running\non a sole-tenant node.", - "format": "int32", - "type": "integer" - }, - "nodeAffinities": { - "description": "A set of node affinity and anti-affinity configurations. Refer toConfiguring node\naffinity for more information.\nOverrides reservationAffinity.", - "items": { - "$ref": "SchedulingNodeAffinity" - }, - "type": "array" - }, - "onHostMaintenance": { - "description": "Defines the maintenance behavior for this instance. For standard instances,\nthe default behavior is MIGRATE. Forpreemptible instances,\nthe default and only possible behavior is TERMINATE. For more\ninformation, see\n Set\n VM host maintenance policy.", - "enum": [ - "MIGRATE", - "TERMINATE" - ], - "enumDescriptions": [ - "*[Default]* Allows Compute Engine to automatically migrate instances\nout of the way of maintenance events.", - "Tells Compute Engine to terminate and (optionally) restart the instance\naway from the maintenance activity. If you would like your instance to be\nrestarted, set the automaticRestart flag to true. Your\ninstance may be restarted more than once, and it may be restarted outside\nthe window of maintenance events." - ], - "type": "string" - }, - "onInstanceStopAction": { - "$ref": "SchedulingOnInstanceStopAction" - }, - "preemptible": { - "description": "Defines whether the instance is preemptible. This can only be set during\ninstance creation or while the instance isstopped and\ntherefore, in a `TERMINATED` state. SeeInstance Life\nCycle for more information on the possible instance states.", - "type": "boolean" - }, - "preemptionNoticeDuration": { - "$ref": "Duration", - "description": "Specifies the Metadata Service preemption notice duration before the GCE ACPI G2 Soft\n Off signal is triggered for Spot\n VMs only. If not specified, there will be no wait before the G2 Soft\n Off signal is triggered." - }, - "provisioningModel": { - "description": "Specifies the provisioning model of the instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - }, - "shutdownTimeout": { - "$ref": "Duration", - "deprecated": true, - "description": "DEPRECATED: please use skipGuestOsShutdown.\nTimeout between GCE ACPI G2 Soft\nOff and ACPI G3 Mechanical\nOff during shutdown operation of VM.\n\nFor Standard VMs values between 0s and 120s are allowed. For Spot and\nPreemptible VMs supported values are between 0s and 30s.\n\nIf no value is specified for shutdownDuration, default values are 90s for\nStandard VMs and 30s for Spot/Preemptible VMs." - }, - "skipGuestOsShutdown": { - "description": "Default is false and there will be 120 seconds between GCE ACPI G2 Soft\nOff and ACPI G3 Mechanical\nOff for Standard VMs and 30 seconds for Spot VMs.", - "type": "boolean" - }, - "terminationTime": { - "description": "Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance\ntermination action will be performed at the termination time.", - "type": "string" - }, - "windowsLicenseOptimizationMode": { - "description": "Represents the Windows Server License Optimization Mode of the VM. If\nunspecified, the default mode is `OFF`.", - "enum": [ - "AUTO", - "BALANCED", - "COST_OPTIMIZED", - "MANAGED", - "OFF", - "PERFORMANCE", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "\"Automatically maximize savings and minimize performance impact by\nmatching license optimization mode to current CPU utilization.", - "Significant license cost savings via moderate throttles (40% baseline, 10\nminute maximum burst at full utilization).", - "Maximum license cost savings via restrictive throttles (20%\nbaseline, 3.75 minute maximum burst at full utilization).", - "License optimization mode managed by Google, in exchange for\nguaranteed discounts. This mode cannot be set by users, only by\nGoogle internal tooling.", - "No license cost savings with maximum CPU performance.", - "Moderate license cost savings via least restrictive throttles (60%\nbaseline, 22.5 minute maximum burst at full utilization).", - "Unspecified license optimization mode defaults to `OFF`." - ], - "type": "string" - } - }, - "type": "object" - }, - "SchedulingGracefulShutdown": { - "description": "The configuration for gracefully shutting down the instance.", - "id": "SchedulingGracefulShutdown", - "properties": { - "enabled": { - "description": "Opts-in for graceful shutdown.", - "type": "boolean" - }, - "maxDuration": { - "$ref": "Duration", - "description": "The time allotted for the instance to gracefully shut down. If the\ngraceful shutdown isn't complete after this time, then the instance\ntransitions to the STOPPING state." - } - }, - "type": "object" - }, - "SchedulingNodeAffinity": { - "description": "Node Affinity: the configuration of desired nodes onto which this Instance\n could be scheduled.", - "id": "SchedulingNodeAffinity", - "properties": { - "key": { - "description": "Corresponds to the label key of Node resource.", - "type": "string" - }, - "operator": { - "description": "Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity.", - "enum": [ - "IN", - "NOT_IN", - "OPERATOR_UNSPECIFIED" - ], - "enumDescriptions": [ - "Requires Compute Engine to seek for matched nodes.", - "Requires Compute Engine to avoid certain nodes.", - "" - ], - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of Node resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SchedulingOnInstanceStopAction": { - "description": "Defines the behaviour for instances with the instance_termination_actionSTOP.", - "id": "SchedulingOnInstanceStopAction", - "properties": { - "discardLocalSsd": { - "description": "If true, the contents of any attached Local SSD disks will be discarded\nelse, the Local SSD data will be preserved when the instance is stopped\nat the end of the run duration/termination time.", - "type": "boolean" - } - }, - "type": "object" - }, - "Screenshot": { - "description": "An instance's screenshot.", - "id": "Screenshot", - "properties": { - "contents": { - "description": "[Output Only] The Base64-encoded screenshot data.", - "type": "string" - }, - "kind": { - "default": "compute#screenshot", - "description": "[Output Only] Type of the resource. Always compute#screenshot\nfor the screenshots.", - "type": "string" - } - }, - "type": "object" - }, - "SdsConfig": { - "description": "[Deprecated] The configuration to access the SDS server.\nThe configuration to access the SDS server.", - "id": "SdsConfig", - "properties": { - "grpcServiceConfig": { - "$ref": "GrpcServiceConfig", - "description": "The configuration to access the SDS server over GRPC." - } - }, - "type": "object" - }, - "SecurityPoliciesAggregatedList": { - "id": "SecurityPoliciesAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SecurityPoliciesScopedList", - "description": "Name of the scope containing this set of security policies." - }, - "description": "A list of SecurityPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#securityPoliciesAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#securityPolicyAggregatedList for lists of Security\nPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPoliciesListPreconfiguredExpressionSetsResponse": { - "id": "SecurityPoliciesListPreconfiguredExpressionSetsResponse", - "properties": { - "preconfiguredExpressionSets": { - "$ref": "SecurityPoliciesWafConfig" - } - }, - "type": "object" - }, - "SecurityPoliciesScopedList": { - "id": "SecurityPoliciesScopedList", - "properties": { - "securityPolicies": { - "description": "A list of SecurityPolicies contained in this scope.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nsecurity policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPoliciesWafConfig": { - "id": "SecurityPoliciesWafConfig", - "properties": { - "wafRules": { - "$ref": "PreconfiguredWafSet" - } - }, - "type": "object" - }, - "SecurityPolicy": { - "description": "Represents a Google Cloud Armor security policy resource.\n\nOnly external backend services that use load balancers can\nreference a security policy. For more information, see\nGoogle Cloud Armor security policy overview.", - "id": "SecurityPolicy", - "properties": { - "adaptiveProtectionConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfig" - }, - "advancedOptionsConfig": { - "$ref": "SecurityPolicyAdvancedOptionsConfig" - }, - "associations": { - "description": "A list of associations that belong to this policy.", - "items": { - "$ref": "SecurityPolicyAssociation" - }, - "type": "array" - }, - "cloudArmorConfig": { - "$ref": "SecurityPolicyCloudArmorConfig", - "deprecated": true - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "ddosProtectionConfig": { - "$ref": "SecurityPolicyDdosProtectionConfig" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "User-provided name of the organization security policy. The name should be\nunique in the organization in which the security policy is created. This\nshould only be used when SecurityPolicyType is FIREWALL.\nThe name must be 1-63 characters long, and comply with\nhttps://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the\nsecurity policy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#securityPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this security policy, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\nsecurity policy.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "parent": { - "description": "[Output Only] The parent of the security policy.", - "type": "string" - }, - "recaptchaOptionsConfig": { - "$ref": "SecurityPolicyRecaptchaOptionsConfig" - }, - "region": { - "description": "[Output Only] URL of the region where the regional security policy\nresides. This field is not applicable to global security policies.", - "type": "string" - }, - "ruleTupleCount": { - "deprecated": true, - "description": "[Output Only] Total count of all security policy rule tuples. A security\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "A list of rules that belong to this policy.\nThere must always be a default rule which is a rule with priority\n2147483647 and match all condition (for the match condition this means\nmatch \"*\" for srcIpRanges and for the networkMatch condition every field\nmust be either match \"*\" or not set). If no rules are provided when\ncreating a security policy, a default rule with action \"allow\" will be\nadded.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shortName": { - "description": "User-provided name of the organization security policy. The name should be\nunique in the organization in which the security policy is created. This\nshould only be used when SecurityPolicyType is CLOUD_ARMOR.\nThe name must be 1-63 characters long, and comply with\nhttps://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "type": { - "description": "The type indicates the intended use of the security policy.\n \n - CLOUD_ARMOR: Cloud Armor backend security policies can\n be configured to filter incoming HTTP requests targeting backend services.\n They filter requests before they hit the origin servers.\n - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can\n be configured to filter incoming HTTP requests targeting backend services\n (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).\n They filter requests before the request is served from Google's cache.\n - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor\n internal service policies can be configured to filter HTTP requests\n targeting services managed by Traffic Director in a service mesh. They\n filter requests before the request is served from the application.\n\n- CLOUD_ARMOR_NETWORK: Cloud Armor network policies\ncan be configured to filter packets targeting network load balancing\nresources such as backend services, target pools, target instances, and\ninstances with external IPs. They filter requests before the request is\nserved from the application.\n\n\nThis field can be set only at resource creation time.", - "enum": [ - "CLOUD_ARMOR", - "CLOUD_ARMOR_EDGE", - "CLOUD_ARMOR_INTERNAL_SERVICE", - "CLOUD_ARMOR_NETWORK", - "FIREWALL" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "userDefinedFields": { - "description": "Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A\nuser-defined field consists of up to 4 bytes extracted from a fixed offset\nin the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an\noptional mask to select certain bits. Rules may then specify matching\nvalues for these fields.\n\nExample:\n\n userDefinedFields:\n - name: \"ipv4_fragment_offset\"\n base: IPV4\n offset: 6\n size: 2\n mask: \"0x1fff\"", - "items": { - "$ref": "SecurityPolicyUserDefinedField" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfig": { - "description": "Configuration options for Cloud Armor Adaptive Protection (CAAP).", - "id": "SecurityPolicyAdaptiveProtectionConfig", - "properties": { - "autoDeployConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig" - }, - "layer7DdosDefenseConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig", - "description": "If set to true, enables Cloud Armor Machine Learning." - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig": { - "description": "Configuration options for Adaptive Protection auto-deploy feature.", - "id": "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig", - "properties": { - "confidenceThreshold": { - "format": "float", - "type": "number" - }, - "expirationSec": { - "format": "int32", - "type": "integer" - }, - "impactedBaselineThreshold": { - "format": "float", - "type": "number" - }, - "loadThreshold": { - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig": { - "description": "Configuration options for L7 DDoS detection.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig", - "properties": { - "enable": { - "description": "If set to true, enables CAAP for L7 DDoS detection.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "type": "boolean" - }, - "ruleVisibility": { - "description": "Rule visibility can be one of the following:\nSTANDARD - opaque rules. (default)\nPREMIUM - transparent rules.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "enum": [ - "PREMIUM", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "thresholdConfigs": { - "description": "Configuration options for layer7 adaptive protection for various\ncustomizable thresholds.", - "items": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig": { - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig", - "properties": { - "autoDeployConfidenceThreshold": { - "format": "float", - "type": "number" - }, - "autoDeployExpirationSec": { - "format": "int32", - "type": "integer" - }, - "autoDeployImpactedBaselineThreshold": { - "format": "float", - "type": "number" - }, - "autoDeployLoadThreshold": { - "format": "float", - "type": "number" - }, - "detectionAbsoluteQps": { - "format": "float", - "type": "number" - }, - "detectionLoadThreshold": { - "format": "float", - "type": "number" - }, - "detectionRelativeToBaselineQps": { - "format": "float", - "type": "number" - }, - "name": { - "description": "The name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the security policy.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "trafficGranularityConfigs": { - "description": "Configuration options for enabling Adaptive Protection to operate\non specified granular traffic units.", - "items": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig": { - "description": "Configurations to specifc granular traffic units processed by\nAdaptive Protection.", - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig", - "properties": { - "enableEachUniqueValue": { - "description": "If enabled, traffic matching each unique value for the specified\ntype constitutes a separate traffic unit.\nIt can only be set to true if `value` is empty.", - "type": "boolean" - }, - "type": { - "description": "Type of this configuration.", - "enum": [ - "HTTP_HEADER_HOST", - "HTTP_PATH", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "value": { - "description": "Requests that match this value constitute a granular traffic unit.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyAdvancedOptionsConfig": { - "id": "SecurityPolicyAdvancedOptionsConfig", - "properties": { - "jsonCustomConfig": { - "$ref": "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", - "description": "Custom configuration to apply the JSON parsing. Only applicable when\njson_parsing is set to STANDARD." - }, - "jsonParsing": { - "enum": [ - "DISABLED", - "STANDARD", - "STANDARD_WITH_GRAPHQL" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "logLevel": { - "enum": [ - "NORMAL", - "VERBOSE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestBodyInspectionSize": { - "description": "The maximum request size chosen by the customer with Waf enabled.\nValues supported are \"8KB\", \"16KB, \"32KB\", \"48KB\" and \"64KB\".\nValues are case insensitive.", - "type": "string" - }, - "userIpRequestHeaders": { - "description": "An optional list of case-insensitive request header names to use for\nresolving the callers client IP address.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig": { - "id": "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", - "properties": { - "contentTypes": { - "description": "A list of custom Content-Type header values to apply the JSON parsing.\n\nAs per RFC 1341, a Content-Type header value has the following format:\n\nContent-Type := type \"/\" subtype *[\";\" parameter]\n\nWhen configuring a custom Content-Type header value, only the\ntype/subtype needs to be specified, and the parameters should be\nexcluded.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAssociation": { - "id": "SecurityPolicyAssociation", - "properties": { - "attachmentId": { - "description": "The resource that the security policy is attached to.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "[Output Only] The display name of the security policy of the association.", - "type": "string" - }, - "excludedFolders": { - "description": "A list of folders to exclude from the security policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedProjects": { - "description": "A list of projects to exclude from the security policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name for an association.", - "type": "string" - }, - "securityPolicyId": { - "description": "[Output Only] The security policy ID of the association.", - "type": "string" - }, - "shortName": { - "description": "[Output Only] The short name of the security policy of the association.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyCloudArmorConfig": { - "description": "Configuration options for Cloud Armor.", - "id": "SecurityPolicyCloudArmorConfig", - "properties": { - "enableMl": { - "deprecated": true, - "description": "If set to true, enables Cloud Armor Machine Learning.", - "type": "boolean" - } - }, - "type": "object" - }, - "SecurityPolicyDdosProtectionConfig": { - "id": "SecurityPolicyDdosProtectionConfig", - "properties": { - "ddosAdaptiveProtection": { - "enum": [ - "DISABLED", - "ENABLED", - "PREVIEW" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "ddosImpactedBaselineThreshold": { - "description": "Adaptive Protection for Network Load Balancers (and VMs with public IPs)\nbuilds DDos mitigations that minimize collateral damage. It quantifies\nthis as the fraction of a non-abuse baseline that's inadvertently\nblocked.\n\nRules whose collateral damage exceeds\nddosAdaptiveImpactedBaselineThreshold will not be deployed. Using a lower\nvalue will prioritize keeping collateral damage low, possibly at the cost\nof its effectiveness in rate limiting some or all of the attack.\nIt should typically be between 0.01 and 0.10.", - "format": "float", - "type": "number" - }, - "ddosProtection": { - "enum": [ - "ADVANCED", - "ADVANCED_PREVIEW", - "STANDARD" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyList": { - "id": "SecurityPolicyList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SecurityPolicy resources.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#securityPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPolicyRecaptchaOptionsConfig": { - "id": "SecurityPolicyRecaptchaOptionsConfig", - "properties": { - "redirectSiteKey": { - "description": "An optional field to supply a reCAPTCHA site key to be used for all the\nrules using the redirect action with the type of GOOGLE_RECAPTCHA under\nthe security policy. The specified site key needs to be created from the\nreCAPTCHA API. The user is responsible for the validity of the specified\nsite key. If not specified, a Google-managed site key is used.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyReference": { - "id": "SecurityPolicyReference", - "properties": { - "securityPolicy": { - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRule": { - "description": "Represents a rule that describes one or more match conditions along with\nthe action to be taken when traffic matches this condition (allow or deny).", - "id": "SecurityPolicyRule", - "properties": { - "action": { - "description": "The Action to perform when the rule is matched.\nThe following are the valid actions:\n \n - allow: allow access to target.\n - deny(STATUS): deny access to target, returns the\n HTTP response code specified. Valid values for `STATUS`\n are 403, 404, and 502.\n - rate_based_ban: limit client traffic to the configured\n threshold and ban the client if the traffic exceeds the threshold.\n Configure parameters for this action in RateLimitOptions. Requires\n rate_limit_options to be set.\n - redirect: redirect to a different target. This can\n either be an internal reCAPTCHA redirect, or an external URL-based\n redirect via a 302 response. Parameters for this action can be configured\n via redirectOptions. This action is only supported in Global Security\n Policies of type CLOUD_ARMOR.\n - throttle: limit\n client traffic to the configured threshold. Configure parameters for this\n action in rateLimitOptions. Requires rate_limit_options to be set for\n this.\n - fairshare (preview only): when traffic reaches the\n threshold limit, requests from the clients matching this rule begin to be\n rate-limited using the Fair Share algorithm. This action is only allowed\n in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "direction": { - "deprecated": true, - "description": "The direction in which this rule applies. This field may only be\nspecified when versioned_expr is set to FIREWALL.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "enableLogging": { - "deprecated": true, - "description": "Denotes whether to enable logging for a particular rule. If logging is\nenabled, logs will be exported to the configured export destination in\nStackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you\ncannot enable logging on \"goto_next\" rules.\n\nThis field may only be specified when the versioned_expr is set to\nFIREWALL.", - "type": "boolean" - }, - "headerAction": { - "$ref": "SecurityPolicyRuleHttpHeaderAction", - "description": "Optional, additional actions that are performed on headers.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "kind": { - "default": "compute#securityPolicyRule", - "description": "[Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules", - "type": "string" - }, - "match": { - "$ref": "SecurityPolicyRuleMatcher", - "description": "A match condition that incoming traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "networkMatch": { - "$ref": "SecurityPolicyRuleNetworkMatcher", - "description": "A match condition that incoming packets are evaluated against for\nCLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding\n'action' is enforced.\n\nThe match criteria for a rule consists of built-in match fields (like\n'srcIpRanges') and potentially multiple user-defined match fields\n('userDefinedFields').\n\nField values may be extracted directly from the packet or derived from it\n(e.g. 'srcRegionCodes'). Some fields may not be present in every packet\n(e.g. 'srcPorts'). A user-defined field is only present if the base\nheader is found in the packet and the entire field is in bounds.\n\nEach match field may specify which values can match it, listing one or\nmore ranges, prefixes, or exact values that are considered a match for\nthe field. A field value must be present in order to match a specified\nmatch field. If no match values are specified for a match field, then any\nfield value is considered to match it, and it's not required to be\npresent. For strings specifying '*' is also equivalent to match all.\n\nFor a packet to match a rule, all specified match fields must match the\ncorresponding field values derived from the packet.\n\nExample:\n\nnetworkMatch:\n srcIpRanges:\n - \"192.0.2.0/24\"\n - \"198.51.100.0/24\"\n userDefinedFields:\n - name: \"ipv4_fragment_offset\"\n values:\n - \"1-0x1fff\"\n\nThe above match condition matches packets with a source IP in\n192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named\n\"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." - }, - "preconfiguredWafConfig": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfig", - "description": "Preconfigured WAF configuration to be applied for the rule. If the rule\ndoes not evaluate preconfigured WAF rules, i.e., if\nevaluatePreconfiguredWaf() is not used, this field will have no effect." - }, - "preview": { - "description": "If set to true, the specified action is not enforced.", - "type": "boolean" - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 0 and 2147483647.\nRules are evaluated from highest to lowest priority where 0 is the\nhighest priority and 2147483647 is the lowest priority.", - "format": "int32", - "type": "integer" - }, - "rateLimitOptions": { - "$ref": "SecurityPolicyRuleRateLimitOptions", - "description": "Must be specified if the action is \"rate_based_ban\" or \"throttle\" or\n\"fairshare\". Cannot be specified for any other actions." - }, - "redirectOptions": { - "$ref": "SecurityPolicyRuleRedirectOptions", - "description": "Parameters defining the redirect action. Cannot be specified for any\nother actions.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "redirectTarget": { - "description": "This must be specified for redirect actions. Cannot be specified for any\nother actions.", - "type": "string" - }, - "ruleManagedProtectionTier": { - "deprecated": true, - "description": "[Output Only] The minimum Cloud Armor subscription required for this\nrule.\n[Deprecated] Use requiredManagedProtectionTiers instead.", - "enum": [ - "CAMP_PLUS_ANNUAL", - "CAMP_PLUS_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Plus tier protection annual.", - "Plus tier protection monthly.", - "Standard protection." - ], - "type": "string" - }, - "ruleNumber": { - "description": "Identifier for the rule. This is only unique within the given security\npolicy. This can only be set during rule creation, if rule number is not\nspecified it will be generated by the server.", - "format": "int64", - "type": "string" - }, - "ruleTupleCount": { - "deprecated": true, - "description": "[Output Only] Calculation of the complexity of a single firewall security\npolicy rule.", - "format": "int32", - "type": "integer" - }, - "targetResources": { - "deprecated": true, - "description": "A list of network resource URLs to which this rule applies. This field\nallows you to control which network's VMs get this rule. If this field\nis left blank, all VMs within the organization will receive the rule.\n\nThis field may only be specified when versioned_expr is set to FIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetServiceAccounts": { - "deprecated": true, - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleHttpHeaderAction": { - "id": "SecurityPolicyRuleHttpHeaderAction", - "properties": { - "requestHeadersToAdds": { - "description": "The list of request headers to add or overwrite if they're already\npresent.", - "items": { - "$ref": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption": { - "id": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption", - "properties": { - "headerName": { - "description": "The name of the header to set.", - "type": "string" - }, - "headerValue": { - "description": "The value to set the named header to.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "SecurityPolicyRuleMatcher", - "properties": { - "config": { - "$ref": "SecurityPolicyRuleMatcherConfig", - "description": "The configuration options available when specifying versioned_expr.\nThis field must be specified if versioned_expr is specified and cannot\nbe specified if versioned_expr is not specified." - }, - "expr": { - "$ref": "Expr", - "description": "User defined CEVAL expression.\nA CEVAL expression is used to specify match criteria such as origin.ip,\nsource.region_code and contents in the request header.\nExpressions containing `evaluateThreatIntelligence` require a Cloud\nArmor Enterprise subscription and are not supported in Edge Policies\nnor in Regional Policies. Expressions containing\n`evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor\nEnterprise subscription and are only supported in Global Security\nPolicies." - }, - "exprOptions": { - "$ref": "SecurityPolicyRuleMatcherExprOptions", - "description": "The configuration options available when specifying a user defined\nCEVAL expression (i.e., 'expr')." - }, - "versionedExpr": { - "description": "Preconfigured versioned expression.\nIf this field is specified, config must also be specified.\nAvailable preconfigured expressions along with their requirements are:\nSRC_IPS_V1 - must specify the corresponding src_ip_range field in\nconfig.", - "enum": [ - "FIREWALL", - "SRC_IPS_V1" - ], - "enumDescriptions": [ - "", - "Matches the source IP address of a request to the IP ranges supplied\nin config." - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherConfig": { - "id": "SecurityPolicyRuleMatcherConfig", - "properties": { - "destIpRanges": { - "deprecated": true, - "description": "CIDR IP address range.\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destPorts": { - "deprecated": true, - "description": "Pairs of IP protocols and ports that the rule should match.\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "$ref": "SecurityPolicyRuleMatcherConfigDestinationPort" - }, - "type": "array" - }, - "layer4Configs": { - "deprecated": true, - "description": "Pairs of IP protocols and ports that the rule should match.\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "$ref": "SecurityPolicyRuleMatcherConfigLayer4Config" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of src_ip_ranges allowed is 10.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherConfigDestinationPort": { - "id": "SecurityPolicyRuleMatcherConfigDestinationPort", - "properties": { - "ipProtocol": { - "deprecated": true, - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be\none of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP\nprotocol number.", - "type": "string" - }, - "ports": { - "deprecated": true, - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP or TCP protocol. Each entry must be either\nan integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherConfigLayer4Config": { - "id": "SecurityPolicyRuleMatcherConfigLayer4Config", - "properties": { - "ipProtocol": { - "deprecated": true, - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be\none of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP\nprotocol number.", - "type": "string" - }, - "ports": { - "deprecated": true, - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP or TCP protocol. Each entry must be either\nan integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherExprOptions": { - "id": "SecurityPolicyRuleMatcherExprOptions", - "properties": { - "recaptchaOptions": { - "$ref": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", - "description": "reCAPTCHA configuration options to be applied for the rule. If the\nrule does not evaluate reCAPTCHA tokens, this field has no effect." - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions": { - "id": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", - "properties": { - "actionTokenSiteKeys": { - "description": "A list of site keys to be used during the validation of reCAPTCHA\naction-tokens. The provided site keys need to be created from\nreCAPTCHA API under the same project where the security policy is\ncreated.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sessionTokenSiteKeys": { - "description": "A list of site keys to be used during the validation of reCAPTCHA\nsession-tokens. The provided site keys need to be created from\nreCAPTCHA API under the same project where the security policy is\ncreated.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleNetworkMatcher": { - "description": "Represents a match condition that incoming network traffic is evaluated\nagainst.", - "id": "SecurityPolicyRuleNetworkMatcher", - "properties": { - "destIpRanges": { - "description": "Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text\nformat.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destPorts": { - "description": "Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit\nunsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "ipProtocols": { - "description": "IPv4 protocol / IPv6 next header (after extension headers). Each\nelement can be an 8-bit unsigned decimal number (e.g. \"6\"), range (e.g.\n\"253-254\"), or one of the following protocol names: \"tcp\", \"udp\",\n\"icmp\", \"esp\", \"ah\", \"ipip\", or \"sctp\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcAsns": { - "description": "BGP Autonomous System Number associated with the source IP address.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcPorts": { - "description": "Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit\nunsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcRegionCodes": { - "description": "Two-letter ISO 3166-1 alpha-2 country code associated with the source\nIP address.", - "items": { - "type": "string" - }, - "type": "array" - }, - "userDefinedFields": { - "description": "User-defined fields. Each element names a defined field and lists the\nmatching values for that field.", - "items": { - "$ref": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch": { - "id": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch", - "properties": { - "name": { - "description": "Name of the user-defined field, as given in the definition.", - "type": "string" - }, - "values": { - "description": "Matching values of the field. Each element can be a 32-bit unsigned\ndecimal or hexadecimal (starting with \"0x\") number (e.g. \"64\") or\nrange (e.g. \"0x400-0x7ff\").", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfig": { - "id": "SecurityPolicyRulePreconfiguredWafConfig", - "properties": { - "exclusions": { - "description": "A list of exclusions to apply during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusion" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfigExclusion": { - "id": "SecurityPolicyRulePreconfiguredWafConfigExclusion", - "properties": { - "requestCookiesToExclude": { - "description": "A list of request cookie names whose value will be excluded from\ninspection during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestHeadersToExclude": { - "description": "A list of request header names whose value will be excluded from\ninspection during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestQueryParamsToExclude": { - "description": "A list of request query parameter names whose value will be excluded\nfrom inspection during preconfigured WAF evaluation. Note that the\nparameter can be in the query string or in the POST body.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestUrisToExclude": { - "description": "A list of request URIs from the request line to be excluded from\ninspection during preconfigured WAF evaluation. When specifying this\nfield, the query or fragment part should be excluded.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "targetRuleIds": { - "description": "A list of target rule IDs under the WAF rule set to apply the\npreconfigured WAF exclusion. If omitted, it refers to all the rule\nIDs under the WAF rule set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetRuleSet": { - "description": "Target WAF rule set to apply the preconfigured WAF exclusion.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams": { - "id": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams", - "properties": { - "op": { - "description": "The match operator for the field.", - "enum": [ - "CONTAINS", - "ENDS_WITH", - "EQUALS", - "EQUALS_ANY", - "STARTS_WITH" - ], - "enumDescriptions": [ - "The operator matches if the field value contains the specified\nvalue.", - "The operator matches if the field value ends with the specified\nvalue.", - "The operator matches if the field value equals the specified\nvalue.", - "The operator matches if the field value is any value.", - "The operator matches if the field value starts with the specified\nvalue." - ], - "type": "string" - }, - "val": { - "description": "The value of the field.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptions": { - "id": "SecurityPolicyRuleRateLimitOptions", - "properties": { - "banDurationSec": { - "description": "Can only be specified if the action for the rule is\n\"rate_based_ban\". If specified, determines the time (in seconds)\nthe traffic will continue to be banned by the rate limit after the\nrate falls below the threshold.", - "format": "int32", - "type": "integer" - }, - "banThreshold": { - "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", - "description": "Can only be specified if the action for the rule is\n\"rate_based_ban\". If specified, the key will be banned for the\nconfigured 'ban_duration_sec' when the number of requests that exceed\nthe 'rate_limit_threshold' also exceed this 'ban_threshold'." - }, - "conformAction": { - "description": "Action to take for requests that are under the configured rate limit\nthreshold. Valid option is \"allow\" only.", - "type": "string" - }, - "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible\nvalues are:\n \n - ALL: A single rate limit threshold is applied to all\n the requests matching this rule. This is the default value if\n \"enforceOnKey\" is not configured.\n - IP: The source IP address of\n the request is the key. Each IP has this limit enforced\n separately.\n - HTTP_HEADER: The value of the HTTP\n header whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the header value. If no\n such header is present in the request, the key type defaults toALL.\n - XFF_IP: The first IP address (i.e. the\n originating client IP address) specified in the list of IPs under\n X-Forwarded-For HTTP header. If no such header is present or the value\n is not a valid IP, the key defaults to the source IP address of\n the request i.e. key type IP.\n - HTTP_COOKIE: The value of the HTTP\n cookie whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the cookie value. If no\n such cookie is present in the request, the key type defaults toALL.\n - HTTP_PATH: The URL path of the HTTP request. The key\n value is truncated to the first 128 bytes. \n - SNI: Server name indication in the TLS session of the\n HTTPS request. The key value is truncated to the first 128 bytes. The\n key type defaults to ALL on a HTTP session. \n - REGION_CODE: The country/region from which the request\n originates. \n - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the\n client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\n key type defaults to ALL. \n - USER_IP: The IP address of the originating client,\n which is resolved based on \"userIpRequestHeaders\" configured with the\n security policy. If there is no \"userIpRequestHeaders\" configuration or\n an IP address cannot be resolved from it, the key type defaults toIP. \n\n- TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the\nclient connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\nkey type defaults to ALL. \nFor \"fairshare\" action, this value is limited to ALL i.e. a single rate\nlimit threshold is enforced for all the requests matching the rule.", - "enum": [ - "ALL", - "ALL_IPS", - "HTTP_COOKIE", - "HTTP_HEADER", - "HTTP_PATH", - "IP", - "REGION_CODE", - "SNI", - "TLS_JA3_FINGERPRINT", - "TLS_JA4_FINGERPRINT", - "USER_IP", - "XFF_IP" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "enforceOnKeyConfigs": { - "description": "If specified, any combination of values of\nenforce_on_key_type/enforce_on_key_name is treated as the key on which\nratelimit threshold/action is enforced. You can specify up to 3\nenforce_on_key_configs. If enforce_on_key_configs is specified,\nenforce_on_key must not be specified.", - "items": { - "$ref": "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig" - }, - "type": "array" - }, - "enforceOnKeyName": { - "description": "Rate limit key name applicable only for the following key types:\nHTTP_HEADER -- Name of the HTTP header whose value is taken as the key\nvalue.\nHTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key\nvalue.", - "type": "string" - }, - "exceedAction": { - "description": "Action to take for requests that are above the configured rate limit\nthreshold, to either deny with a specified HTTP response code, or\nredirect to a different endpoint.\nValid options are `deny(STATUS)`, where valid values for\n`STATUS` are 403, 404, 429, and 502, and\n`redirect`, where the redirect parameters come from\n`exceedRedirectOptions` below.\nThe `redirect` action is only supported in Global Security Policies of\ntype CLOUD_ARMOR.", - "type": "string" - }, - "exceedActionRpcStatus": { - "$ref": "SecurityPolicyRuleRateLimitOptionsRpcStatus", - "description": "Specified gRPC response status for proxyless gRPC requests that are\nabove the configured rate limit threshold" - }, - "exceedRedirectOptions": { - "$ref": "SecurityPolicyRuleRedirectOptions", - "description": "Parameters defining the redirect action that is used as the exceed\naction. Cannot be specified if the exceed action is not redirect.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "rateLimitThreshold": { - "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", - "description": "Threshold at which to begin ratelimiting." - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig": { - "id": "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig", - "properties": { - "enforceOnKeyName": { - "description": "Rate limit key name applicable only for the following key types:\nHTTP_HEADER -- Name of the HTTP header whose value is taken as the\nkey value. HTTP_COOKIE -- Name of the HTTP cookie whose value is\ntaken as the key value.", - "type": "string" - }, - "enforceOnKeyType": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible\nvalues are:\n \n - ALL: A single rate limit threshold is applied to all\n the requests matching this rule. This is the default value if\n \"enforceOnKeyConfigs\" is not configured.\n - IP: The source IP address of\n the request is the key. Each IP has this limit enforced\n separately.\n - HTTP_HEADER: The value of the HTTP\n header whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the header value. If no\n such header is present in the request, the key type defaults toALL.\n - XFF_IP: The first IP address (i.e. the\n originating client IP address) specified in the list of IPs under\n X-Forwarded-For HTTP header. If no such header is present or the\n value is not a valid IP, the key defaults to the source IP address of\n the request i.e. key type IP.\n - HTTP_COOKIE: The value of the HTTP\n cookie whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the cookie value. If no\n such cookie is present in the request, the key type defaults toALL.\n - HTTP_PATH: The URL path of the HTTP request. The key\n value is truncated to the first 128 bytes. \n - SNI: Server name indication in the TLS session of\n the HTTPS request. The key value is truncated to the first 128 bytes.\n The key type defaults to ALL on a HTTP session. \n - REGION_CODE: The country/region from which the\n request originates. \n - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the\n client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\n key type defaults to ALL. \n - USER_IP: The IP address of the originating client,\n which is resolved based on \"userIpRequestHeaders\" configured with the\n security policy. If there is no \"userIpRequestHeaders\" configuration\n or an IP address cannot be resolved from it, the key type defaults toIP. \n\n- TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the\nclient connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\nkey type defaults to ALL.", - "enum": [ - "ALL", - "ALL_IPS", - "HTTP_COOKIE", - "HTTP_HEADER", - "HTTP_PATH", - "IP", - "REGION_CODE", - "SNI", - "TLS_JA3_FINGERPRINT", - "TLS_JA4_FINGERPRINT", - "USER_IP", - "XFF_IP" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptionsRpcStatus": { - "description": "Simplified google.rpc.Status type (omitting details).", - "id": "SecurityPolicyRuleRateLimitOptionsRpcStatus", - "properties": { - "code": { - "description": "The status code, which should be an enum value of\ngoogle.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptionsThreshold": { - "id": "SecurityPolicyRuleRateLimitOptionsThreshold", - "properties": { - "count": { - "description": "Number of HTTP(S) requests for calculating the threshold.", - "format": "int32", - "type": "integer" - }, - "intervalSec": { - "description": "Interval over which the threshold is computed.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRedirectOptions": { - "id": "SecurityPolicyRuleRedirectOptions", - "properties": { - "target": { - "description": "Target for the redirect action. This is required if the type is\nEXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.", - "type": "string" - }, - "type": { - "description": "Type of the redirect action. Possible values are:\n \n - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual\n challenge assessment.\n - EXTERNAL_302: redirect to a different URL via a 302\n response.", - "enum": [ - "EXTERNAL_302", - "GOOGLE_RECAPTCHA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyUserDefinedField": { - "id": "SecurityPolicyUserDefinedField", - "properties": { - "base": { - "description": "The base relative to which 'offset' is measured. Possible values are:\n \n - IPV4: Points to the beginning of the IPv4 header.\n - IPV6: Points to the beginning of the IPv6 header.\n - TCP: Points to the beginning of the TCP header, skipping\n over any IPv4 options or IPv6 extension headers. Not present for\n non-first fragments.\n - UDP: Points to the beginning of the UDP header, skipping\n over any IPv4 options or IPv6 extension headers. Not present for\n non-first fragments.\n\n\nrequired", - "enum": [ - "IPV4", - "IPV6", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "mask": { - "description": "If specified, apply this mask (bitwise AND) to the field to ignore bits\nbefore matching. Encoded as a hexadecimal number (starting with \"0x\").\nThe last byte of the field (in network byte order) corresponds to the\nleast significant byte of the mask.", - "type": "string" - }, - "name": { - "description": "The name of this field. Must be unique within the policy.", - "type": "string" - }, - "offset": { - "description": "Offset of the first byte of the field (in network byte order) relative to\n'base'.", - "format": "int32", - "type": "integer" - }, - "size": { - "description": "Size of the field in bytes. Valid values: 1-4.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "SecuritySettings": { - "description": "The authentication and authorization settings for a BackendService.", - "id": "SecuritySettings", - "properties": { - "authentication": { - "deprecated": true, - "description": "[Deprecated] Use clientTlsPolicy instead.", - "type": "string" - }, - "authenticationPolicy": { - "$ref": "AuthenticationPolicy", - "description": "[Deprecated] Authentication policy defines what authentication methods can\nbe accepted on backends, and if authenticated, which method/certificate\nwill set the request principal.\nrequest principal." - }, - "authorizationConfig": { - "$ref": "AuthorizationConfig", - "description": "[Deprecated] Authorization config defines the Role Based Access Control\n(RBAC) config.\nAuthorization config defines the Role Based Access Control (RBAC) config." - }, - "awsV4Authentication": { - "$ref": "AWSV4Signature", - "description": "The configuration needed to generate a signature for access to private\nstorage buckets that support AWS's Signature Version 4 for authentication.\nAllowed only for INTERNET_IP_PORT and INTERNET_FQDN_PORT NEG backends." - }, - "clientTlsPolicy": { - "description": "Optional. A URL referring to a networksecurity.ClientTlsPolicy resource\nthat describes how clients should authenticate with this service's\nbackends.\n\n clientTlsPolicy only applies to a globalBackendService with the loadBalancingScheme set\nto INTERNAL_SELF_MANAGED.\n\n If left blank, communications are not encrypted.", - "type": "string" - }, - "clientTlsSettings": { - "$ref": "ClientTlsSettings", - "description": "[Deprecated] TLS Settings for the backend service." - }, - "subjectAltNames": { - "description": "Optional. A list of Subject Alternative Names (SANs) that the client\nverifies during a mutual TLS handshake with an server/endpoint for thisBackendService. When the server presents its X.509 certificate\nto the client, the client inspects the certificate'ssubjectAltName field. If the field contains one of the\nspecified values, the communication continues. Otherwise, it fails. This\nadditional check enables the client to verify that the server is authorized\nto run the requested service.\n\n Note that the contents of the server\ncertificate's subjectAltName field are configured by the\nPublic Key Infrastructure which provisions server identities.\n\n Only applies to a global BackendService withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nOnly applies when BackendService has an attachedclientTlsPolicy with clientCertificate (mTLS\nmode).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SerialPortOutput": { - "description": "An instance serial console output.", - "id": "SerialPortOutput", - "properties": { - "contents": { - "description": "[Output Only] The contents of the console output.", - "type": "string" - }, - "kind": { - "default": "compute#serialPortOutput", - "description": "[Output Only] Type of the resource. Alwayscompute#serialPortOutput for serial port output.", - "type": "string" - }, - "next": { - "description": "[Output Only] The position of the next byte of content, regardless of\nwhether the content exists, following the output returned in the `contents`\nproperty. Use this value in the next request as the start\nparameter.", - "format": "int64", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "start": { - "description": "The starting byte position of the output that was returned.\nThis should match the start parameter sent with the request.\nIf the serial console output exceeds the size of the buffer (1 MB), older\noutput is overwritten by newer content. The output start value will\nindicate the byte position of the output that was returned, which might be\ndifferent than the `start` value that was specified in the request.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ServerBinding": { - "id": "ServerBinding", - "properties": { - "type": { - "enum": [ - "RESTART_NODE_ON_ANY_SERVER", - "RESTART_NODE_ON_MINIMAL_SERVERS", - "SERVER_BINDING_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Node may associate with any physical server over its lifetime.", - "Node may associate with minimal physical servers over its lifetime.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServerTlsSettings": { - "description": "The TLS settings for the server.", - "id": "ServerTlsSettings", - "properties": { - "proxyTlsContext": { - "$ref": "TlsContext", - "description": "Configures the mechanism to obtain security certificates and identity\ninformation." - }, - "subjectAltNames": { - "description": "A list of alternate names to verify the subject identity in the certificate\npresented by the client.", - "items": { - "type": "string" - }, - "type": "array" - }, - "tlsMode": { - "description": "Indicates whether connections should be secured using TLS. The value of\nthis field determines how TLS is enforced. This field can be set to one\nof the following:\n \n - SIMPLE Secure connections with standard TLS semantics.\n - MUTUAL Secure connections to the backends using mutual\n TLS by presenting client certificates for authentication.", - "enum": [ - "INVALID", - "MUTUAL", - "SIMPLE" - ], - "enumDescriptions": [ - "", - "Secure connections to the backends using mutual TLS by presenting client\ncertificates for authentication.", - "Secure connections with standard TLS semantics." - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAccount": { - "description": "A service account.", - "id": "ServiceAccount", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "scopes": { - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ServiceAttachment": { - "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed.\nIt encapsulates the load balancer which fronts the service runs and\na list of NAT IP ranges that the producers uses to represent\nthe consumers connecting to the service.", - "id": "ServiceAttachment", - "properties": { - "connectedEndpoints": { - "description": "[Output Only] An array of connections for all the consumers connected to\nthis service attachment.", - "items": { - "$ref": "ServiceAttachmentConnectedEndpoint" - }, - "type": "array" - }, - "connectionPreference": { - "description": "The connection preference of service attachment. The value can be set\nto ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC\nservice attachment is one that always accepts the connection from consumer\nforwarding rules.", - "enum": [ - "ACCEPT_AUTOMATIC", - "ACCEPT_MANUAL", - "CONNECTION_PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "consumerAcceptLists": { - "description": "Specifies which consumer projects or networks are allowed to connect to the\nservice attachment. Each project or network has a connection limit. A given\nservice attachment can manage connections at either the project or network\nlevel. Therefore, both the accept and reject lists for a given service\nattachment must contain either only projects or only networks or only\nendpoints.", - "items": { - "$ref": "ServiceAttachmentConsumerProjectLimit" - }, - "type": "array" - }, - "consumerRejectLists": { - "description": "Specifies a list of projects or networks that are not allowed to connect to\nthis service attachment. The project can be specified using its project ID\nor project number and the network can be specified using its URL. A given\nservice attachment can manage connections at either the project or network\nlevel. Therefore, both the reject and accept lists for a given service\nattachment must contain either only projects or only networks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "domainNames": { - "description": "If specified, the domain name will be used during the integration between\nthe PSC connected endpoints and the Cloud DNS. For example, this is a valid\ndomain name: \"p.mycompany.com.\". Current max number of domain names\nsupported is 1.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enableProxyProtocol": { - "description": "If true, enable the proxy protocol which is for supplying client TCP/IP\naddress data in TCP connections that traverse proxies on their way to\ndestination servers.", - "type": "boolean" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a ServiceAttachment. An up-to-date fingerprint must\nbe provided in order to patch/update the ServiceAttachment; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nServiceAttachment.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#serviceAttachment", - "description": "[Output Only] Type of the resource. Alwayscompute#serviceAttachment for service attachments.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata of the service attachment.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.serviceAttachments.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "natSubnets": { - "description": "An array of URLs where each entry is the URL of a subnet provided\nby the service producer to use for NAT in this service attachment.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerForwardingRule": { - "deprecated": true, - "description": "The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is\nserving the endpoint identified by this service attachment.", - "type": "string" - }, - "propagatedConnectionLimit": { - "description": "The number of consumer spokes that connected Private Service Connect\nendpoints can be propagated to through Network Connectivity Center. This\nlimit lets the service producer limit how many propagated Private Service\nConnect connections can be established to this service attachment from a\nsingle consumer.\n\nIf the connection preference of the service attachment is ACCEPT_MANUAL,\nthe limit applies to each project or network that is listed in the consumer\naccept list. If the connection preference of the service attachment is\nACCEPT_AUTOMATIC, the limit applies to each project that contains a\nconnected endpoint.\n\nIf unspecified, the default propagated connection limit is 250.", - "format": "uint32", - "type": "integer" - }, - "pscServiceAttachmentId": { - "$ref": "Uint128", - "description": "[Output Only] An 128-bit global unique ID of the PSC service attachment." - }, - "reconcileConnections": { - "description": "This flag determines whether a consumer accept/reject list change can\nreconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.\n \n \n - If false, connection policy update will only affect existing PENDING\n PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched\n regardless how the connection policy is modified . \n - If true,\n update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For\n example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project\n is added to the reject list.\n\n\nFor newly created service attachment, this boolean defaults to false.", - "type": "boolean" - }, - "region": { - "description": "[Output Only] URL of the region where the service attachment resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "targetService": { - "description": "The URL of a service serving the endpoint identified by this service\nattachment.", - "type": "string" - }, - "tunnelingConfig": { - "$ref": "ServiceAttachmentTunnelingConfig", - "description": "When a tunneling config is set on this service attachment it will\nencapsulate traffic between consumer and producer.\n\nWhen tunneling is enabled:\n \n \n - nat_subnets must be unset \n - enable_proxy_protocol must be false \n - producer_forwarding_rule must be a L4 ILB. \n -" - } - }, - "type": "object" - }, - "ServiceAttachmentAggregatedList": { - "description": "Contains a list of ServiceAttachmentsScopedList.", - "id": "ServiceAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ServiceAttachmentsScopedList", - "description": "Name of the scope containing this set of ServiceAttachments." - }, - "description": "A list of ServiceAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#serviceAttachmentAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ServiceAttachmentConnectedEndpoint": { - "description": "[Output Only] A connection connected to this service attachment.", - "id": "ServiceAttachmentConnectedEndpoint", - "properties": { - "consumerNetwork": { - "description": "The url of the consumer network.", - "type": "string" - }, - "endpoint": { - "description": "The url of a connected endpoint.", - "type": "string" - }, - "endpointWithId": { - "description": "The url of a connected endpoint with resource id.", - "type": "string" - }, - "natIps": { - "description": "NAT IPs of the connected PSC endpoint and those of other endpoints\npropagated from it.", - "items": { - "type": "string" - }, - "type": "array" - }, - "propagatedConnectionCount": { - "description": "The number of consumer Network Connectivity Center spokes that the\nconnected Private Service Connect endpoint has propagated to.", - "format": "uint32", - "type": "integer" - }, - "pscConnectionId": { - "description": "The PSC connection id of the connected endpoint.", - "format": "uint64", - "type": "string" - }, - "status": { - "description": "The status of a connected endpoint to this service attachment.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer.", - "The connection has been accepted by the producer, but the producer\nneeds to take further action before the forwarding rule can serve\ntraffic.", - "The connection is pending acceptance by the producer.", - "The consumer is still connected but not using the connection.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentConsumerProjectLimit": { - "id": "ServiceAttachmentConsumerProjectLimit", - "properties": { - "connectionLimit": { - "description": "The value of the limit to set. For endpoint_url, the limit should be no\nmore than 1.", - "format": "uint32", - "type": "integer" - }, - "endpointUrl": { - "description": "The URL for the PSC endpoint to accept", - "type": "string" - }, - "networkUrl": { - "description": "The network URL for the network to set the limit for.", - "type": "string" - }, - "projectIdOrNum": { - "description": "The project id or number for the project to set the limit for.", - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentList": { - "id": "ServiceAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ServiceAttachment resources.", - "items": { - "$ref": "ServiceAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#serviceAttachmentList", - "description": "[Output Only] Type of the resource. Alwayscompute#serviceAttachment for service attachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ServiceAttachmentTunnelingConfig": { - "description": "Use to configure this PSC connection in tunneling mode. In tunneling mode\ntraffic from consumer to producer will be encapsulated as it crosses the\nVPC boundary and traffic from producer to consumer will be decapsulated in\nthe same manner.", - "id": "ServiceAttachmentTunnelingConfig", - "properties": { - "encapsulationProfile": { - "description": "Specify the encapsulation protocol and what metadata to include in\nincoming encapsulated packet headers.", - "enum": [ - "GENEVE_SECURITY_V1", - "UNSPECIFIED_ENCAPSULATION_PROFILE" - ], - "enumDescriptions": [ - "Use GENEVE encapsulation protocol and include the SECURITY_V1 set of\nGENEVE headers.", - "" - ], - "type": "string" - }, - "routingMode": { - "description": "How this Service Attachment will treat traffic sent to the tunnel_ip,\ndestined for the consumer network.", - "enum": [ - "PACKET_INJECTION", - "STANDARD_ROUTING", - "UNSPECIFIED_ROUTING_MODE" - ], - "enumDescriptions": [ - "Traffic sent to this service attachment will be reinjected into the\nconsumer network.", - "Response traffic, after de-encapsulation, will be returned to the\nclient.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentsScopedList": { - "id": "ServiceAttachmentsScopedList", - "properties": { - "serviceAttachments": { - "description": "A list of ServiceAttachments contained in this scope.", - "items": { - "$ref": "ServiceAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nservice attachments when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ServiceIntegrationSpec": { - "description": "Specifies the parameters to configure an integration with instances.", - "id": "ServiceIntegrationSpec", - "properties": { - "backupDr": { - "$ref": "ServiceIntegrationSpecBackupDRSpec" - } - }, - "type": "object" - }, - "ServiceIntegrationSpecBackupDRSpec": { - "description": "Specifies parameters to Backup and DR to attach a BackupPlan to a compute\ninstance for managed VM backup.", - "id": "ServiceIntegrationSpecBackupDRSpec", - "properties": { - "plan": { - "description": "The BackupPlan resource to attach to the instance. Specified as a\nresource reference in instances, and regional instance templates, and as\njust the plan name in global instance templates", - "type": "string" - } - }, - "type": "object" - }, - "SetCommonInstanceMetadataOperationMetadata": { - "id": "SetCommonInstanceMetadataOperationMetadata", - "properties": { - "clientOperationId": { - "description": "[Output Only] The client operation id.", - "type": "string" - }, - "perLocationOperations": { - "additionalProperties": { - "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" - }, - "description": "[Output Only] Status information per location (location name is key).\nExample key: zones/us-central1-a", - "type": "object" - } - }, - "type": "object" - }, - "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": { - "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", - "properties": { - "error": { - "$ref": "Status", - "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is\npopulated." - }, - "state": { - "description": "[Output Only] Status of the action, which can be one of the following:\n`PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", - "enum": [ - "ABANDONED", - "DONE", - "FAILED", - "PROPAGATED", - "PROPAGATING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Operation not tracked in this location e.g. zone is marked as DOWN.", - "Operation has completed successfully.", - "Operation is in an error state.", - "Operation is confirmed to be in the location.", - "Operation is not yet confirmed to have been created in the location.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ShareSettings": { - "description": "The share setting for reservations and sole tenancy node groups.", - "id": "ShareSettings", - "properties": { - "folderMap": { - "additionalProperties": { - "$ref": "ShareSettingsFolderConfig" - }, - "description": "A map of folder id and folder config to specify consumer projects for this\nshared-reservation. This is only valid when share_type's value is\nDIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS.\nFolder id should be a string of number, and without \"folders/\" prefix.", - "type": "object" - }, - "projectMap": { - "additionalProperties": { - "$ref": "ShareSettingsProjectConfig" - }, - "description": "A map of project id and project config. This is only valid when\nshare_type's value is SPECIFIC_PROJECTS.", - "type": "object" - }, - "projects": { - "description": "A List of Project names to specify consumer projects for this\nshared-reservation. This is only valid when share_type's value is\nSPECIFIC_PROJECTS.", - "items": { - "type": "string" - }, - "type": "array" - }, - "shareType": { - "description": "Type of sharing for this shared-reservation", - "enum": [ - "DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS", - "LOCAL", - "ORGANIZATION", - "SHARE_TYPE_UNSPECIFIED", - "SPECIFIC_PROJECTS" - ], - "enumDescriptions": [ - "Shared-reservation is open to direct child projects of specific folders.", - "Default value.", - "Shared-reservation is open to entire Organization", - "Default value. This value is unused.", - "Shared-reservation is open to specific projects" - ], - "type": "string" - } - }, - "type": "object" - }, - "ShareSettingsFolderConfig": { - "description": "Config for each folder in the share settings.", - "id": "ShareSettingsFolderConfig", - "properties": { - "folderId": { - "description": "The folder ID, should be same as the key of this folder config in the\nparent map.\nFolder id should be a string of number, and without \"folders/\" prefix.", - "type": "string" - } - }, - "type": "object" - }, - "ShareSettingsProjectConfig": { - "description": "Config for each project in the share settings.", - "id": "ShareSettingsProjectConfig", - "properties": { - "projectId": { - "description": "The project ID, should be same as the key of this project config in the\nparent map.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedInstanceConfig": { - "description": "A set of Shielded Instance options.", - "id": "ShieldedInstanceConfig", - "properties": { - "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled.Enabled by\ndefault.", - "type": "boolean" - }, - "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled.Disabled by\ndefault.", - "type": "boolean" - }, - "enableVtpm": { - "description": "Defines whether the instance has the vTPM enabled.Enabled by\ndefault.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedInstanceIdentity": { - "description": "A Shielded Instance Identity.", - "id": "ShieldedInstanceIdentity", - "properties": { - "eccP256EncryptionKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) made by the ECC P256 algorithm\nissued to the Shielded Instance's vTPM." - }, - "eccP256SigningKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) made by the ECC P256 algorithm\nissued to the Shielded Instance's vTPM." - }, - "encryptionKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) made by the RSA 2048 algorithm\nissued to the Shielded Instance's vTPM." - }, - "kind": { - "default": "compute#shieldedInstanceIdentity", - "description": "[Output Only] Type of the resource. Alwayscompute#shieldedInstanceIdentity for shielded Instance\nidentity entry.", - "type": "string" - }, - "signingKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) made by the RSA 2048 algorithm\nissued to the Shielded Instance's vTPM." - } - }, - "type": "object" - }, - "ShieldedInstanceIdentityEntry": { - "description": "A Shielded Instance Identity Entry.", - "id": "ShieldedInstanceIdentityEntry", - "properties": { - "ekCert": { - "description": "A PEM-encoded X.509 certificate. This field can be empty.", - "type": "string" - }, - "ekPub": { - "description": "A PEM-encoded public key.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedInstanceIntegrityPolicy": { - "description": "The policy describes the baseline against which\nInstance boot integrity is measured.", - "id": "ShieldedInstanceIntegrityPolicy", - "properties": { - "updateAutoLearnPolicy": { - "description": "Updates the integrity policy baseline using the\nmeasurements from the VM instance's most recent boot.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedVmConfig": { - "description": "A set of Shielded VM options.", - "id": "ShieldedVmConfig", - "properties": { - "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled.", - "type": "boolean" - }, - "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled.", - "type": "boolean" - }, - "enableVtpm": { - "description": "Defines whether the instance has the vTPM enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedVmIdentity": { - "description": "A Shielded VM Identity.", - "id": "ShieldedVmIdentity", - "properties": { - "encryptionKey": { - "$ref": "ShieldedVmIdentityEntry", - "description": "An Endorsement Key (EK) issued to the Shielded VM's vTPM." - }, - "kind": { - "default": "compute#shieldedVmIdentity", - "description": "[Output Only] Type of the resource. Alwayscompute#shieldedVmIdentity for shielded VM identity entry.", - "type": "string" - }, - "signingKey": { - "$ref": "ShieldedVmIdentityEntry", - "description": "An Attestation Key (AK) issued to the Shielded VM's vTPM." - } - }, - "type": "object" - }, - "ShieldedVmIdentityEntry": { - "description": "A Shielded Instance Identity Entry.", - "id": "ShieldedVmIdentityEntry", - "properties": { - "ekCert": { - "description": "A PEM-encoded X.509 certificate. This field can be empty.", - "type": "string" - }, - "ekPub": { - "description": "A PEM-encoded public key.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedVmIntegrityPolicy": { - "description": "The policy describes the baseline against which\nVM instance boot integrity is measured.", - "id": "ShieldedVmIntegrityPolicy", - "properties": { - "updateAutoLearnPolicy": { - "description": "Updates the integrity policy baseline using the\nmeasurements from the VM instance's most recent boot.", - "type": "boolean" - } - }, - "type": "object" - }, - "SignedUrlKey": { - "description": "Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs", - "id": "SignedUrlKey", - "properties": { - "keyName": { - "description": "Name of the key. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "keyValue": { - "description": "128-bit key value used for signing the URL. The key value must be a validRFC\n4648 Section 5 base64url encoded string.", - "type": "string" - } - }, - "type": "object" - }, - "Snapshot": { - "description": "Represents a Persistent Disk Snapshot resource.\n\nYou can use snapshots to back up data on a regular interval. For more\ninformation, read Creating\npersistent disk snapshots.", - "id": "Snapshot", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the snapshot. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "autoCreated": { - "description": "[Output Only] Set to true if snapshots are automatically created by\napplying resource policy on the target disk.", - "type": "boolean" - }, - "chainName": { - "description": "Creates the new snapshot in the snapshot chain labeled with the\nspecified name. The chain name must be 1-63 characters long and comply\nwith RFC1035. This is an uncommon option only for advanced service\nowners who needs to create separate snapshot chains, for example,\nfor chargeback tracking. When you describe your snapshot resource, this\nfield is visible only if it has a non-empty value.", - "type": "string" - }, - "creationSizeBytes": { - "description": "[Output Only] Size in bytes of the snapshot at creation time.", - "format": "int64", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "[Output Only] Size of the source disk, specified in GB.", - "format": "int64", - "type": "string" - }, - "downloadBytes": { - "description": "[Output Only] Number of bytes downloaded to restore a snapshot to a disk.", - "format": "int64", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this snapshot is created from a confidential compute mode disk.\n[Output Only]: This field is not set by user, but from source disk.", - "type": "boolean" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent snapshot by\ninforming the OS to prepare for the snapshot process.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "[Output Only] A list of features to enable on the guest operating system.\nApplicable only for bootable images. Read \nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#snapshot", - "description": "[Output Only] Type of the resource. Always compute#snapshot\nfor Snapshot resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this snapshot, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a snapshot.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this snapshot. These can be later modified by\nthe setLabels method.\nLabel values may be empty.", - "type": "object" - }, - "licenseCodes": { - "description": "[Output Only] Integer license codes indicating which licenses are attached\nto this snapshot.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "[Output Only] A list of public visible licenses that apply to this\nsnapshot. This can be because the original image had licenses attached\n(such as a Windows image).", - "items": { - "type": "string" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the snapshot close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "maxRetentionDays": { - "description": "Number of days the snapshot should be retained before being deleted\nautomatically.", - "format": "int32", - "type": "integer" - }, - "name": { - "annotations": { - "required": [ - "compute.disks.createSnapshot", - "compute.snapshots.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "SnapshotParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the snapshot resides. Only applicable\nfor regional snapshots.", - "type": "string" - }, - "resourceStatus": { - "$ref": "SnapshotResourceStatus", - "description": "[Output only] ResourceStatus of the Snapshot resource" - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using acustomer-supplied\nencryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must\nprovide the same key if you use the snapshot later. For example, you must\nprovide the encryption key when you create a disk from the encrypted\nsnapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata\nof the snapshot.\n\nIf you do not provide an encryption key when creating the snapshot, then\nthe snapshot will be encrypted using an automatically generated key and you\ndo not need to provide a key to use the snapshot later." - }, - "snapshotGroupId": { - "description": "[Output Only] The unique ID of the snapshot group that this snapshot\nbelongs to.", - "type": "string" - }, - "snapshotGroupName": { - "description": "[Output only] The snapshot group that this snapshot belongs to.", - "type": "string" - }, - "snapshotType": { - "description": "Indicates the type of the snapshot.", - "enum": [ - "ARCHIVE", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "sourceDisk": { - "description": "The source disk used to create this snapshot.", - "type": "string" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDiskForRecoveryCheckpoint": { - "description": "The source disk whose recovery checkpoint will be used to create this\nsnapshot.", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The ID value of the disk used to create this snapshot. This\nvalue may be used to determine whether the snapshot was taken from the\ncurrent or a previous instance of a given disk name.", - "type": "string" - }, - "sourceInstantSnapshot": { - "description": "The source instant snapshot used to create this snapshot. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot\n - projects/project/zones/zone/instantSnapshots/instantSnapshot \n - zones/zone/instantSnapshots/instantSnapshot", - "type": "string" - }, - "sourceInstantSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Customer provided encryption key when creating Snapshot from Instant\nSnapshot." - }, - "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this\nsnapshot. This value identifies the exact instant snapshot that was used to\ncreate this snapshot. For example, if you created the snapshot from an\ninstant snapshot that was later deleted and recreated under the same name,\nthe source instant snapshot ID would identify the exact instant snapshot\nthat was used.", - "type": "string" - }, - "sourceSnapshotSchedulePolicy": { - "description": "[Output Only] URL of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "sourceSnapshotSchedulePolicyId": { - "description": "[Output Only] ID of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the snapshot. This can beCREATING, DELETING, FAILED,READY, or UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "Snapshot creation is in progress.", - "Snapshot is currently being deleted.", - "Snapshot creation failed.", - "Snapshot has been created successfully.", - "Snapshot is being uploaded." - ], - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] A size of the storage used by the snapshot. As snapshots\nshare storage, this number is expected to change with snapshot\ncreation/deletion.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the snapshot (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLicenses": { - "description": "[Output Only] A list of user provided licenses represented by a list of\nURLs to the license resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SnapshotAggregatedList": { - "id": "SnapshotAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SnapshotsScopedList", - "description": "[Output Only] Name of the scope containing this set of snapshots." - }, - "description": "A list of SnapshotsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#snapshotAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#snapshotAggregatedList for aggregated lists of\nsnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SnapshotGroup": { - "description": "Represents a SnapshotGroup resource.\n\nA snapshot group is a set of snapshots that represents a point in time state\nof a consistency group.", - "id": "SnapshotGroup", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "Optional. An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#snapshotGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#snapshotGroup for SnapshotGroup\nresources.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sourceInfo": { - "$ref": "SnapshotGroupSourceInfo", - "description": "[Output Only]" - }, - "sourceInstantSnapshotGroup": { - "description": "Input field for the source instant snapshot group.", - "type": "string" - }, - "sourceInstantSnapshotGroupInfo": { - "$ref": "SnapshotGroupSourceInstantSnapshotGroupInfo", - "description": "[Output Only]" - }, - "status": { - "description": "[Output Only]", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "INVALID", - "READY", - "UNKNOWN", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SnapshotGroupParameters": { - "id": "SnapshotGroupParameters", - "properties": { - "replicaZones": { - "description": "URLs of the zones where disks should be replicated to. Only applicable\nfor regional resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceSnapshotGroup": { - "description": "The source snapshot group used to create disks. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/snapshotGroups/snapshotGroup \n - projects/project/global/snapshotGroups/snapshotGroup\n - global/snapshotGroups/snapshotGroup", - "type": "string" - }, - "type": { - "description": "URL of the disk type resource describing which disk type to use to create\ndisks. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk\ntypes.", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotGroupSourceInfo": { - "id": "SnapshotGroupSourceInfo", - "properties": { - "consistencyGroup": { - "type": "string" - }, - "consistencyGroupId": { - "type": "string" - } - }, - "type": "object" - }, - "SnapshotGroupSourceInstantSnapshotGroupInfo": { - "id": "SnapshotGroupSourceInstantSnapshotGroupInfo", - "properties": { - "instantSnapshotGroup": { - "type": "string" - }, - "instantSnapshotGroupId": { - "type": "string" - } - }, - "type": "object" - }, - "SnapshotList": { - "description": "Contains a list of Snapshot resources.", - "id": "SnapshotList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Snapshot resources.", - "items": { - "$ref": "Snapshot" - }, - "type": "array" - }, - "kind": { - "default": "compute#snapshotList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SnapshotParams": { - "description": "Additional snapshot params.", - "id": "SnapshotParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the snapshot. Tag keys and values have\nthe same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "SnapshotResourceStatus": { - "id": "SnapshotResourceStatus", - "properties": { - "scheduledDeletionTime": { - "description": "[Output only] Scheduled deletion time of the snapshot. The snapshot will\nbe deleted by the at any point within one hour after the deletion time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettings": { - "id": "SnapshotSettings", - "properties": { - "accessLocation": { - "$ref": "SnapshotSettingsAccessLocation", - "description": "(Regional snapshots use only)Policy of which location is allowed to access\nsnapshot." - }, - "storageLocation": { - "$ref": "SnapshotSettingsStorageLocationSettings", - "description": "Policy of which storage location is going to be resolved, and additional\ndata that particularizes how the policy is going to be carried out." - } - }, - "type": "object" - }, - "SnapshotSettingsAccessLocation": { - "id": "SnapshotSettingsAccessLocation", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "SnapshotSettingsAccessLocationAccessLocationPreference" - }, - "description": "List of regions that can restore a regional\n snapshot from the current region", - "type": "object" - }, - "policy": { - "description": "Policy of which location is allowed to access snapshot.", - "enum": [ - "ALL_REGIONS", - "POLICY_UNSPECIFIED", - "SPECIFIC_REGIONS" - ], - "enumDescriptions": [ - "Any regions will be able to access the source location.", - "", - "Only allowlisted regions will be able to restore region scoped\nsnapshots" - ], - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsAccessLocationAccessLocationPreference": { - "description": "A structure for specifying an allowed target region.", - "id": "SnapshotSettingsAccessLocationAccessLocationPreference", - "properties": { - "region": { - "description": "Accessible region name", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsStorageLocationSettings": { - "id": "SnapshotSettingsStorageLocationSettings", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "SnapshotSettingsStorageLocationSettingsStorageLocationPreference" - }, - "description": "When the policy is SPECIFIC_LOCATIONS, snapshots will be stored\nin the locations listed in this field. Keys are Cloud Storage bucket\nlocations. Only one location can be specified.", - "type": "object" - }, - "policy": { - "description": "The chosen location policy.", - "enum": [ - "LOCAL_REGION", - "NEAREST_MULTI_REGION", - "SPECIFIC_LOCATIONS", - "STORAGE_LOCATION_POLICY_UNSPECIFIED" - ], - "enumDescriptions": [ - "Store snapshot in the same region as with the originating disk.\nNo additional parameters are needed.", - "Store snapshot in the nearest multi region Cloud Storage bucket,\nrelative to the originating disk. No additional parameters are needed.", - "Store snapshot in the specific locations, as specified by the user.\nThe list of regions to store must be defined under the `locations`\nfield.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsStorageLocationSettingsStorageLocationPreference": { - "description": "A structure for specifying storage locations.", - "id": "SnapshotSettingsStorageLocationSettingsStorageLocationPreference", - "properties": { - "name": { - "description": "Name of the location. It should be one of the Cloud Storage buckets.\nOnly one location can be specified.", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotsScopedList": { - "id": "SnapshotsScopedList", - "properties": { - "snapshots": { - "description": "[Output Only] A list of snapshots contained in this scope.", - "items": { - "$ref": "Snapshot" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of snapshots\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SourceDiskEncryptionKey": { - "id": "SourceDiskEncryptionKey", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDisk": { - "description": "URL of the disk attached to the source instance. This can be a full or\nvalid partial URL. For example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "SourceInstanceParams": { - "description": "A specification of the parameters to use when creating the instance template\nfrom a source instance.", - "id": "SourceInstanceParams", - "properties": { - "diskConfigs": { - "description": "Attached disks configuration. If not provided, defaults are applied:\nFor boot disk and any other R/W disks, the source images for each disk\nwill be used. For read-only disks, they will be attached in read-only\nmode. Local SSD disks will be created as blank volumes.", - "items": { - "$ref": "DiskInstantiationConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SourceInstanceProperties": { - "description": "DEPRECATED: Please use compute#instanceProperties instead.\nNew properties will not be added to this field.", - "id": "SourceInstanceProperties", - "properties": { - "canIpForward": { - "description": "Enables instances created based on this machine image to send packets with\nsource IP addresses other than their own and receive packets with\ndestination IP addresses other than their own. If these instances will be\nused as an IP gateway or it will be set as the next-hop in a Route\nresource, specify true. If unsure, leave this set tofalse. See theEnable IP forwarding\ndocumentation for more information.", - "type": "boolean" - }, - "deletionProtection": { - "description": "Whether the instance created from this machine image should be protected\nagainst deletion.", - "type": "boolean" - }, - "description": { - "description": "An optional text description for the instances that are created from this\nmachine image.", - "type": "string" - }, - "disks": { - "description": "An array of disks that are associated with the instances that are created\nfrom this machine image.", - "items": { - "$ref": "SavedAttachedDisk" - }, - "type": "array" - }, - "guestAccelerators": { - "description": "A list of guest accelerator cards' type and count to use for instances\ncreated from this machine image.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to instances that are created from this machine image.", - "type": "object" - }, - "machineType": { - "description": "The machine type to use for instances that are created from this machine\nimage.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from\nthis machine image. These pairs can consist of custom metadata or\npredefined keys. SeeProject and\ninstance metadata for more information." - }, - "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by instances created from this machine\nimage. The instance may be scheduled on the specified or newer\ncpu/platform. Applicable values are the friendly names of CPU platforms,\nsuch as minCpuPlatform: \"Intel Haswell\" orminCpuPlatform: \"Intel Sandy Bridge\". For more\ninformation, read Specifying a\nMinimum CPU Platform.", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from\nthis machine image." - }, - "serviceAccounts": { - "description": "A list of service accounts with specified scopes. Access tokens for these\nservice accounts are available to the instances that are created from this\nmachine image. Use metadata queries to obtain the access tokens for these\ninstances.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this machine\nimage. The tags identify valid sources or targets for network firewalls.\nThe setTags method can modify this list of tags. Each tag within the list\nmust comply withRFC1035." - } - }, - "type": "object" - }, - "SslCertificate": { - "description": "Represents an SSL certificate resource.\n\nGoogle Compute Engine has two SSL certificate resources:\n\n* [Global](/compute/docs/reference/rest/alpha/sslCertificates)\n* [Regional](/compute/docs/reference/rest/alpha/regionSslCertificates)\n\n\nThe global SSL certificates (sslCertificates) are used by:\n \n - Global external Application Load Balancers\n - Classic Application Load Balancers\n - Proxy Network Load Balancers (with target SSL proxies)\n\n\n\nThe regional SSL certificates (regionSslCertificates) are used\nby:\n \n - Regional external Application Load Balancers\n - Regional internal Application Load Balancers\n\n\n\nOptionally, certificate file contents that you upload can contain a set of up\nto five PEM-encoded certificates.\nThe API call creates an object (sslCertificate) that holds this data.\nYou can use SSL keys and certificates to secure connections to a load\nbalancer.\nFor more information, read \nCreating and using SSL certificates,SSL certificates\nquotas and limits, and\nTroubleshooting SSL certificates.", - "id": "SslCertificate", - "properties": { - "certificate": { - "description": "A value read into memory from a certificate file. The certificate file must\nbe in PEM format. The certificate chain must be no greater than 5 certs\nlong. The chain must include at least one intermediate cert.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "expireTime": { - "description": "[Output Only] Expire time of the certificate. RFC3339", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#sslCertificate", - "description": "[Output Only] Type of the resource. Alwayscompute#sslCertificate for SSL certificates.", - "type": "string" - }, - "managed": { - "$ref": "SslCertificateManagedSslCertificate", - "description": "Configuration and status of a managed SSL certificate." - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "privateKey": { - "description": "A value read into memory from a write-only private key file. The private\nkey file must be in PEM format. For security, only insert\nrequests include this field.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional SSL Certificate\nresides. This field is not applicable to global SSL Certificate.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "selfManaged": { - "$ref": "SslCertificateSelfManagedSslCertificate", - "description": "Configuration and status of a self-managed SSL certificate." - }, - "subjectAlternativeNames": { - "description": "[Output Only] Domains associated with the certificate via Subject\nAlternative Name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "description": "(Optional) Specifies the type of SSL certificate, either \"SELF_MANAGED\" or\n\"MANAGED\". If not specified, the certificate is self-managed and the fieldscertificate and private_key are used.", - "enum": [ - "MANAGED", - "SELF_MANAGED", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Google-managed SSLCertificate.", - "Certificate uploaded by user.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SslCertificateAggregatedList": { - "id": "SslCertificateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SslCertificatesScopedList", - "description": "Name of the scope containing this set of SslCertificates." - }, - "description": "A list of SslCertificatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#sslCertificateAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#sslCertificateAggregatedList for lists of SSL\nCertificates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslCertificateList": { - "description": "Contains a list of SslCertificate resources.", - "id": "SslCertificateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SslCertificate resources.", - "items": { - "$ref": "SslCertificate" - }, - "type": "array" - }, - "kind": { - "default": "compute#sslCertificateList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslCertificateManagedSslCertificate": { - "description": "Configuration and status of a managed SSL certificate.", - "id": "SslCertificateManagedSslCertificate", - "properties": { - "domainStatus": { - "additionalProperties": { - "enum": [ - "ACTIVE", - "DOMAIN_STATUS_UNSPECIFIED", - "FAILED_CAA_CHECKING", - "FAILED_CAA_FORBIDDEN", - "FAILED_NOT_VISIBLE", - "FAILED_RATE_LIMITED", - "PROVISIONING" - ], - "enumDescriptions": [ - "A managed certificate can be provisioned, no issues for this domain.", - "", - "Failed to check CAA records for the domain.", - "Certificate issuance forbidden by an explicit CAA record for the\ndomain.", - "There seems to be problem with the user's DNS or load balancer\nconfiguration for this domain.", - "Reached rate-limit for certificates per top-level private domain.", - "Certificate provisioning for this domain is under way. GCP will\nattempt to provision the first certificate." - ], - "type": "string" - }, - "description": "[Output only] Detailed statuses of the domains specified for managed\ncertificate resource.", - "type": "object" - }, - "domains": { - "description": "The domains for which a managed SSL certificate will be generated. Each\nGoogle-managed SSL certificate supports up to the [maximum number of\ndomains per Google-managed SSL\ncertificate](/load-balancing/docs/quotas#ssl_certificates).", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "[Output only] Status of the managed certificate resource.", - "enum": [ - "ACTIVE", - "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED", - "PROVISIONING", - "PROVISIONING_FAILED", - "PROVISIONING_FAILED_PERMANENTLY", - "RENEWAL_FAILED" - ], - "enumDescriptions": [ - "The certificate management is working, and a certificate has been\nprovisioned.", - "", - "The certificate management is working. GCP will attempt to provision\nthe first certificate.", - "Certificate provisioning failed due to an issue with the DNS\nor load balancing configuration.\nFor details of which domain failed, consult domain_status field.", - "Certificate provisioning failed due to an issue with the DNS\nor load balancing configuration. It won't be retried. To try again\ndelete and create a new managed SslCertificate resource.\nFor details of which domain failed, consult domain_status field.", - "Renewal of the certificate has failed due to an issue with the DNS\nor load balancing configuration. The existing cert is still serving;\nhowever, it will expire shortly. To provision a renewed certificate,\ndelete and create a new managed SslCertificate resource.\nFor details on which domain failed, consult domain_status field." - ], - "type": "string" - } - }, - "type": "object" - }, - "SslCertificateSelfManagedSslCertificate": { - "description": "Configuration and status of a self-managed SSL certificate.", - "id": "SslCertificateSelfManagedSslCertificate", - "properties": { - "certificate": { - "description": "A local certificate file. The certificate must be in\nPEM format. The certificate chain must be no greater than 5 certs\nlong. The chain must include at least one intermediate cert.", - "type": "string" - }, - "privateKey": { - "description": "A write-only private key in PEM format. Only insert\nrequests will include this field.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertificatesScopedList": { - "id": "SslCertificatesScopedList", - "properties": { - "sslCertificates": { - "description": "List of SslCertificates contained in this scope.", - "items": { - "$ref": "SslCertificate" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesAggregatedList": { - "id": "SslPoliciesAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SslPoliciesScopedList", - "description": "Name of the scope containing this set of SSL policies." - }, - "description": "A list of SslPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#sslPoliciesAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#sslPolicyAggregatedList for lists of SSL Policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesList": { - "id": "SslPoliciesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SslPolicy resources.", - "items": { - "$ref": "SslPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#sslPoliciesList", - "description": "[Output Only] Type of the resource. Alwayscompute#sslPoliciesList for lists of sslPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesListAvailableFeaturesResponse": { - "id": "SslPoliciesListAvailableFeaturesResponse", - "properties": { - "features": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SslPoliciesScopedList": { - "id": "SslPoliciesScopedList", - "properties": { - "sslPolicies": { - "description": "A list of SslPolicies contained in this scope.", - "items": { - "$ref": "SslPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nSSL policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPolicy": { - "description": "Represents an SSL Policy resource.\n\nUse SSL policies to control SSL features, such as versions and cipher\nsuites, that are offered by Application Load Balancers and proxy Network Load\nBalancers. For more information, read \nSSL policies overview.", - "id": "SslPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customFeatures": { - "description": "A list of features enabled when the selected profile is CUSTOM. The\n method returns the set of features that can be\nspecified in this list. This field must be empty if the profile is notCUSTOM.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enabledFeatures": { - "description": "[Output Only] The list of features enabled in the SSL policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a SslPolicy. An up-to-date fingerprint must be\nprovided in order to update the SslPolicy, otherwise the\nrequest will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an SslPolicy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#sslPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL policies.", - "type": "string" - }, - "minTlsVersion": { - "description": "The minimum version of SSL protocol that can be used by the clients to\nestablish a connection with the load balancer. This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field\nmust be set to RESTRICTED.", - "enum": [ - "TLS_1_0", - "TLS_1_1", - "TLS_1_2", - "TLS_1_3" - ], - "enumDescriptions": [ - "TLS 1.0", - "TLS 1.1", - "TLS 1.2", - "TLS 1.3" - ], - "type": "string" - }, - "name": { - "description": "Name of the resource. The name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "profile": { - "description": "Profile specifies the set of SSL features that can be used by the load\nbalancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features\nto enable must be specified in the customFeatures field.", - "enum": [ - "COMPATIBLE", - "CUSTOM", - "FIPS_202205", - "MODERN", - "RESTRICTED" - ], - "enumDescriptions": [ - "Compatible profile. Allows the broadset set of clients, even those which\nsupport only out-of-date SSL features to negotiate with the load\nbalancer.", - "Custom profile. Allow only the set of allowed SSL features specified in\nthe customFeatures field.", - "FIPS compatible profile. Supports a reduced set of SSL features,\nintended to meet FIPS 140-3 compliance requirements.", - "Modern profile. Supports a wide set of SSL features, allowing modern\nclients to negotiate SSL with the load balancer.", - "Restricted profile. Supports a reduced set of SSL features, intended to\nmeet stricter compliance requirements." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional SSL policy\nresides. This field is not applicable to global SSL policies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "tlsSettings": { - "$ref": "ServerTlsSettings", - "description": "Security settings for the proxy. This field is only applicable to a\nglobal backend service with the loadBalancingScheme set toINTERNAL_SELF_MANAGED." - }, - "warnings": { - "description": "[Output Only] If potential misconfigurations are detected for this\nSSL policy, this field will be populated with warning messages.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "SslPolicyReference": { - "id": "SslPolicyReference", - "properties": { - "sslPolicy": { - "description": "URL of the SSL policy resource. Set this to empty string to clear any\nexisting SSL policy associated with the target proxy resource.", - "type": "string" - } - }, - "type": "object" - }, - "StatefulPolicy": { - "id": "StatefulPolicy", - "properties": { - "preservedState": { - "$ref": "StatefulPolicyPreservedState" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedState": { - "description": "Configuration of preserved resources.", - "id": "StatefulPolicyPreservedState", - "properties": { - "disks": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateDiskDevice" - }, - "description": "Disks created on the instances that will be preserved on instance\ndelete, update, etc. This map is keyed with the device names of\nthe disks.", - "type": "object" - }, - "externalIPs": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateNetworkIp" - }, - "description": "External network IPs assigned to the instances that will be preserved on\ninstance delete, update, etc. This map is keyed with the network\ninterface name.", - "type": "object" - }, - "internalIPs": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateNetworkIp" - }, - "description": "Internal network IPs assigned to the instances that will be preserved on\ninstance delete, update, etc. This map is keyed with the network\ninterface name.", - "type": "object" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedStateDiskDevice": { - "id": "StatefulPolicyPreservedStateDiskDevice", - "properties": { - "autoDelete": { - "description": "These stateful disks will never be deleted during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the disk should be deleted after it\nis no longer used by the group, e.g. when the given instance or\nthe whole group is deleted. Note: disks attached inREAD_ONLY mode cannot be auto-deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedStateNetworkIp": { - "id": "StatefulPolicyPreservedStateNetworkIp", - "properties": { - "autoDelete": { - "description": "These stateful IPs will never be released during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the IP reservation should be deleted\nafter it is no longer used by the group, e.g. when the given instance\nor the whole group is deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[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\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "format": "google.protobuf.Any", - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePool": { - "description": "Represents a zonal storage pool resource.", - "id": "StoragePool", - "properties": { - "capacityProvisioningType": { - "description": "Provisioning type of the byte capacity of the pool.", - "enum": [ - "ADVANCED", - "STANDARD", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Advanced provisioning \"thinly\" allocates the related resource.", - "Standard provisioning allocates the related resource for the pool\ndisks' exclusive use.", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "exapoolProvisionedCapacityGb": { - "$ref": "StoragePoolExapoolProvisionedCapacityGb", - "description": "[Output Only] Provisioned capacities for each SKU for this Exapool in GiB" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#storagePool", - "description": "[Output Only] Type of the resource. Always compute#storagePool\nfor storage pools.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this storage pool, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a storage pool.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this storage pool. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.storagePools.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "performanceProvisioningType": { - "description": "Provisioning type of the performance-related parameters of the pool,\nsuch as throughput and IOPS.", - "enum": [ - "ADVANCED", - "STANDARD", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Advanced provisioning \"thinly\" allocates the related resource.", - "Standard provisioning allocates the related resource for the pool\ndisks' exclusive use.", - "" - ], - "type": "string" - }, - "poolProvisionedCapacityGb": { - "annotations": { - "required": [ - "compute.storagePools.insert" - ] - }, - "description": "Size of the storage pool in GiB. For more information about the size\nlimits, see https://cloud.google.com/compute/docs/disks/storage-pools.", - "format": "int64", - "type": "string" - }, - "poolProvisionedIops": { - "description": "Provisioned IOPS of the storage pool. Only relevant if the storage pool\ntype is hyperdisk-balanced.", - "format": "int64", - "type": "string" - }, - "poolProvisionedThroughput": { - "description": "Provisioned throughput of the storage pool in MiB/s. Only relevant if the\nstorage pool type is hyperdisk-balanced or hyperdisk-throughput.", - "format": "int64", - "type": "string" - }, - "provisionedIops": { - "description": "DEPRECATED -- use \"pool provisioned IOPS\".", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "DEPRECATED -- use \"pool provisioned throughput\".", - "format": "int64", - "type": "string" - }, - "resourceStatus": { - "$ref": "StoragePoolResourceStatus", - "description": "[Output Only] Status information for the storage pool resource." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sizeGb": { - "description": "DEPRECATED -- use \"pool provisioned capacity gb\".", - "format": "int64", - "type": "string" - }, - "state": { - "description": "[Output Only] The status of storage pool creation.\n \n \n - CREATING: Storage pool is provisioning.\n storagePool.\n - FAILED: Storage pool creation failed.\n - READY: Storage pool is ready for use.\n - DELETING: Storage pool is deleting.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "StoragePool is provisioning", - "StoragePool is deleting.", - "StoragePool creation failed.", - "StoragePool is ready for use." - ], - "type": "string" - }, - "status": { - "$ref": "StoragePoolResourceStatus", - "description": "[Output Only] Status information for the storage pool resource." - }, - "storagePoolType": { - "description": "Type of the storage pool.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the storage pool resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolAggregatedList": { - "id": "StoragePoolAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "StoragePoolsScopedList", - "description": "[Output Only] Name of the scope containing this set of storage pool." - }, - "description": "A list of StoragePoolsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#storagePoolAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolAggregatedList for aggregated lists of\nstorage pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolDisk": { - "id": "StoragePoolDisk", - "properties": { - "attachedInstances": { - "description": "[Output Only] Instances this disk is attached to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "disk": { - "description": "[Output Only] The URL of the disk.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the disk.", - "type": "string" - }, - "provisionedIops": { - "description": "[Output Only] The number of IOPS provisioned for the disk.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "[Output Only] The throughput provisioned for the disk.", - "format": "int64", - "type": "string" - }, - "resourcePolicies": { - "description": "[Output Only] Resource policies applied to disk for automatic snapshot\ncreations.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sizeGb": { - "description": "[Output Only] The disk size, in GB.", - "format": "int64", - "type": "string" - }, - "status": { - "description": "[Output Only] The disk status.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "RESTORING", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "Disk is provisioning", - "Disk is deleting.", - "Disk creation failed.", - "Disk is ready for use.", - "Source data is being copied into the disk.", - "Disk is currently unavailable and cannot be accessed, attached or\ndetached." - ], - "type": "string" - }, - "type": { - "description": "[Output Only] The disk type.", - "type": "string" - }, - "usedBytes": { - "description": "[Output Only] Amount of disk space used.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolExapoolProvisionedCapacityGb": { - "description": "Exapool provisioned capacities for each SKU type", - "id": "StoragePoolExapoolProvisionedCapacityGb", - "properties": { - "capacityOptimized": { - "description": "Size, in GiB, of provisioned capacity-optimized capacity for this Exapool", - "format": "int64", - "type": "string" - }, - "readOptimized": { - "description": "Size, in GiB, of provisioned read-optimized capacity for this Exapool", - "format": "int64", - "type": "string" - }, - "writeOptimized": { - "description": "Size, in GiB, of provisioned write-optimized capacity for this Exapool", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolList": { - "description": "A list of StoragePool resources.", - "id": "StoragePoolList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePool resources.", - "items": { - "$ref": "StoragePool" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolList", - "description": "[Output Only] Type of resource. Always compute#storagePoolList\nfor lists of storagePools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolListDisks": { - "id": "StoragePoolListDisks", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePoolDisk resources.", - "items": { - "$ref": "StoragePoolDisk" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolListDisks", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolListDisks for lists of disks in a\nstoragePool.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "StoragePoolResourceStatus", - "properties": { - "aggregateDiskProvisionedIops": { - "description": "DEPRECATED -- use \"total_provisioned_disk_iops\".", - "format": "int64", - "type": "string" - }, - "aggregateDiskSizeGb": { - "description": "DEPRECATED -- use \"total provisioned disk size gb\".", - "format": "int64", - "type": "string" - }, - "diskCount": { - "description": "[Output Only] Number of disks used.", - "format": "int64", - "type": "string" - }, - "exapoolMaxReadIops": { - "description": "[Output Only] Maximum allowed read IOPS for this Exapool.", - "format": "int64", - "type": "string" - }, - "exapoolMaxReadThroughput": { - "description": "[Output Only] Maximum allowed read throughput in MiB/s for\nthis Exapool.", - "format": "int64", - "type": "string" - }, - "exapoolMaxWriteIops": { - "description": "[Output Only] Maximum allowed write IOPS for this Exapool.", - "format": "int64", - "type": "string" - }, - "exapoolMaxWriteThroughput": { - "description": "[Output Only] Maximum allowed write throughput in MiB/s\nfor this Exapool.", - "format": "int64", - "type": "string" - }, - "lastResizeTimestamp": { - "description": "[Output Only] Timestamp of the last successful resize inRFC3339 text format.", - "type": "string" - }, - "maxAggregateDiskSizeGb": { - "description": "DEPRECATED -- use \"max provisioned disk size gb\"", - "format": "int64", - "type": "string" - }, - "maxTotalProvisionedDiskCapacityGb": { - "description": "[Output Only] Maximum allowed aggregate disk size in GiB.", - "format": "int64", - "type": "string" - }, - "numberOfDisks": { - "description": "DEPRECATED -- use \"disk count\".", - "format": "int64", - "type": "string" - }, - "poolUsedCapacityBytes": { - "description": "[Output Only] Space used by data stored in disks within the storage pool\n(in bytes). This will reflect the total number of bytes written to the\ndisks in the pool, in contrast to the capacity of those disks.", - "format": "int64", - "type": "string" - }, - "poolUsedIops": { - "description": "[Output Only] Sum of all the disks' provisioned IOPS, minus some amount\nthat is allowed per disk that is not counted towards pool's IOPS\ncapacity. For more information, see\nhttps://cloud.google.com/compute/docs/disks/storage-pools.", - "format": "int64", - "type": "string" - }, - "poolUsedThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s.", - "format": "int64", - "type": "string" - }, - "poolUserWrittenBytes": { - "description": "[Output Only] Amount of data written into the pool, before it is\ncompacted.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskCapacityGb": { - "description": "[Output Only] Sum of all the disks' provisioned capacity (in GiB) in\nthis storage pool. A disk's provisioned capacity is the same as its total\ncapacity.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskIops": { - "description": "[Output Only] Sum of all the disks' provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s,\nminus some amount that is allowed per disk that is not counted towards\npool's throughput capacity.", - "format": "int64", - "type": "string" - }, - "usedBytes": { - "description": "DEPRECATED -- use \"pool used capacity\".", - "format": "int64", - "type": "string" - }, - "usedReducedBytes": { - "description": "DEPRECATED -- do not use, will be removed.", - "format": "int64", - "type": "string" - }, - "usedThroughput": { - "description": "DEPRECATED -- use \"pool used throughput\".", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolType": { - "id": "StoragePoolType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this storage pool\ntype." - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#storagePoolType", - "description": "[Output Only] Type of the resource. Alwayscompute#storagePoolType for storage pool types.", - "type": "string" - }, - "maxPoolProvisionedCapacityGb": { - "description": "[Output Only] Maximum storage pool size in GB.", - "format": "int64", - "type": "string" - }, - "maxPoolProvisionedIops": { - "description": "[Output Only] Maximum provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "maxPoolProvisionedThroughput": { - "description": "[Output Only] Maximum provisioned throughput.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedCapacityGb": { - "description": "[Output Only] Minimum storage pool size in GB.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedIops": { - "description": "[Output Only] Minimum provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedThroughput": { - "description": "[Output Only] Minimum provisioned throughput.", - "format": "int64", - "type": "string" - }, - "minSizeGb": { - "description": "[Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb\ninstead.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "supportedDiskTypes": { - "description": "[Output Only] The list of disk types supported in this storage pool type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the storage pool type resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolTypeAggregatedList": { - "id": "StoragePoolTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "StoragePoolTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of storage pool types." - }, - "description": "A list of StoragePoolTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#storagePoolTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolTypeAggregatedList.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolTypeList": { - "description": "Contains a list of storage pool types.", - "id": "StoragePoolTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePoolType resources.", - "items": { - "$ref": "StoragePoolType" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolTypeList for storage pool types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolTypesScopedList": { - "id": "StoragePoolTypesScopedList", - "properties": { - "storagePoolTypes": { - "description": "[Output Only] A list of storage pool types contained in this scope.", - "items": { - "$ref": "StoragePoolType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of storage pool\ntypes when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolsScopedList": { - "id": "StoragePoolsScopedList", - "properties": { - "storagePools": { - "description": "[Output Only] A list of storage pool contained in this scope.", - "items": { - "$ref": "StoragePool" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of storage pool\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StructuredEntries": { - "id": "StructuredEntries", - "properties": { - "entries": { - "additionalProperties": { - "format": "google.protobuf.Value", - "type": "any" - }, - "description": "Map of a partner metadata that belong to the same subdomain.\nIt accepts any value including google.protobuf.Struct.", - "type": "object" - } - }, - "type": "object" - }, - "Subnetwork": { - "description": "Represents a Subnetwork resource.\n\nA subnetwork (also known as a subnet) is a logical partition of a Virtual\nPrivate Cloud network with one primary IP range and zero or more secondary\nIP ranges. For more information, read\nVirtual Private Cloud (VPC) Network.", - "id": "Subnetwork", - "properties": { - "aggregationInterval": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nSets the aggregation interval for collecting flow logs. Increasing the\ninterval time reduces the amount of generated flow logs for long-lasting\nconnections. Default is an interval of 5 seconds per connection.\nValid values: INTERVAL_5_SEC, INTERVAL_30_SEC,INTERVAL_1_MIN, INTERVAL_5_MIN,INTERVAL_10_MIN, INTERVAL_15_MIN.", - "enum": [ - "INTERVAL_10_MIN", - "INTERVAL_15_MIN", - "INTERVAL_1_MIN", - "INTERVAL_30_SEC", - "INTERVAL_5_MIN", - "INTERVAL_5_SEC" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "allowSubnetCidrRoutesOverlap": { - "description": "Whether this subnetwork's ranges can conflict with existing static routes.\nSetting this to true allows this subnetwork's primary and secondary ranges\nto overlap with (and contain) static routes that have already been\nconfigured on the corresponding network.\n\nFor example if a static route has range 10.1.0.0/16, a subnet\nrange 10.0.0.0/8 could only be created if allow_conflicting_routes=true.\n\nOverlapping is only allowed on subnetwork operations; routes\nwhose ranges conflict with this subnetwork's ranges won't be allowed unless\nroute.allow_conflicting_subnetworks is set to true.\n\nTypically packets destined to IPs within the subnetwork (which may contain\nprivate/sensitive data) are prevented from leaving the virtual network.\nSetting this field to true will disable this feature.\n\nThe default value is false and applies to all existing subnetworks and\nautomatically created subnetworks.\n\nThis field cannot be set to true at resource creation time.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource. This field can be set only at resource creation time.", - "type": "string" - }, - "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not\nexplicitly set, it will not appear in get listings. If not set\nthe default behavior is determined by the org policy, if there is no org\npolicy specified, then it will default to disabled. This field isn't\nsupported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY.", - "type": "boolean" - }, - "enableL2": { - "description": "Enables Layer2 communication on the subnetwork.", - "type": "boolean" - }, - "enablePrivateV6Access": { - "deprecated": true, - "description": "Deprecated in favor of enable in PrivateIpv6GoogleAccess.\nWhether the VMs in this subnet can directly access Google services via\ninternal IPv6 addresses. This field can be both set at resource creation\ntime and updated using patch.", - "type": "boolean" - }, - "externalIpv6Prefix": { - "description": "The external IPv6 address range that is owned by this\nsubnetwork.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a Subnetwork. An up-to-date fingerprint must be\nprovided in order to update the Subnetwork, otherwise the\nrequest will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a Subnetwork.", - "format": "byte", - "type": "string" - }, - "flowSampling": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nThe value of the field must be in [0, 1]. Set the sampling rate of VPC flow\nlogs within the subnetwork where 1.0 means all collected logs\nare reported and 0.0 means no logs are reported. Default is0.5 unless otherwise specified by the org policy, which means\nhalf of all collected logs are reported.", - "format": "float", - "type": "number" - }, - "gatewayAddress": { - "description": "[Output Only] The gateway address for default routes to reach destination\naddresses outside this subnetwork.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "internalIpv6Prefix": { - "description": "The internal IPv6 address range that is owned by this\nsubnetwork.", - "type": "string" - }, - "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork.\nProvide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must\nbe unique and non-overlapping within a network. Only IPv4 is supported.\nThis field is set at resource creation time. The range can be any range\nlisted in theValid\nranges list. The range can be expanded after creation usingexpandIpCidrRange.", - "type": "string" - }, - "ipCollection": { - "description": "Reference to the source of IP, like a PublicDelegatedPrefix\n(PDP) for BYOIP. The PDP must be a sub-PDP in\nEXTERNAL_IPV6_SUBNETWORK_CREATION or INTERNAL_IPV6_SUBNETWORK_CREATION\nmode.\n\nUse one of the following formats to specify a sub-PDP when creating a dual\nstack or IPv6-only subnetwork with external access using BYOIP:\n \n - \n Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - \n Partial URL, as in\n \n \n - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - regions/region/publicDelegatedPrefixes/sub-pdp-name", - "type": "string" - }, - "ipv6AccessType": { - "description": "The access type of IPv6 address this subnet holds. It's immutable and can\nonly be specified during creation or the first time the subnet is updated\ninto IPV4_IPV6 dual stack.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "VMs on this subnet will be assigned IPv6 addresses that are accessible\nvia the Internet, as well as the VPC network.", - "VMs on this subnet will be assigned IPv6 addresses that are only\naccessible over the VPC network." - ], - "type": "string" - }, - "ipv6CidrRange": { - "description": "[Output Only] This field is for internal use.", - "type": "string" - }, - "ipv6GceEndpoint": { - "description": "[Output Only] Possible endpoints of this subnetwork. It can be one of the\nfollowing:\n \n - VM_ONLY: The subnetwork can be used for creating instances and\n IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6\n ranges from a public delegated prefix and cannot be used to create NetLb.\n - VM_AND_FR: The subnetwork can be used for creating both VM\n instances and Forwarding Rules. It can also be used to reserve IPv6\n addresses with both VM and FR endpoint types. Such a subnetwork gets its\n IPv6 range from Google IP Pool directly.", - "enum": [ - "VM_AND_FR", - "VM_ONLY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#subnetwork", - "description": "[Output Only] Type of the resource. Always compute#subnetwork\nfor Subnetwork resources.", - "type": "string" - }, - "logConfig": { - "$ref": "SubnetworkLogConfig", - "description": "This field denotes the VPC flow logging options for this subnetwork.\nIf logging is enabled, logs are exported to Cloud Logging." - }, - "metadata": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nConfigures whether metadata fields should be added to the reported VPC flow\nlogs. Options are INCLUDE_ALL_METADATA,EXCLUDE_ALL_METADATA, and CUSTOM_METADATA.\nDefault is EXCLUDE_ALL_METADATA.", - "enum": [ - "EXCLUDE_ALL_METADATA", - "INCLUDE_ALL_METADATA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network to which this subnetwork belongs, provided by the\nclient when initially creating the subnetwork. This field can be set only\nat resource creation time.", - "type": "string" - }, - "params": { - "$ref": "SubnetworkParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "privateIpGoogleAccess": { - "description": "Whether the VMs in this subnet can access Google services without assigned\nexternal IP addresses. This field can be both set at resource creation\ntime and updated using setPrivateIpGoogleAccess.", - "type": "boolean" - }, - "privateIpv6GoogleAccess": { - "description": "This field is for internal use.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "DISABLE_GOOGLE_ACCESS", - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - ], - "enumDescriptions": [ - "Disable private IPv6 access to/from Google services.", - "Bidirectional private IPv6 access to/from Google services.", - "Outbound private IPv6 access from VMs in this subnet to Google services." - ], - "type": "string" - }, - "purpose": { - "enum": [ - "AGGREGATE", - "CLOUD_EXTENSION", - "CUSTOM_HARDWARE_LINK", - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnetwork used to aggregate multiple private subnetworks.", - "Subnetworks created for Cloud Extension Machines.", - "Subnetwork used for Custom Hardware Link.", - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "region": { - "description": "URL of the region where the Subnetwork resides. This\nfield can be set only at resource creation time.", - "type": "string" - }, - "reservedInternalRange": { - "description": "The URL of the reserved internal range.", - "type": "string" - }, - "resolveSubnetMask": { - "description": "Configures subnet mask resolution for this subnetwork.", - "enum": [ - "ARP_ALL_RANGES", - "ARP_PRIMARY_RANGE" - ], - "enumDescriptions": [ - "All ranges assigned to the VM NIC will respond to ARP.", - "Only the primary range of the VM NIC will respond to ARP." - ], - "type": "string" - }, - "role": { - "description": "The role of subnetwork. Currently, this field is only used when\npurpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE\nsubnetwork is one that is currently being used for Envoy-based load\nbalancers in a region. A BACKUP subnetwork is one that is\nready to be promoted to ACTIVE or is currently draining.\nThis field can be updated with a patch request.", - "enum": [ - "ACTIVE", - "BACKUP" - ], - "enumDescriptions": [ - "The ACTIVE subnet that is currently used.", - "The BACKUP subnet that could be promoted to ACTIVE." - ], - "type": "string" - }, - "secondaryIpRanges": { - "description": "An array of configurations for secondary IP ranges for VM instances\ncontained in this subnetwork. The primary IP of such VM must belong to the\nprimary ipCidrRange of the subnetwork. The alias IPs may belong to either\nprimary or secondary ranges. This field can be updated with apatch request.", - "items": { - "$ref": "SubnetworkSecondaryRange" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "stackType": { - "description": "The stack type for the subnet. If set to IPV4_ONLY, new VMs\nin the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and\nIPv6 addresses. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] The state of the subnetwork, which can be one of the\nfollowing values:READY: Subnetwork is created and ready to useDRAINING: only applicable to subnetworks that have the\npurpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that\nconnections to the load balancer are being drained. A subnetwork that is\ndraining cannot be used or modified until it reaches a status ofREADY", - "enum": [ - "DRAINING", - "READY" - ], - "enumDescriptions": [ - "Subnetwork is being drained.", - "Subnetwork is ready for use." - ], - "type": "string" - }, - "systemReservedExternalIpv6Ranges": { - "description": "Output only. [Output Only] The array of external IPv6 network ranges reserved from\nthe subnetwork's external IPv6 range for system use.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "systemReservedInternalIpv6Ranges": { - "description": "Output only. [Output Only] The array of internal IPv6 network ranges reserved from\nthe subnetwork's internal IPv6 range for system use.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "utilizationDetails": { - "$ref": "SubnetworkUtilizationDetails", - "description": "Output only. [Output Only] The current IP utilization of all subnetwork ranges. Contains\nthe total number of allocated and free IPs in each range.", - "readOnly": true - }, - "vlans": { - "description": "A repeated field indicating the VLAN IDs supported on this subnetwork.\nDuring Subnet creation, specifying vlan is valid only if enable_l2 is true.\nDuring Subnet Update, specifying vlan is allowed only for l2 enabled\nsubnets. Restricted to only one VLAN.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "SubnetworkAggregatedList": { - "id": "SubnetworkAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SubnetworksScopedList", - "description": "Name of the scope containing this set of Subnetworks." - }, - "description": "A list of SubnetworksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#subnetworkAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#subnetworkAggregatedList for aggregated lists of\nsubnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkList": { - "description": "Contains a list of Subnetwork resources.", - "id": "SubnetworkList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Subnetwork resources.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#subnetworkList", - "description": "[Output Only] Type of resource. Always compute#subnetworkList\nfor lists of subnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkLogConfig": { - "description": "The available logging options for this subnetwork.", - "id": "SubnetworkLogConfig", - "properties": { - "aggregationInterval": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nToggles the aggregation interval for collecting flow logs. Increasing the\ninterval time will reduce the amount of generated flow logs for long\nlasting connections. Default is an interval of 5 seconds per connection.", - "enum": [ - "INTERVAL_10_MIN", - "INTERVAL_15_MIN", - "INTERVAL_1_MIN", - "INTERVAL_30_SEC", - "INTERVAL_5_MIN", - "INTERVAL_5_SEC" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "enable": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not\nexplicitly set, it will not appear in get listings. If not\nset the default behavior is determined by the org policy, if there is no\norg policy specified, then it will default to disabled.\nFlow logging isn't supported if the subnet purpose field is\nset to REGIONAL_MANAGED_PROXY.", - "type": "boolean" - }, - "filterExpr": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled.\nThe filter expression is used to define which VPC flow logs should be\nexported to Cloud Logging.", - "type": "string" - }, - "flowSampling": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nThe value of the field must be in [0, 1]. Set the sampling rate of VPC\nflow logs within the subnetwork where 1.0 means all collected logs are\nreported and 0.0 means no logs are reported. Default is 0.5 unless\notherwise specified by the org policy, which means half of all collected\nlogs are reported.", - "format": "float", - "type": "number" - }, - "metadata": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled.\nConfigures whether all, none or a subset of metadata fields should be\nadded to the reported VPC flow logs. Default isEXCLUDE_ALL_METADATA.", - "enum": [ - "CUSTOM_METADATA", - "EXCLUDE_ALL_METADATA", - "INCLUDE_ALL_METADATA" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "metadataFields": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled and\n\"metadata\" was set to CUSTOM_METADATA.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SubnetworkParams": { - "description": "Additional subnetwork parameters.", - "id": "SubnetworkParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkSecondaryRange": { - "description": "Represents a secondary IP range of a subnetwork.", - "id": "SubnetworkSecondaryRange", - "properties": { - "ipCidrRange": { - "description": "The range of IP addresses belonging to this subnetwork secondary range.\nProvide this property when you create the subnetwork. Ranges must be\nunique and non-overlapping with all primary and secondary IP ranges\nwithin a network. Only IPv4 is supported. The range can be any range\nlisted in theValid\nranges list.", - "type": "string" - }, - "rangeName": { - "description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.\nThe name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the subnetwork.", - "type": "string" - }, - "reservedInternalRange": { - "description": "The URL of the reserved internal range.", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetails": { - "description": "The current IP utilization of all subnetwork ranges. Contains the total\nnumber of allocated and free IPs in each range.", - "id": "SubnetworkUtilizationDetails", - "properties": { - "externalIpv6InstanceUtilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of external IPV6 IP range." - }, - "externalIpv6LbUtilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of external IPV6 IP range for NetLB." - }, - "internalIpv6Utilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of internal IPV6 IP range." - }, - "ipv4Utilizations": { - "description": "Utilizations of all IPV4 IP ranges. For primary ranges, the range name\nwill be empty.", - "items": { - "$ref": "SubnetworkUtilizationDetailsIPV4Utilization" - }, - "type": "array" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetailsIPV4Utilization": { - "description": "The IPV4 utilization of a single IP range.", - "id": "SubnetworkUtilizationDetailsIPV4Utilization", - "properties": { - "rangeName": { - "description": "Will be set for secondary range. Empty for primary IPv4 range.", - "type": "string" - }, - "totalAllocatedIp": { - "format": "int64", - "type": "string" - }, - "totalFreeIp": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetailsIPV6Utilization": { - "description": "The IPV6 utilization of a single IP range.", - "id": "SubnetworkUtilizationDetailsIPV6Utilization", - "properties": { - "totalAllocatedIp": { - "$ref": "Uint128" - }, - "totalFreeIp": { - "$ref": "Uint128" - } - }, - "type": "object" - }, - "SubnetworksExpandIpCidrRangeRequest": { - "id": "SubnetworksExpandIpCidrRangeRequest", - "properties": { - "ipCidrRange": { - "description": "The IP (in CIDR format or netmask) of internal addresses that are legal on\nthis Subnetwork. This range should be disjoint from other subnetworks\nwithin this network. This range can only be larger than (i.e. a superset\nof) the range previously defined before the update.", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworksScopedList": { - "id": "SubnetworksScopedList", - "properties": { - "subnetworks": { - "description": "A list of subnetworks contained in this scope.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - }, - "warning": { - "description": "An informational warning that appears when the list of addresses\nis empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworksScopedWarning": { - "id": "SubnetworksScopedWarning", - "properties": { - "scopeName": { - "description": "Name of the scope containing this set of Subnetworks.", - "type": "string" - }, - "warning": { - "description": "An informational warning about unreachable scope", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworksSetPrivateIpGoogleAccessRequest": { - "id": "SubnetworksSetPrivateIpGoogleAccessRequest", - "properties": { - "privateIpGoogleAccess": { - "type": "boolean" - } - }, - "type": "object" - }, - "Subsetting": { - "description": "Subsetting configuration for this BackendService.\nCurrently this is applicable only for Internal TCP/UDP load balancing,\nInternal HTTP(S) load balancing and Traffic Director.", - "id": "Subsetting", - "properties": { - "policy": { - "enum": [ - "CONSISTENT_HASH_SUBSETTING", - "NONE" - ], - "enumDescriptions": [ - "Subsetting based on consistent hashing.\n\nFor Traffic Director, the number of backends per backend group\n(the subset size) is based on the `subset_size` parameter.\n\nFor Internal HTTP(S) load balancing, the number of backends per backend\ngroup (the subset size) is dynamically adjusted in two cases:\n- As the number of proxy instances participating in Internal HTTP(S) load\n balancing increases, the subset size decreases.\n- When the total number of backends in a network exceeds the capacity of\n a single proxy instance, subset sizes are reduced automatically for\n each service that has backend subsetting enabled.", - "No Subsetting.\n\nClients may open connections and send traffic to all backends of this\nbackend service. This can lead to performance issues if there is\nsubstantial imbalance in the count of clients and backends." - ], - "type": "string" - }, - "subsetSize": { - "description": "The number of backends per backend group assigned to each proxy instance or\neach service mesh client.\n\nAn input parameter to the `CONSISTENT_HASH_SUBSETTING` algorithm.\nCan only be set if `policy` is set to `CONSISTENT_HASH_SUBSETTING`.\nCan only be set if load balancing scheme is `INTERNAL_MANAGED` or\n`INTERNAL_SELF_MANAGED`.\n\n`subset_size` is optional for Internal HTTP(S) load balancing\nand required for Traffic Director.\n\nIf you do not provide this value, Cloud Load Balancing will calculate it\ndynamically to optimize the number of proxies/clients visible to each\nbackend and vice versa.\n\nMust be greater than 0. If `subset_size` is larger than the number of\nbackends/endpoints, then subsetting is disabled.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TCPHealthCheck": { - "id": "TCPHealthCheck", - "properties": { - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 80. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \nUSE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "request": { - "description": "Instructs the health check prober to send this exact ASCII string, up to\n1024 bytes in length, after establishing the TCP connection.", - "type": "string" - }, - "response": { - "description": "Creates a content-based TCP health check. In addition to establishing a\nTCP connection, you can configure the health check to pass only when the\nbackend sends this exact response ASCII string, up to 1024 bytes in length.\nFor details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", - "type": "string" - } - }, - "type": "object" - }, - "Tags": { - "description": "A set of instance tags.", - "id": "Tags", - "properties": { - "fingerprint": { - "description": "Specifies a fingerprint for this request, which is essentially a hash of\nthe tags' contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update tags. You must always provide an\nup-to-date fingerprint hash in order to update or change tags.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "items": { - "description": "An array of tags. Each tag must be 1-63 characters long, and comply\nwith RFC1035.", - "items": { - "type": "string" - }, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "array" - } - }, - "type": "object" - }, - "TargetGrpcProxy": { - "description": "Represents a Target gRPC Proxy resource.\n\nA target gRPC proxy is a component of load balancers intended for\nload balancing gRPC traffic. Only global forwarding rules with load balancing\nscheme INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The target\ngRPC Proxy references a URL map that specifies how traffic is routed to\ngRPC backend services.", - "id": "TargetGrpcProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetGrpcProxy. An up-to-date fingerprint must\nbe provided in order to patch/update the TargetGrpcProxy; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nTargetGrpcProxy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetGrpcProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for target grpc proxies.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.targetGrpcProxies.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "urlMap": { - "description": "URL to the UrlMap resource that defines the mapping from URL to the\nBackendService. The protocol field in the BackendService must be set to\nGRPC.", - "type": "string" - }, - "validateForProxyless": { - "description": "If true, indicates that the BackendServices referenced by the urlMap may be\naccessed by gRPC applications without using a sidecar proxy. This will\nenable configuration checks on urlMap and its referenced BackendServices to\nnot allow unsupported features. A gRPC application must use\n\"xds:///\" scheme in the target URI of the service it is\nconnecting to.\nIf false, indicates that the BackendServices referenced by the urlMap will\nbe accessed by gRPC applications via a sidecar proxy. In this case, a gRPC\napplication must not use \"xds:///\" scheme in the target URI of\nthe service it is connecting to", - "type": "boolean" - } - }, - "type": "object" - }, - "TargetGrpcProxyList": { - "id": "TargetGrpcProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetGrpcProxy resources.", - "items": { - "$ref": "TargetGrpcProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetGrpcProxyList", - "description": "[Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for target grpc proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxiesScopedList": { - "id": "TargetHttpProxiesScopedList", - "properties": { - "targetHttpProxies": { - "description": "A list of TargetHttpProxies contained in this scope.", - "items": { - "$ref": "TargetHttpProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxy": { - "description": "Represents a Target HTTP Proxy resource.\n\nGoogle Compute Engine has two Target HTTP Proxy resources:\n\n* [Global](/compute/docs/reference/rest/alpha/targetHttpProxies)\n* [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpProxies)\n\nA target HTTP proxy is a component of Google Cloud HTTP load balancers.\n\n* targetHttpProxies are used by global external Application Load Balancers,\n classic Application Load Balancers, cross-region internal Application Load\n Balancers, and Traffic Director.\n* regionTargetHttpProxies are used by regional internal Application Load\n Balancers and regional external Application Load Balancers.\n\nForwarding rules reference a target HTTP proxy, and the target proxy\nthen references a URL map. For more information, readUsing Target Proxies\nand \nForwarding rule concepts.", - "id": "TargetHttpProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetHttpProxy. An up-to-date fingerprint must\nbe provided in order to patch/update the TargetHttpProxy; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nTargetHttpProxy.", - "format": "byte", - "type": "string" - }, - "httpFilters": { - "description": "URLs to networkservices.HttpFilter resources\nenabled for xDS clients using this configuration. For example,https://networkservices.googleapis.com/v1alpha1/projects/project/locations/locationhttpFilters/httpFilter\nOnly filters that handle outbound connection and\nstream events may be specified. These filters work in conjunction with\na default set of HTTP filters that may already be configured by Traffic\nDirector. Traffic Director will determine the final location of these\nfilters within xDS configuration based on the name of the HTTP filter. If\nTraffic Director positions multiple filters at the same location, those\nfilters will be in the same order as specified in this list. \n\nhttpFilters only applies for loadbalancers withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nSee ForwardingRule for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response,\nwhile there is no matching traffic (in seconds). If an HTTP keep-alive is\nnot specified, a default value (610 seconds) will be used.\n\nFor global external Application Load Balancers, the minimum allowed value\nis 5 seconds and the maximum allowed value is 1200 seconds.\n\nFor classic Application Load Balancers, this option is not supported.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetHttpProxy", - "description": "[Output Only] Type of resource. Always compute#targetHttpProxy\nfor target HTTP proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "region": { - "description": "[Output Only] URL of the region where the regional Target HTTP Proxy\nresides. This field is not applicable to global Target HTTP Proxies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "urlMap": { - "description": "URL to the UrlMap resource that defines the mapping from URL to\nthe BackendService.", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpProxyAggregatedList": { - "id": "TargetHttpProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetHttpProxiesScopedList", - "description": "Name of the scope containing this set of TargetHttpProxies." - }, - "description": "A list of TargetHttpProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetHttpProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpProxyAggregatedList for lists of Target HTTP\nProxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxyList": { - "description": "A list of TargetHttpProxy resources.", - "id": "TargetHttpProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetHttpProxy resources.", - "items": { - "$ref": "TargetHttpProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetHttpProxyList", - "description": "Type of resource. Always compute#targetHttpProxyList for lists\nof target HTTP proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxiesScopedList": { - "id": "TargetHttpsProxiesScopedList", - "properties": { - "targetHttpsProxies": { - "description": "A list of TargetHttpsProxies contained in this scope.", - "items": { - "$ref": "TargetHttpsProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetCertificateMapRequest": { - "id": "TargetHttpsProxiesSetCertificateMapRequest", - "properties": { - "certificateMap": { - "description": "URL of the Certificate Map to associate with this TargetHttpsProxy.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetQuicOverrideRequest": { - "id": "TargetHttpsProxiesSetQuicOverrideRequest", - "properties": { - "quicOverride": { - "description": "QUIC policy for the TargetHttpsProxy resource.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "The load balancer will not attempt to negotiate QUIC with clients.", - "The load balancer will attempt to negotiate QUIC with clients.", - "No overrides to the default QUIC policy. This option is implicit if\nno QUIC override has been specified in the request." - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetSslCertificatesRequest": { - "id": "TargetHttpsProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of SslCertificate resources to associate\nwith this TargetHttpsProxy resource. At least one SSL\ncertificate must be specified. Currently, you may specify up to 15 SSL\ncertificates.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource.\n\nGoogle Compute Engine has two Target HTTPS Proxy resources:\n\n* [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies)\n* [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies)\n\nA target HTTPS proxy is a component of Google Cloud HTTPS load balancers.\n\n* targetHttpsProxies are used by global external Application Load Balancers,\n classic Application Load Balancers, cross-region internal Application Load\n Balancers, and Traffic Director.\n* regionTargetHttpsProxies are used by regional internal Application Load\n Balancers and regional external Application Load Balancers.\n\nForwarding rules reference a target HTTPS proxy, and the target proxy\nthen references a URL map. For more information, readUsing Target Proxies\nand \nForwarding rule concepts.", - "id": "TargetHttpsProxy", - "properties": { - "authentication": { - "deprecated": true, - "description": "[Deprecated] Use serverTlsPolicy instead.", - "type": "string" - }, - "authorization": { - "deprecated": true, - "description": "[Deprecated] Use authorizationPolicy instead.", - "type": "string" - }, - "authorizationPolicy": { - "description": "Optional. A URL referring to a networksecurity.AuthorizationPolicy resource\nthat describes how the proxy should authorize inbound traffic. If left\nblank, access will not be restricted by an authorization policy.\n\n Refer to the AuthorizationPolicy resource for additional\ndetails.\n\n authorizationPolicy only applies to a globalTargetHttpsProxy attached toglobalForwardingRules with theloadBalancingScheme set to INTERNAL_SELF_MANAGED.\n\n Note: This field currently has no impact.", - "type": "string" - }, - "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with\nthe given target proxy.\nThis field can only be set for Global external Application Load Balancer or\nClassic Application Load Balancer. For other products use Certificate\nManager Certificates instead.\n\nIf set, sslCertificates will be ignored.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetHttpsProxy. An up-to-date fingerprint must\nbe provided in order to patch the TargetHttpsProxy; otherwise, the request\nwill fail with error 412 conditionNotMet. To see the latest\nfingerprint, make a get() request to retrieve the\nTargetHttpsProxy.", - "format": "byte", - "type": "string" - }, - "httpFilters": { - "description": "URLs to networkservices.HttpFilter resources\nenabled for xDS clients using this configuration. For example,https://networkservices.googleapis.com/beta/projects/project/locations/location/httpFilters/httpFilter\nOnly filters that handle outbound connection and\nstream events may be specified. These filters work in conjunction with\na default set of HTTP filters that may already be configured by Traffic\nDirector. Traffic Director will determine the final location of these\nfilters within xDS configuration based on the name of the HTTP filter. If\nTraffic Director positions multiple filters at the same location, those\nfilters will be in the same order as specified in this list. \n\nhttpFilters only applies for loadbalancers withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nSee ForwardingRule for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response,\nwhile there is no matching traffic (in seconds). If an HTTP keep-alive is\nnot specified, a default value (610 seconds) will be used.\n\nFor global external Application Load Balancers, the minimum allowed value\nis 5 seconds and the maximum allowed value is 1200 seconds.\n\nFor classic Application Load Balancers, this option is not supported.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetHttpsProxy", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpsProxy for target HTTPS proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "quicOverride": { - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This\nsetting determines whether the load balancer attempts to negotiate QUIC\nwith clients.\nYou can specify NONE, ENABLE, orDISABLE.\n \n - When quic-override is set to NONE,\n Google manages whether QUIC is used.\n - When quic-override is set to ENABLE, the\n load balancer uses QUIC when possible.\n - When quic-override is set to DISABLE, the\n load balancer doesn't use QUIC.\n - If the quic-override flag is not specified,NONE is implied.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "The load balancer will not attempt to negotiate QUIC with clients.", - "The load balancer will attempt to negotiate QUIC with clients.", - "No overrides to the default QUIC policy. This option is implicit if\nno QUIC override has been specified in the request." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional TargetHttpsProxy\nresides. This field is not applicable to global TargetHttpsProxies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A URL referring to a networksecurity.ServerTlsPolicy resource\nthat describes how the proxy should authenticate inbound traffic.\n\n serverTlsPolicy only applies to a globalTargetHttpsProxy attached toglobalForwardingRules with theloadBalancingScheme set to INTERNAL_SELF_MANAGED\nor EXTERNAL orEXTERNAL_MANAGED or INTERNAL_MANAGED.\nIt also applies to a regional TargetHttpsProxy attached to\nregional forwardingRules with theloadBalancingScheme set to EXTERNAL_MANAGED orINTERNAL_MANAGED. For details whichServerTlsPolicy resources are accepted withINTERNAL_SELF_MANAGED and which with EXTERNAL,INTERNAL_MANAGED, EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy\ndocumentation.\n\n If left blank, communications are not encrypted.", - "type": "string" - }, - "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to authenticate\nconnections between users and the load balancer. At least one SSL\ncertificate must be specified. SslCertificates do not apply when the load\nbalancing scheme is set to INTERNAL_SELF_MANAGED.\n\nThe URLs should refer to a SSL Certificate resource or Certificate Manager\nCertificate resource. Mixing Classic Certificates and Certificate Manager\nCertificates is not allowed. Certificate Manager Certificates must include\nthe certificatemanager API namespace. Using Certificate Manager\nCertificates in this field is not supported by Global external Application\nLoad Balancer or Classic Application Load Balancer, use certificate_map\ninstead.\n\nCurrently, you may specify up to 15 Classic SSL Certificates or up to 100\nCertificate Manager Certificates.\n\nCertificate Manager Certificates accepted formats are:\n \n - //certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificates/{resourceName}.\n - https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy\nresource. If not set, the TargetHttpsProxy resource has no\nSSL policy configured.", - "type": "string" - }, - "tlsEarlyData": { - "description": "Specifies whether TLS 1.3 0-RTT Data (\"Early Data\") should be accepted\nfor this service. Early Data allows a TLS resumption handshake to include\nthe initial application payload (a HTTP request) alongside the handshake,\nreducing the effective round trips to \"zero\". This applies to TLS 1.3\nconnections over TCP (HTTP/2) as well as over UDP (QUIC/h3).\n\n\nThis can improve application performance, especially on networks where\ninterruptions may be common, such as on mobile.\n\n\nRequests with Early Data will have the \"Early-Data\" HTTP header set on\nthe request, with a value of \"1\", to allow the backend to determine whether\nEarly Data was included.\n\n\nNote: TLS Early Data may allow requests to be replayed, as the data is\nsent to the backend before the handshake has fully completed. Applications\nthat allow idempotent HTTP methods to make non-idempotent changes, such as\na GET request updating a database, should not accept Early Data on those\nrequests, and reject requests with the \"Early-Data: 1\" HTTP header by\nreturning a HTTP 425 (Too Early) status code, in order to remain RFC\ncompliant.\n\n\nThe default value is DISABLED.", - "enum": [ - "DISABLED", - "PERMISSIVE", - "STRICT", - "UNRESTRICTED" - ], - "enumDescriptions": [ - "TLS 1.3 Early Data is not advertised, and any (invalid) attempts to send\nEarly Data will be rejected by closing the connection.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on\nrequests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode\ndoes not enforce any other limitations for requests with Early Data. The\napplication owner should validate that Early Data is acceptable for a\ngiven request path.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on\nrequests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query\nparameters. Requests that send Early Data with non-idempotent HTTP\nmethods or with query parameters will be rejected with a HTTP 425.", - "This enables TLS 1.3 Early Data for requests with any HTTP method\nincluding non-idempotent methods list POST. This mode does not enforce\nany other limitations. This may be valuable for gRPC use cases. However,\nwe do not recommend this method unless you have evaluated your security\nstance and mitigated the risk of replay attacks using other mechanisms." - ], - "type": "string" - }, - "urlMap": { - "description": "A fully-qualified or valid partial URL to the UrlMap resource that defines\nthe mapping from URL to the BackendService. For example, the following are\nall valid URLs for specifying a URL map:\n \n - https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n - projects/project/global/urlMaps/url-map \n - global/urlMaps/url-map", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxyAggregatedList": { - "id": "TargetHttpsProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetHttpsProxiesScopedList", - "description": "Name of the scope containing this set of TargetHttpsProxies." - }, - "description": "A list of TargetHttpsProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetHttpsProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpsProxyAggregatedList for lists of Target\nHTTP Proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxyList": { - "description": "Contains a list of TargetHttpsProxy resources.", - "id": "TargetHttpsProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetHttpsProxy resources.", - "items": { - "$ref": "TargetHttpsProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetHttpsProxyList", - "description": "Type of resource. Always compute#targetHttpsProxyList for\nlists of target HTTPS proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstance": { - "description": "Represents a Target Instance resource.\n\nYou can use a target instance to handle traffic for one or more forwarding\nrules, which is ideal for forwarding protocol traffic that is managed by a\nsingle source. For example, ESP, AH, TCP, or UDP.\nFor more information, readTarget\ninstances.", - "id": "TargetInstance", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instance": { - "description": "A URL to the virtual machine instance that handles traffic for this target\ninstance. When creating a target instance, you can provide the\nfully-qualified URL or a valid partial URL to the desired virtual machine.\nFor example, the following are all valid URLs:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance \n - zones/zone/instances/instance", - "type": "string" - }, - "kind": { - "default": "compute#targetInstance", - "description": "[Output Only] The type of the resource. Alwayscompute#targetInstance for target instances.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "natPolicy": { - "description": "Must have a value of NO_NAT.\nProtocol forwarding delivers packets while preserving the destination IP\naddress of the forwarding rule referencing the target instance.", - "enum": [ - "NO_NAT" - ], - "enumDescriptions": [ - "No NAT performed." - ], - "type": "string" - }, - "network": { - "description": "The URL of the network this target instance uses to forward traffic.\nIf not specified, the traffic will be forwarded to the network that\nthe default network interface belongs to.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\ntarget instance.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the target instance resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "TargetInstanceAggregatedList": { - "id": "TargetInstanceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetInstancesScopedList", - "description": "Name of the scope containing this set of target instances." - }, - "description": "A list of TargetInstance resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetInstanceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstanceList": { - "description": "Contains a list of TargetInstance resources.", - "id": "TargetInstanceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetInstance resources.", - "items": { - "$ref": "TargetInstance" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetInstanceList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstancesScopedList": { - "id": "TargetInstancesScopedList", - "properties": { - "targetInstances": { - "description": "A list of target instances contained in this scope.", - "items": { - "$ref": "TargetInstance" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPool": { - "description": "Represents a Target Pool resource.\n\nTarget pools are used with external passthrough Network Load Balancers.\nA target pool references member instances, an associated legacy\nHttpHealthCheck resource, and, optionally, a backup target pool.\nFor more information, readUsing target pools.", - "id": "TargetPool", - "properties": { - "backupPool": { - "description": "The server-defined URL for the resource. This field is applicable only when\nthe containing target pool is serving a forwarding rule as the primary\npool, and its failoverRatio field is properly set to a value\nbetween [0, 1].backupPool and failoverRatio together define\nthe fallback behavior of the primary target pool: if the ratio of the\nhealthy instances in the primary pool is at or belowfailoverRatio, traffic arriving at the load-balanced\nIP will be directed to the backup pool.\n\nIn case where failoverRatio and backupPool\nare not set, or all the instances in the backup pool are unhealthy,\nthe traffic will be directed back to the primary pool in the \"force\"\nmode, where traffic will be spread to the healthy instances with the\nbest effort, or to all instances when no instance is healthy.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "failoverRatio": { - "description": "This field is applicable only when the containing target pool is serving a\nforwarding rule as the primary pool (i.e., not as a backup pool to some\nother target pool). The value of the field must be in [0, 1].\n\nIf set, backupPool must also be set. They together define\nthe fallback behavior of the primary target pool: if the ratio of the\nhealthy instances in the primary pool is at or below this number,\ntraffic arriving at the load-balanced IP will be directed to the\nbackup pool.\n\nIn case where failoverRatio is not set or all the\ninstances in the backup pool are unhealthy, the traffic will be\ndirected back to the primary pool in the \"force\" mode, where traffic\nwill be spread to the healthy instances with the\nbest effort, or to all instances when no instance is healthy.", - "format": "float", - "type": "number" - }, - "healthChecks": { - "description": "The URL of the HttpHealthCheck resource. A member instance in this\npool is considered healthy if and only if the health checks pass.\nOnly legacy HttpHealthChecks are supported. Only one health check may be\nspecified.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instances": { - "description": "A list of resource URLs to the virtual machine instances serving this pool.\nThey must live in zones contained in the same region as this pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPool", - "description": "[Output Only] Type of the resource. Always compute#targetPool\nfor target pools.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the target pool resides.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\ntarget pool.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "sessionAffinity": { - "description": "Session affinity option, must be one of the following values: \nNONE: Connections from the same client IP may go to any\n instance in the pool. \nCLIENT_IP: Connections from the same client IP will go\n to the same instance in\n the pool while that instance remains healthy. \nCLIENT_IP_PROTO: Connections from the same client IP\n with the same IP protocol will go to the same instance in the\n pool while that instance remains healthy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_NO_DESTINATION", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "HEADER_FIELD", - "HTTP_COOKIE", - "NONE", - "STRONG_COOKIE_AFFINITY" - ], - "enumDescriptions": [ - "2-tuple hash on packet's source and destination IP addresses. Connections\nfrom the same source IP address to the same destination IP address will be\nserved by the same backend VM while that VM remains healthy.", - "1-tuple hash only on packet's source IP address. Connections from the\nsame source IP address will be served by the same backend VM while that VM\nremains healthy. This option can only be used for Internal TCP/UDP\nLoad Balancing.", - "5-tuple hash on packet's source and destination IP addresses, IP protocol,\nand source and destination ports. Connections for the same IP protocol\nfrom the same source IP address and port to the same destination IP address\nand port will be served by the same backend VM while that VM remains\nhealthy. This option cannot be used for HTTP(S) load balancing.", - "3-tuple hash on packet's source and destination IP addresses, and IP\nprotocol. Connections for the same IP protocol from the same source IP\naddress to the same destination IP address will be served by the same\nbackend VM while that VM remains healthy. This option cannot be used for\nHTTP(S) load balancing.", - "Hash based on a cookie generated by the L7 loadbalancer.\nOnly valid for HTTP(S) load balancing.", - "The hash is based on a user specified header field.", - "The hash is based on a user provided cookie.", - "No session affinity. Connections from the same client IP may go\nto any instance in the pool.", - "Strong cookie-based affinity. Connections bearing the same cookie will be\nserved by the same backend VM while that VM remains healthy, as long as the\ncookie has not expired." - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetPoolAggregatedList": { - "id": "TargetPoolAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetPoolsScopedList", - "description": "Name of the scope containing this set of target pools." - }, - "description": "A list of TargetPool resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetPoolAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetPoolAggregatedList for aggregated lists of\ntarget pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPoolInstanceHealth": { - "id": "TargetPoolInstanceHealth", - "properties": { - "healthStatus": { - "items": { - "$ref": "HealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPoolInstanceHealth", - "description": "[Output Only] Type of resource. Alwayscompute#targetPoolInstanceHealth when checking the health of\nan instance.", - "type": "string" - } - }, - "type": "object" - }, - "TargetPoolList": { - "description": "Contains a list of TargetPool resources.", - "id": "TargetPoolList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetPool resources.", - "items": { - "$ref": "TargetPool" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPoolList", - "description": "[Output Only] Type of resource. Always compute#targetPoolList\nfor lists of target pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPoolsAddHealthCheckRequest": { - "id": "TargetPoolsAddHealthCheckRequest", - "properties": { - "healthChecks": { - "description": "The HttpHealthCheck to add to the target pool.", - "items": { - "$ref": "HealthCheckReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsAddInstanceRequest": { - "id": "TargetPoolsAddInstanceRequest", - "properties": { - "instances": { - "description": "A full or partial URL to an instance to add to this target pool. This can\nbe a full or partial URL. For example, the following are valid URLs: \n \n - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name \n - projects/project-id/zones/zone/instances/instance-name \n - zones/zone/instances/instance-name", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsRemoveHealthCheckRequest": { - "id": "TargetPoolsRemoveHealthCheckRequest", - "properties": { - "healthChecks": { - "description": "Health check URL to be removed. This can be a full or valid partial URL.\nFor example, the following are valid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check \n - projects/project/global/httpHealthChecks/health-check\n - global/httpHealthChecks/health-check", - "items": { - "$ref": "HealthCheckReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsRemoveInstanceRequest": { - "id": "TargetPoolsRemoveInstanceRequest", - "properties": { - "instances": { - "description": "URLs of the instances to be removed from target pool.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsScopedList": { - "id": "TargetPoolsScopedList", - "properties": { - "targetPools": { - "description": "A list of target pools contained in this scope.", - "items": { - "$ref": "TargetPool" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetReference": { - "id": "TargetReference", - "properties": { - "target": { - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetBackendServiceRequest": { - "id": "TargetSslProxiesSetBackendServiceRequest", - "properties": { - "service": { - "description": "The URL of the new BackendService resource for the targetSslProxy.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetCertificateMapRequest": { - "id": "TargetSslProxiesSetCertificateMapRequest", - "properties": { - "certificateMap": { - "description": "URL of the Certificate Map to associate with this TargetSslProxy.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetProxyHeaderRequest": { - "id": "TargetSslProxiesSetProxyHeaderRequest", - "properties": { - "proxyHeader": { - "description": "The new type of proxy header to append before sending data to the\nbackend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetSslCertificatesRequest": { - "id": "TargetSslProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of URLs to SslCertificate resources to associate with this\nTargetSslProxy. At least one SSL certificate must be specified.\nCurrently, you may specify up to 15 SSL certificates.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetSslProxy": { - "description": "Represents a Target SSL Proxy resource.\n\nA target SSL proxy is a component of a Proxy Network Load Balancer.\nThe forwarding rule references the target SSL proxy, and the target proxy\nthen references a backend service. For more information, readProxy Network\nLoad Balancer overview.", - "id": "TargetSslProxy", - "properties": { - "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with\nthe given target proxy.\nThis field can only be set for global target proxies.\nIf set, sslCertificates will be ignored.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetSslProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetSslProxy for target SSL proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "service": { - "description": "URL to the BackendService resource.", - "type": "string" - }, - "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to\nauthenticate connections to Backends. At least one SSL certificate\nmust be specified. Currently, you may specify up to 15 SSL certificates.\nsslCertificates do not apply when the load balancing scheme is set to\nINTERNAL_SELF_MANAGED.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetSslProxy\nresource. If not set, the TargetSslProxy resource will not have any\nSSL policy configured.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxyList": { - "description": "Contains a list of TargetSslProxy resources.", - "id": "TargetSslProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetSslProxy resources.", - "items": { - "$ref": "TargetSslProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetSslProxyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxiesScopedList": { - "id": "TargetTcpProxiesScopedList", - "properties": { - "targetTcpProxies": { - "description": "A list of TargetTcpProxies contained in this scope.", - "items": { - "$ref": "TargetTcpProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxiesSetBackendServiceRequest": { - "id": "TargetTcpProxiesSetBackendServiceRequest", - "properties": { - "service": { - "description": "The URL of the new BackendService resource for the targetTcpProxy.", - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxiesSetProxyHeaderRequest": { - "id": "TargetTcpProxiesSetProxyHeaderRequest", - "properties": { - "proxyHeader": { - "description": "The new type of proxy header to append before sending data to the\nbackend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxy": { - "description": "Represents a Target TCP Proxy resource.\n\nA target TCP proxy is a component of a Proxy Network Load Balancer.\nThe forwarding rule references the target TCP proxy, and the target proxy\nthen references a backend service. For more information, readProxy Network\nLoad Balancer overview.", - "id": "TargetTcpProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetTcpProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetTcpProxy for target TCP proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional TCP proxy resides.\nThis field is not applicable to global TCP proxy.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "service": { - "description": "URL to the BackendService resource.", - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxyAggregatedList": { - "id": "TargetTcpProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetTcpProxiesScopedList", - "description": "Name of the scope containing this set of TargetTcpProxies." - }, - "description": "A list of TargetTcpProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetTcpProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetTcpProxyAggregatedList for lists of Target\nTCP Proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxyList": { - "description": "Contains a list of TargetTcpProxy resources.", - "id": "TargetTcpProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetTcpProxy resources.", - "items": { - "$ref": "TargetTcpProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetTcpProxyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGateway": { - "description": "Represents a Target VPN Gateway resource.\n\nThe target VPN gateway resource represents a Classic Cloud VPN gateway.\nFor more information, read thethe\nCloud VPN Overview.", - "id": "TargetVpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "forwardingRules": { - "description": "[Output Only] A list of URLs to the ForwardingRule resources.\nForwardingRules are created usingcompute.forwardingRules.insert and associated with a VPN\ngateway.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetVpnGateway", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a TargetVpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - }, - "description": "URL of the network to which this VPN gateway is attached. Provided by the\nclient when the VPN gateway is created.", - "type": "string" - }, - "params": { - "$ref": "TargetVpnGatewayParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the target VPN gateway resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the VPN gateway,\nwhich can be one of the following: CREATING, READY, FAILED, or DELETING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "tunnels": { - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are\ncreated using the compute.vpntunnels.insert method and\nassociated with a VPN gateway.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetVpnGatewayAggregatedList": { - "id": "TargetVpnGatewayAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target VPN gateways." - }, - "description": "A list of TargetVpnGateway resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetVpnGatewayAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGatewayList": { - "description": "Contains a list of TargetVpnGateway resources.", - "id": "TargetVpnGatewayList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetVpnGateway resources.", - "items": { - "$ref": "TargetVpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetVpnGatewayList", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGatewayParams": { - "id": "TargetVpnGatewayParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGatewaysScopedList": { - "id": "TargetVpnGatewaysScopedList", - "properties": { - "targetVpnGateways": { - "description": "[Output Only] A list of target VPN gateways contained in this scope.", - "items": { - "$ref": "TargetVpnGateway" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TestFailure": { - "id": "TestFailure", - "properties": { - "actualOutputUrl": { - "description": "The actual output URL evaluated by a load balancer containing the scheme,\nhost, path and query parameters.", - "type": "string" - }, - "actualRedirectResponseCode": { - "description": "Actual HTTP status code for rule with `urlRedirect`\ncalculated by load balancer", - "format": "int32", - "type": "integer" - }, - "actualService": { - "description": "BackendService or BackendBucket returned by load\nbalancer.", - "type": "string" - }, - "expectedOutputUrl": { - "description": "The expected output URL evaluated by a load balancer containing the scheme,\nhost, path and query parameters.", - "type": "string" - }, - "expectedRedirectResponseCode": { - "description": "Expected HTTP status code for rule with `urlRedirect`\ncalculated by load balancer", - "format": "int32", - "type": "integer" - }, - "expectedService": { - "description": "Expected BackendService or BackendBucket resource\nthe given URL should be mapped to.", - "type": "string" - }, - "headers": { - "description": "HTTP headers of the request.", - "items": { - "$ref": "UrlMapTestHeader" - }, - "type": "array" - }, - "host": { - "description": "Host portion of the URL.", - "type": "string" - }, - "path": { - "description": "Path portion including query parameters in the URL.", - "type": "string" - } - }, - "type": "object" - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the 'resource'. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TlsCertificateContext": { - "description": "[Deprecated] Defines the mechanism to obtain the client or server\ncertificate.\nDefines the mechanism to obtain the client or server certificate.", - "id": "TlsCertificateContext", - "properties": { - "certificatePaths": { - "$ref": "TlsCertificatePaths", - "description": "Specifies the certificate and private key paths. This field is\napplicable only if tlsCertificateSource is set to USE_PATH." - }, - "certificateSource": { - "description": "Defines how TLS certificates are obtained.", - "enum": [ - "INVALID", - "USE_PATH", - "USE_SDS" - ], - "enumDescriptions": [ - "", - "USE_PATH specifies that the certificates and private key are obtained\nfrom a locally mounted filesystem path.", - "USE_SDS specifies that the certificates and private key are obtained from\na SDS server." - ], - "type": "string" - }, - "sdsConfig": { - "$ref": "SdsConfig", - "description": "Specifies the config to retrieve certificates through SDS. This field\nis applicable only if tlsCertificateSource is set to USE_SDS." - } - }, - "type": "object" - }, - "TlsCertificatePaths": { - "description": "[Deprecated] The paths to the mounted TLS Certificates and private key.\nThe paths to the mounted TLS Certificates and private key.", - "id": "TlsCertificatePaths", - "properties": { - "certificatePath": { - "description": "The path to the file holding the client or server TLS certificate to use.", - "type": "string" - }, - "privateKeyPath": { - "description": "The path to the file holding the client or server private key.", - "type": "string" - } - }, - "type": "object" - }, - "TlsContext": { - "description": "[Deprecated] The TLS settings for the client or server.\nThe TLS settings for the client or server.", - "id": "TlsContext", - "properties": { - "certificateContext": { - "$ref": "TlsCertificateContext", - "description": "Defines the mechanism to obtain the client or server certificate." - }, - "validationContext": { - "$ref": "TlsValidationContext", - "description": "Defines the mechanism to obtain the Certificate Authority certificate to\nvalidate the client/server certificate. If omitted, the proxy will not\nvalidate the server or client certificate." - } - }, - "type": "object" - }, - "TlsValidationContext": { - "description": "[Deprecated] Defines the mechanism to obtain the Certificate Authority\ncertificate to validate the client/server certificate.\nvalidate the client/server certificate.", - "id": "TlsValidationContext", - "properties": { - "certificatePath": { - "description": "The path to the file holding the CA certificate to validate the\nclient or server certificate.", - "type": "string" - }, - "sdsConfig": { - "$ref": "SdsConfig", - "description": "Specifies the config to retrieve certificates through SDS. This field\nis applicable only if tlsCertificateSource is set to USE_SDS." - }, - "validationSource": { - "description": "Defines how TLS certificates are obtained.", - "enum": [ - "INVALID", - "USE_PATH", - "USE_SDS" - ], - "enumDescriptions": [ - "", - "USE_PATH specifies that the certificates and private key are obtained\nfrom a locally mounted filesystem path.", - "USE_SDS specifies that the certificates and private key are obtained from\na SDS server." - ], - "type": "string" - } - }, - "type": "object" - }, - "UDPHealthCheck": { - "id": "UDPHealthCheck", - "properties": { - "port": { - "description": "The UDP port number to which the health check prober sends packets. Valid\nvalues are 1 through 65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "request": { - "description": "Raw data of request to send in payload of UDP packet. It is an error if\nthis is empty. The request data can only be ASCII.", - "type": "string" - }, - "response": { - "description": "The bytes to match against the beginning of the response data.\nIt is an error if this is empty. The response data can only be ASCII.", - "type": "string" - } - }, - "type": "object" - }, - "Uint128": { - "id": "Uint128", - "properties": { - "high": { - "format": "uint64", - "type": "string" - }, - "low": { - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "UpcomingMaintenance": { - "description": "Upcoming Maintenance notification information.", - "id": "UpcomingMaintenance", - "properties": { - "canReschedule": { - "description": "Indicates if the maintenance can be customer triggered.", - "type": "boolean" - }, - "date": { - "description": "[Output Only] The date when the maintenance will take place.\nThis value is inRFC3339\ntext format.\nDEPRECATED: Use window_start_time instead.", - "type": "string" - }, - "latestWindowStartTime": { - "description": "The latest time for the planned maintenance window to start.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - }, - "maintenanceOnShutdown": { - "description": "Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.", - "type": "boolean" - }, - "maintenanceReasons": { - "description": "The reasons for the maintenance. Only valid for vms.", - "items": { - "enum": [ - "FAILURE_DISK", - "FAILURE_GPU", - "FAILURE_GPU_MULTIPLE_FAULTY_HOSTS_CUSTOMER_REPORTED", - "FAILURE_GPU_NVLINK_SWITCH_CUSTOMER_REPORTED", - "FAILURE_GPU_TEMPERATURE", - "FAILURE_GPU_XID", - "FAILURE_INFRA", - "FAILURE_INTERFACE", - "FAILURE_MEMORY", - "FAILURE_NETWORK", - "FAILURE_NVLINK", - "FAILURE_REDUNDANT_HARDWARE_FAULT", - "FAILURE_TPU", - "INFRASTRUCTURE_RELOCATION", - "MAINTENANCE_REASON_UNKNOWN", - "PLANNED_NETWORK_UPDATE", - "PLANNED_UPDATE" - ], - "enumDescriptions": [ - "Maintenance due to disk errors.", - "Maintenance due to GPU errors.", - "Maintenance due to customer reported multiple faulty hosts via R\u0026R\nSubblock API.", - "Maintenance due to customer reported NVLink switch failure via R\u0026R\nSubblock API.", - "Maintenance due to high GPU temperature.", - "Maintenance due to GPU xid failure.", - "Maintenance due to infrastructure errors.", - "Maintenance due to interface errors.", - "Maintenance due to memory errors.", - "Maintenance due to network errors.", - "Maintenance due to NVLink failure.", - "Maintenance due to redundant hardware fault.", - "Maintenance due to TPU errors.", - "Maintenance due to infrastructure relocation.", - "Unknown maintenance reason. Do not use this value.", - "Maintenance due to planned network update.", - "Maintenance due to planned update to the instance." - ], - "type": "string" - }, - "type": "array" - }, - "maintenanceStatus": { - "enum": [ - "ONGOING", - "PENDING", - "UNKNOWN" - ], - "enumDescriptions": [ - "There is ongoing maintenance on this VM.", - "There is pending maintenance.", - "Unknown maintenance status. Do not use this value." - ], - "type": "string" - }, - "startTimeWindow": { - "$ref": "UpcomingMaintenanceTimeWindow", - "description": "[Output Only] The start time window of the maintenance disruption.\nDEPRECATED: Use window_start_time instead.\nTimeWindow is a container for two strings that represent timestamps in\n\"yyyy-MM-dd'T'HH:mm:ssZ\" text format." - }, - "time": { - "description": "[Output Only] The time when the maintenance will take place.\nThis value is inRFC3339\ntext format.\nDEPRECATED: Use window_start_time instead.", - "type": "string" - }, - "type": { - "description": "Defines the type of maintenance.", - "enum": [ - "MULTIPLE", - "SCHEDULED", - "UNKNOWN_TYPE", - "UNSCHEDULED" - ], - "enumDescriptions": [ - "Multiple maintenance types in one window.\nThis is only intended to be used for groups.", - "Scheduled maintenance (e.g. maintenance after uptime guarantee is\ncomplete).", - "No type specified. Do not use this value.", - "Unscheduled maintenance (e.g. emergency maintenance during\nuptime guarantee)." - ], - "type": "string" - }, - "windowEndTime": { - "description": "The time by which the maintenance disruption will be completed.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - }, - "windowStartTime": { - "description": "The current start time of the maintenance window.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "UpcomingMaintenanceTimeWindow": { - "description": "Represents a window of time using two timestamps: `earliest` and `latest`.", - "id": "UpcomingMaintenanceTimeWindow", - "properties": { - "earliest": { - "type": "string" - }, - "latest": { - "type": "string" - } - }, - "type": "object" - }, - "UrlMap": { - "description": "Represents a URL Map resource.\n\nCompute Engine has two URL Map resources:\n\n* [Global](/compute/docs/reference/rest/alpha/urlMaps)\n* [Regional](/compute/docs/reference/rest/alpha/regionUrlMaps)\n\nA URL map resource is a component of certain types of cloud load balancers\nand Traffic Director:\n\n* urlMaps are used by global external Application Load\nBalancers, classic Application Load Balancers, and cross-region internal\nApplication Load Balancers.\n* regionUrlMaps are used by internal Application Load Balancers,\nregional external Application Load Balancers and regional internal\nApplication Load Balancers.\n\nFor a list of supported URL map features by the load balancer type, see the\nLoad balancing features: Routing and traffic management table.\n\nFor a list of supported URL map features for Traffic Director, see the\nTraffic Director features: Routing and traffic management table.\n\nThis resource defines mappings from hostnames and URL paths to either a\nbackend service or a backend bucket.\n\nTo use the global urlMaps resource, the backend service must\nhave a loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use\nthe regionUrlMaps resource, the backend service must have aloadBalancingScheme of INTERNAL_MANAGED. For more\ninformation, read URL\nMap Concepts.", - "id": "UrlMap", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultCustomErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "defaultCustomErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nThis policy takes\neffect at the load balancer level and applies only when no policy has been\ndefined for the error code at lower levels like PathMatcher, RouteRule and\nPathRule within this UrlMap. \n\nFor example, consider a UrlMap with the\nfollowing configuration:\n \n \n - defaultCustomErrorResponsePolicy containing policies for\n responding to 5xx and 4xx errors\n - A PathMatcher configured for *.example.com has\n defaultCustomErrorResponsePolicy for 4xx.\n\nIf a request for http://www.example.com/ encounters a404, the policy inpathMatcher.defaultCustomErrorResponsePolicy will be enforced.\nWhen the request for http://www.example.com/ encounters a502, the policy inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When\na request that does not match any host in *.example.com such\nas http://www.myotherexample.com/, encounters a404, UrlMap.defaultCustomErrorResponsePolicy\ntakes effect. \n\nWhen used in conjunction withdefaultRouteAction.retryPolicy, retries take precedence. Only\nonce all retries are exhausted, thedefaultCustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the defaultCustomErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ndefaultCustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "defaultRouteAction": { - "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the \nhostRules match. The load balancer performs advanced routing\nactions, such as URL rewrites and header transformations, before forwarding\nthe request to the selected backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\n URL maps for classic Application Load Balancers only support\nthe urlRewrite action within defaultRouteAction.\n\n\ndefaultRouteAction has no effect when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true." - }, - "defaultService": { - "description": "The full or partial URL of the defaultService resource to\nwhich traffic is directed if none of the hostRules match.\nIf defaultRouteAction is also specified, advanced\nrouting actions, such as URL rewrites, take effect before sending the\nrequest to the backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\ndefaultService has no effect when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true.", - "type": "string" - }, - "defaultUrlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When none of the specified hostRules match, the request\nis redirected to a URL specified by defaultUrlRedirect.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field is ignored when\ninserting a UrlMap. An up-to-date fingerprint must be provided\nin order to update the UrlMap, otherwise the request will\nfail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a UrlMap.", - "format": "byte", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backendService.\n\nThe headerAction specified here take effect afterheaderAction specified under pathMatcher.\n\nheaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "hostRules": { - "description": "The list of host rules to use against the URL.", - "items": { - "$ref": "HostRule" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#urlMap", - "description": "[Output Only] Type of the resource. Always compute#urlMaps for\nurl maps.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "pathMatchers": { - "description": "The list of named PathMatchers to use against the URL.", - "items": { - "$ref": "PathMatcher" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the regional URL map resides.\nThis field is not applicable to global URL maps.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "tests": { - "description": "The list of expected URL mapping tests. Request to update theUrlMap succeeds only if all test cases pass. You can specify a\nmaximum of 100 tests per UrlMap.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "UrlMapTest" - }, - "type": "array" - } - }, - "type": "object" - }, - "UrlMapList": { - "description": "Contains a list of UrlMap resources.", - "id": "UrlMapList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of UrlMap resources.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "kind": { - "default": "compute#urlMapList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapReference": { - "id": "UrlMapReference", - "properties": { - "urlMap": { - "type": "string" - } - }, - "type": "object" - }, - "UrlMapTest": { - "description": "Message for the expected URL mappings.", - "id": "UrlMapTest", - "properties": { - "backendServiceWeight": { - "description": "The weight to use for the supplied host and path when using advanced\nrouting rules that involve traffic splitting.", - "format": "uint32", - "type": "integer" - }, - "description": { - "description": "Description of this test case.", - "type": "string" - }, - "expectedOutputUrl": { - "description": "The expected output URL evaluated by the load balancer\ncontaining the scheme, host, path and query parameters.\n\nFor rules that forward requests to backends, the test passes only whenexpectedOutputUrl matches the request forwarded by\nthe load balancer to backends. For rules with urlRewrite,\nthe test verifies that the forwarded request matcheshostRewrite and pathPrefixRewrite in theurlRewrite action. When service is specified,expectedOutputUrl`s scheme is ignored.\n\nFor rules with urlRedirect, the test passes only ifexpectedOutputUrl matches the URL in the load balancer's\nredirect response. If urlRedirect specifieshttps_redirect, the test passes only if the scheme inexpectedOutputUrl is also set to HTTPS.\nIf urlRedirect specifies strip_query, the test\npasses only if expectedOutputUrl does not contain any query\nparameters. \n\nexpectedOutputUrl is optional whenservice is specified.", - "type": "string" - }, - "expectedRedirectResponseCode": { - "description": "For rules with urlRedirect, the test passes only ifexpectedRedirectResponseCode matches the HTTP status code in\nload balancer's redirect response.\n\nexpectedRedirectResponseCode cannot be set whenservice is set.", - "format": "int32", - "type": "integer" - }, - "expectedUrlRedirect": { - "description": "The expected URL that should be redirected to for the host and path\nbeing tested.\n[Deprecated] This field is deprecated.\nUse expected_output_url instead.", - "type": "string" - }, - "headers": { - "description": "HTTP headers for this request. If headers contains\na host header, then host must also match the header value.", - "items": { - "$ref": "UrlMapTestHeader" - }, - "type": "array" - }, - "host": { - "description": "Host portion of the URL. If headers contains a host header,\nthen host must also match the header value.", - "type": "string" - }, - "path": { - "description": "Path portion of the URL.", - "type": "string" - }, - "service": { - "description": "Expected BackendService or BackendBucket resource\nthe given URL should be mapped to. \n\nThe service field cannot\nbe set if expectedRedirectResponseCode is set.", - "type": "string" - } - }, - "type": "object" - }, - "UrlMapTestHeader": { - "description": "HTTP headers used in UrlMapTests.", - "id": "UrlMapTestHeader", - "properties": { - "name": { - "description": "Header name.", - "type": "string" - }, - "value": { - "description": "Header value.", - "type": "string" - } - }, - "type": "object" - }, - "UrlMapValidationResult": { - "description": "Message representing the validation result for a UrlMap.", - "id": "UrlMapValidationResult", - "properties": { - "loadErrors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "loadSucceeded": { - "description": "Whether the given UrlMap can be successfully loaded.\nIf false, 'loadErrors' indicates the reasons.", - "type": "boolean" - }, - "testFailures": { - "items": { - "$ref": "TestFailure" - }, - "type": "array" - }, - "testPassed": { - "description": "If successfully loaded, this field indicates whether the test passed.\nIf false, 'testFailures's indicate the reason of failure.", - "type": "boolean" - } - }, - "type": "object" - }, - "UrlMapsAggregatedList": { - "id": "UrlMapsAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "UrlMapsScopedList", - "description": "Name of the scope containing this set of UrlMaps." - }, - "description": "A list of UrlMapsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#urlMapsAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapsScopedList": { - "id": "UrlMapsScopedList", - "properties": { - "urlMaps": { - "description": "A list of UrlMaps contained in this scope.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapsValidateRequest": { - "id": "UrlMapsValidateRequest", - "properties": { - "loadBalancingSchemes": { - "description": "Specifies the load balancer type(s) this validation request is for. UseEXTERNAL_MANAGED for global external Application Load\nBalancers and regional external Application Load Balancers.\nUse EXTERNAL for classic Application Load Balancers.\n\nUse INTERNAL_MANAGED for internal Application Load Balancers. For more\ninformation, refer to Choosing\na load balancer.\n\nIf unspecified, the load balancing scheme will be inferred from the backend\nservice resources this URL map references. If that can not be inferred (for\nexample, this URL map only references backend buckets, or this Url map is\nfor rewrites and redirects only and doesn't reference any backends),EXTERNAL will be used as the default type.\n\nIf specified, the scheme(s) must not conflict with the load balancing\nscheme of the backend service resources this Url map references.", - "items": { - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "LOAD_BALANCING_SCHEME_UNSPECIFIED" - ], - "enumDescriptions": [ - "Signifies that this will be used for classic Application Load Balancers.", - "Signifies that this will be used for Envoy-based global external\nApplication Load Balancers.", - "If unspecified, the validation will try to infer the scheme from the\nbackend service resources this Url map references. If the inference is not\npossible, EXTERNAL will be used as the default type." - ], - "type": "string" - }, - "type": "array" - }, - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - }, - "type": "object" - }, - "UrlMapsValidateResponse": { - "id": "UrlMapsValidateResponse", - "properties": { - "result": { - "$ref": "UrlMapValidationResult" - } - }, - "type": "object" - }, - "UrlRewrite": { - "description": "The spec for modifying the path before sending the request to the matched\nbackend service.", - "id": "UrlRewrite", - "properties": { - "hostRewrite": { - "description": "Before forwarding the request to the selected service, the request's\nhost header is replaced with contents of hostRewrite.\n\nThe value must be from 1 to 255 characters.", - "type": "string" - }, - "pathPrefixRewrite": { - "description": "Before forwarding the request to the selected backend service, the\nmatching portion of the request's path is replaced bypathPrefixRewrite.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "pathTemplateRewrite": { - "description": "If specified, the pattern rewrites the URL path (based on the :path\nheader) using the HTTP template syntax. \n\nA corresponding\npath_template_match must be specified. Any template variables must exist in\nthe path_template_match field. \n \n \n - -At least one variable must be specified in the path_template_match\n field \n - You can omit variables from the rewritten URL\n - The * and ** operators cannot be matched\n unless they have a corresponding variable name - e.g.\n {format=*} or {var=**}.\n\nFor example, a path_template_match of /static/{format=**}\ncould be rewritten as /static/content/{format} to prefix/content to the URL. Variables can also be re-ordered in a\nrewrite, so that /{country}/{format}/{suffix=**} can be\nrewritten as /content/{format}/{country}/{suffix}. \n\nAt least\none non-empty routeRules[].matchRules[].path_template_match is\nrequired. \n\nOnly one of path_prefix_rewrite orpath_template_rewrite may be specified.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetwork": { - "description": "Subnetwork which the current user has compute.subnetworks.use permission on.", - "id": "UsableSubnetwork", - "properties": { - "externalIpv6Prefix": { - "description": "[Output Only] The external IPv6 address range that is assigned to this\nsubnetwork.", - "type": "string" - }, - "internalIpv6Prefix": { - "description": "[Output Only] The internal IPv6 address range that is assigned to this\nsubnetwork.", - "type": "string" - }, - "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork.", - "type": "string" - }, - "ipv6AccessType": { - "description": "The access type of IPv6 address this subnet holds. It's immutable and can\nonly be specified during creation or the first time the subnet is updated\ninto IPV4_IPV6 dual stack.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "VMs on this subnet will be assigned IPv6 addresses that are accessible\nvia the Internet, as well as the VPC network.", - "VMs on this subnet will be assigned IPv6 addresses that are only\naccessible over the VPC network." - ], - "type": "string" - }, - "network": { - "description": "Network URL.", - "type": "string" - }, - "purpose": { - "enum": [ - "AGGREGATE", - "CLOUD_EXTENSION", - "CUSTOM_HARDWARE_LINK", - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnetwork used to aggregate multiple private subnetworks.", - "Subnetworks created for Cloud Extension Machines.", - "Subnetwork used for Custom Hardware Link.", - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "role": { - "description": "The role of subnetwork. Currently, this field is only used when\npurpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE\nsubnetwork is one that is currently being used for Envoy-based load\nbalancers in a region. A BACKUP subnetwork is one that is\nready to be promoted to ACTIVE or is currently draining.\nThis field can be updated with a patch request.", - "enum": [ - "ACTIVE", - "BACKUP" - ], - "enumDescriptions": [ - "The ACTIVE subnet that is currently used.", - "The BACKUP subnet that could be promoted to ACTIVE." - ], - "type": "string" - }, - "secondaryIpRanges": { - "description": "Secondary IP ranges.", - "items": { - "$ref": "UsableSubnetworkSecondaryRange" - }, - "type": "array" - }, - "stackType": { - "description": "The stack type for the subnet. If set to IPV4_ONLY, new VMs\nin the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and\nIPv6 addresses. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "subnetwork": { - "description": "Subnetwork URL.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetworkSecondaryRange": { - "description": "Secondary IP range of a usable subnetwork.", - "id": "UsableSubnetworkSecondaryRange", - "properties": { - "ipCidrRange": { - "description": "The range of IP addresses belonging to this subnetwork secondary range.", - "type": "string" - }, - "rangeName": { - "description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.\nThe name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the subnetwork.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetworksAggregatedList": { - "id": "UsableSubnetworksAggregatedList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output] A list of usable subnetwork URLs.", - "items": { - "$ref": "UsableSubnetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableSubnetworksAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#usableSubnetworksAggregatedList for aggregated lists\nof usable subnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.\nIn special cases listUsable may return 0 subnetworks andnextPageToken which still should be used to get the\nnext page of results.", - "type": "string" - }, - "scopedWarnings": { - "description": "[Output Only] Informational warning messages for failures encountered from\nscopes.", - "items": { - "$ref": "SubnetworksScopedWarning" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UsageExportLocation": { - "description": "The location in Cloud Storage and naming method of the daily usage\nreport. Contains bucket_name and report_name prefix.", - "id": "UsageExportLocation", - "properties": { - "bucketName": { - "description": "The name of an existing bucket in Cloud Storage where the usage report\nobject is stored. The Google Service Account is granted write access to\nthis bucket. This can either be the bucket name by itself, such asexample-bucket, or the bucket name with gs://\nor https://storage.googleapis.com/ in front of it, such\nas gs://example-bucket.", - "type": "string" - }, - "reportNamePrefix": { - "description": "An optional prefix for the name of the usage report object stored inbucketName. If not supplied, defaults tousage_gce. The report is stored as a CSV file namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD is the day of the usage according to Pacific Time.\nIf you supply a prefix, it should conform to Cloud Storageobject naming\nconventions.", - "type": "string" - } - }, - "type": "object" - }, - "VmEndpointNatMappings": { - "description": "Contain information of Nat mapping for a VM endpoint (i.e., NIC).", - "id": "VmEndpointNatMappings", - "properties": { - "instanceName": { - "description": "Name of the VM instance which the endpoint belongs to", - "type": "string" - }, - "interfaceNatMappings": { - "items": { - "$ref": "VmEndpointNatMappingsInterfaceNatMappings" - }, - "type": "array" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsInterfaceNatMappings": { - "description": "Contain information of Nat mapping for an interface of this endpoint.", - "id": "VmEndpointNatMappingsInterfaceNatMappings", - "properties": { - "drainNatIpPortRanges": { - "description": "List of all drain IP:port-range mappings assigned to this interface.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "natIpPortRanges": { - "description": "A list of all IP:port-range mappings assigned to this interface.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "numTotalDrainNatPorts": { - "description": "Total number of drain ports across all NAT IPs allocated to this\ninterface. It equals to the aggregated port number in the field\ndrain_nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "numTotalNatPorts": { - "description": "Total number of ports across all NAT IPs allocated to this interface.\nIt equals to the aggregated port number in the field nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "ruleMappings": { - "description": "Information about mappings provided by rules in this NAT.", - "items": { - "$ref": "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings" - }, - "type": "array" - }, - "sourceAliasIpRange": { - "description": "Alias IP range for this interface endpoint.\nIt will be a private (RFC 1918) IP range.\nExamples: \"10.33.4.55/32\", or \"192.168.5.0/24\".", - "type": "string" - }, - "sourceVirtualIp": { - "description": "Primary IP of the VM for this NIC.", - "type": "string" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings": { - "description": "Contains information of NAT Mappings provided by a NAT Rule.", - "id": "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", - "properties": { - "drainNatIpPortRanges": { - "description": "List of all drain IP:port-range mappings assigned to this interface\nby this rule.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "natIpPortRanges": { - "description": "A list of all IP:port-range mappings assigned to this interface by this\nrule.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "numTotalDrainNatPorts": { - "description": "Total number of drain ports across all NAT IPs allocated to this\ninterface by this rule.\nIt equals the aggregated port number in the field\ndrain_nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "numTotalNatPorts": { - "description": "Total number of ports across all NAT IPs allocated to this interface\nby this rule.\nIt equals the aggregated port number in the field nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "ruleNumber": { - "description": "Rule number of the NAT Rule.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsList": { - "description": "Contains a list of VmEndpointNatMappings.", - "id": "VmEndpointNatMappingsList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#vmEndpointNatMappingsList", - "description": "[Output Only] Type of resource. Alwayscompute#vmEndpointNatMappingsList for lists of Nat mappings of\nVM endpoints.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of Nat mapping information of VM endpoints.", - "items": { - "$ref": "VmEndpointNatMappings" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPoliciesScopedList": { - "id": "VmExtensionPoliciesScopedList", - "properties": { - "vmExtensionPolicies": { - "description": "List of VmExtensionPolicy resources contained in this scope.", - "items": { - "$ref": "VmExtensionPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicy": { - "description": "Represents a VM extension policy.", - "id": "VmExtensionPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "extensionPolicies": { - "additionalProperties": { - "$ref": "VmExtensionPolicyExtensionPolicy" - }, - "description": "Required. A map of extension names (e.g., \"cloudops\") to their corresponding policy\nconfigurations.", - "type": "object" - }, - "globalResourceLink": { - "description": "Optional. [Output Only] Link to the global policy that manages this zone policy, if\napplicable.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSelectors": { - "description": "Optional. Selectors to target VMs for this policy. VMs are selected if they match\n*any* of the provided selectors (logical OR). If this list is empty, the\npolicy applies to all VMs.", - "items": { - "$ref": "VmExtensionPolicyInstanceSelector" - }, - "type": "array" - }, - "kind": { - "default": "compute#vmExtensionPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.", - "type": "string" - }, - "managedByGlobal": { - "description": "Optional. [Output Only] Indicates if this policy is managed by a global policy.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.zoneVmExtensionPolicies.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "priority": { - "description": "Optional. Priority of this policy. Used to resolve conflicts when multiple policies\napply to the same extension.\nThe policy priority is an integer from 0 to 65535, inclusive. Lower\nintegers indicate higher priorities. If you do not specify a priority when\ncreating a rule, it is assigned a priority of 1000. If priorities are\nequal, the policy with the more recent creation timestamp takes precedence.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "state": { - "description": "Optional. [Output Only] Current state of the policy: ACTIVE or DELETING.", - "enum": [ - "ACTIVE", - "DELETING", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The policy is active and applied to matching VMs.\nNewly created VMs that match the policy will also receive the\nextension policy.", - "The policy is in the process of being deleted. After the extension is\nremoved from all matching VMs, the policy will be deleted.", - "Default value. Do not use." - ], - "type": "string" - }, - "updateTimestamp": { - "description": "[Output Only] Update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "VmExtensionPolicyAggregatedListResponse": { - "description": "Response for the aggregated list of VM extension policies.", - "id": "VmExtensionPolicyAggregatedListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VmExtensionPoliciesScopedList", - "description": "Name of the scope containing this set of VmExtensionPolicies." - }, - "description": "A list of VmExtensionPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#VmExtensionPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#VmExtensionPolicyAggregatedList for lists of\nVmExtensionPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicyExtensionPolicy": { - "description": "Configuration for a specific VM extension.", - "id": "VmExtensionPolicyExtensionPolicy", - "properties": { - "pinnedVersion": { - "description": "Optional. The specific version of the extension to install. If not set, the latest\nversion is used.", - "type": "string" - }, - "stringConfig": { - "description": "Optional. String-based configuration data for the extension.", - "type": "string" - } - }, - "type": "object" - }, - "VmExtensionPolicyInstanceSelector": { - "description": "Defines how to select VMs to apply a zone VM extension policy.", - "id": "VmExtensionPolicyInstanceSelector", - "properties": { - "labelSelector": { - "$ref": "VmExtensionPolicyLabelSelector", - "description": "Optional. LabelSelector selects VMs based on their labels." - } - }, - "type": "object" - }, - "VmExtensionPolicyLabelSelector": { - "description": "A LabelSelector is applied to a VM only if it matches all the specified\nlabels.", - "id": "VmExtensionPolicyLabelSelector", - "properties": { - "inclusionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A map of key-value pairs representing VM labels.\nVMs must have all of the labels specified in this map to be selected\n(logical AND).\n\ne.g. If the `inclusion_labels` are {(\"key1\", \"value1\"), (\"key2\",\n\"value2\")}, the VM labels must contain both (\"key1\", \"value1\") and\n(\"key2\", \"value2\") to be selected. If the VM labels are (\"key1\",\n\"value1\") and (\"something\", \"else\"), it will not be selected.\n\nIf the map is empty, it's considered a match.", - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicyList": { - "id": "VmExtensionPolicyList", - "properties": { - "etag": { - "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored\nin this object. This field is used in optimistic locking. This field will\nbe ignored when inserting a VmExtensionPolicy. An up-to-date\nfingerprint must be provided in order to update the VmExtensionPolicy.\n\nTo see the latest value of the fingerprint, make a get() request to\nretrieve a VmExtensionPolicy.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of VM extension policy resources.", - "items": { - "$ref": "VmExtensionPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#vmExtensionPolicyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGateway": { - "description": "Represents a HA VPN gateway.\n\nHA VPN is a high-availability (HA) Cloud VPN solution that lets you securely\nconnect your on-premises network to your Google Cloud Virtual Private Cloud\nnetwork through an IPsec VPN connection in a single region.\nFor more information about Cloud HA VPN solutions, see\nCloud VPN topologies .", - "id": "VpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "gatewayIpVersion": { - "description": "The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not\nspecified, IPV4 will be used.", - "enum": [ - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "Every HA-VPN gateway interface is configured with an IPv4 address.", - "Every HA-VPN gateway interface is configured with an IPv6 address." - ], - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#vpnGateway", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this VpnGateway, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a VpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.vpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.vpnGateways.insert" - ] - }, - "description": "URL of the network to which this VPN gateway is attached. Provided by the\nclient when the VPN gateway is created.", - "type": "string" - }, - "params": { - "$ref": "VpnGatewayParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the VPN gateway resides.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "stackType": { - "description": "The stack type for this VPN gateway to identify the IP protocols that are\nenabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "Enable VPN gateway with both IPv4 and IPv6 protocols.", - "Enable VPN gateway with only IPv4 protocol.", - "Enable VPN gateway with only IPv6 protocol." - ], - "type": "string" - }, - "vpnInterfaces": { - "description": "The list of VPN interfaces associated with this VPN gateway.", - "items": { - "$ref": "VpnGatewayVpnGatewayInterface" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayAggregatedList": { - "id": "VpnGatewayAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of VPN gateways." - }, - "description": "A list of VpnGateway resources.", - "type": "object" - }, - "kind": { - "default": "compute#vpnGatewayAggregatedList", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGatewayList": { - "description": "Contains a list of VpnGateway resources.", - "id": "VpnGatewayList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of VpnGateway resources.", - "items": { - "$ref": "VpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#vpnGatewayList", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGatewayParams": { - "id": "VpnGatewayParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "VpnGatewayStatus": { - "id": "VpnGatewayStatus", - "properties": { - "vpnConnections": { - "description": "List of VPN connection for this VpnGateway.", - "items": { - "$ref": "VpnGatewayStatusVpnConnection" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayStatusHighAvailabilityRequirementState": { - "description": "Describes the high availability requirement state for the VPN connection\nbetween this Cloud VPN gateway and a peer gateway.", - "id": "VpnGatewayStatusHighAvailabilityRequirementState", - "properties": { - "state": { - "description": "Indicates the high availability requirement state for the VPN connection.\nValid values are CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET.", - "enum": [ - "CONNECTION_REDUNDANCY_MET", - "CONNECTION_REDUNDANCY_NOT_MET" - ], - "enumDescriptions": [ - "VPN tunnels are configured with adequate redundancy from Cloud VPN\ngateway to the peer VPN gateway. For both GCP-to-non-GCP and GCP-to-GCP\nconnections, the adequate redundancy is a pre-requirement for users to\nget 99.99% availability on GCP side; please note that for any\nconnection, end-to-end 99.99% availability is subject to proper\nconfiguration on the peer VPN gateway.", - "VPN tunnels are not configured with adequate redundancy from the Cloud\nVPN gateway to the peer gateway" - ], - "type": "string" - }, - "unsatisfiedReason": { - "description": "Indicates the reason why the VPN connection does not meet the high\navailability redundancy criteria/requirement.\nValid values is INCOMPLETE_TUNNELS_COVERAGE.", - "enum": [ - "INCOMPLETE_TUNNELS_COVERAGE" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewayStatusTunnel": { - "description": "Contains some information about a VPN tunnel.", - "id": "VpnGatewayStatusTunnel", - "properties": { - "localGatewayInterface": { - "description": "The VPN gateway interface this VPN tunnel is associated with.", - "format": "uint32", - "type": "integer" - }, - "peerGatewayInterface": { - "description": "The peer gateway interface this VPN tunnel is connected to, the peer\ngateway could either be an external VPN gateway or a Google Cloud\nVPN gateway.", - "format": "uint32", - "type": "integer" - }, - "tunnelUrl": { - "description": "URL reference to the VPN tunnel.", - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewayStatusVpnConnection": { - "description": "A VPN connection contains all VPN tunnels connected from this VpnGateway\nto the same peer gateway. The peer gateway could either be an external VPN\ngateway or a Google Cloud VPN gateway.", - "id": "VpnGatewayStatusVpnConnection", - "properties": { - "peerExternalGateway": { - "description": "URL reference to the peer external VPN gateways to which the VPN tunnels\nin this VPN connection are connected.\nThis field is mutually exclusive with peer_gcp_gateway.", - "type": "string" - }, - "peerGcpGateway": { - "description": "URL reference to the peer side VPN gateways to which the VPN tunnels in\nthis VPN connection are connected.\nThis field is mutually exclusive with peer_gcp_gateway.", - "type": "string" - }, - "state": { - "$ref": "VpnGatewayStatusHighAvailabilityRequirementState", - "description": "HighAvailabilityRequirementState for the VPN connection." - }, - "tunnels": { - "description": "List of VPN tunnels that are in this VPN connection.", - "items": { - "$ref": "VpnGatewayStatusTunnel" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayVpnGatewayInterface": { - "description": "A VPN gateway interface.", - "id": "VpnGatewayVpnGatewayInterface", - "properties": { - "id": { - "description": "[Output Only] Numeric identifier for this VPN interface associated with\nthe VPN gateway.", - "format": "uint32", - "type": "integer" - }, - "interconnectAttachment": { - "description": "URL of the VLAN attachment (interconnectAttachment) resource for this\nVPN gateway interface. When the value of this field is present, the VPN\ngateway is used for HA VPN over Cloud Interconnect; all egress\nor ingress traffic for this VPN gateway interface goes through the\nspecified VLAN attachment resource.", - "type": "string" - }, - "ipAddress": { - "description": "[Output Only] IP address for this VPN interface associated with the VPN\ngateway.\nThe IP address could be either a regional external IP address or\na regional internal IP address. The two IP addresses for a VPN gateway\nmust be all regional external or regional internal IP addresses. There\ncannot be a mix of regional external IP addresses and regional internal\nIP addresses. For HA VPN over Cloud Interconnect, the IP addresses\nfor both interfaces could either be regional internal IP addresses or\nregional external IP addresses. For regular (non HA VPN over Cloud\nInterconnect) HA VPN tunnels, the IP address must be a regional external\nIP address.", - "type": "string" - }, - "ipv6Address": { - "description": "[Output Only] IPv6 address for this VPN interface associated with the VPN\ngateway.\nThe IPv6 address must be a regional external IPv6 address. The format is\nRFC 5952 format (e.g. 2001:db8::2d9:51:0:0).", - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewaysGetStatusResponse": { - "id": "VpnGatewaysGetStatusResponse", - "properties": { - "result": { - "$ref": "VpnGatewayStatus" - } - }, - "type": "object" - }, - "VpnGatewaysScopedList": { - "id": "VpnGatewaysScopedList", - "properties": { - "vpnGateways": { - "description": "[Output Only] A list of VPN gateways contained in this scope.", - "items": { - "$ref": "VpnGateway" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnel": { - "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the\nthe Cloud VPN Overview.", - "id": "VpnTunnel", - "properties": { - "capacityTier": { - "description": "Capacity tier of the VPN tunnel. This is used for IPsec over Interconnect\ntunnels to indicate different bandwidth limits.", - "enum": [ - "DEFAULT", - "HIGH" - ], - "enumDescriptions": [ - "DEFAULT: A VPN tunnel which can support up to 1 Gbps.", - "HIGH: A VPN tunnel which can support up to 6 Gbps." - ], - "type": "string" - }, - "cipherSuite": { - "$ref": "VpnTunnelCipherSuite", - "description": "User specified list of ciphers to use for the phase 1 and phase 2 of the\nIKE protocol." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "detailedStatus": { - "description": "[Output Only] Detailed status message for the VPN tunnel.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ikeVersion": { - "description": "IKE protocol version to use when establishing the VPN tunnel with the peer\nVPN gateway. Acceptable IKE versions are 1 or 2.\nThe default version is 2.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#vpnTunnel", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this VpnTunnel, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a VpnTunnel.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with the\npeer VPN gateway. The value should be a CIDR formatted string, for\nexample: 192.168.0.0/16. The ranges must be disjoint.\nOnly IPv4 is supported for Classic VPN tunnels. This field is output only\nfor HA VPN tunnels.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "VpnTunnelParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "peerExternalGateway": { - "description": "URL of the peer side external VPN gateway to which this VPN tunnel is\nconnected.\nProvided by the client when the VPN tunnel is created.\nThis field is exclusive with the field peerGcpGateway.", - "type": "string" - }, - "peerExternalGatewayInterface": { - "description": "The interface ID of the external VPN gateway to which this VPN tunnel is\nconnected. Provided by the client when the VPN tunnel is created.\nPossible values are: `0`, `1`, `2`, `3`. The number of IDs in use\ndepends on the external VPN gateway redundancy type.", - "format": "int32", - "type": "integer" - }, - "peerGcpGateway": { - "description": "URL of the peer side HA VPN gateway to which this VPN tunnel\nis connected. Provided by the client when the VPN tunnel is created.\nThis field can be used when creating highly available VPN from VPC network\nto VPC network, the field is exclusive with the field peerExternalGateway.\nIf provided, the VPN tunnel will automatically use the same\nvpnGatewayInterface ID in the peer Google Cloud VPN gateway.", - "type": "string" - }, - "peerIp": { - "description": "IP address of the peer VPN gateway. Only IPv4 is supported. This field can\nbe set only for Classic VPN tunnels.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the VPN tunnel resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with\nthe peer VPN gateway. The value should be a CIDR formatted string,\nfor example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is\nsupported for Classic VPN tunnels. This field is output only for HA VPN\ntunnels.", - "items": { - "type": "string" - }, - "type": "array" - }, - "router": { - "description": "URL of the router resource to be used for dynamic routing.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sharedSecret": { - "description": "Shared secret used to set the secure session between the Cloud VPN gateway\nand the peer VPN gateway.", - "type": "string" - }, - "sharedSecretHash": { - "description": "Hash of the shared secret.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the VPN tunnel, which can be one of the\nfollowing:\n \n - PROVISIONING: Resource is being allocated for the VPN tunnel.\n - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs\n from\n the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route\n resources are needed to setup the VPN tunnel.\n - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.\n - ESTABLISHED: Secure session is successfully established with the peer\n VPN. \n - NETWORK_ERROR: Deprecated, replaced by\n NO_INCOMING_PACKETS \n - AUTHORIZATION_ERROR: Auth error (for example,\n bad shared secret). \n - NEGOTIATION_FAILURE: Handshake failed.\n - DEPROVISIONING: Resources are being deallocated for the VPN\n tunnel. \n - FAILED: Tunnel creation has failed and the tunnel is not\n ready to be used. \n - NO_INCOMING_PACKETS: No incoming packets from\n peer. \n - REJECTED: Tunnel configuration was rejected, can be result\n of being denied access. \n - ALLOCATING_RESOURCES: Cloud VPN is in the\n process of allocating all required resources.\n - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted\n for Classic VPN tunnels or the project is in frozen state.\n - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP,\n probably behind NAT. \n - TS_NARROWING_NOT_ALLOWED: Traffic selector\n narrowing not allowed for an HA-VPN tunnel.", - "enum": [ - "ALLOCATING_RESOURCES", - "AUTHORIZATION_ERROR", - "DEPROVISIONING", - "ESTABLISHED", - "FAILED", - "FIRST_HANDSHAKE", - "NEGOTIATION_FAILURE", - "NETWORK_ERROR", - "NO_INCOMING_PACKETS", - "PROVISIONING", - "REJECTED", - "STOPPED", - "WAITING_FOR_FULL_CONFIG" - ], - "enumDescriptions": [ - "Cloud VPN is in the process of allocating all required resources\n(specifically, a borg task).", - "Auth error (e.g. bad shared secret).", - "Resources is being deallocated for the VPN tunnel.", - "Secure session is successfully established with peer VPN.", - "Tunnel creation has failed and the tunnel is not ready to be used.", - "Successful first handshake with peer VPN.", - "Handshake failed.", - "Deprecated, replaced by NO_INCOMING_PACKETS", - "No incoming packets from peer", - "Resource is being allocated for the VPN tunnel.", - "Tunnel configuration was rejected, can be result of being denylisted.", - "Tunnel is stopped due to its Forwarding Rules being deleted.", - "Waiting to receive all VPN-related configs from user. Network,\nTargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are\nneeded to setup VPN tunnel." - ], - "type": "string" - }, - "targetVpnGateway": { - "description": "URL of the Target VPN gateway with which this VPN tunnel is associated.\nProvided by the client when the VPN tunnel is created.\nThis field can be set only for Classic VPN tunnels.", - "type": "string" - }, - "vpnGateway": { - "description": "URL of the VPN gateway with which this VPN tunnel is associated.\nProvided by the client when the VPN tunnel is created. This must be\nused (instead of target_vpn_gateway) if a High Availability VPN gateway\nresource is created.", - "type": "string" - }, - "vpnGatewayInterface": { - "description": "The interface ID of the VPN gateway with which this VPN tunnel is\nassociated.\nPossible values are: `0`, `1`.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "VpnTunnelAggregatedList": { - "id": "VpnTunnelAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of VPN tunnels." - }, - "description": "A list of VpnTunnelsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#vpnTunnelAggregatedList", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnelCipherSuite": { - "id": "VpnTunnelCipherSuite", - "properties": { - "phase1": { - "$ref": "VpnTunnelPhase1Algorithms" - }, - "phase2": { - "$ref": "VpnTunnelPhase2Algorithms" - } - }, - "type": "object" - }, - "VpnTunnelList": { - "description": "Contains a list of VpnTunnel resources.", - "id": "VpnTunnelList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of VpnTunnel resources.", - "items": { - "$ref": "VpnTunnel" - }, - "type": "array" - }, - "kind": { - "default": "compute#vpnTunnelList", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnelParams": { - "id": "VpnTunnelParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnelPhase1Algorithms": { - "id": "VpnTunnelPhase1Algorithms", - "properties": { - "dh": { - "items": { - "type": "string" - }, - "type": "array" - }, - "encryption": { - "items": { - "type": "string" - }, - "type": "array" - }, - "integrity": { - "items": { - "type": "string" - }, - "type": "array" - }, - "prf": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnTunnelPhase2Algorithms": { - "id": "VpnTunnelPhase2Algorithms", - "properties": { - "encryption": { - "items": { - "type": "string" - }, - "type": "array" - }, - "integrity": { - "items": { - "type": "string" - }, - "type": "array" - }, - "pfs": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnTunnelsScopedList": { - "id": "VpnTunnelsScopedList", - "properties": { - "vpnTunnels": { - "description": "A list of VPN tunnels contained in this scope.", - "items": { - "$ref": "VpnTunnel" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "WafExpressionSet": { - "id": "WafExpressionSet", - "properties": { - "aliases": { - "description": "A list of alternate IDs. The format should be:\n- E.g. XSS-stable\nGeneric suffix like \"stable\" is particularly useful if a policy\nlikes to avail newer set of expressions without having to change\nthe policy.\nA given alias name can't be used for more than one entity set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "expressions": { - "description": "List of available expressions.", - "items": { - "$ref": "WafExpressionSetExpression" - }, - "type": "array" - }, - "id": { - "description": "Google specified expression set ID. The format should be:\n- E.g. XSS-20170329\nrequired", - "type": "string" - } - }, - "type": "object" - }, - "WafExpressionSetExpression": { - "id": "WafExpressionSetExpression", - "properties": { - "id": { - "description": "Expression ID should uniquely identify the origin of the expression.\nE.g. owasp-crs-v020901-id973337 identifies Owasp core rule set\nversion 2.9.1 rule id 973337.\nThe ID could be used to determine the individual attack definition\nthat has been detected. It could also be used to exclude it from\nthe policy in case of false positive.\nrequired", - "type": "string" - }, - "sensitivity": { - "description": "The sensitivity value associated with the WAF rule ID. This corresponds\nto the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for\nopt-in only rules.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "WaitForReplicationCatchUpRequest": { - "id": "WaitForReplicationCatchUpRequest", - "properties": { - "maxWaitDuration": { - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "WeightedBackendService": { - "description": "In contrast to a single BackendService in \nHttpRouteAction to which all matching traffic is directed to,WeightedBackendService allows traffic to be split across\nmultiple backend services. The volume of traffic for each\nbackend service is proportional to the weight specified\nin each WeightedBackendService", - "id": "WeightedBackendService", - "properties": { - "backendService": { - "description": "The full or partial URL to the default BackendService\nresource. Before\nforwarding the request to backendService, the load balancer\napplies any relevant headerActions specified as part of thisbackendServiceWeight.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take\neffect for the selected backendService.\n\nheaderAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap.\n\nheaderAction is not supported for load balancers that have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "weight": { - "description": "Specifies the fraction of traffic sent to a backend service,\ncomputed asweight / (sum of all weightedBackendService weights in routeAction).\n\nThe selection of a backend service is determined only for new traffic.\nOnce a user's request has been directed to a backend service,\nsubsequent requests are sent to the same backend service as\ndetermined by the backend service's session affinity policy.\nDon't configure session affinity if you're using weighted traffic\nsplitting. If you do, the weighted traffic splitting configuration takes\nprecedence.\n\nThe value must be from 0 to 1000.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "Wire": { - "description": "A pseudowire that connects two Interconnect connections.", - "id": "Wire", - "properties": { - "adminEnabled": { - "description": "[Output Only] Indicates whether the wire is enabled.\nWhen false, the wire is disabled. When true and when the wire group of\nthe wire is also enabled, the wire is enabled. Defaults to true.", - "type": "boolean" - }, - "endpoints": { - "description": "Wire endpoints are specific Interconnect connections.", - "items": { - "$ref": "WireEndpoint" - }, - "type": "array" - }, - "label": { - "description": "[Output Only] A label that identifies the wire. The format of this label\ncombines the existing labels of the wire group endpoints and Interconnect\nconnections used by this wire in alphabetical order as follows:\n`ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1`, where:\n \n - ENDPOINT_A and ENDPOINT_B: are the labels\n that you entered as map keys when you specified the wire group endpoint\n objects.\n - CONNECTION_A1 and CONNECTION_B1: are the\n labels that you entered as map keys when you specified the wire group\n Interconnect objects.", - "type": "string" - }, - "wireProperties": { - "$ref": "WireProperties", - "description": "[Output Only] Properties of the wire." - } - }, - "type": "object" - }, - "WireEndpoint": { - "description": "Wire endpoints are specific Interconnect connections.", - "id": "WireEndpoint", - "properties": { - "interconnect": { - "type": "string" - }, - "vlanTag": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "WireGroup": { - "description": "A resource that represents a group of redundant wires.", - "id": "WireGroup", - "properties": { - "adminEnabled": { - "description": "Indicates whether the wires in the wire group are enabled. When false, the\nwires in the wire group are disabled. When true and when\nthere is simultaneously no wire-specific override of `adminEnabled` to\nfalse, a given wire is enabled. Defaults to true.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of the wire group.", - "type": "string" - }, - "endpoints": { - "additionalProperties": { - "$ref": "WireGroupEndpoint" - }, - "description": "A map that contains the logical endpoints of the wire group. Specify\nkey-value pairs for the map as follows:\n \n - Key: an RFC1035 user-specified label.\n - Value: an Endpoint object.", - "type": "object" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#wireGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#wireGroups for wire groups.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "reconciling": { - "description": "[Output Only] Indicates whether there are wire changes yet to be processed.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "type": "string" - }, - "serviceLevel": { - "$ref": "WireGroupServiceLevel", - "description": "Service level details determined for the wire group configuration." - }, - "topology": { - "$ref": "WireGroupTopology", - "description": "Topology details for the wire group configuration." - }, - "wireGroupProperties": { - "$ref": "WireGroupProperties", - "description": "Properties of the wire group." - }, - "wireInputs": { - "additionalProperties": { - "$ref": "WireGroupWireInputs" - }, - "description": "A map that contains optional settings for individual wires.\nSpecify key-value pairs for the map as follows:\n \n - Key: the label of an existing wire. To view a wire label and its\n format, see the wires[].label field.\n - Value: a WireInputs object.", - "type": "object" - }, - "wireProperties": { - "$ref": "WireProperties", - "description": "Properties for all wires in the wire group." - }, - "wires": { - "description": "The single/redundant wire(s) managed by the wire group.", - "items": { - "$ref": "Wire" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupEndpoint": { - "description": "A logical endpoint for the wire group. An endpoint represents a metro that\ncontains redundant Interconnect connections. A wire group is created\nbetween two endpoints.", - "id": "WireGroupEndpoint", - "properties": { - "interconnects": { - "additionalProperties": { - "$ref": "WireGroupEndpointInterconnect" - }, - "description": "A map that contains the redundant Interconnect connections. Specify\nkey-value pairs for the map as follows:\n \n - Key: an RFC1035 user-specified label.\n - Value: an Interconnect object.", - "type": "object" - } - }, - "type": "object" - }, - "WireGroupEndpointInterconnect": { - "description": "The redundant Interconnect connections for this endpoint.", - "id": "WireGroupEndpointInterconnect", - "properties": { - "interconnect": { - "description": "Required. An Interconnect connection. You can specify the connection as\na partial or full URL. If the connection is in a different project from\nthe cross-site network, use a format that specifies the project. See\nthe following examples of partial and full URLs:\n \n \n \n global/interconnects/NAME\n \n \n projects/PROJECT_ID/global/interconnects/NAME\n \n - \n https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME", - "type": "string" - }, - "vlanTags": { - "description": "Required. To configure the wire group for VLAN mode, enter a VLAN tag,\nwhich is a number from `2` to `4093`. You can autoallocate a tag by\nentering `0`. To configure the wire group for port mode, enter `-1`.\nReview the following guidelines:\n \n - A VLAN tag must be unique for an Interconnect connection across all\n attachments and wire groups.\n - Both endpoints of a wire must use the same VLAN tag value.\n - Single wire and redundant type wire groups must have only one\n VLAN tag.\n - Port mode pseudowires must have a single VLAN tag with a value of\n `-1` for both endpoints.\n - Box and cross type wire groups must have two VLAN tags. The first\n is for the same-zone pseudowire, and the second is for the cross-zone\n pseudowire.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupList": { - "description": "Response for the list request.", - "id": "WireGroupList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of wire group resources.", - "items": { - "$ref": "WireGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#wireGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#wireGroups for wire groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "WireGroupProperties": { - "description": "The properties of a wire group. These properties\ndetermine how a group of redundant wires are created and managed.", - "id": "WireGroupProperties", - "properties": { - "type": { - "description": "The type of the wire group, one of the following:\n \n - WIRE: a single pseudowire over two Interconnect connections with no\n redundancy.\n - REDUNDANT: two pseudowires over four Interconnect connections, with\n two connections in one metro and two connections in another metro.\n Each redundant pair of Interconnect connections spans both edge\n availability domains of the metro. Each pseudowire connects Interconnect\n connections in matching edge availability domains of the two metros.\n - BOX_AND_CROSS: four pseudowires over four Interconnect connections,\n with two connections in one metro and two connections in another metro.\n Each redundant pair of Interconnect connections spans both edge\n availability domains of the metro. Two pseudowires connect Interconnect\n connections in matching edge availability domains of the two metros.\n Two additional pseudowires connect the non-matching edge availability\n domains of the two metros.", - "enum": [ - "BOX_AND_CROSS", - "REDUNDANT", - "WIRE" - ], - "enumDescriptions": [ - "Four pseudowires over four Interconnect connections,\nwith two connections in one metro and two connections in another metro.\nEach redundant pair of Interconnect connections spans both edge\navailability domains of the metro. Two pseudowires connect Interconnect\nconnections in matching edge availability domains of the two metros.\nTwo additional pseudowires connect the non-matching edge availability\ndomains of the two metros.", - "Two pseudowires over four Interconnect connections, with\ntwo connections in one metro and two connections in another metro.\nEach redundant pair of Interconnect connections spans both edge\navailability domains of the metro. Each pseudowire connects Interconnect\nconnections in matching edge availability domains of the two metros.", - "A single pseudowire over two Interconnect connections with no redundancy." - ], - "type": "string" - } - }, - "type": "object" - }, - "WireGroupServiceLevel": { - "description": "Service level details determined for the wire group configuration.", - "id": "WireGroupServiceLevel", - "properties": { - "availabilityClass": { - "description": "[Output Only] The availability SLA that the wire group qualifies for. One\nof the following: `NO_AVAILABILITY_SLA`, `AVAILABILITY_99`,\n`AVAILABILITY_999`, or `AVAILABILITY_9995`.", - "enum": [ - "AVAILABILITY_99", - "AVAILABILITY_999", - "AVAILABILITY_9995", - "NO_AVAILABILITY_SLA" - ], - "enumDescriptions": [ - "99% availability", - "99.9% availability", - "99.95% availability", - "No SLA" - ], - "type": "string" - } - }, - "type": "object" - }, - "WireGroupTopology": { - "description": "Topology details for the wire group.", - "id": "WireGroupTopology", - "properties": { - "endpoints": { - "description": "Topology details for all endpoints in the wire group.", - "items": { - "$ref": "WireGroupTopologyEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupTopologyEndpoint": { - "description": "Topology details for a single wire group endpoint.", - "id": "WireGroupTopologyEndpoint", - "properties": { - "city": { - "description": "The InterconnectLocation.city (metropolitan area designator) that all\ninterconnects are located in.", - "type": "string" - }, - "label": { - "description": "Endpoint label from the wire group.", - "type": "string" - } - }, - "type": "object" - }, - "WireGroupWireInputs": { - "description": "Optional settings for individual wires. Allows wire-level control that\ncan be useful for migration purposes. If you use this field, you opt-out\nof the SLA for the wire group.", - "id": "WireGroupWireInputs", - "properties": { - "adminEnabled": { - "description": "Indicates whether the wire is enabled.\nWhen false, the wire is disabled. When true and when the wire group of\nthe wire is also enabled, the wire is enabled. Defaults to true.", - "type": "boolean" - }, - "wirePropertyOverrides": { - "$ref": "WireProperties", - "description": "The overridden properties for the wire. Any properties that are not\noverridden are omitted from the object. Review the following guidelines:\n \n - If you apply wire overrides to a wire and its wire group bandwidth\n configuration is set to `SHARED_WITH_WIRE_GROUP`, the\n `meteredBandwidth` and `unmeteredBandwidth` properties must not differ\n from the wire group.\n - Overrides generate a `configurationNotice`. Ensure that differences\n in wire configuration are temporary. An example use case for wire\n overrides is slowly rolling out configuration changes to individual wires\n in a wire group." - } - }, - "type": "object" - }, - "WireProperties": { - "description": "The properties of a wire.", - "id": "WireProperties", - "properties": { - "bandwidthAllocation": { - "description": "The configuration of the bandwidth allocation, one of the following:\n \n - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation\n (and associated charges) for each wire in the group.\n - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures\n one unmetered bandwidth allocation for the wire group. The unmetered\n bandwidth is divided equally across each wire in the group, but dynamic\n throttling reallocates unused unmetered bandwidth from unused or underused\n wires to other wires in the group.", - "enum": [ - "ALLOCATE_PER_WIRE", - "SHARED_WITH_WIRE_GROUP" - ], - "enumDescriptions": [ - "Configures a separate unmetered bandwidth allocation (and associated\ncharges) for each wire in the group.", - "This is the default behavior. Configures one unmetered bandwidth\nallocation for the wire group. The unmetered bandwidth is divided equally\nacross each wire in the group, but dynamic throttling reallocates unused\nunmetered bandwidth from unused or underused wires to other wires in the\ngroup." - ], - "type": "string" - }, - "bandwidthMetered": { - "description": "The metered bandwidth in Gigabits per second, using decimal units. `10` is\n10 Gbps, `100` is 100 Gbps. The default value is `0`. You can specify\nunlimited bandwidth by entering `-1`. However, actual data transfer is\nlimited by the port speed.", - "format": "int64", - "type": "string" - }, - "bandwidthUnmetered": { - "description": "The unmetered bandwidth in Gigabits per second, using decimal units. `10`\nis 10 Gbps, `100` is 100 Gbps. The bandwidth must be greater than 0.", - "format": "int64", - "type": "string" - }, - "faultResponse": { - "description": "Response when a fault is detected in a pseudowire:\n \n - NONE: default.\n - DISABLE_PORT: set the port line protocol down when inline probes\n detect a fault. This setting is only permitted on port mode\n pseudowires.", - "enum": [ - "DISABLE_PORT", - "NONE" - ], - "enumDescriptions": [ - "Set the port line protocol down when inline probes detect a fault. This\nsetting is only permitted on port mode pseudowires.", - "Default." - ], - "type": "string" - }, - "networkServiceClass": { - "description": "The network service class.", - "enum": [ - "BRONZE", - "GOLD" - ], - "enumDescriptions": [ - "The lowest service class.", - "The highest service class." - ], - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityConfig": { - "id": "WorkloadIdentityConfig", - "properties": { - "identity": { - "type": "string" - }, - "identityCertificateEnabled": { - "type": "boolean" - } - }, - "type": "object" - }, - "XpnHostList": { - "id": "XpnHostList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of shared VPC host project URLs.", - "items": { - "$ref": "Project" - }, - "type": "array" - }, - "kind": { - "default": "compute#xpnHostList", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for\nlists of shared VPC hosts.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "XpnResourceId": { - "description": "Service resource (a.k.a service project) ID.", - "id": "XpnResourceId", - "properties": { - "id": { - "description": "The ID of the service resource. In the case of projects, this field\nsupports project id (e.g., my-project-123) and project number\n(e.g. 12345678).", - "type": "string" - }, - "type": { - "description": "The type of the service resource.", - "enum": [ - "PROJECT", - "XPN_RESOURCE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Zone": { - "description": "Represents a Zone resource.\n\nA zone is a deployment area. These deployment areas are subsets of a region.\nFor example the zone us-east1-b is located in theus-east1 region. For more information, readRegions and\nZones.", - "id": "Zone", - "properties": { - "availableCpuPlatforms": { - "description": "[Output Only] Available cpu/platform selections for the zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this zone." - }, - "description": { - "description": "[Output Only] Textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#zone", - "description": "[Output Only] Type of the resource. Always compute#zone for\nzones.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "region": { - "description": "[Output Only] Full URL reference to the region which hosts the zone.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the zone, either UP orDOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - } - }, - "type": "object" - }, - "ZoneList": { - "description": "Contains a list of zone resources.", - "id": "ZoneList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Zone resources.", - "items": { - "$ref": "Zone" - }, - "type": "array" - }, - "kind": { - "default": "compute#zoneList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ZoneSetLabelsRequest": { - "id": "ZoneSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash in order to update or change\nlabels. Make a get() request to the resource to get the latest\nfingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "ZoneSetPolicyRequest": { - "id": "ZoneSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backwacd compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - } - }, - "servicePath": "compute/alpha/", - "title": "Compute Engine API", - "version": "alpha" -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go deleted file mode 100644 index d5b0377272aaa..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go +++ /dev/null @@ -1,94271 +0,0 @@ -// Copyright 2025 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 compute provides access to the Compute Engine API. -// -// For product documentation, see: https://cloud.google.com/compute/ -// -// # 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/compute/v0.alpha" -// ... -// ctx := context.Background() -// computeService, err := compute.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 -// -// By default, all available scopes (see "Constants") are used to authenticate. -// To restrict scopes, use [google.golang.org/api/option.WithScopes]: -// -// computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// computeService, err := compute.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, ...) -// computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package compute // import "google.golang.org/api/compute/v0.alpha" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "compute:alpha" -const apiName = "compute" -const apiVersion = "alpha" -const basePath = "https://compute.googleapis.com/compute/alpha/" -const basePathTemplate = "https://compute.UNIVERSE_DOMAIN/compute/alpha/" -const mtlsBasePath = "https://compute.mtls.googleapis.com/compute/alpha/" - -// 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" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // Manage your data and permissions in Cloud Storage and see the email address - // for your Google Account - DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" - - // View your data in Google Cloud Storage - DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" - - // Manage your data in Cloud Storage and see the email address of your Google - // Account - DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" -) - -// 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", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write", - ) - // 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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.AcceleratorTypes = NewAcceleratorTypesService(s) - s.Addresses = NewAddressesService(s) - s.Advice = NewAdviceService(s) - s.Autoscalers = NewAutoscalersService(s) - s.BackendBuckets = NewBackendBucketsService(s) - s.BackendServices = NewBackendServicesService(s) - s.CrossSiteNetworks = NewCrossSiteNetworksService(s) - s.DiskSettings = NewDiskSettingsService(s) - s.DiskTypes = NewDiskTypesService(s) - s.Disks = NewDisksService(s) - s.ExternalVpnGateways = NewExternalVpnGatewaysService(s) - s.FirewallPolicies = NewFirewallPoliciesService(s) - s.Firewalls = NewFirewallsService(s) - s.ForwardingRules = NewForwardingRulesService(s) - s.FutureReservations = NewFutureReservationsService(s) - s.GlobalAddresses = NewGlobalAddressesService(s) - s.GlobalFolderOperations = NewGlobalFolderOperationsService(s) - s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) - s.GlobalNetworkEndpointGroups = NewGlobalNetworkEndpointGroupsService(s) - s.GlobalOperations = NewGlobalOperationsService(s) - s.GlobalOrganizationOperations = NewGlobalOrganizationOperationsService(s) - s.GlobalPublicDelegatedPrefixes = NewGlobalPublicDelegatedPrefixesService(s) - s.GlobalVmExtensionPolicies = NewGlobalVmExtensionPoliciesService(s) - s.HaControllers = NewHaControllersService(s) - s.HealthChecks = NewHealthChecksService(s) - s.HttpHealthChecks = NewHttpHealthChecksService(s) - s.HttpsHealthChecks = NewHttpsHealthChecksService(s) - s.ImageFamilyViews = NewImageFamilyViewsService(s) - s.Images = NewImagesService(s) - s.InstanceGroupManagerResizeRequests = NewInstanceGroupManagerResizeRequestsService(s) - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.InstanceGroups = NewInstanceGroupsService(s) - s.InstanceSettings = NewInstanceSettingsService(s) - s.InstanceTemplates = NewInstanceTemplatesService(s) - s.Instances = NewInstancesService(s) - s.InstantSnapshotGroups = NewInstantSnapshotGroupsService(s) - s.InstantSnapshots = NewInstantSnapshotsService(s) - s.InterconnectAttachmentGroups = NewInterconnectAttachmentGroupsService(s) - s.InterconnectAttachments = NewInterconnectAttachmentsService(s) - s.InterconnectGroups = NewInterconnectGroupsService(s) - s.InterconnectLocations = NewInterconnectLocationsService(s) - s.InterconnectRemoteLocations = NewInterconnectRemoteLocationsService(s) - s.Interconnects = NewInterconnectsService(s) - s.LicenseCodes = NewLicenseCodesService(s) - s.Licenses = NewLicensesService(s) - s.MachineImages = NewMachineImagesService(s) - s.MachineTypes = NewMachineTypesService(s) - s.NetworkAttachments = NewNetworkAttachmentsService(s) - s.NetworkEdgeSecurityServices = NewNetworkEdgeSecurityServicesService(s) - s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) - s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) - s.NetworkProfiles = NewNetworkProfilesService(s) - s.Networks = NewNetworksService(s) - s.NodeGroups = NewNodeGroupsService(s) - s.NodeTemplates = NewNodeTemplatesService(s) - s.NodeTypes = NewNodeTypesService(s) - s.OrganizationSecurityPolicies = NewOrganizationSecurityPoliciesService(s) - s.PacketMirrorings = NewPacketMirroringsService(s) - s.PreviewFeatures = NewPreviewFeaturesService(s) - s.Projects = NewProjectsService(s) - s.PublicAdvertisedPrefixes = NewPublicAdvertisedPrefixesService(s) - s.PublicDelegatedPrefixes = NewPublicDelegatedPrefixesService(s) - s.RecoverableSnapshots = NewRecoverableSnapshotsService(s) - s.RegionAutoscalers = NewRegionAutoscalersService(s) - s.RegionBackendBuckets = NewRegionBackendBucketsService(s) - s.RegionBackendServices = NewRegionBackendServicesService(s) - s.RegionCommitments = NewRegionCommitmentsService(s) - s.RegionCompositeHealthChecks = NewRegionCompositeHealthChecksService(s) - s.RegionDiskSettings = NewRegionDiskSettingsService(s) - s.RegionDiskTypes = NewRegionDiskTypesService(s) - s.RegionDisks = NewRegionDisksService(s) - s.RegionHealthAggregationPolicies = NewRegionHealthAggregationPoliciesService(s) - s.RegionHealthCheckServices = NewRegionHealthCheckServicesService(s) - s.RegionHealthChecks = NewRegionHealthChecksService(s) - s.RegionHealthSources = NewRegionHealthSourcesService(s) - s.RegionInstanceGroupManagerResizeRequests = NewRegionInstanceGroupManagerResizeRequestsService(s) - s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) - s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) - s.RegionInstanceTemplates = NewRegionInstanceTemplatesService(s) - s.RegionInstances = NewRegionInstancesService(s) - s.RegionInstantSnapshotGroups = NewRegionInstantSnapshotGroupsService(s) - s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) - s.RegionMultiMigMembers = NewRegionMultiMigMembersService(s) - s.RegionMultiMigs = NewRegionMultiMigsService(s) - s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) - s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) - s.RegionNetworkPolicies = NewRegionNetworkPoliciesService(s) - s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) - s.RegionOperations = NewRegionOperationsService(s) - s.RegionRecoverableSnapshots = NewRegionRecoverableSnapshotsService(s) - s.RegionSecurityPolicies = NewRegionSecurityPoliciesService(s) - s.RegionSnapshotSettings = NewRegionSnapshotSettingsService(s) - s.RegionSnapshots = NewRegionSnapshotsService(s) - s.RegionSslCertificates = NewRegionSslCertificatesService(s) - s.RegionSslPolicies = NewRegionSslPoliciesService(s) - s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) - s.RegionTargetHttpsProxies = NewRegionTargetHttpsProxiesService(s) - s.RegionTargetTcpProxies = NewRegionTargetTcpProxiesService(s) - s.RegionUrlMaps = NewRegionUrlMapsService(s) - s.RegionZones = NewRegionZonesService(s) - s.Regions = NewRegionsService(s) - s.ReliabilityRisks = NewReliabilityRisksService(s) - s.ReservationBlocks = NewReservationBlocksService(s) - s.ReservationSubBlocks = NewReservationSubBlocksService(s) - s.Reservations = NewReservationsService(s) - s.ResourcePolicies = NewResourcePoliciesService(s) - s.RolloutPlans = NewRolloutPlansService(s) - s.Rollouts = NewRolloutsService(s) - s.Routers = NewRoutersService(s) - s.Routes = NewRoutesService(s) - s.SecurityPolicies = NewSecurityPoliciesService(s) - s.ServiceAttachments = NewServiceAttachmentsService(s) - s.SnapshotGroups = NewSnapshotGroupsService(s) - s.SnapshotSettings = NewSnapshotSettingsService(s) - s.Snapshots = NewSnapshotsService(s) - s.SslCertificates = NewSslCertificatesService(s) - s.SslPolicies = NewSslPoliciesService(s) - s.StoragePoolTypes = NewStoragePoolTypesService(s) - s.StoragePools = NewStoragePoolsService(s) - s.Subnetworks = NewSubnetworksService(s) - s.TargetGrpcProxies = NewTargetGrpcProxiesService(s) - s.TargetHttpProxies = NewTargetHttpProxiesService(s) - s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) - s.TargetInstances = NewTargetInstancesService(s) - s.TargetPools = NewTargetPoolsService(s) - s.TargetSslProxies = NewTargetSslProxiesService(s) - s.TargetTcpProxies = NewTargetTcpProxiesService(s) - s.TargetVpnGateways = NewTargetVpnGatewaysService(s) - s.UrlMaps = NewUrlMapsService(s) - s.VpnGateways = NewVpnGatewaysService(s) - s.VpnTunnels = NewVpnTunnelsService(s) - s.WireGroups = NewWireGroupsService(s) - s.ZoneFolderOperations = NewZoneFolderOperationsService(s) - s.ZoneOperations = NewZoneOperationsService(s) - s.ZoneOrganizationOperations = NewZoneOrganizationOperationsService(s) - s.ZoneQueuedResources = NewZoneQueuedResourcesService(s) - s.ZoneVmExtensionPolicies = NewZoneVmExtensionPoliciesService(s) - s.Zones = NewZonesService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - AcceleratorTypes *AcceleratorTypesService - - Addresses *AddressesService - - Advice *AdviceService - - Autoscalers *AutoscalersService - - BackendBuckets *BackendBucketsService - - BackendServices *BackendServicesService - - CrossSiteNetworks *CrossSiteNetworksService - - DiskSettings *DiskSettingsService - - DiskTypes *DiskTypesService - - Disks *DisksService - - ExternalVpnGateways *ExternalVpnGatewaysService - - FirewallPolicies *FirewallPoliciesService - - Firewalls *FirewallsService - - ForwardingRules *ForwardingRulesService - - FutureReservations *FutureReservationsService - - GlobalAddresses *GlobalAddressesService - - GlobalFolderOperations *GlobalFolderOperationsService - - GlobalForwardingRules *GlobalForwardingRulesService - - GlobalNetworkEndpointGroups *GlobalNetworkEndpointGroupsService - - GlobalOperations *GlobalOperationsService - - GlobalOrganizationOperations *GlobalOrganizationOperationsService - - GlobalPublicDelegatedPrefixes *GlobalPublicDelegatedPrefixesService - - GlobalVmExtensionPolicies *GlobalVmExtensionPoliciesService - - HaControllers *HaControllersService - - HealthChecks *HealthChecksService - - HttpHealthChecks *HttpHealthChecksService - - HttpsHealthChecks *HttpsHealthChecksService - - ImageFamilyViews *ImageFamilyViewsService - - Images *ImagesService - - InstanceGroupManagerResizeRequests *InstanceGroupManagerResizeRequestsService - - InstanceGroupManagers *InstanceGroupManagersService - - InstanceGroups *InstanceGroupsService - - InstanceSettings *InstanceSettingsService - - InstanceTemplates *InstanceTemplatesService - - Instances *InstancesService - - InstantSnapshotGroups *InstantSnapshotGroupsService - - InstantSnapshots *InstantSnapshotsService - - InterconnectAttachmentGroups *InterconnectAttachmentGroupsService - - InterconnectAttachments *InterconnectAttachmentsService - - InterconnectGroups *InterconnectGroupsService - - InterconnectLocations *InterconnectLocationsService - - InterconnectRemoteLocations *InterconnectRemoteLocationsService - - Interconnects *InterconnectsService - - LicenseCodes *LicenseCodesService - - Licenses *LicensesService - - MachineImages *MachineImagesService - - MachineTypes *MachineTypesService - - NetworkAttachments *NetworkAttachmentsService - - NetworkEdgeSecurityServices *NetworkEdgeSecurityServicesService - - NetworkEndpointGroups *NetworkEndpointGroupsService - - NetworkFirewallPolicies *NetworkFirewallPoliciesService - - NetworkProfiles *NetworkProfilesService - - Networks *NetworksService - - NodeGroups *NodeGroupsService - - NodeTemplates *NodeTemplatesService - - NodeTypes *NodeTypesService - - OrganizationSecurityPolicies *OrganizationSecurityPoliciesService - - PacketMirrorings *PacketMirroringsService - - PreviewFeatures *PreviewFeaturesService - - Projects *ProjectsService - - PublicAdvertisedPrefixes *PublicAdvertisedPrefixesService - - PublicDelegatedPrefixes *PublicDelegatedPrefixesService - - RecoverableSnapshots *RecoverableSnapshotsService - - RegionAutoscalers *RegionAutoscalersService - - RegionBackendBuckets *RegionBackendBucketsService - - RegionBackendServices *RegionBackendServicesService - - RegionCommitments *RegionCommitmentsService - - RegionCompositeHealthChecks *RegionCompositeHealthChecksService - - RegionDiskSettings *RegionDiskSettingsService - - RegionDiskTypes *RegionDiskTypesService - - RegionDisks *RegionDisksService - - RegionHealthAggregationPolicies *RegionHealthAggregationPoliciesService - - RegionHealthCheckServices *RegionHealthCheckServicesService - - RegionHealthChecks *RegionHealthChecksService - - RegionHealthSources *RegionHealthSourcesService - - RegionInstanceGroupManagerResizeRequests *RegionInstanceGroupManagerResizeRequestsService - - RegionInstanceGroupManagers *RegionInstanceGroupManagersService - - RegionInstanceGroups *RegionInstanceGroupsService - - RegionInstanceTemplates *RegionInstanceTemplatesService - - RegionInstances *RegionInstancesService - - RegionInstantSnapshotGroups *RegionInstantSnapshotGroupsService - - RegionInstantSnapshots *RegionInstantSnapshotsService - - RegionMultiMigMembers *RegionMultiMigMembersService - - RegionMultiMigs *RegionMultiMigsService - - RegionNetworkEndpointGroups *RegionNetworkEndpointGroupsService - - RegionNetworkFirewallPolicies *RegionNetworkFirewallPoliciesService - - RegionNetworkPolicies *RegionNetworkPoliciesService - - RegionNotificationEndpoints *RegionNotificationEndpointsService - - RegionOperations *RegionOperationsService - - RegionRecoverableSnapshots *RegionRecoverableSnapshotsService - - RegionSecurityPolicies *RegionSecurityPoliciesService - - RegionSnapshotSettings *RegionSnapshotSettingsService - - RegionSnapshots *RegionSnapshotsService - - RegionSslCertificates *RegionSslCertificatesService - - RegionSslPolicies *RegionSslPoliciesService - - RegionTargetHttpProxies *RegionTargetHttpProxiesService - - RegionTargetHttpsProxies *RegionTargetHttpsProxiesService - - RegionTargetTcpProxies *RegionTargetTcpProxiesService - - RegionUrlMaps *RegionUrlMapsService - - RegionZones *RegionZonesService - - Regions *RegionsService - - ReliabilityRisks *ReliabilityRisksService - - ReservationBlocks *ReservationBlocksService - - ReservationSubBlocks *ReservationSubBlocksService - - Reservations *ReservationsService - - ResourcePolicies *ResourcePoliciesService - - RolloutPlans *RolloutPlansService - - Rollouts *RolloutsService - - Routers *RoutersService - - Routes *RoutesService - - SecurityPolicies *SecurityPoliciesService - - ServiceAttachments *ServiceAttachmentsService - - SnapshotGroups *SnapshotGroupsService - - SnapshotSettings *SnapshotSettingsService - - Snapshots *SnapshotsService - - SslCertificates *SslCertificatesService - - SslPolicies *SslPoliciesService - - StoragePoolTypes *StoragePoolTypesService - - StoragePools *StoragePoolsService - - Subnetworks *SubnetworksService - - TargetGrpcProxies *TargetGrpcProxiesService - - TargetHttpProxies *TargetHttpProxiesService - - TargetHttpsProxies *TargetHttpsProxiesService - - TargetInstances *TargetInstancesService - - TargetPools *TargetPoolsService - - TargetSslProxies *TargetSslProxiesService - - TargetTcpProxies *TargetTcpProxiesService - - TargetVpnGateways *TargetVpnGatewaysService - - UrlMaps *UrlMapsService - - VpnGateways *VpnGatewaysService - - VpnTunnels *VpnTunnelsService - - WireGroups *WireGroupsService - - ZoneFolderOperations *ZoneFolderOperationsService - - ZoneOperations *ZoneOperationsService - - ZoneOrganizationOperations *ZoneOrganizationOperationsService - - ZoneQueuedResources *ZoneQueuedResourcesService - - ZoneVmExtensionPolicies *ZoneVmExtensionPoliciesService - - Zones *ZonesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { - rs := &AcceleratorTypesService{s: s} - return rs -} - -type AcceleratorTypesService struct { - s *Service -} - -func NewAddressesService(s *Service) *AddressesService { - rs := &AddressesService{s: s} - return rs -} - -type AddressesService struct { - s *Service -} - -func NewAdviceService(s *Service) *AdviceService { - rs := &AdviceService{s: s} - return rs -} - -type AdviceService struct { - s *Service -} - -func NewAutoscalersService(s *Service) *AutoscalersService { - rs := &AutoscalersService{s: s} - return rs -} - -type AutoscalersService struct { - s *Service -} - -func NewBackendBucketsService(s *Service) *BackendBucketsService { - rs := &BackendBucketsService{s: s} - return rs -} - -type BackendBucketsService struct { - s *Service -} - -func NewBackendServicesService(s *Service) *BackendServicesService { - rs := &BackendServicesService{s: s} - return rs -} - -type BackendServicesService struct { - s *Service -} - -func NewCrossSiteNetworksService(s *Service) *CrossSiteNetworksService { - rs := &CrossSiteNetworksService{s: s} - return rs -} - -type CrossSiteNetworksService struct { - s *Service -} - -func NewDiskSettingsService(s *Service) *DiskSettingsService { - rs := &DiskSettingsService{s: s} - return rs -} - -type DiskSettingsService struct { - s *Service -} - -func NewDiskTypesService(s *Service) *DiskTypesService { - rs := &DiskTypesService{s: s} - return rs -} - -type DiskTypesService struct { - s *Service -} - -func NewDisksService(s *Service) *DisksService { - rs := &DisksService{s: s} - return rs -} - -type DisksService struct { - s *Service -} - -func NewExternalVpnGatewaysService(s *Service) *ExternalVpnGatewaysService { - rs := &ExternalVpnGatewaysService{s: s} - return rs -} - -type ExternalVpnGatewaysService struct { - s *Service -} - -func NewFirewallPoliciesService(s *Service) *FirewallPoliciesService { - rs := &FirewallPoliciesService{s: s} - return rs -} - -type FirewallPoliciesService struct { - s *Service -} - -func NewFirewallsService(s *Service) *FirewallsService { - rs := &FirewallsService{s: s} - return rs -} - -type FirewallsService struct { - s *Service -} - -func NewForwardingRulesService(s *Service) *ForwardingRulesService { - rs := &ForwardingRulesService{s: s} - return rs -} - -type ForwardingRulesService struct { - s *Service -} - -func NewFutureReservationsService(s *Service) *FutureReservationsService { - rs := &FutureReservationsService{s: s} - return rs -} - -type FutureReservationsService struct { - s *Service -} - -func NewGlobalAddressesService(s *Service) *GlobalAddressesService { - rs := &GlobalAddressesService{s: s} - return rs -} - -type GlobalAddressesService struct { - s *Service -} - -func NewGlobalFolderOperationsService(s *Service) *GlobalFolderOperationsService { - rs := &GlobalFolderOperationsService{s: s} - return rs -} - -type GlobalFolderOperationsService struct { - s *Service -} - -func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { - rs := &GlobalForwardingRulesService{s: s} - return rs -} - -type GlobalForwardingRulesService struct { - s *Service -} - -func NewGlobalNetworkEndpointGroupsService(s *Service) *GlobalNetworkEndpointGroupsService { - rs := &GlobalNetworkEndpointGroupsService{s: s} - return rs -} - -type GlobalNetworkEndpointGroupsService struct { - s *Service -} - -func NewGlobalOperationsService(s *Service) *GlobalOperationsService { - rs := &GlobalOperationsService{s: s} - return rs -} - -type GlobalOperationsService struct { - s *Service -} - -func NewGlobalOrganizationOperationsService(s *Service) *GlobalOrganizationOperationsService { - rs := &GlobalOrganizationOperationsService{s: s} - return rs -} - -type GlobalOrganizationOperationsService struct { - s *Service -} - -func NewGlobalPublicDelegatedPrefixesService(s *Service) *GlobalPublicDelegatedPrefixesService { - rs := &GlobalPublicDelegatedPrefixesService{s: s} - return rs -} - -type GlobalPublicDelegatedPrefixesService struct { - s *Service -} - -func NewGlobalVmExtensionPoliciesService(s *Service) *GlobalVmExtensionPoliciesService { - rs := &GlobalVmExtensionPoliciesService{s: s} - return rs -} - -type GlobalVmExtensionPoliciesService struct { - s *Service -} - -func NewHaControllersService(s *Service) *HaControllersService { - rs := &HaControllersService{s: s} - return rs -} - -type HaControllersService struct { - s *Service -} - -func NewHealthChecksService(s *Service) *HealthChecksService { - rs := &HealthChecksService{s: s} - return rs -} - -type HealthChecksService struct { - s *Service -} - -func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { - rs := &HttpHealthChecksService{s: s} - return rs -} - -type HttpHealthChecksService struct { - s *Service -} - -func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService { - rs := &HttpsHealthChecksService{s: s} - return rs -} - -type HttpsHealthChecksService struct { - s *Service -} - -func NewImageFamilyViewsService(s *Service) *ImageFamilyViewsService { - rs := &ImageFamilyViewsService{s: s} - return rs -} - -type ImageFamilyViewsService struct { - s *Service -} - -func NewImagesService(s *Service) *ImagesService { - rs := &ImagesService{s: s} - return rs -} - -type ImagesService struct { - s *Service -} - -func NewInstanceGroupManagerResizeRequestsService(s *Service) *InstanceGroupManagerResizeRequestsService { - rs := &InstanceGroupManagerResizeRequestsService{s: s} - return rs -} - -type InstanceGroupManagerResizeRequestsService struct { - s *Service -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewInstanceGroupsService(s *Service) *InstanceGroupsService { - rs := &InstanceGroupsService{s: s} - return rs -} - -type InstanceGroupsService struct { - s *Service -} - -func NewInstanceSettingsService(s *Service) *InstanceSettingsService { - rs := &InstanceSettingsService{s: s} - return rs -} - -type InstanceSettingsService struct { - s *Service -} - -func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { - rs := &InstanceTemplatesService{s: s} - return rs -} - -type InstanceTemplatesService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewInstantSnapshotGroupsService(s *Service) *InstantSnapshotGroupsService { - rs := &InstantSnapshotGroupsService{s: s} - return rs -} - -type InstantSnapshotGroupsService struct { - s *Service -} - -func NewInstantSnapshotsService(s *Service) *InstantSnapshotsService { - rs := &InstantSnapshotsService{s: s} - return rs -} - -type InstantSnapshotsService struct { - s *Service -} - -func NewInterconnectAttachmentGroupsService(s *Service) *InterconnectAttachmentGroupsService { - rs := &InterconnectAttachmentGroupsService{s: s} - return rs -} - -type InterconnectAttachmentGroupsService struct { - s *Service -} - -func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService { - rs := &InterconnectAttachmentsService{s: s} - return rs -} - -type InterconnectAttachmentsService struct { - s *Service -} - -func NewInterconnectGroupsService(s *Service) *InterconnectGroupsService { - rs := &InterconnectGroupsService{s: s} - return rs -} - -type InterconnectGroupsService struct { - s *Service -} - -func NewInterconnectLocationsService(s *Service) *InterconnectLocationsService { - rs := &InterconnectLocationsService{s: s} - return rs -} - -type InterconnectLocationsService struct { - s *Service -} - -func NewInterconnectRemoteLocationsService(s *Service) *InterconnectRemoteLocationsService { - rs := &InterconnectRemoteLocationsService{s: s} - return rs -} - -type InterconnectRemoteLocationsService struct { - s *Service -} - -func NewInterconnectsService(s *Service) *InterconnectsService { - rs := &InterconnectsService{s: s} - return rs -} - -type InterconnectsService struct { - s *Service -} - -func NewLicenseCodesService(s *Service) *LicenseCodesService { - rs := &LicenseCodesService{s: s} - return rs -} - -type LicenseCodesService struct { - s *Service -} - -func NewLicensesService(s *Service) *LicensesService { - rs := &LicensesService{s: s} - return rs -} - -type LicensesService struct { - s *Service -} - -func NewMachineImagesService(s *Service) *MachineImagesService { - rs := &MachineImagesService{s: s} - return rs -} - -type MachineImagesService struct { - s *Service -} - -func NewMachineTypesService(s *Service) *MachineTypesService { - rs := &MachineTypesService{s: s} - return rs -} - -type MachineTypesService struct { - s *Service -} - -func NewNetworkAttachmentsService(s *Service) *NetworkAttachmentsService { - rs := &NetworkAttachmentsService{s: s} - return rs -} - -type NetworkAttachmentsService struct { - s *Service -} - -func NewNetworkEdgeSecurityServicesService(s *Service) *NetworkEdgeSecurityServicesService { - rs := &NetworkEdgeSecurityServicesService{s: s} - return rs -} - -type NetworkEdgeSecurityServicesService struct { - s *Service -} - -func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { - rs := &NetworkEndpointGroupsService{s: s} - return rs -} - -type NetworkEndpointGroupsService struct { - s *Service -} - -func NewNetworkFirewallPoliciesService(s *Service) *NetworkFirewallPoliciesService { - rs := &NetworkFirewallPoliciesService{s: s} - return rs -} - -type NetworkFirewallPoliciesService struct { - s *Service -} - -func NewNetworkProfilesService(s *Service) *NetworkProfilesService { - rs := &NetworkProfilesService{s: s} - return rs -} - -type NetworkProfilesService struct { - s *Service -} - -func NewNetworksService(s *Service) *NetworksService { - rs := &NetworksService{s: s} - return rs -} - -type NetworksService struct { - s *Service -} - -func NewNodeGroupsService(s *Service) *NodeGroupsService { - rs := &NodeGroupsService{s: s} - return rs -} - -type NodeGroupsService struct { - s *Service -} - -func NewNodeTemplatesService(s *Service) *NodeTemplatesService { - rs := &NodeTemplatesService{s: s} - return rs -} - -type NodeTemplatesService struct { - s *Service -} - -func NewNodeTypesService(s *Service) *NodeTypesService { - rs := &NodeTypesService{s: s} - return rs -} - -type NodeTypesService struct { - s *Service -} - -func NewOrganizationSecurityPoliciesService(s *Service) *OrganizationSecurityPoliciesService { - rs := &OrganizationSecurityPoliciesService{s: s} - return rs -} - -type OrganizationSecurityPoliciesService struct { - s *Service -} - -func NewPacketMirroringsService(s *Service) *PacketMirroringsService { - rs := &PacketMirroringsService{s: s} - return rs -} - -type PacketMirroringsService struct { - s *Service -} - -func NewPreviewFeaturesService(s *Service) *PreviewFeaturesService { - rs := &PreviewFeaturesService{s: s} - return rs -} - -type PreviewFeaturesService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewPublicAdvertisedPrefixesService(s *Service) *PublicAdvertisedPrefixesService { - rs := &PublicAdvertisedPrefixesService{s: s} - return rs -} - -type PublicAdvertisedPrefixesService struct { - s *Service -} - -func NewPublicDelegatedPrefixesService(s *Service) *PublicDelegatedPrefixesService { - rs := &PublicDelegatedPrefixesService{s: s} - return rs -} - -type PublicDelegatedPrefixesService struct { - s *Service -} - -func NewRecoverableSnapshotsService(s *Service) *RecoverableSnapshotsService { - rs := &RecoverableSnapshotsService{s: s} - return rs -} - -type RecoverableSnapshotsService struct { - s *Service -} - -func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { - rs := &RegionAutoscalersService{s: s} - return rs -} - -type RegionAutoscalersService struct { - s *Service -} - -func NewRegionBackendBucketsService(s *Service) *RegionBackendBucketsService { - rs := &RegionBackendBucketsService{s: s} - return rs -} - -type RegionBackendBucketsService struct { - s *Service -} - -func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService { - rs := &RegionBackendServicesService{s: s} - return rs -} - -type RegionBackendServicesService struct { - s *Service -} - -func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { - rs := &RegionCommitmentsService{s: s} - return rs -} - -type RegionCommitmentsService struct { - s *Service -} - -func NewRegionCompositeHealthChecksService(s *Service) *RegionCompositeHealthChecksService { - rs := &RegionCompositeHealthChecksService{s: s} - return rs -} - -type RegionCompositeHealthChecksService struct { - s *Service -} - -func NewRegionDiskSettingsService(s *Service) *RegionDiskSettingsService { - rs := &RegionDiskSettingsService{s: s} - return rs -} - -type RegionDiskSettingsService struct { - s *Service -} - -func NewRegionDiskTypesService(s *Service) *RegionDiskTypesService { - rs := &RegionDiskTypesService{s: s} - return rs -} - -type RegionDiskTypesService struct { - s *Service -} - -func NewRegionDisksService(s *Service) *RegionDisksService { - rs := &RegionDisksService{s: s} - return rs -} - -type RegionDisksService struct { - s *Service -} - -func NewRegionHealthAggregationPoliciesService(s *Service) *RegionHealthAggregationPoliciesService { - rs := &RegionHealthAggregationPoliciesService{s: s} - return rs -} - -type RegionHealthAggregationPoliciesService struct { - s *Service -} - -func NewRegionHealthCheckServicesService(s *Service) *RegionHealthCheckServicesService { - rs := &RegionHealthCheckServicesService{s: s} - return rs -} - -type RegionHealthCheckServicesService struct { - s *Service -} - -func NewRegionHealthChecksService(s *Service) *RegionHealthChecksService { - rs := &RegionHealthChecksService{s: s} - return rs -} - -type RegionHealthChecksService struct { - s *Service -} - -func NewRegionHealthSourcesService(s *Service) *RegionHealthSourcesService { - rs := &RegionHealthSourcesService{s: s} - return rs -} - -type RegionHealthSourcesService struct { - s *Service -} - -func NewRegionInstanceGroupManagerResizeRequestsService(s *Service) *RegionInstanceGroupManagerResizeRequestsService { - rs := &RegionInstanceGroupManagerResizeRequestsService{s: s} - return rs -} - -type RegionInstanceGroupManagerResizeRequestsService struct { - s *Service -} - -func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { - rs := &RegionInstanceGroupManagersService{s: s} - return rs -} - -type RegionInstanceGroupManagersService struct { - s *Service -} - -func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService { - rs := &RegionInstanceGroupsService{s: s} - return rs -} - -type RegionInstanceGroupsService struct { - s *Service -} - -func NewRegionInstanceTemplatesService(s *Service) *RegionInstanceTemplatesService { - rs := &RegionInstanceTemplatesService{s: s} - return rs -} - -type RegionInstanceTemplatesService struct { - s *Service -} - -func NewRegionInstancesService(s *Service) *RegionInstancesService { - rs := &RegionInstancesService{s: s} - return rs -} - -type RegionInstancesService struct { - s *Service -} - -func NewRegionInstantSnapshotGroupsService(s *Service) *RegionInstantSnapshotGroupsService { - rs := &RegionInstantSnapshotGroupsService{s: s} - return rs -} - -type RegionInstantSnapshotGroupsService struct { - s *Service -} - -func NewRegionInstantSnapshotsService(s *Service) *RegionInstantSnapshotsService { - rs := &RegionInstantSnapshotsService{s: s} - return rs -} - -type RegionInstantSnapshotsService struct { - s *Service -} - -func NewRegionMultiMigMembersService(s *Service) *RegionMultiMigMembersService { - rs := &RegionMultiMigMembersService{s: s} - return rs -} - -type RegionMultiMigMembersService struct { - s *Service -} - -func NewRegionMultiMigsService(s *Service) *RegionMultiMigsService { - rs := &RegionMultiMigsService{s: s} - return rs -} - -type RegionMultiMigsService struct { - s *Service -} - -func NewRegionNetworkEndpointGroupsService(s *Service) *RegionNetworkEndpointGroupsService { - rs := &RegionNetworkEndpointGroupsService{s: s} - return rs -} - -type RegionNetworkEndpointGroupsService struct { - s *Service -} - -func NewRegionNetworkFirewallPoliciesService(s *Service) *RegionNetworkFirewallPoliciesService { - rs := &RegionNetworkFirewallPoliciesService{s: s} - return rs -} - -type RegionNetworkFirewallPoliciesService struct { - s *Service -} - -func NewRegionNetworkPoliciesService(s *Service) *RegionNetworkPoliciesService { - rs := &RegionNetworkPoliciesService{s: s} - return rs -} - -type RegionNetworkPoliciesService struct { - s *Service -} - -func NewRegionNotificationEndpointsService(s *Service) *RegionNotificationEndpointsService { - rs := &RegionNotificationEndpointsService{s: s} - return rs -} - -type RegionNotificationEndpointsService struct { - s *Service -} - -func NewRegionOperationsService(s *Service) *RegionOperationsService { - rs := &RegionOperationsService{s: s} - return rs -} - -type RegionOperationsService struct { - s *Service -} - -func NewRegionRecoverableSnapshotsService(s *Service) *RegionRecoverableSnapshotsService { - rs := &RegionRecoverableSnapshotsService{s: s} - return rs -} - -type RegionRecoverableSnapshotsService struct { - s *Service -} - -func NewRegionSecurityPoliciesService(s *Service) *RegionSecurityPoliciesService { - rs := &RegionSecurityPoliciesService{s: s} - return rs -} - -type RegionSecurityPoliciesService struct { - s *Service -} - -func NewRegionSnapshotSettingsService(s *Service) *RegionSnapshotSettingsService { - rs := &RegionSnapshotSettingsService{s: s} - return rs -} - -type RegionSnapshotSettingsService struct { - s *Service -} - -func NewRegionSnapshotsService(s *Service) *RegionSnapshotsService { - rs := &RegionSnapshotsService{s: s} - return rs -} - -type RegionSnapshotsService struct { - s *Service -} - -func NewRegionSslCertificatesService(s *Service) *RegionSslCertificatesService { - rs := &RegionSslCertificatesService{s: s} - return rs -} - -type RegionSslCertificatesService struct { - s *Service -} - -func NewRegionSslPoliciesService(s *Service) *RegionSslPoliciesService { - rs := &RegionSslPoliciesService{s: s} - return rs -} - -type RegionSslPoliciesService struct { - s *Service -} - -func NewRegionTargetHttpProxiesService(s *Service) *RegionTargetHttpProxiesService { - rs := &RegionTargetHttpProxiesService{s: s} - return rs -} - -type RegionTargetHttpProxiesService struct { - s *Service -} - -func NewRegionTargetHttpsProxiesService(s *Service) *RegionTargetHttpsProxiesService { - rs := &RegionTargetHttpsProxiesService{s: s} - return rs -} - -type RegionTargetHttpsProxiesService struct { - s *Service -} - -func NewRegionTargetTcpProxiesService(s *Service) *RegionTargetTcpProxiesService { - rs := &RegionTargetTcpProxiesService{s: s} - return rs -} - -type RegionTargetTcpProxiesService struct { - s *Service -} - -func NewRegionUrlMapsService(s *Service) *RegionUrlMapsService { - rs := &RegionUrlMapsService{s: s} - return rs -} - -type RegionUrlMapsService struct { - s *Service -} - -func NewRegionZonesService(s *Service) *RegionZonesService { - rs := &RegionZonesService{s: s} - return rs -} - -type RegionZonesService struct { - s *Service -} - -func NewRegionsService(s *Service) *RegionsService { - rs := &RegionsService{s: s} - return rs -} - -type RegionsService struct { - s *Service -} - -func NewReliabilityRisksService(s *Service) *ReliabilityRisksService { - rs := &ReliabilityRisksService{s: s} - return rs -} - -type ReliabilityRisksService struct { - s *Service -} - -func NewReservationBlocksService(s *Service) *ReservationBlocksService { - rs := &ReservationBlocksService{s: s} - return rs -} - -type ReservationBlocksService struct { - s *Service -} - -func NewReservationSubBlocksService(s *Service) *ReservationSubBlocksService { - rs := &ReservationSubBlocksService{s: s} - return rs -} - -type ReservationSubBlocksService struct { - s *Service -} - -func NewReservationsService(s *Service) *ReservationsService { - rs := &ReservationsService{s: s} - return rs -} - -type ReservationsService struct { - s *Service -} - -func NewResourcePoliciesService(s *Service) *ResourcePoliciesService { - rs := &ResourcePoliciesService{s: s} - return rs -} - -type ResourcePoliciesService struct { - s *Service -} - -func NewRolloutPlansService(s *Service) *RolloutPlansService { - rs := &RolloutPlansService{s: s} - return rs -} - -type RolloutPlansService struct { - s *Service -} - -func NewRolloutsService(s *Service) *RolloutsService { - rs := &RolloutsService{s: s} - return rs -} - -type RolloutsService struct { - s *Service -} - -func NewRoutersService(s *Service) *RoutersService { - rs := &RoutersService{s: s} - return rs -} - -type RoutersService struct { - s *Service -} - -func NewRoutesService(s *Service) *RoutesService { - rs := &RoutesService{s: s} - return rs -} - -type RoutesService struct { - s *Service -} - -func NewSecurityPoliciesService(s *Service) *SecurityPoliciesService { - rs := &SecurityPoliciesService{s: s} - return rs -} - -type SecurityPoliciesService struct { - s *Service -} - -func NewServiceAttachmentsService(s *Service) *ServiceAttachmentsService { - rs := &ServiceAttachmentsService{s: s} - return rs -} - -type ServiceAttachmentsService struct { - s *Service -} - -func NewSnapshotGroupsService(s *Service) *SnapshotGroupsService { - rs := &SnapshotGroupsService{s: s} - return rs -} - -type SnapshotGroupsService struct { - s *Service -} - -func NewSnapshotSettingsService(s *Service) *SnapshotSettingsService { - rs := &SnapshotSettingsService{s: s} - return rs -} - -type SnapshotSettingsService struct { - s *Service -} - -func NewSnapshotsService(s *Service) *SnapshotsService { - rs := &SnapshotsService{s: s} - return rs -} - -type SnapshotsService struct { - s *Service -} - -func NewSslCertificatesService(s *Service) *SslCertificatesService { - rs := &SslCertificatesService{s: s} - return rs -} - -type SslCertificatesService struct { - s *Service -} - -func NewSslPoliciesService(s *Service) *SslPoliciesService { - rs := &SslPoliciesService{s: s} - return rs -} - -type SslPoliciesService struct { - s *Service -} - -func NewStoragePoolTypesService(s *Service) *StoragePoolTypesService { - rs := &StoragePoolTypesService{s: s} - return rs -} - -type StoragePoolTypesService struct { - s *Service -} - -func NewStoragePoolsService(s *Service) *StoragePoolsService { - rs := &StoragePoolsService{s: s} - return rs -} - -type StoragePoolsService struct { - s *Service -} - -func NewSubnetworksService(s *Service) *SubnetworksService { - rs := &SubnetworksService{s: s} - return rs -} - -type SubnetworksService struct { - s *Service -} - -func NewTargetGrpcProxiesService(s *Service) *TargetGrpcProxiesService { - rs := &TargetGrpcProxiesService{s: s} - return rs -} - -type TargetGrpcProxiesService struct { - s *Service -} - -func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { - rs := &TargetHttpProxiesService{s: s} - return rs -} - -type TargetHttpProxiesService struct { - s *Service -} - -func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService { - rs := &TargetHttpsProxiesService{s: s} - return rs -} - -type TargetHttpsProxiesService struct { - s *Service -} - -func NewTargetInstancesService(s *Service) *TargetInstancesService { - rs := &TargetInstancesService{s: s} - return rs -} - -type TargetInstancesService struct { - s *Service -} - -func NewTargetPoolsService(s *Service) *TargetPoolsService { - rs := &TargetPoolsService{s: s} - return rs -} - -type TargetPoolsService struct { - s *Service -} - -func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService { - rs := &TargetSslProxiesService{s: s} - return rs -} - -type TargetSslProxiesService struct { - s *Service -} - -func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService { - rs := &TargetTcpProxiesService{s: s} - return rs -} - -type TargetTcpProxiesService struct { - s *Service -} - -func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { - rs := &TargetVpnGatewaysService{s: s} - return rs -} - -type TargetVpnGatewaysService struct { - s *Service -} - -func NewUrlMapsService(s *Service) *UrlMapsService { - rs := &UrlMapsService{s: s} - return rs -} - -type UrlMapsService struct { - s *Service -} - -func NewVpnGatewaysService(s *Service) *VpnGatewaysService { - rs := &VpnGatewaysService{s: s} - return rs -} - -type VpnGatewaysService struct { - s *Service -} - -func NewVpnTunnelsService(s *Service) *VpnTunnelsService { - rs := &VpnTunnelsService{s: s} - return rs -} - -type VpnTunnelsService struct { - s *Service -} - -func NewWireGroupsService(s *Service) *WireGroupsService { - rs := &WireGroupsService{s: s} - return rs -} - -type WireGroupsService struct { - s *Service -} - -func NewZoneFolderOperationsService(s *Service) *ZoneFolderOperationsService { - rs := &ZoneFolderOperationsService{s: s} - return rs -} - -type ZoneFolderOperationsService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZoneOrganizationOperationsService(s *Service) *ZoneOrganizationOperationsService { - rs := &ZoneOrganizationOperationsService{s: s} - return rs -} - -type ZoneOrganizationOperationsService struct { - s *Service -} - -func NewZoneQueuedResourcesService(s *Service) *ZoneQueuedResourcesService { - rs := &ZoneQueuedResourcesService{s: s} - return rs -} - -type ZoneQueuedResourcesService struct { - s *Service -} - -func NewZoneVmExtensionPoliciesService(s *Service) *ZoneVmExtensionPoliciesService { - rs := &ZoneVmExtensionPoliciesService{s: s} - return rs -} - -type ZoneVmExtensionPoliciesService struct { - s *Service -} - -func NewZonesService(s *Service) *ZonesService { - rs := &ZonesService{s: s} - return rs -} - -type ZonesService struct { - s *Service -} - -// AWSV4Signature: Contains the configurations necessary to generate a -// signature for access to -// private storage buckets that support Signature Version 4 for -// authentication. -// The service name for generating the authentication header will always -// default -// to 's3'. -type AWSV4Signature struct { - // AccessKey: The access key used for s3 bucket authentication. Required for - // updating or - // creating a backend that uses AWS v4 signature authentication, but will - // not - // be returned as part of the configuration when queried with a REST API - // GET - // request. - // - // @InputOnly - AccessKey string `json:"accessKey,omitempty"` - // AccessKeyId: The identifier of an access key used for s3 bucket - // authentication. - AccessKeyId string `json:"accessKeyId,omitempty"` - // AccessKeyVersion: The optional version identifier for the access key. You - // can use this to - // keep track of different iterations of your access key. - AccessKeyVersion string `json:"accessKeyVersion,omitempty"` - // OriginRegion: The name of the cloud region of your origin. This is a - // free-form field with - // the name of the region your cloud uses to host your origin. For - // example, - // "us-east-1" for AWS or "us-ashburn-1" for OCI. - OriginRegion string `json:"originRegion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessKey") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AWSV4Signature) MarshalJSON() ([]byte, error) { - type NoMethod AWSV4Signature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorConfig: A specification of the type and number of accelerator -// cards attached to the -// instance. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the guest accelerator cards exposed to this - // instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - // AcceleratorType: Full or partial URL of the accelerator type resource to - // attach to this - // instance. For - // example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla - // -p100 - // If you are creating an instance template, specify only the - // accelerator name. - // See GPUs on Compute Engine - // for a full list of accelerator types. - AcceleratorType string `json:"acceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorConfig) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfo: Info for accelerator topologies within a densely -// packed reservation. -type AcceleratorTopologiesInfo struct { - // AcceleratorTopologyInfos: Info for each accelerator topology. - AcceleratorTopologyInfos []*AcceleratorTopologiesInfoAcceleratorTopologyInfo `json:"acceleratorTopologyInfos,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologyInfos") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologyInfos") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfo) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfoAcceleratorTopologyInfo: Info for a slice of a -// given topology. -type AcceleratorTopologiesInfoAcceleratorTopologyInfo struct { - // AcceleratorTopology: The accelerator topology. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // InfoPerTopologyStates: Info for each topology state. - InfoPerTopologyStates []*AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState `json:"infoPerTopologyStates,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfoAcceleratorTopologyInfo) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfoAcceleratorTopologyInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState: Info -// for each topology state. -type AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState struct { - // Count: The number of accelerator topologies in this state. - Count int64 `json:"count,omitempty"` - // State: The state of the accelerator topology. - // - // Possible values: - // "AVAILABLE" - The accelerator topology is available. - // "RUNNING" - The accelerator topology is running. - // "TOPOLOGY_STATE_UNSPECIFIED" - The state of the topology is unspecified. - // "UNHEALTHY" - The accelerator topology is unhealthy. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorType: Represents an Accelerator Type resource. -// -// Google Cloud Platform provides graphics processing units (accelerators) -// that -// you can add to VM instances to improve or accelerate performance when -// working -// with intensive workloads. For more information, readGPUs on Compute Engine. -type AcceleratorType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // accelerator type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#acceleratorType - // for accelerator types. - Kind string `json:"kind,omitempty"` - // MaximumCardsPerInstance: [Output Only] Maximum number of accelerator cards - // allowed per instance. - MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined, fully qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Zone: [Output Only] The name of the zone where the accelerator type - // resides, - // such as us-central1-a. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorType) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AcceleratorTypesScopedList resources. - Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#acceleratorTypeAggregatedList for aggregated lists - // of - // accelerator types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AcceleratorTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type AcceleratorTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeList: Contains a list of accelerator types. -type AcceleratorTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AcceleratorType resources. - Items []*AcceleratorType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#acceleratorTypeList for - // lists of accelerator types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AcceleratorTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeListWarning: [Output Only] Informational warning message. -type AcceleratorTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedList struct { - // AcceleratorTypes: [Output Only] A list of accelerator types contained in - // this scope. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // accelerator - // types list is empty. - Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypesScopedListWarning: [Output Only] An informational warning -// that appears when the accelerator -// types list is empty. -type AcceleratorTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AccessConfig: An access configuration attached to an instance's network -// interface. -// Only one access config per instance is supported. -type AccessConfig struct { - // ExternalIpv6: Applies to ipv6AccessConfigs only. - // The first IPv6 address of the external IPv6 range associated - // with this instance, prefix length is stored inexternalIpv6PrefixLength in - // ipv6AccessConfig. To - // use a static external IP address, it must be unused and in the same - // region - // as the instance's zone. If not specified, Google Cloud will - // automatically - // assign an external IPv6 address from the instance's subnetwork. - ExternalIpv6 string `json:"externalIpv6,omitempty"` - // ExternalIpv6PrefixLength: Applies to ipv6AccessConfigs only. The prefix - // length of the - // external IPv6 range. - ExternalIpv6PrefixLength int64 `json:"externalIpv6PrefixLength,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#accessConfig for - // access configs. - Kind string `json:"kind,omitempty"` - // Name: The name of this access configuration. In accessConfigs - // (IPv4), the default and recommended name is External NAT, but - // you can use any arbitrary string, such as My external IP orNetwork Access. - // In ipv6AccessConfigs, the - // recommend name is External IPv6. - Name string `json:"name,omitempty"` - // NatIP: Applies to accessConfigs (IPv4) only. Anexternal IP - // address associated with this instance. Specify an unused static - // external IP address available to the project or leave this field - // undefined - // to use an IP from a shared ephemeral IP address pool. If you specify - // a - // static external IP address, it must live in the same region as the zone - // of - // the instance. - NatIP string `json:"natIP,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring this - // access - // configuration and can only take the following values: PREMIUM,STANDARD. - // - // If an AccessConfig is specified without a valid external IP address, - // an - // ephemeral IP will be created with this networkTier. - // - // If an AccessConfig with a valid external IP address is specified, it - // must - // match that of the networkTier associated with the Address resource - // owning - // that IP. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // PublicDnsName: [Output Only] The public DNS domain name for the instance. - PublicDnsName string `json:"publicDnsName,omitempty"` - // PublicPtrDomainName: The DNS domain name for the public PTR record. - // - // You can set this field only if the `setPublicPtr` field is enabled - // inaccessConfig. If this field is unspecified inipv6AccessConfig, a default - // PTR record will be created for - // first IP in associated external IPv6 range. - PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` - // SecurityPolicy: The resource URL for the security policy associated with - // this access - // config. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SetPublicDns: Specifies whether a public DNS 'A' record should be created - // for the - // external IP address of this access configuration. - SetPublicDns bool `json:"setPublicDns,omitempty"` - // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be created - // to map the - // external IP address of the instance to a DNS domain name. - // - // This field is not used in ipv6AccessConfig. A default PTR - // record will be created if the VM has external IPv6 range associated. - SetPublicPtr bool `json:"setPublicPtr,omitempty"` - // Type: The type of configuration. In accessConfigs (IPv4), the - // default and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default - // and only option isDIRECT_IPV6. - // - // Possible values: - // "DIRECT_IPV6" - // "ONE_TO_ONE_NAT" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIpv6") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AccessConfig) MarshalJSON() ([]byte, error) { - type NoMethod AccessConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Address: Represents an IP Address resource. -// -// Google Compute Engine has two IP Address resources: -// -// * Global (external and -// internal) -// (https://cloud.google.com/compute/docs/reference/rest/alpha/globalAddresses) -// * Regional (external and -// internal) -// (https://cloud.google.com/compute/docs/reference/rest/alpha/addresses) -// -// For more information, see -// Reserving a static external IP address. -type Address struct { - // Address: The static IP address represented by this resource. - Address string `json:"address,omitempty"` - // AddressType: The type of address to reserve, either INTERNAL orEXTERNAL. If - // unspecified, defaults to EXTERNAL. - // - // Possible values: - // "DNS_FORWARDING" - DNS resolver address in the subnetwork. - // "EXTERNAL" - A publicly visible external IP address. - // "INTERNAL" - A private network IP address, for use with an Instance or - // Internal Load - // Balancer forwarding rule. - // "UNSPECIFIED_TYPE" - AddressType string `json:"addressType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpCollection: Reference to the source of external IPv4 addresses, - // like a PublicDelegatedPrefix (PDP) for BYOIP. - // The PDP must support enhanced IPv4 allocations. - // - // Use one of the following formats to specify a PDP when reserving an - // external IPv4 address using BYOIP. - // - // - - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/pub - // licDelegatedPrefixes/pdp-name - // - - // Partial URL, as in - // - // - // - - // projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name - // - regions/region/publicDelegatedPrefixes/pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // IpVersion: The IP version that will be used by this address. Valid options - // areIPV4 or IPV6. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - // Ipv6EndpointType: The endpoint type of this address, which should be VM - // or NETLB. This is used for deciding which type of endpoint - // this address can be used after the external IPv6 address reservation. - // - // Possible values: - // "NETLB" - Reserved IPv6 address can be used on network load balancer. - // "VM" - Reserved IPv6 address can be used on VM. - Ipv6EndpointType string `json:"ipv6EndpointType,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#address - // for - // addresses. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // Address, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an Address. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character - // must be a lowercase letter, and all following characters (except for - // the - // last character) must be a dash, lowercase letter, or digit. The - // last - // character must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: The URL of the network in which to reserve the address. This field - // can - // only be used with INTERNAL type with theVPC_PEERING purpose. - Network string `json:"network,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring this - // address and - // can only take the following values: PREMIUM orSTANDARD. Internal IP - // addresses are always Premium Tier; - // global external IP addresses are always Premium Tier; regional external - // IP - // addresses can be either Standard or Premium Tier. - // - // If this field is not specified, it is assumed to be PREMIUM. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // PrefixLength: The prefix length if the resource represents an IP range. - PrefixLength int64 `json:"prefixLength,omitempty"` - // Purpose: The purpose of this resource, which can be one of the following - // values: - // - // - // - GCE_ENDPOINT for addresses that are used by VM - // instances, alias IP ranges, load balancers, and similar resources. - // - DNS_RESOLVER for a DNS resolver address in a subnetwork - // for a Cloud DNS inbound - // forwarder IP addresses (regional internal IP address in a subnet of - // a VPC network) - // - VPC_PEERING for global internal IP addresses used for - // - // private services access allocated ranges. - // - NAT_AUTO for the regional external IP addresses used by - // Cloud NAT when allocating addresses using - // - // automatic NAT IP address allocation. - // - IPSEC_INTERCONNECT for addresses created from a private - // IP range that are reserved for a VLAN attachment in an - // *HA VPN over Cloud Interconnect* configuration. These addresses - // are regional resources. - // - `SHARED_LOADBALANCER_VIP` for an internal IP address that is - // assigned - // to multiple internal forwarding rules. - // - `PRIVATE_SERVICE_CONNECT` for a private network address that is - // used to configure Private Service Connect. Only global internal - // addresses - // can use this purpose. - // - // Possible values: - // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global external address can - // only be assigned to Global External - // Application or Proxy Load Balancer forwarding rules. This is the - // default - // value for global external addresses. - // "DNS_RESOLVER" - DNS resolver address in the subnetwork. - // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. - // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for - // the VLAN attachment - // that is used in HA VPN over Cloud Interconnect. This regional - // internal IP address range must not overlap with any IP address range - // of subnet/route in the VPC network and its peering networks. After the - // VLAN attachment is created with the reserved IP address range, when - // creating a new VPN gateway, its interface IP address is allocated - // from the associated VLAN attachment’s IP address range. - // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global external - // address can only be assigned to Global External - // Passthrough Network Load Balancer forwarding rules, as an Availability - // Group 0 address. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global external - // address can only be assigned to Global External - // Passthrough Network Load Balancer forwarding rules, as an Availability - // Group 1 address. - // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used - // to configure Private - // Service Connect. This purpose can be specified only forGLOBAL addresses of - // Type INTERNAL - // "SERVERLESS" - A regional internal IP address range reserved for - // Serverless. - // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be - // shared by multiple Internal - // Load Balancer forwarding rules. - // "SYSTEM_MANAGED" - A regional internal IP address that is reserved and - // managed by Google - // Cloud. It can not be assigned to Google Cloud compute resources such as - // VM and internal load balancer. - // "VPC_PEERING" - IP range for peer networks. - Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] The URL of the region where a regional address - // resides. - // For regional addresses, you must specify the region as a path parameter - // in - // the HTTP request URL. *This field is not applicable to global - // addresses.* - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] The status of the address, which can be one - // ofRESERVING, RESERVED, or IN_USE. - // An address that is RESERVING is currently in the process of - // being reserved. A RESERVED address is currently reserved and - // available to use. An IN_USE address is currently being used - // by another resource and is not available. - // - // Possible values: - // "IN_USE" - Address is being used by another resource and is not available. - // "RESERVED" - Address is reserved and available to use. - // "RESERVING" - Address is being reserved. - Status string `json:"status,omitempty"` - // Subnetwork: The URL of the subnetwork in which to reserve the address. If an - // IP address - // is specified, it must be within the subnetwork's IP range. This field - // can - // only be used with INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose. - Subnetwork string `json:"subnetwork,omitempty"` - // Users: [Output Only] The URLs of the resources that are using this address. - Users []string `json:"users,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Address) MarshalJSON() ([]byte, error) { - type NoMethod Address - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AddressesScopedList resources. - Items map[string]AddressesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#addressAggregatedList - // for aggregated lists of - // addresses. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AddressAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressAggregatedListWarning: [Output Only] Informational warning message. -type AddressAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressList: Contains a list of addresses. -type AddressList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Address resources. - Items []*Address `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#addressList for - // lists of addresses. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AddressListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressList) MarshalJSON() ([]byte, error) { - type NoMethod AddressList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressListWarning: [Output Only] Informational warning message. -type AddressListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressesScopedList struct { - // Addresses: [Output Only] A list of addresses contained in this scope. - Addresses []*Address `json:"addresses,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *AddressesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Addresses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Addresses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressesScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses -// when the list is empty. -type AddressesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdvancedMachineFeatures: Specifies options for controlling advanced machine -// features. -// Options that would traditionally be configured in a BIOS belong -// here. Features that require operating system support may have -// corresponding entries in the GuestOsFeatures of anImage (e.g., whether or -// not the OS in theImage supports nested virtualization being enabled -// or -// disabled). -type AdvancedMachineFeatures struct { - // EnableNestedVirtualization: Whether to enable nested virtualization or not - // (default is false). - EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // EnableUefiNetworking: Whether to enable UEFI networking for instance - // creation. - EnableUefiNetworking bool `json:"enableUefiNetworking,omitempty"` - // EnableWatchdogTimer: Whether to enable the watchdog timer. - EnableWatchdogTimer bool `json:"enableWatchdogTimer,omitempty"` - // NumaNodeCount: The number of vNUMA nodes. - NumaNodeCount int64 `json:"numaNodeCount,omitempty"` - // PerformanceMonitoringUnit: Type of Performance Monitoring Unit requested on - // instance. - // - // Possible values: - // "ARCHITECTURAL" - Architecturally defined non-LLC events. - // "ENHANCED" - Most documented core/L2 and LLC events. - // "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" - // "STANDARD" - Most documented core/L2 events. - PerformanceMonitoringUnit string `json:"performanceMonitoringUnit,omitempty"` - // ThreadsPerCore: The number of threads per physical core. To disable - // simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number - // of threads supported per core by the underlying processor is - // assumed. - ThreadsPerCore int64 `json:"threadsPerCore,omitempty"` - // TurboMode: Turbo frequency mode to use for the instance. - // Supported modes include: - // * ALL_CORE_MAX - // - // Using empty string or not setting this field will use the - // platform-specific - // default turbo mode. - TurboMode string `json:"turboMode,omitempty"` - // VisibleCoreCount: The number of physical cores to expose to an instance. - // Multiply by - // the number of threads per core to compute the total number of virtual - // CPUs to expose to the instance. If unset, the number of cores is - // inferred from the instance's nominal CPU count and the underlying - // platform's SMT width. - VisibleCoreCount int64 `json:"visibleCoreCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableNestedVirtualization") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableNestedVirtualization") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdvancedMachineFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AdvancedMachineFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AliasIpRange: An alias IP range attached to an instance's network interface. -type AliasIpRange struct { - // IpCidrRange: The IP alias ranges to allocate for this interface. This IP - // CIDR range - // must belong to the specified subnetwork and cannot contain IP - // addresses - // reserved by system or used by other network interfaces. This range may be - // a single IP address (such as 10.2.3.4), a netmask (such as/24) or a - // CIDR-formatted string (such as10.1.2.0/24). - IpCidrRange string `json:"ipCidrRange,omitempty"` - // SubnetworkRangeName: The name of a subnetwork secondary IP range from which - // to allocate an IP - // alias range. If not specified, the primary range of the subnetwork is used. - SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AliasIpRange) MarshalJSON() ([]byte, error) { - type NoMethod AliasIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationAggregateReservation: This reservation type is specified by total -// resource amounts (e.g. total -// count of CPUs) and can account for multiple instance SKUs. In other -// words, -// one can create instances of varying shapes against this reservation. -type AllocationAggregateReservation struct { - // HostCount: Count of reserved hosts of specified VM family. The host has - // fixed number - // of accelerators based on the accelerator/vm-family selected. - HostCount int64 `json:"hostCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances - // running on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // InUseInstanceCount: Number of instances currently in use in this - // reservation. - InUseInstanceCount int64 `json:"inUseInstanceCount,omitempty"` - // InUseResources: [Output only] List of resources currently in use. - InUseResources []*AllocationAggregateReservationReservedResourceInfo `json:"inUseResources,omitempty"` - // ReservedResources: List of reserved resources (CPUs, memory, accelerators). - ReservedResources []*AllocationAggregateReservationReservedResourceInfo `json:"reservedResources,omitempty"` - // VmFamily: The VM family that all instances scheduled against this - // reservation must - // belong to. - // - // Possible values: - // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" - // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - VmFamily string `json:"vmFamily,omitempty"` - // WorkloadType: The workload type of the instances that will target this - // reservation. - // - // Possible values: - // "BATCH" - Reserved resources will be optimized for BATCH workloads, such - // as ML - // training. - // "SERVING" - Reserved resources will be optimized for SERVING workloads, - // such as ML - // inference. - // "UNSPECIFIED" - WorkloadType string `json:"workloadType,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationAggregateReservationReservedResourceInfo struct { - // Accelerator: Properties of accelerator resources in this reservation. - Accelerator *AllocationAggregateReservationReservedResourceInfoAccelerator `json:"accelerator,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerator") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerator") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservationReservedResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservationReservedResourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationAggregateReservationReservedResourceInfoAccelerator struct { - // AcceleratorCount: Number of accelerators of specified type. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - // AcceleratorType: Full or partial URL to accelerator type. - // e.g. - // "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" - AcceleratorType string `json:"acceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservationReservedResourceInfoAccelerator) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservationReservedResourceInfoAccelerator - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationReservationSharingPolicy struct { - // ServiceShareType: Sharing config for all Google Cloud services. - // - // Possible values: - // "ALLOW_ALL" - Allow all Google Cloud managed services to share - // reservations. - // "DISALLOW_ALL" - [Default] Disallow sharing with all Google Cloud - // services. - // "SERVICE_SHARE_TYPE_UNSPECIFIED" - ServiceShareType string `json:"serviceShareType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceShareType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceShareType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationReservationSharingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AllocationReservationSharingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatus: [Output Only] Contains output only fields. -type AllocationResourceStatus struct { - // AggregateAllocation: Properties of this aggregatereservation. - AggregateAllocation *AllocationResourceStatusAggregateAllocation `json:"aggregateAllocation,omitempty"` - // HealthInfo: [Output only] Health information for the reservation. - HealthInfo *AllocationResourceStatusHealthInfo `json:"healthInfo,omitempty"` - // ReservationBlockCount: The number of reservation blocks associated with this - // reservation. - ReservationBlockCount int64 `json:"reservationBlockCount,omitempty"` - // ReservationMaintenance: Maintenance information for this reservation - ReservationMaintenance *GroupMaintenanceInfo `json:"reservationMaintenance,omitempty"` - // SpecificSkuAllocation: Allocation Properties of this reservation. - SpecificSkuAllocation *AllocationResourceStatusSpecificSKUAllocation `json:"specificSkuAllocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregateAllocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateAllocation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatusAggregateAllocation: Contains Properties set for the -// aggregate reservation. -type AllocationResourceStatusAggregateAllocation struct { - // Utilizations: Per service utilization breakdown. The Key is the Google Cloud - // managed - // service name. - Utilizations map[string]string `json:"utilizations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Utilizations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Utilizations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatusAggregateAllocation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatusAggregateAllocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatusHealthInfo: Health information for the reservation. -type AllocationResourceStatusHealthInfo struct { - // DegradedBlockCount: The number of reservation blocks that are degraded. - DegradedBlockCount int64 `json:"degradedBlockCount,omitempty"` - // HealthStatus: The health status of the reservation. - // - // Possible values: - // "DEGRADED" - The reservation is degraded. - // "HEALTHY" - The reservation is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation is - // unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthyBlockCount: The number of reservation blocks that are healthy. - HealthyBlockCount int64 `json:"healthyBlockCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedBlockCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedBlockCount") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatusHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatusHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatusSpecificSKUAllocation: Contains Properties set for -// the reservation. -type AllocationResourceStatusSpecificSKUAllocation struct { - // SourceInstanceTemplateId: ID of the instance template used to populate - // reservation properties. - SourceInstanceTemplateId string `json:"sourceInstanceTemplateId,omitempty"` - // Utilizations: Per service utilization breakdown. The Key is the Google Cloud - // managed - // service name. - Utilizations map[string]string `json:"utilizations,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceInstanceTemplateId") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceInstanceTemplateId") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatusSpecificSKUAllocation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatusSpecificSKUAllocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk struct { - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. The default isSCSI. - // For performance characteristics of SCSI over NVMe, seeLocal SSD performance. - // - // Possible values: - // "NVDIMM" - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskSizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUAllocationReservedInstanceProperties: Properties of the -// SKU instances being reserved. -// Next ID: 9 -type AllocationSpecificSKUAllocationReservedInstanceProperties struct { - // GuestAccelerators: Specifies accelerator type and count. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // LocalSsds: Specifies amount of local ssd to reserve with each instance. The - // type - // of disk is local-ssd. - LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk `json:"localSsds,omitempty"` - // LocationHint: An opaque location hint used to place the allocation close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // MachineType: Specifies type of machine (name only) which has fixed number of - // vCPUs - // and fixed amount of memory. This also includes specifying custom - // machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. - MachineType string `json:"machineType,omitempty"` - // MaintenanceFreezeDurationHours: Specifies the number of hours after - // reservation creation where - // instances using the reservation won't be scheduled for maintenance. - MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted - // values are: `PERIODIC`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MinCpuPlatform: Minimum cpu platform the reservation. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAccelerators") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationReservedInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUReservation: This reservation type allows to pre -// allocate specific instance -// -// configuration. -type AllocationSpecificSKUReservation struct { - // AssuredCount: [Output Only] Indicates how many instances are actually usable - // currently. - AssuredCount int64 `json:"assuredCount,omitempty,string"` - // Count: Specifies the number of resources that are allocated. - Count int64 `json:"count,omitempty,string"` - // InUseCount: [Output Only] Indicates how many instances are in use. - InUseCount int64 `json:"inUseCount,omitempty,string"` - // InstanceProperties: The instance properties for the reservation. - InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // SourceInstanceTemplate: Specifies the instance template to create the - // reservation. If you use - // this field, you must exclude the instanceProperties field. - // - // This field is optional, and it can be a full or partial URL. For - // example, - // the following are all valid URLs to an instance template: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - // - projects/project/global/instanceTemplates/instanceTemplate - // - global/instanceTemplates/instanceTemplate - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssuredCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AssuredCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUReservation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AsyncReplicationStatus struct { - DiskPairReplicationState *DiskPairReplicationState `json:"diskPairReplicationState,omitempty"` - LastReplicationDetails *ReplicationDetails `json:"lastReplicationDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskPairReplicationState") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskPairReplicationState") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AsyncReplicationStatus) MarshalJSON() ([]byte, error) { - type NoMethod AsyncReplicationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AttachedDisk: An instance-attached disk resource. -type AttachedDisk struct { - // Architecture: [Output Only] The architecture of the attached disk. Valid - // values are ARM64 - // or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // Boot: Indicates that this is a boot disk. The virtual machine will use the - // first - // partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - // DeviceName: Specifies a unique device name of your choice that is reflected - // into the/dev/disk/by-id/google-* tree of a Linux operating system - // running within the instance. This name can be used to reference the - // device - // for mounting, resizing, and so on, from within the instance. - // - // If not specified, the server chooses a default device name to apply to - // this - // disk, in the form persistent-disk-x, where x is a number - // assigned by Google Compute Engine. This field is only applicable - // for - // persistent disks. - DeviceName string `json:"deviceName,omitempty"` - // DiskEncryptionKey: Encrypts or decrypts a disk using - // acustomer-supplied - // encryption key. - // - // If you are creating a new disk, this field encrypts the new disk using - // an encryption key that you provide. If you are attaching an existing - // disk that is already encrypted, this field decrypts the disk using - // the customer-supplied encryption key. - // - // If you encrypt a disk using a customer-supplied key, you must provide - // the - // same key again when you attempt to use this resource at a later time. - // For - // example, you must provide the key when you create a snapshot or an - // image - // from the disk or when you attach the disk to a virtual machine instance. - // - // If you do not provide an encryption key, then the disk will be - // encrypted - // using an automatically generated key and you do not need to provide a key - // to use the disk later. - // - // Note: - // - // Instance templates do not storecustomer-supplied - // encryption keys, so you cannot use your own keys to encrypt disks in - // amanaged instance group. - // - // You cannot create VMs that have disks with customer-supplied keys using - // the bulk - // insert method. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // DiskSizeGb: The size of the disk in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // ForceAttach: [Input Only] Whether to force attach the regional disk even if - // it's - // currently attached to another instance. If you try to force attach a - // zonal - // disk to an instance, you will receive an error. - ForceAttach bool `json:"forceAttach,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Index: [Output Only] A zero-based index to this disk, where 0 is reserved - // for the - // boot disk. If you have many disks attached to an instance, each - // disk would have a unique index number. - Index int64 `json:"index,omitempty"` - // InitializeParams: [Input Only] Specifies the parameters for a new disk that - // will be created - // alongside the new instance. Use initialization parameters to create - // boot - // disks or local SSDs attached to the new instance. - // - // This property is mutually exclusive with the source property; - // you can only define one or the other, but not both. - InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. For most machine types, the - // default is SCSI. Local SSDs can use either NVME or SCSI. - // In certain configurations, persistent disks can use NVMe. For - // more - // information, seeAbout - // persistent disks. - // - // Possible values: - // "NVDIMM" - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#attachedDisk for - // attached disks. - Kind string `json:"kind,omitempty"` - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - // Locked: [Output Only] Whether to indicate the attached disk is locked. The - // locked - // disk is not allowed to be detached from the instance, or to be used as - // the - // source of the snapshot creation, and the image creation. The instance - // with - // at least one locked attached disk is not allow to be used as source - // of - // machine image creation, instant snapshot creation, and not allowed to - // be - // deleted with --keep-disk parameter set to true for locked disks. - Locked bool `json:"locked,omitempty"` - // Mode: The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. - // If not specified, the default is to attach the disk - // in READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple virtual - // machines can use - // a disk in read-only mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. Only - // one - // virtual machine at a time can be attached to a disk in read-write mode. - Mode string `json:"mode,omitempty"` - // SavedState: For LocalSSD disks on VM Instances in STOPPED or SUSPENDED - // state, this - // field is set to PRESERVED if the LocalSSD data has been saved - // to a persistent location by customer request. (see the - // discard_local_ssd option on Stop/Suspend). - // Read-only in the api. - // - // Possible values: - // "DISK_SAVED_STATE_UNSPECIFIED" - *[Default]* Disk state has not been - // preserved. - // "PRESERVED" - Disk state has been preserved. - SavedState string `json:"savedState,omitempty"` - // ShieldedInstanceInitialState: [Output Only] shielded vm initial state stored - // on disk - ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - // Source: Specifies a valid partial or full URL to an existing Persistent - // Disk - // resource. When creating a new instance boot disk, one - // ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or - // disks.source - // is required. - // - // If desired, you can also attach existing non-root persistent disks - // using - // this property. This field is only applicable for persistent disks. - // - // Note that for InstanceTemplate, specify the disk name for zonal disk, - // and the URL for regional disk. - Source string `json:"source,omitempty"` - // Type: Specifies the type of the disk, either SCRATCH orPERSISTENT. If not - // specified, the default isPERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - // UserLicenses: [Output Only] A list of user provided licenses. It represents - // a list of - // URLs to the license resource. Unlike regular licenses, user - // provided - // licenses can be modified after the disk is created. - UserLicenses []string `json:"userLicenses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AttachedDisk) MarshalJSON() ([]byte, error) { - type NoMethod AttachedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AttachedDiskInitializeParams: [Input Only] Specifies the parameters for a -// new disk that will be created -// alongside the new instance. Use initialization parameters to create -// boot -// disks or local SSDs attached to the new instance. -// -// This field is persisted and returned for instanceTemplate and not -// returned -// in the context of instance. -// -// This property is mutually exclusive with the source property; -// you can only define one or the other, but not both. -type AttachedDiskInitializeParams struct { - // Architecture: The architecture of the attached disk. Valid values are - // arm64 or x86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // Description: An optional description. Provide this property when creating - // the disk. - Description string `json:"description,omitempty"` - // DiskName: Specifies the disk name. If not specified, the default is to use - // the name - // of the instance. If a disk with the same name already exists in the - // given - // region, the existing disk is attached to the new instance and the - // new disk is not created. - DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. The size must be at - // least - // 10 GB. If you specify a sourceImage, which is required for - // boot disks, the default size is the size of the sourceImage. - // If you do not specify a sourceImage, the default disk size - // is 500 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: Specifies the disk type to use to create the instance. If not - // specified, - // the default is pd-standard, specified using the full URL. - // For - // example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard - // - // - // For a full list of acceptable values, seePersistent disk - // types. If you specify this field when creating a VM, you can provide - // either the full or partial URL. For example, the following values - // are - // valid: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType - // - // - projects/project/zones/zone/diskTypes/diskType - // - zones/zone/diskTypes/diskType - // - // - // If you specify this field when creating or updating an instance template - // or all-instances configuration, specify the type of the disk, not the - // URL. For example: pd-standard. - DiskType string `json:"diskType,omitempty"` - // EnableConfidentialCompute: Whether this disk is using confidential compute - // mode. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of - // available - // options. - // - // Guest OS features are applied by merginginitializeParams.guestOsFeatures - // anddisks.guestOsFeatures - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Interface: [Deprecated] Specifies the disk interface to use for attaching - // this disk, - // which is either SCSI or NVME. The default isSCSI. - // - // Possible values: - // "NVME" - // "SCSI" - // "UNSPECIFIED" - Interface string `json:"interface,omitempty"` - // Labels: Labels to apply to this disk. These can be later modified by - // thedisks.setLabels method. This field is only applicable for - // persistent disks. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are attached - // to this - // disk. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: A list of publicly visible licenses. Reserved for Google's use. - Licenses []string `json:"licenses,omitempty"` - // MultiWriter: Indicates whether or not the disk can be read/write attached - // to - // more than one instance. - MultiWriter bool `json:"multiWriter,omitempty"` - // OnUpdateAction: Specifies which action to take on instance update with this - // disk. Default - // is to use the existing disk. - // - // Possible values: - // "RECREATE_DISK" - Always recreate the disk. - // "RECREATE_DISK_IF_SOURCE_CHANGED" - Recreate the disk if source (image, - // snapshot) of this disk is different - // from source of existing disk. - // "USE_EXISTING_DISK" - Use the existing disk, this is the default - // behaviour. - OnUpdateAction string `json:"onUpdateAction,omitempty"` - // ProvisionedIops: Indicates how many IOPS to provision for the disk. This - // sets the number - // of I/O operations per second that the disk can handle. Values must - // be - // between 10,000 and 120,000. For more details, see theExtreme persistent - // disk documentation. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: Indicates how much throughput to provision for the - // disk. This sets the - // number of throughput mb per second that the disk can handle. Values - // must - // greater than or equal to 1. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // ReplicaZones: Required for each regional disk associated with the instance. - // Specify - // the URLs of the zones where the disk should be replicated to. - // You must provide exactly two replica zones, and one zone must be the same - // as the instance zone. - ReplicaZones []string `json:"replicaZones,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the disk. Tag keys - // and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ResourcePolicies: Resource policies applied to this disk for automatic - // snapshot creations. - // Specified using the full or partial URL. For instance template, specify - // only the resource policy name. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // SourceImage: The source image to create this disk. When creating a new - // instance boot - // disk, one of initializeParams.sourceImage orinitializeParams.sourceSnapshot - // or disks.source - // is required. - // - // To create a disk with one of the public operating system - // images, specify the image by its family name. For example, - // specifyfamily/debian-9 to use the latest Debian 9 - // image: - // - // projects/debian-cloud/global/images/family/debian-9 - // - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - // - // - // To create a disk with a custom image that you created, specify the - // image name in the following format: - // - // global/images/my-custom-image - // - // - // You can also specify a custom image by its image family, which returns - // the latest version of the image in that family. Replace the image name - // with family/family-name: - // - // global/images/family/my-image-family - // - // - // If the source image is deleted later, this field will not be set. - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: Thecustomer-supplied - // encryption key of the source image. Required if the source image - // is - // protected by a customer-supplied encryption key. - // - // InstanceTemplate and InstancePropertiesPatch do not - // storecustomer-supplied - // encryption keys, so you cannot create disks for instances in a managed - // instance group if the - // source images are encrypted with your own keys. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceInstantSnapshot: The source instant-snapshot to create this disk. When - // creating a new - // instance boot disk, one of initializeParams.sourceSnapshot - // or initializeParams.sourceInstantSnapshotinitializeParams.sourceImage or - // disks.source - // is required. - // - // To create a disk with a snapshot that you created, specify the - // snapshot name in the following - // format: - // - // us-central1-a/instantSnapshots/my-backup - // - // - // If the source instant-snapshot is deleted later, this field will not be - // set. - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceSnapshot: The source snapshot to create this disk. When creating a new - // instance - // boot disk, one of initializeParams.sourceSnapshot - // orinitializeParams.sourceImage or disks.source - // is required. - // - // To create a disk with a snapshot that you created, specify the - // snapshot name in the following format: - // - // global/snapshots/my-backup - // - // - // If the source snapshot is deleted later, this field will not be set. - // - // Note: You cannot create VMs in bulk using a snapshot as the source. Use - // an image instead when you create VMs using - // the bulk - // insert method. - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: Thecustomer-supplied - // encryption key of the source snapshot. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // StoragePool: The storage pool in which the new disk is created. You can - // provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool - // - projects/project/zones/zone/storagePools/storagePool - // - zones/zone/storagePools/storagePool - StoragePool string `json:"storagePool,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { - type NoMethod AttachedDiskInitializeParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - return gensupport.MarshalJSON(NoMethod(s), 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: - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_READ" - Data reads. Example: CloudSQL Users list - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthenticationPolicy: [Deprecated] The authentication settings for the -// backend service. -// The authentication settings for the backend service. -type AuthenticationPolicy struct { - // Origins: List of authentication methods that can be used for origin - // authentication. - // Similar to peers, these will be evaluated in order the first valid one - // will be used to set origin identity. If none of these methods pass, - // the - // request will be rejected with authentication failed error (401). Leave - // the - // list empty if origin authentication is not required. - Origins []*OriginAuthenticationMethod `json:"origins,omitempty"` - // Peers: List of authentication methods that can be used for peer - // authentication. - // They will be evaluated in order the first valid one will be used to set - // peer identity. If none of these methods pass, the request will be - // rejected - // with authentication failed error (401). Leave the list empty if - // peer - // authentication is not required. - Peers []*PeerAuthenticationMethod `json:"peers,omitempty"` - // PrincipalBinding: Define whether peer or origin identity should be used for - // principal. - // Default value is USE_PEER. If peer (or origin) identity is not - // available, - // either because peer/origin authentication is not defined, or - // failed, - // principal will be left unset. In other words, binding rule does not - // affect - // the decision to accept or reject request. This field can be set to one - // of - // the following: - // USE_PEER: Principal will be set to the identity from peer - // authentication. - // USE_ORIGIN: Principal will be set to the identity from origin - // authentication. - // - // Possible values: - // "INVALID" - // "USE_ORIGIN" - Principal will be set to the identity from origin - // authentication. - // "USE_PEER" - Principal will be set to the identity from peer - // authentication. - PrincipalBinding string `json:"principalBinding,omitempty"` - // ServerTlsContext: Configures the mechanism to obtain server-side security - // certificates and - // identity information. - ServerTlsContext *TlsContext `json:"serverTlsContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "Origins") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Origins") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthenticationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AuthenticationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthorizationConfig: [Deprecated] Authorization configuration provides -// service-level and -// method-level access control for a service. -// control for a service. -type AuthorizationConfig struct { - // Policies: List of RbacPolicies. - Policies []*RbacPolicy `json:"policies,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policies") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthorizationConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuthorizationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Autoscaler: Represents an Autoscaler resource. -// -// Google Compute Engine has two Autoscaler resources: -// -// * Zonal (/compute/docs/reference/rest/alpha/autoscalers) -// * Regional (/compute/docs/reference/rest/alpha/regionAutoscalers) -// -// Use autoscalers to automatically add or delete instances from a -// managed instance group according to your defined autoscaling policy. -// For more information, read Autoscaling Groups of Instances. -// -// For zonal managed instance groups resource, use the -// autoscaler -// resource. -// -// For regional managed instance groups, use theregionAutoscalers resource. -type Autoscaler struct { - // AutoscalingPolicy: The configuration parameters for the autoscaling - // algorithm. You can define - // one or more signals for an autoscaler: - // cpuUtilization,customMetricUtilizations, andloadBalancingUtilization. - // - // If none of these are specified, the default will be to autoscale based - // oncpuUtilization to 0.6 or 60%. - AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#autoscaler - // for autoscalers. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // RecommendedSize: [Output Only] Target recommended MIG size (number of - // instances) computed by - // autoscaler. Autoscaler calculates the recommended MIG size even when - // the - // autoscaling policy mode is different from ON. This field is empty - // when - // autoscaler is not connected to an existing managed instance group - // or - // autoscaler did not generate its prediction. - RecommendedSize int64 `json:"recommendedSize,omitempty"` - // Region: [Output Only] URL of theregion - // where the instance group resides (for autoscalers living in regional - // scope). - Region string `json:"region,omitempty"` - // ScalingScheduleStatus: [Output Only] Status information of existing scaling - // schedules. - ScalingScheduleStatus map[string]ScalingScheduleStatus `json:"scalingScheduleStatus,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] The status of the autoscaler configuration. Current - // set of - // possible values: - // - // - PENDING: - // Autoscaler backend hasn't read new/updated configuration. - // - DELETING: - // Configuration is being deleted. - // - ACTIVE: - // Configuration is acknowledged to be effective. Some warnings might - // be present in the statusDetails field. - // - ERROR: - // Configuration has errors. Actionable for users. Details are present in - // the statusDetails field. - // - // - // New values might be added in the future. - // - // Possible values: - // "ACTIVE" - Configuration is acknowledged to be effective - // "DELETING" - Configuration is being deleted - // "ERROR" - Configuration has errors. Actionable for users. - // "PENDING" - Autoscaler backend hasn't read new/updated configuration - Status string `json:"status,omitempty"` - // StatusDetails: [Output Only] Human-readable details about the current state - // of the - // autoscaler. Read the documentation forCommonly - // returned status messages for examples of status messages you - // might - // encounter. - StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` - // Target: URL of the managed instance group that this autoscaler will scale. - // This - // field is required when creating an autoscaler. - Target string `json:"target,omitempty"` - // Zone: [Output Only] URL of thezone - // where the instance group resides (for autoscalers living in zonal scope). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Autoscaler) MarshalJSON() ([]byte, error) { - type NoMethod Autoscaler - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AutoscalersScopedList resources. - Items map[string]AutoscalersScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#autoscalerAggregatedList - // for aggregated lists of - // autoscalers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AutoscalerAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerAggregatedListWarning: [Output Only] Informational warning -// message. -type AutoscalerAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalerAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerList: Contains a list of Autoscaler resources. -type AutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#autoscalerList - // for lists of autoscalers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AutoscalerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerListWarning: [Output Only] Informational warning message. -type AutoscalerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerStatusDetails struct { - // Message: The status message. - Message string `json:"message,omitempty"` - // Type: The type of error, warning, or notice returned. Current set of - // possible - // values: - // - // - ALL_INSTANCES_UNHEALTHY (WARNING): - // All instances in the instance group are unhealthy (not in RUNNING - // state). - // - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): - // There is no backend service attached to the instance group. - // - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): - // Autoscaler recommends a size greater than maxNumReplicas. - // - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): - // The custom metric samples are not exported often enough to be - // a credible base for autoscaling. - // - CUSTOM_METRIC_INVALID (ERROR): - // The custom metric that was specified does not exist or does not have - // the necessary labels. - // - MIN_EQUALS_MAX (WARNING): - // The minNumReplicas is equal to maxNumReplicas. This means the - // autoscaler cannot add or remove instances from the instance group. - // - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): - // The autoscaler did not receive any data from the custom metric - // configured for autoscaling. - // - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): - // The autoscaler is configured to scale based on a load balancing signal - // but the instance group has not received any requests from the load - // balancer. - // - MODE_OFF (WARNING): - // Autoscaling is turned off. The number of instances in the group won't - // change automatically. The autoscaling configuration is preserved. - // - MODE_ONLY_UP (WARNING): - // Autoscaling is in the "Autoscale only out" mode. The autoscaler can - // add - // instances but not remove any. - // - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): - // The instance group cannot be autoscaled because it has more than one - // backend service attached to it. - // - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): - // There is insufficient quota for the necessary resources, such as CPU - // or - // number of instances. - // - REGION_RESOURCE_STOCKOUT (ERROR): - // Shown only for regional autoscalers: there is a resource stockout in - // the chosen region. - // - SCALING_TARGET_DOES_NOT_EXIST (ERROR): - // The target to be scaled does not exist. - // - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION - // (ERROR): Autoscaling does not work with an HTTP/S load balancer that - // has been configured for maxRate. - // - ZONE_RESOURCE_STOCKOUT (ERROR): - // For zonal autoscalers: there is a resource stockout in the chosen - // zone. - // For regional autoscalers: in at least one of the zones you're using - // there is a resource stockout. - // - // - // New values might be added in the future. Some of the values might not - // be - // available in all API versions. - // - // Possible values: - // "ALL_INSTANCES_UNHEALTHY" - All instances in the instance group are - // unhealthy (not in RUNNING state). - // "BACKEND_SERVICE_DOES_NOT_EXIST" - There is no backend service attached to - // the instance group. - // "CAPPED_AT_MAX_NUM_REPLICAS" - Autoscaler recommends a size greater than - // maxNumReplicas. - // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" - The custom metric samples are not - // exported often enough to be a credible - // base for autoscaling. - // "CUSTOM_METRIC_INVALID" - The custom metric that was specified does not - // exist or does not have the - // necessary labels. - // "MIN_EQUALS_MAX" - The minNumReplicas is equal to maxNumReplicas. This - // means the autoscaler - // cannot add or remove instances from the instance group. - // "MISSING_CUSTOM_METRIC_DATA_POINTS" - The autoscaler did not receive any - // data from the custom metric configured - // for autoscaling. - // "MISSING_LOAD_BALANCING_DATA_POINTS" - The autoscaler is configured to - // scale based on a load balancing signal - // but the instance group has not received any requests from the load - // balancer. - // "MODE_OFF" - Autoscaling is turned off. The number of instances in the - // group won't - // change automatically. The autoscaling configuration is preserved. - // "MODE_ONLY_SCALE_OUT" - Autoscaling is in the "Autoscale only scale out" - // mode. - // Instances in the group will be only added. - // "MODE_ONLY_UP" - Autoscaling is in the "Autoscale only out" mode. - // Instances in the group - // will be only added. - // "MORE_THAN_ONE_BACKEND_SERVICE" - The instance group cannot be autoscaled - // because it has more than one - // backend service attached to it. - // "NOT_ENOUGH_QUOTA_AVAILABLE" - There is insufficient quota for the - // necessary resources, such as CPU or - // number of instances. - // "REGION_RESOURCE_STOCKOUT" - Showed only for regional autoscalers: there - // is a resource stockout in - // the chosen region. - // "SCALING_TARGET_DOES_NOT_EXIST" - The target to be scaled does not exist. - // "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX" - For some scaling - // schedules minRequiredReplicas is greater than - // maxNumReplicas. Autoscaler always recommends at most - // maxNumReplicas - // instances. - // "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN" - For some scaling - // schedules minRequiredReplicas is less than - // minNumReplicas. Autoscaler always recommends at least - // minNumReplicas - // instances. - // "UNKNOWN" - // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" - Autoscaling does not - // work with an HTTP/S load balancer that has been - // configured for maxRate. - // "ZONE_RESOURCE_STOCKOUT" - For zonal autoscalers: there is a resource - // stockout in the chosen zone. - // For regional autoscalers: in at least one of the zones you're using there - // is a resource stockout. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerStatusDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedList struct { - // Autoscalers: [Output Only] A list of autoscalers contained in this scope. - Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // autoscalers - // when the list is empty. - Warning *AutoscalersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Autoscalers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Autoscalers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalersScopedListWarning: [Output Only] Informational warning which -// replaces the list of autoscalers -// when the list is empty. -type AutoscalersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicy: Cloud Autoscaler policy. -type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that your application takes to - // initialize on a VM - // instance. This is referred to as the - // initialization period - // (/compute/docs/autoscaler#cool_down_period). - // Specifying an accurate initialization period improves - // autoscaler decisions. For example, when scaling out, the autoscaler - // ignores - // data from VMs that are still initializing because those VMs might not - // yet - // represent normal usage of your application. The default - // initialization - // period is 60 seconds. - // - // Initialization periods might vary because of numerous - // factors. We recommend that you test how long your application takes - // to - // initialize. To do this, create a VM and time your application's - // startup - // process. - CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - // CpuUtilization: Defines the CPU utilization policy that allows the - // autoscaler to scale - // based on the average CPU utilization of a managed instance group. - CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"` - // CustomMetricUtilizations: Configuration parameters of autoscaling based on a - // custom metric. - CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"` - // LoadBalancingUtilization: Configuration parameters of autoscaling based on - // load balancer. - LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"` - // MaxNumReplicas: The maximum number of instances that the autoscaler can - // scale out to. This - // is required when creating or updating an autoscaler. The maximum number - // of replicas must not be lower than minimal number of replicas. - MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - // MinNumReplicas: The minimum number of replicas that the autoscaler can scale - // in to. - // This cannot be less than 0. If not provided, autoscaler chooses a - // default value depending on maximum number of instances allowed. - MinNumReplicas int64 `json:"minNumReplicas,omitempty"` - // Mode: Defines the operating mode for this policy. - // The following modes are available: - // - // - OFF: Disables the autoscaler but maintains its - // configuration. - // - ONLY_SCALE_OUT: Restricts the autoscaler to add - // VM instances only. - // - ON: Enables all autoscaler activities according to its - // policy. - // - // - // For more information, see - // "Turning off or restricting an autoscaler" - // - // Possible values: - // "OFF" - Do not automatically scale the MIG in or out. - // The recommended_size field contains the size of MIG that would be set if - // the actuation mode was enabled. - // "ON" - Automatically scale the MIG in and out according to the policy. - // "ONLY_SCALE_OUT" - Automatically create VMs according to the policy, but - // do not scale - // the MIG in. - // "ONLY_UP" - Automatically create VMs according to the policy, but do not - // scale - // the MIG in. - Mode string `json:"mode,omitempty"` - ScaleDownControl *AutoscalingPolicyScaleDownControl `json:"scaleDownControl,omitempty"` - ScaleInControl *AutoscalingPolicyScaleInControl `json:"scaleInControl,omitempty"` - // ScalingSchedules: Scaling schedules defined for an autoscaler. Multiple - // schedules - // can be set on an autoscaler, and they can overlap. During - // overlapping - // periods the greatest min_required_replicas of all scaling schedules - // is - // applied. Up to 128 scaling schedules are allowed. - ScalingSchedules map[string]AutoscalingPolicyScalingSchedule `json:"scalingSchedules,omitempty"` - // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CoolDownPeriodSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyCpuUtilization: CPU utilization policy. -type AutoscalingPolicyCpuUtilization struct { - // PredictiveMethod: Indicates whether predictive autoscaling based on CPU - // metric is enabled. - // Valid values are: - // - // * NONE (default). No predictive method is used. The autoscaler scales - // the - // group to meet current demand based on real-time metrics. - // * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability - // by - // monitoring daily and weekly load patterns and scaling out ahead - // of - // anticipated demand. - // - // Possible values: - // "NONE" - No predictive method is used. The autoscaler scales the group to - // meet - // current demand based on real-time metrics - // "OPTIMIZE_AVAILABILITY" - Predictive autoscaling improves availability by - // monitoring daily and - // weekly load patterns and scaling out ahead of anticipated demand. - // "PREDICTIVE_METHOD_UNSPECIFIED" - // "STANDARD" - Predictive autoscaling improves availability by monitoring - // daily and - // weekly load patterns and scaling out ahead of anticipated demand. - // - // This value is being DEPRECATED - it won't be promoted to beta and v1. - // Use - // OPTIMIZE_AVAILABILITY instead. - PredictiveMethod string `json:"predictiveMethod,omitempty"` - // UtilizationTarget: The target CPU utilization that the autoscaler maintains. - // Must be - // a float value in the range (0, 1]. If not specified, the default is0.6. - // - // If the CPU level is below the target utilization, the autoscaler scales - // in the number of instances until it reaches the minimum number of - // instances you specified or until the average CPU of your instances - // reaches the target utilization. - // - // If the average CPU is above the target utilization, the autoscaler - // scales out until it reaches the maximum number of instances you - // specified or until the average utilization reaches the target - // utilization. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "PredictiveMethod") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PredictiveMethod") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyCpuUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyCpuUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric policy. -type AutoscalingPolicyCustomMetricUtilization struct { - // Filter: A filter string, compatible with a Stackdriver Monitoringfilter - // string forTimeSeries.list API call. This filter is - // used to select a specific TimeSeries for the purpose of autoscaling and - // to determine whether the metric is exporting per-instance or - // per-group data. - // - // For the filter to be valid for autoscaling purposes, the following - // rules - // apply: - // - // - // - You can only use the AND operator for joining - // selectors. - // - You can only use direct equality comparison operator - // (=) without any functions for each selector. - // - You can specify the metric in both the filter string and in the - // metric field. However, if specified in both places, the metric must - // be identical. - // - The monitored resource type - // determines what kind of values are expected for the metric. If it is - // a gce_instance, the autoscaler expects the metric to - // include a separate TimeSeries for each instance in a group. In such - // a - // case, you cannot filter on resource labels. - // - // - // If the resource type is any other value, the autoscaler expects - // this metric to contain values that apply to the entire autoscaled - // instance group and resource label filtering can be performed to - // point autoscaler at the correct TimeSeries to scale upon. This is - // called a *per-group metric* for the purpose of autoscaling. - // - // If not specified, the type defaults to - // gce_instance. - // - // - // - // Try to provide a filter that is selective enough to pick just one - // TimeSeries for the autoscaled group or for each of the instances (if you - // are using gce_instance resource type). If multiple - // TimeSeries are returned upon the query execution, the autoscaler will - // sum - // their respective values to obtain its scaling value. - Filter string `json:"filter,omitempty"` - // Metric: The identifier (type) of the Stackdriver Monitoring metric. The - // metric - // cannot have negative values. - // - // The metric must have a value type of INT64 orDOUBLE. - Metric string `json:"metric,omitempty"` - // SingleInstanceAssignment: If scaling is based on a per-group metric value - // that represents the - // total amount of work to be done or resource usage, set this value to - // an - // amount assigned for a single instance of the scaled group. Autoscaler - // keeps the number of instances proportional to the value of this - // metric. The metric itself does not change value due to group - // resizing. - // - // A good metric to use with the target is for - // examplepubsub.googleapis.com/subscription/num_undelivered_messages - // or a custom metric exporting the total number of requests coming to - // your instances. - // - // A bad example would be a metric exporting an average or median - // latency, - // since this value can't include a chunk assignable to a single instance, - // it could be better used with utilization_target instead. - SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` - // UtilizationTarget: The target value of the metric that autoscaler maintains. - // This - // must be a positive value. A utilization metric scales number of - // virtual machines handling requests to increase or decrease - // proportionally to the metric. - // - // For example, a good metric to use as a utilization_target - // ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count - // . - // The autoscaler works to keep this value constant for each of the - // instances. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // UtilizationTargetType: Defines how target utilization value is expressed for - // a Stackdriver - // Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE. - // - // Possible values: - // "DELTA_PER_MINUTE" - Sets the utilization target value for a cumulative or - // delta metric, - // expressed as the rate of growth per minute. - // "DELTA_PER_SECOND" - Sets the utilization target value for a cumulative or - // delta metric, - // expressed as the rate of growth per second. - // "GAUGE" - Sets the utilization target value for a gauge metric. The - // autoscaler - // will collect the average utilization of the virtual machines from the - // last couple of minutes, and compare the value to the utilization - // target value to perform autoscaling. - UtilizationTargetType string `json:"utilizationTargetType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyCustomMetricUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyCustomMetricUtilization - var s1 struct { - SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters of -// autoscaling based on load balancing. -type AutoscalingPolicyLoadBalancingUtilization struct { - // UtilizationTarget: Fraction of backend capacity utilization (set in HTTP(S) - // load balancing - // configuration) that the autoscaler maintains. Must be a positive - // float - // value. If not defined, the default is 0.8. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UtilizationTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyLoadBalancingUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyLoadBalancingUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyScaleDownControl: Configuration that allows for slower -// scale in so that even if Autoscaler -// recommends an abrupt scale in of a MIG, it will be throttled as specified -// by the parameters below. -type AutoscalingPolicyScaleDownControl struct { - // MaxScaledDownReplicas: Maximum allowed number (or %) of VMs that can be - // deducted from the peak - // recommendation during the window autoscaler looks at when - // computing - // recommendations. Possibly all these VMs can be deleted at once so - // user - // service needs to be prepared to lose that many VMs in one step. - MaxScaledDownReplicas *FixedOrPercent `json:"maxScaledDownReplicas,omitempty"` - // TimeWindowSec: How far back autoscaling looks when computing recommendations - // to - // include directives regarding slower scale in, as described above. - TimeWindowSec int64 `json:"timeWindowSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxScaledDownReplicas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxScaledDownReplicas") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScaleDownControl) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScaleDownControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyScaleInControl: Configuration that allows for slower scale -// in so that even if Autoscaler -// recommends an abrupt scale in of a MIG, it will be throttled as specified -// by the parameters below. -type AutoscalingPolicyScaleInControl struct { - // MaxScaledInReplicas: Maximum allowed number (or %) of VMs that can be - // deducted from the peak - // recommendation during the window autoscaler looks at when - // computing - // recommendations. Possibly all these VMs can be deleted at once so - // user - // service needs to be prepared to lose that many VMs in one step. - MaxScaledInReplicas *FixedOrPercent `json:"maxScaledInReplicas,omitempty"` - // TimeWindowSec: How far back autoscaling looks when computing recommendations - // to - // include directives regarding slower scale in, as described above. - TimeWindowSec int64 `json:"timeWindowSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxScaledInReplicas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxScaledInReplicas") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScaleInControl) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScaleInControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyScalingSchedule: Scaling based on user-defined schedule. -// The message describes a single -// scaling schedule. A scaling schedule changes the minimum number of -// VM -// instances an autoscaler can recommend, which can trigger scaling out. -type AutoscalingPolicyScalingSchedule struct { - // Description: A description of a scaling schedule. - Description string `json:"description,omitempty"` - // Disabled: A boolean value that specifies whether a scaling schedule can - // influence - // autoscaler recommendations. If set to true, then a scaling schedule has - // no effect. This field is optional, and its value is false by default. - Disabled bool `json:"disabled,omitempty"` - // DurationSec: The duration of time intervals, in seconds, for which - // this - // scaling schedule is to run. The minimum allowed value is 300. - // This field is required. - DurationSec int64 `json:"durationSec,omitempty"` - // MinRequiredReplicas: The minimum number of VM instances that the autoscaler - // will - // recommend in time intervals starting according to schedule. This field - // is - // required. - MinRequiredReplicas int64 `json:"minRequiredReplicas,omitempty"` - // Schedule: The start timestamps of time intervals when this scaling - // schedule is to provide a scaling signal. This field uses the extended - // cron format (with an optional year field). The expression can describe - // a - // single timestamp if the optional year is set, in which case the - // scaling - // schedule runs once. The schedule is interpreted with respect to - // time_zone. This field is required. Note: These timestamps only describe - // when autoscaler starts providing the scaling signal. The VMs - // need additional time to become serving. - Schedule string `json:"schedule,omitempty"` - // TimeZone: The time zone to use when interpreting the schedule. - // The value of this field must be a time zone name from the tz - // database: - // https://en.wikipedia.org/wiki/Tz_database. This field is assigned a - // default value of "UTC" if left empty. - TimeZone string `json:"timeZone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScalingSchedule) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScalingSchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Backend: Message containing information of one individual backend. -type Backend struct { - // BalancingMode: Specifies how to determine whether the backend of a load - // balancer can - // handle additional traffic or is fully loaded. For usage guidelines, - // see - // Connection balancing mode. - // - // Backends must use compatible balancing modes. For more information, - // see - // Supported balancing modes and target capacity settings and - // Restrictions and guidance for instance groups. - // - // Note: Currently, if you use the API to configure incompatible - // balancing - // modes, the configuration might be accepted even though it has no impact - // and is ignored. Specifically, Backend.maxUtilization is ignored - // when - // Backend.balancingMode is RATE. In the future, this incompatible - // combination - // will be rejected. - // - // Possible values: - // "CONNECTION" - Balance based on the number of simultaneous connections. - // "CUSTOM_METRICS" - Based on custom defined and reported metrics. - // "IN_FLIGHT" - Balance based on the number of in-flight requests. - // "RATE" - Balance based on requests per second (RPS). - // "UTILIZATION" - Balance based on the backend utilization. - BalancingMode string `json:"balancingMode,omitempty"` - // CapacityScaler: A multiplier applied to the backend's target capacity of its - // balancing - // mode. - // The default value is 1, which means the group serves up to - // 100% of its configured capacity (depending onbalancingMode). A setting of 0 - // means the group is - // completely drained, offering 0% of its available capacity. The valid - // ranges - // are 0.0 and [0.1,1.0]. - // You cannot configure a setting larger than 0 and smaller than0.1. - // You cannot configure a setting of 0 when there is only one - // backend attached to the backend service. - // - // Not available with backends that don't support using abalancingMode. This - // includes backends such as global - // internet NEGs, regional serverless NEGs, and PSC NEGs. - CapacityScaler float64 `json:"capacityScaler,omitempty"` - // CustomMetrics: List of custom metrics that are used for - // CUSTOM_METRICS - // BalancingMode. - CustomMetrics []*BackendCustomMetric `json:"customMetrics,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Failover: This field designates whether this is a failover backend. More - // than one - // failover backend can be configured for a given BackendService. - Failover bool `json:"failover,omitempty"` - // Group: The fully-qualified URL of aninstance - // group or network endpoint - // group (NEG) resource. To determine what types of backends a load - // balancer supports, see the Backend services - // overview - // (https://cloud.google.com/load-balancing/docs/backend-service#backends). - // - // You must use the *fully-qualified* URL (starting - // withhttps://www.googleapis.com/) to specify the instance group - // or NEG. Partial URLs are not supported. - // - // If haPolicy is specified, backends must refer to NEG resources of - // type - // GCE_VM_IP. - Group string `json:"group,omitempty"` - // MaxConnections: Defines a target maximum number of simultaneous connections. - // For usage - // guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. Not available if the backend'sbalancingMode is RATE. - MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxConnectionsPerEndpoint: Defines a target maximum number of simultaneous - // connections. For usage - // guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isRATE. - MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` - // MaxConnectionsPerInstance: Defines a target maximum number of simultaneous - // connections. - // For usage guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isRATE. - MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` - // MaxInFlightRequests: Defines a maximum number of in-flight requests for the - // whole NEG or - // instance group. Not available if backend's balancingMode isRATE or - // CONNECTION. - MaxInFlightRequests int64 `json:"maxInFlightRequests,omitempty"` - // MaxInFlightRequestsPerEndpoint: Defines a maximum number of in-flight - // requests for a single endpoint. - // Not available if backend's balancingMode is RATE - // or CONNECTION. - MaxInFlightRequestsPerEndpoint int64 `json:"maxInFlightRequestsPerEndpoint,omitempty"` - // MaxInFlightRequestsPerInstance: Defines a maximum number of in-flight - // requests for a single VM. - // Not available if backend's balancingMode is RATE - // or CONNECTION. - MaxInFlightRequestsPerInstance int64 `json:"maxInFlightRequestsPerInstance,omitempty"` - // MaxRate: Defines a maximum number of HTTP requests per second (RPS). - // For - // usage guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerEndpoint: Defines a maximum target for requests per second (RPS). - // For usage - // guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` - // MaxRatePerInstance: Defines a maximum target for requests per second (RPS). - // For usage - // guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - // MaxUtilization: Optional parameter to define a target capacity for - // theUTILIZATION balancing mode. The valid range is[0.0, 1.0]. - // - // For usage guidelines, seeUtilization - // balancing mode. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - // Preference: This field indicates whether this backend should be fully - // utilized before - // sending traffic to backends with default preference. The possible - // values - // are: - // - // - PREFERRED: Backends with this preference level will be - // filled up to their capacity limits first, based on RTT. - // - DEFAULT: If preferred backends don't have enough - // capacity, backends in this layer would be used and traffic would be - // assigned based on the load balancing algorithm you use. This is the - // default - // - // Possible values: - // "DEFAULT" - No preference. - // "PREFERENCE_UNSPECIFIED" - If preference is unspecified, we set it to the - // DEFAULT value - // "PREFERRED" - Traffic will be sent to this backend first. - Preference string `json:"preference,omitempty"` - // Possible values: - // "LONG" - Most of the requests are expected to take more than multiple - // seconds to - // finish. - // "SHORT" - Most requests are expected to finish with a sub-second latency. - // "TRAFFIC_DURATION_UNSPECIFIED" - Traffic duration is unspecified. - TrafficDuration string `json:"trafficDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "BalancingMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BalancingMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Backend) MarshalJSON() ([]byte, error) { - type NoMethod Backend - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Backend) UnmarshalJSON(data []byte) error { - type NoMethod Backend - var s1 struct { - CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` - MaxRatePerEndpoint gensupport.JSONFloat64 `json:"maxRatePerEndpoint"` - MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CapacityScaler = float64(s1.CapacityScaler) - s.MaxRatePerEndpoint = float64(s1.MaxRatePerEndpoint) - s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendBucket: Represents a Cloud Storage Bucket resource. -// -// This Cloud Storage bucket resource is referenced by a URL map of a -// load -// balancer. For more information, readBackend Buckets. -type BackendBucket struct { - // BucketName: Cloud Storage bucket name. - BucketName string `json:"bucketName,omitempty"` - // CdnPolicy: Cloud CDN configuration for this BackendBucket. - CdnPolicy *BackendBucketCdnPolicy `json:"cdnPolicy,omitempty"` - // CompressionMode: Compress text responses using Brotli or gzip compression, - // based on - // the client's Accept-Encoding header. - // - // Possible values: - // "AUTOMATIC" - Automatically uses the best compression based on the - // Accept-Encoding - // header sent by the client. - // "DISABLED" - Disables compression. Existing compressed responses cached - // by - // Cloud CDN will not be served to clients. - CompressionMode string `json:"compressionMode,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomResponseHeaders: Headers that the Application Load Balancer should add - // to proxied responses. - CustomResponseHeaders []string `json:"customResponseHeaders,omitempty"` - // Description: An optional textual description of the resource; provided by - // the client - // when the resource is created. - Description string `json:"description,omitempty"` - // EdgeSecurityPolicy: [Output Only] The resource URL for the edge security - // policy associated with - // this backend bucket. - EdgeSecurityPolicy string `json:"edgeSecurityPolicy,omitempty"` - // EnableCdn: If true, enable Cloud CDN for this BackendBucket. - EnableCdn bool `json:"enableCdn,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: The value can only be INTERNAL_MANAGED for cross-region - // internal layer 7 - // load balancer. - // - // If loadBalancingScheme is not specified, the backend bucket can be used - // by - // classic global external load balancers, or global application external - // load - // balancers, or both. - // - // Possible values: - // "EXTERNAL_MANAGED" - Signifies that this will be used for regional - // external Application Load - // Balancers. - // "INTERNAL_MANAGED" - Signifies that this will be used for internal - // Application Load Balancers. - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *BackendBucketParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the regional backend - // bucket - // resides. This field is not applicable to global backend buckets. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UsedBy: [Output Only] List of resources referencing that backend bucket. - UsedBy []*BackendBucketUsedBy `json:"usedBy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucket) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucket - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucketsScopedList resources. - Items map[string]BackendBucketsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketAggregatedListWarning: [Output Only] Informational warning -// message. -type BackendBucketAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicy: Message containing Cloud CDN configuration for a -// backend bucket. -type BackendBucketCdnPolicy struct { - // BypassCacheOnRequestHeaders: Bypass the cache when the specified request - // headers are matched - e.g. - // Pragma or Authorization headers. Up to 5 headers can be specified. - // The cache is bypassed for all cdnPolicy.cacheMode settings. - BypassCacheOnRequestHeaders []*BackendBucketCdnPolicyBypassCacheOnRequestHeader `json:"bypassCacheOnRequestHeaders,omitempty"` - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *BackendBucketCdnPolicyCacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - // CacheMode: Specifies the cache setting for all responses from this - // backend. - // The possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid - // caching - // headers to cache content. Responses without these headers will not be - // cached at Google's edge, and will require a full trip to the origin on - // every request, potentially impacting performance and increasing load on - // the origin server.FORCE_CACHE_ALL Cache all content, ignoring any - // "private", - // "no-store" or "no-cache" directives in Cache-Control response - // headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache - // static content, - // including common image formats, media (video and audio), and web - // assets - // (JavaScript and CSS). Requests and responses that are marked as - // uncacheable, as well as dynamic content (including HTML), will not - // be - // cached. - // - // If no value is provided for cdnPolicy.cacheMode, it defaults - // to CACHE_ALL_STATIC. - // - // Possible values: - // "CACHE_ALL_STATIC" - Automatically cache static content, including common - // image formats, - // media (video and audio), and web assets (JavaScript and CSS). - // Requests and responses that are marked as uncacheable, as well as - // dynamic content (including HTML), will not be cached. - // "FORCE_CACHE_ALL" - Cache all content, ignoring any "private", "no-store" - // or "no-cache" - // directives in Cache-Control response headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content. - // "INVALID_CACHE_MODE" - // "USE_ORIGIN_HEADERS" - Requires the origin to set valid caching headers to - // cache content. - // Responses without these headers will not be cached at Google's edge, - // and will require a full trip to the origin on every request, - // potentially impacting performance and increasing load on the - // origin server. - CacheMode string `json:"cacheMode,omitempty"` - // ClientTtl: Specifies a separate client (e.g. browser client) maximum TTL. - // This is - // used to clamp the max-age (or Expires) value sent to the client. - // With - // FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for - // the - // response max-age directive, along with a "public" directive. For - // cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the - // max-age - // from the origin (if specified), or else sets the response max-age - // directive to the lesser of the client_ttl and default_ttl, and also - // ensures a "public" cache-control directive is present. - // If a client TTL is not specified, a default value (1 hour) will be used. - // The maximum allowed value is 31,622,400s (1 year). - ClientTtl int64 `json:"clientTtl,omitempty"` - // DefaultTtl: Specifies the default TTL for cached content served by this - // origin for - // responses that do not have an existing valid TTL (max-age or - // s-maxage). - // Setting a TTL of "0" means "always revalidate". - // The value of defaultTTL cannot be set to a value greater than that - // of - // maxTTL, but can be equal. - // When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL - // will overwrite the TTL set in all responses. The maximum allowed value - // is - // 31,622,400s (1 year), noting that infrequently accessed objects may - // be - // evicted from the cache before the defined TTL. - DefaultTtl int64 `json:"defaultTtl,omitempty"` - // MaxTtl: Specifies the maximum allowed TTL for cached content served by - // this - // origin. - // Cache directives that attempt to set a max-age or s-maxage higher than - // this, or an Expires header more than maxTTL seconds in the future will - // be capped at the value of maxTTL, as if it were the value of an - // s-maxage Cache-Control directive. - // Headers sent to the client will not be modified. - // Setting a TTL of "0" means "always revalidate". - // The maximum allowed value is 31,622,400s (1 year), noting that - // infrequently accessed objects may be evicted from the cache before - // the defined TTL. - MaxTtl int64 `json:"maxTtl,omitempty"` - // NegativeCaching: Negative caching allows per-status code TTLs to be set, in - // order - // to apply fine-grained caching for common errors or redirects. - // This can reduce the load on your origin and improve end-user - // experience by reducing response latency. - // When the cache mode is set to CACHE_ALL_STATIC or - // USE_ORIGIN_HEADERS, - // negative caching applies to responses with the specified response code - // that lack any Cache-Control, Expires, or Pragma: no-cache directives. - // When the cache mode is set to FORCE_CACHE_ALL, negative caching applies - // to all responses with the specified response code, and override any - // caching headers. - // By default, Cloud CDN will apply the following default TTLs to these - // status codes: - // HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m - // HTTP 404 (Not Found), 410 (Gone), - // 451 (Unavailable For Legal Reasons): 120s - // HTTP 405 (Method Not Found), 501 (Not Implemented): 60s. - // These defaults can be overridden in negative_caching_policy. - NegativeCaching bool `json:"negativeCaching,omitempty"` - // NegativeCachingPolicy: Sets a cache TTL for the specified HTTP status - // code. - // negative_caching must be enabled to configure - // negative_caching_policy. - // Omitting the policy and leaving negative_caching enabled will use - // Cloud CDN's default cache TTLs. - // Note that when specifying an explicit negative_caching_policy, you - // should take care to specify a cache TTL for all response codes - // that you wish to cache. Cloud CDN will not apply any default - // negative caching when a policy exists. - NegativeCachingPolicy []*BackendBucketCdnPolicyNegativeCachingPolicy `json:"negativeCachingPolicy,omitempty"` - // RequestCoalescing: If true then Cloud CDN will combine multiple concurrent - // cache fill - // requests into a small number of requests to the origin. - RequestCoalescing bool `json:"requestCoalescing,omitempty"` - // ServeWhileStale: Serve existing content from the cache (if available) when - // revalidating - // content with the origin, or when an error is encountered when refreshing - // the cache. - // This setting defines the default "max-stale" duration for any - // cached - // responses that do not specify a max-stale directive. Stale responses - // that - // exceed the TTL configured here will not be served. The default - // limit - // (max-stale) is 86400s (1 day), which will allow stale content to be - // served up to this limit beyond the max-age (or s-maxage) of a - // cached - // response. - // The maximum allowed value is 604800 (1 week). - // Set this to zero (0) to disable serve-while-stale. - ServeWhileStale int64 `json:"serveWhileStale,omitempty"` - // SignedUrlCacheMaxAgeSec: Maximum number of seconds the response to a signed - // URL request will be - // considered fresh. After this time period, the response will be - // revalidated before being served. Defaults to 1hr (3600s). When - // serving - // responses to signed URL requests, Cloud CDN will internally behave as - // though all responses from this backend had a "Cache-Control: - // public, max-age=[TTL]" header, regardless of any existing - // Cache-Control header. The actual headers served in responses will not - // be - // altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - // SignedUrlKeyNames: [Output Only] Names of the keys for signing request URLs. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BypassCacheOnRequestHeaders") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BypassCacheOnRequestHeaders") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyBypassCacheOnRequestHeader: Bypass the cache when the -// specified request headers are present, -// e.g. Pragma or Authorization headers. Values are case insensitive. -// The presence of such a header overrides the cache_mode setting. -type BackendBucketCdnPolicyBypassCacheOnRequestHeader struct { - // HeaderName: The header field name to match on when bypassing cache. - // Values are case-insensitive. - HeaderName string `json:"headerName,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyBypassCacheOnRequestHeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyBypassCacheOnRequestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyCacheKeyPolicy: Message containing what to include in -// the cache key for a request for -// Cloud CDN. -type BackendBucketCdnPolicyCacheKeyPolicy struct { - // IncludeHttpHeaders: Allows HTTP request headers (by name) to be used in the - // cache key. - IncludeHttpHeaders []string `json:"includeHttpHeaders,omitempty"` - // QueryStringWhitelist: Names of query string parameters to include in cache - // keys. Default - // parameters are always included. '&' and '=' will be percent encoded - // and not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludeHttpHeaders") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludeHttpHeaders") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyCacheKeyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyCacheKeyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyNegativeCachingPolicy: Specify CDN TTLs for response -// error codes. -type BackendBucketCdnPolicyNegativeCachingPolicy struct { - // Code: The HTTP status code to define a TTL against. Only HTTP status - // codes - // 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be - // specified as values, and you cannot specify a status code more than - // once. - Code int64 `json:"code,omitempty"` - // Ttl: The TTL (in seconds) for which to cache responses with - // the - // corresponding status code. - // The maximum allowed value is 1800s (30 minutes), noting that - // infrequently accessed objects may be evicted from the cache before - // the - // defined TTL. - Ttl int64 `json:"ttl,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyNegativeCachingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyNegativeCachingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketList: Contains a list of BackendBucket resources. -type BackendBucketList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketListWarning: [Output Only] Informational warning message. -type BackendBucketListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListUsable struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#usableBackendBucketList - // for lists of usable backend - // buckets. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketListUsableWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsable) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketListUsableWarning: [Output Only] Informational warning message. -type BackendBucketListUsableWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketListUsableWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsableWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsableWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListUsableWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsableWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsableWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketParams: Additional Backend Bucket parameters. -type BackendBucketParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketParams) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketUsedBy struct { - // Reference: [Output Only] Server-defined URL for UrlMaps referencing - // that - // BackendBucket. - Reference string `json:"reference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketsScopedList struct { - // BackendBuckets: A list of BackendBuckets contained in this scope. - BackendBuckets []*BackendBucket `json:"backendBuckets,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *BackendBucketsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendBuckets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendBuckets") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketsScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type BackendBucketsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendCustomMetric: Custom Metrics are used for CUSTOM_METRICS -// balancing_mode. -type BackendCustomMetric struct { - // DryRun: If true, the metric data is collected and reported to - // Cloud - // Monitoring, but is not used for load balancing. - DryRun bool `json:"dryRun,omitempty"` - // MaxUtilization: Optional parameter to define a target utilization for the - // Custom Metrics - // balancing mode. The valid range is [0.0, 1.0]. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-64 - // characters - // long and match the regular expression - // `[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the - // first character must be a lowercase letter, and all following - // characters must be a dash, period, underscore, lowercase letter, or - // digit, except the last character, which cannot be a dash, period, - // or - // underscore. For usage guidelines, see Custom Metrics balancing mode. - // This - // field can only be used for a global or regional backend service with - // the - // loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED - // INTERNAL_SELF_MANAGED. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DryRun") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendCustomMetric) MarshalJSON() ([]byte, error) { - type NoMethod BackendCustomMetric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendCustomMetric) UnmarshalJSON(data []byte) error { - type NoMethod BackendCustomMetric - var s1 struct { - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendService: Represents a Backend Service resource. -// -// A backend service defines how Google Cloud load balancers distribute -// traffic. -// The backend service configuration contains a set of values, such as -// the -// protocol used to connect to backends, various distribution and -// session -// settings, health checks, and timeouts. These settings provide -// fine-grained -// control over how your load balancer behaves. Most of the settings -// have -// default values that allow for easy configuration if you need to get -// started -// quickly. -// -// Backend services in Google Compute Engine can be either regionally -// or -// globally scoped. -// -// * Global -// (https://cloud.google.com/compute/docs/reference/rest/alpha/backendServices) -// * Regional -// (https://cloud.google.com/compute/docs/reference/rest/alpha/regionBackendServices) -// -// For more information, seeBackend -// Services. -type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds. This setting is - // applicable to Application - // Load Balancers and Traffic Director and requires - // GENERATED_COOKIE or HTTP_COOKIE session affinity. - // - // If set to 0, the cookie is non-persistent and lasts only until - // the end of the browser session (or equivalent). The maximum allowed value - // is two weeks (1,209,600). - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - // AllowMultinetwork: A boolean flag enabling multi-network mesh. This field is - // only allowed with - // load balancing scheme set to INTERNAL_SELF_MANAGED. - AllowMultinetwork bool `json:"allowMultinetwork,omitempty"` - // Backends: The list of backends that serve this BackendService. - Backends []*Backend `json:"backends,omitempty"` - // CdnPolicy: Cloud CDN configuration for this BackendService. Only available - // for - // specified load balancer types. - CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` - CircuitBreakers *CircuitBreakers `json:"circuitBreakers,omitempty"` - // CompressionMode: Compress text responses using Brotli or gzip compression, - // based on - // the client's Accept-Encoding header. - // - // Possible values: - // "AUTOMATIC" - Automatically uses the best compression based on the - // Accept-Encoding - // header sent by the client. - // "DISABLED" - Disables compression. Existing compressed responses cached - // by - // Cloud CDN will not be served to clients. - CompressionMode string `json:"compressionMode,omitempty"` - // ConnectionDraining: connectionDraining cannot be specified with haPolicy. - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` - // ConnectionTrackingPolicy: Connection Tracking configuration for this - // BackendService. Connection - // tracking policy settings are only available for external passthrough - // Network Load Balancers and internal passthrough Network Load - // Balancers. - // - // connectionTrackingPolicy cannot be specified with haPolicy. - ConnectionTrackingPolicy *BackendServiceConnectionTrackingPolicy `json:"connectionTrackingPolicy,omitempty"` - // ConsistentHash: Consistent Hash-based load balancing can be used to provide - // soft session - // affinity based on HTTP headers, cookies or other properties. This - // load - // balancing policy is applicable only for HTTP connections. The affinity to - // a - // particular destination host will be lost when one or more hosts - // are - // added/removed from the destination service. This field specifies - // parameters - // that control consistent hashing. This field is only applicable - // whenlocalityLbPolicy is set to MAGLEV orRING_HASH. - // - // This field is applicable to either: - // - // - A regional backend service with the service_protocol set to HTTP, - // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - // INTERNAL_MANAGED. - // - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. - ConsistentHash *ConsistentHashLoadBalancerSettings `json:"consistentHash,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomMetrics: List of custom metrics that are used for - // theWEIGHTED_ROUND_ROBIN locality_lb_policy. - CustomMetrics []*BackendServiceCustomMetric `json:"customMetrics,omitempty"` - // CustomRequestHeaders: Headers that the load balancer adds to proxied - // requests. See Creating - // custom - // headers (https://cloud.google.com/load-balancing/docs/custom-headers). - CustomRequestHeaders []string `json:"customRequestHeaders,omitempty"` - // CustomResponseHeaders: Headers that the load balancer adds to proxied - // responses. See Creating - // custom - // headers (https://cloud.google.com/load-balancing/docs/custom-headers). - CustomResponseHeaders []string `json:"customResponseHeaders,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DynamicForwarding: Dynamic forwarding configuration. This field is used to - // configure the - // backend service with dynamic forwarding feature which together with - // Service - // Extension allows customized and complex routing logic. - DynamicForwarding *BackendServiceDynamicForwarding `json:"dynamicForwarding,omitempty"` - // EdgeSecurityPolicy: [Output Only] The resource URL for the edge security - // policy associated with - // this backend service. - EdgeSecurityPolicy string `json:"edgeSecurityPolicy,omitempty"` - // EnableCDN: If true, enables Cloud CDN for the backend service of a - // global external Application Load Balancer. - EnableCDN bool `json:"enableCDN,omitempty"` - // ExternalManagedMigrationState: Specifies the canary migration state. - // Possible values are PREPARE, - // TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. - // - // To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must - // be - // changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before - // the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate traffic by percentage - // using - // externalManagedMigrationTestingPercentage. - // - // Rolling back a migration requires the states to be set in reverse order. - // So - // changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state - // to - // be set to TEST_ALL_TRAFFIC at the same time. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate some traffic back - // to - // EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. - // - // Possible values: - // "PREPARE" - // "TEST_ALL_TRAFFIC" - // "TEST_BY_PERCENTAGE" - ExternalManagedMigrationState string `json:"externalManagedMigrationState,omitempty"` - // ExternalManagedMigrationTestingPercentage: Determines the fraction of - // requests that should be processed by the Global - // external Application Load Balancer. - // - // The value of this field must be in the range [0, 100]. - // - // Session affinity options will slightly affect this routing behavior, - // for - // more details, see:Session - // Affinity. - // - // This value can only be set if the loadBalancingScheme in the - // BackendService - // is set to EXTERNAL (when using the classic Application Load Balancer) - // and - // the migration state is TEST_BY_PERCENTAGE. - ExternalManagedMigrationTestingPercentage float64 `json:"externalManagedMigrationTestingPercentage,omitempty"` - // FailoverPolicy: Requires at least one backend instance group to be - // defined - // as a backup (failover) backend. - // For load balancers that have configurable failover: - // Internal passthrough Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external passthrough Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - // - // failoverPolicy cannot be specified with haPolicy. - FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a BackendService. An up-to-date fingerprint must be provided - // in - // order to update the BackendService, otherwise the request will - // fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a BackendService. - Fingerprint string `json:"fingerprint,omitempty"` - // HaPolicy: Configures self-managed High Availability (HA) for External and - // Internal - // Protocol Forwarding. - // - // The backends of this regional backend service must only specify - // zonal - // network endpoint groups (NEGs) of type GCE_VM_IP. - // - // When haPolicy is set for an Internal Passthrough Network Load Balancer, - // the - // regional backend service must set the network field. All zonal NEGs - // must - // belong to the same network. However, individual NEGs can - // belong to different subnetworks of that network. - // - // When haPolicy is specified, the set of attached network endpoints across - // all backends comprise an High Availability domain from which one endpoint - // is selected as the active endpoint (the leader) that receives - // all - // traffic. - // - // haPolicy can be added only at backend service creation time. Once set up, - // it cannot be deleted. - // - // Note that haPolicy is not for load balancing, and therefore cannot - // be - // specified with sessionAffinity, connectionTrackingPolicy, - // and - // failoverPolicy. - // - // haPolicy requires customers to be responsible for tracking backend - // endpoint health and electing a leader among the healthy - // endpoints. - // Therefore, haPolicy cannot be specified with healthChecks. - // - // haPolicy can only be specified for External Passthrough Network - // Load - // Balancers and Internal Passthrough Network Load Balancers. - HaPolicy *BackendServiceHAPolicy `json:"haPolicy,omitempty"` - // HealthChecks: The list of URLs to the healthChecks, httpHealthChecks - // (legacy), or - // httpsHealthChecks (legacy) resource for health checking this - // backend - // service. Not all backend services support legacy health checks. See - // Load balancer guide. Currently, at most one health check can be - // specified for each backend service. Backend services with - // instance group or zonal NEG backends must have a health check - // unless - // haPolicy is specified. Backend services with internet or serverless - // NEG - // backends must not have a health check. - // - // healthChecks[] cannot be specified with haPolicy. - HealthChecks []string `json:"healthChecks,omitempty"` - // Iap: The configurations for Identity-Aware Proxy on this resource. - // Not available for internal passthrough Network Load Balancers and - // external - // passthrough Network Load Balancers. - Iap *BackendServiceIAP `json:"iap,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpAddressSelectionPolicy: Specifies a preference for traffic sent from the - // proxy to the backend (or - // from the client to the backend for proxyless gRPC). - // The possible values are: - // - // - IPV4_ONLY: Only send IPv4 traffic to the backends of the - // backend service (Instance Group, Managed Instance Group, Network - // Endpoint - // Group), regardless of traffic from the client to the proxy. Only IPv4 - // health checks are used to check the health of the backends. This is the - // default setting. - // - PREFER_IPV6: Prioritize the connection to the endpoint's - // IPv6 address over its IPv4 address (provided there is a healthy IPv6 - // address). - // - IPV6_ONLY: Only send IPv6 traffic to the backends of the - // backend service (Instance Group, Managed Instance Group, Network - // Endpoint - // Group), regardless of traffic from the client to the proxy. Only IPv6 - // health checks are used to check the health of the backends. - // - // - // - // This field is applicable to either: - // - // - Advanced global external Application Load Balancer (load balancing - // scheme EXTERNAL_MANAGED), - // - Regional external Application Load - // Balancer, - // - Internal proxy Network Load Balancer (load balancing - // scheme INTERNAL_MANAGED), - // - Regional internal Application Load - // Balancer (load balancing scheme INTERNAL_MANAGED), - // - Traffic - // Director with Envoy proxies and proxyless gRPC (load balancing scheme - // INTERNAL_SELF_MANAGED). - // - // Possible values: - // "IPV4_ONLY" - Only send IPv4 traffic to the backends of the Backend - // Service - // (Instance Group, Managed Instance Group, Network Endpoint Group) - // regardless of traffic from the client to the proxy. - // Only IPv4 health-checks are used to check the health of the backends. - // This is the default setting. - // "IPV6_ONLY" - Only send IPv6 traffic to the backends of the Backend - // Service - // (Instance Group, Managed Instance Group, Network Endpoint Group) - // regardless of traffic from the client to the proxy. Only IPv6 - // health-checks are used to check the health of the backends. - // "IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED" - Unspecified IP address - // selection policy. - // "PREFER_IPV6" - Prioritize the connection to the endpoints IPv6 - // address - // over its IPv4 address (provided there is a healthy IPv6 address). - IpAddressSelectionPolicy string `json:"ipAddressSelectionPolicy,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#backendService - // for backend services. - Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: Specifies the load balancer type. A backend - // service - // created for one type of load balancer cannot be used with another. - // For more information, refer toChoosing - // a load balancer. - // - // Possible values: - // "EXTERNAL" - Signifies that this will be used for classic Application Load - // Balancers, - // global external proxy Network Load Balancers, - // or external passthrough Network Load Balancers. - // "EXTERNAL_MANAGED" - Signifies that this will be used for global external - // Application Load - // Balancers, regional external Application Load Balancers, or - // regional - // external proxy Network Load Balancers. - // "EXTERNAL_PASSTHROUGH" - Signifies that this will be used for global - // external passthrough Network - // Load Balancers. - // "INTERNAL" - Signifies that this will be used for internal passthrough - // Network Load - // Balancers. - // "INTERNAL_MANAGED" - Signifies that this will be used for internal - // Application Load Balancers. - // "INTERNAL_SELF_MANAGED" - Signifies that this will be used by Traffic - // Director. - // "INVALID_LOAD_BALANCING_SCHEME" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // LocalityLbPolicies: A list of locality load-balancing policies to be used in - // order of - // preference. When you use localityLbPolicies, you must set at least one - // value for either the localityLbPolicies[].policy or - // the - // localityLbPolicies[].customPolicy field. localityLbPolicies overrides - // any - // value set in the localityLbPolicy field. - // - // For an example of how to use this field, seeDefine - // a list of preferred policies. - // - // Caution: This field and its children are intended for use in a service - // mesh - // that includes gRPC clients only. Envoy proxies can't use backend - // services - // that have this configuration. - LocalityLbPolicies []*BackendServiceLocalityLoadBalancingPolicyConfig `json:"localityLbPolicies,omitempty"` - // LocalityLbPolicy: The load balancing algorithm used within the scope of the - // locality. The - // possible values are: - // - // - ROUND_ROBIN: This is a simple policy in which each healthy - // backend is selected in round robin order. This is the default. - // - LEAST_REQUEST: An O(1) algorithm which - // selects two random healthy hosts and picks the host which has fewer - // active - // requests. - // - RING_HASH: The ring/modulo hash load balancer implements - // consistent hashing to backends. The algorithm has the property that the - // addition/removal of a host from a set of N hosts only affects 1/N of the - // requests. - // - RANDOM: The load balancer selects a random healthy - // host. - // - ORIGINAL_DESTINATION: Backend host is selected - // based on the client connection metadata, i.e., connections are opened to - // the same address as the destination address of the incoming connection - // before the connection was redirected to the load balancer. - // - MAGLEV: used as a drop in replacement for the ring hash - // load balancer. Maglev is not as stable as ring hash but has faster table - // lookup build times and host selection times. For more information about - // Maglev, see Maglev: - // A Fast and Reliable Software Network Load Balancer. - // - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin - // Load Balancing using weights computed from Backend reported Custom - // Metrics. - // If set, the Backend Service responses are expected to contain - // non-standard - // HTTP response header field Endpoint-Load-Metrics. The reported - // metrics to use for computing the weights are specified via - // thecustomMetrics field. - // - // This field is applicable to either: - // - A regional backend service with the service_protocol set to HTTP, - // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - // INTERNAL_MANAGED. - // - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, - // or - // EXTERNAL_MANAGED. - // - // - // If sessionAffinity is not configured—that is, if session - // affinity remains at the default value of NONE—then the - // default value for localityLbPolicy - // is ROUND_ROBIN. If session affinity is set to a value other - // than NONE, - // then the default value for localityLbPolicy isMAGLEV. - // - // Only ROUND_ROBIN and RING_HASH are supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // localityLbPolicy cannot be specified with haPolicy. - // - // Possible values: - // "INVALID_LB_POLICY" - // "LEAST_REQUEST" - An O(1) algorithm which selects two random healthy hosts - // and - // picks the host which has fewer active requests. - // "MAGLEV" - This algorithm implements consistent hashing to backends. - // Maglev can be - // used as a drop in replacement for the ring hash load balancer. Maglev is - // not as stable as ring hash but has faster table lookup build times and - // host selection times. For more information about Maglev, seeMaglev: - // A Fast and Reliable Software Network Load Balancer. - // "ORIGINAL_DESTINATION" - Backend host is selected based on the client - // connection metadata, i.e., - // connections are opened to the same address as the destination address of - // the incoming connection before the connection was redirected to the - // load - // balancer. - // "RANDOM" - The load balancer selects a random healthy host. - // "RING_HASH" - The ring/modulo hash load balancer implements consistent - // hashing to - // backends. The algorithm has the property that the addition/removal - // of a host from a set of N hosts only affects 1/N of the requests. - // "ROUND_ROBIN" - This is a simple policy in which each healthy backend is - // selected - // in round robin order. This is the default. - // "WEIGHTED_GCP_RENDEZVOUS" - Per-instance weighted Load Balancing via - // health check reported weights. - // In internal passthrough network load balancing, it is weighted - // rendezvous hashing. - // This option is only supported in internal passthrough network - // load - // balancing. - // "WEIGHTED_MAGLEV" - Per-instance weighted Load Balancing via health check - // reported weights. - // If set, the Backend Service must configure a non legacy HTTP-based - // Health - // Check, and health check replies are expected to contain non-standard - // HTTP - // response header field X-Load-Balancing-Endpoint-Weight to specify - // the - // per-instance weights. - // If set, Load Balancing is weighted based on the - // per-instance weights reported in the last processed health check replies, - // as long as every instance either reported a valid weight or - // had - // UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. - // This option is only supported in Network Load Balancing. - // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing - // using weights computed - // from Backend reported Custom Metrics. If set, the Backend Service - // responses are expected to contain non-standard HTTP response header - // field - // Endpoint-Load-Metrics. The reported metrics - // to use for computing the weights are specified via the - // customMetrics fields. - LocalityLbPolicy string `json:"localityLbPolicy,omitempty"` - // LogConfig: This field denotes the logging options for the load balancer - // traffic served - // by this backend service. If logging is enabled, logs will be exported - // to - // Stackdriver. - LogConfig *BackendServiceLogConfig `json:"logConfig,omitempty"` - // MaxStreamDuration: Specifies the default maximum duration (timeout) for - // streams to this - // service. Duration is computed from the beginning of the stream until - // the - // response has been completely processed, including all retries. A stream - // that does not complete in this duration is closed. - // - // If not specified, there will be no timeout limit, i.e. the maximum - // duration is infinite. - // - // This value can be overridden in the PathMatcher configuration of the - // UrlMap that references this backend service. - // - // This field is only allowed when the loadBalancingScheme of - // the backend service is INTERNAL_SELF_MANAGED. - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` - // Metadatas: Deployment metadata associated with the resource to be set by a - // GKE hub - // controller and read by the backend RCTH - Metadatas map[string]string `json:"metadatas,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which this backend service belongs. - // - // This field must be set for Internal Passthrough Network Load Balancers - // when - // the haPolicy is enabled, and for External Passthrough Network Load - // Balancers when the haPolicy fastIpMove is enabled. - // - // This field can only be specified when the load balancing scheme is set - // toINTERNAL, or when the load balancing scheme is set toEXTERNAL and haPolicy - // fastIpMove is enabled. - Network string `json:"network,omitempty"` - // NetworkPassThroughLbTrafficPolicy: Configures traffic steering properties of - // internal passthrough Network - // Load Balancers. - // - // networkPassThroughLbTrafficPolicy cannot be specified with haPolicy. - NetworkPassThroughLbTrafficPolicy *BackendServiceNetworkPassThroughLbTrafficPolicy `json:"networkPassThroughLbTrafficPolicy,omitempty"` - // OutlierDetection: Settings controlling the ejection of unhealthy backend - // endpoints from the - // load balancing pool of each individual proxy instance that processes - // the - // traffic for the given backend service. If not set, this feature - // is - // considered disabled. - // - // Results of the outlier detection algorithm (ejection of endpoints from - // the - // load balancing pool and returning them back to the pool) are - // executed - // independently by each proxy instance of the load balancer. In most - // cases, - // more than one proxy instance handles the traffic received by a - // backend - // service. Thus, it is possible that an unhealthy endpoint is detected - // and - // ejected by only some of the proxies, and while this happens, other - // proxies - // may continue to send requests to the same unhealthy endpoint until - // they - // detect and eject the unhealthy endpoint. - // - // Applicable backend endpoints can be: - // - // - VM instances in an Instance Group - // - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - // - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - // - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud - // Functions Services - // - Private Service Connect NEGs, that resolve to - // Google-managed regional API endpoints or managed services published - // using - // Private Service Connect - // - // - // - // Applicable backend service types can be: - // - // - A global backend service with the loadBalancingScheme set to - // INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - // - A regional backend - // service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and - // loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not - // supported for Serverless NEGs. - // - // - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *BackendServiceParams `json:"params,omitempty"` - // Port: Deprecated in favor of portName. The TCP port to connect on - // the backend. The default value is 80. - // For internal passthrough Network Load Balancers and external - // passthrough - // Network Load Balancers, omit port. - Port int64 `json:"port,omitempty"` - // PortName: A named port on a backend instance group representing the port - // for - // communication to the backend VMs in that group. The - // named port must be defined on each backend instance - // group - // (https://cloud.google.com/load-balancing/docs/backend-service#named_ports). - // This parameter has no meaning if the backends are NEGs. For - // internal - // passthrough Network Load Balancers and external passthrough Network - // Load - // Balancers, omit port_name. - PortName string `json:"portName,omitempty"` - // Protocol: The protocol this BackendService uses to communicate - // with backends. - // - // Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or - // GRPC. - // depending on the chosen load balancer or Traffic Director - // configuration. - // Refer to the documentation for the load balancers or for Traffic - // Director - // for more information. - // - // Must be set to GRPC when the backend service is referenced by a URL map - // that is bound to target gRPC proxy. - // - // Possible values: - // "ALL" - ALL includes TCP, UDP, ICMP, ESP, AH and SCTP. Note that - // this - // should never be used together with target_xx_proxies. - // "GRPC" - gRPC (available for Traffic Director). - // "H2C" - HTTP2 over cleartext - // "HTTP" - // "HTTP2" - HTTP/2 with SSL. - // "HTTPS" - // "SSL" - TCP proxying with SSL. - // "TCP" - TCP proxying or TCP pass-through. - // "UDP" - UDP. - // "UNSPECIFIED" - If a Backend Service has UNSPECIFIED as its protocol, it - // can be used with - // any L3/L4 Forwarding Rules. - Protocol string `json:"protocol,omitempty"` - // Region: [Output Only] URL of the region where the regional backend - // service - // resides. This field is not applicable to global backend services. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // backend service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SecuritySettings: This field specifies the security settings that apply to - // this backend - // service. This field is applicable to a global backend service with - // the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. - SecuritySettings *SecuritySettings `json:"securitySettings,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceBindings: URLs of networkservices.ServiceBinding resources. - // - // Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. - // If set, lists of backends and health checks must be both empty. - ServiceBindings []string `json:"serviceBindings,omitempty"` - // ServiceLbPolicy: URL to networkservices.ServiceLbPolicy resource. - // - // Can only be set if load balancing scheme is - // EXTERNAL_MANAGED, - // INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global. - ServiceLbPolicy string `json:"serviceLbPolicy,omitempty"` - // SessionAffinity: Type of session affinity to use. The default is NONE. - // - // Only NONE and HEADER_FIELD are supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // For more details, see: - // Session - // Affinity - // (https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). - // - // sessionAffinity cannot be specified with haPolicy. - // - // Possible values: - // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP - // addresses. Connections - // from the same source IP address to the same destination IP address will - // be - // served by the same backend VM while that VM remains healthy. - // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source IP - // address. Connections from the - // same source IP address will be served by the same backend VM while that - // VM - // remains healthy. This option can only be used for Internal TCP/UDP - // Load Balancing. - // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and destination - // IP addresses, IP protocol, - // and source and destination ports. Connections for the same IP protocol - // from the same source IP address and port to the same destination IP - // address - // and port will be served by the same backend VM while that VM - // remains - // healthy. This option cannot be used for HTTP(S) load balancing. - // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination IP - // addresses, and IP - // protocol. Connections for the same IP protocol from the same source - // IP - // address to the same destination IP address will be served by the - // same - // backend VM while that VM remains healthy. This option cannot be used - // for - // HTTP(S) load balancing. - // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 - // loadbalancer. - // Only valid for HTTP(S) load balancing. - // "HEADER_FIELD" - The hash is based on a user specified header field. - // "HTTP_COOKIE" - The hash is based on a user provided cookie. - // "NONE" - No session affinity. Connections from the same client IP may - // go - // to any instance in the pool. - // "STRONG_COOKIE_AFFINITY" - Strong cookie-based affinity. Connections - // bearing the same cookie will be - // served by the same backend VM while that VM remains healthy, as long as - // the - // cookie has not expired. - SessionAffinity string `json:"sessionAffinity,omitempty"` - // StrongSessionAffinityCookie: Describes the HTTP cookie used for stateful - // session affinity. This field is - // applicable and required if the sessionAffinity is set - // toSTRONG_COOKIE_AFFINITY. - StrongSessionAffinityCookie *BackendServiceHttpCookie `json:"strongSessionAffinityCookie,omitempty"` - // Subsetting: subsetting cannot be specified with haPolicy. - Subsetting *Subsetting `json:"subsetting,omitempty"` - // TimeoutSec: The backend service timeout has a different meaning depending on - // the - // type of load balancer. For more information see, - // Backend service settings. - // The default is 30 seconds. - // The full range of timeout values allowed goes from 1 - // through 2,147,483,647 seconds. - // - // This value can be overridden in the PathMatcher configuration of the - // UrlMap that references this backend service. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to - // true. - // Instead, use maxStreamDuration. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // TlsSettings: Configuration for Backend Authenticated TLS and mTLS. May only - // be specified - // when the backend protocol is SSL, HTTPS or HTTP2. - TlsSettings *BackendServiceTlsSettings `json:"tlsSettings,omitempty"` - // UsedBy: [Output Only] List of resources referencing given backend service. - UsedBy []*BackendServiceUsedBy `json:"usedBy,omitempty"` - // VpcNetworkScope: The network scope of the backends that can be added to the - // backend - // service. This field can be either GLOBAL_VPC_NETWORK - // orREGIONAL_VPC_NETWORK. - // - // A backend service with the VPC scope set to GLOBAL_VPC_NETWORK - // is only allowed to have backends in global VPC networks. - // - // When the VPC scope is set to REGIONAL_VPC_NETWORK the backend - // service is only allowed to have backends in regional networks in the - // same - // scope as the backend service. - // Note: if not specified then GLOBAL_VPC_NETWORK will be used. - // - // Possible values: - // "GLOBAL_VPC_NETWORK" - The backend service can only have backends in - // global VPCs - // "REGIONAL_VPC_NETWORK" - The backend service can only have backends in - // regional VPCs - VpcNetworkScope string `json:"vpcNetworkScope,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AffinityCookieTtlSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendService) MarshalJSON() ([]byte, error) { - type NoMethod BackendService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendService) UnmarshalJSON(data []byte) error { - type NoMethod BackendService - var s1 struct { - ExternalManagedMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedMigrationTestingPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExternalManagedMigrationTestingPercentage = float64(s1.ExternalManagedMigrationTestingPercentage) - return nil -} - -// BackendServiceAggregatedList: Contains a list of BackendServicesScopedList. -type BackendServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendServicesScopedList resources. - Items map[string]BackendServicesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceAggregatedListWarning: [Output Only] Informational warning -// message. -type BackendServiceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicy: Message containing Cloud CDN configuration for a -// backend service. -type BackendServiceCdnPolicy struct { - // BypassCacheOnRequestHeaders: Bypass the cache when the specified request - // headers are matched - e.g. - // Pragma or Authorization headers. Up to 5 headers can be specified. - // The cache is bypassed for all cdnPolicy.cacheMode settings. - BypassCacheOnRequestHeaders []*BackendServiceCdnPolicyBypassCacheOnRequestHeader `json:"bypassCacheOnRequestHeaders,omitempty"` - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - // CacheMode: Specifies the cache setting for all responses from this - // backend. - // The possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid - // caching - // headers to cache content. Responses without these headers will not be - // cached at Google's edge, and will require a full trip to the origin on - // every request, potentially impacting performance and increasing load on - // the origin server.FORCE_CACHE_ALL Cache all content, ignoring any - // "private", - // "no-store" or "no-cache" directives in Cache-Control response - // headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache - // static content, - // including common image formats, media (video and audio), and web - // assets - // (JavaScript and CSS). Requests and responses that are marked as - // uncacheable, as well as dynamic content (including HTML), will not - // be - // cached. - // - // If no value is provided for cdnPolicy.cacheMode, it defaults - // to CACHE_ALL_STATIC. - // - // Possible values: - // "CACHE_ALL_STATIC" - Automatically cache static content, including common - // image formats, - // media (video and audio), and web assets (JavaScript and CSS). - // Requests and responses that are marked as uncacheable, as well as - // dynamic content (including HTML), will not be cached. - // "FORCE_CACHE_ALL" - Cache all content, ignoring any "private", "no-store" - // or "no-cache" - // directives in Cache-Control response headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content. - // "INVALID_CACHE_MODE" - // "USE_ORIGIN_HEADERS" - Requires the origin to set valid caching headers to - // cache content. - // Responses without these headers will not be cached at Google's edge, - // and will require a full trip to the origin on every request, - // potentially impacting performance and increasing load on the - // origin server. - CacheMode string `json:"cacheMode,omitempty"` - // ClientTtl: Specifies a separate client (e.g. browser client) maximum TTL. - // This is - // used to clamp the max-age (or Expires) value sent to the client. - // With - // FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for - // the - // response max-age directive, along with a "public" directive. For - // cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the - // max-age - // from the origin (if specified), or else sets the response max-age - // directive to the lesser of the client_ttl and default_ttl, and also - // ensures a "public" cache-control directive is present. - // If a client TTL is not specified, a default value (1 hour) will be used. - // The maximum allowed value is 31,622,400s (1 year). - ClientTtl int64 `json:"clientTtl,omitempty"` - // DefaultTtl: Specifies the default TTL for cached content served by this - // origin for - // responses that do not have an existing valid TTL (max-age or - // s-maxage). - // Setting a TTL of "0" means "always revalidate". - // The value of defaultTTL cannot be set to a value greater than that - // of - // maxTTL, but can be equal. - // When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL - // will overwrite the TTL set in all responses. The maximum allowed value - // is - // 31,622,400s (1 year), noting that infrequently accessed objects may - // be - // evicted from the cache before the defined TTL. - DefaultTtl int64 `json:"defaultTtl,omitempty"` - // MaxTtl: Specifies the maximum allowed TTL for cached content served by - // this - // origin. - // Cache directives that attempt to set a max-age or s-maxage higher than - // this, or an Expires header more than maxTTL seconds in the future will - // be capped at the value of maxTTL, as if it were the value of an - // s-maxage Cache-Control directive. - // Headers sent to the client will not be modified. - // Setting a TTL of "0" means "always revalidate". - // The maximum allowed value is 31,622,400s (1 year), noting that - // infrequently accessed objects may be evicted from the cache before - // the defined TTL. - MaxTtl int64 `json:"maxTtl,omitempty"` - // NegativeCaching: Negative caching allows per-status code TTLs to be set, in - // order - // to apply fine-grained caching for common errors or redirects. - // This can reduce the load on your origin and improve end-user - // experience by reducing response latency. - // When the cache mode is set to CACHE_ALL_STATIC or - // USE_ORIGIN_HEADERS, - // negative caching applies to responses with the specified response code - // that lack any Cache-Control, Expires, or Pragma: no-cache directives. - // When the cache mode is set to FORCE_CACHE_ALL, negative caching applies - // to all responses with the specified response code, and override any - // caching headers. - // By default, Cloud CDN will apply the following default TTLs to these - // status codes: - // HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m - // HTTP 404 (Not Found), 410 (Gone), - // 451 (Unavailable For Legal Reasons): 120s - // HTTP 405 (Method Not Found), 501 (Not Implemented): 60s. - // These defaults can be overridden in negative_caching_policy. - NegativeCaching bool `json:"negativeCaching,omitempty"` - // NegativeCachingPolicy: Sets a cache TTL for the specified HTTP status - // code. - // negative_caching must be enabled to configure - // negative_caching_policy. - // Omitting the policy and leaving negative_caching enabled will use - // Cloud CDN's default cache TTLs. - // Note that when specifying an explicit negative_caching_policy, you - // should take care to specify a cache TTL for all response codes - // that you wish to cache. Cloud CDN will not apply any default - // negative caching when a policy exists. - NegativeCachingPolicy []*BackendServiceCdnPolicyNegativeCachingPolicy `json:"negativeCachingPolicy,omitempty"` - // RequestCoalescing: If true then Cloud CDN will combine multiple concurrent - // cache fill - // requests into a small number of requests to the origin. - RequestCoalescing bool `json:"requestCoalescing,omitempty"` - // ServeWhileStale: Serve existing content from the cache (if available) when - // revalidating - // content with the origin, or when an error is encountered when refreshing - // the cache. - // This setting defines the default "max-stale" duration for any - // cached - // responses that do not specify a max-stale directive. Stale responses - // that - // exceed the TTL configured here will not be served. The default - // limit - // (max-stale) is 86400s (1 day), which will allow stale content to be - // served up to this limit beyond the max-age (or s-maxage) of a - // cached - // response. - // The maximum allowed value is 604800 (1 week). - // Set this to zero (0) to disable serve-while-stale. - ServeWhileStale int64 `json:"serveWhileStale,omitempty"` - // SignedUrlCacheMaxAgeSec: Maximum number of seconds the response to a signed - // URL request will be - // considered fresh. After this time period, the response will be - // revalidated before being served. Defaults to 1hr (3600s). When - // serving - // responses to signed URL requests, Cloud CDN will internally behave as - // though all responses from this backend had a "Cache-Control: - // public, max-age=[TTL]" header, regardless of any existing - // Cache-Control header. The actual headers served in responses will not - // be - // altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - // SignedUrlKeyNames: [Output Only] Names of the keys for signing request URLs. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BypassCacheOnRequestHeaders") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BypassCacheOnRequestHeaders") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicyBypassCacheOnRequestHeader: Bypass the cache when the -// specified request headers are present, -// e.g. Pragma or Authorization headers. Values are case insensitive. -// The presence of such a header overrides the cache_mode setting. -type BackendServiceCdnPolicyBypassCacheOnRequestHeader struct { - // HeaderName: The header field name to match on when bypassing cache. - // Values are case-insensitive. - HeaderName string `json:"headerName,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicyBypassCacheOnRequestHeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicyBypassCacheOnRequestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicyNegativeCachingPolicy: Specify CDN TTLs for response -// error codes. -type BackendServiceCdnPolicyNegativeCachingPolicy struct { - // Code: The HTTP status code to define a TTL against. Only HTTP status - // codes - // 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be - // specified as values, and you cannot specify a status code more than - // once. - Code int64 `json:"code,omitempty"` - // Ttl: The TTL (in seconds) for which to cache responses with - // the - // corresponding status code. - // The maximum allowed value is 1800s (30 minutes), noting that - // infrequently accessed objects may be evicted from the cache before - // the - // defined TTL. - Ttl int64 `json:"ttl,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicyNegativeCachingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicyNegativeCachingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceConnectionTrackingPolicy: Connection Tracking configuration -// for this BackendService. -type BackendServiceConnectionTrackingPolicy struct { - // ConnectionPersistenceOnUnhealthyBackends: Specifies connection persistence - // when backends are unhealthy. The default - // value is DEFAULT_FOR_PROTOCOL. - // - // If set to DEFAULT_FOR_PROTOCOL, the existing connections - // persist on unhealthy backends only for connection-oriented protocols - // (TCP and SCTP) and only if the Tracking Mode isPER_CONNECTION (default - // tracking mode) or the Session - // Affinity is configured for 5-tuple. They do not persist forUDP. - // - // If set to NEVER_PERSIST, after a backend becomes unhealthy, - // the existing connections on the unhealthy backend are never persisted on - // the unhealthy backend. They are always diverted to newly selected - // healthy - // backends (unless all backends are unhealthy). - // - // If set to ALWAYS_PERSIST, existing connections always - // persist on unhealthy backends regardless of protocol and session - // affinity. It is generally not recommended to use this mode overriding - // the - // default. - // - // For more details, see Connection Persistence for Network Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#connection-persistence) - // and Connection Persistence for Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal#connection-persistence). - // - // Possible values: - // "ALWAYS_PERSIST" - // "DEFAULT_FOR_PROTOCOL" - // "NEVER_PERSIST" - ConnectionPersistenceOnUnhealthyBackends string `json:"connectionPersistenceOnUnhealthyBackends,omitempty"` - // EnableStrongAffinity: Enable Strong Session Affinity for external - // passthrough Network Load - // Balancers. This option is not available publicly. - EnableStrongAffinity bool `json:"enableStrongAffinity,omitempty"` - // IdleTimeoutSec: Specifies how long to keep a Connection Tracking entry while - // there is no - // matching traffic (in seconds). - // - // For internal passthrough Network Load Balancers: - // - // - The minimum (default) is 10 minutes and the maximum is 16 hours. - // - It can be set only if Connection Tracking is less than 5-tuple - // (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or - // CLIENT_IP_PROTO, and Tracking - // Mode is PER_SESSION). - // - // - // - // For external passthrough Network Load Balancers the default is 60 - // seconds. This option is not available publicly. - IdleTimeoutSec int64 `json:"idleTimeoutSec,omitempty"` - // TrackingMode: Specifies the key used for connection tracking. There are - // two - // options: - // - // - PER_CONNECTION: This is the default mode. The Connection - // Tracking is performed as per the Connection Key (default Hash Method) - // for - // the specific protocol. - // - PER_SESSION: The Connection Tracking is performed as per - // the configured Session Affinity. It matches the configured Session - // Affinity. - // - // - // - // For more details, see Tracking Mode for Network Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#tracking-mode) - // and Tracking Mode for Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal#tracking-mode). - // - // Possible values: - // "INVALID_TRACKING_MODE" - // "PER_CONNECTION" - // "PER_SESSION" - TrackingMode string `json:"trackingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ConnectionPersistenceOnUnhealthyBackends") to unconditionally include in - // API requests. By default, fields with empty or default values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ConnectionPersistenceOnUnhealthyBackends") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted from - // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields - // for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceConnectionTrackingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceConnectionTrackingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCustomMetric: Custom Metrics are used for -// WEIGHTED_ROUND_ROBIN -// locality_lb_policy. -type BackendServiceCustomMetric struct { - // DryRun: If true, the metric data is not used for load balancing. - DryRun bool `json:"dryRun,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-64 - // characters - // long and match the regular expression - // `[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the - // first character must be a lowercase letter, and all following - // characters must be a dash, period, underscore, lowercase letter, or - // digit, except the last character, which cannot be a dash, period, - // or - // underscore. For usage guidelines, see Custom Metrics balancing mode. - // This - // field can only be used for a global or regional backend service with - // the - // loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED - // INTERNAL_SELF_MANAGED. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DryRun") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCustomMetric) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCustomMetric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceDynamicForwarding: Defines a dynamic forwarding configuration -// for the backend service. -type BackendServiceDynamicForwarding struct { - // IpPortSelection: IP:PORT based dynamic forwarding configuration. - IpPortSelection *BackendServiceDynamicForwardingIpPortSelection `json:"ipPortSelection,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpPortSelection") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpPortSelection") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceDynamicForwarding) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceDynamicForwarding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceDynamicForwardingIpPortSelection: Defines a IP:PORT based -// dynamic forwarding configuration for the backend -// service. Some ranges are restricted: Restricted -// ranges. -type BackendServiceDynamicForwardingIpPortSelection struct { - // Enabled: A boolean flag enabling IP:PORT based dynamic forwarding. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceDynamicForwardingIpPortSelection) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceDynamicForwardingIpPortSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceFailoverPolicy: For load balancers that have -// configurable -// failover: -// Internal passthrough Network Load -// Balancers -// (https://cloud.google.com/load-balancing/docs/internal/failover-overview) -// and external passthrough -// Network Load -// Balancers -// (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). -// On failover or failback, this field indicates whether connection -// draining -// will be honored. Google Cloud has a fixed connection draining timeout of -// 10 minutes. A setting of true terminates existing TCP -// connections to the active pool during failover and failback, -// immediately -// draining traffic. A setting of false allows existing TCP -// connections to persist, even on VMs no longer in the active pool, for up -// to the duration of the connection draining timeout (10 minutes). -type BackendServiceFailoverPolicy struct { - // DisableConnectionDrainOnFailover: This can be set to true only if the - // protocol isTCP. - // - // The default is false. - DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"` - // DropTrafficIfUnhealthy: If set to true, connections to the - // load balancer are dropped when all primary and all backup backend VMs - // are - // unhealthy.If set to false, connections are distributed - // among all primary VMs when all primary and all backup backend VMs are - // unhealthy. - // For load balancers that have configurable - // failover: - // Internal passthrough - // Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external passthrough - // Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - // The default is false. - DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"` - // FailoverRatio: The value of the field must be in the range[0, 1]. If the - // value is 0, the load balancer performs a - // failover when the number of healthy primary VMs equals zero. - // For all other values, the load balancer performs a failover when the - // total number of healthy primary VMs is less than this ratio. - // For load balancers that have configurable - // failover: - // Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - FailoverRatio float64 `json:"failoverRatio,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DisableConnectionDrainOnFailover") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DisableConnectionDrainOnFailover") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceFailoverPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceFailoverPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceFailoverPolicy) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceFailoverPolicy - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type BackendServiceGroupHealth struct { - // Annotations: Metadata defined as annotations on the network endpoint group. - Annotations map[string]string `json:"annotations,omitempty"` - // HealthStatus: Health state of the backend instances or endpoints in - // requested instance or - // network endpoint group, determined based on configured health checks. - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#backendServiceGroupHealth for the health of backend - // services. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceGroupHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicy struct { - // FastIPMove: Specifies whether fast IP move is enabled, and if so, the - // mechanism to - // achieve it. - // - // Supported values are: - // - // - DISABLED: Fast IP Move is disabled. You can only use the - // haPolicy.leader API to update the leader. - // - >GARP_RA: Provides a method to very quickly define a new network - // endpoint as the leader. This method is faster than updating the leader - // using the haPolicy.leader API. Fast IP move works as follows: The VM - // hosting the network endpoint that should become the new leader sends - // either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router - // Advertisement(RA) packet (IPv6). Google Cloud immediately but - // temporarily associates the forwarding rule IP address with that VM, and - // both new and in-flight packets are quickly delivered to that VM. - // - // - // - // Note the important properties of the Fast IP Move functionality: - // - // - The GARP/RA-initiated re-routing stays active for approximately 20 - // minutes. After triggering fast failover, you must also - // appropriately set the haPolicy.leader. - // - The new leader instance should continue to send GARP/RA packets - // periodically every 10 seconds until at least 10 minutes after updating - // the haPolicy.leader (but stop immediately if it is no longer the - // leader). - // - After triggering a fast failover, we recommend that you wait at least - // 3 seconds before sending another GARP/RA packet from a different VM - // instance to avoid race conditions. - // - Don't send GARP/RA packets from different VM - // instances at the same time. If multiple instances continue to send - // GARP/RA packets, traffic might be routed to different destinations in an - // alternating order. This condition ceases when a single instance - // issues a GARP/RA packet. - // - The GARP/RA request always takes priority over the leader API. - // Using the haPolicy.leader API to change the leader to a different - // instance will have no effect until the GARP/RA request becomes - // inactive. - // - The GARP/RA packets should follow the GARP/RA - // Packet Specifications.. - // - When multiple forwarding rules refer to a regional backend service, - // you need only send a GARP or RA packet for a single forwarding rule - // virtual IP. The virtual IPs for all forwarding rules targeting the same - // backend service will also be moved to the sender of the GARP or RA - // packet. - // - // - // - // The following are the Fast IP Move limitations (that is, when fastIPMove - // is not DISABLED): - // - // - Multiple forwarding rules cannot use the same IP address if one of - // them refers to a regional backend service with fastIPMove. - // - The regional backend service must set the network field, and all - // NEGs must belong to that network. However, individual - // NEGs can belong to different subnetworks of that network. - // - The maximum number of network endpoints across all backends of a - // backend service with fastIPMove is 32. - // - The maximum number of backend services with fastIPMove that can have - // the same network endpoint attached to one of its backends is 64. - // - The maximum number of backend services with fastIPMove in a VPC in a - // region is 64. - // - The network endpoints that are attached to a backend of a backend - // service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - // - Traffic directed to the leader by a static route next hop will not be - // redirected to a new leader by fast failover. Such traffic will only be - // redirected once an haPolicy.leader update has taken effect. Only traffic - // to the forwarding rule's virtual IP will be redirected to a new leader - // by - // fast failover. - // - // - // haPolicy.fastIPMove can be set only at backend service creation time. - // Once set, it cannot be updated. - // - // By default, fastIpMove is set to DISABLED. - // - // Possible values: - // "DISABLED" - // "GARP_RA" - FastIPMove string `json:"fastIPMove,omitempty"` - // Leader: Selects one of the network endpoints attached to the backend NEGs - // of - // this service as the active endpoint (the leader) that receives - // all - // traffic. - // - // When the leader changes, there is no connection draining to persist - // existing connections on the old leader. - // - // You are responsible for selecting a suitable endpoint as the - // leader. For example, preferring a healthy endpoint over unhealthy ones. - // Note that this service does not track backend endpoint health, and - // selects the configured leader unconditionally. - Leader *BackendServiceHAPolicyLeader `json:"leader,omitempty"` - // ForceSendFields is a list of field names (e.g. "FastIPMove") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FastIPMove") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicyLeader struct { - // BackendGroup: A fully-qualified URL (starting with - // https://www.googleapis.com/) - // of the zonal Network Endpoint Group (NEG) with `GCE_VM_IP` endpoints - // that the leader is attached to. - // - // The leader's backendGroup must already be specified as a backend of - // this backend service. Removing a backend that is designated as the - // leader's backendGroup is not permitted. - BackendGroup string `json:"backendGroup,omitempty"` - // NetworkEndpoint: The network endpoint within the leader.backendGroup that - // is - // designated as the leader. - // - // This network endpoint cannot be detached from the NEG specified in - // the haPolicy.leader.backendGroup until the leader is updated with - // another network endpoint, or the leader is removed from the haPolicy. - NetworkEndpoint *BackendServiceHAPolicyLeaderNetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendGroup") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicyLeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicyLeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicyLeaderNetworkEndpoint struct { - // Instance: The name of the VM instance of the leader network endpoint. - // The - // instance must already be attached to the NEG specified in - // the - // haPolicy.leader.backendGroup. - // - // The name must be 1-63 characters long, and comply with - // RFC1035. - // Authorization requires the following IAM permission on the - // specified resource instance: compute.instances.use - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicyLeaderNetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicyLeaderNetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceHttpCookie: The HTTP cookie used for stateful session -// affinity. -type BackendServiceHttpCookie struct { - // Name: Name of the cookie. - Name string `json:"name,omitempty"` - // Path: Path to set for the cookie. - Path string `json:"path,omitempty"` - // Ttl: Lifetime of the cookie. - Ttl *Duration `json:"ttl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHttpCookie) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHttpCookie - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceIAP: Identity-Aware Proxy -type BackendServiceIAP struct { - // Enabled: Whether the serving infrastructure will authenticate and authorize - // all - // incoming requests. - Enabled bool `json:"enabled,omitempty"` - // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - // Oauth2ClientInfo: [Input Only] OAuth client info required to generate client - // id to be used - // for IAP. - Oauth2ClientInfo *BackendServiceIAPOAuth2ClientInfo `json:"oauth2ClientInfo,omitempty"` - // Oauth2ClientSecret: OAuth2 client secret to use for the authentication - // flow. - // For security reasons, this value cannot be retrieved via the API. - // Instead, the SHA-256 hash of the value is returned in - // the - // oauth2ClientSecretSha256 field. - // - // @InputOnly - Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` - // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the field - // oauth2_client_secret above. - Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceIAP) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceIAP - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceIAPOAuth2ClientInfo struct { - // ApplicationName: Application name to be used in OAuth consent screen. - ApplicationName string `json:"applicationName,omitempty"` - // ClientName: Name of the client to be generated. - // Optional - If not provided, the name will be autogenerated by the - // backend. - ClientName string `json:"clientName,omitempty"` - // DeveloperEmailAddress: Developer's information to be used in OAuth consent - // screen. - DeveloperEmailAddress string `json:"developerEmailAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicationName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicationName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceIAPOAuth2ClientInfo) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceIAPOAuth2ClientInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceList: Contains a list of BackendService resources. -type BackendServiceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#backendServiceList for - // lists of backend services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListWarning: [Output Only] Informational warning message. -type BackendServiceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListUsable: Contains a list of usable BackendService -// resources. -type BackendServiceListUsable struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#usableBackendServiceList - // for lists of usable backend - // services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceListUsableWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsable) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListUsableWarning: [Output Only] Informational warning -// message. -type BackendServiceListUsableWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceListUsableWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsableWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsableWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceListUsableWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsableWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsableWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfig: Container for either a -// built-in LB policy supported by gRPC or Envoy or -// a custom one implemented by the end user. -type BackendServiceLocalityLoadBalancingPolicyConfig struct { - CustomPolicy *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy `json:"customPolicy,omitempty"` - Policy *BackendServiceLocalityLoadBalancingPolicyConfigPolicy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfig) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy: The -// configuration for a custom policy implemented by the user and -// deployed with the client. -type BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy struct { - // Data: An optional, arbitrary JSON object with configuration data, - // understood - // by a locally installed custom policy implementation. - Data string `json:"data,omitempty"` - // Name: Identifies the custom policy. - // - // The value should match the name of a custom implementation registered - // on the gRPC clients. It should follow protocol buffer message - // naming - // conventions and include the full path (for example, - // myorg.CustomLbPolicy). The maximum length is 256 characters. - // - // Do not specify the same custom policy more than once for a - // backend. If you do, the configuration is rejected. - // - // For an example of how to use this field, seeUse - // a custom policy. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Data") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Data") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfigPolicy: The configuration for -// a built-in load balancing policy. -type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { - // Name: The name of a locality load-balancing policy. Valid values - // include - // ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information - // about these values, see the description of localityLbPolicy. - // - // Do not specify the same policy more than once for a - // backend. If you do, the configuration is rejected. - // - // Possible values: - // "INVALID_LB_POLICY" - // "LEAST_REQUEST" - An O(1) algorithm which selects two random healthy hosts - // and - // picks the host which has fewer active requests. - // "MAGLEV" - This algorithm implements consistent hashing to backends. - // Maglev can be - // used as a drop in replacement for the ring hash load balancer. Maglev is - // not as stable as ring hash but has faster table lookup build times and - // host selection times. For more information about Maglev, seeMaglev: - // A Fast and Reliable Software Network Load Balancer. - // "ORIGINAL_DESTINATION" - Backend host is selected based on the client - // connection metadata, i.e., - // connections are opened to the same address as the destination address of - // the incoming connection before the connection was redirected to the - // load - // balancer. - // "RANDOM" - The load balancer selects a random healthy host. - // "RING_HASH" - The ring/modulo hash load balancer implements consistent - // hashing to - // backends. The algorithm has the property that the addition/removal - // of a host from a set of N hosts only affects 1/N of the requests. - // "ROUND_ROBIN" - This is a simple policy in which each healthy backend is - // selected - // in round robin order. This is the default. - // "WEIGHTED_GCP_RENDEZVOUS" - Per-instance weighted Load Balancing via - // health check reported weights. - // In internal passthrough network load balancing, it is weighted - // rendezvous hashing. - // This option is only supported in internal passthrough network - // load - // balancing. - // "WEIGHTED_MAGLEV" - Per-instance weighted Load Balancing via health check - // reported weights. - // If set, the Backend Service must configure a non legacy HTTP-based - // Health - // Check, and health check replies are expected to contain non-standard - // HTTP - // response header field X-Load-Balancing-Endpoint-Weight to specify - // the - // per-instance weights. - // If set, Load Balancing is weighted based on the - // per-instance weights reported in the last processed health check replies, - // as long as every instance either reported a valid weight or - // had - // UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. - // This option is only supported in Network Load Balancing. - // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing - // using weights computed - // from Backend reported Custom Metrics. If set, the Backend Service - // responses are expected to contain non-standard HTTP response header - // field - // Endpoint-Load-Metrics. The reported metrics - // to use for computing the weights are specified via the - // customMetrics fields. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfigPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLogConfig: The available logging options for the load balancer -// traffic served by this -// backend service. -type BackendServiceLogConfig struct { - // Enable: Denotes whether to enable logging for the load balancer - // traffic served by this backend service. The default value is false. - Enable bool `json:"enable,omitempty"` - // Optional: Deprecated in favor of optionalMode. - // This field can only be specified if logging is enabled for this - // backend - // service. Configures whether all, none or a subset of optional fields - // should be added to the reported logs. One of - // [INCLUDE_ALL_OPTIONAL, - // EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. - // - // Possible values: - // "CUSTOM" - A subset of optional fields. - // "EXCLUDE_ALL_OPTIONAL" - None optional fields. - // "INCLUDE_ALL_OPTIONAL" - All optional fields. - // "UNSPECIFIED_OPTIONAL_MODE" - Optional string `json:"optional,omitempty"` - // OptionalFields: This field can only be specified if logging is enabled for - // this backend - // service and "logConfig.optionalMode" was set to CUSTOM. Contains a list - // of optional fields you want to include in the logs. For - // example: - // serverInstance, serverGkeDetails.cluster, - // serverGkeDetails.pod.podNamespace - OptionalFields []string `json:"optionalFields,omitempty"` - // OptionalMode: This field can only be specified if logging is enabled for - // this backend - // service. Configures whether all, none or a subset of optional fields - // should be added to the reported logs. One of - // [INCLUDE_ALL_OPTIONAL, - // EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. - // - // Possible values: - // "CUSTOM" - A subset of optional fields. - // "EXCLUDE_ALL_OPTIONAL" - None optional fields. - // "INCLUDE_ALL_OPTIONAL" - All optional fields. - // "UNSPECIFIED_OPTIONAL_MODE" - OptionalMode string `json:"optionalMode,omitempty"` - // SampleRate: This field can only be specified if logging is enabled for this - // backend - // service. The value of the field must be in [0, 1]. This configures - // the - // sampling rate of requests to the load balancer where 1.0 means all - // logged - // requests are reported and 0.0 means no logged requests are reported. - // The - // default value is 1.0. - SampleRate float64 `json:"sampleRate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceLogConfig - var s1 struct { - SampleRate gensupport.JSONFloat64 `json:"sampleRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SampleRate = float64(s1.SampleRate) - return nil -} - -type BackendServiceNetworkPassThroughLbTrafficPolicy struct { - // ZonalAffinity: When configured, new connections are load balanced across - // healthy backend - // endpoints in the local zone. - ZonalAffinity *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity `json:"zonalAffinity,omitempty"` - // ForceSendFields is a list of field names (e.g. "ZonalAffinity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ZonalAffinity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceNetworkPassThroughLbTrafficPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity struct { - // Spillover: This field indicates whether zonal affinity is enabled or not. - // The - // possible values are: - // - // - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity - // is disabled. The load balancer distributes new connections to all - // healthy backend endpoints across all zones. - // - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is - // enabled. The load balancer distributes new connections to all healthy - // backend endpoints in the local zone only. If there are no healthy - // backend endpoints in the local zone, the load balancer distributes - // new connections to all backend endpoints in the local zone. - // - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is - // enabled. The load balancer distributes new connections to all healthy - // backend endpoints in the local zone only. If there aren't enough - // healthy backend endpoints in the local zone, the load balancer - // distributes new connections to all healthy backend endpoints across all - // zones. - // - // Possible values: - // "ZONAL_AFFINITY_DISABLED" - // "ZONAL_AFFINITY_SPILL_CROSS_ZONE" - // "ZONAL_AFFINITY_STAY_WITHIN_ZONE" - Spillover string `json:"spillover,omitempty"` - // SpilloverRatio: The value of the field must be in [0, 1]. When the ratio of - // the count - // of healthy backend endpoints in a zone to the count of backend - // endpoints in that same zone is equal to or above this threshold, the - // load balancer distributes new connections to all healthy endpoints in - // the local zone only. When the ratio of the count of healthy - // backend - // endpoints in a zone to the count of backend endpoints in that same - // zone is below this threshold, the load balancer distributes all - // new - // connections to all healthy endpoints across all zones. - SpilloverRatio float64 `json:"spilloverRatio,omitempty"` - // ForceSendFields is a list of field names (e.g. "Spillover") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Spillover") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity - var s1 struct { - SpilloverRatio gensupport.JSONFloat64 `json:"spilloverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SpilloverRatio = float64(s1.SpilloverRatio) - return nil -} - -// BackendServiceParams: Additional Backend Service parameters. -type BackendServiceParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceParams) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceReference struct { - BackendService string `json:"backendService,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceTlsSettings struct { - // AuthenticationConfig: Reference to the BackendAuthenticationConfig resource - // from the - // networksecurity.googleapis.com namespace. Can be used in authenticating - // TLS connections to the backend, as specified by the - // authenticationMode - // field. Can only be specified if authenticationMode is not NONE. - AuthenticationConfig string `json:"authenticationConfig,omitempty"` - // Identity: Assigns the Managed Identity for the BackendService - // Workload. - // - // - // Use this property to configure the load balancer back-end to - // use - // certificates and roots of trust provisioned by the Managed Workload - // Identity system. - // - // The `identity` property is the - // fully-specified SPIFFE ID to use in the SVID presented by the Load - // Balancer Workload. - // - // The SPIFFE ID must be a resource starting with the - // `trustDomain` property value, followed by the path to the Managed - // Workload Identity. - // - // Supported SPIFFE ID format: - // - // - ///ns//sa/ - // - // - // The Trust Domain within the Managed Identity must refer to a valid - // Workload Identity Pool. The TrustConfig and CertificateIssuanceConfig - // will be inherited from the Workload Identity Pool. - // - // Restrictions: - // - // - If you set the `identity` property, you cannot manually set - // the following fields: - // - tlsSettings.sni - // - tlsSettings.subjectAltNames - // - tlsSettings.authenticationConfig - // - // - // When defining a `identity` for a RegionBackendServices, the - // corresponding Workload Identity Pool must have a ca_pool - // configured in the same region. - // - // The system will set up a read-onlytlsSettings.authenticationConfig for the - // Managed Identity. - Identity string `json:"identity,omitempty"` - // Sni: Server Name Indication - see RFC3546 section 3.1. If set, the - // load - // balancer sends this string as the SNI hostname in the TLS connection to - // the backend, and requires that this string match a Subject Alternative - // Name (SAN) in the backend's server certificate. With a Regional Internet - // NEG backend, if the SNI is specified here, the load balancer uses - // it - // regardless of whether the Regional Internet NEG is specified with FQDN or - // IP address and port. When both sni and subjectAltNames[] are specified, - // the load balancer matches the backend certificate's SAN only - // to - // subjectAltNames[]. - Sni string `json:"sni,omitempty"` - // SubjectAltNames: A list of Subject Alternative Names (SANs) that the Load - // Balancer - // verifies during a TLS handshake with the backend. When the server - // presents its X.509 certificate to the Load Balancer, the Load - // Balancer - // inspects the certificate's SAN field, and requires that at least one - // SAN - // match one of the subjectAltNames in the list. This field is limited to - // 5 - // entries. When both sni and subjectAltNames[] are specified, the - // load - // balancer matches the backend certificate's SAN only to subjectAltNames[]. - SubjectAltNames []*BackendServiceTlsSettingsSubjectAltName `json:"subjectAltNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthenticationConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthenticationConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceTlsSettings) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceTlsSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceTlsSettingsSubjectAltName: A Subject Alternative Name that the -// load balancer matches against the SAN -// field in the TLS certificate provided by the backend, specified as either -// a DNS name or a URI, in accordance with RFC 5280 4.2.1.6 -type BackendServiceTlsSettingsSubjectAltName struct { - // DnsName: The SAN specified as a DNS Name. - DnsName string `json:"dnsName,omitempty"` - // UniformResourceIdentifier: The SAN specified as a URI. - UniformResourceIdentifier string `json:"uniformResourceIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceTlsSettingsSubjectAltName) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceTlsSettingsSubjectAltName - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceUsedBy struct { - // Reference: [Output Only] Server-defined URL for resources referencing - // given - // BackendService like UrlMaps, TargetTcpProxies, TargetSslProxies - // and ForwardingRule. - Reference string `json:"reference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesGetEffectiveSecurityPoliciesResponse struct { - // SecurityPolicies: Effective security policies for the backend service. - SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesGetEffectiveSecurityPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesGetEffectiveSecurityPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedList struct { - // BackendServices: A list of BackendServices contained in this scope. - BackendServices []*BackendService `json:"backendServices,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *BackendServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendServices") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServicesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type BackendServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServicesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BfdPacket struct { - // AuthenticationPresent: The Authentication Present bit of the BFD packet. - // This is specified in - // section 4.1 ofRFC5880 - AuthenticationPresent bool `json:"authenticationPresent,omitempty"` - // ControlPlaneIndependent: The Control Plane Independent bit of the BFD - // packet. This is specified in - // section 4.1 ofRFC5880 - ControlPlaneIndependent bool `json:"controlPlaneIndependent,omitempty"` - // Demand: The demand bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Demand bool `json:"demand,omitempty"` - // Diagnostic: The diagnostic code specifies the local system's reason for the - // last change - // in session state. This allows remote systems to determine the reason - // that - // the previous session failed, for example. These diagnostic codes - // are - // specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMINISTRATIVELY_DOWN" - // "CONCATENATED_PATH_DOWN" - // "CONTROL_DETECTION_TIME_EXPIRED" - // "DIAGNOSTIC_UNSPECIFIED" - // "ECHO_FUNCTION_FAILED" - // "FORWARDING_PLANE_RESET" - // "NEIGHBOR_SIGNALED_SESSION_DOWN" - // "NO_DIAGNOSTIC" - // "PATH_DOWN" - // "REVERSE_CONCATENATED_PATH_DOWN" - Diagnostic string `json:"diagnostic,omitempty"` - // Final: The Final bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Final bool `json:"final,omitempty"` - // Length: The length of the BFD Control packet in bytes. This is specified in - // section - // 4.1 ofRFC5880 - Length int64 `json:"length,omitempty"` - // MinEchoRxIntervalMs: The Required Min Echo RX Interval value in the BFD - // packet. This is - // specified in section 4.1 ofRFC5880 - MinEchoRxIntervalMs int64 `json:"minEchoRxIntervalMs,omitempty"` - // MinRxIntervalMs: The Required Min RX Interval value in the BFD packet. This - // is specified in - // section 4.1 ofRFC5880 - MinRxIntervalMs int64 `json:"minRxIntervalMs,omitempty"` - // MinTxIntervalMs: The Desired Min TX Interval value in the BFD packet. This - // is specified in - // section 4.1 ofRFC5880 - MinTxIntervalMs int64 `json:"minTxIntervalMs,omitempty"` - // Multiplier: The detection time multiplier of the BFD packet. This is - // specified in - // section 4.1 ofRFC5880 - Multiplier int64 `json:"multiplier,omitempty"` - // Multipoint: The multipoint bit of the BFD packet. This is specified in - // section 4.1 ofRFC5880 - Multipoint bool `json:"multipoint,omitempty"` - // MyDiscriminator: The My Discriminator value in the BFD packet. This is - // specified in section - // 4.1 ofRFC5880 - MyDiscriminator int64 `json:"myDiscriminator,omitempty"` - // Poll: The Poll bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Poll bool `json:"poll,omitempty"` - // State: The current BFD session state as seen by the transmitting system. - // These - // states are specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMIN_DOWN" - // "DOWN" - // "INIT" - // "STATE_UNSPECIFIED" - // "UP" - State string `json:"state,omitempty"` - // Version: The version number of the BFD protocol, as specified in section 4.1 - // ofRFC5880. - Version int64 `json:"version,omitempty"` - // YourDiscriminator: The Your Discriminator value in the BFD packet. This is - // specified in - // section 4.1 ofRFC5880 - YourDiscriminator int64 `json:"yourDiscriminator,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthenticationPresent") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthenticationPresent") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdPacket) MarshalJSON() ([]byte, error) { - type NoMethod BfdPacket - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BfdStatus: Next free: 15 -type BfdStatus struct { - // BfdSessionInitializationMode: The BFD session initialization mode for this - // BGP peer. - // If set to ACTIVE, the Cloud Router will initiate the BFD session for - // this BGP peer. If set to PASSIVE, the Cloud Router will wait for the - // peer router to initiate the BFD session for this BGP peer. If set - // to - // DISABLED, BFD is disabled for this BGP peer. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - BfdSessionInitializationMode string `json:"bfdSessionInitializationMode,omitempty"` - // ConfigUpdateTimestampMicros: Unix timestamp of the most recent config - // update. - ConfigUpdateTimestampMicros int64 `json:"configUpdateTimestampMicros,omitempty,string"` - // ControlPacketCounts: Control packet counts for the current BFD session. - ControlPacketCounts *BfdStatusPacketCounts `json:"controlPacketCounts,omitempty"` - // ControlPacketIntervals: Inter-packet time interval statistics for control - // packets. - ControlPacketIntervals []*PacketIntervals `json:"controlPacketIntervals,omitempty"` - // EchoPacketCounts: Echo packet counts for the current BFD session. - EchoPacketCounts *BfdStatusPacketCounts `json:"echoPacketCounts,omitempty"` - // EchoPacketIntervals: Inter-packet time interval statistics for echo packets. - EchoPacketIntervals []*PacketIntervals `json:"echoPacketIntervals,omitempty"` - // LocalDiagnostic: The diagnostic code specifies the local system's reason for - // the last change - // in session state. This allows remote systems to determine the reason - // that - // the previous session failed, for example. These diagnostic codes - // are - // specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMINISTRATIVELY_DOWN" - // "CONCATENATED_PATH_DOWN" - // "CONTROL_DETECTION_TIME_EXPIRED" - // "DIAGNOSTIC_UNSPECIFIED" - // "ECHO_FUNCTION_FAILED" - // "FORWARDING_PLANE_RESET" - // "NEIGHBOR_SIGNALED_SESSION_DOWN" - // "NO_DIAGNOSTIC" - // "PATH_DOWN" - // "REVERSE_CONCATENATED_PATH_DOWN" - LocalDiagnostic string `json:"localDiagnostic,omitempty"` - // LocalState: The current BFD session state as seen by the transmitting - // system. These - // states are specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMIN_DOWN" - // "DOWN" - // "INIT" - // "STATE_UNSPECIFIED" - // "UP" - LocalState string `json:"localState,omitempty"` - // NegotiatedLocalControlTxIntervalMs: Negotiated transmit interval for control - // packets. - NegotiatedLocalControlTxIntervalMs int64 `json:"negotiatedLocalControlTxIntervalMs,omitempty"` - // NegotiatedLocalEchoTxIntervalMs: Negotiated transmit interval for echo - // packets. - NegotiatedLocalEchoTxIntervalMs int64 `json:"negotiatedLocalEchoTxIntervalMs,omitempty"` - // RxPacket: The most recent Rx control packet for this BFD session. - RxPacket *BfdPacket `json:"rxPacket,omitempty"` - // TxPacket: The most recent Tx control packet for this BFD session. - TxPacket *BfdPacket `json:"txPacket,omitempty"` - // UptimeMs: Session uptime in milliseconds. Value will be 0 if session is not - // up. - UptimeMs int64 `json:"uptimeMs,omitempty,string"` - // UsingEchoMode: Indicates if echo mode is currently being used. - UsingEchoMode bool `json:"usingEchoMode,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BfdSessionInitializationMode") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BfdSessionInitializationMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdStatus) MarshalJSON() ([]byte, error) { - type NoMethod BfdStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BfdStatusPacketCounts struct { - // NumRx: Number of packets received since the beginning of the current - // BFD - // session. - NumRx int64 `json:"numRx,omitempty"` - // NumRxRejected: Number of packets received that were rejected because of - // errors since the - // beginning of the current BFD session. - NumRxRejected int64 `json:"numRxRejected,omitempty"` - // NumRxSuccessful: Number of packets received that were successfully processed - // since the - // beginning of the current BFD session. - NumRxSuccessful int64 `json:"numRxSuccessful,omitempty"` - // NumTx: Number of packets transmitted since the beginning of the current - // BFD - // session. - NumTx int64 `json:"numTx,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRx") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRx") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdStatusPacketCounts) MarshalJSON() ([]byte, error) { - type NoMethod BfdStatusPacketCounts - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BgpRoute struct { - // AsPaths: [Output only] AS-PATH for the route - AsPaths []*BgpRouteAsPath `json:"asPaths,omitempty"` - // Communities: [Output only] BGP communities in human-readable A:B format. - Communities []string `json:"communities,omitempty"` - // Destination: [Output only] Destination IP range for the route, in - // human-readable CIDR - // format - Destination *BgpRouteNetworkLayerReachabilityInformation `json:"destination,omitempty"` - // Med: [Output only] BGP multi-exit discriminator - Med int64 `json:"med,omitempty"` - // Origin: [Output only] BGP origin (EGP, IGP or INCOMPLETE) - // - // Possible values: - // "BGP_ORIGIN_EGP" - // "BGP_ORIGIN_IGP" - // "BGP_ORIGIN_INCOMPLETE" - Origin string `json:"origin,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsPaths") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsPaths") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRoute) MarshalJSON() ([]byte, error) { - type NoMethod BgpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BgpRouteAsPath struct { - // Asns: [Output only] ASNs in the path segment. When type is SEQUENCE, these - // are - // ordered. - Asns []int64 `json:"asns,omitempty"` - // Asns32: [Output only] ASNs in the path segment. This field is for - // better - // support of 32 bit ASNs as the other asns field suffers from overflow - // when - // the ASN is larger. When type is SEQUENCE, these are ordered. - Asns32 []int64 `json:"asns32,omitempty"` - // Type: [Output only] Type of AS-PATH segment (SEQUENCE or SET) - // - // Possible values: - // "AS_PATH_TYPE_SEQUENCE" - // "AS_PATH_TYPE_SET" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Asns") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Asns") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRouteAsPath) MarshalJSON() ([]byte, error) { - type NoMethod BgpRouteAsPath - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BgpRouteNetworkLayerReachabilityInformation: Network Layer Reachability -// Information (NLRI) for a route. -type BgpRouteNetworkLayerReachabilityInformation struct { - // PathId: If the BGP session supports multiple paths (RFC 7911), the - // path - // identifier for this route. - PathId int64 `json:"pathId,omitempty"` - // Prefix: Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16. - Prefix string `json:"prefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "PathId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PathId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRouteNetworkLayerReachabilityInformation) MarshalJSON() ([]byte, error) { - type NoMethod BgpRouteNetworkLayerReachabilityInformation - return gensupport.MarshalJSON(NoMethod(s), 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`. - // - // - // - // - // * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: - // A single identity in a workforce identity pool. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: - // All workforce identities in a group. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: - // All workforce identities with a specific attribute value. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: - // All identities in a workforce identity pool. - // - // * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: - // A single identity in a workload identity pool. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: - // A workload identity pool group. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: - // All identities in a workload identity pool with a certain attribute. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: - // All identities in a workload identity pool. - // - // * `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. - // - // * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: - // Deleted single identity in a workforce identity pool. For example, - // - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - // - // For an overview of the IAM roles and permissions, see the - // IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For - // a list of the available pre-defined roles, see - // here (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertDiskResource: A transient resource used in -// compute.disks.bulkInsert and -// compute.regionDisks.bulkInsert. It is only used to process -// requests and is not persisted. -type BulkInsertDiskResource struct { - // InstantSnapshotGroupParameters: The parameters for the instant snapshot - // group. - InstantSnapshotGroupParameters *InstantSnapshotGroupParameters `json:"instantSnapshotGroupParameters,omitempty"` - // SnapshotGroupParameters: The parameters for the snapshot group. - SnapshotGroupParameters *SnapshotGroupParameters `json:"snapshotGroupParameters,omitempty"` - // SourceConsistencyGroupPolicy: The URL of the DiskConsistencyGroupPolicy for - // the group of disks to clone. - // This may be a full or partial URL, such as: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // regions/region/resourcePolicies/resourcePolicy - SourceConsistencyGroupPolicy string `json:"sourceConsistencyGroupPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "InstantSnapshotGroupParameters") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstantSnapshotGroupParameters") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertDiskResource) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertDiskResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertInstanceResource: A transient resource used in -// compute.instances.bulkInsert and -// compute.regionInstances.bulkInsert . This resource is not -// persisted -// anywhere, it is used only for processing the requests. -type BulkInsertInstanceResource struct { - // Count: The maximum number of instances to create. - Count int64 `json:"count,omitempty,string"` - // InstanceFlexibilityPolicy: A flexible specification of machine type of - // instances to create. - InstanceFlexibilityPolicy *InstanceFlexibilityPolicy `json:"instanceFlexibilityPolicy,omitempty"` - // InstanceProperties: The instance properties defining the VM instances to be - // created. Required - // if sourceInstanceTemplate is not provided. - InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // LocationPolicy: Policy for choosing target zone. For more information, - // seeCreate VMs in - // bulk. - LocationPolicy *LocationPolicy `json:"locationPolicy,omitempty"` - // MinCount: The minimum number of instances to create. If no min_count - // is - // specified then count is used as the default value. Ifmin_count instances - // cannot be created, then no instances will - // be created and instances already created will be deleted. - MinCount int64 `json:"minCount,omitempty,string"` - // NamePattern: The string pattern used for the names of the VMs. - // Either name_pattern or per_instance_properties - // must be set. The pattern must contain one continuous sequence of - // placeholder hash characters (#) with each character corresponding to - // one - // digit of the generated instance name. Example: a name_pattern - // of inst-#### generates instance names such asinst-0001 and inst-0002. If - // existing instances - // in the same project and zone have names that match the name pattern - // then the generated instance numbers start after the biggest - // existing number. For example, if there exists an instance with - // nameinst-0050, then instance names generated using the patterninst-#### - // begin with inst-0051. The name pattern - // placeholder #...# can contain up to 18 characters. - NamePattern string `json:"namePattern,omitempty"` - // PerInstanceProperties: Per-instance properties to be set on individual - // instances. - // Keys of this map specify requested instance names. - // Can be empty if name_pattern is used. - PerInstanceProperties map[string]BulkInsertInstanceResourcePerInstanceProperties `json:"perInstanceProperties,omitempty"` - // SourceInstanceTemplate: Specifies the instance template from which to create - // instances. You may - // combine sourceInstanceTemplate withinstanceProperties to override specific - // values from an - // existing instance template. Bulk API follows the semantics of JSON - // Merge - // Patch described by RFC - // 7396. - // - // It can be a full or partial URL. For example, the following are - // all valid URLs to an instance template: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - // - projects/project/global/instanceTemplates/instanceTemplate - // - global/instanceTemplates/instanceTemplate - // - // - // - // This field is optional. - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertInstanceResource) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertInstanceResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertInstanceResourcePerInstanceProperties: Per-instance properties to -// be set on individual instances. -// To be extended in the future. -type BulkInsertInstanceResourcePerInstanceProperties struct { - // Hostname: Specifies the hostname of the instance. More details - // in: - // https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention - Hostname string `json:"hostname,omitempty"` - // Name: This field is only temporary. It will be removed. Do not use it. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hostname") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hostname") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertInstanceResourcePerInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertInstanceResourcePerInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkInsertOperationStatus struct { - // CreatedVmCount: [Output Only] Count of VMs successfully created so far. - CreatedVmCount int64 `json:"createdVmCount,omitempty"` - // DeletedVmCount: [Output Only] Count of VMs that got deleted during rollback. - DeletedVmCount int64 `json:"deletedVmCount,omitempty"` - // FailedToCreateVmCount: [Output Only] Count of VMs that started creating but - // encountered an - // error. - FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` - // Status: [Output Only] Creation status of BulkInsert operation - - // information - // if the flow is rolling forward or rolling back. - // - // Possible values: - // "CREATING" - Rolling forward - creating VMs. - // "DONE" - Done - // "ROLLING_BACK" - Rolling back - cleaning up after an error. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // TargetVmCount: [Output Only] Count of VMs originally planned to be created. - TargetVmCount int64 `json:"targetVmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreatedVmCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertOperationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // may - // optionally provide an up-to-date fingerprint hash in order to update - // or - // change labels. Make a get() request to the resource to get the - // latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod BulkSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkZoneSetLabelsRequest struct { - Requests []*BulkSetLabelsRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "Requests") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod BulkZoneSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BundledLocalSsds struct { - // DefaultInterface: The default disk interface if the interface is not - // specified. - DefaultInterface string `json:"defaultInterface,omitempty"` - // PartitionCount: The number of partitions. - PartitionCount int64 `json:"partitionCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultInterface") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BundledLocalSsds) MarshalJSON() ([]byte, error) { - type NoMethod BundledLocalSsds - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CacheInvalidationRule struct { - // CacheTags: A list of cache tags used to identify cached objects. - // - // - // - Cache tags are specified when the response is first cached, by setting - // the `Cache-Tag` response header at the origin. - // - Multiple cache tags in the same invalidation request are treated as - // Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. - // - If other fields are also specified, these are treated as Boolean `AND` - // with any tags. - // - // - // Up to 10 tags can be specified in a single invalidation request. - CacheTags []string `json:"cacheTags,omitempty"` - // Host: If set, this invalidation rule will only apply to requests with a - // Host - // header matching host. - Host string `json:"host,omitempty"` - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "CacheTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CacheTags") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CacheInvalidationRule) MarshalJSON() ([]byte, error) { - type NoMethod CacheInvalidationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CacheKeyPolicy: Message containing what to include in the cache key for a -// request for Cloud -// CDN. -type CacheKeyPolicy struct { - // IncludeHost: If true, requests to different hosts will be cached separately. - IncludeHost bool `json:"includeHost,omitempty"` - // IncludeHttpHeaders: Allows HTTP request headers (by name) to be used in the - // cache key. - IncludeHttpHeaders []string `json:"includeHttpHeaders,omitempty"` - // IncludeNamedCookies: Allows HTTP cookies (by name) to be used in the cache - // key. - // The name=value pair will be used in the cache key Cloud CDN generates. - IncludeNamedCookies []string `json:"includeNamedCookies,omitempty"` - // IncludeProtocol: If true, http and https requests will be cached separately. - IncludeProtocol bool `json:"includeProtocol,omitempty"` - // IncludeQueryString: If true, include query string parameters in the cache - // key according to - // query_string_whitelist and query_string_blacklist. If neither is set, - // the - // entire query string will be included. If false, the query string will - // be - // excluded from the cache key entirely. - IncludeQueryString bool `json:"includeQueryString,omitempty"` - // QueryStringBlacklist: Names of query string parameters to exclude in cache - // keys. All other - // parameters will be included. Either specify query_string_whitelist - // or - // query_string_blacklist, not both. '&' and '=' will be percent encoded - // and - // not treated as delimiters. - QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"` - // QueryStringWhitelist: Names of query string parameters to include in cache - // keys. All other - // parameters will be excluded. Either specify query_string_whitelist - // or - // query_string_blacklist, not both. '&' and '=' will be percent encoded - // and - // not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludeHost") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludeHost") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CacheKeyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CacheKeyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeAdviceRequest: A request to recommend the best way to consume -// the specified resources in the -// future. -type CalendarModeAdviceRequest struct { - // FutureResourcesSpecs: Specification of resources to create in the - // future. - // The key of the map is an arbitrary string specified by the caller. - // Value of the map is a specification of required resources and - // their - // constraints. Currently only one value is allowed in this map. - FutureResourcesSpecs map[string]FutureResourcesSpec `json:"futureResourcesSpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "FutureResourcesSpecs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FutureResourcesSpecs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeAdviceRequest) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeAdviceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeAdviceResponse: A response containing the recommended way of -// creating the specified resources -// in the future. It contains (will contain) multiple recommendations that -// can -// be analyzed by the customer and the best one can be picked. -type CalendarModeAdviceResponse struct { - // Recommendations: Recommendations where, how and when to create the requested - // resources - // in order to maximize their obtainability and minimize cost. - Recommendations []*CalendarModeRecommendation `json:"recommendations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Recommendations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Recommendations") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeAdviceResponse) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeAdviceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeRecommendation: A single recommendation to create requested -// resources. Contains detailed -// recommendations for every future resources specification specified -// in -// CalendarModeAdviceRequest. -type CalendarModeRecommendation struct { - // RecommendationsPerSpec: Recommendations for every future resource - // specification passed in - // CalendarModeAdviceRequest. Keys of the map correspond to keys - // specified in the request. - RecommendationsPerSpec map[string]FutureResourcesRecommendation `json:"recommendationsPerSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "RecommendationsPerSpec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RecommendationsPerSpec") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CallCredentials: [Deprecated] gRPC call credentials to access the SDS -// server. -// gRPC call credentials to access the SDS server. -type CallCredentials struct { - // CallCredentialType: The type of call credentials to use for GRPC requests to - // the SDS server. - // This field can be set to one of the following: - // - // - GCE_VM: The local GCE VM service account credentials are used to - // access - // the SDS server. - // - FROM_PLUGIN: Custom authenticator credentials are used to access the - // SDS server. - // - // Possible values: - // "FROM_PLUGIN" - Custom authenticator credentials are used to access the - // SDS server. - // "GCE_VM" - The local GCE VM service account credentials are used to access - // the SDS - // server. - // "INVALID" - CallCredentialType string `json:"callCredentialType,omitempty"` - // FromPlugin: Custom authenticator credentials. Valid if callCredentialType - // is - // FROM_PLUGIN. - FromPlugin *MetadataCredentialsFromPlugin `json:"fromPlugin,omitempty"` - // ForceSendFields is a list of field names (e.g. "CallCredentialType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CallCredentialType") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CallCredentials) MarshalJSON() ([]byte, error) { - type NoMethod CallCredentials - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceRequest: A request to provide Assistant Scores. These scores -// determine VM -// obtainability and preemption likelihood. -type CapacityAdviceRequest struct { - // DistributionPolicy: Policy specifying the distribution of instances - // across - // zones within the requested region. - DistributionPolicy *CapacityAdviceRequestDistributionPolicy `json:"distributionPolicy,omitempty"` - // InstanceFlexibilityPolicy: Policy for instance selectors. - InstanceFlexibilityPolicy *CapacityAdviceRequestInstanceFlexibilityPolicy `json:"instanceFlexibilityPolicy,omitempty"` - // InstanceProperties: Instance properties for this request. - InstanceProperties *CapacityAdviceRequestInstanceProperties `json:"instanceProperties,omitempty"` - // Size: Size of requested capacity. - Size int64 `json:"size,omitempty"` - // ForceSendFields is a list of field names (e.g. "DistributionPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DistributionPolicy") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequest) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CapacityAdviceRequestDistributionPolicy struct { - // TargetShape: The distribution shape to which the group converges. - // You can only specify the following values: ANY,ANY_SINGLE_ZONE. - // - // Possible values: - // "ANY" - The group picks zones for creating VM instances to fulfill - // the - // requested number of VMs within present resource constraints and to - // maximize utilization of unused zonal reservations. Recommended for - // batch workloads that do not require high availability. - // "ANY_SINGLE_ZONE" - The group creates all VM instances within a single - // zone. The zone is - // selected based on the present resource constraints and to - // maximize - // utilization of unused zonal reservations. - // Recommended for batch workloads with heavy interprocess communication. - // "BALANCED" - The group prioritizes acquisition of resources, scheduling - // VMs in zones - // where resources are available while distributing VMs as evenly as - // possible across selected zones to minimize the impact of zonal - // failure. - // Recommended for highly available serving workloads. - // "TARGET_SHAPE_UNSPECIFIED" - TargetShape string `json:"targetShape,omitempty"` - // Zones: Zones where Capacity Advisor looks for capacity. - Zones []*CapacityAdviceRequestDistributionPolicyZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetShape") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestDistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestDistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CapacityAdviceRequestDistributionPolicyZoneConfiguration struct { - // Zone: The URL of the zone. It can be a - // partial or full URL. For example, the following are valid values: - // - // - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - projects/project/zones/zone - // - zones/zone - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zone") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestDistributionPolicyZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestDistributionPolicyZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceRequestInstanceFlexibilityPolicy: Specification of -// alternative, flexible instance subsets. -type CapacityAdviceRequestInstanceFlexibilityPolicy struct { - // InstanceSelections: Named instance selections configure properties. - // The key is an arbitrary, unique RFC1035 string that identifies the - // instance selection. - InstanceSelections map[string]CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection `json:"instanceSelections,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSelections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSelections") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestInstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestInstanceFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection: Machine -// specification. -type CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection struct { - // MachineTypes: Full machine-type names, e.g. "n1-standard-16". - MachineTypes []string `json:"machineTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestInstanceFlexibilityPolicyInstanceSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceRequestInstanceProperties: Instance provisining properties. -type CapacityAdviceRequestInstanceProperties struct { - // Scheduling: Specifies the scheduling options. - Scheduling *CapacityAdviceRequestInstancePropertiesScheduling `json:"scheduling,omitempty"` - // ForceSendFields is a list of field names (e.g. "Scheduling") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Scheduling") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceRequestInstancePropertiesScheduling: Defines the instance -// scheduling options. -type CapacityAdviceRequestInstancePropertiesScheduling struct { - // ProvisioningModel: Specifies the provisioning model of the instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProvisioningModel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProvisioningModel") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceRequestInstancePropertiesScheduling) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceRequestInstancePropertiesScheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceResponse: A response contains multiple scoring -// recommendations. -type CapacityAdviceResponse struct { - // Recommendations: Initially the API will provide one recommendation which - // balances the - // individual scores according to service provider's preference. - Recommendations []*CapacityAdviceResponseRecommendation `json:"recommendations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Recommendations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Recommendations") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceResponse) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CapacityAdviceResponseRecommendation struct { - Scores *CapacityAdviceResponseRecommendationScores `json:"scores,omitempty"` - Shards []*CapacityAdviceResponseRecommendationShard `json:"shards,omitempty"` - // ForceSendFields is a list of field names (e.g. "Scores") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Scores") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceResponseRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceResponseRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CapacityAdviceResponseRecommendationScores: The Scores message groups -// information about a shard of capacity. -type CapacityAdviceResponseRecommendationScores struct { - // Obtainability: The obtainability score indicates the likelihood of - // successfully - // obtaining (provisioning) the requested number of VMs. - // The score range is 0.0 through 1.0. Higher is better. - Obtainability float64 `json:"obtainability,omitempty"` - // UptimeScore: The uptime score indicates the likelihood that your Spot VMs - // will - // continue to run without preemption within the next few hours. For - // more - // information about the preemption process, see Preemption - // of Spot VMs. - // The score range is 0.0 through 1.0. Higher is better. - UptimeScore float64 `json:"uptimeScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Obtainability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Obtainability") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceResponseRecommendationScores) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceResponseRecommendationScores - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *CapacityAdviceResponseRecommendationScores) UnmarshalJSON(data []byte) error { - type NoMethod CapacityAdviceResponseRecommendationScores - var s1 struct { - Obtainability gensupport.JSONFloat64 `json:"obtainability"` - UptimeScore gensupport.JSONFloat64 `json:"uptimeScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Obtainability = float64(s1.Obtainability) - s.UptimeScore = float64(s1.UptimeScore) - return nil -} - -// CapacityAdviceResponseRecommendationShard: Shards represent blocks of -// uniform capacity in recommendations. -// Each shard is for a single zone, single instance selection, and -// a single machine shape. Each shard defines a size expressed as the -// number of VMs. -type CapacityAdviceResponseRecommendationShard struct { - InstanceCount int64 `json:"instanceCount,omitempty"` - // MachineType: The machine type corresponds to the instance selection in the - // request. - MachineType string `json:"machineType,omitempty"` - // ProvisioningModel: The provisioning model that you want to view - // recommendations for. - // Set to: SPOT. - // - // For more information, see - // Compute Engine instances provisioning models. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // Zone: The zone name for this shard. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CapacityAdviceResponseRecommendationShard) MarshalJSON() ([]byte, error) { - type NoMethod CapacityAdviceResponseRecommendationShard - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ChannelCredentials: [Deprecated] gRPC channel credentials to access the SDS -// server. -// gRPC channel credentials to access the SDS server. -type ChannelCredentials struct { - // Certificates: The call credentials to access the SDS server. - Certificates *TlsCertificatePaths `json:"certificates,omitempty"` - // ChannelCredentialType: The channel credentials to access the SDS server. - // This field can be set - // to one of the following: - // CERTIFICATES: Use TLS certificates to access the SDS server. - // GCE_VM: Use local GCE VM credentials to access the SDS server. - // - // Possible values: - // "CERTIFICATES" - Use TLS certificates to access the SDS server. - // "GCE_VM" - Use local GCE VM credentials to access the SDS server. - // "INVALID" - ChannelCredentialType string `json:"channelCredentialType,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificates") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ChannelCredentials) MarshalJSON() ([]byte, error) { - type NoMethod ChannelCredentials - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CircuitBreakers: Settings controlling the volume of requests, connections -// and retries to this -// backend service. -type CircuitBreakers struct { - // ConnectTimeout: The timeout for new network connections to hosts. - ConnectTimeout *Duration `json:"connectTimeout,omitempty"` - // MaxConnections: The maximum number of connections to the backend service. If - // not specified, - // there is no limit. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxPendingRequests: The maximum number of pending requests allowed to the - // backend service. If - // not specified, there is no limit. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"` - // MaxRequests: The maximum number of parallel requests that allowed to the - // backend - // service. If not specified, there is no limit. - MaxRequests int64 `json:"maxRequests,omitempty"` - // MaxRequestsPerConnection: Maximum requests for a single connection to the - // backend service. - // This parameter is respected by both the HTTP/1.1 and HTTP/2 - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"` - // MaxRetries: The maximum number of parallel retries allowed to the backend - // cluster. If - // not specified, the default is 1. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxRetries int64 `json:"maxRetries,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectTimeout") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectTimeout") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CircuitBreakers) MarshalJSON() ([]byte, error) { - type NoMethod CircuitBreakers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClientTlsSettings: [Deprecated] The client side authentication settings for -// connection -// originating from the backend service. -// the backend service. -type ClientTlsSettings struct { - // ClientTlsContext: Configures the mechanism to obtain client-side security - // certificates and - // identity information. This field is only applicable when mode is set - // to - // MUTUAL. - ClientTlsContext *TlsContext `json:"clientTlsContext,omitempty"` - // Mode: Indicates whether connections to this port should be secured using - // TLS. - // The value of this field determines how TLS is enforced. This can be set - // to one of the following values: DISABLE: Do not setup a TLS connection - // to - // the backends. - // SIMPLE: Originate a TLS connection to the backends. - // MUTUAL: Secure connections to the backends using mutual TLS by presenting - // client certificates for authentication. - // - // Possible values: - // "DISABLE" - Do not setup a TLS connection to the backends. - // "INVALID" - // "MUTUAL" - Secure connections to the backends using mutual TLS by - // presenting - // client certificates for authentication. - // "SIMPLE" - Originate a TLS connection to the backends. - Mode string `json:"mode,omitempty"` - // Sni: SNI string to present to the server during TLS handshake. This field - // is - // applicable only when mode is SIMPLE or MUTUAL. - Sni string `json:"sni,omitempty"` - // SubjectAltNames: A list of alternate names to verify the subject identity in - // the - // certificate.If specified, - // the proxy will verify that the server certificate's subject alt name - // matches one of the specified values. This field is applicable only when - // mode is SIMPLE or MUTUAL. - SubjectAltNames []string `json:"subjectAltNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientTlsContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientTlsContext") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClientTlsSettings) MarshalJSON() ([]byte, error) { - type NoMethod ClientTlsSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Commitment: Represents a regional resource-based commitment -// resource. -// -// Creating this commitment resource means that you are purchasing -// a -// resource-based committed use contract, with an explicit start and end -// time. -// You can purchase resource-based commitments for both hardware and -// software -// resources. For more information, read -// Resource-based committed use discounts -type Commitment struct { - // AutoRenew: Specifies whether to automatically renew the commitment at the - // end of its - // current term. The default value is false. If you set the field - // to true, each time your commitment reaches the end of its - // term, Compute Engine automatically renews it for another term. You - // can - // update this field anytime before the commitment expires. For example, if - // the commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you - // can - // update this field until 11:59 PM UTC-8 on January 2, 2027. - AutoRenew bool `json:"autoRenew,omitempty"` - // Category: The category of the commitment; specifies whether the commitment - // is for - // hardware or software resources. Category MACHINE specifies - // that you are committing to hardware machine resources such asVCPU or MEMORY, - // listed in resources. - // Category LICENSE specifies that you are committing to software - // licenses, listed in licenseResources. - // Note that if you specify MACHINE commitments, then you must - // also specify a type to indicate the machine series of the - // hardware resource that you are committing to. - // - // Possible values: - // "CATEGORY_UNSPECIFIED" - // "LICENSE" - // "MACHINE" - Category string `json:"category,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomEndTimestamp: [Input Only] Optional, specifies the requested - // commitment end time inRFC3339 text format. Use this option when the - // desired - // commitment's end date is later than the start date + term duration. - CustomEndTimestamp string `json:"customEndTimestamp,omitempty"` - // Description: An optional description of the commitment. You can provide this - // property - // when you create the resource. - Description string `json:"description,omitempty"` - // EndTimestamp: [Output Only] Commitment end time inRFC3339 - // text format. - EndTimestamp string `json:"endTimestamp,omitempty"` - ExistingReservations []string `json:"existingReservations,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#commitment - // for commitments. - Kind string `json:"kind,omitempty"` - // LicenseResource: The license specification required as part of a license - // commitment. - LicenseResource *LicenseResourceCommitment `json:"licenseResource,omitempty"` - // MergeSourceCommitments: The list of source commitments that you are merging - // to create the new - // merged commitment. For more information, see - // Merging commitments. - MergeSourceCommitments []string `json:"mergeSourceCommitments,omitempty"` - // Name: Name of the commitment. You must specify a name when you purchase - // the - // commitment. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Plan: The minimum time duration that you commit to purchasing resources. - // The plan that you choose determines the preset term length of the - // commitment (which is 1 year or 3 years) and affects the discount rate - // that - // you receive for your resources. Committing to a longer time - // duration - // typically gives you a higher discount rate. The supported values for - // this - // field are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 years). - // - // Possible values: - // "INVALID" - // "SIXTY_MONTH" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - // "TWENTY_FOUR_MONTH" - Plan string `json:"plan,omitempty"` - // Region: [Output Only] URL of the region where the commitment and - // committed - // resources are located. - Region string `json:"region,omitempty"` - // Reservations: The list of new reservations that you want to create and - // attach to this - // commitment. - // - // You must attach reservations to your commitment if your commitment - // specifies any GPUs or Local SSD disks. For more information, see - // Attach reservations to resource-based commitments. - // - // Specify this property only if you want to create new - // reservations to attach. To attach existing reservations, specify - // theexistingReservations property instead. - Reservations []*Reservation `json:"reservations,omitempty"` - // ResourceStatus: [Output Only] Status information for Commitment resource. - ResourceStatus *CommitmentResourceStatus `json:"resourceStatus,omitempty"` - // Resources: The list of all the hardware resources, with their types and - // amounts, that - // you want to commit to. Specify as a separate entry in the list for - // each - // individual resource type. - Resources []*ResourceCommitment `json:"resources,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SplitSourceCommitment: The source commitment from which you are transferring - // resources to create - // the new split commitment. For more information, see - // Split commitments. - SplitSourceCommitment string `json:"splitSourceCommitment,omitempty"` - // StartTimestamp: [Output Only] Commitment start time inRFC3339 - // text format. - StartTimestamp string `json:"startTimestamp,omitempty"` - // Status: [Output Only] Status of the commitment with regards to eventual - // expiration - // (each commitment has an end date defined). Status can be one of - // the - // following values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED. - // - // Possible values: - // "ACTIVE" - // "CANCELED_EARLY_TERMINATION" - // "CANCELING" - // "CANCELLED" - Deprecate CANCELED status. Will use separate status to - // differentiate - // cancel by mergeCud or manual cancellation. - // "CREATING" - // "EXPIRED" - // "NOT_YET_ACTIVE" - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - // Type: The type of commitment; specifies the - // machine series for which you want to commit to purchasing resources. - // The choice of machine series affects the discount rate and the - // eligible - // resource types. - // - // The type must be one of the following:ACCELERATOR_OPTIMIZED, - // ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, - // COMPUTE_OPTIMIZED_C2D, - // COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, - // GENERAL_PURPOSE,GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, - // GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, - // GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, - // MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, - // MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3. - // For example, type MEMORY_OPTIMIZED specifies a commitment - // that applies only to eligible resources of memory optimized M1 and - // M2 - // machine series. Type GENERAL_PURPOSE specifies a commitment - // that applies only to eligible resources of general purpose N1 - // machine - // series. - // - // Possible values: - // "ACCELERATOR_OPTIMIZED" - // "ACCELERATOR_OPTIMIZED_A3" - // "ACCELERATOR_OPTIMIZED_A3_MEGA" - // "ACCELERATOR_OPTIMIZED_A3_ULTRA" - // "ACCELERATOR_OPTIMIZED_A4" - // "ACCELERATOR_OPTIMIZED_A4X" - // "ACCELERATOR_OPTIMIZED_A4X_MAX" - // "COMPUTE_OPTIMIZED" - // "COMPUTE_OPTIMIZED_C2D" - // "COMPUTE_OPTIMIZED_C3" - // "COMPUTE_OPTIMIZED_C3D" - // "COMPUTE_OPTIMIZED_H3" - // "COMPUTE_OPTIMIZED_H4D" - // "GENERAL_PURPOSE" - // "GENERAL_PURPOSE_C4" - // "GENERAL_PURPOSE_C4A" - // "GENERAL_PURPOSE_C4D" - // "GENERAL_PURPOSE_E2" - // "GENERAL_PURPOSE_N2" - // "GENERAL_PURPOSE_N2D" - // "GENERAL_PURPOSE_N4" - // "GENERAL_PURPOSE_N4D" - // "GENERAL_PURPOSE_T2D" - // "GRAPHICS_OPTIMIZED" - // "GRAPHICS_OPTIMIZED_G4" - // "MEMORY_OPTIMIZED" - // "MEMORY_OPTIMIZED_M3" - // "MEMORY_OPTIMIZED_M4" - // "MEMORY_OPTIMIZED_M4_6TB" - // "MEMORY_OPTIMIZED_X4" - // "MEMORY_OPTIMIZED_X4_16TB" - // "MEMORY_OPTIMIZED_X4_24TB" - // "MEMORY_OPTIMIZED_X4_32TB" - // "STORAGE_OPTIMIZED_Z3" - // "TYPE_UNSPECIFIED" - Note for internal users: When adding a new enum Type - // for v1, make sure - // to also add it in the comment for the `optional Type type` definition. - // This ensures that the public documentation displays the new enum Type. - 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. "AutoRenew") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoRenew") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Commitment) MarshalJSON() ([]byte, error) { - type NoMethod Commitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CommitmentsScopedList resources. - Items map[string]CommitmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#commitmentAggregatedList - // for aggregated lists of - // commitments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CommitmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentAggregatedListWarning: [Output Only] Informational warning -// message. -type CommitmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentList: Contains a list of Commitment resources. -type CommitmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Commitment resources. - Items []*Commitment `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#commitmentList - // for lists of commitments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CommitmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentListWarning: [Output Only] Informational warning message. -type CommitmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentResourceStatus: [Output Only] Contains output only fields. -type CommitmentResourceStatus struct { - // CancellationInformation: [Output Only] An optional, contains all the needed - // information - // of cancellation. - CancellationInformation *CommitmentResourceStatusCancellationInformation `json:"cancellationInformation,omitempty"` - // CustomTermEligibilityEndTimestamp: [Output Only] Indicates the end time of - // customer's eligibility to send - // custom term requests in RFC3339 text format. Term extension requests - // that - // (not the end time in the request) after this time will be rejected. - CustomTermEligibilityEndTimestamp string `json:"customTermEligibilityEndTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "CancellationInformation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CancellationInformation") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentResourceStatusCancellationInformation struct { - // CanceledCommitment: [Output Only] An optional amount of CUDs canceled so far - // in the last - // 365 days. - CanceledCommitment *Money `json:"canceledCommitment,omitempty"` - // CanceledCommitmentLastUpdatedTimestamp: [Output Only] An optional last - // update time of canceled_commitment.RFC3339 text format. - CanceledCommitmentLastUpdatedTimestamp string `json:"canceledCommitmentLastUpdatedTimestamp,omitempty"` - // CancellationCap: [Output Only] An optional,the cancellation cap for how - // much - // commitments can be canceled in a rolling 365 per billing account. - CancellationCap *Money `json:"cancellationCap,omitempty"` - // CancellationFee: [Output Only] An optional, cancellation fee. - CancellationFee *Money `json:"cancellationFee,omitempty"` - // CancellationFeeExpirationTimestamp: [Output Only] An optional, cancellation - // fee expiration time.RFC3339 text format. - CancellationFeeExpirationTimestamp string `json:"cancellationFeeExpirationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanceledCommitment") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanceledCommitment") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentResourceStatusCancellationInformation) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentResourceStatusCancellationInformation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedList struct { - // Commitments: [Output Only] The list of commitments contained in this scope. - Commitments []*Commitment `json:"commitments,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // commitments - // when the list is empty. - Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Commitments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Commitments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentsScopedListWarning: [Output Only] Informational warning which -// replaces the list of commitments -// when the list is empty. -type CommitmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheck: Represents a composite health check. -// -// A composite health check resource specifies the health source resources -// and -// the health destination resource to which the aggregated health result -// from -// the health source resources is delivered. -type CompositeHealthCheck struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a CompositeHealthCheck. An up-to-date fingerprint - // must be provided in order to patch the CompositeHealthCheck; Otherwise, - // the request will fail with error 412 conditionNotMet. To see - // the latest fingerprint, make a get() request to retrieve - // the - // CompositeHealthCheck. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthDestination: URL to the destination resource. Must be set. Must be - // aForwardingRule. The ForwardingRule must have - // load balancing scheme INTERNAL orINTERNAL_MANAGED and must be regional and - // in the same region - // as the CompositeHealthCheck (cross-region deployment forINTERNAL_MANAGED is - // not supported). Can be mutated. - HealthDestination string `json:"healthDestination,omitempty"` - // HealthSources: URLs to the HealthSource resources whose results are - // AND'ed. - // I.e. he aggregated result is is HEALTHY only if all sources - // are HEALTHY. Must have at least 1. Must not have more than 10. - // Must be regional and in the same region as theCompositeHealthCheck. Can be - // mutated. - HealthSources []string `json:"healthSources,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#compositeHealthCheck - // for composite health checks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the composite health check - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckAggregatedList: Contains a list of -// CompositeHealthChecksScopedList. -type CompositeHealthCheckAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CompositeHealthChecksScopedList resources. - Items map[string]CompositeHealthChecksScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CompositeHealthCheckAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckAggregatedListWarning: [Output Only] Informational -// warning message. -type CompositeHealthCheckAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthCheckAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CompositeHealthCheck resources. - Items []*CompositeHealthCheck `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#compositeHealthCheck - // for composite health checks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CompositeHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckListWarning: [Output Only] Informational warning -// message. -type CompositeHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthChecksScopedList struct { - // CompositeHealthChecks: A list of CompositeHealthChecks contained in this - // scope. - CompositeHealthChecks []*CompositeHealthCheck `json:"compositeHealthChecks,omitempty"` - // Warning: Informational warning which replaces the list of composite health - // checks - // when the list is empty. - Warning *CompositeHealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompositeHealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompositeHealthChecks") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthChecksScopedListWarning: Informational warning which replaces -// the list of composite health checks -// when the list is empty. -type CompositeHealthChecksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthChecksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthChecksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConfidentialInstanceConfig: A set of Confidential Instance options. -type ConfidentialInstanceConfig struct { - // ConfidentialInstanceType: Defines the type of technology used by the - // confidential instance. - // - // Possible values: - // "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do not use - // this value. - // "SEV" - AMD Secure Encrypted Virtualization. - // "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested Paging. - // "TDX" - Intel Trust Domain eXtension. - ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"` - // ConfidentialParavisorConfig: Defines a set of Confidential Paravisor (SVSM) - // options. - ConfidentialParavisorConfig *ConfidentialParavisorConfig `json:"confidentialParavisorConfig,omitempty"` - // EnableConfidentialCompute: Defines whether the instance should have - // confidential compute enabled. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidentialInstanceType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidentialInstanceType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConfidentialInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConfidentialParavisorConfig: A set of Confidential Paravisor (SVSM) options. -type ConfidentialParavisorConfig struct { - // Possible values: - // "CONFIDENTIAL_TPM_TYPE_UNSPECIFIED" - // "EPHEMERAL" - // "NO_CC_TPM" - ConfidentialTpmType string `json:"confidentialTpmType,omitempty"` - // Possible values: - // "RESTRICTED" - // "SEV_SNP_IRQ_MODE_UNSPECIFIED" - // "UNRESTRICTED" - SevSnpIrqMode string `json:"sevSnpIrqMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidentialTpmType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidentialTpmType") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConfidentialParavisorConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConfidentialParavisorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectionDraining: Message containing connection draining configuration. -type ConnectionDraining struct { - // DrainingTimeoutSec: Configures a duration timeout for existing requests on a - // removed backend - // instance. For supported load balancers and protocols, as described - // inEnabling - // connection draining. - DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainingTimeoutSec") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectionDraining) MarshalJSON() ([]byte, error) { - type NoMethod ConnectionDraining - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsistentHashLoadBalancerSettings: This message defines settings for a -// consistent hash style load balancer. -type ConsistentHashLoadBalancerSettings struct { - // HttpCookie: Hash is based on HTTP Cookie. This field describes a HTTP cookie - // that will - // be used as the hash key for the consistent hash load balancer. If the - // cookie is not present, it will be generated. This field is applicable if - // the sessionAffinity is set to HTTP_COOKIE. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - HttpCookie *ConsistentHashLoadBalancerSettingsHttpCookie `json:"httpCookie,omitempty"` - // HttpHeaderName: The hash based on the value of the specified header field. - // This field is - // applicable if the sessionAffinity is set toHEADER_FIELD. - HttpHeaderName string `json:"httpHeaderName,omitempty"` - // MinimumRingSize: The minimum number of virtual nodes to use for the hash - // ring. Defaults to - // 1024. Larger ring sizes result in more granular load distributions. If - // the - // number of hosts in the load balancing pool is larger than the ring - // size, - // each host will be assigned a single virtual node. - MinimumRingSize int64 `json:"minimumRingSize,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "HttpCookie") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpCookie") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsistentHashLoadBalancerSettings) MarshalJSON() ([]byte, error) { - type NoMethod ConsistentHashLoadBalancerSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsistentHashLoadBalancerSettingsHttpCookie: The information about the HTTP -// Cookie on which the hash function is based -// for load balancing policies that use a consistent hash. -type ConsistentHashLoadBalancerSettingsHttpCookie struct { - // Name: Name of the cookie. - Name string `json:"name,omitempty"` - // Path: Path to set for the cookie. - Path string `json:"path,omitempty"` - // Ttl: Lifetime of the cookie. - Ttl *Duration `json:"ttl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsistentHashLoadBalancerSettingsHttpCookie) MarshalJSON() ([]byte, error) { - type NoMethod ConsistentHashLoadBalancerSettingsHttpCookie - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CorsPolicy: The specification for allowing client-side cross-origin -// requests. For more -// information about the W3C recommendation for cross-origin resource -// sharing -// (CORS), see Fetch API Living -// Standard. -type CorsPolicy struct { - // AllowCredentials: In response to a preflight request, setting this to - // true - // indicates that - // the actual request can include user credentials. This field translates - // to - // the Access-Control-Allow-Credentials header. - // - // Default is false. - AllowCredentials bool `json:"allowCredentials,omitempty"` - // AllowHeaders: Specifies the content for the - // Access-Control-Allow-Headers - // header. - AllowHeaders []string `json:"allowHeaders,omitempty"` - // AllowMethods: Specifies the content for the - // Access-Control-Allow-Methods - // header. - AllowMethods []string `json:"allowMethods,omitempty"` - // AllowOriginRegexes: Specifies a regular expression that matches allowed - // origins. For - // more information, see regular expression syntax. - // - // An origin is allowed if it matches either an item inallowOrigins or an item - // inallowOriginRegexes. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. - AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` - // AllowOrigins: Specifies the list of origins that is allowed to do CORS - // requests. - // - // An origin is allowed if it matches either an item inallowOrigins or an item - // inallowOriginRegexes. - AllowOrigins []string `json:"allowOrigins,omitempty"` - // Disabled: If true, disables the CORS policy. - // The default value is false, which indicates that the CORS - // policy is in effect. - Disabled bool `json:"disabled,omitempty"` - // ExposeHeaders: Specifies the content for the - // Access-Control-Expose-Headers - // header. - ExposeHeaders []string `json:"exposeHeaders,omitempty"` - // MaxAge: Specifies how long results of a preflight request can be cached - // in - // seconds. This field translates to the Access-Control-Max-Age - // header. - MaxAge int64 `json:"maxAge,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCredentials") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CorsPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CorsPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetwork: A resource that represents a cross-site network. -// -// You can use cross-site networks to connect your on-premises networks to -// each other through Interconnect connections. -type CrossSiteNetwork struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of the cross-site network. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for - // cross-site networks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetwork) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetworkList: Response to the list request that contains a list of -// cross-site networks. -type CrossSiteNetworkList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CrossSiteNetwork resources. - Items []*CrossSiteNetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for - // cross-site networks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CrossSiteNetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkList) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetworkListWarning: [Output Only] Informational warning message. -type CrossSiteNetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CrossSiteNetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CrossSiteNetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomErrorResponsePolicy: Specifies the custom error response policy that -// must be applied when the -// backend service or backend bucket responds with an error. -type CustomErrorResponsePolicy struct { - // ErrorResponseRules: Specifies rules for returning error responses. - // - // In a given policy, if you specify rules for both a range of error codes - // as well as rules for specific error codes then rules with specific - // error - // codes have a higher priority. For example, assume that you configure a - // rule - // for 401 (Un-authorized) code, and another for all 4 series - // error codes (4XX). If the backend service returns a401, then the rule for - // 401 will be applied. - // However if the backend service returns a 403, the rule for4xx takes effect. - ErrorResponseRules []*CustomErrorResponsePolicyCustomErrorResponseRule `json:"errorResponseRules,omitempty"` - // ErrorService: The full or partial URL to the BackendBucket resource - // that - // contains the custom error content. Examples are: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - // - compute/v1/projects/project/global/backendBuckets/myBackendBucket - // - global/backendBuckets/myBackendBucket - // - // If errorService is not specified at lower levels likepathMatcher, pathRule - // and routeRule, - // an errorService specified at a higher level in theUrlMap will be used. - // IfUrlMap.defaultCustomErrorResponsePolicy contains one or - // moreerrorResponseRules[], it must specifyerrorService. - // - // If load balancer cannot reach - // the backendBucket, a simple Not Found Error will - // be returned, with the original response code (oroverrideResponseCode if - // configured). - // - // errorService is not supported for internal or regionalHTTP/HTTPS load - // balancers. - ErrorService string `json:"errorService,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorResponseRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorResponseRules") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomErrorResponsePolicy) MarshalJSON() ([]byte, error) { - type NoMethod CustomErrorResponsePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomErrorResponsePolicyCustomErrorResponseRule: Specifies the mapping -// between the response code that will be returned along -// with the custom error content and the response code returned by the -// backend -// service. -type CustomErrorResponsePolicyCustomErrorResponseRule struct { - // MatchResponseCodes: Valid values include: - // - // - // - A number between 400 and 599: For example - // 401 or 503, in which case the load balancer - // applies the policy if the error code exactly matches this value. - // - 5xx: Load Balancer will apply the policy if the - // backend service responds with any response code in the range of - // 500 to 599. - // - 4xx: Load - // Balancer will apply the policy if the backend service responds with - // any - // response code in the range of 400 to - // 499. - // - // Values must be unique within matchResponseCodes and across - // allerrorResponseRules ofCustomErrorResponsePolicy. - MatchResponseCodes []string `json:"matchResponseCodes,omitempty"` - // OverrideResponseCode: The HTTP status code returned with the response - // containing the custom - // error content. If overrideResponseCode is not supplied, the - // same response code returned by the original backend bucket or - // backend - // service is returned to the client. - OverrideResponseCode int64 `json:"overrideResponseCode,omitempty"` - // Path: The full path to a file within backendBucket . For - // example:/errors/defaultError.html - // - // path must start - // with a leading slash. path cannot have trailing slashes. - // - // If the file is not available in backendBucket or the - // load balancer cannot reach the BackendBucket, a simpleNot Found Error is - // returned to the client. - // - // The value must - // be from 1 to 1024 characters - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "MatchResponseCodes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MatchResponseCodes") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomErrorResponsePolicyCustomErrorResponseRule) MarshalJSON() ([]byte, error) { - type NoMethod CustomErrorResponsePolicyCustomErrorResponseRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKey struct { - // KmsKeyName: The name of the encryption key that is stored in Google Cloud - // KMS. - // For example: - // - // "kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // - // The fully-qualifed key name may be returned for resource GET requests. For - // - // example: - // - // "kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // /cryptoKeyVersions/1 - KmsKeyName string `json:"kmsKeyName,omitempty"` - // KmsKeyServiceAccount: The service account being used for the encryption - // request for the given KMS - // key. If absent, the Compute Engine default service account is used. - // For example: - // - // "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ - KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` - // RawKey: Specifies a 256-bit customer-supplied - // encryption key, encoded in RFC - // 4648 base64 to either encrypt or decrypt this resource. You can - // provide either the rawKey or thersaEncryptedKey. - // For example: - // - // "rawKey": - // "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - RawKey string `json:"rawKey,omitempty"` - // RsaEncryptedKey: Specifies an RFC 4648 base64 encoded, RSA-wrapped - // 2048-bit - // customer-supplied encryption key to either encrypt or decrypt this - // resource. You can provide either the rawKey or thersaEncryptedKey. - // For - // example: - // - // "rsaEncryptedKey": - // "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH - // z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD - // D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" - // - // The key must meet the following requirements before you can provide it to - // - // Compute Engine: - // - // 1. The key is wrapped using a RSA public key certificate provided by - // Google. - // 2. After being wrapped, the key must be encoded in RFC 4648 base64 - // encoding. - // - // Gets the RSA public key certificate provided by Google at: - // - // - // - // https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem - RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"` - // Sha256: [Output only] TheRFC - // 4648 base64 encoded SHA-256 hash of the customer-supplied - // encryption key that protects this resource. - Sha256 string `json:"sha256,omitempty"` - // ForceSendFields is a list of field names (e.g. "KmsKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsKeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomerEncryptionKey) MarshalJSON() ([]byte, error) { - type NoMethod CustomerEncryptionKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKeyProtectedDisk struct { - // DiskEncryptionKey: Decrypts data associated with the disk with - // acustomer-supplied - // encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // Source: Specifies a valid partial or full URL to an existing Persistent - // Disk - // resource. This field is only applicable for persistent disks. - // For example: - // - // "source": "/compute/v1/projects/project_id/zones/zone/disks/ - // disk_name - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) { - type NoMethod CustomerEncryptionKeyProtectedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Date: Represents a whole or partial calendar date, such as a birthday. The -// time of -// day and time zone are either specified elsewhere or are insignificant. -// The -// date is relative to the Gregorian Calendar. This can represent one of -// the -// following: -// -// - A full date, with non-zero year, month, and day values. -// - A month and day, with a zero year (for example, an anniversary). -// - A year on its own, with a zero month and a zero day. -// - A year and month, with a zero day (for example, a credit card expiration -// date). -// -// Related types: -// -// * google.type.TimeOfDay -// * google.type.DateTime -// * google.protobuf.Timestamp -type Date struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, - // or 0 - // to specify a year by itself or a year and month where the day - // isn't - // significant. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a - // month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without - // a year. - Year int64 `json:"year,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Date) MarshalJSON() ([]byte, error) { - type NoMethod Date - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DeprecationStatus: Deprecation status for a public resource. -type DeprecationStatus struct { - // Deleted: An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to DELETED. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Deleted string `json:"deleted,omitempty"` - // Deprecated -- An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to DEPRECATED. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Deprecated string `json:"deprecated,omitempty"` - // Obsolete: An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to OBSOLETE. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Obsolete string `json:"obsolete,omitempty"` - // Replacement: The URL of the suggested replacement for a deprecated - // resource. - // The suggested replacement resource must be the same kind of resource as - // the - // deprecated resource. - Replacement string `json:"replacement,omitempty"` - // State: The deprecation state of this resource. This can be - // ACTIVE,DEPRECATED, OBSOLETE, or DELETED. - // Operations which communicate the end of life date for an image, can - // useACTIVE. Operations which create a new resource using aDEPRECATED resource - // will return successfully, but with a - // warning indicating the deprecated resource and recommending its - // replacement. Operations which use OBSOLETE orDELETED resources will be - // rejected and result in an error. - // - // Possible values: - // "ACTIVE" - // "DELETED" - // "DEPRECATED" - // "OBSOLETE" - State string `json:"state,omitempty"` - // StateOverride: The rollout policy for this deprecation. This policy is only - // enforced by - // image family views. The rollout policy restricts the zones where - // the - // associated resource is considered in a deprecated state. When the - // rollout - // policy does not include the user specified zone, or if the zone is - // rolled - // out, the associated resource is considered in a deprecated state. - // - // The rollout policy for this deprecation is read-only, except for - // allowlisted users. This field might not be configured. To view the - // latest - // non-deprecated image in a specific zone, use theimageFamilyViews.get method. - StateOverride *RolloutPolicy `json:"stateOverride,omitempty"` - // ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Deleted") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DeprecationStatus) MarshalJSON() ([]byte, error) { - type NoMethod DeprecationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Disk: Represents a Persistent Disk resource. -// -// Google Compute Engine has two Disk resources: -// -// * Zonal (/compute/docs/reference/rest/alpha/disks) -// * Regional (/compute/docs/reference/rest/alpha/regionDisks) -// -// Persistent disks are required for running your VM instances. -// Create both boot and non-boot (data) persistent disks. For more -// information, -// read Persistent Disks. For more -// storage options, read Storage options. -// -// The disks resource represents a zonal persistent disk. -// For more information, readZonal persistent disks. -// -// The regionDisks resource represents a -// regional persistent disk. For more information, read -// Regional resources. -type Disk struct { - // AccessMode: The access mode of the disk. - // - // - // - READ_WRITE_SINGLE: The default AccessMode, means the - // disk can be attached to single instance in RW mode. - // - READ_WRITE_MANY: The AccessMode means the disk can be - // attached to multiple instances in RW mode. - // - READ_ONLY_MANY: The AccessMode means the disk can be - // attached to multiple instances in RO mode. - // - // - // The AccessMode is only valid for Hyperdisk disk types. - // - // Possible values: - // "READ_ONLY_MANY" - The AccessMode means the disk can be attached to - // multiple instances in RO - // mode. - // "READ_WRITE_MANY" - The AccessMode means the disk can be attached to - // multiple instances in RW - // mode. - // "READ_WRITE_SINGLE" - The default AccessMode, means the disk can be - // attached to single instance - // in RW mode. - AccessMode string `json:"accessMode,omitempty"` - // Architecture: The architecture of the disk. Valid values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AsyncPrimaryDisk: Disk asynchronously replicated into this disk. - AsyncPrimaryDisk *DiskAsyncReplication `json:"asyncPrimaryDisk,omitempty"` - // AsyncSecondaryDisks: [Output Only] A list of disks this disk is - // asynchronously replicated to. - AsyncSecondaryDisks map[string]DiskAsyncReplicationList `json:"asyncSecondaryDisks,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskEncryptionKey: Encrypts the disk using a - // customer-supplied encryption key or a - // customer-managed encryption key. - // - // Encryption keys do not protect access to metadata of the disk. - // - // After you encrypt a disk with a customer-supplied key, you must provide - // the - // same key if you use the disk later. For example, to create a disk - // snapshot, - // to create a disk image, to create a machine image, or to attach the disk - // to - // a virtual machine. - // - // After you encrypt a disk with a customer-managed key, - // thediskEncryptionKey.kmsKeyName is set to a key *version* - // name once the disk is created. The disk is encrypted with this version - // of - // the key. In the response, diskEncryptionKey.kmsKeyName appears - // in the following - // format: - // - // "diskEncryptionKey.kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // /cryptoKeysVersions/version - // - // If you do not provide an encryption key when creating the disk, then the - // - // disk is encrypted using an automatically generated key and you don't need - // - // to provide a key to use the disk later. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // EnableConfidentialCompute: Whether this disk is using confidential compute - // mode. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // EraseWindowsVssSignature: Specifies whether the disk restored from a source - // snapshot should erase - // Windows specific VSS signature. - EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interface: [Deprecated] Specifies the disk interface to use for attaching - // this disk, - // which is either SCSI or NVME. The default isSCSI. - // - // Possible values: - // "NVME" - // "SCSI" - // "UNSPECIFIED" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#disk for - // disks. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this disk, - // which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a disk. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this disk. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LastAttachTimestamp: [Output Only] Last attach timestamp inRFC3339 - // text format. - LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` - // LastDetachTimestamp: [Output Only] Last detach timestamp inRFC3339 - // text format. - LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are attached - // to this disk. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: A list of publicly visible licenses. Reserved for Google's use. - Licenses []string `json:"licenses,omitempty"` - // LocationHint: An opaque location hint used to place the disk close to other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // Locked: [Output Only] The field indicates if the disk is created from a - // locked - // source image. Attachment of a disk created from a locked source image - // will - // cause the following operations to become irreversibly prohibited: - // - // - R/W or R/O disk attachment to any other instance - // - Disk detachment. And the disk can only be deleted when the instance - // is deleted - // - Creation of images or snapshots - // - Disk cloning - // - // - // - // Furthermore, the instance with at least one disk with locked flag set - // to - // true will be prohibited from performing the operations below: - // - // - Further attachment of secondary disks. - // - Detachment of any disks - // - Create machine images - // - Create instance template - // - Delete the instance with --keep-disk parameter set to true for locked - // disks - // - Attach a locked disk with --auto-delete parameter set to false - Locked bool `json:"locked,omitempty"` - // MultiWriter: Indicates whether or not the disk can be read/write attached - // to - // more than one instance. - MultiWriter bool `json:"multiWriter,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Options: Internal use only. - Options string `json:"options,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *DiskParams `json:"params,omitempty"` - // PhysicalBlockSizeBytes: Physical block size of the persistent disk, in - // bytes. - // If not present in a request, a default value is used. - // The currently supported size is 4096, other sizes may be added in - // the future. - // If an unsupported value is requested, the error message will list - // the supported values for the caller's project. - PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"` - // ProvisionedIops: Indicates how many IOPS to provision for the disk. This - // sets the number - // of I/O operations per second that the disk can handle. Values must - // be - // between 10,000 and 120,000. For more details, see theExtreme persistent - // disk documentation. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: Indicates how much throughput to provision for the - // disk. This sets the - // number of throughput mb per second that the disk can handle. Values must - // be - // greater than or equal to 1. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // Region: [Output Only] URL of the region where the disk resides. Only - // applicable for - // regional resources. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // ReplicaZones: URLs of the zones where the disk should be replicated to. Only - // applicable - // for regional resources. - ReplicaZones []string `json:"replicaZones,omitempty"` - // ResourcePolicies: Resource policies applied to this disk for automatic - // snapshot creations. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Status information for the disk resource. - ResourceStatus *DiskResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SizeGb: Size, in GB, of the persistent disk. You can specify - // this field when creating a persistent disk using thesourceImage, - // sourceSnapshot, orsourceDisk parameter, or specify it alone to create an - // empty - // persistent disk. - // - // If you specify this field along with a source, the value ofsizeGb must not - // be less than the size of the - // source. - // Acceptable values are greater than 0. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // SourceConsistencyGroupPolicy: [Output Only] URL of the - // DiskConsistencyGroupPolicy for a secondary disk - // that was created using a consistency group. - SourceConsistencyGroupPolicy string `json:"sourceConsistencyGroupPolicy,omitempty"` - // SourceConsistencyGroupPolicyId: [Output Only] ID of the - // DiskConsistencyGroupPolicy for a secondary disk - // that was created using a consistency group. - SourceConsistencyGroupPolicyId string `json:"sourceConsistencyGroupPolicyId,omitempty"` - // SourceDisk: The source disk used to create this disk. You can provide this - // as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskId: [Output Only] The unique ID of the disk used to create this - // disk. This - // value identifies the exact disk that was used to create this - // persistent - // disk. For example, if you created the persistent disk from a disk that - // was later deleted and recreated under the same name, the source disk - // ID - // would identify the exact version of the disk that was used. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceImage: The source image used to create this disk. If the source image - // is - // deleted, this field will not be set. - // - // To create a disk with one of the public operating system images, specify - // the image by its family name. For example, specifyfamily/debian-9 to use the - // latest Debian 9 - // image: - // - // projects/debian-cloud/global/images/family/debian-9 - // - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - // - // - // To create a disk with a custom image that you created, specify the - // image name in the following format: - // - // global/images/my-custom-image - // - // - // You can also specify a custom image by its image family, which returns - // the latest version of the image in that family. Replace the image name - // with family/family-name: - // - // global/images/family/my-image-family - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: Thecustomer-supplied - // encryption key of the source image. Required if the source image - // is - // protected by a customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceImageId: [Output Only] The ID value of the image used to create this - // disk. This - // value identifies the exact image that was used to create this - // persistent - // disk. For example, if you created the persistent disk from an image that - // was later deleted and recreated under the same name, the source image - // ID - // would identify the exact version of the image that was used. - SourceImageId string `json:"sourceImageId,omitempty"` - // SourceInstantSnapshot: The source instant snapshot used to create this disk. - // You can provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot - // - projects/project/zones/zone/instantSnapshots/instantSnapshot - // - zones/zone/instantSnapshots/instantSnapshot - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot - // used to create this - // disk. This value identifies the exact instant snapshot that was used - // to - // create this persistent disk. For example, if you created the persistent - // disk from an instant snapshot that was later deleted and recreated under - // the same name, the source instant snapshot ID would identify the - // exact - // version of the instant snapshot that was used. - SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` - // SourceMachineImage: The machine image to create the disk from. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/machineImages/machineImage - // - // - projects/project/global/machineImages/machineImage - // - global/machineImages/machineImage - SourceMachineImage string `json:"sourceMachineImage,omitempty"` - // SourceMachineImageDiskDeviceName: Input only. The device name of a disk - // within a given machine image. The - // source_machine_image must be specified. - SourceMachineImageDiskDeviceName string `json:"sourceMachineImageDiskDeviceName,omitempty"` - // SourceMachineImageEncryptionKey: Thecustomer-supplied - // encryption key of the source machine image. Required if the source - // machine image is protected by a customer-supplied encryption key. - SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` - // SourceMachineImageId: [Output Only] The unique ID of the machine image used - // to create this disk. - // This value identifies the exact machine image that was used to create - // this - // persistent disk. For example, if you created the persistent disk from - // a - // machine image that was later deleted and recreated under the same name, - // the - // source machine image ID would identify the exact version of the - // machine - // image that was used. - SourceMachineImageId string `json:"sourceMachineImageId,omitempty"` - // SourceSnapshot: The source snapshot used to create this disk. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot - // - // - projects/project/global/snapshots/snapshot - // - global/snapshots/snapshot - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: Thecustomer-supplied - // encryption key of the source snapshot. Required if the source snapshot - // is protected by a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to create - // this disk. This - // value identifies the exact snapshot that was used to create this - // persistent - // disk. For example, if you created the persistent disk from a snapshot - // that - // was later deleted and recreated under the same name, the source snapshot - // ID - // would identify the exact version of the snapshot that was used. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // SourceStorageObject: The full Google Cloud Storage URI where the disk image - // is stored. This file - // must be a gzip-compressed tarball whose name ends in .tar.gz or - // virtual - // machine disk whose name ends in vmdk. Valid URIs may start with gs:// - // or - // https://storage.googleapis.com/. This flag is not optimized for - // creating - // multiple disks from a source storage object. To create many disks from - // a - // source storage object, use gcloud compute images - // import instead. - SourceStorageObject string `json:"sourceStorageObject,omitempty"` - // Status: [Output Only] The status of disk creation. - // - // - // - CREATING: Disk is provisioning. - // - RESTORING: Source data is being copied into the - // disk. - // - FAILED: Disk creation failed. - // - READY: Disk is ready for use. - // - DELETING: Disk is deleting. - // - // Possible values: - // "CREATING" - Disk is provisioning - // "DELETING" - Disk is deleting. - // "FAILED" - Disk creation failed. - // "READY" - Disk is ready for use. - // "RESTORING" - Source data is being copied into the disk. - // "UNAVAILABLE" - Disk is currently unavailable and cannot be accessed, - // attached or - // detached. - Status string `json:"status,omitempty"` - // StoragePool: The storage pool in which the new disk is created. You can - // provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool - // - projects/project/zones/zone/storagePools/storagePool - // - zones/zone/storagePools/storagePool - StoragePool string `json:"storagePool,omitempty"` - // StorageType: [Deprecated] Storage type of the persistent disk. - // - // Possible values: - // "HDD" - // "SSD" - StorageType string `json:"storageType,omitempty"` - // Type: URL of the disk type resource describing which disk type to use to - // create - // the disk. Provide this when creating the disk. For - // example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent - // disk - // types. - Type string `json:"type,omitempty"` - // UserLicenses: A list of publicly visible user-licenses. Unlike regular - // licenses, user - // provided licenses can be modified after the disk is created. This includes - // a list of URLs to the license resource. For example, to provide a - // debian - // license: - // - // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - UserLicenses []string `json:"userLicenses,omitempty"` - // Users: [Output Only] Links to the users of the disk (attached instances) - // in form:projects/project/zones/zone/instances/instance - Users []string `json:"users,omitempty"` - // Zone: [Output Only] URL of the zone where the disk resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Disk) MarshalJSON() ([]byte, error) { - type NoMethod Disk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DisksScopedList resources. - Items map[string]DisksScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#diskAggregatedList for - // aggregated lists of persistent - // disks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskAggregatedListWarning: [Output Only] Informational warning message. -type DiskAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAsyncReplication struct { - // ConsistencyGroupPolicy: [Output Only] URL of the DiskConsistencyGroupPolicy - // if replication was - // started on the disk as a member of a group. - ConsistencyGroupPolicy string `json:"consistencyGroupPolicy,omitempty"` - // ConsistencyGroupPolicyId: [Output Only] ID of the DiskConsistencyGroupPolicy - // if replication was - // started on the disk as a member of a group. - ConsistencyGroupPolicyId string `json:"consistencyGroupPolicyId,omitempty"` - // Disk: The other disk asynchronously replicated to or from the current - // disk. - // You can provide this as a partial or full URL to the resource. - // For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - Disk string `json:"disk,omitempty"` - // DiskId: [Output Only] The unique ID of the other disk asynchronously - // replicated - // to or from the current disk. This value identifies the exact disk that - // was used to create this replication. For example, if you started - // replicating the persistent disk from a disk that was later deleted - // and - // recreated under the same name, the disk ID would identify the exact - // version of the disk that was used. - DiskId string `json:"diskId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsistencyGroupPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsistencyGroupPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAsyncReplication) MarshalJSON() ([]byte, error) { - type NoMethod DiskAsyncReplication - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAsyncReplicationList struct { - AsyncReplicationDisk *DiskAsyncReplication `json:"asyncReplicationDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncReplicationDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncReplicationDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAsyncReplicationList) MarshalJSON() ([]byte, error) { - type NoMethod DiskAsyncReplicationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskInstantiationConfig: A specification of the desired way to instantiate a -// disk in the instance -// template when its created from a source instance. -type DiskInstantiationConfig struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // CustomImage: The custom source image to be used to restore this disk when - // instantiating - // this instance template. - CustomImage string `json:"customImage,omitempty"` - // DeviceName: Specifies the device name of the disk to which the - // configurations apply to. - DeviceName string `json:"deviceName,omitempty"` - // InstantiateFrom: Specifies whether to include the disk and what image to - // use. Possible - // values are: - // - // - // - source-image: to use the same image that was used to - // create the source instance's corresponding disk. Applicable to the - // boot - // disk and additional read-write disks. - // - source-image-family: to use the same image family that - // was used to create the source instance's corresponding disk. - // Applicable - // to the boot disk and additional read-write disks. - // - custom-image: to use a user-provided image url for disk - // creation. Applicable to the boot disk and additional read-write - // disks. - // - attach-read-only: to attach a read-only - // disk. Applicable to read-only disks. - // - do-not-include: to exclude a disk from the template. - // Applicable to additional read-write disks, local SSDs, and read-only - // disks. - // - // Possible values: - // "ATTACH_READ_ONLY" - Attach the existing disk in read-only mode. The - // request will fail if the - // disk was attached in read-write mode on the source instance. Applicable - // to: read-only disks. - // "BLANK" - Create a blank disk. The disk will be created unformatted. - // Applicable to: - // additional read-write disks, local SSDs. - // "CUSTOM_IMAGE" - Use the custom image specified in the custom_image field. - // Applicable to: - // boot disk, additional read-write disks. - // "DEFAULT" - Use the default instantiation option for the corresponding - // type of disk. - // For boot disk and any other R/W disks, new custom images will be - // created - // from each disk. For read-only disks, they will be attached in - // read-only - // mode. Local SSD disks will be created as blank volumes. - // "DO_NOT_INCLUDE" - Do not include the disk in the instance template. - // Applicable to: - // additional read-write disks, local SSDs, read-only disks. - // "SOURCE_IMAGE" - Use the same source image used for creation of the source - // instance's - // corresponding disk. The request will fail if the source VM's disk - // was - // created from a snapshot. Applicable to: boot disk, additional - // read-write - // disks. - // "SOURCE_IMAGE_FAMILY" - Use the same source image family used for creation - // of the source - // instance's corresponding disk. The request will fail if the source image - // of the source disk does not belong to any image family. Applicable to: - // boot disk, additional read-write disks. - InstantiateFrom string `json:"instantiateFrom,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskInstantiationConfig) MarshalJSON() ([]byte, error) { - type NoMethod DiskInstantiationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskList: A list of Disk resources. -type DiskList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Disk resources. - Items []*Disk `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#diskList for - // lists of disks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskList) MarshalJSON() ([]byte, error) { - type NoMethod DiskList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskListWarning: [Output Only] Informational warning message. -type DiskListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a zone: - // - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - // TargetDisk: The URL of the target disk to move. This can be a full or - // partial URL. - // For example, the following are all valid URLs to a disk: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - TargetDisk string `json:"targetDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestinationZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod DiskMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskPairReplicationState struct { - // DataReplicationState: [Output Only] The status of disk creation. - // - // - // - ASYNC_REPLICATION_STATE_INITIALIZING: The device is - // doing the initial replication after starting the - // replication. - // - // - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The - // primary disk is healthily replicating to the secondary device i.e. - // last_replication_time is within RPO. - // - // - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: - // The replication is lagging above the SLO limit due to the disk's change - // rate being above the supported limit. - // - // - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: - // The replication is lagging, and the RPO is not being met due to some - // internal issue. - // - // - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The - // replication is completely stuck due to some internal error. - // - // - ASYNC_REPLICATION_STATE_STOPPING: The replication - // is under the process of being stopped. This is a transient state. - // - // - ASYNC_REPLICATION_STATE_STOPPED: The replication - // between the disk-pairs have stopped. - // - // - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN: - // The replication is lagging above the SLO limit for the disk in the - // consistency group due to disk's change rate being above the supported - // limit. - // - // Possible values: - // "ASYNC_REPLICATION_STATE_INITIALIZING" - The device is doing the initial - // replication after starting the - // replication. - // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN" - The - // replication is lagging behind (last_replication_time > RPO) for the - // disk in a consistency group because some other disk is writing the data at - // a rate above the supported limit. - // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN" - The replication - // is lagging behind (last_replication_time > RPO), because - // the disk's change rate is above the supported limit. - // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING" - The - // replication is lagging, and the RPO is not being met due to some - // internal issue. - // "ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY" - The primary disk is - // healthily replicating to the secondary device i.e. - // last_replication_time is within RPO. - // "ASYNC_REPLICATION_STATE_REPLICATION_STUCK" - The replication is - // completely stuck due to some internal error. - // "ASYNC_REPLICATION_STATE_STOPPED" - The replication between the disk-pairs - // have stopped. - // "ASYNC_REPLICATION_STATE_STOPPING" - The replication is under the process - // of being stopped. This is a - // transient sate. - // "ASYNC_REPLICATION_STATE_UNSPECIFIED" - DataReplicationState string `json:"dataReplicationState,omitempty"` - ReplicationDiskPair *ReplicationDiskPair `json:"replicationDiskPair,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataReplicationState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataReplicationState") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskPairReplicationState) MarshalJSON() ([]byte, error) { - type NoMethod DiskPairReplicationState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskParams: Additional disk params. -type DiskParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the disk. Tag keys - // and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskParams) MarshalJSON() ([]byte, error) { - type NoMethod DiskParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskResourceStatus struct { - AsyncPrimaryDisk *DiskResourceStatusAsyncReplicationStatus `json:"asyncPrimaryDisk,omitempty"` - // AsyncSecondaryDisks: Key: disk, value: AsyncReplicationStatus message - AsyncSecondaryDisks map[string]DiskResourceStatusAsyncReplicationStatus `json:"asyncSecondaryDisks,omitempty"` - // UsedBytes: [Output Only] Space used by data stored in the disk (in bytes). - // Note that - // this field is set only when the disk is in a storage pool. - UsedBytes int64 `json:"usedBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "AsyncPrimaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncPrimaryDisk") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod DiskResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskResourceStatusAsyncReplicationStatus struct { - // Possible values: - // "ACTIVE" - Replication is active. - // "CREATED" - Secondary disk is created and is waiting for replication to - // start. - // "STARTING" - Replication is starting. - // "STATE_UNSPECIFIED" - // "STOPPED" - Replication is stopped. - // "STOPPING" - Replication is stopping. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskResourceStatusAsyncReplicationStatus) MarshalJSON() ([]byte, error) { - type NoMethod DiskResourceStatusAsyncReplicationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskSettings struct { - // AccessLocation: Policy of which locations are allowed to create - // regional - // snapshots. - AccessLocation *DiskSettingsAccessLocation `json:"accessLocation,omitempty"` - // DefaultResourcePolicies: An optional parameter for storing the default - // resource policies that - // will be used for the Disks created in the given scope. - // - // The Key is a string type, provided by customers to uniquely identify - // the - // default Resource Policy entry. - // - // The Value is a Default ResourcePolicyDetails Object used to represent - // the - // detailed information of the Resource Policy entry. - DefaultResourcePolicies map[string]DiskSettingsResourcePolicyDetails `json:"defaultResourcePolicies,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettings) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskSettingsAccessLocation: AccessLocation is only used for regional -// snapshot. It contains which -// regions are allowed to create a regional snapshot from disks located in -// the -// given region/zone. -// It includes key-value pairs designed to store the following structure. -// The -// keys should match their corresponding values, which must be -// provided: -// -// access_location: { -// locations { -// us-central1 { -// region: "us-central1" -// }, -// asia-west2 { -// region: "asia-west2" -// } -// } -// } -type DiskSettingsAccessLocation struct { - // Locations: List of regions that can create a regional - // snapshot from the current region - Locations map[string]DiskSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` - // Policy: Policy of which location is allowed to access snapshot. - // - // Possible values: - // "ALL_REGIONS" - Any regions will be able to access the source location. - // "POLICY_UNSPECIFIED" - // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to create - // region scoped - // snapshots - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettingsAccessLocation) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettingsAccessLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskSettingsAccessLocationAccessLocationPreference: A structure for -// specifying an allowed target region to create snapshot. -type DiskSettingsAccessLocationAccessLocationPreference struct { - // Region: Accessible region name - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Region") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Region") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettingsAccessLocationAccessLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettingsAccessLocationAccessLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskSettingsResourcePolicyDetails: This is the object for storing the detail -// information about the -// Resource Policy that will be set as default ones for the Disks -// that is using the DiskSettings. -// -// It contains: -// - one target Resource Policy referenced by its Fully-Qualified URL, -// - [output only] Disk Types that will be excluded from using this -// Resource Policy, -// - Other filtering support (e.g. Label filtering) for Default Resource -// Policy can be added here as well -type DiskSettingsResourcePolicyDetails struct { - // ExcludedDiskTypes: [Output Only] A list of Disk Types that will be excluded - // from applying - // the Resource Policy referenced here. - // If absent, Disks created in any DiskType can use the referenced - // default Resource Policy. - ExcludedDiskTypes []string `json:"excludedDiskTypes,omitempty"` - // ResourcePolicy: The target Resource Policies identified by their - // Fully-Qualified URL. - ResourcePolicy string `json:"resourcePolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExcludedDiskTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExcludedDiskTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettingsResourcePolicyDetails) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettingsResourcePolicyDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskType: Represents a Disk Type resource. -// -// Google Compute Engine has two Disk Type resources: -// -// * Regional (/compute/docs/reference/rest/alpha/regionDiskTypes) -// * Zonal (/compute/docs/reference/rest/alpha/diskTypes) -// -// You can choose from a variety of disk types based on your needs. -// For more information, readStorage options. -// -// The diskTypes resource represents disk types for a zonal -// persistent disk. -// For more information, readZonal persistent disks. -// -// The regionDiskTypes resource represents disk types for a -// regional persistent disk. For more information, read Regional persistent -// disks. -type DiskType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultDiskSizeGb: [Output Only] Server-defined default disk size in GB. - DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - // Deprecated -- [Output Only] The deprecation status associated with this disk - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#diskType - // for disk types. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the disk type resides. - // Only - // applicable for regional resources. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ValidDiskSize: [Output Only] An optional textual description of the valid - // disk size, - // such as "10GB-10TB". - ValidDiskSize string `json:"validDiskSize,omitempty"` - // Zone: [Output Only] URL of the zone where the disk type resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskType) MarshalJSON() ([]byte, error) { - type NoMethod DiskType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskTypesScopedList resources. - Items map[string]DiskTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#diskTypeAggregatedList. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeAggregatedListWarning: [Output Only] Informational warning message. -type DiskTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeList: Contains a list of disk types. -type DiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#diskTypeList - // for disk types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeListWarning: [Output Only] Informational warning message. -type DiskTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedList struct { - // DiskTypes: [Output Only] A list of disk types contained in this scope. - DiskTypes []*DiskType `json:"diskTypes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of disk - // types - // when the list is empty. - Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of disk types -// when the list is empty. -type DiskTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksAddResourcePoliciesRequest struct { - // ResourcePolicies: Full or relative path to the resource policy to be added - // to this disk. You - // can only specify one resource policy. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksResizeRequest struct { - // SizeGb: The new size of the persistent disk, which is specified in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SizeGb") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksScopedList struct { - // Disks: [Output Only] A list of disks contained in this scope. - Disks []*Disk `json:"disks,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // disks when - // the list is empty. - Warning *DisksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisksScopedListWarning: [Output Only] Informational warning which replaces -// the list of disks when -// the list is empty. -type DisksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DisksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksStartAsyncReplicationRequest struct { - // AsyncSecondaryDisk: The secondary disk to start asynchronous replication - // to. - // You can provide this as a partial or full URL to the resource. For - // example, - // the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncSecondaryDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksStartAsyncReplicationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisksStopGroupAsyncReplicationResource: A transient resource used in -// compute.disks.stopGroupAsyncReplication -// and -// compute.regionDisks.stopGroupAsyncReplication. It is only used to -// process -// requests and is not persisted. -type DisksStopGroupAsyncReplicationResource struct { - // ResourcePolicy: The URL of the DiskConsistencyGroupPolicy for the group of - // disks to stop. - // This may be a full or partial URL, such as: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // regions/region/resourcePolicies/resourcePolicy - ResourcePolicy string `json:"resourcePolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksStopGroupAsyncReplicationResource) MarshalJSON() ([]byte, error) { - type NoMethod DisksStopGroupAsyncReplicationResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisplayDevice: A set of Display Device options -type DisplayDevice struct { - // EnableDisplay: Defines whether the instance has Display enabled. - EnableDisplay bool `json:"enableDisplay,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableDisplay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableDisplay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisplayDevice) MarshalJSON() ([]byte, error) { - type NoMethod DisplayDevice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DistributionPolicy struct { - // TargetShape: The distribution shape to which the group converges either - // proactively or - // on resize events (depending on the value set - // inupdatePolicy.instanceRedistributionType). - // - // Possible values: - // "ANY" - The group picks zones for creating VM instances to fulfill the - // requested - // number of VMs within present resource constraints and to - // maximize - // utilization of unused zonal reservations. Recommended for batch - // workloads - // that do not require high availability. - // "ANY_SINGLE_ZONE" - The group creates all VM instances within a single - // zone. The zone is - // selected based on the present resource constraints and to - // maximize - // utilization of unused zonal reservations. - // Recommended for batch workloads with heavy interprocess communication. - // "BALANCED" - The group prioritizes acquisition of resources, scheduling - // VMs in zones - // where resources are available while distributing VMs as evenly as - // possible across selected zones to minimize the impact of zonal - // failure. - // Recommended for highly available serving workloads. - // "EVEN" - The group schedules VM instance creation and deletion to achieve - // and - // maintain an even number of managed instances across the selected zones. - // The distribution is even when the number of managed instances does - // not - // differ by more than 1 between any two zones. Recommended for - // highly - // available serving workloads. - TargetShape string `json:"targetShape,omitempty"` - // Zones: Zones where the regional managed instance group will create and - // manage - // its instances. - Zones []*DistributionPolicyZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetShape") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod DistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DistributionPolicyZoneConfiguration struct { - // Zone: The URL of thezone. - // The zone must exist in the region where the managed instance group - // is - // located. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zone") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DistributionPolicyZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DistributionPolicyZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Duration: A Duration represents a fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". Range is approximately 10,000 years. -type Duration struct { - // Nanos: Span of time that's a fraction of a second at nanosecond - // resolution. - // Durations less than one second are represented with a 0 - // `seconds` field and a positive `nanos` field. Must be from 0 - // to 999,999,999 inclusive. - Nanos int64 `json:"nanos,omitempty"` - // Seconds: Span of time at a resolution of a second. Must be from 0 - // to 315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - Seconds int64 `json:"seconds,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Nanos") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nanos") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Duration) MarshalJSON() ([]byte, error) { - type NoMethod Duration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ErrorInfo: Describes the cause of the error with structured -// details. -// -// Example of an error when contacting the "pubsub.googleapis.com" API when -// it -// is not enabled: -// -// { "reason": "API_DISABLED" -// "domain": "googleapis.com" -// "metadata": { -// "resource": "projects/123", -// "service": "pubsub.googleapis.com" -// } -// } -// -// This response indicates that the pubsub.googleapis.com API is not -// enabled. -// -// Example of an error that is returned when attempting to create a -// Spanner -// instance in a region that is out of stock: -// -// { "reason": "STOCKOUT" -// "domain": "spanner.googleapis.com", -// "metadata": { -// "availableRegions": "us-central1,us-east2" -// } -// } -type ErrorInfo struct { - // Domain: The logical grouping to which the "reason" belongs. The error - // domain - // is typically the registered service name of the tool or product - // that - // generates the error. Example: "pubsub.googleapis.com". If the error - // is - // generated by some common infrastructure, the error domain must be a - // globally unique value that identifies the infrastructure. For Google - // API - // infrastructure, the error domain is "googleapis.com". - Domain string `json:"domain,omitempty"` - // Metadatas: Additional structured details about this error. - // - // Keys must match a regular expression of `a-z+` but should - // ideally be lowerCamelCase. Also, they must be limited to 64 characters - // in - // length. When identifying the current value of an exceeded limit, the - // units - // should be contained in the key, not the value. For example, rather - // than - // `{"instanceLimit": "100/request"}`, should be returned - // as, - // `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number - // of - // instances that can be created in a single (batch) request. - Metadatas map[string]string `json:"metadatas,omitempty"` - // Reason: The reason of the error. This is a constant value that identifies - // the - // proximate cause of the error. Error reasons are unique within a - // particular - // domain of errors. This should be at most 63 characters and match a - // regular expression of `A-Z+[A-Z0-9]`, which represents - // UPPER_SNAKE_CASE. - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Domain") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ErrorInfo) MarshalJSON() ([]byte, error) { - type NoMethod ErrorInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoute struct { - // DestRange: The destination range of the route. - DestRange string `json:"destRange,omitempty"` - // Imported: True if the peering route has been imported from a peer. The - // actual import - // happens if the field networkPeering.importCustomRoutes is true - // for this network, and networkPeering.exportCustomRoutes is - // true for the peer network, and the import does not result in a - // route - // conflict. - Imported bool `json:"imported,omitempty"` - // NextHopRegion: The region of peering route next hop, only applies to dynamic - // routes. - NextHopRegion string `json:"nextHopRegion,omitempty"` - // Priority: The priority of the peering route. - Priority int64 `json:"priority,omitempty"` - // Type: The type of the peering route. - // - // Possible values: - // "DYNAMIC_PEERING_ROUTE" - For routes exported from local network. - // "STATIC_PEERING_ROUTE" - The peering route. - // "SUBNET_PEERING_ROUTE" - The peering route corresponding to subnetwork - // range. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoute) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoutesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ExchangedPeeringRoute resources. - Items []*ExchangedPeeringRoute `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#exchangedPeeringRoutesList for exchanged peering - // routes lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ExchangedPeeringRoutesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesList) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExchangedPeeringRoutesListWarning: [Output Only] Informational warning -// message. -type ExchangedPeeringRoutesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ExchangedPeeringRoutesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoutesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGateway: Represents an external VPN gateway. -// -// External VPN gateway is the on-premises VPN gateway(s) or another -// cloud -// provider's VPN gateway that connects to your Google Cloud VPN gateway. -// -// To create a highly available VPN from Google Cloud Platform to your -// VPN gateway or another cloud provider's VPN gateway, you must create -// a -// external VPN gateway resource with information about the other gateway. -// -// For more information about using external VPN gateways, see -// Creating an HA VPN gateway and tunnel pair to a peer VPN. -type ExternalVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id *uint64 `json:"id,omitempty,string"` - // Interfaces: A list of interfaces for this external VPN gateway. - // - // If your peer-side gateway is an on-premises gateway and non-AWS - // cloud - // providers' gateway, at most two interfaces can be provided for an - // external - // VPN gateway. If your peer side is an AWS virtual private gateway, - // four - // interfaces should be provided for an external VPN gateway. - Interfaces []*ExternalVpnGatewayInterface `json:"interfaces,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#externalVpnGateway - // for externalVpnGateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // ExternalVpnGateway, - // which is essentially a hash of the labels set used for optimistic - // locking. - // The fingerprint is initially generated by Compute Engine and changes - // after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an ExternalVpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *ExternalVpnGatewayParams `json:"params,omitempty"` - // RedundancyType: Indicates the user-supplied redundancy type of this external - // VPN gateway. - // - // Possible values: - // "FOUR_IPS_REDUNDANCY" - The external VPN gateway has four public IP - // addresses; at the time of - // writing this API, the AWS virtual private gateway is an example which - // has - // four public IP addresses for high availability connections; there should - // be two VPN connections in the AWS virtual private gateway , each AWS - // VPN - // connection has two public IP addresses; please make sure to put two - // public IP addresses from one AWS VPN connection into interfaces 0 and 1 - // of this external VPN gateway, and put the other two public IP addresses - // from another AWS VPN connection into interfaces 2 and 3 of this external - // VPN gateway. When displaying highly available configuration status - // for the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN - // gateway, Google will always detect whether interfaces 0 and 1 are - // connected on one interface of HA Cloud VPN gateway, and detect - // whether - // interfaces 2 and 3 are connected to another interface of the HA Cloud - // VPN - // gateway. - // "SINGLE_IP_INTERNALLY_REDUNDANT" - The external VPN gateway has only one - // public IP address which internally - // provide redundancy or failover. - // "TWO_IPS_REDUNDANCY" - The external VPN gateway has two public IP - // addresses which are redundant - // with each other, the following two types of setup on your on-premises - // side would have this type of redundancy: - // (1) Two separate on-premises gateways, each with one public IP address, - // the two on-premises gateways are redundant with each other. - // (2) A single on-premise gateway with two public IP addresses that are - // redundant with eatch other. - RedundancyType string `json:"redundancyType,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayInterface: The interface for the external VPN gateway. -type ExternalVpnGatewayInterface struct { - // Id: The numeric ID of this interface. - // The allowed input values for this id for different redundancy types - // of - // external VPN gateway: - // - // - SINGLE_IP_INTERNALLY_REDUNDANT - 0 - // - TWO_IPS_REDUNDANCY - 0, 1 - // - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 - Id int64 `json:"id,omitempty"` - // IpAddress: IP address of the interface in the external VPN gateway. Only - // IPv4 is - // supported. This IP address can be either from your on-premise gateway - // or - // another Cloud provider's VPN gateway, it cannot be an IP address from - // Google Compute Engine. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: IPv6 address of the interface in the external VPN gateway. This - // IPv6 - // address can be either from your on-premise gateway or another - // Cloud - // provider's VPN gateway, it cannot be an IP address from Google - // Compute - // Engine. Must specify an IPv6 address (not IPV4-mapped) using any - // format - // described in RFC 4291 (e.g. 2001:db8:0:0:2d9:51:0:0). The output format - // is RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). - Ipv6Address string `json:"ipv6Address,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayInterface) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayList: Response to the list request, and contains a list of -// externalVpnGateways. -type ExternalVpnGatewayList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ExternalVpnGateway resources. - Items []*ExternalVpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#externalVpnGatewayList - // for lists of externalVpnGateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ExternalVpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayListWarning: [Output Only] Informational warning message. -type ExternalVpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ExternalVpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExternalVpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExternalVpnGatewayParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayParams) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FileContentBuffer struct { - // Content: The raw content in the secure keys file. - Content string `json:"content,omitempty"` - // FileType: The file type of source file. - // - // Possible values: - // "BIN" - // "UNDEFINED" - // "X509" - FileType string `json:"fileType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FileContentBuffer) MarshalJSON() ([]byte, error) { - type NoMethod FileContentBuffer - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Firewall: Represents a Firewall Rule resource. -// -// Firewall rules allow or deny ingress traffic to, and egress traffic from -// your -// instances. For more information, readFirewall rules. -type Firewall struct { - // Allowed: The list of ALLOW rules specified by this firewall. Each rule - // specifies a - // protocol and port-range tuple that describes a permitted connection. - Allowed []*FirewallAllowed `json:"allowed,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Denied: The list of DENY rules specified by this firewall. Each rule - // specifies a - // protocol and port-range tuple that describes a denied connection. - Denied []*FirewallDenied `json:"denied,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DestinationRanges: If destination ranges are specified, the firewall rule - // applies only to - // traffic that has destination IP address in these ranges. These ranges - // must - // be expressed inCIDR format. Both IPv4 and IPv6 are supported. - DestinationRanges []string `json:"destinationRanges,omitempty"` - // Direction: Direction of traffic to which this firewall applies, either - // `INGRESS` or - // `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot - // specify the sourceTags fields. - // - // Possible values: - // "EGRESS" - Indicates that firewall should apply to outgoing traffic. - // "INGRESS" - Indicates that firewall should apply to incoming traffic. - Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall rule is disabled. When set to true, - // the - // firewall rule is not enforced and the network behaves as if it did - // not - // exist. If this is unspecified, the firewall rule will be enabled. - Disabled bool `json:"disabled,omitempty"` - // EnableLogging: Deprecated in favor of enable in LogConfig. - // This field denotes whether to enable logging for a particular - // firewall rule. If logging is enabled, logs will be exported t - // Cloud Logging. - EnableLogging bool `json:"enableLogging,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#firewall - // for firewall rules. - Kind string `json:"kind,omitempty"` - // LogConfig: This field denotes the logging options for a particular firewall - // rule. If - // logging is enabled, logs will be exported to Cloud Logging. - LogConfig *FirewallLogConfig `json:"logConfig,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character - // must be a lowercase letter, and all following characters (except for - // the - // last character) must be a dash, lowercase letter, or digit. The - // last - // character must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: URL of the network resource for this firewall rule. If - // not - // specified when creating a firewall rule, the default network - // is used: - // - // global/networks/default - // - // If you choose to specify this field, you can specify the network as a full - // - // or partial URL. For example, the following are all valid URLs: - // - // - - // - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - // - // - projects/myproject/global/networks/my-network - // - global/networks/default - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *FirewallParams `json:"params,omitempty"` - // Priority: Priority for this rule. - // This is an integer between `0` and `65535`, both inclusive. - // The default value is `1000`. - // Relative priorities determine which rule takes effect if multiple - // rules - // apply. Lower values indicate higher priority. For example, a rule - // with - // priority `0` has higher precedence than a rule with priority `1`. - // DENY rules take precedence over ALLOW rules if they have equal - // priority. - // Note that VPC networks have implied - // rules with a priority of `65535`. To avoid conflicts with the implied - // rules, use a priority number less than `65535`. - Priority int64 `json:"priority,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceRanges: If source ranges are specified, the firewall rule applies only - // to traffic - // that has a source IP address in these ranges. These ranges must be - // expressed inCIDR format. One or both of sourceRanges - // and sourceTags may be set. - // If both fields are set, the rule applies to traffic that has a - // source IP address within sourceRanges OR a source IP - // from a resource with a matching tag listed in thesourceTags field. The - // connection does not need to match - // both fields for the rule to - // apply. Both IPv4 and IPv6 are supported. - SourceRanges []string `json:"sourceRanges,omitempty"` - // SourceServiceAccounts: If source service accounts are specified, the - // firewall rules apply only to - // traffic originating from an instance with a service account in this - // list. - // Source service accounts cannot be used to control traffic to an - // instance's - // external IP address because service accounts are associated with - // an - // instance, not an IP address.sourceRanges can be set at the same time - // assourceServiceAccounts. - // If both are set, the firewall applies to traffic that - // has a source IP address within the sourceRanges OR a source - // IP that belongs to an instance with service account listed - // insourceServiceAccount. The connection does not need to match - // both fields for the firewall to apply.sourceServiceAccounts cannot be used - // at the same time assourceTags or targetTags. - SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` - // SourceTags: If source tags are specified, the firewall rule applies only to - // traffic - // with source IPs that match the primary network interfaces of VM - // instances - // that have the tag and are in the same VPC network. - // Source tags cannot be used to control traffic to an instance's external - // IP - // address, it only applies to traffic between instances in the same - // virtual - // network. Because tags are associated with instances, not IP addresses. - // One or both of sourceRanges and sourceTags may be - // set. If both fields are set, the firewall applies to traffic that has - // a - // source IP address within sourceRanges OR a source IP from a - // resource with a matching tag listed in the sourceTags - // field. The connection does not need to match both fields for the - // firewall to apply. - SourceTags []string `json:"sourceTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating sets of - // instances located in the - // network that may make network connections as specified - // inallowed[].targetServiceAccounts cannot be used at the same time - // astargetTags or sourceTags. - // If neither targetServiceAccounts nor targetTags - // are specified, the firewall rule applies to all instances on the - // specified - // network. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - // TargetTags: A list of tags that controls which instances the firewall - // rule - // applies to. If targetTags are specified, then the firewall - // rule applies only to instances in the VPC network that have one of - // those - // tags. If no targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetTags []string `json:"targetTags,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Allowed") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Allowed") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Firewall) MarshalJSON() ([]byte, error) { - type NoMethod Firewall - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallAllowed struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be one of - // the - // following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or - // the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. - // This field is only applicable for the UDP or TCP protocol. - // Each entry must be either an integer or a range. - // If not specified, this rule applies to connections through any - // port. - // - // Example inputs include: ["22"], ["80","443"], - // and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallAllowed) MarshalJSON() ([]byte, error) { - type NoMethod FirewallAllowed - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallDenied struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be one of - // the - // following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or - // the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. - // This field is only applicable for the UDP or TCP protocol. - // Each entry must be either an integer or a range. - // If not specified, this rule applies to connections through any - // port. - // - // Example inputs include: ["22"], ["80","443"], - // and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallDenied) MarshalJSON() ([]byte, error) { - type NoMethod FirewallDenied - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallList: Contains a list of firewalls. -type FirewallList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Firewall resources. - Items []*Firewall `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#firewallList - // for lists of firewalls. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FirewallListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallListWarning: [Output Only] Informational warning message. -type FirewallListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallLogConfig: The available logging options for a firewall rule. -type FirewallLogConfig struct { - // Enable: This field denotes whether to enable logging for a particular - // firewall - // rule. - Enable bool `json:"enable,omitempty"` - // Metadata: This field can only be specified for a particular firewall rule - // if - // logging is enabled for that rule. This field denotes whether to include - // or exclude metadata for firewall logs. - // - // Possible values: - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod FirewallLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallParams: Additional firewall parameters. -type FirewallParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallParams) MarshalJSON() ([]byte, error) { - type NoMethod FirewallParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesListAssociationsResponse struct { - // Associations: A list of associations. - Associations []*FirewallPolicyAssociation `json:"associations,omitempty"` - // Kind: [Output Only] Type of firewallPolicy associations. - // Alwayscompute#FirewallPoliciesListAssociations for lists of - // firewallPolicy associations. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesListAssociationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesScopedList struct { - // FirewallPolicies: A list of firewall policies contained in this scope. - FirewallPolicies []*FirewallPolicy `json:"firewallPolicies,omitempty"` - // Warning: Informational warning which replaces the list of firewall policies - // when - // the list is empty. - Warning *FirewallPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPoliciesScopedListWarning: Informational warning which replaces the -// list of firewall policies when -// the list is empty. -type FirewallPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicy: Represents a Firewall Policy resource. -type FirewallPolicy struct { - // Associations: A list of associations that belong to this firewall policy. - Associations []*FirewallPolicyAssociation `json:"associations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DisplayName: Deprecated, please use short name instead. User-provided name - // of the - // Organization firewall policy. The name should be unique in the - // organization - // in which the firewall policy is created. - // This field is not applicable to network firewall policies. - // This name must be set on creation and cannot be changed. - // The name must be 1-63 characters long, and comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which - // means the first character must be a lowercase letter, and all - // following - // characters must be a dash, lowercase letter, or digit, except the - // last - // character, which cannot be a dash. - DisplayName string `json:"displayName,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make get() request to the - // firewall policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#firewallPolicyfor - // firewall policies - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. For Organization Firewall Policies it's - // a - // [Output Only] numeric ID allocated by Google Cloud which uniquely - // identifies the Organization Firewall Policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: A list of packet mirroring rules that belong to this - // policy. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Parent: [Output Only] The parent of the firewall policy. - // This field is not applicable to network firewall policies. - Parent string `json:"parent,omitempty"` - // PolicySource: [Output Only] Source of this Firewall Policy. USER_DEFINED - // if - // created by a Cloud user, or SYSTEM if created by managed - // services like GKE. - // - // Possible values: - // "SYSTEM" - // "USER_DEFINED" - PolicySource string `json:"policySource,omitempty"` - // PolicyType: The type of the firewall policy. This field can be - // eitherVPC_POLICY or RDMA_ROCE_POLICY. - // - // Note: if not specified then VPC_POLICY will be used. - // - // Possible values: - // "RDMA_FALCON_POLICY" - // "RDMA_ROCE_POLICY" - // "ULL_POLICY" - // "VPC_POLICY" - PolicyType string `json:"policyType,omitempty"` - // Region: [Output Only] URL of the region where the regional firewall policy - // resides. - // This field is not applicable to global firewall policies. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all firewall policy rule - // tuples. A firewall - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // Rules: A list of rules that belong to this policy. - // There must always be a default rule (rule with priority 2147483647 and - // match "*"). If no rules are provided when creating a firewall policy, - // a - // default rule with action "allow" will be added. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShortName: User-provided name of the Organization firewall policy. The name - // should be - // unique in the organization in which the firewall policy is created. - // This field is not applicable to network firewall policies. - // This name must be set on creation and cannot be changed. The name must - // be - // 1-63 characters long, and comply with RFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - ShortName string `json:"shortName,omitempty"` - // VpcNetworkScope: The scope of networks allowed to be associated with the - // firewall - // policy. This field can be either GLOBAL_VPC_NETWORK - // orREGIONAL_VPC_NETWORK. - // - // A firewall policy with the VPC scope set to GLOBAL_VPC_NETWORK - // is allowed to be attached only to global networks. - // - // When the VPC scope is set to REGIONAL_VPC_NETWORK the firewall - // policy is allowed to be attached only to regional networks in the same - // scope as the firewall policy. - // - // Note: if not specified then GLOBAL_VPC_NETWORK will be used. - // - // Possible values: - // "GLOBAL_VPC_NETWORK" - The firewall policy is allowed to be attached only - // to global networks. - // "REGIONAL_VPC_NETWORK" - The firewall policy is allowed to be attached - // only to regional networks - // in the same scope as the firewall policy. This option is applicable only - // to regional firewall policies. - VpcNetworkScope string `json:"vpcNetworkScope,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyAssociation struct { - // AttachmentTarget: The target that the firewall policy is attached to. - AttachmentTarget string `json:"attachmentTarget,omitempty"` - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy of the association. - DisplayName string `json:"displayName,omitempty"` - // FirewallPolicyId: [Output Only] The firewall policy ID of the association. - FirewallPolicyId string `json:"firewallPolicyId,omitempty"` - // Name: The name for an association. - Name string `json:"name,omitempty"` - // Priority: An integer indicating the priority of an association. The - // priority - // must be a positive value between 1 and 2147483647. - // Firewall Policies are evaluated from highest to lowest priority where 1 - // is the highest priority and 2147483647 is the lowest priority. - // The default value is `1000`. If two associations have the same priority - // then lexicographical order on association names is applied. - Priority int64 `json:"priority,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy of the - // association. - ShortName string `json:"shortName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttachmentTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of FirewallPolicy resources. - Items []*FirewallPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#firewallPolicyList for - // listsof FirewallPolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FirewallPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyListWarning: [Output Only] Informational warning message. -type FirewallPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyRule: Represents a rule that describes one or more match -// conditions along with -// the action to be taken when traffic matches this condition (allow or deny). -type FirewallPolicyRule struct { - // Action: The Action to perform when the client connection triggers the - // rule. - // Valid actions for firewall rules are: "allow", - // "deny", - // "apply_security_profile_group" and "goto_next". - // Valid actions for packet mirroring rules are: "mirror", "do_not_mirror" - // and "goto_next". - Action string `json:"action,omitempty"` - // Description: An optional description for this resource. - Description string `json:"description,omitempty"` - // Direction: The direction in which this rule applies. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall policy rule is disabled. When set to - // true, - // the firewall policy rule is not enforced and traffic behaves as if it - // did - // not exist. If this is unspecified, the firewall policy rule will be - // enabled. - Disabled bool `json:"disabled,omitempty"` - // EnableLogging: Denotes whether to enable logging for a particular rule. If - // logging is - // enabled, logs will be exported to the configured export destination - // in - // Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you - // cannot enable logging on "goto_next" rules. - EnableLogging bool `json:"enableLogging,omitempty"` - // Kind: [Output only] Type of the resource. Returnscompute#firewallPolicyRule - // for firewall rules andcompute#packetMirroringRule for packet mirroring - // rules. - Kind string `json:"kind,omitempty"` - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *FirewallPolicyRuleMatcher `json:"match,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 0 and 2147483647. - // Rules are evaluated from highest to lowest priority where 0 is the - // highest priority and 2147483647 is the lowest priority. - Priority int64 `json:"priority,omitempty"` - // RuleName: An optional name for the rule. This field is not a unique - // identifier - // and can be updated. - RuleName string `json:"ruleName,omitempty"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // firewall policy - // rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // SecurityProfileGroup: A fully-qualified URL of a SecurityProfile resource - // instance. - // Example: - // https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group - // Must be specified if action is one of 'apply_security_profile_group' - // or - // 'mirror'. Cannot be specified for other actions. - SecurityProfileGroup string `json:"securityProfileGroup,omitempty"` - // TargetForwardingRules: A list of forwarding rules to which this rule - // applies. - // This field allows you to control which load balancers get this rule. - // For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - projects/project/global/ - // forwardingRules/forwardingRule - // - projects/project/regions/region/forwardingRules/ - // forwardingRule - TargetForwardingRules []string `json:"targetForwardingRules,omitempty"` - // TargetResources: A list of network resource URLs to which this rule applies. - // This field - // allows you to control which network's VMs get this rule. If this field - // is left blank, all VMs within the organization will receive the rule. - TargetResources []string `json:"targetResources,omitempty"` - // TargetSecureTags: A list of secure tags that controls which instances the - // firewall rule - // applies to. If targetSecureTag are specified, then the - // firewall rule applies only to instances in the VPC network that have one - // of those EFFECTIVE secure tags, if all the target_secure_tag are - // in - // INEFFECTIVE state, then this rule will be ignored.targetSecureTag may not be - // set at the same time astargetServiceAccounts. - // If neither targetServiceAccounts nortargetSecureTag are specified, the - // firewall rule applies - // to all instances on the specified network. - // Maximum number of target label tags allowed is 256. - TargetSecureTags []*FirewallPolicyRuleSecureTag `json:"targetSecureTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - // TargetType: Target types of the firewall policy rule. - // Default value is INSTANCES. - // - // Possible values: - // "INSTANCES" - // "INTERNAL_MANAGED_LB" - TargetType string `json:"targetType,omitempty"` - // TlsInspect: Boolean flag indicating if the traffic should be TLS - // decrypted. - // Can be set only if action = 'apply_security_profile_group' and cannot - // be set for other actions. - TlsInspect bool `json:"tlsInspect,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. -// Exactly one field must be specified. -type FirewallPolicyRuleMatcher struct { - // DestAddressGroups: Address groups which should be matched against the - // traffic destination. - // Maximum number of destination address groups is 10. - DestAddressGroups []string `json:"destAddressGroups,omitempty"` - // DestFqdns: Fully Qualified Domain Name (FQDN) which should be matched - // against - // traffic destination. - // Maximum number of destination fqdn allowed is 100. - DestFqdns []string `json:"destFqdns,omitempty"` - // DestIpRanges: CIDR IP address range. - // Maximum number of destination CIDR IP ranges allowed is 5000. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // DestNetworkContext: Network context of the traffic destination. Allowed - // values are: - // - // - // - UNSPECIFIED - // - INTERNET - // - NON_INTERNET - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - DestNetworkContext string `json:"destNetworkContext,omitempty"` - // DestNetworkScope: Network scope of the traffic destination. - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - DestNetworkScope string `json:"destNetworkScope,omitempty"` - // DestNetworkType: Network type of the traffic destination. Allowed values - // are: - // - // - // - UNSPECIFIED - // - INTERNET - // - NON_INTERNET - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - DestNetworkType string `json:"destNetworkType,omitempty"` - // DestRegionCodes: Region codes whose IP addresses will be used to match for - // destination - // of traffic. Should be specified as 2 letter country code defined as per - // ISO 3166 alpha-2 country codes. ex."US" - // Maximum number of dest region codes allowed is 5000. - DestRegionCodes []string `json:"destRegionCodes,omitempty"` - // DestThreatIntelligences: Names of Network Threat Intelligence lists. - // The IPs in these lists will be matched against traffic destination. - DestThreatIntelligences []string `json:"destThreatIntelligences,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should match. - Layer4Configs []*FirewallPolicyRuleMatcherLayer4Config `json:"layer4Configs,omitempty"` - // SrcAddressGroups: Address groups which should be matched against the traffic - // source. - // Maximum number of source address groups is 10. - SrcAddressGroups []string `json:"srcAddressGroups,omitempty"` - // SrcFqdns: Fully Qualified Domain Name (FQDN) which should be matched - // against - // traffic source. - // Maximum number of source fqdn allowed is 100. - SrcFqdns []string `json:"srcFqdns,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of source CIDR IP ranges allowed is 5000. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // SrcNetworkContext: Network context of the traffic source. Allowed values - // are: - // - // - // - UNSPECIFIED - // - INTERNET - // - INTRA_VPC - // - NON_INTERNET - // - VPC_NETWORKS - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - SrcNetworkContext string `json:"srcNetworkContext,omitempty"` - // SrcNetworkScope: Network scope of the traffic source. - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - SrcNetworkScope string `json:"srcNetworkScope,omitempty"` - // SrcNetworkType: Network type of the traffic source. Allowed values are: - // - // - // - UNSPECIFIED - // - INTERNET - // - INTRA_VPC - // - NON_INTERNET - // - VPC_NETWORKS - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - SrcNetworkType string `json:"srcNetworkType,omitempty"` - // SrcNetworks: Networks of the traffic source. It can be either a full or - // partial url. - SrcNetworks []string `json:"srcNetworks,omitempty"` - // SrcRegionCodes: Region codes whose IP addresses will be used to match for - // source - // of traffic. Should be specified as 2 letter country code defined as per - // ISO 3166 alpha-2 country codes. ex."US" - // Maximum number of source region codes allowed is 5000. - SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` - // SrcSecureTags: List of secure tag values, which should be matched at the - // source - // of the traffic. - // For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, - // and there is no srcIpRange, this rule will be ignored. - // Maximum number of source tag values allowed is 256. - SrcSecureTags []*FirewallPolicyRuleSecureTag `json:"srcSecureTags,omitempty"` - // SrcThreatIntelligences: Names of Network Threat Intelligence lists. - // The IPs in these lists will be matched against traffic source. - SrcThreatIntelligences []string `json:"srcThreatIntelligences,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestAddressGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestAddressGroups") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyRuleMatcherLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp,udp, icmp, esp,ah, - // ipip, sctp), or the IP - // protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP or TCP protocol. Each entry must be either - // an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleMatcherLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleMatcherLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyRuleSecureTag struct { - // Name: Name of the secure tag, created with TagManager's TagValue API. - Name string `json:"name,omitempty"` - // State: [Output Only] State of the secure tag, either `EFFECTIVE` - // or - // `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted - // or its network is deleted. - // - // Possible values: - // "EFFECTIVE" - // "INEFFECTIVE" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleSecureTag) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleSecureTag - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FixedOrPercent: Encapsulates numeric value that can be either absolute or -// relative. -type FixedOrPercent struct { - // Calculated: [Output Only] Absolute value of VM instances calculated based on - // the - // specific mode. - // - // - // - // - If the value is fixed, then the calculated - // value is equal to the fixed value. - // - If the value is a percent, then the - // calculated - // value is percent/100 * targetSize. For example, - // the calculated value of a 80% of a managed instance group - // with 150 instances would be (80/100 * 150) = 120 VM instances. If - // there - // is a remainder, the number is rounded. - Calculated int64 `json:"calculated,omitempty"` - // Fixed: Specifies a fixed number of VM instances. This must be a positive - // integer. - Fixed int64 `json:"fixed,omitempty"` - // Percent: Specifies a percentage of instances between 0 to 100%, inclusive. - // For - // example, specify 80 for 80%. - Percent int64 `json:"percent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Calculated") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Calculated") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FixedOrPercent) MarshalJSON() ([]byte, error) { - type NoMethod FixedOrPercent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FlexibleTimeRange: A flexible specification of a time range that has 3 -// points of -// flexibility: (1) a flexible start time, (2) a flexible end time, (3) -// a -// flexible duration. -// -// It is possible to specify a contradictory time range that cannot be -// matched -// by any Interval. This causes a validation error. -type FlexibleTimeRange struct { - EndTimeNotEarlierThan string `json:"endTimeNotEarlierThan,omitempty"` - EndTimeNotLaterThan string `json:"endTimeNotLaterThan,omitempty"` - MaxDuration string `json:"maxDuration,omitempty"` - MinDuration string `json:"minDuration,omitempty"` - StartTimeNotEarlierThan string `json:"startTimeNotEarlierThan,omitempty"` - StartTimeNotLaterThan string `json:"startTimeNotLaterThan,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTimeNotEarlierThan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTimeNotEarlierThan") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FlexibleTimeRange) MarshalJSON() ([]byte, error) { - type NoMethod FlexibleTimeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRule: Represents a Forwarding Rule resource. -// -// Forwarding rule resources in Google Cloud can be either regional or global -// in -// scope: -// -// * Global -// (https://cloud.google.com/compute/docs/reference/rest/alpha/globalForwardingRules) -// * Regional -// (https://cloud.google.com/compute/docs/reference/rest/alpha/forwardingRules) -// -// A forwarding rule and its corresponding IP address represent the -// frontend -// configuration of a Google Cloud load balancer. -// Forwarding rules can also reference target instances and Cloud VPN -// Classic -// gateways (targetVpnGateway). -// -// For more information, read -// Forwarding rule concepts and -// Using protocol forwarding. -type ForwardingRule struct { - // IPAddress: IP address for which this forwarding rule accepts traffic. When a - // client - // sends traffic to this IP address, the forwarding rule directs the traffic - // to the referenced target or backendService. - // While creating a forwarding rule, specifying an IPAddress is - // required under the following circumstances: - // - // - // - When the target is set to targetGrpcProxy andvalidateForProxyless is - // set to true, theIPAddress should be set to 0.0.0.0. - // - When the target is a Private Service Connect Google APIs - // bundle, you must specify an IPAddress. - // - // - // Otherwise, you can optionally specify an IP address that references - // an - // existing static (reserved) IP address resource. When omitted, Google - // Cloud - // assigns an ephemeral IP address. - // - // Use one of the following formats to specify an IP address while creating - // a - // forwarding rule: - // - // * IP address number, as in `100.1.2.3` - // * IPv6 address range, as in `2600:1234::/96` - // * Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/ad - // dresses/address-name - // * Partial URL or by name, as in: - // - // - projects/project_id/regions/region/addresses/address-name - // - regions/region/addresses/address-name - // - global/addresses/address-name - // - address-name - // - // - // - // The forwarding rule's target or backendService, - // and in most cases, also the loadBalancingScheme, determine the - // type of IP address that you can use. For detailed information, see - // IP address - // specifications - // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // - // When reading an IPAddress, the API always returns the IP - // address number. - IPAddress string `json:"IPAddress,omitempty"` - // IPProtocol: The IP protocol to which this rule applies. - // - // For protocol forwarding, valid - // options are TCP, UDP, ESP,AH, SCTP, ICMP andL3_DEFAULT. - // - // The valid IP protocols are different for different load balancing - // products - // as described in Load balancing - // features - // (https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends). - // - // Possible values: - // "AH" - // "ALL" - // "ESP" - // "ICMP" - // "L3_DEFAULT" - // "SCTP" - // "TCP" - // "UDP" - IPProtocol string `json:"IPProtocol,omitempty"` - // AllPorts: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The allPorts field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, SCTP, or L3_DEFAULT. - // - It's applicable only to the following products: internal passthrough - // Network Load Balancers, backend service-based external passthrough - // Network - // Load Balancers, and internal and external protocol forwarding. - // - Set this field to true to allow packets addressed to any port or - // packets lacking destination port information (for example, UDP fragments - // after the first fragment) to be forwarded to the backends configured - // with - // this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to - // true. - AllPorts bool `json:"allPorts,omitempty"` - // AllowGlobalAccess: If set to true, clients can access the internal - // passthrough Network Load - // Balancers, the regional internal Application Load Balancer, and the - // regional internal proxy Network Load Balancer from all regions. - // If false, only allows access from the local region the load balancer - // is - // located at. Note that for INTERNAL_MANAGED forwarding rules, this - // field - // cannot be changed after the forwarding rule is created. - AllowGlobalAccess bool `json:"allowGlobalAccess,omitempty"` - // AllowPscGlobalAccess: This is used in PSC consumer ForwardingRule to control - // whether the PSC - // endpoint can be accessed from another region. - AllowPscGlobalAccess bool `json:"allowPscGlobalAccess,omitempty"` - // AllowPscPacketInjection: This is used in PSC consumer ForwardingRule to - // control whether the producer - // is allowed to inject packets into the consumer's network. If set to - // true, - // the target service attachment must have tunneling enabled - // and - // TunnelingConfig.RoutingMode set to PACKET_INJECTION - // Non-PSC forwarding rules should not use this field. - // - // This field was never released to any customers and is deprecated and - // will be removed in the future. - AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` - // AvailabilityGroup: [Output Only] Specifies the availability group of the - // forwarding rule. This - // field is for use by global external passthrough load balancers - // (load - // balancing scheme EXTERNAL_PASSTHROUGH) and is set for the child - // forwarding - // rules only. - // - // Possible values: - // "AVAILABILITY_GROUP0" - // "AVAILABILITY_GROUP1" - // "AVAILABILITY_GROUP_UNSPECIFIED" - AvailabilityGroup string `json:"availabilityGroup,omitempty"` - // BackendService: Identifies the backend service to which the forwarding rule - // sends traffic. - // Required for internal and external passthrough Network Load Balancers; - // must be omitted for all other load balancer types. - BackendService string `json:"backendService,omitempty"` - // BaseForwardingRule: [Output Only] The URL for the corresponding base - // forwarding rule. By base - // forwarding rule, we mean the forwarding rule that has the same IP - // address, - // protocol, and port settings with the current forwarding rule, but - // without - // sourceIPRanges specified. - // Always empty if the current forwarding rule does not have - // sourceIPRanges - // specified. - BaseForwardingRule string `json:"baseForwardingRule,omitempty"` - // ChildForwardingRules: [Output Only] Applicable only to the parent forwarding - // rule of global - // external passthrough load balancers. This field contains the list of - // child - // forwarding rule URLs associated with the parent forwarding rule: one - // for - // each availability group. AVAILABILITY_GROUP0 will be the first element, - // and - // AVAILABILITY_GROUP1 will be the second element. - ChildForwardingRules []string `json:"childForwardingRules,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExternalManagedBackendBucketMigrationState: Specifies the canary migration - // state for the backend buckets attached to - // this forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, - // and - // TEST_ALL_TRAFFIC. - // - // To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must - // be - // changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before - // the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate traffic to backend - // buckets - // attached to this forwarding rule by percentage - // using - // externalManagedBackendBucketMigrationTestingPercentage. - // - // Rolling back a migration requires the states to be set in reverse order. - // So - // changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state - // to - // be set to TEST_ALL_TRAFFIC at the same time. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate some traffic back - // to - // EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. - // - // Possible values: - // "PREPARE" - // "TEST_ALL_TRAFFIC" - // "TEST_BY_PERCENTAGE" - ExternalManagedBackendBucketMigrationState string `json:"externalManagedBackendBucketMigrationState,omitempty"` - // ExternalManagedBackendBucketMigrationTestingPercentage: Determines the - // fraction of requests to backend buckets that should be - // processed by the global external Application Load Balancer. - // - // The value of this field must be in the range [0, 100]. - // - // This value can only be set if the loadBalancingScheme in the - // BackendService - // is set to EXTERNAL (when using the classic Application Load Balancer) - // and - // the migration state is TEST_BY_PERCENTAGE. - ExternalManagedBackendBucketMigrationTestingPercentage float64 `json:"externalManagedBackendBucketMigrationTestingPercentage,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a ForwardingRule. Include the fingerprint in patch request - // to - // ensure that you do not overwrite changes that were applied from - // another - // concurrent request. - // - // To see the latest fingerprint, make a get() request to - // retrieve a ForwardingRule. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpCollection: Resource reference of a PublicDelegatedPrefix. The PDP must - // be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. - // - // Use one of the following formats to specify a sub-PDP when creating an - // IPv6 - // NetLB forwarding rule using BYOIP: - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/pu - // blicDelegatedPrefixes/sub-pdp-name - // Partial URL, as in: - // - // - - // projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - // - regions/region/publicDelegatedPrefixes/sub-pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // IpVersion: The IP Version that will be used by this forwarding rule. Valid - // options - // are IPV4 or IPV6. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - // IsMirroringCollector: Indicates whether or not this load balancer can be - // used as a collector for - // packet mirroring. To prevent mirroring loops, instances behind this - // load balancer will not have their traffic mirrored even if aPacketMirroring - // rule applies to them. - // This can only be set to true for load balancers that have - // theirloadBalancingScheme set to INTERNAL. - IsMirroringCollector bool `json:"isMirroringCollector,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#forwardingRule for - // forwarding rule resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // resource, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a ForwardingRule. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: Specifies the forwarding rule type. - // - // For more information about forwarding rules, refer to - // Forwarding rule concepts. - // - // Possible values: - // "EXTERNAL" - // "EXTERNAL_MANAGED" - // "EXTERNAL_PASSTHROUGH" - // "INTERNAL" - // "INTERNAL_MANAGED" - // "INTERNAL_SELF_MANAGED" - // "INVALID" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // MetadataFilters: Opaque filter criteria used by load balancer to restrict - // routing - // configuration to a limited set of xDS - // compliant clients. In their xDS requests to load balancer, xDS - // clients - // present node - // metadata. When there is a match, the relevant configuration - // is made available to those proxies. Otherwise, all the resources - // (e.g.TargetHttpProxy, UrlMap) - // referenced by the ForwardingRule are not visible to - // those proxies. - // - // For each metadataFilter in this list, if itsfilterMatchCriteria is set to - // MATCH_ANY, at least one of thefilterLabels must match the corresponding - // label provided in - // the metadata. If its filterMatchCriteria is set to - // MATCH_ALL, then all of its filterLabels must match with - // corresponding labels provided in the metadata. If multiplemetadataFilters - // are specified, all of them need to be satisfied - // in order to be considered a match. - // - // metadataFilters specified here will be applifed before - // those specified in the UrlMap that thisForwardingRule - // references. - // - // metadataFilters only applies to Loadbalancers that have - // their loadBalancingScheme set toINTERNAL_SELF_MANAGED. - MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - // - // For Private Service Connect forwarding rules that forward traffic to - // Google - // APIs, the forwarding rule name must be a 1-20 characters string - // with - // lowercase letters and numbers and must start with a letter. - Name string `json:"name,omitempty"` - // Network: This field is not used for global external load balancing. - // - // For internal passthrough Network Load Balancers, this field identifies - // the - // network that the load balanced IP should belong to for this - // forwarding - // rule. - // If the subnetwork is specified, the network of the subnetwork will be - // used. - // If neither subnetwork nor this field is specified, the default network - // will - // be used. - // - // For Private Service Connect forwarding rules that forward traffic to - // Google - // APIs, a network must be provided. - Network string `json:"network,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring - // this load balancer and can only take the following values:PREMIUM, - // STANDARD. - // - // For regional ForwardingRule, the valid values are PREMIUM andSTANDARD. For - // GlobalForwardingRule, the valid value isPREMIUM. - // - // If this field is not specified, it is assumed to be PREMIUM. - // If IPAddress is specified, this value must be equal to the - // networkTier of the Address. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // NoAutomateDnsZone: This is used in PSC consumer ForwardingRule to control - // whether it should - // try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not - // use - // this field. Once set, this field is not mutable. - NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` - // ParentForwardingRule: [Output Only] Applicable only to the child forwarding - // rules of global external - // passthrough load balancers. This field contains the URL of the - // parent - // forwarding rule. - ParentForwardingRule string `json:"parentForwardingRule,omitempty"` - // PortRange: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The portRange field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, or SCTP, and - // - It's applicable only to the following products: external passthrough - // Network Load Balancers, internal and external proxy Network Load - // Balancers, - // internal and external Application Load Balancers, external protocol - // forwarding, and Classic VPN. - // - Some products have restrictions on what ports can be used. See - // port specifications for details. - // - // - // - // For external forwarding rules, two or more forwarding rules cannot use - // the - // same [IPAddress, IPProtocol] pair, and cannot have - // overlappingportRanges. - // - // For internal forwarding rules within the same VPC network, two or - // more - // forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot have overlapping portRanges. - // - // @pattern: \\d+(?:-\\d+)? - PortRange string `json:"portRange,omitempty"` - // Ports: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The ports field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, or SCTP, and - // - It's applicable only to the following products: internal passthrough - // Network Load Balancers, backend service-based external passthrough - // Network - // Load Balancers, and internal protocol forwarding. - // - You can specify a list of up to five ports by number, separated by - // commas. The ports can be contiguous or discontiguous. - // - // - // - // For external forwarding rules, two or more forwarding rules cannot use - // the - // same [IPAddress, IPProtocol] pair if they share at least one - // port number. - // - // For internal forwarding rules within the same VPC network, two or - // more - // forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair if they share at least one port number. - // - // @pattern: \\d+(?:-\\d+)? - Ports []string `json:"ports,omitempty"` - // PscConnectionId: [Output Only] The PSC connection id of the PSC forwarding - // rule. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer and will not - // serve traffic - // going forward. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer needs - // to take further action before the forwarding rule can serve traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The connection has been rejected by the producer. - // "STATUS_UNSPECIFIED" - PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` - // Region: [Output Only] URL of the region where the regional forwarding rule - // resides. - // This field is not applicable to global forwarding rules. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceDirectoryRegistrations: Service Directory resources to register this - // forwarding rule with. - // Currently, only supports a single Service Directory resource. - ServiceDirectoryRegistrations []*ForwardingRuleServiceDirectoryRegistration `json:"serviceDirectoryRegistrations,omitempty"` - // ServiceLabel: An optional prefix to the service name for this forwarding - // rule. - // If specified, the prefix is the first label of the fully qualified - // service - // name. - // - // The label must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the label must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - // - // This field is only used for internal load balancing. - ServiceLabel string `json:"serviceLabel,omitempty"` - // ServiceName: [Output Only] - // The internal fully qualified service name for this forwarding rule. - // - // This field is only used for internal load balancing. - ServiceName string `json:"serviceName,omitempty"` - // SourceIpRanges: If not empty, this forwarding rule will only forward the - // traffic when the - // source IP address matches one of the IP addresses or CIDR ranges set - // here. - // Note that a forwarding rule can only have up to 64 source IP ranges, - // and - // this field can only be used with a regional forwarding rule whose scheme - // isEXTERNAL. - // Each source_ip_range entry should be either an IP address (for - // example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24). - SourceIpRanges []string `json:"sourceIpRanges,omitempty"` - // Subnetwork: This field identifies the subnetwork that the load balanced IP - // should - // belong to for this forwarding rule, used with internal load balancers - // and - // external passthrough Network Load Balancers with IPv6. - // - // If the network specified is in auto subnet mode, this field is - // optional. - // However, a subnetwork must be specified if the network is in custom - // subnet - // mode or when creating external forwarding rule with IPv6. - Subnetwork string `json:"subnetwork,omitempty"` - // Target: The URL of the target resource to receive the matched traffic. - // For - // regional forwarding rules, this target must be in the same region as - // the - // forwarding rule. For global forwarding rules, this target must be a - // global - // load balancing resource. - // - // The forwarded traffic must be of a type appropriate to the target object. - // - // - // - For load balancers, see the "Target" column in Port specifications - // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // - For Private Service Connect forwarding rules that forward traffic to - // Google APIs, provide the name of a supported Google API bundle: - // - // - // - vpc-sc - APIs that support VPC Service Controls. - // - all-apis - All supported Google APIs. - // - // - // - For Private Service Connect forwarding rules that forward traffic to - // managed services, the target must be a service attachment. The target is not - // mutable once set as a service attachment. - Target string `json:"target,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "IPAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRule) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ForwardingRule) UnmarshalJSON(data []byte) error { - type NoMethod ForwardingRule - var s1 struct { - ExternalManagedBackendBucketMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedBackendBucketMigrationTestingPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExternalManagedBackendBucketMigrationTestingPercentage = float64(s1.ExternalManagedBackendBucketMigrationTestingPercentage) - return nil -} - -type ForwardingRuleAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ForwardingRulesScopedList resources. - Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#forwardingRuleAggregatedList for lists of forwarding rules. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ForwardingRuleAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleAggregatedListWarning: [Output Only] Informational warning -// message. -type ForwardingRuleAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRuleAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleList: Contains a list of ForwardingRule resources. -type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ForwardingRule resources. - Items []*ForwardingRule `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ForwardingRuleListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleListWarning: [Output Only] Informational warning message. -type ForwardingRuleListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRuleListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleReference struct { - ForwardingRule string `json:"forwardingRule,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForwardingRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForwardingRule") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleReference) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleServiceDirectoryRegistration: Describes the auto-registration -// of the forwarding rule to Service Directory. -// The region and project of the Service Directory resource generated from -// this registration will be the same as this forwarding rule. -type ForwardingRuleServiceDirectoryRegistration struct { - // Namespace: Service Directory namespace to register the forwarding rule - // under. - Namespace string `json:"namespace,omitempty"` - // Service: Service Directory service to register the forwarding rule under. - Service string `json:"service,omitempty"` - // ServiceDirectoryRegion: [Optional] Service Directory region to register this - // global forwarding - // rule under. Default to "us-central1". Only used for PSC for Google APIs. - // All PSC for Google APIs forwarding rules on the same network should use - // the same Service Directory region. - ServiceDirectoryRegion string `json:"serviceDirectoryRegion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Namespace") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Namespace") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleServiceDirectoryRegistration) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleServiceDirectoryRegistration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedList struct { - // ForwardingRules: A list of forwarding rules contained in this scope. - ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` - // Warning: Informational warning which replaces the list of forwarding rules - // when - // the list is empty. - Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForwardingRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForwardingRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRulesScopedListWarning: Informational warning which replaces the -// list of forwarding rules when -// the list is empty. -type ForwardingRulesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservation struct { - // AggregateReservation: Aggregate reservation details for the future - // reservation. - AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` - // AutoCreatedReservationsDeleteTime: Future timestamp when the FR auto-created - // reservations will be deleted by - // Compute Engine. Format of this field must be a - // valid - // href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value. - AutoCreatedReservationsDeleteTime string `json:"autoCreatedReservationsDeleteTime,omitempty"` - // AutoCreatedReservationsDuration: Specifies the duration of auto-created - // reservations. - // It represents relative time to future reservation start_time - // when - // auto-created reservations will be automatically deleted by Compute - // Engine. Duration time unit is represented as a count of seconds - // and fractions of seconds at nanosecond resolution. - AutoCreatedReservationsDuration *Duration `json:"autoCreatedReservationsDuration,omitempty"` - // AutoDeleteAutoCreatedReservations: Setting for enabling or disabling - // automatic deletion for auto-created - // reservation. If set to true, auto-created reservations will be - // deleted at Future Reservation's end time (default) or at user's - // defined - // timestamp if any of the - // [auto_created_reservations_delete_time, - // auto_created_reservations_duration] - // values is specified. - // For keeping auto-created reservation indefinitely, this value should be - // set - // to false. - AutoDeleteAutoCreatedReservations bool `json:"autoDeleteAutoCreatedReservations,omitempty"` - // CommitmentInfo: If not present, then FR will not deliver a new commitment or - // update an - // existing commitment. - CommitmentInfo *FutureReservationCommitmentInfo `json:"commitmentInfo,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this future - // reservation inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeploymentType: Type of the deployment requested as part of future - // reservation. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the future reservation. - Description string `json:"description,omitempty"` - // EnableEmergentMaintenance: Indicates if this group of VMs have emergent - // maintenance enabled. - EnableEmergentMaintenance bool `json:"enableEmergentMaintenance,omitempty"` - // Id: [Output Only] A unique identifier for this future reservation. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#futureReservation - // for future reservations. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NamePrefix: Name prefix for the reservations to be created at the time - // of - // delivery. The name prefix must comply with RFC1035. - // Maximum allowed length for name prefix is 20. Automatically - // created - // reservations name format will be -date-####. - NamePrefix string `json:"namePrefix,omitempty"` - // PlanningStatus: Planning state before being submitted for evaluation - // - // Possible values: - // "DRAFT" - Future Reservation is being drafted. - // "PLANNING_STATUS_UNSPECIFIED" - // "SUBMITTED" - Future Reservation has been submitted for evaluation by GCP. - PlanningStatus string `json:"planningStatus,omitempty"` - // ProtectionTier: Protection tier for the workload. - // - // Possible values: - // "CAPACITY_OPTIMIZED" - CAPACITY_OPTIMIZED capacity leverages redundancies - // (e.g. power, cooling) - // at the data center during normal operating conditions. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload may be disrupted. As a consequence, it has a - // weaker availability SLO than STANDARD. - // "PROTECTION_TIER_UNSPECIFIED" - Unspecified protection tier. - // "STANDARD" - STANDARD protection for workload that should be protected by - // redundancies - // (e.g. power, cooling) at the data center level. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload is expected to continue as normal using - // the - // redundancies. - ProtectionTier string `json:"protectionTier,omitempty"` - // ReservationMode: The reservation mode which determines - // reservation-termination behavior and - // expected pricing. - // - // Possible values: - // "CALENDAR" - The delivered reservations will delivered at specified start - // time and - // terminated at specified end time along with terminating the VMs running - // on it. - // "DEFAULT" - The delivered reservations do not terminate VMs at the end - // of - // reservations. This is default mode. - // "RESERVATION_MODE_UNSPECIFIED" - ReservationMode string `json:"reservationMode,omitempty"` - // ReservationName: Name of reservations where the capacity is provisioned at - // the time of - // delivery of future reservations. If the reservation with the given - // name - // does not exist already, it is created automatically at the time of - // Approval - // with INACTIVE state till specified start-time. Either provide - // the - // reservation_name or a name_prefix. - ReservationName string `json:"reservationName,omitempty"` - // SchedulingType: Maintenance information for this reservation - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShareSettings: List of Projects/Folders to share with. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservationRequired: Indicates whether the auto-created reservation - // can be consumed by VMs with - // affinity for "any" reservation. If the field is set, then only VMs - // that - // target the reservation by name can consume from the delivered reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // SpecificSkuProperties: Future Reservation configuration to indicate instance - // properties and - // total count. - SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // Status: [Output only] Status of the Future Reservation - Status *FutureReservationStatus `json:"status,omitempty"` - // TimeWindow: Time window for this Future Reservation. - TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` - // Zone: [Output Only] URL of the Zone where this future reservation resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AggregateReservation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateReservation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservation) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationCommitmentInfo struct { - // CommitmentName: name of the commitment where capacity is being delivered to. - CommitmentName string `json:"commitmentName,omitempty"` - // CommitmentPlan: Indicates if a Commitment needs to be created as part of FR - // delivery. If - // this field is not present, then no - // commitment needs to be created. - // - // Possible values: - // "INVALID" - // "SIXTY_MONTH" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - // "TWENTY_FOUR_MONTH" - CommitmentPlan string `json:"commitmentPlan,omitempty"` - // PreviousCommitmentTerms: Only applicable if FR is delivering to the same - // reservation. If set, all - // parent commitments will be extended to match the end date of the plan - // for - // this commitment. - // - // Possible values: - // "EXTEND" - All associated parent Committed Used Discount(s) end-date/term - // will be - // extended to the end-time of this future reservation. Default is to - // extend previous commitment(s) time to the end_time of the reservation. - // "PREVIOUSCOMMITMENTTERM_UNSPECIFIED" - No changes to associated parents - // Committed Used Discount(s) terms. - PreviousCommitmentTerms string `json:"previousCommitmentTerms,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommitmentName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CommitmentName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationCommitmentInfo) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationCommitmentInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationSpecificSKUProperties struct { - // InstanceProperties: Properties of the SKU instances being reserved. - InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // SourceInstanceTemplate: The instance template that will be used to populate - // the - // ReservedInstanceProperties of the future reservation - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // TotalCount: Total number of instances for which capacity assurance is - // requested at a - // future time period. - TotalCount int64 `json:"totalCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InstanceProperties") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceProperties") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationSpecificSKUProperties) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationSpecificSKUProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatus: [Output only] Represents status related to the -// future reservation. -type FutureReservationStatus struct { - // AmendmentStatus: [Output Only] The current status of the requested - // amendment. - // - // Possible values: - // "AMENDMENT_APPROVED" - The requested amendment to the Future Resevation - // has been approved and - // applied by GCP. - // "AMENDMENT_DECLINED" - The requested amendment to the Future Reservation - // has been declined by - // GCP and the original state was restored. - // "AMENDMENT_IN_REVIEW" - The requested amendment to the Future Reservation - // is currently being - // reviewd by GCP. - // "AMENDMENT_STATUS_UNSPECIFIED" - AmendmentStatus string `json:"amendmentStatus,omitempty"` - // AutoCreatedReservations: Fully qualified urls of the automatically created - // reservations at - // start_time. - AutoCreatedReservations []string `json:"autoCreatedReservations,omitempty"` - // ExistingMatchingUsageInfo: [Output Only] Represents the existing matching - // usage for the future - // reservation. - ExistingMatchingUsageInfo *FutureReservationStatusExistingMatchingUsageInfo `json:"existingMatchingUsageInfo,omitempty"` - // FulfilledCount: This count indicates the fulfilled capacity so far. This is - // set during - // "PROVISIONING" state. This count also includes capacity delivered as part - // of existing matching reservations. - FulfilledCount int64 `json:"fulfilledCount,omitempty,string"` - // LastKnownGoodState: [Output Only] This field represents the future - // reservation before an - // amendment was requested. If the amendment is declined, the - // Future - // Reservation will be reverted to the last known good state. The last - // known - // good state is not set when updating a future reservation whose - // Procurement Status is DRAFTING. - LastKnownGoodState *FutureReservationStatusLastKnownGoodState `json:"lastKnownGoodState,omitempty"` - // LockTime: Time when Future Reservation would become LOCKED, after which - // no - // modifications to Future Reservation will be allowed. Applicable only - // after the Future Reservation is in the APPROVED state. The lock_time is - // an RFC3339 string. The procurement_status will transition to PROCURING - // state at this time. - LockTime string `json:"lockTime,omitempty"` - // ProcurementStatus: Current state of this Future Reservation - // - // Possible values: - // "APPROVED" - Future reservation is approved by GCP. - // "CANCELLED" - Future reservation is cancelled by the customer. - // "COMMITTED" - Future reservation is committed by the customer. - // "DECLINED" - Future reservation is rejected by GCP. - // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions - // to - // PENDING_APPROVAL upon user submitting FR. - // "FAILED" - Future reservation failed. No additional reservations were - // provided. - // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially fulfilled. - // Additional reservations were - // provided but did not reach total_count reserved instance slots. - // "FULFILLED" - Future reservation is fulfilled completely. - // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future Reservation has - // been requested. If the - // Amendment is declined, the Future Reservation will be restored to the - // last known good state. - // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. - // "PROCUREMENT_STATUS_UNSPECIFIED" - // "PROCURING" - Future reservation is being procured by GCP. Beyond this - // point, Future - // reservation is locked and no further modifications are allowed. - // "PROVISIONING" - Future reservation capacity is being provisioned. This - // state will be - // entered after start_time, while reservations are being created to - // provide total_count reserved instance slots. This state will not - // persist past start_time + 24h. - ProcurementStatus string `json:"procurementStatus,omitempty"` - SpecificSkuProperties *FutureReservationStatusSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "AmendmentStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AmendmentStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatus) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusExistingMatchingUsageInfo: [Output Only] Represents -// the existing matching usage for the future -// reservation. -type FutureReservationStatusExistingMatchingUsageInfo struct { - // Count: Count to represent min(FR - // total_count, - // matching_reserved_capacity+matching_unreserved_instances) - Count int64 `json:"count,omitempty,string"` - // Timestamp: Timestamp when the matching usage was calculated - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusExistingMatchingUsageInfo) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusExistingMatchingUsageInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusLastKnownGoodState: The state that the future -// reservation will be reverted to should the -// amendment be declined. -type FutureReservationStatusLastKnownGoodState struct { - // Description: [Output Only] The description of the FutureReservation before - // an - // amendment was requested. - Description string `json:"description,omitempty"` - // ExistingMatchingUsageInfo: [Output Only] Represents the matching usage for - // the future - // reservation before an amendment was requested. - ExistingMatchingUsageInfo *FutureReservationStatusExistingMatchingUsageInfo `json:"existingMatchingUsageInfo,omitempty"` - FutureReservationSpecs *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs `json:"futureReservationSpecs,omitempty"` - // LockTime: [Output Only] The lock time of the FutureReservation before - // an - // amendment was requested. - LockTime string `json:"lockTime,omitempty"` - // NamePrefix: [Output Only] The name prefix of the Future Reservation before - // an - // amendment was requested. - NamePrefix string `json:"namePrefix,omitempty"` - // ProcurementStatus: [Output Only] The status of the last known good state for - // the Future - // Reservation. - // - // Possible values: - // "APPROVED" - Future reservation is approved by GCP. - // "CANCELLED" - Future reservation is cancelled by the customer. - // "COMMITTED" - Future reservation is committed by the customer. - // "DECLINED" - Future reservation is rejected by GCP. - // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions - // to - // PENDING_APPROVAL upon user submitting FR. - // "FAILED" - Future reservation failed. No additional reservations were - // provided. - // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially fulfilled. - // Additional reservations were - // provided but did not reach total_count reserved instance slots. - // "FULFILLED" - Future reservation is fulfilled completely. - // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future Reservation has - // been requested. If the - // Amendment is declined, the Future Reservation will be restored to the - // last known good state. - // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. - // "PROCUREMENT_STATUS_UNSPECIFIED" - // "PROCURING" - Future reservation is being procured by GCP. Beyond this - // point, Future - // reservation is locked and no further modifications are allowed. - // "PROVISIONING" - Future reservation capacity is being provisioned. This - // state will be - // entered after start_time, while reservations are being created to - // provide total_count reserved instance slots. This state will not - // persist past start_time + 24h. - ProcurementStatus string `json:"procurementStatus,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusLastKnownGoodState) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusLastKnownGoodState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusLastKnownGoodStateFutureReservationSpecs: The -// properties of the last known good state for the Future Reservation. -type FutureReservationStatusLastKnownGoodStateFutureReservationSpecs struct { - // ShareSettings: [Output Only] The previous share settings of the Future - // Reservation. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificSkuProperties: [Output Only] The previous instance related - // properties of the - // Future Reservation. - SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // TimeWindow: [Output Only] The previous time window of the Future - // Reservation. - TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "ShareSettings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShareSettings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusLastKnownGoodStateFutureReservationSpecs) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusLastKnownGoodStateFutureReservationSpecs - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusSpecificSKUProperties: Properties to be set for the -// Future Reservation. -type FutureReservationStatusSpecificSKUProperties struct { - // SourceInstanceTemplateId: ID of the instance template used to populate the - // Future Reservation - // properties. - SourceInstanceTemplateId string `json:"sourceInstanceTemplateId,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceInstanceTemplateId") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceInstanceTemplateId") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusSpecificSKUProperties) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusSpecificSKUProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationTimeWindow struct { - Duration *Duration `json:"duration,omitempty"` - EndTime string `json:"endTime,omitempty"` - // StartTime: Start time of the Future Reservation. The start_time is an - // RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationTimeWindow) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationTimeWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsAggregatedListResponse: Contains a list of future -// reservations. -type FutureReservationsAggregatedListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Future reservation resources. - Items map[string]FutureReservationsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#futureReservationsAggregatedListResponse for future - // resevation aggregated list response. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FutureReservationsAggregatedListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsAggregatedListResponseWarning: [Output Only] Informational -// warning message. -type FutureReservationsAggregatedListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsAggregatedListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsAggregatedListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of future reservation resources. - Items []*FutureReservation `json:"items,omitempty"` - // Kind: [Output Only] Type of - // resource.Alwayscompute#FutureReservationsListResponse for lists - // of - // reservations - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FutureReservationsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsListResponseWarning: [Output Only] Informational warning -// message. -type FutureReservationsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsScopedList struct { - // FutureReservations: A list of future reservations contained in this scope. - FutureReservations []*FutureReservation `json:"futureReservations,omitempty"` - // Warning: Informational warning which replaces the list of future - // reservations when - // the list is empty. - Warning *FutureReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "FutureReservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FutureReservations") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsScopedListWarning: Informational warning which replaces -// the list of future reservations when -// the list is empty. -type FutureReservationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesRecommendation: Recommendation for single resources -// specification, to be created in the -// future. -type FutureResourcesRecommendation struct { - EndTime string `json:"endTime,omitempty"` - // Location: The advised location for resource usage. When a zone, in - // format - // 'zones/'. - // If not set, it means that no location is recommended - see - // other_locations for details. - Location string `json:"location,omitempty"` - // OtherLocations: List of locations in the request scope that were - // not - // recommended. Keys of the map are zones, in format 'zones/'. - // The values are status information indicating the recommendation status. - OtherLocations map[string]FutureResourcesRecommendationOtherLocation `json:"otherLocations,omitempty"` - // RecommendationId: Unique id of the recommendation, a UUID string generated - // by the API. - RecommendationId string `json:"recommendationId,omitempty"` - // RecommendationType: Type of recommendation. Currently only - // FUTURE_RESERVATION is supported. - // - // Possible values: - // "FUTURE_RESERVATION" - A Future Reservation is recommended. - // "RECOMMENDATION_TYPE_UNSPECIFIED" - Default value, unused. - RecommendationType string `json:"recommendationType,omitempty"` - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesRecommendationOtherLocation: Information about recommendation -// status for locations -// that were allowed but not used by the response. -type FutureResourcesRecommendationOtherLocation struct { - // Details: Details (human readable) describing the situation. - // For example, if status is CONDITION_NOT_MET, then - // details contain information about the parameters of the time window - // that did not meet the required conditions. - Details string `json:"details,omitempty"` - // Status: Status of recommendation in this location. - // - // Possible values: - // "CONDITIONS_NOT_MET" - The requested resources are offered in this - // location - // but the requested time window is does not meet the required conditions. - // "NOT_SUPPORTED" - The requested resources are not offered in this - // location. - // Retrying the request will not change this status. - // "NO_CAPACITY" - The requested resources are offered in this location - // and the requested time window is accepted - // but there is no capacity within the requested time window. - // "OTHER_LOCATION_STATUS_UNDEFINED" - Default value, unused. - // "RECOMMENDED" - The requested resources are offered in this location - // and it is possible to request them. However, another location - // was better and was recommended. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Details") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Details") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesRecommendationOtherLocation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesRecommendationOtherLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpec: Specification of resources to be created at some time -// in the future within an -// optionally specified set of locations, and within the specified time range. -type FutureResourcesSpec struct { - // DeploymentType: Indicates if the reservation allocation strategy is static - // (DENSE) or - // dynamic (STANDARD). Defaults to DENSE. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // LocationPolicy: Optional location policy allowing to exclude some zone(s) in - // which - // the resources must not be created. - LocationPolicy *FutureResourcesSpecLocationPolicy `json:"locationPolicy,omitempty"` - // TargetResources: Specification of the reserved resources. - TargetResources *FutureResourcesSpecTargetResources `json:"targetResources,omitempty"` - // TimeRangeSpec: Specification of a time range in which the resources may be - // created. - // The time range specifies start of resource use and planned end of - // resource - // use. - TimeRangeSpec *FlexibleTimeRange `json:"timeRangeSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeploymentType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeploymentType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpec) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecAggregateResources struct { - // AcceleratorCount: Size of the request, in accelerator (chip) count. - AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` - // VmFamily: The VM family that all instances scheduled against this - // reservation - // must belong to. Use for TPU reservations. - // - // Possible values: - // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" - // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - VmFamily string `json:"vmFamily,omitempty"` - // WorkloadType: Workload type. Use for TPU reservations. - // - // Possible values: - // "BATCH" - Reserved resources will be optimized for BATCH workloads, such - // as ML - // training. - // "SERVING" - Reserved resources will be optimized for SERVING workloads, - // such as ML - // inference. - // "UNSPECIFIED" - WorkloadType string `json:"workloadType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecAggregateResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecAggregateResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecLocalSsdPartition struct { - // DiskInterface: Disk interface. Defaults to SCSI. - // - // Possible values: - // "NVDIMM" - // "NVME" - // "SCSI" - DiskInterface string `json:"diskInterface,omitempty"` - // DiskSizeGb: The size of the disk in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DiskInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskInterface") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocalSsdPartition) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocalSsdPartition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecLocationPolicy: Specification of locations to create -// resources in. -type FutureResourcesSpecLocationPolicy struct { - // Locations: Preferences for specified locations. - // Keys of the map are locations - zones, in format of 'zones/'. - // Values are preferences for the zones. - // If a zone is not specified in this map, it is ALLOWed. - Locations map[string]FutureResourcesSpecLocationPolicyLocation `json:"locations,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecLocationPolicyLocation: Preference for a single specified -// location. -type FutureResourcesSpecLocationPolicyLocation struct { - // Preference: Preference for this location. - // - // Possible values: - // "ALLOW" - Location is allowed for use. - // "DENY" - Location is prohibited. - // "PREFERENCE_UNSPECIFIED" - Default value, unused. - Preference string `json:"preference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocationPolicyLocation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocationPolicyLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecSpecificSKUResources struct { - // InstanceCount: Size of the request, in instance count. - InstanceCount int64 `json:"instanceCount,omitempty,string"` - // LocalSsdPartitions: Local SSD partitions. You do not have to include SSD - // partitions that - // are built in the machine type. - LocalSsdPartitions []*FutureResourcesSpecLocalSsdPartition `json:"localSsdPartitions,omitempty"` - // MachineType: The machine type to use for instances that will use the - // reservation. - // This field only accepts machine type names. e.g. n2-standard-4 - // and does not accept machine type full or partial url. - // e.g. - // projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4. - // Use for GPU reservations. - MachineType string `json:"machineType,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecSpecificSKUResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecSpecificSKUResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecTargetResources: Specification of reserved resources. -type FutureResourcesSpecTargetResources struct { - AggregateResources *FutureResourcesSpecAggregateResources `json:"aggregateResources,omitempty"` - SpecificSkuResources *FutureResourcesSpecSpecificSKUResources `json:"specificSkuResources,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregateResources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateResources") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecTargetResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecTargetResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GRPCHealthCheck struct { - // GrpcServiceName: The gRPC service name for the health check. This field is - // optional. The - // value of grpc_service_name has the following meanings by convention: - // - // - Empty service_name means the overall status of all services at - // the - // backend. - // - // - Non-empty service_name means the health of that gRPC service, as - // defined - // by the owner of the service. - // - // The grpc_service_name can only be ASCII. - GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // Valid - // values are 1 through 65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcServiceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GRPCHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod GRPCHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GRPCTLSHealthCheck struct { - // GrpcServiceName: The gRPC service name for the health check. This field is - // optional. The - // value of grpc_service_name has the following meanings by convention: - // - // - Empty service_name means the overall status of all services at - // the - // backend. - // - // - Non-empty service_name means the health of that gRPC service, as - // defined - // by the owner of the service. - // - // The grpc_service_name can only be ASCII. - GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // Valid - // values are 1 through 65535. - Port int64 `json:"port,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcServiceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GRPCTLSHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod GRPCTLSHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GetAsyncReplicationStatusResponse struct { - AsyncReplicationStatus *AsyncReplicationStatus `json:"asyncReplicationStatus,omitempty"` - // Etag: end_interface: MixerGetResponseWithEtagBuilder - Etag string `json:"etag,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AsyncReplicationStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncReplicationStatus") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetAsyncReplicationStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetAsyncReplicationStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GetOwnerInstanceResponse struct { - // Instance: Full instance resource URL. - Instance string `json:"instance,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetOwnerInstanceResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetOwnerInstanceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalAddressesMoveRequest struct { - // Description: An optional destination address description if intended to be - // different - // from the source. - Description string `json:"description,omitempty"` - // DestinationAddress: The URL of the destination address to move to. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a address: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/addresses/address - // - // - projects/project/global/addresses/address - // - // - // Note that destination project must be different from the source project. - // So/global/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalAddressesMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalOrganizationSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalOrganizationSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalOrganizationSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash when updating or - // changing - // labels, otherwise the request will fail with error412 conditionNotMet. Make - // a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: A list of labels to apply for this resource. Each label must comply - // with - // the - // requirements for labels. For example,"webserver-frontend": "images". A label - // value can also be - // empty (e.g. "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicy: Message describing GlobalVmExtensionPolicy object. -type GlobalVmExtensionPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExtensionPolicies: Required. Map from extension (eg: "cloudops") to its - // policy configuration. - // The key is the name of the extension. - ExtensionPolicies map[string]GlobalVmExtensionPolicyExtensionPolicy `json:"extensionPolicies,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSelectors: Optional. Selector to target VMs for a policy. - // There is a logical "AND" between instance_selectors. - InstanceSelectors []*GlobalVmExtensionPolicyInstanceSelector `json:"instanceSelectors,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#globalVmExtensionPolicy for globalVmExtensionPolicies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Priority: Optional. Used to resolve conflicts when multiple policies are - // active for the same - // extension. Defaults to 0. - // - // Larger the number, higher the priority. When the priority is the same, - // the policy with the newer create time has higher priority. - Priority int64 `json:"priority,omitempty"` - // RolloutOperation: Required. The rollout strategy and status. - RolloutOperation *GlobalVmExtensionPolicyRolloutOperation `json:"rolloutOperation,omitempty"` - // ScopedResourceStatus: [Output Only] The scoped resource status. It's only - // for tracking the - // purging status of the policy. - // - // Possible values: - // "SCOPED_RESOURCE_STATUS_DELETING" - The zonal policies are being deleted. - // "SCOPED_RESOURCE_STATUS_UNSPECIFIED" - Default value. This value is - // unused. - ScopedResourceStatus string `json:"scopedResourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UpdateTimestamp: [Output Only] Update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyExtensionPolicy: Policy for a single extension. -type GlobalVmExtensionPolicyExtensionPolicy struct { - // PinnedVersion: Optional. The version pinning for the extension. - // If empty, the extension will be installed with the latest version - // released by the extension producer. - PinnedVersion string `json:"pinnedVersion,omitempty"` - // StringConfig: Optional. String configuration. Any string payload that the - // extension - // understands. - StringConfig string `json:"stringConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PinnedVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PinnedVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyInstanceSelector: Selector to target VMs for a zone -// VM extension policy. -type GlobalVmExtensionPolicyInstanceSelector struct { - // LabelSelector: Optional. Labels within the LabelSelector are OR'd. - LabelSelector *GlobalVmExtensionPolicyLabelSelector `json:"labelSelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelSelector") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyInstanceSelector) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyInstanceSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyLabelSelector: A LabelSelector is applicable for a VM -// only if it matches all labels in -// the LabelSelector. -type GlobalVmExtensionPolicyLabelSelector struct { - // InclusionLabels: Optional. Labels as key value pairs. - // A VM should contain all the pairs specified in this map to be - // selected; - // Labels within the LabelSelector are OR'ed. - InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "InclusionLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InclusionLabels") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyLabelSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyList: Response to list global VM extension policy -// resources. -type GlobalVmExtensionPolicyList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of GlobalVmExtensionPolicy resources. - Items []*GlobalVmExtensionPolicy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *GlobalVmExtensionPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyListWarning: [Output Only] Informational warning -// message. -type GlobalVmExtensionPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*GlobalVmExtensionPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyRolloutOperation: Represents the rollout operation -type GlobalVmExtensionPolicyRolloutOperation struct { - // RolloutInput: Required. The rollout input which defines the rollout plan. - RolloutInput *GlobalVmExtensionPolicyRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - // RolloutStatus: [Output Only] The rollout status of the policy. - RolloutStatus *GlobalVmExtensionPolicyRolloutOperationRolloutStatus `json:"rolloutStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "RolloutInput") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RolloutInput") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperation) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutInput struct { - // ConflictBehavior: Optional. [Optional] Specifies the behavior of the Rollout - // if a conflict is - // detected in a project during a Rollout. It can be one of the - // following - // values: - // 1) empty : don't overwrite the local value if conflict happens. This is - // the default behavior. - // 2) "overwrite" : Overwrite the local value with the rollout value. - // The concept of "conflict" applies to: - // 1) Insert action. If the zonal policy already exists when Insert - // happens, it's a conflict. - // 2) Update action. If the zonal policy was updated out of band by a - // zonal API, it's a conflict. - ConflictBehavior string `json:"conflictBehavior,omitempty"` - // Name: Optional. The name of the rollout - // plan. - // Ex. - // projects//locations/global/rolloutPlans/. - Name string `json:"name,omitempty"` - // PredefinedRolloutPlan: Optional. Predefined rollout plan. - // - // Possible values: - // "FAST_ROLLOUT" - // "ROLLOUT_PLAN_UNSPECIFIED" - // "SLOW_ROLLOUT" - PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // RetryUuid: Optional. The UUID of the retry action. Only set it if this is a - // retry - // for an existing resource. This is for the user re-populate the - // resource - // without changes. An error will be returned if the retry_uuid is set but - // the resource get modified. - RetryUuid string `json:"retryUuid,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConflictBehavior") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutInput) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutStatus struct { - // CurrentRollouts: [Output Only] The current rollouts for the latest version - // of the - // resource. There should be only one current rollout, but for - // scalability, we make it repeated. - CurrentRollouts []*GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata `json:"currentRollouts,omitempty"` - // PreviousRollout: [Output Only] The last completed rollout resource. This - // field will not - // be populated until the first rollout is completed. - PreviousRollout *GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata `json:"previousRollout,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentRollouts") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentRollouts") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutStatus) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata struct { - // Rollout: [Output Only] The name of the rollout. - // Ex. projects//locations/global/rollouts/. - Rollout string `json:"rollout,omitempty"` - // RolloutPlan: [Output Only] The name of the rollout - // plan. - // Ex. - // projects//locations/global/rolloutPlans/. - RolloutPlan string `json:"rolloutPlan,omitempty"` - // State: [Output Only] The overall state of the rollout. - // - // Possible values: - // "STATE_CANCELLED" - Iteration was explicitly cancelled. - // "STATE_COMPLETED" - Iteration completed, with all actions being - // successful. - // "STATE_FAILED" - Iteration completed, with failures. - // "STATE_PAUSED" - The rollout is paused. - // "STATE_PROCESSING" - Iteration is in progress. - // "STATE_UNKNOWN" - Impossible to determine current state of the iteration. - // "STATE_UNSPECIFIED" - Default value. This value is unused. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rollout") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rollout") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GroupMaintenanceInfo: Maintenance Info for ReservationBlocks. -type GroupMaintenanceInfo struct { - // InstanceMaintenanceOngoingCount: Describes number of instances that have - // ongoing maintenance. - InstanceMaintenanceOngoingCount int64 `json:"instanceMaintenanceOngoingCount,omitempty"` - // InstanceMaintenancePendingCount: Describes number of instances that have - // pending maintenance. - InstanceMaintenancePendingCount int64 `json:"instanceMaintenancePendingCount,omitempty"` - // MaintenanceOngoingCount: Progress for ongoing maintenance for this group of - // VMs/hosts. - // Describes number of hosts in the block that have ongoing maintenance. - MaintenanceOngoingCount int64 `json:"maintenanceOngoingCount,omitempty"` - // MaintenancePendingCount: Progress for ongoing maintenance for this group of - // VMs/hosts. - // Describes number of hosts in the block that have pending maintenance. - MaintenancePendingCount int64 `json:"maintenancePendingCount,omitempty"` - // SchedulingType: The type of maintenance for the reservation. - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SubblockInfraMaintenanceOngoingCount: Describes number of subblock - // Infrastructure that has ongoing maintenance. - // Here, Subblock Infrastructure Maintenance pertains to upstream - // hardware - // contained in the Subblock that is necessary for a VM Family(e.g. - // NVLink - // Domains). Not all VM Families will support this field. - SubblockInfraMaintenanceOngoingCount int64 `json:"subblockInfraMaintenanceOngoingCount,omitempty"` - // SubblockInfraMaintenancePendingCount: Describes number of subblock - // Infrastructure that has pending maintenance. - // Here, Subblock Infrastructure Maintenance pertains to upstream hardware - // contained in the Subblock that is necessary for a VM Family (e.g. NVLink - // Domains). Not all VM Families will support this field. - SubblockInfraMaintenancePendingCount int64 `json:"subblockInfraMaintenancePendingCount,omitempty"` - // UpcomingGroupMaintenance: Maintenance information on this group of VMs. - UpcomingGroupMaintenance *UpcomingMaintenance `json:"upcomingGroupMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "InstanceMaintenanceOngoingCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceMaintenanceOngoingCount") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GroupMaintenanceInfo) MarshalJSON() ([]byte, error) { - type NoMethod GroupMaintenanceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcServiceConfig: [Deprecated] gRPC config to access the SDS server. -// gRPC config to access the SDS server. -type GrpcServiceConfig struct { - // CallCredentials: The call credentials to access the SDS server. - CallCredentials *CallCredentials `json:"callCredentials,omitempty"` - // ChannelCredentials: The channel credentials to access the SDS server. - ChannelCredentials *ChannelCredentials `json:"channelCredentials,omitempty"` - // TargetUri: The target URI of the SDS server. - TargetUri string `json:"targetUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "CallCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CallCredentials") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcServiceConfig) MarshalJSON() ([]byte, error) { - type NoMethod GrpcServiceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributes: A guest attributes entry. -type GuestAttributes struct { - // Kind: [Output Only] Type of the resource. Alwayscompute#guestAttributes for - // guest attributes entry. - Kind string `json:"kind,omitempty"` - // QueryPath: The path to be queried. This can be the default namespace ('') or - // a - // nested namespace ('\/') or a specified key - // ('\/\'). - QueryPath string `json:"queryPath,omitempty"` - // QueryValue: [Output Only] The value of the requested queried path. - QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // VariableKey: The key to search for. - VariableKey string `json:"variableKey,omitempty"` - // VariableValue: [Output Only] The value found for the requested key. - VariableValue string `json:"variableValue,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributesEntry: A guest attributes namespace/key/value entry. -type GuestAttributesEntry struct { - // Key: Key for the guest attribute entry. - Key string `json:"key,omitempty"` - // Namespace: Namespace for the guest attribute entry. - Namespace string `json:"namespace,omitempty"` - // Value: Value for the guest attribute entry. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributesEntry) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributesValue: Array of guest attribute namespace/key/value tuples. -type GuestAttributesValue struct { - Items []*GuestAttributesEntry `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributesValue) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The ID of a supported feature. To add multiple values, use commas - // to - // separate values. Set to one or more of the following values: - // - // - VIRTIO_SCSI_MULTIQUEUE - // - WINDOWS - // - MULTI_IP_SUBNET - // - UEFI_COMPATIBLE - // - GVNIC - // - SEV_CAPABLE - // - SUSPEND_RESUME_COMPATIBLE - // - SEV_LIVE_MIGRATABLE_V2 - // - SEV_SNP_CAPABLE - // - TDX_CAPABLE - // - IDPF - // - SNP_SVSM_CAPABLE - // - // - // For more information, see - // Enabling guest operating system features. - // - // Possible values: - // "BARE_METAL_LINUX_COMPATIBLE" - // "FEATURE_TYPE_UNSPECIFIED" - // "GVNIC" - // "IDPF" - // "MULTI_IP_SUBNET" - // "SECURE_BOOT" - // "SEV_CAPABLE" - // "SEV_LIVE_MIGRATABLE" - // "SEV_LIVE_MIGRATABLE_V2" - // "SEV_SNP_CAPABLE" - // "SNP_SVSM_CAPABLE" - // "TDX_CAPABLE" - // "UEFI_COMPATIBLE" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestOsFeature) MarshalJSON() ([]byte, error) { - type NoMethod GuestOsFeature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTP2HealthCheck struct { - // Host: The value of the host header in the HTTP/2 health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTP/2 health check request. The - // default value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTP/2 health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // WeightReportMode: Weight report mode. used for weighted Load Balancing. - // - // Possible values: - // "DISABLE" - Health Checker will not parse the header field. - // "DRY_RUN" - Health Checker will parse and report the weight in the header - // field, but - // load balancing will not be based on the weights and will use equal - // weights. - // "ENABLE" - Health Checker will try to parse and report the weight in the - // header - // field, and load balancing will be based on the weights as long as - // all - // backends have a valid weight or only a subset of backends has - // the - // UNAVAILABLE_WEIGHT WeightError. The latter case is to continue the - // weighted load balancing while some backends are in TIMEOUT or UNKNOWN - // health status. - WeightReportMode string `json:"weightReportMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTP2HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTP2HealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 80. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Also supported in legacy HTTP health checks for target pools. - // The health check supports all backends supported by the backend - // service - // provided the backend can be health checked. For example,GCE_VM_IP network - // endpoint groups, GCE_VM_IP_PORT - // network endpoint groups, and instance group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for pass-through load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTP health check request. The default - // value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTP health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // WeightReportMode: Weight report mode. used for weighted Load Balancing. - // - // Possible values: - // "DISABLE" - Health Checker will not parse the header field. - // "DRY_RUN" - Health Checker will parse and report the weight in the header - // field, but - // load balancing will not be based on the weights and will use equal - // weights. - // "ENABLE" - Health Checker will try to parse and report the weight in the - // header - // field, and load balancing will be based on the weights as long as - // all - // backends have a valid weight or only a subset of backends has - // the - // UNAVAILABLE_WEIGHT WeightError. The latter case is to continue the - // weighted load balancing while some backends are in TIMEOUT or UNKNOWN - // health status. - WeightReportMode string `json:"weightReportMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTPS health check request. The default - // value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTPS health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // WeightReportMode: Weight report mode. used for weighted Load Balancing. - // - // Possible values: - // "DISABLE" - Health Checker will not parse the header field. - // "DRY_RUN" - Health Checker will parse and report the weight in the header - // field, but - // load balancing will not be based on the weights and will use equal - // weights. - // "ENABLE" - Health Checker will try to parse and report the weight in the - // header - // field, and load balancing will be based on the weights as long as - // all - // backends have a valid weight or only a subset of backends has - // the - // UNAVAILABLE_WEIGHT WeightError. The latter case is to continue the - // weighted load balancing while some backends are in TIMEOUT or UNKNOWN - // health status. - WeightReportMode string `json:"weightReportMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPSHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaController: HaController handles failover for a VM Instance. -type HaController struct { - // BackendServices: Advanced configuration option. If specified, these Backend - // Services need to - // be pre-created and configured as managed. - BackendServices []string `json:"backendServices,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // FailoverInitiation: Indicates how failover should be initiated. - // - // Possible values: - // "FAILOVER_INITIATION_UNSPECIFIED" - // "MANUAL_ONLY" - Failover will be initiated only when - // compute.haControllers.failover - // method is called. - FailoverInitiation string `json:"failoverInitiation,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceName: Name of the instance that HaController is in charge of. - // If not specified the HaController's resource name will be used instead. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - InstanceName string `json:"instanceName,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#haController for - // HaControllers. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. - // Provided by the client when the resource is created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // NetworkingAutoConfiguration: Basic networking configuration. Required - // backend services and forwarding - // rules will be automatically created with default parameters. - NetworkingAutoConfiguration *HaControllerNetworkingAutoConfiguration `json:"networkingAutoConfiguration,omitempty"` - // Region: [Output Only] URL of the region where the resource resides. - // You must specify this field as part of the HTTP request URL. - // It is not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SecondaryZoneCapacity: Indicates the capacity guarantees in the secondary - // zone. - // - // Possible values: - // "BEST_EFFORT" - Failover will succeed only if at the time of failover the - // secondary zone - // has enough capacity to host the instance. - // "SECONDARY_ZONE_CAPACITY_UNSPECIFIED" - SecondaryZoneCapacity string `json:"secondaryZoneCapacity,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status information for the HaController resource. - Status *HaControllerStatus `json:"status,omitempty"` - // ZoneConfigurations: Map of zone configurations - // Key: name of the zone - // Value: ZoneConfiguration - ZoneConfigurations map[string]HaControllerZoneConfiguration `json:"zoneConfigurations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendServices") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaController) MarshalJSON() ([]byte, error) { - type NoMethod HaController - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerNetworkingAutoConfiguration: Basic networking configuration. -// Required backend services and forwarding -// rules will be automatically created with default parameters. -type HaControllerNetworkingAutoConfiguration struct { - // Internal: Internal networking configuration - Internal *HaControllerNetworkingAutoConfigurationInternal `json:"internal,omitempty"` - // ForceSendFields is a list of field names (e.g. "Internal") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Internal") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerNetworkingAutoConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerNetworkingAutoConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerNetworkingAutoConfigurationInternal: Internal networking -// configuration -type HaControllerNetworkingAutoConfigurationInternal struct { - // IpAddress: Optional. IP addresses will be automatically allocated according - // to - // StackType if not provided. - IpAddress string `json:"ipAddress,omitempty"` - Ipv6Address string `json:"ipv6Address,omitempty"` - // StackType: Determine which IP addresses to automatically create. Field and - // option - // naming consistent with NetworkInterface configuration on Instances. - // - // Possible values: - // "IPV4_IPV6" - The HA Controller Networking Endpoint will be assigned with - // both IPv4 - // and IPv6 addresses. - // "IPV4_ONLY" - The HA Controller Networking Endpoint will only be assigned - // with IPv4 - // address. - // "IPV6_ONLY" - The HA Controller Networking Endpoint will only be assigned - // with IPv6 - // address. - StackType string `json:"stackType,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerNetworkingAutoConfigurationInternal) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerNetworkingAutoConfigurationInternal - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatus: Contains information about current status of the -// HaController. -type HaControllerStatus struct { - // FailoverProgress: [Output Only] Contains the details of the ongoing - // failover. This message - // is not displayed if failover is NOT in progress. - FailoverProgress *HaControllerStatusFailoverProgress `json:"failoverProgress,omitempty"` - // LastFailoverInfo: [Output Only] Contains the details of the last successful - // failover. - LastFailoverInfo *HaControllerStatusFailoverProgress `json:"lastFailoverInfo,omitempty"` - // OngoingFailover: [Output Only] Indicates if the failover is currently - // in-progress. - OngoingFailover bool `json:"ongoingFailover,omitempty"` - // PrimaryInstance: [Output Only] The URL to the instance that is intended to - // be primary at - // this moment. Primary instance will be changed at the very beginning of - // a - // failover operation. - PrimaryInstance string `json:"primaryInstance,omitempty"` - // PrimaryZone: [Output Only] The name of the zone that is intended to be - // primary at this - // moment. Primary zone will be changed at the very beginning of a - // failover - // operation. The zone may not be operational in the middle of a - // failover - // operation. - PrimaryZone string `json:"primaryZone,omitempty"` - // ReadyForFailover: [Output Only] Indicates if the resource is ready for - // initiating a - // failover to the secondary zone. - ReadyForFailover bool `json:"readyForFailover,omitempty"` - // ZoneStatus: [Output Only] Map of zone statuses. - // Key: name of the zone - // Value: ZoneStatus - ZoneStatus map[string]HaControllerStatusZoneStatus `json:"zoneStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverProgress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverProgress") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatus) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatusFailoverProgress: Contains information about the current -// failover operation. -type HaControllerStatusFailoverProgress struct { - // FailoverCompleteTimestamp: [Output Only] Timestamp of the failover - // completion. - // Filled only if the failover is completed, in lastFailoverInfo. - FailoverCompleteTimestamp string `json:"failoverCompleteTimestamp,omitempty"` - // FailoverTrigger: [Output Only] Indicates if failover has been triggered - // automatically or - // manually. - // - // Possible values: - // "AUTOMATIC" - Failover has been triggered automatically. - // "FAILOVER_TRIGGER_UNSPECIFIED" - // "MANUAL" - Failover has been triggered manually. - FailoverTrigger string `json:"failoverTrigger,omitempty"` - // FailoverTriggerTimestamp: [Output Only] Timestamp of the last failover - // trigger. - FailoverTriggerTimestamp string `json:"failoverTriggerTimestamp,omitempty"` - // LastFailoverAttempt: [Output Only] Contains details of the last failed - // failover. This field - // is filled only if the current failover is failing - LastFailoverAttempt *HaControllerStatusFailoverProgressLastFailoverAttempt `json:"lastFailoverAttempt,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverCompleteTimestamp") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverCompleteTimestamp") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusFailoverProgress) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusFailoverProgress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllerStatusFailoverProgressLastFailoverAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to - // process - // failover. - Errors *HaControllerStatusFailoverProgressLastFailoverAttemptErrors `json:"errors,omitempty"` - // Timestamp: [Output Only] Show timestamp only if there is an - // error.RFC3339 - // text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusFailoverProgressLastFailoverAttempt) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusFailoverProgressLastFailoverAttempt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatusFailoverProgressLastFailoverAttemptErrors: [Output Only] -// Encountered errors during the last attempt to process -// failover. -type HaControllerStatusFailoverProgressLastFailoverAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusFailoverProgressLastFailoverAttemptErrors) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusFailoverProgressLastFailoverAttemptErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusFailoverProgressLastFailoverAttemptErrorsErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatusZoneStatus: Contains the status of a specific zone. -type HaControllerStatusZoneStatus struct { - // IsPrimary: [Output Only] Indicates if the zone is primary at this moment. - IsPrimary bool `json:"isPrimary,omitempty"` - // IsZoneReady: [Output Only] Indicates if the zone is ready for initiating a - // failover. - IsZoneReady bool `json:"isZoneReady,omitempty"` - // LastError: [Output Only] This field is filled only if the current operation - // is - // failing. - LastError *HaControllerStatusZoneStatusLastError `json:"lastError,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsPrimary") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsPrimary") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusZoneStatus) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusZoneStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatusZoneStatusLastError: Contains details of the last failed -// operation. -type HaControllerStatusZoneStatusLastError struct { - // Errors: [Output Only] Encountered errors. - Errors *HaControllerStatusZoneStatusLastErrorErrors `json:"errors,omitempty"` - // Timestamp: [Output Only] Show timestamp only if there is an - // error.RFC3339 - // text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusZoneStatusLastError) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusZoneStatusLastError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerStatusZoneStatusLastErrorErrors: [Output Only] Encountered -// errors. -type HaControllerStatusZoneStatusLastErrorErrors struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*HaControllerStatusZoneStatusLastErrorErrorsErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusZoneStatusLastErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusZoneStatusLastErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllerStatusZoneStatusLastErrorErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*HaControllerStatusZoneStatusLastErrorErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusZoneStatusLastErrorErrorsErrors) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusZoneStatusLastErrorErrorsErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllerStatusZoneStatusLastErrorErrorsErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerStatusZoneStatusLastErrorErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerStatusZoneStatusLastErrorErrorsErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerZoneConfiguration: Config for a zone that the HaController may -// use for running the VM -// instance. -type HaControllerZoneConfiguration struct { - // NodeAffinities: A set of node affinity configurations. Refer toConfiguring - // node - // affinity for more information. - // Overrides reservationAffinity. - NodeAffinities []*HaControllerZoneConfigurationNodeAffinity `json:"nodeAffinities,omitempty"` - // ReservationAffinity: Specifies the reservations that the instance can - // consume from. - ReservationAffinity *HaControllerZoneConfigurationReservationAffinity `json:"reservationAffinity,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeAffinities") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeAffinities") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerZoneConfigurationNodeAffinity: Node Affinity: the configuration -// of desired nodes onto which the -// -// Instance could be scheduled. -// This message should be an exact copy of the Instances representation -// of NodeAffinity. -// -// LINT.IfChange(HaControllerNodeAffinityMixer) -type HaControllerZoneConfigurationNodeAffinity struct { - // Key: Corresponds to the label key of Node resource. - Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. Valid operators areIN for - // affinity and NOT_IN for anti-affinity. - // - // Possible values: - // "IN" - Requires Compute Engine to seek for matched nodes. - // "NOT_IN" - Requires Compute Engine to avoid certain nodes. - // "OPERATOR_UNSPECIFIED" - Operator string `json:"operator,omitempty"` - // Values: Corresponds to the label values of Node resource. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerZoneConfigurationNodeAffinity) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerZoneConfigurationNodeAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllerZoneConfigurationReservationAffinity: Specifies the reservations -// that this instance can consume from. -// This message should be an exact copy of the Instances representation -// of AllocationAffinity. -// LINT.IfChange(HaControllerAllocationAffinityMixer) -type HaControllerZoneConfigurationReservationAffinity struct { - // ConsumeReservationType: Specifies the type of reservation from which this - // instance can consume - // resources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or - // NO_RESERVATION. See - // Consuming reserved instances for examples. - // - // Possible values: - // "ANY_RESERVATION" - Consume any allocation available. - // "NO_RESERVATION" - Do not consume from any allocated capacity. - // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. Must - // specify key value - // fields for specifying the reservations. - // "SPECIFIC_THEN_ANY_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume any - // reservation available if the specified reservation is not available - // or exhausted. Must specify key value fields for specifying the - // reservations. - // "SPECIFIC_THEN_NO_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume - // from the on-demand pool if the specified reservation is exhausted. - // Must specify key value fields for specifying the reservations. - // "UNSPECIFIED" - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of a reservation resource. To target - // aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the - // key and specify - // the name of your reservation as its value. - Key string `json:"key,omitempty"` - // Values: Corresponds to the label values of a reservation resource. This can - // be - // either a name to a reservation in the same project - // or - // "projects/different-project/reservations/some-reservation-name" to - // target a shared reservation in the same zone but in a different - // project. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumeReservationType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllerZoneConfigurationReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod HaControllerZoneConfigurationReservationAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HaControllersScopedList resources. - Items map[string]HaControllersScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#haControllersAggregatedList for lists of - // HaControllers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HaControllersAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllersAggregatedListWarning: [Output Only] Informational warning -// message. -type HaControllersAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HaControllersAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersFailoverRequest struct { - // FailoverToZone: Name of the destination zone for the failover. - FailoverToZone string `json:"failoverToZone,omitempty"` - // PrimaryZone: Name of the destination zone for the failover. - // Deprecated: use failover_to_zone instead. - PrimaryZone string `json:"primaryZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverToZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverToZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersFailoverRequest) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersFailoverRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersList struct { - Etag string `json:"etag,omitempty"` - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HaControllers in the specified project and region. - Items []*HaController `json:"items,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // formaxResults, use the nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: Informational warning message. - Warning *HaControllersListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersList) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllersListWarning: Informational warning message. -type HaControllersListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HaControllersListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersScopedList struct { - // HaControllers: List of HaControllers contained in this scope. - HaControllers []*HaController `json:"haControllers,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *HaControllersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HaControllers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HaControllers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HaControllersScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type HaControllersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HaControllersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HaControllersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HaControllersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HaControllersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPoliciesScopedList struct { - // HealthAggregationPolicies: A list of HealthAggregationPolicys contained in - // this scope. - HealthAggregationPolicies []*HealthAggregationPolicy `json:"healthAggregationPolicies,omitempty"` - // Warning: Informational warning which replaces the list of health - // aggregation - // policies when the list is empty. - Warning *HealthAggregationPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthAggregationPolicies") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthAggregationPolicies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPoliciesScopedListWarning: Informational warning which -// replaces the list of health aggregation -// policies when the list is empty. -type HealthAggregationPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicy: Represents a health aggregation policy. -// -// A health aggregation policy resource defines a policy to aggregate -// health. -// -// For more information, see -// Health checks overview. -type HealthAggregationPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthAggregationPolicy. An up-to-date fingerprint - // must be provided in order to patch the HealthAggregationPolicy; - // Otherwise, - // the request will fail with error 412 conditionNotMet. To see - // the latest fingerprint, make a get() request to retrieve - // the - // HealthAggregationPolicy. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthyPercentThreshold: Can only be set if the policyType field - // isBACKEND_SERVICE_POLICY. Specifies the threshold (as a - // percentage) of healthy endpoints required in order to consider - // the - // aggregated health result HEALTHY. Defaults to 60. Must be in - // range [0, 100]. Not applicable if the policyType field - // isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, - // and will be set to the default if unspecified. Note that both this - // threshold and minHealthyThreshold must be satisfied in order - // for HEALTHY to be the aggregated result. "Endpoints" refers to - // network - // endpoints within a Network Endpoint Group or instances within an - // Instance - // Group. - HealthyPercentThreshold int64 `json:"healthyPercentThreshold,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthAggregationPolicy for health aggregation - // policies. - Kind string `json:"kind,omitempty"` - // MinHealthyThreshold: Can only be set if the policyType field - // isBACKEND_SERVICE_POLICY. Specifies the minimum number of - // healthy endpoints required in order to consider the aggregated health - // result HEALTHY. Defaults to 1. Must be positive. Not - // applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. - // This field is optional, - // and will be set to the default if unspecified. Note that both this - // threshold and healthyPercentThreshold must be satisfied in - // order for HEALTHY to be the aggregated result. "Endpoints" refers to - // network endpoints within a Network Endpoint Group or instances within - // an - // Instance Group. - MinHealthyThreshold int64 `json:"minHealthyThreshold,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PolicyType: Specifies the type of the healthAggregationPolicy. The only - // allowed value - // for global resources is DNS_PUBLIC_IP_POLICY. The only allowed - // value for regional resources is BACKEND_SERVICE_POLICY. Must - // be specified when the healthAggregationPolicy is created, and cannot - // be - // mutated. - // - // Possible values: - // "BACKEND_SERVICE_POLICY" - // "DNS_PUBLIC_IP_POLICY" - PolicyType string `json:"policyType,omitempty"` - // Region: [Output Only] URL of the region where the health aggregation - // policy - // resides. This field applies only to the regional resource. You must - // specify - // this field as part of the HTTP request URL. It is not settable as a field - // in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyAggregatedList: Contains a list of -// HealthAggregationPoliciesScopedList. -type HealthAggregationPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthAggregationPoliciesScopedList resources. - Items map[string]HealthAggregationPoliciesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthAggregationPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyAggregatedListWarning: [Output Only] Informational -// warning message. -type HealthAggregationPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthAggregationPolicy resources. - Items []*HealthAggregationPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthAggregationPolicy for health aggregation - // policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthAggregationPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyListWarning: [Output Only] Informational warning -// message. -type HealthAggregationPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheck: Represents a health check resource. -// -// Google Compute Engine has two health check resources: -// -// * Regional (/compute/docs/reference/rest/alpha/regionHealthChecks) -// * Global (/compute/docs/reference/rest/alpha/healthChecks) -// -// These health check resources can be used for load balancing and -// for -// autohealing VMs in a managed instance group (MIG). -// -// **Load balancing** -// -// Health check requirements vary depending on the type of load balancer. -// For -// details about the type of health check supported for -// each load balancer and corresponding backend type, -// see Health -// checks overview: Load balancer guide. -// -// **Autohealing in MIGs** -// -// The health checks that you use for autohealing VMs in a MIG can be -// either -// regional or global. For more information, see Set up an -// application health check and autohealing. -// -// For more information, seeHealth checks -// overview. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is 5 - // seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - GrpcHealthCheck *GRPCHealthCheck `json:"grpcHealthCheck,omitempty"` - GrpcTlsHealthCheck *GRPCTLSHealthCheck `json:"grpcTlsHealthCheck,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // LogConfig: Configure logging on this health check. - LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // For example, a name that is 1-63 characters long, matches the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise complies - // with - // RFC1035. This regular expression describes a name where the first - // character is a lowercase letter, and all following characters are a - // dash, - // lowercase letter, or digit, except the last character, which isn't a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] Region where the health check resides. Not applicable - // to - // global health checks. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceRegions: The list of cloud regions from which health checks are - // performed. If any - // regions are specified, then exactly 3 regions should be specified. - // The - // region names must be valid names of Google Cloud regions. - // This can only be set for global health check. - // If this list is non-empty, then there are restrictions - // on what other health check fields are supported and what other resources - // can use this health check: - // - // - SSL, HTTP2, and GRPC protocols are not supported. - // - The TCP request field is not supported. - // - The proxyHeader field for HTTP, HTTPS, and TCP is not - // supported. - // - The checkIntervalSec field must be at least 30. - // - The health check cannot be used with BackendService nor with managed - // instance group auto-healing. - SourceRegions []string `json:"sourceRegions,omitempty"` - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is - // 5 seconds. It is invalid for timeoutSec to have greater - // value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // Type: Specifies the type of the healthCheck, either TCP,SSL, HTTP, - // HTTPS,HTTP2 or GRPC. Exactly one of the - // protocol-specific health check fields must be specified, which must - // matchtype field. - // - // Possible values: - // "GRPC" - // "GRPC_WITH_TLS" - // "HTTP" - // "HTTP2" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - // "UDP" - Type string `json:"type,omitempty"` - UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this many - // consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckListWarning: [Output Only] Informational warning message. -type HealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckLogConfig: Configuration of logging on a health check. If logging -// is enabled, logs -// will be exported to Stackdriver. -type HealthCheckLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by default, - // which - // means no health check logging will be done. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckReference: A full or valid partial URL to a health check. For -// example, the following are -// valid URLs: -// -// - -// -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check -// - global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheck") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckService: Represents a Health-Check as a Service resource. -type HealthCheckService struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthCheckService. An up-to-date fingerprint must - // be provided in order to patch/update the HealthCheckService; Otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // HealthCheckService. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthChecks: A list of URLs to the HealthCheck resources. Must have - // at least one HealthCheck, and not more than 10 for - // regionalHealthCheckService, and not more than 1 for - // globalHealthCheckService.HealthCheck resources must - // haveportSpecification=USE_SERVING_PORT orportSpecification=USE_FIXED_PORT. - // For - // regional HealthCheckService, theHealthCheck must be regional and in the - // same - // region. For global HealthCheckService,HealthCheck must be global. Mix of - // regional and globalHealthChecks is not supported. Multiple - // regionalHealthChecks must belong to the same region. RegionalHealthChecks - // must belong to the same region as zones ofNetworkEndpointGroups. For - // globalHealthCheckService using globalINTERNET_IP_PORT NetworkEndpointGroups, - // the - // global HealthChecks must specify sourceRegions, - // and HealthChecks that specify sourceRegions can - // only be used with global INTERNET_IP_PORTNetworkEndpointGroups. - HealthChecks []string `json:"healthChecks,omitempty"` - // HealthStatusAggregationPolicy: Optional. Policy for how the results from - // multiple health checks - // for the same endpoint are aggregated. Defaults to NO_AGGREGATION - // if unspecified. - // - // - NO_AGGREGATION. An EndpointHealth message is - // returned for each pair in the health check - // service. - // - AND. If any health check of an endpoint reportsUNHEALTHY, then - // UNHEALTHY is theHealthState of the endpoint. If all health checks - // reportHEALTHY, the HealthState of the endpoint isHEALTHY. - // - // . - // This is only allowed with regional HealthCheckService. - // - // Possible values: - // "AND" - If any backend's health check reports UNHEALTHY, - // then UNHEALTHY is the HealthState of - // the entire health check service. If all backend's are healthy, - // the HealthState of the health check service isHEALTHY. - // "NO_AGGREGATION" - An EndpointHealth message is returned for each - // backend in the health check service. - HealthStatusAggregationPolicy string `json:"healthStatusAggregationPolicy,omitempty"` - // HealthStatusAggregationStrategy: This field is deprecated. Use - // health_status_aggregation_policy - // instead. - // - // Policy for how the results from multiple health checks for the - // same endpoint are aggregated. - // - // - NO_AGGREGATION. An EndpointHealth - // message is returned for each backend in the health check - // service. - // - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is - // theHealthState of the entire health check service. If - // all backend's are healthy, the HealthState of the - // health check service is HEALTHY. - // - // . - // - // Possible values: - // "AND" - This is deprecated. Use health_status_aggregation_policy - // instead. - // If any backend's health check reports UNHEALTHY, - // then UNHEALTHY is the HealthState of - // the entire health check service. If all backend's are healthy, - // the HealthState of the health check service isHEALTHY. - // "NO_AGGREGATION" - This is deprecated. Use - // health_status_aggregation_policy instead. - // An EndpointHealth message is returned for each - // backend in the health check service. - HealthStatusAggregationStrategy string `json:"healthStatusAggregationStrategy,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#healthCheckServicefor health check services. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long, and - // comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // NetworkEndpointGroups: A list of URLs to the NetworkEndpointGroup - // resources. Must not have more than 100. For regionalHealthCheckService, - // NEGs must be in - // zones in the region of the HealthCheckService. For - // globalHealthCheckServices, the NetworkEndpointGroups - // must be global INTERNET_IP_PORT. - NetworkEndpointGroups []string `json:"networkEndpointGroups,omitempty"` - // NotificationEndpoints: A list of URLs to the NotificationEndpoint - // resources. Must not have more than 10. A list of endpoints for - // receiving notifications of change in health status. For - // regionalHealthCheckService,NotificationEndpoint must be regional and in - // the - // same region. For global HealthCheckService,NotificationEndpoint must be - // global. - NotificationEndpoints []string `json:"notificationEndpoints,omitempty"` - // Region: [Output Only] URL of the region where the health check - // service - // resides. This field is not applicable to global health check services. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckService) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServiceAggregatedList: Contains a list of -// HealthCheckServicesScopedList. -type HealthCheckServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthCheckServicesScopedList resources. - Items map[string]HealthCheckServicesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckServiceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServiceAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthCheckServiceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckServiceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServiceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServiceReference: A full or valid partial URL to a health check -// service. For example, the -// following are valid URLs: -// -// - -// -// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// -// - -// -// projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// -// - regions/us-west1/healthCheckServices/health-check-service -type HealthCheckServiceReference struct { - HealthCheckService string `json:"healthCheckService,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheckService") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthCheckService resources. - Items []*HealthCheckService `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthCheckServicesList for lists of - // HealthCheckServices. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServicesListWarning: [Output Only] Informational warning message. -type HealthCheckServicesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesScopedList struct { - // Resources: A list of HealthCheckServices contained in this scope. - Resources []*HealthCheckService `json:"resources,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *HealthCheckServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServicesScopedListWarning: Informational warning which replaces -// the list of -// backend services when the list is empty. -type HealthCheckServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckServicesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthChecksScopedList resources. - Items map[string]HealthChecksScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthChecksAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthChecksAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksScopedList struct { - // HealthChecks: A list of HealthChecks contained in this scope. - HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthChecksScopedListWarning: Informational warning which replaces the list -// of -// backend services when the list is empty. -type HealthChecksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSource: Represents a health source. -// -// A health source resource specifies the source resources and the -// health -// aggregation policy applied to the source resources to determine -// the -// aggregated health status. -type HealthSource struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthSource. An up-to-date fingerprint - // must be provided in order to patch the HealthSource; Otherwise, the - // request - // will fail with error 412 conditionNotMet. To see the latest - // fingerprint, make a get() request to retrieve the - // HealthSource. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthAggregationPolicy: URL to the HealthAggregationPolicy resource. Must - // be set. Must - // be regional and in the same region as the HealthSource. Can be - // mutated. - HealthAggregationPolicy string `json:"healthAggregationPolicy,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#healthSource for - // health sources. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the health source - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceType: Specifies the type of the HealthSource. The only allowed - // value - // is BACKEND_SERVICE. Must be specified when theHealthSource is created, and - // cannot be mutated. - // - // Possible values: - // "BACKEND_SERVICE" - SourceType string `json:"sourceType,omitempty"` - // Sources: URLs to the source resources. Must be size 1. Must be - // aBackendService if - // the sourceType is BACKEND_SERVICE. TheBackendService must have load - // balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional - // and in the same region as the HealthSource (cross-region - // deployment for INTERNAL_MANAGED is not supported). TheBackendService may use - // only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. - // TheBackendService may not use haPolicy. Can be - // mutated. - Sources []string `json:"sources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSource) MarshalJSON() ([]byte, error) { - type NoMethod HealthSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceAggregatedList: Contains a list of HealthSourcesScopedList. -type HealthSourceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthSourcesScopedList resources. - Items map[string]HealthSourcesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthSourceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthSourceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthSource resources. - Items []*HealthSource `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#healthSource for - // health sources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthSourceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceListWarning: [Output Only] Informational warning message. -type HealthSourceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourcesScopedList struct { - // HealthSources: A list of HealthSources contained in this scope. - HealthSources []*HealthSource `json:"healthSources,omitempty"` - // Warning: Informational warning which replaces the list of - // health sources when the list is empty. - Warning *HealthSourcesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthSources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthSources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourcesScopedListWarning: Informational warning which replaces the -// list of -// health sources when the list is empty. -type HealthSourcesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourcesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourcesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthStatus struct { - // Annotations: Metadata defined as annotations for network endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - // ForwardingRule: URL of the forwarding rule associated with the health status - // of the - // instance. - ForwardingRule string `json:"forwardingRule,omitempty"` - // ForwardingRuleIp: A forwarding rule IP address assigned to this instance. - ForwardingRuleIp string `json:"forwardingRuleIp,omitempty"` - // HealthState: Health state of the IPv4 address of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` - // IpAddress: For target pool based Network Load Balancing, it indicates the - // forwarding - // rule's IP address assigned to this instance. For other types of - // load - // balancing, the field indicates VM internal ip. - IpAddress string `json:"ipAddress,omitempty"` - Ipv6Address string `json:"ipv6Address,omitempty"` - // Ipv6HealthState: Health state of the IPv6 address of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - Ipv6HealthState string `json:"ipv6HealthState,omitempty"` - // Port: The named port of the instance group, not necessarily the port that - // is - // health-checked. - Port int64 `json:"port,omitempty"` - Weight string `json:"weight,omitempty"` - // Possible values: - // "INVALID_WEIGHT" - The response to a Health Check probe had the HTTP - // response header field - // X-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not - // a non-negative single-precision floating-point number in decimal - // string - // representation). - // "MISSING_WEIGHT" - The response to a Health Check probe did not have the - // HTTP response - // header field X-Load-Balancing-Endpoint-Weight. - // "UNAVAILABLE_WEIGHT" - This is the value when the accompanied health - // status is either TIMEOUT - // (i.e.,the Health Check probe was not able to get a response in time) - // or - // UNKNOWN. For the latter, it should be typically because there has not - // been sufficient time to parse and report the weight for a new backend - // (which is with 0.0.0.0 ip address). However, it can be also due to an - // outage case for which the health status is explicitly reset to UNKNOWN. - // "WEIGHT_NONE" - This is the default value when WeightReportMode is - // DISABLE, - // and is also the initial value when WeightReportMode has just updated - // to - // ENABLE or DRY_RUN and there has not been - // sufficient time to parse and report the backend weight. - WeightError string `json:"weightError,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthStatusForNetworkEndpoint struct { - // BackendService: URL of the backend service associated with the health state - // of the network - // endpoint. - BackendService *BackendServiceReference `json:"backendService,omitempty"` - // ForwardingRule: URL of the forwarding rule associated with the health state - // of the network - // endpoint. - ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` - // HealthCheck: URL of the health check associated with the health state of the - // network - // endpoint. - HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` - // HealthCheckService: URL of the health check service associated with the - // health state of the - // network endpoint. - HealthCheckService *HealthCheckServiceReference `json:"healthCheckService,omitempty"` - // HealthState: Health state of the network endpoint determined based on the - // health checks - // configured. - // - // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - HealthState string `json:"healthState,omitempty"` - // Ipv6HealthState: Health state of the ipv6 network endpoint determined based - // on the health - // checks configured. - // - // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - Ipv6HealthState string `json:"ipv6HealthState,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatusForNetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Help: Provides links to documentation or for performing an out of band -// action. -// -// For example, if a quota check failed with an error indicating the -// calling -// project hasn't enabled the accessed service, this can contain a URL -// pointing -// directly to the right place in the developer console to flip the bit. -type Help struct { - // Links: URL(s) pointing to additional information on handling the current - // error. - Links []*HelpLink `json:"links,omitempty"` - // ForceSendFields is a list of field names (e.g. "Links") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Links") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Help) MarshalJSON() ([]byte, error) { - type NoMethod Help - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HelpLink: Describes a URL link. -type HelpLink struct { - // Description: Describes what the link offers. - Description string `json:"description,omitempty"` - // Url: The URL of the link. - Url string `json:"url,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HelpLink) MarshalJSON() ([]byte, error) { - type NoMethod HelpLink - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HostRule: UrlMaps -// A host-matching rule for a URL. If matched, will use the namedPathMatcher to -// select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Hosts: The list of host patterns to match. They must be valid hostnames - // with - // optional port numbers in the format host:port.* matches any string of - // ([a-z0-9-.]*). In - // that case, * must be the first character, and if followed by - // anything, the immediate following character must be either - - // or .. - // - // * based matching is not supported when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - Hosts []string `json:"hosts,omitempty"` - // PathMatcher: The name of the PathMatcher to use to match the path portion - // of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HostRule) MarshalJSON() ([]byte, error) { - type NoMethod HostRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpFaultAbort: Specification for how requests are aborted as part of fault -// injection. -type HttpFaultAbort struct { - // HttpStatus: The HTTP status code used to abort the request. - // - // The value must be from 200 to 599 inclusive. - // - // For gRPC protocol, the gRPC status code is mapped to HTTP status - // code - // according to this - // mapping table. HTTP status 200 is mapped to gRPC status - // UNKNOWN. Injecting an OK status is currently not supported by - // Traffic Director. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests - // that is aborted as part of fault injection. - // - // The value must be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultAbort) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpFaultAbort) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultAbort - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultDelay: Specifies the delay introduced by the load balancer before -// forwarding the -// request to the backend service as part of fault injection. -type HttpFaultDelay struct { - // FixedDelay: Specifies the value of the fixed delay interval. - FixedDelay *Duration `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests for - // which a delay is introduced as part of fault injection. - // - // The value must be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultDelay) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpFaultDelay) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultDelay - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultInjection: The specification for fault injection introduced into -// traffic to test -// the resiliency of clients to backend service failure. As part of -// fault -// injection, when clients send requests to a backend service, delays can -// be -// introduced by the load balancer on a percentage of requests before -// sending -// those request to the backend service. Similarly requests from clients can -// be -// aborted by the load balancer for a percentage of requests. -type HttpFaultInjection struct { - // Abort: The specification for how client requests are aborted as part of - // fault - // injection. - Abort *HttpFaultAbort `json:"abort,omitempty"` - // Delay: The specification for how client requests are delayed as part of - // fault - // injection, before being sent to a backend service. - Delay *HttpFaultDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultInjection) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultInjection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpFilterConfig: HttpFilterConfiguration supplies additional contextual -// settings -// for networkservices.HttpFilter resources enabled by Traffic -// Director. -type HttpFilterConfig struct { - // Config: The configuration needed to enable thenetworkservices.HttpFilter - // resource. The configuration must be - // YAML formatted and only contain fields defined in the protobuf identified - // in configTypeUrl - Config string `json:"config,omitempty"` - // ConfigTypeUrl: The fully qualified versioned proto3 type url of the protobuf - // that the - // filter expects for its contextual settings, for - // example:type.googleapis.com/google.protobuf.Struct - ConfigTypeUrl string `json:"configTypeUrl,omitempty"` - // FilterName: Name of the networkservices.HttpFilter resource - // this - // configuration belongs to. This name must be known to the xDS - // client. - // Example: envoy.wasm - FilterName string `json:"filterName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFilterConfig) MarshalJSON() ([]byte, error) { - type NoMethod HttpFilterConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderAction: The request and response header transformations that take -// effect before -// the request is passed along to the selected backendService. -type HttpHeaderAction struct { - // RequestHeadersToAdd: Headers to add to a matching request before forwarding - // the request to thebackendService. - RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"` - // RequestHeadersToRemove: A list of header names for headers that need to be - // removed from the - // request before forwarding the request to the backendService. - RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"` - // ResponseHeadersToAdd: Headers to add the response before sending the - // response back to the - // client. - ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"` - // ResponseHeadersToRemove: A list of header names for headers that need to be - // removed from the - // response before sending the response back to the client. - ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeadersToAdd") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderMatch: matchRule criteria for request header matches. -type HttpHeaderMatch struct { - // ExactMatch: The value should exactly match contents of exactMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` - // HeaderName: The name of the HTTP header to match. - // - // For matching against the HTTP request's authority, use a headerMatch - // with the header name ":authority". - // - // For matching a request's method, use the headerName ":method". - // - // When the URL map is bound to a target gRPC proxy that has - // the validateForProxyless field set to true, only - // non-binary - // user-specified custom metadata and the `content-type` header are - // supported. - // The following transport-level headers cannot be used in header - // matching - // rules: - // `:authority`, `:method`, `:path`, `:scheme`, - // `user-agent`, - // `accept-encoding`, `content-encoding`, - // `grpc-accept-encoding`, - // `grpc-encoding`, `grpc-previous-rpc-attempts`, - // `grpc-tags-bin`, - // `grpc-timeout` and `grpc-trace-bin`. - HeaderName string `json:"headerName,omitempty"` - // InvertMatch: If set to false, the headerMatch is considered a - // match if the preceding match criteria are met. If set to true, - // the headerMatch is considered a match if the preceding - // match criteria are NOT met. - // - // The default setting is false. - InvertMatch bool `json:"invertMatch,omitempty"` - // PrefixMatch: The value of the header must start with the contents - // ofprefixMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - PrefixMatch string `json:"prefixMatch,omitempty"` - // PresentMatch: A header with the contents of headerName must exist. The - // match takes place whether or not the request's header has a value. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // RangeMatch: The header value must be an integer and its value must be in the - // range - // specified in rangeMatch. If the header does not contain an - // integer, number or is empty, the match fails. - // - // For example for a range [-5, 0] - // - // - // - -3 will match. - // - 0 will not match. - // - 0.25 will not match. - // - -3someString will not match. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - // - // rangeMatch is not supported for load balancers - // that have loadBalancingScheme set to EXTERNAL. - RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"` - // RegexMatch: The value of the header must match the regular expression - // specified inregexMatch. - // For more information about regular expression syntax, see Syntax. - // - // For matching against a port specified in the HTTP request, use a - // headerMatch with headerName set to PORT and a regular expression - // that - // satisfies the RFC2616 Host header's port specifier. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // SuffixMatch: The value of the header must end with the contents - // ofsuffixMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - SuffixMatch string `json:"suffixMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderOption: Specification determining how headers are added to -// requests or responses. -type HttpHeaderOption struct { - // HeaderName: The name of the header. - HeaderName string `json:"headerName,omitempty"` - // HeaderValue: The value of the header to add. - HeaderValue string `json:"headerValue,omitempty"` - // Replace: If false, headerValue is appended to any values - // that already - // exist for the header. If true, headerValue is set for the - // header, discarding any values that were set for that header. - // - // The default value is true, - // unless a variable is present in headerValue, - // in which case the default value is false. - // . - Replace bool `json:"replace,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: Represents a legacy HTTP Health Check resource. -// -// Legacy HTTP health checks are now only required by target pool-based -// network -// load balancers. For all other load balancers, including backend -// service-based -// network load balancers, and for managed instance group auto-healing, you -// must -// use modern (non-legacy) health checks. -// -// For more information, seeHealth checks -// overview. -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - // Host: The value of the host header in the HTTP health check request. If - // left - // empty (default value), the public IP on behalf of which this health check - // is performed will be used. - Host string `json:"host,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#httpHealthCheck for - // HTTP health checks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Port: The TCP port number for the HTTP health check request. The default - // value is80. - Port int64 `json:"port,omitempty"` - // RequestPath: The request path of the HTTP health check request. The default - // value is/. This field does not support query - // parameters. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this - // many consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HttpHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckListWarning: [Output Only] Informational warning message. -type HttpHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HttpHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpQueryParameterMatch: HttpRouteRuleMatch criteria for a request's query -// parameter. -type HttpQueryParameterMatch struct { - // ExactMatch: The queryParameterMatch matches if the value of the - // parameter exactly matches the contents of exactMatch. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` - // Name: The name of the query parameter to match. The query parameter must - // exist in - // the request, in the absence of which the request match fails. - Name string `json:"name,omitempty"` - // PresentMatch: Specifies that the queryParameterMatch matches if the - // request contains the query parameter, irrespective of whether the - // parameter has a value or not. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // RegexMatch: The queryParameterMatch matches if the value of the - // parameter matches the regular expression specified byregexMatch. For - // more information about regular expression syntax, see Syntax. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpQueryParameterMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpQueryParameterMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRedirectAction: Specifies settings for an HTTP redirect. -type HttpRedirectAction struct { - // HostRedirect: The host that is used in the redirect response instead of the - // one that - // was supplied in the request. - // - // The value must be from 1 to 255 - // characters. - HostRedirect string `json:"hostRedirect,omitempty"` - // HttpsRedirect: If set to true, the URL scheme in the redirected request - // is - // set to HTTPS. - // If set to false, the URL scheme of the redirected request - // remains the same as that of the request. - // - // This must only be set for URL maps used inTargetHttpProxys. Setting this - // true forTargetHttpsProxy is not permitted. - // - // The default is set to false. - HttpsRedirect bool `json:"httpsRedirect,omitempty"` - // PathRedirect: The path that is used in the redirect response instead of the - // one - // that was supplied in the request. - // - // pathRedirect cannot be supplied together withprefixRedirect. Supply one - // alone or neither. If neither is - // supplied, the path of the original request is used for the redirect. - // - // The value must be from 1 to 1024 characters. - PathRedirect string `json:"pathRedirect,omitempty"` - // PrefixRedirect: The prefix that replaces the prefixMatch specified in - // the HttpRouteRuleMatch, retaining the remaining portion - // of the URL before redirecting the request. - // - // prefixRedirect cannot be supplied together withpathRedirect. Supply one - // alone or neither. If neither is - // supplied, the path of the original request is used for the redirect. - // - // The value must be from 1 to 1024 characters. - PrefixRedirect string `json:"prefixRedirect,omitempty"` - // RedirectResponseCode: The HTTP Status code to use for this - // RedirectAction. - // - // Supported values are: - // - // - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds - // to 301. - // - FOUND, which corresponds to 302. - // - SEE_OTHER which corresponds to 303. - // - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the - // request - // method is retained. - // - PERMANENT_REDIRECT, which corresponds to 308. In this case, the - // request - // method is retained. - // - // Possible values: - // "FOUND" - Http Status Code 302 - Found. - // "MOVED_PERMANENTLY_DEFAULT" - Http Status Code 301 - Moved Permanently. - // "PERMANENT_REDIRECT" - Http Status Code 308 - Permanent Redirect - // maintaining HTTP method. - // "SEE_OTHER" - Http Status Code 303 - See Other. - // "TEMPORARY_REDIRECT" - Http Status Code 307 - Temporary Redirect - // maintaining HTTP method. - RedirectResponseCode string `json:"redirectResponseCode,omitempty"` - // StripQuery: If set to true, any accompanying query portion of the - // original - // URL is - // removed before redirecting the request. If set to false, the - // query portion of the original URL is retained. - // - // The default is set to false. - StripQuery bool `json:"stripQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRedirect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRedirect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRedirectAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRedirectAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRetryPolicy: The retry policy associates with HttpRouteRule -type HttpRetryPolicy struct { - // NumRetries: Specifies the allowed number retries. This number must be > - // 0. - // If not specified, defaults to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // PerTryTimeout: Specifies a non-zero timeout per retry attempt. - // - // If not specified, will use the timeout set in theHttpRouteAction field. - // If timeout in the HttpRouteAction field is not set, this field - // uses the largest timeout - // among all backend services associated with the route. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` - // RetryConditions: Specifies one or more conditions when this retry policy - // applies. Valid - // values are: - // - // - 5xx: retry is attempted if the instance or endpoint - // responds with any 5xx response code, or if the instance or - // endpoint does not respond at all. For example, disconnects, reset, read - // timeout, connection failure, and refused streams. - // - gateway-error: Similar to 5xx, but only - // applies to response codes 502, 503 or504. - // - connect-failure: a retry is attempted on failures - // connecting to the instance or endpoint. For example, connection - // timeouts. - // - retriable-4xx: a retry is attempted if the instance - // or endpoint responds with a 4xx response code. - // The only error that you can retry is error code 409. - // - refused-stream: a retry is attempted if the instance - // or endpoint resets the stream with a REFUSED_STREAM error - // code. This reset type indicates that it is safe to retry. - // - cancelled: a retry is attempted if the gRPC status - // code in the response header is set to cancelled. - // - deadline-exceeded: a retry is attempted if the gRPC - // status code in the response header is set todeadline-exceeded. - // - internal: a retry is attempted if the gRPC - // status code in the response header is set tointernal. - // - resource-exhausted: a retry is attempted if the gRPC - // status code in the response header is set toresource-exhausted. - // - unavailable: a retry is attempted if the gRPC - // status code in the response header is set tounavailable. - // - // Only the following codes are supported when the URL map is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // - cancelled - // - deadline-exceeded - // - internal - // - resource-exhausted - // - unavailable - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpRouteAction struct { - // CorsPolicy: The specification for allowing client-side cross-origin - // requests. For more - // information about the W3C recommendation for cross-origin resource - // sharing - // (CORS), see Fetch API Living - // Standard. - // - // Not supported when the URL map is bound to a target gRPC proxy. - CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"` - // FaultInjectionPolicy: The specification for fault injection introduced into - // traffic to test - // the resiliency of clients to backend service failure. As part of - // fault - // injection, when clients send requests to a backend service, delays can - // be - // introduced by a load balancer on a percentage of requests before - // sending - // those requests to the backend service. Similarly requests from clients - // can - // be aborted by the load balancer for a percentage of requests.timeout and - // retry_policy is ignored by clients - // that are configured with a fault_injection_policy if: - // 1. The traffic is generated by fault injection AND - // 2. The fault injection is not a delay fault injection. - // Fault injection is not supported with the classic Application Load - // Balancer - // . To see which load balancers support fault injection, - // see Load - // balancing: Routing and traffic management features. - FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` - // MaxStreamDuration: Specifies the maximum duration (timeout) for streams on - // the selected route. - // Unlike the timeout field where the timeout duration starts - // from the time the request has been fully processed (known - // as*end-of-stream*), - // the duration in this field is computed from the beginning of the - // stream - // until the response has been processed, including all retries. A - // stream that does not complete in this duration is closed. - // - // If not specified, this field uses the maximummaxStreamDuration value among - // all backend services associated - // with the route. - // - // This field is only allowed if the Url map is used with backend services - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` - // RequestMirrorPolicy: Specifies the policy on how requests intended for the - // route's backends - // are shadowed to a separate mirrored backend service. The load balancer - // does - // not wait for responses from the shadow service. Before sending traffic - // to the shadow service, the host / authority header is suffixed - // with-shadow. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` - // RetryPolicy: Specifies the retry policy associated with this route. - RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` - // Timeout: Specifies the timeout for the selected route. Timeout is computed - // from the - // time the request has been fully processed (known as *end-of-stream*) - // up until the response has been processed. Timeout includes - // all retries. - // - // If not specified, this field uses the largest timeout among all - // backend - // services associated with the route. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - Timeout *Duration `json:"timeout,omitempty"` - // UrlRewrite: The spec to modify the URL of the request, before forwarding the - // request - // to the matched service. - // - // urlRewrite is the only action supported in UrlMaps - // for classic Application Load Balancers. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` - // WeightedBackendServices: A list of weighted backend services to send traffic - // to when a route match - // occurs. The weights determine the fraction of traffic that flows to - // their corresponding backend service. If all traffic needs to - // go to a single backend service, there must be oneweightedBackendService with - // weight set to a non-zero number. - // - // After a backend service is identified and before forwarding - // the request to - // the backend service, advanced routing actions such as URL rewrites - // and - // header transformations are applied depending on additional - // settings - // specified in this HttpRouteAction. - WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRule: The HttpRouteRule setting specifies how to match an HTTP -// request -// and the corresponding routing action that load balancing proxies perform. -type HttpRouteRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how the - // Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // If a policy for an - // error code is not configured for the RouteRule, a policy for - // the error code configured inpathMatcher.defaultCustomErrorResponsePolicy is - // applied. If - // one is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the - // policy - // configured in UrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // For example, consider a UrlMap with the following configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy are configured - // with policies for 5xx and 4xx errors - // - A RouteRule for /coming_soon/ is configured for the - // error code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in RouteRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // When - // used in conjunction withrouteRules.routeAction.retryPolicy, retries - // take - // precedence. Only once all retries are exhausted, - // thecustomErrorResponsePolicy is applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the customErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // customErrorResponsePolicy is supported only for - // global external Application Load Balancers. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - // Description: The short description conveying the intent of this - // routeRule. - // - // - // The description can have a maximum length of 1024 characters. - Description string `json:"description,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backendService. - // - // The headerAction value specified here is applied before the - // matching pathMatchers[].headerAction and - // afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendSe - // rviceWeightAction[].headerAction - // - // HeaderAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // HttpFilterConfigs: Outbound route specific configuration - // fornetworkservices.HttpFilter resources enabled by Traffic - // Director. httpFilterConfigs only applies for load balancers - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule - // for - // more details. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HttpFilterConfigs []*HttpFilterConfig `json:"httpFilterConfigs,omitempty"` - // HttpFilterMetadata: Outbound route specific metadata supplied - // tonetworkservices.HttpFilter resources enabled by Traffic - // Director. httpFilterMetadata only applies for load balancers - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule - // for - // more details. - // - // The only configTypeUrl supported - // istype.googleapis.com/google.protobuf.Struct - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HttpFilterMetadata []*HttpFilterConfig `json:"httpFilterMetadata,omitempty"` - // MatchRules: The list of criteria for matching attributes of a request to - // thisrouteRule. This list has OR semantics: the request matches - // this routeRule when any of thematchRules are satisfied. However predicates - // within - // a given matchRule have AND semantics. All predicates - // within a matchRule must match for the request to - // match the rule. - MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` - // Priority: For routeRules within a given pathMatcher, - // priority determines the order in which a load balancer interpretsrouteRules. - // RouteRules are evaluated in order - // of priority, from the lowest to highest number. The priority of a - // rule decreases as its number increases (1, 2, 3, N+1). The first rule - // that matches the request is applied. - // - // - // You cannot configure two or more routeRules with the same priority. - // Priority for each rule must be set to a number from 0 to - // 2147483647 - // inclusive. - // - // - // Priority numbers can have gaps, which enable you to add or remove rules - // in the future without affecting the rest of the rules. For example, 1, 2, - // 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you - // could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the - // future - // without any impact on existing rules. - Priority int64 `json:"priority,omitempty"` - // RouteAction: In response to a matching matchRule, the load balancer - // performs advanced routing actions, such as URL rewrites and - // header - // transformations, before forwarding the request to the selected - // backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a route rule'srouteAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` - // Service: The full or partial URL of the backend service resource to which - // traffic - // is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, - // take effect before sending the request to the backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - Service string `json:"service,omitempty"` - // UrlRedirect: When this rule is matched, the request is redirected to a - // URL - // specified by urlRedirect. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomErrorResponsePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRuleMatch: HttpRouteRuleMatch specifies a set of criteria for -// matching -// requests to an HttpRouteRule. All specified criteria must -// be satisfied for a match to occur. -type HttpRouteRuleMatch struct { - // FullPathMatch: For satisfying the matchRule condition, the path of - // the - // request must exactly match the value specified infullPathMatch after - // removing any query parameters and anchor - // that may be part of the original URL. - // - // fullPathMatch must be from 1 to 1024 characters. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - FullPathMatch string `json:"fullPathMatch,omitempty"` - // HeaderMatches: Specifies a list of header match criteria, all of which must - // match - // corresponding headers in the request. - HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"` - // IgnoreCase: Specifies that prefixMatch and fullPathMatch - // matches are case sensitive. - // - // The default value is false. - // - // ignoreCase must not be used with regexMatch. - // - // Not supported when the URL map is bound to a target gRPC proxy. - IgnoreCase bool `json:"ignoreCase,omitempty"` - // MetadataFilters: Opaque filter criteria used by the load balancer to - // restrict routing - // configuration to a limited set of xDS - // compliant clients. In their xDS requests to the load balancer, xDS - // clients - // present node - // metadata. When there is a match, the relevant routing configuration - // is made available to those proxies. - // - // For each metadataFilter in this list, if itsfilterMatchCriteria is set to - // MATCH_ANY, at least one of thefilterLabels must match the corresponding - // label provided in - // the metadata. If its filterMatchCriteria is set to - // MATCH_ALL, then all of its filterLabels must match with - // corresponding labels provided in the metadata. If multiple - // metadata filters are specified, all of them need to be - // satisfied in order to be considered a match. - // - // metadataFilters specified here is applied after those - // specified in ForwardingRule that refers to theUrlMap this HttpRouteRuleMatch - // belongs to. - // - // metadataFilters only applies to load balancers that haveloadBalancingScheme - // set toINTERNAL_SELF_MANAGED. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` - // PathTemplateMatch: If specified, the route is a pattern match expression - // that must match the - // :path header once the query string is removed. - // - // A pattern match allows you to match - // - // - // - The value must be between 1 and 1024 characters - // - The pattern must start with a leading slash ("/") - // - There may be no more than 5 operators in pattern - // - // Precisely one ofprefix_match, full_path_match,regex_match or - // path_template_match must be set. - PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` - // PrefixMatch: For satisfying the matchRule condition, the request's - // path must begin with the specified prefixMatch.prefixMatch must begin with a - // /. - // - // The value must be from 1 to 1024 characters. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - // specified. - PrefixMatch string `json:"prefixMatch,omitempty"` - // QueryParameterMatches: Specifies a list of query parameter match criteria, - // all of which must - // match corresponding query parameters in the request. - // - // Not supported when the URL map is bound to a target gRPC proxy. - QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"` - // RegexMatch: For satisfying the matchRule condition, the path of the - // request must satisfy the regular expression specified inregexMatch after - // removing any query parameters and anchor - // supplied with the original URL. For - // more information about regular expression syntax, see Syntax. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullPathMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullPathMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRuleMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheck: Represents a legacy HTTPS Health Check resource. -// -// Legacy HTTPS health checks have been deprecated. If you are using a -// target -// pool-based network load balancer, you must use a legacy HTTP (not -// HTTPS) -// health check. For all other load balancers, including backend -// service-based -// network load balancers, and for managed instance group auto-healing, you -// must -// use modern (non-legacy) health checks. -// -// For more information, seeHealth checks -// overview. -type HttpsHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is 5 - // seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - // Host: The value of the host header in the HTTPS health check request. If - // left - // empty (default value), the public IP on behalf of which this health check - // is performed will be used. - Host string `json:"host,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Port: The TCP port number for the HTTPS health check request. The default - // value - // is 443. - Port int64 `json:"port,omitempty"` - // RequestPath: The request path of the HTTPS health check request. The default - // value is - // "/". Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is - // 5 seconds. It is invalid for timeoutSec to have a greater value - // than - // checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this - // many consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HttpsHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckListWarning: [Output Only] Informational warning message. -type HttpsHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HttpsHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpsHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Image: Represents an Image resource. -// -// You can use images to create boot disks for your VM instances. -// For more information, read Images. -type Image struct { - // Architecture: The architecture of the image. Valid values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud - // Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: Size of the image when restored onto a persistent disk (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // EnableConfidentialCompute: Whether this image is created from a confidential - // compute mode disk. - // [Output Only]: This field is not set by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // Family: The name of the image family to which this image belongs. The - // image - // family name can be from a publicly managed image family provided by - // Compute Engine, or from a custom image family you create. For - // example,centos-stream-9 is a publicly available image family. - // For more information, see Image - // family best practices. - // - // When creating disks, you can specify an image family instead of a - // specific - // image name. The image family always returns its latest image that is - // not - // deprecated. The name of the image family must comply with RFC1035. - Family string `json:"family,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. To see a list of available options, see - // theguestOSfeatures[].type parameter. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // ImageEncryptionKey: Encrypts the image using acustomer-supplied - // encryption key. - // - // After you encrypt an image with a customer-supplied key, you must - // provide - // the same key if you use the image later (e.g. to create a disk from - // the image). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the image, then - // the - // disk will be encrypted using an automatically generated key and you do - // not - // need to provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this image, - // which is - // essentially a hash of the labels used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are attached - // to this image. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - // Locked: A flag for marketplace VM disk created from the image, which is - // designed - // for marketplace VM disk to prevent the proprietary data on the disk - // from - // being accessed unwantedly. The flag will be inherited by the disk - // created - // from the image. - // - // The disk with locked flag set to true will be prohibited from performing - // the operations below: - // - // - R/W or R/O disk attach - // - Disk detach, if disk is created via create-on-create - // - Create images - // - Create snapshots - // - Create disk clone (create disk from the current disk) - // - // - // - // The image with the locked field set to true will be prohibited - // from - // performing the operations below: - // - // - Create images from the current image - // - Update the locked field for the current image - // - // - // - // The instance with at least one disk with locked flag set to true will - // be - // prohibited from performing the operations below: - // - // - Secondary disk attach - // - Create instant snapshot - // - Create machine images - // - Create instance template - // - Delete the instance with --keep-disk parameter set to true - Locked bool `json:"locked,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *ImageParams `json:"params,omitempty"` - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - // RolloutOverride: A rollout policy to apply to this image. When specified, - // the rollout policy - // overrides per-zone references to the image via the associated image - // family. - // The rollout policy restricts the zones where this image is accessible - // when - // using a zonal image family reference. When the rollout policy does - // not - // include the user specified zone, or if the zone is rolled out, this image - // is accessible. - // - // The rollout policy for this image is read-only, except for - // allowlisted - // users. This field might not be configured. To view the latest - // non-deprecated image in a specific zone, use theimageFamilyViews.get method. - RolloutOverride *RolloutPolicy `json:"rolloutOverride,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShieldedInstanceInitialState: Set the secure boot keys of shielded instance. - ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - // SourceDisk: URL of the source disk used to create this image. - // For example, the following are valid values: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskEncryptionKey: Thecustomer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // SourceDiskId: [Output Only] - // The ID value of the disk used to create this image. This value may be - // used - // to determine whether the image was taken from the current or a - // previous - // instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceImage: URL of the source image used to create this image. - // The following are valid formats for the URL: - // - // - https://www.googleapis.com/compute/v1/projects/project_id/global/ - // images/image_name - // - projects/project_id/global/images/image_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: The customer-supplied encryption key of the source - // image. Required if the - // source image is protected by a customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceImageId: [Output Only] - // The ID value of the image used to create this image. This value may be - // used - // to determine whether the image was taken from the current or a - // previous - // instance of a given image name. - SourceImageId string `json:"sourceImageId,omitempty"` - // SourceSnapshot: URL of the source snapshot used to create this image. - // The following are valid formats for the URL: - // - // - https://www.googleapis.com/compute/v1/projects/project_id/global/ - // snapshots/snapshot_name - // - projects/project_id/global/snapshots/snapshot_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of the - // source snapshot. Required if - // the source snapshot is protected by a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // SourceSnapshotId: [Output Only] - // The ID value of the snapshot used to create this image. This value may - // be - // used to determine whether the snapshot was taken from the current or - // a - // previous instance of a given snapshot name. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // SourceType: The type of the image used to create this disk. The - // default and only valid value is RAW. - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - // Status: [Output Only] The status of the image. An image can be used to - // create other - // resources, such as instances, only after the image has been - // successfully - // created and the status is set to READY. Possible - // values are FAILED, PENDING, orREADY. - // - // Possible values: - // "DELETING" - Image is deleting. - // "FAILED" - Image creation failed due to an error. - // "PENDING" - Image hasn't been created as yet. - // "READY" - Image has been successfully created. - Status string `json:"status,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the image - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // UserLicenses: A list of publicly visible user-licenses. Unlike regular - // licenses, user - // provided licenses can be modified after the disk is created. This includes - // a list of URLs to the license resource. For example, to provide a - // debian - // license: - // - // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - UserLicenses []string `json:"userLicenses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Image) MarshalJSON() ([]byte, error) { - type NoMethod Image - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block device, - // which should beTAR. This is just a container and transmission format and - // not - // a runtime format. Provided by the client when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` - // Sha1Checksum: [Deprecated] This field is deprecated. - // An optional SHA1 checksum of the disk image before unpackaging provided - // by the client when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` - // Source: The full Google Cloud Storage URL where the raw disk image archive - // is - // stored. - // The following are valid formats for the URL: - // - // - https://storage.googleapis.com/bucket_name/image_archive_name - // - - // https://storage.googleapis.com/bucket_name/folder_name/image_archive_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageRawDisk) MarshalJSON() ([]byte, error) { - type NoMethod ImageRawDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ImageFamilyView struct { - // Image: The latest image that is part of the specified image family in - // the - // requested location, and that is not deprecated. - Image *Image `json:"image,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Image") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Image") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageFamilyView) MarshalJSON() ([]byte, error) { - type NoMethod ImageFamilyView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ImageListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageList) MarshalJSON() ([]byte, error) { - type NoMethod ImageList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageListWarning: [Output Only] Informational warning message. -type ImageListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ImageListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ImageListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageParams: Additional image params. -type ImageParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the image. Tag - // keys and values have - // the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageParams) MarshalJSON() ([]byte, error) { - type NoMethod ImageParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InitialStateConfig: Initial State for shielded instance, -// these are public keys which are safe to store in public -type InitialStateConfig struct { - // Dbs: The Key Database (db). - Dbs []*FileContentBuffer `json:"dbs,omitempty"` - // Dbxs: The forbidden key database (dbx). - Dbxs []*FileContentBuffer `json:"dbxs,omitempty"` - // Keks: The Key Exchange Key (KEK). - Keks []*FileContentBuffer `json:"keks,omitempty"` - // Pk: The Platform Key (PK). - Pk *FileContentBuffer `json:"pk,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dbs") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dbs") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InitialStateConfig) MarshalJSON() ([]byte, error) { - type NoMethod InitialStateConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Instance: Represents an Instance resource. -// -// An instance is a virtual machine that is hosted on Google Cloud -// Platform. -// For more information, readVirtual Machine Instances. -type Instance struct { - // AdvancedMachineFeatures: Controls for advanced machine-related behavior - // features. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // CanIpForward: Allows this instance to send and receive packets with - // non-matching - // destination or source IPs. This is required if you plan to use this - // instance to forward routes. For more information, seeEnabling IP Forwarding. - CanIpForward bool `json:"canIpForward,omitempty"` - ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeletionProtection: Whether the resource should be protected against - // deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Disks: Array of disks associated with this instance. Persistent disks must - // be - // created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - // DisplayDevice: Enables display device for the instance. - DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - // EraseWindowsVssSignature: Specifies whether the disks restored from source - // snapshots or source - // machine image should erase Windows specific VSS signature. - EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the instance's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update the instance. You must always provide - // an - // up-to-date fingerprint hash in order to update the instance. - // - // To see the latest fingerprint, make get() request to the - // instance. - Fingerprint string `json:"fingerprint,omitempty"` - // GuestAccelerators: A list of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // Hostname: Specifies the hostname of the instance. The specified hostname - // must be - // RFC1035 compliant. If hostname is not specified, the default hostname - // is - // [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, - // and - // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. - Hostname string `json:"hostname,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - Identity string `json:"identity,omitempty"` - IdentityCertificate bool `json:"identityCertificate,omitempty"` - // InstanceEncryptionKey: Encrypts suspended data for an instance with - // acustomer-managed - // encryption key. - // - // If you are creating a new instance, this field will encrypt the local - // SSD - // and in-memory contents of the instance during the suspend operation. - // - // If you do not provide an encryption key when creating the instance, then - // the local SSD and in-memory contents will be encrypted using - // an automatically generated key during the suspend operation. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#instance - // for instances. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for this request, which is essentially a - // hash of - // the label's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // instance. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this instance. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LastStartTimestamp: [Output Only] Last start timestamp inRFC3339 text - // format. - LastStartTimestamp string `json:"lastStartTimestamp,omitempty"` - // LastStopTimestamp: [Output Only] Last stop timestamp inRFC3339 text format. - LastStopTimestamp string `json:"lastStopTimestamp,omitempty"` - // LastSuspendedTimestamp: [Output Only] Last suspended timestamp inRFC3339 - // text format. - LastSuspendedTimestamp string `json:"lastSuspendedTimestamp,omitempty"` - // MachineType: Full or partial URL of the machine type resource to use for - // this instance, - // in the format:zones/zone/machineTypes/machine-type. This is provided by the - // client - // when the instance is created. For example, the following is a valid - // partial - // url to a predefined - // machine type: - // - // zones/us-central1-f/machineTypes/n1-standard-1 - // - // - // To create acustom - // machine type, provide a URL to a machine type in the following format, - // where CPUS is 1 or an even number up to 32 (2, - // 4, 6, ... 24, etc), and MEMORY is the total - // memory for this instance. Memory must be a multiple of 256 MB and must - // be supplied in MB (e.g. 5 GB of memory is 5120 - // MB): - // - // zones/zone/machineTypes/custom-CPUS-MEMORY - // - // - // For example: zones/us-central1-f/machineTypes/custom-4-5120 - // For a full list of restrictions, read theSpecifications - // for custom machine types. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs assigned - // to this instance. This includes metadata keys that were explicitly - // defined - // for the instance. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Specifies aminimum CPU - // platform for the VM instance. Applicable values are the friendly names - // of CPU platforms, such as minCpuPlatform: "Intel - // Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of network configurations for this instance. - // These specify how - // interfaces are configured to interact with other network services, such - // as - // connecting to the internet. Multiple interfaces are supported - // per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InstanceParams `json:"params,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance. A map from a - // subdomain - // (namespace) to entries map. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // PreservedStateSizeGb: Total amount of preserved state for SUSPENDED - // instances. - // Read-only in the api. - PreservedStateSizeGb int64 `json:"preservedStateSizeGb,omitempty,string"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for the VM. - // If not specified, use INHERIT_FROM_SUBNETWORK as default. - // - // Possible values: - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits - // PrivateIpv6GoogleAccess from its - // subnetwork. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // ReservationAffinity: Specifies the reservations that this instance can - // consume from. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` - // ResourcePolicies: Resource policies applied to this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Specifies values set for instance attributes - // as - // compared to the values requested by user in the corresponding input - // only - // field. - ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: [Output Only] Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // SecureTags: [Input Only] Secure tags to apply to this instance. These can be - // later - // modified by the update method. - // Maximum number of secure tags allowed is 50. - SecureTags []string `json:"secureTags,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceAccounts: A list of service accounts, with their specified scopes, - // authorized for - // this instance. Only one service account per VM instance is - // supported. - // - // Service accounts generate access tokens that can be accessed - // through the metadata server and used to authenticate applications on - // the - // instance. SeeService Accounts - // for more information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // ServiceIntegrationSpecs: Mapping of user-defined keys to specifications for - // service integrations. - // Currently only a single key-value pair is supported. - ServiceIntegrationSpecs map[string]ServiceIntegrationSpec `json:"serviceIntegrationSpecs,omitempty"` - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` - // ShieldedVmConfig: Deprecating, please use shielded_instance_config. - ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` - // ShieldedVmIntegrityPolicy: Deprecating, please use - // shielded_instance_integrity_policy. - ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` - // SourceMachineImage: Source machine image - SourceMachineImage string `json:"sourceMachineImage,omitempty"` - // SourceMachineImageEncryptionKey: Source machine image encryption key when - // creating an instance from a - // machine image. - SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` - // StartRestricted: [Output Only] Whether a VM has been restricted for start - // because Compute - // Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING,RUNNING, STOPPING, - // SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about - // the status of the - // instance, see - // Instance life cycle. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - // Tags: Tags to apply to this instance. Tags are used to identify - // valid - // sources or targets for network firewalls and are specified by the - // client - // during instance creation. The tags can be later modified by the - // setTags - // method. Each tag within the list must comply withRFC1035. - // Multiple tags can be specified via the 'tags.items' field. - Tags *Tags `json:"tags,omitempty"` - // UpcomingMaintenance: [Output Only] DEPRECATED: Please - // useresource_status.upcoming_maintenance instead. Specifies - // upcoming maintenance for the instance. - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` - WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` - // Zone: [Output Only] URL of the zone where the instance resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Instance) MarshalJSON() ([]byte, error) { - type NoMethod Instance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: An object that contains a list of instances scoped by zone. - Items map[string]InstancesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#instanceAggregatedList - // for aggregated lists of - // Instance resources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceAggregatedListWarning: [Output Only] Informational warning message. -type InstanceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceConsumptionData struct { - // ConsumptionInfo: Resources consumed by the instance. - ConsumptionInfo *InstanceConsumptionInfo `json:"consumptionInfo,omitempty"` - // Instance: Server-defined URL for the instance. - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumptionInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumptionInfo") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceConsumptionData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceConsumptionInfo struct { - // GuestCpus: The number of virtual CPUs that are available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - // LocalSsdGb: The amount of local SSD storage available to the - // instance, - // defined in GiB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - // MemoryMb: The amount of physical memory available to the instance, - // defined in MiB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // MinNodeCpus: The minimal guaranteed number of virtual CPUs that are - // reserved. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestCpus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestCpus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceConsumptionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceFlexibilityPolicy: A flexible specification of machine types for -// instances to create. -type InstanceFlexibilityPolicy struct { - // InstanceSelections: Specification of alternative, flexible instance - // subsets. - // One of them will be selected to create the instances - // based on various criteria, like: - // - ranks, - // - location policy, - // - current capacity, - // - available reservations (you can specify affinity in - // InstanceProperties), - // - SWAN/GOOSE limitations. - // Key is an arbitrary, unique RFC1035 string that identifies the - // instance - // selection. - InstanceSelections map[string]InstanceFlexibilityPolicyInstanceSelection `json:"instanceSelections,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSelections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSelections") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceFlexibilityPolicyInstanceSelection: Specification of machine type to -// use. Every position inside this message -// is an alternative. -// The count specified in the shape flexibility must not exceed the number -// of entries in per_instance_properties or the capacity of the -// name_pattern, if used. -type InstanceFlexibilityPolicyInstanceSelection struct { - // Disks: Disks to be attached to the instances created from in this - // selection. - // They override the disks specified in the instance properties. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineTypes: Alternative machine types to use for instances that are - // created from - // these properties. This field only accepts a machine type names, for - // example `n2-standard-4` and not URLs or partial URLs. - MachineTypes []string `json:"machineTypes,omitempty"` - // Rank: Rank when prioritizing the shape flexibilities. - // The instance selections with rank are considered - // first, in the ascending order of the rank. - // If not set, defaults to 0. - Rank int64 `json:"rank,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceFlexibilityPolicyInstanceSelection) MarshalJSON() ([]byte, error) { - type NoMethod InstanceFlexibilityPolicyInstanceSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroup: Represents an Instance Group resource. -// -// Instance Groups can be used to configure a target -// forload -// balancing. -// -// Instance groups can either be managed or unmanaged. -// -// To create -// managed instance groups, use the instanceGroupManager -// orregionInstanceGroupManager resource instead. -// -// Use zonal unmanaged instance groups if you need to applyload -// balancing to groups of heterogeneous instances or if you need to manage -// the instances yourself. You cannot create regional unmanaged instance -// groups. -// -// For more information, readInstance -// groups. -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this instance - // group inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system - // uses this fingerprint to detect conflicts when multiple users change - // the - // named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] A unique identifier for this instance group, generated - // by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The resource type, which is alwayscompute#instanceGroup - // for instance groups. - Kind string `json:"kind,omitempty"` - // Name: The name of the instance group. The name must be 1-63 characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // NamedPorts: Optional. Assigns a name to a port number. For example:{name: - // "http", port: 80} - // - // This - // allows the system to reference ports by the assigned name instead of a - // port number. Named ports can also contain multiple ports. For - // example:[{name: "app1", port: 8080}, {name: - // "app1", port: 8081}, {name: "app2", port: - // 8082}] - // - // Named ports apply to all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Network: [Output Only] The URL of the network to which all instances in - // the - // instance group belong. If your instance has multiple network - // interfaces, - // then the network and subnetwork fields only refer to the - // network and subnet used by your primary interface (nic0). - Network string `json:"network,omitempty"` - // Region: [Output Only] The URL of theregion - // where the instance group is located (for regional resources). - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] The URL for this instance group. The server - // generates - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Size: [Output Only] The total number of instances in the instance group. - Size int64 `json:"size,omitempty"` - // Subnetwork: [Output Only] The URL of the subnetwork to which all instances - // in the - // instance group belong. If your instance has multiple network - // interfaces, - // then the network and subnetwork fields only refer to the - // network and subnet used by your primary interface (nic0). - Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the instance group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroup) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupAggregatedList for aggregated lists of - // instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupAggregatedListWarning: [Output Only] Informational warning -// message. -type InstanceGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupList for instance group lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupListWarning: [Output Only] Informational warning message. -type InstanceGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManager: Represents a Managed Instance Group resource. -// -// An instance group is a collection of VM instances that you can manage as -// a -// single entity. For more information, readInstance groups. -// -// For zonal Managed Instance Group, use the -// instanceGroupManagers -// resource. -// -// For regional Managed Instance Group, use theregionInstanceGroupManagers -// resource. -type InstanceGroupManager struct { - // AllInstancesConfig: Specifies configuration that overrides the instance - // template configuration - // for the group. - AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // AutoHealingPolicies: The autohealing policy for this managed instance group. - // You can specify - // only one value. - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // BaseInstanceName: The base instance name is a prefix that you want to attach - // to the names of - // all VMs in a MIG. The maximum character length is 58 and the name - // must - // comply with RFC1035 format. - // - // When a VM is created in the group, the MIG appends a hyphen and a - // random - // four-character string to the base instance name. If you want the MIG - // to - // assign sequential numbers instead of a random string, then end the - // base - // instance name with a hyphen followed by one or more hash symbols. The - // hash - // symbols indicate the number of digits. For example, a base instance name - // of - // "vm-###" results in "vm-001" as a VM name. - // @pattern - // a-z (([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?)) - BaseInstanceName string `json:"baseInstanceName,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this managed - // instance group inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CurrentActions: [Output Only] The list of instance actions and the number of - // instances - // in this managed instance group that are scheduled for each of those - // actions. - CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // DistributionPolicy: Policy specifying the intended distribution of managed - // instances across - // zones in a regional managed instance group. - DistributionPolicy *DistributionPolicy `json:"distributionPolicy,omitempty"` - // FailoverAction: The action to perform in case of zone failure. Only one - // value is supported,NO_FAILOVER. The default is NO_FAILOVER. - // - // Possible values: - // "NO_FAILOVER" - // "UNKNOWN" - FailoverAction string `json:"failoverAction,omitempty"` - // Fingerprint: Fingerprint of this resource. This field may be used in - // optimistic locking. - // It will be ignored when inserting an InstanceGroupManager. An - // up-to-date - // fingerprint must be provided in order to update the - // InstanceGroupManager, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an InstanceGroupManager. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // InstanceFlexibilityPolicy: Instance flexibility allowing MIG to create VMs - // from multiple - // types of machines. - // Instance flexibility configuration on MIG overrides instance - // template configuration. - InstanceFlexibilityPolicy *InstanceGroupManagerInstanceFlexibilityPolicy `json:"instanceFlexibilityPolicy,omitempty"` - // InstanceGroup: [Output Only] The URL of the Instance Group resource. - InstanceGroup string `json:"instanceGroup,omitempty"` - // InstanceLifecyclePolicy: The repair policy for this managed instance group. - InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `json:"instanceLifecyclePolicy,omitempty"` - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create all new instances - // in the managed instance group. The templates for existing instances in - // the - // group do not change unless you run recreateInstances, - // runapplyUpdatesToInstances, or set the group'supdatePolicy.type to - // PROACTIVE. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManager for managed instance groups. - Kind string `json:"kind,omitempty"` - // ListManagedInstancesResults: Pagination behavior of the listManagedInstances - // API method for - // this managed instance group. - // - // Possible values: - // "PAGELESS" - (Default) Pagination is disabled for the - // group'slistManagedInstances API method. maxResults - // and pageToken query parameters are ignored and all - // instances are returned in a single response. - // "PAGINATED" - Pagination is enabled for the group's - // listManagedInstances - // API method. maxResults and pageToken query - // parameters are respected. - ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` - // MultiMig: URL to the multi-MIG that this Managed Instance Group belongs to. - MultiMig string `json:"multiMig,omitempty"` - // Name: The name of the managed instance group. The name must be 1-63 - // characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // NamedPorts: [Output Only] Named ports configured on the Instance Groups - // complementary - // to this Instance Group Manager. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Params: Input only. Additional params passed with the request, but not - // persisted - // as part of resource payload. - Params *InstanceGroupManagerParams `json:"params,omitempty"` - // Region: [Output Only] The URL of theregion - // where the managed instance group resides (for regional resources). - Region string `json:"region,omitempty"` - // ResourcePolicies: Resource policies for this managed instance group. - ResourcePolicies *InstanceGroupManagerResourcePolicies `json:"resourcePolicies,omitempty"` - // SatisfiesPzi: [Output Only] Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] The URL for this managed instance group. The server - // defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceAccount: The service account to be used as credentials for all - // operations performed - // by the managed instance group on instances. The service accounts needs - // all - // permissions required to create and delete instances. - // By default, the service - // account - // {projectNumber}@cloudservices.gserviceaccount.com is used. - ServiceAccount string `json:"serviceAccount,omitempty"` - // StandbyPolicy: Standby policy for stopped and suspended instances. - StandbyPolicy *InstanceGroupManagerStandbyPolicy `json:"standbyPolicy,omitempty"` - // StatefulPolicy: Stateful configuration for this Instanced Group Manager - StatefulPolicy *StatefulPolicy `json:"statefulPolicy,omitempty"` - // Status: [Output Only] The status of this managed instance group. - Status *InstanceGroupManagerStatus `json:"status,omitempty"` - // TargetPools: The URLs for all TargetPool resources to which instances in - // theinstanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - // TargetSize: The target number of running instances for this managed instance - // group. - // You can reduce this number by using the instanceGroupManager - // deleteInstances or abandonInstances methods. Resizing the group also - // changes this number. - TargetSize int64 `json:"targetSize,omitempty"` - // TargetSizePolicy: The policy that specifies how the MIG creates its VMs to - // achieve the target - // size. - TargetSizePolicy *InstanceGroupManagerTargetSizePolicy `json:"targetSizePolicy,omitempty"` - // TargetSizeUnit: The unit of measure for the target size. - // - // Possible values: - // "INSTANCE" - [Default] TargetSize is the target number of instances. - // "VCPU" - TargetSize is the target count of vCPUs of VMs. - TargetSizeUnit string `json:"targetSizeUnit,omitempty"` - // TargetStoppedSize: The target number of stopped instances for this managed - // instance group. - // This number changes when you: - // - // - Stop instance using the stopInstances - // method or start instances using the startInstances - // method. - // - Manually change the targetStoppedSize using the update - // method. - TargetStoppedSize int64 `json:"targetStoppedSize,omitempty"` - // TargetSuspendedSize: The target number of suspended instances for this - // managed instance group. - // This number changes when you: - // - // - Suspend instance using the suspendInstances - // method or resume instances using the resumeInstances - // method. - // - Manually change the targetSuspendedSize using the update - // method. - TargetSuspendedSize int64 `json:"targetSuspendedSize,omitempty"` - // UpdatePolicy: The update policy for this managed instance group. - UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` - // Versions: Specifies the instance templates used by this managed instance - // group to - // create instances. - // - // Each version is defined by an instanceTemplate and aname. Every version can - // appear at most once per instance - // group. This field overrides the top-level instanceTemplate - // field. Read more about therelationships - // between these fields. Exactly one version must leave thetargetSize field - // unset. That version will be applied to all - // remaining instances. For more information, read aboutcanary - // updates. - Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` - // Zone: [Output Only] The URL of azone - // where the managed instance group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManager) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManager - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActionsSummary struct { - // Abandoning: [Output Only] The total number of instances in the managed - // instance group - // that are scheduled to be abandoned. Abandoning an instance removes it - // from the managed instance group without deleting it. - Abandoning int64 `json:"abandoning,omitempty"` - // Creating: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be created or are currently being created. If the - // group - // fails to create any of these instances, it tries again until it creates - // the instance successfully. - // - // If you have disabled creation retries, this field will not be - // populated; - // instead, the creatingWithoutRetries field will be populated. - Creating int64 `json:"creating,omitempty"` - // CreatingAtomically: [Output Only] The number of instances that the managed - // instance group - // will attempt to create atomically, in a batch mode. If the desired count - // of instances can not be created, entire batch will be deleted and the - // group will decrease its targetSize value accordingly. - CreatingAtomically int64 `json:"creatingAtomically,omitempty"` - // CreatingWithoutRetries: [Output Only] The number of instances that the - // managed instance group - // will attempt to create. The group attempts to create each instance - // only once. If the group fails to create any of these instances, it - // decreases the group's targetSize value accordingly. - CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"` - // Deleting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be deleted or are currently being deleted. - Deleting int64 `json:"deleting,omitempty"` - // None: [Output Only] The number of instances in the managed instance group - // that - // are running and have no scheduled actions. - None int64 `json:"none,omitempty"` - // Queuing: [Output Only] The number of instances that the managed instance - // group - // is currently queuing. - Queuing int64 `json:"queuing,omitempty"` - // Recreating: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be recreated or are currently being being - // recreated. - // Recreating an instance deletes the existing root persistent disk - // and creates a new disk from the image that is defined in the - // instance template. - Recreating int64 `json:"recreating,omitempty"` - // Refreshing: [Output Only] The number of instances in the managed instance - // group that - // are being reconfigured with properties that do not require a restart - // or a recreate action. For example, setting or removing target - // pools for the instance. - Refreshing int64 `json:"refreshing,omitempty"` - // Restarting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be restarted or are currently being restarted. - Restarting int64 `json:"restarting,omitempty"` - // Resuming: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be resumed or are currently being resumed. - Resuming int64 `json:"resuming,omitempty"` - // Starting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be started or are currently being started. - Starting int64 `json:"starting,omitempty"` - // Stopping: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be stopped or are currently being stopped. - Stopping int64 `json:"stopping,omitempty"` - // Suspending: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be suspended or are currently being suspended. - Suspending int64 `json:"suspending,omitempty"` - // Verifying: [Output Only] The number of instances in the managed instance - // group that - // are being verified. See the managedInstances[].currentAction - // property in the listManagedInstances method documentation. - Verifying int64 `json:"verifying,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abandoning") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abandoning") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerActionsSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManagersScopedList resources. - Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManagerAggregatedList for an aggregated - // list of managed instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerAggregatedListWarning: [Output Only] Informational -// warning message. -type InstanceGroupManagerAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAllInstancesConfig struct { - // Properties: Properties to set on all instances in the group. - // - // You can add or modify properties using theinstanceGroupManagers.patch - // orregionInstanceGroupManagers.patch. After settingallInstancesConfig on the - // group, you must update the group's - // instances to apply the configuration. To apply the configuration, set - // the - // group's updatePolicy.type field to use proactive updates or - // use the applyUpdatesToInstances method. - Properties *InstancePropertiesPatch `json:"properties,omitempty"` - // ForceSendFields is a list of field names (e.g. "Properties") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Properties") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAutoHealingPolicy struct { - // AutoHealingTriggers: Restricts what triggers autohealing. - AutoHealingTriggers *InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers `json:"autoHealingTriggers,omitempty"` - // HealthCheck: The URL for the health check that signals autohealing. - HealthCheck string `json:"healthCheck,omitempty"` - // InitialDelaySec: The initial delay is the number of seconds that a new VM - // takes to - // initialize and run its startup script. During a VM's initial delay - // period, the MIG ignores unsuccessful health checks because the VM might - // be in the startup process. This prevents the MIG from prematurely - // recreating a VM. If the health check receives a healthy response during - // the initial delay, it indicates that the startup process is complete and - // the VM is ready. The value of initial delay must be between 0 and - // 3600 - // seconds. The default value is 0. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - // MaxUnavailable: Maximum number of instances that can be unavailable when - // autohealing. - // When 'percent' is used, the value is rounded if necessary. - // The instance is considered available if all of the following conditions - // are satisfied: - // 1. Instance's status is RUNNING. - // 2. Instance's currentAction is NONE (in particular its liveness health - // check result was observed to be HEALTHY at least once as it passed - // VERIFYING). - // 3. There is no outgoing action on an instance triggered by IGM. - // - // By default, number of concurrently autohealed instances is smaller than - // the managed instance group target size. However, if a zonal managed - // instance group has only one instance, or a regional managed instance - // group has only one instance per zone, autohealing will recreate - // these - // instances when they become unhealthy. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingTriggers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingTriggers") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAutoHealingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers struct { - // OnHealthCheck: If you have configured an application-based health check for - // the group, - // this field controls whether to trigger VM autohealing based on a - // failed - // health check. Valid values are: - // - // - ON (default): The group recreates running VMs that - // fail the application-based health check. - // - OFF: When set to OFF, you can still observe instance - // health state, but the group does not recreate VMs that fail the - // application-based health check. This is useful for troubleshooting and - // setting up your health check configuration. - // - // Possible values: - // "OFF" - When set to OFF, you can still observe instance health state, but - // the - // group does not recreate VMs that fail the application-based health - // check. This is useful for troubleshooting and setting up your health - // check configuration. - // "ON" - (Default) The group recreates running VMs that fail the - // group's - // application-based health check. - OnHealthCheck string `json:"onHealthCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "OnHealthCheck") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OnHealthCheck") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAutoHealingPolicyAutoHealingTriggers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicy struct { - // InstanceSelectionLists: Named instance selections configuring properties - // that the group will use - // when creating new VMs. - InstanceSelectionLists map[string]InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection `json:"instanceSelectionLists,omitempty"` - // InstanceSelections: Named instance selections configuring properties that - // the group will use - // when creating new VMs. - InstanceSelections map[string]InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection `json:"instanceSelections,omitempty"` - // ProvisioningModelMix: Provisioning model configuration used by this managed - // instance group to - // create instances. - ProvisioningModelMix *InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix `json:"provisioningModelMix,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSelectionLists") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSelectionLists") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection struct { - // Disks: List of disks to be attached to the instances created from - // this - // selection. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineTypes: Full machine-type names, e.g. "n1-standard-16". - MachineTypes []string `json:"machineTypes,omitempty"` - // MinCpuPlatform: Name of the minimum CPU platform to be used by this instance - // selection. - // e.g. 'Intel Ice Lake'. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // Rank: Preference of this instance selection. Lower number means - // higher - // preference. MIG will first try to create a VM based on the machine-type - // with lowest rank and fallback to next rank based on availability. - // Machine types and instance selections with the same rank have the - // same - // preference. - Rank int64 `json:"rank,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix struct { - // StandardCapacityBase: The base capacity that will always use Standard VMs to - // avoid risk of - // more preemption than the minimum capacity user needs. MIG will create - // only Standard VMs until it reaches standard_capacity_base and only - // then will start using standard_capacity_percent_above_base to mix Spot - // with Standard VMs. - StandardCapacityBase int64 `json:"standardCapacityBase,omitempty"` - // StandardCapacityPercentAboveBase: The percentage of target capacity that - // should use Standard VM. The - // remaining percentage will use Spot VMs. The percentage applies only to - // the capacity above standard_capacity_base. - StandardCapacityPercentAboveBase int64 `json:"standardCapacityPercentAboveBase,omitempty"` - // ForceSendFields is a list of field names (e.g. "StandardCapacityBase") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StandardCapacityBase") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceLifecyclePolicy struct { - // DefaultActionOnFailure: The action that a MIG performs on a failed VM. If - // the value of the onFailedHealthCheck field - // is `DEFAULT_ACTION`, then the same action also applies to the VMs on which - // your application - // fails a health check. Valid values are - REPAIR (default): MIG automatically - // repairs a failed - // VM by recreating it. For more information, see about repairing VMs in a MIG. - // - DO_NOTHING: MIG - // does not repair a failed VM. - // - // Possible values: - // "DELETE" - MIG deletes a failed or an unhealthy VM. Deleting the VM - // decreases - // the target size of the MIG. - // "DO_NOTHING" - MIG does not repair a failed VM. - // "REPAIR" - (default): MIG automatically repairs a failed VM by recreating - // it. For more information, - // see about repairing VMs in a MIG. - DefaultActionOnFailure string `json:"defaultActionOnFailure,omitempty"` - // ForceUpdateOnRepair: A bit indicating whether to forcefully apply the - // group's latest - // configuration when repairing a VM. Valid options are: - // - // - // - // - NO (default): If configuration updates are available, they are not - // forcefully applied during repair. Instead, configuration updates are - // applied according to the group's update policy. - // - // - YES: If configuration updates are available, they are applied - // during repair. - // - // Possible values: - // "NO" - // "YES" - ForceUpdateOnRepair string `json:"forceUpdateOnRepair,omitempty"` - // MetadataBasedReadinessSignal: The configuration for metadata based readiness - // signal sent by the - // instance during initialization when stopping / suspending an instance. - // The Instance Group Manager will wait for a signal that indicates - // successful initialization before stopping / suspending an instance. - // - // If a successful readiness signal is not sent before timeout, - // the - // corresponding instance will not be stopped / suspended. Instead, - // an error will be visible in the lastAttempt.errors field of - // the managed instance in the listmanagedinstances - // method. - // - // If metadataBasedReadinessSignal.timeoutSec is unset, - // the Instance Group Manager will directly proceed to suspend / - // stop - // instances, skipping initialization on them. - MetadataBasedReadinessSignal *InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal `json:"metadataBasedReadinessSignal,omitempty"` - // OnFailedHealthCheck: The action that a MIG performs on an unhealthy VM. A VM - // is marked as - // unhealthy when the application running on that VM fails a health - // check. - // Valid values are: - // - // - DEFAULT_ACTION (default): MIG uses the same action - // configured for instanceLifecyclePolicy.defaultActionOnFailure field. - // - REPAIR: MIG automatically repairs an unhealthy VM by - // recreating it. - // - DO_NOTHING: MIG doesn't repair an unhealthy VM. - // For more information, see - // About repairing VMs in a MIG. - // - // Possible values: - // "DEFAULT_ACTION" - (Default) MIG uses the same action configured - // for - // instanceLifecyclePolicy.defaultActionOnFailure field. - // "DO_NOTHING" - MIG doesn't repair an unhealthy VM. - // "REPAIR" - MIG automatically repairs an unhealthy VM by recreating it. - OnFailedHealthCheck string `json:"onFailedHealthCheck,omitempty"` - // OnRepair: Configuration for VM repairs in the MIG. - OnRepair *InstanceGroupManagerInstanceLifecyclePolicyOnRepair `json:"onRepair,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultActionOnFailure") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultActionOnFailure") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceLifecyclePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceLifecyclePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal struct { - // TimeoutSec: The number of seconds to wait for a readiness signal - // during - // initialization before timing out. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "TimeoutSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TimeoutSec") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerInstanceLifecyclePolicyOnRepair: Configuration for VM -// repairs in the MIG. -type InstanceGroupManagerInstanceLifecyclePolicyOnRepair struct { - // AllowChangingZone: Specifies whether the MIG can change a VM's zone during a - // repair. - // Valid values are: - // - // - NO (default): MIG cannot change a VM's zone during a - // repair. - // - YES: MIG can select a different zone for the VM during - // a repair. - // - // Possible values: - // "NO" - [Default] MIG cannot change a VM's zone during a repair. - // "YES" - MIG can select a different zone for the VM during a repair. - AllowChangingZone string `json:"allowChangingZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowChangingZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowChangingZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceLifecyclePolicyOnRepair) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceLifecyclePolicyOnRepair - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerList: [Output Only] A list of managed instance groups. -type InstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // always - // compute#instanceGroupManagerList for a list of managed instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerListWarning: [Output Only] Informational warning -// message. -type InstanceGroupManagerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerParams: Input only additional params for instance group -// manager creation. -type InstanceGroupManagerParams struct { - // ResourceManagerTags: Resource manager tags to bind to the managed instance - // group. The tags are - // key-value pairs. Keys must be in the format tagKeys/123 and values in - // the - // format tagValues/456. For more information, seeManage tags - // for resources. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerParams) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequest: InstanceGroupManagerResizeRequest -// represents a request to create -// a number of VMs: either immediately or by queuing the request for -// the -// specified time. This resize request is nested under InstanceGroupManager -// and the VMs created by this request are added to the -// owning -// InstanceGroupManager. -type InstanceGroupManagerResizeRequest struct { - // Count: This field is deprecated, please use resize_by instead. - // The count of instances to create as part of this resize request. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this resize - // request inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Instances: The names of instances to be created by this resize request. The - // number of - // names specified determines the number of instances to create. The - // group's - // target size will be increased by this number. This field cannot be - // used - // together with 'resize_by'. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManagerResizeRequest for - // resize requests. - Kind string `json:"kind,omitempty"` - // Name: The name of this resize request. The name must be 1-63 - // characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // QueuingPolicy: This field is deprecated, ResizeRequests would not be - // provisioned - // immediately and would stay in the queue until explicitly cancelled. - // When - // set, defines queing parameters for the requested deferred capacity. - // When - // unset, the request starts provisioning immediately, or fails if - // immediate - // provisioning is not possible. - QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // Region: [Output Only] The URL of aregion - // where the resize request is located. Populated only for regional - // resize - // requests. - Region string `json:"region,omitempty"` - // RequestedRunDuration: Requested run duration for instances that will be - // created by this request. - // At the end of the run duration instance will be deleted. - RequestedRunDuration *Duration `json:"requestedRunDuration,omitempty"` - // ResizeBy: The number of instances to be created by this resize request. The - // group's - // target size will be increased by this number. This field cannot be - // used - // together with 'instances'. - ResizeBy int64 `json:"resizeBy,omitempty"` - // SelfLink: [Output Only] The URL for this resize request. The server - // defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output only] Current state of the request. - // - // Possible values: - // "ACCEPTED" - The request was created successfully and was accepted for - // provisioning - // when the capacity becomes available. - // "CANCELLED" - The request is cancelled. - // "CREATING" - Resize request is being created and may still fail creation. - // "DELETING" - The value is deprecated. ResizeRequests would not change - // state while - // being deleted. - // The request is being deleted. - // "FAILED" - The request failed before or during provisioning. If the - // request fails - // during provisioning, any VMs that were created during provisioning - // are - // rolled back and removed from the MIG. - // "PROVISIONING" - The value is deprecated. ResizeRequests would stay in the - // ACCEPTED state - // during provisioning attempts. - // The target resource(s) are being provisioned. - // "STATE_UNSPECIFIED" - Default value. This value should never be returned. - // "SUCCEEDED" - The request succeeded. - State string `json:"state,omitempty"` - // Status: [Output only] Status of the request. - Status *InstanceGroupManagerResizeRequestStatus `json:"status,omitempty"` - // Zone: [Output Only] The URL of azone - // where the resize request is located. Populated only for zonal - // resize - // requests. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatus struct { - // Error: [Output only] Fatal errors encountered during the queueing - // or - // provisioning phases of the ResizeRequest that caused the transition to - // the FAILED state. Contrary to the last_attempt errors, this field is - // final and errors are never removed from here, as the ResizeRequest is - // not - // going to retry. - Error *InstanceGroupManagerResizeRequestStatusError `json:"error,omitempty"` - // LastAttempt: [Output only] Information about the last attempt to fulfill the - // request. - // The value is temporary since the ResizeRequest can retry, as long as - // it's - // still active and the last attempt value can either be cleared or - // replaced - // with a different error. Since ResizeRequest retries infrequently, the - // value may be stale and no longer show an active problem. The value - // is - // cleared when ResizeRequest transitions to the final state - // (becomes - // inactive). If the final state is FAILED the error describing it will - // be - // storred in the "error" field only. - LastAttempt *InstanceGroupManagerResizeRequestStatusLastAttempt `json:"lastAttempt,omitempty"` - // QueuingPolicy: This field is deprecated, setting queueing policy is no - // longer supported. - // Constraints for the time when the instances start provisioning. - // Always - // exposed as absolute time. - QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestStatusError: [Output only] Fatal errors -// encountered during the queueing or -// provisioning phases of the ResizeRequest that caused the transition to -// the FAILED state. Contrary to the last_attempt errors, this field is -// final and errors are never removed from here, as the ResizeRequest is -// not -// going to retry. -type InstanceGroupManagerResizeRequestStatusError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerResizeRequestStatusErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttempt struct { - // Error: Errors that prevented the ResizeRequest to be fulfilled. - Error *InstanceGroupManagerResizeRequestStatusLastAttemptError `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttempt) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttempt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestStatusLastAttemptError: Errors that -// prevented the ResizeRequest to be fulfilled. -type InstanceGroupManagerResizeRequestStatusLastAttemptError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestsListResponse: [Output Only] A list of -// resize requests. -type InstanceGroupManagerResizeRequestsListResponse struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of resize request resources. - Items []*InstanceGroupManagerResizeRequest `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#instanceGroupManagerResizeRequestList for - // a list of resize requests. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerResizeRequestsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestsListResponseWarning: [Output Only] -// Informational warning message. -type InstanceGroupManagerResizeRequestsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerResizeRequestsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResourcePolicies struct { - // WorkloadPolicy: The URL of the workload policy that is specified for this - // managed - // instance group. - // It can be a full or partial URL. For example, the following are - // all valid URLs to a workload policy: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - projects/project/regions/region/resourcePolicies/resourcePolicy - // - regions/region/resourcePolicies/resourcePolicy - WorkloadPolicy string `json:"workloadPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkloadPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResourcePolicies) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResourcePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStandbyPolicy struct { - // InitialDelaySec: Specifies the number of seconds that the MIG should wait to - // suspend or - // stop a VM after that VM was created. The initial delay gives - // the - // initialization script the time to prepare your VM for a quick scale out. - // The value of initial delay must be between 0 and 3600 seconds. The - // default value is 0. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - // Mode: Defines how a MIG resumes or starts VMs from a standby pool when - // the - // group scales out. The default mode is `MANUAL`. - // - // Possible values: - // "MANUAL" - MIG does not automatically resume or start VMs in the standby - // pool when - // the group scales out. - // "SCALE_OUT_POOL" - MIG automatically resumes or starts VMs in the standby - // pool when the - // group scales out, and replenishes the standby pool afterwards. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "InitialDelaySec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InitialDelaySec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStandbyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStandbyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatus struct { - // AllInstancesConfig: [Output only] Status of all-instances configuration on - // the group. - AllInstancesConfig *InstanceGroupManagerStatusAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // Autoscaler: [Output Only] The URL of theAutoscaler - // that targets this instance group manager. - Autoscaler string `json:"autoscaler,omitempty"` - // BulkInstanceOperation: [Output Only] The status of bulk instance operation. - BulkInstanceOperation *InstanceGroupManagerStatusBulkInstanceOperation `json:"bulkInstanceOperation,omitempty"` - // IsStable: [Output Only] A bit indicating whether the managed instance group - // is in a - // stable state. A stable state means that: none of the instances in - // the - // managed instance group is currently undergoing any type of change - // (for - // example, creation, restart, or deletion); no future changes are - // scheduled - // for instances in the managed instance group; and the managed instance - // group itself is not being modified. - IsStable bool `json:"isStable,omitempty"` - // Stateful: [Output Only] Stateful status of the given Instance Group Manager. - Stateful *InstanceGroupManagerStatusStateful `json:"stateful,omitempty"` - // VersionTarget: [Output Only] A status of consistency of Instances' versions - // with their - // target version specified by version field on Instance Group - // Manager. - VersionTarget *InstanceGroupManagerStatusVersionTarget `json:"versionTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusAllInstancesConfig struct { - // CurrentRevision: [Output Only] Current all-instances configuration - // revision. - // This value is in RFC3339 text format. - CurrentRevision string `json:"currentRevision,omitempty"` - // Effective: [Output Only] A bit indicating whether this configuration - // has - // been applied to all managed instances in the group. - Effective bool `json:"effective,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentRevision") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentRevision") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerStatusBulkInstanceOperation: Bulk instance operation is -// the creation of VMs in a MIG when the -// targetSizePolicy.mode is set to BULK. -type InstanceGroupManagerStatusBulkInstanceOperation struct { - // InProgress: [Output Only] Informs whether bulk instance operation is in - // progress. - InProgress bool `json:"inProgress,omitempty"` - // LastProgressCheck: [Output Only] Information from the last progress check of - // bulk instance - // operation. - LastProgressCheck *InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck `json:"lastProgressCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "InProgress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InProgress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperation) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck struct { - // Error: [Output Only] Errors encountered during bulk instance operation. - Error *InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError `json:"error,omitempty"` - // Timestamp: [Output Only] Timestamp of the last progress check of bulk - // instance - // operation. Timestamp is in RFC3339 text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError: -// [Output Only] Errors encountered during bulk instance operation. -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusStateful struct { - // HasStatefulConfig: [Output Only] A bit indicating whether the managed - // instance group - // has stateful configuration, that is, if you have configured any items - // in a stateful policy or in per-instance configs. - // The group might report that it has no stateful configuration even when - // there is still some preserved state on a managed instance, for example, - // if you have deleted all PICs but not yet applied those deletions. - HasStatefulConfig bool `json:"hasStatefulConfig,omitempty"` - // IsStateful: [Output Only] A bit indicating whether the managed instance - // group - // has stateful configuration, that is, if you have configured any items - // in a stateful policy or in per-instance configs. - // The group might report that it has no stateful configuration even when - // there is still some preserved state on a managed instance, for example, - // if you have deleted all PICs but not yet applied those deletions. This - // field is deprecated in favor of has_stateful_config. - IsStateful bool `json:"isStateful,omitempty"` - // PerInstanceConfigs: [Output Only] Status of per-instance configurations on - // the instances. - PerInstanceConfigs *InstanceGroupManagerStatusStatefulPerInstanceConfigs `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "HasStatefulConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HasStatefulConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusStateful) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusStateful - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusStatefulPerInstanceConfigs struct { - // AllEffective: A bit indicating if all of the group's per-instance - // configurations - // (listed in the output of a listPerInstanceConfigs API call) have - // status EFFECTIVE or there are no per-instance-configs. - AllEffective bool `json:"allEffective,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllEffective") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllEffective") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusStatefulPerInstanceConfigs) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusStatefulPerInstanceConfigs - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusVersionTarget struct { - // IsReached: [Output Only] A bit indicating whether version target has been - // reached - // in this managed instance group, i.e. all instances are in their - // target - // version. Instances' target version are specified byversion field on Instance - // Group Manager. - IsReached bool `json:"isReached,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsReached") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsReached") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusVersionTarget) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusVersionTarget - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerTargetSizePolicy struct { - // Mode: The mode of target size policy based on which the MIG creates its - // VMs - // individually or all at once. - // - // Possible values: - // "BULK" - The mode in which the MIG creates VMs all at once. In this mode, - // if the - // MIG is unable to create even one VM, the MIG waits until all VMs can - // be - // created at the same time. - // "INDIVIDUAL" - The mode in which the MIG creates VMs individually. In this - // mode, if - // the MIG is unable to create a VM, the MIG will continue to create the - // other VMs in the group. This is the default mode. - // "UNSPECIFIED_MODE" - If mode is unspecified, MIG will behave as in the - // default `INDIVIDUAL` - // mode. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerTargetSizePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerTargetSizePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerUpdatePolicy struct { - // InstanceRedistributionType: The - // instance redistribution policy for regional managed instance groups. - // Valid values are: - // - // - PROACTIVE (default): The group attempts to maintain an - // even distribution of VM instances across zones in the region. - // - NONE: For non-autoscaled groups, proactive - // redistribution is disabled. - // - // Possible values: - // "NONE" - No action is being proactively performed in order to bring this - // IGM - // to its target instance distribution. - // "PROACTIVE" - This IGM will actively converge to its target instance - // distribution. - InstanceRedistributionType string `json:"instanceRedistributionType,omitempty"` - // MaxSurge: The maximum number of instances that can be created above the - // specifiedtargetSize during the update process. This value can be - // either a fixed number or, if the group has 10 or more instances, - // a - // percentage. If you set a percentage, the number of instances is rounded - // if necessary. The default value for maxSurge is a fixed - // value equal to the number of zones in which the managed instance - // group - // operates. - // - // At least one of either maxSurge ormaxUnavailable must be greater than 0. - // Learn more about maxSurge. - MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"` - // MaxUnavailable: The maximum number of instances that can be unavailable - // during the update - // process. An instance is considered available if all of the - // following - // conditions are satisfied: - // - // - // - // - The instance's status is - // RUNNING. - // - If there is a health - // check on the instance group, the instance's health check status - // must be HEALTHY at least once. If there is no health check - // on the group, then the instance only needs to have a status of - // RUNNING to be considered available. - // - // - // This value can be either a fixed number or, if the group has 10 or - // more - // instances, a percentage. If you set a percentage, the number of instances - // is rounded if necessary. The default value formaxUnavailable is a fixed - // value equal to the number of zones - // in which the managed instance group operates. - // - // At least one of either maxSurge ormaxUnavailable must be greater than 0. - // Learn more about maxUnavailable. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - // MinReadySec: Minimum number of seconds to wait for after a newly created - // instance - // becomes available. This value must be from range [0, 3600]. - MinReadySec int64 `json:"minReadySec,omitempty"` - // MinimalAction: Minimal action to be taken on an instance. Use this option to - // minimize - // disruption as much as possible or to apply a more disruptive action than - // is necessary. - // - // - To limit disruption as much as possible, set the minimal action - // toREFRESH. If your update requires a more disruptive action, - // Compute Engine performs the necessary action to execute the update. - // - To apply a more disruptive action than is strictly necessary, set the - // minimal action to RESTART or REPLACE. For - // example, Compute Engine does not need to restart a VM to change its - // metadata. But if your application reads instance metadata only when a VM - // is restarted, you can set the minimal action to RESTART in - // order to pick up metadata changes. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: Most disruptive action that is allowed to be - // taken on an instance. - // You can specify either NONE to forbid any actions,REFRESH to avoid - // restarting the VM and to limit disruption - // as much as possible. RESTART to allow actions that can be - // applied without instance replacing or REPLACE to allow all - // possible actions. If the Updater determines that the minimal update - // action needed is more disruptive than most disruptive allowed action - // you - // specify it will not perform the update at all. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ReplacementMethod: What action should be used to replace instances. - // See minimal_action.REPLACE - // - // Possible values: - // "RECREATE" - Instances will be recreated (with the same name) - // "SUBSTITUTE" - Default option: instances will be deleted and created (with - // a new name) - ReplacementMethod string `json:"replacementMethod,omitempty"` - // Type: The type - // of update process. You can specify either PROACTIVE so - // that the MIG automatically updates VMs to the latest configurations - // orOPPORTUNISTIC so that you can select the VMs that you want - // to update. - // - // Possible values: - // "OPPORTUNISTIC" - MIG will apply new configurations - // to existing VMs only when you selectively target specific or all VMs to - // be updated. - // "PROACTIVE" - MIG will automatically apply new configurations - // to all or a subset of existing VMs and also to new VMs that are added - // to the group. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceRedistributionType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceRedistributionType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerUpdatePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerVersion struct { - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create new instances in - // the managed instance group until the `targetSize` for this version - // is - // reached. The templates for existing instances in the group do not - // change - // unless you run recreateInstances, runapplyUpdatesToInstances, or set the - // group'supdatePolicy.type to PROACTIVE; in those cases, - // existing instances are updated until the `targetSize` for this version - // is - // reached. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Name: Name of the version. Unique among all versions in the scope of - // this - // managed instance group. - Name string `json:"name,omitempty"` - // Tag: Tag describing the version. Used to trigger rollout of a target - // version - // even if instance_template remains unchanged. - // Deprecated in favor of 'name'. - Tag string `json:"tag,omitempty"` - // TargetSize: Specifies the intended number of instances to be created from - // theinstanceTemplate. The final number of instances created - // from the template will be equal to: - // - // - // - If expressed as a fixed number, the minimum of either - // targetSize.fixed or - // instanceGroupManager.targetSize is used. - // - if expressed as a percent, the targetSize - // would be (targetSize.percent/100 * - // InstanceGroupManager.targetSize) If there is a remainder, the - // number is rounded. - // - // If unset, this version will update any remaining instances not - // updated by another version. ReadStarting - // a canary update for more information. - TargetSize *FixedOrPercent `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersAbandonInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersApplyUpdatesRequest: -// InstanceGroupManagers.applyUpdatesToInstances -type InstanceGroupManagersApplyUpdatesRequest struct { - // AllInstances: Flag to update all instances instead of specified list of - // “instances”. - // If the flag is set to true then the instances may not be specified - // in the request. - AllInstances bool `json:"allInstances,omitempty"` - // Instances: The list of URLs of one or more instances for which you want to - // apply - // updates. Each URL can be a full URL or a partial URL, such - // aszones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // MaximalAction: The maximal action that should be performed on the - // instances. - // By default REPLACE. - // This field is deprecated, please use most_disruptive_allowed_action. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MaximalAction string `json:"maximalAction,omitempty"` - // MinimalAction: The minimal action that you want to perform on each instance - // during the - // update: - // - // - // - REPLACE: At minimum, delete the instance and create it - // again. - // - RESTART: Stop the instance and start it - // again. - // - REFRESH: Do not stop the instance and limit - // disruption as much as possible. - // - NONE: Do not - // disrupt the instance at all. - // - // - // By default, the minimum action is NONE. If your update - // requires a more disruptive action than you set with this flag, the - // necessary action is performed to execute the update. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that you want to - // perform on each instance during - // the update: - // - // - // - REPLACE: Delete the instance and create it again. - // - RESTART: Stop the instance and start it again. - // - REFRESH: Do not stop the instance and limit disruption - // as much as possible. - // - NONE: Do not disrupt the - // instance at all. - // - // - // By default, the most disruptive allowed action is REPLACE. If - // your update requires a more disruptive action than you set with this - // flag, - // the update request will fail. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersApplyUpdatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersCreateInstancesRequest: -// InstanceGroupManagers.createInstances -type InstanceGroupManagersCreateInstancesRequest struct { - // Instances: [Required] List of specifications of per-instance configs. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersCreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // InstanceNames: The list of instance names to delete. Queued instances do not - // have URL and - // can be deleted only by name. You cannot specify both URLs and names in - // a - // single request. - InstanceNames []string `json:"instanceNames,omitempty"` - // Instances: The URLs of one or more instances to delete. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - // Queued instances do not have URL and can be deleted only by name. - // One cannot specify both URLs and names in a single request. - Instances []string `json:"instances,omitempty"` - // SkipInstancesOnValidationError: Specifies whether the request should proceed - // despite the inclusion of - // instances that are not members of the group or that are already in - // the - // process of being deleted or abandoned. If this field is set to `false` - // and - // such an instance is specified in the request, the operation fails. - // The - // operation always fails if the request contains a malformed instance URL or - // a reference to an instance that exists in a zone or region other than - // the - // group's zone or region. - SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceNames") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceNames") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersDeleteInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersDeletePerInstanceConfigsReq: -// InstanceGroupManagers.deletePerInstanceConfigs -type InstanceGroupManagersDeletePerInstanceConfigsReq struct { - // Names: The list of instance names for which we want to delete per-instance - // configs - // on this managed instance group. - Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Names") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Names") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersDeletePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersDeletePerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse struct { - // AcceleratorTopologiesInfo: The accelerator topology information returned per - // id of the topology - // location. - AcceleratorTopologiesInfo map[string]InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo `json:"acceleratorTopologiesInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologiesInfo") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologiesInfo") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo struct { - // AcceleratorTopology: Topology in the format of: "16x16", "4x4x4", etc. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // Possible values: - // "DEGRADED" - All VM are in RUNNING state, but there is an issue with - // the inter-chip connectivity that makes this part - // of the infrastructure ready to use as a working - // inter-chip connected group only in a degraded mode. - // This is allowed only for Instances configured with ICI - // resiliency - // "HEALTHY" - All VM are in RUNNING state, there are no issues with - // the - // inter-chip connectivity. - // "UNHEALTHY" - Some VMs may not be in RUNNING state, or there is an - // issue with the inter-chip connectivity that makes this - // part of the infrastructure unsuitable for forming a - // working inter-chip connected group. - AcceleratorTopologyHealth string `json:"acceleratorTopologyHealth,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListErrorsResponse struct { - // Items: [Output Only] The list of errors of the managed instance group. - Items []*InstanceManagedByIgmError `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListErrorsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListManagedInstancesResponse struct { - // ManagedInstances: [Output Only] The list of instances in the managed - // instance group. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListManagedInstancesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListPerInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagersListPerInstanceConfigsRespWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsResp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersListPerInstanceConfigsRespWarning: [Output Only] -// Informational warning message. -type InstanceGroupManagersListPerInstanceConfigsRespWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagersListPerInstanceConfigsRespWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsRespWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListPerInstanceConfigsRespWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsRespWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersPatchPerInstanceConfigsReq: -// InstanceGroupManagers.patchPerInstanceConfigs -type InstanceGroupManagersPatchPerInstanceConfigsReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersPatchPerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersPatchPerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersRecreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group attempts - // to create all - // instances initiated by this resize request only once. If there is an - // error - // during creation, the managed instance group does not retry create - // this - // instance, and we will decrease the targetSize of the request - // instead. If the flag is false, the group attempts to recreate each - // instance - // continuously until it succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. - // After an instance is successfully created while this flag is enabled, - // the - // instance behaves the same way as all the other instances created with - // a - // regular resize request. In particular, if a running instance - // dies - // unexpectedly at a later time and needs to be recreated, this mode does - // not - // affect the recreation behavior in that scenario. - // - // This flag is applicable only to the current resize request. It does - // not - // influence other resize requests in any way. - // - // You can see which instances is being creating in which mode by calling - // the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - // TargetSize: The number of running instances that the managed instance group - // should - // maintain at any given time. The group automatically adds or - // removes - // instances to maintain the number of instances specified by this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NoCreationRetries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersResizeAdvancedRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResumeInstancesRequest struct { - // Instances: The URLs of one or more instances to resume. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersResumeInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedList struct { - // InstanceGroupManagers: [Output Only] The list of managed instance groups - // that are contained in - // the specified project and zone. - InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"` - // Warning: [Output Only] The warning that replaces the list of managed - // instance - // groups when the list is empty. - Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroupManagers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroupManagers") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersScopedListWarning: [Output Only] The warning that -// replaces the list of managed instance -// groups when the list is empty. -type InstanceGroupManagersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetAutoHealingRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create all new instances - // in the managed instance group. The templates for existing instances in - // the - // group do not change unless you run recreateInstances, - // runapplyUpdatesToInstances, or set the group'supdatePolicy.type to - // PROACTIVE. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetInstanceTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The fingerprint of the target pools information. Use this - // optional - // property to prevent conflicts when multiple users change the target - // pools - // settings concurrently. Obtain the fingerprint with - // theinstanceGroupManagers.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another - // concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - // TargetPools: The list of target pool URLs that instances in this managed - // instance group - // belong to. The managed instance group applies these target pools to all - // of the instances in the group. Existing instances and new instances in - // the - // group all receive these target pool settings. - TargetPools []string `json:"targetPools,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetTargetPoolsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersStartInstancesRequest struct { - // Instances: The URLs of one or more instances to start. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersStartInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersStopInstancesRequest struct { - // ForceStop: If this flag is set to true, the Instance Group Manager will - // proceed to - // stop the instances, skipping initialization on them. - ForceStop bool `json:"forceStop,omitempty"` - // Instances: The URLs of one or more instances to stop. This can be a full URL - // or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceStop") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceStop") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersStopInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSuspendInstancesRequest struct { - // ForceSuspend: If this flag is set to true, the Instance Group Manager will - // proceed to - // suspend the instances, skipping initialization on them. - ForceSuspend bool `json:"forceSuspend,omitempty"` - // Instances: The URLs of one or more instances to suspend. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceSuspend") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceSuspend") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSuspendInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersUpdatePerInstanceConfigsReq: -// InstanceGroupManagers.updatePerInstanceConfigs -type InstanceGroupManagersUpdatePerInstanceConfigsReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersUpdatePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersUpdatePerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsAddInstancesRequest struct { - // Instances: The list of instances to add to the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsAddInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupsListInstances for the list of instances - // in the specified instance group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupsListInstancesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstances - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsListInstancesWarning: [Output Only] Informational warning -// message. -type InstanceGroupsListInstancesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupsListInstancesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesRequest struct { - // InstanceState: A filter for the state of the instances in the instance - // group. Valid - // options are ALL or RUNNING. If you do not specify - // this parameter the list includes all instances regardless of their state. - // - // Possible values: - // "ALL" - Includes all instances in the generated list regardless of their - // state. - // "RUNNING" - Includes instances in the generated list only if they have a - // RUNNING - // state. - InstanceState string `json:"instanceState,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsRemoveInstancesRequest struct { - // Instances: The list of instances to remove from the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsRemoveInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedList struct { - // InstanceGroups: [Output Only] The list ofinstance - // groups that are contained in this scope. - InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list - // of - // instance groups when the list is empty. - Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroups") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsScopedListWarning: [Output Only] An informational warning that -// replaces the list of -// instance groups when the list is empty. -type InstanceGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. - // Use this optional property to prevent conflicts when multiple users - // change - // the named ports settings concurrently. Obtain the fingerprint with - // theinstanceGroups.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another concurrent - // request. - // A request with an incorrect fingerprint will fail with error412 - // conditionNotMet. - Fingerprint string `json:"fingerprint,omitempty"` - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsSetNamedPortsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceList: Contains a list of instances. -type InstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Instance resources. - Items []*Instance `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#instanceList - // for lists of Instance resources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListWarning: [Output Only] Informational warning message. -type InstanceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrers: Contains a list of instance referrers. -type InstanceListReferrers struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Reference resources. - Items []*Reference `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#instanceListReferrers - // for lists of Instance referrers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceListReferrersWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrers) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrersWarning: [Output Only] Informational warning message. -type InstanceListReferrersWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceListReferrersWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrersWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrersWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceListReferrersWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrersWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrersWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmError struct { - // Error: [Output Only] Contents of the error. - Error *InstanceManagedByIgmErrorManagedInstanceError `json:"error,omitempty"` - // InstanceActionDetails: [Output Only] Details of the instance action that - // triggered this error. - // May be null, if the error was not caused by an action on an instance. - // This field is optional. - InstanceActionDetails *InstanceManagedByIgmErrorInstanceActionDetails `json:"instanceActionDetails,omitempty"` - // Timestamp: [Output Only] The time that this error occurred. - // This value is in RFC3339 text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmErrorInstanceActionDetails struct { - // Action: [Output Only] Action that managed instance group was executing - // on - // the instance when the error occurred. Possible values: - // - // Possible values: - // "ABANDONING" - The managed instance group is abandoning this instance. The - // instance - // will be removed from the instance group and from any target pools that - // are associated with this group. - // "CREATING" - The managed instance group is creating this instance. If the - // group - // fails to create this instance, it will try again until it is - // successful. - // "CREATING_ATOMICALLY" - The managed instance group is creating this - // instance atomically. - // "CREATING_WITHOUT_RETRIES" - The managed instance group is attempting to - // create this instance - // only once. If the group fails to create this instance, it does - // not try again and the group's targetSize value is - // decreased. - // "DELETING" - The managed instance group is permanently deleting this - // instance. - // "NONE" - The managed instance group has not scheduled any actions for - // this - // instance. - // "QUEUING" - The managed instance group is queuing this instance. - // "RECREATING" - The managed instance group is recreating this instance. - // "REFRESHING" - The managed instance group is applying configuration - // changes to the - // instance without stopping it. For example, the group can update the - // target pool list for an instance without stopping that instance. - // "RESTARTING" - The managed instance group is restarting this instance. - // "RESUMING" - The managed instance group is resuming this instance. - // "STARTING" - The managed instance group is starting this instance. - // "STOPPING" - The managed instance group is stopping this instance. - // "SUSPENDING" - The managed instance group is suspending this instance. - // "VERIFYING" - The managed instance group is verifying this already created - // instance. - // Verification happens every time the instance is (re)created or restarted - // and consists of: - // 1. Waiting until health check specified as part of this managed instance - // group's autohealing policy reports HEALTHY. - // Note: Applies only if autohealing policy has a health check specified - // 2. Waiting for addition verification steps performed as post-instance - // creation (subject to future extensions). - Action string `json:"action,omitempty"` - // Instance: [Output Only] The URL of the instance. - // The URL can be set even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - // Version: [Output Only] Version this instance was created from, or was - // being - // created from, but the creation failed. Corresponds to one of the - // versions - // that were set on the Instance Group Manager resource at the time - // this - // instance was being created. - Version *ManagedInstanceVersion `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmErrorInstanceActionDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmErrorInstanceActionDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmErrorManagedInstanceError struct { - // Code: [Output Only] Error code. - Code string `json:"code,omitempty"` - // Message: [Output Only] Error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmErrorManagedInstanceError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmErrorManagedInstanceError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the instance. This - // can be a full or - // partial URL. For example, the following are all valid URLs to a zone: - // - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - // TargetInstance: The URL of the target instance to move. This can be a full - // or partial URL. - // For example, the following are all valid URLs to an instance: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - TargetInstance string `json:"targetInstance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestinationZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceParams: Additional instance params. -type InstanceParams struct { - // RequestValidForDuration: Relative deadline for waiting for capacity. - // Relevant only for - // Instances.Insert API. - RequestValidForDuration *Duration `json:"requestValidForDuration,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the instance. Tag - // keys and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestValidForDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestValidForDuration") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceParams) MarshalJSON() ([]byte, error) { - type NoMethod InstanceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceProperties struct { - // AdvancedMachineFeatures: Controls for advanced machine-related behavior - // features. - // Note that for MachineImage, this is not supported yet. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // CanIpForward: Enables instances created based on these properties to send - // packets with - // source IP addresses other than their own and receive packets - // with - // destination IP addresses other than their own. If these instances will - // be - // used as an IP gateway or it will be set as the next-hop in a Route - // resource, specify true. If unsure, leave this set tofalse. See theEnable IP - // forwarding - // documentation for more information. - CanIpForward bool `json:"canIpForward,omitempty"` - // ConfidentialInstanceConfig: Specifies the Confidential Instance - // options. - // Note that for MachineImage, this is not supported yet. - ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // Description: An optional text description for the instances that are created - // from these - // properties. - Description string `json:"description,omitempty"` - // Disks: An array of disks that are associated with the instances that are - // created - // from these properties. - Disks []*AttachedDisk `json:"disks,omitempty"` - // DisplayDevice: Display Device properties to enable support - // for remote display products like: Teradici, - // VNC and TeamViewer - // Note that for MachineImage, this is not supported yet. - DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - // GuestAccelerators: A list of guest accelerator cards' type and count to use - // for instances - // created from these properties. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - Identity string `json:"identity,omitempty"` - IdentityCertificate bool `json:"identityCertificate,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Labels: Labels to apply to instances that are created from these properties. - Labels map[string]string `json:"labels,omitempty"` - // MachineType: The machine type to use for instances that are created from - // these - // properties. - // This field only accepts a machine type name, for example `n2-standard-4`. - // If you use the machine type full or partial URL, for - // example - // `projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4`, - // the request will result in an `INTERNAL_ERROR`. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs to assign to instances that are - // created from - // these properties. These pairs can consist of custom metadata or - // predefined - // keys. SeeProject and - // instance metadata for more information. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by instances. The instance - // may be - // scheduled on the specified or newer cpu/platform. Applicable values are - // the - // friendly names of CPU platforms, such asminCpuPlatform: "Intel Haswell" - // orminCpuPlatform: "Intel Sandy Bridge". For more - // information, read Specifying a - // Minimum CPU Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // NetworkPerformanceConfig: Note that for MachineImage, this is not supported - // yet. - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance properties. A map - // from a - // subdomain (namespace) to entries map. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for VMs. - // If not specified, use INHERIT_FROM_SUBNETWORK as default. - // Note that for MachineImage, this is not supported yet. - // - // Possible values: - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits - // PrivateIpv6GoogleAccess from its - // subnetwork. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // ReservationAffinity: Specifies the reservations that instances can consume - // from. - // Note that for MachineImage, this is not supported yet. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the instance. Tag - // keys and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ResourcePolicies: Resource policies (names, not URLs) applied to instances - // created from - // these properties. - // Note that for MachineImage, this is not supported yet. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // Scheduling: Specifies the scheduling options for the instances that are - // created from - // these properties. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // SecureTags: [Input Only] Secure tags to apply to this instance. - // Maximum number of secure tags allowed is 50. - // Note that for MachineImage, this is not supported yet. - SecureTags []string `json:"secureTags,omitempty"` - // ServiceAccounts: A list of service accounts with specified scopes. Access - // tokens for these - // service accounts are available to the instances that are created from - // these properties. Use metadata queries to obtain the access tokens for - // these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // ServiceIntegrationSpecs: Mapping of user defined keys to - // ServiceIntegrationSpec. - ServiceIntegrationSpecs map[string]ServiceIntegrationSpec `json:"serviceIntegrationSpecs,omitempty"` - // ShieldedInstanceConfig: Note that for MachineImage, this is not supported - // yet. - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - // ShieldedVmConfig: Specifies the Shielded VM options for the instances that - // are created from - // these properties. - ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` - // Tags: A list of tags to apply to the instances that are created from - // these - // properties. The tags identify valid sources or targets for - // network - // firewalls. The setTags method can modify this list of tags. Each tag - // within - // the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod InstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancePropertiesPatch: Represents the change that you want to make to the -// instance properties. -type InstancePropertiesPatch struct { - // Labels: The label key-value pairs that you want to patch onto the instance. - Labels map[string]string `json:"labels,omitempty"` - // Metadata: The metadata key-value pairs that you want to patch onto the - // instance. For - // more information, see Project and - // instance metadata. - Metadata map[string]string `json:"metadata,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancePropertiesPatch) MarshalJSON() ([]byte, error) { - type NoMethod InstancePropertiesPatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceReference struct { - // Instance: The URL for a specific instance. - // @required compute.instancegroups.addInstances/removeInstances - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceReference) MarshalJSON() ([]byte, error) { - type NoMethod InstanceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceSettings: Represents a Instance Settings resource. You can use -// instance settings to -// configure default settings for Compute Engine VM instances. For example, -// you -// can use it to configure default machine type of Compute Engine VM instances. -type InstanceSettings struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // Fingerprint: Specifies a fingerprint for instance settings, which is - // essentially a hash - // of the instance settings resource's contents and used for - // optimistic - // locking. The fingerprint is initially generated by Compute Engine - // and - // changes after every request to modify or update the instance - // settings - // resource. You must always provide an up-to-date fingerprint hash in order - // to update or change the resource, otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve the resource. - Fingerprint string `json:"fingerprint,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#instance_settings - // for instance settings. - Kind string `json:"kind,omitempty"` - // Metadata: The metadata key/value pairs assigned to all the instances in - // the - // corresponding scope. - Metadata *InstanceSettingsMetadata `json:"metadata,omitempty"` - // Zone: [Output Only] URL of the zone where the resource resides - // You must specify this field as part of the HTTP request URL. It is - // not - // settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceSettings) MarshalJSON() ([]byte, error) { - type NoMethod InstanceSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceSettingsMetadata struct { - // Items: A metadata key/value items map. - // The total size of all keys and values must be less than 512KB. - Items map[string]string `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#metadata - // for metadata. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceSettingsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InstanceSettingsMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplate: Represents an Instance Template resource. -// -// Google Compute Engine has two Instance Template resources: -// -// * Global (/compute/docs/reference/rest/alpha/instanceTemplates) -// * Regional (/compute/docs/reference/rest/alpha/regionInstanceTemplates) -// -// You can reuse a global instance template in -// different regions whereas you can use a regional instance template in -// a -// specified region only. If you want to reduce cross-region dependency -// or -// achieve data residency, use a regional instance template. -// -// To create VMs, managed instance groups, and reservations, you can use -// either -// global or regional instance templates. -// -// For more information, readInstance Templates. -type InstanceTemplate struct { - // CreationTimestamp: [Output Only] The creation timestamp for this instance - // template inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] A unique identifier for this instance template. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceTemplate for instance templates. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Properties: The instance properties for this instance template. - Properties *InstanceProperties `json:"properties,omitempty"` - // Region: [Output Only] URL of the region where the instance template resides. - // Only - // applicable for regional resources. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] The URL for this instance template. The server - // defines this - // URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceInstance: The source instance used to create the template. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - // SourceInstanceParams: The source instance params to use to create this - // instance template. - SourceInstanceParams *SourceInstanceParams `json:"sourceInstanceParams,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplate) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateAggregatedList: Contains a list of -// InstanceTemplatesScopedList. -type InstanceTemplateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceTemplatesScopedList resources. - Items map[string]InstanceTemplatesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceTemplateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateAggregatedListWarning: [Output Only] Informational warning -// message. -type InstanceTemplateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateList: A list of instance templates. -type InstanceTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceTemplate resources. - Items []*InstanceTemplate `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceTemplatesListResponse for instance template - // lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceTemplateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateListWarning: [Output Only] Informational warning message. -type InstanceTemplateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplatesScopedList struct { - // InstanceTemplates: [Output Only] A list of instance templates that are - // contained within - // the specified project and zone. - InstanceTemplates []*InstanceTemplate `json:"instanceTemplates,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list of - // instance - // templates when the list is empty. - Warning *InstanceTemplatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplatesScopedListWarning: [Output Only] An informational warning -// that replaces the list of instance -// templates when the list is empty. -type InstanceTemplatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceWithNamedPorts struct { - // Instance: [Output Only] The URL of the instance. - Instance string `json:"instance,omitempty"` - // NamedPorts: [Output Only] The named ports that belong to this instance - // group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Status: [Output Only] The status of the instance. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceWithNamedPorts) MarshalJSON() ([]byte, error) { - type NoMethod InstanceWithNamedPorts - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesAddResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be added to this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesBulkInsertOperationMetadata struct { - // PerLocationStatus: Status information per location (location name is - // key). - // Example key: zones/us-central1-a - PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerLocationStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerLocationStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InstancesBulkInsertOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output Only] Effective firewalls from firewall policies. - FirewallPolicys []*InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the instance. - Firewalls []*Firewall `json:"firewalls,omitempty"` - // OrganizationFirewalls: Effective firewalls from organization policies. - OrganizationFirewalls []*InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to - // the instance. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output Only] The rules that apply to the instance. Only rules - // that - // target the specific VM instance are returned if target service accounts - // or target secure tags are specified in the rules. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy. - ShortName string `json:"shortName,omitempty"` - // Type: [Output Only] The type of the firewall policy. Can be one of - // HIERARCHY, - // NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "NETWORK_REGIONAL" - // "SYSTEM_GLOBAL" - // "SYSTEM_REGIONAL" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A pruned -// SecurityPolicy containing ID and any applicable firewall rules. -type InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { - // Id: The unique identifier for the security policy. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Rules: The rules that apply to the network. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesReportHostAsFaultyRequest struct { - // ActionHint: The action hint to report the host as faulty. - // - // Possible values: - // "ACTION_HINT_UNSPECIFIED" - Default value. Euivalent to - // DIAGNOSE_AND_REPAIR. - // "DIAGNOSE_AND_REPAIR" - The action hint to diagnose and repair the host. - // "EXECUTE_ALL_RECOMMENDED_SCANS" - The action hint to execute recommended - // scans without sending the machine - // through hwops. - ActionHint string `json:"actionHint,omitempty"` - // DisruptionSchedule: The disruption schedule for the VM. Required field, only - // allows IMMEDIATE. - // - // Possible values: - // "DISRUPTION_SCHEDULE_UNSPECIFIED" - Not used. Required as per aip/126. - // "FUTURE" - Delay disruption for caller control. Will be default soon. - // "IMMEDIATE" - Default value. Disrupt the VM immediately. - DisruptionSchedule string `json:"disruptionSchedule,omitempty"` - FaultReasons []*InstancesReportHostAsFaultyRequestFaultReason `json:"faultReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionHint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionHint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesReportHostAsFaultyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesReportHostAsFaultyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesReportHostAsFaultyRequestFaultReason struct { - // Possible values: - // "BEHAVIOR_UNSPECIFIED" - Public reportable behaviors - // "PERFORMANCE" - // "SILENT_DATA_CORRUPTION" - // "UNRECOVERABLE_GPU_ERROR" - Behavior string `json:"behavior,omitempty"` - Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "Behavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Behavior") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesReportHostAsFaultyRequestFaultReason) MarshalJSON() ([]byte, error) { - type NoMethod InstancesReportHostAsFaultyRequestFaultReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesResumeRequest struct { - // Disks: Array of disks associated with this instance that are protected with - // acustomer-supplied - // encryption key. - // - // In order to resume the instance, the disk url and its corresponding key - // must be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it - // should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - // InstanceEncryptionKey: Decrypts data associated with an instance that is - // protected with acustomer-supplied - // encryption key. - // - // If the instance you are starting is protected with a - // customer-supplied - // encryption key, the correct key must be provided otherwise the - // instance resume will not succeed. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesResumeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesResumeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesScopedList struct { - // Instances: [Output Only] A list of instances contained in this scope. - Instances []*Instance `json:"instances,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // instances - // when the list is empty. - Warning *InstancesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesScopedListWarning: [Output Only] Informational warning which -// replaces the list of instances -// when the list is empty. -type InstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstancesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetLabelsRequest struct { - // LabelFingerprint: Fingerprint of the previous set of labels for this - // resource, - // used to prevent conflicts. Provide the latest fingerprint value when - // making - // a request to add or change labels. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineResourcesRequest struct { - // GuestAccelerators: A list of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAccelerators") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMachineResourcesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineTypeRequest struct { - // MachineType: Full or partial URL of the machine type resource. See Machine - // Types for a full list of - // machine types. For example:zones/us-central1-f/machineTypes/n1-standard-1 - MachineType string `json:"machineType,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMachineTypeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMinCpuPlatformRequest struct { - // MinCpuPlatform: Minimum cpu/platform this instance should be started at. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinCpuPlatform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinCpuPlatform") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMinCpuPlatformRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetNameRequest struct { - // CurrentName: The current name of this resource, used to prevent conflicts. - // Provide the - // latest name when making a request to change name. - CurrentName string `json:"currentName,omitempty"` - // Name: The name to be applied to the instance. Needs to be RFC 1035 - // compliant. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetNameRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetNameRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetSecurityPolicyRequest struct { - // NetworkInterfaces: The network interfaces that the security policy will be - // applied to. Network - // interfaces use the nicN naming format. You can only set a - // security policy for network interfaces with an access config. - NetworkInterfaces []string `json:"networkInterfaces,omitempty"` - // SecurityPolicy: A full or partial URL to a security policy to add to this - // instance. - // If this field is set to an empty string it will remove the - // associated - // security policy. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkInterfaces") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkInterfaces") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetSecurityPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetSecurityPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // Scopes: The list of scopes to be made available for this service account. - Scopes []string `json:"scopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetServiceAccountRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesStartWithEncryptionKeyRequest struct { - // Disks: Array of disks associated with this instance that are protected with - // acustomer-supplied - // encryption key. - // - // In order to start the instance, the disk url and its corresponding key - // must - // be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it - // should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - // InstanceEncryptionKey: Decrypts data associated with an instance that is - // protected with acustomer-supplied - // encryption key. - // - // If the instance you are starting is protected with a - // customer-supplied - // encryption key, the correct key must be provided otherwise the - // instance start will not succeed. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesStartWithEncryptionKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshot: Represents a InstantSnapshot resource. -// -// You can use instant snapshots to create disk rollback points quickly.. -type InstantSnapshot struct { - // Architecture: [Output Only] The architecture of the instant snapshot. Valid - // values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // GuestFlush: Whether to attempt an application consistent instant snapshot - // by - // informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#instantSnapshot for - // InstantSnapshot resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // InstantSnapshot, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a InstantSnapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this InstantSnapshot. These can be later modified - // by - // the setLabels method. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the instant snapshot - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // ResourceStatus: [Output Only] Status information for the instant snapshot - // resource. - ResourceStatus *InstantSnapshotResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceDisk: URL of the source disk used to create this instant - // snapshot. - // Note that the source disk must be in the same zone/region as the - // instant snapshot to be created. This can be a full or valid partial URL. - // For example, the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskId: [Output Only] The ID value of the disk used to create this - // InstantSnapshot. - // This value may be used to determine whether the InstantSnapshot - // was taken from the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceInstantSnapshotGroup: [Output Only] URL of the source instant snapshot - // this instant snapshot is - // part of. Note that the source instant snapshot group must be in the - // same - // zone/region as the instant snapshot to be created. This can be a full - // or - // valid partial URL. - SourceInstantSnapshotGroup string `json:"sourceInstantSnapshotGroup,omitempty"` - // SourceInstantSnapshotGroupId: [Output Only] The ID value of the source - // instant snapshot group this - // InstantSnapshot is part of. This value may be used to determine whether - // the - // InstantSnapshot was created as part of an InstantSnapshotGroup creation. - SourceInstantSnapshotGroupId string `json:"sourceInstantSnapshotGroupId,omitempty"` - // Status: [Output Only] The status of the instantSnapshot. This can - // beCREATING, DELETING, FAILED, orREADY. - // - // Possible values: - // "CREATING" - InstantSnapshot creation is in progress. - // "DELETING" - InstantSnapshot is currently being deleted. - // "FAILED" - InstantSnapshot creation failed. - // "READY" - InstantSnapshot has been created successfully. - // "UNAVAILABLE" - InstantSnapshot is currently unavailable and cannot be - // used for - // Disk restoration - Status string `json:"status,omitempty"` - // Zone: [Output Only] URL of the zone where the instant snapshot resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshot) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstantSnapshotsScopedList resources. - Items map[string]InstantSnapshotsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#instantSnapshotAggregatedList for aggregated lists - // of - // instantSnapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstantSnapshotAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotAggregatedListWarning: [Output Only] Informational warning -// message. -type InstantSnapshotAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotGroup: Represents an InstantSnapshotGroup resource. -// -// An instant snapshot group is a set of instant snapshots that represents -// a -// point in time state of a consistency group. -type InstantSnapshotGroup struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: Optional. An optional description of this resource. Provide - // this property when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#instantSnapshotGroup - // for InstantSnapshotGroup - // resources. - Kind string `json:"kind,omitempty"` - // Name: Identifier. Name of the resource; provided by the client when the - // resource is created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the instant snapshot group - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - ResourceStatus *InstantSnapshotGroupResourceStatus `json:"resourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - SourceConsistencyGroup string `json:"sourceConsistencyGroup,omitempty"` - // Status: [Output Only] - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "INVALID" - // "READY" - // "UNKNOWN" - Status string `json:"status,omitempty"` - // Zone: [Output Only] URL of the zone where the instant snapshot group - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotGroup) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotGroupParameters struct { - // SourceInstantSnapshotGroup: The source instant snapshot group used to create - // disks. You can provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshotGroups/instantSnapshotGroup - // - - // projects/project/zones/zone/instantSnapshotGroups/instantSnapshotGroup - // - zones/zone/instantSnapshotGroups/instantSnapshotGroup - SourceInstantSnapshotGroup string `json:"sourceInstantSnapshotGroup,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceInstantSnapshotGroup") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceInstantSnapshotGroup") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotGroupParameters) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotGroupParameters - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotGroupResourceStatus struct { - // ConsistencyMembershipResolutionTime: [Output Only] - ConsistencyMembershipResolutionTime string `json:"consistencyMembershipResolutionTime,omitempty"` - // SourceInfo: [Output Only] - SourceInfo *InstantSnapshotGroupSourceInfo `json:"sourceInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ConsistencyMembershipResolutionTime") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ConsistencyMembershipResolutionTime") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotGroupResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotGroupResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotGroupSourceInfo struct { - ConsistencyGroup string `json:"consistencyGroup,omitempty"` - ConsistencyGroupId string `json:"consistencyGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsistencyGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsistencyGroup") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotGroupSourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotGroupSourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotList: Contains a list of InstantSnapshot resources. -type InstantSnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstantSnapshot resources. - Items []*InstantSnapshot `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstantSnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotListWarning: [Output Only] Informational warning message. -type InstantSnapshotListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotResourceStatus struct { - // StorageSizeBytes: [Output Only] The storage size of this instant snapshot. - StorageSizeBytes int64 `json:"storageSizeBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "StorageSizeBytes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StorageSizeBytes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotsScopedList struct { - // InstantSnapshots: [Output Only] A list of instantSnapshots contained in this - // scope. - InstantSnapshots []*InstantSnapshot `json:"instantSnapshots,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of - // instantSnapshots when the list is empty. - Warning *InstantSnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstantSnapshots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstantSnapshots") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotsScopedListWarning: [Output Only] Informational warning which -// replaces the list of -// instantSnapshots when the list is empty. -type InstantSnapshotsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Int64RangeMatch: HttpRouteRuleMatch criteria for field values that must -// stay -// within the specified integer range. -type Int64RangeMatch struct { - // RangeEnd: The end of the range (exclusive) in signed long integer format. - RangeEnd int64 `json:"rangeEnd,omitempty,string"` - // RangeStart: The start of the range (inclusive) in signed long integer - // format. - RangeStart int64 `json:"rangeStart,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RangeEnd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Int64RangeMatch) MarshalJSON() ([]byte, error) { - type NoMethod Int64RangeMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Interconnect: Represents an Interconnect resource. -// -// An Interconnect resource is a dedicated connection between the Google -// Cloud network and your on-premises network. For more information, read -// the -// Dedicated Interconnect Overview. -type Interconnect struct { - // AaiEnabled: Enable or disable the application awareness feature on this - // Cloud - // Interconnect. - AaiEnabled bool `json:"aaiEnabled,omitempty"` - // AdminEnabled: Administrative status of the interconnect. When this is set to - // true, the - // Interconnect is functional and can carry traffic. - // When set to false, no packets can be carried over the interconnect and - // no BGP routes are exchanged over it. By default, the status is set to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // ApplicationAwareInterconnect: Configuration information for application - // awareness on this Cloud - // Interconnect. - ApplicationAwareInterconnect *InterconnectApplicationAwareInterconnect `json:"applicationAwareInterconnect,omitempty"` - // AvailableFeatures: [Output only] List of features available for this - // Interconnect connection, - // which can take one of the following values: - // - // - IF_MACSEC: If present, then the Interconnect connection is - // provisioned on MACsec capable hardware ports. If not present, then the - // Interconnect connection is provisioned on non-MACsec capable ports. Any - // attempt to enable MACsec will fail. - // - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is - // provisioned exclusively for Cross-Site Networking. Any attempt to - // configure - // VLAN attachments will fail. If not present, then the Interconnect - // connection is not provisioned for Cross-Site Networking. Any attempt to - // use - // it for Cross-Site Networking will fail. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - AvailableFeatures []string `json:"availableFeatures,omitempty"` - // CircuitInfos: [Output Only] A list of CircuitInfo objects, that describe the - // individual - // circuits in this LAG. - CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomerName: Customer name, to put in the Letter of Authorization as the - // party - // authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExpectedOutages: [Output Only] A list of outages expected for this - // Interconnect. - ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` - // GoogleIpAddress: [Output Only] IP address configured on the Google side of - // the Interconnect - // link. This can be used only for ping tests. - GoogleIpAddress string `json:"googleIpAddress,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID to be used when raising - // support tickets - // with Google or otherwise to debug backend connectivity issues. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InterconnectAttachments: [Output Only] A list of the URLs of all - // InterconnectAttachments configured - // to use this Interconnect. - InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` - // InterconnectGroups: [Output Only] URLs of InterconnectGroups that include - // this Interconnect. - // Order is arbitrary and items are unique. - InterconnectGroups []string `json:"interconnectGroups,omitempty"` - // InterconnectType: Type of interconnect, which can take one of the following - // values: - // - // - PARTNER: A partner-managed interconnection shared between customers - // though a partner. - // - DEDICATED: A dedicated physical interconnection with the - // customer. - // - // - // Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. - // - // Possible values: - // "DEDICATED" - A dedicated physical interconnection with the customer. - // "IT_PRIVATE" - [Deprecated] A private, physical interconnection with the - // customer. - // "PARTNER" - A partner-managed interconnection shared between customers via - // partner. - InterconnectType string `json:"interconnectType,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#interconnect for - // interconnects. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // Interconnect, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an Interconnect. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LinkType: Type of link requested, which can take one of the following - // values: - // - // - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - // - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - // - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. - // - // - // Note that this field indicates the speed of each of - // the links in the bundle, not the speed of the entire bundle. - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - LinkType string `json:"linkType,omitempty"` - // Location: URL of the InterconnectLocation object that represents where - // this - // connection is to be provisioned. - Location string `json:"location,omitempty"` - // Macsec: Configuration that enables Media Access Control security (MACsec) on - // the - // Cloud Interconnect connection between Google and your on-premises router. - Macsec *InterconnectMacsec `json:"macsec,omitempty"` - // MacsecEnabled: Enable or disable MACsec on this Interconnect connection. - // MACsec enablement - // fails if the MACsec object is not specified. - MacsecEnabled bool `json:"macsecEnabled,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NocContactEmail: Email address to contact the customer NOC for operations - // and maintenance - // notifications regarding this Interconnect. If specified, this will be - // used - // for notifications in addition to all other forms described, such as - // Cloud Monitoring logs alerting and Cloud Notifications. This field - // is - // required for users who sign up for Cloud Interconnect using - // workforce identity federation. - NocContactEmail string `json:"nocContactEmail,omitempty"` - // OperationalStatus: [Output Only] The current status of this Interconnect's - // functionality, - // which can take one of the following values: - // - // - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to - // use. Attachments may be provisioned on this Interconnect. - // - // - OS_UNPROVISIONED: An Interconnect that has not completed turnup. - // No - // attachments may be provisioned on this Interconnect. - // - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing - // internal - // maintenance. No attachments may be provisioned or updated on - // this - // Interconnect. - // - // Possible values: - // "OS_ACTIVE" - The interconnect is valid, turned up, and ready to use. - // Attachments may - // be provisioned on this interconnect. - // "OS_UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be - // provisioned on this interconnect. - OperationalStatus string `json:"operationalStatus,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InterconnectParams `json:"params,omitempty"` - // PeerIpAddress: [Output Only] IP address configured on the customer side of - // the - // Interconnect link. The customer should configure this IP address - // during - // turnup when prompted by Google NOC. This can be used only for ping tests. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // ProvisionedLinkCount: [Output Only] Number of links actually provisioned in - // this interconnect. - ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` - // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. This - // field specifies the - // location outside of Google's network that the interconnect is connected to. - RemoteLocation string `json:"remoteLocation,omitempty"` - // RequestedFeatures: Optional. This parameter can be provided only with - // Interconnect INSERT. It - // isn't valid for Interconnect PATCH. List of features requested for - // this - // Interconnect connection, which can take one of the following values: - // - // - IF_MACSEC: If specified, then the connection is created on MACsec - // capable hardware ports. If not specified, non-MACsec capable ports will - // also be considered. - // - IF_CROSS_SITE_NETWORK: If specified, then the connection is created - // exclusively for Cross-Site Networking. The connection can not be used - // for - // Cross-Site Networking unless this feature is specified. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - RequestedFeatures []string `json:"requestedFeatures,omitempty"` - // RequestedLinkCount: Target number of physical links in the link bundle, as - // requested by the - // customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output Only] The current state of Interconnect functionality, which - // can - // take one of the following values: - // - // - ACTIVE: The Interconnect is valid, turned up and ready to use. - // Attachments may be provisioned on this Interconnect. - // - UNPROVISIONED: The Interconnect has not completed turnup. No - // attachments may be provisioned on this Interconnect. - // - UNDER_MAINTENANCE: The Interconnect is undergoing internal - // maintenance. - // No attachments may be provisioned or updated on this - // Interconnect. - // - // Possible values: - // "ACTIVE" - The interconnect is valid, turned up, and ready to use. - // Attachments may - // be provisioned on this interconnect. - // "UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be - // provisioned on this interconnect. - State string `json:"state,omitempty"` - // Subzone: Specific subzone in the InterconnectLocation that represents - // where - // this connection is to be provisioned. - // - // Possible values: - // "SUBZONE_A" - Subzone A. - // "SUBZONE_B" - Subzone B. - Subzone string `json:"subzone,omitempty"` - // WireGroups: [Output Only] A list of the URLs of all CrossSiteNetwork - // WireGroups - // configured to use this Interconnect. The Interconnect cannot be deleted - // if - // this list is non-empty. - WireGroups []string `json:"wireGroups,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AaiEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AaiEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Interconnect) MarshalJSON() ([]byte, error) { - type NoMethod Interconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnect: Configuration information for -// application awareness on this Cloud -// Interconnect. -type InterconnectApplicationAwareInterconnect struct { - BandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"bandwidthPercentagePolicy,omitempty"` - // ProfileDescription: Description for the application awareness profile on - // this Cloud - // Interconnect. - ProfileDescription string `json:"profileDescription,omitempty"` - // ShapeAveragePercentages: Optional field to specify a list of shape average - // percentages to be - // applied in conjunction with StrictPriorityPolicy - // or - // BandwidthPercentagePolicy. - ShapeAveragePercentages []*InterconnectApplicationAwareInterconnectBandwidthPercentage `json:"shapeAveragePercentages,omitempty"` - StrictPriorityPolicy *InterconnectApplicationAwareInterconnectStrictPriorityPolicy `json:"strictPriorityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthPercentagePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthPercentagePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnectBandwidthPercentage: Specify -// bandwidth percentages [1-100] for various traffic classes -// in -// BandwidthPercentagePolicy. The sum of all percentages must equal 100. -// All traffic classes must have a percentage value specified. -type InterconnectApplicationAwareInterconnectBandwidthPercentage struct { - // Percentage: Bandwidth percentage for a specific traffic class. - Percentage int64 `json:"percentage,omitempty"` - // TrafficClass: TrafficClass whose bandwidth percentage is being specified. - // - // Possible values: - // "TC1" - Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. - // "TC2" - Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx. - // "TC3" - Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx. - // "TC4" - Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx. - // "TC5" - Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx. - // "TC6" - Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx. - TrafficClass string `json:"trafficClass,omitempty"` - // ForceSendFields is a list of field names (e.g. "Percentage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Percentage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnectBandwidthPercentage) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy struct { - // BandwidthPercentages: Specify bandwidth percentages for various traffic - // classes for queuing - // type Bandwidth Percent. - BandwidthPercentages []*InterconnectApplicationAwareInterconnectBandwidthPercentage `json:"bandwidthPercentages,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthPercentages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthPercentages") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnectStrictPriorityPolicy: Specify -// configuration for StrictPriorityPolicy. -type InterconnectApplicationAwareInterconnectStrictPriorityPolicy struct { -} - -// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) -// resource. -// -// You can use Interconnect attachments (VLANS) to connect your Virtual -// Private -// Cloud networks to your on-premises networks through an Interconnect. -// For more information, read -// Creating VLAN Attachments. -type InterconnectAttachment struct { - // AdminEnabled: Determines whether this Attachment will carry packets. - // Not present for PARTNER_PROVIDER. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // AttachmentGroup: [Output Only] URL of the AttachmentGroup that includes this - // Attachment. - AttachmentGroup string `json:"attachmentGroup,omitempty"` - // Bandwidth: Provisioned bandwidth capacity for the interconnect attachment. - // For - // attachments of type DEDICATED, the user can set the bandwidth. - // For attachments of type PARTNER, the Google Partner that is operating - // the interconnect must set the bandwidth. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER and - // DEDICATED, - // and can take one of the following values: - // - // - BPS_50M: 50 Mbit/s - // - BPS_100M: 100 Mbit/s - // - BPS_200M: 200 Mbit/s - // - BPS_300M: 300 Mbit/s - // - BPS_400M: 400 Mbit/s - // - BPS_500M: 500 Mbit/s - // - BPS_1G: 1 Gbit/s - // - BPS_2G: 2 Gbit/s - // - BPS_5G: 5 Gbit/s - // - BPS_10G: 10 Gbit/s - // - BPS_20G: 20 Gbit/s - // - BPS_50G: 50 Gbit/s - // - BPS_100G: 100 Gbit/s - // - // Possible values: - // "BPS_100G" - 100 Gbit/s - // "BPS_100M" - 100 Mbit/s - // "BPS_10G" - 10 Gbit/s - // "BPS_1G" - 1 Gbit/s - // "BPS_200M" - 200 Mbit/s - // "BPS_20G" - 20 Gbit/s - // "BPS_2G" - 2 Gbit/s - // "BPS_300M" - 300 Mbit/s - // "BPS_400G" - 400 Gbit/s - // "BPS_400M" - 400 Mbit/s - // "BPS_500M" - 500 Mbit/s - // "BPS_50G" - 50 Gbit/s - // "BPS_50M" - 50 Mbit/s - // "BPS_5G" - 5 Gbit/s - Bandwidth string `json:"bandwidth,omitempty"` - // CandidateCloudRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address fields must be set or both must be - // unset. - // - Prefix length of both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address must be the same. - // - Max prefix length is 31. - CandidateCloudRouterIpAddress string `json:"candidateCloudRouterIpAddress,omitempty"` - // CandidateCloudRouterIpv6Address: Single IPv6 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address fields must be set or both must - // be - // unset. - // - Prefix length of both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address must be the same. - // - Max prefix length is 126. - CandidateCloudRouterIpv6Address string `json:"candidateCloudRouterIpv6Address,omitempty"` - // CandidateCustomerRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the customer router - // interface for this interconnect attachment. - CandidateCustomerRouterIpAddress string `json:"candidateCustomerRouterIpAddress,omitempty"` - // CandidateCustomerRouterIpv6Address: Single IPv6 address + prefix length to - // be configured on the customer router - // interface for this interconnect attachment. - CandidateCustomerRouterIpv6Address string `json:"candidateCustomerRouterIpv6Address,omitempty"` - // CandidateIpv6Subnets: This field is not available. - CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` - // CandidateSubnets: Input only. Up to 16 candidate prefixes that can be used - // to restrict the allocation - // of cloudRouterIpAddress and customerRouterIpAddress for this attachment. - // All prefixes must be within link-local address space (169.254.0.0/16) - // and - // must be /29 or shorter (/28, /27, etc). Google will attempt to select - // an - // unused /29 from the supplied candidate prefix(es). The request will fail - // if - // all possible /29s are in use on Google's edge. If not supplied, Google - // will - // randomly select an unused /29 from all of link-local space. - CandidateSubnets []string `json:"candidateSubnets,omitempty"` - // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to be - // configured on Cloud Router - // Interface for this interconnect attachment. - CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` - // CloudRouterIpv6Address: [Output Only] IPv6 address + prefix length to be - // configured on Cloud - // Router Interface for this interconnect attachment. - CloudRouterIpv6Address string `json:"cloudRouterIpv6Address,omitempty"` - // CloudRouterIpv6InterfaceId: This field is not available. - CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` - // ConfigurationConstraints: [Output Only] Constraints for this attachment, if - // any. The attachment does - // not work if these constraints are not met. - ConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"configurationConstraints,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length to be - // configured on the customer - // router subinterface for this interconnect attachment. - CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` - // CustomerRouterIpv6Address: [Output Only] IPv6 address + prefix length to be - // configured on the - // customer router subinterface for this interconnect attachment. - CustomerRouterIpv6Address string `json:"customerRouterIpv6Address,omitempty"` - // CustomerRouterIpv6InterfaceId: This field is not available. - CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` - // DataplaneVersion: [Output Only] Dataplane version for this - // InterconnectAttachment. This - // field is only present for Dataplane version 2 and higher. Absence of - // this - // field in the API output indicates that the Dataplane is version 1. - DataplaneVersion int64 `json:"dataplaneVersion,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // EdgeAvailabilityDomain: Input only. Desired availability domain for the - // attachment. Only available for type - // PARTNER, at creation time, and can take one of the following values: - // - // - AVAILABILITY_DOMAIN_ANY - // - AVAILABILITY_DOMAIN_1 - // - AVAILABILITY_DOMAIN_2 - // - // - // For improved reliability, customers should configure a pair of - // attachments, - // one per availability domain. The selected availability domain will - // be - // provided to the Partner via the pairing key, so that the provisioned - // circuit will lie in the specified domain. If not specified, the value - // will - // default to AVAILABILITY_DOMAIN_ANY. - // - // Possible values: - // "AVAILABILITY_DOMAIN_1" - // "AVAILABILITY_DOMAIN_2" - // "AVAILABILITY_DOMAIN_ANY" - EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` - // Encryption: Indicates the user-supplied encryption option of this VLAN - // attachment - // (interconnectAttachment). Can only be specified at attachment creation - // for PARTNER or DEDICATED attachments. - // Possible values are: - // - // - NONE - This is the default value, which means that the - // VLAN attachment carries unencrypted traffic. VMs are able to send - // traffic to, or receive traffic from, such a VLAN attachment. - // - IPSEC - The VLAN attachment carries only encrypted - // traffic that is encrypted by an IPsec device, such as an HA VPN gateway - // or - // third-party IPsec VPN. VMs cannot directly send traffic to, or receive - // traffic from, such a VLAN attachment. To use *HA VPN over Cloud - // Interconnect*, the VLAN attachment must be created with this - // option. - // - // Possible values: - // "IPSEC" - The interconnect attachment will carry only encrypted traffic - // that is - // encrypted by an IPsec device such as HA VPN gateway; - // VMs cannot directly send traffic to or receive traffic from such - // an - // interconnect attachment. To use HA VPN over Cloud Interconnect, - // the interconnect attachment must be created with this option. - // "NONE" - This is the default value, which means the Interconnect - // Attachment will - // carry unencrypted traffic. VMs will be able to send traffic to or - // receive - // traffic from such interconnect attachment. - Encryption string `json:"encryption,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID, to be used when - // raising support tickets - // with Google or otherwise to debug backend connectivity issues. - // [Deprecated] This field is not used. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interconnect: URL of the underlying Interconnect object that this - // attachment's traffic - // will traverse through. - Interconnect string `json:"interconnect,omitempty"` - // IpsecInternalAddresses: A list of URLs of addresses that have been reserved - // for the VLAN - // attachment. Used only for the VLAN attachment that has the encryption - // option as IPSEC. The addresses must be regional internal IP address - // ranges. - // When creating an HA VPN gateway over the VLAN attachment, if the - // attachment - // is configured to use a regional internal IP address, then the VPN - // gateway's - // IP address is allocated from the IP address range specified here. - // For - // example, if the HA VPN gateway's interface 0 is paired to this - // VLAN - // attachment, then a regional internal IP address for the VPN - // gateway - // interface 0 will be allocated from the IP address specified for this - // VLAN attachment. - // If this field is not specified when creating the VLAN attachment, then - // later on when creating an HA VPN gateway on this VLAN attachment, the HA - // VPN gateway's IP address is allocated from the regional external IP - // address - // pool. - IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#interconnectAttachment for interconnect attachments. - Kind string `json:"kind,omitempty"` - // L2Forwarding: L2 Interconnect Attachment related config. This field is - // required if the - // type is L2_DEDICATED. - // - // The configuration specifies how VLAN tags (like dot1q, qinq, or - // dot1ad) - // within L2 packets are mapped to the destination appliances IP addresses. - // The packet is then encapsulated with the appliance IP address and sent - // to - // the edge appliance. - L2Forwarding *InterconnectAttachmentL2Forwarding `json:"l2Forwarding,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // InterconnectAttachment, - // which is essentially a hash of the labels set used for optimistic - // locking. - // The fingerprint is initially generated by Compute Engine and changes - // after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an InterconnectAttachment. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing through - // this - // interconnect attachment. - // Valid values are 1440, 1460, 1500, and 8896. If not specified, - // the value will default to 1440. - Mtu int64 `json:"mtu,omitempty"` - // MulticastEnabled: Whether or not to permit multicast traffic for this - // attachment. Multicast - // packets will be dropped if this is not enabled. - MulticastEnabled bool `json:"multicastEnabled,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // OperationalStatus: [Output Only] The current status of whether or not this - // interconnect - // attachment is functional, which can take one of the following values: - // - // - OS_ACTIVE: The attachment has been turned up and is ready to - // use. - // - OS_UNPROVISIONED: The attachment is not ready to use yet, - // because turnup is not complete. - // - // Possible values: - // "OS_ACTIVE" - Indicates that attachment has been turned up and is ready - // to - // use. - // "OS_UNPROVISIONED" - Indicates that attachment is not ready to use yet, - // because - // turnup is not complete. - OperationalStatus string `json:"operationalStatus,omitempty"` - // PairingKey: [Output only for type PARTNER. Input only for PARTNER_PROVIDER. - // Not - // present for DEDICATED]. - // The opaque identifier of a PARTNER attachment used to initiate - // provisioning with a selected partner. - // Of the form "XXXXX/region/domain" - PairingKey string `json:"pairingKey,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InterconnectAttachmentParams `json:"params,omitempty"` - // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 Partner if - // they - // configured BGP on behalf of the customer. - // Output only for PARTNER type, input only for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerAsn int64 `json:"partnerAsn,omitempty,string"` - // PartnerMetadata: Informational metadata about Partner attachments from - // Partners to display - // to customers. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` - // PrivateInterconnectInfo: [Output Only] Information specific to an - // InterconnectAttachment. - // This property is populated if the interconnect that - // this is attached to is of type DEDICATED. - PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` - // Region: [Output Only] URL of the region where the regional interconnect - // attachment - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RemoteService: [Output Only] - // If the attachment is on a Cross-Cloud Interconnect connection, this - // field - // contains the interconnect's remote location service provider. - // Example - // values: "Amazon Web Services" "Microsoft Azure". - // - // The field is set only for attachments on Cross-Cloud - // Interconnect - // connections. Its value is copied from the - // InterconnectRemoteLocation - // remoteService field. - RemoteService string `json:"remoteService,omitempty"` - // Router: URL of the Cloud Router to be used for dynamic routing. This router - // must be - // in the same region as this InterconnectAttachment. - // The - // InterconnectAttachment will automatically connect the Interconnect to - // the - // network & region within which the Cloud Router is configured. - Router string `json:"router,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // StackType: The stack type for this interconnect attachment to identify - // whether the - // IPv6 feature is enabled or not. If not specified, IPV4_ONLY - // will be used. - // - // This field can be both set at interconnect attachments creation and - // update interconnect attachment operations. - // - // Possible values: - // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - The interconnect attachment will only be assigned IPv4 - // addresses. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] The current state of this attachment's - // functionality. - // Enum values ACTIVE and UNPROVISIONED are shared by - // DEDICATED/PRIVATE, - // PARTNER, and PARTNER_PROVIDER interconnect attachments, while enum - // values - // PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used - // for only PARTNER and PARTNER_PROVIDER interconnect attachments. - // This state can take one of the following values: - // - // - ACTIVE: The attachment has been turned up and is ready to use. - // - UNPROVISIONED: The attachment is not ready to use yet, because turnup - // is not complete. - // - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet - // been configured on the Partner side. - // - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of - // provisioning after a PARTNER_PROVIDER attachment was created that - // references it. - // - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER - // attachment that is waiting for a customer to activate it. - // - DEFUNCT: - // The attachment was deleted externally and is no longer functional. This - // could be because the associated Interconnect was removed, or because the - // other side of a Partner attachment was deleted. - // - // Possible values: - // "ACTIVE" - Indicates that attachment has been turned up and is ready to - // use. - // "DEFUNCT" - The attachment was deleted externally and is no longer - // functional. - // This could be because the associated Interconnect was wiped out, - // or because the other side of a Partner attachment was deleted. - // "PARTNER_REQUEST_RECEIVED" - A PARTNER attachment is in the process of - // provisioning after a - // PARTNER_PROVIDER attachment was created that references it. - // "PENDING_CUSTOMER" - PARTNER or PARTNER_PROVIDER attachment that is - // waiting for the customer - // to activate. - // "PENDING_PARTNER" - A newly created PARTNER attachment that has not yet - // been configured on - // the Partner side. - // "STATE_UNSPECIFIED" - // "UNPROVISIONED" - Indicates that attachment is not ready to use yet, - // because turnup is not - // complete. - State string `json:"state,omitempty"` - // SubnetLength: Input only. Length of the IPv4 subnet mask. - // Allowed values: - // - // - // - 29 (default) - // - 30 - // - // The default value is 29, except for Cross-Cloud Interconnect - // connections that use an InterconnectRemoteLocation with - // a - // constraints.subnetLengthRange.min equal to 30. For example, - // connections that use an Azure remote location fall into this - // category. In these cases, the default value is 30, and requesting - // 29 returns an error. - // - // Where both 29 and 30 are allowed, 29 is preferred, because it gives - // Google Cloud Support more debugging visibility. - SubnetLength int64 `json:"subnetLength,omitempty"` - // Type: The type of interconnect attachment this is, which can take one of - // the - // following values: - // - // - DEDICATED: an attachment to a Dedicated Interconnect. - // - PARTNER: an attachment to a Partner Interconnect, created by the - // customer. - // - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by - // the partner. - // - // - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. - // - // Possible values: - // "DEDICATED" - Attachment to a dedicated interconnect. - // "L2_DEDICATED" - Attachment to a dedicated interconnect, forwarding L2 - // packets. - // "PARTNER" - Attachment to a partner interconnect, created by the customer. - // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created by the - // partner. - Type string `json:"type,omitempty"` - // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the range - // 2-4093. - // Only specified at creation time. - VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachment) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachmentsScopedList resources. - Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectAttachmentAggregatedList for aggregated - // lists of interconnect attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentAggregatedListWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentConfigurationConstraints struct { - // BgpMd5: [Output Only] Whether the attachment's BGP - // session - // requires/allows/disallows BGP MD5 authentication. This can take one of - // the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. - // - // For example, a Cross-Cloud Interconnect connection to a remote - // cloud - // provider that requires BGP MD5 authentication has - // the - // interconnectRemoteLocation - // attachment_configuration_constraints.bgp_md5 - // field set to MD5_REQUIRED, and that property is propagated to - // the - // attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is - // returned if MD5 is requested. - // - // Possible values: - // "MD5_OPTIONAL" - MD5_OPTIONAL: BGP MD5 authentication is supported and can - // optionally be - // configured. - // "MD5_REQUIRED" - MD5_REQUIRED: BGP MD5 authentication must be configured. - // "MD5_UNSUPPORTED" - MD5_UNSUPPORTED: BGP MD5 authentication must not be - // configured - BgpMd5 string `json:"bgpMd5,omitempty"` - // BgpPeerAsnRanges: [Output Only] List of ASN ranges that the remote location - // is known to - // support. Formatted as an array of inclusive ranges {min: min-value, - // max: - // max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: - // 65534}] - // allows the peer ASN to be 123 or anything in the range 64512-65534. - // - // This field is only advisory. Although the API accepts other ranges, - // these - // are the ranges that we recommend. - BgpPeerAsnRanges []*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange `json:"bgpPeerAsnRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "BgpMd5") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BgpMd5") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentConfigurationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentConfigurationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange struct { - Max int64 `json:"max,omitempty"` - Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Max") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Max") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroup: An interconnect attachment group resource -// allows customers to create, -// analyze, and expand highly available deployments. -type InterconnectAttachmentGroup struct { - // Attachments: Attachments in the AttachmentGroup. Keys are arbitrary - // user-specified - // strings. Users are encouraged, but not required, to use their - // preferred - // format for resource links as keys. - // Note that there are add-members and remove-members methods in gcloud. - // The size of this map is limited by an "Attachments per group" quota. - Attachments map[string]InterconnectAttachmentGroupAttachment `json:"attachments,omitempty"` - Configured *InterconnectAttachmentGroupConfigured `json:"configured,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Opaque system-generated token that uniquely identifies the - // configuration. - // If provided when patching a configuration in update mode, the provided - // token must match the current token or the update is rejected. This - // provides - // a reliable means of doing read-modify-write (optimistic locking) - // as - // described byAIP 154. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - Intent *InterconnectAttachmentGroupIntent `json:"intent,omitempty"` - // InterconnectGroup: The URL of an InterconnectGroup that groups these - // Attachments' - // Interconnects. Customers do not need to set this unless directed by - // Google Support. - InterconnectGroup string `json:"interconnectGroup,omitempty"` - // Kind: [Output Only] Type of the resource. - // Always - // compute#interconnectAttachmentGroup. - Kind string `json:"kind,omitempty"` - LogicalStructure *InterconnectAttachmentGroupLogicalStructure `json:"logicalStructure,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroup) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupAttachment: An Attachment in this -// AttachmentGroup. -type InterconnectAttachmentGroupAttachment struct { - Attachment string `json:"attachment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachment") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachment") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupAttachment) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfigured: [Output Only] The redundancy this -// group is configured to support. The way a -// user queries what SLA their Attachment gets is by looking at this field -// of -// the Attachment's AttachmentGroup. -type InterconnectAttachmentGroupConfigured struct { - AvailabilitySla *InterconnectAttachmentGroupConfiguredAvailabilitySLA `json:"availabilitySla,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilitySla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilitySla") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfigured) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfigured - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfiguredAvailabilitySLA: [Output Only] Which -// SLA this group is configured to support, and why this -// group does or does not meet that SLA's requirements. -type InterconnectAttachmentGroupConfiguredAvailabilitySLA struct { - // Possible values: - // "EFFECTIVE_SLA_UNSPECIFIED" - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - EffectiveSla string `json:"effectiveSla,omitempty"` - IntendedSlaBlockers []*InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers `json:"intendedSlaBlockers,omitempty"` - // ForceSendFields is a list of field names (e.g. "EffectiveSla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EffectiveSla") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfiguredAvailabilitySLA) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfiguredAvailabilitySLA - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers: -// [Output Only] Reasons why configuration.availabilitySLA.sla differs -// from -// intent.availabilitySLA. This list is empty if and only if those are -// the -// same. -type InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers struct { - // Attachments: [Output Only] URLs of any particular Attachments to explain - // this - // blocker in more detail. - Attachments []string `json:"attachments,omitempty"` - // Possible values: - // "BLOCKER_TYPE_UNSPECIFIED" - // "INCOMPATIBLE_METROS" - // "INCOMPATIBLE_REGIONS" - // "MISSING_GLOBAL_ROUTING" - // "NO_ATTACHMENTS" - // "NO_ATTACHMENTS_IN_METRO_AND_ZONE" - // "OTHER" - BlockerType string `json:"blockerType,omitempty"` - // DocumentationLink: [Output Only] The url of Google Cloud public - // documentation explaining - // this requirement. This is set for every type of requirement. - DocumentationLink string `json:"documentationLink,omitempty"` - // Explanation: [Output Only] A human-readable explanation of this requirement - // and - // why it's not met. This is set for every type of requirement. - Explanation string `json:"explanation,omitempty"` - // Metros: [Output Only] Metros used to explain this blocker in more - // detail. - // These are three-letter lowercase strings like "iad". This will be set - // for some blockers (like NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does - // not apply to others. - Metros []string `json:"metros,omitempty"` - // Regions: [Output Only] Regions used to explain this blocker in more - // detail. These are region names formatted like "us-central1". This - // will be set for some blockers (like INCOMPATIBLE_REGIONS) but does - // not apply to others. - Regions []string `json:"regions,omitempty"` - // Zones: [Output Only] Zones used to explain this blocker in more - // detail. - // Format is "zone1" and/or "zone2". This will be set for some blockers - // (like MISSING_ZONE) but does not apply to others. - Zones []string `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupIntent: The user's intent for this -// AttachmentGroup. This is the only required field -// besides the name that must be specified on group creation. -type InterconnectAttachmentGroupIntent struct { - // Possible values: - // "AVAILABILITY_SLA_UNSPECIFIED" - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - AvailabilitySla string `json:"availabilitySla,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilitySla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilitySla") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupIntent) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupIntent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructure: [Output Only] An analysis of -// the logical layout of Attachments in this -// group. Every Attachment in the group is shown once in this structure. -type InterconnectAttachmentGroupLogicalStructure struct { - Regions []*InterconnectAttachmentGroupLogicalStructureRegion `json:"regions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Regions") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Regions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructure) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegion: [Output Only] The regions -// Attachments in this group are in. -type InterconnectAttachmentGroupLogicalStructureRegion struct { - Metros []*InterconnectAttachmentGroupLogicalStructureRegionMetro `json:"metros,omitempty"` - // Region: [Output Only] The name of a region, like "us-central1". - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metros") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metros") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegion) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetro: [Output Only] The -// metros of Attachments in this group in this region. -type InterconnectAttachmentGroupLogicalStructureRegionMetro struct { - Facilities []*InterconnectAttachmentGroupLogicalStructureRegionMetroFacility `json:"facilities,omitempty"` - // Metro: [Output Only] The name of the metro, as a three-letter - // lowercase - // string like "iad". This is the first component of the location of - // an - // Interconnect. - Metro string `json:"metro,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facilities") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facilities") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetro) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetro - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetroFacility: [Output -// Only] The facilities used for this group's Attachments' -// Interconnects. -type InterconnectAttachmentGroupLogicalStructureRegionMetroFacility struct { - // Facility: [Output Only] The name of a facility, like "iad-1234". - Facility string `json:"facility,omitempty"` - Zones []*InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facility") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facility") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetroFacility) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetroFacility - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone: [Output -// Only] The zones that Attachments in this group are present -// in, in the given facilities. This is inherited from their -// Interconnects. -type InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone struct { - // Attachments: [Output Only] URLs of Attachments in the given zone, to the - // given - // region, on Interconnects in the given facility and metro. Every - // Attachment in the AG has such an entry. - Attachments []string `json:"attachments,omitempty"` - // Zone: [Output Only] The name of a zone, either "zone1" or "zone2". - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsCreateMembers struct { - // Attachments: Parameters for the specific Attachments to create. - Attachments []*InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput `json:"attachments,omitempty"` - // IntentMismatchBehavior: How to behave when - // configured.availabilitySLA.effectiveSLA would not - // equal - // intent.availabilitySLA after this call. - // - // Possible values: - // "CREATE" - // "REJECT" - // "UNSPECIFIED" - IntentMismatchBehavior string `json:"intentMismatchBehavior,omitempty"` - // TemplateAttachment: Default parameters for the Attachments to create in this - // call. - TemplateAttachment *InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput `json:"templateAttachment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsCreateMembers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsCreateMembers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput: -// LINT.IfChange -// Parameters used to create an InterconnectAttachment. This is similar -// to -// InterconnectAttachment, but the region field used here is not output -// only -// and all other output only fields are excluded. -type InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput struct { - // AdminEnabled: Determines whether this Attachment will carry packets. - // Not present for PARTNER_PROVIDER. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Bandwidth: Provisioned bandwidth capacity for the interconnect attachment. - // For - // attachments of type DEDICATED, the user can set the bandwidth. - // For attachments of type PARTNER, the Google Partner that is operating - // the interconnect must set the bandwidth. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER and - // DEDICATED, - // and can take one of the following values: - // - // - BPS_50M: 50 Mbit/s - // - BPS_100M: 100 Mbit/s - // - BPS_200M: 200 Mbit/s - // - BPS_300M: 300 Mbit/s - // - BPS_400M: 400 Mbit/s - // - BPS_500M: 500 Mbit/s - // - BPS_1G: 1 Gbit/s - // - BPS_2G: 2 Gbit/s - // - BPS_5G: 5 Gbit/s - // - BPS_10G: 10 Gbit/s - // - BPS_20G: 20 Gbit/s - // - BPS_50G: 50 Gbit/s - // - BPS_100G: 100 Gbit/s - // - // Possible values: - // "BPS_100G" - 100 Gbit/s - // "BPS_100M" - 100 Mbit/s - // "BPS_10G" - 10 Gbit/s - // "BPS_1G" - 1 Gbit/s - // "BPS_200M" - 200 Mbit/s - // "BPS_20G" - 20 Gbit/s - // "BPS_2G" - 2 Gbit/s - // "BPS_300M" - 300 Mbit/s - // "BPS_400G" - 400 Gbit/s - // "BPS_400M" - 400 Mbit/s - // "BPS_500M" - 500 Mbit/s - // "BPS_50G" - 50 Gbit/s - // "BPS_50M" - 50 Mbit/s - // "BPS_5G" - 5 Gbit/s - Bandwidth string `json:"bandwidth,omitempty"` - // CandidateCloudRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address fields must be set or both must be - // unset. - // - Prefix length of both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address must be the same. - // - Max prefix length is 31. - CandidateCloudRouterIpAddress string `json:"candidateCloudRouterIpAddress,omitempty"` - // CandidateCloudRouterIpv6Address: Single IPv6 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address fields must be set or both must - // be - // unset. - // - Prefix length of both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address must be the same. - // - Max prefix length is 126. - CandidateCloudRouterIpv6Address string `json:"candidateCloudRouterIpv6Address,omitempty"` - // CandidateCustomerRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the customer - // router interface for this interconnect attachment. - CandidateCustomerRouterIpAddress string `json:"candidateCustomerRouterIpAddress,omitempty"` - // CandidateCustomerRouterIpv6Address: Single IPv6 address + prefix length to - // be configured on the customer - // router interface for this interconnect attachment. - CandidateCustomerRouterIpv6Address string `json:"candidateCustomerRouterIpv6Address,omitempty"` - // CandidateIpv6Subnets: This field is not available. - CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` - // CandidateSubnets: Input only. Up to 16 candidate prefixes that can be used - // to restrict the allocation - // of cloudRouterIpAddress and customerRouterIpAddress for this attachment. - // All prefixes must be within link-local address space (169.254.0.0/16) - // and - // must be /29 or shorter (/28, /27, etc). Google will attempt to select - // an - // unused /29 from the supplied candidate prefix(es). The request will fail - // if all possible /29s are in use on Google's edge. If not supplied, - // Google - // will randomly select an unused /29 from all of link-local space. - CandidateSubnets []string `json:"candidateSubnets,omitempty"` - // CloudRouterIpv6InterfaceId: This field is not available. - CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` - // CustomerRouterIpv6InterfaceId: This field is not available. - CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // EdgeAvailabilityDomain: Input only. Desired availability domain for the - // attachment. Only available for type - // PARTNER, at creation time, and can take one of the following values: - // - // - AVAILABILITY_DOMAIN_ANY - // - AVAILABILITY_DOMAIN_1 - // - AVAILABILITY_DOMAIN_2 - // - // - // For improved reliability, customers should configure a pair of - // attachments, one per availability domain. The selected availability - // domain will be provided to the Partner via the pairing key, so that - // the - // provisioned circuit will lie in the specified domain. If not specified, - // the value will default to AVAILABILITY_DOMAIN_ANY. - // - // Possible values: - // "AVAILABILITY_DOMAIN_1" - // "AVAILABILITY_DOMAIN_2" - // "AVAILABILITY_DOMAIN_ANY" - EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` - // Encryption: Indicates the user-supplied encryption option of this VLAN - // attachment - // (interconnectAttachment). Can only be specified at attachment creation - // for PARTNER or DEDICATED attachments. - // Possible values are: - // - // - alpha - This is the default value, which means that - // the VLAN attachment carries unencrypted traffic. VMs are able to send - // traffic to, or receive traffic from, such a VLAN attachment. - // - IPSEC - The VLAN attachment carries only encrypted - // traffic that is encrypted by an IPsec device, such as an HA VPN gateway - // or third-party IPsec VPN. VMs cannot directly send traffic to, or - // receive - // traffic from, such a VLAN attachment. To use *HA VPN over Cloud - // Interconnect*, the VLAN attachment must be created with this - // option. - // - // Possible values: - // "IPSEC" - The interconnect attachment will carry only encrypted traffic - // that is - // encrypted by an IPsec device such as HA VPN gateway; - // VMs cannot directly send traffic to or receive traffic from such - // an - // interconnect attachment. To use HA VPN over Cloud Interconnect, - // the interconnect attachment must be created with this option. - // "NONE" - This is the default value, which means the Interconnect - // Attachment will - // carry unencrypted traffic. VMs will be able to send traffic to or - // receive - // traffic from such interconnect attachment. - Encryption string `json:"encryption,omitempty"` - // Interconnect: URL of the underlying Interconnect object that this - // attachment's traffic - // will traverse through. - Interconnect string `json:"interconnect,omitempty"` - // IpsecInternalAddresses: A list of URLs of addresses that have been reserved - // for the VLAN - // attachment. Used only for the VLAN attachment that has the encryption - // option as IPSEC. The addresses must be regional internal IP address - // ranges. When creating an HA VPN gateway over the VLAN attachment, if - // the - // attachment is configured to use a regional internal IP address, then the - // VPN gateway's IP address is allocated from the IP address range - // specified - // here. For example, if the HA VPN gateway's interface 0 is paired to - // this - // VLAN attachment, then a regional internal IP address for the VPN - // gateway - // interface 0 will be allocated from the IP address specified for this - // VLAN attachment. - // If this field is not specified when creating the VLAN attachment, then - // later on when creating an HA VPN gateway on this VLAN attachment, the HA - // VPN gateway's IP address is allocated from the regional external IP - // address pool. - IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` - // L2Forwarding: L2 Interconnect Attachment related config. This field is - // required if the - // type is L2_DEDICATED. - // - // The configuration specifies how VLAN tags (like dot1q, qinq, or - // dot1ad) - // within L2 packets are mapped to the destination appliances IP addresses. - // The packet is then encapsulated with the appliance IP address and sent - // to - // the edge appliance. - L2Forwarding *InterconnectAttachmentL2Forwarding `json:"l2Forwarding,omitempty"` - // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing - // through - // this interconnect attachment. Valid values are 1440, 1460, - // 1500, or 8896. If not specified, the value will default to 1440. - Mtu int64 `json:"mtu,omitempty"` - // MulticastEnabled: Whether or not to permit multicast traffic for this - // attachment. Multicast - // packets will be dropped if this is not enabled. - MulticastEnabled bool `json:"multicastEnabled,omitempty"` - // Name: Name of the resource. Provided by the client when the resource - // is - // created. Must be set on either the template_attachment or on each - // specific attachment. If set, the name must be 1-63 characters long, - // and - // comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PairingKey: [Output only for type PARTNER. Input only for PARTNER_PROVIDER. - // Not - // present for DEDICATED]. - // The opaque identifier of a PARTNER attachment used to initiate - // provisioning with a selected partner. - // Of the form "XXXXX/region/domain" - PairingKey string `json:"pairingKey,omitempty"` - // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 Partner if - // they - // configured BGP on behalf of the customer. - // Output only for PARTNER type, input only for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerAsn int64 `json:"partnerAsn,omitempty,string"` - // PartnerMetadata: Informational metadata about Partner attachments from - // Partners to display - // to customers. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` - // Region: The region that the Attachment is in. - Region string `json:"region,omitempty"` - // Router: URL of the Cloud Router to be used for dynamic routing. This router - // must - // be in the same region as this InterconnectAttachment. - // The - // InterconnectAttachment will automatically connect the Interconnect to - // the - // network & region within which the Cloud Router is configured. - Router string `json:"router,omitempty"` - // StackType: The stack type for this interconnect attachment to identify - // whether the - // IPv6 feature is enabled or not. If not specified, IPV4_ONLY - // will be used. - // - // This field can be both set at interconnect attachments creation and - // update interconnect attachment operations. - // - // Possible values: - // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - The interconnect attachment will only be assigned IPv4 - // addresses. - StackType string `json:"stackType,omitempty"` - // SubnetLength: Input only. Length of the IPv4 subnet mask. - // Allowed values: - // - // - // - 29 (default) - // - 30 - // - // The default value is 29, except for Cross-Cloud Interconnect - // connections that use an InterconnectRemoteLocation with - // a - // constraints.subnetLengthRange.min equal to 30. For example, - // connections that use an Azure remote location fall into this - // category. In these cases, the default value is 30, and requesting - // 29 returns an error. - // - // Where both 29 and 30 are allowed, 29 is preferred, because it gives - // Google Cloud Support more debugging visibility. - SubnetLength int64 `json:"subnetLength,omitempty"` - // Type: The type of interconnect attachment this is, which can take one of - // the - // following values: - // - // - DEDICATED: an attachment to a Dedicated Interconnect. - // - PARTNER: an attachment to a Partner Interconnect, created by the - // customer. - // - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by - // the partner. - // - // Possible values: - // "DEDICATED" - Attachment to a dedicated interconnect. - // "L2_DEDICATED" - Attachment to a dedicated interconnect, forwarding L2 - // packets. - // "PARTNER" - Attachment to a partner interconnect, created by the customer. - // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created by the - // partner. - Type string `json:"type,omitempty"` - // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the range - // 2-4093. - // Only specified at creation time. - VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsCreateMembersRequest struct { - Request *InterconnectAttachmentGroupsCreateMembers `json:"request,omitempty"` - // ForceSendFields is a list of field names (e.g. "Request") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Request") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsCreateMembersRequest) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsCreateMembersRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsGetOperationalStatusResponse: Response for the -// InterconnectAttachmentGroupsGetOperationalStatusResponse. -type InterconnectAttachmentGroupsGetOperationalStatusResponse struct { - Etag string `json:"etag,omitempty"` - Result *InterconnectAttachmentGroupsOperationalStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsGetOperationalStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsGetOperationalStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachmentGroup resources. - Items []*InterconnectAttachmentGroup `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable - // resources. - // end_interface: - // MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentGroupsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsListResponseWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentGroupsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentGroupsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsOperationalStatus struct { - AttachmentStatuses []*InterconnectAttachmentGroupsOperationalStatusAttachmentStatus `json:"attachmentStatuses,omitempty"` - Configured *InterconnectAttachmentGroupConfigured `json:"configured,omitempty"` - // GroupStatus: Summarizes the status of the group. - // - // Possible values: - // "DEGRADED" - // "FULLY_DOWN" - // "FULLY_UP" - // "UNSPECIFIED" - GroupStatus string `json:"groupStatus,omitempty"` - Intent *InterconnectAttachmentGroupIntent `json:"intent,omitempty"` - // Operational: The operational state of the group, including only active - // Attachments. - Operational *InterconnectAttachmentGroupConfigured `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttachmentStatuses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentStatuses") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsOperationalStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsOperationalStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsOperationalStatusAttachmentStatus: The status of -// one Attachment in the group. List order is arbitrary. -type InterconnectAttachmentGroupsOperationalStatusAttachmentStatus struct { - // AdminEnabled: Whether this Attachment is enabled. This becomes false when - // the customer - // drains their Attachment. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Attachment: The URL of the Attachment being described. - Attachment string `json:"attachment,omitempty"` - // IsActive: Whether this Attachment is participating in the redundant - // configuration. - // This will be ACTIVE if and only if the status below is CONNECTION_UP. - // Any INACTIVE Attachments are excluded from the analysis that - // generates - // operational.availabilitySLA. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - // "UNSPECIFIED" - IsActive string `json:"isActive,omitempty"` - // Status: Whether this Attachment is active, and if so, whether BGP is up. - // - // Possible values: - // "ATTACHMENT_STATUS_UNKNOWN" - // "CONNECTION_DISABLED" - // "CONNECTION_DOWN" - // "CONNECTION_UP" - // "DEFUNCT" - // "IPSEC_CONFIGURATION_NEEDED_STATUS" - // "IPSEC_READY_TO_RESUME_FLOW_STATUS" - // "IPV4_DOWN_IPV6_UP" - // "IPV4_UP_IPV6_DOWN" - // "PARTNER_REQUEST_RECEIVED" - // "PENDING_CUSTOMER" - // "PENDING_PARTNER" - // "PROVISIONED" - // "ROUTER_CONFIGURATION_BROKEN" - // "UNPROVISIONED" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsOperationalStatusAttachmentStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsOperationalStatusAttachmentStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2Forwarding: L2 Interconnect Attachment related -// configuration. -type InterconnectAttachmentL2Forwarding struct { - // ApplianceMappings: Optional. A map of VLAN tags to appliances and optional - // inner mapping - // rules. If VLANs are not explicitly mapped to any appliance, - // the - // defaultApplianceIpAddress is used. - // - // Each VLAN tag can be a single number or a range of numbers in the range - // of 1 to 4094, e.g., "1" or "4001-4094". Non-empty and non-overlapping - // VLAN tag ranges are enforced, and violating operations will be - // rejected. - // - // The VLAN tags in the Ethernet header must use an ethertype value of - // 0x88A8 or 0x8100. - ApplianceMappings map[string]InterconnectAttachmentL2ForwardingApplianceMapping `json:"applianceMappings,omitempty"` - // DefaultApplianceIpAddress: Optional. A single IPv4 or IPv6 address used as - // the default destination - // IP when there is no VLAN mapping result found. - // - // Unset field (null-value) indicates the unmatched packet should be - // dropped. - DefaultApplianceIpAddress string `json:"defaultApplianceIpAddress,omitempty"` - // GeneveHeader: Optional. It represents the structure of a Geneve (Generic - // Network - // Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates - // packets from various - // protocols (e.g., Ethernet, IPv4, IPv6) for use in network - // virtualization - // environments. - GeneveHeader *InterconnectAttachmentL2ForwardingGeneveHeader `json:"geneveHeader,omitempty"` - // Network: Required. Resource URL of the network to which this attachment - // belongs. - Network string `json:"network,omitempty"` - // TunnelEndpointIpAddress: Required. A single IPv4 or IPv6 address. This - // address will be used as the - // source IP address for packets sent to the appliances, and must be used - // as - // the destination IP address for packets that should be sent out through - // this attachment. - TunnelEndpointIpAddress string `json:"tunnelEndpointIpAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplianceMappings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplianceMappings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2Forwarding) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2Forwarding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingApplianceMapping: Two-level -// VLAN-to-Appliance mapping rule. -type InterconnectAttachmentL2ForwardingApplianceMapping struct { - // ApplianceIpAddress: Optional. A single IPv4 or IPv6 address used as the - // destination IP - // address for ingress packets that match on a VLAN tag, but do not match - // a more specific inner VLAN tag. - // - // Unset field (null-value) indicates both VLAN tags are required to be - // mapped. Otherwise, defaultApplianceIpAddress is used. - ApplianceIpAddress string `json:"applianceIpAddress,omitempty"` - // InnerVlanToApplianceMappings: Optional. Used to match against the inner VLAN - // when the packet - // contains two VLAN tags. - // - // A list of mapping rules from inner VLAN tags to IP addresses. If the - // inner VLAN is not explicitly mapped to an IP address range, - // the - // applianceIpAddress is used. - InnerVlanToApplianceMappings []*InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping `json:"innerVlanToApplianceMappings,omitempty"` - // Name: Optional. The name of this appliance mapping rule. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplianceIpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplianceIpAddress") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingApplianceMapping) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingApplianceMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping -// : The inner VLAN-to-Appliance mapping. -type InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping struct { - // InnerApplianceIpAddress: Required in this object. A single IPv4 or IPv6 - // address used as the - // destination IP address for ingress packets that match on both VLAN - // tags. - InnerApplianceIpAddress string `json:"innerApplianceIpAddress,omitempty"` - // InnerVlanTags: Required in this object. Used to match the inner VLAN tag on - // the - // packet. Each entry can be a single number or a range of numbers in - // the range of 1 to 4094, e.g., ["1", "4001-4094"] is valid. Non-empty - // and Non-overlapping VLAN tag ranges are enforced, and violating - // operations will be rejected. - // - // The inner VLAN tags must have an ethertype value of 0x8100. - InnerVlanTags []string `json:"innerVlanTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "InnerApplianceIpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InnerApplianceIpAddress") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingGeneveHeader: GeneveHeader related -// configurations. -type InterconnectAttachmentL2ForwardingGeneveHeader struct { - // Vni: Optional. VNI is a 24-bit unique virtual network identifier, from 0 - // to - // 16,777,215. - Vni int64 `json:"vni,omitempty"` - // ForceSendFields is a list of field names (e.g. "Vni") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Vni") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingGeneveHeader) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingGeneveHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentList: Response to the list request, and contains a -// list of interconnect -// attachments. -type InterconnectAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachment resources. - Items []*InterconnectAttachment `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectAttachmentList for lists of - // interconnect - // attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentListWarning: [Output Only] Informational warning -// message. -type InterconnectAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentParams: Additional interconnect attachment parameters. -type InterconnectAttachmentParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentParams) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentPartnerMetadata: Informational metadata about Partner -// attachments from Partners to display -// to customers. These fields are propagated from PARTNER_PROVIDER -// attachments to their corresponding PARTNER attachments. -type InterconnectAttachmentPartnerMetadata struct { - // InterconnectName: Plain text name of the Interconnect this attachment is - // connected to, as - // displayed in the Partner's portal. For instance "Chicago 1". - // This value may be validated to match approved Partner values. - InterconnectName string `json:"interconnectName,omitempty"` - // PartnerName: Plain text name of the Partner providing this attachment. - // This value may be validated to match approved Partner values. - PartnerName string `json:"partnerName,omitempty"` - // PortalUrl: URL of the Partner's portal for this Attachment. Partners may - // customise - // this to be a deep link to the specific resource on the Partner portal. - // This value may be validated to match approved Partner values. - PortalUrl string `json:"portalUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPartnerMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentPrivateInfo: Information for an interconnect -// attachment when this belongs to an -// interconnect of type DEDICATED. -type InterconnectAttachmentPrivateInfo struct { - // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for traffic - // between - // Google and the customer, going to and from this network and region. - Tag8021q int64 `json:"tag8021q,omitempty"` - // ForceSendFields is a list of field names (e.g. "Tag8021q") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tag8021q") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPrivateInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedList struct { - // InterconnectAttachments: A list of interconnect attachments contained in - // this scope. - InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectAttachments") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentsScopedListWarning: Informational warning which -// replaces the list of addresses when -// the list is empty. -type InterconnectAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectCircuitInfo: Describes a single physical circuit between the -// Customer and Google. -// CircuitInfo objects are created by Google, so all fields are output only. -type InterconnectCircuitInfo struct { - // CustomerDemarcId: Customer-side demarc ID for this circuit. - CustomerDemarcId string `json:"customerDemarcId,omitempty"` - // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned at - // circuit turn-up. - GoogleCircuitId string `json:"googleCircuitId,omitempty"` - // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at circuit - // turn-up and - // provided by Google to the customer in the LOA. - GoogleDemarcId string `json:"googleDemarcId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerDemarcId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectCircuitInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnostics: Diagnostics information about the Interconnect -// connection, which contains -// detailed and current technical information about Google's side of -// the -// connection. -type InterconnectDiagnostics struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing individual neighbors currently seen by the Google router in - // the ARP cache for the Interconnect. - // This will be empty when the Interconnect is not bundled. - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - // BundleAggregationType: The aggregation type of the bundle interface. - // - // Possible values: - // "BUNDLE_AGGREGATION_TYPE_LACP" - LACP is enabled. - // "BUNDLE_AGGREGATION_TYPE_STATIC" - LACP is disabled. - BundleAggregationType string `json:"bundleAggregationType,omitempty"` - // BundleOperationalStatus: The operational status of the bundle interface. - // - // Possible values: - // "BUNDLE_OPERATIONAL_STATUS_DOWN" - If bundleAggregationType is LACP: LACP - // is not established and/or all - // links in the bundle have DOWN operational status. If - // bundleAggregationType is STATIC: one or more links in the bundle has - // DOWN operational status. - // "BUNDLE_OPERATIONAL_STATUS_UP" - If bundleAggregationType is LACP: LACP is - // established and at least one - // link in the bundle has UP operational status. If bundleAggregationType - // is STATIC: all links in the bundle (typically just one) have UP - // operational status. - BundleOperationalStatus string `json:"bundleOperationalStatus,omitempty"` - // Links: A list of InterconnectDiagnostics.LinkStatus objects, - // describing the status for each link on the Interconnect. - Links []*InterconnectDiagnosticsLinkStatus `json:"links,omitempty"` - // MacAddress: The MAC address of the Interconnect's bundle interface. - MacAddress string `json:"macAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnostics) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnostics - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnosticsARPEntry: Describing the ARP neighbor entries seen on -// this link -type InterconnectDiagnosticsARPEntry struct { - // IpAddress: The IP address of this ARP neighbor. - IpAddress string `json:"ipAddress,omitempty"` - // MacAddress: The MAC address of this ARP neighbor. - MacAddress string `json:"macAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsARPEntry) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsARPEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkLACPStatus struct { - // GoogleSystemId: System ID of the port on Google's side of the LACP exchange. - GoogleSystemId string `json:"googleSystemId,omitempty"` - // NeighborSystemId: System ID of the port on the neighbor's side of the LACP - // exchange. - NeighborSystemId string `json:"neighborSystemId,omitempty"` - // State: The state of a LACP link, which can take one of the following - // values: - // - // - ACTIVE: The link is configured and active within the bundle. - // - DETACHED: The link is not configured within the bundle. This means - // that the rest of the object should be empty. - // - // Possible values: - // "ACTIVE" - The link is configured and active within the bundle. - // "DETACHED" - The link is not configured within the bundle, this means the - // rest of - // the object should be empty. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "GoogleSystemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GoogleSystemId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkLACPStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkOpticalPower struct { - // State: The status of the current value when compared to the warning and - // alarm - // levels for the receiving or transmitting transceiver. Possible - // states - // include: - // - // - // - OK: The value has not crossed a warning threshold. - // - LOW_WARNING: The value has crossed below the low - // warning threshold. - // - HIGH_WARNING: The value has - // crossed above the high warning threshold. - // - LOW_ALARM: The value has crossed below the low alarm - // threshold. - // - HIGH_ALARM: The value has crossed above the high alarm - // threshold. - // - // Possible values: - // "HIGH_ALARM" - The value has crossed above the high alarm threshold. - // "HIGH_WARNING" - The value of the current optical power has crossed above - // the high - // warning threshold. - // "LOW_ALARM" - The value of the current optical power has crossed below the - // low alarm - // threshold. - // "LOW_WARNING" - The value of the current optical power has crossed below - // the low - // warning threshold. - // "OK" - The value of the current optical power has not crossed a - // warning - // threshold. - State string `json:"state,omitempty"` - // Value: Value of the current receiving or transmitting optical power, read - // in - // dBm. Take a known good optical value, give it a 10% margin and - // trigger - // warnings relative to that value. In general, a -7dBm warning and a - // -11dBm - // alarm are good optical value estimates for most links. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkOpticalPower) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *InterconnectDiagnosticsLinkOpticalPower) UnmarshalJSON(data []byte) error { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type InterconnectDiagnosticsLinkStatus struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing the ARP neighbor entries seen on this link. - // This will be empty if the link is bundled - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - // CircuitId: The unique ID for this link assigned during turn up by Google. - CircuitId string `json:"circuitId,omitempty"` - // GoogleDemarc: The Demarc address assigned by Google and provided in the LoA. - GoogleDemarc string `json:"googleDemarc,omitempty"` - LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` - // Macsec: Describes the status of MACsec encryption on this link. - Macsec *InterconnectDiagnosticsMacsecStatus `json:"macsec,omitempty"` - // OperationalStatus: The operational status of the link. - // - // Possible values: - // "LINK_OPERATIONAL_STATUS_DOWN" - The interface is unable to communicate - // with the remote end. - // "LINK_OPERATIONAL_STATUS_UP" - The interface has low level communication - // with the remote end. - OperationalStatus string `json:"operationalStatus,omitempty"` - // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, - // describing the current value and status of the received light level. - ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` - // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, - // describing the current value and status of the transmitted light level. - TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnosticsMacsecStatus: Describes the status of MACsec -// encryption on the link. -type InterconnectDiagnosticsMacsecStatus struct { - // Ckn: Indicates the Connectivity Association Key Name (CKN) - // currently being used if MACsec is operational. - Ckn string `json:"ckn,omitempty"` - // Operational: Indicates whether or not MACsec is operational on this link. - Operational bool `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ckn") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ckn") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsMacsecStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsMacsecStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroup: An interconnect group resource allows customers to -// create, analyze, and -// expand their redundant connections. -type InterconnectGroup struct { - Configured *InterconnectGroupConfigured `json:"configured,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Opaque system-generated token that uniquely identifies the - // configuration. - // If provided when patching a configuration in update mode, the provided - // token must match the current token or the update is rejected. This - // provides - // a reliable means of doing read-modify-write (optimistic locking) - // as - // described by AIP 154. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - Intent *InterconnectGroupIntent `json:"intent,omitempty"` - // Interconnects: Interconnects in the InterconnectGroup. Keys are arbitrary - // user-specified - // strings. Users are encouraged, but not required, to use their - // preferred - // format for resource links as keys. - // Note that there are add-members and remove-members methods in gcloud. - // The size of this map is limited by an "Interconnects per group" quota. - Interconnects map[string]InterconnectGroupInterconnect `json:"interconnects,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#InterconnectGroup - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - PhysicalStructure *InterconnectGroupPhysicalStructure `json:"physicalStructure,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Configured") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Configured") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroup) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfigured: [Output Only] The status of the group as -// configured. This has the same -// structure as the operational field reported by the OperationalStatus -// method, but does not take into account the operational status of -// each -// resource. -type InterconnectGroupConfigured struct { - TopologyCapability *InterconnectGroupConfiguredTopologyCapability `json:"topologyCapability,omitempty"` - // ForceSendFields is a list of field names (e.g. "TopologyCapability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TopologyCapability") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfigured) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfigured - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfiguredTopologyCapability: [Output Only] How reliable -// this topology is configured to be, and why -// this group does or does not meet the requirements for the -// intended -// capability. -type InterconnectGroupConfiguredTopologyCapability struct { - IntendedCapabilityBlockers []*InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers `json:"intendedCapabilityBlockers,omitempty"` - // Possible values: - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - // "UNSPECIFIED" - SupportedSla string `json:"supportedSla,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntendedCapabilityBlockers") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntendedCapabilityBlockers") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfiguredTopologyCapability) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfiguredTopologyCapability - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers: -// [Output Only] Reasons why configuration.topologyCapability.sla differs -// from intent.topologyCapability. This list is empty if and only if those -// are the same. -type InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers struct { - // Possible values: - // "INCOMPATIBLE_METROS" - // "NOT_AVAILABLE" - // "NO_INTERCONNECTS" - // "NO_INTERCONNECTS_IN_METRO_AND_ZONE" - // "OTHER" - // "UNSPECIFIED" - BlockerType string `json:"blockerType,omitempty"` - // DocumentationLink: [Output Only] The url of Google Cloud public - // documentation explaining - // this requirement. This is set for every type of requirement. - DocumentationLink string `json:"documentationLink,omitempty"` - // Explanation: [Output Only] A human-readable explanation of this requirement - // and - // why it's not met. This is set for every type of requirement. - Explanation string `json:"explanation,omitempty"` - // Facilities: [Output Only] Facilities used to explain this blocker in more - // detail. - // Like physicalStructure.metros.facilities.facility, this is a numeric - // string like "5467". - Facilities []string `json:"facilities,omitempty"` - // Interconnects: [Output Only] Interconnects used to explain this blocker in - // more - // detail. - Interconnects []string `json:"interconnects,omitempty"` - // Metros: [Output Only] Metros used to explain this blocker in more - // detail. - // These are three-letter lowercase strings like "iad". A blocker - // like - // INCOMPATIBLE_METROS will specify the problematic metros in this - // field. - Metros []string `json:"metros,omitempty"` - // Zones: [Output Only] Zones used to explain this blocker in more detail. - // Zone names are "zone1" and/or "zone2". - Zones []string `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockerType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockerType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupIntent: The user's intent for this group. This is the only -// required field besides -// the name that must be specified on group creation. -type InterconnectGroupIntent struct { - // Possible values: - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - // "UNSPECIFIED" - TopologyCapability string `json:"topologyCapability,omitempty"` - // ForceSendFields is a list of field names (e.g. "TopologyCapability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TopologyCapability") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupIntent) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupIntent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupInterconnect: An Interconnect in this InterconnectGroup. -type InterconnectGroupInterconnect struct { - // Interconnect: The URL of an Interconnect in this group. All Interconnects in - // the group - // are unique. - Interconnect string `json:"interconnect,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructure: [Output Only] An analysis of the -// physical layout of Interconnects in this -// group. Every Interconnect in the group is shown once in this structure. -type InterconnectGroupPhysicalStructure struct { - Metros []*InterconnectGroupPhysicalStructureMetros `json:"metros,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metros") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metros") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructure) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetros: [Output Only] The metros -// Interconnects in this group are in. -type InterconnectGroupPhysicalStructureMetros struct { - Facilities []*InterconnectGroupPhysicalStructureMetrosFacilities `json:"facilities,omitempty"` - // Metro: [Output Only] The name of the metro, as a three-letter lowercase - // string - // like "iad". This is the first component of the location of - // Interconnects underneath this. - Metro string `json:"metro,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facilities") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facilities") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetros) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetros - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetrosFacilities: [Output Only] The -// facilities Interconnects in this metro are present -// in. -type InterconnectGroupPhysicalStructureMetrosFacilities struct { - // Facility: [Output Only] The ID of this facility, as a numeric string - // like - // "5467". This is the third component of the location of Interconnects - // in this facility. - Facility string `json:"facility,omitempty"` - Zones []*InterconnectGroupPhysicalStructureMetrosFacilitiesZones `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facility") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facility") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetrosFacilities) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetrosFacilities - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetrosFacilitiesZones: [Output Only] The -// zones that Interconnects in this facility are -// present in. -type InterconnectGroupPhysicalStructureMetrosFacilitiesZones struct { - // Interconnects: [Output Only] URLs of Interconnects in this redundancy group - // in the - // given metro, facility, and zone. - Interconnects []string `json:"interconnects,omitempty"` - // Zone: [Output Only] The name of the zone, either "zone1" or "zone2". - // This is the second component of the location of Interconnects in - // this facility. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnects") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetrosFacilitiesZones) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetrosFacilitiesZones - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsCreateMembers struct { - // IntentMismatchBehavior: How to behave when - // configured.topologyCapability.supportedSLA would not - // equal intent.topologyCapability after this call. - // - // Possible values: - // "CREATE" - // "REJECT" - // "UNSPECIFIED" - IntentMismatchBehavior string `json:"intentMismatchBehavior,omitempty"` - Interconnects []*InterconnectGroupsCreateMembersInterconnectInput `json:"interconnects,omitempty"` - // TemplateInterconnect: Parameters for the Interconnects to create. - TemplateInterconnect *InterconnectGroupsCreateMembersInterconnectInput `json:"templateInterconnect,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntentMismatchBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntentMismatchBehavior") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsCreateMembersInterconnectInput: LINT.IfChange -type InterconnectGroupsCreateMembersInterconnectInput struct { - // AdminEnabled: Administrative status of the interconnect. When this is set to - // true, the - // Interconnect is functional and can carry traffic. - // When set to false, no packets can be carried over the interconnect and - // no BGP routes are exchanged over it. By default, the status is set to - // true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // CustomerName: Customer name, to put in the Letter of Authorization as the - // party - // authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Facility: A zone-free location to use for all Interconnects created in this - // call, - // like "iad-1234". - Facility string `json:"facility,omitempty"` - // InterconnectType: Type of interconnect, which can take one of the following - // values: - // - // - PARTNER: A partner-managed interconnection shared between - // customers though a partner. - // - DEDICATED: A dedicated physical - // interconnection with the customer. - // - // Note that a value IT_PRIVATE - // has been deprecated in favor of DEDICATED. - // - // Possible values: - // "DEDICATED" - A dedicated physical interconnection with the customer. - // "IT_PRIVATE" - [Deprecated] A private, physical interconnection with the - // customer. - // "PARTNER" - A partner-managed interconnection shared between customers via - // partner. - InterconnectType string `json:"interconnectType,omitempty"` - // LinkType: Type of link requested, which can take one of the following - // values: - // - // - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - // - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - // - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 - // optics. - // - // Note that this field indicates the speed of each of the - // links in the bundle, not the speed of the entire bundle. - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - LinkType string `json:"linkType,omitempty"` - // Name: Name of the Interconnects to be created. This must be specified on - // the - // template and/or on each individual interconnect. The name, if not - // empty, - // must be 1-63 characters long, and comply with RFC1035. - // Specifically, any nonempty name must be 1-63 characters long and match - // the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the - // first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NocContactEmail: Email address to contact the customer NOC for operations - // and maintenance - // notifications regarding this Interconnect. If specified, this will be - // used for notifications in addition to all other forms described, such - // as - // Cloud Monitoring logs alerting and Cloud Notifications. This field - // is - // required for users who sign up for Cloud Interconnect using - // workforce identity federation. - NocContactEmail string `json:"nocContactEmail,omitempty"` - // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. This - // field specifies - // the location outside of Google's network that the interconnect is - // connected to. - RemoteLocation string `json:"remoteLocation,omitempty"` - // RequestedFeatures: Optional. List of features requested for this - // Interconnect connection, - // which can take one of the following values: - // - // - IF_MACSEC: If specified, then the connection is created on MACsec - // capable hardware ports. If not specified, non-MACsec capable ports will - // also be considered. - // - IF_CROSS_SITE_NETWORK: If specified, then the connection is created - // exclusively for Cross-Site Networking. The connection can not be used - // for - // Cross-Site Networking unless this feature is specified. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - RequestedFeatures []string `json:"requestedFeatures,omitempty"` - // RequestedLinkCount: Target number of physical links in the link bundle, as - // requested by the - // customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembersInterconnectInput) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembersInterconnectInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsCreateMembersRequest struct { - Request *InterconnectGroupsCreateMembers `json:"request,omitempty"` - // ForceSendFields is a list of field names (e.g. "Request") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Request") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembersRequest) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembersRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsGetOperationalStatusResponse: Response for the -// InterconnectGroupsGetOperationalStatusResponse. -type InterconnectGroupsGetOperationalStatusResponse struct { - Etag string `json:"etag,omitempty"` - Result *InterconnectGroupsOperationalStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsGetOperationalStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsGetOperationalStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectGroup resources. - Items []*InterconnectGroup `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectGroupsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsListResponseWarning: [Output Only] Informational warning -// message. -type InterconnectGroupsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectGroupsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsOperationalStatus: Request to get the status of the -// interconnect group with extra detail. -type InterconnectGroupsOperationalStatus struct { - // Configured: The configuration analysis, as returned by Get. - Configured *InterconnectGroupConfigured `json:"configured,omitempty"` - // GroupStatus: Summarizes the status of the group. - // - // Possible values: - // "DEGRADED" - // "FULLY_DOWN" - // "FULLY_UP" - // "GROUPS_STATUS_UNSPECIFIED" - GroupStatus string `json:"groupStatus,omitempty"` - // Intent: The intent of the resource, as returned by Get. - Intent *InterconnectGroupIntent `json:"intent,omitempty"` - InterconnectStatuses []*InterconnectGroupsOperationalStatusInterconnectStatus `json:"interconnectStatuses,omitempty"` - // Operational: The operational state of the group, including only active - // Interconnects. - Operational *InterconnectGroupConfigured `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "Configured") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Configured") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsOperationalStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsOperationalStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsOperationalStatusInterconnectStatus: The status of one -// Interconnect in the group. The order is arbitrary. -type InterconnectGroupsOperationalStatusInterconnectStatus struct { - // AdminEnabled: Whether the Interconnect is enabled. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Diagnostics: The diagnostics of the Interconnect, as returned by the - // existing - // get-diagnostics method. - Diagnostics *InterconnectDiagnostics `json:"diagnostics,omitempty"` - // Interconnect: The URL of the Interconnect being described. - Interconnect string `json:"interconnect,omitempty"` - // IsActive: Whether this interconnect is participating in the - // redundant - // configuration. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - // "IS_ACTIVE_UNSPECIFIED" - IsActive string `json:"isActive,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsOperationalStatusInterconnectStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsOperationalStatusInterconnectStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectList: Response to the list request, and contains a list of -// interconnects. -type InterconnectList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Interconnect resources. - Items []*Interconnect `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#interconnectList for - // lists of interconnects. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectListWarning: [Output Only] Informational warning message. -type InterconnectListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocation: Represents an Interconnect Attachment (VLAN) Location -// resource. -// -// You can use this resource to find location details about an -// Interconnect -// attachment (VLAN). For more information about interconnect attachments, -// read -// Creating VLAN Attachments. -type InterconnectLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, each - // line in - // the address is separated by a newline character. - Address string `json:"address,omitempty"` - // AvailabilityZone: [Output Only] Availability zone for this - // InterconnectLocation. Within a - // metropolitan area (metro), maintenance will not be simultaneously - // scheduled - // in more than one availability zone. Example: "zone1" or "zone2". - AvailabilityZone string `json:"availabilityZone,omitempty"` - // AvailableFeatures: [Output only] List of features available at this - // InterconnectLocation, - // which can take one of the following values: - // - // - IF_MACSEC - // - IF_CROSS_SITE_NETWORK - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - AvailableFeatures []string `json:"availableFeatures,omitempty"` - // AvailableLinkTypes: [Output only] List of link types available at this - // InterconnectLocation, - // which can take one of the following values: - // - // - LINK_TYPE_ETHERNET_10G_LR - // - LINK_TYPE_ETHERNET_100G_LR - // - LINK_TYPE_ETHERNET_400G_LR4 - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - AvailableLinkTypes []string `json:"availableLinkTypes,omitempty"` - // City: [Output Only] Metropolitan area designator that indicates which city - // an - // interconnect is located. - // For example: "Chicago, IL", "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - // Continent: [Output Only] Continent for this location, which can take one of - // the - // following values: - // - // - AFRICA - // - ASIA_PAC - // - EUROPE - // - NORTH_AMERICA - // - SOUTH_AMERICA - // - // Possible values: - // "AFRICA" - // "ASIA_PAC" - // "C_AFRICA" - // "C_ASIA_PAC" - // "C_EUROPE" - // "C_NORTH_AMERICA" - // "C_SOUTH_AMERICA" - // "EUROPE" - // "NORTH_AMERICA" - // "SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CrossSiteInterconnectInfos: [Output Only] A list of - // InterconnectLocation.CrossSiteInterconnectInfo - // objects, that describe where Cross-Site Interconnect wires may connect - // to - // from this location and associated connection parameters. - // Cross-Site - // Interconnect isn't allowed to locations which are not listed. - CrossSiteInterconnectInfos []*InterconnectLocationCrossSiteInterconnectInfo `json:"crossSiteInterconnectInfos,omitempty"` - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - // FacilityProvider: [Output Only] The name of the provider for this facility - // (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - // FacilityProviderFacilityId: [Output Only] A provider-assigned Identifier for - // this facility (e.g., - // Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#interconnectLocation - // for interconnect locations. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding - // with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo - // objects, that - // describe parameters pertaining to the relation between - // this - // InterconnectLocation and various Google Cloud regions. - RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SingleRegionProductionCriticalPeerLocations: [Output Only] URLs of the other - // locations that can pair up with this - // location to support Single-Region 99.99% SLA. E.g. iad-zone1-1 - // and - // iad-zone2-5467 are Single-Region 99.99% peer locations of each other. - SingleRegionProductionCriticalPeerLocations []string `json:"singleRegionProductionCriticalPeerLocations,omitempty"` - // Status: [Output Only] The status of this InterconnectLocation, which can - // take one - // of the following values: - // - // - CLOSED: The InterconnectLocation is closed and is unavailable for - // provisioning new Interconnects. - // - AVAILABLE: The InterconnectLocation is available for provisioning new - // Interconnects. - // - // Possible values: - // "AVAILABLE" - The InterconnectLocation is available for provisioning new - // Interconnects. - // "CLOSED" - The InterconnectLocation is closed for provisioning new - // Interconnects. - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocation) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationCrossSiteInterconnectInfo: Information about Cross-Site -// Interconnect wires which may be created -// between the containing location and another remote location. -type InterconnectLocationCrossSiteInterconnectInfo struct { - // City: The remote location for Cross-Site Interconnect wires. This specifies - // an - // InterconnectLocation city (metropolitan area designator), which itself - // may match multiple InterconnectLocations. - City string `json:"city,omitempty"` - // MaxSingleFlowGbps: The maximum gbps for a single flow to this metro. - // This limits the total bandwidth which may be configured per wire. - MaxSingleFlowGbps int64 `json:"maxSingleFlowGbps,omitempty"` - // ForceSendFields is a list of field names (e.g. "City") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "City") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationCrossSiteInterconnectInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationCrossSiteInterconnectInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationList: Response to the list request, and contains a list -// of interconnect locations. -type InterconnectLocationList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectLocation resources. - Items []*InterconnectLocation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#interconnectLocationList - // for lists of interconnect - // locations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectLocationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationListWarning: [Output Only] Informational warning -// message. -type InterconnectLocationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectLocationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectLocationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationRegionInfo: Information about any potential -// InterconnectAttachments between an -// Interconnect at a specific InterconnectLocation, and a specific -// Cloud -// Region. -type InterconnectLocationRegionInfo struct { - // ExpectedRttMs: Expected round-trip time in milliseconds, from this - // InterconnectLocation - // to a VM in this region. - ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` - // L2ForwardingEnabled: Identifies whether L2 Interconnect Attachments can be - // created in this - // region for interconnects that are in this location. - L2ForwardingEnabled bool `json:"l2ForwardingEnabled,omitempty"` - // LocationPresence: Identifies the network presence of this location. - // - // Possible values: - // "GLOBAL" - This region is not in any common network presence with - // this - // InterconnectLocation. - // "LOCAL_REGION" - This region shares the same regional network presence as - // this - // InterconnectLocation. - // "LP_GLOBAL" - [Deprecated] This region is not in any common network - // presence with - // this InterconnectLocation. - // "LP_LOCAL_REGION" - [Deprecated] This region shares the same regional - // network presence as - // this InterconnectLocation. - LocationPresence string `json:"locationPresence,omitempty"` - // Region: URL for the region of this location. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpectedRttMs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationRegionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsec: Configuration information for enabling Media Access -// Control security -// (MACsec) on this Cloud Interconnect connection between Google and -// your -// on-premises router. -type InterconnectMacsec struct { - // FailOpen: If set to true, the Interconnect connection is configured with - // ashould-secure MACsec security policy, that allows the Google - // router to fallback to cleartext traffic if the MKA session cannot - // be - // established. By default, the Interconnect connection is configured with - // amust-secure security policy that drops all traffic if the - // MKA session cannot be established with your router. - FailOpen bool `json:"failOpen,omitempty"` - // PreSharedKeys: Required. A keychain placeholder describing a set of named - // key objects - // along with their start times. A MACsec CKN/CAK is generated for each - // key in the key chain. Google router automatically picks the key with - // the most recent startTime when establishing or re-establishing a - // MACsec - // secure link. - PreSharedKeys []*InterconnectMacsecPreSharedKey `json:"preSharedKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailOpen") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailOpen") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsec) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecConfig: MACsec configuration information for the -// Interconnect connection. Contains -// the generated Connectivity Association Key Name (CKN) and the key (CAK) -// for -// this Interconnect connection. -type InterconnectMacsecConfig struct { - // PreSharedKeys: A keychain placeholder describing a set of named key - // objects - // along with their start times. A MACsec CKN/CAK is generated for each key - // in - // the key chain. Google router automatically picks the key with the - // most - // recent startTime when establishing or re-establishing a MACsec secure link. - PreSharedKeys []*InterconnectMacsecConfigPreSharedKey `json:"preSharedKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreSharedKeys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreSharedKeys") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecConfig) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecConfigPreSharedKey: Describes a pre-shared key used to -// setup MACsec in static connectivity -// association key (CAK) mode. -type InterconnectMacsecConfigPreSharedKey struct { - // Cak: An auto-generated Connectivity Association Key (CAK) for this key. - Cak string `json:"cak,omitempty"` - // Ckn: An auto-generated Connectivity Association Key Name (CKN) for this key. - Ckn string `json:"ckn,omitempty"` - // Name: User provided name for this pre-shared key. - Name string `json:"name,omitempty"` - // StartTime: User provided timestamp on or after which this key is valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cak") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cak") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecConfigPreSharedKey) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecConfigPreSharedKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecPreSharedKey: Describes a pre-shared key used to setup -// MACsec in static connectivity -// association key (CAK) mode. -type InterconnectMacsecPreSharedKey struct { - // Name: Required. A name for this pre-shared key. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot be - // a dash. - Name string `json:"name,omitempty"` - // StartTime: A RFC3339 timestamp on or after which the key is - // valid. startTime can be in the future. If the keychain has a single - // key, startTime can be omitted. If the keychain has multiple keys, - // startTime is mandatory for each key. The start times of keys must be - // in - // increasing order. The start times of two consecutive keys must be - // at least 6 hours apart. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecPreSharedKey) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecPreSharedKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectOutageNotification: Description of a planned outage on this -// Interconnect. -type InterconnectOutageNotification struct { - // AffectedCircuits: If issue_type is IT_PARTIAL_OUTAGE, a list of the - // Google-side circuit - // IDs that will be affected. - AffectedCircuits []string `json:"affectedCircuits,omitempty"` - // Description: A description about the purpose of the outage. - Description string `json:"description,omitempty"` - // EndTime: Scheduled end time for the outage (milliseconds since Unix - // epoch). - EndTime int64 `json:"endTime,omitempty,string"` - // IssueType: Form this outage is expected to take, which can take one of the - // following - // values: - // - // - OUTAGE: The Interconnect may be completely out of service for - // some or all of the specified window. - // - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole - // should remain up, but with reduced bandwidth. - // - // - // Note that the versions of this enum prefixed with "IT_" have been - // deprecated in favor of the unprefixed values. - // - // Possible values: - // "IT_OUTAGE" - [Deprecated] The Interconnect may be completely out of - // service for some - // or all of the specified window. - // "IT_PARTIAL_OUTAGE" - [Deprecated] Some circuits comprising the - // Interconnect will be out of - // service during the expected window. The interconnect as a whole - // should - // remain up, albeit with reduced bandwidth. - // "OUTAGE" - The Interconnect may be completely out of service for some or - // all of - // the specified window. - // "PARTIAL_OUTAGE" - Some circuits comprising the Interconnect will be out - // of service during - // the expected window. The interconnect as a whole should remain - // up, albeit with reduced bandwidth. - IssueType string `json:"issueType,omitempty"` - // Name: Unique identifier for this outage notification. - Name string `json:"name,omitempty"` - // Source: The party that generated this notification, which can take the - // following - // value: - // - // - GOOGLE: this notification as generated by Google. - // - // - // Note that the value of NSRC_GOOGLE has been deprecated in favor of - // GOOGLE. - // - // Possible values: - // "GOOGLE" - This notification was generated by Google. - // "NSRC_GOOGLE" - [Deprecated] This notification was generated by Google. - Source string `json:"source,omitempty"` - // StartTime: Scheduled start time for the outage (milliseconds since - // Unix - // epoch). - StartTime int64 `json:"startTime,omitempty,string"` - // State: State of this notification, which can take one of the following - // values: - // - // - ACTIVE: This outage notification is active. The event could be in - // the past, present, or future. See start_time and end_time for - // scheduling. - // - CANCELLED: The outage associated with this notification was cancelled - // before the outage was due to start. - // - COMPLETED: The outage associated with this notification is - // complete. - // - // - // Note that the versions of this enum prefixed with "NS_" have been - // deprecated in favor of the unprefixed values. - // - // Possible values: - // "ACTIVE" - This outage notification is active. The event could be in the - // future, - // present, or past. See start_time and end_time for scheduling. - // "CANCELLED" - The outage associated with this notification was cancelled - // before the - // outage was due to start. - // "COMPLETED" - The outage associated with this notification is complete. - // "NS_ACTIVE" - [Deprecated] This outage notification is active. The event - // could be in - // the future, present, or past. See start_time and end_time for - // scheduling. - // "NS_CANCELED" - [Deprecated] The outage associated with this notification - // was canceled - // before the outage was due to start. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "AffectedCircuits") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffectedCircuits") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectOutageNotification) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectOutageNotification - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectParams: Additional interconnect parameters. -type InterconnectParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectParams) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect Remote -// Location resource. -// -// You can use this resource to find remote location details about -// an -// Interconnect attachment (VLAN). -type InterconnectRemoteLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, each - // line in - // the address is separated by a newline character. - Address string `json:"address,omitempty"` - // AttachmentConfigurationConstraints: [Output Only] Subset of fields from - // InterconnectAttachment's - // |configurationConstraints| field that apply to all attachments for - // this - // remote location. - AttachmentConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"attachmentConfigurationConstraints,omitempty"` - // City: [Output Only] Metropolitan area designator that indicates which city - // an - // interconnect is located. - // For example: "Chicago, IL", "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - // Constraints: [Output Only] Constraints on the parameters for creating - // Cross-Cloud - // Interconnect and associated InterconnectAttachments. - Constraints *InterconnectRemoteLocationConstraints `json:"constraints,omitempty"` - // Continent: [Output Only] Continent for this location, which can take one of - // the - // following values: - // - // - AFRICA - // - ASIA_PAC - // - EUROPE - // - NORTH_AMERICA - // - SOUTH_AMERICA - // - // Possible values: - // "AFRICA" - // "ASIA_PAC" - // "EUROPE" - // "NORTH_AMERICA" - // "SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - // FacilityProvider: [Output Only] The name of the provider for this facility - // (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - // FacilityProviderFacilityId: [Output Only] A provider-assigned Identifier for - // this facility (e.g., - // Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#interconnectRemoteLocation for interconnect remote - // locations. - Kind string `json:"kind,omitempty"` - // Lacp: [Output Only] Link Aggregation Control Protocol (LACP) constraints, - // which - // can take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED - // - // Possible values: - // "LACP_SUPPORTED" - LACP_SUPPORTED: LACP is supported, and enabled by - // default on - // the Cross-Cloud Interconnect. - // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and is not be - // enabled on this - // port. GetDiagnostics shows bundleAggregationType as "static". GCP does - // not support LAGs without LACP, so requestedLinkCount must be 1. - Lacp string `json:"lacp,omitempty"` - // MaxLagSize100Gbps: [Output Only] - // The maximum number of 100 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 100 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_100_gbps. - MaxLagSize100Gbps int64 `json:"maxLagSize100Gbps,omitempty"` - // MaxLagSize10Gbps: [Output Only] - // The maximum number of 10 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 10 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_10_gbps. - MaxLagSize10Gbps int64 `json:"maxLagSize10Gbps,omitempty"` - // MaxLagSize400Gbps: [Output Only] - // The maximum number of 400 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 400 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_400_gbps. - MaxLagSize400Gbps int64 `json:"maxLagSize400Gbps,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding - // with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - // PermittedConnections: [Output Only] Permitted connections. - PermittedConnections []*InterconnectRemoteLocationPermittedConnections `json:"permittedConnections,omitempty"` - // RemoteService: [Output Only] Indicates the service provider present at the - // remote - // location. Example values: "Amazon Web Services", "Microsoft Azure". - RemoteService string `json:"remoteService,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] The status of this InterconnectRemoteLocation, which - // can take - // one of the following values: - // - // - CLOSED: The InterconnectRemoteLocation is closed and is unavailable - // for provisioning new Cross-Cloud Interconnects. - // - AVAILABLE: The - // InterconnectRemoteLocation is available for provisioning new - // Cross-Cloud Interconnects. - // - // Possible values: - // "AVAILABLE" - The InterconnectRemoteLocation is available for provisioning - // new - // Cross-Cloud Interconnects. - // "CLOSED" - The InterconnectRemoteLocation is closed for provisioning - // new - // Cross-Cloud Interconnects. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocation) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationConstraints struct { - // PortPairRemoteLocation: [Output Only] Port pair remote location constraints, - // which can take one - // of the following values: - // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - // PORT_PAIR_MATCHING_REMOTE_LOCATION. - // - // Google Cloud API refers only to individual ports, but the UI uses this - // field when ordering a pair of ports, to prevent users from - // accidentally - // ordering something that is incompatible with their cloud - // provider. - // Specifically, when ordering a redundant pair of Cross-Cloud - // Interconnect - // ports, and one of them uses a remote location - // with - // portPairMatchingRemoteLocation set to matching, the UI requires that - // both ports use the same remote location. - // - // Possible values: - // "PORT_PAIR_MATCHING_REMOTE_LOCATION" - If - // PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider - // allocates ports in pairs, and the user should choose the same - // remote - // location for both ports. - // "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - If - // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision - // a redundant pair of Cross-Cloud Interconnects using two different - // remote locations in the same city. - PortPairRemoteLocation string `json:"portPairRemoteLocation,omitempty"` - // PortPairVlan: [Output Only] Port pair VLAN constraints, which can take one - // of the - // following values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN - // - // Possible values: - // "PORT_PAIR_MATCHING_VLAN" - If PORT_PAIR_MATCHING_VLAN, the Interconnect - // for this attachment is - // part of a pair of ports that should have matching VLAN allocations. - // This occurs with Cross-Cloud Interconnect to Azure remote locations. - // While GCP's API does not explicitly group pairs of ports, the UI uses - // this field to ensure matching VLAN ids when configuring a redundant - // VLAN pair. - // "PORT_PAIR_UNCONSTRAINED_VLAN" - PORT_PAIR_UNCONSTRAINED_VLAN means there - // is no constraint. - PortPairVlan string `json:"portPairVlan,omitempty"` - // SubnetLengthRange: [Output Only] - // - // [min-length, max-length] - // - // The minimum and maximum value (inclusive) for the IPv4 subnet - // length. - // - // For example, an interconnectRemoteLocation for Azure has {min: - // 30, - // max: - // 30} because Azure requires /30 subnets. - // - // This range specifies the values supported by both cloud - // providers. - // Interconnect currently supports /29 and /30 IPv4 subnet lengths. If a - // remote cloud has no constraint on IPv4 subnet length, the range would - // thus be {min: 29, max: 30}. - SubnetLengthRange *InterconnectRemoteLocationConstraintsSubnetLengthRange `json:"subnetLengthRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "PortPairRemoteLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PortPairRemoteLocation") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationConstraintsSubnetLengthRange struct { - Max int64 `json:"max,omitempty"` - Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Max") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Max") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationConstraintsSubnetLengthRange) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationConstraintsSubnetLengthRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocationList: Response to the list request, and contains a -// list of interconnect remote -// locations. -type InterconnectRemoteLocationList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectRemoteLocation resources. - Items []*InterconnectRemoteLocation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectRemoteLocationList for lists of - // interconnect remote locations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token lets you get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectRemoteLocationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocationListWarning: [Output Only] Informational warning -// message. -type InterconnectRemoteLocationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectRemoteLocationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationPermittedConnections struct { - // InterconnectLocation: [Output Only] URL of an Interconnect location that is - // permitted to - // connect to this Interconnect remote location. - InterconnectLocation string `json:"interconnectLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectLocation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationPermittedConnections) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationPermittedConnections - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectsGetDiagnosticsResponse: Response for the -// InterconnectsGetDiagnosticsRequest. -type InterconnectsGetDiagnosticsResponse struct { - Result *InterconnectDiagnostics `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectsGetDiagnosticsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetDiagnosticsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectsGetMacsecConfigResponse: Response for the -// InterconnectsGetMacsecConfigRequest. -type InterconnectsGetMacsecConfigResponse struct { - // Etag: end_interface: MixerGetResponseWithEtagBuilder - Etag string `json:"etag,omitempty"` - Result *InterconnectMacsecConfig `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectsGetMacsecConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetMacsecConfigResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InternalIpAddress struct { - // Cidr: IP CIDR address or range. - Cidr string `json:"cidr,omitempty"` - // Owner: The owner of the internal IP address. - Owner string `json:"owner,omitempty"` - // Purpose: The purpose of the internal IP address if applicable. - Purpose string `json:"purpose,omitempty"` - // Region: The region of the internal IP address if applicable. - Region string `json:"region,omitempty"` - // Type: The type of the internal IP address. - // - // Possible values: - // "PEER_RESERVED" - Reserved IP ranges on peer networks. - // "PEER_USED" - Used IP ranges on peer networks, including peer subnetwork - // IP ranges. - // "REMOTE_RESERVED" - Reserved IP ranges on peer networks of peer networks. - // "REMOTE_USED" - Used IP ranges on peer networks of peer networks. - // "RESERVED" - Reserved IP ranges on local network. - // "SUBNETWORK" - Subnetwork IP ranges on local network. - // "TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cidr") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cidr") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InternalIpAddress) MarshalJSON() ([]byte, error) { - type NoMethod InternalIpAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InternalIpOwner struct { - // IpCidrRange: IP CIDR range being owned. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Owners: URLs of the IP owners of the IP CIDR range. - Owners []string `json:"owners,omitempty"` - // SystemOwned: Whether this IP CIDR range is reserved for system use. - SystemOwned bool `json:"systemOwned,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InternalIpOwner) MarshalJSON() ([]byte, error) { - type NoMethod InternalIpOwner - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IpAddressesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InternalIpAddress resources. - Items []*InternalIpAddress `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#ipAddressesList - // for IP addresses lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *IpAddressesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpAddressesList) MarshalJSON() ([]byte, error) { - type NoMethod IpAddressesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IpAddressesListWarning: [Output Only] Informational warning message. -type IpAddressesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*IpAddressesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpAddressesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod IpAddressesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IpAddressesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpAddressesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod IpAddressesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IpOwnerList: Contains a list of IP owners. -type IpOwnerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InternalIpOwner resources. - Items []*InternalIpOwner `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#ipOwnerList for - // lists of IP owners. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *IpOwnerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpOwnerList) MarshalJSON() ([]byte, error) { - type NoMethod IpOwnerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IpOwnerListWarning: [Output Only] Informational warning message. -type IpOwnerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*IpOwnerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpOwnerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod IpOwnerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IpOwnerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IpOwnerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod IpOwnerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Jwt: [Deprecated] JWT configuration for origin authentication. -// JWT configuration for origin authentication. -type Jwt struct { - // Audiences: A JWT containing any of these audiences will be accepted. The - // service name - // will be accepted if audiences is empty. - // Examples: bookstore_android.apps.googleusercontent.com, - // bookstore_web.apps.googleusercontent.com - Audiences []string `json:"audiences,omitempty"` - // Issuer: Identifies the issuer that issued the JWT, which is usually a URL or - // an - // email address. - // Examples: https://securetoken.google.com, - // 1234567-compute@developer.gserviceaccount.com - Issuer string `json:"issuer,omitempty"` - // JwksPublicKeys: The provider's public key set to validate the signature of - // the JWT. - JwksPublicKeys string `json:"jwksPublicKeys,omitempty"` - // JwtHeaders: jwt_headers and jwt_params define where to extract the JWT from - // an HTTP - // request. If no explicit location is specified, the following - // default - // locations are tried in order: - // - // 1. The Authorization header using the Bearer schema. See `here - // `_. Example: - // - // Authorization: Bearer . - // - // 2. `access_token` query parameter. See `this - // `_ - // - // Multiple JWTs can be verified for a request. Each JWT has to be - // extracted - // from the locations its issuer specified or from the default locations. - // - // This field is set if JWT is sent in a request header. This field - // specifies - // the header name. For example, if `header=x-goog-iap-jwt-assertion`, - // the - // header format will be x-goog-iap-jwt-assertion: . - JwtHeaders []*JwtHeader `json:"jwtHeaders,omitempty"` - // JwtParams: This field is set if JWT is sent in a query parameter. This field - // specifies - // the query parameter name. For example, if jwt_params[0] is jwt_token, - // the - // JWT format in the query parameter is /path?jwt_token=. - JwtParams []string `json:"jwtParams,omitempty"` - // ForceSendFields is a list of field names (e.g. "Audiences") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Audiences") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Jwt) MarshalJSON() ([]byte, error) { - type NoMethod Jwt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// JwtHeader: [Deprecated] This message specifies a header location to extract -// JWT token. -// This message specifies a header location to extract JWT token. -type JwtHeader struct { - // Name: The HTTP header name. - Name string `json:"name,omitempty"` - // ValuePrefix: The value prefix. The value format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " - // with a space at the end. - ValuePrefix string `json:"valuePrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s JwtHeader) MarshalJSON() ([]byte, error) { - type NoMethod JwtHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// License: Represents a License resource. -// -// A License represents billing and aggregate usage data forpublic -// andmarketplace images. -// -// *Caution* This resource is intended for -// -// use only by third-party partners who are creatingCloud Marketplace -// images. -type License struct { - // AllowedReplacementLicenses: Specifies licenseCodes of licenses that can - // replace this license. Note: - // such replacements are allowed even if removable_from_disk is false. - AllowedReplacementLicenses []string `json:"allowedReplacementLicenses,omitempty"` - // AppendableToDisk: If true, this license can be appended to an existing - // disk's set of - // licenses. - AppendableToDisk bool `json:"appendableToDisk,omitempty"` - // ChargesUseFee: [Output Only] Deprecated. This field no longer reflects - // whether a license - // charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional textual description of the resource; provided by - // the client - // when the resource is created. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IncompatibleLicenses: Specifies licenseCodes of licenses that are - // incompatible with this license. - // If a license is incompatible with this license, it cannot be attached to - // the same disk or image. - IncompatibleLicenses []string `json:"incompatibleLicenses,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` - // LicenseCode: [Output Only] The unique code used to attach this license to - // images, - // snapshots, and disks. - LicenseCode uint64 `json:"licenseCode,omitempty,string"` - // MinimumRetention: If set, this license will be unable to be removed or - // replaced once attached - // to a disk until the minimum_retention period has passed. - MinimumRetention *Duration `json:"minimumRetention,omitempty"` - // MultiTenantOnly: If true, this license can only be used on VMs on multi - // tenant nodes. - MultiTenantOnly bool `json:"multiTenantOnly,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long and - // comply withRFC1035. - Name string `json:"name,omitempty"` - // OsLicense: If true, indicates this is an OS license. Only one OS license can - // be - // attached to a disk or image at a time. - OsLicense bool `json:"osLicense,omitempty"` - // RemovableFromDisk: If true, this license can be removed from a disk's set of - // licenses, with no - // replacement license needed. - RemovableFromDisk bool `json:"removableFromDisk,omitempty"` - // RequiredCoattachedLicenses: Specifies the set of permissible coattached - // licenseCodes of licenses that - // satisfy the coattachment requirement of this license. At least one - // license - // from the set must be attached to the same disk or image as this license. - RequiredCoattachedLicenses []string `json:"requiredCoattachedLicenses,omitempty"` - // ResourceRequirements: [Input Only] Deprecated. - ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SoleTenantOnly: If true, this license can only be used on VMs on sole tenant - // nodes. - SoleTenantOnly bool `json:"soleTenantOnly,omitempty"` - // Transferable: If false, licenses will not be copied from the source resource - // when - // creating an image from a disk, disk from snapshot, or snapshot from disk. - Transferable bool `json:"transferable,omitempty"` - // UpdateTimestamp: [Output Only] Last update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllowedReplacementLicenses") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedReplacementLicenses") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s License) MarshalJSON() ([]byte, error) { - type NoMethod License - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicenseCode: Represents a License Code resource. -// -// A License Code is a unique identifier used to represent alicense -// resource. -// -// *Caution* This resource is intended for -// -// use only by third-party partners who are creatingCloud Marketplace -// images. -type LicenseCode struct { - // AllowedReplacementLicenses: Specifies licenseCodes of licenses that can - // replace this license. Note: - // such replacements are allowed even if removable_from_disk is false. - AllowedReplacementLicenses []string `json:"allowedReplacementLicenses,omitempty"` - // AppendableToDisk: If true, this license can be appended to an existing - // disk's set of - // licenses. - AppendableToDisk bool `json:"appendableToDisk,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IncompatibleLicenses: Specifies licenseCodes of licenses that are - // incompatible with this license. - // If a license is incompatible with this license, it cannot be attached to - // the same disk or image. - IncompatibleLicenses []string `json:"incompatibleLicenses,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#licenseCode - // for - // licenses. - Kind string `json:"kind,omitempty"` - // LicenseAlias: [Output Only] URL and description aliases of Licenses with the - // same - // License Code. - LicenseAlias []*LicenseCodeLicenseAlias `json:"licenseAlias,omitempty"` - // MinimumRetention: If set, this license will be unable to be removed or - // replaced once attached - // to a disk until the minimum_retention period has passed. - MinimumRetention *Duration `json:"minimumRetention,omitempty"` - // MultiTenantOnly: If true, this license can only be used on VMs on multi - // tenant nodes. - MultiTenantOnly bool `json:"multiTenantOnly,omitempty"` - // Name: [Output Only] Name of the resource. The name is 1-20 characters long - // and - // must be a valid 64 bit integer. - Name string `json:"name,omitempty"` - // OsLicense: If true, indicates this is an OS license. Only one OS license can - // be - // attached to a disk or image at a time. - OsLicense bool `json:"osLicense,omitempty"` - // RemovableFromDisk: If true, this license can be removed from a disk's set of - // licenses, with no - // replacement license needed. - RemovableFromDisk bool `json:"removableFromDisk,omitempty"` - // RequiredCoattachedLicenses: Specifies the set of permissible coattached - // licenseCodes of licenses that - // satisfy the coattachment requirement of this license. At least one - // license - // from the set must be attached to the same disk or image as this license. - RequiredCoattachedLicenses []string `json:"requiredCoattachedLicenses,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SoleTenantOnly: If true, this license can only be used on VMs on sole tenant - // nodes. - SoleTenantOnly bool `json:"soleTenantOnly,omitempty"` - // State: [Output Only] Current state of this License Code. - // - // Possible values: - // "DISABLED" - Machines are not allowed to attach boot disks with this - // License Code. - // Requests to create new resources with this license will be rejected. - // "ENABLED" - Use is allowed for anyone with USE_READ_ONLY access to this - // License Code. - // "RESTRICTED" - Use of this license is limited to a project whitelist. - // "STATE_UNSPECIFIED" - // "TERMINATED" - Reserved state. - State string `json:"state,omitempty"` - // Transferable: [Output Only] If true, the license will remain attached when - // creating - // images or snapshots from disks. Otherwise, the license is not transferred. - Transferable bool `json:"transferable,omitempty"` - // UpdateTimestamp: [Output Only] Last update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllowedReplacementLicenses") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedReplacementLicenses") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseCode) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicenseCodeLicenseAlias struct { - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` - // SelfLink: [Output Only] URL of license corresponding to this License Code. - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCodeLicenseAlias - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicenseResourceCommitment: Commitment for a particular license resource. -type LicenseResourceCommitment struct { - // Amount: The number of licenses you plan to purchase. - Amount int64 `json:"amount,omitempty,string"` - // CoresPerLicense: The number of cores per license. - CoresPerLicense string `json:"coresPerLicense,omitempty"` - // License: The applicable license URI. - License string `json:"license,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceCommitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicenseResourceRequirements struct { - // MinGuestCpuCount: [Input Only] Deprecated. This field no longer reflects the - // minimum number - // of guest cpus required to use the Instance. - MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // MinMemoryMb: [Input Only] Deprecated. This field no longer reflects the - // minimum memory - // required to use the Instance. - MinMemoryMb int64 `json:"minMemoryMb,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinGuestCpuCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseResourceRequirements) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceRequirements - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicensesListResponse struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of License resources. - Items []*License `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *LicensesListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicensesListResponseWarning: [Output Only] Informational warning message. -type LicensesListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*LicensesListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicensesListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListInstantSnapshotGroups: Contains a list of InstantSnapshotGroup -// resources. -type ListInstantSnapshotGroups struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstantSnapshotGroup resources. - Items []*InstantSnapshotGroup `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ListInstantSnapshotGroupsWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListInstantSnapshotGroups) MarshalJSON() ([]byte, error) { - type NoMethod ListInstantSnapshotGroups - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListInstantSnapshotGroupsWarning: [Output Only] Informational warning -// message. -type ListInstantSnapshotGroupsWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ListInstantSnapshotGroupsWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListInstantSnapshotGroupsWarning) MarshalJSON() ([]byte, error) { - type NoMethod ListInstantSnapshotGroupsWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ListInstantSnapshotGroupsWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListInstantSnapshotGroupsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ListInstantSnapshotGroupsWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListSnapshotGroups: Contains a list of SnapshotGroup resources. -type ListSnapshotGroups struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SnapshotGroup resources. - Items []*SnapshotGroup `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ListSnapshotGroupsWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListSnapshotGroups) MarshalJSON() ([]byte, error) { - type NoMethod ListSnapshotGroups - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListSnapshotGroupsWarning: [Output Only] Informational warning message. -type ListSnapshotGroupsWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ListSnapshotGroupsWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListSnapshotGroupsWarning) MarshalJSON() ([]byte, error) { - type NoMethod ListSnapshotGroupsWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ListSnapshotGroupsWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListSnapshotGroupsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ListSnapshotGroupsWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocalDisk struct { - // DiskCount: Specifies the number of such disks. - DiskCount int64 `json:"diskCount,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // DiskType: Specifies the desired disk type on the node. This disk type must - // be a - // local storage type (e.g.: local-ssd). - // Note that for nodeTemplates, this should be the name of the disk type - // and - // not its URL. - DiskType string `json:"diskType,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocalDisk) MarshalJSON() ([]byte, error) { - type NoMethod LocalDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocalizedMessage: Provides a localized error message that is safe to return -// to the user -// which can be attached to an RPC error. -type LocalizedMessage struct { - // Locale: The locale used following the specification defined - // at - // https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - Locale string `json:"locale,omitempty"` - // Message: The localized error message in the above locale. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locale") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locale") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocalizedMessage) MarshalJSON() ([]byte, error) { - type NoMethod LocalizedMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocationPolicy: Configuration for location policy among multiple possible -// locations -// (e.g. preferences for zone selection among zones in a single region). -type LocationPolicy struct { - // Locations: Location configurations mapped by location name. - // Currently only zone names are supported and must be represented as - // valid - // internal URLs, such as zones/us-central1-a. - Locations map[string]LocationPolicyLocation `json:"locations,omitempty"` - // TargetShape: Strategy for distributing VMs across zones in a region. - // - // Possible values: - // "ANY" - GCE picks zones for creating VM instances to fulfill the - // requested - // number of VMs within present resource constraints and to - // maximize - // utilization of unused zonal reservations. Recommended for batch - // workloads - // that do not require high availability. - // "ANY_SINGLE_ZONE" - GCE always selects a single zone for all the VMs, - // optimizing for resource - // quotas, available reservations and general capacity. Recommended for - // batch workloads that cannot tollerate distribution over multiple zones. - // This the default shape in Bulk Insert and Capacity Advisor APIs. - // "BALANCED" - GCE prioritizes acquisition of resources, scheduling VMs in - // zones - // where resources are available while distributing VMs as evenly as - // possible across allowed zones to minimize the impact of zonal - // failure. - // Recommended for highly available serving workloads. - TargetShape string `json:"targetShape,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocationPolicyLocation struct { - // Constraints: Constraints that the caller requires on the result - // distribution - // in this zone. - Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - // Names: Names of resources to be put in the location. - // Must contain unique, correct resource names. - // If used, targetShape must be left unset. - Names []string `json:"names,omitempty"` - // Preference: Preference for a given location. Set to either ALLOW orDENY. - // - // Possible values: - // "ALLOW" - Location is allowed for use. - // "DENY" - Location is prohibited. - // "PREFERENCE_UNSPECIFIED" - Default value, unused. - Preference string `json:"preference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Constraints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Constraints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicyLocation) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocationPolicyLocationConstraints: Per-zone constraints on location policy -// for this zone. -type LocationPolicyLocationConstraints struct { - // MaxCount: Maximum number of items that are allowed to be placed in this - // zone. - // The value must be non-negative. - MaxCount int64 `json:"maxCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicyLocationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImage: Represents a machine image resource. -// -// A machine image is a Compute Engine resource that stores all -// the -// configuration, metadata, permissions, and data from one or more -// disks -// required to create a Virtual machine (VM) instance. For more information, -// seeMachine images. -type MachineImage struct { - // CreationTimestamp: [Output Only] The creation timestamp for this machine - // image inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GuestFlush: [Input Only] Whether to attempt an application consistent - // machine image by - // informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - // Id: [Output Only] A unique identifier for this machine image. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // InstanceProperties: [Output Only] Properties of source instance - InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // Kind: [Output Only] The resource type, which is alwayscompute#machineImage - // for machine image. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this machine - // image, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // machine image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this machine image. These can be later modified - // by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // MachineImageEncryptionKey: Encrypts the machine image using - // acustomer-supplied - // encryption key. - // - // After you encrypt a machine image using a customer-supplied key, you - // must - // provide the same key if you use the machine image later. For example, - // you - // must provide the encryption key when you create an instance from - // the - // encrypted machine image in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata of - // the - // machine image. - // - // If you do not provide an encryption key when creating the machine - // image, - // then the machine image will be encrypted using an automatically - // generated - // key and you do not need to provide a key to use the machine image later. - MachineImageEncryptionKey *CustomerEncryptionKey `json:"machineImageEncryptionKey,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional parameters that are passed in - // the request, but are - // not persisted in the resource. - Params *MachineImageParams `json:"params,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SavedDisks: An array of Machine Image specific properties for disks attached - // to the - // source instance - SavedDisks []*SavedDisk `json:"savedDisks,omitempty"` - // SelfLink: [Output Only] The URL for this machine image. The server defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceDiskEncryptionKeys: [Input Only] Thecustomer-supplied - // encryption key of the disks attached to the source instance. Required - // if the source disk is protected by a customer-supplied encryption key. - SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` - // SourceInstance: The source instance used to create the machine image. You - // can provide this - // as a partial or full URL to the resource. For example, the following - // are - // valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - // SourceInstanceProperties: [Output Only] DEPRECATED: Please use - // instance_properties - // instead for source instance related properties. New properties will not - // be - // added to this field. - SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"` - // Status: [Output Only] The status of the machine image. One of the following - // values:INVALID, CREATING, READY,DELETING, and UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - // StorageLocations: The regional or multi-regional Cloud Storage bucket - // location where themachine image is - // stored. - StorageLocations []string `json:"storageLocations,omitempty"` - // TotalStorageBytes: [Output Only] Total size of the storage used by the - // machine image. - TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImage) MarshalJSON() ([]byte, error) { - type NoMethod MachineImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImageList: A list of machine images. -type MachineImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineImage resources. - Items []*MachineImage `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#machineImagesListResponse for machine image lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineImageListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageList) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImageListWarning: [Output Only] Informational warning message. -type MachineImageListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineImageListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineImageListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImageParams: Machine Image parameters -type MachineImageParams struct { - // ExcludedDisks: Input only. [Input Only] Specifies the list of disk device - // names that must be - // excluded from the new machine image. - ExcludedDisks []string `json:"excludedDisks,omitempty"` - // IncludedDisks: Input only. [Input Only] Specifies the list of disk device - // names that must be - // included with the new machine image. - IncludedDisks []string `json:"includedDisks,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExcludedDisks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExcludedDisks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageParams) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineType: Represents a Machine Type resource. -// -// You can use specific machine types for your VM instances based on -// performance -// and pricing requirements. For more information, readMachine Types. -type MachineType struct { - // Accelerators: [Output Only] A list of accelerator configurations assigned to - // this - // machine type. - Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` - // Architecture: [Output Only] The architecture of the machine type. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // BundledLocalSsds: [Output Only] The configuration of bundled local SSD for - // the machine type. - BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // machine type. - // Only applicable if the machine type is unavailable. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // GuestCpus: [Output Only] The number of virtual CPUs that are available to - // the - // instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IsSharedCpu: [Output Only] Whether this machine type has a shared CPU. - // SeeShared-core machine - // types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - // Kind: [Output Only] The type of the resource. Alwayscompute#machineType for - // machine types. - Kind string `json:"kind,omitempty"` - // MaximumPersistentDisks: [Output Only] Maximum persistent disks allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent disks - // size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - // MemoryMb: [Output Only] The amount of physical memory available to the - // instance, - // defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Zone: [Output Only] The name of the zone where the machine type - // resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineType) MarshalJSON() ([]byte, error) { - type NoMethod MachineType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAccelerators struct { - // GuestAcceleratorCount: Number of accelerator cards exposed to the guest. - GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` - // GuestAcceleratorType: The accelerator type resource name, not a full URL, - // e.g.nvidia-tesla-t4. - GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAcceleratorCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAccelerators) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAccelerators - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#machineTypeAggregatedList for aggregated lists of - // machine types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type MachineTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeListWarning: [Output Only] Informational warning message. -type MachineTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] A list of machine types contained in this scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // machine types - // list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypesScopedListWarning: [Output Only] An informational warning that -// appears when the machine types -// list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedInstance: A Managed Instance resource. -type ManagedInstance struct { - // AllInstancesConfig: [Output Only] Current all-instances configuration - // revision applied to this - // instance. - AllInstancesConfig *ManagedInstanceAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // CurrentAction: [Output Only] The current action that the managed instance - // group has - // scheduled for the instance. Possible values: - // - // - NONE The instance is running, and the managed - // instance group does not have any scheduled actions for this instance. - // - CREATING The managed instance group is creating this - // instance. If the group fails to create this instance, it will try again - // until it is successful. - // - CREATING_WITHOUT_RETRIES The managed instance group - // is attempting to create this instance only once. If the group fails - // to create this instance, it does not try again and the group'stargetSize - // value is decreased instead. - // - RECREATING The managed instance group is recreating - // this instance. - // - DELETING The managed instance group is permanently - // deleting this instance. - // - ABANDONING The managed instance group is abandoning - // this instance. The instance will be removed from the instance group - // and from any target pools that are associated with this group. - // - RESTARTING The managed instance group is restarting - // the instance. - // - REFRESHING The managed instance group is applying - // configuration changes to the instance without stopping it. For example, - // the group can update the target pool list for an instance without - // stopping that instance. - // - VERIFYING The managed instance group has created the - // instance and it is in the process of being verified. - // - // Possible values: - // "ABANDONING" - The managed instance group is abandoning this instance. The - // instance - // will be removed from the instance group and from any target pools that - // are associated with this group. - // "CREATING" - The managed instance group is creating this instance. If the - // group - // fails to create this instance, it will try again until it is - // successful. - // "CREATING_ATOMICALLY" - The managed instance group is creating this - // instance atomically. - // "CREATING_WITHOUT_RETRIES" - The managed instance group is attempting to - // create this instance - // only once. If the group fails to create this instance, it does - // not try again and the group's targetSize value is - // decreased. - // "DELETING" - The managed instance group is permanently deleting this - // instance. - // "NONE" - The managed instance group has not scheduled any actions for - // this - // instance. - // "QUEUING" - The managed instance group is queuing this instance. - // "RECREATING" - The managed instance group is recreating this instance. - // "REFRESHING" - The managed instance group is applying configuration - // changes to the - // instance without stopping it. For example, the group can update the - // target pool list for an instance without stopping that instance. - // "RESTARTING" - The managed instance group is restarting this instance. - // "RESUMING" - The managed instance group is resuming this instance. - // "STARTING" - The managed instance group is starting this instance. - // "STOPPING" - The managed instance group is stopping this instance. - // "SUSPENDING" - The managed instance group is suspending this instance. - // "VERIFYING" - The managed instance group is verifying this already created - // instance. - // Verification happens every time the instance is (re)created or restarted - // and consists of: - // 1. Waiting until health check specified as part of this managed instance - // group's autohealing policy reports HEALTHY. - // Note: Applies only if autohealing policy has a health check specified - // 2. Waiting for addition verification steps performed as post-instance - // creation (subject to future extensions). - CurrentAction string `json:"currentAction,omitempty"` - CurrentActionDetails *ManagedInstanceCurrentActionDetails `json:"currentActionDetails,omitempty"` - // Id: [Output only] The unique identifier for this resource. This field is - // empty - // when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - // Instance: [Output Only] The URL of the instance. The URL can exist even if - // the - // instance has not yet been created. - Instance string `json:"instance,omitempty"` - // InstanceFlexibilityOverride: [Output Only] The overrides to instance - // properties resulting from - // InstanceFlexibilityPolicy. - InstanceFlexibilityOverride *ManagedInstanceInstanceFlexibilityOverride `json:"instanceFlexibilityOverride,omitempty"` - // InstanceHealth: [Output Only] Health state of the instance per health-check. - InstanceHealth []*ManagedInstanceInstanceHealth `json:"instanceHealth,omitempty"` - // InstanceStatus: [Output Only] The status of the instance. This field is - // empty when - // the instance does not exist. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - InstanceStatus string `json:"instanceStatus,omitempty"` - // InstanceTemplate: [Output Only] The intended template of the instance. This - // field is empty - // when current_action is one of { DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // LastAttempt: [Output Only] Information about the last attempt to create or - // delete - // the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - // Name: [Output Only] The name of the instance. The name always exists even if - // the - // instance has not yet been created. - Name string `json:"name,omitempty"` - // PreservedStateFromConfig: [Output Only] Preserved state applied from - // per-instance config - // for this instance. - PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"` - // PreservedStateFromPolicy: [Output Only] Preserved state generated based on - // stateful policy - // for this instance. - PreservedStateFromPolicy *PreservedState `json:"preservedStateFromPolicy,omitempty"` - // PropertiesFromFlexibilityPolicy: [Output Only] Instance properties selected - // for this instance resulting from - // InstanceFlexibilityPolicy. - PropertiesFromFlexibilityPolicy *ManagedInstancePropertiesFromFlexibilityPolicy `json:"propertiesFromFlexibilityPolicy,omitempty"` - // Scheduling: [Output Only] Information about the termination timestamp of the - // instance, - // if applicable. - Scheduling *ManagedInstanceScheduling `json:"scheduling,omitempty"` - // SizeInUnit: [Output only] The size of the VM represented by this Managed - // Instance. - // This is how much this Managed Instance contributes to the - // size of the group. - SizeInUnit float64 `json:"sizeInUnit,omitempty"` - // Tag: [Output Only] Tag describing the version. - Tag string `json:"tag,omitempty"` - // TargetStatus: [Output Only] The eventual status of the instance. The - // instance group - // manager will not be identified as stable till each managed instance - // reaches - // its targetStatus. - // - // Possible values: - // "ABANDONED" - The managed instance will eventually be ABANDONED, i.e. - // dissociated - // from the managed instance group. - // "DELETED" - The managed instance will eventually be DELETED. - // "RUNNING" - The managed instance will eventually reach status RUNNING. - // "STOPPED" - The managed instance will eventually reach status TERMINATED. - // "SUSPENDED" - The managed instance will eventually reach status SUSPENDED. - TargetStatus string `json:"targetStatus,omitempty"` - // Version: [Output Only] Intended version of this instance. - Version *ManagedInstanceVersion `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstance) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ManagedInstance) UnmarshalJSON(data []byte) error { - type NoMethod ManagedInstance - var s1 struct { - SizeInUnit gensupport.JSONFloat64 `json:"sizeInUnit"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SizeInUnit = float64(s1.SizeInUnit) - return nil -} - -type ManagedInstanceAllInstancesConfig struct { - // Revision: [Output Only] Current all-instances configuration revision. - // This value is in RFC3339 text format. - Revision string `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Revision") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Revision") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceCurrentActionDetails struct { - MethodName string `json:"methodName,omitempty"` - // Trigger: [Output Only] Details of the current action that the managed - // instance - // group has scheduled for the instance. Contains trigger for the - // current - // action, and methodName in case it was triggered by API call. Possible - // values for trigger: - // - // - API Any API call. - // - PROACTIVE_UPDATE Proactive updater scheduled an update - // on this managed instance. - // - AUTOSCALING Instance being deleted/created after a - // decision from the Autoscaler. - // - REDISTRIBUTION The regional managed instance group is - // moving instances between zones to restore balance. - // - STANDBY_REFILL The managed instance group is refilling - // the Standby Pool (stopped/suspended virtual machines) after scale - // up. - // - MAINTENANCE Manual maintenance. - // - FAILED_CREATION The managed instance group is handling - // failed instance creation. - // - INSTANCE_FAILURE The managed instance group is handling - // instance failure, according to - // the Instance Lifecycle Policy. - // - FAILED_HEALTH_CHECK The managed instance group is - // handling failed health check, according to the Instance Lifecycle - // Policy. - // - TERMINATION_TIMESTAMP Instance reached termination time, - // thus managed instance group stops/deletes it. - // - // Possible values: - // "API" - Any API call. - // "AUTOSCALING" - Instance being deleted/created after a decision from the - // Autoscaler. - // "FAILED_CREATION" - The managed instance group is handling failed instance - // creation. - // "FAILED_HEALTH_CHECK" - The managed instance group is handling failed - // health check, according - // to the Instance Lifecycle Policy. - // "INSTANCE_FAILURE" - The managed instance group is handling instance - // failure, according to - // the Instance Lifecycle Policy. - // "MAINTENANCE" - Manual maintenance. - // "NONE" - Default value, not visible externally. - // "PROACTIVE_UPDATE" - Proactive updater scheduled an update on this managed - // instance. - // "REDISTRIBUTION" - The regional managed instance group is moving instances - // between zones - // to restore balance. - // "STANDBY_REFILL" - The managed instance group is refilling the Standby - // Pool - // (stopped/suspended virtual machines) after scale up. - // "TERMINATION_TIMESTAMP" - Instance reached termination time, thus managed - // instance group - // stops/deletes it. - Trigger string `json:"trigger,omitempty"` - // ForceSendFields is a list of field names (e.g. "MethodName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MethodName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceCurrentActionDetails) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceCurrentActionDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceInstanceFlexibilityOverride struct { - // Disks: List of disks to be attached to the instance. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineType: The machine type to be used for this instance. - MachineType string `json:"machineType,omitempty"` - // MinCpuPlatform: Name of the minimum CPU platform to be used by this - // instance. - // e.g. 'Intel Ice Lake'. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ProvisioningModel: The provisioning model to be used for this instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceInstanceFlexibilityOverride) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceInstanceFlexibilityOverride - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceInstanceHealth struct { - // DetailedHealthState: [Output Only] The current detailed instance health - // state. - // - // Possible values: - // "DRAINING" - The instance is being drained. The existing connections to - // the instance - // have time to complete, but the new ones are being refused. - // "HEALTHY" - The instance is reachable i.e. a connection to the application - // health - // checking endpoint can be established, and conforms to the - // requirements - // defined by the health check. - // "TIMEOUT" - The instance is unreachable i.e. a connection to the - // application health - // checking endpoint cannot be established, or the server does not - // respond - // within the specified timeout. - // "UNHEALTHY" - The instance is reachable, but does not conform to the - // requirements - // defined by the health check. - // "UNKNOWN" - The health checking system is aware of the instance but its - // health is - // not known at the moment. - DetailedHealthState string `json:"detailedHealthState,omitempty"` - // HealthCheck: [Output Only] The URL for the health check that verifies - // whether the - // instance is healthy. - HealthCheck string `json:"healthCheck,omitempty"` - // HealthState: [Output Only] The current instance health state. - // This field will not get promoted to beta/GA and might be removed from - // alpha APIs after 01/12/2019. Please use detailed_health_state field - // instead. - // - // Possible values: - // "HEALTHY" - The instance is reachable i.e. a connection to the application - // health - // checking endpoint can be established, and conforms to the - // requirements - // defined by the health check. - // "UNHEALTHY" - The instance is reachable, but does not conform to the - // requirements - // defined by the health check. - HealthState string `json:"healthState,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetailedHealthState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetailedHealthState") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceInstanceHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to create - // or - // delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttempt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors during -// the last attempt to create or -// delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*ManagedInstanceLastAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstancePropertiesFromFlexibilityPolicy struct { - // Disks: List of disks to be attached to the instance. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineType: The machine type to be used for this instance. - MachineType string `json:"machineType,omitempty"` - // MinCpuPlatform: Name of the minimum CPU platform to be used by this - // instance. - // e.g. 'Intel Ice Lake'. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ProvisioningModel: The provisioning model to be used for this instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstancePropertiesFromFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstancePropertiesFromFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceScheduling struct { - // TerminationTimestamp: [Output Only] The timestamp at which the managed - // instance will be - // terminated. This is in RFC3339 text format. - TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "TerminationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TerminationTimestamp") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceScheduling) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceScheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceVersion struct { - // InstanceTemplate: [Output Only] The intended template of the instance. This - // field is empty - // when current_action is one of { DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Name: [Output Only] Name of the version. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceVersion) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve the resource. - Fingerprint string `json:"fingerprint,omitempty"` - // Items: Array of key/value pairs. The total size of all keys and values must - // be - // less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#metadata - // for metadata. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Metadata) MarshalJSON() ([]byte, error) { - type NoMethod Metadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataItems: Metadata -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. - // This is reflected as part of a URL in the metadata server. Additionally, - // to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - // Value: Value for the metadata entry. These are free-form strings, and - // only - // have meaning as interpreted by the image running in the instance. The - // only restriction placed on values is that their size must be less than - // or equal to 262144 bytes (256 KiB). - Value *string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataItems) MarshalJSON() ([]byte, error) { - type NoMethod MetadataItems - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataCredentialsFromPlugin: [Deprecated] Custom authenticator -// credentials. -// Custom authenticator credentials. -type MetadataCredentialsFromPlugin struct { - // Name: Plugin name. - Name string `json:"name,omitempty"` - // StructConfig: A text proto that conforms to a Struct type definition - // interpreted by the - // plugin. - StructConfig string `json:"structConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataCredentialsFromPlugin) MarshalJSON() ([]byte, error) { - type NoMethod MetadataCredentialsFromPlugin - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataFilter: Opaque filter criteria used by load balancers to restrict -// routing -// configuration to a limited set of load balancing proxies. Proxies -// and -// sidecars involved in load balancing would typically present metadata to -// the -// load balancers that need to match criteria specified here. If a match -// takes -// place, the relevant configuration is made available to those -// proxies. -// -// For each metadataFilter in this list, if itsfilterMatchCriteria is set to -// MATCH_ANY, at least -// one of thefilterLabels must match the corresponding label provided in -// the metadata. If its filterMatchCriteria is set to -// MATCH_ALL, then all of its filterLabels must match with -// corresponding labels provided in the metadata. -// -// An example for using metadataFilters would be: if -// load balancing involves -// Envoys, they receive routing configuration when values inmetadataFilters -// match values supplied in of their XDS requests to loadbalancers. -type MetadataFilter struct { - // FilterLabels: The list of label value pairs that must match labels in the - // provided - // metadata based on filterMatchCriteria - // - // This list must not be empty and can have at the most 64 entries. - FilterLabels []*MetadataFilterLabelMatch `json:"filterLabels,omitempty"` - // FilterMatchCriteria: Specifies how individual filter label matches - // within the list of filterLabels and contributes toward the - // overall metadataFilter match. - // - // Supported values are: - // - // - MATCH_ANY: at least one of the filterLabels - // must have a matching label in the provided metadata. - // - MATCH_ALL: all filterLabels must have - // matching labels in the provided metadata. - // - // Possible values: - // "MATCH_ALL" - Specifies that all filterLabels must match for - // themetadataFilter to be considered a match. - // "MATCH_ANY" - Specifies that any filterLabel must match for - // themetadataFilter to be considered a match. - // "NOT_SET" - Indicates that the match criteria was not set. AmetadataFilter - // must never be created with this value. - FilterMatchCriteria string `json:"filterMatchCriteria,omitempty"` - // ForceSendFields is a list of field names (e.g. "FilterLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FilterLabels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataFilter) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataFilterLabelMatch: MetadataFilter label name value pairs that are -// expected -// to match corresponding labels presented as metadata to the load balancer. -type MetadataFilterLabelMatch struct { - // Name: Name of metadata label. - // - // The name can have a maximum length of 1024 characters and must be at - // least 1 character long. - Name string `json:"name,omitempty"` - // Value: The value of the label must match the specified value. - // - // value can have a maximum length of 1024 characters. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataFilterLabelMatch) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilterLabelMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Money: Represents an amount of money with its currency type. -type Money struct { - // CurrencyCode: The three-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode,omitempty"` - // Nanos: Number of nano (10^-9) units of the amount. - // The value must be between -999,999,999 and +999,999,999 inclusive. - // If `units` is positive, `nanos` must be positive or zero. - // If `units` is zero, `nanos` can be positive, zero, or negative. - // If `units` is negative, `nanos` must be negative or zero. - // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - Nanos int64 `json:"nanos,omitempty"` - // Units: The whole units of the amount. - // For example if `currencyCode` is "USD", then 1 unit is one US dollar. - Units int64 `json:"units,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CurrencyCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrencyCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Money) MarshalJSON() ([]byte, error) { - type NoMethod Money - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMig: Multi-MIG represents a group of managed instance groups. -type MultiMig struct { - // CreationTimestamp: [Output only] The creation timestamp of this multi-MIG in - // RFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output only] The unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#multiMig for - // multi-MIGs. - Kind string `json:"kind,omitempty"` - // Name: The name of the multi-MIG. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Region: [Output only] The URL of the region where the resource resides. You - // must - // specify this field as part of the HTTP request URL. You cannot set - // the - // region as a field in the request body. - Region string `json:"region,omitempty"` - // ResourcePolicies: Resource policies for this multi-MIG. - ResourcePolicies *MultiMigResourcePolicies `json:"resourcePolicies,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - Status *MultiMigStatus `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMig) MarshalJSON() ([]byte, error) { - type NoMethod MultiMig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigMember: Represents a Multi-MIG member resource. -type MultiMigMember struct { - // CreationTimestamp: [Output Only] Creation timestamp of this multi-MIG member - // inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Id: [Output only] The unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. Alwayscompute#multiMigMember for a list of - // multi-MIG members. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of this multi-MIG member generated by - // Google Compute Engine. - Name string `json:"name,omitempty"` - // Region: [Output Only] The URL of the region where the multi-MIG resides. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of this multi-MIG member - Status *MultiMigMemberStatus `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigMember) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigMember - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigMemberList struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of multi-MIG member resources. - Items []*MultiMigMember `json:"items,omitempty"` - // Kind: Type of the resource. Alwayscompute#multiMigMember for a list of - // multi-MIG members. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *MultiMigMemberListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigMemberList) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigMemberList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigMemberListWarning: Informational warning message. -type MultiMigMemberListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MultiMigMemberListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigMemberListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigMemberListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigMemberListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigMemberListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigMemberListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigMemberStatus struct { - // InstanceGroupManager: [Output Only] URL of member instance group manager - InstanceGroupManager string `json:"instanceGroupManager,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroupManager") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroupManager") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigMemberStatus) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigMemberStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigResourcePolicies: Resource policies message for a multi-MIG. -// Specifies the workload policy -// configuration of the multi-MIG. -type MultiMigResourcePolicies struct { - // WorkloadPolicy: The URL of the workload policy for this multi-MIG. - // It can be a full or partial URL. For example, the following are - // all valid URLs to a workload policy: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - projects/project/regions/region/resourcePolicies/resourcePolicy - // - regions/region/resourcePolicies/resourcePolicy - WorkloadPolicy string `json:"workloadPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkloadPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigResourcePolicies) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigResourcePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatus struct { - // AppliedAcceleratorTopologies: [Output Only] The accelerator topology applied - // to this multi-MIG. - // Currently only one accelerator topology is supported. - AppliedAcceleratorTopologies []*MultiMigStatusAcceleratorTopology `json:"appliedAcceleratorTopologies,omitempty"` - MemberInstanceGroupManagers []string `json:"memberInstanceGroupManagers,omitempty"` - // MembersCount: [Output Only] The number of instance group manager members in - // this - // multi-MIG. - MembersCount int64 `json:"membersCount,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AppliedAcceleratorTopologies") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppliedAcceleratorTopologies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatus) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopology struct { - // AcceleratorTopology: [Output Only] Topology in the format of: "16x16", - // "4x4x4", etc. - // The value is the same as configured in the WorkloadPolicy. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // AcceleratorTopologyState: [Output Only] The state of the accelerator - // topology. - // - // Possible values: - // "ACTIVATING" - The accelerator topology is being activated. - // "ACTIVE" - The accelerator topology is active. - // "ACTIVE_DEGRADED" - The accelerator topology is active but operating in - // degraded mode. - // "DEACTIVATING" - The accelerator topology is being deactivated. - // "FAILED" - The accelerator topology failed. - // "INCOMPLETE" - The configuration is incomplete and the accelerator - // topology cannot - // be activated due to insufficient number of running VMs. - AcceleratorTopologyState string `json:"acceleratorTopologyState,omitempty"` - // AcceleratorTopologyStateLastCheck: [Output Only] The result of the latest - // accelerator topology state - // check. - AcceleratorTopologyStateLastCheck *MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck `json:"acceleratorTopologyStateLastCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopology) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck struct { - // Error: [Output Only] Encountered errors on the last state check. - Error *MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError `json:"error,omitempty"` - // Timestamp: [Output Only] Timestamp is shown only if there is an error. The - // field - // has // RFC3339 // - // text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError: -// [Output Only] Encountered errors on the last state check. -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsList struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of multi-MIGs in the specified project and region. - Items []*MultiMig `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // formaxResults, use the nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *MultiMigsListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsList) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigsListWarning: Informational warning message. -type MultiMigsListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MultiMigsListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MutualTls: [Deprecated] Configuration for the mutual Tls mode for peer -// authentication. -// Configuration for the mutual Tls mode for peer authentication. -type MutualTls struct { - // Mode: Specifies if the server TLS is configured to be strict or permissive. - // This - // field can be set to one of the following: - // STRICT: Client certificate must be presented, connection is in - // TLS. - // PERMISSIVE: Client certificate can be omitted, connection can be either - // plaintext or TLS. - // - // Possible values: - // "INVALID" - // "PERMISSIVE" - Client certificate can be omitted, connection can be either - // plaintext or - // TLS. - // "STRICT" - Client certificate must be presented, connection is in TLS. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MutualTls) MarshalJSON() ([]byte, error) { - type NoMethod MutualTls - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: <"http", 80>. -type NamedPort struct { - // Name: The name for this named port. - // The name must be 1-63 characters long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NamedPort) MarshalJSON() ([]byte, error) { - type NoMethod NamedPort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NamedSet struct { - // Description: An optional description of named set. - Description string `json:"description,omitempty"` - // Elements: CEL expressions that are comparable to constructs of this set's - // type - // (see Policy Language). - Elements []*Expr `json:"elements,omitempty"` - // Fingerprint: A fingerprint for the Named Set being applied to this Router, - // which is - // essentially a hash of the Named Set used for optimistic locking. - // The fingerprint is initially generated by Compute Engine and changes - // after every request to modify or update the Named Set. You must - // always - // provide an up-to-date fingerprint hash in order to update or - // change - // labels. - // - // To see the latest fingerprint, make a getNamedSet() request - // to retrieve a Named Set. - Fingerprint string `json:"fingerprint,omitempty"` - // Name: This set's name, which must be a resource ID segment and unique within - // all - // named sets owned by the Router. Name should conform to RFC1035. - Name string `json:"name,omitempty"` - // Type: This named set's type - // - // Possible values: - // "NAMED_SET_TYPE_COMMUNITY" - The Named Set is a Community Named Set. - // "NAMED_SET_TYPE_PREFIX" - The Named Set is a Prefix Named Set. - Type string `json:"type,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NamedSet) MarshalJSON() ([]byte, error) { - type NoMethod NamedSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NatIpInfo: Contains NAT IP information of a NAT config (i.e. usage status, -// mode). -type NatIpInfo struct { - // NatIpInfoMappings: A list of all NAT IPs assigned to this NAT config. - NatIpInfoMappings []*NatIpInfoNatIpInfoMapping `json:"natIpInfoMappings,omitempty"` - // NatName: Name of the NAT config which the NAT IP belongs to. - NatName string `json:"natName,omitempty"` - // ForceSendFields is a list of field names (e.g. "NatIpInfoMappings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NatIpInfoMappings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfo) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NatIpInfoNatIpInfoMapping: Contains information of a NAT IP. -type NatIpInfoNatIpInfoMapping struct { - // Mode: Specifies whether NAT IP is auto or manual. - // - // Possible values: - // "AUTO" - // "MANUAL" - Mode string `json:"mode,omitempty"` - // NatIp: NAT IP address. For example: 203.0.113.11. - NatIp string `json:"natIp,omitempty"` - // Usage: Specifies whether NAT IP is currently serving at least one endpoint - // or - // not. - // - // Possible values: - // "IN_USE" - // "UNUSED" - Usage string `json:"usage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfoNatIpInfoMapping) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfoNatIpInfoMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NatIpInfoResponse struct { - // Result: [Output Only] A list of NAT IP information. - Result []*NatIpInfo `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfoResponse) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfoResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Network: Represents a VPC Network resource. -// -// Networks connect resources to each other and to the internet. For -// more -// information, readVirtual Private Cloud (VPC) Network. -type Network struct { - // IPv4Range: Deprecated in favor of subnet mode networks. - // The range of internal addresses that are legal on this network. This - // range is aCIDR specification, for example:192.168.0.0/16. Provided by the - // client when the network is - // created. - IPv4Range string `json:"IPv4Range,omitempty"` - // AutoCreateSubnetworks: Must be set to create a VPC network. If not set, a - // legacy network is - // created. - // - // When set to true, the VPC network is created in auto mode. - // When set to false, the VPC network is created in custom mode. - // - // An auto mode VPC network starts with one subnet per region. Each subnet - // has a predetermined range as described inAuto mode VPC network IP - // ranges. - // - // For custom mode VPC networks, you can add subnets using the - // subnetworksinsert - // method. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableUlaInternalIpv6: Enable ULA internal ipv6 on this network. Enabling - // this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // . - EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` - // FirewallPolicy: [Output Only] URL of the firewall policy the network is - // associated with. - FirewallPolicy string `json:"firewallPolicy,omitempty"` - // GatewayIPv4: [Output Only] The gateway address for default routing out of - // the network, - // selected by Google Cloud. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Range: When enabling ula internal ipv6, caller optionally can - // specify the /48 - // range they want from the google defined ULA prefix fd20::/20. The input - // must be a valid /48 ULA IPv6 address and must be within the - // fd20::/20. - // Operation will fail if the speficied /48 is already in used by - // another - // resource. If the field is not speficied, then a /48 range will be - // randomly - // allocated from fd20::/20 and returned via this field. - // . - InternalIpv6Range string `json:"internalIpv6Range,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#network - // for - // networks. - Kind string `json:"kind,omitempty"` - // Mtu: Maximum Transmission Unit in bytes. - // The minimum value for this field is 1300 and the maximum value is 8896. - // The suggested value is 1500, which is the default MTU used on the - // Internet, or 8896 if you want to use Jumbo frames. If unspecified, the - // value defaults to 1460. - Mtu int64 `json:"mtu,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all following characters (except for the - // last - // character) must be a dash, lowercase letter, or digit. The last - // character - // must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // NetworkFirewallPolicyEnforcementOrder: The network firewall policy - // enforcement order. Can be either - // AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults - // to - // AFTER_CLASSIC_FIREWALL if the field is not specified. - // - // Possible values: - // "AFTER_CLASSIC_FIREWALL" - // "BEFORE_CLASSIC_FIREWALL" - NetworkFirewallPolicyEnforcementOrder string `json:"networkFirewallPolicyEnforcementOrder,omitempty"` - // NetworkProfile: A full or partial URL of the network profile to apply to - // this network. - // This field can be set only at resource creation time. For example, - // the - // following are valid URLs: - // - // - - // https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - // - projects/{project_id}/global/networkProfiles/{network_profile_name} - NetworkProfile string `json:"networkProfile,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *NetworkParams `json:"params,omitempty"` - // Peerings: [Output Only] A list of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - // Region: [Output Only] URL of the region where the regional network - // resides. - // This field is not applicable to global network. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RoutingConfig: The network-level routing configuration for this network. - // Used by Cloud - // Router to determine what type of network-wide routing behavior to enforce. - RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for all - // subnetworks - // in this VPC network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "IPv4Range") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPv4Range") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Network) MarshalJSON() ([]byte, error) { - type NoMethod Network - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachment: NetworkAttachments -// A network attachment resource ... -type NetworkAttachment struct { - // ConnectionEndpoints: [Output Only] An array of connections for all the - // producers connected - // to this network attachment. - ConnectionEndpoints []*NetworkAttachmentConnectedEndpoint `json:"connectionEndpoints,omitempty"` - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "INVALID" - ConnectionPreference string `json:"connectionPreference,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored - // in this object. This field is used in optimistic locking. An - // up-to-date - // fingerprint must be provided in order to patch. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: [Output Only] The URL of the network which the Network - // Attachment - // belongs to. Practically it is inferred by fetching the network of the - // first - // subnetwork associated. Because it is required that all the subnetworks - // must - // be from the same network, it is assured that the Network Attachment - // belongs - // to the same network as all the subnetworks. - Network string `json:"network,omitempty"` - // ProducerAcceptLists: Projects that are allowed to connect to this network - // attachment. - // The project can be specified using its id or number. - ProducerAcceptLists []string `json:"producerAcceptLists,omitempty"` - // ProducerRejectLists: Projects that are not allowed to connect to this - // network attachment. - // The project can be specified using its id or number. - ProducerRejectLists []string `json:"producerRejectLists,omitempty"` - // Region: [Output Only] URL of the region where the network attachment - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Subnetworks: An array of URLs where each entry is the URL of a - // subnet - // provided by the service consumer to use for - // endpoints in the producers that connect to this network attachment. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectionEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionEndpoints") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentAggregatedList: Contains a list of -// NetworkAttachmentsScopedList. -type NetworkAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachmentsScopedList resources. - Items map[string]NetworkAttachmentsScopedList `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentAggregatedListWarning: [Output Only] Informational warning -// message. -type NetworkAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentConnectedEndpoint: [Output Only] A connection connected to -// this network attachment. -type NetworkAttachmentConnectedEndpoint struct { - // IpAddress: The IPv4 address assigned to the producer instance network - // interface. - // This value will be a range in case of Serverless. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: The IPv6 address assigned to the producer instance network - // interface. - // This is only assigned when the stack types of both the instance - // network - // interface and the consumer subnet are IPv4_IPv6. - Ipv6Address string `json:"ipv6Address,omitempty"` - // ProjectIdOrNum: The project id or number of the interface to which the IP - // was assigned. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` - // SecondaryIpCidrRanges: Alias IP ranges from the same subnetwork. - SecondaryIpCidrRanges []string `json:"secondaryIpCidrRanges,omitempty"` - // Status: The status of a connected endpoint to this network attachment. - // - // Possible values: - // "ACCEPTED" - The consumer allows traffic from the producer to reach its - // VPC. - // "CLOSED" - The consumer network attachment no longer exists. - // "NEEDS_ATTENTION" - The consumer needs to take further action before - // traffic can be served. - // "PENDING" - The consumer neither allows nor prohibits traffic - // from the producer to reach its VPC. - // "REJECTED" - The consumer prohibits traffic from the producer to reach its - // VPC. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // Subnetwork: The subnetwork used to assign the IP to the producer - // instance network interface. - Subnetwork string `json:"subnetwork,omitempty"` - // SubnetworkCidrRange: [Output Only] The CIDR range of the subnet from which - // the IPv4 internal - // IP was allocated from. - SubnetworkCidrRange string `json:"subnetworkCidrRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentConnectedEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachment resources. - Items []*NetworkAttachment `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentListWarning: [Output Only] Informational warning message. -type NetworkAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentsScopedList struct { - // NetworkAttachments: A list of NetworkAttachments contained in this scope. - NetworkAttachments []*NetworkAttachment `json:"networkAttachments,omitempty"` - // Warning: Informational warning which replaces the list of - // network attachments when the list is empty. - Warning *NetworkAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkAttachments") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentsScopedListWarning: Informational warning which replaces -// the list of -// network attachments when the list is empty. -type NetworkAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityService: Represents a Google Cloud Armor network edge -// security service resource. -type NetworkEdgeSecurityService struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a NetworkEdgeSecurityService. An up-to-date fingerprint must - // be - // provided in order to update the NetworkEdgeSecurityService, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a NetworkEdgeSecurityService. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#networkEdgeSecurityService for - // NetworkEdgeSecurityServices - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the resource resides. You - // must - // specify this field as part of the HTTP request URL. It is not settable as - // a - // field in the request body. - Region string `json:"region,omitempty"` - // SecurityPolicy: The resource URL for the network edge security service - // associated with this - // network edge security service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServiceAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEdgeSecurityServicesScopedList resources. - Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkEdgeSecurityServiceAggregatedList for lists of - // Network Edge Security Services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkEdgeSecurityServiceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServiceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServicesScopedList struct { - // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices contained - // in this scope. - NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` - // Warning: Informational warning which replaces the list of - // security policies when the list is empty. - Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "NetworkEdgeSecurityServices") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEdgeSecurityServices") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityServicesScopedListWarning: Informational warning which -// replaces the list of -// security policies when the list is empty. -type NetworkEdgeSecurityServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpoint: The network endpoint. -type NetworkEndpoint struct { - // Annotations: Optional metadata defined as annotations on the network - // endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - // ClientDestinationPort: Represents the port number to which PSC consumer - // sends packets. - // - // Optional. Only valid for network endpoint groups created - // withGCE_VM_IP_PORTMAP endpoint type. - ClientDestinationPort int64 `json:"clientDestinationPort,omitempty"` - // Fqdn: Optional fully qualified domain name of network endpoint. This can - // only be - // specified when NetworkEndpointGroup.network_endpoint_type - // isNON_GCP_FQDN_PORT. - Fqdn string `json:"fqdn,omitempty"` - // Instance: The name or a URL of VM instance of this network - // endpoint. - // Optional, the field presence depends on the network endpoint type. The - // field is required for network endpoints of type GCE_VM_IP - // andGCE_VM_IP_PORT. - // - // The instance must be in the same zone of network endpoint group (for - // zonal - // NEGs) or in the zone within the region of the NEG (for regional NEGs). - // If the ipAddress is specified, it must belongs to the VM - // instance. - // - // The name must be 1-63 characters long, and comply withRFC1035 - // or be a valid URL pointing to an existing instance. - Instance string `json:"instance,omitempty"` - // IpAddress: Optional IPv4 address of network endpoint. The IP address must - // belong to a - // VM in Compute Engine (either the primary IP or as part of an aliased - // IP - // range). If the IP address is not specified, then the primary IP address - // for - // the VM instance in the network that the network endpoint group belongs - // to - // will be used. - // - // This field is redundant and need not be set for network endpoints of - // typeGCE_VM_IP. If set, it must be set to the primary internal IP - // address of the attached VM instance that matches the subnetwork of the - // NEG. - // The primary internal IP address from any NIC of a multi-NIC VM instance - // can - // be added to a NEG as long as it matches the NEG subnetwork. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: Optional IPv6 address of network endpoint. - Ipv6Address string `json:"ipv6Address,omitempty"` - // Port: Optional port number of network endpoint. If not specified, - // the - // defaultPort for the network endpoint group will be used. - // - // This field can not be set for network endpoints of typeGCE_VM_IP. - Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroup: Represents a collection of network endpoints. -// -// A network endpoint group (NEG) defines how a set of endpoints should -// be -// reached, whether they are reachable, and where they are located. -// For more information about using NEGs for different use cases, seeNetwork -// endpoint groups overview. -type NetworkEndpointGroup struct { - // Annotations: Optional. Metadata defined as annotations on the network - // endpoint group. - Annotations map[string]string `json:"annotations,omitempty"` - // AppEngine: Optional. Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine or cloudFunction may be set. - AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - // CloudFunction: Optional. Only valid when networkEndpointType isSERVERLESS. - // Only one of cloudRun,appEngine or cloudFunction may be set. - CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - // CloudRun: Optional. Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine or cloudFunction may be set. - CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultPort: The default port used if the port number is not specified in - // the network - // endpoint. - // - // Optional. If the network endpoint type is either GCE_VM_IP,SERVERLESS or - // PRIVATE_SERVICE_CONNECT, this - // field must not be specified. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkEndpointGroup - // for network endpoint group. - Kind string `json:"kind,omitempty"` - // LoadBalancer: This field is only valid when the network endpoint group is - // used for load - // balancing. - // [Deprecated] This field is deprecated. - LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which all network endpoints in the NEG - // belong. - // Uses default project network if unspecified. - Network string `json:"network,omitempty"` - // NetworkEndpointType: Type of network endpoints in this network endpoint - // group. Can be one ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, - // INTERNET_FQDN_PORT,INTERNET_IP_PORT, SERVERLESS,PRIVATE_SERVICE_CONNECT, - // GCE_VM_IP_PORTMAP. - // - // Possible values: - // "GCE_VM_IP" - The network endpoint is represented by an IP address. - // "GCE_VM_IP_PORT" - The network endpoint is represented by IP address and - // port pair. - // "GCE_VM_IP_PORTMAP" - The network endpoint is represented by an IP, Port - // and Client Destination - // Port. - // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully - // qualified domain name and - // port. - // "INTERNET_IP_PORT" - The network endpoint is represented by an internet IP - // address and port. - // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by an IP - // address and port. The - // endpoint belongs to a VM or pod running in a customer's on-premises. - // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public Google - // APIs or - // services exposed by other GCP Project with a Service Attachment. - // The connection is set up by private service connect - // "SERVERLESS" - The network endpoint is handled by specified serverless - // infrastructure. - NetworkEndpointType string `json:"networkEndpointType,omitempty"` - // PscData: Optional. Only valid when networkEndpointType - // isPRIVATE_SERVICE_CONNECT. - PscData *NetworkEndpointGroupPscData `json:"pscData,omitempty"` - // PscTargetService: The target service url used to set up private service - // connection to - // a Google API or a PSC Producer Service Attachment. - // An example value is: asia-northeast3-cloudkms.googleapis.com. - // - // Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT. - PscTargetService string `json:"pscTargetService,omitempty"` - // Region: [Output Only] The URL of theregion - // where the network endpoint group is located. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServerlessDeployment: Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine, cloudFunction orserverlessDeployment may be set. - ServerlessDeployment *NetworkEndpointGroupServerlessDeployment `json:"serverlessDeployment,omitempty"` - // Size: [Output only] Number of network endpoints in the network endpoint - // group. - Size int64 `json:"size,omitempty"` - // Subnetwork: Optional URL of the subnetwork to which all network endpoints in - // the NEG - // belong. - Subnetwork string `json:"subnetwork,omitempty"` - // Type: Specify the type of this network endpoint group. OnlyLOAD_BALANCING is - // valid for now. - // - // Possible values: - // "LOAD_BALANCING" - The network endpoint group is a backend of a load - // balancer. - Type string `json:"type,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the network endpoint group is located. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroupsScopedList resources. - Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupAggregatedList for aggregated - // lists of network endpoint groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkEndpointGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupAppEngine: Configuration for an App Engine network -// endpoint group (NEG). -// The service is optional, may be provided explicitly or in the -// URL mask. The version is optional and can only be provided -// explicitly or in the URL mask when service is present. -// -// Note: App Engine service must be in the same project and located in the -// same region as the Serverless NEG. -type NetworkEndpointGroupAppEngine struct { - // Service: Optional serving service. - // - // The service name is case-sensitive and must be 1-63 - // characters long. - // - // Example value: default, my-service. - Service string `json:"service,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse service and version fields - // from a request URL. URL mask allows for routing to multiple App - // Engine - // services without having to create multiple Network Endpoint Groups - // and - // backend services. - // - // For example, the request URLsfoo1-dot-appname.appspot.com/v1 - // andfoo1-dot-appname.appspot.com/v2 can be backed by the same - // Serverless NEG with URL mask-dot-appname.appspot.com/. - // The URL mask will parse them to { service = "foo1", version = "v1" - // } and { service = "foo1", version = "v2" } - // respectively. - UrlMask string `json:"urlMask,omitempty"` - // Version: Optional serving version. - // - // The version name is case-sensitive and must be 1-100 - // characters long. - // - // Example value: v1, v2. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAppEngine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupCloudFunction: Configuration for a Cloud Function -// network endpoint group (NEG). -// The function must be provided explicitly or in the URL mask. -// -// Note: Cloud Function must be in the same project and located in the -// same -// region as the Serverless NEG. -type NetworkEndpointGroupCloudFunction struct { - // Function: A user-defined name of the Cloud Function. - // - // The function name is case-sensitive and must be 1-63 - // characters long. - // - // Example value: func1. - Function string `json:"function,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse function field from a request URL. URL - // mask allows for routing to multiple Cloud Functions without having to - // create multiple Network Endpoint Groups and backend services. - // - // For example, request URLs mydomain.com/function1 andmydomain.com/function2 - // can be backed by the same - // Serverless NEG with URL mask /. The URL - // mask will parse them to { function = "function1" } and{ function = - // "function2" } respectively. - UrlMask string `json:"urlMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Function") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Function") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupCloudFunction) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudFunction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupCloudRun: Configuration for a Cloud Run network endpoint -// group (NEG). -// The service must be provided explicitly or in the URL mask. -// The tag is optional, may be provided explicitly or in the URL -// mask. -// -// Note: Cloud Run service must be in the same project and located in the -// same -// region as the Serverless NEG. -type NetworkEndpointGroupCloudRun struct { - // Service: Cloud Run service is the main resource of Cloud Run. - // - // The service must be 1-63 characters long, and comply withRFC1035. - // - // Example value: "run-service". - Service string `json:"service,omitempty"` - // Tag: Optional Cloud Run tag represents the "named-revision" to provide - // additional - // fine-grained traffic routing information. - // - // The tag must be 1-63 characters long, and comply withRFC1035. - // - // Example value: "revision-0010". - Tag string `json:"tag,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse and fields from a request URL. URL mask - // allows for - // routing to multiple Run services without having to create multiple - // network endpoint groups and backend services. - // - // For example, request URLs foo1.domain.com/bar1 andfoo1.domain.com/bar2 can - // be backed by the same Serverless - // Network Endpoint Group (NEG) with URL mask.domain.com/. The - // URL mask will - // parse them to { service="bar1", tag="foo1" } and { - // service="bar2", tag="foo2" } respectively. - UrlMask string `json:"urlMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudRun - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific fields -// for network endpoint group. -type NetworkEndpointGroupLbNetworkEndpointGroup struct { - // DefaultPort: The default port used if the port number is not specified in - // the network - // endpoint. - // - // If the network endpoint type is either GCE_VM_IP,SERVERLESS or - // PRIVATE_SERVICE_CONNECT, this - // field must not be specified. - // [Deprecated] This field is deprecated. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Network: The URL of the network to which all network endpoints in the NEG - // belong. - // Uses default project network if unspecified. - // [Deprecated] This field is deprecated. - Network string `json:"network,omitempty"` - // Subnetwork: Optional URL of the subnetwork to which all network endpoints in - // the NEG - // belong. - // [Deprecated] This field is deprecated. - Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the network endpoint group is located. - // [Deprecated] This field is deprecated. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultPort") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultPort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupLbNetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupLbNetworkEndpointGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroup resources. - Items []*NetworkEndpointGroup `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupList for network endpoint group - // lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupListWarning: [Output Only] Informational warning -// message. -type NetworkEndpointGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupPscData: All data that is specifically relevant to only -// network endpoint groups of -// type PRIVATE_SERVICE_CONNECT. -type NetworkEndpointGroupPscData struct { - // ConsumerPscAddress: [Output Only] Address allocated from given subnetwork - // for PSC. This IP - // address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in - // L7 PSC-XLB. - ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` - // ProducerPort: The psc producer port is used to connect PSC NEG with specific - // port on - // the PSC Producer side; should only be used for the - // PRIVATE_SERVICE_CONNECT NEG type - ProducerPort int64 `json:"producerPort,omitempty"` - // PscConnectionId: [Output Only] The PSC connection id of the PSC Network - // Endpoint Group - // Consumer. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // PscConnectionStatus: [Output Only] The connection status of the PSC - // Forwarding Rule. - // - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer and will not - // serve - // traffic going forward. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer - // needs to take further action before the forwarding rule can serve - // traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The connection has been rejected by the producer. - // "STATUS_UNSPECIFIED" - PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerPscAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerPscAddress") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupPscData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupPscData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupServerlessDeployment: Configuration for a serverless -// network endpoint group (NEG). Theplatform must be provided. -// -// Note: The target backend service must be in the same project and located -// in -// the same region as the Serverless NEG. -type NetworkEndpointGroupServerlessDeployment struct { - // Platform: The platform of the backend target(s) of this NEG. - // The only supported value is - // API Gateway: apigateway.googleapis.com. - Platform string `json:"platform,omitempty"` - // Resource: The user-defined name of the workload/instance. This value must - // be - // provided explicitly or in the urlMask. The resource - // identified by this value is platform-specific and is as follows: - // - // - // - // 1. API Gateway: The gateway ID - // 2. App Engine: The service name - // 3. Cloud Functions: The function name - // 4. Cloud Run: The service name - Resource string `json:"resource,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse platform-specific fields from a request URL. URL - // mask - // allows for routing to multiple resources on the same serverless - // platform - // without having to create multiple Network Endpoint Groups and - // backend - // resources. The fields parsed by this template are platform-specific and - // are as follows: - // - // - // - // 1. API Gateway: The gateway ID - // 2. App Engine: The service and version - // 3. Cloud Functions: The function name - // 4. Cloud Run: The service and tag - UrlMask string `json:"urlMask,omitempty"` - // Version: The optional resource version. The version identified by this value - // is - // platform-specific and is follows: - // - // - // - // 1. API Gateway: Unused - // 2. App Engine: The service version - // 3. Cloud Functions: Unused - // 4. Cloud Run: The service tag - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Platform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Platform") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupServerlessDeployment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupServerlessDeployment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequest struct { - // EndpointFilters: Optional list of endpoints to query. - // This is a more efficient but also limited version of filter - // parameter. - // Endpoints in the filter must have ip_address and port fields - // populated, - // other fields are not supported. - EndpointFilters []*NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter `json:"endpointFilters,omitempty"` - // HealthStatus: Optional query parameter for showing the health status of each - // network - // endpoint. Valid options are SKIP or SHOW. If you - // don't specify this parameter, the health status of network endpoints - // will - // not be provided. - // - // Possible values: - // "SHOW" - Show the health status for each network endpoint. Impacts latency - // of the - // call. - // "SKIP" - Health status for network endpoints will not be provided. - HealthStatus string `json:"healthStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndpointFilters") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointFilters") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter struct { - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListNetworkEndpoints struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointWithHealthStatus resources. - Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupsListNetworkEndpoints for the list - // of network endpoints in the specified network endpoint group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpoints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] -// Informational warning message. -type NetworkEndpointGroupsListNetworkEndpointsWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupsListNetworkEndpointsWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsScopedList struct { - // NetworkEndpointGroups: [Output Only] The list ofnetwork - // endpoint groups that are contained in this scope. - NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list of - // network - // endpoint groups when the list is empty. - Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpointGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpointGroups") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupsScopedListWarning: [Output Only] An informational -// warning that replaces the list of network -// endpoint groups when the list is empty. -type NetworkEndpointGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointWithHealthStatus struct { - // Healths: [Output only] The health status of network endpoint. - // - // Optional. Displayed only if the network endpoint has centralized - // health - // checking configured. - Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` - // NetworkEndpoint: [Output only] The network endpoint. - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Healths") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Healths") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointWithHealthStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkFirewallPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of FirewallPoliciesScopedList resources. - Items map[string]FirewallPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkFirewallPoliciesAggregatedList for lists of - // network firewall policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkFirewallPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkFirewallPolicyAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkFirewallPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkFirewallPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkFirewallPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkInterface: A network interface resource attached to an instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. Currently, - // only one access - // config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs - // specified, then this instance will have - // no external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - // AliasIpRanges: An array of alias IP ranges for this network interface. - // You can only specify this field for network interfaces in VPC networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - // EnableVpcScopedDns: Optional. If true, DNS resolution will be enabled over - // this interface. Only valid - // with network_attachment. - EnableVpcScopedDns bool `json:"enableVpcScopedDns,omitempty"` - // Fingerprint: Fingerprint hash of contents stored in this network - // interface. - // This field will be ignored when inserting an Instance or - // adding a NetworkInterface. An up-to-date - // fingerprint must be provided in order to update theNetworkInterface. The - // request will fail with error400 Bad Request if the fingerprint is not - // provided, or412 Precondition Failed if the fingerprint is out of date. - Fingerprint string `json:"fingerprint,omitempty"` - // IgmpQuery: Indicate whether igmp query is enabled on the network - // interface - // or not. If enabled, also indicates the version of IGMP supported. - // - // Possible values: - // "IGMP_QUERY_DISABLED" - The network interface has disabled IGMP query. - // "IGMP_QUERY_V2" - The network interface has enabled IGMP query - v2. - IgmpQuery string `json:"igmpQuery,omitempty"` - // InternalIpv6PrefixLength: The prefix length of the primary internal IPv6 - // range. - InternalIpv6PrefixLength int64 `json:"internalIpv6PrefixLength,omitempty"` - // Ipv6AccessConfigs: An array of IPv6 access configurations for this - // interface. Currently, only - // one IPv6 access config, DIRECT_IPV6, is supported. If there - // is no ipv6AccessConfig specified, then this instance will - // have no external IPv6 Internet access. - Ipv6AccessConfigs []*AccessConfig `json:"ipv6AccessConfigs,omitempty"` - // Ipv6AccessType: [Output Only] One of EXTERNAL, INTERNAL to indicate whether - // the IP can be - // accessed from the Internet. This field is always inherited from - // its - // subnetwork. - // - // Valid only if stackType is IPV4_IPV6. - // - // Possible values: - // "EXTERNAL" - This network interface can have external IPv6. - // "INTERNAL" - This network interface can have internal IPv6. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Ipv6Address: An IPv6 internal network address for this network interface. - // To - // use a static internal IP address, it must be unused and in the same - // region - // as the instance's zone. If not specified, Google Cloud will - // automatically - // assign an internal IPv6 address from the instance's subnetwork. - Ipv6Address string `json:"ipv6Address,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkInterface for - // network interfaces. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of the network interface, which is generated by - // the - // server. For a VM, the network interface uses the nicN naming - // format. Where N is a value between 0 and7. The default interface value is - // nic0. - Name string `json:"name,omitempty"` - // Network: URL of the VPC network resource for this instance. When creating - // an - // instance, if neither the network nor the subnetwork is specified, - // the - // default network global/networks/default is used. If the - // selected project doesn't have the default network, you must specify - // a - // network or subnet. If the network is not specified but the subnetwork - // is - // specified, the network is inferred. - // - // If you specify this property, you can specify the network as - // a full or partial URL. For example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // - projects/project/global/networks/network - // - global/networks/default - Network string `json:"network,omitempty"` - // NetworkAttachment: The URL of the network attachment that this interface - // should connect - // to in the following - // format: - // projects/{project_number}/regions/{region_name}/networkAttachments/{network_a - // ttachment_name}. - NetworkAttachment string `json:"networkAttachment,omitempty"` - // NetworkIP: An IPv4 internal IP address to assign to the instance for this - // network - // interface. If not specified by the user, an unused internal IP is - // assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` - // NicType: The type of vNIC to be used on this interface. This may be gVNIC - // or - // VirtioNet. - // - // Possible values: - // "GVNIC" - GVNIC - // "IDPF" - IDPF - // "IRDMA" - IRDMA - // "MRDMA" - MRDMA - // "UNSPECIFIED_NIC_TYPE" - No type specified. - // "VIRTIO_NET" - VIRTIO - NicType string `json:"nicType,omitempty"` - // ParentNicName: Name of the parent network interface of a dynamic network - // interface. - ParentNicName string `json:"parentNicName,omitempty"` - // QueueCount: The networking queue count that's specified by users for the - // network - // interface. Both Rx and Tx queues will be set to this number. It'll be - // empty - // if not specified by the users. - QueueCount int64 `json:"queueCount,omitempty"` - // StackType: The stack type for this network interface. To assign only IPv4 - // addresses, - // use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_IPV6. If not - // specified, IPV4_ONLY is used. - // - // This field can be both set at instance creation and update network - // interface operations. - // - // Possible values: - // "IPV4_IPV6" - The network interface can have both IPv4 and IPv6 addresses. - // "IPV4_ONLY" - The network interface will only be assigned IPv4 addresses. - // "IPV6_ONLY" - The network interface will only be assigned IPv6 addresses. - StackType string `json:"stackType,omitempty"` - // Subinterfaces: SubInterfaces help enable L2 communication for the instance - // over - // subnetworks that support L2. Every network interface will get a - // default - // untagged (vlan not specified) subinterface. Users can specify - // additional - // tagged subinterfaces which are sub-fields to the Network Interface. - Subinterfaces []*NetworkInterfaceSubInterface `json:"subinterfaces,omitempty"` - // Subnetwork: The URL of the Subnetwork resource for this instance. If the - // network - // resource is inlegacy - // mode, do not specify this field. If the network is in auto subnet - // mode, specifying the subnetwork is optional. If the network is in - // custom - // subnet mode, specifying the subnetwork is required. If you specify - // this - // field, you can specify the subnetwork as a full or partial URL. For - // example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - // Vlan: VLAN tag of a dynamic network interface, must be an integer in the - // range - // from 2 to 255 inclusively. - Vlan int64 `json:"vlan,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkInterface) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkInterfaceSubInterface struct { - // IpAddress: An IPv4 internal IP address to assign to the instance for - // this - // subinterface. If specified, ip_allocation_mode should be set to - // ALLOCATE_IP. - IpAddress string `json:"ipAddress,omitempty"` - // Possible values: - // "ALLOCATE_IP" - Allocates an internal IPv4 IP address from subnets - // secondary IP Range. - // "DO_NOT_ALLOCATE_IP" - No IP allocation is done for the subinterface. - // "UNSPECIFIED" - IpAllocationMode string `json:"ipAllocationMode,omitempty"` - // Subnetwork: If specified, this subnetwork must belong to the same network - // as that of the network interface. - // If not specified the subnet of network interface will be used. - // If you specify this property, you can specify the subnetwork as a full - // or partial URL. For example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - // Vlan: VLAN tag. Should match the VLAN(s) supported by the subnetwork to - // which - // this subinterface is connecting. - Vlan int64 `json:"vlan,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkInterfaceSubInterface) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInterfaceSubInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkList: Contains a list of networks. -type NetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkListWarning: [Output Only] Informational warning message. -type NetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkParams: Additional network parameters. -type NetworkParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkParams) MarshalJSON() ([]byte, error) { - type NoMethod NetworkParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeering: A network peering attached to a network resource. The -// message includes the -// peering name, peer network, peering state, and a flag indicating -// whether -// Google Compute Engine should automatically create routes for the peering. -type NetworkPeering struct { - // AdvertisePeerSubnetsViaRouters: Whether Cloud Routers in this network can - // automatically advertise subnets - // from the peer network. - AdvertisePeerSubnetsViaRouters bool `json:"advertisePeerSubnetsViaRouters,omitempty"` - // AutoCreateRoutes: This field will be deprecated soon. Use - // theexchange_subnet_routes field instead. - // Indicates whether full mesh connectivity is created and - // managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ConnectionStatus: [Output Only] The effective state of the peering - // connection - // as a whole. - ConnectionStatus *NetworkPeeringConnectionStatus `json:"connectionStatus,omitempty"` - // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is created - // and managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` - // ExportCustomRoutes: Whether to export the custom routes to peer network. The - // default value is - // false. - ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` - // ExportSubnetRoutesWithPublicIp: Whether subnet routes with public IP range - // are exported. The default value - // is true, all subnet routes are exported.IPv4 - // special-use ranges are always - // exported to peers and are not controlled by this field. - ExportSubnetRoutesWithPublicIp bool `json:"exportSubnetRoutesWithPublicIp,omitempty"` - // ImportCustomRoutes: Whether to import the custom routes from peer network. - // The default value is - // false. - ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` - // ImportSubnetRoutesWithPublicIp: Whether subnet routes with public IP range - // are imported. The default value - // is false.IPv4 - // special-use ranges are always - // imported from peers and are not controlled by this field. - ImportSubnetRoutesWithPublicIp bool `json:"importSubnetRoutesWithPublicIp,omitempty"` - // Name: Name of this peering. Provided by the client when the peering is - // created. - // The name must comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Network: The URL of the peer network. It can be either full URL or partial - // URL. The - // peer network may belong to a different project. If the partial URL does - // not - // contain project, it is assumed that the peer network is in the same - // project - // as the current network. - Network string `json:"network,omitempty"` - // PeerMtu: [Output Only] Maximum Transmission Unit in bytes of the peer - // network. - PeerMtu int64 `json:"peerMtu,omitempty"` - // StackType: Which IP version(s) of traffic and routes are allowed to be - // imported or - // exported between peer networks. The default value is IPV4_ONLY. - // - // Possible values: - // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to - // be - // exchanged. Additionally if the matching peering is - // IPV4_IPV6, IPv6 traffic and routes will be exchanged as - // well. - // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes to - // be - // exchanged, even if the matching peering is IPV4_IPV6. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. - // The - // peering is `ACTIVE` when there's a matching configuration in the - // peer - // network. - // - // Possible values: - // "ACTIVE" - Matching configuration exists on the peer. - // "INACTIVE" - There is no matching configuration on the peer, including the - // case when - // peer does not exist. - State string `json:"state,omitempty"` - // StateDetails: [Output Only] Details about the current state of the peering. - StateDetails string `json:"stateDetails,omitempty"` - // UpdateStrategy: The update strategy determines the semantics for updates and - // deletes to the - // peering connection configuration. - // - // Possible values: - // "CONSENSUS" - Updates are reflected in the local peering but aren't - // applied to the - // peering connection until a complementary change is made to the - // matching peering. - // To delete a peering with the consensus update strategy, both the - // peerings - // must request the deletion of the peering before the peering can be - // deleted. - // "INDEPENDENT" - In this mode, changes to the peering configuration can - // be unilaterally altered by changing either side of the peering. - // This is the default value if the field is unspecified. - // "UNSPECIFIED" - Peerings with update strategy UNSPECIFIED are created - // with - // update strategy INDEPENDENT. - UpdateStrategy string `json:"updateStrategy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdvertisePeerSubnetsViaRouters") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertisePeerSubnetsViaRouters") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeering) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeering - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeeringConnectionStatus: [Output Only] Describes the state of a -// peering connection, not just the -// local peering. This field provides information about the effective -// settings -// for the connection as a whole, including pending delete/update requests -// for -// CONSENSUS peerings. -type NetworkPeeringConnectionStatus struct { - // ConsensusState: The consensus state contains information about the status of - // update - // and delete for a consensus peering connection. - ConsensusState *NetworkPeeringConnectionStatusConsensusState `json:"consensusState,omitempty"` - // TrafficConfiguration: The active connectivity settings for the peering - // connection based on the - // settings of the network peerings. - TrafficConfiguration *NetworkPeeringConnectionStatusTrafficConfiguration `json:"trafficConfiguration,omitempty"` - // UpdateStrategy: The update strategy determines the update/delete semantics - // for this - // peering connection. - // - // Possible values: - // "CONSENSUS" - Updates are reflected in the local peering but aren't - // applied to the - // peering connection until a complementary change is made to the - // matching peering. - // To delete a peering with the consensus update strategy, both the - // peerings - // must request the deletion of the peering before the peering can be - // deleted. - // "INDEPENDENT" - In this mode, changes to the peering configuration can - // be unilaterally altered by changing either side of the peering. - // This is the default value if the field is unspecified. - // "UNSPECIFIED" - Peerings with update strategy UNSPECIFIED are created - // with - // update strategy INDEPENDENT. - UpdateStrategy string `json:"updateStrategy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsensusState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsensusState") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatus) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeeringConnectionStatusConsensusState: The status of update/delete -// for a consensus peering connection. Only set -// when connection_status.update_strategy isCONSENSUS or a network peering is -// proposing to update the -// strategy to CONSENSUS. -type NetworkPeeringConnectionStatusConsensusState struct { - // DeleteStatus: The status of the delete request. - // - // Possible values: - // "DELETE_ACKNOWLEDGED" - Both network admins have agreed this consensus - // peering connection can - // be deleted. - // "DELETE_STATUS_UNSPECIFIED" - // "LOCAL_CANCEL_REQUESTED" - The local network admin requested to cancel - // their delete request - // after DELETE_ACKNOWLEDGED. - // "LOCAL_DELETE_REQUESTED" - Network admin has requested deletion of this - // peering connection. - // "PEER_CANCEL_REQUESTED" - The peer network admin requested to cancel their - // delete request after - // DELETE_ACKNOWLEDGED. - // "PEER_DELETE_REQUESTED" - The peer network admin has requested deletion of - // this peering - // connection. - DeleteStatus string `json:"deleteStatus,omitempty"` - // UpdateStatus: The status of the update request. - // - // Possible values: - // "IN_SYNC" - No pending configuration update proposals to the peering - // connection. - // "PENDING_LOCAL_ACKNOWLEDMENT" - The peer network admin has made an - // updatePeering call. The change is - // awaiting acknowledgment from this peering's network admin. - // "PENDING_PEER_ACKNOWLEDGEMENT" - The local network admin has made an - // updatePeering call. The change - // is awaiting acknowledgment from the peer network admin. - // "UPDATE_STATUS_UNSPECIFIED" - UpdateStatus string `json:"updateStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeleteStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeleteStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatusConsensusState) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatusConsensusState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPeeringConnectionStatusTrafficConfiguration struct { - // ExportCustomRoutesToPeer: Whether custom routes are being exported to the - // peer network. - ExportCustomRoutesToPeer bool `json:"exportCustomRoutesToPeer,omitempty"` - // ExportSubnetRoutesWithPublicIpToPeer: Whether subnet routes with public IP - // ranges are being exported to the - // peer network. - ExportSubnetRoutesWithPublicIpToPeer bool `json:"exportSubnetRoutesWithPublicIpToPeer,omitempty"` - // ImportCustomRoutesFromPeer: Whether custom routes are being imported from - // the peer network. - ImportCustomRoutesFromPeer bool `json:"importCustomRoutesFromPeer,omitempty"` - // ImportSubnetRoutesWithPublicIpFromPeer: Whether subnet routes with public IP - // ranges are being imported - // from the peer network. - ImportSubnetRoutesWithPublicIpFromPeer bool `json:"importSubnetRoutesWithPublicIpFromPeer,omitempty"` - // StackType: Which IP version(s) of traffic and routes are being imported - // or - // exported between peer networks. - // - // Possible values: - // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to - // be - // exchanged. Additionally if the matching peering is - // IPV4_IPV6, IPv6 traffic and routes will be exchanged as - // well. - // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes to - // be - // exchanged, even if the matching peering is IPV4_IPV6. - StackType string `json:"stackType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExportCustomRoutesToPeer") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExportCustomRoutesToPeer") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatusTrafficConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatusTrafficConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPerformanceConfig struct { - // Possible values: - // "DEFAULT" - // "TIER_1" - ExternalIpEgressBandwidthTier string `json:"externalIpEgressBandwidthTier,omitempty"` - // Possible values: - // "DEFAULT" - // "TIER_1" - TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExternalIpEgressBandwidthTier") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpEgressBandwidthTier") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPerformanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPoliciesScopedList struct { - // NetworkPolicies: A list of network policies contained in this scope. - NetworkPolicies []*NetworkPolicy `json:"networkPolicies,omitempty"` - // Warning: Informational warning which replaces the list of network policies - // when - // the list is empty. - Warning *NetworkPoliciesScopedListWarning `json:"warning,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPoliciesScopedListWarning: Informational warning which replaces the -// list of network policies when -// the list is empty. -type NetworkPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicy: Represents a Network Policy resource. -type NetworkPolicy struct { - // Associations: [Output Only] A list of associations that belong to this - // network policy. - Associations []*NetworkPolicyAssociation `json:"associations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#networkPolicy for - // network policies - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the regional network policy - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all network policy rule tuples. - // A network - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // TrafficClassificationRules: [Output Only] A list of traffic classification - // rules that belong to this - // policy. - TrafficClassificationRules []*NetworkPolicyTrafficClassificationRule `json:"trafficClassificationRules,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkPoliciesScopedList resources. - Items map[string]NetworkPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkPolicyAggregatedList for lists of - // network policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyAggregatedListWarning: [Output Only] Informational warning -// message. -type NetworkPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAssociation struct { - // AttachmentTarget: The target that the network policy is attached to. - AttachmentTarget string `json:"attachmentTarget,omitempty"` - // Name: The name for an association. - 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. "AttachmentTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkPolicy resources. - Items []*NetworkPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#networkPolicyList for - // lists of network policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyListWarning: [Output Only] Informational warning message. -type NetworkPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyTrafficClassificationRule: Represents a traffic classification -// rule that describes one or more match -// conditions along with the action to be taken when traffic matches -// this -// condition. -type NetworkPolicyTrafficClassificationRule struct { - // Action: The Action to perform when the client connection triggers the rule. - Action *NetworkPolicyTrafficClassificationRuleAction `json:"action,omitempty"` - // Description: An optional description for this resource. - Description string `json:"description,omitempty"` - // Disabled: Denotes whether the network policy rule is disabled. When set to - // true, - // the network policy rule is not enforced and traffic behaves as if it did - // not exist. If this is unspecified, the network policy rule will be - // enabled. - Disabled bool `json:"disabled,omitempty"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#networkPolicyTrafficClassificationRule for network - // policy traffic classification rules - Kind string `json:"kind,omitempty"` - // Match: A match condition that outgoing traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *NetworkPolicyTrafficClassificationRuleMatcher `json:"match,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 1 and 2147482647. - // The priority values from 2147482648 to 2147483647 (1000) are reserved - // for - // system default network policy rules. Rules are evaluated from highest - // to - // lowest priority where 1 is the highest priority and 2147483647 is the - // lowest priority. - Priority int64 `json:"priority,omitempty"` - // RuleName: An optional name for the rule. This field is not a unique - // identifier - // and can be updated. - RuleName string `json:"ruleName,omitempty"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // network policy - // rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // TargetSecureTags: A list of secure tags that controls which instances the - // traffic - // classification rule applies to. If targetSecureTag are - // specified, then the traffic classification rule applies only to instances - // in the VPC network that have one of those EFFECTIVE secure tags, if all - // the targetSecureTag are in INEFFECTIVE state, then this rule - // will be ignored. targetSecureTag may not be set at the same - // time as targetServiceAccounts. If neithertargetServiceAccounts nor - // targetSecureTag are - // specified, the traffic classification rule applies to all instances on - // the specified network. Maximum number of target label tags allowed is - // 256. - TargetSecureTags []*NetworkPolicyTrafficClassificationRuleSecureTag `json:"targetSecureTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRule) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleAction struct { - // DscpMode: DSCP mode. When set to AUTO, the DSCP value will be - // picked - // automatically based on selected trafficClass. Otherwise,dscpValue needs to - // be explicitly specified. - // - // Possible values: - // "AUTO" - DSCP value will be automatically picked up based on - // configured - // traffic_class. - // "CUSTOM" - Allows to specify custom DSCP value from selected - // traffic_class - // range. - DscpMode string `json:"dscpMode,omitempty"` - // DscpValue: Custom DSCP value from 0-63 range. - DscpValue int64 `json:"dscpValue,omitempty"` - // TrafficClass: The traffic class that should be applied to the matching - // packet. - // - // Possible values: - // "TC1" - Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. - // "TC2" - Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx. - // "TC3" - Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx. - // "TC4" - Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx. - // "TC5" - Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx. - // "TC6" - Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx. - TrafficClass string `json:"trafficClass,omitempty"` - // Type: Always "apply_traffic_classification" for traffic classification - // rules. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DscpMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DscpMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleAction) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyTrafficClassificationRuleMatcher: Represents a match condition -// that incoming traffic is evaluated against. -// Exactly one field must be specified. -type NetworkPolicyTrafficClassificationRuleMatcher struct { - // DestIpRanges: CIDR IP address range. - // Maximum number of destination CIDR IP ranges allowed is 5000. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should match. - Layer4Configs []*NetworkPolicyTrafficClassificationRuleMatcherLayer4Config `json:"layer4Configs,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of source CIDR IP ranges allowed is 5000. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleMatcherLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a traffic classification rule. This value can - // either be one of the following well known protocol strings - // (tcp, udp, icmp,esp, ah, ipip,sctp), or the IP protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP, TCP or SCTP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies - // to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleMatcherLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleMatcherLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleSecureTag struct { - // Name: Name of the secure tag, created with TagManager's TagValue API. - Name string `json:"name,omitempty"` - // State: [Output Only] State of the secure tag, either `EFFECTIVE` - // or - // `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted - // or its network is deleted. - // - // Possible values: - // "EFFECTIVE" - // "INEFFECTIVE" - // "STATE_UNSPECIFIED" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleSecureTag) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleSecureTag - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfile: NetworkProfile represents a Google managed network profile -// resource. -type NetworkProfile struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Features: [Output Only] Features supported by the network. - Features *NetworkProfileNetworkFeatures `json:"features,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkProfile for - // network profiles. - Kind string `json:"kind,omitempty"` - // Location: [Output Only] Location to which the network is restricted. - Location *NetworkProfileLocation `json:"location,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // ProfileType: [Output Only] Type of the network profile. - ProfileType *NetworkProfileProfileType `json:"profileType,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfile) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfile - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileLocation struct { - Name string `json:"name,omitempty"` - // Possible values: - // "REGION" - // "ZONE" - Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileLocation) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileNetworkFeatures struct { - // AddressPurposes: Specifies what address purposes are supported. If empty, - // all address - // purposes are supported. - // - // Possible values: - // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global external address can - // only be assigned to Global External - // Application or Proxy Load Balancer forwarding rules. This is the - // default - // value for global external addresses. - // "DNS_RESOLVER" - DNS resolver address in the subnetwork. - // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. - // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for - // the VLAN attachment - // that is used in HA VPN over Cloud Interconnect. This regional - // internal IP address range must not overlap with any IP address range - // of subnet/route in the VPC network and its peering networks. After the - // VLAN attachment is created with the reserved IP address range, when - // creating a new VPN gateway, its interface IP address is allocated - // from the associated VLAN attachment’s IP address range. - // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global external - // address can only be assigned to Global External - // Passthrough Network Load Balancer forwarding rules, as an Availability - // Group 0 address. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global external - // address can only be assigned to Global External - // Passthrough Network Load Balancer forwarding rules, as an Availability - // Group 1 address. - // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used - // to configure Private - // Service Connect. This purpose can be specified only forGLOBAL addresses of - // Type INTERNAL - // "SERVERLESS" - A regional internal IP address range reserved for - // Serverless. - // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be - // shared by multiple Internal - // Load Balancer forwarding rules. - // "SYSTEM_MANAGED" - A regional internal IP address that is reserved and - // managed by Google - // Cloud. It can not be assigned to Google Cloud compute resources such as - // VM and internal load balancer. - // "VPC_PEERING" - IP range for peer networks. - AddressPurposes []string `json:"addressPurposes,omitempty"` - // AllowAddressCreation: Specifies whether address creation is allowed. - // - // Possible values: - // "ADDRESS_CREATION_ALLOWED" - // "ADDRESS_CREATION_BLOCKED" - AllowAddressCreation string `json:"allowAddressCreation,omitempty"` - // AllowAliasIpRanges: Specifies whether alias IP ranges (and secondary address - // ranges) are - // allowed. - // - // Possible values: - // "ALIAS_IP_RANGES_ALLOWED" - // "ALIAS_IP_RANGES_BLOCKED" - AllowAliasIpRanges string `json:"allowAliasIpRanges,omitempty"` - // AllowAutoModeSubnet: Specifies whether auto mode subnet creation is allowed. - // - // Possible values: - // "AUTO_MODE_SUBNET_ALLOWED" - // "AUTO_MODE_SUBNET_BLOCKED" - AllowAutoModeSubnet string `json:"allowAutoModeSubnet,omitempty"` - // AllowClassDFirewalls: Specifies whether firewalls for Class D address ranges - // are supported. - // - // Possible values: - // "CLASS_D_FIREWALLS_ALLOWED" - // "CLASS_D_FIREWALLS_BLOCKED" - AllowClassDFirewalls string `json:"allowClassDFirewalls,omitempty"` - // AllowCloudNat: Specifies whether cloud NAT creation is allowed. - // - // Possible values: - // "CLOUD_NAT_ALLOWED" - // "CLOUD_NAT_BLOCKED" - AllowCloudNat string `json:"allowCloudNat,omitempty"` - // AllowCloudRouter: Specifies whether cloud router creation is allowed. - // - // Possible values: - // "CLOUD_ROUTER_ALLOWED" - // "CLOUD_ROUTER_BLOCKED" - AllowCloudRouter string `json:"allowCloudRouter,omitempty"` - // AllowDefaultNicAttachment: Specifies whether default NIC attachment is - // allowed. - // - // Possible values: - // "DEFAULT_NIC_ATTACHMENT_ALLOWED" - // "DEFAULT_NIC_ATTACHMENT_BLOCKED" - AllowDefaultNicAttachment string `json:"allowDefaultNicAttachment,omitempty"` - // AllowExternalIpAccess: Specifies whether VMs are allowed to have external IP - // access on network - // interfaces connected to this VPC. - // - // Possible values: - // "EXTERNAL_IP_ACCESS_ALLOWED" - // "EXTERNAL_IP_ACCESS_BLOCKED" - AllowExternalIpAccess string `json:"allowExternalIpAccess,omitempty"` - // AllowFirewallPolicy: Specifies whether firewall policy can be attached to - // the network. - // - // Possible values: - // "FIREWALL_POLICY_ALLOWED" - // "FIREWALL_POLICY_BLOCKED" - AllowFirewallPolicy string `json:"allowFirewallPolicy,omitempty"` - // AllowInterconnect: Specifies whether Cloud Interconnect creation is allowed. - // - // Possible values: - // "INTERCONNECT_ALLOWED" - // "INTERCONNECT_BLOCKED" - AllowInterconnect string `json:"allowInterconnect,omitempty"` - // AllowIpForwarding: Specifies whether IP forwarding is allowed. - // - // Possible values: - // "IP_FORWARDING_ALLOWED" - // "IP_FORWARDING_BLOCKED" - AllowIpForwarding string `json:"allowIpForwarding,omitempty"` - // AllowLoadBalancing: Specifies whether cloud load balancing is allowed. - // - // Possible values: - // "LOAD_BALANCING_ALLOWED" - // "LOAD_BALANCING_BLOCKED" - AllowLoadBalancing string `json:"allowLoadBalancing,omitempty"` - // AllowMultiNicInSameNetwork: Specifies whether multi-nic in the same network - // is allowed. - // - // Possible values: - // "MULTI_NIC_IN_SAME_NETWORK_ALLOWED" - // "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" - AllowMultiNicInSameNetwork string `json:"allowMultiNicInSameNetwork,omitempty"` - // AllowMultiNicInSameSubnetwork: Specifies whether multi-nic in the same - // subnetwork is allowed. - // - // Possible values: - // "MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED" - // "MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED" - AllowMultiNicInSameSubnetwork string `json:"allowMultiNicInSameSubnetwork,omitempty"` - // AllowMulticast: Specifies whether multicast is allowed. - // - // Possible values: - // "MULTICAST_ALLOWED" - // "MULTICAST_BLOCKED" - AllowMulticast string `json:"allowMulticast,omitempty"` - // AllowNcc: Specifies whether NCC is allowed. - // - // Possible values: - // "NCC_ALLOWED" - // "NCC_BLOCKED" - AllowNcc string `json:"allowNcc,omitempty"` - // AllowNetworkMigration: Specifies whether VM network migration is allowed. - // - // Possible values: - // "NETWORK_MIGRATION_ALLOWED" - // "NETWORK_MIGRATION_BLOCKED" - AllowNetworkMigration string `json:"allowNetworkMigration,omitempty"` - // AllowPacketMirroring: Specifies whether Packet Mirroring 1.0 is supported. - // - // Possible values: - // "PACKET_MIRRORING_ALLOWED" - // "PACKET_MIRRORING_BLOCKED" - AllowPacketMirroring string `json:"allowPacketMirroring,omitempty"` - // AllowPrivateGoogleAccess: Specifies whether private Google access is - // allowed. - // - // Possible values: - // "PRIVATE_GOOGLE_ACCESS_ALLOWED" - // "PRIVATE_GOOGLE_ACCESS_BLOCKED" - AllowPrivateGoogleAccess string `json:"allowPrivateGoogleAccess,omitempty"` - // AllowPsc: Specifies whether PSC creation is allowed. - // - // Possible values: - // "PSC_ALLOWED" - // "PSC_BLOCKED" - AllowPsc string `json:"allowPsc,omitempty"` - // AllowSameNetworkUnicast: Specifies whether unicast within the same network - // is allowed. - // - // Possible values: - // "SAME_NETWORK_UNICAST_ALLOWED" - // "SAME_NETWORK_UNICAST_BLOCKED" - AllowSameNetworkUnicast string `json:"allowSameNetworkUnicast,omitempty"` - // AllowStaticRoutes: Specifies whether static route creation is allowed. - // - // Possible values: - // "STATIC_ROUTES_ALLOWED" - // "STATIC_ROUTES_BLOCKED" - AllowStaticRoutes string `json:"allowStaticRoutes,omitempty"` - // AllowSubInterfaces: Specifies whether sub interfaces are allowed. - // - // Possible values: - // "SUBINTERFACES_ALLOWED" - // "SUBINTERFACES_BLOCKED" - AllowSubInterfaces string `json:"allowSubInterfaces,omitempty"` - // AllowSubnetworkCreation: Specifies whether subnetwork creation is allowed. - // - // Possible values: - // "SUBNETWORK_CREATION_ALLOWED" - // "SUBNETWORK_CREATION_BLOCKED" - AllowSubnetworkCreation string `json:"allowSubnetworkCreation,omitempty"` - // AllowVpcFirewallRules: Specifies whether VPC firewall rules can be created - // under the network. - // - // Possible values: - // "VPC_FIREWALL_RULES_ALLOWED" - // "VPC_FIREWALL_RULES_BLOCKED" - AllowVpcFirewallRules string `json:"allowVpcFirewallRules,omitempty"` - // AllowVpcPeering: Specifies whether VPC peering is allowed. - // - // Possible values: - // "VPC_PEERING_ALLOWED" - // "VPC_PEERING_BLOCKED" - AllowVpcPeering string `json:"allowVpcPeering,omitempty"` - // AllowVpn: Specifies whether VPN creation is allowed. - // - // Possible values: - // "VPN_ALLOWED" - // "VPN_BLOCKED" - AllowVpn string `json:"allowVpn,omitempty"` - // Possible values: - // "RDMA_FALCON_POLICY" - // "RDMA_ROCE_POLICY" - // "ULL_POLICY" - // "VPC_POLICY" - FirewallPolicyTypes []string `json:"firewallPolicyTypes,omitempty"` - // InterfaceTypes: If set, limits the interface types that the network - // supports. If - // empty, all interface types are supported. - // - // Possible values: - // "GVNIC" - GVNIC - // "IDPF" - IDPF - // "IRDMA" - IRDMA - // "MRDMA" - MRDMA - // "UNSPECIFIED_NIC_TYPE" - No type specified. - // "VIRTIO_NET" - VIRTIO - InterfaceTypes []string `json:"interfaceTypes,omitempty"` - // Multicast: Specifies which type of multicast is supported. - // - // Possible values: - // "MULTICAST_SDN" - // "MULTICAST_ULL" - Multicast string `json:"multicast,omitempty"` - // PredefinedNetworkInternalIpv6Range: Specifies a predefined internal IPv6 - // range for the network. - PredefinedNetworkInternalIpv6Range string `json:"predefinedNetworkInternalIpv6Range,omitempty"` - // PredefinedSubnetworkRanges: Predefined subnetwork ranges for the network. - PredefinedSubnetworkRanges []*NetworkProfileNetworkFeaturesPredefinedSubnetworkRange `json:"predefinedSubnetworkRanges,omitempty"` - // SubnetPurposes: Specifies which subnetwork purposes are supported. - // - // Possible values: - // "SUBNET_PURPOSE_CUSTOM_HARDWARE" - // "SUBNET_PURPOSE_PRIVATE" - SubnetPurposes []string `json:"subnetPurposes,omitempty"` - // SubnetStackTypes: Specifies which subnetwork stack types are supported. - // - // Possible values: - // "SUBNET_STACK_TYPE_IPV4_IPV6" - // "SUBNET_STACK_TYPE_IPV4_ONLY" - // "SUBNET_STACK_TYPE_IPV6_ONLY" - SubnetStackTypes []string `json:"subnetStackTypes,omitempty"` - // SubnetworkPurposes: Specifies which subnetwork purposes are supported. - // - // Possible values: - // "AGGREGATE" - Subnetwork used to aggregate multiple private subnetworks. - // "CLOUD_EXTENSION" - Subnetworks created for Cloud Extension Machines. - // "CUSTOM_HARDWARE_LINK" - Subnetwork used for Custom Hardware Link. - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - SubnetworkPurposes []string `json:"subnetworkPurposes,omitempty"` - // SubnetworkStackTypes: Specifies which subnetwork stack types are supported. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 - // addresses. - SubnetworkStackTypes []string `json:"subnetworkStackTypes,omitempty"` - // Unicast: Specifies which type of unicast is supported. - // - // Possible values: - // "UNICAST_SDN" - // "UNICAST_ULL" - Unicast string `json:"unicast,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressPurposes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressPurposes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileNetworkFeatures) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileNetworkFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileNetworkFeaturesPredefinedSubnetworkRange struct { - // Ipv6Range: The IPv6 range of the predefined subnetwork. - Ipv6Range string `json:"ipv6Range,omitempty"` - // NamePrefix: The naming prefix of the predefined subnetwork. - NamePrefix string `json:"namePrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ipv6Range") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ipv6Range") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileNetworkFeaturesPredefinedSubnetworkRange) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileNetworkFeaturesPredefinedSubnetworkRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileProfileType struct { - // Possible values: - // "RDMA" - RDMA network. - // "ULL" - ULL network. - // "VPC" - VPC network. - NetworkType string `json:"networkType,omitempty"` - // Possible values: - // "FALCON" - RDMA over Falcon. - // "ROCE" - RDMA over Converged Ethernet (RoCE). - // "ROCE_METAL" - RDMA over RoCE for Bare Metal. - RdmaSubtype string `json:"rdmaSubtype,omitempty"` - // Possible values: - // "OPERATOR" - Exchange operator. - // "PARTICIPANT" - Exchange participant. - UllSubtype string `json:"ullSubtype,omitempty"` - // Possible values: - // "REGIONAL" - Regionally bound VPC network. - VpcSubtype string `json:"vpcSubtype,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileProfileType) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileProfileType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfilesListResponse: Contains a list of network profiles. -type NetworkProfilesListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkProfile resources. - Items []*NetworkProfile `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#networkProfileList for - // network profiles. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value - // for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken - // to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkProfilesListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfilesListResponseWarning: [Output Only] Informational warning -// message. -type NetworkProfilesListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkProfilesListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfilesListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkRoutingConfig: A routing configuration attached to a network -// resource. The message -// includes the list of routers associated with the network, and a -// flag -// indicating the type of routing behavior to enforce network-wide. -type NetworkRoutingConfig struct { - // BgpAlwaysCompareMed: Enable comparison of Multi-Exit Discriminators (MED) - // across routes with - // different neighbor ASNs when using the STANDARD BGP best path - // selection - // algorithm. - BgpAlwaysCompareMed bool `json:"bgpAlwaysCompareMed,omitempty"` - // BgpBestPathSelectionMode: The BGP best path selection algorithm to be - // employed within this network - // for dynamic routes learned by Cloud Routers. Can be LEGACY - // (default) or STANDARD. - // - // Possible values: - // "LEGACY" - // "STANDARD" - BgpBestPathSelectionMode string `json:"bgpBestPathSelectionMode,omitempty"` - // BgpInterRegionCost: Allows to define a preferred approach for handling - // inter-region cost in - // the selection process when using the STANDARD BGP best path - // selection algorithm. Can be DEFAULT orADD_COST_TO_MED. - // - // Possible values: - // "ADD_COST_TO_MED" - // "DEFAULT" - BgpInterRegionCost string `json:"bgpInterRegionCost,omitempty"` - // EffectiveBgpAlwaysCompareMed: [Output Only] Effective value of the - // bgp_always_compare_med - // field. - EffectiveBgpAlwaysCompareMed bool `json:"effectiveBgpAlwaysCompareMed,omitempty"` - // EffectiveBgpInterRegionCost: [Output Only] Effective value of the - // bgp_inter_region_cost - // field. - // - // Possible values: - // "ADD_COST_TO_MED" - // "DEFAULT" - EffectiveBgpInterRegionCost string `json:"effectiveBgpInterRegionCost,omitempty"` - // RoutingMode: The network-wide routing mode to use. If set to REGIONAL, - // this network's Cloud Routers will only advertise routes with subnets - // of this network in the same region as the router. If set toGLOBAL, this - // network's Cloud Routers will advertise - // routes with all subnets of this network, across regions. - // - // Possible values: - // "GLOBAL" - // "REGIONAL" - RoutingMode string `json:"routingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BgpAlwaysCompareMed") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BgpAlwaysCompareMed") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkRoutingConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkRoutingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: This field will be deprecated soon. - // Useexchange_subnet_routes in network_peering - // instead. - // Indicates whether full mesh connectivity is created and - // managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ExportCustomRoutes: This field will be deprecated soon. - // Useexport_custom_routes in network_peering instead. - // Whether to export the custom routes to peer network. - ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` - // ImportCustomRoutes: This field will be deprecated soon. - // Useimport_custom_routes in network_peering instead. - // Whether to import the custom routes from peer network. - ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // NetworkPeering: Network peering parameters. - // In order to specify route policies for peering using import and - // export - // custom routes, you must specify all peering related parameters - // (name, peer network,exchange_subnet_routes) in the - // network_peering - // field. - // The corresponding fields in NetworksAddPeeringRequest will be - // deprecated soon. - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` - // PeerNetwork: URL of the peer network. It can be either full URL or partial - // URL. The - // peer network may belong to a different project. If the partial URL does - // not - // contain project, it is assumed that the peer network is in the same - // project - // as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksAddPeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksCancelRequestRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksCancelRequestRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksCancelRequestRemovePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output Only] Effective firewalls from firewall policy. It - // returns Global - // Network Firewall Policies and Hierarchical Firewall Policies. - // UseregionNetworkFirewallPolicies.getEffectiveFirewalls to get - // Regional Network Firewall Policies as well. - FirewallPolicys []*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - // OrganizationFirewalls: Effective firewalls from organization policies. - OrganizationFirewalls []*NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to - // the network. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output Only] The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy. - ShortName string `json:"shortName,omitempty"` - // Type: [Output Only] The type of the firewall policy. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "SYSTEM" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A pruned -// SecurityPolicy containing ID and any applicable firewall rules. -type NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { - // Id: [Output Only] The unique identifier for the security policy. - // This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Rules: The rules that apply to the network. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksRemovePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksRequestRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksRequestRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksRequestRemovePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksUpdatePeeringRequest struct { - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkPeering") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkPeering") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksUpdatePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroup: Represents a sole-tenant Node Group resource. -// -// A sole-tenant node is a physical server that is dedicated to -// hosting VM instances only for your specific project. Use sole-tenant nodes -// to -// keep your instances physically separated from instances in other projects, -// or -// to group your instances together on the same host hardware. For -// more -// information, readSole-tenant nodes. -type NodeGroup struct { - // AutoscalingPolicy: Specifies how autoscaling should behave. - AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeGroup for - // node group. - Kind string `json:"kind,omitempty"` - // LocationHint: An opaque location hint used to place the Node close to - // other - // resources. - // This field is for use by internal tools that use the public API. - // The location hint here on the NodeGroup overrides any location_hint - // present in the NodeTemplate. - LocationHint string `json:"locationHint,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted values - // are: `AS_NEEDED` and `RECURRENT`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MaintenancePolicy: Specifies how to handle instances when a node in the - // group undergoes - // maintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or - // MIGRATE_WITHIN_NODE_GROUP. - // The default value is DEFAULT. For more information, see - // Maintenance policies. - // - // Possible values: - // "DEFAULT" - Allow the node and corresponding instances to retain - // default - // maintenance behavior. - // "MAINTENANCE_POLICY_UNSPECIFIED" - // "MIGRATE_WITHIN_NODE_GROUP" - When maintenance must be done on a node, the - // instances on that node will - // be moved to other nodes in the group. - // Instances with onHostMaintenance = MIGRATE will live migrate to - // their - // destinations while instances with onHostMaintenance = TERMINATE - // will - // terminate and then restart on their destination nodes if - // automaticRestart = true. - // "RESTART_IN_PLACE" - Instances in this group will restart on the same node - // when maintenance - // has completed. Instances must have onHostMaintenance = TERMINATE, and - // they will only restart if automaticRestart = true. - MaintenancePolicy string `json:"maintenancePolicy,omitempty"` - MaintenanceWindow *NodeGroupMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NodeTemplate: URL of the node template to create the node group from. - NodeTemplate string `json:"nodeTemplate,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShareSettings: Share-settings for the node group - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // Size: [Output Only] The total number of nodes in the node group. - Size int64 `json:"size,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - Status string `json:"status,omitempty"` - // Zone: [Output Only] The name of the zone where the node group resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroup) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeGroupsScopedList resources. - Items map[string]NodeGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#nodeGroupAggregatedList - // for aggregated lists of node - // groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupAggregatedListWarning: [Output Only] Informational warning message. -type NodeGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAutoscalingPolicy struct { - // MaxNodes: The maximum number of nodes that the group should have. Must be - // set if - // autoscaling is enabled. Maximum value allowed is 100. - MaxNodes int64 `json:"maxNodes,omitempty"` - // MinNodes: The minimum number of nodes that the group should have. - MinNodes int64 `json:"minNodes,omitempty"` - // Mode: The autoscaling mode. Set to one of: ON, OFF, - // or ONLY_SCALE_OUT. For more information, see - // Autoscaler modes. - // - // Possible values: - // "MODE_UNSPECIFIED" - // "OFF" - Autoscaling is disabled. - // "ON" - Autocaling is fully enabled. - // "ONLY_SCALE_OUT" - Autoscaling will only scale out and will not remove - // nodes. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxNodes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxNodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAutoscalingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAutoscalingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupList: Contains a list of nodeGroups. -type NodeGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeGroup resources. - Items []*NodeGroup `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeGroupList - // for lists of node groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupListWarning: [Output Only] Informational warning message. -type NodeGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupMaintenanceWindow: Time window specified for daily maintenance -// operations. GCE's internal -// maintenance will be performed within this window. -type NodeGroupMaintenanceWindow struct { - // Duration: [Output only] A predetermined duration for the window, - // automatically - // chosen to be the smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // MaintenanceDuration: [Output only] A predetermined duration for the window, - // automatically - // chosen to be the smallest possible in the given scenario. - MaintenanceDuration *Duration `json:"maintenanceDuration,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one - // of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupMaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupMaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupNode struct { - // Accelerators: Accelerators for this node. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // ConsumedResources: Node resources that are reserved by all instances. - ConsumedResources *InstanceConsumptionInfo `json:"consumedResources,omitempty"` - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - // Disks: Local disk configurations. - Disks []*LocalDisk `json:"disks,omitempty"` - // InstanceConsumptionData: Instance data that shows consumed resources on the - // node. - InstanceConsumptionData []*InstanceConsumptionData `json:"instanceConsumptionData,omitempty"` - // Instances: Instances scheduled on this node. - Instances []string `json:"instances,omitempty"` - // Name: The name of the node. - Name string `json:"name,omitempty"` - // NodeType: The type of this node. - NodeType string `json:"nodeType,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServerBinding: Binding properties for the physical server. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` - // ServerId: Server ID associated with this node. - ServerId string `json:"serverId,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "REPAIRING" - Status string `json:"status,omitempty"` - // TotalResources: Total amount of available resources on the node. - TotalResources *InstanceConsumptionInfo `json:"totalResources,omitempty"` - // UpcomingMaintenance: [Output Only] The information about an upcoming - // maintenance event. - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupNode) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupNode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsAddNodesRequest struct { - // AdditionalNodeCount: Count of additional nodes to be added to the node - // group. - AdditionalNodeCount int64 `json:"additionalNodeCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalNodeCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalNodeCount") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsAddNodesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsDeleteNodesRequest struct { - // Nodes: Names of the nodes to delete. - Nodes []string `json:"nodes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsDeleteNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsDeleteNodesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsListNodes struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Node resources. - Items []*NodeGroupNode `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute.nodeGroupsListNodes for the list of nodes in the - // specified node group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupsListNodesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodes) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupsListNodesWarning: [Output Only] Informational warning message. -type NodeGroupsListNodesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupsListNodesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodesWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsListNodesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsPerformMaintenanceRequest struct { - // Nodes: [Required] List of nodes affected by the call. - Nodes []string `json:"nodes,omitempty"` - // StartTime: The start time of the schedule. The timestamp is an RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsScopedList struct { - // NodeGroups: [Output Only] A list of node groups contained in this scope. - NodeGroups []*NodeGroup `json:"nodeGroups,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // nodeGroup - // list is empty. - Warning *NodeGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeGroups") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupsScopedListWarning: [Output Only] An informational warning that -// appears when the nodeGroup -// list is empty. -type NodeGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsSetNodeTemplateRequest struct { - // NodeTemplate: Full or partial URL of the node template resource to be - // updated for this - // node group. - NodeTemplate string `json:"nodeTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTemplate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSetNodeTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsSimulateMaintenanceEventRequest struct { - // Nodes: Names of the nodes to go under maintenance simulation. - Nodes []string `json:"nodes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsSimulateMaintenanceEventRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSimulateMaintenanceEventRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplate: Represent a sole-tenant Node Template resource. -// -// You can use a template to define properties for nodes in a node group. -// For -// more information, readCreating node groups -// and instances. -type NodeTemplate struct { - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - Disks []*LocalDisk `json:"disks,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeTemplate for - // node templates. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NodeAffinityLabels: Labels to use for node affinity, which will be used in - // instance scheduling. - NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` - // NodeType: The node type to use for nodes group that are created from this - // template. - NodeType string `json:"nodeType,omitempty"` - // NodeTypeFlexibility: Do not use. Instead, use the node_type property. - NodeTypeFlexibility *NodeTemplateNodeTypeFlexibility `json:"nodeTypeFlexibility,omitempty"` - // Region: [Output Only] The name of the region where the node template - // resides, - // such as us-central1. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServerBinding: Sets the binding properties for the physical server. Valid - // values include: - // - // - *[Default]* RESTART_NODE_ON_ANY_SERVER: - // Restarts VMs on any available - // physical server - // - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same - // physical server whenever possible - // - // - // - // See Sole-tenant - // node options for more information. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` - // Status: [Output Only] The status of the node template. One of the following - // values:CREATING, READY, and DELETING. - // - // Possible values: - // "CREATING" - Resources are being allocated. - // "DELETING" - The node template is currently being deleted. - // "INVALID" - Invalid status. - // "READY" - The node template is ready. - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplate) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTemplatesScopedList resources. - Items map[string]NodeTemplatesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of - // resource.Alwayscompute#nodeTemplateAggregatedList for aggregated lists - // of - // node templates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateAggregatedListWarning: [Output Only] Informational warning -// message. -type NodeTemplateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateList: Contains a list of node templates. -type NodeTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTemplate resources. - Items []*NodeTemplate `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTemplateList - // for lists of node templates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateListWarning: [Output Only] Informational warning message. -type NodeTemplateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateNodeTypeFlexibility struct { - Cpus string `json:"cpus,omitempty"` - LocalSsd string `json:"localSsd,omitempty"` - Memory string `json:"memory,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cpus") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cpus") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateNodeTypeFlexibility) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateNodeTypeFlexibility - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplatesScopedList struct { - // NodeTemplates: [Output Only] A list of node templates contained in this - // scope. - NodeTemplates []*NodeTemplate `json:"nodeTemplates,omitempty"` - // Warning: [Output Only] An informational warning that appears when the node - // templates - // list is empty. - Warning *NodeTemplatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTemplates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTemplates") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplatesScopedListWarning: [Output Only] An informational warning that -// appears when the node templates -// list is empty. -type NodeTemplatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeType: Represent a sole-tenant Node Type resource. -// -// Each node within a node group must have a node type. A node type -// specifies -// the total amount of cores and memory for that node. Currently, the -// only -// available node type is n1-node-96-624 node type that has 96 -// vCPUs and 624 GB of memory, available in multiple zones. For more -// information -// readNode types. -type NodeType struct { - // CpuPlatform: [Output Only] The CPU platform used by this node type. - CpuPlatform string `json:"cpuPlatform,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this node - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // GuestCpus: [Output Only] The number of virtual CPUs that are available to - // the node - // type. - GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeType for - // node types. - Kind string `json:"kind,omitempty"` - // LocalSsdGb: [Output Only] Local SSD available to the node type, defined in - // GB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - // MaxVms: [Output Only] Maximum number of VMs that can be created for this - // node type. - MaxVms int64 `json:"maxVms,omitempty"` - // MemoryMb: [Output Only] The amount of physical memory available to the node - // type, - // defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Zone: [Output Only] The name of the zone where the node type resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CpuPlatform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpuPlatform") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeType) MarshalJSON() ([]byte, error) { - type NoMethod NodeType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTypesScopedList resources. - Items map[string]NodeTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#nodeTypeAggregatedList - // for aggregated lists of node - // types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeAggregatedListWarning: [Output Only] Informational warning message. -type NodeTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeList: Contains a list of node types. -type NodeTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeType resources. - Items []*NodeType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTypeList for - // lists of node types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeListWarning: [Output Only] Informational warning message. -type NodeTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypesScopedList struct { - // NodeTypes: [Output Only] A list of node types contained in this scope. - NodeTypes []*NodeType `json:"nodeTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the node - // types - // list is empty. - Warning *NodeTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypesScopedListWarning: [Output Only] An informational warning that -// appears when the node types -// list is empty. -type NodeTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpoint: Represents a notification endpoint. -// -// A notification endpoint resource defines an endpoint to receive -// notifications -// when there are status changes detected by the associated health -// check -// service. -// -// For more information, see -// Health checks overview. -type NotificationEndpoint struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GrpcSettings: Settings of the gRPC notification endpoint including the - // endpoint URL and - // the retry duration. - GrpcSettings *NotificationEndpointGrpcSettings `json:"grpcSettings,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#notificationEndpoint - // for notification endpoints. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the notification endpoint - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointAggregatedList: Contains a list of -// NotificationEndpointsScopedList. -type NotificationEndpointAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NotificationEndpointsScopedList resources. - Items map[string]NotificationEndpointsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NotificationEndpointAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointAggregatedListWarning: [Output Only] Informational -// warning message. -type NotificationEndpointAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NotificationEndpointAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointGrpcSettings: Represents a gRPC setting that describes -// one gRPC notification endpoint and -// the retry duration attempting to send notification to this endpoint. -type NotificationEndpointGrpcSettings struct { - // Authority: Optional. If specified, this field is used to set the authority - // header by - // the sender of notifications. - // See - // https://tools.ietf.org/html/rfc7540#section-8.1.2.3 - Authority string `json:"authority,omitempty"` - // Endpoint: Endpoint to which gRPC notifications are sent. This must be a - // valid - // gRPCLB DNS name. - Endpoint string `json:"endpoint,omitempty"` - // PayloadName: Optional. If specified, this field is used to populate the - // "name" field - // in gRPC requests. - PayloadName string `json:"payloadName,omitempty"` - // ResendInterval: Optional. This field is used to configure how often to send - // a full update - // of all non-healthy backends. If unspecified, full updates are not sent. - // If specified, must be in the range between 600 seconds to 3600 - // seconds. - // Nanos are disallowed. Can only be set for regional notification - // endpoints. - ResendInterval *Duration `json:"resendInterval,omitempty"` - // RetryDurationSec: How much time (in seconds) is spent attempting - // notification retries - // until a successful response is received. Default is 30s. Limit is - // 20m - // (1200s). Must be a positive number. - RetryDurationSec int64 `json:"retryDurationSec,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointGrpcSettings) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointGrpcSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NotificationEndpoint resources. - Items []*NotificationEndpoint `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#notificationEndpoint - // for notification endpoints. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NotificationEndpointListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointList) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointListWarning: [Output Only] Informational warning -// message. -type NotificationEndpointListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NotificationEndpointListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointsScopedList struct { - // Resources: A list of NotificationEndpoints contained in this scope. - Resources []*NotificationEndpoint `json:"resources,omitempty"` - // Warning: Informational warning which replaces the list of - // notification endpoints when the list is empty. - Warning *NotificationEndpointsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointsScopedListWarning: Informational warning which replaces -// the list of -// notification endpoints when the list is empty. -type NotificationEndpointsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NotificationEndpointsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: Represents an Operation resource. -// -// Google Compute Engine has three Operation resources: -// -// * Global (/compute/docs/reference/rest/alpha/globalOperations) -// * Regional (/compute/docs/reference/rest/alpha/regionOperations) -// * Zonal (/compute/docs/reference/rest/alpha/zoneOperations) -// -// You can use an operation resource to manage asynchronous API requests. -// For more information, readHandling -// API responses. -// -// Operations can be global, regional or zonal. -// -// - For global operations, use the `globalOperations` -// resource. -// - For regional operations, use the -// `regionOperations` resource. -// - For zonal operations, use -// the `zoneOperations` resource. -// -// For more information, read -// Global, Regional, and Zonal Resources. -// -// Note that completed Operation resources have a limited -// retention period. -type Operation struct { - // ClientOperationId: [Output Only] The value of `requestId` if you provided it - // in the request. - // Not present otherwise. - ClientOperationId string `json:"clientOperationId,omitempty"` - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] A textual description of the operation, which - // is - // set when the operation is created. - Description string `json:"description,omitempty"` - // EndTime: [Output Only] The time that this operation was completed. This - // value is inRFC3339 - // text format. - EndTime string `json:"endTime,omitempty"` - // Error: [Output Only] If errors are generated during processing of the - // operation, - // this field will be populated. - Error *OperationError `json:"error,omitempty"` - // HttpErrorMessage: [Output Only] If the operation fails, this field contains - // the HTTP error - // message that was returned, such as `NOT FOUND`. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error - // status code that was returned. For example, a `404` means the - // resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - // Id: [Output Only] The unique identifier for the operation. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InsertTime: [Output Only] The time that this operation was requested. - // This value is inRFC3339 - // text format. - InsertTime string `json:"insertTime,omitempty"` - InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` - // Kind: [Output Only] Type of the resource. Always `compute#operation` - // for - // Operation resources. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the operation. - Name string `json:"name,omitempty"` - // OperationGroupId: [Output Only] An ID that represents a group of operations, - // such as when a - // group of operations results from a `bulkInsert` API request. - OperationGroupId string `json:"operationGroupId,omitempty"` - // OperationType: [Output Only] The type of operation, such as - // `insert`, - // `update`, or `delete`, and so on. - OperationType string `json:"operationType,omitempty"` - // Progress: [Output Only] An optional progress indicator that ranges from 0 to - // 100. - // There is no requirement that this be linear or support any granularity - // of - // operations. This should not be used to guess when the operation will - // be - // complete. This number should monotonically increase as the - // operation - // progresses. - Progress int64 `json:"progress,omitempty"` - // Region: [Output Only] The URL of the region where the operation resides. - // Only - // applicable when performing regional operations. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the operation - // is for projects.setCommonInstanceMetadata, - // this field will contain information on all underlying zonal actions - // and - // their state. - SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` - // StartTime: [Output Only] The time that this operation was started by the - // server. - // This value is inRFC3339 - // text format. - StartTime string `json:"startTime,omitempty"` - // Status: [Output Only] The status of the operation, which can be one of - // the - // following: - // `PENDING`, `RUNNING`, or `DONE`. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional textual description of the current - // status of the - // operation. - StatusMessage string `json:"statusMessage,omitempty"` - // TargetId: [Output Only] The unique target ID, which identifies a specific - // incarnation - // of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For - // operations related to creating a snapshot, this points to the disk - // that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - // User: [Output Only] User who requested the operation, for - // example: - // `user@example.com` or - // `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. - User string `json:"user,omitempty"` - // Warnings: [Output Only] If warning messages are generated during processing - // of the - // operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only - // applicable when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientOperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientOperationId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during processing of -// the operation, -// this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*OperationErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // `compute#operationAggregatedList` - // for aggregated lists of operations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger than - // `maxResults`, use the `nextPageToken` as a value for - // the query parameter `pageToken` in the next list request. - // Subsequent list requests will have their own `nextPageToken` to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *OperationAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationAggregatedListWarning: [Output Only] Informational warning message. -type OperationAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always `compute#operations` for - // Operations - // resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger than - // `maxResults`, use the `nextPageToken` as a value for - // the query parameter `pageToken` in the next list request. - // Subsequent list requests will have their own `nextPageToken` to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *OperationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationListWarning: [Output Only] Informational warning message. -type OperationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationsScopedList struct { - // Operations: [Output Only] A list of operations contained in this scope. - Operations []*Operation `json:"operations,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // operations - // when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Operations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationsScopedListWarning: [Output Only] Informational warning which -// replaces the list of operations -// when the list is empty. -type OperationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrganizationSecurityPoliciesListAssociationsResponse struct { - // Associations: A list of associations. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - // Kind: [Output Only] Type of securityPolicy associations. - // Alwayscompute#organizationSecurityPoliciesListAssociations for lists - // of securityPolicy associations. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrganizationSecurityPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrganizationSecurityPoliciesListAssociationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OriginAuthenticationMethod: [Deprecated] Configuration for the origin -// authentication method. -// Configuration for the origin authentication method. -type OriginAuthenticationMethod struct { - Jwt *Jwt `json:"jwt,omitempty"` - // ForceSendFields is a list of field names (e.g. "Jwt") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Jwt") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OriginAuthenticationMethod) MarshalJSON() ([]byte, error) { - type NoMethod OriginAuthenticationMethod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OutlierDetection: Settings controlling the eviction of unhealthy hosts from -// the load balancing -// pool for the backend service. -type OutlierDetection struct { - // BaseEjectionTime: The base time that a backend endpoint is ejected for. - // Defaults to 30000ms - // or 30s. - // - // After a backend endpoint is returned back to the load balancing pool, it - // can be ejected again in another ejection analysis. Thus, the total - // ejection - // time is equal to the base ejection time multiplied by the number of - // times - // the backend endpoint has been ejected. Defaults to 30000ms or 30s. - BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` - // ConsecutiveErrors: Number of consecutive errors before a backend endpoint is - // ejected from the - // load balancing pool. When the backend endpoint is accessed over HTTP, a - // 5xx - // return code qualifies as an error. Defaults to 5. - ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` - // ConsecutiveGatewayFailure: The number of consecutive gateway failures (502, - // 503, 504 status or - // connection errors that are mapped to one of those status codes) before - // a - // consecutive gateway failure ejection occurs. Defaults to 3. - ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` - // EnforcingConsecutiveErrors: The percentage chance that a backend endpoint - // will be ejected when an - // outlier status is detected through consecutive 5xx. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` - // EnforcingConsecutiveGatewayFailure: The percentage chance that a backend - // endpoint will be ejected when an - // outlier status is detected through consecutive gateway failures. - // This - // setting can be used to disable ejection or to ramp it up slowly. Defaults - // to 100. - EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` - // EnforcingSuccessRate: The percentage chance that a backend endpoint will be - // ejected when an - // outlier status is detected through success rate statistics. This setting - // can be used to disable ejection or to ramp it up slowly. Defaults to - // 100. - // - // Not supported when the backend service uses Serverless NEG. - EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - // Interval: Time interval between ejection analysis sweeps. This can result in - // both new - // ejections and backend endpoints being returned to service. The interval - // is - // equal to the number of seconds as defined - // in - // outlierDetection.interval.seconds plus the number of nanoseconds as - // defined - // in outlierDetection.interval.nanos. Defaults to 1 second. - Interval *Duration `json:"interval,omitempty"` - // MaxEjectionPercent: Maximum percentage of backend endpoints in the load - // balancing pool for the - // backend service that can be ejected if the ejection conditions are - // met. - // Defaults to 50%. - MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` - // SuccessRateMinimumHosts: The number of backend endpoints in the load - // balancing pool that must have - // enough request volume to detect success rate outliers. If the number - // of - // backend endpoints is fewer than this setting, outlier detection via - // success - // rate statistics is not performed for any backend endpoint in the - // load - // balancing pool. Defaults to 5. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateMinimumHosts int64 `json:"successRateMinimumHosts,omitempty"` - // SuccessRateRequestVolume: The minimum number of total requests that must be - // collected in one interval - // (as defined by the interval duration above) to include this backend - // endpoint in success rate based outlier detection. If the volume is - // lower - // than this setting, outlier detection via success rate statistics is - // not - // performed for that backend endpoint. Defaults to 100. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateRequestVolume int64 `json:"successRateRequestVolume,omitempty"` - // SuccessRateStdevFactor: This factor is used to determine the ejection - // threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean - // success rate, and the product of this factor and the standard deviation - // of - // the mean success rate: mean - (stdev * successRateStdevFactor). This - // factor - // is divided by a thousand to get a double. That is, if the desired factor - // is 1.9, the runtime value should be 1900. Defaults to 1900. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateStdevFactor int64 `json:"successRateStdevFactor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BaseEjectionTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseEjectionTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OutlierDetection) MarshalJSON() ([]byte, error) { - type NoMethod OutlierDetection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketIntervals: Next free: 7 -type PacketIntervals struct { - // AvgMs: Average observed inter-packet interval in milliseconds. - AvgMs int64 `json:"avgMs,omitempty,string"` - // Duration: From how long ago in the past these intervals were observed. - // - // Possible values: - // "DURATION_UNSPECIFIED" - // "HOUR" - // "MAX" - From BfdSession object creation time. - // "MINUTE" - Duration string `json:"duration,omitempty"` - // MaxMs: Maximum observed inter-packet interval in milliseconds. - MaxMs int64 `json:"maxMs,omitempty,string"` - // MinMs: Minimum observed inter-packet interval in milliseconds. - MinMs int64 `json:"minMs,omitempty,string"` - // NumIntervals: Number of inter-packet intervals from which these statistics - // were derived. - NumIntervals int64 `json:"numIntervals,omitempty,string"` - // Type: The type of packets for which inter-packet intervals were computed. - // - // Possible values: - // "LOOPBACK" - Only applies to Echo packets. This shows the intervals - // between sending - // and receiving the same packet. - // "RECEIVE" - Intervals between received packets. - // "TRANSMIT" - Intervals between transmitted packets. - // "TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvgMs") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvgMs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketIntervals) MarshalJSON() ([]byte, error) { - type NoMethod PacketIntervals - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroring: Represents a Packet Mirroring resource. -// -// Packet Mirroring clones the traffic of specified instances in your -// Virtual -// Private Cloud (VPC) network and forwards it to a collector destination, -// such as an instance group of an internal TCP/UDP load balancer, for -// analysis -// or examination. -// For more information about setting up Packet Mirroring, seeUsing Packet -// Mirroring. -type PacketMirroring struct { - // CollectorIlb: The Forwarding Rule resource of - // typeloadBalancingScheme=INTERNAL that will be used as collector - // for mirrored traffic. - // The specified forwarding rule must have isMirroringCollector - // set to true. - CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Enable: Indicates whether or not this packet mirroring takes effect. - // If set to FALSE, this packet mirroring policy will not be enforced on - // the - // network. - // - // The default is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - // Filter: Filter for mirrored traffic. If unspecified, all IPv4 traffic is - // mirrored. - Filter *PacketMirroringFilter `json:"filter,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#packetMirroring for - // packet mirrorings. - Kind string `json:"kind,omitempty"` - // MirroredResources: PacketMirroring - // mirroredResourceInfos. - // MirroredResourceInfo specifies a set of mirrored VM instances, - // subnetworks - // and/or tags for which traffic from/to all VM instances will be mirrored. - MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Network: Specifies the mirrored VPC network. Only packets in this network - // will be - // mirrored. All mirrored VMs should have a NIC in the given network. - // All mirrored subnetworks should belong to the given network. - Network *PacketMirroringNetworkInfo `json:"network,omitempty"` - // Priority: The priority of applying this configuration. Priority is used to - // break ties - // in cases where there is more than one matching rule. In the case of - // two - // rules that apply for a given Instance, the one with the - // lowest-numbered - // priority value wins. - // - // Default value is 1000. Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - // Region: [Output Only] URI of the region where the packetMirroring resides. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CollectorIlb") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CollectorIlb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroring) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroring - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringAggregatedList: Contains a list of packetMirrorings. -type PacketMirroringAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PacketMirroring resources. - Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringAggregatedListWarning: [Output Only] Informational warning -// message. -type PacketMirroringAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringFilter struct { - // IPProtocols: Protocols that apply as filter on mirrored traffic. - // If no protocols are specified, all traffic that matches the specified - // CIDR ranges is mirrored. - // If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic - // is - // mirrored. - IPProtocols []string `json:"IPProtocols,omitempty"` - // CidrRanges: One or more IPv4 or IPv6 CIDR ranges that apply as filters on - // the source - // (ingress) or destination (egress) IP in the IP header. If no ranges - // are - // specified, all IPv4 traffic that matches the specified IPProtocols - // is - // mirrored. If neither cidrRanges nor IPProtocols is specified, all - // IPv4 - // traffic is mirrored. To mirror all IPv4 and IPv6 traffic, - // use - // "0.0.0.0/0,::/0". - CidrRanges []string `json:"cidrRanges,omitempty"` - // Direction: Direction of traffic to mirror, either INGRESS, EGRESS, or - // BOTH. - // The default is BOTH. - // - // Possible values: - // "BOTH" - Default, both directions are mirrored. - // "EGRESS" - Only egress traffic is mirrored. - // "INGRESS" - Only ingress traffic is mirrored. - Direction string `json:"direction,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocols") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocols") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringFilter) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringForwardingRuleInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the forwarding rule; - // defined by the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the forwarding rule representing the ILB - // configured as destination of the mirrored traffic. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringForwardingRuleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringList: Contains a list of PacketMirroring resources. -type PacketMirroringList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PacketMirroring resources. - Items []*PacketMirroring `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#packetMirroring - // for packetMirrorings. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringListWarning: [Output Only] Informational warning message. -type PacketMirroringListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfo struct { - // Instances: A set of virtual machine instances that are being mirrored. - // They must live in zones contained in the same region as - // this - // packetMirroring. - // - // Note that this config will apply only to those network interfaces of - // the - // Instances that belong to the network specified in this packetMirroring. - // - // You may specify a maximum of 50 Instances. - Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` - // Subnetworks: A set of subnetworks for which traffic from/to all VM instances - // will be - // mirrored. They must live in the same region as this packetMirroring. - // - // You may specify a maximum of 5 subnetworks. - Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` - // Tags: A set of mirrored tags. Traffic from/to all VM instances that have one - // or - // more of these tags will be mirrored. - Tags []string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfoInstanceInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the instance; defined by - // the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the virtual machine instance which is being mirrored. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfoSubnetInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; defined by - // the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the subnetwork for which - // traffic from/to all VM instances will be mirrored. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringNetworkInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the network; defined by - // the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: URL of the network resource. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringNetworkInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringsScopedList struct { - // PacketMirrorings: A list of packetMirrorings contained in this scope. - PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` - // Warning: Informational warning which replaces the list of packetMirrorings - // when the - // list is empty. - Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "PacketMirrorings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PacketMirrorings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringsScopedListWarning: Informational warning which replaces the -// list of packetMirrorings when the -// list is empty. -type PacketMirroringsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PartnerMetadata: Model definition of partner_metadata field. -// To be used in dedicated Partner Metadata methods and to be inlined in -// the Instance and InstanceTemplate resources. -type PartnerMetadata struct { - // Fingerprint: Instance-level hash to be used for optimistic - // locking. - Fingerprint string `json:"fingerprint,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance. A map from a - // subdomain to - // entries map. Subdomain name must be compliant withRFC1035 - // definition. The total size of all keys and values must be less than - // 2MB. - // Subdomain 'metadata.compute.googleapis.com' is reserverd for - // instance's - // metadata. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod PartnerMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService -// from the longest-matched rule will serve the URL. If no rule was matched, -// the -// default service is used. -type PathMatcher struct { - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy specifies - // how the Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // This policy takes - // effect at the PathMatcher level and applies only when no - // policy has been defined for the error code at lower levels likeRouteRule and - // PathRule within thisPathMatcher. If an error code does not have a policy - // defined - // in defaultCustomErrorResponsePolicy, then a policy defined for - // the error code in UrlMap.defaultCustomErrorResponsePolicy - // takes effect. - // - // For example, consider a UrlMap with the following - // configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy is configured - // with policies for 5xx and 4xx errors - // - A RouteRule for /coming_soon/ is configured for the - // error code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in RouteRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // When - // used in conjunction withpathMatcher.defaultRouteAction.retryPolicy, retries - // take - // precedence. Only once all retries are exhausted, - // thedefaultCustomErrorResponsePolicy is applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the defaultCustomErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // defaultCustomErrorResponsePolicy is supported only for - // global external Application Load Balancers. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // - // pathRules or routeRules match. The load balancer - // performs advanced routing actions, such as URL rewrites and - // header transformations, before forwarding the request to the - // selected backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a path matcher'sdefaultRouteAction. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - // DefaultService: The full or partial URL to the BackendService resource. - // This - // URL is used if none of the pathRules orrouteRules defined by this - // PathMatcher are - // matched. For example, the - // following are all valid URLs to a BackendService resource: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - // - compute/v1/projects/project/global/backendServices/backendService - // - global/backendServices/backendService - // - // - // If defaultRouteAction is also specified, advanced - // routing actions, such as URL rewrites, take effect before sending - // the - // request to the backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Authorization requires one or more of the following Google IAM permissions - // on the - // specified resource default_service: - // - // - // - compute.backendBuckets.use - // - compute.backendServices.use - DefaultService string `json:"defaultService,omitempty"` - // DefaultUrlRedirect: When none of the specified pathRules orrouteRules match, - // the request is redirected to a URL specified - // by defaultUrlRedirect. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backend service. - // - // HeaderAction specified here are applied after the matchingHttpRouteRule - // HeaderAction and before theHeaderAction in the UrlMap - // - // HeaderAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // Name: The name to which this PathMatcher is referred by theHostRule. - Name string `json:"name,omitempty"` - // PathRules: The list of path rules. Use this list instead of routeRules - // when routing based on simple path matching is all that's required. The - // order by which path rules are specified does not matter. Matches are - // always - // done on the longest-path-first basis. - // - // For example: a pathRule with a path /a/b/c/* will match - // before /a/b/* irrespective of the order in which those paths appear in - // this - // list. - // - // Within a given pathMatcher, only one ofpathRules or routeRules must be set. - PathRules []*PathRule `json:"pathRules,omitempty"` - // RouteRules: The list of HTTP route rules. Use this list instead ofpathRules - // when advanced route matching and routing actions are - // desired. routeRules are evaluated in order of priority, from - // the lowest to highest number. - // - // Within a given pathMatcher, you can set only one ofpathRules or routeRules. - RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s PathMatcher) MarshalJSON() ([]byte, error) { - type NoMethod PathMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PathRule: A path-matching rule for a URL. If matched, will use the -// specifiedBackendService to handle the traffic arriving at this URL. -type PathRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how the - // Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // If a policy for an - // error code is not configured for the PathRule, a policy for - // the error code configured inpathMatcher.defaultCustomErrorResponsePolicy is - // applied. If - // one is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the - // policy - // configured in UrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // For example, consider a UrlMap with the following configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy are configured - // with policies for 5xx and 4xx errors - // - A PathRule for /coming_soon/ is configured for the error - // code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in PathRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // customErrorResponsePolicy is supported only for - // global external Application Load Balancers. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - // Paths: The list of path patterns to match. Each must start with / - // and the only place a * is allowed is at the end following - // a /. The string fed to the path matcher does not include - // any text after the first ? or #, and - // those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - // RouteAction: In response to a matching path, the load balancer - // performs advanced routing actions, such as URL rewrites and - // header - // transformations, before forwarding the request to the - // selected - // backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a path rule'srouteAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` - // Service: The full or partial URL of the backend service resource to which - // traffic - // is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, - // take effect before sending the request to the backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - Service string `json:"service,omitempty"` - // UrlRedirect: When a path pattern is matched, the request is redirected to a - // URL - // specified by urlRedirect. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomErrorResponsePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PathRule) MarshalJSON() ([]byte, error) { - type NoMethod PathRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PeerAuthenticationMethod: [Deprecated] Configuration for the peer -// authentication method. -// Configuration for the peer authentication method. -type PeerAuthenticationMethod struct { - // Mtls: Set if mTLS is used for peer authentication. - Mtls *MutualTls `json:"mtls,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mtls") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mtls") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PeerAuthenticationMethod) MarshalJSON() ([]byte, error) { - type NoMethod PeerAuthenticationMethod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PerInstanceConfig struct { - // Fingerprint: Fingerprint of this per-instance config. This field can be used - // in - // optimistic locking. It is ignored when inserting a per-instance - // config. An up-to-date fingerprint must be provided in order to update - // an - // existing per-instance configuration or the field needs to be unset. - Fingerprint string `json:"fingerprint,omitempty"` - // Name: The name of a per-instance configuration and its corresponding - // instance. - // Serves as a merge key during UpdatePerInstanceConfigs - // operations, that is, if a per-instance configuration with the same - // name - // exists then it will be updated, otherwise a new one will be created for - // the - // VM instance with the same name. An attempt to create a - // per-instance - // configuration for a VM instance that either doesn't exist or is not part - // of the group will result in an error. - Name string `json:"name,omitempty"` - // PreservedState: The intended preserved state for the given instance. Does - // not contain - // preserved state generated from a stateful policy. - PreservedState *PreservedState `json:"preservedState,omitempty"` - // Status: The status of applying this per-instance configuration on the - // corresponding - // managed instance. - // - // Possible values: - // "APPLYING" - The per-instance configuration is being applied to the - // instance, but is - // not yet effective, possibly waiting for the instance to, for - // example,REFRESH. - // "DELETING" - The per-instance configuration deletion is being applied on - // the instance, - // possibly waiting for the instance to, for example, REFRESH. - // "EFFECTIVE" - The per-instance configuration is effective on the instance, - // meaning that - // all disks, ips and metadata specified in this configuration are attached - // or set on the instance. - // "NONE" - *[Default]* The default status, when no per-instance - // configuration - // exists. - // "UNAPPLIED" - The per-instance configuration is set on an instance but not - // been applied - // yet. - // "UNAPPLIED_DELETION" - The per-instance configuration has been deleted, - // but the deletion is not - // yet applied. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PerInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod PerInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Permission: [Deprecated] All fields defined in a permission are ANDed. -type Permission struct { - // Constraints: Extra custom constraints. The constraints are ANDed together. - Constraints []*PermissionConstraint `json:"constraints,omitempty"` - // Hosts: Used in Ingress or Egress Gateway cases to specify hosts that the - // policy - // applies to. Exact match, prefix match, and suffix match are supported. - Hosts []string `json:"hosts,omitempty"` - // Methods: HTTP method. - Methods []string `json:"methods,omitempty"` - // NotHosts: Negate of hosts. Specifies exclusions. - NotHosts []string `json:"notHosts,omitempty"` - // NotMethods: Negate of methods. Specifies exclusions. - NotMethods []string `json:"notMethods,omitempty"` - // NotPaths: Negate of paths. Specifies exclusions. - NotPaths []string `json:"notPaths,omitempty"` - // NotPorts: Negate of ports. Specifies exclusions. - NotPorts []string `json:"notPorts,omitempty"` - // Paths: HTTP request paths or gRPC methods. - // Exact match, prefix match, and suffix match are supported. - Paths []string `json:"paths,omitempty"` - // Ports: Port names or numbers. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "Constraints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Constraints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Permission) MarshalJSON() ([]byte, error) { - type NoMethod Permission - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PermissionConstraint: Custom constraint that specifies a key and a list of -// allowed values for -// Istio attributes. -type PermissionConstraint struct { - // Key: Key of the constraint. - Key string `json:"key,omitempty"` - // Values: A list of allowed values. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PermissionConstraint) MarshalJSON() ([]byte, error) { - type NoMethod PermissionConstraint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Policy: An Identity and Access Management (IAM) policy, which specifies -// access -// controls for Google Cloud resources. -// -// A `Policy` is a collection of `bindings`. A `binding` binds one or -// more -// `members`, or principals, to a 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreconfiguredWafSet struct { - // ExpressionSets: List of entities that are currently supported for WAF rules. - ExpressionSets []*WafExpressionSet `json:"expressionSets,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpressionSets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpressionSets") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreconfiguredWafSet) MarshalJSON() ([]byte, error) { - type NoMethod PreconfiguredWafSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreservedState: Preserved state for a given instance. -type PreservedState struct { - // Disks: Preserved disks defined for this instance. - // This map is keyed with the device names of the disks. - Disks map[string]PreservedStatePreservedDisk `json:"disks,omitempty"` - // ExternalIPs: Preserved external IPs defined for this instance. - // This map is keyed with the name of the network interface. - ExternalIPs map[string]PreservedStatePreservedNetworkIp `json:"externalIPs,omitempty"` - // InternalIPs: Preserved internal IPs defined for this instance. - // This map is keyed with the name of the network interface. - InternalIPs map[string]PreservedStatePreservedNetworkIp `json:"internalIPs,omitempty"` - // Metadata: Preserved metadata defined for this instance. - Metadata map[string]string `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedState) MarshalJSON() ([]byte, error) { - type NoMethod PreservedState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedDisk struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, - // update, instance recreate operations. This flag is used to configure - // if the disk should be deleted after it is no longer used by the group, - // e.g. when the given instance or the whole MIG is deleted. - // Note: disks attached in READ_ONLY mode cannot be - // auto-deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // Mode: The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. - // If not specified, the default is to attach the - // disk in READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple VM instances - // can use - // a disk in READ_ONLY mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in READ_WRITE mode. Only - // one VM instance at a time can be attached to a disk inREAD_WRITE mode. - Mode string `json:"mode,omitempty"` - // Source: The URL of the disk resource that is stateful and should be - // attached - // to the VM instance. - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the IP reservation should be deleted - // after it is no longer used by the group, e.g. when the given instance - // or the whole group is deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // IpAddress: Ip address representation - IpAddress *PreservedStatePreservedNetworkIpIpAddress `json:"ipAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedNetworkIpIpAddress struct { - // Address: The URL of the reservation for this IP address. - Address string `json:"address,omitempty"` - // Literal: An IPv4 internal network address to assign to the instance for - // this - // network interface. - Literal string `json:"literal,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedNetworkIpIpAddress) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIpIpAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeature: Represents a single Google Compute Engine preview feature. -type PreviewFeature struct { - // ActivationStatus: Specifies whether the feature is enabled or disabled. - // - // Possible values: - // "ACTIVATION_STATE_UNSPECIFIED" - // "DISABLED" - // "ENABLED" - ActivationStatus string `json:"activationStatus,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] Description of the feature. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] The type of the feature. Always "compute#previewFeature" - // for - // preview features. - Kind string `json:"kind,omitempty"` - // Name: Name of the feature. - Name string `json:"name,omitempty"` - // RolloutOperation: Rollout operation of the feature. - RolloutOperation *PreviewFeatureRolloutOperation `json:"rolloutOperation,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output only] Status of the feature. - Status *PreviewFeatureStatus `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ActivationStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActivationStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeature) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PreviewFeature resources. - Items []*PreviewFeature `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PreviewFeatureListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureList) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureListWarning: [Output Only] Informational warning message. -type PreviewFeatureListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PreviewFeatureListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureRolloutOperation: Represents the rollout operation -type PreviewFeatureRolloutOperation struct { - // RolloutInput: Input only. The input for the rollout operation. - RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "RolloutInput") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RolloutInput") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureRolloutOperation) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureRolloutOperationRolloutInput: Represents the input for the -// rollout operation. -type PreviewFeatureRolloutOperationRolloutInput struct { - // Name: The name of the rollout - // plan - // Ex. - // organizations//locations/global/rolloutPlans/ - // Ex. - // folders//locations/global/rolloutPlans/ - // Ex. - // projects//locations/global/rolloutPlans/. - Name string `json:"name,omitempty"` - // PredefinedRolloutPlan: Predefined rollout plan. - // - // Possible values: - // "ROLLOUT_PLAN_FAST_ROLLOUT" - // "ROLLOUT_PLAN_TWO_DAY_ROLLOUT" - // "ROLLOUT_PLAN_UNSPECIFIED" - PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureRolloutOperationRolloutInput) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureStatus: [Output Only] The status of the feature. -type PreviewFeatureStatus struct { - // Description: [Output Only] The description of the feature. - Description string `json:"description,omitempty"` - // HelpLink: [Output Only] Link to the public documentation for the feature. - HelpLink string `json:"helpLink,omitempty"` - ReleaseStatus *PreviewFeatureStatusReleaseStatus `json:"releaseStatus,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureStatusReleaseStatus: [Output Only] The release status of the -// feature. -type PreviewFeatureStatusReleaseStatus struct { - // Stage: [Output Only] The stage of the feature. - // - // Possible values: - // "DEPRECATED" - // "GA" - // "PREVIEW" - // "STAGE_UNSPECIFIED" - Stage string `json:"stage,omitempty"` - // UpdateDate: Output only. The last date when a feature transitioned between - // ReleaseStatuses. - UpdateDate *Date `json:"updateDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Stage") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Stage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureStatusReleaseStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureStatusReleaseStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Principal: [Deprecated] All fields defined in a principal are ANDed. -type Principal struct { - // Condition: An expression to specify custom condition. - Condition string `json:"condition,omitempty"` - // Groups: The groups the principal belongs to. - // Exact match, prefix match, and suffix match are supported. - Groups []string `json:"groups,omitempty"` - // Ips: IPv4 or IPv6 address or range (In CIDR format) - Ips []string `json:"ips,omitempty"` - // Namespaces: The namespaces. Exact match, prefix match, and suffix match are - // supported. - Namespaces []string `json:"namespaces,omitempty"` - // NotGroups: Negate of groups. Specifies exclusions. - NotGroups []string `json:"notGroups,omitempty"` - // NotIps: Negate of IPs. Specifies exclusions. - NotIps []string `json:"notIps,omitempty"` - // NotNamespaces: Negate of namespaces. Specifies exclusions. - NotNamespaces []string `json:"notNamespaces,omitempty"` - // NotUsers: Negate of users. Specifies exclusions. - NotUsers []string `json:"notUsers,omitempty"` - // Properties: A map of Istio attribute to expected values. Exact match, prefix - // match, and - // suffix match are supported for values. For - // example, - // `request.headers[version]: "v1". The properties are ANDed together. - Properties map[string]string `json:"properties,omitempty"` - // Users: The user names/IDs or service accounts. - // Exact match, prefix match, and suffix match are supported. - Users []string `json:"users,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Principal) MarshalJSON() ([]byte, error) { - type NoMethod Principal - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Project: Represents a Project resource. -// -// A project is used to organize resources in a Google Cloud -// Platform -// environment. For more information, read about the -// Resource Hierarchy. -type Project struct { - // CloudArmorTier: [Output Only] The Cloud Armor tier for this project. It can - // be one of the - // following values: CA_STANDARD,CA_ENTERPRISE_PAYGO. - // - // If this field is not specified, it is assumed to beCA_STANDARD. - // - // Possible values: - // "CA_ENTERPRISE_ANNUAL" - Enterprise tier protection billed annually. - // "CA_ENTERPRISE_PAYGO" - Enterprise tier protection billed monthly. - // "CA_STANDARD" - Standard protection. - CloudArmorTier string `json:"cloudArmorTier,omitempty"` - // CommonInstanceMetadata: Metadata key/value pairs available to all instances - // contained in this - // project. See Custom - // metadata for more information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultNetworkTier: This signifies the default network tier used for - // configuring resources of - // the project and can only take the following values:PREMIUM, STANDARD. - // Initially the default network - // tier is PREMIUM. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - DefaultNetworkTier string `json:"defaultNetworkTier,omitempty"` - // DefaultServiceAccount: [Output Only] Default service account used by VMs - // running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - // EnabledFeatures: An optional list of restricted features enabled for use on - // this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. This is *not* the project ID, and is - // just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#project - // for - // projects. - Kind string `json:"kind,omitempty"` - // ManagedProtectionTier: [Output Only] The Cloud Armor Managed Protection - // (CAMP) tier for - // this project. It can be one of the following values:CA_STANDARD, - // CAMP_PLUS_PAYGO. - // - // If this field is not specified, it is assumed to beCA_STANDARD. - // - // Possible values: - // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. - // "CAMP_PLUS_PAYGO" - Plus tier protection monthly. - // "CA_STANDARD" - Standard protection. - ManagedProtectionTier string `json:"managedProtectionTier,omitempty"` - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: An optional naming prefix for daily usage reports and - // the Google Cloud - // Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs running - // in - // this project. - // - // Possible values: - // "GLOBAL_DEFAULT" - // "UNSPECIFIED_VM_DNS_SETTING" - // "ZONAL_DEFAULT" - // "ZONAL_ONLY" - VmDnsSetting string `json:"vmDnsSetting,omitempty"` - // XpnProjectStatus: [Output Only] The role this project has in a shared VPC - // configuration. - // Currently, only projects with the host role, which is specified by the - // value HOST, are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudArmorTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudArmorTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Project) MarshalJSON() ([]byte, error) { - type NoMethod Project - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "XpnResource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsDisableXpnResourceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "XpnResource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsEnableXpnResourceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Alwayscompute#projectsGetXpnResources - // for lists of service resources - // (a.k.a service projects) - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: Service resources (a.k.a service projects) attached to this - // project as - // their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsGetXpnResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource Manager, - // for which to - // list shared VPC host projects. If not specified, the organization will - // be - // inferred from the project. - Organization string `json:"organization,omitempty"` - // ReturnPartialPage: Opt-in for partial page behavior which provides a partial - // filled page - // (number of items on which may be smaller than maxResults) within the - // API - // deadline. If opt-in, then the user should rely on if nextPageToken is - // empty - // in the response to determine if there is a next page. Empty page is - // also - // valid and possible. The default value is false. - ReturnPartialPage bool `json:"returnPartialPage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Organization") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Organization") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsListXpnHostsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetCloudArmorTierRequest struct { - // CloudArmorTier: Managed protection tier to be set. - // - // Possible values: - // "CA_ENTERPRISE_ANNUAL" - Enterprise tier protection billed annually. - // "CA_ENTERPRISE_PAYGO" - Enterprise tier protection billed monthly. - // "CA_STANDARD" - Standard protection. - CloudArmorTier string `json:"cloudArmorTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloudArmorTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudArmorTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetCloudArmorTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetCloudArmorTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetDefaultNetworkTierRequest struct { - // NetworkTier: Default network tier to be set. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetDefaultNetworkTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetDefaultNetworkTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetDefaultServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetDefaultServiceAccountRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetDefaultServiceAccountRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetManagedProtectionTierRequest struct { - // ManagedProtectionTier: Managed protection tier to be set. - // - // Possible values: - // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. - // "CAMP_PLUS_PAYGO" - Plus tier protection monthly. - // "CA_STANDARD" - Standard protection. - ManagedProtectionTier string `json:"managedProtectionTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "ManagedProtectionTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedProtectionTier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetManagedProtectionTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetManagedProtectionTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefix: A public advertised prefix represents an aggregated -// IP prefix or netblock -// which customers bring to cloud. The IP prefix is a single unit of -// route -// advertisement and is announced globally to the internet. -type PublicAdvertisedPrefix struct { - // ByoipApiVersion: [Output Only] The version of BYOIP API. - // - // Possible values: - // "V1" - This public advertised prefix can be used to create both regional - // and - // global public delegated prefixes. It usually takes 4 weeks to create - // or - // delete a public delegated prefix. The BGP status cannot be changed. - // "V2" - This public advertised prefix can only be used to create regional - // public - // delegated prefixes. Public delegated prefix creation and deletion - // takes - // minutes and the BGP status can be modified. - ByoipApiVersion string `json:"byoipApiVersion,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DnsVerificationIp: The address to be used for reverse DNS verification. - DnsVerificationIp string `json:"dnsVerificationIp,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a new PublicAdvertisedPrefix. An up-to-date - // fingerprint must be provided in order to update thePublicAdvertisedPrefix, - // otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a PublicAdvertisedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // IpCidrRange: The address range, in CIDR format, represented by this public - // advertised - // prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: The internet access type for IPv6 Public Advertised - // Prefixes. - // - // Possible values: - // "EXTERNAL" - Default IPv6 access type. The prefix will be announced to the - // internet. - // All children Public Delegated Prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The prefix will not be announced to the internet. Prefix will - // be used - // privately within Cloud. All children Public Delegated Prefixes - // will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PdpScope: Specifies how child public delegated prefix will be scoped. It - // could - // be one of following values: - // - // - // - `REGIONAL`: The public delegated prefix is regional only. The - // provisioning will take a few minutes. - // - `GLOBAL`: The public delegated prefix is global only. The - // provisioning will take ~4 weeks. - // - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes - // is - // BYOIP V1 legacy prefix. This is output only value and no longer - // supported in BYOIP V2. - // - // Possible values: - // "GLOBAL" - The public delegated prefix is global only. The provisioning - // will take ~4 - // weeks. - // "GLOBAL_AND_REGIONAL" - The public delegated prefixes is BYOIP V1 legacy - // prefix. This is output - // only value and no longer supported in BYOIP V2. - // "REGIONAL" - The public delegated prefix is regional only. The - // provisioning will take - // a few minutes. - PdpScope string `json:"pdpScope,omitempty"` - // PublicDelegatedPrefixs: [Output Only] The list of public delegated prefixes - // that exist for this - // public advertised prefix. - PublicDelegatedPrefixs []*PublicAdvertisedPrefixPublicDelegatedPrefix `json:"publicDelegatedPrefixs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SharedSecret: [Output Only] The shared secret to be used for reverse DNS - // verification. - SharedSecret string `json:"sharedSecret,omitempty"` - // Status: The status of the public advertised prefix. Possible values - // include: - // - // - // - `INITIAL`: RPKI validation is complete. - // - `PTR_CONFIGURED`: User has configured the PTR. - // - `VALIDATED`: Reverse DNS lookup is successful. - // - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. - // - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being - // configured. - // - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. - // - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. - // - // Possible values: - // "ANNOUNCED_TO_INTERNET" - The prefix is announced to Internet. - // "INITIAL" - RPKI validation is complete. - // "PREFIX_CONFIGURATION_COMPLETE" - The prefix is fully configured. - // "PREFIX_CONFIGURATION_IN_PROGRESS" - The prefix is being configured. - // "PREFIX_REMOVAL_IN_PROGRESS" - The prefix is being removed. - // "PTR_CONFIGURED" - User has configured the PTR. - // "READY_TO_ANNOUNCE" - The prefix is currently withdrawn but ready to be - // announced. - // "REVERSE_DNS_LOOKUP_FAILED" - Reverse DNS lookup failed. - // "VALIDATED" - Reverse DNS lookup is successful. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ByoipApiVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ByoipApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicAdvertisedPrefixList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicAdvertisedPrefix resources. - Items []*PublicAdvertisedPrefix `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicAdvertisedPrefixListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefixListWarning: [Output Only] Informational warning -// message. -type PublicAdvertisedPrefixListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicAdvertisedPrefixListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicAdvertisedPrefixListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefixPublicDelegatedPrefix: Represents a CIDR range which -// can be used to assign addresses. -type PublicAdvertisedPrefixPublicDelegatedPrefix struct { - // IpRange: The IP address range of the public delegated prefix - IpRange string `json:"ipRange,omitempty"` - // Name: The name of the public delegated prefix - Name string `json:"name,omitempty"` - // Project: The project number of the public delegated prefix - Project string `json:"project,omitempty"` - // Region: The region of the public delegated prefix if it is regional. If - // absent, - // the prefix is global. - Region string `json:"region,omitempty"` - // Status: The status of the public delegated prefix. Possible values are: - // INITIALIZING: The public delegated prefix is being initialized and - // addresses cannot be created yet. - // ANNOUNCED: The public delegated prefix is active. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixPublicDelegatedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefix: A PublicDelegatedPrefix resource represents an IP -// block within a -// PublicAdvertisedPrefix that is configured within a single cloud -// scope -// (global or region). IPs in the block can be allocated to resources -// within -// that scope. Public delegated prefixes may be further broken up into -// smaller IP blocks in the same scope as the parent block. -type PublicDelegatedPrefix struct { - // AllocatablePrefixLength: The allocatable prefix length supported by this - // public delegated prefix. - // This field is optional and cannot be set for prefixes in DELEGATION mode. - // It cannot be set for IPv4 prefixes either, and it always defaults to 32. - AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` - // ByoipApiVersion: [Output Only] The version of BYOIP API. - // - // Possible values: - // "V1" - This public delegated prefix usually takes 4 weeks to delete, and - // the BGP - // status cannot be changed. Announce and Withdraw APIs can not be used on - // this prefix. - // "V2" - This public delegated prefix takes minutes to delete. Announce - // and - // Withdraw APIs can be used on this prefix to change the BGP status. - ByoipApiVersion string `json:"byoipApiVersion,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEnhancedIpv4Allocation: [Output Only] Whether this PDP supports - // enhanced IPv4 allocations. - // Applicable for IPv4 PDPs only. - EnableEnhancedIpv4Allocation bool `json:"enableEnhancedIpv4Allocation,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a new PublicDelegatedPrefix. An up-to-date - // fingerprint must be provided in order to update thePublicDelegatedPrefix, - // otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a PublicDelegatedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // IpCidrRange: The IP address range, in CIDR format, represented by this - // public - // delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: [Output Only] The internet access type for IPv6 Public - // Delegated Prefixes. - // Inherited from parent prefix. - // - // Possible values: - // "EXTERNAL" - The parent public advertised prefix will be announced to the - // internet. - // All children public delegated prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The parent public advertised prefix will not be announced to - // the - // internet. Prefix will be used privately within Cloud. All children - // public delegated prefixes will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // IsLiveMigration: If true, the prefix will be live migrated. - IsLiveMigration bool `json:"isLiveMigration,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefix for public delegated prefixes. - Kind string `json:"kind,omitempty"` - // Mode: The public delegated prefix mode for IPv6 only. - // - // Possible values: - // "DELEGATION" - The public delegated prefix is used for further - // sub-delegation only. Such - // prefixes cannot set allocatablePrefixLength. - // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. - // Such prefixes cannot set publicDelegatedSubPrefixes. Parent public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual-mode subnetworks - // only. Such prefixes cannot set publicDelegatedSubPrefixes. Parent - // public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "INTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual stack or IPv6-only - // subnetwork with internal access only. Such prefixes cannot - // set - // publicDelegatedSubPrefixes and allocatablePrefixLength. Parent - // public - // delegated prefix must have IPv6 access type as INTERNAL. - Mode string `json:"mode,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ParentPrefix: The URL of parent prefix. Either PublicAdvertisedPrefix - // or - // PublicDelegatedPrefix. - ParentPrefix string `json:"parentPrefix,omitempty"` - // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes that - // exist for this public - // delegated prefix. - PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` - // Purpose: The purpose of the public delegated prefix. - // - // This field can only be set for the top-level global public delegated - // prefix. It is an output-only field for the sub-delegates that inherit - // the - // value from the top-level global public delegated prefix. Once the value - // is - // set, it cannot be changed. - // - // The field cannot be set for regional public delegated prefixes. - // - // The supported values are: - // - // - // - APPLICATION_AND_PROXY_LOAD_BALANCERS: The global public - // delegated prefix can only be used by Global External Application and - // Proxy Load Balancers to allocate addresses for forwarding rules. This - // is - // the default value. - // - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0: The - // global public delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group 0 - // addresses for forwarding rules. - // - PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1: The - // global public delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group 1 - // addresses for forwarding rules. - // - // Possible values: - // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global public delegated - // prefix can only be used by Global External - // Application and Proxy Load Balancers to allocate addresses for - // forwarding - // rules. This is the default value. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global public - // delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group - // 0 - // addresses for forwarding rules. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global public - // delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group - // 1 - // addresses for forwarding rules. - Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] URL of the region where the public delegated prefix - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] The status of the public delegated prefix, which can - // be one - // of following values: - // - // - // - `INITIALIZING` The public delegated prefix is being initialized and - // addresses cannot be created yet. - // - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration - // prefix and is active. - // - `ANNOUNCED` The public delegated prefix is announced and ready to - // use. - // - `DELETING` The public delegated prefix is being deprovsioned. - // - `ACTIVE` The public delegated prefix is ready to use. - // - // Possible values: - // "ACTIVE" - The public delegated prefix is ready to use. - // "ANNOUNCED" - The public delegated prefix is announced and ready to use. - // "ANNOUNCED_TO_GOOGLE" - The prefix is announced within Google network. - // "ANNOUNCED_TO_INTERNET" - The prefix is announced to Internet and within - // Google. - // "DELETING" - The public delegated prefix is being deprovsioned. - // "INITIALIZING" - The public delegated prefix is being initialized and - // addresses cannot be - // created yet. - // "READY_TO_ANNOUNCE" - The public delegated prefix is currently withdrawn - // but ready to be - // announced. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllocatablePrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatablePrefixLength") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicDelegatedPrefixesScopedList resources. - Items map[string]PublicDelegatedPrefixesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefixAggregatedList for aggregated - // lists of public delegated prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixAggregatedListWarning: [Output Only] Informational -// warning message. -type PublicDelegatedPrefixAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicDelegatedPrefix resources. - Items []*PublicDelegatedPrefix `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefixList for public delegated - // prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixListWarning: [Output Only] Informational warning -// message. -type PublicDelegatedPrefixListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub -// PublicDelegatedPrefix. -type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { - // AllocatablePrefixLength: The allocatable prefix length supported by this - // PublicDelegatedSubPrefix. - AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` - // DelegateeProject: Name of the project scoping this PublicDelegatedSubPrefix. - DelegateeProject string `json:"delegateeProject,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEnhancedIpv4Allocation: [Output Only] Whether this PDP supports - // enhanced IPv4 allocations. - // Applicable for IPv4 PDPs only. - EnableEnhancedIpv4Allocation bool `json:"enableEnhancedIpv4Allocation,omitempty"` - // IpCidrRange: The IP address range, in CIDR format, represented by this sub - // public - // delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: [Output Only] The internet access type for IPv6 Public - // Delegated Sub - // Prefixes. Inherited from parent prefix. - // - // Possible values: - // "EXTERNAL" - The parent public advertised prefix will be announced to the - // internet. - // All children public delegated prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The parent public advertised prefix will not be announced to - // the - // internet. Prefix will be used privately within Cloud. All children - // public delegated prefixes will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // IsAddress: Whether the sub prefix is delegated to create Address resources - // in the - // delegatee project. - IsAddress bool `json:"isAddress,omitempty"` - // Mode: The PublicDelegatedSubPrefix mode for IPv6 only. - // - // Possible values: - // "DELEGATION" - The public delegated prefix is used for further - // sub-delegation only. Such - // prefixes cannot set allocatablePrefixLength. - // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. - // Such prefixes cannot set publicDelegatedSubPrefixes. Parent public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual-mode subnetworks - // only. Such prefixes cannot set publicDelegatedSubPrefixes. Parent - // public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "INTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual stack or IPv6-only - // subnetwork with internal access only. Such prefixes cannot - // set - // publicDelegatedSubPrefixes and allocatablePrefixLength. Parent - // public - // delegated prefix must have IPv6 access type as INTERNAL. - Mode string `json:"mode,omitempty"` - // Name: The name of the sub public delegated prefix. - Name string `json:"name,omitempty"` - // Purpose: [Output Only] The purpose of the sub public delegated prefix. - // Inherited - // from parent prefix. - // - // Possible values: - // "APPLICATION_AND_PROXY_LOAD_BALANCERS" - The global public delegated - // prefix can only be used by Global External - // Application and Proxy Load Balancers to allocate addresses for - // forwarding - // rules. This is the default value. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP0" - The global public - // delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group - // 0 - // addresses for forwarding rules. - // "PASSTHROUGH_LOAD_BALANCER_AVAILABILITY_GROUP1" - The global public - // delegated prefix can only be used by Global External - // Passthrough Network Load Balancers to allocate Availability Group - // 1 - // addresses for forwarding rules. - Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] The region of the sub public delegated prefix if it - // is - // regional. If absent, the sub prefix is global. - Region string `json:"region,omitempty"` - // Status: [Output Only] The status of the sub public delegated prefix. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocatablePrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatablePrefixLength") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixPublicDelegatedSubPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixPublicDelegatedSubPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixesScopedList struct { - // PublicDelegatedPrefixes: [Output Only] A list of PublicDelegatedPrefixes - // contained in this scope. - PublicDelegatedPrefixes []*PublicDelegatedPrefix `json:"publicDelegatedPrefixes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of - // public delegated prefixes when the list is empty. - Warning *PublicDelegatedPrefixesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicDelegatedPrefixes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicDelegatedPrefixes") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixesScopedListWarning: [Output Only] Informational -// warning which replaces the list of -// public delegated prefixes when the list is empty. -type PublicDelegatedPrefixesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResource: QueuedResource represents a request for future capacity. The -// capacity is -// delivered in the form of other GCE resources, either Instances -// or -// Reservations. -type QueuedResource struct { - // BulkInsertInstanceResource: Specification of VM instances to create. - BulkInsertInstanceResource *BulkInsertInstanceResource `json:"bulkInsertInstanceResource,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#queuedResource for - // QueuedResources. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // QueuingPolicy: Queuing parameters for the requested capacity. - QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output only] High-level status of the request. - // - // Possible values: - // "ACCEPTED" - The request was created successfully and was accepted for - // provisioning - // when the capacity becomes available. - // "CANCELLED" - The request was canceled by the user. - // "CREATING" - QueuedResource is being created and may still fail creation. - // "DELETING" - The request is being deleted. - // "FAILED" - The request failed before or during provisioning. - // "PROVISIONING" - The target resource(s) are being provisioned. - // "STATE_UNSPECIFIED" - // "SUCCEEDED" - The request succeeded. - State string `json:"state,omitempty"` - // Status: [Output only] Result of queuing and provisioning based on - // deferred - // capacity. - Status *QueuedResourceStatus `json:"status,omitempty"` - // Zone: [Output Only] URL of the zone where the resource resides. Only - // applicable - // for zonal resources. You must specify this field as part of the HTTP - // request URL. It is not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BulkInsertInstanceResource") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BulkInsertInstanceResource") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResource) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourceList struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of QueuedResource resources. - Items []*QueuedResource `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // formaxResults, use the nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: Informational warning message. - Warning *QueuedResourceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceList) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourceListWarning: Informational warning message. -type QueuedResourceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*QueuedResourceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourceStatus: [Output only] Result of queuing and provisioning based -// on deferred -// capacity. -type QueuedResourceStatus struct { - // FailedData: Additional status detail for the FAILED state. - FailedData *QueuedResourceStatusFailedData `json:"failedData,omitempty"` - // ProvisioningOperations: [Output only] Fully qualified URL of the - // provisioning GCE operation to - // track the provisioning along with provisioning errors. The - // referenced - // operation may not exist after having been deleted or expired. - ProvisioningOperations []string `json:"provisioningOperations,omitempty"` - // QueuingPolicy: Constraints for the time when the resource(s) start - // provisioning. Always - // exposed as absolute times. - QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailedData") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailedData") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourceStatusFailedData: Additional status detail for the FAILED -// state. -type QueuedResourceStatusFailedData struct { - // Error: The error(s) that caused the QueuedResource to enter the FAILED - // state. - Error *QueuedResourceStatusFailedDataError `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceStatusFailedData) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceStatusFailedData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourceStatusFailedDataError: The error(s) that caused the -// QueuedResource to enter the FAILED state. -type QueuedResourceStatusFailedDataError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*QueuedResourceStatusFailedDataErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceStatusFailedDataError) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceStatusFailedDataError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourceStatusFailedDataErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*QueuedResourceStatusFailedDataErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceStatusFailedDataErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceStatusFailedDataErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourceStatusFailedDataErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourceStatusFailedDataErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourceStatusFailedDataErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourcesAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of QueuedResourcesScopedList resources. - Items map[string]QueuedResourcesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#queuedResourcesAggregatedList for lists of - // QueuedResource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *QueuedResourcesAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourcesAggregatedListWarning: [Output Only] Informational warning -// message. -type QueuedResourcesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*QueuedResourcesAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourcesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourcesScopedList struct { - // QueuedResources: List of QueuedResources contained in this scope. - QueuedResources []*QueuedResource `json:"queuedResources,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *QueuedResourcesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueuedResources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QueuedResources") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedResourcesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type QueuedResourcesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*QueuedResourcesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type QueuedResourcesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedResourcesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod QueuedResourcesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuingPolicy: Queuing parameters for the requested deferred capacity. -type QueuingPolicy struct { - // ValidUntilDuration: Relative deadline for waiting for capacity. - ValidUntilDuration *Duration `json:"validUntilDuration,omitempty"` - // ValidUntilTime: Absolute deadline for waiting for capacity inRFC3339 - // text format. - ValidUntilTime string `json:"validUntilTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ValidUntilDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ValidUntilDuration") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod QueuingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "A2_CPUS" - // "AFFINITY_GROUPS" - // "AMD_S9300_GPUS" - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "C2D_CPUS" - // "C2_CPUS" - // "C3_CPUS" - // "COMMITMENTS" - // "COMMITTED_A2_CPUS" - // "COMMITTED_C2D_CPUS" - // "COMMITTED_C2_CPUS" - // "COMMITTED_C3_CPUS" - // "COMMITTED_CPUS" - // "COMMITTED_E2_CPUS" - // "COMMITTED_LICENSES" - // "COMMITTED_LOCAL_SSD_TOTAL_GB" - // "COMMITTED_M3_CPUS" - // "COMMITTED_MEMORY_OPTIMIZED_CPUS" - // "COMMITTED_N2A_CPUS" - // "COMMITTED_N2D_CPUS" - // "COMMITTED_N2_CPUS" - // "COMMITTED_NVIDIA_A100_80GB_GPUS" - // "COMMITTED_NVIDIA_A100_GPUS" - // "COMMITTED_NVIDIA_H100_GPUS" - // "COMMITTED_NVIDIA_K80_GPUS" - // "COMMITTED_NVIDIA_L4_GPUS" - // "COMMITTED_NVIDIA_P100_GPUS" - // "COMMITTED_NVIDIA_P4_GPUS" - // "COMMITTED_NVIDIA_T4_GPUS" - // "COMMITTED_NVIDIA_V100_GPUS" - // "COMMITTED_T2A_CPUS" - // "COMMITTED_T2D_CPUS" - // "COMMITTED_Z3_CPUS" - // "CPUS" - Guest CPUs - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "E2_CPUS" - // "EXTERNAL_MANAGED_FORWARDING_RULES" - // "EXTERNAL_NETWORK_LB_FORWARDING_RULES" - // "EXTERNAL_PROTOCOL_FORWARDING_RULES" - // "EXTERNAL_VPN_GATEWAYS" - // "FIREWALLS" - // "FORWARDING_RULES" - // "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES" - // "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_ADDRESSES" - // "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" - // "GPUS_ALL_REGIONS" - // "HDB_TOTAL_GB" - // "HDB_TOTAL_IOPS" - // "HDB_TOTAL_THROUGHPUT" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "INTERCONNECTS" - // "INTERCONNECT_ATTACHMENTS_PER_REGION" - // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" - // "INTERCONNECT_TOTAL_GBPS" - // "INTERNAL_ADDRESSES" - // "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES" - // "IN_PLACE_SNAPSHOTS" - // "IN_USE_ADDRESSES" - // "IN_USE_BACKUP_SCHEDULES" - // "IN_USE_MAINTENANCE_WINDOWS" - // "IN_USE_SNAPSHOT_SCHEDULES" - // "LOCAL_SSD_TOTAL_GB" - // "M1_CPUS" - // "M2_CPUS" - // "M3_CPUS" - // "MACHINE_IMAGES" - // "N2A_CPUS" - // "N2D_CPUS" - // "N2_CPUS" - // "NETWORKS" - // "NETWORK_ATTACHMENTS" - // "NETWORK_ENDPOINT_GROUPS" - // "NETWORK_FIREWALL_POLICIES" - // "NET_LB_SECURITY_POLICIES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION" - // "NODE_GROUPS" - // "NODE_TEMPLATES" - // "NVIDIA_A100_80GB_GPUS" - // "NVIDIA_A100_GPUS" - // "NVIDIA_K80_GPUS" - // "NVIDIA_L4_GPUS" - // "NVIDIA_P100_GPUS" - // "NVIDIA_P100_VWS_GPUS" - // "NVIDIA_P4_GPUS" - // "NVIDIA_P4_VWS_GPUS" - // "NVIDIA_T4_GPUS" - // "NVIDIA_T4_VWS_GPUS" - // "NVIDIA_V100_GPUS" - // "PACKET_MIRRORINGS" - // "PD_EXTREME_TOTAL_PROVISIONED_IOPS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS" - // "PREEMPTIBLE_NVIDIA_A100_GPUS" - // "PREEMPTIBLE_NVIDIA_H100_GPUS" - // "PREEMPTIBLE_NVIDIA_K80_GPUS" - // "PREEMPTIBLE_NVIDIA_L4_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_V100_GPUS" - // "PREEMPTIBLE_TPU_LITE_DEVICE_V4" - // "PREEMPTIBLE_TPU_LITE_DEVICE_V5" - // "PREEMPTIBLE_TPU_LITE_PODSLICE_V5" - // "PREEMPTIBLE_TPU_PODSLICE_V4" - // "PRIVATE_V6_ACCESS_SUBNETWORKS" - // "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK" - // "PSC_INTERNAL_LB_FORWARDING_RULES" - // "PUBLIC_ADVERTISED_PREFIXES" - // "PUBLIC_DELEGATED_PREFIXES" - // "QUEUED_RESOURCES" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "REGIONAL_INTERNAL_LB_BACKEND_SERVICES" - // "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" - // "REGION_EXTERNAL_MANAGED_BACKEND_BUCKETS" - // "REGION_INTERNAL_MANAGED_BACKEND_BUCKETS" - // "RESERVATIONS" - // "RESOURCE_POLICIES" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICIES_PER_REGION" - // "SECURITY_POLICY_ADVANCED_RULES_PER_REGION" - // "SECURITY_POLICY_CEVAL_RULES" - // "SECURITY_POLICY_RULES" - // "SECURITY_POLICY_RULES_PER_REGION" - // "SERVICE_ATTACHMENTS" - // "SNAPSHOTS" - The total number of snapshots allowed for a single project. - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "SSL_POLICIES" - // "STATIC_ADDRESSES" - // "STATIC_BYOIP_ADDRESSES" - // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" - // "SUBNETWORKS" - // "T2A_CPUS" - // "T2D_CPUS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_TCP_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "TPU_LITE_DEVICE_V4" - // "TPU_LITE_DEVICE_V5" - // "TPU_LITE_PODSLICE_V5" - // "TPU_PODSLICE_V4" - // "URL_MAPS" - // "VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES" - // "VPN_GATEWAYS" - // "VPN_TUNNELS" - // "XPN_SERVICE_PROJECTS" - Metric string `json:"metric,omitempty"` - // Owner: [Output Only] Owning resource. This is the resource on which this - // quota - // is applied. - Owner string `json:"owner,omitempty"` - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Limit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Quota) MarshalJSON() ([]byte, error) { - type NoMethod Quota - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Quota) UnmarshalJSON(data []byte) error { - type NoMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil -} - -// QuotaExceededInfo: Additional details for quota exceeded error for resource -// quota. -type QuotaExceededInfo struct { - // Dimensions: The map holding related quota dimensions. - Dimensions map[string]string `json:"dimensions,omitempty"` - // FutureLimit: Future quota limit being rolled out. The limit's unit depends - // on the quota - // type or metric. - FutureLimit float64 `json:"futureLimit,omitempty"` - // Limit: Current effective quota limit. The limit's unit depends on the quota - // type - // or metric. - Limit float64 `json:"limit,omitempty"` - // LimitName: The name of the quota limit. - LimitName string `json:"limitName,omitempty"` - // MetricName: The Compute Engine quota metric name. - MetricName string `json:"metricName,omitempty"` - // RolloutStatus: Rollout status of the future quota limit. - // - // Possible values: - // "IN_PROGRESS" - IN_PROGRESS - A rollout is in process which will change - // the limit value - // to future limit. - // "ROLLOUT_STATUS_UNSPECIFIED" - ROLLOUT_STATUS_UNSPECIFIED - Rollout status - // is not specified. The default - // value. - RolloutStatus string `json:"rolloutStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimensions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QuotaExceededInfo) MarshalJSON() ([]byte, error) { - type NoMethod QuotaExceededInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { - type NoMethod QuotaExceededInfo - var s1 struct { - FutureLimit gensupport.JSONFloat64 `json:"futureLimit"` - Limit gensupport.JSONFloat64 `json:"limit"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FutureLimit = float64(s1.FutureLimit) - s.Limit = float64(s1.Limit) - return nil -} - -type RbacPolicy struct { - // Name: Name of the RbacPolicy. - Name string `json:"name,omitempty"` - // Permissions: The list of permissions. - Permissions []*Permission `json:"permissions,omitempty"` - // Principals: The list of principals. - Principals []*Principal `json:"principals,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RbacPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RbacPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecoverableSnapshot: Represents a RecoverableSnapshot resource. -// -// A RecoverableSnapshot represents a snapshot in recycle bin. -type RecoverableSnapshot struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: Optional. An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#recoverableSnapshot - // for RecoverableSnapshot - // resources. - Kind string `json:"kind,omitempty"` - // Name: Identifier. Name of the recoverable snapshot generated on the deletion - // of the snapshot. - // The name will be 1-63 characters long, and comply withRFC1035. - // Specifically, the name will be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character will be a lowercase letter, and all following characters can be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // OriginalResource: Output Only] The original snapshot resource. - OriginalResource *RecoverableSnapshotOriginalSnapshot `json:"originalResource,omitempty"` - // PurgeTimestamp: [Output Only] Purge timestamp of recoverable snapshot - // inRFC3339 - // text format. - PurgeTimestamp string `json:"purgeTimestamp,omitempty"` - // SatisfiesPzi: Output only. [Output Only] Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the recoverable snapshot. - // - // Possible values: - // "CREATING" - Recoverable Snapshot creation is in progress. - // "DELETING" - Recovered Snapshot is currently being deleted. - // "FAILED" - Recoverable Snapshot creation failed. - // "READY" - Recoverable Snapshot has been created successfully. - // "RECOVERING" - Recoverable Snapshot is currently being recovered. - // "UNKNOWN" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshot) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of RecoverableSnapshotsScopedList resources. - Items map[string]RecoverableSnapshotsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#recoverableSnapshotAggregatedList for aggregated lists - // of recoverablesnapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable - // resources. - // end_interface: - // MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RecoverableSnapshotAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecoverableSnapshotAggregatedListWarning: [Output Only] Informational -// warning message. -type RecoverableSnapshotAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RecoverableSnapshotAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of RecoverableSnapshots resources. - Items []*RecoverableSnapshot `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#recoverableSnapshotList - // for lists of - // recoverablesnapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RecoverableSnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecoverableSnapshotListWarning: [Output Only] Informational warning message. -type RecoverableSnapshotListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RecoverableSnapshotListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotOriginalSnapshot struct { - // Architecture: [Output Only] The architecture of the snapshot. Valid values - // are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AutoCreated: [Output Only] Set to true if snapshots are automatically - // created by - // applying resource policy on the target disk. - AutoCreated bool `json:"autoCreated,omitempty"` - // AutoCreatedBy: ResourceKey of the resource policy or flow which created this - // auto - // snapshot - AutoCreatedBy string `json:"autoCreatedBy,omitempty"` - // ChainName: Creates the new snapshot in the snapshot chain labeled with - // the - // specified name. The chain name must be 1-63 characters long and comply - // with RFC1035. This is an uncommon option only for advanced service - // owners who needs to create separate snapshot chains, for example, - // for chargeback tracking. When you describe your snapshot resource, - // this - // field is visible only if it has a non-empty value. - ChainName string `json:"chainName,omitempty"` - // CreationSizeBytes: [Output Only] Size in bytes of the snapshot at creation - // time. - CreationSizeBytes int64 `json:"creationSizeBytes,omitempty,string"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeletionTimestamp: [Output Only] Purge timestamp of recoverable snapshot - // inRFC3339 text format. - DeletionTimestamp string `json:"deletionTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DownloadBytes: [Output Only] Number of bytes downloaded to restore a - // snapshot to a disk. - DownloadBytes int64 `json:"downloadBytes,omitempty,string"` - // EnableConfidentialCompute: Whether this snapshot is created from a - // confidential compute mode disk. - // [Output Only]: This field is not set by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // Full: Indicates the created snapshot is a full snapshot. - Full bool `json:"full,omitempty"` - // GuestOsFeatures: [Output Only] A list of features to enable on the guest - // operating system. - // Applicable only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the original snapshot. - // This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this snapshot. These can be later modified by - // the setLabels method. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: [Output Only] Integer license codes indicating which licenses - // are - // attached to this snapshot. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: [Output Only] A list of public visible licenses that apply to - // this - // snapshot. - Licenses []string `json:"licenses,omitempty"` - // MaxRetentionDays: Number of days the snapshot should be retained before - // being deleted - // automatically. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - // Name: Name of the original snapshot provided by the client. The name must - // be - // 1-63 characters long, and comply with RFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the snapshot resides. - // Only - // applicable for regional snapshots. - Region string `json:"region,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SnapshotEncryptionKey: Encrypts the snapshot using - // acustomer-supplied - // encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the snapshot later. For example, you - // must - // provide the encryption key when you create a disk from the - // encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the snapshot. - // - // If you do not provide an encryption key when creating the snapshot, then - // the snapshot will be encrypted using an automatically generated key and - // you do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - // SnapshotGroupId: [Output Only] The unique ID of the snapshot group that this - // snapshot - // belongs to. - SnapshotGroupId string `json:"snapshotGroupId,omitempty"` - // SnapshotGroupName: [Output only] The snapshot group that this snapshot - // belongs to. - SnapshotGroupName string `json:"snapshotGroupName,omitempty"` - // SnapshotType: Indicates the type of the snapshot. - // - // Possible values: - // "ARCHIVE" - // "STANDARD" - SnapshotType string `json:"snapshotType,omitempty"` - // SourceDisk: The source disk used to create this snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskEncryptionKey: The customer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // SourceDiskForRecoveryCheckpoint: The source disk whose recovery checkpoint - // will be used to create this - // snapshot. - SourceDiskForRecoveryCheckpoint string `json:"sourceDiskForRecoveryCheckpoint,omitempty"` - // SourceDiskId: [Output Only] The ID value of the disk used to create this - // snapshot - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceInstantSnapshot: The source instant snapshot used to create this - // snapshot. - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceInstantSnapshotEncryptionKey: Customer provided encryption key when - // creating Snapshot from Instant - // Snapshot. - SourceInstantSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceInstantSnapshotEncryptionKey,omitempty"` - // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot - // used to create this - // snapshot. This value identifies the exact instant snapshot that was used - // to create this persistent disk. For example, if you created the - // persistent disk from an instant snapshot that was later deleted - // and - // recreated under the same name, the source instant snapshot ID would - // identify the exact instant snapshot that was used. - SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` - // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource policy which - // created this - // scheduled snapshot. - SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` - // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource policy - // which created this - // scheduled snapshot. - SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` - // StorageBytes: [Output Only] A size of the storage used by the snapshot. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the snapshot - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // UserLicenses: [Output Only] A list of user provided licenses represented by - // a list of - // URLs to the license resource. - UserLicenses []string `json:"userLicenses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotOriginalSnapshot) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotOriginalSnapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotsScopedList struct { - // Recoverablesnapshots: [Output Only] A list of recoverablesnapshots contained - // in this scope. - Recoverablesnapshots []*RecoverableSnapshot `json:"recoverablesnapshots,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of - // recoverablesnapshots when the list is empty. - Warning *RecoverableSnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Recoverablesnapshots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Recoverablesnapshots") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecoverableSnapshotsScopedListWarning: [Output Only] Informational warning -// which replaces the list of -// recoverablesnapshots when the list is empty. -type RecoverableSnapshotsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RecoverableSnapshotsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RecoverableSnapshotsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecoverableSnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RecoverableSnapshotsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Reference: Represents a reference to a resource. -type Reference struct { - // Kind: [Output Only] Type of the resource. Always compute#reference - // for references. - Kind string `json:"kind,omitempty"` - // ReferenceType: A description of the reference type with no implied - // semantics. Possible - // values include: - // - // - // 1. MEMBER_OF - ReferenceType string `json:"referenceType,omitempty"` - // Referrer: URL of the resource which refers to the target. - Referrer string `json:"referrer,omitempty"` - // Target: URL of the resource to which this reference points. - Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Reference) MarshalJSON() ([]byte, error) { - type NoMethod Reference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Region: Represents a Region resource. -// -// A region is a geographical area where a resource is located. For -// more -// information, readRegions -// and Zones. -type Region struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // QuotaStatusWarning: [Output Only] Warning of fetching the `quotas` field for - // this region. This - // field is populated only if fetching of the `quotas` field fails. - QuotaStatusWarning *RegionQuotaStatusWarning `json:"quotaStatusWarning,omitempty"` - // Quotas: [Output Only] Quotas assigned to this region. - Quotas []*Quota `json:"quotas,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the region, either UP orDOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - // Zones: [Output Only] A list of zones available in this region, in the form - // of - // resource URLs. - Zones []string `json:"zones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Region) MarshalJSON() ([]byte, error) { - type NoMethod Region - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionQuotaStatusWarning: [Output Only] Warning of fetching the `quotas` -// field for this region. This -// field is populated only if fetching of the `quotas` field fails. -type RegionQuotaStatusWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionQuotaStatusWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionQuotaStatusWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionQuotaStatusWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionQuotaStatusWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionQuotaStatusWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionQuotaStatusWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionAddressesMoveRequest struct { - // Description: An optional destination address description if intended to be - // different - // from the source. - Description string `json:"description,omitempty"` - // DestinationAddress: The URL of the destination address to move to. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a address: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address - // - // - projects/project/regions/region/addresses/address - // - // - // Note that destination project must be different from the source project. - // So/regions/region/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionAddressesMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionAutoscalerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerListWarning: [Output Only] Informational warning message. -type RegionAutoscalerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionAutoscalerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionAutoscalerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionCommitmentsUpdateReservationsRequest struct { - // Reservations: A list of two reservations to transfer GPUs and Local SSD - // disks between. - Reservations []*Reservation `json:"reservations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reservations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionCommitmentsUpdateReservationsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionCommitmentsUpdateReservationsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#regionDiskTypeList for - // region disk types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionDiskTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeList) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionDiskTypeListWarning: [Output Only] Informational warning message. -type RegionDiskTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionDiskTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDiskTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksAddResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be added to this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksResizeRequest struct { - // SizeGb: The new size of the regional persistent disk, which is specified in - // GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SizeGb") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksStartAsyncReplicationRequest struct { - // AsyncSecondaryDisk: The secondary disk to start asynchronous replication - // to. - // You can provide this as a partial or full URL to the resource. For - // example, - // the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncSecondaryDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksStartAsyncReplicationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupListWarning: [Output Only] Informational warning message. -type RegionInstanceGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerDeleteInstanceConfigReq: -// RegionInstanceGroupManagers.deletePerInstanceConfigs -type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { - // Names: The list of instance names for which we want to delete per-instance - // configs - // on this managed instance group. - Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Names") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Names") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerDeleteInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerDeleteInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerList: Contains a list of managed instance groups. -type RegionInstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // always - // compute#instanceGroupManagerList for a list of managed instance groups - // that - // exist in th regional scope. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerListWarning: [Output Only] Informational warning -// message. -type RegionInstanceGroupManagerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerPatchInstanceConfigReq: -// RegionInstanceGroupManagers.patchPerInstanceConfigs -type RegionInstanceGroupManagerPatchInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerPatchInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerPatchInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerResizeRequestsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Resize Request resources. - Items []*InstanceGroupManagerResizeRequest `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#regionInstanceGroupManagerResizeRequestList for - // a list of Resize Requests. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagerResizeRequestsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerResizeRequestsListResponseWarning: [Output Only] -// Informational warning message. -type RegionInstanceGroupManagerResizeRequestsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagerResizeRequestsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerResizeRequestsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerUpdateInstanceConfigReq: -// RegionInstanceGroupManagers.updatePerInstanceConfigs -type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerUpdateInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerUpdateInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersAbandonInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersApplyUpdatesRequest: -// RegionInstanceGroupManagers.applyUpdatesToInstances -type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // AllInstances: Flag to update all instances instead of specified list of - // “instances”. - // If the flag is set to true then the instances may not be specified - // in the request. - AllInstances bool `json:"allInstances,omitempty"` - // Instances: The list of URLs of one or more instances for which you want to - // apply - // updates. Each URL can be a full URL or a partial URL, such - // aszones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // MaximalAction: The maximal action that should be performed on the - // instances. - // By default REPLACE. - // This field is deprecated, please use most_disruptive_allowed_action. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MaximalAction string `json:"maximalAction,omitempty"` - // MinimalAction: The minimal action that you want to perform on each instance - // during the - // update: - // - // - // - REPLACE: At minimum, delete the instance and create it - // again. - // - RESTART: Stop the instance and start it - // again. - // - REFRESH: Do not stop the instance and limit - // disruption as much as possible. - // - NONE: Do not - // disrupt the instance at all. - // - // - // By default, the minimum action is NONE. If your update - // requires a more disruptive action than you set with this flag, the - // necessary action is performed to execute the update. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that you want to - // perform on each instance during - // the update: - // - // - // - REPLACE: Delete the instance and create it again. - // - RESTART: Stop the instance and start it again. - // - REFRESH: Do not stop the instance and limit disruption - // as much as possible. - // - NONE: Do not disrupt the - // instance at all. - // - // - // By default, the most disruptive allowed action is REPLACE. If - // your update requires a more disruptive action than you set with this - // flag, - // the update request will fail. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersApplyUpdatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersCreateInstancesRequest: -// RegionInstanceGroupManagers.createInstances -type RegionInstanceGroupManagersCreateInstancesRequest struct { - // Instances: [Required] List of specifications of per-instance configs. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersCreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // SkipInstancesOnValidationError: Specifies whether the request should proceed - // despite the inclusion of - // instances that are not members of the group or that are already in - // the - // process of being deleted or abandoned. If this field is set to `false` - // and - // such an instance is specified in the request, the operation fails. - // The - // operation always fails if the request contains a malformed instance URL or - // a reference to an instance that exists in a zone or region other than - // the - // group's zone or region. - SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersDeleteInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListErrorsResponse struct { - // Items: [Output Only] The list of errors of the managed instance group. - Items []*InstanceManagedByIgmError `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListErrorsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagersListInstanceConfigsRespWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsResp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersListInstanceConfigsRespWarning: [Output Only] -// Informational warning message. -type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagersListInstanceConfigsRespWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstanceConfigsRespWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: A list of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstancesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersRecreateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group attempts - // to create all - // instances initiated by this resize request only once. If there is an - // error - // during creation, the managed instance group does not retry create - // this - // instance, and we will decrease the targetSize of the request - // instead. If the flag is false, the group attempts to recreate each - // instance - // continuously until it succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. - // After an instance is successfully created while this flag is enabled, - // the - // instance behaves the same way as all the other instances created with - // a - // regular resize request. In particular, if a running instance - // dies - // unexpectedly at a later time and needs to be recreated, this mode does - // not - // affect the recreation behavior in that scenario. - // - // This flag is applicable only to the current resize request. It does - // not - // influence other resize requests in any way. - // - // You can see which instances ar being created in which mode by calling - // the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - // TargetSize: The number of running instances that the managed instance group - // should - // maintain at any given time. The group automatically adds or - // removes - // instances to maintain the number of instances specified by this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NoCreationRetries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersResizeAdvancedRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersResumeInstancesRequest struct { - // Instances: The URLs of one or more instances to resume. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersResumeInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetAutoHealingRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a hash of - // the - // contents. This field is used for optimistic locking when you update - // the - // target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` - // TargetPools: The URL of all TargetPool resources to which instances in - // theinstanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTargetPoolsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all new - // instances will be - // created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersStartInstancesRequest struct { - // Instances: The URLs of one or more instances to start. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersStartInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersStopInstancesRequest struct { - // ForceStop: If this flag is set to true, the Instance Group Manager will - // proceed to - // stop the instances, skipping initialization on them. - ForceStop bool `json:"forceStop,omitempty"` - // Instances: The URLs of one or more instances to stop. This can be a full URL - // or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceStop") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceStop") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersStopInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSuspendInstancesRequest struct { - // ForceSuspend: If this flag is set to true, the Instance Group Manager will - // proceed to - // suspend the instances, skipping initialization on them. - ForceSuspend bool `json:"forceSuspend,omitempty"` - // Instances: The URLs of one or more instances to suspend. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceSuspend") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceSuspend") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSuspendInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupsListInstancesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstances - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupsListInstancesWarning: [Output Only] Informational -// warning message. -type RegionInstanceGroupsListInstancesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupsListInstancesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid options - // are: - // 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - Matches any status of the instances, running, non-running and - // others. - // "RUNNING" - Instance is in RUNNING state if it is running. - InstanceState string `json:"instanceState,omitempty"` - // PortName: Name of port user is interested in. It is optional. If it is set, - // only - // information about this ports will be returned. If it is not set, all - // the - // named ports will be returned. - // Always lists all instances. - PortName string `json:"portName,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. - // Use this optional property to prevent conflicts when multiple users - // change - // the named ports settings concurrently. Obtain the fingerprint with - // theinstanceGroups.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another - // concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsSetNamedPortsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionList: Contains a list of region resources. -type RegionList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionList) MarshalJSON() ([]byte, error) { - type NoMethod RegionList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionListWarning: [Output Only] Informational warning message. -type RegionListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output only] Effective firewalls from firewall policy. It - // applies to - // Regional Network Firewall Policies in the specified region, Global - // Network - // Firewall Policies and Hierachial Firewall Policies which are associated - // with the network. - FirewallPolicys []*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] The display name of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output only] The packet mirroring rules that apply to - // the network. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output only] The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // Type: [Output Only] The type of the firewall policy. Can be one of - // HIERARCHY, - // NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "NETWORK_REGIONAL" - // "SYSTEM_GLOBAL" - // "SYSTEM_REGIONAL" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash in order to update or - // change - // labels. Make a get() request to the resource to get the latest - // fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionTargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionTargetHttpsProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionUrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionUrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionUrlMapsValidateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionWaitForReplicationCatchUpRequest struct { - MaxWaitDuration string `json:"maxWaitDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxWaitDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxWaitDuration") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionWaitForReplicationCatchUpRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionWaitForReplicationCatchUpRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReliabilityRisk: Represents a ReliabilityRisk resource. -type ReliabilityRisk struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional textual description of the resource; provided when - // the - // resource is created. - Description string `json:"description,omitempty"` - // Details: [Output Only] Details of the reliability risk resource - Details *RiskDetails `json:"details,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#reliabilityRisk - // for reliability risks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long and - // comply withRFC1035. - Name string `json:"name,omitempty"` - // Recommendation: The recommendations to mitigate the risk. - Recommendation *RiskRecommendation `json:"recommendation,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReliabilityRisk) MarshalJSON() ([]byte, error) { - type NoMethod ReliabilityRisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReliabilityRisksListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ReliabilityRisk resources. - Items []*ReliabilityRisk `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReliabilityRisksListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReliabilityRisksListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReliabilityRisksListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReliabilityRisksListResponseWarning: [Output Only] Informational warning -// message. -type ReliabilityRisksListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReliabilityRisksListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReliabilityRisksListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReliabilityRisksListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReliabilityRisksListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReliabilityRisksListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReliabilityRisksListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReplicationDetails struct { - // LastReplicationTime: The last sync time of the device pair. - LastReplicationTime string `json:"lastReplicationTime,omitempty"` - // SecondsSinceLastReplication: Replication lag in seconds. This will only be - // populated if device is in - // replicating state. Note that the value is calculated sometime during - // request processing and at the instant the client receives the response, - // the current replication_lag may have changed. - SecondsSinceLastReplication int64 `json:"secondsSinceLastReplication,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "LastReplicationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastReplicationTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReplicationDetails) MarshalJSON() ([]byte, error) { - type NoMethod ReplicationDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReplicationDiskPair struct { - // PrimaryDisk: URL of the primary disk. - PrimaryDisk string `json:"primaryDisk,omitempty"` - // SecondaryDisk: URL of the secondary disk. - SecondaryDisk string `json:"secondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrimaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PrimaryDisk") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReplicationDiskPair) MarshalJSON() ([]byte, error) { - type NoMethod ReplicationDiskPair - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestMirrorPolicy: A policy that specifies how requests intended for the -// route's backends -// are shadowed to a separate mirrored backend service. The load -// balancer -// doesn't wait for responses from the shadow service. Before sending -// traffic -// to the shadow service, the host or authority header is suffixed with-shadow. -type RequestMirrorPolicy struct { - // BackendService: The full or partial URL to the BackendService resource - // being - // mirrored to. - // - // The backend service configured for a mirroring - // policy must reference backends that are of the same type as the - // original - // backend service matched in the URL map. - // - // Serverless NEG backends are not currently supported as a mirrored - // backend service. - BackendService string `json:"backendService,omitempty"` - // MirrorPercent: The percentage of requests to be mirrored to - // `backend_service`. - MirrorPercent float64 `json:"mirrorPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestMirrorPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RequestMirrorPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *RequestMirrorPolicy) UnmarshalJSON(data []byte) error { - type NoMethod RequestMirrorPolicy - var s1 struct { - MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MirrorPercent = float64(s1.MirrorPercent) - return nil -} - -// Reservation: Represents a reservation resource. A reservation ensures that -// capacity is -// held in a specific zone even if the reserved VMs are not running. For -// more -// information, read Reserving zonal -// resources. -type Reservation struct { - // AdvancedDeploymentControl: Advanced control for cluster management, - // applicable only to DENSE - // deployment type reservations. - AdvancedDeploymentControl *ReservationAdvancedDeploymentControl `json:"advancedDeploymentControl,omitempty"` - // AggregateReservation: Reservation for aggregated resources, providing shape - // flexibility. - AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` - // Commitment: [Output Only] Full or partial URL to a parent commitment. This - // field - // displays for reservations that are tied to a commitment. - Commitment string `json:"commitment,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeleteAfterDuration: Duration time relative to reservation creation when - // Compute Engine will - // automatically delete this resource. - DeleteAfterDuration *Duration `json:"deleteAfterDuration,omitempty"` - // DeleteAtTime: Absolute time in future when the reservation will be - // auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text - // format. - DeleteAtTime string `json:"deleteAtTime,omitempty"` - // DeploymentType: Specifies the deployment strategy for this reservation. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEmergentMaintenance: Indicates whether Compute Engine allows unplanned - // maintenance for your VMs; - // for example, to fix hardware errors. - EnableEmergentMaintenance bool `json:"enableEmergentMaintenance,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservations for - // reservations. - Kind string `json:"kind,omitempty"` - // LinkedCommitments: [Output Only] Full or partial URL to parent commitments. - // This field - // displays for reservations that are tied to multiple commitments. - LinkedCommitments []string `json:"linkedCommitments,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // ProtectionTier: Protection tier for the workload which specifies the - // workload expectations - // in the event of infrastructure failures at data center (e.g. power - // and/or cooling failures). - // - // Possible values: - // "CAPACITY_OPTIMIZED" - CAPACITY_OPTIMIZED capacity leverages redundancies - // (e.g. power, cooling) - // at the data center during normal operating conditions. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload may be disrupted. As a consequence, it has a - // weaker availability SLO than STANDARD. - // "PROTECTION_TIER_UNSPECIFIED" - Unspecified protection tier. - // "STANDARD" - STANDARD protection for workload that should be protected by - // redundancies - // (e.g. power, cooling) at the data center level. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload is expected to continue as normal using - // the - // redundancies. - ProtectionTier string `json:"protectionTier,omitempty"` - // ReservationMode: [Output only] Indicates the reservation mode of the - // reservation. - // - // Possible values: - // "CALENDAR" - The delivered reservations terminate at specified endtime - // along with - // terminating VMs running on it. The price for this reservation is - // different from on-demand. Currently offered for A3+ GPUs and TPUs only. - // "DEFAULT" - The delivered reservations do not terminate VMs at the end - // of - // reservations. On-demand pricing and available for all VM families. - // This is default mode. - // "RESERVATION_MODE_UNSPECIFIED" - ReservationMode string `json:"reservationMode,omitempty"` - // ReservationSharingPolicy: Specify the reservation sharing policy. If - // unspecified, the reservation - // will not be shared with Google Cloud managed services. - ReservationSharingPolicy *AllocationReservationSharingPolicy `json:"reservationSharingPolicy,omitempty"` - // ResourcePolicies: Resource policies to be added to this reservation. The key - // is defined by - // user, and the value is resource policy url. This is to define - // placement - // policy with reservation. - ResourcePolicies map[string]string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Status information for Reservation resource. - ResourceStatus *AllocationResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SchedulingType: The type of maintenance for the reservation. - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShareSettings: Specify share-settings to create a shared reservation. This - // property is - // optional. For more information about the syntax and options for this - // field and its subfields, see the guide for creating - // a shared reservation. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservation: Reservation for instances with specific machine shapes. - SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` - // SpecificReservationRequired: Indicates whether the reservation can be - // consumed by VMs with affinity - // for "any" reservation. If the field is set, then only VMs that target - // the reservation by name can consume from this reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // Status: [Output Only] The status of the reservation. - // - // - // - CREATING: Reservation resources are being - // allocated. - // - READY: Reservation resources have been allocated, - // and the reservation is ready for use. - // - DELETING: Reservation deletion is in progress. - // - UPDATING: Reservation update is in progress. - // - // Possible values: - // "CREATING" - Reservation resources are being allocated. - // "DELETING" - Reservation deletion is in progress. - // "INVALID" - // "READY" - Reservation resources have been allocated, and the reservation - // is ready - // for use. - // "UPDATING" - Reservation update is in progress. - Status string `json:"status,omitempty"` - // Zone: Zone in which the reservation resides. A zone must be provided if - // the - // reservation is created within a commitment. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdvancedDeploymentControl") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedDeploymentControl") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Reservation) MarshalJSON() ([]byte, error) { - type NoMethod Reservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAdvancedDeploymentControl: Advance control for cluster -// management, applicable only to DENSE deployment -// type reservations. -type ReservationAdvancedDeploymentControl struct { - // ReservationOperationalMode: Indicates chosen reservation operational mode - // for the reservation. - // - // Possible values: - // "ALL_CAPACITY" - Google Cloud does not manage the failure of machines, but - // provides - // additional capacity, which is not guaranteed to be available. - // "HIGHLY_AVAILABLE_CAPACITY" - Google Cloud manages the failure of machines - // to provide high - // availability. - // "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" - ReservationOperationalMode string `json:"reservationOperationalMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReservationOperationalMode") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReservationOperationalMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAdvancedDeploymentControl) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAdvancedDeploymentControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAffinity: Specifies the reservations that this instance can -// consume from. -type ReservationAffinity struct { - // ConsumeReservationType: Specifies the type of reservation from which this - // instance can consume - // resources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or - // NO_RESERVATION. See - // Consuming reserved instances for examples. - // - // Possible values: - // "ANY_RESERVATION" - Consume any allocation available. - // "NO_RESERVATION" - Do not consume from any allocated capacity. - // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. Must - // specify key value fields - // for specifying the reservations. - // "SPECIFIC_THEN_ANY_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume any - // reservation available if the specified reservation is not available - // or - // exhausted. Must specify key value fields for specifying the reservations. - // "SPECIFIC_THEN_NO_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume - // from the on-demand pool if the specified reservation is exhausted. - // Must - // specify key value fields for specifying the reservations. - // "UNSPECIFIED" - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of a reservation resource. To target - // aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the - // key and specify - // the name of your reservation as its value. - Key string `json:"key,omitempty"` - // Values: Corresponds to the label values of a reservation resource. This can - // be - // either a name to a reservation in the same project - // or - // "projects/different-project/reservations/some-reservation-name" to target - // a - // shared reservation in the same zone but in a different project. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumeReservationType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAggregatedList: Contains a list of reservations. -type ReservationAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Allocation resources. - Items map[string]ReservationsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReservationAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAggregatedListWarning: [Output Only] Informational warning -// message. -type ReservationAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlock: Represents a reservation block resource. -type ReservationBlock struct { - // Count: [Output Only] The number of resources that are allocated in - // this - // reservation block. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // HealthInfo: [Output Only] Health information for the reservation block. - HealthInfo *ReservationBlockHealthInfo `json:"healthInfo,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InUseCount: [Output Only] The number of instances that are currently in use - // on this - // reservation block. - InUseCount int64 `json:"inUseCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances running - // on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservationBlock for - // reservation blocks. - Kind string `json:"kind,omitempty"` - // LocationPrefix: [Output Only] Obfuscated location where this reservation - // block physically - // resides in format /CCCC/GGGG. This matches the tripod specified in the - // VM - // topology information. Example: /USEAB1/0101/ is the location prefix - // in - // /USEAB1/0101/031/003 - LocationPrefix string `json:"locationPrefix,omitempty"` - // Name: [Output Only] The name of this reservation block generated by - // Google - // Compute Engine. The name must be 1-63 characters long, and comply - // with - // RFC1035 @pattern a-z (?:[-a-z0-9]{0,61}[a-z0-9])? - Name string `json:"name,omitempty"` - // PhysicalTopology: [Output Only] The physical topology of the reservation - // block. - PhysicalTopology *ReservationBlockPhysicalTopology `json:"physicalTopology,omitempty"` - // ReservationMaintenance: [Output Only] Maintenance information for this - // reservation block. - ReservationMaintenance *GroupMaintenanceInfo `json:"reservationMaintenance,omitempty"` - // ReservationSubBlockCount: [Output Only] The number of reservation subBlocks - // associated with this - // reservation block. - ReservationSubBlockCount int64 `json:"reservationSubBlockCount,omitempty"` - // ReservationSubBlockInUseCount: [Output Only] The number of in-use - // reservation subBlocks associated with - // this reservation block. If at least one VM is running on a subBlock, it - // is - // considered in-use. - ReservationSubBlockInUseCount int64 `json:"reservationSubBlockInUseCount,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the reservation block. - // - // Possible values: - // "CREATING" - Resources are being allocated for the reservation block. - // "DELETING" - Reservation block is currently being deleted. - // "INVALID" - // "READY" - Reservation block has allocated all its resources. - Status string `json:"status,omitempty"` - // Zone: [Output Only] Zone in which the reservation block resides. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlock) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockHealthInfo: Health information for the reservation block. -type ReservationBlockHealthInfo struct { - // DegradedSubBlockCount: The number of subBlocks that are degraded. - DegradedSubBlockCount int64 `json:"degradedSubBlockCount,omitempty"` - // HealthStatus: The health status of the reservation block. - // - // Possible values: - // "DEGRADED" - The reservation block is degraded. - // "HEALTHY" - The reservation block is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation block - // is unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthySubBlockCount: The number of subBlocks that are healthy. - HealthySubBlockCount int64 `json:"healthySubBlockCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedSubBlockCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedSubBlockCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlockPhysicalTopology struct { - // Block: The hash of the capacity block within the cluster. - Block string `json:"block,omitempty"` - // Cluster: The cluster name of the reservation block. - Cluster string `json:"cluster,omitempty"` - // Instances: The detailed instances information for a given Block - Instances []*ReservationBlockPhysicalTopologyInstance `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockPhysicalTopologyInstance: The instances information for a -// given Block -type ReservationBlockPhysicalTopologyInstance struct { - // InstanceId: The InstanceId of the instance - InstanceId uint64 `json:"instanceId,omitempty,string"` - // PhysicalHostTopology: The PhysicalHostTopology of instances within a Block - // resource. - PhysicalHostTopology *ReservationBlockPhysicalTopologyInstancePhysicalHostTopology `json:"physicalHostTopology,omitempty"` - // ProjectId: Project where the instance lives - ProjectId uint64 `json:"projectId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InstanceId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopologyInstance) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopologyInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockPhysicalTopologyInstancePhysicalHostTopology: The -// PhysicalHostTopology of the instance within a Block resource. -type ReservationBlockPhysicalTopologyInstancePhysicalHostTopology struct { - // Host: Host hash for a given instance - Host string `json:"host,omitempty"` - // SubBlock: Sub block hash for a given instance - SubBlock string `json:"subBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopologyInstancePhysicalHostTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopologyInstancePhysicalHostTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlocksGetResponse struct { - Resource *ReservationBlock `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksGetResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksGetResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlocksListResponse: A list of reservation blocks under a single -// reservation. -type ReservationBlocksListResponse struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of reservation block resources. - Items []*ReservationBlock `json:"items,omitempty"` - // Kind: Type of the resource. Alwayscompute#reservationBlock for a list of - // reservation blocks. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *ReservationBlocksListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlocksListResponseWarning: Informational warning message. -type ReservationBlocksListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationBlocksListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlocksListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Allocation resources. - Items []*Reservation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#reservationsList - // for listsof reservations - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReservationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationListWarning: [Output Only] Informational warning message. -type ReservationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlock: Represents a reservation subBlock resource. -type ReservationSubBlock struct { - // AcceleratorTopologiesInfo: [Output Only] Slice info for the reservation - // subBlock. - AcceleratorTopologiesInfo *AcceleratorTopologiesInfo `json:"acceleratorTopologiesInfo,omitempty"` - // Count: [Output Only] The number of hosts that are allocated in - // this - // reservation subBlock. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // HealthInfo: [Output Only] Health information for the reservation subBlock. - HealthInfo *ReservationSubBlockHealthInfo `json:"healthInfo,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InUseCount: [Output Only] The number of instances that are currently in use - // on this - // reservation subBlock. - InUseCount int64 `json:"inUseCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances running - // on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservationSubBlock - // for reservation subBlocks. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of this reservation subBlock generated by - // Google - // Compute Engine. The name must be 1-63 characters long, and comply - // with - // RFC1035 @pattern a-z (?:[-a-z0-9]{0,61}[a-z0-9])? - Name string `json:"name,omitempty"` - // PhysicalTopology: [Output Only] The physical topology of the reservation - // subBlock. - PhysicalTopology *ReservationSubBlockPhysicalTopology `json:"physicalTopology,omitempty"` - // ReservationSubBlockMaintenance: Maintenance information for this reservation - // subBlock. - ReservationSubBlockMaintenance *GroupMaintenanceInfo `json:"reservationSubBlockMaintenance,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the reservation subBlock. - // - // Possible values: - // "CREATING" - Resources are being allocated for the reservation subBlock. - // "DELETING" - Reservation subBlock is currently being deleted. - // "INVALID" - // "READY" - Reservation subBlock has allocated all its resources. - Status string `json:"status,omitempty"` - // Zone: [Output Only] Zone in which the reservation subBlock resides. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologiesInfo") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologiesInfo") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlock) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlockHealthInfo: Health information for the reservation -// subBlock. -type ReservationSubBlockHealthInfo struct { - // DegradedHostCount: The number of degraded hosts in the reservation subBlock. - DegradedHostCount int64 `json:"degradedHostCount,omitempty"` - // DegradedInfraCount: The number of degraded infrastructure (e.g NV link - // domain) in the - // reservation subblock. - DegradedInfraCount int64 `json:"degradedInfraCount,omitempty"` - // HealthStatus: The health status of the reservation subBlock. - // - // Possible values: - // "DEGRADED" - The reservation subBlock is degraded. - // "HEALTHY" - The reservation subBlock is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation - // subBlock is unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthyHostCount: The number of healthy hosts in the reservation subBlock. - HealthyHostCount int64 `json:"healthyHostCount,omitempty"` - // HealthyInfraCount: The number of healthy infrastructure (e.g NV link domain) - // in the - // reservation subblock. - HealthyInfraCount int64 `json:"healthyInfraCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedHostCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedHostCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlockHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlockHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlockPhysicalTopology struct { - // Block: The hash of the capacity block within the cluster. - Block string `json:"block,omitempty"` - // Cluster: The cluster name of the reservation subBlock. - Cluster string `json:"cluster,omitempty"` - // SubBlock: The hash of the capacity sub-block within the capacity block. - SubBlock string `json:"subBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlockPhysicalTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlockPhysicalTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksGetResponse struct { - Resource *ReservationSubBlock `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksGetResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksGetResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksListResponse: A list of reservation subBlocks under a -// single reservation. -type ReservationSubBlocksListResponse struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of reservation subBlock resources. - Items []*ReservationSubBlock `json:"items,omitempty"` - // Kind: Type of the resource. Alwayscompute#reservationSubBlock for a list of - // reservation - // subBlocks. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *ReservationSubBlocksListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksListResponseWarning: Informational warning message. -type ReservationSubBlocksListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationSubBlocksListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksReportFaultyRequest struct { - // DisruptionSchedule: The disruption schedule for the subBlock. - // - // Possible values: - // "DISRUPTION_SCHEDULE_UNSPECIFIED" - // "IMMEDIATE" - All VMs will be disrupted immediately. - DisruptionSchedule string `json:"disruptionSchedule,omitempty"` - // FailureComponent: The component that experienced the fault. - // - // Possible values: - // "FAILURE_COMPONENT_UNSPECIFIED" - // "MULTIPLE_FAULTY_HOSTS" - Multiple hosts experienced the fault. - // "NVLINK_SWITCH" - The NVLink switch experienced the fault. - FailureComponent string `json:"failureComponent,omitempty"` - // FaultReasons: The reasons for the fault experienced with the subBlock. - FaultReasons []*ReservationSubBlocksReportFaultyRequestFaultReason `json:"faultReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisruptionSchedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisruptionSchedule") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksReportFaultyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksReportFaultyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksReportFaultyRequestFaultReason: The reason for the fault -// experienced with the subBlock. -type ReservationSubBlocksReportFaultyRequestFaultReason struct { - // Behavior: The behavior of the fault experienced with the subBlock. - // - // Possible values: - // "FAULT_BEHAVIOR_UNSPECIFIED" - // "GPU_ERROR" - The subBlock experienced a GPU error. - // "PERFORMANCE" - The subBlock experienced performance issues. - // "SILENT_DATA_CORRUPTION" - The subBlock experienced silent data - // corruption. - // "SWITCH_FAILURE" - The subBlock experienced a switch failure. - Behavior string `json:"behavior,omitempty"` - // Description: The description of the fault experienced with the subBlock. - Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "Behavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Behavior") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksReportFaultyRequestFaultReason) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksReportFaultyRequestFaultReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsBlocksPerformMaintenanceRequest struct { - // MaintenanceScope: Specifies if all, running or unused hosts are in scope for - // this request. - // - // Possible values: - // "ALL" - Trigger maintenance for all hosts belonging to this - // reservation - // irrespective of whether VMs are running on them or not. - // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only - // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this - // reservation which - // have VMs running on them. - // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to - // this reservation which - // do not have any VMs running on them. This is not allowed for Standard ExR - MaintenanceScope string `json:"maintenanceScope,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceScope") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsBlocksPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsBlocksPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsPerformMaintenanceRequest struct { - // MaintenanceScope: Specifies if all, running or unused hosts are in scope for - // this request. - // - // Possible values: - // "ALL" - Trigger maintenance for all hosts belonging to this - // reservation - // irrespective of whether VMs are running on them or not. - // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only - // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this - // reservation which - // have VMs running on them. - // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to - // this reservation which - // do not have any VMs running on them. This is not allowed for Standard ExR - MaintenanceScope string `json:"maintenanceScope,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceScope") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsResizeRequest struct { - // SpecificSkuCount: Number of allocated resources can be resized with minimum - // = 1 and - // maximum = 1000. - SpecificSkuCount int64 `json:"specificSkuCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SpecificSkuCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SpecificSkuCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsScopedList struct { - // Reservations: A list of reservations contained in this scope. - Reservations []*Reservation `json:"reservations,omitempty"` - // Warning: Informational warning which replaces the list of reservations - // when - // the list is empty. - Warning *ReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reservations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationsScopedListWarning: Informational warning which replaces the list -// of reservations when -// the list is empty. -type ReservationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceCommitment: Commitment for a particular hardware resource (a -// commitment is composed of -// one or more of these). -type ResourceCommitment struct { - // AcceleratorType: Name of the accelerator type or GPU resource. Specify this - // field only when - // the type of hardware resource is ACCELERATOR. - AcceleratorType string `json:"acceleratorType,omitempty"` - // Amount: The quantity of the hardware resource that you want to commit to - // purchasing - // (in a type-dependent unit). - // - // - For vCPUs, you must specify an integer value. - // - For memory, you specify the amount of MB that you want. The value you - // specify must be a multiple of 256 MB, with up to 6.5 GB of - // memory per every vCPU. - // - For GPUs, you must specify an integer value. - // - For Local SSD disks, you must specify the amount in GB. The size of a - // single Local SSD disk is 375 GB. - Amount int64 `json:"amount,omitempty,string"` - // Type: The type of hardware resource that you want to specify. - // You can specify any of the following values: - // - // - VCPU - // - MEMORY - // - LOCAL_SSD - // - ACCELERATOR - // - // - // - // Specify as a separate entry in the list for each - // individual resource type. - // - // Possible values: - // "ACCELERATOR" - // "LOCAL_SSD" - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod ResourceCommitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups or network endpoint - // groups - // listed in the backend service. - Group string `json:"group,omitempty"` - // ForceSendFields is a list of field names (e.g. "Group") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Group") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceGroupReference) MarshalJSON() ([]byte, error) { - type NoMethod ResourceGroupReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePoliciesScopedList struct { - // ResourcePolicies: A list of resourcePolicies contained in this scope. - ResourcePolicies []*ResourcePolicy `json:"resourcePolicies,omitempty"` - // Warning: Informational warning which replaces the list of resourcePolicies - // when - // the list is empty. - Warning *ResourcePoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePoliciesScopedListWarning: Informational warning which replaces the -// list of resourcePolicies when -// the list is empty. -type ResourcePoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicy: Represents a Resource Policy resource. You can use resource -// policies to -// schedule actions for some Compute Engine resources. For example, you can -// use them toschedule persistent disk -// snapshots. -type ResourcePolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - Description string `json:"description,omitempty"` - // DiskConsistencyGroupPolicy: Resource policy for disk consistency groups. - DiskConsistencyGroupPolicy *ResourcePolicyDiskConsistencyGroupPolicy `json:"diskConsistencyGroupPolicy,omitempty"` - // GroupPlacementPolicy: Resource policy for instances for placement - // configuration. - GroupPlacementPolicy *ResourcePolicyGroupPlacementPolicy `json:"groupPlacementPolicy,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSchedulePolicy: Resource policy for scheduling instance operations. - InstanceSchedulePolicy *ResourcePolicyInstanceSchedulePolicy `json:"instanceSchedulePolicy,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#resource_policies - // for resource policies. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - Region string `json:"region,omitempty"` - // ResourceStatus: [Output Only] The system status of the resource policy. - ResourceStatus *ResourcePolicyResourceStatus `json:"resourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SnapshotSchedulePolicy: Resource policy for persistent disks for creating - // snapshots. - SnapshotSchedulePolicy *ResourcePolicySnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` - // Status: [Output Only] The status of resource policy creation. - // - // Possible values: - // "CREATING" - Resource policy is being created. - // "DELETING" - Resource policy is being deleted. - // "EXPIRED" - Resource policy is expired and will not run again. - // "INVALID" - // "READY" - Resource policy is ready to be used. - Status string `json:"status,omitempty"` - // VmMaintenancePolicy: Resource policy applicable to VMs for infrastructure - // maintenance. - VmMaintenancePolicy *ResourcePolicyVmMaintenancePolicy `json:"vmMaintenancePolicy,omitempty"` - // WorkloadPolicy: Resource policy for defining instance placement for MIGs. - WorkloadPolicy *ResourcePolicyWorkloadPolicy `json:"workloadPolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyAggregatedList: Contains a list of resourcePolicies. -type ResourcePolicyAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ResourcePolicy resources. - Items map[string]ResourcePoliciesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyAggregatedListWarning: [Output Only] Informational warning -// message. -type ResourcePolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyDailyCycle: Time window specified for daily operations. -type ResourcePolicyDailyCycle struct { - // DaysInCycle: Defines a schedule with units measured in days. The value - // determines - // how many days pass between the start of each cycle. - DaysInCycle int64 `json:"daysInCycle,omitempty"` - // Duration: [Output only] A predetermined duration for the window, - // automatically - // chosen to be the smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one - // of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "DaysInCycle") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DaysInCycle") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyDailyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyDailyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyDiskConsistencyGroupPolicy: Resource policy for disk -// consistency groups. -type ResourcePolicyDiskConsistencyGroupPolicy struct { -} - -// ResourcePolicyGroupPlacementPolicy: A GroupPlacementPolicy specifies -// resource placement configuration. -// It specifies the failure bucket separation -type ResourcePolicyGroupPlacementPolicy struct { - // AcceleratorTopologyMode: Specifies the connection mode for the accelerator - // topology. If not - // specified, the default is AUTO_CONNECT. - // - // Possible values: - // "AUTO_CONNECT" - The interconnected chips are pre-configured at the time - // of VM creation. - // "PROVISION_ONLY" - The interconnected chips are connected on demand. At - // the time of VM - // creation, the chips are not connected. - AcceleratorTopologyMode string `json:"acceleratorTopologyMode,omitempty"` - // AvailabilityDomainCount: The number of availability domains to spread - // instances across. If two - // instances are in different availability domain, they are not in the same - // low latency network. - AvailabilityDomainCount int64 `json:"availabilityDomainCount,omitempty"` - // Collocation: Specifies network collocation - // - // Possible values: - // "CLUSTERED" - Specifies collocation option that provides tight - // collocation - // with minimum network latency. - // "COLLOCATED" - // "MAX_SPREAD" - Specifies collocation option that provides spreading across - // clusters. - // "UNSPECIFIED_COLLOCATION" - Collocation string `json:"collocation,omitempty"` - // GpuTopology: Specifies the shape of the GPU slice, in slice based GPU - // families eg. - // A4X. - GpuTopology string `json:"gpuTopology,omitempty"` - // MaxDistance: Specifies the number of max logical switches. - MaxDistance int64 `json:"maxDistance,omitempty"` - // Scope: Scope specifies the availability domain to which the VMs should - // be - // spread. - // - // Possible values: - // "HOST" - Specifies availability domain scope across hosts. - // VMs will be spread across different hosts. - // "UNSPECIFIED_SCOPE" - VMs will be spread across different instrastructure - // to not share power, - // host and networking. - Scope string `json:"scope,omitempty"` - // SliceCount: Specifies the number of slices in a multislice workload. - SliceCount int64 `json:"sliceCount,omitempty"` - // TpuTopology: Specifies the shape of the TPU slice - TpuTopology string `json:"tpuTopology,omitempty"` - // VmCount: Number of VMs in this placement group. Google does not recommend - // that you - // use this field unless you use a compact policy and you want your policy - // to work only if it contains this exact number of VMs. - VmCount int64 `json:"vmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologyMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologyMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyGroupPlacementPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyGroupPlacementPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyHourlyCycle: Time window specified for hourly operations. -type ResourcePolicyHourlyCycle struct { - // Duration: [Output only] Duration of the time window, automatically chosen to - // be - // smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // HoursInCycle: Defines a schedule with units measured in hours. The value - // determines - // how many hours pass between the start of each cycle. - HoursInCycle int64 `json:"hoursInCycle,omitempty"` - // StartTime: Time within the window to start the operations. - // It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyHourlyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyHourlyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyInstanceSchedulePolicy: An InstanceSchedulePolicy specifies -// when and how frequent certain -// operations are performed on the instance. -type ResourcePolicyInstanceSchedulePolicy struct { - // ExpirationTime: The expiration time of the schedule. The timestamp is an - // RFC3339 string. - ExpirationTime string `json:"expirationTime,omitempty"` - // StartTime: The start time of the schedule. The timestamp is an RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // TimeZone: Specifies the time zone to be used in interpreting - // Schedule.schedule. - // The value of this field must be a time zone name from the tz - // database: - // https://wikipedia.org/wiki/Tz_database. - TimeZone string `json:"timeZone,omitempty"` - // VmStartSchedule: Specifies the schedule for starting instances. - VmStartSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStartSchedule,omitempty"` - // VmStopSchedule: Specifies the schedule for stopping instances. - VmStopSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStopSchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpirationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpirationTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyInstanceSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyInstanceSchedulePolicySchedule: Schedule for an instance -// operation. -type ResourcePolicyInstanceSchedulePolicySchedule struct { - // Schedule: Specifies the frequency for the operation, using the unix-cron - // format. - Schedule string `json:"schedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "Schedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Schedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyInstanceSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicySchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of ResourcePolicy resources. - Items []*ResourcePolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#resourcePoliciesList for - // listsof resourcePolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyListWarning: [Output Only] Informational warning message. -type ResourcePolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyResourceStatus: Contains output only fields. -// Use this sub-message for all output fields set on ResourcePolicy. -// The internal structure of this "status" field should mimic the structure -// of ResourcePolicy proto specification. -type ResourcePolicyResourceStatus struct { - // InstanceSchedulePolicy: [Output Only] Specifies a set of output values - // reffering to - // the instance_schedule_policy system status. - // This field should have the same name as corresponding policy field. - InstanceSchedulePolicy *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus `json:"instanceSchedulePolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSchedulePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSchedulePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { - // LastRunStartTime: [Output Only] The last time the schedule successfully - // ran. - // The timestamp is an RFC3339 string. - LastRunStartTime string `json:"lastRunStartTime,omitempty"` - // NextRunStartTime: [Output Only] The next time the schedule is planned to - // run. - // The actual time might be slightly different. - // The timestamp is an RFC3339 string. - NextRunStartTime string `json:"nextRunStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastRunStartTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastRunStartTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatusInstanceSchedulePolicyStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicy: A snapshot schedule policy specifies -// when and how frequently snapshots are -// to be created for the target disk. Also specifies how many and how -// long -// these scheduled snapshots should be retained. -type ResourcePolicySnapshotSchedulePolicy struct { - // RetentionPolicy: Retention policy applied to snapshots created by this - // resource policy. - RetentionPolicy *ResourcePolicySnapshotSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` - // Schedule: A Vm Maintenance Policy specifies what kind of - // infrastructure - // maintenance we are allowed to perform on this VM and when. Schedule - // that is applied to disks covered by this policy. - Schedule *ResourcePolicySnapshotSchedulePolicySchedule `json:"schedule,omitempty"` - // SnapshotProperties: Properties with which snapshots are created such as - // labels, encryption - // keys. - SnapshotProperties *ResourcePolicySnapshotSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetentionPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RetentionPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicyRetentionPolicy: Policy for retention of -// scheduled snapshots. -type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { - // MaxRetentionDays: Maximum age of the snapshot that is allowed to be kept. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - // Possible values: - // "DO_NOT_RETROACTIVELY_APPLY" - // "RETROACTIVELY_APPLY" - // "UNSPECIFIED_ON_POLICY_SWITCH" - OnPolicySwitch string `json:"onPolicySwitch,omitempty"` - // OnSourceDiskDelete: Specifies the behavior to apply to scheduled snapshots - // when - // the source disk is deleted. - // - // Possible values: - // "APPLY_RETENTION_POLICY" - // "KEEP_AUTO_SNAPSHOTS" - // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxRetentionDays") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicyRetentionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicySchedule: A schedule for disks where the -// schedueled operations are performed. -type ResourcePolicySnapshotSchedulePolicySchedule struct { - DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` - HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` - WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "DailySchedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DailySchedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicySnapshotProperties: Specified snapshot -// properties for scheduled snapshots created by this -// policy. -type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { - // ChainName: Chain name that the snapshot is created in. - ChainName string `json:"chainName,omitempty"` - // GuestFlush: Indication to perform a 'guest aware' snapshot. - GuestFlush bool `json:"guestFlush,omitempty"` - // Labels: Labels to apply to scheduled snapshots. These can be later - // modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Region: Region where the snapshot is scoped to. - Region string `json:"region,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the auto snapshot - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChainName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChainName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySnapshotProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyVmMaintenancePolicy struct { - ConcurrencyControlGroup *ResourcePolicyVmMaintenancePolicyConcurrencyControl `json:"concurrencyControlGroup,omitempty"` - // MaintenanceWindow: Maintenance windows that are applied to VMs covered by - // this policy. - MaintenanceWindow *ResourcePolicyVmMaintenancePolicyMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConcurrencyControlGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConcurrencyControlGroup") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyVmMaintenancePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyVmMaintenancePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyVmMaintenancePolicyConcurrencyControl: A concurrency control -// configuration. Defines a group config that, when -// attached to an instance, recognizes that instance as part of a group -// of -// instances where only up the concurrency_limit of instances in that group -// can undergo simultaneous maintenance. -// For more information: go/concurrency-control-design-doc -type ResourcePolicyVmMaintenancePolicyConcurrencyControl struct { - ConcurrencyLimit int64 `json:"concurrencyLimit,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConcurrencyLimit") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConcurrencyLimit") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyVmMaintenancePolicyConcurrencyControl) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyVmMaintenancePolicyConcurrencyControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyVmMaintenancePolicyMaintenanceWindow: A maintenance window for -// VMs. When set, we restrict our -// maintenance operations to this window. -type ResourcePolicyVmMaintenancePolicyMaintenanceWindow struct { - DailyMaintenanceWindow *ResourcePolicyDailyCycle `json:"dailyMaintenanceWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "DailyMaintenanceWindow") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DailyMaintenanceWindow") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyVmMaintenancePolicyMaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyVmMaintenancePolicyMaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyWeeklyCycle: Time window specified for weekly operations. -type ResourcePolicyWeeklyCycle struct { - // DayOfWeeks: Up to 7 intervals/windows, one for each day of the week. - DayOfWeeks []*ResourcePolicyWeeklyCycleDayOfWeek `json:"dayOfWeeks,omitempty"` - // ForceSendFields is a list of field names (e.g. "DayOfWeeks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DayOfWeeks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWeeklyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyWeeklyCycleDayOfWeek struct { - // Day: Defines a schedule that runs on specific days of the week. Specify - // one or more days. The following options are available: - // MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. - // - // Possible values: - // "FRIDAY" - // "INVALID" - // "MONDAY" - // "SATURDAY" - // "SUNDAY" - // "THURSDAY" - // "TUESDAY" - // "WEDNESDAY" - Day string `json:"day,omitempty"` - // Duration: [Output only] Duration of the time window, automatically chosen to - // be - // smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // StartTime: Time within the window to start the operations. - // It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycleDayOfWeek - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyWorkloadPolicy: Represents the workload policy. -type ResourcePolicyWorkloadPolicy struct { - // AcceleratorTopology: Specifies the topology required to create a partition - // for VMs that have - // interconnected GPUs. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // AcceleratorTopologyMode: Specifies the connection mode for the accelerator - // topology. If not - // specified, the default is AUTO_CONNECT. - // - // Possible values: - // "AUTO_CONNECT" - The interconnected chips are pre-configured at the time - // of VM creation. - // "PROVISION_ONLY" - The interconnected chips are connected on demand. At - // the time of VM - // creation, the chips are not connected. - AcceleratorTopologyMode string `json:"acceleratorTopologyMode,omitempty"` - // MaxTopologyDistance: Specifies the maximum distance between instances. - // - // Possible values: - // "BLOCK" - VMs must be provisioned in the same block. - // "CLUSTER" - VMs must be provisioned in the same cluster. - // "SUBBLOCK" - VMs must be provisioned in the same subblock. - MaxTopologyDistance string `json:"maxTopologyDistance,omitempty"` - // Type: Specifies the intent of the instance placement in the MIG. - // - // Possible values: - // "HIGH_AVAILABILITY" - MIG spreads out the instances as much as possible - // for high availability. - // "HIGH_THROUGHPUT" - MIG provisions instances as close to each other as - // possible for high - // throughput. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWorkloadPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWorkloadPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatus: Contains output only fields. -// Use this sub-message for actual values set on Instance attributes as -// compared -// to the value requested by the user (intent) in their instance CRUD calls. -type ResourceStatus struct { - // AcceleratorStatus: [Output Only] Accelerators status show results of GPU - // scans. These scans - // are specialized diagnostic tests designed to uncover latent - // manufacturing - // defects or other issues that could potentially lead to data corruption - // or - // impede the customer's ability to efficiently execute GPU workloads. - AcceleratorStatus []*ResourceStatusAcceleratorStatus `json:"acceleratorStatus,omitempty"` - // ConsumedReservation: [Output Only] The full resource name of the reservation - // that this instance - // is consuming from. - ConsumedReservation string `json:"consumedReservation,omitempty"` - // ConsumedReservationBlock: [Output Only] The full resource name of the - // reservation block that this - // instance is consuming from. - ConsumedReservationBlock string `json:"consumedReservationBlock,omitempty"` - // EffectiveInstanceMetadata: [Output Only] Effective metadata is a field that - // consolidates project, - // zonal instance settings, and instance-level predefined metadata keys - // to - // provide the overridden value for those metadata keys at the instance level. - EffectiveInstanceMetadata *ResourceStatusEffectiveInstanceMetadata `json:"effectiveInstanceMetadata,omitempty"` - // LastInstanceTerminationDetails: [Output Only] Contains last termination - // details why the instance was - // terminated. - LastInstanceTerminationDetails *ResourceStatusLastInstanceTerminationDetails `json:"lastInstanceTerminationDetails,omitempty"` - // PhysicalHost: [Output Only] The precise location of your instance within the - // zone's data - // center, including the block, sub-block, and host. The field is formatted - // as - // follows: blockId/subBlockId/hostId. - PhysicalHost string `json:"physicalHost,omitempty"` - // PhysicalHostTopology: [Output Only] A series of fields containing the global - // name of the Compute - // Engine cluster, as well as the ID of the block, sub-block, and host on - // which the running instance is located. - PhysicalHostTopology *ResourceStatusPhysicalHostTopology `json:"physicalHostTopology,omitempty"` - // ReservationConsumptionInfo: [Output Only] Reservation information that the - // instance is consuming from. - ReservationConsumptionInfo *ResourceStatusReservationConsumptionInfo `json:"reservationConsumptionInfo,omitempty"` - Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` - // ServiceIntegrationStatuses: [Output Only] Represents the status of the - // service integration specs - // defined by the user in instance.serviceIntegrationSpecs. - ServiceIntegrationStatuses map[string]ResourceStatusServiceIntegrationStatus `json:"serviceIntegrationStatuses,omitempty"` - // ShutdownDetails: [Output Only] Details about the instance stopping state. - ShutdownDetails *ResourceStatusShutdownDetails `json:"shutdownDetails,omitempty"` - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusAcceleratorStatus: The status of an individual accelerator -// resource. -type ResourceStatusAcceleratorStatus struct { - // PassedScans: The details of scans that passed for an accelerator. - PassedScans []*ResourceStatusAcceleratorStatusPassedScan `json:"passedScans,omitempty"` - // RecommendedScans: The details of recommended scans for an accelerator. - RecommendedScans []*ResourceStatusAcceleratorStatusRecommendedScan `json:"recommendedScans,omitempty"` - // SerialNumber: The serial number of the accelerator. - SerialNumber string `json:"serialNumber,omitempty"` - // Uuid: The UUID of the accelerator. - Uuid string `json:"uuid,omitempty"` - // ForceSendFields is a list of field names (e.g. "PassedScans") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PassedScans") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusAcceleratorStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusAcceleratorStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceStatusAcceleratorStatusPassedScan struct { - // EndTime: The end time of the passed scan inRFC3339 text format. - EndTime string `json:"endTime,omitempty"` - Name string `json:"name,omitempty"` - // StartTime: The start time of the passed scan inRFC3339 text format. - StartTime string `json:"startTime,omitempty"` - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusAcceleratorStatusPassedScan) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusAcceleratorStatusPassedScan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceStatusAcceleratorStatusRecommendedScan struct { - EstimatedDuration *Duration `json:"estimatedDuration,omitempty"` - Name string `json:"name,omitempty"` - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "EstimatedDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EstimatedDuration") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusAcceleratorStatusRecommendedScan) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusAcceleratorStatusRecommendedScan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusEffectiveInstanceMetadata: Effective values of predefined -// metadata keys for an instance. -type ResourceStatusEffectiveInstanceMetadata struct { - // BlockProjectSshKeysMetadataValue: Effective block-project-ssh-keys value at - // Instance level. - BlockProjectSshKeysMetadataValue bool `json:"blockProjectSshKeysMetadataValue,omitempty"` - // EnableGuestAttributesMetadataValue: Effective enable-guest-attributes value - // at Instance level. - EnableGuestAttributesMetadataValue bool `json:"enableGuestAttributesMetadataValue,omitempty"` - // EnableOsInventoryMetadataValue: Effective enable-os-inventory value at - // Instance level. - EnableOsInventoryMetadataValue bool `json:"enableOsInventoryMetadataValue,omitempty"` - // EnableOsconfigMetadataValue: Effective enable-osconfig value at Instance - // level. - EnableOsconfigMetadataValue bool `json:"enableOsconfigMetadataValue,omitempty"` - // EnableOsloginMetadataValue: Effective enable-oslogin value at Instance - // level. - EnableOsloginMetadataValue bool `json:"enableOsloginMetadataValue,omitempty"` - // SerialPortEnableMetadataValue: Effective serial-port-enable value at - // Instance level. - SerialPortEnableMetadataValue bool `json:"serialPortEnableMetadataValue,omitempty"` - // SerialPortLoggingEnableMetadataValue: Effective serial-port-logging-enable - // value at Instance level. - SerialPortLoggingEnableMetadataValue bool `json:"serialPortLoggingEnableMetadataValue,omitempty"` - // VmDnsSettingMetadataValue: Effective VM DNS setting at Instance level. - VmDnsSettingMetadataValue string `json:"vmDnsSettingMetadataValue,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BlockProjectSshKeysMetadataValue") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "BlockProjectSshKeysMetadataValue") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusEffectiveInstanceMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusEffectiveInstanceMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceStatusLastInstanceTerminationDetails struct { - // TerminationReason: Reason for termination - // - // Possible values: - // "BAD_BILLING_ACCOUNT" - Terminated due to bad billing - // "CLOUD_ABUSE_DETECTED" - Terminated by Cloud Abuse team - // "DISK_ERROR" - Terminated due to disk errors - // "FREE_TRIAL_EXPIRED" - Terminated due to free trial expired - // "INSTANCE_UPDATE_REQUIRED_RESTART" - Instance.update initiated which - // required RESTART - // "INTERNAL_ERROR" - Terminated due to internal error - // "KMS_REJECTION" - Terminated due to Key Management Service (KMS) key - // failure. - // "MANAGED_INSTANCE_GROUP" - Terminated by managed instance group - // "OS_TERMINATED" - Terminated from the OS level - // "PREEMPTED" - Terminated due to preemption - // "SCHEDULED_STOP" - Terminated due to scheduled stop - // "SHUTDOWN_DUE_TO_HOST_ERROR" - Terminated due to host error - // "SHUTDOWN_DUE_TO_MAINTENANCE" - Terminated due to maintenance - // "SHUTDOWN_DUE_TO_SHEDDING_EVENT" - Terminated due to shedding event - // "USER_TERMINATED" - Terminated by user - TerminationReason string `json:"terminationReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "TerminationReason") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TerminationReason") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusLastInstanceTerminationDetails) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusLastInstanceTerminationDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusPhysicalHostTopology: Represents the physical host topology of -// the host on which the VM is -// running. -type ResourceStatusPhysicalHostTopology struct { - // Block: [Output Only] The ID of the block in which the running instance - // is - // located. Instances within the same block experience low network latency. - Block string `json:"block,omitempty"` - // Cluster: [Output Only] The global name of the Compute Engine cluster where - // the - // running instance is located. - Cluster string `json:"cluster,omitempty"` - // Host: [Output Only] The ID of the host on which the running instance is - // located. - // Instances on the same host experience the lowest possible network - // latency. - Host string `json:"host,omitempty"` - // Subblock: [Output Only] The ID of the sub-block in which the running - // instance is - // located. Instances in the same sub-block experience lower network - // latency - // than instances in the same block. - Subblock string `json:"subblock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusPhysicalHostTopology) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusPhysicalHostTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusReservationConsumptionInfo: Reservation consumption -// information that the instance is consuming from. -type ResourceStatusReservationConsumptionInfo struct { - // ConsumedReservation: [Output Only] The full resource name of the reservation - // that this - // instance is consuming from. - ConsumedReservation string `json:"consumedReservation,omitempty"` - // ConsumedReservationBlock: [Output Only] The full resource name of the - // reservation block that this - // instance is consuming from. - ConsumedReservationBlock string `json:"consumedReservationBlock,omitempty"` - // ConsumedReservationSubBlock: [Output Only] The full resource name of the - // reservation sub-block that - // this instance is consuming from. - ConsumedReservationSubBlock string `json:"consumedReservationSubBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumedReservation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumedReservation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusReservationConsumptionInfo) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusReservationConsumptionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceStatusScheduling struct { - // AvailabilityDomain: Specifies the availability domain to place the instance - // in. The value - // must be a number between 1 and the number of availability domains - // specified in the spread placement policy attached to the instance. - AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` - // TerminationTimestamp: Time in future when the instance will be terminated - // inRFC3339 text format. - TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityDomain") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilityDomain") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusScheduling) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusScheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusServiceIntegrationStatus: Represents the status of integration -// between instance and another service. -// See go/gce-backupdr-design for more details. -type ResourceStatusServiceIntegrationStatus struct { - BackupDr *ResourceStatusServiceIntegrationStatusBackupDRStatus `json:"backupDr,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupDr") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupDr") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusServiceIntegrationStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusServiceIntegrationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusServiceIntegrationStatusBackupDRStatus: Message defining -// compute perspective of the result of integration with -// Backup and DR. FAILED status indicates that the operation specified did -// not complete correctly and should be retried with the same value. -type ResourceStatusServiceIntegrationStatusBackupDRStatus struct { - // IntegrationDetails: The PlanReference object created by Backup and DR to - // maintain the - // actual status of backups. May still be present if removing the backup - // plan fails. - IntegrationDetails string `json:"integrationDetails,omitempty"` - // State: Enum representing the registration state of a Backup and DR backup - // plan - // for the instance. - // - // Possible values: - // "ACTIVE" - The operation was successful and Backup and DR is trying to - // protect - // the instance with the specified backup plan. Check - // resource pointed to in integration_details for more information. - // "CREATING" - GCE is trying to attach the backup plan to the instance. - // "DELETING" - GCE is trying to remove the backup plan from the instance. - // "FAILED" - The operation failed, specifying the same value - // inBackupDrSpec.plan again (including null for delete) will - // attempt to repair the integration - // "STATE_UNSPECIFIED" - Default value, should not be found on instances. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntegrationDetails") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntegrationDetails") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusServiceIntegrationStatusBackupDRStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusServiceIntegrationStatusBackupDRStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusShutdownDetails: Specifies if the instance is in -// `PENDING_STOP` state or there is a -// programmed stop scheduled. -type ResourceStatusShutdownDetails struct { - // MaxDuration: The duration for graceful shutdown. Only applicable - // when - // `stop_state=PENDING_STOP`. - MaxDuration *Duration `json:"maxDuration,omitempty"` - // RequestTimestamp: Past timestamp indicating the beginning of current - // `stopState` in RFC3339 text format. - RequestTimestamp string `json:"requestTimestamp,omitempty"` - // StopState: Current stopping state of the instance. - // - // Possible values: - // "PENDING_STOP" - The instance is gracefully shutting down. - // "STOPPING" - The instance is stopping. - StopState string `json:"stopState,omitempty"` - // TargetState: Target instance state. - // - // Possible values: - // "DELETED" - The instance will be deleted. - // "STOPPED" - The instance will be stopped. - TargetState string `json:"targetState,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxDuration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusShutdownDetails) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusShutdownDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RiskDetails: Details about a risk. -type RiskDetails struct { - // Duration: The duration of the risk since it was detected. - Duration string `json:"duration,omitempty"` - GlobalDnsInsight *RiskDetailsGlobalDnsInsight `json:"globalDnsInsight,omitempty"` - // LastUpdateTimestamp: The last time the risk was updated. - LastUpdateTimestamp string `json:"lastUpdateTimestamp,omitempty"` - // Severity: The severity of the risk. - // - // Possible values: - // "CRITICAL" - Critical severity. - // "HIGH" - High severity. - // "LOW" - Low severity. - // "MEDIUM" - Medium severity. - // "SEVERITY_UNSPECIFIED" - No severity specified. The default value. - Severity string `json:"severity,omitempty"` - // Type: The type of risk. - // - // Possible values: - // "GLOBAL_DNS" - Risk type related to global DNS. - // "RISK_TYPE_UNSPECIFIED" - Default value. This value is unused. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RiskDetails) MarshalJSON() ([]byte, error) { - type NoMethod RiskDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RiskDetailsGlobalDnsInsight struct { - // ProjectDefaultIsGlobalDns: Whether the project default DNS setting is global - // or not. - ProjectDefaultIsGlobalDns bool `json:"projectDefaultIsGlobalDns,omitempty"` - // QueryObservationWindow: The observation window for the query counts. - QueryObservationWindow string `json:"queryObservationWindow,omitempty"` - // RiskyQueryCount: The number of queries that are risky. This will always be - // less than - // total_query_count. - RiskyQueryCount int64 `json:"riskyQueryCount,omitempty,string"` - // TotalQueryCount: The total number of queries in the observation window. - TotalQueryCount int64 `json:"totalQueryCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ProjectDefaultIsGlobalDns") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectDefaultIsGlobalDns") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RiskDetailsGlobalDnsInsight) MarshalJSON() ([]byte, error) { - type NoMethod RiskDetailsGlobalDnsInsight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RiskRecommendation: Recommendation with reference url. -type RiskRecommendation struct { - // Content: Mitigation guide for the risk. - Content string `json:"content,omitempty"` - // ReferenceUrl: URL referencing a more detailed mitigation guide. - ReferenceUrl string `json:"referenceUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RiskRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod RiskRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Rollout: Represent a Rollout resource. -type Rollout struct { - // CancellationTime: Output only. The timestamp at which the Rollout was - // cancelled. - CancellationTime string `json:"cancellationTime,omitempty"` - // CompletionTime: Output only. The timestamp at which the Rollout was - // completed. - CompletionTime string `json:"completionTime,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CurrentWaveNumber: Output only. The number of the currently running - // wave. - // Ex. 1 - CurrentWaveNumber int64 `json:"currentWaveNumber,omitempty,string"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Output only. etag of the Rollout - // Ex. abc1234 - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#rollout - // for rollouts. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // RolloutEntity: Required. The resource being rolled out. - RolloutEntity *RolloutRolloutEntity `json:"rolloutEntity,omitempty"` - // RolloutPlan: Required. Rollout Plan used to model the Rollout. - // Ex. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1 - RolloutPlan string `json:"rolloutPlan,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: Output only. The current state of the Rollout. - // - // Possible values: - // "CANCELLED" - The rollout is in a failure terminal state. - // "CANCELLING" - The rollout is being cancelled. - // "CANCEL_FAILED" - An attempted cancel operation was unsuccessful. - // "COMPLETED" - The rollout is in a successful terminal state. - // "COMPLETE_FAILED" - An attempted complete operation was unsuccessful. - // "COMPLETING" - The rollout is being marked as completed. - // "FAILED" - The rollout completed with failures. - // "PAUSED" - The rollout is paused. - // "PAUSE_FAILED" - An attempted pause operation was unsuccessful. - // "PAUSING" - The rollout is being paused. - // "PROCESSING" - A wave is being processed by the product. - // "READY" - The rollout has been successfully initialized and is ready to - // start. - // "RESUMING" - The rollout is being resumed after being paused. - // "ROLLBACK_WAVE_FAILED" - An attempted rollback operation failed to - // complete successfully. - // "ROLLING_BACK" - A wave rollback is in progress for this rollout. - // "STATE_UNSPECIFIED" - Undefined default state. Should never be exposed to - // users. - // "UNINITIALIZED" - The rollout has been created but is not yet ready to be - // started. - // "WAVE_FAILED" - The product failed to process the wave. - State string `json:"state,omitempty"` - // WaveDetails: Output only. Details about each wave of the rollout. - WaveDetails []*RolloutWaveDetails `json:"waveDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CancellationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CancellationTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Rollout) MarshalJSON() ([]byte, error) { - type NoMethod Rollout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlan: Message describing RolloutPlan object -type RolloutPlan struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#rolloutPlan - // for rolloutPlans. - Kind string `json:"kind,omitempty"` - // LocationScope: The location scope of the rollout plan. If not specified, the - // location - // scope is considered as ZONAL. - // - // Possible values: - // "LOCATION_SCOPE_UNSPECIFIED" - Unspecified value. Considered as ZONAL. - // "REGIONAL" - Regional scope. - // "ZONAL" - Zonal scope. - LocationScope string `json:"locationScope,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Waves: Required. The waves included in this rollout plan. - Waves []*RolloutPlanWave `json:"waves,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlan) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWave: A single wave in a rollout plan. -type RolloutPlanWave struct { - // DisplayName: Optional. The display name of this wave of the rollout plan. - DisplayName string `json:"displayName,omitempty"` - // Number: Output only. The wave number. - Number int64 `json:"number,omitempty,string"` - // OrchestrationOptions: Optional. The orchestration options for this wave. - OrchestrationOptions *RolloutPlanWaveOrchestrationOptions `json:"orchestrationOptions,omitempty"` - // Selectors: Required. The selectors for this wave. There is a logical AND - // between each selector - // defined in a wave, so a resource must satisfy the criteria of *all* - // the - // specified selectors to be in scope for the wave. - Selectors []*RolloutPlanWaveSelector `json:"selectors,omitempty"` - // Validation: Required. The validation to be performed at the end of this - // wave. - Validation *RolloutPlanWaveValidation `json:"validation,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWave) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWave - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveOrchestrationOptions: Options to control the pace of -// orchestration of a wave. These options are -// required only if the resource being rolled out follows the -// Orchestrated -// pattern. -type RolloutPlanWaveOrchestrationOptions struct { - // Delays: Optional. Delays, if any, to be added between batches of projects. - // We allow - // multiple Delays to be specified, letting users set separate delays - // between batches of projects corresponding to different locations and - // batches of projects corresponding to the same location. - Delays []*RolloutPlanWaveOrchestrationOptionsDelay `json:"delays,omitempty"` - // MaxConcurrentLocations: Optional. Maximum number of locations to be - // orchestrated in parallel. - MaxConcurrentLocations int64 `json:"maxConcurrentLocations,omitempty,string"` - // MaxConcurrentResourcesPerLocation: Optional. Maximum number of resources to - // be orchestrated per location in - // parallel. - MaxConcurrentResourcesPerLocation int64 `json:"maxConcurrentResourcesPerLocation,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Delays") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Delays") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveOrchestrationOptions) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveOrchestrationOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveOrchestrationOptionsDelay: Options to control the delay, if -// any, between batches of projects. -type RolloutPlanWaveOrchestrationOptionsDelay struct { - // Delimiter: Optional. Controls whether the delay should only be added between - // batches of - // projects corresponding to different locations, or also between - // batches of projects corresponding to the same location. - // - // Must be set to DELIMITER_UNSPECIFIED if no delay is to be added. - // - // Possible values: - // "DELIMITER_BATCH" - The delay will also be added between batches of - // projects - // corresponding to the same location. - // "DELIMITER_LOCATION" - The delay will only be added between batches of - // projects - // corresponding to different locations. - // "DELIMITER_UNSPECIFIED" - No delay will be added between batches of - // projects. Processing will - // continue with the next batch as soon as the previous batch of LROs - // is done. - Delimiter string `json:"delimiter,omitempty"` - // Duration: Optional. The duration of the delay, if any, to be added between - // batches of - // projects. A zero duration corresponds to no delay. - Duration string `json:"duration,omitempty"` - // Type: Optional. Controls whether the specified duration is to be added at - // the end of - // each batch, or if the total processing time for each batch will be - // padded if needed to meet the specified duration. - // - // Must be set to TYPE_UNSPECIFIED if no delay is to be added. - // - // Possible values: - // "TYPE_MINIMUM" - The total processing time for each batch of projects will - // be padded - // if needed to meet the specified delay duration. - // "TYPE_OFFSET" - The specified delay will directly be added after each - // batch of - // projects as specified by the delimiter. - // "TYPE_UNSPECIFIED" - No delay will be added between batches of projects. - // Processing will - // continue with the next batch as soon as the previous batch of LROs - // is done. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delimiter") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Delimiter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveOrchestrationOptionsDelay) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveOrchestrationOptionsDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelector: A selector which specifies what resource(s) are -// included in a given wave. -type RolloutPlanWaveSelector struct { - // LocationSelector: Optional. Roll out to resources by Cloud locations. - LocationSelector *RolloutPlanWaveSelectorLocationSelector `json:"locationSelector,omitempty"` - // ResourceHierarchySelector: Optional. Roll out to resources by Cloud Resource - // Manager resource hierarchy. - ResourceHierarchySelector *RolloutPlanWaveSelectorResourceHierarchySelector `json:"resourceHierarchySelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocationSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocationSelector") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelectorLocationSelector: Roll out to resources by location. -type RolloutPlanWaveSelectorLocationSelector struct { - // IncludedLocations: Optional. Example: "us-central1-a" - IncludedLocations []string `json:"includedLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludedLocations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludedLocations") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelectorLocationSelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelectorLocationSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelectorResourceHierarchySelector: Roll out to resources by -// Cloud Resource Manager resource hierarchy -// nodes such as projects, folders, orgs. -type RolloutPlanWaveSelectorResourceHierarchySelector struct { - // IncludedFolders: Optional. Format: "folders/{folder_id}" - IncludedFolders []string `json:"includedFolders,omitempty"` - // IncludedOrganizations: Optional. Format: "organizations/{organization_id}" - IncludedOrganizations []string `json:"includedOrganizations,omitempty"` - // IncludedProjects: Optional. Format: "projects/{project_id}" - IncludedProjects []string `json:"includedProjects,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludedFolders") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludedFolders") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelectorResourceHierarchySelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelectorResourceHierarchySelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveValidation: The validation to be performed before progressing -// to the next wave. -type RolloutPlanWaveValidation struct { - // TimeBasedValidationMetadata: Optional. Metadata required if type = "time". - TimeBasedValidationMetadata *RolloutPlanWaveValidationTimeBasedValidationMetadata `json:"timeBasedValidationMetadata,omitempty"` - // Type: Required. The type of the validation. If a type of validation is - // associated with - // a metadata object, the appropriate metadata field mapping to the - // validation type must be provided in the validation message. Possible - // values are in quotes below alongside an explanation: - // "manual": The system waits for an end-user approval API before - // progressing to the next wave. - // "time": The system waits for a user specified duration before - // progressing to the next wave. TimeBasedValidation must be provided. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "TimeBasedValidationMetadata") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TimeBasedValidationMetadata") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveValidation) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveValidation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveValidationTimeBasedValidationMetadata: Metadata required if -// type = "time". -type RolloutPlanWaveValidationTimeBasedValidationMetadata struct { - // WaitDuration: Optional. The duration that the system waits in between waves. - // This wait starts - // after all changes in the wave are rolled out. - WaitDuration string `json:"waitDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "WaitDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WaitDuration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveValidationTimeBasedValidationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveValidationTimeBasedValidationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlansListResponse: Contains a list of RolloutPlan resources. -type RolloutPlansListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of RolloutPlan resources. - Items []*RolloutPlan `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RolloutPlansListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlansListResponseWarning: [Output Only] Informational warning -// message. -type RolloutPlansListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RolloutPlansListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutPlansListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPolicy: A rollout policy configuration. -type RolloutPolicy struct { - // DefaultRolloutTime: An optional RFC3339 timestamp on or after which the - // update is - // considered rolled out to any zone that is not explicitly stated. - DefaultRolloutTime string `json:"defaultRolloutTime,omitempty"` - // LocationRolloutPolicies: Location based rollout policies to apply to the - // resource. - // - // Currently only zone names are supported and must be represented - // as valid URLs, like: zones/us-central1-a. - // - // The value expects an RFC3339 timestamp on or after which the update - // is - // considered rolled out to the specified location. - LocationRolloutPolicies map[string]string `json:"locationRolloutPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultRolloutTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultRolloutTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutRolloutEntity: Specifications of the resource to roll out. -type RolloutRolloutEntity struct { - // OrchestratedEntity: Optional. Entity details for products using the - // Orchestrated Integration model. - OrchestratedEntity *RolloutRolloutEntityOrchestratedEntity `json:"orchestratedEntity,omitempty"` - // ForceSendFields is a list of field names (e.g. "OrchestratedEntity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OrchestratedEntity") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutRolloutEntity) MarshalJSON() ([]byte, error) { - type NoMethod RolloutRolloutEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutRolloutEntityOrchestratedEntity: This message is used if the resource -// type follows the Orchestrated -// integration model with ProgressiveRollout. -type RolloutRolloutEntityOrchestratedEntity struct { - // ConflictBehavior: Required. Specifies the behavior of the Rollout if an out - // of band update is - // detected in a project during a Rollout. It can be one of the - // following - // values: - // 1) overwrite : Overwrite the local value with the rollout value. - // 2) no_overwrite : Do not overwrite the local value with the rollout - // value. - ConflictBehavior string `json:"conflictBehavior,omitempty"` - // OrchestrationAction: Required. Orchestration action during the Rollout. It - // can be one of the following - // values: - // 1) "update": Resources will be updated by the rollout. - // 2) "delete": Resources will be deleted by the rollout. - OrchestrationAction string `json:"orchestrationAction,omitempty"` - // OrchestrationSource: Required. Fully qualified resource name of the resource - // which contains the source - // of truth of the configuration being rolled out across - // locations/projects. For example, in the case of a global Rollout which - // is applied across regions, this contains the name of the global - // resource created by the user which contains a payload for a resource - // that is orchestrated across regions. This follows the following - // format: - // //.googleapis.com/projects//locations/global// - // e.g. - // //osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1 - OrchestrationSource string `json:"orchestrationSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConflictBehavior") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutRolloutEntityOrchestratedEntity) MarshalJSON() ([]byte, error) { - type NoMethod RolloutRolloutEntityOrchestratedEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutWaveDetails: Additional metadata about the status of each wave -// provided by the server. -type RolloutWaveDetails struct { - // OrchestratedWaveDetails: Output only. Additional details of the wave for - // products using the Orchestrated - // Integration model. - OrchestratedWaveDetails *RolloutWaveDetailsOrchestratedWaveDetails `json:"orchestratedWaveDetails,omitempty"` - // WaveDisplayName: Output only. Wave name. - // Ex. wave1 - WaveDisplayName string `json:"waveDisplayName,omitempty"` - // WaveNumber: Output only. System generated number for the wave. - WaveNumber int64 `json:"waveNumber,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "OrchestratedWaveDetails") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OrchestratedWaveDetails") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutWaveDetails) MarshalJSON() ([]byte, error) { - type NoMethod RolloutWaveDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutWaveDetailsOrchestratedWaveDetails: Details of the wave for products -// using the Orchestrated integration -// model. -type RolloutWaveDetailsOrchestratedWaveDetails struct { - // CompletedResourcesCount: Output only. Resource completed so far. - CompletedResourcesCount int64 `json:"completedResourcesCount,omitempty,string"` - // EstimatedTotalResourcesCount: Output only. Estimated total count of - // resources. - EstimatedTotalResourcesCount int64 `json:"estimatedTotalResourcesCount,omitempty,string"` - // FailedLocations: Output only. Locations that failed during orchestration, - // and ProgressiveRollout - // stopped retrying. There may be some successful resources rolled out in - // the wave as the location may have failed later in the Rollout. - FailedLocations []string `json:"failedLocations,omitempty"` - // FailedResourcesCount: Output only. Resources failed. - FailedResourcesCount int64 `json:"failedResourcesCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CompletedResourcesCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletedResourcesCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutWaveDetailsOrchestratedWaveDetails) MarshalJSON() ([]byte, error) { - type NoMethod RolloutWaveDetailsOrchestratedWaveDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Rollout resources. - Items []*Rollout `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RolloutsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutsListResponseWarning: [Output Only] Informational warning message. -type RolloutsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RolloutsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Route: Represents a Route resource. -// -// A route defines a path from VM instances in the VPC network to a -// specific -// destination. This destination can be inside or outside the VPC network. -// For more information, read theRoutes overview. -type Route struct { - // AllowConflictingSubnetworks: Whether this route can conflict with existing - // subnetworks. Setting this to - // true allows this route to conflict with subnetworks that have already - // been - // configured on the corresponding network. - AllowConflictingSubnetworks bool `json:"allowConflictingSubnetworks,omitempty"` - // AsPaths: [Output Only] AS path. - AsPaths []*RouteAsPath `json:"asPaths,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DestRange: The destination range of outgoing packets that this route applies - // to. Both - // IPv4 and IPv6 are supported. - // Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC - // 4291 - // format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC - // 5952 - // compressed format. - DestRange string `json:"destRange,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IlbRouteBehaviorOnUnhealthy: ILB route behavior when ILB is deemed unhealthy - // based on user specified - // threshold on the Backend Service of the internal load balancing. - // - // Possible values: - // "DO_NOT_WITHDRAW_ROUTE_IF_ILB_UNHEALTHY" - Do not Withdraw route if the - // ILB is deemed unhealthy based on user - // specified threshold on the Backend Service of the ILB. This is - // default - // behavior for ilb as next hop route without IlbRouteBehavior. - // "WITHDRAW_ROUTE_IF_ILB_UNHEALTHY" - Withdraw route if the ILB is deemed - // unhealthy based on user specified - // threshold on the Backend Service of the internal load balancing. - // - // Currently the withdrawn route will be reinserted when the backends - // are - // restored to healthy. If you wish to prevent the re-insertion of the - // route - // and trigger the fall-back at your discretion, override the health - // result - // from the backends to signal as healthy only when ready to fallback. - IlbRouteBehaviorOnUnhealthy string `json:"ilbRouteBehaviorOnUnhealthy,omitempty"` - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all following characters (except for the - // last - // character) must be a dash, lowercase letter, or digit. The last - // character - // must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: Fully-qualified URL of the network that this route applies to. - Network string `json:"network,omitempty"` - // NextHopGateway: The URL to a gateway that should handle matching - // packets. - // You can only specify the internet gateway using a full or - // partial valid URL: projects/project/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - // NextHopHub: [Output Only] The full resource name of the Network Connectivity - // Center hub - // that will handle matching packets. - NextHopHub string `json:"nextHopHub,omitempty"` - // NextHopIlb: The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL - // that should handle matching - // packets or the IP address of the forwarding Rule. - // For example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - // - regions/region/forwardingRules/forwardingRule - // - // - // If an IP address is provided, must specify an IPv4 address in - // dot-decimal - // notation or an IPv6 address in RFC 4291 format. For example, the - // following - // are all valid IP addresses: - // - // - // - 10.128.0.56 - // - 2001:db8::2d9:51:0:0 - // - 2001:db8:0:0:2d9:51:0:0 - // - // - // IPv6 addresses will be displayed using RFC 5952 compressed format - // (e.g. - // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. - NextHopIlb string `json:"nextHopIlb,omitempty"` - // NextHopInstance: The URL to an instance that should handle matching packets. - // You can specify - // this as a full or partial URL. - // For example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - // NextHopInterRegionCost: [Output only] Internal fixed region-to-region cost - // that Google Cloud - // calculates based on factors such as network performance, distance, - // and - // available bandwidth between regions. - NextHopInterRegionCost int64 `json:"nextHopInterRegionCost,omitempty"` - // NextHopInterconnectAttachment: [Output Only] The URL to an - // InterconnectAttachment which is the next hop - // for the route. - // This field will only be populated for dynamic routes generated by - // Cloud Router with a linked interconnectAttachment or the static - // route - // generated by each L2 Interconnect Attachment. - NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` - // NextHopIp: The network IP address of an instance that should handle matching - // packets. - // Both IPv6 address and IPv4 addresses are supported. - // Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or - // an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 - // or - // 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC - // 5952 - // compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be - // an - // IPv4-mapped IPv6 address. - NextHopIp string `json:"nextHopIp,omitempty"` - // NextHopMed: [Output Only] Multi-Exit Discriminator, a BGP route metric that - // indicates - // the desirability of a particular route in a network. - NextHopMed int64 `json:"nextHopMed,omitempty"` - // NextHopNetwork: The URL of the local network if it should handle matching - // packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` - // NextHopOrigin: [Output Only] Indicates the origin of the route. Can be - // IGP - // (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), - // or INCOMPLETE. - // - // Possible values: - // "EGP" - // "IGP" - // "INCOMPLETE" - NextHopOrigin string `json:"nextHopOrigin,omitempty"` - // NextHopPeering: [Output Only] The network peering name that should handle - // matching packets, - // which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *RouteParams `json:"params,omitempty"` - // Priority: The priority of this route. Priority is used to break ties in - // cases - // where there is more than one matching route of equal prefix length. In - // cases where multiple routes have equal prefix length, the one with - // the - // lowest-numbered priority value wins. The default value is `1000`. - // The - // priority value must be from `0` to `65535`, inclusive. - Priority int64 `json:"priority,omitempty"` - // RouteStatus: [Output only] The status of the route. This status only applies - // to - // dynamic routes learned by Cloud Routers. This status is not applicable - // to static routes. - // - // Possible values: - // "ACTIVE" - This route is processed and active. - // "DROPPED" - The route is dropped due to the VPC exceeding the dynamic - // route limit. - // For dynamic route limit, please refer to the - // Learned route example - // "INACTIVE" - This route is processed but inactive due to failure from the - // backend. The - // backend may have rejected the route - // "PENDING" - This route is being processed internally. The status will - // change once - // processed. - RouteStatus string `json:"routeStatus,omitempty"` - // RouteType: [Output Only] The type of this route, which can be one of the - // following - // values: - // - 'TRANSIT' for a transit route that this router learned from - // another Cloud Router and will readvertise to one of its BGP peers - // - 'SUBNET' for a route from a subnet of the VPC - // - 'BGP' for a route learned from a BGP peer of this router - // - 'STATIC' for a static route - // - // Possible values: - // "BGP" - // "STATIC" - // "SUBNET" - // "TRANSIT" - RouteType string `json:"routeType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` - // Warnings: [Output Only] If potential misconfigurations are detected for - // this - // route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AllowConflictingSubnetworks") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowConflictingSubnetworks") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Route) MarshalJSON() ([]byte, error) { - type NoMethod Route - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouteWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteWarnings) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteAsPath struct { - // AsLists: [Output Only] The AS numbers of the AS Path. - AsLists []int64 `json:"asLists,omitempty"` - // PathSegmentType: [Output Only] The type of the AS Path, which can be one of - // the following - // values: - // - 'AS_SET': unordered set of autonomous systems that the route - // in has traversed - // - 'AS_SEQUENCE': ordered set of autonomous - // systems that the route has traversed - // - 'AS_CONFED_SEQUENCE': - // ordered set of Member Autonomous Systems in the local confederation that - // the route has traversed - // - 'AS_CONFED_SET': unordered set of - // Member Autonomous Systems in the local confederation that the route - // has - // traversed - // - // Possible values: - // "AS_CONFED_SEQUENCE" - // "AS_CONFED_SET" - // "AS_SEQUENCE" - // "AS_SET" - PathSegmentType string `json:"pathSegmentType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsLists") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsLists") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteAsPath) MarshalJSON() ([]byte, error) { - type NoMethod RouteAsPath - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouteListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteList) MarshalJSON() ([]byte, error) { - type NoMethod RouteList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteListWarning: [Output Only] Informational warning message. -type RouteListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouteListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteParams: Additional route parameters. -type RouteParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteParams) MarshalJSON() ([]byte, error) { - type NoMethod RouteParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutePolicy struct { - // Description: An optional description of route policy. - Description string `json:"description,omitempty"` - // Fingerprint: A fingerprint for the Route Policy being applied to this - // Router, which is - // essentially a hash of the Route Policy used for optimistic locking. - // The fingerprint is initially generated by Compute Engine and changes - // after every request to modify or update Route Policy. You must - // always - // provide an up-to-date fingerprint hash in order to update or - // change - // labels. - // - // To see the latest fingerprint, make a getRoutePolicy() request - // to retrieve a Route Policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Name: Route Policy name, which must be a resource ID segment and - // unique - // within all the router's Route Policies. Name should conform to RFC1035. - Name string `json:"name,omitempty"` - // Terms: List of terms (the order in the list is not important, they are - // evaluated - // in order of priority). Order of policies is not retained and might - // change - // when getting policy later. - Terms []*RoutePolicyPolicyTerm `json:"terms,omitempty"` - // Possible values: - // "ROUTE_POLICY_TYPE_EXPORT" - The Route Policy is an Export Policy. - // "ROUTE_POLICY_TYPE_IMPORT" - The Route Policy is an Import Policy. - Type string `json:"type,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutePolicy) MarshalJSON() ([]byte, error) { - type NoMethod RoutePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutePolicyPolicyTerm struct { - // Actions: CEL expressions to evaluate to modify a route when this term - // matches. - Actions []*Expr `json:"actions,omitempty"` - // Match: CEL expression evaluated against a route to determine if this - // term - // applies. When not set, the term applies to all - // routes. - Match *Expr `json:"match,omitempty"` - // Priority: The evaluation priority for this term, which must be between - // 0 - // (inclusive) and 2^31 (exclusive), and unique within the list. - Priority int64 `json:"priority,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutePolicyPolicyTerm) MarshalJSON() ([]byte, error) { - type NoMethod RoutePolicyPolicyTerm - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Router: Represents a Cloud Router resource. -// -// For more information about Cloud Router, read theCloud -// Router overview. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - // BgpPeers: BGP information that must be configured into the routing stack - // to - // establish BGP peering. This information must specify the peer ASN and - // either the interface name, IP address, or peer IP address. Please refer - // toRFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EncryptedInterconnectRouter: Indicates if a router is dedicated for use with - // encrypted VLAN - // attachments (interconnectAttachments). - EncryptedInterconnectRouter bool `json:"encryptedInterconnectRouter,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interfaces: Router interfaces. - // To create a BGP peer that uses a router interface, - // the interface must have one of the following fields specified: - // - // - linkedVpnTunnel - // - linkedInterconnectAttachment - // - subnetwork - // - // - // You can create a router interface without any of these fields - // specified. - // However, you cannot create a BGP peer that uses that interface. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - // Md5AuthenticationKeys: Keys used for MD5 authentication. - Md5AuthenticationKeys []*RouterMd5AuthenticationKey `json:"md5AuthenticationKeys,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Nats: A list of NAT services created in this router. - Nats []*RouterNat `json:"nats,omitempty"` - // NccGateway: URI of the ncc_gateway to which this router associated. - NccGateway string `json:"nccGateway,omitempty"` - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *RouterParams `json:"params,omitempty"` - // Region: [Output Only] URI of the region where the router resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Bgp") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bgp") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Router) MarshalJSON() ([]byte, error) { - type NoMethod Router - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAdvertisedIpRange: Description-tagged IP ranges for the router to -// advertise. -type RouterAdvertisedIpRange struct { - // Description: User-specified description for the IP range. - Description string `json:"description,omitempty"` - // Range: The IP range to advertise. The value must be a CIDR-formatted string. - Range string `json:"range,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAdvertisedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterAdvertisedIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouterAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedListWarning: [Output Only] Informational warning message. -type RouterAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouterAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgp struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // The options are DEFAULT or CUSTOM. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - // AdvertisedGroups: User-specified list of prefix groups to advertise in - // custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // is advertised to all peers of the router. - // These groups will be advertised in addition to any specified prefixes. - // Leave this field blank to advertise no custom groups. - // - // Possible values: - // "ALL_PEER_VPC_SUBNETS" - Advertise peer subnets of the router's VPC. - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - // "ALL_VPC_SUBNETS" - Advertise the router's own VPC subnets. - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - // AdvertisedIpRanges: User-specified list of individual IP ranges to advertise - // in custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // is advertised to all peers of the router. - // These IP ranges will be advertised in addition to any specified - // groups. - // Leave this field blank to advertise no custom IP ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - // Asn: Local BGP Autonomous System Number (ASN). - // Must be anRFC6996 private ASN, either 16-bit or 32-bit. The - // value will be fixed for this router resource. All VPN tunnels that link - // to this router will have the same local ASN. - Asn int64 `json:"asn,omitempty"` - // IdentifierRange: Explicitly specifies a range of valid BGP Identifiers for - // this Router. It - // is provided as a link-local IPv4 range (from 169.254.0.0/16), of size - // at - // least /30, even if the BGP sessions are over IPv6. It must not overlap - // with any IPv4 BGP session ranges. - // - // - // Other vendors commonly call this "router ID". - IdentifierRange string `json:"identifierRange,omitempty"` - // KeepaliveInterval: The interval in seconds between BGP keepalive messages - // that are - // sent to the peer. - // - // - // Hold time is three times the interval at which keepalive messages are - // sent, and the hold time is the maximum number of seconds allowed to - // elapse between successive keepalive messages that BGP receives from - // a - // peer. - // - // - // BGP will use the smaller of either the local hold time value or the - // peer's hold time value as the hold time for the BGP connection between - // the two peers. - // - // - // If set, this value must be between 20 and 60. The default is 20. - KeepaliveInterval int64 `json:"keepaliveInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgp) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeer struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - // AdvertisedGroups: User-specified list of prefix groups to advertise in - // custom mode, - // which currently supports the following option: - // - // - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This - // excludes any routes learned for subnets that use - // VPC Network Peering. - // - // - // Note that this field can only be populated if advertise_mode is CUSTOM - // and overrides the list defined for the router (in the "bgp" message). - // These groups are advertised in addition to any specified prefixes. - // Leave this field blank to advertise no custom groups. - // - // Possible values: - // "ALL_PEER_VPC_SUBNETS" - Advertise peer subnets of the router's VPC. - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - // "ALL_VPC_SUBNETS" - Advertise the router's own VPC subnets. - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - // AdvertisedIpRanges: User-specified list of individual IP ranges to advertise - // in custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // overrides the list defined for the router (in the "bgp" message). - // These IP ranges are advertised in addition to any specified groups. - // Leave this field blank to advertise no custom IP ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - // AdvertisedRoutePriority: The priority of routes advertised to this BGP peer. - // Where there is more - // than one matching route of maximum length, the routes with the - // lowest - // priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - // Bfd: BFD configuration for the BGP peering. - Bfd *RouterBgpPeerBfd `json:"bfd,omitempty"` - // CustomLearnedIpRanges: A list of user-defined custom learned route IP - // address ranges for a BGP - // session. - CustomLearnedIpRanges []*RouterBgpPeerCustomLearnedIpRange `json:"customLearnedIpRanges,omitempty"` - // CustomLearnedRoutePriority: The user-defined custom learned route priority - // for a BGP session. This - // value is applied to all custom learned route ranges for the session. - // You can choose a value from `0` to `65335`. If you don't provide a - // value, Google Cloud assigns a priority of `100` to the ranges. - CustomLearnedRoutePriority int64 `json:"customLearnedRoutePriority,omitempty"` - // Enable: The status of the BGP peer connection. - // - // - // If set to FALSE, any active session with the peer is terminated and - // all associated routing information is removed. If set to TRUE, the - // peer connection can be established with routing information. The default - // is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - // EnableIpv4: Enable IPv4 traffic over BGP Peer. It is enabled by default - // if - // the peerIpAddress is version 4. - EnableIpv4 bool `json:"enableIpv4,omitempty"` - // EnableIpv6: Enable IPv6 traffic over BGP Peer. It is enabled by default if - // the - // peerIpAddress is version 6. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - // ExportPolicies: List of export policies applied to this peer, in the order - // they must be - // evaluated. The name must correspond to an existing policy that - // has - // ROUTE_POLICY_TYPE_EXPORT type. - ExportPolicies []string `json:"exportPolicies,omitempty"` - // ImportPolicies: List of import policies applied to this peer, in the order - // they must be - // evaluated. The name must correspond to an existing policy that - // has - // ROUTE_POLICY_TYPE_IMPORT type. - ImportPolicies []string `json:"importPolicies,omitempty"` - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - // IpAddress: IP address of the interface inside Google Cloud Platform. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv4NexthopAddress: IPv4 address of the interface inside Google Cloud - // Platform. - Ipv4NexthopAddress string `json:"ipv4NexthopAddress,omitempty"` - // Ipv6NexthopAddress: IPv6 address of the interface inside Google Cloud - // Platform. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - // LinkedCustomHardware: The linked custom hardware resource. - // The URI of the custom hardware link attachment - // is where you will establish the BGP session from the Cloud Router. - // This link attachment must reside in the same subnetwork as the - // associated - // router interface. - LinkedCustomHardware string `json:"linkedCustomHardware,omitempty"` - // ManagementType: [Output Only] The resource that configures and manages this - // BGP peer. - // - // - MANAGED_BY_USER is the default value and can be managed by you - // or other users - // - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed - // by Cloud Interconnect, specifically by an InterconnectAttachment of type - // PARTNER. Google automatically creates, updates, and deletes this type of - // BGP peer when the PARTNER InterconnectAttachment is created, updated, - // or deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The BGP peer is automatically created for - // PARTNER type - // InterconnectAttachment; Google will automatically create/delete - // this BGP peer when the PARTNER InterconnectAttachment is - // created/deleted, and Google will update the ipAddress and - // peerIpAddress when the PARTNER InterconnectAttachment is provisioned. - // This type of BGP peer cannot be created or deleted, but can be - // modified for all fields except for name, ipAddress and peerIpAddress. - // "MANAGED_BY_USER" - Default value, the BGP peer is manually created and - // managed by user. - ManagementType string `json:"managementType,omitempty"` - // Md5AuthenticationKeyName: Present if MD5 authentication is enabled for the - // peering. Must be the - // name of one of the entries in the Router.md5_authentication_keys. The - // field must comply with RFC1035. - Md5AuthenticationKeyName string `json:"md5AuthenticationKeyName,omitempty"` - // Name: Name of this BGP peer. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface may - // use - // a different value. - PeerAsn int64 `json:"peerAsn,omitempty"` - // PeerIpAddress: IP address of the BGP interface outside Google Cloud - // Platform. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // PeerIpv4NexthopAddress: IPv4 address of the BGP interface outside Google - // Cloud Platform. - PeerIpv4NexthopAddress string `json:"peerIpv4NexthopAddress,omitempty"` - // PeerIpv6NexthopAddress: IPv6 address of the BGP interface outside Google - // Cloud Platform. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - // RouterApplianceInstance: URI of the VM instance that is used as third-party - // router - // appliances such as Next Gen Firewalls, Virtual Routers, or - // Router - // Appliances. The VM instance must be located in zones contained in the - // same region as this Cloud Router. - // The VM instance is the peer side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeer) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeer - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeerBfd struct { - // MinReceiveInterval: The minimum interval, in milliseconds, between BFD - // control packets - // received from the peer router. The actual value is negotiated between - // the two routers and is equal to the greater of this value and the - // transmit interval of the other router. - // - // - // If set, this value must be between 1000 and 30000. - // - // - // The default is 1000. - MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` - // MinTransmitInterval: The minimum interval, in milliseconds, between BFD - // control packets - // transmitted to the peer router. The actual value is negotiated between - // the two routers and is equal to the greater of this value and - // the - // corresponding receive interval of the other router. - // - // - // If set, this value must be between 1000 and 30000. - // - // - // The default is 1000. - MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` - // Mode: The BFD session initialization mode for this BGP peer. - // If set to ACTIVE, the Cloud Router will initiate the BFD session for - // this BGP peer. If set to PASSIVE, the Cloud Router will wait for the - // peer router to initiate the BFD session for this BGP peer. If set - // to - // DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - Mode string `json:"mode,omitempty"` - // Multiplier: The number of consecutive BFD packets that must be missed - // before BFD declares that a peer is unavailable. - // - // - // If set, the value must be a value between 5 and 16. - // - // - // The default is 5. - Multiplier int64 `json:"multiplier,omitempty"` - // PacketMode: The BFD packet mode for this BGP peer. - // If set to CONTROL_AND_ECHO, BFD echo mode is enabled for this BGP peer. - // In this mode, if the peer router also has BFD echo mode enabled, BFD - // echo packets will be sent to the other router. If the peer router does - // not have BFD echo mode enabled, only control packets will be sent. If - // set to CONTROL_ONLY, BFD echo mode is disabled for this BGP peer. If - // this router and the peer router have a multihop connection, this should - // be set to CONTROL_ONLY as BFD echo mode is only supported on - // singlehop - // connections. The default is CONTROL_AND_ECHO. - // - // Possible values: - // "CONTROL_AND_ECHO" - // "CONTROL_ONLY" - PacketMode string `json:"packetMode,omitempty"` - // SessionInitializationMode: The BFD session initialization mode for this BGP - // peer. - // - // - // If set to ACTIVE, the Cloud Router will initiate the BFD session for - // this BGP peer. If set to PASSIVE, the Cloud Router will wait for the - // peer router to initiate the BFD session for this BGP peer. If set - // to - // DISABLED, BFD is disabled for this BGP peer. The default is DISABLED. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - SessionInitializationMode string `json:"sessionInitializationMode,omitempty"` - // SlowTimerInterval: The minimum interval, in milliseconds, between BFD - // control packets - // transmitted to and received from the peer router when BFD echo mode - // is - // enabled on both routers. The actual transmit and receive intervals - // are - // negotiated between the two routers and are equal to the greater of - // this - // value and the corresponding interval on the other router. - // If set, this value must be between 1000 and 30000. - // The default is 5000. - SlowTimerInterval int64 `json:"slowTimerInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinReceiveInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinReceiveInterval") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeerBfd) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerBfd - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeerCustomLearnedIpRange struct { - // Range: The custom learned route IP address range. Must be a - // valid - // CIDR-formatted prefix. If an IP address is provided without a subnet - // mask, it is interpreted as, for IPv4, a `/32` singular IP address - // range, and, for IPv6, `/128`. - Range string `json:"range,omitempty"` - // ForceSendFields is a list of field names (e.g. "Range") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Range") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeerCustomLearnedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerCustomLearnedIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterInterface struct { - // IpRange: IP address and range of the interface. - // - // - For Internet Protocol version 4 (IPv4), the IP range must be in - // theRFC3927 link-local IP address space. The value must - // be a CIDR-formatted string, for example, 169.254.0.1/30. - // Note: Do not truncate the IP address, as it represents the IP address of - // the interface. - // - For Internet Protocol version 6 (IPv6), the value - // must be a unique local address (ULA) range from fdff:1::/64 - // with a mask length of 126 or less. This value should be a CIDR-formatted - // string, for example, fdff:1::1/112. Within the router's - // VPC, this IPv6 prefix will be reserved exclusively for this connection - // and cannot be used for any other purpose. - IpRange string `json:"ipRange,omitempty"` - // IpVersion: IP version of this interface. - // - // Possible values: - // "IPV4" - // "IPV6" - IpVersion string `json:"ipVersion,omitempty"` - // LinkedInterconnectAttachment: URI of the linked Interconnect attachment. It - // must be in the same region - // as the router. Each interface can have one linked resource, which can be - // a VPN tunnel, an Interconnect attachment, or a subnetwork. - LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` - // LinkedVpnTunnel: URI of the linked VPN tunnel, which must be in the same - // region as the - // router. Each interface can have one linked resource, which can be - // a VPN tunnel, an Interconnect attachment, or a subnetwork. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - // ManagementType: [Output Only] The resource that configures and manages this - // interface. - // - // - MANAGED_BY_USER is the default value and can be managed directly - // by users. - // - MANAGED_BY_ATTACHMENT is an interface that is configured and - // managed by Cloud Interconnect, specifically, by an - // InterconnectAttachment - // of type PARTNER. Google automatically creates, updates, and deletes - // this type of interface when the PARTNER InterconnectAttachment is - // created, updated, or deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The interface is automatically created for - // PARTNER type - // InterconnectAttachment, Google will automatically create/update/delete - // this interface when the PARTNER InterconnectAttachment - // is - // created/provisioned/deleted. - // This type of interface cannot be manually managed by user. - // "MANAGED_BY_USER" - Default value, the interface is manually created and - // managed by user. - ManagementType string `json:"managementType,omitempty"` - // Name: Name of this interface entry. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PrivateIpAddress: The regional private internal IP address that is used to - // establish - // BGP sessions to a VM instance acting as a third-party - // Router Appliance, such as a Next Gen Firewall, a Virtual Router, or - // an SD-WAN VM. - PrivateIpAddress string `json:"privateIpAddress,omitempty"` - // RedundantInterface: Name of the interface that will be redundant with the - // current interface - // you are creating. The redundantInterface must belong to the same - // Cloud - // Router as the interface here. To establish the BGP session to a - // Router - // Appliance VM, you must create two BGP peers. The two BGP peers must - // be - // attached to two separate interfaces that are redundant with each other. - // The redundant_interface must be 1-63 characters long, and comply - // withRFC1035. Specifically, the redundant_interface must - // be 1-63 characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - RedundantInterface string `json:"redundantInterface,omitempty"` - // Subnetwork: The URI of the subnetwork resource that this interface belongs - // to, which - // must be in the same region as the Cloud Router. - // When you establish a BGP session to a VM instance using this interface, - // the VM instance must belong to the same subnetwork as the - // subnetwork - // specified here. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterInterface) MarshalJSON() ([]byte, error) { - type NoMethod RouterInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterList: Contains a list of Router resources. -type RouterList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouterListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterList) MarshalJSON() ([]byte, error) { - type NoMethod RouterList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterListWarning: [Output Only] Informational warning message. -type RouterListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouterListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterMd5AuthenticationKey struct { - // Key: [Input only] Value of the key. - // - // For patch and update calls, it can be skipped to - // copy the value from the previous configuration. This is allowed if the - // key with the same name existed before the operation. Maximum length is - // 80 - // characters. Can only contain printable ASCII characters. - Key string `json:"key,omitempty"` - // Name: Name used to identify the key. - // - // Must be unique within a router. Must be referenced by exactly - // one bgpPeer. Must comply withRFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { - type NoMethod RouterMd5AuthenticationKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNat: Represents a Nat resource. It enables the VMs within the -// specified -// subnetworks to access Internet without external IP addresses. It specifies -// a list of subnetworks (and the ranges within) that want to use -// NAT. -// Customers can also provide the external IPs that would be used for NAT. -// GCP -// would auto-allocate ephemeral IPs if no external IPs are provided. -type RouterNat struct { - // AutoNetworkTier: The network tier to use when automatically reserving NAT IP - // addresses. - // Must be one of: PREMIUM, STANDARD. - // If not specified, then the current - // project-level default tier is used. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "SELECT" - Price competitive network tier, support for all networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - AutoNetworkTier string `json:"autoNetworkTier,omitempty"` - // DrainNatIps: A list of URLs of the IP resources to be drained. These - // IPs - // must be valid static external IPs that have been assigned to the NAT. - // These IPs should be used for updating/patching a NAT only. - DrainNatIps []string `json:"drainNatIps,omitempty"` - // EnableDynamicPortAllocation: Enable Dynamic Port Allocation. - // - // - // If not specified, it is disabled by default. - // - // - // If set to true, - // - // - Dynamic Port Allocation will be enabled on this NAT - // config. - // - enableEndpointIndependentMapping cannot be set to true. - // - If minPorts is set, minPortsPerVm must be set to a - // power of two greater than or equal to 32. If minPortsPerVm is not set, a - // minimum of 32 ports will be allocated to a VM from this NAT - // config. - EnableDynamicPortAllocation bool `json:"enableDynamicPortAllocation,omitempty"` - EnableEndpointIndependentMapping bool `json:"enableEndpointIndependentMapping,omitempty"` - // EndpointTypes: List of NAT-ted endpoint types supported by the Nat Gateway. - // If the list - // is empty, then it will be equivalent to include ENDPOINT_TYPE_VM - // - // Possible values: - // "ENDPOINT_TYPE_MANAGED_PROXY_LB" - This is used for regional Application - // Load Balancers (internal and - // external) and regional proxy Network Load Balancers (internal and - // external) endpoints. - // "ENDPOINT_TYPE_SWG" - This is used for Secure Web Gateway endpoints. - // "ENDPOINT_TYPE_VM" - This is the default. - EndpointTypes []string `json:"endpointTypes,omitempty"` - // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. Defaults to - // 30s if not set. - IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` - // LogConfig: Configure logging on this NAT. - LogConfig *RouterNatLogConfig `json:"logConfig,omitempty"` - // MaxPortsPerVm: Maximum number of ports allocated to a VM from this NAT - // config when - // Dynamic Port Allocation is enabled. - // - // - // If Dynamic Port Allocation is not enabled, this field has no effect. - // - // - // If Dynamic Port Allocation is enabled, and this field is set, it must be - // set to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm - // is not set. - // - // - // If Dynamic Port Allocation is enabled and this field is not set, - // a maximum of 65536 ports will be allocated to a VM from this NAT - // config. - MaxPortsPerVm int64 `json:"maxPortsPerVm,omitempty"` - // MinPortsPerVm: Minimum number of ports allocated to a VM from this NAT - // config. If not - // set, a default number of ports is allocated to a VM. This is rounded - // up to the nearest power of 2. For example, if the value of this field is - // 50, at least 64 ports are allocated to a VM. - MinPortsPerVm int64 `json:"minPortsPerVm,omitempty"` - // Name: Unique name of this Nat service. - // The name must be 1-63 characters long and comply withRFC1035. - Name string `json:"name,omitempty"` - // Nat64Subnetworks: List of Subnetwork resources whose traffic should be - // translated by NAT64 - // Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is - // selected for the SubnetworkIpRangeToNat64Option above. - Nat64Subnetworks []*RouterNatSubnetworkToNat64 `json:"nat64Subnetworks,omitempty"` - // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take one of - // the following - // values: - // - // - MANUAL_ONLY: Uses only Nat IP addresses provided by - // customers. When there are not enough specified Nat IPs, the Nat service - // fails for new VMs. - // - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers - // can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should - // be empty. - // - // Possible values: - // "AUTO_ONLY" - Nat IPs are allocated by GCP; customers can not specify any - // Nat IPs. - // "MANUAL_ONLY" - Only use Nat IPs provided by customers. When specified Nat - // IPs are not - // enough then the Nat service fails for new VMs. - NatIpAllocateOption string `json:"natIpAllocateOption,omitempty"` - // NatIps: A list of URLs of the IP resources used for this Nat service. These - // IP - // addresses must be valid static external IP addresses assigned to - // the - // project. - NatIps []string `json:"natIps,omitempty"` - // Rules: A list of rules associated with this NAT. - Rules []*RouterNatRule `json:"rules,omitempty"` - // SourceSubnetworkIpRangesToNat: Specify the Nat option, which can take one of - // the following values: - // - // - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every - // Subnetwork are allowed to Nat. - // - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges - // in every Subnetwork are allowed to Nat. - // - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat - // (specified in the field subnetwork below) - // - // - // The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. - // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then - // there - // should not be any other Router.Nat section in any Router for this network - // in this region. - // - // Possible values: - // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every Subnetwork - // are allowed to Nat. - // "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES" - All the primary IP ranges in - // every Subnetwork are allowed to Nat. - // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat - // (specified in the field - // subnetwork below) - SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` - // SourceSubnetworkIpRangesToNat64: Specify the Nat option for NAT64, which can - // take one of the following - // values: - // - // - ALL_IPV6_SUBNETWORKS: All of the IP ranges in - // every Subnetwork are allowed to Nat. - // - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat - // (specified in the field nat64_subnetwork below) - // - // - // The default is NAT64_OPTION_UNSPECIFIED. - // Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no - // other - // Router.Nat section in this region can also enable NAT64 for any - // Subnetworks in this network. Other Router.Nat sections can still be - // present to enable NAT44 only. - // - // Possible values: - // "ALL_IPV6_SUBNETWORKS" - NAT64 is enabled for all the IPv6 subnet - // ranges. - // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. - // "LIST_OF_IPV6_SUBNETWORKS" - NAT64 is enabled for a list of IPv6 subnet - // ranges. - // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. - // If this option is used, the nat64_subnetworks field must be specified. - SourceSubnetworkIpRangesToNat64 string `json:"sourceSubnetworkIpRangesToNat64,omitempty"` - // Subnetworks: A list of Subnetwork resources whose traffic should be - // translated by NAT - // Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for - // the - // SubnetworkIpRangeToNatOption above. - Subnetworks []*RouterNatSubnetworkToNat `json:"subnetworks,omitempty"` - // TcpEstablishedIdleTimeoutSec: Timeout (in seconds) for TCP established - // connections. Defaults to 1200s - // if not set. - TcpEstablishedIdleTimeoutSec int64 `json:"tcpEstablishedIdleTimeoutSec,omitempty"` - // TcpTimeWaitTimeoutSec: Timeout (in seconds) for TCP connections that are in - // TIME_WAIT state. - // Defaults to 120s if not set. - TcpTimeWaitTimeoutSec int64 `json:"tcpTimeWaitTimeoutSec,omitempty"` - // TcpTransitoryIdleTimeoutSec: Timeout (in seconds) for TCP transitory - // connections. Defaults to 30s if - // not set. - TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` - // Type: Indicates whether this NAT is used for public or private - // IP - // translation. If unspecified, it defaults to PUBLIC. - // - // Possible values: - // "PRIVATE" - NAT used for private IP translation. - // "PUBLIC" - NAT used for public IP translation. - // This is the default. - Type string `json:"type,omitempty"` - // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults to 30s - // if not set. - UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoNetworkTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoNetworkTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNat - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatLogConfig: Configuration of logging on a NAT. -type RouterNatLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by default. - Enable bool `json:"enable,omitempty"` - // Filter: Specify the desired filtering of logs on this NAT. If - // unspecified, - // logs are exported for all connections handled by this NAT. - // This option can take one of the following values: - // - // - ERRORS_ONLY: Export logs only for connection failures. - // - TRANSLATIONS_ONLY: Export logs only for successful - // connections. - // - ALL: Export logs for all connections, successful and - // unsuccessful. - // - // Possible values: - // "ALL" - Export logs for all (successful and unsuccessful) connections. - // "ERRORS_ONLY" - Export logs for connection failures only. - // "TRANSLATIONS_ONLY" - Export logs for successful connections only. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterNatRule struct { - // Action: The action to be enforced for traffic that matches this rule. - Action *RouterNatRuleAction `json:"action,omitempty"` - // Description: An optional description of this rule. - Description string `json:"description,omitempty"` - // Match: CEL expression that specifies the match condition that egress - // traffic - // from a VM is evaluated against. If it evaluates to true, the - // corresponding `action` is enforced. - // - // The following examples are valid match expressions for public - // NAT: - // - // `inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, - // '2.2.0.0/16')` - // - // `destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'` - // - // The following example is a valid match expression for private - // NAT: - // - // `nexthop.hub - // == - // '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hu - // bs/hub-1'` - Match string `json:"match,omitempty"` - // RuleNumber: An integer uniquely identifying a rule in the list. The rule - // number - // must be a positive value between 0 and 65000, and - // must be unique among rules within a NAT. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatRule) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterNatRuleAction struct { - // SourceNatActiveIps: A list of URLs of the IP resources used for this NAT - // rule. These IP - // addresses must be valid static external IP addresses assigned to - // the - // project. - // This field is used for public NAT. - SourceNatActiveIps []string `json:"sourceNatActiveIps,omitempty"` - // SourceNatActiveRanges: A list of URLs of the subnetworks used as source - // ranges for this - // NAT Rule. These subnetworks must have purpose set to PRIVATE_NAT. - // This field is used for private NAT. - SourceNatActiveRanges []string `json:"sourceNatActiveRanges,omitempty"` - // SourceNatDrainIps: A list of URLs of the IP resources to be drained. These - // IPs - // must be valid static external IPs that have been assigned to the NAT. - // These IPs should be used for updating/patching a NAT rule only. - // This field is used for public NAT. - SourceNatDrainIps []string `json:"sourceNatDrainIps,omitempty"` - // SourceNatDrainRanges: A list of URLs of subnetworks representing source - // ranges to be - // drained. This is only supported on patch/update, and these - // subnetworks must have previously been used as active ranges in this - // NAT Rule. - // This field is used for private NAT. - SourceNatDrainRanges []string `json:"sourceNatDrainRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceNatActiveIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceNatActiveIps") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatRuleAction) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRuleAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT for a -// subnetwork. -type RouterNatSubnetworkToNat struct { - // Name: URL for the subnetwork resource that will use NAT. - Name string `json:"name,omitempty"` - // SecondaryIpRangeNames: A list of the secondary ranges of the Subnetwork that - // are allowed to - // use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" - // is one of the values in source_ip_ranges_to_nat. - SecondaryIpRangeNames []string `json:"secondaryIpRangeNames,omitempty"` - // SourceIpRangesToNat: Specify the options for NAT ranges in the Subnetwork. - // All - // options of a single value are valid - // except - // NAT_IP_RANGE_OPTION_UNSPECIFIED. - // The only valid option with multiple values is: - // ["PRIMARY_IP_RANGE", - // "LIST_OF_SECONDARY_IP_RANGES"] - // Default: [ALL_IP_RANGES] - // - // Possible values: - // "ALL_IP_RANGES" - The primary and all the secondary ranges are allowed to - // Nat. - // "LIST_OF_SECONDARY_IP_RANGES" - A list of secondary ranges are allowed to - // Nat. - // "PRIMARY_IP_RANGE" - The primary range is allowed to Nat. - SourceIpRangesToNat []string `json:"sourceIpRangesToNat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat64: Specifies a subnetwork to enable NAT64. -type RouterNatSubnetworkToNat64 struct { - // Name: URL for the subnetwork resource that will use NAT64. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatSubnetworkToNat64) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat64 - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterParams: Additional router parameters. -type RouterParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterParams) MarshalJSON() ([]byte, error) { - type NoMethod RouterParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatus struct { - // BestRoutes: A list of the best dynamic routes for this Cloud Router's - // Virtual Private - // Cloud (VPC) network in the same region as this Cloud Router. - // - // Lists all of the best routes per prefix that are programmed into - // this - // region's VPC data plane. - // - // When global dynamic routing mode is turned on in the VPC network, this - // list - // can include cross-region dynamic routes from Cloud Routers in other - // regions. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - // BestRoutesForRouter: A list of the best BGP routes learned by this Cloud - // Router. - // - // It is possible that routes listed might not be programmed into the - // data - // plane, if the Google Cloud control plane finds a more optimal route for - // a - // prefix than a route learned by this Cloud Router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` - // NccGateway: URI of the ncc_gateway to which this router associated. - NccGateway string `json:"nccGateway,omitempty"` - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "BestRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BestRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` - // EnableIpv4: Enable IPv4 traffic over BGP Peer. - // It is enabled by default if the peerIpAddress is version 4. - EnableIpv4 bool `json:"enableIpv4,omitempty"` - // EnableIpv6: Enable IPv6 traffic over BGP Peer. - // It is enabled by default if the peerIpAddress is version 6. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv4NexthopAddress: IPv4 address of the local BGP interface. - Ipv4NexthopAddress string `json:"ipv4NexthopAddress,omitempty"` - // Ipv6NexthopAddress: IPv6 address of the local BGP interface. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - // LinkedCustomHardware: The URI of the linked custom hardware - // resource, - // CustomHardwareLinkAttachment. This CustomHardwareLinkAttachment resource - // is the one that will establish the BGP session from the Cloud Router. - LinkedCustomHardware string `json:"linkedCustomHardware,omitempty"` - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - // Md5AuthEnabled: Informs whether MD5 authentication is enabled on this BGP - // peer. - Md5AuthEnabled bool `json:"md5AuthEnabled,omitempty"` - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // PeerIpv4NexthopAddress: IPv4 address of the remote BGP interface. - PeerIpv4NexthopAddress string `json:"peerIpv4NexthopAddress,omitempty"` - // PeerIpv6NexthopAddress: IPv6 address of the remote BGP interface. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - // RouterApplianceInstance: [Output only] URI of the VM instance that is used - // as third-party router - // appliances such as Next Gen Firewalls, Virtual Routers, or - // Router - // Appliances. - // The VM instance is the peer side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - // State: The state of the BGP session. For a list of possible values for - // this - // field, seeBGP session states. - State string `json:"state,omitempty"` - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - // StatusReason: Indicates why particular status was returned. - // - // Possible values: - // "IPV4_PEER_ON_IPV6_ONLY_CONNECTION" - BGP peer disabled because it - // requires IPv4 but the underlying - // connection is IPv6-only. - // "IPV6_PEER_ON_IPV4_ONLY_CONNECTION" - BGP peer disabled because it - // requires IPv6 but the underlying - // connection is IPv4-only. - // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with - // configuration of MD5 authentication. - // This particular reason can only be returned when md5AuthEnabled is true - // and status is DOWN. - // "STATUS_REASON_UNSPECIFIED" - StatusReason string `json:"statusReason,omitempty"` - // Uptime: Time this session has been up. - // Format: - // 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - // UptimeSeconds: Time this session has been up, in seconds. - // Format: - // 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertisedRoutes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusBgpPeerStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterStatusNatStatus: Status of a NAT contained in this router. -type RouterStatusNatStatus struct { - // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: - // ["1.1.1.1", "129.2.16.89"] - AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` - // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that are in - // drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` - // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that are in - // drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` - // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will be - // greater than 0 only if - // user-specified IPs are NOT enough to allow all configured VMs to use - // NAT. - // This value is meaningful only when auto-allocation of NAT IPs is *not* - // used. - MinExtraNatIpsNeeded int64 `json:"minExtraNatIpsNeeded,omitempty"` - // Name: Unique name of this NAT. - Name string `json:"name,omitempty"` - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., Nics) that can - // use NAT. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // RuleStatus: Status of rules in this NAT. - RuleStatus []*RouterStatusNatStatusNatRuleStatus `json:"ruleStatus,omitempty"` - // UserAllocatedNatIpResources: A list of fully qualified URLs of reserved IP - // address resources. - UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` - // UserAllocatedNatIps: A list of IPs user-allocated for NAT. - // They will be raw IP strings like "179.12.26.133". - UserAllocatedNatIps []string `json:"userAllocatedNatIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoAllocatedNatIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoAllocatedNatIps") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusNatStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterStatusNatStatusNatRuleStatus: Status of a NAT Rule contained in this -// NAT. -type RouterStatusNatStatusNatRuleStatus struct { - // ActiveNatIps: A list of active IPs for NAT. - // Example: ["1.1.1.1", "179.12.26.133"]. - ActiveNatIps []string `json:"activeNatIps,omitempty"` - // DrainNatIps: A list of IPs for NAT that are in drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainNatIps []string `json:"drainNatIps,omitempty"` - // MinExtraIpsNeeded: The number of extra IPs to allocate. This will be greater - // than 0 only - // if the existing IPs in this NAT Rule are NOT enough to allow all - // configured VMs to use NAT. - MinExtraIpsNeeded int64 `json:"minExtraIpsNeeded,omitempty"` - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., NICs) that have - // NAT Mappings from this - // NAT Rule. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // RuleNumber: Rule number of the rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveNatIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveNatIps") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusNatStatusNatRuleStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatusNatRuleStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatusResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersGetNamedSetResponse struct { - // Etag: end_interface: MixerGetResponseWithEtagBuilder - Etag string `json:"etag,omitempty"` - Resource *NamedSet `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersGetNamedSetResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersGetNamedSetResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersGetRoutePolicyResponse struct { - // Etag: end_interface: MixerGetResponseWithEtagBuilder - Etag string `json:"etag,omitempty"` - Resource *RoutePolicy `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersGetRoutePolicyResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersGetRoutePolicyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListBgpRoutes struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#routersListBgpRoutes for - // lists of bgp routes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of bgp routes. - Result []*BgpRoute `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RoutersListBgpRoutesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutes) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersListBgpRoutesWarning: [Output Only] Informational warning message. -type RoutersListBgpRoutesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersListBgpRoutesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListBgpRoutesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListNamedSets struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#routersListNamedSets for - // lists of named sets. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of named sets. - Result []*NamedSet `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RoutersListNamedSetsWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListNamedSets) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListNamedSets - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersListNamedSetsWarning: [Output Only] Informational warning message. -type RoutersListNamedSetsWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersListNamedSetsWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListNamedSetsWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListNamedSetsWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListNamedSetsWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListNamedSetsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListNamedSetsWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListRoutePolicies struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#routersListRoutePolicies - // for lists of route policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of route policies. - Result []*RoutePolicy `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RoutersListRoutePoliciesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePolicies) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersListRoutePoliciesWarning: [Output Only] Informational warning -// message. -type RoutersListRoutePoliciesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersListRoutePoliciesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePoliciesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePoliciesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListRoutePoliciesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePoliciesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePoliciesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersPreviewResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: A list of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - // Warning: Informational warning which replaces the list of routers when - // the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Routers") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Routers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersScopedListWarning: Informational warning which replaces the list of -// routers when -// the list is empty. -type RoutersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SSLHealthCheck struct { - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: Instructs the health check prober to send this exact ASCII string, - // up to - // 1024 bytes in length, after establishing the TCP connection and - // SSL - // handshake. - Request string `json:"request,omitempty"` - // Response: Creates a content-based SSL health check. In addition to - // establishing a - // TCP connection and the TLS handshake, you can configure the health check - // to - // pass only when the backend sends this exact response ASCII string, up - // to - // 1024 bytes in length. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SSLHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod SSLHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SavedAttachedDisk: DEPRECATED: Please use compute#savedDisk instead. -// An instance-attached disk resource. -type SavedAttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // Boot: Indicates that this is a boot disk. The virtual machine will use the - // first - // partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - // DeviceName: Specifies the name of the disk attached to the source instance. - DeviceName string `json:"deviceName,omitempty"` - // DiskEncryptionKey: The encryption key for the disk. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // DiskSizeGb: The size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: [Output Only] URL of the disk type resource. For - // example:projects/project/zones/zone/diskTypes/pd-standard or - // pd-ssd - DiskType string `json:"diskType,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable only - // for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Index: Specifies zero-based index of the disk that is attached to the - // source - // instance. - Index int64 `json:"index,omitempty"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. - // - // Possible values: - // "NVDIMM" - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#attachedDisk for - // attached disks. - Kind string `json:"kind,omitempty"` - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - // Mode: The mode in which this disk is attached to the source instance, - // eitherREAD_WRITE or READ_ONLY. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple virtual - // machines can use - // a disk in read-only mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. Only - // one - // virtual machine at a time can be attached to a disk in read-write mode. - Mode string `json:"mode,omitempty"` - // Source: Specifies a URL of the disk attached to the source instance. - Source string `json:"source,omitempty"` - // StorageBytes: [Output Only] A size of the storage used by the disk's - // snapshot by this - // machine image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // Type: Specifies the type of the attached disk, either SCRATCH orPERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SavedAttachedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedAttachedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SavedDisk: An instance-attached disk resource. -type SavedDisk struct { - // Architecture: [Output Only] The architecture of the attached disk. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#savedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` - // SourceDisk: Specifies a URL of the disk attached to the source instance. - SourceDisk string `json:"sourceDisk,omitempty"` - // StorageBytes: [Output Only] Size of the individual disk snapshot used by - // this machine - // image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SavedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ScalingScheduleStatus struct { - // LastStartTime: [Output Only] The last time the scaling schedule became - // active. - // Note: this is a timestamp when a schedule actually became active, not - // when - // it was planned to do so. - // The timestamp is in RFC3339 - // text format. - LastStartTime string `json:"lastStartTime,omitempty"` - // NextStartTime: [Output Only] The next time the scaling schedule is to become - // active. - // Note: this is a timestamp when a schedule is planned to run, but the - // actual - // time might be slightly different. - // The timestamp is in RFC3339 - // text format. - NextStartTime string `json:"nextStartTime,omitempty"` - // State: [Output Only] The current state of a scaling schedule. - // - // Possible values: - // "ACTIVE" - The current autoscaling recommendation is influenced by this - // scaling - // schedule. - // "DISABLED" - This scaling schedule has been disabled by the user. - // "OBSOLETE" - This scaling schedule will never become active again. - // "READY" - The current autoscaling recommendation is not influenced by this - // scaling - // schedule. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastStartTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastStartTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ScalingScheduleStatus) MarshalJSON() ([]byte, error) { - type NoMethod ScalingScheduleStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be automatically - // restarted if it is - // terminated by Compute Engine (not terminated by a user). You can only - // set - // the automatic restart option for standard instances.Preemptible - // instances - // cannot be automatically restarted. - // - // By default, this is set to true so an instance is - // automatically restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - // AvailabilityDomain: Specifies the availability domain to place the instance - // in. The value - // must be a number between 1 and the number of availability domains - // specified in the spread placement policy attached to the instance. - AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` - // CurrentCpus: Current number of vCPUs available for VM. - // 0 or unset means default vCPUs of the current machine type. - CurrentCpus int64 `json:"currentCpus,omitempty"` - // CurrentMemoryMb: Current amount of memory (in MB) available for VM. - // 0 or unset means default amount of memory of the current machine type. - CurrentMemoryMb int64 `json:"currentMemoryMb,omitempty,string"` - GracefulShutdown *SchedulingGracefulShutdown `json:"gracefulShutdown,omitempty"` - // HostErrorTimeoutSeconds: Specify the time in seconds for host error - // detection, the value must be - // within the range of [90, 330] with the increment of 30, if unset, - // the - // default behavior of host error recovery will be used. - HostErrorTimeoutSeconds int64 `json:"hostErrorTimeoutSeconds,omitempty"` - // InstanceTerminationAction: Specifies the termination action for the - // instance. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` - // LatencyTolerant: Defines whether the instance is tolerant of higher cpu - // latency. This can - // only be set during instance creation, or when the instance is not - // currently - // running. It must not be set if thepreemptible option is - // also set. - LatencyTolerant bool `json:"latencyTolerant,omitempty"` - // LocalSsdRecoveryTimeout: Specifies the maximum amount of time a Local Ssd Vm - // should wait while - // recovery of the Local Ssd state is attempted. Its value should be in - // between 0 and 168 hours with hour granularity and the default value being - // 1 - // hour. - LocalSsdRecoveryTimeout *Duration `json:"localSsdRecoveryTimeout,omitempty"` - // LocationHint: An opaque location hint used to place the instance close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // MaintenanceFreezeDurationHours: Specifies the number of hours after VM - // instance creation where the VM won't - // be scheduled for maintenance. - MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted values - // are: `PERIODIC`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MaxRunDuration: Specifies the max run duration for the given instance. If - // specified, - // the instance termination action will be performed at the end of the - // run - // duration. - MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` - // MinNodeCpus: The minimum number of virtual CPUs this instance will consume - // when running - // on a sole-tenant node. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // NodeAffinities: A set of node affinity and anti-affinity configurations. - // Refer toConfiguring node - // affinity for more information. - // Overrides reservationAffinity. - NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` - // OnHostMaintenance: Defines the maintenance behavior for this instance. For - // standard instances, - // the default behavior is MIGRATE. Forpreemptible instances, - // the default and only possible behavior is TERMINATE. For more - // information, see - // Set - // VM host maintenance policy. - // - // Possible values: - // "MIGRATE" - *[Default]* Allows Compute Engine to automatically migrate - // instances - // out of the way of maintenance events. - // "TERMINATE" - Tells Compute Engine to terminate and (optionally) restart - // the instance - // away from the maintenance activity. If you would like your instance to - // be - // restarted, set the automaticRestart flag to true. Your - // instance may be restarted more than once, and it may be restarted - // outside - // the window of maintenance events. - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - OnInstanceStopAction *SchedulingOnInstanceStopAction `json:"onInstanceStopAction,omitempty"` - // Preemptible: Defines whether the instance is preemptible. This can only be - // set during - // instance creation or while the instance isstopped and - // therefore, in a `TERMINATED` state. SeeInstance Life - // Cycle for more information on the possible instance states. - Preemptible bool `json:"preemptible,omitempty"` - // PreemptionNoticeDuration: Specifies the Metadata Service preemption notice - // duration before the GCE ACPI G2 Soft - // Off signal is triggered for Spot - // VMs only. If not specified, there will be no wait before the G2 Soft - // Off signal is triggered. - PreemptionNoticeDuration *Duration `json:"preemptionNoticeDuration,omitempty"` - // ProvisioningModel: Specifies the provisioning model of the instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // ShutdownTimeout: DEPRECATED: please use skipGuestOsShutdown. - // Timeout between GCE ACPI G2 Soft - // Off and ACPI G3 Mechanical - // Off during shutdown operation of VM. - // - // For Standard VMs values between 0s and 120s are allowed. For Spot - // and - // Preemptible VMs supported values are between 0s and 30s. - // - // If no value is specified for shutdownDuration, default values are 90s - // for - // Standard VMs and 30s for Spot/Preemptible VMs. - ShutdownTimeout *Duration `json:"shutdownTimeout,omitempty"` - // SkipGuestOsShutdown: Default is false and there will be 120 seconds between - // GCE ACPI G2 Soft - // Off and ACPI G3 Mechanical - // Off for Standard VMs and 30 seconds for Spot VMs. - SkipGuestOsShutdown bool `json:"skipGuestOsShutdown,omitempty"` - // TerminationTime: Specifies the timestamp, when the instance will be - // terminated, inRFC3339 text format. If specified, the instance - // termination action will be performed at the termination time. - TerminationTime string `json:"terminationTime,omitempty"` - // WindowsLicenseOptimizationMode: Represents the Windows Server License - // Optimization Mode of the VM. If - // unspecified, the default mode is `OFF`. - // - // Possible values: - // "AUTO" - "Automatically maximize savings and minimize performance impact - // by - // matching license optimization mode to current CPU utilization. - // "BALANCED" - Significant license cost savings via moderate throttles (40% - // baseline, 10 - // minute maximum burst at full utilization). - // "COST_OPTIMIZED" - Maximum license cost savings via restrictive throttles - // (20% - // baseline, 3.75 minute maximum burst at full utilization). - // "MANAGED" - License optimization mode managed by Google, in exchange - // for - // guaranteed discounts. This mode cannot be set by users, only by - // Google internal tooling. - // "OFF" - No license cost savings with maximum CPU performance. - // "PERFORMANCE" - Moderate license cost savings via least restrictive - // throttles (60% - // baseline, 22.5 minute maximum burst at full utilization). - // "UNSPECIFIED" - Unspecified license optimization mode defaults to `OFF`. - WindowsLicenseOptimizationMode string `json:"windowsLicenseOptimizationMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutomaticRestart") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Scheduling) MarshalJSON() ([]byte, error) { - type NoMethod Scheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingGracefulShutdown: The configuration for gracefully shutting down -// the instance. -type SchedulingGracefulShutdown struct { - // Enabled: Opts-in for graceful shutdown. - Enabled bool `json:"enabled,omitempty"` - // MaxDuration: The time allotted for the instance to gracefully shut down. If - // the - // graceful shutdown isn't complete after this time, then the - // instance - // transitions to the STOPPING state. - MaxDuration *Duration `json:"maxDuration,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingGracefulShutdown) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingGracefulShutdown - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingNodeAffinity: Node Affinity: the configuration of desired nodes -// onto which this Instance -// -// could be scheduled. -type SchedulingNodeAffinity struct { - // Key: Corresponds to the label key of Node resource. - Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. Valid operators areIN for - // affinity and NOT_IN for anti-affinity. - // - // Possible values: - // "IN" - Requires Compute Engine to seek for matched nodes. - // "NOT_IN" - Requires Compute Engine to avoid certain nodes. - // "OPERATOR_UNSPECIFIED" - Operator string `json:"operator,omitempty"` - // Values: Corresponds to the label values of Node resource. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingNodeAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingOnInstanceStopAction: Defines the behaviour for instances with the -// instance_termination_actionSTOP. -type SchedulingOnInstanceStopAction struct { - // DiscardLocalSsd: If true, the contents of any attached Local SSD disks will - // be discarded - // else, the Local SSD data will be preserved when the instance is stopped - // at the end of the run duration/termination time. - DiscardLocalSsd bool `json:"discardLocalSsd,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiscardLocalSsd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiscardLocalSsd") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingOnInstanceStopAction) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingOnInstanceStopAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Screenshot: An instance's screenshot. -type Screenshot struct { - // Contents: [Output Only] The Base64-encoded screenshot data. - Contents string `json:"contents,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#screenshot - // for the screenshots. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Screenshot) MarshalJSON() ([]byte, error) { - type NoMethod Screenshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SdsConfig: [Deprecated] The configuration to access the SDS server. -// The configuration to access the SDS server. -type SdsConfig struct { - // GrpcServiceConfig: The configuration to access the SDS server over GRPC. - GrpcServiceConfig *GrpcServiceConfig `json:"grpcServiceConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcServiceConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SdsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SdsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SecurityPoliciesScopedList resources. - Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#securityPolicyAggregatedList for lists of Security - // Policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPoliciesAggregatedListWarning: [Output Only] Informational warning -// message. -type SecurityPoliciesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { - PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "PreconfiguredExpressionSets") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreconfiguredExpressionSets") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesScopedList struct { - // SecurityPolicies: A list of SecurityPolicies contained in this scope. - SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // security policies when the list is empty. - Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPoliciesScopedListWarning: Informational warning which replaces the -// list of -// security policies when the list is empty. -type SecurityPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesWafConfig struct { - WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "WafRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WafRules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesWafConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicy: Represents a Google Cloud Armor security policy -// resource. -// -// Only external backend services that use load balancers can -// reference a security policy. For more information, see -// Google Cloud Armor security policy overview. -type SecurityPolicy struct { - AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` - AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` - // Associations: A list of associations that belong to this policy. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - CloudArmorConfig *SecurityPolicyCloudArmorConfig `json:"cloudArmorConfig,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DisplayName: User-provided name of the organization security policy. The - // name should be - // unique in the organization in which the security policy is created. - // This - // should only be used when SecurityPolicyType is FIREWALL. - // The name must be 1-63 characters long, and comply - // with - // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be - // 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - DisplayName string `json:"displayName,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make get() request to the - // security policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#securityPolicyfor - // security policies - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // security policy, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // security policy. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Parent: [Output Only] The parent of the security policy. - Parent string `json:"parent,omitempty"` - RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` - // Region: [Output Only] URL of the region where the regional security - // policy - // resides. This field is not applicable to global security policies. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all security policy rule - // tuples. A security - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // Rules: A list of rules that belong to this policy. - // There must always be a default rule which is a rule with priority - // 2147483647 and match all condition (for the match condition this means - // match "*" for srcIpRanges and for the networkMatch condition every - // field - // must be either match "*" or not set). If no rules are provided when - // creating a security policy, a default rule with action "allow" will - // be - // added. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShortName: User-provided name of the organization security policy. The name - // should be - // unique in the organization in which the security policy is created. - // This - // should only be used when SecurityPolicyType is CLOUD_ARMOR. - // The name must be 1-63 characters long, and comply - // with - // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be - // 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - ShortName string `json:"shortName,omitempty"` - // Type: The type indicates the intended use of the security policy. - // - // - CLOUD_ARMOR: Cloud Armor backend security policies can - // be configured to filter incoming HTTP requests targeting backend - // services. - // They filter requests before they hit the origin servers. - // - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can - // be configured to filter incoming HTTP requests targeting backend - // services - // (including Cloud CDN-enabled) as well as backend buckets (Cloud - // Storage). - // They filter requests before the request is served from Google's cache. - // - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor - // internal service policies can be configured to filter HTTP requests - // targeting services managed by Traffic Director in a service mesh. They - // filter requests before the request is served from the application. - // - // - CLOUD_ARMOR_NETWORK: Cloud Armor network policies - // can be configured to filter packets targeting network load - // balancing - // resources such as backend services, target pools, target instances, - // and - // instances with external IPs. They filter requests before the request - // is - // served from the application. - // - // - // This field can be set only at resource creation time. - // - // Possible values: - // "CLOUD_ARMOR" - // "CLOUD_ARMOR_EDGE" - // "CLOUD_ARMOR_INTERNAL_SERVICE" - // "CLOUD_ARMOR_NETWORK" - // "FIREWALL" - Type string `json:"type,omitempty"` - // UserDefinedFields: Definitions of user-defined fields for - // CLOUD_ARMOR_NETWORK policies. A - // user-defined field consists of up to 4 bytes extracted from a fixed - // offset - // in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with - // an - // optional mask to select certain bits. Rules may then specify matching - // values for these fields. - // - // Example: - // - // userDefinedFields: - // - name: "ipv4_fragment_offset" - // base: IPV4 - // offset: 6 - // size: 2 - // mask: "0x1fff" - UserDefinedFields []*SecurityPolicyUserDefinedField `json:"userDefinedFields,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdaptiveProtectionConfig") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdaptiveProtectionConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfig: Configuration options for Cloud -// Armor Adaptive Protection (CAAP). -type SecurityPolicyAdaptiveProtectionConfig struct { - AutoDeployConfig *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig `json:"autoDeployConfig,omitempty"` - // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine - // Learning. - Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDeployConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDeployConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig: Configuration -// options for Adaptive Protection auto-deploy feature. -type SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig struct { - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - ExpirationSec int64 `json:"expirationSec,omitempty"` - ImpactedBaselineThreshold float64 `json:"impactedBaselineThreshold,omitempty"` - LoadThreshold float64 `json:"loadThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - ImpactedBaselineThreshold gensupport.JSONFloat64 `json:"impactedBaselineThreshold"` - LoadThreshold gensupport.JSONFloat64 `json:"loadThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.ImpactedBaselineThreshold = float64(s1.ImpactedBaselineThreshold) - s.LoadThreshold = float64(s1.LoadThreshold) - return nil -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: Configuration -// options for L7 DDoS detection. -// This field is only supported in Global Security Policies of -// type -// CLOUD_ARMOR. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { - // Enable: If set to true, enables CAAP for L7 DDoS detection. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - Enable bool `json:"enable,omitempty"` - // RuleVisibility: Rule visibility can be one of the following: - // STANDARD - opaque rules. (default) - // PREMIUM - transparent rules. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - // - // Possible values: - // "PREMIUM" - // "STANDARD" - RuleVisibility string `json:"ruleVisibility,omitempty"` - // ThresholdConfigs: Configuration options for layer7 adaptive protection for - // various - // customizable thresholds. - ThresholdConfigs []*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig `json:"thresholdConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig struct { - AutoDeployConfidenceThreshold float64 `json:"autoDeployConfidenceThreshold,omitempty"` - AutoDeployExpirationSec int64 `json:"autoDeployExpirationSec,omitempty"` - AutoDeployImpactedBaselineThreshold float64 `json:"autoDeployImpactedBaselineThreshold,omitempty"` - AutoDeployLoadThreshold float64 `json:"autoDeployLoadThreshold,omitempty"` - DetectionAbsoluteQps float64 `json:"detectionAbsoluteQps,omitempty"` - DetectionLoadThreshold float64 `json:"detectionLoadThreshold,omitempty"` - DetectionRelativeToBaselineQps float64 `json:"detectionRelativeToBaselineQps,omitempty"` - // Name: The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the security policy. - Name string `json:"name,omitempty"` - // TrafficGranularityConfigs: Configuration options for enabling Adaptive - // Protection to operate - // on specified granular traffic units. - TrafficGranularityConfigs []*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig `json:"trafficGranularityConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AutoDeployConfidenceThreshold") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDeployConfidenceThreshold") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig - var s1 struct { - AutoDeployConfidenceThreshold gensupport.JSONFloat64 `json:"autoDeployConfidenceThreshold"` - AutoDeployImpactedBaselineThreshold gensupport.JSONFloat64 `json:"autoDeployImpactedBaselineThreshold"` - AutoDeployLoadThreshold gensupport.JSONFloat64 `json:"autoDeployLoadThreshold"` - DetectionAbsoluteQps gensupport.JSONFloat64 `json:"detectionAbsoluteQps"` - DetectionLoadThreshold gensupport.JSONFloat64 `json:"detectionLoadThreshold"` - DetectionRelativeToBaselineQps gensupport.JSONFloat64 `json:"detectionRelativeToBaselineQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AutoDeployConfidenceThreshold = float64(s1.AutoDeployConfidenceThreshold) - s.AutoDeployImpactedBaselineThreshold = float64(s1.AutoDeployImpactedBaselineThreshold) - s.AutoDeployLoadThreshold = float64(s1.AutoDeployLoadThreshold) - s.DetectionAbsoluteQps = float64(s1.DetectionAbsoluteQps) - s.DetectionLoadThreshold = float64(s1.DetectionLoadThreshold) - s.DetectionRelativeToBaselineQps = float64(s1.DetectionRelativeToBaselineQps) - return nil -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigT -// rafficGranularityConfig: Configurations to specifc granular traffic units -// processed by -// Adaptive Protection. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig struct { - // EnableEachUniqueValue: If enabled, traffic matching each unique value for - // the specified - // type constitutes a separate traffic unit. - // It can only be set to true if `value` is empty. - EnableEachUniqueValue bool `json:"enableEachUniqueValue,omitempty"` - // Type: Type of this configuration. - // - // Possible values: - // "HTTP_HEADER_HOST" - // "HTTP_PATH" - // "UNSPECIFIED_TYPE" - Type string `json:"type,omitempty"` - // Value: Requests that match this value constitute a granular traffic unit. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableEachUniqueValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableEachUniqueValue") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdvancedOptionsConfig struct { - // JsonCustomConfig: Custom configuration to apply the JSON parsing. Only - // applicable when - // json_parsing is set to STANDARD. - JsonCustomConfig *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig `json:"jsonCustomConfig,omitempty"` - // Possible values: - // "DISABLED" - // "STANDARD" - // "STANDARD_WITH_GRAPHQL" - JsonParsing string `json:"jsonParsing,omitempty"` - // Possible values: - // "NORMAL" - // "VERBOSE" - LogLevel string `json:"logLevel,omitempty"` - // RequestBodyInspectionSize: The maximum request size chosen by the customer - // with Waf enabled. - // Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". - // Values are case insensitive. - RequestBodyInspectionSize string `json:"requestBodyInspectionSize,omitempty"` - // UserIpRequestHeaders: An optional list of case-insensitive request header - // names to use for - // resolving the callers client IP address. - UserIpRequestHeaders []string `json:"userIpRequestHeaders,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonCustomConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonCustomConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { - // ContentTypes: A list of custom Content-Type header values to apply the JSON - // parsing. - // - // As per RFC 1341, a Content-Type header value has the following - // format: - // - // Content-Type := type "/" subtype *[";" parameter] - // - // When configuring a custom Content-Type header value, only the - // type/subtype needs to be specified, and the parameters should be - // excluded. - ContentTypes []string `json:"contentTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfigJsonCustomConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAssociation struct { - // AttachmentId: The resource that the security policy is attached to. - AttachmentId string `json:"attachmentId,omitempty"` - // DisplayName: [Output Only] The display name of the security policy of the - // association. - DisplayName string `json:"displayName,omitempty"` - // ExcludedFolders: A list of folders to exclude from the security policy. - ExcludedFolders []string `json:"excludedFolders,omitempty"` - // ExcludedProjects: A list of projects to exclude from the security policy. - ExcludedProjects []string `json:"excludedProjects,omitempty"` - // Name: The name for an association. - Name string `json:"name,omitempty"` - // SecurityPolicyId: [Output Only] The security policy ID of the association. - SecurityPolicyId string `json:"securityPolicyId,omitempty"` - // ShortName: [Output Only] The short name of the security policy of the - // association. - ShortName string `json:"shortName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttachmentId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyCloudArmorConfig: Configuration options for Cloud Armor. -type SecurityPolicyCloudArmorConfig struct { - // EnableMl: If set to true, enables Cloud Armor Machine Learning. - EnableMl bool `json:"enableMl,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableMl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableMl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyCloudArmorConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyCloudArmorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyDdosProtectionConfig struct { - // Possible values: - // "DISABLED" - // "ENABLED" - // "PREVIEW" - DdosAdaptiveProtection string `json:"ddosAdaptiveProtection,omitempty"` - // DdosImpactedBaselineThreshold: Adaptive Protection for Network Load - // Balancers (and VMs with public IPs) - // builds DDos mitigations that minimize collateral damage. It quantifies - // this as the fraction of a non-abuse baseline that's - // inadvertently - // blocked. - // - // Rules whose collateral damage exceeds - // ddosAdaptiveImpactedBaselineThreshold will not be deployed. Using a - // lower - // value will prioritize keeping collateral damage low, possibly at the cost - // of its effectiveness in rate limiting some or all of the attack. - // It should typically be between 0.01 and 0.10. - DdosImpactedBaselineThreshold float64 `json:"ddosImpactedBaselineThreshold,omitempty"` - // Possible values: - // "ADVANCED" - // "ADVANCED_PREVIEW" - // "STANDARD" - DdosProtection string `json:"ddosProtection,omitempty"` - // ForceSendFields is a list of field names (e.g. "DdosAdaptiveProtection") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DdosAdaptiveProtection") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyDdosProtectionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SecurityPolicyDdosProtectionConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyDdosProtectionConfig - var s1 struct { - DdosImpactedBaselineThreshold gensupport.JSONFloat64 `json:"ddosImpactedBaselineThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DdosImpactedBaselineThreshold = float64(s1.DdosImpactedBaselineThreshold) - return nil -} - -type SecurityPolicyList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SecurityPolicy resources. - Items []*SecurityPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#securityPolicyList for - // listsof securityPolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SecurityPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyListWarning: [Output Only] Informational warning message. -type SecurityPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRecaptchaOptionsConfig struct { - // RedirectSiteKey: An optional field to supply a reCAPTCHA site key to be used - // for all the - // rules using the redirect action with the type of GOOGLE_RECAPTCHA under - // the security policy. The specified site key needs to be created from - // the - // reCAPTCHA API. The user is responsible for the validity of the - // specified - // site key. If not specified, a Google-managed site key is used. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - RedirectSiteKey string `json:"redirectSiteKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "RedirectSiteKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RedirectSiteKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRecaptchaOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRecaptchaOptionsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyReference struct { - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRule: Represents a rule that describes one or more match -// conditions along with -// the action to be taken when traffic matches this condition (allow or deny). -type SecurityPolicyRule struct { - // Action: The Action to perform when the rule is matched. - // The following are the valid actions: - // - // - allow: allow access to target. - // - deny(STATUS): deny access to target, returns the - // HTTP response code specified. Valid values for `STATUS` - // are 403, 404, and 502. - // - rate_based_ban: limit client traffic to the configured - // threshold and ban the client if the traffic exceeds the threshold. - // Configure parameters for this action in RateLimitOptions. Requires - // rate_limit_options to be set. - // - redirect: redirect to a different target. This can - // either be an internal reCAPTCHA redirect, or an external URL-based - // redirect via a 302 response. Parameters for this action can be - // configured - // via redirectOptions. This action is only supported in Global Security - // Policies of type CLOUD_ARMOR. - // - throttle: limit - // client traffic to the configured threshold. Configure parameters for - // this - // action in rateLimitOptions. Requires rate_limit_options to be set for - // this. - // - fairshare (preview only): when traffic reaches the - // threshold limit, requests from the clients matching this rule begin to - // be - // rate-limited using the Fair Share algorithm. This action is only allowed - // in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. - Action string `json:"action,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Direction: The direction in which this rule applies. This field may only - // be - // specified when versioned_expr is set to FIREWALL. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - // EnableLogging: Denotes whether to enable logging for a particular rule. If - // logging is - // enabled, logs will be exported to the configured export destination - // in - // Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you - // cannot enable logging on "goto_next" rules. - // - // This field may only be specified when the versioned_expr is set to - // FIREWALL. - EnableLogging bool `json:"enableLogging,omitempty"` - // HeaderAction: Optional, additional actions that are performed on - // headers. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - HeaderAction *SecurityPolicyRuleHttpHeaderAction `json:"headerAction,omitempty"` - // Kind: [Output only] Type of the resource. Alwayscompute#securityPolicyRule - // for security policy rules - Kind string `json:"kind,omitempty"` - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` - // NetworkMatch: A match condition that incoming packets are evaluated against - // for - // CLOUD_ARMOR_NETWORK security policies. If it matches, the - // corresponding - // 'action' is enforced. - // - // The match criteria for a rule consists of built-in match fields - // (like - // 'srcIpRanges') and potentially multiple user-defined match - // fields - // ('userDefinedFields'). - // - // Field values may be extracted directly from the packet or derived from - // it - // (e.g. 'srcRegionCodes'). Some fields may not be present in every - // packet - // (e.g. 'srcPorts'). A user-defined field is only present if the base - // header is found in the packet and the entire field is in bounds. - // - // Each match field may specify which values can match it, listing one or - // more ranges, prefixes, or exact values that are considered a match for - // the field. A field value must be present in order to match a specified - // match field. If no match values are specified for a match field, then - // any - // field value is considered to match it, and it's not required to be - // present. For strings specifying '*' is also equivalent to match all. - // - // For a packet to match a rule, all specified match fields must match - // the - // corresponding field values derived from the - // packet. - // - // Example: - // - // networkMatch: - // srcIpRanges: - // - "192.0.2.0/24" - // - "198.51.100.0/24" - // userDefinedFields: - // - name: "ipv4_fragment_offset" - // values: - // - "1-0x1fff" - // - // The above match condition matches packets with a source IP in - // 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field - // named - // "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. - NetworkMatch *SecurityPolicyRuleNetworkMatcher `json:"networkMatch,omitempty"` - // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied for - // the rule. If the rule - // does not evaluate preconfigured WAF rules, i.e., - // if - // evaluatePreconfiguredWaf() is not used, this field will have no effect. - PreconfiguredWafConfig *SecurityPolicyRulePreconfiguredWafConfig `json:"preconfiguredWafConfig,omitempty"` - // Preview: If set to true, the specified action is not enforced. - Preview bool `json:"preview,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 0 and 2147483647. - // Rules are evaluated from highest to lowest priority where 0 is the - // highest priority and 2147483647 is the lowest priority. - Priority int64 `json:"priority,omitempty"` - // RateLimitOptions: Must be specified if the action is "rate_based_ban" or - // "throttle" or - // "fairshare". Cannot be specified for any other actions. - RateLimitOptions *SecurityPolicyRuleRateLimitOptions `json:"rateLimitOptions,omitempty"` - // RedirectOptions: Parameters defining the redirect action. Cannot be - // specified for any - // other actions. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - RedirectOptions *SecurityPolicyRuleRedirectOptions `json:"redirectOptions,omitempty"` - // RedirectTarget: This must be specified for redirect actions. Cannot be - // specified for any - // other actions. - RedirectTarget string `json:"redirectTarget,omitempty"` - // RuleManagedProtectionTier: [Output Only] The minimum Cloud Armor - // subscription required for this - // rule. - // [Deprecated] Use requiredManagedProtectionTiers instead. - // - // Possible values: - // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. - // "CAMP_PLUS_PAYGO" - Plus tier protection monthly. - // "CA_STANDARD" - Standard protection. - RuleManagedProtectionTier string `json:"ruleManagedProtectionTier,omitempty"` - // RuleNumber: Identifier for the rule. This is only unique within the given - // security - // policy. This can only be set during rule creation, if rule number is - // not - // specified it will be generated by the server. - RuleNumber int64 `json:"ruleNumber,omitempty,string"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // firewall security - // policy rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // TargetResources: A list of network resource URLs to which this rule applies. - // This field - // allows you to control which network's VMs get this rule. If this field - // is left blank, all VMs within the organization will receive the rule. - // - // This field may only be specified when versioned_expr is set to FIREWALL. - TargetResources []string `json:"targetResources,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleHttpHeaderAction struct { - // RequestHeadersToAdds: The list of request headers to add or overwrite if - // they're already - // present. - RequestHeadersToAdds []*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption `json:"requestHeadersToAdds,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdds") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeadersToAdds") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleHttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { - // HeaderName: The name of the header to set. - HeaderName string `json:"headerName,omitempty"` - // HeaderValue: The value to set the named header to. - HeaderValue string `json:"headerValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderActionHttpHeaderOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. -// Exactly one field must be specified. -type SecurityPolicyRuleMatcher struct { - // Config: The configuration options available when specifying - // versioned_expr. - // This field must be specified if versioned_expr is specified and cannot - // be specified if versioned_expr is not specified. - Config *SecurityPolicyRuleMatcherConfig `json:"config,omitempty"` - // Expr: User defined CEVAL expression. - // A CEVAL expression is used to specify match criteria such as - // origin.ip, - // source.region_code and contents in the request header. - // Expressions containing `evaluateThreatIntelligence` require a Cloud - // Armor Enterprise subscription and are not supported in Edge Policies - // nor in Regional Policies. Expressions - // containing - // `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud - // Armor - // Enterprise subscription and are only supported in Global Security - // Policies. - Expr *Expr `json:"expr,omitempty"` - // ExprOptions: The configuration options available when specifying a user - // defined - // CEVAL expression (i.e., 'expr'). - ExprOptions *SecurityPolicyRuleMatcherExprOptions `json:"exprOptions,omitempty"` - // VersionedExpr: Preconfigured versioned expression. - // If this field is specified, config must also be specified. - // Available preconfigured expressions along with their requirements - // are: - // SRC_IPS_V1 - must specify the corresponding src_ip_range field in - // config. - // - // Possible values: - // "FIREWALL" - // "SRC_IPS_V1" - Matches the source IP address of a request to the IP ranges - // supplied - // in config. - VersionedExpr string `json:"versionedExpr,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherConfig struct { - // DestIpRanges: CIDR IP address range. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // DestPorts: Pairs of IP protocols and ports that the rule should match. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - DestPorts []*SecurityPolicyRuleMatcherConfigDestinationPort `json:"destPorts,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should - // match. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - Layer4Configs []*SecurityPolicyRuleMatcherConfigLayer4Config `json:"layer4Configs,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of src_ip_ranges allowed is 10. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherConfigDestinationPort struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp,udp, icmp, esp,ah, - // ipip, sctp), or the IP - // protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP or TCP protocol. Each entry must be either - // an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherConfigDestinationPort) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfigDestinationPort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherConfigLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp,udp, icmp, esp,ah, - // ipip, sctp), or the IP - // protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP or TCP protocol. Each entry must be either - // an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfigLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherExprOptions struct { - // RecaptchaOptions: reCAPTCHA configuration options to be applied for the - // rule. If the - // rule does not evaluate reCAPTCHA tokens, this field has no effect. - RecaptchaOptions *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions `json:"recaptchaOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "RecaptchaOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RecaptchaOptions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherExprOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherExprOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions struct { - // ActionTokenSiteKeys: A list of site keys to be used during the validation of - // reCAPTCHA - // action-tokens. The provided site keys need to be created from - // reCAPTCHA API under the same project where the security policy is - // created. - ActionTokenSiteKeys []string `json:"actionTokenSiteKeys,omitempty"` - // SessionTokenSiteKeys: A list of site keys to be used during the validation - // of reCAPTCHA - // session-tokens. The provided site keys need to be created from - // reCAPTCHA API under the same project where the security policy is - // created. - SessionTokenSiteKeys []string `json:"sessionTokenSiteKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionTokenSiteKeys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionTokenSiteKeys") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleNetworkMatcher: Represents a match condition that incoming -// network traffic is evaluated -// against. -type SecurityPolicyRuleNetworkMatcher struct { - // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in standard - // text - // format. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // DestPorts: Destination port numbers for TCP/UDP/SCTP. Each element can be a - // 16-bit - // unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). - DestPorts []string `json:"destPorts,omitempty"` - // IpProtocols: IPv4 protocol / IPv6 next header (after extension headers). - // Each - // element can be an 8-bit unsigned decimal number (e.g. "6"), range - // (e.g. - // "253-254"), or one of the following protocol names: "tcp", "udp", - // "icmp", "esp", "ah", "ipip", or "sctp". - IpProtocols []string `json:"ipProtocols,omitempty"` - // SrcAsns: BGP Autonomous System Number associated with the source IP address. - SrcAsns []int64 `json:"srcAsns,omitempty"` - // SrcIpRanges: Source IPv4/IPv6 addresses or CIDR prefixes, in standard text - // format. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // SrcPorts: Source port numbers for TCP/UDP/SCTP. Each element can be a - // 16-bit - // unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). - SrcPorts []string `json:"srcPorts,omitempty"` - // SrcRegionCodes: Two-letter ISO 3166-1 alpha-2 country code associated with - // the source - // IP address. - SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` - // UserDefinedFields: User-defined fields. Each element names a defined field - // and lists the - // matching values for that field. - UserDefinedFields []*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch `json:"userDefinedFields,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleNetworkMatcher) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleNetworkMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { - // Name: Name of the user-defined field, as given in the definition. - Name string `json:"name,omitempty"` - // Values: Matching values of the field. Each element can be a 32-bit - // unsigned - // decimal or hexadecimal (starting with "0x") number (e.g. "64") or - // range (e.g. "0x400-0x7ff"). - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfig struct { - // Exclusions: A list of exclusions to apply during preconfigured WAF - // evaluation. - Exclusions []*SecurityPolicyRulePreconfiguredWafConfigExclusion `json:"exclusions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Exclusions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Exclusions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfigExclusion struct { - // RequestCookiesToExclude: A list of request cookie names whose value will be - // excluded from - // inspection during preconfigured WAF evaluation. - RequestCookiesToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestCookiesToExclude,omitempty"` - // RequestHeadersToExclude: A list of request header names whose value will be - // excluded from - // inspection during preconfigured WAF evaluation. - RequestHeadersToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestHeadersToExclude,omitempty"` - // RequestQueryParamsToExclude: A list of request query parameter names whose - // value will be excluded - // from inspection during preconfigured WAF evaluation. Note that the - // parameter can be in the query string or in the POST body. - RequestQueryParamsToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestQueryParamsToExclude,omitempty"` - // RequestUrisToExclude: A list of request URIs from the request line to be - // excluded from - // inspection during preconfigured WAF evaluation. When specifying this - // field, the query or fragment part should be excluded. - RequestUrisToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestUrisToExclude,omitempty"` - // TargetRuleIds: A list of target rule IDs under the WAF rule set to apply - // the - // preconfigured WAF exclusion. If omitted, it refers to all the rule - // IDs under the WAF rule set. - TargetRuleIds []string `json:"targetRuleIds,omitempty"` - // TargetRuleSet: Target WAF rule set to apply the preconfigured WAF exclusion. - TargetRuleSet string `json:"targetRuleSet,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestCookiesToExclude") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestCookiesToExclude") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfigExclusion) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams struct { - // Op: The match operator for the field. - // - // Possible values: - // "CONTAINS" - The operator matches if the field value contains the - // specified - // value. - // "ENDS_WITH" - The operator matches if the field value ends with the - // specified - // value. - // "EQUALS" - The operator matches if the field value equals the - // specified - // value. - // "EQUALS_ANY" - The operator matches if the field value is any value. - // "STARTS_WITH" - The operator matches if the field value starts with the - // specified - // value. - Op string `json:"op,omitempty"` - // Val: The value of the field. - Val string `json:"val,omitempty"` - // ForceSendFields is a list of field names (e.g. "Op") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Op") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptions struct { - // BanDurationSec: Can only be specified if the action for the rule - // is - // "rate_based_ban". If specified, determines the time (in seconds) - // the traffic will continue to be banned by the rate limit after the - // rate falls below the threshold. - BanDurationSec int64 `json:"banDurationSec,omitempty"` - // BanThreshold: Can only be specified if the action for the rule - // is - // "rate_based_ban". If specified, the key will be banned for the - // configured 'ban_duration_sec' when the number of requests that exceed - // the 'rate_limit_threshold' also exceed this 'ban_threshold'. - BanThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"banThreshold,omitempty"` - // ConformAction: Action to take for requests that are under the configured - // rate limit - // threshold. Valid option is "allow" only. - ConformAction string `json:"conformAction,omitempty"` - // EnforceOnKey: Determines the key to enforce the rate_limit_threshold on. - // Possible - // values are: - // - // - ALL: A single rate limit threshold is applied to all - // the requests matching this rule. This is the default value if - // "enforceOnKey" is not configured. - // - IP: The source IP address of - // the request is the key. Each IP has this limit enforced - // separately. - // - HTTP_HEADER: The value of the HTTP - // header whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the header value. If no - // such header is present in the request, the key type defaults toALL. - // - XFF_IP: The first IP address (i.e. the - // originating client IP address) specified in the list of IPs under - // X-Forwarded-For HTTP header. If no such header is present or the value - // is not a valid IP, the key defaults to the source IP address of - // the request i.e. key type IP. - // - HTTP_COOKIE: The value of the HTTP - // cookie whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the cookie value. If no - // such cookie is present in the request, the key type defaults toALL. - // - HTTP_PATH: The URL path of the HTTP request. The key - // value is truncated to the first 128 bytes. - // - SNI: Server name indication in the TLS session of the - // HTTPS request. The key value is truncated to the first 128 bytes. The - // key type defaults to ALL on a HTTP session. - // - REGION_CODE: The country/region from which the request - // originates. - // - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - USER_IP: The IP address of the originating client, - // which is resolved based on "userIpRequestHeaders" configured with the - // security policy. If there is no "userIpRequestHeaders" configuration or - // an IP address cannot be resolved from it, the key type defaults toIP. - // - // - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // For "fairshare" action, this value is limited to ALL i.e. a single - // rate - // limit threshold is enforced for all the requests matching the rule. - // - // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "TLS_JA3_FINGERPRINT" - // "TLS_JA4_FINGERPRINT" - // "USER_IP" - // "XFF_IP" - EnforceOnKey string `json:"enforceOnKey,omitempty"` - // EnforceOnKeyConfigs: If specified, any combination of values - // of - // enforce_on_key_type/enforce_on_key_name is treated as the key on - // which - // ratelimit threshold/action is enforced. You can specify up to - // 3 - // enforce_on_key_configs. If enforce_on_key_configs is - // specified, - // enforce_on_key must not be specified. - EnforceOnKeyConfigs []*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig `json:"enforceOnKeyConfigs,omitempty"` - // EnforceOnKeyName: Rate limit key name applicable only for the following key - // types: - // HTTP_HEADER -- Name of the HTTP header whose value is taken as the - // key - // value. - // HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the - // key - // value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - // ExceedAction: Action to take for requests that are above the configured rate - // limit - // threshold, to either deny with a specified HTTP response code, or - // redirect to a different endpoint. - // Valid options are `deny(STATUS)`, where valid values for - // `STATUS` are 403, 404, 429, and 502, and - // `redirect`, where the redirect parameters come from - // `exceedRedirectOptions` below. - // The `redirect` action is only supported in Global Security Policies of - // type CLOUD_ARMOR. - ExceedAction string `json:"exceedAction,omitempty"` - // ExceedActionRpcStatus: Specified gRPC response status for proxyless gRPC - // requests that are - // above the configured rate limit threshold - ExceedActionRpcStatus *SecurityPolicyRuleRateLimitOptionsRpcStatus `json:"exceedActionRpcStatus,omitempty"` - // ExceedRedirectOptions: Parameters defining the redirect action that is used - // as the exceed - // action. Cannot be specified if the exceed action is not redirect. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - ExceedRedirectOptions *SecurityPolicyRuleRedirectOptions `json:"exceedRedirectOptions,omitempty"` - // RateLimitThreshold: Threshold at which to begin ratelimiting. - RateLimitThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"rateLimitThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "BanDurationSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BanDurationSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { - // EnforceOnKeyName: Rate limit key name applicable only for the following key - // types: - // HTTP_HEADER -- Name of the HTTP header whose value is taken as the - // key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is - // taken as the key value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - // EnforceOnKeyType: Determines the key to enforce the rate_limit_threshold on. - // Possible - // values are: - // - // - ALL: A single rate limit threshold is applied to all - // the requests matching this rule. This is the default value if - // "enforceOnKeyConfigs" is not configured. - // - IP: The source IP address of - // the request is the key. Each IP has this limit enforced - // separately. - // - HTTP_HEADER: The value of the HTTP - // header whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the header value. If no - // such header is present in the request, the key type defaults toALL. - // - XFF_IP: The first IP address (i.e. the - // originating client IP address) specified in the list of IPs under - // X-Forwarded-For HTTP header. If no such header is present or the - // value is not a valid IP, the key defaults to the source IP address of - // the request i.e. key type IP. - // - HTTP_COOKIE: The value of the HTTP - // cookie whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the cookie value. If no - // such cookie is present in the request, the key type defaults toALL. - // - HTTP_PATH: The URL path of the HTTP request. The key - // value is truncated to the first 128 bytes. - // - SNI: Server name indication in the TLS session of - // the HTTPS request. The key value is truncated to the first 128 bytes. - // The key type defaults to ALL on a HTTP session. - // - REGION_CODE: The country/region from which the - // request originates. - // - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - USER_IP: The IP address of the originating client, - // which is resolved based on "userIpRequestHeaders" configured with the - // security policy. If there is no "userIpRequestHeaders" configuration - // or an IP address cannot be resolved from it, the key type defaults toIP. - // - // - // - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "TLS_JA3_FINGERPRINT" - // "TLS_JA4_FINGERPRINT" - // "USER_IP" - // "XFF_IP" - EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnforceOnKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnforceOnKeyName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleRateLimitOptionsRpcStatus: Simplified google.rpc.Status -// type (omitting details). -type SecurityPolicyRuleRateLimitOptionsRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - // Message: A developer-facing error message, which should be in English. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptionsRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsRpcStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsThreshold struct { - // Count: Number of HTTP(S) requests for calculating the threshold. - Count int64 `json:"count,omitempty"` - // IntervalSec: Interval over which the threshold is computed. - IntervalSec int64 `json:"intervalSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptionsThreshold) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsThreshold - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRedirectOptions struct { - // Target: Target for the redirect action. This is required if the type - // is - // EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. - Target string `json:"target,omitempty"` - // Type: Type of the redirect action. Possible values are: - // - // - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual - // challenge assessment. - // - EXTERNAL_302: redirect to a different URL via a 302 - // response. - // - // Possible values: - // "EXTERNAL_302" - // "GOOGLE_RECAPTCHA" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRedirectOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyUserDefinedField struct { - // Base: The base relative to which 'offset' is measured. Possible values are: - // - // - IPV4: Points to the beginning of the IPv4 header. - // - IPV6: Points to the beginning of the IPv6 header. - // - TCP: Points to the beginning of the TCP header, skipping - // over any IPv4 options or IPv6 extension headers. Not present for - // non-first fragments. - // - UDP: Points to the beginning of the UDP header, skipping - // over any IPv4 options or IPv6 extension headers. Not present for - // non-first fragments. - // - // - // required - // - // Possible values: - // "IPV4" - // "IPV6" - // "TCP" - // "UDP" - Base string `json:"base,omitempty"` - // Mask: If specified, apply this mask (bitwise AND) to the field to ignore - // bits - // before matching. Encoded as a hexadecimal number (starting with "0x"). - // The last byte of the field (in network byte order) corresponds to the - // least significant byte of the mask. - Mask string `json:"mask,omitempty"` - // Name: The name of this field. Must be unique within the policy. - Name string `json:"name,omitempty"` - // Offset: Offset of the first byte of the field (in network byte order) - // relative to - // 'base'. - Offset int64 `json:"offset,omitempty"` - // Size: Size of the field in bytes. Valid values: 1-4. - Size int64 `json:"size,omitempty"` - // ForceSendFields is a list of field names (e.g. "Base") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Base") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyUserDefinedField) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyUserDefinedField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecuritySettings: The authentication and authorization settings for a -// BackendService. -type SecuritySettings struct { - // Authentication: [Deprecated] Use clientTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` - // AuthenticationPolicy: [Deprecated] Authentication policy defines what - // authentication methods can - // be accepted on backends, and if authenticated, which method/certificate - // will set the request principal. - // request principal. - AuthenticationPolicy *AuthenticationPolicy `json:"authenticationPolicy,omitempty"` - // AuthorizationConfig: [Deprecated] Authorization config defines the Role - // Based Access Control - // (RBAC) config. - // Authorization config defines the Role Based Access Control (RBAC) config. - AuthorizationConfig *AuthorizationConfig `json:"authorizationConfig,omitempty"` - // AwsV4Authentication: The configuration needed to generate a signature for - // access to private - // storage buckets that support AWS's Signature Version 4 for - // authentication. - // Allowed only for INTERNET_IP_PORT and INTERNET_FQDN_PORT NEG backends. - AwsV4Authentication *AWSV4Signature `json:"awsV4Authentication,omitempty"` - // ClientTlsPolicy: Optional. A URL referring to a - // networksecurity.ClientTlsPolicy resource - // that describes how clients should authenticate with this - // service's - // backends. - // - // clientTlsPolicy only applies to a globalBackendService with the - // loadBalancingScheme set - // to INTERNAL_SELF_MANAGED. - // - // If left blank, communications are not encrypted. - ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` - // ClientTlsSettings: [Deprecated] TLS Settings for the backend service. - ClientTlsSettings *ClientTlsSettings `json:"clientTlsSettings,omitempty"` - // SubjectAltNames: Optional. A list of Subject Alternative Names (SANs) that - // the client - // verifies during a mutual TLS handshake with an server/endpoint for - // thisBackendService. When the server presents its X.509 certificate - // to the client, the client inspects the certificate'ssubjectAltName field. If - // the field contains one of the - // specified values, the communication continues. Otherwise, it fails. - // This - // additional check enables the client to verify that the server is - // authorized - // to run the requested service. - // - // Note that the contents of the server - // certificate's subjectAltName field are configured by the - // Public Key Infrastructure which provisions server identities. - // - // Only applies to a global BackendService withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // Only applies when BackendService has an attachedclientTlsPolicy with - // clientCertificate (mTLS - // mode). - SubjectAltNames []string `json:"subjectAltNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "Authentication") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authentication") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecuritySettings) MarshalJSON() ([]byte, error) { - type NoMethod SecuritySettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SerialPortOutput: An instance serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serialPortOutput for - // serial port output. - Kind string `json:"kind,omitempty"` - // Next: [Output Only] The position of the next byte of content, regardless - // of - // whether the content exists, following the output returned in the - // `contents` - // property. Use this value in the next request as the start - // parameter. - Next int64 `json:"next,omitempty,string"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. - // If the serial console output exceeds the size of the buffer (1 MB), - // older - // output is overwritten by newer content. The output start value will - // indicate the byte position of the output that was returned, which might - // be - // different than the `start` value that was specified in the request. - Start int64 `json:"start,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SerialPortOutput) MarshalJSON() ([]byte, error) { - type NoMethod SerialPortOutput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServerBinding struct { - // Possible values: - // "RESTART_NODE_ON_ANY_SERVER" - Node may associate with any physical server - // over its lifetime. - // "RESTART_NODE_ON_MINIMAL_SERVERS" - Node may associate with minimal - // physical servers over its lifetime. - // "SERVER_BINDING_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServerBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServerBinding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServerTlsSettings: The TLS settings for the server. -type ServerTlsSettings struct { - // ProxyTlsContext: Configures the mechanism to obtain security certificates - // and identity - // information. - ProxyTlsContext *TlsContext `json:"proxyTlsContext,omitempty"` - // SubjectAltNames: A list of alternate names to verify the subject identity in - // the certificate - // presented by the client. - SubjectAltNames []string `json:"subjectAltNames,omitempty"` - // TlsMode: Indicates whether connections should be secured using TLS. The - // value of - // this field determines how TLS is enforced. This field can be set to one - // of the following: - // - // - SIMPLE Secure connections with standard TLS semantics. - // - MUTUAL Secure connections to the backends using mutual - // TLS by presenting client certificates for authentication. - // - // Possible values: - // "INVALID" - // "MUTUAL" - Secure connections to the backends using mutual TLS by - // presenting client - // certificates for authentication. - // "SIMPLE" - Secure connections with standard TLS semantics. - TlsMode string `json:"tlsMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyTlsContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyTlsContext") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServerTlsSettings) MarshalJSON() ([]byte, error) { - type NoMethod ServerTlsSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // Scopes: The list of scopes to be made available for this service account. - Scopes []string `json:"scopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAccount) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachment: Represents a ServiceAttachment resource. -// -// A service attachment represents a service that a producer has exposed. -// It encapsulates the load balancer which fronts the service runs and -// a list of NAT IP ranges that the producers uses to represent -// the consumers connecting to the service. -type ServiceAttachment struct { - // ConnectedEndpoints: [Output Only] An array of connections for all the - // consumers connected to - // this service attachment. - ConnectedEndpoints []*ServiceAttachmentConnectedEndpoint `json:"connectedEndpoints,omitempty"` - // ConnectionPreference: The connection preference of service attachment. The - // value can be set - // to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC - // service attachment is one that always accepts the connection from - // consumer - // forwarding rules. - // - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "CONNECTION_PREFERENCE_UNSPECIFIED" - ConnectionPreference string `json:"connectionPreference,omitempty"` - // ConsumerAcceptLists: Specifies which consumer projects or networks are - // allowed to connect to the - // service attachment. Each project or network has a connection limit. A - // given - // service attachment can manage connections at either the project or - // network - // level. Therefore, both the accept and reject lists for a given - // service - // attachment must contain either only projects or only networks or - // only - // endpoints. - ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` - // ConsumerRejectLists: Specifies a list of projects or networks that are not - // allowed to connect to - // this service attachment. The project can be specified using its project - // ID - // or project number and the network can be specified using its URL. A - // given - // service attachment can manage connections at either the project or - // network - // level. Therefore, both the reject and accept lists for a given - // service - // attachment must contain either only projects or only networks. - ConsumerRejectLists []string `json:"consumerRejectLists,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DomainNames: If specified, the domain name will be used during the - // integration between - // the PSC connected endpoints and the Cloud DNS. For example, this is a - // valid - // domain name: "p.mycompany.com.". Current max number of domain - // names - // supported is 1. - DomainNames []string `json:"domainNames,omitempty"` - // EnableProxyProtocol: If true, enable the proxy protocol which is for - // supplying client TCP/IP - // address data in TCP connections that traverse proxies on their way - // to - // destination servers. - EnableProxyProtocol bool `json:"enableProxyProtocol,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a ServiceAttachment. An up-to-date fingerprint must - // be provided in order to patch/update the ServiceAttachment; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // ServiceAttachment. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serviceAttachment - // for service attachments. - Kind string `json:"kind,omitempty"` - // Metadata: Metadata of the service attachment. - Metadata map[string]string `json:"metadata,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NatSubnets: An array of URLs where each entry is the URL of a subnet - // provided - // by the service producer to use for NAT in this service attachment. - NatSubnets []string `json:"natSubnets,omitempty"` - // ProducerForwardingRule: The URL of a forwarding rule with - // loadBalancingScheme INTERNAL* that is - // serving the endpoint identified by this service attachment. - ProducerForwardingRule string `json:"producerForwardingRule,omitempty"` - // PropagatedConnectionLimit: The number of consumer spokes that connected - // Private Service Connect - // endpoints can be propagated to through Network Connectivity Center. - // This - // limit lets the service producer limit how many propagated Private - // Service - // Connect connections can be established to this service attachment from - // a - // single consumer. - // - // If the connection preference of the service attachment is ACCEPT_MANUAL, - // the limit applies to each project or network that is listed in the - // consumer - // accept list. If the connection preference of the service attachment - // is - // ACCEPT_AUTOMATIC, the limit applies to each project that contains - // a - // connected endpoint. - // - // If unspecified, the default propagated connection limit is 250. - PropagatedConnectionLimit int64 `json:"propagatedConnectionLimit,omitempty"` - // PscServiceAttachmentId: [Output Only] An 128-bit global unique ID of the PSC - // service attachment. - PscServiceAttachmentId *Uint128 `json:"pscServiceAttachmentId,omitempty"` - // ReconcileConnections: This flag determines whether a consumer accept/reject - // list change can - // reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. - // - // - // - If false, connection policy update will only affect existing PENDING - // PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain - // untouched - // regardless how the connection policy is modified . - // - If true, - // update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. - // For - // example, an ACCEPTED PSC endpoint will be moved to REJECTED if its - // project - // is added to the reject list. - // - // - // For newly created service attachment, this boolean defaults to false. - ReconcileConnections bool `json:"reconcileConnections,omitempty"` - // Region: [Output Only] URL of the region where the service attachment - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // TargetService: The URL of a service serving the endpoint identified by this - // service - // attachment. - TargetService string `json:"targetService,omitempty"` - // TunnelingConfig: When a tunneling config is set on this service attachment - // it will - // encapsulate traffic between consumer and producer. - // - // When tunneling is enabled: - // - // - // - nat_subnets must be unset - // - enable_proxy_protocol must be false - // - producer_forwarding_rule must be a L4 ILB. - // - - TunnelingConfig *ServiceAttachmentTunnelingConfig `json:"tunnelingConfig,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectedEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectedEndpoints") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachment) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentAggregatedList: Contains a list of -// ServiceAttachmentsScopedList. -type ServiceAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ServiceAttachmentsScopedList resources. - Items map[string]ServiceAttachmentsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentAggregatedListWarning: [Output Only] Informational warning -// message. -type ServiceAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentConnectedEndpoint: [Output Only] A connection connected to -// this service attachment. -type ServiceAttachmentConnectedEndpoint struct { - // ConsumerNetwork: The url of the consumer network. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // Endpoint: The url of a connected endpoint. - Endpoint string `json:"endpoint,omitempty"` - // EndpointWithId: The url of a connected endpoint with resource id. - EndpointWithId string `json:"endpointWithId,omitempty"` - // NatIps: NAT IPs of the connected PSC endpoint and those of other - // endpoints - // propagated from it. - NatIps []string `json:"natIps,omitempty"` - // PropagatedConnectionCount: The number of consumer Network Connectivity - // Center spokes that the - // connected Private Service Connect endpoint has propagated to. - PropagatedConnectionCount int64 `json:"propagatedConnectionCount,omitempty"` - // PscConnectionId: The PSC connection id of the connected endpoint. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // Status: The status of a connected endpoint to this service attachment. - // - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer - // needs to take further action before the forwarding rule can serve - // traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The consumer is still connected but not using the connection. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConnectedEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentConsumerProjectLimit struct { - // ConnectionLimit: The value of the limit to set. For endpoint_url, the limit - // should be no - // more than 1. - ConnectionLimit int64 `json:"connectionLimit,omitempty"` - // EndpointUrl: The URL for the PSC endpoint to accept - EndpointUrl string `json:"endpointUrl,omitempty"` - // NetworkUrl: The network URL for the network to set the limit for. - NetworkUrl string `json:"networkUrl,omitempty"` - // ProjectIdOrNum: The project id or number for the project to set the limit - // for. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectionLimit") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionLimit") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentConsumerProjectLimit) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConsumerProjectLimit - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ServiceAttachment resources. - Items []*ServiceAttachment `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serviceAttachment - // for service attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentListWarning: [Output Only] Informational warning message. -type ServiceAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentTunnelingConfig: Use to configure this PSC connection in -// tunneling mode. In tunneling mode -// traffic from consumer to producer will be encapsulated as it crosses the -// VPC boundary and traffic from producer to consumer will be decapsulated -// in -// the same manner. -type ServiceAttachmentTunnelingConfig struct { - // EncapsulationProfile: Specify the encapsulation protocol and what metadata - // to include in - // incoming encapsulated packet headers. - // - // Possible values: - // "GENEVE_SECURITY_V1" - Use GENEVE encapsulation protocol and include the - // SECURITY_V1 set of - // GENEVE headers. - // "UNSPECIFIED_ENCAPSULATION_PROFILE" - EncapsulationProfile string `json:"encapsulationProfile,omitempty"` - // RoutingMode: How this Service Attachment will treat traffic sent to the - // tunnel_ip, - // destined for the consumer network. - // - // Possible values: - // "PACKET_INJECTION" - Traffic sent to this service attachment will be - // reinjected into the - // consumer network. - // "STANDARD_ROUTING" - Response traffic, after de-encapsulation, will be - // returned to the - // client. - // "UNSPECIFIED_ROUTING_MODE" - RoutingMode string `json:"routingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "EncapsulationProfile") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncapsulationProfile") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentTunnelingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentTunnelingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentsScopedList struct { - // ServiceAttachments: A list of ServiceAttachments contained in this scope. - ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` - // Warning: Informational warning which replaces the list of - // service attachments when the list is empty. - Warning *ServiceAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceAttachments") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentsScopedListWarning: Informational warning which replaces -// the list of -// service attachments when the list is empty. -type ServiceAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceIntegrationSpec: Specifies the parameters to configure an integration -// with instances. -type ServiceIntegrationSpec struct { - BackupDr *ServiceIntegrationSpecBackupDRSpec `json:"backupDr,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupDr") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupDr") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceIntegrationSpec) MarshalJSON() ([]byte, error) { - type NoMethod ServiceIntegrationSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceIntegrationSpecBackupDRSpec: Specifies parameters to Backup and DR to -// attach a BackupPlan to a compute -// instance for managed VM backup. -type ServiceIntegrationSpecBackupDRSpec struct { - // Plan: The BackupPlan resource to attach to the instance. Specified as - // a - // resource reference in instances, and regional instance templates, and - // as - // just the plan name in global instance templates - Plan string `json:"plan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Plan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Plan") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceIntegrationSpecBackupDRSpec) MarshalJSON() ([]byte, error) { - type NoMethod ServiceIntegrationSpecBackupDRSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SetCommonInstanceMetadataOperationMetadata struct { - // ClientOperationId: [Output Only] The client operation id. - ClientOperationId string `json:"clientOperationId,omitempty"` - // PerLocationOperations: [Output Only] Status information per location - // (location name is key). - // Example key: zones/us-central1-a - PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientOperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientOperationId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod SetCommonInstanceMetadataOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { - // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field - // is - // populated. - Error *Status `json:"error,omitempty"` - // State: [Output Only] Status of the action, which can be one of the - // following: - // `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. - // - // Possible values: - // "ABANDONED" - Operation not tracked in this location e.g. zone is marked - // as DOWN. - // "DONE" - Operation has completed successfully. - // "FAILED" - Operation is in an error state. - // "PROPAGATED" - Operation is confirmed to be in the location. - // "PROPAGATING" - Operation is not yet confirmed to have been created in the - // location. - // "UNSPECIFIED" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { - type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShareSettings: The share setting for reservations and sole tenancy node -// groups. -type ShareSettings struct { - // FolderMap: A map of folder id and folder config to specify consumer projects - // for this - // shared-reservation. This is only valid when share_type's value - // is - // DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS. - // Folder id should be a string of number, and without "folders/" prefix. - FolderMap map[string]ShareSettingsFolderConfig `json:"folderMap,omitempty"` - // ProjectMap: A map of project id and project config. This is only valid - // when - // share_type's value is SPECIFIC_PROJECTS. - ProjectMap map[string]ShareSettingsProjectConfig `json:"projectMap,omitempty"` - // Projects: A List of Project names to specify consumer projects for - // this - // shared-reservation. This is only valid when share_type's value - // is - // SPECIFIC_PROJECTS. - Projects []string `json:"projects,omitempty"` - // ShareType: Type of sharing for this shared-reservation - // - // Possible values: - // "DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS" - Shared-reservation is open to - // direct child projects of specific folders. - // "LOCAL" - Default value. - // "ORGANIZATION" - Shared-reservation is open to entire Organization - // "SHARE_TYPE_UNSPECIFIED" - Default value. This value is unused. - // "SPECIFIC_PROJECTS" - Shared-reservation is open to specific projects - ShareType string `json:"shareType,omitempty"` - // ForceSendFields is a list of field names (e.g. "FolderMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FolderMap") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShareSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShareSettingsFolderConfig: Config for each folder in the share settings. -type ShareSettingsFolderConfig struct { - // FolderId: The folder ID, should be same as the key of this folder config in - // the - // parent map. - // Folder id should be a string of number, and without "folders/" prefix. - FolderId string `json:"folderId,omitempty"` - // ForceSendFields is a list of field names (e.g. "FolderId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FolderId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShareSettingsFolderConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettingsFolderConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShareSettingsProjectConfig: Config for each project in the share settings. -type ShareSettingsProjectConfig struct { - // ProjectId: The project ID, should be same as the key of this project config - // in the - // parent map. - ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShareSettingsProjectConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettingsProjectConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceConfig: A set of Shielded Instance options. -type ShieldedInstanceConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled.Enabled by - // default. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Defines whether the instance has Secure Boot - // enabled.Disabled by - // default. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // EnableVtpm: Defines whether the instance has the vTPM enabled.Enabled - // by - // default. - EnableVtpm bool `json:"enableVtpm,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIdentity: A Shielded Instance Identity. -type ShieldedInstanceIdentity struct { - // EccP256EncryptionKey: An Endorsement Key (EK) made by the ECC P256 - // algorithm - // issued to the Shielded Instance's vTPM. - EccP256EncryptionKey *ShieldedInstanceIdentityEntry `json:"eccP256EncryptionKey,omitempty"` - // EccP256SigningKey: An Attestation Key (AK) made by the ECC P256 - // algorithm - // issued to the Shielded Instance's vTPM. - EccP256SigningKey *ShieldedInstanceIdentityEntry `json:"eccP256SigningKey,omitempty"` - // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#shieldedInstanceIdentity for shielded Instance - // identity entry. - Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EccP256EncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EccP256EncryptionKey") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedInstanceIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` - // ForceSendFields is a list of field names (e.g. "EkCert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentityEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIntegrityPolicy: The policy describes the baseline against -// which -// Instance boot integrity is measured. -type ShieldedInstanceIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the - // measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIntegrityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmConfig: A set of Shielded VM options. -type ShieldedVmConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Defines whether the instance has Secure Boot enabled. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // EnableVtpm: Defines whether the instance has the vTPM enabled. - EnableVtpm bool `json:"enableVtpm,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentity: A Shielded VM Identity. -type ShieldedVmIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's vTPM. - EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#shieldedVmIdentity - // for shielded VM identity entry. - Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM. - SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncryptionKey") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedVmIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` - // ForceSendFields is a list of field names (e.g. "EkCert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentityEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIntegrityPolicy: The policy describes the baseline against -// which -// VM instance boot integrity is measured. -type ShieldedVmIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the - // measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIntegrityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignedUrlKey: Represents a customer-supplied Signing Key used by Cloud CDN -// Signed URLs -type SignedUrlKey struct { - // KeyName: Name of the key. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - KeyName string `json:"keyName,omitempty"` - // KeyValue: 128-bit key value used for signing the URL. The key value must be - // a validRFC - // 4648 Section 5 base64url encoded string. - KeyValue string `json:"keyValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "KeyName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignedUrlKey) MarshalJSON() ([]byte, error) { - type NoMethod SignedUrlKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Snapshot: Represents a Persistent Disk Snapshot resource. -// -// You can use snapshots to back up data on a regular interval. For -// more -// information, read Creating -// persistent disk snapshots. -type Snapshot struct { - // Architecture: [Output Only] The architecture of the snapshot. Valid values - // are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AutoCreated: [Output Only] Set to true if snapshots are automatically - // created by - // applying resource policy on the target disk. - AutoCreated bool `json:"autoCreated,omitempty"` - // ChainName: Creates the new snapshot in the snapshot chain labeled with - // the - // specified name. The chain name must be 1-63 characters long and comply - // with RFC1035. This is an uncommon option only for advanced service - // owners who needs to create separate snapshot chains, for example, - // for chargeback tracking. When you describe your snapshot resource, - // this - // field is visible only if it has a non-empty value. - ChainName string `json:"chainName,omitempty"` - // CreationSizeBytes: [Output Only] Size in bytes of the snapshot at creation - // time. - CreationSizeBytes int64 `json:"creationSizeBytes,omitempty,string"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DownloadBytes: [Output Only] Number of bytes downloaded to restore a - // snapshot to a disk. - DownloadBytes int64 `json:"downloadBytes,omitempty,string"` - // EnableConfidentialCompute: Whether this snapshot is created from a - // confidential compute mode disk. - // [Output Only]: This field is not set by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // GuestFlush: [Input Only] Whether to attempt an application consistent - // snapshot by - // informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - // GuestOsFeatures: [Output Only] A list of features to enable on the guest - // operating system. - // Applicable only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#snapshot - // for Snapshot resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this snapshot. These can be later modified by - // the setLabels method. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: [Output Only] Integer license codes indicating which licenses - // are attached - // to this snapshot. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: [Output Only] A list of public visible licenses that apply to - // this - // snapshot. This can be because the original image had licenses attached - // (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - // LocationHint: An opaque location hint used to place the snapshot close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // MaxRetentionDays: Number of days the snapshot should be retained before - // being deleted - // automatically. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *SnapshotParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the snapshot resides. Only - // applicable - // for regional snapshots. - Region string `json:"region,omitempty"` - // ResourceStatus: [Output only] ResourceStatus of the Snapshot resource - ResourceStatus *SnapshotResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SnapshotEncryptionKey: Encrypts the snapshot using - // acustomer-supplied - // encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the snapshot later. For example, you - // must - // provide the encryption key when you create a disk from the - // encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the snapshot. - // - // If you do not provide an encryption key when creating the snapshot, then - // the snapshot will be encrypted using an automatically generated key and - // you - // do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - // SnapshotGroupId: [Output Only] The unique ID of the snapshot group that this - // snapshot - // belongs to. - SnapshotGroupId string `json:"snapshotGroupId,omitempty"` - // SnapshotGroupName: [Output only] The snapshot group that this snapshot - // belongs to. - SnapshotGroupName string `json:"snapshotGroupName,omitempty"` - // SnapshotType: Indicates the type of the snapshot. - // - // Possible values: - // "ARCHIVE" - // "STANDARD" - SnapshotType string `json:"snapshotType,omitempty"` - // SourceDisk: The source disk used to create this snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskEncryptionKey: The customer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // SourceDiskForRecoveryCheckpoint: The source disk whose recovery checkpoint - // will be used to create this - // snapshot. - SourceDiskForRecoveryCheckpoint string `json:"sourceDiskForRecoveryCheckpoint,omitempty"` - // SourceDiskId: [Output Only] The ID value of the disk used to create this - // snapshot. This - // value may be used to determine whether the snapshot was taken from - // the - // current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceInstantSnapshot: The source instant snapshot used to create this - // snapshot. You can provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot - // - projects/project/zones/zone/instantSnapshots/instantSnapshot - // - zones/zone/instantSnapshots/instantSnapshot - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceInstantSnapshotEncryptionKey: Customer provided encryption key when - // creating Snapshot from Instant - // Snapshot. - SourceInstantSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceInstantSnapshotEncryptionKey,omitempty"` - // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot - // used to create this - // snapshot. This value identifies the exact instant snapshot that was used - // to - // create this snapshot. For example, if you created the snapshot from - // an - // instant snapshot that was later deleted and recreated under the same - // name, - // the source instant snapshot ID would identify the exact instant - // snapshot - // that was used. - SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` - // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource policy which - // created this - // scheduled snapshot. - SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` - // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource policy - // which created this - // scheduled snapshot. - SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` - // Status: [Output Only] The status of the snapshot. This can beCREATING, - // DELETING, FAILED,READY, or UPLOADING. - // - // Possible values: - // "CREATING" - Snapshot creation is in progress. - // "DELETING" - Snapshot is currently being deleted. - // "FAILED" - Snapshot creation failed. - // "READY" - Snapshot has been created successfully. - // "UPLOADING" - Snapshot is being uploaded. - Status string `json:"status,omitempty"` - // StorageBytes: [Output Only] A size of the storage used by the snapshot. As - // snapshots - // share storage, this number is expected to change with - // snapshot - // creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the snapshot - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // UserLicenses: [Output Only] A list of user provided licenses represented by - // a list of - // URLs to the license resource. - UserLicenses []string `json:"userLicenses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Snapshot) MarshalJSON() ([]byte, error) { - type NoMethod Snapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SnapshotsScopedList resources. - Items map[string]SnapshotsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#snapshotAggregatedList - // for aggregated lists of - // snapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SnapshotAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotAggregatedListWarning: [Output Only] Informational warning message. -type SnapshotAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotGroup: Represents a SnapshotGroup resource. -// -// A snapshot group is a set of snapshots that represents a point in time -// state -// of a consistency group. -type SnapshotGroup struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: Optional. An optional description of this resource. Provide - // this property when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#snapshotGroup for - // SnapshotGroup - // resources. - Kind string `json:"kind,omitempty"` - // Name: Identifier. Name of the resource; provided by the client when the - // resource is created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceInfo: [Output Only] - SourceInfo *SnapshotGroupSourceInfo `json:"sourceInfo,omitempty"` - // SourceInstantSnapshotGroup: Input field for the source instant snapshot - // group. - SourceInstantSnapshotGroup string `json:"sourceInstantSnapshotGroup,omitempty"` - // SourceInstantSnapshotGroupInfo: [Output Only] - SourceInstantSnapshotGroupInfo *SnapshotGroupSourceInstantSnapshotGroupInfo `json:"sourceInstantSnapshotGroupInfo,omitempty"` - // Status: [Output Only] - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "INVALID" - // "READY" - // "UNKNOWN" - // "UPLOADING" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotGroup) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotGroupParameters struct { - // ReplicaZones: URLs of the zones where disks should be replicated to. Only - // applicable - // for regional resources. - ReplicaZones []string `json:"replicaZones,omitempty"` - // SourceSnapshotGroup: The source snapshot group used to create disks. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshotGroups/snapshotGroup - // - // - projects/project/global/snapshotGroups/snapshotGroup - // - global/snapshotGroups/snapshotGroup - SourceSnapshotGroup string `json:"sourceSnapshotGroup,omitempty"` - // Type: URL of the disk type resource describing which disk type to use to - // create - // disks. Provide this when creating the disk. For - // example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent - // disk - // types. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReplicaZones") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReplicaZones") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotGroupParameters) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotGroupParameters - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotGroupSourceInfo struct { - ConsistencyGroup string `json:"consistencyGroup,omitempty"` - ConsistencyGroupId string `json:"consistencyGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsistencyGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsistencyGroup") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotGroupSourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotGroupSourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotGroupSourceInstantSnapshotGroupInfo struct { - InstantSnapshotGroup string `json:"instantSnapshotGroup,omitempty"` - InstantSnapshotGroupId string `json:"instantSnapshotGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstantSnapshotGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstantSnapshotGroup") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotGroupSourceInstantSnapshotGroupInfo) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotGroupSourceInstantSnapshotGroupInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotListWarning: [Output Only] Informational warning message. -type SnapshotListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotParams: Additional snapshot params. -type SnapshotParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the snapshot. Tag - // keys and values have - // the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotParams) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotResourceStatus struct { - // ScheduledDeletionTime: [Output only] Scheduled deletion time of the - // snapshot. The snapshot will - // be deleted by the at any point within one hour after the deletion time. - ScheduledDeletionTime string `json:"scheduledDeletionTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ScheduledDeletionTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ScheduledDeletionTime") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettings struct { - // AccessLocation: (Regional snapshots use only)Policy of which location is - // allowed to access - // snapshot. - AccessLocation *SnapshotSettingsAccessLocation `json:"accessLocation,omitempty"` - // StorageLocation: Policy of which storage location is going to be resolved, - // and additional - // data that particularizes how the policy is going to be carried out. - StorageLocation *SnapshotSettingsStorageLocationSettings `json:"storageLocation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettings) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettingsAccessLocation struct { - // Locations: List of regions that can restore a regional - // snapshot from the current region - Locations map[string]SnapshotSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` - // Policy: Policy of which location is allowed to access snapshot. - // - // Possible values: - // "ALL_REGIONS" - Any regions will be able to access the source location. - // "POLICY_UNSPECIFIED" - // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to restore - // region scoped - // snapshots - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsAccessLocation) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsAccessLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotSettingsAccessLocationAccessLocationPreference: A structure for -// specifying an allowed target region. -type SnapshotSettingsAccessLocationAccessLocationPreference struct { - // Region: Accessible region name - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Region") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Region") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsAccessLocationAccessLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsAccessLocationAccessLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettingsStorageLocationSettings struct { - // Locations: When the policy is SPECIFIC_LOCATIONS, snapshots will be - // stored - // in the locations listed in this field. Keys are Cloud Storage - // bucket - // locations. Only one location can be specified. - Locations map[string]SnapshotSettingsStorageLocationSettingsStorageLocationPreference `json:"locations,omitempty"` - // Policy: The chosen location policy. - // - // Possible values: - // "LOCAL_REGION" - Store snapshot in the same region as with the originating - // disk. - // No additional parameters are needed. - // "NEAREST_MULTI_REGION" - Store snapshot in the nearest multi region Cloud - // Storage bucket, - // relative to the originating disk. No additional parameters are needed. - // "SPECIFIC_LOCATIONS" - Store snapshot in the specific locations, as - // specified by the user. - // The list of regions to store must be defined under the `locations` - // field. - // "STORAGE_LOCATION_POLICY_UNSPECIFIED" - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsStorageLocationSettings) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsStorageLocationSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotSettingsStorageLocationSettingsStorageLocationPreference: A -// structure for specifying storage locations. -type SnapshotSettingsStorageLocationSettingsStorageLocationPreference struct { - // Name: Name of the location. It should be one of the Cloud Storage - // buckets. - // Only one location can be specified. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsStorageLocationSettingsStorageLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsStorageLocationSettingsStorageLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotsScopedList struct { - // Snapshots: [Output Only] A list of snapshots contained in this scope. - Snapshots []*Snapshot `json:"snapshots,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // snapshots - // when the list is empty. - Warning *SnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Snapshots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Snapshots") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotsScopedListWarning: [Output Only] Informational warning which -// replaces the list of snapshots -// when the list is empty. -type SnapshotsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SourceDiskEncryptionKey struct { - // DiskEncryptionKey: Thecustomer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // SourceDisk: URL of the disk attached to the source instance. This can be a - // full or - // valid partial URL. For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { - type NoMethod SourceDiskEncryptionKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceInstanceParams: A specification of the parameters to use when creating -// the instance template -// from a source instance. -type SourceInstanceParams struct { - // DiskConfigs: Attached disks configuration. If not provided, defaults are - // applied: - // For boot disk and any other R/W disks, the source images for each disk - // will be used. For read-only disks, they will be attached in read-only - // mode. Local SSD disks will be created as blank volumes. - DiskConfigs []*DiskInstantiationConfig `json:"diskConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceInstanceParams) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceInstanceProperties: DEPRECATED: Please use compute#instanceProperties -// instead. -// New properties will not be added to this field. -type SourceInstanceProperties struct { - // CanIpForward: Enables instances created based on this machine image to send - // packets with - // source IP addresses other than their own and receive packets - // with - // destination IP addresses other than their own. If these instances will - // be - // used as an IP gateway or it will be set as the next-hop in a Route - // resource, specify true. If unsure, leave this set tofalse. See theEnable IP - // forwarding - // documentation for more information. - CanIpForward bool `json:"canIpForward,omitempty"` - // DeletionProtection: Whether the instance created from this machine image - // should be protected - // against deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` - // Description: An optional text description for the instances that are created - // from this - // machine image. - Description string `json:"description,omitempty"` - // Disks: An array of disks that are associated with the instances that are - // created - // from this machine image. - Disks []*SavedAttachedDisk `json:"disks,omitempty"` - // GuestAccelerators: A list of guest accelerator cards' type and count to use - // for instances - // created from this machine image. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Labels: Labels to apply to instances that are created from this machine - // image. - Labels map[string]string `json:"labels,omitempty"` - // MachineType: The machine type to use for instances that are created from - // this machine - // image. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs to assign to instances that are - // created from - // this machine image. These pairs can consist of custom metadata or - // predefined keys. SeeProject and - // instance metadata for more information. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by instances created from - // this machine - // image. The instance may be scheduled on the specified or newer - // cpu/platform. Applicable values are the friendly names of CPU - // platforms, - // such as minCpuPlatform: "Intel Haswell" orminCpuPlatform: "Intel Sandy - // Bridge". For more - // information, read Specifying a - // Minimum CPU Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // Scheduling: Specifies the scheduling options for the instances that are - // created from - // this machine image. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // ServiceAccounts: A list of service accounts with specified scopes. Access - // tokens for these - // service accounts are available to the instances that are created from - // this - // machine image. Use metadata queries to obtain the access tokens for - // these - // instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // Tags: A list of tags to apply to the instances that are created from this - // machine - // image. The tags identify valid sources or targets for network firewalls. - // The setTags method can modify this list of tags. Each tag within the - // list - // must comply withRFC1035. - Tags *Tags `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanIpForward") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificate: Represents an SSL certificate resource. -// -// Google Compute Engine has two SSL certificate resources: -// -// * Global (/compute/docs/reference/rest/alpha/sslCertificates) -// * Regional (/compute/docs/reference/rest/alpha/regionSslCertificates) -// -// The global SSL certificates (sslCertificates) are used by: -// -// - Global external Application Load Balancers -// - Classic Application Load Balancers -// - Proxy Network Load Balancers (with target SSL proxies) -// -// The regional SSL certificates (regionSslCertificates) are used -// by: -// -// - Regional external Application Load Balancers -// - Regional internal Application Load Balancers -// -// Optionally, certificate file contents that you upload can contain a set of -// up -// to five PEM-encoded certificates. -// The API call creates an object (sslCertificate) that holds this data. -// You can use SSL keys and certificates to secure connections to a -// load -// balancer. -// For more information, read -// Creating and using SSL certificates,SSL certificates -// quotas and limits, and -// Troubleshooting SSL certificates. -type SslCertificate struct { - // Certificate: A value read into memory from a certificate file. The - // certificate file must - // be in PEM format. The certificate chain must be no greater than 5 - // certs - // long. The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExpireTime: [Output Only] Expire time of the certificate. RFC3339 - ExpireTime string `json:"expireTime,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#sslCertificate for - // SSL certificates. - Kind string `json:"kind,omitempty"` - // Managed: Configuration and status of a managed SSL certificate. - Managed *SslCertificateManagedSslCertificate `json:"managed,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PrivateKey: A value read into memory from a write-only private key file. The - // private - // key file must be in PEM format. For security, only insert - // requests include this field. - PrivateKey string `json:"privateKey,omitempty"` - // Region: [Output Only] URL of the region where the regional SSL - // Certificate - // resides. This field is not applicable to global SSL Certificate. - Region string `json:"region,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SelfManaged: Configuration and status of a self-managed SSL certificate. - SelfManaged *SslCertificateSelfManagedSslCertificate `json:"selfManaged,omitempty"` - // SubjectAlternativeNames: [Output Only] Domains associated with the - // certificate via Subject - // Alternative Name. - SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty"` - // Type: (Optional) Specifies the type of SSL certificate, either - // "SELF_MANAGED" or - // "MANAGED". If not specified, the certificate is self-managed and the - // fieldscertificate and private_key are used. - // - // Possible values: - // "MANAGED" - Google-managed SSLCertificate. - // "SELF_MANAGED" - Certificate uploaded by user. - // "TYPE_UNSPECIFIED" - 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. "Certificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslCertificatesScopedList resources. - Items map[string]SslCertificatesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#sslCertificateAggregatedList for lists of SSL - // Certificates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateAggregatedListWarning: [Output Only] Informational warning -// message. -type SslCertificateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateListWarning: [Output Only] Informational warning message. -type SslCertificateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateManagedSslCertificate: Configuration and status of a managed -// SSL certificate. -type SslCertificateManagedSslCertificate struct { - // DomainStatus: [Output only] Detailed statuses of the domains specified for - // managed - // certificate resource. - DomainStatus map[string]string `json:"domainStatus,omitempty"` - // Domains: The domains for which a managed SSL certificate will be generated. - // Each - // Google-managed SSL certificate supports up to the maximum number of - // domains per Google-managed SSL - // certificate (/load-balancing/docs/quotas#ssl_certificates). - Domains []string `json:"domains,omitempty"` - // Status: [Output only] Status of the managed certificate resource. - // - // Possible values: - // "ACTIVE" - The certificate management is working, and a certificate has - // been - // provisioned. - // "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED" - // "PROVISIONING" - The certificate management is working. GCP will attempt - // to provision - // the first certificate. - // "PROVISIONING_FAILED" - Certificate provisioning failed due to an issue - // with the DNS - // or load balancing configuration. - // For details of which domain failed, consult domain_status field. - // "PROVISIONING_FAILED_PERMANENTLY" - Certificate provisioning failed due to - // an issue with the DNS - // or load balancing configuration. It won't be retried. To try again - // delete and create a new managed SslCertificate resource. - // For details of which domain failed, consult domain_status field. - // "RENEWAL_FAILED" - Renewal of the certificate has failed due to an issue - // with the DNS - // or load balancing configuration. The existing cert is still - // serving; - // however, it will expire shortly. To provision a renewed certificate, - // delete and create a new managed SslCertificate resource. - // For details on which domain failed, consult domain_status field. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "DomainStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DomainStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateManagedSslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateSelfManagedSslCertificate: Configuration and status of a -// self-managed SSL certificate. -type SslCertificateSelfManagedSslCertificate struct { - // Certificate: A local certificate file. The certificate must be in - // PEM format. The certificate chain must be no greater than 5 certs - // long. The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "Certificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateSelfManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateSelfManagedSslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificatesScopedList struct { - // SslCertificates: List of SslCertificates contained in this scope. - SslCertificates []*SslCertificate `json:"sslCertificates,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *SslCertificatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificatesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type SslCertificatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslPoliciesScopedList resources. - Items map[string]SslPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#sslPolicyAggregatedList - // for lists of SSL Policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesAggregatedListWarning: [Output Only] Informational warning -// message. -type SslPoliciesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslPolicy resources. - Items []*SslPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#sslPoliciesList for - // lists of sslPolicies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesListWarning: [Output Only] Informational warning message. -type SslPoliciesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesListAvailableFeaturesResponse struct { - Features []string `json:"features,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Features") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Features") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListAvailableFeaturesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesScopedList struct { - // SslPolicies: A list of SslPolicies contained in this scope. - SslPolicies []*SslPolicy `json:"sslPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // SSL policies when the list is empty. - Warning *SslPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslPolicies") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesScopedListWarning: Informational warning which replaces the list -// of -// SSL policies when the list is empty. -type SslPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPolicy: Represents an SSL Policy resource. -// -// Use SSL policies to control SSL features, such as versions and -// cipher -// suites, that are offered by Application Load Balancers and proxy Network -// Load -// Balancers. For more information, read -// SSL policies overview. -type SslPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomFeatures: A list of features enabled when the selected profile is - // CUSTOM. The - // method returns the set of features that can be - // specified in this list. This field must be empty if the profile is - // notCUSTOM. - CustomFeatures []string `json:"customFeatures,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnabledFeatures: [Output Only] The list of features enabled in the SSL - // policy. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a SslPolicy. An up-to-date fingerprint must be - // provided in order to update the SslPolicy, otherwise the - // request will fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an SslPolicy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL - // policies. - Kind string `json:"kind,omitempty"` - // MinTlsVersion: The minimum version of SSL protocol that can be used by the - // clients to - // establish a connection with the load balancer. This can be one ofTLS_1_0, - // TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field - // must be set to RESTRICTED. - // - // Possible values: - // "TLS_1_0" - TLS 1.0 - // "TLS_1_1" - TLS 1.1 - // "TLS_1_2" - TLS 1.2 - // "TLS_1_3" - TLS 1.3 - MinTlsVersion string `json:"minTlsVersion,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long, and - // comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Profile: Profile specifies the set of SSL features that can be used by the - // load - // balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, - // MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features - // to enable must be specified in the customFeatures field. - // - // Possible values: - // "COMPATIBLE" - Compatible profile. Allows the broadset set of clients, - // even those which - // support only out-of-date SSL features to negotiate with the load - // balancer. - // "CUSTOM" - Custom profile. Allow only the set of allowed SSL features - // specified in - // the customFeatures field. - // "FIPS_202205" - FIPS compatible profile. Supports a reduced set of SSL - // features, - // intended to meet FIPS 140-3 compliance requirements. - // "MODERN" - Modern profile. Supports a wide set of SSL features, allowing - // modern - // clients to negotiate SSL with the load balancer. - // "RESTRICTED" - Restricted profile. Supports a reduced set of SSL features, - // intended to - // meet stricter compliance requirements. - Profile string `json:"profile,omitempty"` - // Region: [Output Only] URL of the region where the regional SSL - // policy - // resides. This field is not applicable to global SSL policies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // TlsSettings: Security settings for the proxy. This field is only applicable - // to a - // global backend service with the loadBalancingScheme set - // toINTERNAL_SELF_MANAGED. - TlsSettings *ServerTlsSettings `json:"tlsSettings,omitempty"` - // Warnings: [Output Only] If potential misconfigurations are detected for - // this - // SSL policy, this field will be populated with warning messages. - Warnings []*SslPolicyWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPolicyWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyWarnings) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyReference struct { - // SslPolicy: URL of the SSL policy resource. Set this to empty string to clear - // any - // existing SSL policy associated with the target proxy resource. - SslPolicy string `json:"sslPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicy struct { - PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreservedState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreservedState") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicy) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StatefulPolicyPreservedState: Configuration of preserved resources. -type StatefulPolicyPreservedState struct { - // Disks: Disks created on the instances that will be preserved on - // instance - // delete, update, etc. This map is keyed with the device names of - // the disks. - Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"` - // ExternalIPs: External network IPs assigned to the instances that will be - // preserved on - // instance delete, update, etc. This map is keyed with the network - // interface name. - ExternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"externalIPs,omitempty"` - // InternalIPs: Internal network IPs assigned to the instances that will be - // preserved on - // instance delete, update, etc. This map is keyed with the network - // interface name. - InternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"internalIPs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedState) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicyPreservedStateDiskDevice struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the disk should be deleted after it - // is no longer used by the group, e.g. when the given instance or - // the whole group is deleted. Note: disks attached inREAD_ONLY mode cannot be - // auto-deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateDiskDevice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicyPreservedStateNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the IP reservation should be deleted - // after it is no longer used by the group, e.g. when the given instance - // or the whole group is deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedStateNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateNetworkIp - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePool: Represents a zonal storage pool resource. -type StoragePool struct { - // CapacityProvisioningType: Provisioning type of the byte capacity of the - // pool. - // - // Possible values: - // "ADVANCED" - Advanced provisioning "thinly" allocates the related - // resource. - // "STANDARD" - Standard provisioning allocates the related resource for the - // pool - // disks' exclusive use. - // "UNSPECIFIED" - CapacityProvisioningType string `json:"capacityProvisioningType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExapoolProvisionedCapacityGb: [Output Only] Provisioned capacities for each - // SKU for this Exapool in GiB - ExapoolProvisionedCapacityGb *StoragePoolExapoolProvisionedCapacityGb `json:"exapoolProvisionedCapacityGb,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#storagePool - // for storage pools. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this storage - // pool, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a storage pool. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this storage pool. These can be later modified - // by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PerformanceProvisioningType: Provisioning type of the performance-related - // parameters of the pool, - // such as throughput and IOPS. - // - // Possible values: - // "ADVANCED" - Advanced provisioning "thinly" allocates the related - // resource. - // "STANDARD" - Standard provisioning allocates the related resource for the - // pool - // disks' exclusive use. - // "UNSPECIFIED" - PerformanceProvisioningType string `json:"performanceProvisioningType,omitempty"` - // PoolProvisionedCapacityGb: Size of the storage pool in GiB. For more - // information about the size - // limits, see https://cloud.google.com/compute/docs/disks/storage-pools. - PoolProvisionedCapacityGb int64 `json:"poolProvisionedCapacityGb,omitempty,string"` - // PoolProvisionedIops: Provisioned IOPS of the storage pool. Only relevant if - // the storage pool - // type is hyperdisk-balanced. - PoolProvisionedIops int64 `json:"poolProvisionedIops,omitempty,string"` - // PoolProvisionedThroughput: Provisioned throughput of the storage pool in - // MiB/s. Only relevant if the - // storage pool type is hyperdisk-balanced or hyperdisk-throughput. - PoolProvisionedThroughput int64 `json:"poolProvisionedThroughput,omitempty,string"` - // ProvisionedIops: DEPRECATED -- use "pool provisioned IOPS". - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: DEPRECATED -- use "pool provisioned throughput". - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // ResourceStatus: [Output Only] Status information for the storage pool - // resource. - ResourceStatus *StoragePoolResourceStatus `json:"resourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SizeGb: DEPRECATED -- use "pool provisioned capacity gb". - SizeGb int64 `json:"sizeGb,omitempty,string"` - // State: [Output Only] The status of storage pool creation. - // - // - // - CREATING: Storage pool is provisioning. - // storagePool. - // - FAILED: Storage pool creation failed. - // - READY: Storage pool is ready for use. - // - DELETING: Storage pool is deleting. - // - // Possible values: - // "CREATING" - StoragePool is provisioning - // "DELETING" - StoragePool is deleting. - // "FAILED" - StoragePool creation failed. - // "READY" - StoragePool is ready for use. - State string `json:"state,omitempty"` - // Status: [Output Only] Status information for the storage pool resource. - Status *StoragePoolResourceStatus `json:"status,omitempty"` - // StoragePoolType: Type of the storage pool. - StoragePoolType string `json:"storagePoolType,omitempty"` - // Zone: [Output Only] URL of the zone where the storage pool resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CapacityProvisioningType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CapacityProvisioningType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePool) MarshalJSON() ([]byte, error) { - type NoMethod StoragePool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolsScopedList resources. - Items map[string]StoragePoolsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#storagePoolAggregatedList for aggregated lists of - // storage pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolAggregatedListWarning: [Output Only] Informational warning -// message. -type StoragePoolAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolDisk struct { - // AttachedInstances: [Output Only] Instances this disk is attached to. - AttachedInstances []string `json:"attachedInstances,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Disk: [Output Only] The URL of the disk. - Disk string `json:"disk,omitempty"` - // Name: [Output Only] The name of the disk. - Name string `json:"name,omitempty"` - // ProvisionedIops: [Output Only] The number of IOPS provisioned for the disk. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: [Output Only] The throughput provisioned for the - // disk. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // ResourcePolicies: [Output Only] Resource policies applied to disk for - // automatic snapshot - // creations. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // SizeGb: [Output Only] The disk size, in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // Status: [Output Only] The disk status. - // - // Possible values: - // "CREATING" - Disk is provisioning - // "DELETING" - Disk is deleting. - // "FAILED" - Disk creation failed. - // "READY" - Disk is ready for use. - // "RESTORING" - Source data is being copied into the disk. - // "UNAVAILABLE" - Disk is currently unavailable and cannot be accessed, - // attached or - // detached. - Status string `json:"status,omitempty"` - // Type: [Output Only] The disk type. - Type string `json:"type,omitempty"` - // UsedBytes: [Output Only] Amount of disk space used. - UsedBytes int64 `json:"usedBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "AttachedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolDisk) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolExapoolProvisionedCapacityGb: Exapool provisioned capacities for -// each SKU type -type StoragePoolExapoolProvisionedCapacityGb struct { - // CapacityOptimized: Size, in GiB, of provisioned capacity-optimized capacity - // for this Exapool - CapacityOptimized int64 `json:"capacityOptimized,omitempty,string"` - // ReadOptimized: Size, in GiB, of provisioned read-optimized capacity for this - // Exapool - ReadOptimized int64 `json:"readOptimized,omitempty,string"` - // WriteOptimized: Size, in GiB, of provisioned write-optimized capacity for - // this Exapool - WriteOptimized int64 `json:"writeOptimized,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CapacityOptimized") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CapacityOptimized") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolExapoolProvisionedCapacityGb) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolExapoolProvisionedCapacityGb - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolList: A list of StoragePool resources. -type StoragePoolList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePool resources. - Items []*StoragePool `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#storagePoolList - // for lists of storagePools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolListWarning: [Output Only] Informational warning message. -type StoragePoolListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListDisks struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolDisk resources. - Items []*StoragePoolDisk `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#storagePoolListDisks for - // lists of disks in a - // storagePool. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolListDisksWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisks) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisks - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolListDisksWarning: [Output Only] Informational warning message. -type StoragePoolListDisksWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolListDisksWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisksWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisksWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListDisksWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisksWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisksWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolResourceStatus: [Output Only] Contains output only fields. -type StoragePoolResourceStatus struct { - // AggregateDiskProvisionedIops: DEPRECATED -- use - // "total_provisioned_disk_iops". - AggregateDiskProvisionedIops int64 `json:"aggregateDiskProvisionedIops,omitempty,string"` - // AggregateDiskSizeGb: DEPRECATED -- use "total provisioned disk size gb". - AggregateDiskSizeGb int64 `json:"aggregateDiskSizeGb,omitempty,string"` - // DiskCount: [Output Only] Number of disks used. - DiskCount int64 `json:"diskCount,omitempty,string"` - // ExapoolMaxReadIops: [Output Only] Maximum allowed read IOPS for this - // Exapool. - ExapoolMaxReadIops int64 `json:"exapoolMaxReadIops,omitempty,string"` - // ExapoolMaxReadThroughput: [Output Only] Maximum allowed read throughput in - // MiB/s for - // this Exapool. - ExapoolMaxReadThroughput int64 `json:"exapoolMaxReadThroughput,omitempty,string"` - // ExapoolMaxWriteIops: [Output Only] Maximum allowed write IOPS for this - // Exapool. - ExapoolMaxWriteIops int64 `json:"exapoolMaxWriteIops,omitempty,string"` - // ExapoolMaxWriteThroughput: [Output Only] Maximum allowed write throughput in - // MiB/s - // for this Exapool. - ExapoolMaxWriteThroughput int64 `json:"exapoolMaxWriteThroughput,omitempty,string"` - // LastResizeTimestamp: [Output Only] Timestamp of the last successful resize - // inRFC3339 text format. - LastResizeTimestamp string `json:"lastResizeTimestamp,omitempty"` - // MaxAggregateDiskSizeGb: DEPRECATED -- use "max provisioned disk size gb" - MaxAggregateDiskSizeGb int64 `json:"maxAggregateDiskSizeGb,omitempty,string"` - // MaxTotalProvisionedDiskCapacityGb: [Output Only] Maximum allowed aggregate - // disk size in GiB. - MaxTotalProvisionedDiskCapacityGb int64 `json:"maxTotalProvisionedDiskCapacityGb,omitempty,string"` - // NumberOfDisks: DEPRECATED -- use "disk count". - NumberOfDisks int64 `json:"numberOfDisks,omitempty,string"` - // PoolUsedCapacityBytes: [Output Only] Space used by data stored in disks - // within the storage pool - // (in bytes). This will reflect the total number of bytes written to the - // disks in the pool, in contrast to the capacity of those disks. - PoolUsedCapacityBytes int64 `json:"poolUsedCapacityBytes,omitempty,string"` - // PoolUsedIops: [Output Only] Sum of all the disks' provisioned IOPS, minus - // some amount - // that is allowed per disk that is not counted towards pool's IOPS - // capacity. For more information, - // see - // https://cloud.google.com/compute/docs/disks/storage-pools. - PoolUsedIops int64 `json:"poolUsedIops,omitempty,string"` - // PoolUsedThroughput: [Output Only] Sum of all the disks' provisioned - // throughput in MiB/s. - PoolUsedThroughput int64 `json:"poolUsedThroughput,omitempty,string"` - // PoolUserWrittenBytes: [Output Only] Amount of data written into the pool, - // before it is - // compacted. - PoolUserWrittenBytes int64 `json:"poolUserWrittenBytes,omitempty,string"` - // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the disks' - // provisioned capacity (in GiB) in - // this storage pool. A disk's provisioned capacity is the same as its - // total - // capacity. - TotalProvisionedDiskCapacityGb int64 `json:"totalProvisionedDiskCapacityGb,omitempty,string"` - // TotalProvisionedDiskIops: [Output Only] Sum of all the disks' provisioned - // IOPS. - TotalProvisionedDiskIops int64 `json:"totalProvisionedDiskIops,omitempty,string"` - // TotalProvisionedDiskThroughput: [Output Only] Sum of all the disks' - // provisioned throughput in MiB/s, - // minus some amount that is allowed per disk that is not counted - // towards - // pool's throughput capacity. - TotalProvisionedDiskThroughput int64 `json:"totalProvisionedDiskThroughput,omitempty,string"` - // UsedBytes: DEPRECATED -- use "pool used capacity". - UsedBytes int64 `json:"usedBytes,omitempty,string"` - // UsedReducedBytes: DEPRECATED -- do not use, will be removed. - UsedReducedBytes int64 `json:"usedReducedBytes,omitempty,string"` - // UsedThroughput: DEPRECATED -- use "pool used throughput". - UsedThroughput int64 `json:"usedThroughput,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "AggregateDiskProvisionedIops") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateDiskProvisionedIops") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // storage pool - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#storagePoolType for - // storage pool types. - Kind string `json:"kind,omitempty"` - // MaxPoolProvisionedCapacityGb: [Output Only] Maximum storage pool size in GB. - MaxPoolProvisionedCapacityGb int64 `json:"maxPoolProvisionedCapacityGb,omitempty,string"` - // MaxPoolProvisionedIops: [Output Only] Maximum provisioned IOPS. - MaxPoolProvisionedIops int64 `json:"maxPoolProvisionedIops,omitempty,string"` - // MaxPoolProvisionedThroughput: [Output Only] Maximum provisioned throughput. - MaxPoolProvisionedThroughput int64 `json:"maxPoolProvisionedThroughput,omitempty,string"` - // MinPoolProvisionedCapacityGb: [Output Only] Minimum storage pool size in GB. - MinPoolProvisionedCapacityGb int64 `json:"minPoolProvisionedCapacityGb,omitempty,string"` - // MinPoolProvisionedIops: [Output Only] Minimum provisioned IOPS. - MinPoolProvisionedIops int64 `json:"minPoolProvisionedIops,omitempty,string"` - // MinPoolProvisionedThroughput: [Output Only] Minimum provisioned throughput. - MinPoolProvisionedThroughput int64 `json:"minPoolProvisionedThroughput,omitempty,string"` - // MinSizeGb: [Deprecated] This field is deprecated. Use - // minPoolProvisionedCapacityGb - // instead. - MinSizeGb int64 `json:"minSizeGb,omitempty,string"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SupportedDiskTypes: [Output Only] The list of disk types supported in this - // storage pool type. - SupportedDiskTypes []string `json:"supportedDiskTypes,omitempty"` - // Zone: [Output Only] URL of the zone where the storage pool type resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolType) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolTypesScopedList resources. - Items map[string]StoragePoolTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#storagePoolTypeAggregatedList. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type StoragePoolTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeList: Contains a list of storage pool types. -type StoragePoolTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolType resources. - Items []*StoragePoolType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#storagePoolTypeList for - // storage pool types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeListWarning: [Output Only] Informational warning message. -type StoragePoolTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypesScopedList struct { - // StoragePoolTypes: [Output Only] A list of storage pool types contained in - // this scope. - StoragePoolTypes []*StoragePoolType `json:"storagePoolTypes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // storage pool - // types when the list is empty. - Warning *StoragePoolTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "StoragePoolTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StoragePoolTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of storage pool -// types when the list is empty. -type StoragePoolTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolsScopedList struct { - // StoragePools: [Output Only] A list of storage pool contained in this scope. - StoragePools []*StoragePool `json:"storagePools,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // storage pool - // when the list is empty. - Warning *StoragePoolsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "StoragePools") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StoragePools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolsScopedListWarning: [Output Only] Informational warning which -// replaces the list of storage pool -// when the list is empty. -type StoragePoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StructuredEntries struct { - // Entries: Map of a partner metadata that belong to the same subdomain. - // It accepts any value including google.protobuf.Struct. - Entries googleapi.RawMessage `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StructuredEntries) MarshalJSON() ([]byte, error) { - type NoMethod StructuredEntries - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Subnetwork: Represents a Subnetwork resource. -// -// A subnetwork (also known as a subnet) is a logical partition of a -// Virtual -// Private Cloud network with one primary IP range and zero or more -// secondary -// IP ranges. For more information, read -// Virtual Private Cloud (VPC) Network. -type Subnetwork struct { - // AggregationInterval: Can only be specified if VPC flow logging for this - // subnetwork is enabled. - // Sets the aggregation interval for collecting flow logs. Increasing - // the - // interval time reduces the amount of generated flow logs for - // long-lasting - // connections. Default is an interval of 5 seconds per connection. - // Valid values: INTERVAL_5_SEC, INTERVAL_30_SEC,INTERVAL_1_MIN, - // INTERVAL_5_MIN,INTERVAL_10_MIN, INTERVAL_15_MIN. - // - // Possible values: - // "INTERVAL_10_MIN" - // "INTERVAL_15_MIN" - // "INTERVAL_1_MIN" - // "INTERVAL_30_SEC" - // "INTERVAL_5_MIN" - // "INTERVAL_5_SEC" - AggregationInterval string `json:"aggregationInterval,omitempty"` - // AllowSubnetCidrRoutesOverlap: Whether this subnetwork's ranges can conflict - // with existing static routes. - // Setting this to true allows this subnetwork's primary and secondary - // ranges - // to overlap with (and contain) static routes that have already - // been - // configured on the corresponding network. - // - // For example if a static route has range 10.1.0.0/16, a subnet - // range 10.0.0.0/8 could only be created if - // allow_conflicting_routes=true. - // - // Overlapping is only allowed on subnetwork operations; routes - // whose ranges conflict with this subnetwork's ranges won't be allowed - // unless - // route.allow_conflicting_subnetworks is set to true. - // - // Typically packets destined to IPs within the subnetwork (which may - // contain - // private/sensitive data) are prevented from leaving the virtual - // network. - // Setting this field to true will disable this feature. - // - // The default value is false and applies to all existing subnetworks - // and - // automatically created subnetworks. - // - // This field cannot be set to true at resource creation time. - AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. This field can be set only at resource creation time. - Description string `json:"description,omitempty"` - // EnableFlowLogs: Whether to enable flow logging for this subnetwork. If this - // field is not - // explicitly set, it will not appear in get listings. If not set - // the default behavior is determined by the org policy, if there is no - // org - // policy specified, then it will default to disabled. This field - // isn't - // supported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY. - EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` - // EnableL2: Enables Layer2 communication on the subnetwork. - EnableL2 bool `json:"enableL2,omitempty"` - // EnablePrivateV6Access: Deprecated in favor of enable in - // PrivateIpv6GoogleAccess. - // Whether the VMs in this subnet can directly access Google services - // via - // internal IPv6 addresses. This field can be both set at resource - // creation - // time and updated using patch. - EnablePrivateV6Access bool `json:"enablePrivateV6Access,omitempty"` - // ExternalIpv6Prefix: The external IPv6 address range that is owned by - // this - // subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a Subnetwork. An up-to-date fingerprint must be - // provided in order to update the Subnetwork, otherwise the - // request will fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a Subnetwork. - Fingerprint string `json:"fingerprint,omitempty"` - // FlowSampling: Can only be specified if VPC flow logging for this subnetwork - // is enabled. - // The value of the field must be in [0, 1]. Set the sampling rate of VPC - // flow - // logs within the subnetwork where 1.0 means all collected logs - // are reported and 0.0 means no logs are reported. Default is0.5 unless - // otherwise specified by the org policy, which means - // half of all collected logs are reported. - FlowSampling float64 `json:"flowSampling,omitempty"` - // GatewayAddress: [Output Only] The gateway address for default routes to - // reach destination - // addresses outside this subnetwork. - GatewayAddress string `json:"gatewayAddress,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: The internal IPv6 address range that is owned by - // this - // subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - // Provide this property when you create the subnetwork. For example,10.0.0.0/8 - // or 100.64.0.0/10. Ranges must - // be unique and non-overlapping within a network. Only IPv4 is supported. - // This field is set at resource creation time. The range can be any - // range - // listed in theValid - // ranges list. The range can be expanded after creation - // usingexpandIpCidrRange. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // IpCollection: Reference to the source of IP, like a - // PublicDelegatedPrefix - // (PDP) for BYOIP. The PDP must be a sub-PDP - // in - // EXTERNAL_IPV6_SUBNETWORK_CREATION or - // INTERNAL_IPV6_SUBNETWORK_CREATION - // mode. - // - // Use one of the following formats to specify a sub-PDP when creating a - // dual - // stack or IPv6-only subnetwork with external access using BYOIP: - // - // - - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/pub - // licDelegatedPrefixes/sub-pdp-name - // - - // Partial URL, as in - // - // - // - - // projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name - // - regions/region/publicDelegatedPrefixes/sub-pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // Ipv6AccessType: The access type of IPv6 address this subnet holds. It's - // immutable and can - // only be specified during creation or the first time the subnet is - // updated - // into IPV4_IPV6 dual stack. - // - // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // accessible - // via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // only - // accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Ipv6CidrRange: [Output Only] This field is for internal use. - Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` - // Ipv6GceEndpoint: [Output Only] Possible endpoints of this subnetwork. It can - // be one of the - // following: - // - // - VM_ONLY: The subnetwork can be used for creating instances and - // IPv6 addresses with VM endpoint type. Such a subnetwork gets external - // IPv6 - // ranges from a public delegated prefix and cannot be used to create - // NetLb. - // - VM_AND_FR: The subnetwork can be used for creating both VM - // instances and Forwarding Rules. It can also be used to reserve IPv6 - // addresses with both VM and FR endpoint types. Such a subnetwork gets its - // IPv6 range from Google IP Pool directly. - // - // Possible values: - // "VM_AND_FR" - // "VM_ONLY" - Ipv6GceEndpoint string `json:"ipv6GceEndpoint,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. - Kind string `json:"kind,omitempty"` - // LogConfig: This field denotes the VPC flow logging options for this - // subnetwork. - // If logging is enabled, logs are exported to Cloud Logging. - LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` - // Metadata: Can only be specified if VPC flow logging for this subnetwork is - // enabled. - // Configures whether metadata fields should be added to the reported VPC - // flow - // logs. Options are INCLUDE_ALL_METADATA,EXCLUDE_ALL_METADATA, and - // CUSTOM_METADATA. - // Default is EXCLUDE_ALL_METADATA. - // - // Possible values: - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which this subnetwork belongs, provided - // by the - // client when initially creating the subnetwork. This field can be set only - // at resource creation time. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *SubnetworkParams `json:"params,omitempty"` - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access Google - // services without assigned - // external IP addresses. This field can be both set at resource creation - // time and updated using setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // PrivateIpv6GoogleAccess: This field is for internal use. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "DISABLE_GOOGLE_ACCESS" - Disable private IPv6 access to/from Google - // services. - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // Possible values: - // "AGGREGATE" - Subnetwork used to aggregate multiple private subnetworks. - // "CLOUD_EXTENSION" - Subnetworks created for Cloud Extension Machines. - // "CUSTOM_HARDWARE_LINK" - Subnetwork used for Custom Hardware Link. - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - Purpose string `json:"purpose,omitempty"` - // Region: URL of the region where the Subnetwork resides. This - // field can be set only at resource creation time. - Region string `json:"region,omitempty"` - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - // ResolveSubnetMask: Configures subnet mask resolution for this subnetwork. - // - // Possible values: - // "ARP_ALL_RANGES" - All ranges assigned to the VM NIC will respond to ARP. - // "ARP_PRIMARY_RANGE" - Only the primary range of the VM NIC will respond to - // ARP. - ResolveSubnetMask string `json:"resolveSubnetMask,omitempty"` - // Role: The role of subnetwork. Currently, this field is only used - // when - // purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value - // can be set toACTIVE or BACKUP. An ACTIVE - // subnetwork is one that is currently being used for Envoy-based - // load - // balancers in a region. A BACKUP subnetwork is one that is - // ready to be promoted to ACTIVE or is currently draining. - // This field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` - // SecondaryIpRanges: An array of configurations for secondary IP ranges for VM - // instances - // contained in this subnetwork. The primary IP of such VM must belong to - // the - // primary ipCidrRange of the subnetwork. The alias IPs may belong to - // either - // primary or secondary ranges. This field can be updated with apatch request. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs - // in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs - // in the subnet can be assigned both IPv4 and - // IPv6 addresses. If not specified, IPV4_ONLY is used. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 - // addresses. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] The state of the subnetwork, which can be one of - // the - // following values:READY: Subnetwork is created and ready to useDRAINING: only - // applicable to subnetworks that have the - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that - // connections to the load balancer are being drained. A subnetwork that - // is - // draining cannot be used or modified until it reaches a status ofREADY - // - // Possible values: - // "DRAINING" - Subnetwork is being drained. - // "READY" - Subnetwork is ready for use. - State string `json:"state,omitempty"` - // SystemReservedExternalIpv6Ranges: Output only. [Output Only] The array of - // external IPv6 network ranges reserved from - // the subnetwork's external IPv6 range for system use. - SystemReservedExternalIpv6Ranges []string `json:"systemReservedExternalIpv6Ranges,omitempty"` - // SystemReservedInternalIpv6Ranges: Output only. [Output Only] The array of - // internal IPv6 network ranges reserved from - // the subnetwork's internal IPv6 range for system use. - SystemReservedInternalIpv6Ranges []string `json:"systemReservedInternalIpv6Ranges,omitempty"` - // UtilizationDetails: Output only. [Output Only] The current IP utilization of - // all subnetwork ranges. Contains - // the total number of allocated and free IPs in each range. - UtilizationDetails *SubnetworkUtilizationDetails `json:"utilizationDetails,omitempty"` - // Vlans: A repeated field indicating the VLAN IDs supported on this - // subnetwork. - // During Subnet creation, specifying vlan is valid only if enable_l2 is - // true. - // During Subnet Update, specifying vlan is allowed only for l2 - // enabled - // subnets. Restricted to only one VLAN. - Vlans []int64 `json:"vlans,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AggregationInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregationInterval") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Subnetwork) MarshalJSON() ([]byte, error) { - type NoMethod Subnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Subnetwork) UnmarshalJSON(data []byte) error { - type NoMethod Subnetwork - var s1 struct { - FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FlowSampling = float64(s1.FlowSampling) - return nil -} - -type SubnetworkAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#subnetworkAggregatedList - // for aggregated lists of - // subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SubnetworkAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkAggregatedListWarning: [Output Only] Informational warning -// message. -type SubnetworkAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworkAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SubnetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkListWarning: [Output Only] Informational warning message. -type SubnetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkLogConfig: The available logging options for this subnetwork. -type SubnetworkLogConfig struct { - // AggregationInterval: Can only be specified if VPC flow logging for this - // subnetwork is enabled. - // Toggles the aggregation interval for collecting flow logs. Increasing - // the - // interval time will reduce the amount of generated flow logs for long - // lasting connections. Default is an interval of 5 seconds per connection. - // - // Possible values: - // "INTERVAL_10_MIN" - // "INTERVAL_15_MIN" - // "INTERVAL_1_MIN" - // "INTERVAL_30_SEC" - // "INTERVAL_5_MIN" - // "INTERVAL_5_SEC" - AggregationInterval string `json:"aggregationInterval,omitempty"` - // Enable: Whether to enable flow logging for this subnetwork. If this field is - // not - // explicitly set, it will not appear in get listings. If not - // set the default behavior is determined by the org policy, if there is no - // org policy specified, then it will default to disabled. - // Flow logging isn't supported if the subnet purpose field is - // set to REGIONAL_MANAGED_PROXY. - Enable bool `json:"enable,omitempty"` - // FilterExpr: Can only be specified if VPC flow logs for this subnetwork is - // enabled. - // The filter expression is used to define which VPC flow logs should - // be - // exported to Cloud Logging. - FilterExpr string `json:"filterExpr,omitempty"` - // FlowSampling: Can only be specified if VPC flow logging for this subnetwork - // is enabled. - // The value of the field must be in [0, 1]. Set the sampling rate of VPC - // flow logs within the subnetwork where 1.0 means all collected logs - // are - // reported and 0.0 means no logs are reported. Default is 0.5 unless - // otherwise specified by the org policy, which means half of all - // collected - // logs are reported. - FlowSampling float64 `json:"flowSampling,omitempty"` - // Metadata: Can only be specified if VPC flow logs for this subnetwork is - // enabled. - // Configures whether all, none or a subset of metadata fields should be - // added to the reported VPC flow logs. Default isEXCLUDE_ALL_METADATA. - // - // Possible values: - // "CUSTOM_METADATA" - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` - // MetadataFields: Can only be specified if VPC flow logs for this subnetwork - // is enabled and - // "metadata" was set to CUSTOM_METADATA. - MetadataFields []string `json:"metadataFields,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregationInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregationInterval") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod SubnetworkLogConfig - var s1 struct { - FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FlowSampling = float64(s1.FlowSampling) - return nil -} - -// SubnetworkParams: Additional subnetwork parameters. -type SubnetworkParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkParams) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - // Provide this property when you create the subnetwork. Ranges must be - // unique and non-overlapping with all primary and secondary IP ranges - // within a network. Only IPv4 is supported. The range can be any range - // listed in theValid - // ranges list. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, used - // when adding - // an alias IP range to a VM instance. - // The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkSecondaryRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetails: The current IP utilization of all subnetwork -// ranges. Contains the total -// number of allocated and free IPs in each range. -type SubnetworkUtilizationDetails struct { - // ExternalIpv6InstanceUtilization: Utilizations of external IPV6 IP range. - ExternalIpv6InstanceUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6InstanceUtilization,omitempty"` - // ExternalIpv6LbUtilization: Utilizations of external IPV6 IP range for NetLB. - ExternalIpv6LbUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6LbUtilization,omitempty"` - // InternalIpv6Utilization: Utilizations of internal IPV6 IP range. - InternalIpv6Utilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"internalIpv6Utilization,omitempty"` - // Ipv4Utilizations: Utilizations of all IPV4 IP ranges. For primary ranges, - // the range name - // will be empty. - Ipv4Utilizations []*SubnetworkUtilizationDetailsIPV4Utilization `json:"ipv4Utilizations,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExternalIpv6InstanceUtilization") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6InstanceUtilization") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetails) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetailsIPV4Utilization: The IPV4 utilization of a -// single IP range. -type SubnetworkUtilizationDetailsIPV4Utilization struct { - // RangeName: Will be set for secondary range. Empty for primary IPv4 range. - RangeName string `json:"rangeName,omitempty"` - TotalAllocatedIp int64 `json:"totalAllocatedIp,omitempty,string"` - TotalFreeIp int64 `json:"totalFreeIp,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RangeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetailsIPV4Utilization) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetailsIPV4Utilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetailsIPV6Utilization: The IPV6 utilization of a -// single IP range. -type SubnetworkUtilizationDetailsIPV6Utilization struct { - TotalAllocatedIp *Uint128 `json:"totalAllocatedIp,omitempty"` - TotalFreeIp *Uint128 `json:"totalFreeIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalAllocatedIp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalAllocatedIp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetailsIPV6Utilization) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetailsIPV6Utilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses that - // are legal on - // this Subnetwork. This range should be disjoint from other subnetworks - // within this network. This range can only be larger than (i.e. a superset - // of) the range previously defined before the update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksExpandIpCidrRangeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: A list of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - // Warning: An informational warning that appears when the list of addresses - // is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Subnetworks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Subnetworks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedListWarning: An informational warning that appears when the -// list of addresses -// is empty. -type SubnetworksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedWarning struct { - // ScopeName: Name of the scope containing this set of Subnetworks. - ScopeName string `json:"scopeName,omitempty"` - // Warning: An informational warning about unreachable scope - Warning *SubnetworksScopedWarningWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ScopeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ScopeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedWarningWarning: An informational warning about unreachable -// scope -type SubnetworksScopedWarningWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworksScopedWarningWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarningWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarningWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedWarningWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarningWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarningWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksSetPrivateIpGoogleAccessRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Subsetting: Subsetting configuration for this BackendService. -// Currently this is applicable only for Internal TCP/UDP load -// balancing, -// Internal HTTP(S) load balancing and Traffic Director. -type Subsetting struct { - // Possible values: - // "CONSISTENT_HASH_SUBSETTING" - Subsetting based on consistent - // hashing. - // - // For Traffic Director, the number of backends per backend group - // (the subset size) is based on the `subset_size` parameter. - // - // For Internal HTTP(S) load balancing, the number of backends per - // backend - // group (the subset size) is dynamically adjusted in two cases: - // - As the number of proxy instances participating in Internal HTTP(S) load - // balancing increases, the subset size decreases. - // - When the total number of backends in a network exceeds the capacity of - // a single proxy instance, subset sizes are reduced automatically for - // each service that has backend subsetting enabled. - // "NONE" - No Subsetting. - // - // Clients may open connections and send traffic to all backends of - // this - // backend service. This can lead to performance issues if there is - // substantial imbalance in the count of clients and backends. - Policy string `json:"policy,omitempty"` - // SubsetSize: The number of backends per backend group assigned to each proxy - // instance or - // each service mesh client. - // - // An input parameter to the `CONSISTENT_HASH_SUBSETTING` algorithm. - // Can only be set if `policy` is set to `CONSISTENT_HASH_SUBSETTING`. - // Can only be set if load balancing scheme is `INTERNAL_MANAGED` - // or - // `INTERNAL_SELF_MANAGED`. - // - // `subset_size` is optional for Internal HTTP(S) load balancing - // and required for Traffic Director. - // - // If you do not provide this value, Cloud Load Balancing will calculate - // it - // dynamically to optimize the number of proxies/clients visible to - // each - // backend and vice versa. - // - // Must be greater than 0. If `subset_size` is larger than the number - // of - // backends/endpoints, then subsetting is disabled. - SubsetSize int64 `json:"subsetSize,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Subsetting) MarshalJSON() ([]byte, error) { - type NoMethod Subsetting - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TCPHealthCheck struct { - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 80. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: Instructs the health check prober to send this exact ASCII string, - // up to - // 1024 bytes in length, after establishing the TCP connection. - Request string `json:"request,omitempty"` - // Response: Creates a content-based TCP health check. In addition to - // establishing a - // TCP connection, you can configure the health check to pass only when - // the - // backend sends this exact response ASCII string, up to 1024 bytes in - // length. - // For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TCPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod TCPHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is essentially - // a hash of - // the tags' contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update tags. You must always provide - // an - // up-to-date fingerprint hash in order to update or change tags. - // - // To see the latest fingerprint, make get() request to the - // instance. - Fingerprint string `json:"fingerprint,omitempty"` - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply - // with RFC1035. - Items []string `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Tags) MarshalJSON() ([]byte, error) { - type NoMethod Tags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetGrpcProxy: Represents a Target gRPC Proxy resource. -// -// A target gRPC proxy is a component of load balancers intended for -// load balancing gRPC traffic. Only global forwarding rules with load -// balancing -// scheme INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The -// target -// gRPC Proxy references a URL map that specifies how traffic is routed to -// gRPC backend services. -type TargetGrpcProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetGrpcProxy. An up-to-date fingerprint must - // be provided in order to patch/update the TargetGrpcProxy; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // TargetGrpcProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for - // target grpc proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL to - // the - // BackendService. The protocol field in the BackendService must be set - // to - // GRPC. - UrlMap string `json:"urlMap,omitempty"` - // ValidateForProxyless: If true, indicates that the BackendServices referenced - // by the urlMap may be - // accessed by gRPC applications without using a sidecar proxy. This - // will - // enable configuration checks on urlMap and its referenced BackendServices - // to - // not allow unsupported features. A gRPC application must use - // "xds:///" scheme in the target URI of the service it is - // connecting to. - // If false, indicates that the BackendServices referenced by the urlMap - // will - // be accessed by gRPC applications via a sidecar proxy. In this case, a - // gRPC - // application must not use "xds:///" scheme in the target URI of - // the service it is connecting to - ValidateForProxyless bool `json:"validateForProxyless,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetGrpcProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetGrpcProxy resources. - Items []*TargetGrpcProxy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for - // target grpc proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetGrpcProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetGrpcProxyListWarning: [Output Only] Informational warning message. -type TargetGrpcProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetGrpcProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetGrpcProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxiesScopedList struct { - // TargetHttpProxies: A list of TargetHttpProxies contained in this scope. - TargetHttpProxies []*TargetHttpProxy `json:"targetHttpProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetHttpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetHttpProxies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxiesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type TargetHttpProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxy: Represents a Target HTTP Proxy resource. -// -// Google Compute Engine has two Target HTTP Proxy resources: -// -// * Global (/compute/docs/reference/rest/alpha/targetHttpProxies) -// * Regional (/compute/docs/reference/rest/alpha/regionTargetHttpProxies) -// -// A target HTTP proxy is a component of Google Cloud HTTP load balancers. -// -// - targetHttpProxies are used by global external Application Load Balancers, -// classic Application Load Balancers, cross-region internal Application -// -// Load -// -// Balancers, and Traffic Director. -// - regionTargetHttpProxies are used by regional internal Application Load -// Balancers and regional external Application Load Balancers. -// -// Forwarding rules reference a target HTTP proxy, and the target proxy -// then references a URL map. For more information, readUsing Target -// Proxies -// and -// Forwarding rule concepts. -type TargetHttpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetHttpProxy. An up-to-date fingerprint must - // be provided in order to patch/update the TargetHttpProxy; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // TargetHttpProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // HttpFilters: URLs to networkservices.HttpFilter resources - // enabled for xDS clients using this configuration. For - // example,https://networkservices.googleapis.com/v1alpha1/projects/project/loca - // tions/locationhttpFilters/httpFilter - // Only filters that handle outbound connection and - // stream events may be specified. These filters work in conjunction with - // a default set of HTTP filters that may already be configured by - // Traffic - // Director. Traffic Director will determine the final location of - // these - // filters within xDS configuration based on the name of the HTTP filter. - // If - // Traffic Director positions multiple filters at the same location, - // those - // filters will be in the same order as specified in this list. - // - // httpFilters only applies for loadbalancers withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // See ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` - // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection open, after - // completing a response, - // while there is no matching traffic (in seconds). If an HTTP keep-alive - // is - // not specified, a default value (610 seconds) will be used. - // - // For global external Application Load Balancers, the minimum allowed value - // is 5 seconds and the maximum allowed value is 1200 seconds. - // - // For classic Application Load Balancers, this option is not supported. - HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // Region: [Output Only] URL of the region where the regional Target HTTP - // Proxy - // resides. This field is not applicable to global Target HTTP Proxies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL to - // the BackendService. - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxiesScopedList resources. - Items map[string]TargetHttpProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetHttpProxyAggregatedList for lists of Target - // HTTP - // Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetHttpProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyListWarning: [Output Only] Informational warning message. -type TargetHttpProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesScopedList struct { - // TargetHttpsProxies: A list of TargetHttpsProxies contained in this scope. - TargetHttpsProxies []*TargetHttpsProxy `json:"targetHttpsProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetHttpsProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpsProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetHttpsProxies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxiesScopedListWarning: Informational warning which replaces -// the list of -// backend services when the list is empty. -type TargetHttpsProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetHttpsProxy. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetCertificateMapRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetQuicOverrideRequest struct { - // QuicOverride: QUIC policy for the TargetHttpsProxy resource. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC with - // clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with clients. - // "NONE" - No overrides to the default QUIC policy. This option is implicit - // if - // no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuicOverride") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuicOverride") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetQuicOverrideRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetQuicOverrideRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. At least one SSL - // certificate must be specified. Currently, you may specify up to 15 - // SSL - // certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. -// -// Google Compute Engine has two Target HTTPS Proxy resources: -// -// * Global (/compute/docs/reference/rest/alpha/targetHttpsProxies) -// * Regional (/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) -// -// A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. -// -// * targetHttpsProxies are used by global external Application Load -// Balancers, -// -// classic Application Load Balancers, cross-region internal Application -// -// Load -// -// Balancers, and Traffic Director. -// - regionTargetHttpsProxies are used by regional internal Application Load -// Balancers and regional external Application Load Balancers. -// -// Forwarding rules reference a target HTTPS proxy, and the target proxy -// then references a URL map. For more information, readUsing Target -// Proxies -// and -// Forwarding rule concepts. -type TargetHttpsProxy struct { - // Authentication: [Deprecated] Use serverTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` - // Authorization: [Deprecated] Use authorizationPolicy instead. - Authorization string `json:"authorization,omitempty"` - // AuthorizationPolicy: Optional. A URL referring to a - // networksecurity.AuthorizationPolicy resource - // that describes how the proxy should authorize inbound traffic. If - // left - // blank, access will not be restricted by an authorization policy. - // - // Refer to the AuthorizationPolicy resource for additional - // details. - // - // authorizationPolicy only applies to a globalTargetHttpsProxy attached - // toglobalForwardingRules with theloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // - // Note: This field currently has no impact. - AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` - // CertificateMap: URL of a certificate map that identifies a certificate map - // associated with - // the given target proxy. - // This field can only be set for Global external Application Load Balancer - // or - // Classic Application Load Balancer. For other products use - // Certificate - // Manager Certificates instead. - // - // If set, sslCertificates will be ignored. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetHttpsProxy. An up-to-date fingerprint must - // be provided in order to patch the TargetHttpsProxy; otherwise, the - // request - // will fail with error 412 conditionNotMet. To see the latest - // fingerprint, make a get() request to retrieve the - // TargetHttpsProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // HttpFilters: URLs to networkservices.HttpFilter resources - // enabled for xDS clients using this configuration. For - // example,https://networkservices.googleapis.com/beta/projects/project/location - // s/location/httpFilters/httpFilter - // Only filters that handle outbound connection and - // stream events may be specified. These filters work in conjunction with - // a default set of HTTP filters that may already be configured by - // Traffic - // Director. Traffic Director will determine the final location of - // these - // filters within xDS configuration based on the name of the HTTP filter. - // If - // Traffic Director positions multiple filters at the same location, - // those - // filters will be in the same order as specified in this list. - // - // httpFilters only applies for loadbalancers withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // See ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` - // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection open, after - // completing a response, - // while there is no matching traffic (in seconds). If an HTTP keep-alive - // is - // not specified, a default value (610 seconds) will be used. - // - // For global external Application Load Balancers, the minimum allowed value - // is 5 seconds and the maximum allowed value is 1200 seconds. - // - // For classic Application Load Balancers, this option is not supported. - HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetHttpsProxy for - // target HTTPS proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // QuicOverride: Specifies the QUIC override policy for this TargetHttpsProxy - // resource. This - // setting determines whether the load balancer attempts to negotiate QUIC - // with clients. - // You can specify NONE, ENABLE, orDISABLE. - // - // - When quic-override is set to NONE, - // Google manages whether QUIC is used. - // - When quic-override is set to ENABLE, the - // load balancer uses QUIC when possible. - // - When quic-override is set to DISABLE, the - // load balancer doesn't use QUIC. - // - If the quic-override flag is not specified,NONE is implied. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC with - // clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with clients. - // "NONE" - No overrides to the default QUIC policy. This option is implicit - // if - // no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - // Region: [Output Only] URL of the region where the regional - // TargetHttpsProxy - // resides. This field is not applicable to global TargetHttpsProxies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServerTlsPolicy: Optional. A URL referring to a - // networksecurity.ServerTlsPolicy resource - // that describes how the proxy should authenticate inbound traffic. - // - // serverTlsPolicy only applies to a globalTargetHttpsProxy attached - // toglobalForwardingRules with theloadBalancingScheme set to - // INTERNAL_SELF_MANAGED - // or EXTERNAL orEXTERNAL_MANAGED or INTERNAL_MANAGED. - // It also applies to a regional TargetHttpsProxy attached to - // regional forwardingRules with theloadBalancingScheme set to EXTERNAL_MANAGED - // orINTERNAL_MANAGED. For details whichServerTlsPolicy resources are accepted - // withINTERNAL_SELF_MANAGED and which with EXTERNAL,INTERNAL_MANAGED, - // EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy - // documentation. - // - // If left blank, communications are not encrypted. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate - // connections between users and the load balancer. At least one - // SSL - // certificate must be specified. SslCertificates do not apply when the - // load - // balancing scheme is set to INTERNAL_SELF_MANAGED. - // - // The URLs should refer to a SSL Certificate resource or Certificate - // Manager - // Certificate resource. Mixing Classic Certificates and Certificate - // Manager - // Certificates is not allowed. Certificate Manager Certificates must - // include - // the certificatemanager API namespace. Using Certificate Manager - // Certificates in this field is not supported by Global external - // Application - // Load Balancer or Classic Application Load Balancer, use - // certificate_map - // instead. - // - // Currently, you may specify up to 15 Classic SSL Certificates or up to - // 100 - // Certificate Manager Certificates. - // - // Certificate Manager Certificates accepted formats are: - // - // - - // //certificatemanager.googleapis.com/projects/{project}/locations/{location}/c - // ertificates/{resourceName}. - // - - // https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}. - SslCertificates []string `json:"sslCertificates,omitempty"` - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetHttpsProxy - // resource. If not set, the TargetHttpsProxy resource has no - // SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` - // TlsEarlyData: Specifies whether TLS 1.3 0-RTT Data ("Early Data") should be - // accepted - // for this service. Early Data allows a TLS resumption handshake to - // include - // the initial application payload (a HTTP request) alongside the - // handshake, - // reducing the effective round trips to "zero". This applies to TLS - // 1.3 - // connections over TCP (HTTP/2) as well as over UDP (QUIC/h3). - // - // - // This can improve application performance, especially on networks - // where - // interruptions may be common, such as on mobile. - // - // - // Requests with Early Data will have the "Early-Data" HTTP header set on - // the request, with a value of "1", to allow the backend to determine - // whether - // Early Data was included. - // - // - // Note: TLS Early Data may allow requests to be replayed, as the data is - // sent to the backend before the handshake has fully completed. - // Applications - // that allow idempotent HTTP methods to make non-idempotent changes, such as - // a GET request updating a database, should not accept Early Data on - // those - // requests, and reject requests with the "Early-Data: 1" HTTP header - // by - // returning a HTTP 425 (Too Early) status code, in order to remain - // RFC - // compliant. - // - // - // The default value is DISABLED. - // - // Possible values: - // "DISABLED" - TLS 1.3 Early Data is not advertised, and any (invalid) - // attempts to send - // Early Data will be rejected by closing the connection. - // "PERMISSIVE" - This enables TLS 1.3 0-RTT, and only allows Early Data to - // be included on - // requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode - // does not enforce any other limitations for requests with Early Data. - // The - // application owner should validate that Early Data is acceptable for a - // given request path. - // "STRICT" - This enables TLS 1.3 0-RTT, and only allows Early Data to be - // included on - // requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without - // query - // parameters. Requests that send Early Data with non-idempotent HTTP - // methods or with query parameters will be rejected with a HTTP 425. - // "UNRESTRICTED" - This enables TLS 1.3 Early Data for requests with any - // HTTP method - // including non-idempotent methods list POST. This mode does not enforce - // any other limitations. This may be valuable for gRPC use cases. However, - // we do not recommend this method unless you have evaluated your - // security - // stance and mitigated the risk of replay attacks using other mechanisms. - TlsEarlyData string `json:"tlsEarlyData,omitempty"` - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource that - // defines - // the mapping from URL to the BackendService. For example, the following - // are - // all valid URLs for specifying a URL map: - // - // - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map - // - projects/project/global/urlMaps/url-map - // - global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Authentication") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authentication") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxiesScopedList resources. - Items map[string]TargetHttpsProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetHttpsProxyAggregatedList for lists of Target - // HTTP Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetHttpsProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpsProxyList for - // lists of target HTTPS proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyListWarning: [Output Only] Informational warning message. -type TargetHttpsProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstance: Represents a Target Instance resource. -// -// You can use a target instance to handle traffic for one or more -// forwarding -// rules, which is ideal for forwarding protocol traffic that is managed by -// a -// single source. For example, ESP, AH, TCP, or UDP. -// For more information, readTarget -// instances. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Instance: A URL to the virtual machine instance that handles traffic for - // this target - // instance. When creating a target instance, you can provide - // the - // fully-qualified URL or a valid partial URL to the desired virtual - // machine. - // For example, the following are all valid URLs: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - // Kind: [Output Only] The type of the resource. Alwayscompute#targetInstance - // for target instances. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NatPolicy: Must have a value of NO_NAT. - // Protocol forwarding delivers packets while preserving the destination - // IP - // address of the forwarding rule referencing the target instance. - // - // Possible values: - // "NO_NAT" - No NAT performed. - NatPolicy string `json:"natPolicy,omitempty"` - // Network: The URL of the network this target instance uses to forward - // traffic. - // If not specified, the traffic will be forwarded to the network that - // the default network interface belongs to. - Network string `json:"network,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // target instance. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Zone: [Output Only] URL of the zone where the target instance resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstance) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetInstanceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstanceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceListWarning: [Output Only] Informational warning message. -type TargetInstanceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstanceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedList struct { - // TargetInstances: A list of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstancesScopedListWarning: Informational warning which replaces the -// list of addresses when -// the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPool: Represents a Target Pool resource. -// -// Target pools are used with external passthrough Network Load Balancers. -// A target pool references member instances, an associated -// legacy -// HttpHealthCheck resource, and, optionally, a backup target pool. -// For more information, readUsing target pools. -type TargetPool struct { - // BackupPool: The server-defined URL for the resource. This field is - // applicable only when - // the containing target pool is serving a forwarding rule as the primary - // pool, and its failoverRatio field is properly set to a value - // between [0, 1].backupPool and failoverRatio together define - // the fallback behavior of the primary target pool: if the ratio of - // the - // healthy instances in the primary pool is at or belowfailoverRatio, traffic - // arriving at the load-balanced - // IP will be directed to the backup pool. - // - // In case where failoverRatio and backupPool - // are not set, or all the instances in the backup pool are unhealthy, - // the traffic will be directed back to the primary pool in the "force" - // mode, where traffic will be spread to the healthy instances with the - // best effort, or to all instances when no instance is healthy. - BackupPool string `json:"backupPool,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // FailoverRatio: This field is applicable only when the containing target pool - // is serving a - // forwarding rule as the primary pool (i.e., not as a backup pool to - // some - // other target pool). The value of the field must be in [0, 1]. - // - // If set, backupPool must also be set. They together define - // the fallback behavior of the primary target pool: if the ratio of - // the - // healthy instances in the primary pool is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // backup pool. - // - // In case where failoverRatio is not set or all the - // instances in the backup pool are unhealthy, the traffic will be - // directed back to the primary pool in the "force" mode, where traffic - // will be spread to the healthy instances with the - // best effort, or to all instances when no instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - // HealthChecks: The URL of the HttpHealthCheck resource. A member instance in - // this - // pool is considered healthy if and only if the health checks pass. - // Only legacy HttpHealthChecks are supported. Only one health check may - // be - // specified. - HealthChecks []string `json:"healthChecks,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Instances: A list of resource URLs to the virtual machine instances serving - // this pool. - // They must live in zones contained in the same region as this pool. - Instances []string `json:"instances,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the target pool resides. - Region string `json:"region,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // target pool. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SessionAffinity: Session affinity option, must be one of the following - // values: - // NONE: Connections from the same client IP may go to any - // instance in the pool. - // CLIENT_IP: Connections from the same client IP will go - // to the same instance in - // the pool while that instance remains healthy. - // CLIENT_IP_PROTO: Connections from the same client IP - // with the same IP protocol will go to the same instance in the - // pool while that instance remains healthy. - // - // Possible values: - // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP - // addresses. Connections - // from the same source IP address to the same destination IP address will - // be - // served by the same backend VM while that VM remains healthy. - // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source IP - // address. Connections from the - // same source IP address will be served by the same backend VM while that - // VM - // remains healthy. This option can only be used for Internal TCP/UDP - // Load Balancing. - // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and destination - // IP addresses, IP protocol, - // and source and destination ports. Connections for the same IP protocol - // from the same source IP address and port to the same destination IP - // address - // and port will be served by the same backend VM while that VM - // remains - // healthy. This option cannot be used for HTTP(S) load balancing. - // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination IP - // addresses, and IP - // protocol. Connections for the same IP protocol from the same source - // IP - // address to the same destination IP address will be served by the - // same - // backend VM while that VM remains healthy. This option cannot be used - // for - // HTTP(S) load balancing. - // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 - // loadbalancer. - // Only valid for HTTP(S) load balancing. - // "HEADER_FIELD" - The hash is based on a user specified header field. - // "HTTP_COOKIE" - The hash is based on a user provided cookie. - // "NONE" - No session affinity. Connections from the same client IP may - // go - // to any instance in the pool. - // "STRONG_COOKIE_AFFINITY" - Strong cookie-based affinity. Connections - // bearing the same cookie will be - // served by the same backend VM while that VM remains healthy, as long as - // the - // cookie has not expired. - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackupPool") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupPool") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPool) MarshalJSON() ([]byte, error) { - type NoMethod TargetPool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type NoMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetPoolAggregatedList - // for aggregated lists of - // target pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetPoolAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetPoolAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetPoolInstanceHealth - // when checking the health of - // an instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolInstanceHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetPoolListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolListWarning: [Output Only] Informational warning message. -type TargetPoolListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddHealthCheckRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target pool. - // This can - // be a full or partial URL. For example, the following are valid URLs: - // - // - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name - // - // - projects/project-id/zones/zone/instances/instance-name - // - zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddInstanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or valid - // partial URL. - // For example, the following are valid URLs: - // - // - - // https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check - // - // - projects/project/global/httpHealthChecks/health-check - // - global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveHealthCheckRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveInstanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedList struct { - // TargetPools: A list of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetPools") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetPools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolsScopedListWarning: Informational warning which replaces the list -// of addresses when -// the list is empty. -type TargetPoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetReference struct { - Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetReference) MarshalJSON() ([]byte, error) { - type NoMethod TargetReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the targetSslProxy. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetBackendServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetSslProxy. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetCertificateMapRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending data to - // the - // backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetProxyHeaderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to associate - // with this - // TargetSslProxy. At least one SSL certificate must be specified. - // Currently, you may specify up to 15 SSL certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxy: Represents a Target SSL Proxy resource. -// -// A target SSL proxy is a component of a Proxy Network Load Balancer. -// The forwarding rule references the target SSL proxy, and the target -// proxy -// then references a backend service. For more information, readProxy -// Network -// Load Balancer overview. -type TargetSslProxy struct { - // CertificateMap: URL of a certificate map that identifies a certificate map - // associated with - // the given target proxy. - // This field can only be set for global target proxies. - // If set, sslCertificates will be ignored. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetSslProxy for - // target SSL proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - // SslCertificates: URLs to SslCertificate resources that are used - // to - // authenticate connections to Backends. At least one SSL certificate - // must be specified. Currently, you may specify up to 15 SSL - // certificates. - // sslCertificates do not apply when the load balancing scheme is set - // to - // INTERNAL_SELF_MANAGED. - SslCertificates []string `json:"sslCertificates,omitempty"` - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetSslProxy - // resource. If not set, the TargetSslProxy resource will not have any - // SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetSslProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyListWarning: [Output Only] Informational warning message. -type TargetSslProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetSslProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesScopedList struct { - // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. - TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetTcpProxies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxiesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type TargetTcpProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the targetTcpProxy. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetBackendServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending data to - // the - // backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetProxyHeaderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: Represents a Target TCP Proxy resource. -// -// A target TCP proxy is a component of a Proxy Network Load Balancer. -// The forwarding rule references the target TCP proxy, and the target -// proxy -// then references a backend service. For more information, readProxy -// Network -// Load Balancer overview. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetTcpProxy for - // target TCP proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Region: [Output Only] URL of the region where the regional TCP proxy - // resides. - // This field is not applicable to global TCP proxy. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxiesScopedList resources. - Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetTcpProxyAggregatedList for lists of Target - // TCP Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetTcpProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyListWarning: [Output Only] Informational warning message. -type TargetTcpProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGateway: Represents a Target VPN Gateway resource. -// -// The target VPN gateway resource represents a Classic Cloud VPN gateway. -// For more information, read thethe -// Cloud VPN Overview. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. - // ForwardingRules are created usingcompute.forwardingRules.insert and - // associated with a VPN - // gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // TargetVpnGateway, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a TargetVpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: URL of the network to which this VPN gateway is attached. Provided - // by the - // client when the VPN gateway is created. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *TargetVpnGatewayParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the VPN gateway, - // which can be one of the following: CREATING, READY, FAILED, or DELETING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels - // are - // created using the compute.vpntunnels.insert method and - // associated with a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetVpnGatewayAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewayAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayListWarning: [Output Only] Informational warning message. -type TargetVpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayParams) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] A list of target VPN gateways contained in - // this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetVpnGateways") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational warning -// which replaces the list of addresses -// when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - // ActualOutputUrl: The actual output URL evaluated by a load balancer - // containing the scheme, - // host, path and query parameters. - ActualOutputUrl string `json:"actualOutputUrl,omitempty"` - // ActualRedirectResponseCode: Actual HTTP status code for rule with - // `urlRedirect` - // calculated by load balancer - ActualRedirectResponseCode int64 `json:"actualRedirectResponseCode,omitempty"` - // ActualService: BackendService or BackendBucket returned by load - // balancer. - ActualService string `json:"actualService,omitempty"` - // ExpectedOutputUrl: The expected output URL evaluated by a load balancer - // containing the scheme, - // host, path and query parameters. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - // ExpectedRedirectResponseCode: Expected HTTP status code for rule with - // `urlRedirect` - // calculated by load balancer - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - // ExpectedService: Expected BackendService or BackendBucket resource - // the given URL should be mapped to. - ExpectedService string `json:"expectedService,omitempty"` - // Headers: HTTP headers of the request. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - // Path: Path portion including query parameters in the URL. - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActualOutputUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActualOutputUrl") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestFailure) MarshalJSON() ([]byte, error) { - type NoMethod TestFailure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. Permissions - // with - // wildcards (such as '*' or 'storage.*') are not allowed. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsCertificateContext: [Deprecated] Defines the mechanism to obtain the -// client or server -// certificate. -// Defines the mechanism to obtain the client or server certificate. -type TlsCertificateContext struct { - // CertificatePaths: Specifies the certificate and private key paths. This - // field is - // applicable only if tlsCertificateSource is set to USE_PATH. - CertificatePaths *TlsCertificatePaths `json:"certificatePaths,omitempty"` - // CertificateSource: Defines how TLS certificates are obtained. - // - // Possible values: - // "INVALID" - // "USE_PATH" - USE_PATH specifies that the certificates and private key are - // obtained - // from a locally mounted filesystem path. - // "USE_SDS" - USE_SDS specifies that the certificates and private key are - // obtained from - // a SDS server. - CertificateSource string `json:"certificateSource,omitempty"` - // SdsConfig: Specifies the config to retrieve certificates through SDS. This - // field - // is applicable only if tlsCertificateSource is set to USE_SDS. - SdsConfig *SdsConfig `json:"sdsConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificatePaths") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificatePaths") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsCertificateContext) MarshalJSON() ([]byte, error) { - type NoMethod TlsCertificateContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsCertificatePaths: [Deprecated] The paths to the mounted TLS Certificates -// and private key. -// The paths to the mounted TLS Certificates and private key. -type TlsCertificatePaths struct { - // CertificatePath: The path to the file holding the client or server TLS - // certificate to use. - CertificatePath string `json:"certificatePath,omitempty"` - // PrivateKeyPath: The path to the file holding the client or server private - // key. - PrivateKeyPath string `json:"privateKeyPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificatePath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificatePath") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsCertificatePaths) MarshalJSON() ([]byte, error) { - type NoMethod TlsCertificatePaths - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsContext: [Deprecated] The TLS settings for the client or server. -// The TLS settings for the client or server. -type TlsContext struct { - // CertificateContext: Defines the mechanism to obtain the client or server - // certificate. - CertificateContext *TlsCertificateContext `json:"certificateContext,omitempty"` - // ValidationContext: Defines the mechanism to obtain the Certificate Authority - // certificate to - // validate the client/server certificate. If omitted, the proxy will - // not - // validate the server or client certificate. - ValidationContext *TlsValidationContext `json:"validationContext,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificateContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateContext") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsContext) MarshalJSON() ([]byte, error) { - type NoMethod TlsContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsValidationContext: [Deprecated] Defines the mechanism to obtain the -// Certificate Authority -// certificate to validate the client/server certificate. -// validate the client/server certificate. -type TlsValidationContext struct { - // CertificatePath: The path to the file holding the CA certificate to validate - // the - // client or server certificate. - CertificatePath string `json:"certificatePath,omitempty"` - // SdsConfig: Specifies the config to retrieve certificates through SDS. This - // field - // is applicable only if tlsCertificateSource is set to USE_SDS. - SdsConfig *SdsConfig `json:"sdsConfig,omitempty"` - // ValidationSource: Defines how TLS certificates are obtained. - // - // Possible values: - // "INVALID" - // "USE_PATH" - USE_PATH specifies that the certificates and private key are - // obtained - // from a locally mounted filesystem path. - // "USE_SDS" - USE_SDS specifies that the certificates and private key are - // obtained from - // a SDS server. - ValidationSource string `json:"validationSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificatePath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificatePath") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsValidationContext) MarshalJSON() ([]byte, error) { - type NoMethod TlsValidationContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UDPHealthCheck struct { - // Port: The UDP port number to which the health check prober sends packets. - // Valid - // values are 1 through 65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // Request: Raw data of request to send in payload of UDP packet. It is an - // error if - // this is empty. The request data can only be ASCII. - Request string `json:"request,omitempty"` - // Response: The bytes to match against the beginning of the response data. - // It is an error if this is empty. The response data can only be ASCII. - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UDPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod UDPHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Uint128 struct { - High uint64 `json:"high,omitempty,string"` - Low uint64 `json:"low,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "High") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "High") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Uint128) MarshalJSON() ([]byte, error) { - type NoMethod Uint128 - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpcomingMaintenance: Upcoming Maintenance notification information. -type UpcomingMaintenance struct { - // CanReschedule: Indicates if the maintenance can be customer triggered. - CanReschedule bool `json:"canReschedule,omitempty"` - // Date: [Output Only] The date when the maintenance will take place. - // This value is inRFC3339 - // text format. - // DEPRECATED: Use window_start_time instead. - Date string `json:"date,omitempty"` - // LatestWindowStartTime: The latest time for the planned maintenance window to - // start. - // This timestamp value is in RFC3339 text format. - LatestWindowStartTime string `json:"latestWindowStartTime,omitempty"` - // MaintenanceOnShutdown: Indicates whether the UpcomingMaintenance will be - // triggered on VM shutdown. - MaintenanceOnShutdown bool `json:"maintenanceOnShutdown,omitempty"` - // MaintenanceReasons: The reasons for the maintenance. Only valid for vms. - // - // Possible values: - // "FAILURE_DISK" - Maintenance due to disk errors. - // "FAILURE_GPU" - Maintenance due to GPU errors. - // "FAILURE_GPU_MULTIPLE_FAULTY_HOSTS_CUSTOMER_REPORTED" - Maintenance due to - // customer reported multiple faulty hosts via R&R - // Subblock API. - // "FAILURE_GPU_NVLINK_SWITCH_CUSTOMER_REPORTED" - Maintenance due to - // customer reported NVLink switch failure via R&R - // Subblock API. - // "FAILURE_GPU_TEMPERATURE" - Maintenance due to high GPU temperature. - // "FAILURE_GPU_XID" - Maintenance due to GPU xid failure. - // "FAILURE_INFRA" - Maintenance due to infrastructure errors. - // "FAILURE_INTERFACE" - Maintenance due to interface errors. - // "FAILURE_MEMORY" - Maintenance due to memory errors. - // "FAILURE_NETWORK" - Maintenance due to network errors. - // "FAILURE_NVLINK" - Maintenance due to NVLink failure. - // "FAILURE_REDUNDANT_HARDWARE_FAULT" - Maintenance due to redundant hardware - // fault. - // "FAILURE_TPU" - Maintenance due to TPU errors. - // "INFRASTRUCTURE_RELOCATION" - Maintenance due to infrastructure - // relocation. - // "MAINTENANCE_REASON_UNKNOWN" - Unknown maintenance reason. Do not use this - // value. - // "PLANNED_NETWORK_UPDATE" - Maintenance due to planned network update. - // "PLANNED_UPDATE" - Maintenance due to planned update to the instance. - MaintenanceReasons []string `json:"maintenanceReasons,omitempty"` - // Possible values: - // "ONGOING" - There is ongoing maintenance on this VM. - // "PENDING" - There is pending maintenance. - // "UNKNOWN" - Unknown maintenance status. Do not use this value. - MaintenanceStatus string `json:"maintenanceStatus,omitempty"` - // StartTimeWindow: [Output Only] The start time window of the maintenance - // disruption. - // DEPRECATED: Use window_start_time instead. - // TimeWindow is a container for two strings that represent timestamps - // in - // "yyyy-MM-dd'T'HH:mm:ssZ" text format. - StartTimeWindow *UpcomingMaintenanceTimeWindow `json:"startTimeWindow,omitempty"` - // Time: [Output Only] The time when the maintenance will take place. - // This value is inRFC3339 - // text format. - // DEPRECATED: Use window_start_time instead. - Time string `json:"time,omitempty"` - // Type: Defines the type of maintenance. - // - // Possible values: - // "MULTIPLE" - Multiple maintenance types in one window. - // This is only intended to be used for groups. - // "SCHEDULED" - Scheduled maintenance (e.g. maintenance after uptime - // guarantee is - // complete). - // "UNKNOWN_TYPE" - No type specified. Do not use this value. - // "UNSCHEDULED" - Unscheduled maintenance (e.g. emergency maintenance - // during - // uptime guarantee). - Type string `json:"type,omitempty"` - // WindowEndTime: The time by which the maintenance disruption will be - // completed. - // This timestamp value is in RFC3339 text format. - WindowEndTime string `json:"windowEndTime,omitempty"` - // WindowStartTime: The current start time of the maintenance window. - // This timestamp value is in RFC3339 text format. - WindowStartTime string `json:"windowStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanReschedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanReschedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpcomingMaintenance) MarshalJSON() ([]byte, error) { - type NoMethod UpcomingMaintenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpcomingMaintenanceTimeWindow: Represents a window of time using two -// timestamps: `earliest` and `latest`. -type UpcomingMaintenanceTimeWindow struct { - Earliest string `json:"earliest,omitempty"` - Latest string `json:"latest,omitempty"` - // ForceSendFields is a list of field names (e.g. "Earliest") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Earliest") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpcomingMaintenanceTimeWindow) MarshalJSON() ([]byte, error) { - type NoMethod UpcomingMaintenanceTimeWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMap: Represents a URL Map resource. -// -// Compute Engine has two URL Map resources: -// -// * Global (/compute/docs/reference/rest/alpha/urlMaps) -// * Regional (/compute/docs/reference/rest/alpha/regionUrlMaps) -// -// A URL map resource is a component of certain types of cloud load -// balancers -// and Traffic Director: -// -// * urlMaps are used by global external Application Load -// Balancers, classic Application Load Balancers, and cross-region -// internal -// Application Load Balancers. -// * regionUrlMaps are used by internal Application Load Balancers, -// regional external Application Load Balancers and regional -// internal -// Application Load Balancers. -// -// For a list of supported URL map features by the load balancer type, see -// the -// Load balancing features: Routing and traffic management table. -// -// For a list of supported URL map features for Traffic Director, see -// the -// Traffic Director features: Routing and traffic management table. -// -// This resource defines mappings from hostnames and URL paths to either -// a -// backend service or a backend bucket. -// -// To use the global urlMaps resource, the backend service must -// have a loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or -// INTERNAL_SELF_MANAGED. To use -// the regionUrlMaps resource, the backend service must have -// aloadBalancingScheme of INTERNAL_MANAGED. For more -// information, read URL -// Map Concepts. -type UrlMap struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy specifies - // how the Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // This policy takes - // effect at the load balancer level and applies only when no policy has - // been - // defined for the error code at lower levels like PathMatcher, RouteRule - // and - // PathRule within this UrlMap. - // - // For example, consider a UrlMap with the - // following configuration: - // - // - // - defaultCustomErrorResponsePolicy containing policies for - // responding to 5xx and 4xx errors - // - A PathMatcher configured for *.example.com has - // defaultCustomErrorResponsePolicy for 4xx. - // - // If a request for http://www.example.com/ encounters a404, the policy - // inpathMatcher.defaultCustomErrorResponsePolicy will be enforced. - // When the request for http://www.example.com/ encounters a502, the policy - // inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When - // a request that does not match any host in *.example.com such - // as http://www.myotherexample.com/, encounters a404, - // UrlMap.defaultCustomErrorResponsePolicy - // takes effect. - // - // When used in conjunction withdefaultRouteAction.retryPolicy, retries take - // precedence. Only - // once all retries are exhausted, thedefaultCustomErrorResponsePolicy is - // applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the defaultCustomErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // defaultCustomErrorResponsePolicy is supported only for - // global external Application Load Balancers. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // - // hostRules match. The load balancer performs advanced routing - // actions, such as URL rewrites and header transformations, before - // forwarding - // the request to the selected backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within defaultRouteAction. - // - // - // defaultRouteAction has no effect when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - // DefaultService: The full or partial URL of the defaultService resource - // to - // which traffic is directed if none of the hostRules match. - // If defaultRouteAction is also specified, advanced - // routing actions, such as URL rewrites, take effect before sending - // the - // request to the backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // defaultService has no effect when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - DefaultService string `json:"defaultService,omitempty"` - // DefaultUrlRedirect: When none of the specified hostRules match, the - // request - // is redirected to a URL specified by defaultUrlRedirect. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field is ignored - // when - // inserting a UrlMap. An up-to-date fingerprint must be provided - // in order to update the UrlMap, otherwise the request will - // fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backendService. - // - // The headerAction specified here take effect afterheaderAction specified - // under pathMatcher. - // - // headerAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // HostRules: The list of host rules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` - // Region: [Output Only] URL of the region where the regional URL map - // resides. - // This field is not applicable to global URL maps. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Tests: The list of expected URL mapping tests. Request to update theUrlMap - // succeeds only if all test cases pass. You can specify a - // maximum of 100 tests per UrlMap. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - Tests []*UrlMapTest `json:"tests,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMap) MarshalJSON() ([]byte, error) { - type NoMethod UrlMap - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UrlMapListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapListWarning: [Output Only] Informational warning message. -type UrlMapListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "UrlMap") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapReference) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // BackendServiceWeight: The weight to use for the supplied host and path when - // using advanced - // routing rules that involve traffic splitting. - BackendServiceWeight int64 `json:"backendServiceWeight,omitempty"` - // Description: Description of this test case. - Description string `json:"description,omitempty"` - // ExpectedOutputUrl: The expected output URL evaluated by the load - // balancer - // containing the scheme, host, path and query parameters. - // - // For rules that forward requests to backends, the test passes only - // whenexpectedOutputUrl matches the request forwarded by - // the load balancer to backends. For rules with urlRewrite, - // the test verifies that the forwarded request matcheshostRewrite and - // pathPrefixRewrite in theurlRewrite action. When service is - // specified,expectedOutputUrl`s scheme is ignored. - // - // For rules with urlRedirect, the test passes only ifexpectedOutputUrl matches - // the URL in the load balancer's - // redirect response. If urlRedirect specifieshttps_redirect, the test passes - // only if the scheme inexpectedOutputUrl is also set to HTTPS. - // If urlRedirect specifies strip_query, the test - // passes only if expectedOutputUrl does not contain any query - // parameters. - // - // expectedOutputUrl is optional whenservice is specified. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - // ExpectedRedirectResponseCode: For rules with urlRedirect, the test passes - // only ifexpectedRedirectResponseCode matches the HTTP status code in - // load balancer's redirect response. - // - // expectedRedirectResponseCode cannot be set whenservice is set. - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - // ExpectedUrlRedirect: The expected URL that should be redirected to for the - // host and path - // being tested. - // [Deprecated] This field is deprecated. - // Use expected_output_url instead. - ExpectedUrlRedirect string `json:"expectedUrlRedirect,omitempty"` - // Headers: HTTP headers for this request. If headers contains - // a host header, then host must also match the header value. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - // Host: Host portion of the URL. If headers contains a host header, - // then host must also match the header value. - Host string `json:"host,omitempty"` - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - // Service: Expected BackendService or BackendBucket resource - // the given URL should be mapped to. - // - // The service field cannot - // be set if expectedRedirectResponseCode is set. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendServiceWeight") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendServiceWeight") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapTest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapTestHeader: HTTP headers used in UrlMapTests. -type UrlMapTestHeader struct { - // Name: Header name. - Name string `json:"name,omitempty"` - // Value: Header value. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapTestHeader) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result for a -// UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - TestFailures []*TestFailure `json:"testFailures,omitempty"` - // TestPassed: If successfully loaded, this field indicates whether the test - // passed. - // If false, 'testFailures's indicate the reason of failure. - TestPassed bool `json:"testPassed,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoadErrors") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LoadErrors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapValidationResult - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of UrlMapsScopedList resources. - Items map[string]UrlMapsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UrlMapsAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapsAggregatedListWarning: [Output Only] Informational warning message. -type UrlMapsAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapsAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsScopedList struct { - // UrlMaps: A list of UrlMaps contained in this scope. - UrlMaps []*UrlMap `json:"urlMaps,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *UrlMapsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "UrlMaps") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UrlMaps") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapsScopedListWarning: Informational warning which replaces the list -// of -// backend services when the list is empty. -type UrlMapsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateRequest struct { - // LoadBalancingSchemes: Specifies the load balancer type(s) this validation - // request is for. UseEXTERNAL_MANAGED for global external Application - // Load - // Balancers and regional external Application Load Balancers. - // Use EXTERNAL for classic Application Load Balancers. - // - // Use INTERNAL_MANAGED for internal Application Load Balancers. For - // more - // information, refer to Choosing - // a load balancer. - // - // If unspecified, the load balancing scheme will be inferred from the - // backend - // service resources this URL map references. If that can not be inferred - // (for - // example, this URL map only references backend buckets, or this Url map - // is - // for rewrites and redirects only and doesn't reference any backends),EXTERNAL - // will be used as the default type. - // - // If specified, the scheme(s) must not conflict with the load balancing - // scheme of the backend service resources this Url map references. - // - // Possible values: - // "EXTERNAL" - Signifies that this will be used for classic Application Load - // Balancers. - // "EXTERNAL_MANAGED" - Signifies that this will be used for Envoy-based - // global external - // Application Load Balancers. - // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - If unspecified, the validation will - // try to infer the scheme from the - // backend service resources this Url map references. If the inference is - // not - // possible, EXTERNAL will be used as the default type. - LoadBalancingSchemes []string `json:"loadBalancingSchemes,omitempty"` - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoadBalancingSchemes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LoadBalancingSchemes") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlRewrite: The spec for modifying the path before sending the request to -// the matched -// backend service. -type UrlRewrite struct { - // HostRewrite: Before forwarding the request to the selected service, the - // request's - // host header is replaced with contents of hostRewrite. - // - // The value must be from 1 to 255 characters. - HostRewrite string `json:"hostRewrite,omitempty"` - // PathPrefixRewrite: Before forwarding the request to the selected backend - // service, the - // matching portion of the request's path is replaced bypathPrefixRewrite. - // - // The value must be from 1 to 1024 characters. - PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` - // PathTemplateRewrite: If specified, the pattern rewrites the URL path (based - // on the :path - // header) using the HTTP template syntax. - // - // A corresponding - // path_template_match must be specified. Any template variables must exist - // in - // the path_template_match field. - // - // - // - -At least one variable must be specified in the path_template_match - // field - // - You can omit variables from the rewritten URL - // - The * and ** operators cannot be matched - // unless they have a corresponding variable name - e.g. - // {format=*} or {var=**}. - // - // For example, a path_template_match of /static/{format=**} - // could be rewritten as /static/content/{format} to prefix/content to the URL. - // Variables can also be re-ordered in a - // rewrite, so that /{country}/{format}/{suffix=**} can be - // rewritten as /content/{format}/{country}/{suffix}. - // - // At least - // one non-empty routeRules[].matchRules[].path_template_match is - // required. - // - // Only one of path_prefix_rewrite orpath_template_rewrite may be specified. - PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRewrite") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRewrite") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlRewrite) MarshalJSON() ([]byte, error) { - type NoMethod UrlRewrite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetwork: Subnetwork which the current user has -// compute.subnetworks.use permission on. -type UsableSubnetwork struct { - // ExternalIpv6Prefix: [Output Only] The external IPv6 address range that is - // assigned to this - // subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range that is - // assigned to this - // subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: The access type of IPv6 address this subnet holds. It's - // immutable and can - // only be specified during creation or the first time the subnet is - // updated - // into IPV4_IPV6 dual stack. - // - // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // accessible - // via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // only - // accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Network: Network URL. - Network string `json:"network,omitempty"` - // Possible values: - // "AGGREGATE" - Subnetwork used to aggregate multiple private subnetworks. - // "CLOUD_EXTENSION" - Subnetworks created for Cloud Extension Machines. - // "CUSTOM_HARDWARE_LINK" - Subnetwork used for Custom Hardware Link. - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - Purpose string `json:"purpose,omitempty"` - // Role: The role of subnetwork. Currently, this field is only used - // when - // purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value - // can be set toACTIVE or BACKUP. An ACTIVE - // subnetwork is one that is currently being used for Envoy-based - // load - // balancers in a region. A BACKUP subnetwork is one that is - // ready to be promoted to ACTIVE or is currently draining. - // This field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` - // SecondaryIpRanges: Secondary IP ranges. - SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs - // in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs - // in the subnet can be assigned both IPv4 and - // IPv6 addresses. If not specified, IPV4_ONLY is used. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses. - StackType string `json:"stackType,omitempty"` - // Subnetwork: Subnetwork URL. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIpv6Prefix") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6Prefix") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetwork) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetworkSecondaryRange: Secondary IP range of a usable subnetwork. -type UsableSubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, used - // when adding - // an alias IP range to a VM instance. - // The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworkSecondaryRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UsableSubnetworksAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output] A list of usable subnetwork URLs. - Items []*UsableSubnetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#usableSubnetworksAggregatedList for aggregated lists - // of usable subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - // In special cases listUsable may return 0 subnetworks andnextPageToken which - // still should be used to get the - // next page of results. - NextPageToken string `json:"nextPageToken,omitempty"` - // ScopedWarnings: [Output Only] Informational warning messages for failures - // encountered from - // scopes. - ScopedWarnings []*SubnetworksScopedWarning `json:"scopedWarnings,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UsableSubnetworksAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetworksAggregatedListWarning: [Output Only] Informational warning -// message. -type UsableSubnetworksAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UsableSubnetworksAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UsableSubnetworksAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsageExportLocation: The location in Cloud Storage and naming method of the -// daily usage -// report. Contains bucket_name and report_name prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the usage - // report - // object is stored. The Google Service Account is granted write access to - // this bucket. This can either be the bucket name by itself, such - // asexample-bucket, or the bucket name with gs:// - // or https://storage.googleapis.com/ in front of it, such - // as gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - // ReportNamePrefix: An optional prefix for the name of the usage report object - // stored inbucketName. If not supplied, defaults tousage_gce. The report is - // stored as a CSV file namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD - // is the day of the usage according to Pacific Time. - // If you supply a prefix, it should conform to Cloud Storageobject - // naming - // conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsageExportLocation) MarshalJSON() ([]byte, error) { - type NoMethod UsageExportLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappings: Contain information of Nat mapping for a VM endpoint -// (i.e., NIC). -type VmEndpointNatMappings struct { - // InstanceName: Name of the VM instance which the endpoint belongs to - InstanceName string `json:"instanceName,omitempty"` - InterfaceNatMappings []*VmEndpointNatMappingsInterfaceNatMappings `json:"interfaceNatMappings,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat -// mapping for an interface of this endpoint. -type VmEndpointNatMappingsInterfaceNatMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings assigned to - // this interface. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - // NatIpPortRanges: A list of all IP:port-range mappings assigned to this - // interface. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this - // interface. It equals to the aggregated port number in the - // field - // drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated to this - // interface. - // It equals to the aggregated port number in the field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - // RuleMappings: Information about mappings provided by rules in this NAT. - RuleMappings []*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings `json:"ruleMappings,omitempty"` - // SourceAliasIpRange: Alias IP range for this interface endpoint. - // It will be a private (RFC 1918) IP range. - // Examples: "10.33.4.55/32", or "192.168.5.0/24". - SourceAliasIpRange string `json:"sourceAliasIpRange,omitempty"` - // SourceVirtualIp: Primary IP of the VM for this NIC. - SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainNatIpPortRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsInterfaceNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings: Contains -// information of NAT Mappings provided by a NAT Rule. -type VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings assigned to - // this interface - // by this rule. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - // NatIpPortRanges: A list of all IP:port-range mappings assigned to this - // interface by this - // rule. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this - // interface by this rule. - // It equals the aggregated port number in the field - // drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated to this - // interface - // by this rule. - // It equals the aggregated port number in the field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - // RuleNumber: Rule number of the NAT Rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainNatIpPortRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsList: Contains a list of VmEndpointNatMappings. -type VmEndpointNatMappingsList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#vmEndpointNatMappingsList for lists of Nat mappings of - // VM endpoints. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of Nat mapping information of VM endpoints. - Result []*VmEndpointNatMappings `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmEndpointNatMappingsListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsList) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsListWarning: [Output Only] Informational warning -// message. -type VmEndpointNatMappingsListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmEndpointNatMappingsListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmEndpointNatMappingsListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPoliciesScopedList struct { - // VmExtensionPolicies: List of VmExtensionPolicy resources contained in this - // scope. - VmExtensionPolicies []*VmExtensionPolicy `json:"vmExtensionPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *VmExtensionPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VmExtensionPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VmExtensionPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPoliciesScopedListWarning: Informational warning which replaces -// the list of -// backend services when the list is empty. -type VmExtensionPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicy: Represents a VM extension policy. -type VmExtensionPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // ExtensionPolicies: Required. A map of extension names (e.g., "cloudops") to - // their corresponding policy - // configurations. - ExtensionPolicies map[string]VmExtensionPolicyExtensionPolicy `json:"extensionPolicies,omitempty"` - // GlobalResourceLink: Optional. [Output Only] Link to the global policy that - // manages this zone policy, if - // applicable. - GlobalResourceLink string `json:"globalResourceLink,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSelectors: Optional. Selectors to target VMs for this policy. VMs - // are selected if they match - // *any* of the provided selectors (logical OR). If this list is empty, - // the - // policy applies to all VMs. - InstanceSelectors []*VmExtensionPolicyInstanceSelector `json:"instanceSelectors,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy. - Kind string `json:"kind,omitempty"` - // ManagedByGlobal: Optional. [Output Only] Indicates if this policy is managed - // by a global policy. - ManagedByGlobal bool `json:"managedByGlobal,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Priority: Optional. Priority of this policy. Used to resolve conflicts when - // multiple policies - // apply to the same extension. - // The policy priority is an integer from 0 to 65535, inclusive. Lower - // integers indicate higher priorities. If you do not specify a priority - // when - // creating a rule, it is assigned a priority of 1000. If priorities are - // equal, the policy with the more recent creation timestamp takes precedence. - Priority int64 `json:"priority,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: Optional. [Output Only] Current state of the policy: ACTIVE or - // DELETING. - // - // Possible values: - // "ACTIVE" - The policy is active and applied to matching VMs. - // Newly created VMs that match the policy will also receive the - // extension policy. - // "DELETING" - The policy is in the process of being deleted. After the - // extension is - // removed from all matching VMs, the policy will be deleted. - // "STATE_UNSPECIFIED" - Default value. Do not use. - State string `json:"state,omitempty"` - // UpdateTimestamp: [Output Only] Update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyAggregatedListResponse: Response for the aggregated list of -// VM extension policies. -type VmExtensionPolicyAggregatedListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VmExtensionPoliciesScopedList resources. - Items map[string]VmExtensionPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#VmExtensionPolicyAggregatedList for lists - // of - // VmExtensionPolicies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmExtensionPolicyAggregatedListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponse) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyAggregatedListResponseWarning: [Output Only] Informational -// warning message. -type VmExtensionPolicyAggregatedListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPolicyAggregatedListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyAggregatedListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyExtensionPolicy: Configuration for a specific VM extension. -type VmExtensionPolicyExtensionPolicy struct { - // PinnedVersion: Optional. The specific version of the extension to install. - // If not set, the latest - // version is used. - PinnedVersion string `json:"pinnedVersion,omitempty"` - // StringConfig: Optional. String-based configuration data for the extension. - StringConfig string `json:"stringConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PinnedVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PinnedVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyInstanceSelector: Defines how to select VMs to apply a zone -// VM extension policy. -type VmExtensionPolicyInstanceSelector struct { - // LabelSelector: Optional. LabelSelector selects VMs based on their labels. - LabelSelector *VmExtensionPolicyLabelSelector `json:"labelSelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelSelector") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyInstanceSelector) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyInstanceSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyLabelSelector: A LabelSelector is applied to a VM only if -// it matches all the specified -// labels. -type VmExtensionPolicyLabelSelector struct { - // InclusionLabels: Optional. A map of key-value pairs representing VM - // labels. - // VMs must have all of the labels specified in this map to be - // selected - // (logical AND). - // - // e.g. If the `inclusion_labels` are {("key1", "value1"), ("key2", - // "value2")}, the VM labels must contain both ("key1", "value1") and - // ("key2", "value2") to be selected. If the VM labels are ("key1", - // "value1") and ("something", "else"), it will not be selected. - // - // If the map is empty, it's considered a match. - InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "InclusionLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InclusionLabels") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyLabelSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyList struct { - // Etag: [Output Only] Fingerprint of this resource. A hash of the contents - // stored - // in this object. This field is used in optimistic locking. This field will - // be ignored when inserting a VmExtensionPolicy. An up-to-date - // fingerprint must be provided in order to update the VmExtensionPolicy. - // - // To see the latest value of the fingerprint, make a get() request to - // retrieve a VmExtensionPolicy. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of VM extension policy resources. - Items []*VmExtensionPolicy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmExtensionPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyListWarning: [Output Only] Informational warning message. -type VmExtensionPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGateway: Represents a HA VPN gateway. -// -// HA VPN is a high-availability (HA) Cloud VPN solution that lets you -// securely -// connect your on-premises network to your Google Cloud Virtual Private -// Cloud -// network through an IPsec VPN connection in a single region. -// For more information about Cloud HA VPN solutions, see -// Cloud VPN topologies . -type VpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GatewayIpVersion: The IP family of the gateway IPs for the HA-VPN gateway - // interfaces. If not - // specified, IPV4 will be used. - // - // Possible values: - // "IPV4" - Every HA-VPN gateway interface is configured with an IPv4 - // address. - // "IPV6" - Every HA-VPN gateway interface is configured with an IPv6 - // address. - GatewayIpVersion string `json:"gatewayIpVersion,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnGateway, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a VpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: URL of the network to which this VPN gateway is attached. Provided - // by the - // client when the VPN gateway is created. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *VpnGatewayParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the VPN gateway resides. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this VPN gateway to identify the IP protocols - // that are - // enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not - // specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 - // if the gateway IP version isIPV6. - // - // Possible values: - // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. - // "IPV4_ONLY" - Enable VPN gateway with only IPv4 protocol. - // "IPV6_ONLY" - Enable VPN gateway with only IPv6 protocol. - StackType string `json:"stackType,omitempty"` - // VpnInterfaces: The list of VPN interfaces associated with this VPN gateway. - VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod VpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnGateway resources. - Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayAggregatedListWarning: [Output Only] Informational warning -// message. -type VpnGatewayAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayList: Contains a list of VpnGateway resources. -type VpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnGateway resources. - Items []*VpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayListWarning: [Output Only] Informational warning message. -type VpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayParams) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayStatus struct { - // VpnConnections: List of VPN connection for this VpnGateway. - VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnConnections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnConnections") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatus) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high -// availability requirement state for the VPN connection -// between this Cloud VPN gateway and a peer gateway. -type VpnGatewayStatusHighAvailabilityRequirementState struct { - // State: Indicates the high availability requirement state for the VPN - // connection. - // Valid values are CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. - // - // Possible values: - // "CONNECTION_REDUNDANCY_MET" - VPN tunnels are configured with adequate - // redundancy from Cloud VPN - // gateway to the peer VPN gateway. For both GCP-to-non-GCP and - // GCP-to-GCP - // connections, the adequate redundancy is a pre-requirement for users to - // get 99.99% availability on GCP side; please note that for any - // connection, end-to-end 99.99% availability is subject to - // proper - // configuration on the peer VPN gateway. - // "CONNECTION_REDUNDANCY_NOT_MET" - VPN tunnels are not configured with - // adequate redundancy from the Cloud - // VPN gateway to the peer gateway - State string `json:"state,omitempty"` - // UnsatisfiedReason: Indicates the reason why the VPN connection does not meet - // the high - // availability redundancy criteria/requirement. - // Valid values is INCOMPLETE_TUNNELS_COVERAGE. - // - // Possible values: - // "INCOMPLETE_TUNNELS_COVERAGE" - UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusHighAvailabilityRequirementState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. -type VpnGatewayStatusTunnel struct { - // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is - // associated with. - LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` - // PeerGatewayInterface: The peer gateway interface this VPN tunnel is - // connected to, the peer - // gateway could either be an external VPN gateway or a Google Cloud - // VPN gateway. - PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` - // TunnelUrl: URL reference to the VPN tunnel. - TunnelUrl string `json:"tunnelUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocalGatewayInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalGatewayInterface") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusTunnel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN tunnels -// connected from this VpnGateway -// to the same peer gateway. The peer gateway could either be an external -// VPN -// gateway or a Google Cloud VPN gateway. -type VpnGatewayStatusVpnConnection struct { - // PeerExternalGateway: URL reference to the peer external VPN gateways to - // which the VPN tunnels - // in this VPN connection are connected. - // This field is mutually exclusive with peer_gcp_gateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` - // PeerGcpGateway: URL reference to the peer side VPN gateways to which the VPN - // tunnels in - // this VPN connection are connected. - // This field is mutually exclusive with peer_gcp_gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // State: HighAvailabilityRequirementState for the VPN connection. - State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` - // Tunnels: List of VPN tunnels that are in this VPN connection. - Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` - // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PeerExternalGateway") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusVpnConnection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayVpnGatewayInterface: A VPN gateway interface. -type VpnGatewayVpnGatewayInterface struct { - // Id: [Output Only] Numeric identifier for this VPN interface associated - // with - // the VPN gateway. - Id int64 `json:"id,omitempty"` - // InterconnectAttachment: URL of the VLAN attachment (interconnectAttachment) - // resource for this - // VPN gateway interface. When the value of this field is present, the - // VPN - // gateway is used for HA VPN over Cloud Interconnect; all egress - // or ingress traffic for this VPN gateway interface goes through the - // specified VLAN attachment resource. - InterconnectAttachment string `json:"interconnectAttachment,omitempty"` - // IpAddress: [Output Only] IP address for this VPN interface associated with - // the VPN - // gateway. - // The IP address could be either a regional external IP address or - // a regional internal IP address. The two IP addresses for a VPN gateway - // must be all regional external or regional internal IP addresses. - // There - // cannot be a mix of regional external IP addresses and regional internal - // IP addresses. For HA VPN over Cloud Interconnect, the IP addresses - // for both interfaces could either be regional internal IP addresses - // or - // regional external IP addresses. For regular (non HA VPN over - // Cloud - // Interconnect) HA VPN tunnels, the IP address must be a regional external - // IP address. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: [Output Only] IPv6 address for this VPN interface associated - // with the VPN - // gateway. - // The IPv6 address must be a regional external IPv6 address. The format is - // RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). - Ipv6Address string `json:"ipv6Address,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayVpnGatewayInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysGetStatusResponse struct { - Result *VpnGatewayStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysGetStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysScopedList struct { - // VpnGateways: [Output Only] A list of VPN gateways contained in this scope. - VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnGateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnGateways") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewaysScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses -// when the list is empty. -type VpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnel: Represents a Cloud VPN Tunnel resource. -// -// For more information about VPN, read the -// the Cloud VPN Overview. -type VpnTunnel struct { - // CapacityTier: Capacity tier of the VPN tunnel. This is used for IPsec over - // Interconnect - // tunnels to indicate different bandwidth limits. - // - // Possible values: - // "DEFAULT" - DEFAULT: A VPN tunnel which can support up to 1 Gbps. - // "HIGH" - HIGH: A VPN tunnel which can support up to 6 Gbps. - CapacityTier string `json:"capacityTier,omitempty"` - // CipherSuite: User specified list of ciphers to use for the phase 1 and phase - // 2 of the - // IKE protocol. - CipherSuite *VpnTunnelCipherSuite `json:"cipherSuite,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DetailedStatus: [Output Only] Detailed status message for the VPN tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IkeVersion: IKE protocol version to use when establishing the VPN tunnel - // with the peer - // VPN gateway. Acceptable IKE versions are 1 or 2. - // The default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnTunnel, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a VpnTunnel. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LocalTrafficSelector: Local traffic selector to use when establishing the - // VPN tunnel with the - // peer VPN gateway. The value should be a CIDR formatted string, for - // example: 192.168.0.0/16. The ranges must be disjoint. - // Only IPv4 is supported for Classic VPN tunnels. This field is output - // only - // for HA VPN tunnels. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *VpnTunnelParams `json:"params,omitempty"` - // PeerExternalGateway: URL of the peer side external VPN gateway to which this - // VPN tunnel is - // connected. - // Provided by the client when the VPN tunnel is created. - // This field is exclusive with the field peerGcpGateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` - // PeerExternalGatewayInterface: The interface ID of the external VPN gateway - // to which this VPN tunnel is - // connected. Provided by the client when the VPN tunnel is created. - // Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use - // depends on the external VPN gateway redundancy type. - PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - // PeerGcpGateway: URL of the peer side HA VPN gateway to which this VPN - // tunnel - // is connected. Provided by the client when the VPN tunnel is created. - // This field can be used when creating highly available VPN from VPC - // network - // to VPC network, the field is exclusive with the field - // peerExternalGateway. - // If provided, the VPN tunnel will automatically use the - // same - // vpnGatewayInterface ID in the peer Google Cloud VPN gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. This - // field can - // be set only for Classic VPN tunnels. - PeerIp string `json:"peerIp,omitempty"` - // Region: [Output Only] URL of the region where the VPN tunnel resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RemoteTrafficSelector: Remote traffic selectors to use when establishing the - // VPN tunnel with - // the peer VPN gateway. The value should be a CIDR formatted string, - // for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 - // is - // supported for Classic VPN tunnels. This field is output only for HA - // VPN - // tunnels. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - // Router: URL of the router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SharedSecret: Shared secret used to set the secure session between the Cloud - // VPN gateway - // and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - // Status: [Output Only] The status of the VPN tunnel, which can be one of - // the - // following: - // - // - PROVISIONING: Resource is being allocated for the VPN tunnel. - // - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs - // from - // the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and - // Route - // resources are needed to setup the VPN tunnel. - // - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - // - ESTABLISHED: Secure session is successfully established with the peer - // VPN. - // - NETWORK_ERROR: Deprecated, replaced by - // NO_INCOMING_PACKETS - // - AUTHORIZATION_ERROR: Auth error (for example, - // bad shared secret). - // - NEGOTIATION_FAILURE: Handshake failed. - // - DEPROVISIONING: Resources are being deallocated for the VPN - // tunnel. - // - FAILED: Tunnel creation has failed and the tunnel is not - // ready to be used. - // - NO_INCOMING_PACKETS: No incoming packets from - // peer. - // - REJECTED: Tunnel configuration was rejected, can be result - // of being denied access. - // - ALLOCATING_RESOURCES: Cloud VPN is in the - // process of allocating all required resources. - // - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted - // for Classic VPN tunnels or the project is in frozen state. - // - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, - // probably behind NAT. - // - TS_NARROWING_NOT_ALLOWED: Traffic selector - // narrowing not allowed for an HA-VPN tunnel. - // - // Possible values: - // "ALLOCATING_RESOURCES" - Cloud VPN is in the process of allocating all - // required resources - // (specifically, a borg task). - // "AUTHORIZATION_ERROR" - Auth error (e.g. bad shared secret). - // "DEPROVISIONING" - Resources is being deallocated for the VPN tunnel. - // "ESTABLISHED" - Secure session is successfully established with peer VPN. - // "FAILED" - Tunnel creation has failed and the tunnel is not ready to be - // used. - // "FIRST_HANDSHAKE" - Successful first handshake with peer VPN. - // "NEGOTIATION_FAILURE" - Handshake failed. - // "NETWORK_ERROR" - Deprecated, replaced by NO_INCOMING_PACKETS - // "NO_INCOMING_PACKETS" - No incoming packets from peer - // "PROVISIONING" - Resource is being allocated for the VPN tunnel. - // "REJECTED" - Tunnel configuration was rejected, can be result of being - // denylisted. - // "STOPPED" - Tunnel is stopped due to its Forwarding Rules being deleted. - // "WAITING_FOR_FULL_CONFIG" - Waiting to receive all VPN-related configs - // from user. Network, - // TargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are - // needed to setup VPN tunnel. - Status string `json:"status,omitempty"` - // TargetVpnGateway: URL of the Target VPN gateway with which this VPN tunnel - // is associated. - // Provided by the client when the VPN tunnel is created. - // This field can be set only for Classic VPN tunnels. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - // VpnGateway: URL of the VPN gateway with which this VPN tunnel is - // associated. - // Provided by the client when the VPN tunnel is created. This must be - // used (instead of target_vpn_gateway) if a High Availability VPN - // gateway - // resource is created. - VpnGateway string `json:"vpnGateway,omitempty"` - // VpnGatewayInterface: The interface ID of the VPN gateway with which this VPN - // tunnel is - // associated. - // Possible values are: `0`, `1`. - VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CapacityTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CapacityTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelAggregatedListWarning: [Output Only] Informational warning message. -type VpnTunnelAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelCipherSuite struct { - Phase1 *VpnTunnelPhase1Algorithms `json:"phase1,omitempty"` - Phase2 *VpnTunnelPhase2Algorithms `json:"phase2,omitempty"` - // ForceSendFields is a list of field names (e.g. "Phase1") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Phase1") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelCipherSuite) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelCipherSuite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelListWarning: [Output Only] Informational warning message. -type VpnTunnelListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelParams) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelPhase1Algorithms struct { - Dh []string `json:"dh,omitempty"` - Encryption []string `json:"encryption,omitempty"` - Integrity []string `json:"integrity,omitempty"` - Prf []string `json:"prf,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dh") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dh") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelPhase1Algorithms) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelPhase1Algorithms - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelPhase2Algorithms struct { - Encryption []string `json:"encryption,omitempty"` - Integrity []string `json:"integrity,omitempty"` - Pfs []string `json:"pfs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Encryption") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Encryption") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelPhase2Algorithms) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelPhase2Algorithms - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedList struct { - // VpnTunnels: A list of VPN tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnTunnels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelsScopedListWarning: Informational warning which replaces the list -// of addresses when -// the list is empty. -type VpnTunnelsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WafExpressionSet struct { - // Aliases: A list of alternate IDs. The format should be: - // - E.g. XSS-stable - // Generic suffix like "stable" is particularly useful if a policy - // likes to avail newer set of expressions without having to change - // the policy. - // A given alias name can't be used for more than one entity set. - Aliases []string `json:"aliases,omitempty"` - // Expressions: List of available expressions. - Expressions []*WafExpressionSetExpression `json:"expressions,omitempty"` - // Id: Google specified expression set ID. The format should be: - // - E.g. XSS-20170329 - // required - Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Aliases") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WafExpressionSet) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WafExpressionSetExpression struct { - // Id: Expression ID should uniquely identify the origin of the - // expression. - // E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set - // version 2.9.1 rule id 973337. - // The ID could be used to determine the individual attack definition - // that has been detected. It could also be used to exclude it from - // the policy in case of false positive. - // required - Id string `json:"id,omitempty"` - // Sensitivity: The sensitivity value associated with the WAF rule ID. This - // corresponds - // to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved - // for - // opt-in only rules. - Sensitivity int64 `json:"sensitivity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WafExpressionSetExpression) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSetExpression - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WaitForReplicationCatchUpRequest struct { - MaxWaitDuration string `json:"maxWaitDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxWaitDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxWaitDuration") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WaitForReplicationCatchUpRequest) MarshalJSON() ([]byte, error) { - type NoMethod WaitForReplicationCatchUpRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WeightedBackendService: In contrast to a single BackendService in -// -// HttpRouteAction to which all matching traffic is directed -// to,WeightedBackendService allows traffic to be split across -// multiple backend services. The volume of traffic for each -// backend service is proportional to the weight specified -// in each WeightedBackendService -type WeightedBackendService struct { - // BackendService: The full or partial URL to the default - // BackendService - // resource. Before - // forwarding the request to backendService, the load balancer - // applies any relevant headerActions specified as part of - // thisbackendServiceWeight. - BackendService string `json:"backendService,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take - // effect for the selected backendService. - // - // headerAction specified here take effect beforeheaderAction in the enclosing - // HttpRouteRule,PathMatcher and UrlMap. - // - // headerAction is not supported for load balancers that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // Weight: Specifies the fraction of traffic sent to a backend - // service, - // computed asweight / (sum of all weightedBackendService weights in - // routeAction). - // - // The selection of a backend service is determined only for new traffic. - // Once a user's request has been directed to a backend service, - // subsequent requests are sent to the same backend service as - // determined by the backend service's session affinity policy. - // Don't configure session affinity if you're using weighted traffic - // splitting. If you do, the weighted traffic splitting configuration - // takes - // precedence. - // - // The value must be from 0 to 1000. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WeightedBackendService) MarshalJSON() ([]byte, error) { - type NoMethod WeightedBackendService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Wire: A pseudowire that connects two Interconnect connections. -type Wire struct { - // AdminEnabled: [Output Only] Indicates whether the wire is enabled. - // When false, the wire is disabled. When true and when the wire group of - // the wire is also enabled, the wire is enabled. Defaults to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Endpoints: Wire endpoints are specific Interconnect connections. - Endpoints []*WireEndpoint `json:"endpoints,omitempty"` - // Label: [Output Only] A label that identifies the wire. The format of this - // label - // combines the existing labels of the wire group endpoints and - // Interconnect - // connections used by this wire in alphabetical order as - // follows: - // `ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1`, where: - // - // - ENDPOINT_A and ENDPOINT_B: are the labels - // that you entered as map keys when you specified the wire group endpoint - // objects. - // - CONNECTION_A1 and CONNECTION_B1: are the - // labels that you entered as map keys when you specified the wire group - // Interconnect objects. - Label string `json:"label,omitempty"` - // WireProperties: [Output Only] Properties of the wire. - WireProperties *WireProperties `json:"wireProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Wire) MarshalJSON() ([]byte, error) { - type NoMethod Wire - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireEndpoint: Wire endpoints are specific Interconnect connections. -type WireEndpoint struct { - Interconnect string `json:"interconnect,omitempty"` - VlanTag int64 `json:"vlanTag,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroup: A resource that represents a group of redundant wires. -type WireGroup struct { - // AdminEnabled: Indicates whether the wires in the wire group are enabled. - // When false, the - // wires in the wire group are disabled. When true and when - // there is simultaneously no wire-specific override of `adminEnabled` - // to - // false, a given wire is enabled. Defaults to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of the wire group. - Description string `json:"description,omitempty"` - // Endpoints: A map that contains the logical endpoints of the wire group. - // Specify - // key-value pairs for the map as follows: - // - // - Key: an RFC1035 user-specified label. - // - Value: an Endpoint object. - Endpoints map[string]WireGroupEndpoint `json:"endpoints,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#wireGroups for wire - // groups. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Reconciling: [Output Only] Indicates whether there are wire changes yet to - // be processed. - Reconciling bool `json:"reconciling,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceLevel: Service level details determined for the wire group - // configuration. - ServiceLevel *WireGroupServiceLevel `json:"serviceLevel,omitempty"` - // Topology: Topology details for the wire group configuration. - Topology *WireGroupTopology `json:"topology,omitempty"` - // WireGroupProperties: Properties of the wire group. - WireGroupProperties *WireGroupProperties `json:"wireGroupProperties,omitempty"` - // WireInputs: A map that contains optional settings for individual - // wires. - // Specify key-value pairs for the map as follows: - // - // - Key: the label of an existing wire. To view a wire label and its - // format, see the wires[].label field. - // - Value: a WireInputs object. - WireInputs map[string]WireGroupWireInputs `json:"wireInputs,omitempty"` - // WireProperties: Properties for all wires in the wire group. - WireProperties *WireProperties `json:"wireProperties,omitempty"` - // Wires: The single/redundant wire(s) managed by the wire group. - Wires []*Wire `json:"wires,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroup) MarshalJSON() ([]byte, error) { - type NoMethod WireGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupEndpoint: A logical endpoint for the wire group. An endpoint -// represents a metro that -// contains redundant Interconnect connections. A wire group is created -// between two endpoints. -type WireGroupEndpoint struct { - // Interconnects: A map that contains the redundant Interconnect connections. - // Specify - // key-value pairs for the map as follows: - // - // - Key: an RFC1035 user-specified label. - // - Value: an Interconnect object. - Interconnects map[string]WireGroupEndpointInterconnect `json:"interconnects,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnects") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupEndpointInterconnect: The redundant Interconnect connections for -// this endpoint. -type WireGroupEndpointInterconnect struct { - // Interconnect: Required. An Interconnect connection. You can specify the - // connection as - // a partial or full URL. If the connection is in a different project from - // the cross-site network, use a format that specifies the project. See - // the following examples of partial and full URLs: - // - // - // - // global/interconnects/NAME - // - // - // projects/PROJECT_ID/global/interconnects/NAME - // - // - - // - // https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME - Interconnect string `json:"interconnect,omitempty"` - // VlanTags: Required. To configure the wire group for VLAN mode, enter a VLAN - // tag, - // which is a number from `2` to `4093`. You can autoallocate a tag by - // entering `0`. To configure the wire group for port mode, enter `-1`. - // Review the following guidelines: - // - // - A VLAN tag must be unique for an Interconnect connection across all - // attachments and wire groups. - // - Both endpoints of a wire must use the same VLAN tag value. - // - Single wire and redundant type wire groups must have only one - // VLAN tag. - // - Port mode pseudowires must have a single VLAN tag with a value of - // `-1` for both endpoints. - // - Box and cross type wire groups must have two VLAN tags. The first - // is for the same-zone pseudowire, and the second is for the cross-zone - // pseudowire. - VlanTags []int64 `json:"vlanTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupEndpointInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupEndpointInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupList: Response for the list request. -type WireGroupList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of wire group resources. - Items []*WireGroup `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#wireGroups for wire - // groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *WireGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupList) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupListWarning: [Output Only] Informational warning message. -type WireGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*WireGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WireGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupProperties: The properties of a wire group. These -// properties -// determine how a group of redundant wires are created and managed. -type WireGroupProperties struct { - // Type: The type of the wire group, one of the following: - // - // - WIRE: a single pseudowire over two Interconnect connections with no - // redundancy. - // - REDUNDANT: two pseudowires over four Interconnect connections, with - // two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Each pseudowire connects Interconnect - // connections in matching edge availability domains of the two metros. - // - BOX_AND_CROSS: four pseudowires over four Interconnect connections, - // with two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Two pseudowires connect Interconnect - // connections in matching edge availability domains of the two metros. - // Two additional pseudowires connect the non-matching edge availability - // domains of the two metros. - // - // Possible values: - // "BOX_AND_CROSS" - Four pseudowires over four Interconnect - // connections, - // with two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Two pseudowires connect - // Interconnect - // connections in matching edge availability domains of the two metros. - // Two additional pseudowires connect the non-matching edge - // availability - // domains of the two metros. - // "REDUNDANT" - Two pseudowires over four Interconnect connections, with - // two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Each pseudowire connects - // Interconnect - // connections in matching edge availability domains of the two metros. - // "WIRE" - A single pseudowire over two Interconnect connections with no - // redundancy. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupProperties) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupServiceLevel: Service level details determined for the wire group -// configuration. -type WireGroupServiceLevel struct { - // AvailabilityClass: [Output Only] The availability SLA that the wire group - // qualifies for. One - // of the following: `NO_AVAILABILITY_SLA`, - // `AVAILABILITY_99`, - // `AVAILABILITY_999`, or `AVAILABILITY_9995`. - // - // Possible values: - // "AVAILABILITY_99" - 99% availability - // "AVAILABILITY_999" - 99.9% availability - // "AVAILABILITY_9995" - 99.95% availability - // "NO_AVAILABILITY_SLA" - No SLA - AvailabilityClass string `json:"availabilityClass,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityClass") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilityClass") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupServiceLevel) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupServiceLevel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupTopology: Topology details for the wire group. -type WireGroupTopology struct { - // Endpoints: Topology details for all endpoints in the wire group. - Endpoints []*WireGroupTopologyEndpoint `json:"endpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupTopology) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupTopologyEndpoint: Topology details for a single wire group -// endpoint. -type WireGroupTopologyEndpoint struct { - // City: The InterconnectLocation.city (metropolitan area designator) that - // all - // interconnects are located in. - City string `json:"city,omitempty"` - // Label: Endpoint label from the wire group. - Label string `json:"label,omitempty"` - // ForceSendFields is a list of field names (e.g. "City") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "City") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupTopologyEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupTopologyEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupWireInputs: Optional settings for individual wires. Allows -// wire-level control that -// can be useful for migration purposes. If you use this field, you opt-out -// of the SLA for the wire group. -type WireGroupWireInputs struct { - // AdminEnabled: Indicates whether the wire is enabled. - // When false, the wire is disabled. When true and when the wire group of - // the wire is also enabled, the wire is enabled. Defaults to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // WirePropertyOverrides: The overridden properties for the wire. Any - // properties that are not - // overridden are omitted from the object. Review the following guidelines: - // - // - If you apply wire overrides to a wire and its wire group bandwidth - // configuration is set to `SHARED_WITH_WIRE_GROUP`, the - // `meteredBandwidth` and `unmeteredBandwidth` properties must not differ - // from the wire group. - // - Overrides generate a `configurationNotice`. Ensure that differences - // in wire configuration are temporary. An example use case for wire - // overrides is slowly rolling out configuration changes to individual - // wires - // in a wire group. - WirePropertyOverrides *WireProperties `json:"wirePropertyOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupWireInputs) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupWireInputs - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireProperties: The properties of a wire. -type WireProperties struct { - // BandwidthAllocation: The configuration of the bandwidth allocation, one of - // the following: - // - // - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth - // allocation - // (and associated charges) for each wire in the group. - // - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures - // one unmetered bandwidth allocation for the wire group. The unmetered - // bandwidth is divided equally across each wire in the group, but dynamic - // throttling reallocates unused unmetered bandwidth from unused or - // underused - // wires to other wires in the group. - // - // Possible values: - // "ALLOCATE_PER_WIRE" - Configures a separate unmetered bandwidth allocation - // (and associated - // charges) for each wire in the group. - // "SHARED_WITH_WIRE_GROUP" - This is the default behavior. Configures one - // unmetered bandwidth - // allocation for the wire group. The unmetered bandwidth is divided - // equally - // across each wire in the group, but dynamic throttling reallocates - // unused - // unmetered bandwidth from unused or underused wires to other wires in - // the - // group. - BandwidthAllocation string `json:"bandwidthAllocation,omitempty"` - // BandwidthMetered: The metered bandwidth in Gigabits per second, using - // decimal units. `10` is - // 10 Gbps, `100` is 100 Gbps. The default value is `0`. You can - // specify - // unlimited bandwidth by entering `-1`. However, actual data transfer - // is - // limited by the port speed. - BandwidthMetered int64 `json:"bandwidthMetered,omitempty,string"` - // BandwidthUnmetered: The unmetered bandwidth in Gigabits per second, using - // decimal units. `10` - // is 10 Gbps, `100` is 100 Gbps. The bandwidth must be greater than 0. - BandwidthUnmetered int64 `json:"bandwidthUnmetered,omitempty,string"` - // FaultResponse: Response when a fault is detected in a pseudowire: - // - // - NONE: default. - // - DISABLE_PORT: set the port line protocol down when inline probes - // detect a fault. This setting is only permitted on port mode - // pseudowires. - // - // Possible values: - // "DISABLE_PORT" - Set the port line protocol down when inline probes detect - // a fault. This - // setting is only permitted on port mode pseudowires. - // "NONE" - Default. - FaultResponse string `json:"faultResponse,omitempty"` - // NetworkServiceClass: The network service class. - // - // Possible values: - // "BRONZE" - The lowest service class. - // "GOLD" - The highest service class. - NetworkServiceClass string `json:"networkServiceClass,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthAllocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthAllocation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireProperties) MarshalJSON() ([]byte, error) { - type NoMethod WireProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WorkloadIdentityConfig struct { - Identity string `json:"identity,omitempty"` - IdentityCertificateEnabled bool `json:"identityCertificateEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Identity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Identity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityConfig) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *XpnHostListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostList) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// XpnHostListWarning: [Output Only] Informational warning message. -type XpnHostListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*XpnHostListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostListWarning) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type XpnHostListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field - // supports project id (e.g., my-project-123) and project number - // (e.g. 12345678). - Id string `json:"id,omitempty"` - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnResourceId) MarshalJSON() ([]byte, error) { - type NoMethod XpnResourceId - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Zone: Represents a Zone resource. -// -// A zone is a deployment area. These deployment areas are subsets of a -// region. -// For example the zone us-east1-b is located in theus-east1 region. For more -// information, readRegions and -// Zones. -type Zone struct { - // AvailableCpuPlatforms: [Output Only] Available cpu/platform selections for - // the zone. - AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] Full URL reference to the region which hosts the zone. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] Status of the zone, either UP orDOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Zone) MarshalJSON() ([]byte, error) { - type NoMethod Zone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ZoneList: Contains a list of zone resources. -type ZoneList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ZoneListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneList) MarshalJSON() ([]byte, error) { - type NoMethod ZoneList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ZoneListWarning: [Output Only] Informational warning message. -type ZoneListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ZoneListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash in order to update or - // change - // labels. Make a get() request to the resource to get the latest - // fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute2-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute2-gen.go deleted file mode 100644 index 4688625e09211..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute2-gen.go +++ /dev/null @@ -1,93856 +0,0 @@ -// Copyright 2025 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 compute - -import ( - "context" - "fmt" - "net/http" - - internallog "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - gensupport "google.golang.org/api/internal/gensupport" -) - -type AcceleratorTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of accelerator types. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AcceleratorTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeAggregatedList.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 *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, 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 := &AcceleratorTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified accelerator type. -// -// - acceleratorType: Name of the accelerator type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.acceleratorType = acceleratorType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorType.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 *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, 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 := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of accelerator types that are available to the -// specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.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 *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, 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 := &AcceleratorTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of addresses. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AddressesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AddressesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.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 *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, 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 := &AddressAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// -// - address: Name of the address resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { - 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 -// details. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// -// - address: Name of the address resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Address.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 *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, 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 := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project by using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { - 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 -// details. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.address) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of addresses contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressList.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 *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, 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 := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesMoveCall struct { - s *Service - project string - region string - address string - regionaddressesmoverequest *RegionAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified address resource. -// -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -// - region: Name of the region for this request. -func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { - c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - c.regionaddressesmoverequest = regionaddressesmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { - 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 -// details. -func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionaddressesmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") - 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{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.move", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Address. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { - 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 -// details. -func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AdviceCalendarModeCall struct { - s *Service - project string - region string - calendarmodeadvicerequest *CalendarModeAdviceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CalendarMode: Advise how, where and when to create the requested amount of -// instances -// with specified accelerators, within the specified time and location -// limits. -// The method recommends creating future reservations for the -// requested -// resources. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AdviceService) CalendarMode(project string, region string, calendarmodeadvicerequest *CalendarModeAdviceRequest) *AdviceCalendarModeCall { - c := &AdviceCalendarModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.calendarmodeadvicerequest = calendarmodeadvicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AdviceCalendarModeCall) Fields(s ...googleapi.Field) *AdviceCalendarModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AdviceCalendarModeCall) Context(ctx context.Context) *AdviceCalendarModeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AdviceCalendarModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AdviceCalendarModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.calendarmodeadvicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/advice/calendarMode") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.advice.calendarMode", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.advice.calendarMode" call. -// Any non-2xx status code is an error. Response headers are in either -// *CalendarModeAdviceResponse.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 *AdviceCalendarModeCall) Do(opts ...googleapi.CallOption) (*CalendarModeAdviceResponse, 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 := &CalendarModeAdviceResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.advice.calendarMode", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AdviceCapacityCall struct { - s *Service - project string - region string - capacityadvicerequest *CapacityAdviceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Capacity: Advice on making real-time decisions (such as choosing zone -// or -// machine types) during deployment to maximize your chances of -// obtaining -// capacity. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AdviceService) Capacity(project string, region string, capacityadvicerequest *CapacityAdviceRequest) *AdviceCapacityCall { - c := &AdviceCapacityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.capacityadvicerequest = capacityadvicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AdviceCapacityCall) Fields(s ...googleapi.Field) *AdviceCapacityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AdviceCapacityCall) Context(ctx context.Context) *AdviceCapacityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AdviceCapacityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AdviceCapacityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.capacityadvicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/advice/capacity") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.advice.capacity", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.advice.capacity" call. -// Any non-2xx status code is an error. Response headers are in either -// *CapacityAdviceResponse.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 *AdviceCapacityCall) Do(opts ...googleapi.CallOption) (*CapacityAdviceResponse, 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 := &CapacityAdviceResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.advice.capacity", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of autoscalers. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AutoscalersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.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 *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, 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 := &AutoscalerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { - 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 -// details. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler resource. -// -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.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 *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, 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 := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { - 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 -// details. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerList.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 *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, 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 := &AutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { - 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 -// details. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - 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 -// details. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsAddSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds a key for validating requests with signed URLs for -// this backend -// bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the Signed URL -// Key should be -// -// added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { - c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.signedurlkey = signedurlkey - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { - 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 -// details. -func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signedurlkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.addSignedUrlKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.addSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsAddSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.addSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendBucket resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *BackendBucketsService) AggregatedList(project string) *BackendBucketsAggregatedListCall { - c := &BackendBucketsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsAggregatedListCall) Filter(filter string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *BackendBucketsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsAggregatedListCall) MaxResults(maxResults int64) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsAggregatedListCall) OrderBy(orderBy string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsAggregatedListCall) PageToken(pageToken string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *BackendBucketsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsAggregatedListCall) Fields(s ...googleapi.Field) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsAggregatedListCall) IfNoneMatch(entityTag string) *BackendBucketsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsAggregatedListCall) Context(ctx context.Context) *BackendBucketsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketAggregatedList.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 *BackendBucketsAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendBucketAggregatedList, 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 := &BackendBucketAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsAggregatedListCall) Pages(ctx context.Context, f func(*BackendBucketAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { - 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 -// details. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsDeleteSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes a key for validating requests with signed URLs -// for this backend -// bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the Signed URL -// Key should be -// -// added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { - c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.urlParams_.Set("keyName", keyName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { - 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 -// details. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.deleteSignedUrlKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.deleteSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsDeleteSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.deleteSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to return. -// - project: Project ID for this request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucket.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 *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, 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 := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { - c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.getIamPolicy" call. -// 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 *BackendBucketsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendBucket resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { - 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 -// details. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketList.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 *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, 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 := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend buckets in the specified -// project. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) ListUsable(project string) *BackendBucketsListUsableCall { - c := &BackendBucketsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsListUsableCall) Filter(filter string) *BackendBucketsListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsListUsableCall) MaxResults(maxResults int64) *BackendBucketsListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsListUsableCall) OrderBy(orderBy string) *BackendBucketsListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsListUsableCall) PageToken(pageToken string) *BackendBucketsListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsListUsableCall) Fields(s ...googleapi.Field) *BackendBucketsListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsListUsableCall) IfNoneMatch(entityTag string) *BackendBucketsListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsListUsableCall) Context(ctx context.Context) *BackendBucketsListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketListUsable.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 *BackendBucketsListUsableCall) Do(opts ...googleapi.CallOption) (*BackendBucketListUsable, 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 := &BackendBucketListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsListUsableCall) Pages(ctx context.Context, f func(*BackendBucketListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - backendBucket: Name of the BackendBucket resource to patch. -// - project: Project ID for this request. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { - 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 -// details. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendBucket string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetEdgeSecurityPolicy: Sets the edge security policy for the specified -// backend bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { - c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { - 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 -// details. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.setEdgeSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.setEdgeSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { - c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.setIamPolicy" call. -// 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 *BackendBucketsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { - c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendBucket resource with the data included -// in the -// request. -// -// - backendBucket: Name of the BackendBucket resource to update. -// - project: Project ID for this request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { - 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 -// details. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesAddSignedUrlKeyCall struct { - s *Service - project string - backendService string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds a key for validating requests with signed URLs for -// this backend -// service. -// -// - backendService: Name of the BackendService resource to which the Signed -// URL Key should be -// -// added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { - c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.signedurlkey = signedurlkey - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { - 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 -// details. -func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signedurlkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.addSignedUrlKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.addSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesAddSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.addSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *BackendServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceAggregatedList.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 *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, 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 := &BackendServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendService resource. -// -// - backendService: Name of the BackendService resource to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { - 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 -// details. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesDeleteSignedUrlKeyCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes a key for validating requests with signed URLs -// for this backend -// service. -// -// - backendService: Name of the BackendService resource to which the Signed -// URL Key should be -// -// added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { - c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.urlParams_.Set("keyName", keyName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { - 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 -// details. -func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.deleteSignedUrlKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.deleteSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesDeleteSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.deleteSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendService resource. -// -// - backendService: Name of the BackendService resource to return. -// - project: Project ID for this request. -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendService.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 *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetEffectiveSecurityPoliciesCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveSecurityPolicies: Returns effective security policies applied to -// this backend service. -// -// - backendService: Name of the Backend Service for this request. -// - project: Project ID for this request. -func (r *BackendServicesService) GetEffectiveSecurityPolicies(project string, backendService string) *BackendServicesGetEffectiveSecurityPoliciesCall { - c := &BackendServicesGetEffectiveSecurityPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Fields(s ...googleapi.Field) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) IfNoneMatch(entityTag string) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Context(ctx context.Context) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getEffectiveSecurityPolicies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getEffectiveSecurityPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServicesGetEffectiveSecurityPoliciesResponse.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 *BackendServicesGetEffectiveSecurityPoliciesCall) Do(opts ...googleapi.CallOption) (*BackendServicesGetEffectiveSecurityPoliciesResponse, 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 := &BackendServicesGetEffectiveSecurityPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getEffectiveSecurityPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for -// this -// BackendService. -// -// Example request body: -// -// { -// "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" -// } -// -// - backendService: Name of the BackendService resource to which the queried -// instance belongs. -// - project: . -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getHealth") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { - c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getIamPolicy" call. -// 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 *BackendServicesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendService resource in the specified project using -// the data included in the request. For more information, see -// Backend services overview. -// -// - project: Project ID for this request. -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { - 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 -// details. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend services in the specified -// project. -// -// - project: Project ID for this request. -func (r *BackendServicesService) ListUsable(project string) *BackendServicesListUsableCall { - c := &BackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesListUsableCall) Filter(filter string) *BackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesListUsableCall) MaxResults(maxResults int64) *BackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesListUsableCall) OrderBy(orderBy string) *BackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesListUsableCall) PageToken(pageToken string) *BackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesListUsableCall) Fields(s ...googleapi.Field) *BackendServicesListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesListUsableCall) IfNoneMatch(entityTag string) *BackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesListUsableCall) Context(ctx context.Context) *BackendServicesListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.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 *BackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified BackendService resource with the data included -// in the -// request. For more information, see -// Backend services overview. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { - 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 -// details. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetEdgeSecurityPolicy: Sets the edge security policy for the specified -// backend service. -// -// - backendService: Name of the BackendService resource to which the edge -// security policy -// -// should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { - c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { - 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 -// details. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setEdgeSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setEdgeSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesSetEdgeSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setEdgeSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { - c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setIamPolicy" call. -// 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 *BackendServicesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend -// service. For more information, seeGoogle -// Cloud Armor Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { - c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { - 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 -// details. -func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendService resource with the data included -// in the -// request. For more information, seeBackend -// services overview. -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { - 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 -// details. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksDeleteCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified cross-site network in the given scope. -// -// - crossSiteNetwork: Name of the cross-site network to delete. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Delete(project string, crossSiteNetwork string) *CrossSiteNetworksDeleteCall { - c := &CrossSiteNetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksDeleteCall) RequestId(requestId string) *CrossSiteNetworksDeleteCall { - 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 -// details. -func (c *CrossSiteNetworksDeleteCall) Fields(s ...googleapi.Field) *CrossSiteNetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksDeleteCall) Context(ctx context.Context) *CrossSiteNetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksGetCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified cross-site network in the given scope. -// -// - crossSiteNetwork: Name of the cross-site network to return. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Get(project string, crossSiteNetwork string) *CrossSiteNetworksGetCall { - c := &CrossSiteNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CrossSiteNetworksGetCall) Fields(s ...googleapi.Field) *CrossSiteNetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *CrossSiteNetworksGetCall) IfNoneMatch(entityTag string) *CrossSiteNetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksGetCall) Context(ctx context.Context) *CrossSiteNetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *CrossSiteNetwork.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 *CrossSiteNetworksGetCall) Do(opts ...googleapi.CallOption) (*CrossSiteNetwork, 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 := &CrossSiteNetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksInsertCall struct { - s *Service - project string - crosssitenetwork *CrossSiteNetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a cross-site network in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Insert(project string, crosssitenetwork *CrossSiteNetwork) *CrossSiteNetworksInsertCall { - c := &CrossSiteNetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crosssitenetwork = crosssitenetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksInsertCall) RequestId(requestId string) *CrossSiteNetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. -func (c *CrossSiteNetworksInsertCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksInsertCall { - 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 -// details. -func (c *CrossSiteNetworksInsertCall) Fields(s ...googleapi.Field) *CrossSiteNetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksInsertCall) Context(ctx context.Context) *CrossSiteNetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.crosssitenetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the cross-site networks for a project in the given scope. -// -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) List(project string) *CrossSiteNetworksListCall { - c := &CrossSiteNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *CrossSiteNetworksListCall) Filter(filter string) *CrossSiteNetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *CrossSiteNetworksListCall) MaxResults(maxResults int64) *CrossSiteNetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *CrossSiteNetworksListCall) OrderBy(orderBy string) *CrossSiteNetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *CrossSiteNetworksListCall) PageToken(pageToken string) *CrossSiteNetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *CrossSiteNetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *CrossSiteNetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CrossSiteNetworksListCall) Fields(s ...googleapi.Field) *CrossSiteNetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *CrossSiteNetworksListCall) IfNoneMatch(entityTag string) *CrossSiteNetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksListCall) Context(ctx context.Context) *CrossSiteNetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CrossSiteNetworkList.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 *CrossSiteNetworksListCall) Do(opts ...googleapi.CallOption) (*CrossSiteNetworkList, 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 := &CrossSiteNetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *CrossSiteNetworksListCall) Pages(ctx context.Context, f func(*CrossSiteNetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type CrossSiteNetworksPatchCall struct { - s *Service - project string - crossSiteNetwork string - crosssitenetwork *CrossSiteNetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified cross-site network with the data included -// in -// the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - crossSiteNetwork: Name of the cross-site network to update. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Patch(project string, crossSiteNetwork string, crosssitenetwork *CrossSiteNetwork) *CrossSiteNetworksPatchCall { - c := &CrossSiteNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.crosssitenetwork = crosssitenetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksPatchCall) RequestId(requestId string) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *CrossSiteNetworksPatchCall) UpdateMask(updateMask string) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. -func (c *CrossSiteNetworksPatchCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksPatchCall { - 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 -// details. -func (c *CrossSiteNetworksPatchCall) Fields(s ...googleapi.Field) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksPatchCall) Context(ctx context.Context) *CrossSiteNetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.crosssitenetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskSettingsGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Zonal Disk Settings. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *DiskSettingsService) Get(project string, zone string) *DiskSettingsGetCall { - c := &DiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskSettingsGetCall) Fields(s ...googleapi.Field) *DiskSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskSettingsGetCall) IfNoneMatch(entityTag string) *DiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskSettingsGetCall) Context(ctx context.Context) *DiskSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.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 *DiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, 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 := &DiskSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskSettingsPatchCall struct { - s *Service - project string - zone string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Zonal Disk Settings -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskSettingsService) Patch(project string, zone string, disksettings *DiskSettings) *DiskSettingsPatchCall { - c := &DiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disksettings = disksettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DiskSettingsPatchCall) RequestId(requestId string) *DiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *DiskSettingsPatchCall) UpdateMask(updateMask string) *DiskSettingsPatchCall { - 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 -// details. -func (c *DiskSettingsPatchCall) Fields(s ...googleapi.Field) *DiskSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskSettingsPatchCall) Context(ctx context.Context) *DiskSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskSettings") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DiskSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of disk types. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *DiskTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.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 *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, 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 := &DiskTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified disk type. -// -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskType.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 *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, 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 := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of disk types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskTypeList.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 *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, 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 := &DiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksAddResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to a disk. You can only -// add one -// policy which will be applied to this disk for scheduling snapshot -// creation. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { - c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { - 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 -// details. -func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of persistent disks. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *DisksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *DisksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.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 *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, 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 := &DiskAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Bulk create a set of disks. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { - c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkinsertdiskresource = bulkinsertdiskresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { - 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 -// details. -func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksBulkSetLabelsCall struct { - s *Service - project string - zone string - bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkSetLabels: Sets the labels on many disks at once. To learn more about -// labels, read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) BulkSetLabels(project string, zone string, bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest) *DisksBulkSetLabelsCall { - c := &DisksBulkSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkzonesetlabelsrequest = bulkzonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksBulkSetLabelsCall) RequestId(requestId string) *DisksBulkSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Resource sets the optional parameter "resource": Name or id of the resource -// for this request. -func (c *DisksBulkSetLabelsCall) Resource(resource string) *DisksBulkSetLabelsCall { - c.urlParams_.Set("resource", resource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksBulkSetLabelsCall) Fields(s ...googleapi.Field) *DisksBulkSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksBulkSetLabelsCall) Context(ctx context.Context) *DisksBulkSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksBulkSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksBulkSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkzonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkSetLabels") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.bulkSetLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.bulkSetLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksBulkSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.bulkSetLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot -// creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots -// in a project different from the source disk project. -// -// - disk: Name of the persistent disk to snapshot. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] Whether to -// attempt an application consistent snapshot by -// informing the OS to prepare for the snapshot process. -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { - 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 -// details. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.createSnapshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.createSnapshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified persistent disk. Deleting a disk removes its -// data -// permanently and is irreversible. However, deleting a disk does not -// delete any snapshots -// previously made from the disk. You must separatelydelete -// snapshots. -// -// - disk: Name of the persistent disk to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { - 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 -// details. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified persistent disk. -// -// - disk: Name of the persistent disk to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Disk.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 *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, 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 := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksGetAsyncReplicationStatusCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAsyncReplicationStatus: Gets the status of current async replication for -// a given device. -// -// - disk: Name of the Disk resource whose Async replication details are -// requested. -// -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) GetAsyncReplicationStatus(project string, zone string, disk string) *DisksGetAsyncReplicationStatusCall { - c := &DisksGetAsyncReplicationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksGetAsyncReplicationStatusCall) Fields(s ...googleapi.Field) *DisksGetAsyncReplicationStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksGetAsyncReplicationStatusCall) IfNoneMatch(entityTag string) *DisksGetAsyncReplicationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksGetAsyncReplicationStatusCall) Context(ctx context.Context) *DisksGetAsyncReplicationStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksGetAsyncReplicationStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetAsyncReplicationStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/getAsyncReplicationStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.getAsyncReplicationStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.getAsyncReplicationStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetAsyncReplicationStatusResponse.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 *DisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOption) (*GetAsyncReplicationStatusResponse, 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 := &GetAsyncReplicationStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.getAsyncReplicationStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { - c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.getIamPolicy" call. -// 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 *DisksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent disk in the specified project using the data -// in the request. You can create a disk from a source -// (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data -// disk by -// omitting all properties. You can also create a disk that is larger than -// the default size by specifying the sizeGb property. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of persistent disks contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskList.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 *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, 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 := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from a disk. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { - c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { - 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 -// details. -func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified persistent disk. -// You can only increase the size of the disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { - 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 -// details. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { - c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setIamPolicy" call. -// 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 *DisksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a disk. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - 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 -// details. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStartAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartAsyncReplication: Starts asynchronous replication. -// Must be invoked on the primary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { - c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { - 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 -// details. -func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStartAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstartasyncreplicationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.startAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStartAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStopAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopAsyncReplication: Stops asynchronous replication. -// Can be invoked either on the primary or on the secondary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { - c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { - 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 -// details. -func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.stopAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStopAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStopGroupAsyncReplicationCall struct { - s *Service - project string - zone string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. -// Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. This must be the zone of the -// primary -// -// or secondary disks in the consistency group. -func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { - c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { - 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 -// details. -func (c *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStopGroupAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.stopGroupAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStopGroupAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksUpdateCall struct { - s *Service - project string - zone string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified disk with the data included in the -// request. -// The update is performed only on selected fields included as part -// of update-mask. Only the following fields can be modified: user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { - c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disk2 = disk2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { - 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 -// details. -func (c *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksUpdateKmsKeyCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateKmsKey: Rotates the customer-managed -// encryption key to the latest version for the specified persistent disk. -// -// - disk: Name of the Disk resource, should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) UpdateKmsKey(project string, zone string, disk string) *DisksUpdateKmsKeyCall { - c := &DisksUpdateKmsKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksUpdateKmsKeyCall) RequestId(requestId string) *DisksUpdateKmsKeyCall { - 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 -// details. -func (c *DisksUpdateKmsKeyCall) Fields(s ...googleapi.Field) *DisksUpdateKmsKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksUpdateKmsKeyCall) Context(ctx context.Context) *DisksUpdateKmsKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksUpdateKmsKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksUpdateKmsKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/updateKmsKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.updateKmsKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.updateKmsKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksUpdateKmsKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.updateKmsKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksWaitForReplicationCatchUpCall struct { - s *Service - project string - zone string - disk string - waitforreplicationcatchuprequest *WaitForReplicationCatchUpRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// WaitForReplicationCatchUp: Wait for replication to catch up on the secondary -// disk. -// -// - disk: The name of the persistent disk. -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) WaitForReplicationCatchUp(project string, zone string, disk string, waitforreplicationcatchuprequest *WaitForReplicationCatchUpRequest) *DisksWaitForReplicationCatchUpCall { - c := &DisksWaitForReplicationCatchUpCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.waitforreplicationcatchuprequest = waitforreplicationcatchuprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksWaitForReplicationCatchUpCall) RequestId(requestId string) *DisksWaitForReplicationCatchUpCall { - 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 -// details. -func (c *DisksWaitForReplicationCatchUpCall) Fields(s ...googleapi.Field) *DisksWaitForReplicationCatchUpCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksWaitForReplicationCatchUpCall) Context(ctx context.Context) *DisksWaitForReplicationCatchUpCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksWaitForReplicationCatchUpCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksWaitForReplicationCatchUpCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.waitforreplicationcatchuprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/waitForReplicationCatchUp") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.waitForReplicationCatchUp", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.waitForReplicationCatchUp" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksWaitForReplicationCatchUpCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.waitForReplicationCatchUp", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysDeleteCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified externalVpnGateway. -// -// - externalVpnGateway: Name of the externalVpnGateways to delete. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { - c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { - 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 -// details. -func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysGetCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified externalVpnGateway. Get a list of -// available -// externalVpnGateways by making a list() request. -// -// - externalVpnGateway: Name of the externalVpnGateway to return. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { - c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExternalVpnGateway.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 *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, 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 := &ExternalVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysInsertCall struct { - s *Service - project string - externalvpngateway *ExternalVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { - c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalvpngateway = externalvpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { - 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 -// details. -func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.externalvpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of ExternalVpnGateway available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { - c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExternalVpnGatewayList.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 *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, 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 := &ExternalVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ExternalVpnGatewaysSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { - c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { - c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddAssociationCall struct { - s *Service - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { - c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPacketMirroringRule: Inserts a packet mirroring rule into a firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddPacketMirroringRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddPacketMirroringRuleCall { - c := &FirewallPoliciesAddPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddPacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesAddPacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesAddPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { - c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { - 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 -// details. -func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesCloneRulesCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { - c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesDeleteCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { - c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { - 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 -// details. -func (c *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesForceStartProgressiveRolloutCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ForceStartProgressiveRollout: Starts a brand new progressive rollout of -// hierarchical firewall policy. -// This API will return an error when there is an ongoing progressive rollout. -// -// - firewallPolicy: Name of the target firewall policy. -func (r *FirewallPoliciesService) ForceStartProgressiveRollout(firewallPolicy string) *FirewallPoliciesForceStartProgressiveRolloutCall { - c := &FirewallPoliciesForceStartProgressiveRolloutCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesForceStartProgressiveRolloutCall) Fields(s ...googleapi.Field) *FirewallPoliciesForceStartProgressiveRolloutCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesForceStartProgressiveRolloutCall) Context(ctx context.Context) *FirewallPoliciesForceStartProgressiveRolloutCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesForceStartProgressiveRolloutCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesForceStartProgressiveRolloutCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/forceStartProgressiveRollout") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.forceStartProgressiveRollout", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.forceStartProgressiveRollout" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesForceStartProgressiveRolloutCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.forceStartProgressiveRollout", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { - c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { - c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetIamPolicyCall 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. May be empty if -// no such -// policy or resource exists. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { - c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getIamPolicy" call. -// 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 *FirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPacketMirroringRule: Gets a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetPacketMirroringRule(firewallPolicy string) *FirewallPoliciesGetPacketMirroringRuleCall { - c := &FirewallPoliciesGetPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetPacketMirroringRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesGetPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getPacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *FirewallPoliciesGetPacketMirroringRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { - c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesInsertCall struct { - s *Service - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { - c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallpolicy = firewallpolicy - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { - 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 -// details. -func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the -// specified -// folder or organization. -func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { - c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FirewallPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { - c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// IncludeInheritedPolicies sets the optional parameter -// "includeInheritedPolicies": If set to "true", the response will contain a -// list of all associations for -// the containing folders and the containing organization of the target. -// The -// parameter has no effect if the target is an organization. -func (c *FirewallPoliciesListAssociationsCall) IncludeInheritedPolicies(includeInheritedPolicies bool) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("includeInheritedPolicies", fmt.Sprint(includeInheritedPolicies)) - return c -} - -// TargetResource sets the optional parameter "targetResource": The target -// resource to list associations. It is an organization, or a -// folder. -func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesListAssociationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/listAssociations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.listAssociations", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.listAssociations" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPoliciesListAssociationsResponse.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 *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, 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 := &FirewallPoliciesListAssociationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.listAssociations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesMoveCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { - c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// ParentId sets the optional parameter "parentId": The new parent of the -// firewall policy. The ID can be either be -// "folders/[FOLDER_ID]" if the parent is a folder -// or -// "organizations/[ORGANIZATION_ID]" if the parent is an organization. -func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { - 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 -// details. -func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/move") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.move", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchCall struct { - s *Service - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { - c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { - 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 -// details. -func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPacketMirroringRule: Patches a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchPacketMirroringRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchPacketMirroringRuleCall { - c := &FirewallPoliciesPatchPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchPacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesPatchPacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patchPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { - c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemoveAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { - c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemovePacketMirroringRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePacketMirroringRule: Deletes a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemovePacketMirroringRule(firewallPolicy string) *FirewallPoliciesRemovePacketMirroringRuleCall { - c := &FirewallPoliciesRemovePacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemovePacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesRemovePacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removePacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removePacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removePacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemoveRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { - c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesSetIamPolicyCall struct { - s *Service - resource string - globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { - c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalorganizationsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.setIamPolicy" call. -// 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 *FirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { - c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsDeleteCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified firewall. -// -// - firewall: Name of the firewall rule to delete. -// - project: Project ID for this request. -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { - 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 -// details. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall. -// -// - firewall: Name of the firewall rule to return. -// - project: Project ID for this request. -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Firewall.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 *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, 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 := &Firewall{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsInsertCall struct { - s *Service - project string - firewall *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a firewall rule in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { - 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 -// details. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of firewall rules available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallList.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 *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, 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 := &FirewallList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified firewall rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - firewall: Name of the firewall rule to patch. -// - project: Project ID for this request. -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { - 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 -// details. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - 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{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the -// request. -// Note that all fields will be updated if using PUT, even fields that are -// not -// specified. To update individual fields, please use PATCH instead. -// -// - firewall: Name of the firewall rule to update. -// - project: Project ID for this request. -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { - 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 -// details. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of forwarding rules. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ForwardingRulesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleAggregatedList.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 *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, 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 := &ForwardingRuleAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ForwardingRulesDeleteCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { - 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 -// details. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRule.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 *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, 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 := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ForwardingRule resource in the specified project and -// region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { - 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 -// details. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of ForwardingRule resources available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.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 *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, 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 := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ForwardingRulesPatchCall struct { - s *Service - project string - region string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. Currently, you can only -// patch the network_tier field. -// -// - forwardingRule: Name of the ForwardingRule resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { - c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { - 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 -// details. -func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - 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{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more about -// labels, -// read the -// Labeling Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { - 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 -// details. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for forwarding rule. The new target should be -// of the -// same type as the old target. -// -// - forwardingRule: Name of the ForwardingRule resource in which target is to -// be set. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { - 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 -// details. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") - 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{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.setTarget", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setTarget" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.setTarget", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of future reservations. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *FutureReservationsService) AggregatedList(project string) *FutureReservationsAggregatedListCall { - c := &FutureReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FutureReservationsAggregatedListCall) Filter(filter string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *FutureReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FutureReservationsAggregatedListCall) MaxResults(maxResults int64) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FutureReservationsAggregatedListCall) OrderBy(orderBy string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FutureReservationsAggregatedListCall) PageToken(pageToken string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FutureReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *FutureReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsAggregatedListCall) Fields(s ...googleapi.Field) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsAggregatedListCall) IfNoneMatch(entityTag string) *FutureReservationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsAggregatedListCall) Context(ctx context.Context) *FutureReservationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/futureReservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservationsAggregatedListResponse.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 *FutureReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsAggregatedListResponse, 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 := &FutureReservationsAggregatedListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FutureReservationsAggregatedListCall) Pages(ctx context.Context, f func(*FutureReservationsAggregatedListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FutureReservationsCancelCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancel the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Cancel(project string, zone string, futureReservation string) *FutureReservationsCancelCall { - c := &FutureReservationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsCancelCall) RequestId(requestId string) *FutureReservationsCancelCall { - 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 -// details. -func (c *FutureReservationsCancelCall) Fields(s ...googleapi.Field) *FutureReservationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsCancelCall) Context(ctx context.Context) *FutureReservationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsDeleteCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Delete(project string, zone string, futureReservation string) *FutureReservationsDeleteCall { - c := &FutureReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsDeleteCall) RequestId(requestId string) *FutureReservationsDeleteCall { - 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 -// details. -func (c *FutureReservationsDeleteCall) Fields(s ...googleapi.Field) *FutureReservationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsDeleteCall) Context(ctx context.Context) *FutureReservationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsGetCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Get(project string, zone string, futureReservation string) *FutureReservationsGetCall { - c := &FutureReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsGetCall) Fields(s ...googleapi.Field) *FutureReservationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsGetCall) IfNoneMatch(entityTag string) *FutureReservationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsGetCall) Context(ctx context.Context) *FutureReservationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservation.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 *FutureReservationsGetCall) Do(opts ...googleapi.CallOption) (*FutureReservation, 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 := &FutureReservation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsInsertCall struct { - s *Service - project string - zone string - futurereservation *FutureReservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Future Reservation. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Insert(project string, zone string, futurereservation *FutureReservation) *FutureReservationsInsertCall { - c := &FutureReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futurereservation = futurereservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsInsertCall) RequestId(requestId string) *FutureReservationsInsertCall { - 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 -// details. -func (c *FutureReservationsInsertCall) Fields(s ...googleapi.Field) *FutureReservationsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsInsertCall) Context(ctx context.Context) *FutureReservationsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.futurereservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list of all the future reservations that have been configured for -// the -// specified project in specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) List(project string, zone string) *FutureReservationsListCall { - c := &FutureReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FutureReservationsListCall) Filter(filter string) *FutureReservationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FutureReservationsListCall) MaxResults(maxResults int64) *FutureReservationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FutureReservationsListCall) OrderBy(orderBy string) *FutureReservationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FutureReservationsListCall) PageToken(pageToken string) *FutureReservationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FutureReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsListCall) Fields(s ...googleapi.Field) *FutureReservationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsListCall) IfNoneMatch(entityTag string) *FutureReservationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsListCall) Context(ctx context.Context) *FutureReservationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservationsListResponse.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 *FutureReservationsListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsListResponse, 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 := &FutureReservationsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FutureReservationsListCall) Pages(ctx context.Context, f func(*FutureReservationsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FutureReservationsUpdateCall struct { - s *Service - project string - zone string - futureReservation string - futurereservation *FutureReservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified future reservation. -// -// - futureReservation: Name of the reservation to update. Name should conform -// to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Update(project string, zone string, futureReservation string, futurereservation *FutureReservation) *FutureReservationsUpdateCall { - c := &FutureReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - c.futurereservation = futurereservation - return c -} - -// Paths sets the optional parameter "paths": -func (c *FutureReservationsUpdateCall) Paths(paths ...string) *FutureReservationsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsUpdateCall) RequestId(requestId string) *FutureReservationsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *FutureReservationsUpdateCall) UpdateMask(updateMask string) *FutureReservationsUpdateCall { - 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 -// details. -func (c *FutureReservationsUpdateCall) Fields(s ...googleapi.Field) *FutureReservationsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsUpdateCall) Context(ctx context.Context) *FutureReservationsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.futurereservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - 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{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// -// - address: Name of the address resource to delete. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { - 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 -// details. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// -// - address: Name of the address resource to return. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Address.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 *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, 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 := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesGetOwnerInstanceCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOwnerInstance: Find owner instance from given ip address -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) GetOwnerInstance(project string) *GlobalAddressesGetOwnerInstanceCall { - c := &GlobalAddressesGetOwnerInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// IpAddress sets the optional parameter "ipAddress": The VM IP address. -func (c *GlobalAddressesGetOwnerInstanceCall) IpAddress(ipAddress string) *GlobalAddressesGetOwnerInstanceCall { - c.urlParams_.Set("ipAddress", ipAddress) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesGetOwnerInstanceCall) Fields(s ...googleapi.Field) *GlobalAddressesGetOwnerInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalAddressesGetOwnerInstanceCall) IfNoneMatch(entityTag string) *GlobalAddressesGetOwnerInstanceCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesGetOwnerInstanceCall) Context(ctx context.Context) *GlobalAddressesGetOwnerInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesGetOwnerInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetOwnerInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/getOwnerInstance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.getOwnerInstance", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.getOwnerInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetOwnerInstanceResponse.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 *GlobalAddressesGetOwnerInstanceCall) Do(opts ...googleapi.CallOption) (*GetOwnerInstanceResponse, 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 := &GetOwnerInstanceResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.getOwnerInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project by using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { - 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 -// details. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.address) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of global addresses. -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalAddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalAddressesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressList.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 *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, 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 := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalAddressesMoveCall struct { - s *Service - project string - address string - globaladdressesmoverequest *GlobalAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified address resource from one project to another -// project. -// -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -func (r *GlobalAddressesService) Move(project string, address string, globaladdressesmoverequest *GlobalAddressesMoveRequest) *GlobalAddressesMoveCall { - c := &GlobalAddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - c.globaladdressesmoverequest = globaladdressesmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMoveCall { - 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 -// details. -func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesMoveCall) Context(ctx context.Context) *GlobalAddressesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globaladdressesmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}/move") - 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{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.move", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a GlobalAddress. To learn more about labels, -// read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalFolderOperationsGetCall struct { - s *Service - folder string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. -// -// - folder: Folder ID for this request. -// - operation: Name of the Operations resource to return. -func (r *GlobalFolderOperationsService) Get(folder string, operation string) *GlobalFolderOperationsGetCall { - c := &GlobalFolderOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.folder = folder - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalFolderOperationsGetCall) Fields(s ...googleapi.Field) *GlobalFolderOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalFolderOperationsGetCall) IfNoneMatch(entityTag string) *GlobalFolderOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalFolderOperationsGetCall) Context(ctx context.Context) *GlobalFolderOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalFolderOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalFolderOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+folder}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "folder": c.folder, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalFolderOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalFolderOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalFolderOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalFolderOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalFolderOperationsListCall struct { - s *Service - folder string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// folder. -// -// - folder: Folder ID for this request. -func (r *GlobalFolderOperationsService) List(folder string) *GlobalFolderOperationsListCall { - c := &GlobalFolderOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.folder = folder - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalFolderOperationsListCall) Filter(filter string) *GlobalFolderOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalFolderOperationsListCall) MaxResults(maxResults int64) *GlobalFolderOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalFolderOperationsListCall) OrderBy(orderBy string) *GlobalFolderOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalFolderOperationsListCall) PageToken(pageToken string) *GlobalFolderOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalFolderOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalFolderOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalFolderOperationsListCall) Fields(s ...googleapi.Field) *GlobalFolderOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalFolderOperationsListCall) IfNoneMatch(entityTag string) *GlobalFolderOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalFolderOperationsListCall) Context(ctx context.Context) *GlobalFolderOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalFolderOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalFolderOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+folder}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "folder": c.folder, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalFolderOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalFolderOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *GlobalFolderOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalFolderOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalFolderOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to delete. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { - 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 -// details. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of -// available forwarding rules by making a list() request. -// -// - forwardingRule: Name of the ForwardingRule resource to return. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRule.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 *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, 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 := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a GlobalForwardingRule resource in the specified project -// using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { - 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 -// details. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of GlobalForwardingRule resources available to -// the -// specified project. -// -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalForwardingRulesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.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 *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, 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 := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalForwardingRulesPatchCall struct { - s *Service - project string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. Currently, you can only -// patch the network_tier field. -// -// - forwardingRule: Name of the ForwardingRule resource to patch. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { - c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { - 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 -// details. -func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more about -// labels, -// read the -// Labeling resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { - c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for the GlobalForwardingRule resource. The new -// target -// should be of the same type as the old target. -// -// - forwardingRule: Name of the ForwardingRule resource in which target is to -// be set. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { - 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 -// details. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget") - 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setTarget", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setTarget", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { - c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a network endpoint to the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsattachendpointsrequest = globalnetworkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalnetworkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsDeleteCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group.Note that the NEG -// cannot be -// deleted if there are backend services referencing it. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Delete(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsDeleteCall { - c := &GlobalNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach the network endpoint from the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// removing network -// -// endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsdetachendpointsrequest = globalnetworkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalnetworkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsGetCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Get(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsGetCall { - c := &GlobalNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsGetCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsInsertCall struct { - s *Service - project string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpointgroup *NetworkEndpointGroup) *GlobalNetworkEndpointGroupsInsertCall { - c := &GlobalNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsInsertCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of network endpoint groups that are located in -// the -// specified project. -// -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) List(project string) *GlobalNetworkEndpointGroupsListCall { - c := &GlobalNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalNetworkEndpointGroupsListCall) Filter(filter string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalNetworkEndpointGroupsListCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsListCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalNetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) ListNetworkEndpoints(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all operations. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *GlobalOperationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOperationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *GlobalOperationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.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 *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, 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 := &OperationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Delete(project string, operationid string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type GlobalOperationsGetCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Get(project string, operationid string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// project. -// -// - project: Project ID for this request. -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsWaitCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method differs from the -// `GET` method in that it waits for no more than the default -// deadline (2 minutes) and then returns the current state of the -// operation, -// which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Wait(project string, operationid string) *GlobalOperationsWaitCall { - c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsWaitCall) Fields(s ...googleapi.Field) *GlobalOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsWaitCall) Context(ctx context.Context) *GlobalOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOrganizationOperationsDeleteCall struct { - s *Service - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -func (r *GlobalOrganizationOperationsService) Delete(operationid string) *GlobalOrganizationOperationsDeleteCall { - c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operationid = operationid - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *GlobalOrganizationOperationsDeleteCall) ParentId(parentId string) *GlobalOrganizationOperationsDeleteCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsDeleteCall) Context(ctx context.Context) *GlobalOrganizationOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.delete" call. -func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type GlobalOrganizationOperationsGetCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. Gets a list of -// operations -// by making a `list()` request. -// -// - operation: Name of the Operations resource to return. Parent is derived -// from this -// -// field. -func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { - c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// Not used. Parent is derived from resource_id. -func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOrganizationOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsGetCall) Context(ctx context.Context) *GlobalOrganizationOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOrganizationOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOrganizationOperationsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// organization. -func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperationsListCall { - c := &GlobalOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOrganizationOperationsListCall) Filter(filter string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOrganizationOperationsListCall) MaxResults(maxResults int64) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOrganizationOperationsListCall) OrderBy(orderBy string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOrganizationOperationsListCall) PageToken(pageToken string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *GlobalOrganizationOperationsListCall) ParentId(parentId string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOrganizationOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsListCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOrganizationOperationsListCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsListCall) Context(ctx context.Context) *GlobalOrganizationOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOrganizationOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalPublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified global PublicDelegatedPrefix. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesDeleteCall { - c := &GlobalPublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesDeleteCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesGetCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified global PublicDelegatedPrefix resource. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -func (r *GlobalPublicDelegatedPrefixesService) Get(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesGetCall { - c := &GlobalPublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalPublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalPublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesGetCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.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 *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, 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 := &PublicDelegatedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesInsertCall struct { - s *Service - project string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a global PublicDelegatedPrefix in the specified project -// using the -// parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesInsertCall { - c := &GlobalPublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesInsertCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the global PublicDelegatedPrefixes for a project. -// -// - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) List(project string) *GlobalPublicDelegatedPrefixesListCall { - c := &GlobalPublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalPublicDelegatedPrefixesListCall) Filter(filter string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalPublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalPublicDelegatedPrefixesListCall) OrderBy(orderBy string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalPublicDelegatedPrefixesListCall) PageToken(pageToken string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalPublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesListCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.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 *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, 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 := &PublicDelegatedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalPublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalPublicDelegatedPrefixesPatchCall struct { - s *Service - project string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified global PublicDelegatedPrefix resource with the -// data -// included in the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesPatchCall { - c := &GlobalPublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesPatchCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - 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{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all VM Extension Policy -// resources -// available to the specified project. -// -// To prevent failure, it's recommended that you set the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *GlobalVmExtensionPoliciesService) AggregatedList(project string) *GlobalVmExtensionPoliciesAggregatedListCall { - c := &GlobalVmExtensionPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Filter(filter string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalVmExtensionPoliciesAggregatedListCall) MaxResults(maxResults int64) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) OrderBy(orderBy string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) PageToken(pageToken string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicyAggregatedListResponse.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 *GlobalVmExtensionPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicyAggregatedListResponse, 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 := &VmExtensionPolicyAggregatedListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalVmExtensionPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*VmExtensionPolicyAggregatedListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalVmExtensionPoliciesDeleteCall struct { - s *Service - project string - globalVmExtensionPolicy string - globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Purge scoped resources (zonal policies) from a global VM -// extension -// policy, and then delete the global VM extension policy. Purge of the -// scoped -// resources is a pre-condition of the global VM extension policy deletion. -// The deletion of the global VM extension policy happens after the -// purge -// rollout is done, so it's not a part of the LRO. It's an automatic -// process -// that triggers in the backend. -// -// - globalVmExtensionPolicy: Name of the global VM extension policy to purge -// scoped resources for. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Delete(project string, globalVmExtensionPolicy string, globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput) *GlobalVmExtensionPoliciesDeleteCall { - c := &GlobalVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - c.globalvmextensionpolicyrolloutoperationrolloutinput = globalvmextensionpolicyrolloutoperationrolloutinput - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesDeleteCall) RequestId(requestId string) *GlobalVmExtensionPoliciesDeleteCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicyrolloutoperationrolloutinput) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete") - 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{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesGetCall struct { - s *Service - project string - globalVmExtensionPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a global VM extension policy. -// -// - globalVmExtensionPolicy: Name of the GlobalVmExtensionPolicy resource to -// return. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Get(project string, globalVmExtensionPolicy string) *GlobalVmExtensionPoliciesGetCall { - c := &GlobalVmExtensionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesGetCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesGetCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesGetCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GlobalVmExtensionPolicy.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 *GlobalVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GlobalVmExtensionPolicy, 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 := &GlobalVmExtensionPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesInsertCall struct { - s *Service - project string - globalvmextensionpolicy *GlobalVmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new project level GlobalVmExtensionPolicy. -// -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Insert(project string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesInsertCall { - c := &GlobalVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalvmextensionpolicy = globalvmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesInsertCall) RequestId(requestId string) *GlobalVmExtensionPoliciesInsertCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesInsertCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists global VM extension policies. -// -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) List(project string) *GlobalVmExtensionPoliciesListCall { - c := &GlobalVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalVmExtensionPoliciesListCall) Filter(filter string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalVmExtensionPoliciesListCall) MaxResults(maxResults int64) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalVmExtensionPoliciesListCall) OrderBy(orderBy string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalVmExtensionPoliciesListCall) PageToken(pageToken string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesListCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *GlobalVmExtensionPolicyList.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 *GlobalVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*GlobalVmExtensionPolicyList, 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 := &GlobalVmExtensionPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*GlobalVmExtensionPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalVmExtensionPoliciesUpdateCall struct { - s *Service - project string - globalVmExtensionPolicy string - globalvmextensionpolicy *GlobalVmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a global VM extension policy. -// -// - globalVmExtensionPolicy: Name of the global VM extension policy to update. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Update(project string, globalVmExtensionPolicy string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesUpdateCall { - c := &GlobalVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - c.globalvmextensionpolicy = globalvmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesUpdateCall) RequestId(requestId string) *GlobalVmExtensionPoliciesUpdateCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}") - 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{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HaControllersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the HaControllers in -// the specified -// project across all regions. -// -// - project: Project ID for this request. -func (r *HaControllersService) AggregatedList(project string) *HaControllersAggregatedListCall { - c := &HaControllersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HaControllersAggregatedListCall) Filter(filter string) *HaControllersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *HaControllersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HaControllersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HaControllersAggregatedListCall) MaxResults(maxResults int64) *HaControllersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HaControllersAggregatedListCall) OrderBy(orderBy string) *HaControllersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HaControllersAggregatedListCall) PageToken(pageToken string) *HaControllersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HaControllersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HaControllersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *HaControllersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *HaControllersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HaControllersAggregatedListCall) Fields(s ...googleapi.Field) *HaControllersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HaControllersAggregatedListCall) IfNoneMatch(entityTag string) *HaControllersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersAggregatedListCall) Context(ctx context.Context) *HaControllersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/haControllers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HaControllersAggregatedList.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 *HaControllersAggregatedListCall) Do(opts ...googleapi.CallOption) (*HaControllersAggregatedList, 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 := &HaControllersAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HaControllersAggregatedListCall) Pages(ctx context.Context, f func(*HaControllersAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HaControllersDeleteCall struct { - s *Service - project string - region string - haController string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an HaController in the specified project. -// -// - haController: Name of the HaController resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) Delete(project string, region string, haController string) *HaControllersDeleteCall { - c := &HaControllersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.haController = haController - 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 will know to ignore -// the -// request if it has already been completed. -func (c *HaControllersDeleteCall) RequestId(requestId string) *HaControllersDeleteCall { - 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 -// details. -func (c *HaControllersDeleteCall) Fields(s ...googleapi.Field) *HaControllersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersDeleteCall) Context(ctx context.Context) *HaControllersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers/{haController}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "haController": c.haController, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HaControllersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HaControllersFailoverCall struct { - s *Service - project string - region string - haController string - hacontrollersfailoverrequest *HaControllersFailoverRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Failover: Fails over a VM targeted by the specified HaController to the -// selected -// zone. -// -// - haController: ID of the HaController resource to update. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) Failover(project string, region string, haController string, hacontrollersfailoverrequest *HaControllersFailoverRequest) *HaControllersFailoverCall { - c := &HaControllersFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.haController = haController - c.hacontrollersfailoverrequest = hacontrollersfailoverrequest - 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 will know to ignore -// the -// request if it has already been completed. -func (c *HaControllersFailoverCall) RequestId(requestId string) *HaControllersFailoverCall { - 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 -// details. -func (c *HaControllersFailoverCall) Fields(s ...googleapi.Field) *HaControllersFailoverCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersFailoverCall) Context(ctx context.Context) *HaControllersFailoverCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersFailoverCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersFailoverCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hacontrollersfailoverrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers/{haController}/failover") - 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{ - "project": c.project, - "region": c.region, - "haController": c.haController, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.failover", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.failover" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HaControllersFailoverCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.failover", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HaControllersGetCall struct { - s *Service - project string - region string - haController string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all the details of a specific HaController. -// -// - haController: Name of the HaController resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) Get(project string, region string, haController string) *HaControllersGetCall { - c := &HaControllersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.haController = haController - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HaControllersGetCall) Fields(s ...googleapi.Field) *HaControllersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HaControllersGetCall) IfNoneMatch(entityTag string) *HaControllersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersGetCall) Context(ctx context.Context) *HaControllersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers/{haController}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "haController": c.haController, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HaController.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 *HaControllersGetCall) Do(opts ...googleapi.CallOption) (*HaController, 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 := &HaController{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HaControllersInsertCall struct { - s *Service - project string - region string - hacontroller *HaController - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates HaController in the specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) Insert(project string, region string, hacontroller *HaController) *HaControllersInsertCall { - c := &HaControllersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.hacontroller = hacontroller - 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 will know to ignore -// the -// request if it has already been completed. -func (c *HaControllersInsertCall) RequestId(requestId string) *HaControllersInsertCall { - 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 -// details. -func (c *HaControllersInsertCall) Fields(s ...googleapi.Field) *HaControllersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersInsertCall) Context(ctx context.Context) *HaControllersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hacontroller) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HaControllersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HaControllersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all HaControllers in the specified project in the specified -// region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) List(project string, region string) *HaControllersListCall { - c := &HaControllersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HaControllersListCall) Filter(filter string) *HaControllersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HaControllersListCall) MaxResults(maxResults int64) *HaControllersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HaControllersListCall) OrderBy(orderBy string) *HaControllersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HaControllersListCall) PageToken(pageToken string) *HaControllersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HaControllersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HaControllersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HaControllersListCall) Fields(s ...googleapi.Field) *HaControllersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HaControllersListCall) IfNoneMatch(entityTag string) *HaControllersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersListCall) Context(ctx context.Context) *HaControllersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HaControllersList.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 *HaControllersListCall) Do(opts ...googleapi.CallOption) (*HaControllersList, 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 := &HaControllersList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HaControllersListCall) Pages(ctx context.Context, f func(*HaControllersList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HaControllersPatchCall struct { - s *Service - project string - region string - haController string - hacontroller *HaController - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates HaController in the specified project. -// -// - haController: ID of the HaController resource to update. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *HaControllersService) Patch(project string, region string, haController string, hacontroller *HaController) *HaControllersPatchCall { - c := &HaControllersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.haController = haController - c.hacontroller = hacontroller - 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 will know to ignore -// the -// request if it has already been completed. -func (c *HaControllersPatchCall) RequestId(requestId string) *HaControllersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *HaControllersPatchCall) UpdateMask(updateMask string) *HaControllersPatchCall { - 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 -// details. -func (c *HaControllersPatchCall) Fields(s ...googleapi.Field) *HaControllersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HaControllersPatchCall) Context(ctx context.Context) *HaControllersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HaControllersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HaControllersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.hacontroller) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/haControllers/{haController}") - 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{ - "project": c.project, - "region": c.region, - "haController": c.haController, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.haControllers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.haControllers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HaControllersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.haControllers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthCheck resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { - c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *HealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *HealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthChecksAggregatedList.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 *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, 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 := &HealthChecksAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { - 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 -// details. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.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 *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, 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 := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { - 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 -// details. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.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 *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, 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 := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { - 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 -// details. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - 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{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { - c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - healthCheck: Name of the HealthCheck resource to update. -// - project: Project ID for this request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { - 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 -// details. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpHealthCheck resource. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { - 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 -// details. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpHealthCheck resource. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to return. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpHealthCheck.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 *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, 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 := &HttpHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { - 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 -// details. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpHealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HttpHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.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 *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, 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 := &HttpHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpHealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { - 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 -// details. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - 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{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { - c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to update. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { - 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 -// details. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpsHealthCheck resource. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { - 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 -// details. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpsHealthCheck resource. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to return. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.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 *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, 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 := &HttpsHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { - 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 -// details. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpsHealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HttpsHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpsHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.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 *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, 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 := &HttpsHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { - 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 -// details. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - 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{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { - c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to update. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { - 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 -// details. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImageFamilyViewsGetCall struct { - s *Service - project string - zone string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the latest image that is part of an image family, is -// not -// deprecated and is rolled out in the specified zone. -// -// - family: Name of the image family to search for. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *ImageFamilyViewsService) Get(project string, zone string, family string) *ImageFamilyViewsGetCall { - c := &ImageFamilyViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImageFamilyViewsGetCall) Fields(s ...googleapi.Field) *ImageFamilyViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImageFamilyViewsGetCall) IfNoneMatch(entityTag string) *ImageFamilyViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImageFamilyViewsGetCall) Context(ctx context.Context) *ImageFamilyViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImageFamilyViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImageFamilyViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/imageFamilyViews/{family}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "family": c.family, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.imageFamilyViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.imageFamilyViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ImageFamilyView.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 *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamilyView, 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 := &ImageFamilyView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.imageFamilyViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified image. -// -// - image: Name of the image resource to delete. -// - project: Project ID for this request. -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { - 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 -// details. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deprecate: Sets the deprecation status of an image. -// -// If an empty request body is given, clears the deprecation status instead. -// -// - image: Image name. -// - project: Project ID for this request. -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.deprecationstatus = deprecationstatus - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { - 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 -// details. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deprecationstatus) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}/deprecate") - 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{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.deprecate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.deprecate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.deprecate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified image. -// -// - image: Name of the image resource to return. -// - project: Project ID for this request. -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Image.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 *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, 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 := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetFromFamily: Returns the latest image that is part of an image family and -// is not -// deprecated. For more information on image families, seePublic -// image families documentation. -// -// - family: Name of the image family to search for. -// - project: The image project that the image belongs to. For example, to get -// a CentOS -// -// image, specify centos-cloud as the image project. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/family/{family}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "family": c.family, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.getFromFamily", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getFromFamily" call. -// Any non-2xx status code is an error. Response headers are in either -// *Image.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 *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, 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 := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.getFromFamily", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { - c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getIamPolicy" call. -// 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 *ImagesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an image in the specified project using the data included -// in the request. -// -// - project: Project ID for this request. -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image creation -// if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { - 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 -// details. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.image) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of custom images -// available to the specified project. Custom images are images you -// create that belong to your project. This method does not -// get any images that belong to other projects, including -// publicly-available -// images, like Debian 8. If you want to get a list of -// publicly-available -// images, use this method to make a request to the respective image -// project, -// such as debian-cloud or windows-cloud. -// -// - project: Project ID for this request. -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ImagesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Zone sets the optional parameter "zone": The zone query parameter. -func (c *ImagesListCall) Zone(zone string) *ImagesListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ImageList.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 *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, 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 := &ImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ImagesPatchCall struct { - s *Service - project string - image string - image2 *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified image with the data included in the -// request. -// Only the following fields can be modified: family, description, -// deprecation status. -// -// - image: Name of the image resource to patch. -// - project: Project ID for this request. -func (r *ImagesService) Patch(project string, image string, image2 *Image) *ImagesPatchCall { - c := &ImagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.image2 = image2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesPatchCall) RequestId(requestId string) *ImagesPatchCall { - 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 -// details. -func (c *ImagesPatchCall) Fields(s ...googleapi.Field) *ImagesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesPatchCall) Context(ctx context.Context) *ImagesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.image2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - 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{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { - c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setIamPolicy" call. -// 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 *ImagesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an image. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { - c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsCancelCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified resize request and removes it from the -// queue. -// Cancelled resize request does no longer wait for the resources to -// be -// provisioned. Cancel is only possible for requests that are accepted in -// the -// queue. -// -// - instanceGroupManager: The name of the managed instance group. -// The name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request to cancel. -// The name should conform to RFC1035 or be a resource ID. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Cancel(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsCancelCall { - c := &InstanceGroupManagerResizeRequestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsCancelCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsCancelCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified, inactive resize request. Requests that are -// still -// active cannot be deleted. Deleting request does not delete instances -// that -// were provisioned previously. -// -// - instanceGroupManager: The name of the managed instance group. -// The name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request to delete. -// The name should conform to RFC1035 or be a resource ID. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Delete(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsDeleteCall { - c := &InstanceGroupManagerResizeRequestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsDeleteCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsDeleteCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified resize request. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the -// href="/compute/docs/regions-zones/#available">zone -// scoping this request. Name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Get(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsGetCall { - c := &InstanceGroupManagerResizeRequestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagerResizeRequestsGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagerResizeRequestsGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagerResizeRequestsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsGetCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequest.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 *InstanceGroupManagerResizeRequestsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequest, 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 := &InstanceGroupManagerResizeRequest{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsInsertCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new resize request that starts provisioning VMs -// immediately -// or queues VM creation. -// -// - instanceGroupManager: The name of the managed instance group to which the -// resize request will -// be added. -// -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located and where the resize request will be -// created. -// -// Name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Insert(project string, zone string, instanceGroupManager string, instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest) *InstanceGroupManagerResizeRequestsInsertCall { - c := &InstanceGroupManagerResizeRequestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerresizerequest = instancegroupmanagerresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsInsertCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsInsertCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsListCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of resize requests that are contained in the -// managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. The name -// should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) List(project string, zone string, instanceGroupManager string) *InstanceGroupManagerResizeRequestsListCall { - c := &InstanceGroupManagerResizeRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagerResizeRequestsListCall) Filter(filter string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagerResizeRequestsListCall) MaxResults(maxResults int64) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagerResizeRequestsListCall) OrderBy(orderBy string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagerResizeRequestsListCall) PageToken(pageToken string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagerResizeRequestsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagerResizeRequestsListCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagerResizeRequestsListCall) IfNoneMatch(entityTag string) *InstanceGroupManagerResizeRequestsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsListCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequestsListResponse.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 *InstanceGroupManagerResizeRequestsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequestsListResponse, 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 := &InstanceGroupManagerResizeRequestsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagerResizeRequestsListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerResizeRequestsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Flags the specified instances to be removed from -// the -// managed instance group. Abandoning an instance does not delete the -// instance, but it does remove the instance from any target pools that -// are -// applied by the managed instance group. This method reduces thetargetSize of -// the managed instance group by the -// number of instances that you abandon. This operation is marked asDONE when -// the action is scheduled even if the instances have -// not yet been removed from the group. You must separately verify the -// status of the abandoning action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.abandonInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.abandonInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of managed instance groups and groups -// them by zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceGroupManagersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceGroupManagersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerAggregatedList.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 *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, 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 := &InstanceGroupManagerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Applies changes to selected instances on the -// managed instance group. -// This method can be used to apply new overrides and/or new versions. -// -// - instanceGroupManager: The name of the managed instance group, should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. Should conform to RFC1035. -func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.applyUpdatesToInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.applyUpdatesToInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateInstances: Creates instances with per-instance configurations in this -// managed instance -// group. Instances are created using the current instance template. Thecreate -// instances operation is marked DONE if thecreateInstances request is -// successful. The underlying actions -// take additional time. You must separately verify the status of thecreating -// or actions with the listmanagedinstances -// method. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { - c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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. -// -// The request ID must be -// a valid UUID with the exception that zero UUID is not -// supported -// (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.createInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.createInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersCreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.createInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances -// in that group. Note that the instance group must not belong to a -// backend service. Read -// Deleting an instance group for more information. -// -// - instanceGroupManager: The name of the managed instance group to delete. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { - 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 -// details. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Flags the specified instances in the managed instance group -// for immediate -// deletion. The instances are also removed from any target -// pools of which they were a member. This method reduces thetargetSize of the -// managed instance group by the number of -// instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. -// You must separately verify the status of the deleting action -// with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deleteInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deleteInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Deletes selected per-instance configurations for -// the managed instance -// group. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance -// -// group is located. -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteperinstanceconfigsreq = instancegroupmanagersdeleteperinstanceconfigsreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersdeleteperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deletePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deletePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deletePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.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 *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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 := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesCall struct { - s *Service - project string - zone string - resourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAvailableAcceleratorTopologies: Returns information about available -// accelerator topologies for a given MIG. -// -// - project: Project ID for this request. -// - resourceId: The name of the managed instance group. -// It should conform to RFC1035. -// - zone: The name of thezone where the managed -// instance group is located. -// -// Name should conform to RFC1035. -func (r *InstanceGroupManagersService) GetAvailableAcceleratorTopologies(project string, zone string, resourceId string) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c := &InstanceGroupManagersGetAvailableAcceleratorTopologiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceId = resourceId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Context(ctx context.Context) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceId": c.resourceId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.getAvailableAcceleratorTopologies" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.ServerRespons -// e.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 *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, 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 := &InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that you -// specify -// in the request. After the group is created, instances in the group -// are -// created using the specified instance template. -// This operation is marked as DONE when the group is created -// even if the instances in the group have not yet been created. You -// must separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// A managed instance group can have up to 1000 VM instances per group. -// Please -// contact Cloud Support if you need an increase in -// this limit. -// -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the managed instance group. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { - 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 -// details. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of managed instance groups that are contained within -// the -// specified project and zone. -// -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.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 *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, 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 := &InstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListErrorsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListErrors: Lists all errors thrown by actions on instances for a given -// managed -// instance group. The filter and orderBy query -// parameters are not supported. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035, or an -// unsigned long integer: must match regexp pattern: -// (?:a-z (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListErrors(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListErrorsCall { - c := &InstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListErrorsCall) Filter(filter string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListErrorsCall) PageToken(pageToken string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListErrorsCall) Context(ctx context.Context) *InstanceGroupManagersListErrorsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListErrorsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listErrors", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listErrors" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListErrorsResponse.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 *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListErrorsResponse, 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 := &InstanceGroupManagersListErrorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listErrors", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListErrorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists all of the instances in the managed instance -// group. Each instance -// in the list has a currentAction, which indicates the action -// that the managed instance group is performing on the instance. For -// example, -// if the group is still creating an instance, the currentAction -// is CREATING. If a previous action failed, the -// list displays the errors for that failed action. The orderBy -// query parameter is not supported. The `pageToken` query parameter -// is -// supported only if the group's `listManagedInstancesResults` field is set -// to `PAGINATED`. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listManagedInstances", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.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 *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, 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 := &InstanceGroupManagersListManagedInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listManagedInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configurations defined -// for the managed -// instance group. The orderBy query parameter is not supported. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { - c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listPerInstanceConfigs", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListPerInstanceConfigsResp.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 *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListPerInstanceConfigsResp, 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 := &InstanceGroupManagersListPerInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListPerInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersPatchCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is patched -// even if the instances in the group are still in the process of -// being -// patched. You must separately verify the status of the individual -// instances -// with thelistManagedInstances -// method. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone where -// you want to create the managed instance group. -func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { - c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { - 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 -// details. -func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) PatchPerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c := &InstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerspatchperinstanceconfigsreq = instancegroupmanagerspatchperinstanceconfigsreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersPatchPerInstanceConfigsCall { - 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 -// details. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerspatchperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patchPerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patchPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patchPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Flags the specified VM instances in the managed instance -// group to be -// immediately recreated. Each instance is recreated using the group's -// current -// configuration. This operation is marked as DONE when the flag -// is set even if the instances have not yet been recreated. You -// must -// separately verify the status of each instance by checking itscurrentAction -// field; for more information, see Checking -// the status of managed instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.recreateInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.recreateInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group. If you increase the size, the -// group -// creates new instances using the current instance template. If you -// decrease -// the size, the group deletes instances. The resize operation is markedDONE -// when the resize actions are scheduled even if the group -// has not yet added or deleted any instances. You must separately -// verify the status of the creating or deleting -// actions with thelistmanagedinstances -// method. -// -// When resizing down, the instance group arbitrarily chooses the order -// in -// which VMs are deleted. The group takes into account some VM attributes -// when -// making the selection including: -// -// + The status of the VM instance. -// + The health of the VM instance. -// + The instance template version the VM is based on. -// + For regional managed instance groups, the location of the VM -// instance. -// -// This list is subject to change. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - size: The number of running instances that the managed instance group -// should -// maintain at any given time. The group automatically adds or -// removes -// instances to maintain the number of instances specified by this parameter. -// - zone: The name of thezone where the managed -// -// instance group is located. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { - 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 -// details. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resize", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the managed instance group with advanced -// configuration options like -// disabling creation retries. This is an extended version of theresize -// method. -// -// If you increase the size of the instance group, the group creates -// new -// instances using the current instance template. If you decrease the size, -// the group deletes instances. The resize operation is markedDONE when the -// resize actions are scheduled even if the group -// has not yet added or deleted any instances. You must separately -// verify the status of the creating,creatingWithoutRetries, or deleting -// actions with -// the get -// orlistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { - c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { - 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 -// details. -func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resizeAdvanced", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeAdvancedCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resizeAdvanced", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResumeInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResumeInstances: Flags the specified instances in the managed instance group -// to be -// resumed. This method increases thetargetSize and decreases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// resume. -// The resumeInstances operation is marked DONE if -// the resumeInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theRESUMING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are suspended. -// For -// example, if an instance was previously suspended using the -// suspendInstances -// method, it can be resumed using the resumeInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are resumed. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ResumeInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest) *InstanceGroupManagersResumeInstancesCall { - c := &InstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresumeinstancesrequest = instancegroupmanagersresumeinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *InstanceGroupManagersResumeInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResumeInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *InstanceGroupManagersResumeInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResumeInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersresumeinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resumeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resumeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResumeInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resumeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Motifies the autohealing policy for the instances in -// this managed -// instance group. -// [Deprecated] This method is deprecated. UseinstanceGroupManagers.patch -// instead. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { - 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 -// details. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setAutoHealingPolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setAutoHealingPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Specifies the instance template to use when creating -// new instances in this -// group. The templates for existing instances in the group do not -// change -// unless you run recreateInstances, runapplyUpdatesToInstances, or set the -// group'supdatePolicy.type to PROACTIVE. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { - 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 -// details. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setInstanceTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setInstanceTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all instances in this -// managed instance -// group are assigned. The target pools automatically apply to all of -// the -// instances in the managed instance group. This operation is markedDONE when -// you make the request even if the instances have not -// yet been added to their target pools. The change might take some time -// to -// apply to all of the instances in the group depending on the size of -// the -// group. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { - 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 -// details. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setTargetPools", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setTargetPools", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersStartInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartInstances: Flags the specified instances in the managed instance group -// to be -// started. This method increases thetargetSize and decreases the -// targetStoppedSize -// of the managed instance group by the number of instances that you start. -// The startInstances operation is marked DONE if -// the startInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTARTING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are stopped. -// For -// example, if an instance was previously stopped using the -// stopInstances -// method, it can be started using the startInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are started. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) StartInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest) *InstanceGroupManagersStartInstancesCall { - c := &InstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersstartinstancesrequest = instancegroupmanagersstartinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersStartInstancesCall) RequestId(requestId string) *InstanceGroupManagersStartInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStartInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStartInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersStartInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersstartinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.startInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.startInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersStartInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.startInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersStopInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopInstances: Flags the specified instances in the managed instance group -// to be -// immediately stopped. You can only specify instances that are running in -// this request. This method reduces thetargetSize and increases the -// targetStoppedSize -// of the managed instance group by the number of instances that you stop. -// The stopInstances operation is marked DONE if -// the stopInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTOPPING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays stopping the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is stopped. -// -// Stopped instances can be started using the startInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) StopInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest) *InstanceGroupManagersStopInstancesCall { - c := &InstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersstopinstancesrequest = instancegroupmanagersstopinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersStopInstancesCall) RequestId(requestId string) *InstanceGroupManagersStopInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStopInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStopInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersStopInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersstopinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.stopInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.stopInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersStopInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.stopInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSuspendInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SuspendInstances: Flags the specified instances in the managed instance -// group to be -// immediately suspended. You can only specify instances that are running -// in -// this request. This method reduces thetargetSize and increases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// suspend. -// The suspendInstances operation is marked DONE if -// the suspendInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSUSPENDING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays suspension of the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is -// suspended. -// -// Suspended instances can be resumed using the resumeInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SuspendInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest) *InstanceGroupManagersSuspendInstancesCall { - c := &InstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssuspendinstancesrequest = instancegroupmanagerssuspendinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *InstanceGroupManagersSuspendInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSuspendInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *InstanceGroupManagersSuspendInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSuspendInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssuspendinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.suspendInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.suspendInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSuspendInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.suspendInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { - c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersUpdateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is updated -// even if the instances in the group have not yet been updated. You -// must -// separately verify the status of the individual instances with -// thelistManagedInstances -// method. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the managed instance group. -func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { - c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { - 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 -// details. -func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - 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 -// details. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersupdateperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.updatePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.updatePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstances: Adds a list of instances to the specified instance group. All -// of the -// instances in the instance group must be in the same network/subnetwork. -// Read -// Adding instances for more information. -// -// - instanceGroup: The name of the instance group where you are adding -// instances. -// - project: Project ID for this request. -// - zone: The name of the zone -// -// where the instance group is located. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { - 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 -// details. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupsaddinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.addInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.addInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.addInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of instance groups and sorts them by -// zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.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 *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, 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 := &InstanceGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance group. The instances in the group are -// not -// deleted. Note that instance group must not belong to a backend -// service. -// Read -// Deleting an instance group for more information. -// -// - instanceGroup: The name of the instance group to delete. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { - 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 -// details. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified zonal instance group. Get a list of available -// zonal -// instance groups by making a list() request. -// -// For managed instance groups, use theinstanceGroupManagers -// or regionInstanceGroupManagers -// methods instead. -// -// - instanceGroup: The name of the instance group. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroup.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 *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, 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 := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the instance group. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { - 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 -// details. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of zonal instance group resources contained within -// the -// specified zone. -// -// For managed instance groups, use theinstanceGroupManagers -// or regionInstanceGroupManagers -// methods instead. -// -// - project: Project ID for this request. -// - zone: The name of thezone -// where the instance group is located. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.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 *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, 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 := &InstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group. -// The orderBy query parameter is not supported. -// The filter query parameter is supported, but only for -// expressions that use `eq` (equal) or `ne` (not equal) operators. -// -// - instanceGroup: The name of the instance group from which you want to -// generate a list -// -// of included instances. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.listInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.listInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.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 *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, 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 := &InstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.listInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstances: Removes one or more instances from the specified instance -// group, but does -// not delete those instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration before the VM instance is removed or deleted. -// -// - instanceGroup: The name of the instance group where the specified -// instances will be -// -// removed. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { - 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 -// details. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.removeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.removeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.removeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified instance group. -// -// - instanceGroup: The name of the instance group where the named ports are -// updated. -// - project: Project ID for this request. -// - zone: The name of the zone -// -// where the instance group is located. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { - 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 -// details. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.setNamedPorts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.setNamedPorts" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.setNamedPorts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { - c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceSettingsGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Instance settings. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstanceSettingsService) Get(project string, zone string) *InstanceSettingsGetCall { - c := &InstanceSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceSettingsGetCall) IfNoneMatch(entityTag string) *InstanceSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsGetCall) Context(ctx context.Context) *InstanceSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceSettings.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 *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSettings, 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 := &InstanceSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceSettingsPatchCall struct { - s *Service - project string - zone string - instancesettings *InstanceSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Instance settings -// -// - project: Project ID for this request. -// - zone: The zone scoping this request. It should conform to RFC1035. -func (r *InstanceSettingsService) Patch(project string, zone string, instancesettings *InstanceSettings) *InstanceSettingsPatchCall { - c := &InstanceSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancesettings = instancesettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceSettingsPatchCall) RequestId(requestId string) *InstanceSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *InstanceSettingsPatchCall) UpdateMask(updateMask string) *InstanceSettingsPatchCall { - 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 -// details. -func (c *InstanceSettingsPatchCall) Fields(s ...googleapi.Field) *InstanceSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsPatchCall) Context(ctx context.Context) *InstanceSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all InstanceTemplates resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { - c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateAggregatedList.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 *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, 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 := &InstanceTemplateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. Deleting an instance -// template is -// permanent and cannot be undone. It is not possible to delete templates -// that are already in use by a managed instance group. -// -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { - 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 -// details. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. -// -// - instanceTemplate: The name of the instance template. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstanceTemplatesGetCall) View(view string) *InstanceTemplatesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.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 *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, 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 := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { - c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.getIamPolicy" call. -// 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 *InstanceTemplatesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project using the -// data that is included in the request. If you are creating a new template -// to -// update an existing instance group, your new instance template must use -// the -// same network or, if applicable, the same subnetwork as the -// original -// template. -// -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancetemplate = instancetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { - 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 -// details. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstanceTemplatesListCall) View(view string) *InstanceTemplatesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.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 *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, 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 := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceTemplatesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { - c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.setIamPolicy" call. -// 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 *InstanceTemplatesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAccessConfig: Adds an access config to an instance's network interface. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to add to this -// instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - 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 -// details. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accessconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addAccessConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddNetworkInterface: Adds one dynamic network interface to an active -// instance. -// -// - instance: The instance name for this request stored as resource_id. -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddNetworkInterface(project string, zone string, instance string, networkinterface *NetworkInterface) *InstancesAddNetworkInterfaceCall { - c := &InstancesAddNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.networkinterface = networkinterface - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddNetworkInterfaceCall) RequestId(requestId string) *InstancesAddNetworkInterfaceCall { - 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 -// details. -func (c *InstancesAddNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesAddNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddNetworkInterfaceCall) Context(ctx context.Context) *InstancesAddNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkinterface) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addNetworkInterface", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to an instance. You can -// only add one -// policy right now which will be applied to this instance for scheduling -// live -// migrations. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { - c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { - 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 -// details. -func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the instances in your -// project -// across all regions and zones. -// -// The performance of this method degrades when a filter is specified on -// a -// project that has a very large number of instances. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstancesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.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 *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, 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 := &InstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachDisk: Attaches an existing Disk resource to an instance. You must -// first -// create the disk before you can attach it. It is not possible to create -// and attach a disk at the same time. For more information, readAdding -// a -// persistent disk to your instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// ForceAttach sets the optional parameter "forceAttach": Whether to force -// attach the regional disk even if it's currently attached -// to another instance. If you try to force attach a zonal disk to an -// instance, you will receive an error. -func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { - c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - 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 -// details. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attacheddisk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.attachDisk", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.attachDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Creates multiple instances. Count specifies the number of -// instances to -// create. For more information, seeAbout bulk -// creation of VMs. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { - c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkinsertinstanceresource = bulkinsertinstanceresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { - 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 -// details. -func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertinstanceresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more information, -// seeDeleting -// an instance. -// -// - instance: Name of the instance resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set -// to true, Graceful Shutdown is skipped. -func (c *InstancesDeleteCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesDeleteCall { - c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { - 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 -// details. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteAccessConfig: Deletes an access config from an instance's network -// interface. -// -// - accessConfig: The name of the access config to delete. -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { - 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 -// details. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.deleteAccessConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.deleteAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteNetworkInterface: Deletes one dynamic network interface from an active -// instance. -// InstancesDeleteNetworkInterfaceRequest indicates: -// - instance from which to delete, using project+zone+resource_id fields; -// - dynamic network interface to be deleted, using -// network_interface_name -// field; -// -// - instance: The instance name for this request stored as resource_id. -// Name should conform to RFC1035 or be an unsigned long integer. -// - networkInterfaceName: The name of the dynamic network interface to be -// deleted from the instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DeleteNetworkInterface(project string, zone string, instance string, networkInterfaceName string) *InstancesDeleteNetworkInterfaceCall { - c := &InstancesDeleteNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterfaceName", networkInterfaceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteNetworkInterfaceCall) RequestId(requestId string) *InstancesDeleteNetworkInterfaceCall { - 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 -// details. -func (c *InstancesDeleteNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesDeleteNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteNetworkInterfaceCall) Context(ctx context.Context) *InstancesDeleteNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.deleteNetworkInterface", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.deleteNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachDisk: Detaches a disk from an instance. -// -// - deviceName: The device name of the disk to detach. Make a get() request -// on -// -// the instance to view currently attached disks and device names. -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { - 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 -// details. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.detachDisk", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.detachDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.detachDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance resource. -// -// - instance: Name of the instance resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// View sets the optional parameter "view": View of the instance. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstancesGetCall) View(view string) *InstancesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Instance.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 *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, 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 := &Instance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetEffectiveFirewallsCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns effective firewalls applied to an interface -// of the instance. -// -// - instance: Name of the instance scoping this request. -// - networkInterface: The name of the network interface to get the effective -// firewalls. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { - c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesGetEffectiveFirewallsResponse.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 *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, 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 := &InstancesGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetGuestAttributes: Returns the specified guest attributes entry. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// QueryPath sets the optional parameter "queryPath": Specifies the guest -// attributes path to be queried. -func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("queryPath", queryPath) - return c -} - -// VariableKey sets the optional parameter "variableKey": Specifies the key for -// the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetGuestAttributesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getGuestAttributes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getGuestAttributes" call. -// Any non-2xx status code is an error. Response headers are in either -// *GuestAttributes.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 *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, 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 := &GuestAttributes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getGuestAttributes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { - c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getIamPolicy" call. -// 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 *InstancesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetPartnerMetadataCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPartnerMetadata: Gets partner metadata of the specified instance and -// namespaces. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetPartnerMetadata(project string, zone string, instance string) *InstancesGetPartnerMetadataCall { - c := &InstancesGetPartnerMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Namespaces sets the optional parameter "namespaces": Comma separated partner -// metadata namespaces. -func (c *InstancesGetPartnerMetadataCall) Namespaces(namespaces string) *InstancesGetPartnerMetadataCall { - c.urlParams_.Set("namespaces", namespaces) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetPartnerMetadataCall) Fields(s ...googleapi.Field) *InstancesGetPartnerMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetPartnerMetadataCall) IfNoneMatch(entityTag string) *InstancesGetPartnerMetadataCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetPartnerMetadataCall) Context(ctx context.Context) *InstancesGetPartnerMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetPartnerMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetPartnerMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getPartnerMetadata", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getPartnerMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *PartnerMetadata.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 *InstancesGetPartnerMetadataCall) Do(opts ...googleapi.CallOption) (*PartnerMetadata, 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 := &PartnerMetadata{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getPartnerMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetScreenshotCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetScreenshot: Returns the screenshot from the specified instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { - c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetScreenshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getScreenshot", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getScreenshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Screenshot.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 *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, 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 := &Screenshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getScreenshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the last 1 MB of serial port output from the -// specified instance. -// -// - instance: Name of the instance for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Port sets the optional parameter "port": Specifies which COM or serial port -// to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Specifies the starting byte -// position of the output to return. To start with -// the first byte of output to the specified port, omit this field or set it -// to `0`. -// -// If the output for that byte position is available, this field matches -// the -// `start` parameter sent with the request. If the amount of serial -// console -// output exceeds the size of the buffer (1 MB), the oldest output is -// discarded and is no longer available. If the requested start position -// refers to discarded output, the start position is adjusted to the -// oldest -// output still available, and the adjusted start position is returned as -// the -// `start` property value. -// -// You can also provide a negative start position, which translates to the -// most recent number of bytes written to the serial port. For example, -3 -// is -// interpreted as the most recent 3 bytes written to the serial console. -// Note -// that the negative start is bounded by the retained buffer size, and -// the -// returned serial console output will not exceed the max buffer size. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getSerialPortOutput", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getSerialPortOutput" call. -// Any non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.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 *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, 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 := &SerialPortOutput{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getSerialPortOutput", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetShieldedInstanceIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity of an -// instance -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { - c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getShieldedInstanceIdentity", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getShieldedInstanceIdentity" call. -// Any non-2xx status code is an error. Response headers are in either -// *ShieldedInstanceIdentity.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 *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, 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 := &ShieldedInstanceIdentity{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getShieldedInstanceIdentity", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetShieldedVmIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetShieldedVmIdentity: Returns the Shielded VM Identity of an instance -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { - c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetShieldedVmIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedVmIdentityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetShieldedVmIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedVmIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetShieldedVmIdentityCall) Context(ctx context.Context) *InstancesGetShieldedVmIdentityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getShieldedVmIdentity", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getShieldedVmIdentity" call. -// Any non-2xx status code is an error. Response headers are in either -// *ShieldedVmIdentity.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 *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedVmIdentity, 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 := &ShieldedVmIdentity{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getShieldedVmIdentity", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstanceTemplate sets the optional parameter "sourceInstanceTemplate": -// Specifies instance template to create the instance. -// -// This field is optional. It can be a full or partial URL. For example, -// the -// following are all valid URLs to an instance template: -// -// - -// -// https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate -// - projects/project/global/instanceTemplates/instanceTemplate -// - global/instanceTemplates/instanceTemplate -func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { - c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) - return c -} - -// SourceMachineImage sets the optional parameter "sourceMachineImage": -// Specifies the machine image to use to create the instance. -// -// This field is optional. It can be a full or partial URL. For example, -// the -// following are all valid URLs to a machine image: -// -// - -// -// https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage -// - projects/project/global/global/machineImages/machineImage -// - global/machineImages/machineImage -func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { - c.urlParams_.Set("sourceMachineImage", sourceMachineImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instances contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstancesListCall) View(view string) *InstancesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceList.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 *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, 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 := &InstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesListReferrersCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListReferrers: Retrieves a list of resources that refer to the VM instance -// specified in -// the request. For example, if the VM instance is part of a managed -// or -// unmanaged instance group, the referrers list includes the instance -// group. -// For more information, readViewing -// referrers to VM instances. -// -// - instance: Name of the target instance scoping this request, or '-' if -// the -// -// request should span over all instances in the container. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.listReferrers", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.listReferrers" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.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 *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, 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 := &InstanceListReferrers{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.listReferrers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesPatchPartnerMetadataCall struct { - s *Service - project string - zone string - instance string - partnermetadata *PartnerMetadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPartnerMetadata: Patches partner metadata of the specified instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) PatchPartnerMetadata(project string, zone string, instance string, partnermetadata *PartnerMetadata) *InstancesPatchPartnerMetadataCall { - c := &InstancesPatchPartnerMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.partnermetadata = partnermetadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesPatchPartnerMetadataCall) RequestId(requestId string) *InstancesPatchPartnerMetadataCall { - 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 -// details. -func (c *InstancesPatchPartnerMetadataCall) Fields(s ...googleapi.Field) *InstancesPatchPartnerMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPatchPartnerMetadataCall) Context(ctx context.Context) *InstancesPatchPartnerMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPatchPartnerMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPatchPartnerMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.partnermetadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.patchPartnerMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.patchPartnerMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPatchPartnerMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.patchPartnerMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPerformMaintenanceCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform a manual maintenance on the instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) PerformMaintenance(project string, zone string, instance string) *InstancesPerformMaintenanceCall { - c := &InstancesPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesPerformMaintenanceCall) RequestId(requestId string) *InstancesPerformMaintenanceCall { - 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 -// details. -func (c *InstancesPerformMaintenanceCall) Fields(s ...googleapi.Field) *InstancesPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPerformMaintenanceCall) Context(ctx context.Context) *InstancesPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.performMaintenance", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from an instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { - c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { - 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 -// details. -func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesReportHostAsFaultyCall struct { - s *Service - project string - zone string - instance string - instancesreporthostasfaultyrequest *InstancesReportHostAsFaultyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ReportHostAsFaulty: Mark the host as faulty and try to restart the instance -// on a new host. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ReportHostAsFaulty(project string, zone string, instance string, instancesreporthostasfaultyrequest *InstancesReportHostAsFaultyRequest) *InstancesReportHostAsFaultyCall { - c := &InstancesReportHostAsFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesreporthostasfaultyrequest = instancesreporthostasfaultyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesReportHostAsFaultyCall) RequestId(requestId string) *InstancesReportHostAsFaultyCall { - 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 -// details. -func (c *InstancesReportHostAsFaultyCall) Fields(s ...googleapi.Field) *InstancesReportHostAsFaultyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesReportHostAsFaultyCall) Context(ctx context.Context) *InstancesReportHostAsFaultyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesReportHostAsFaultyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesReportHostAsFaultyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesreporthostasfaultyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.reportHostAsFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reportHostAsFaulty" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesReportHostAsFaultyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.reportHostAsFaulty", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reset: Performs a reset on the instance. This is a hard reset. The VM -// does not do a graceful shutdown. For more information, seeResetting -// an instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { - 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 -// details. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesResetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.reset", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reset" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.reset", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesResumeCall struct { - s *Service - project string - zone string - instance string - instancesresumerequest *InstancesResumeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resume: Resumes an instance that was suspended using -// theinstances().suspend -// method. -// -// - instance: Name of the instance resource to resume. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { - c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesresumerequest = instancesresumerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { - 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 -// details. -func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesResumeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesresumerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.resume", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.resume" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResumeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.resume", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSendDiagnosticInterruptCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { - c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.sendDiagnosticInterrupt", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.sendDiagnosticInterrupt" call. -func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.sendDiagnosticInterrupt", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type InstancesSetDeletionProtectionCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDeletionProtection: Sets deletion protection on the instance. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { - c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// DeletionProtection sets the optional parameter "deletionProtection": Whether -// the resource should be protected against deletion. -func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { - 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 -// details. -func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetDeletionProtectionCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setDeletionProtection", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDeletionProtection" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDeletionProtectionCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setDeletionProtection", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to an -// instance. -// -// - autoDelete: Whether to auto-delete the disk when the instance is deleted. -// - deviceName: The device name of the disk to modify. Make a get() request -// on the instance to view currently attached disks and device names. -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { - 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 -// details. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setDiskAutoDelete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDiskAutoDelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setDiskAutoDelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { - c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setIamPolicy" call. -// 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 *InstancesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets labels on an instance. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { - 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 -// details. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineResources: Changes the number and/or type of accelerator for a -// stopped instance to the -// values specified in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { - 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 -// details. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMachineResources", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineResources" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMachineResources", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineType: Changes the machine type for a stopped instance to the -// machine -// type specified in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { - 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 -// details. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMachineType", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineType" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMachineType", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMetadata: Sets metadata for the specified instance to the data -// included -// in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.metadata = metadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { - 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 -// details. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMinCpuPlatform: Changes the minimum CPU platform that this instance -// should use. -// This method can only -// be called on a stopped instance. For more information, readSpecifying -// a -// Minimum CPU Platform. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { - 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 -// details. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMinCpuPlatform", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMinCpuPlatform" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMinCpuPlatform", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetNameCall struct { - s *Service - project string - zone string - instance string - instancessetnamerequest *InstancesSetNameRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetName: Sets name of an instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { - c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetnamerequest = instancessetnamerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { - 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 -// details. -func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetNameCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetnamerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setName", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setName" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetNameCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setName", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetScheduling: Sets an instance's scheduling options. You can only call this -// method on astopped instance, -// that is, a VM instance that is in a `TERMINATED` state. SeeInstance -// Life -// Cycle for more information on the possible instance states. -// For more information about setting scheduling options for a VM, seeSet -// VM host maintenance policy. -// -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.scheduling = scheduling - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { - 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 -// details. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scheduling) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setScheduling", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setScheduling" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setScheduling", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetSecurityPolicyCall struct { - s *Service - project string - zone string - instance string - instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified instance. -// For more information, seeGoogle -// Cloud Armor Overview -// -// - instance: Name of the Instance resource to which the security policy -// should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { - c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { - 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 -// details. -func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetsecuritypolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetServiceAccount: Sets the service account on the instance. For more -// information, -// readChanging -// the service account and access scopes for an instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { - 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 -// details. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setServiceAccount", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setServiceAccount" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setServiceAccount", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetShieldedInstanceIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance integrity -// policy for an instance. You can -// only use this method on a running instance. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { - 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 -// details. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedinstanceintegritypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setShieldedInstanceIntegrityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setShieldedInstanceIntegrityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetShieldedVmIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy for a VM -// instance. You can -// only use this method on a running VM instance. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { - c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedvmintegritypolicy = shieldedvmintegritypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetShieldedVmIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedVmIntegrityPolicyCall { - 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 -// details. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedVmIntegrityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedVmIntegrityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedvmintegritypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setShieldedVmIntegrityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setShieldedVmIntegrityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setShieldedVmIntegrityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTags: Sets network tags -// for the specified instance to the data included in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.tags = tags - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { - 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 -// details. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tags) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setTags", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setTags" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setTags", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. For -// more information, see -// Simulate a host maintenance event. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// WithExtendedNotifications sets the optional parameter -// "withExtendedNotifications": Determines whether the customers receive -// notifications before migration. -// Only applicable to SF vms. -func (c *InstancesSimulateMaintenanceEventCall) WithExtendedNotifications(withExtendedNotifications bool) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("withExtendedNotifications", fmt.Sprint(withExtendedNotifications)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.simulateMaintenanceEvent", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.simulateMaintenanceEvent" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.simulateMaintenanceEvent", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts an instance that was stopped using theinstances().stop -// method. For more information, seeRestart an -// instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { - 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 -// details. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.start", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.start" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.start", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartWithEncryptionKey: Starts an instance that was stopped using -// theinstances().stop -// method. For more information, seeRestart an -// instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { - 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 -// details. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.startWithEncryptionKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.startWithEncryptionKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur -// VM usage charges while they are stopped. However, resources that the VM -// is -// using, such as persistent disks and static IP addresses, will continue to -// be charged until they are deleted. For more information, seeStopping -// an instance. -// -// - instance: Name of the instance resource to stop. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. -// If false, Local SSD data will be preserved when the instance is -// suspended. -// If true, the contents of any attached Local SSD disks will be discarded. -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - return c -} - -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set -// to true, Graceful Shutdown is skipped. -func (c *InstancesStopCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesStopCall { - c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { - 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 -// details. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.stop", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.stop" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStopCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.stop", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSuspendCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Suspend: This method suspends a running instance, saving its state to -// persistent -// storage, and allows you to resume the instance at a later time. -// Suspended -// instances have no compute costs (cores or RAM), and incur only -// storage -// charges for the saved VM memory and localSSD data. Any charged resources -// the virtual machine was using, such as persistent disks and static -// IP -// addresses, will continue to be charged while the instance is suspended. -// For more information, see -// Suspending and resuming an instance. -// -// - instance: Name of the instance resource to suspend. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { - c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. -// If false, Local SSD data will be preserved when the instance is -// suspended. -// If true, the contents of any attached Local SSD disks will be discarded. -func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { - 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 -// details. -func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSuspendCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.suspend", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.suspend" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSuspendCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.suspend", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateCall struct { - s *Service - project string - zone string - instance string - instance2 *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an instance only if the necessary resources are available. -// This -// method can update only a specific set of instance properties. See -// Updating a running instance for a list of updatable instance -// properties. -// -// - instance: Name of the instance resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instance2 = instance2 - return c -} - -// ClearSecureTag sets the optional parameter "clearSecureTag": Whether to -// clear secure tags from the instance. -// -// This property if set to true will clear secure tags regardless of -// theresource.secure_tags. -func (c *InstancesUpdateCall) ClearSecureTag(clearSecureTag bool) *InstancesUpdateCall { - c.urlParams_.Set("clearSecureTag", fmt.Sprint(clearSecureTag)) - return c -} - -// MinimalAction sets the optional parameter "minimalAction": Specifies the -// action to take when updating an instance even if the -// updated properties do not require it. If not specified, then -// Compute Engine acts based on the minimum action that the updated -// properties require. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { - c.urlParams_.Set("minimalAction", minimalAction) - return c -} - -// MostDisruptiveAllowedAction sets the optional parameter -// "mostDisruptiveAllowedAction": Specifies the most disruptive action that can -// be taken on the instance -// as part of the update. Compute Engine returns an error if the -// instance properties require a more disruptive action as part of the -// instance update. Valid options from lowest to highest are -// NO_EFFECT, REFRESH, and RESTART. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { - c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { - 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 -// details. -func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instance2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateAccessConfig: Updates the specified access config from an instance's -// network interface -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface where the access -// config is attached. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { - c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { - 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 -// details. -func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accessconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateAccessConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateDisplayDeviceCall struct { - s *Service - project string - zone string - instance string - displaydevice *DisplayDevice - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateDisplayDevice: Updates the Display config for a VM instance. You -// can -// only use this method on a stopped VM instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { - c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.displaydevice = displaydevice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { - 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 -// details. -func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.displaydevice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateDisplayDevice", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateDisplayDevice" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateDisplayDeviceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateDisplayDevice", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateNetworkInterface: Updates an instance's network interface. This method -// can only update an -// interface's alias IP range and attached network. See Modifying -// alias IP ranges for an existing instance for instructions on -// changing alias IP ranges. See Migrating -// a VM between networks for instructions on migrating an interface. -// This method follows PATCH semantics. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { - c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.networkinterface = networkinterface - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { - 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 -// details. -func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkinterface) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateNetworkInterface", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateShieldedInstanceConfigCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceconfig *ShieldedInstanceConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateShieldedInstanceConfig: Updates the Shielded Instance config for an -// instance. You can -// only use this method on a stopped instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { - c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedinstanceconfig = shieldedinstanceconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { - 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 -// details. -func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedinstanceconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedInstanceConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateShieldedInstanceConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedInstanceConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedInstanceConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateShieldedVmConfigCall struct { - s *Service - project string - zone string - instance string - shieldedvmconfig *ShieldedVmConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateShieldedVmConfig: Updates the Shielded VM config for a VM instance. -// You can -// only use this method on a stopped VM instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { - c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedvmconfig = shieldedvmconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateShieldedVmConfigCall) RequestId(requestId string) *InstancesUpdateShieldedVmConfigCall { - 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 -// details. -func (c *InstancesUpdateShieldedVmConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedVmConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateShieldedVmConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedVmConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedvmconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedVmConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateShieldedVmConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedVmConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedVmConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsDeleteCall struct { - s *Service - project string - zone string - instantSnapshotGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: deletes a Zonal InstantSnapshotGroup resource -// -// - instantSnapshotGroup: Name of the InstantSnapshot resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) Delete(project string, zone string, instantSnapshotGroup string) *InstantSnapshotGroupsDeleteCall { - c := &InstantSnapshotGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshotGroup = instantSnapshotGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotGroupsDeleteCall) RequestId(requestId string) *InstantSnapshotGroupsDeleteCall { - 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 -// details. -func (c *InstantSnapshotGroupsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsDeleteCall) Context(ctx context.Context) *InstantSnapshotGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshotGroup": c.instantSnapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsGetCall struct { - s *Service - project string - zone string - instantSnapshotGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: returns the specified InstantSnapshotGroup resource in the specified -// zone. -// -// - instantSnapshotGroup: Name of the InstantSnapshotGroup resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) Get(project string, zone string, instantSnapshotGroup string) *InstantSnapshotGroupsGetCall { - c := &InstantSnapshotGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshotGroup = instantSnapshotGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotGroupsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotGroupsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsGetCall) Context(ctx context.Context) *InstantSnapshotGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshotGroup": c.instantSnapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotGroup.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 *InstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotGroup, 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 := &InstantSnapshotGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotGroupsGetIamPolicyCall { - c := &InstantSnapshotGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstantSnapshotGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstantSnapshotGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.getIamPolicy" call. -// 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 *InstantSnapshotGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsInsertCall struct { - s *Service - project string - zone string - instantsnapshotgroup *InstantSnapshotGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: inserts a Zonal InstantSnapshotGroup resource -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstantSnapshotGroupsService) Insert(project string, zone string, instantsnapshotgroup *InstantSnapshotGroup) *InstantSnapshotGroupsInsertCall { - c := &InstantSnapshotGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantsnapshotgroup = instantsnapshotgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotGroupsInsertCall) RequestId(requestId string) *InstantSnapshotGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceConsistencyGroup sets the optional parameter "sourceConsistencyGroup": -// begin_interface: MixerMutationRequestBuilder -func (c *InstantSnapshotGroupsInsertCall) SourceConsistencyGroup(sourceConsistencyGroup string) *InstantSnapshotGroupsInsertCall { - c.urlParams_.Set("sourceConsistencyGroup", sourceConsistencyGroup) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotGroupsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsInsertCall) Context(ctx context.Context) *InstantSnapshotGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshotgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: retrieves the list of InstantSnapshotGroup resources contained -// within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) List(project string, zone string) *InstantSnapshotGroupsListCall { - c := &InstantSnapshotGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstantSnapshotGroupsListCall) Filter(filter string) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotGroupsListCall) MaxResults(maxResults int64) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstantSnapshotGroupsListCall) OrderBy(orderBy string) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstantSnapshotGroupsListCall) PageToken(pageToken string) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstantSnapshotGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotGroupsListCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotGroupsListCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsListCall) Context(ctx context.Context) *InstantSnapshotGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListInstantSnapshotGroups.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 *InstantSnapshotGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInstantSnapshotGroups, 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 := &ListInstantSnapshotGroups{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstantSnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListInstantSnapshotGroups) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstantSnapshotGroupsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotGroupsSetIamPolicyCall { - c := &InstantSnapshotGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.setIamPolicy" call. -// 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 *InstantSnapshotGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotGroupsTestIamPermissionsCall { - c := &InstantSnapshotGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshotGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstantSnapshotGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshotGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of instantSnapshots. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstantSnapshotsService) AggregatedList(project string) *InstantSnapshotsAggregatedListCall { - c := &InstantSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstantSnapshotsAggregatedListCall) Filter(filter string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstantSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsAggregatedListCall) MaxResults(maxResults int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstantSnapshotsAggregatedListCall) OrderBy(orderBy string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstantSnapshotsAggregatedListCall) PageToken(pageToken string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstantSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstantSnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *InstantSnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsAggregatedListCall) Context(ctx context.Context) *InstantSnapshotsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotAggregatedList.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 *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotAggregatedList, 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 := &InstantSnapshotAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstantSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*InstantSnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstantSnapshotsDeleteCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that -// deleting -// a single instantSnapshot might not necessarily delete all the data on -// that -// instantSnapshot. If any data on the instantSnapshot that is marked -// for -// deletion is needed for subsequent instantSnapshots, the data will be -// moved -// to the next corresponding instantSnapshot. -// -// For more information, seeDeleting -// instantSnapshots. -// -// - instantSnapshot: Name of the InstantSnapshot resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Delete(project string, zone string, instantSnapshot string) *InstantSnapshotsDeleteCall { - c := &InstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshot = instantSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapshotsDeleteCall { - 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 -// details. -func (c *InstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsDeleteCall) Context(ctx context.Context) *InstantSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsGetCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InstantSnapshot resource in the specified zone. -// -// - instantSnapshot: Name of the InstantSnapshot resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Get(project string, zone string, instantSnapshot string) *InstantSnapshotsGetCall { - c := &InstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshot = instantSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetCall) Context(ctx context.Context) *InstantSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshot.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 *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, 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 := &InstantSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotsGetIamPolicyCall { - c := &InstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.getIamPolicy" call. -// 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 *InstantSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsInsertCall struct { - s *Service - project string - zone string - instantsnapshot *InstantSnapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instant snapshot in the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstantSnapshotsService) Insert(project string, zone string, instantsnapshot *InstantSnapshot) *InstantSnapshotsInsertCall { - c := &InstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantsnapshot = instantsnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapshotsInsertCall { - 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 -// details. -func (c *InstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsInsertCall) Context(ctx context.Context) *InstantSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of InstantSnapshot resources contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnapshotsListCall { - c := &InstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstantSnapshotsListCall) Filter(filter string) *InstantSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsListCall) IfNoneMatch(entityTag string) *InstantSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsListCall) Context(ctx context.Context) *InstantSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotList.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 *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, 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 := &InstantSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstantSnapshotsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotsSetIamPolicyCall { - c := &InstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.setIamPolicy" call. -// 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 *InstantSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a instantSnapshot in the given zone. To learn -// more about -// labels, read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *InstantSnapshotsSetLabelsCall { - c := &InstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsSetLabelsCall) RequestId(requestId string) *InstantSnapshotsSetLabelsCall { - 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 -// details. -func (c *InstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetLabelsCall) Context(ctx context.Context) *InstantSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotsTestIamPermissionsCall { - c := &InstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsCreateMembersCall struct { - s *Service - project string - interconnectAttachmentGroup string - interconnectattachmentgroupscreatemembersrequest *InterconnectAttachmentGroupsCreateMembersRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateMembers: Create Interconnect Attachments with redundancy by creating -// them in a -// specified interconnect attachment group. -// -// - interconnectAttachmentGroup: Name of the group resource to create members -// for. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) CreateMembers(project string, interconnectAttachmentGroup string, interconnectattachmentgroupscreatemembersrequest *InterconnectAttachmentGroupsCreateMembersRequest) *InterconnectAttachmentGroupsCreateMembersCall { - c := &InterconnectAttachmentGroupsCreateMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - c.interconnectattachmentgroupscreatemembersrequest = interconnectattachmentgroupscreatemembersrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsCreateMembersCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsCreateMembersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsCreateMembersCall) Context(ctx context.Context) *InterconnectAttachmentGroupsCreateMembersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsCreateMembersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsCreateMembersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroupscreatemembersrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers") - 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{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.createMembers", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.createMembers" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsCreateMembersCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.createMembers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsDeleteCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InterconnectAttachmentGroup in the given scope -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to delete. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Delete(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsDeleteCall { - c := &InterconnectAttachmentGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsDeleteCall) RequestId(requestId string) *InterconnectAttachmentGroupsDeleteCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InterconnectAttachmentGroup resource in the -// given -// scope. -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to return. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Get(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsGetCall { - c := &InterconnectAttachmentGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroup.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 *InterconnectAttachmentGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroup, 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 := &InterconnectAttachmentGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) GetIamPolicy(project string, resource string) *InterconnectAttachmentGroupsGetIamPolicyCall { - c := &InterconnectAttachmentGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.getIamPolicy" call. -// 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 *InterconnectAttachmentGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetOperationalStatusCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOperationalStatus: Returns the InterconnectAttachmentStatuses for the -// specified -// InterconnectAttachmentGroup resource. -// -// - interconnectAttachmentGroup: Name of the interconnectAttachmentGroup -// resource to query. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) GetOperationalStatus(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c := &InterconnectAttachmentGroupsGetOperationalStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getOperationalStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.getOperationalStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroupsGetOperationalStatusResponse.ServerResponse.Head -// er 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 *InterconnectAttachmentGroupsGetOperationalStatusCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroupsGetOperationalStatusResponse, 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 := &InterconnectAttachmentGroupsGetOperationalStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getOperationalStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsInsertCall struct { - s *Service - project string - interconnectattachmentgroup *InterconnectAttachmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a InterconnectAttachmentGroup in the specified project in -// the given -// scope using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Insert(project string, interconnectattachmentgroup *InterconnectAttachmentGroup) *InterconnectAttachmentGroupsInsertCall { - c := &InterconnectAttachmentGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectattachmentgroup = interconnectattachmentgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsInsertCall) RequestId(requestId string) *InterconnectAttachmentGroupsInsertCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsInsertCall) Context(ctx context.Context) *InterconnectAttachmentGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the InterconnectAttachmentGroups for a project in the given -// scope. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) List(project string) *InterconnectAttachmentGroupsListCall { - c := &InterconnectAttachmentGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentGroupsListCall) Filter(filter string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentGroupsListCall) MaxResults(maxResults int64) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentGroupsListCall) OrderBy(orderBy string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentGroupsListCall) PageToken(pageToken string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsListCall) Context(ctx context.Context) *InterconnectAttachmentGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroupsListResponse.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 *InterconnectAttachmentGroupsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroupsListResponse, 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 := &InterconnectAttachmentGroupsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentGroupsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentGroupsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentGroupsPatchCall struct { - s *Service - project string - interconnectAttachmentGroup string - interconnectattachmentgroup *InterconnectAttachmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified InterconnectAttachmentGroup resource with the -// data -// included in the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to patch. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Patch(project string, interconnectAttachmentGroup string, interconnectattachmentgroup *InterconnectAttachmentGroup) *InterconnectAttachmentGroupsPatchCall { - c := &InterconnectAttachmentGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - c.interconnectattachmentgroup = interconnectattachmentgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsPatchCall) RequestId(requestId string) *InterconnectAttachmentGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. -func (c *InterconnectAttachmentGroupsPatchCall) UpdateMask(updateMask string) *InterconnectAttachmentGroupsPatchCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsPatchCall) Context(ctx context.Context) *InterconnectAttachmentGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - 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{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectAttachmentGroupsSetIamPolicyCall { - c := &InterconnectAttachmentGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.setIamPolicy" call. -// 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 *InterconnectAttachmentGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c := &InterconnectAttachmentGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectAttachmentGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of interconnect -// attachments. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { - c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InterconnectAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InterconnectAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentAggregatedList.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 *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, 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 := &InterconnectAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentsDeleteCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified interconnect attachment. -// -// - interconnectAttachment: Name of the interconnect attachment to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { - c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { - 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 -// details. -func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsGetCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified interconnect attachment. -// -// - interconnectAttachment: Name of the interconnect attachment to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { - c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachment.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 *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, 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 := &InterconnectAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) GetIamPolicy(project string, region string, resource string) *InterconnectAttachmentsGetIamPolicyCall { - c := &InterconnectAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsGetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.getIamPolicy" call. -// 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 *InterconnectAttachmentsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsInsertCall struct { - s *Service - project string - region string - interconnectattachment *InterconnectAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an InterconnectAttachment in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { - c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectattachment = interconnectattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *InterconnectAttachmentsInsertCall) ValidateOnly(validateOnly bool) *InterconnectAttachmentsInsertCall { - 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 -// details. -func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect attachments contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { - c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentList.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 *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, 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 := &InterconnectAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentsPatchCall struct { - s *Service - project string - region string - interconnectAttachment string - interconnectattachment *InterconnectAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified interconnect attachment with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - interconnectAttachment: Name of the interconnect attachment to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { - c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - c.interconnectattachment = interconnectattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsPatchCall) RequestId(requestId string) *InterconnectAttachmentsPatchCall { - 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 -// details. -func (c *InterconnectAttachmentsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsPatchCall) Context(ctx context.Context) *InterconnectAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - 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{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *InterconnectAttachmentsSetIamPolicyCall { - c := &InterconnectAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsSetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.setIamPolicy" call. -// 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 *InterconnectAttachmentsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an InterconnectAttachment. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { - c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsSetLabelsCall) RequestId(requestId string) *InterconnectAttachmentsSetLabelsCall { - 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 -// details. -func (c *InterconnectAttachmentsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsSetLabelsCall) Context(ctx context.Context) *InterconnectAttachmentsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { - c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsCreateMembersCall struct { - s *Service - project string - interconnectGroup string - interconnectgroupscreatemembersrequest *InterconnectGroupsCreateMembersRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateMembers: Create Interconnects with redundancy by creating them in a -// specified -// interconnect group. -// -// - interconnectGroup: Name of the group resource to create members for. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) CreateMembers(project string, interconnectGroup string, interconnectgroupscreatemembersrequest *InterconnectGroupsCreateMembersRequest) *InterconnectGroupsCreateMembersCall { - c := &InterconnectGroupsCreateMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - c.interconnectgroupscreatemembersrequest = interconnectgroupscreatemembersrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsCreateMembersCall) Fields(s ...googleapi.Field) *InterconnectGroupsCreateMembersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsCreateMembersCall) Context(ctx context.Context) *InterconnectGroupsCreateMembersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsCreateMembersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsCreateMembersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroupscreatemembersrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers") - 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{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.createMembers", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.createMembers" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsCreateMembersCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.createMembers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsDeleteCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InterconnectGroup in the given scope -// -// - interconnectGroup: Name of the InterconnectGroup resource to delete. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Delete(project string, interconnectGroup string) *InterconnectGroupsDeleteCall { - c := &InterconnectGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsDeleteCall) RequestId(requestId string) *InterconnectGroupsDeleteCall { - 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 -// details. -func (c *InterconnectGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsDeleteCall) Context(ctx context.Context) *InterconnectGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InterconnectGroup resource in the given scope. -// -// - interconnectGroup: Name of the InterconnectGroup resource to return. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Get(project string, interconnectGroup string) *InterconnectGroupsGetCall { - c := &InterconnectGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsGetCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetCall) Context(ctx context.Context) *InterconnectGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroup.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 *InterconnectGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectGroup, 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 := &InterconnectGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) GetIamPolicy(project string, resource string) *InterconnectGroupsGetIamPolicyCall { - c := &InterconnectGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetIamPolicyCall) Context(ctx context.Context) *InterconnectGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.getIamPolicy" call. -// 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 *InterconnectGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetOperationalStatusCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOperationalStatus: Returns the interconnectStatuses for the -// specified -// InterconnectGroup. -// -// - interconnectGroup: Name of the interconnectGroup resource to query. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) GetOperationalStatus(project string, interconnectGroup string) *InterconnectGroupsGetOperationalStatusCall { - c := &InterconnectGroupsGetOperationalStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsGetOperationalStatusCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetOperationalStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetOperationalStatusCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetOperationalStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetOperationalStatusCall) Context(ctx context.Context) *InterconnectGroupsGetOperationalStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetOperationalStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetOperationalStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getOperationalStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.getOperationalStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroupsGetOperationalStatusResponse.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 *InterconnectGroupsGetOperationalStatusCall) Do(opts ...googleapi.CallOption) (*InterconnectGroupsGetOperationalStatusResponse, 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 := &InterconnectGroupsGetOperationalStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getOperationalStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsInsertCall struct { - s *Service - project string - interconnectgroup *InterconnectGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a InterconnectGroup in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Insert(project string, interconnectgroup *InterconnectGroup) *InterconnectGroupsInsertCall { - c := &InterconnectGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectgroup = interconnectgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsInsertCall) RequestId(requestId string) *InterconnectGroupsInsertCall { - 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 -// details. -func (c *InterconnectGroupsInsertCall) Fields(s ...googleapi.Field) *InterconnectGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsInsertCall) Context(ctx context.Context) *InterconnectGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the InterconnectGroups for a project in the given scope. -// -// - project: Project ID for this request. -func (r *InterconnectGroupsService) List(project string) *InterconnectGroupsListCall { - c := &InterconnectGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectGroupsListCall) Filter(filter string) *InterconnectGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectGroupsListCall) MaxResults(maxResults int64) *InterconnectGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectGroupsListCall) OrderBy(orderBy string) *InterconnectGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectGroupsListCall) PageToken(pageToken string) *InterconnectGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsListCall) Fields(s ...googleapi.Field) *InterconnectGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsListCall) IfNoneMatch(entityTag string) *InterconnectGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsListCall) Context(ctx context.Context) *InterconnectGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroupsListResponse.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 *InterconnectGroupsListCall) Do(opts ...googleapi.CallOption) (*InterconnectGroupsListResponse, 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 := &InterconnectGroupsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectGroupsListCall) Pages(ctx context.Context, f func(*InterconnectGroupsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectGroupsPatchCall struct { - s *Service - project string - interconnectGroup string - interconnectgroup *InterconnectGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified InterconnectGroup resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - interconnectGroup: Name of the InterconnectGroup resource to patch. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Patch(project string, interconnectGroup string, interconnectgroup *InterconnectGroup) *InterconnectGroupsPatchCall { - c := &InterconnectGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - c.interconnectgroup = interconnectgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsPatchCall) RequestId(requestId string) *InterconnectGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. -func (c *InterconnectGroupsPatchCall) UpdateMask(updateMask string) *InterconnectGroupsPatchCall { - 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 -// details. -func (c *InterconnectGroupsPatchCall) Fields(s ...googleapi.Field) *InterconnectGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsPatchCall) Context(ctx context.Context) *InterconnectGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - 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{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectGroupsSetIamPolicyCall { - c := &InterconnectGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsSetIamPolicyCall) Context(ctx context.Context) *InterconnectGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.setIamPolicy" call. -// 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 *InterconnectGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectGroupsTestIamPermissionsCall { - c := &InterconnectGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectLocationsGetCall struct { - s *Service - project string - interconnectLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details for the specified interconnect location. Gets a -// list of -// available interconnect locations by making a list() request. -// -// - interconnectLocation: Name of the interconnect location to return. -// - project: Project ID for this request. -func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { - c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectLocation = interconnectLocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations/{interconnectLocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectLocation": c.interconnectLocation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectLocations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocation.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 *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, 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 := &InterconnectLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectLocations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect locations available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { - c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectLocationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectLocations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocationList.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 *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, 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 := &InterconnectLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectLocations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectRemoteLocationsGetCall struct { - s *Service - project string - interconnectRemoteLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details for the specified interconnect remote location. -// Gets a -// list of available interconnect remote locations by making alist() request. -// -// - interconnectRemoteLocation: Name of the interconnect remote location to -// return. -// - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { - c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectRemoteLocation = interconnectRemoteLocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectRemoteLocation": c.interconnectRemoteLocation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectRemoteLocations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocation.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 *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, 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 := &InterconnectRemoteLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectRemoteLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect remote locations available to -// the -// specified project. -// -// - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { - c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectRemoteLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectRemoteLocations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocationList.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 *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, 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 := &InterconnectRemoteLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectsDeleteCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Interconnect. -// -// - interconnect: Name of the interconnect to delete. -// - project: Project ID for this request. -func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { - c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { - 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 -// details. -func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Interconnect. Get a list of available -// Interconnects -// by making a list() request. -// -// - interconnect: Name of the interconnect to return. -// - project: Project ID for this request. -func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { - c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Interconnect.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 *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, 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 := &Interconnect{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetDiagnosticsCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetDiagnostics: Returns the interconnectDiagnostics for the -// specified -// Interconnect. -// -// In the event of a -// global outage, do not use this API to make decisions about where to -// redirect your network traffic. -// -// Unlike a VLAN attachment, which is regional, a Cloud Interconnect -// connection is a global resource. A global outage can prevent this -// API from functioning properly. -// -// - interconnect: Name of the interconnect resource to query. -// - project: Project ID for this request. -func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { - c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *InterconnectsGetDiagnosticsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetDiagnosticsCall) IfNoneMatch(entityTag string) *InterconnectsGetDiagnosticsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetDiagnosticsCall) Context(ctx context.Context) *InterconnectsGetDiagnosticsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getDiagnostics") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.getDiagnostics", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getDiagnostics" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetDiagnosticsResponse.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 *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetDiagnosticsResponse, 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 := &InterconnectsGetDiagnosticsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.getDiagnostics", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) GetIamPolicy(project string, resource string) *InterconnectsGetIamPolicyCall { - c := &InterconnectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetIamPolicyCall) Context(ctx context.Context) *InterconnectsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getIamPolicy" call. -// 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 *InterconnectsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetMacsecConfigCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetMacsecConfig: Returns the interconnectMacsecConfig for the -// specified -// Interconnect. -// -// - interconnect: Name of the interconnect resource to query. -// - project: Project ID for this request. -func (r *InterconnectsService) GetMacsecConfig(project string, interconnect string) *InterconnectsGetMacsecConfigCall { - c := &InterconnectsGetMacsecConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetMacsecConfigCall) Fields(s ...googleapi.Field) *InterconnectsGetMacsecConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetMacsecConfigCall) IfNoneMatch(entityTag string) *InterconnectsGetMacsecConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetMacsecConfigCall) Context(ctx context.Context) *InterconnectsGetMacsecConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetMacsecConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.getMacsecConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getMacsecConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetMacsecConfigResponse.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 *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetMacsecConfigResponse, 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 := &InterconnectsGetMacsecConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.getMacsecConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsInsertCall struct { - s *Service - project string - interconnect *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an Interconnect in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { - c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { - 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 -// details. -func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnect) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Interconnects available to the specified -// project. -// -// - project: Project ID for this request. -func (r *InterconnectsService) List(project string) *InterconnectsListCall { - c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectList.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 *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, 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 := &InterconnectList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectsPatchCall struct { - s *Service - project string - interconnect string - interconnect2 *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified Interconnect with the data included in the -// request. -// This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - interconnect: Name of the interconnect to update. -// - project: Project ID for this request. -func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { - c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - c.interconnect2 = interconnect2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { - 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 -// details. -func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnect2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - 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{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectsSetIamPolicyCall { - c := &InterconnectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsSetIamPolicyCall) Context(ctx context.Context) *InterconnectsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.setIamPolicy" call. -// 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 *InterconnectsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Interconnect. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { - c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsSetLabelsCall) Context(ctx context.Context) *InterconnectsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { - c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesGetCall struct { - s *Service - project string - licenseCode string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Return a specified license code. License codes are mirrored across -// all projects that have permissions to read the License Code. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - licenseCode: Number corresponding to the License code resource to return. -// - project: Project ID for this request. -func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { - c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.licenseCode = licenseCode - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicenseCodesGetCall) IfNoneMatch(entityTag string) *LicenseCodesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesGetCall) Context(ctx context.Context) *LicenseCodesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{licenseCode}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "licenseCode": c.licenseCode, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LicenseCode.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 *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, 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 := &LicenseCode{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicenseCodesService) GetIamPolicy(project string, resource string) *LicenseCodesGetIamPolicyCall { - c := &LicenseCodesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *LicenseCodesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicenseCodesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *LicenseCodesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicenseCodesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicenseCodesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicenseCodesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesGetIamPolicyCall) Context(ctx context.Context) *LicenseCodesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.getIamPolicy" call. -// 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 *LicenseCodesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicenseCodesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicenseCodesSetIamPolicyCall { - c := &LicenseCodesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicenseCodesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicenseCodesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesSetIamPolicyCall) Context(ctx context.Context) *LicenseCodesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.setIamPolicy" call. -// 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 *LicenseCodesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { - c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicenseCodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicenseCodesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesTestIamPermissionsCall) Context(ctx context.Context) *LicenseCodesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesDeleteCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified license. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: Name of the license resource to delete. -// - project: Project ID for this request. -func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { - c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { - 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 -// details. -func (c *LicensesDeleteCall) Fields(s ...googleapi.Field) *LicensesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesDeleteCall) Context(ctx context.Context) *LicensesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesGetCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified License resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: Name of the License resource to return. -// - project: Project ID for this request. -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *License.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 *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, 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 := &License{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { - c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.getIamPolicy" call. -// 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 *LicensesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesInsertCall struct { - s *Service - project string - license *License - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a License resource in the specified project. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { - c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { - 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 -// details. -func (c *LicensesInsertCall) Fields(s ...googleapi.Field) *LicensesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesInsertCall) Context(ctx context.Context) *LicensesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.license) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of licenses -// available in the specified project. This method does not -// get any licenses that belong to other projects, including licenses -// attached -// to publicly-available images, like Debian 9. If you want to get a list -// of -// publicly-available licenses, use this method to make a request to -// the -// respective image project, such as debian-cloud orwindows-cloud. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -func (r *LicensesService) List(project string) *LicensesListCall { - c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *LicensesListCall) Filter(filter string) *LicensesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *LicensesListCall) MaxResults(maxResults int64) *LicensesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *LicensesListCall) OrderBy(orderBy string) *LicensesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *LicensesListCall) PageToken(pageToken string) *LicensesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *LicensesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *LicensesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesListCall) Fields(s ...googleapi.Field) *LicensesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesListCall) IfNoneMatch(entityTag string) *LicensesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesListCall) Context(ctx context.Context) *LicensesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *LicensesListResponse.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 *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListResponse, 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 := &LicensesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *LicensesListCall) Pages(ctx context.Context, f func(*LicensesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type LicensesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { - c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.setIamPolicy" call. -// 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 *LicensesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { - c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicensesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesTestIamPermissionsCall) Context(ctx context.Context) *LicensesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesUpdateCall struct { - s *Service - project string - license string - license2 *License - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a License resource in the specified project. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: The license name for this request. -// - project: Project ID for this request. -func (r *LicensesService) Update(project string, license string, license2 *License) *LicensesUpdateCall { - c := &LicensesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - c.license2 = license2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesUpdateCall) RequestId(requestId string) *LicensesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *LicensesUpdateCall) UpdateMask(updateMask string) *LicensesUpdateCall { - 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 -// details. -func (c *LicensesUpdateCall) Fields(s ...googleapi.Field) *LicensesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesUpdateCall) Context(ctx context.Context) *LicensesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.license2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - 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{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesDeleteCall struct { - s *Service - project string - machineImage string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified machine image. Deleting a machine image is -// permanent -// and cannot be undone. -// -// - machineImage: The name of the machine image to delete. -// - project: Project ID for this request. -func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { - c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineImage = machineImage - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDeleteCall { - 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 -// details. -func (c *MachineImagesDeleteCall) Fields(s ...googleapi.Field) *MachineImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesDeleteCall) Context(ctx context.Context) *MachineImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesGetCall struct { - s *Service - project string - machineImage string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine image. -// -// - machineImage: The name of the machine image. -// - project: Project ID for this request. -func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { - c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineImage = machineImage - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesGetCall) IfNoneMatch(entityTag string) *MachineImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetCall) Context(ctx context.Context) *MachineImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineImage.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 *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, 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 := &MachineImage{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { - c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *MachineImagesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetIamPolicyCall) Context(ctx context.Context) *MachineImagesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.getIamPolicy" call. -// 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 *MachineImagesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesInsertCall struct { - s *Service - project string - machineimage *MachineImage - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a machine image in the specified project using the -// data that is included in the request. If you are creating a new -// machine -// image to update an existing instance, your new machine image should use -// the -// same network or, if applicable, the same subnetwork as the -// original -// instance. -// -// - project: Project ID for this request. -func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { - c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineimage = machineimage - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *MachineImagesInsertCall) RequestId(requestId string) *MachineImagesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstance sets the optional parameter "sourceInstance": Required. -// Source instance that is used to create the machine image from. -func (c *MachineImagesInsertCall) SourceInstance(sourceInstance string) *MachineImagesInsertCall { - c.urlParams_.Set("sourceInstance", sourceInstance) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesInsertCall) Fields(s ...googleapi.Field) *MachineImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesInsertCall) Context(ctx context.Context) *MachineImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.machineimage) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine images that are contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *MachineImagesService) List(project string) *MachineImagesListCall { - c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineImagesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesListCall) IfNoneMatch(entityTag string) *MachineImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesListCall) Context(ctx context.Context) *MachineImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineImageList.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 *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageList, 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 := &MachineImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type MachineImagesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { - c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesSetIamPolicyCall) Context(ctx context.Context) *MachineImagesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.setIamPolicy" call. -// 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 *MachineImagesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a machine image. To learn more about labels, -// read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *MachineImagesSetLabelsCall { - c := &MachineImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesSetLabelsCall) Fields(s ...googleapi.Field) *MachineImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesSetLabelsCall) Context(ctx context.Context) *MachineImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { - c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *MachineImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesTestIamPermissionsCall) Context(ctx context.Context) *MachineImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of machine types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *MachineTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *MachineTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.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 *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, 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 := &MachineTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type MachineTypesGetCall struct { - s *Service - project string - zone string - machineType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine type. -// -// - machineType: Name of the machine type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.machineType = machineType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes/{machineType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineType.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 *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, 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 := &MachineType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeList.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 *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, 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 := &MachineTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all NetworkAttachment -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkAttachmentsService) AggregatedList(project string) *NetworkAttachmentsAggregatedListCall { - c := &NetworkAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkAttachmentsAggregatedListCall) Filter(filter string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsAggregatedListCall) MaxResults(maxResults int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsAggregatedListCall) OrderBy(orderBy string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkAttachmentsAggregatedListCall) PageToken(pageToken string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsAggregatedListCall) Context(ctx context.Context) *NetworkAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentAggregatedList.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 *NetworkAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentAggregatedList, 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 := &NetworkAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsDeleteCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NetworkAttachment in the given scope -// -// - networkAttachment: Name of the NetworkAttachment resource to delete. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Delete(project string, region string, networkAttachment string) *NetworkAttachmentsDeleteCall { - c := &NetworkAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsDeleteCall) RequestId(requestId string) *NetworkAttachmentsDeleteCall { - 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 -// details. -func (c *NetworkAttachmentsDeleteCall) Fields(s ...googleapi.Field) *NetworkAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsDeleteCall) Context(ctx context.Context) *NetworkAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsGetCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NetworkAttachment resource in the given scope. -// -// - networkAttachment: Name of the NetworkAttachment resource to return. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Get(project string, region string, networkAttachment string) *NetworkAttachmentsGetCall { - c := &NetworkAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsGetCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsGetCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetCall) Context(ctx context.Context) *NetworkAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachment.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 *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAttachment, 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 := &NetworkAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) GetIamPolicy(project string, region string, resource string) *NetworkAttachmentsGetIamPolicyCall { - c := &NetworkAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NetworkAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.getIamPolicy" call. -// 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 *NetworkAttachmentsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsInsertCall struct { - s *Service - project string - region string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NetworkAttachment in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Insert(project string, region string, networkattachment *NetworkAttachment) *NetworkAttachmentsInsertCall { - c := &NetworkAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkattachment = networkattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsInsertCall) RequestId(requestId string) *NetworkAttachmentsInsertCall { - 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 -// details. -func (c *NetworkAttachmentsInsertCall) Fields(s ...googleapi.Field) *NetworkAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsInsertCall) Context(ctx context.Context) *NetworkAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the NetworkAttachments for a project in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) List(project string, region string) *NetworkAttachmentsListCall { - c := &NetworkAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkAttachmentsListCall) Filter(filter string) *NetworkAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsListCall) MaxResults(maxResults int64) *NetworkAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsListCall) OrderBy(orderBy string) *NetworkAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkAttachmentsListCall) PageToken(pageToken string) *NetworkAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsListCall) Context(ctx context.Context) *NetworkAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentList.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 *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentList, 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 := &NetworkAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkAttachmentsListCall) Pages(ctx context.Context, f func(*NetworkAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsPatchCall struct { - s *Service - project string - region string - networkAttachment string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified NetworkAttachment resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - networkAttachment: Name of the NetworkAttachment resource to patch. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *NetworkAttachmentsService) Patch(project string, region string, networkAttachment string, networkattachment *NetworkAttachment) *NetworkAttachmentsPatchCall { - c := &NetworkAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - c.networkattachment = networkattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsPatchCall) RequestId(requestId string) *NetworkAttachmentsPatchCall { - 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 -// details. -func (c *NetworkAttachmentsPatchCall) Fields(s ...googleapi.Field) *NetworkAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsPatchCall) Context(ctx context.Context) *NetworkAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - 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{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NetworkAttachmentsSetIamPolicyCall { - c := &NetworkAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsSetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.setIamPolicy" call. -// 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 *NetworkAttachmentsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkAttachmentsTestIamPermissionsCall { - c := &NetworkAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *NetworkAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService -// resources available to -// the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { - c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityServiceAggregatedList.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 *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, 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 := &NetworkEdgeSecurityServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEdgeSecurityServicesDeleteCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified service. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { - c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesGetCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a specified NetworkEdgeSecurityService. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// get. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { - c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityService.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 *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, 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 := &NetworkEdgeSecurityService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesInsertCall struct { - s *Service - project string - region string - networkedgesecurityservice *NetworkEdgeSecurityService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new service in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { - c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkedgesecurityservice = networkedgesecurityservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkedgesecurityservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesPatchCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - networkedgesecurityservice *NetworkEdgeSecurityService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { - c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - c.networkedgesecurityservice = networkedgesecurityservice - return c -} - -// Paths sets the optional parameter "paths": -func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// updated as part of this request. -func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkedgesecurityservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - 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{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of network endpoint groups and sorts them -// by zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { - c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkEndpointGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupAggregatedList.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 *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, 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 := &NetworkEndpointGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsDeleteCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group. The network endpoints -// in the -// NEG and the VM instances they belong to are not terminated when the NEG -// is -// deleted. Note that the NEG cannot be deleted if there are backend -// services -// referencing it. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { - c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint -// group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// removing network -// -// endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsGetCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { - c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsInsertCall struct { - s *Service - project string - zone string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { - c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of network endpoint groups that are located in -// the -// specified project and zone. -// -// - project: Project ID for this request. -// - zone: The name of thezone -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { - c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { - c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupslistendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { - c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddAssociationCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesAddAssociationCall { - c := &NetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// AssociatedPolicyToBeReplaced sets the optional parameter -// "associatedPolicyToBeReplaced": Name of the firewall policy associated with -// the target network to swap -// association with. This field is mutually exclusive -// with -// 'replace_existing_association'. -func (c *NetworkFirewallPoliciesAddAssociationCall) AssociatedPolicyToBeReplaced(associatedPolicyToBeReplaced string) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("associatedPolicyToBeReplaced", associatedPolicyToBeReplaced) - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *NetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPacketMirroringRule: Inserts a packet mirroring rule into a firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddPacketMirroringRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesAddPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddPacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddRuleCall { - c := &NetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of network firewall policies, -// listing network -// firewall policies from all applicable scopes (global and regional) -// and -// grouping the results per scope. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AggregatedList(project string) *NetworkFirewallPoliciesAggregatedListCall { - c := &NetworkFirewallPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkFirewallPoliciesAggregatedListCall) Filter(filter string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkFirewallPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkFirewallPoliciesAggregatedListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkFirewallPoliciesAggregatedListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkFirewallPoliciesAggregatedListCall) PageToken(pageToken string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkFirewallPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkFirewallPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAggregatedListCall) Context(ctx context.Context) *NetworkFirewallPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkFirewallPolicyAggregatedList.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 *NetworkFirewallPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkFirewallPolicyAggregatedList, 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 := &NetworkFirewallPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkFirewallPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkFirewallPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkFirewallPoliciesCloneRulesCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) CloneRules(project string, firewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c := &NetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *NetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *NetworkFirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesDeleteCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Delete(project string, firewallPolicy string) *NetworkFirewallPoliciesDeleteCall { - c := &NetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *NetworkFirewallPoliciesDeleteCall { - 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 -// details. -func (c *NetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *NetworkFirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Get(project string, firewallPolicy string) *NetworkFirewallPoliciesGetCall { - c := &NetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetAssociationCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried -// association belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesGetAssociationCall { - c := &NetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *NetworkFirewallPoliciesGetAssociationCall) Name(name string) *NetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) GetIamPolicy(project string, resource string) *NetworkFirewallPoliciesGetIamPolicyCall { - c := &NetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getIamPolicy" call. -// 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 *NetworkFirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPacketMirroringRule: Gets a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetPacketMirroringRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesGetPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getPacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetRuleCall { - c := &NetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *NetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesInsertCall struct { - s *Service - project string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Insert(project string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesInsertCall { - c := &NetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesInsertCall) RequestId(requestId string) *NetworkFirewallPoliciesInsertCall { - 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 -// details. -func (c *NetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *NetworkFirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the specified -// project. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) List(project string) *NetworkFirewallPoliciesListCall { - c := &NetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkFirewallPoliciesListCall) Filter(filter string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkFirewallPoliciesListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkFirewallPoliciesListCall) PageToken(pageToken string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesListCall) Context(ctx context.Context) *NetworkFirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkFirewallPoliciesPatchCall struct { - s *Service - project string - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Patch(project string, firewallPolicy string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesPatchCall { - c := &NetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesPatchAssociationCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchAssociation: Updates an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesPatchAssociationCall { - c := &NetworkFirewallPoliciesPatchAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchAssociationCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patchAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesPatchPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPacketMirroringRule: Patches a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchPacketMirroringRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesPatchPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patchPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesPatchRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchRuleCall { - c := &NetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *NetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemoveAssociationCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveAssociationCall { - c := &NetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemovePacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePacketMirroringRule: Deletes a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemovePacketMirroringRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c := &NetworkFirewallPoliciesRemovePacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removePacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removePacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removePacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemoveRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveRuleCall { - c := &NetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *NetworkFirewallPoliciesSetIamPolicyCall { - c := &NetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.setIamPolicy" call. -// 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 *NetworkFirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkFirewallPoliciesTestIamPermissionsCall { - c := &NetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *NetworkFirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkProfilesGetCall struct { - s *Service - project string - networkProfile string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network profile. -// -// - networkProfile: Name of the network profile to return. -// - project: Project ID for this request. -func (r *NetworkProfilesService) Get(project string, networkProfile string) *NetworkProfilesGetCall { - c := &NetworkProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkProfile = networkProfile - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkProfilesGetCall) Fields(s ...googleapi.Field) *NetworkProfilesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkProfilesGetCall) IfNoneMatch(entityTag string) *NetworkProfilesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkProfilesGetCall) Context(ctx context.Context) *NetworkProfilesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkProfilesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkProfilesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles/{networkProfile}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkProfile": c.networkProfile, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkProfiles.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkProfiles.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkProfile.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 *NetworkProfilesGetCall) Do(opts ...googleapi.CallOption) (*NetworkProfile, 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 := &NetworkProfile{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkProfiles.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkProfilesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of network profiles available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *NetworkProfilesService) List(project string) *NetworkProfilesListCall { - c := &NetworkProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkProfilesListCall) Filter(filter string) *NetworkProfilesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkProfilesListCall) MaxResults(maxResults int64) *NetworkProfilesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkProfilesListCall) OrderBy(orderBy string) *NetworkProfilesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkProfilesListCall) PageToken(pageToken string) *NetworkProfilesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkProfilesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkProfilesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkProfilesListCall) Fields(s ...googleapi.Field) *NetworkProfilesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkProfilesListCall) IfNoneMatch(entityTag string) *NetworkProfilesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkProfilesListCall) Context(ctx context.Context) *NetworkProfilesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkProfilesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkProfilesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkProfiles.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkProfiles.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkProfilesListResponse.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 *NetworkProfilesListCall) Do(opts ...googleapi.CallOption) (*NetworkProfilesListResponse, 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 := &NetworkProfilesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkProfiles.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkProfilesListCall) Pages(ctx context.Context, f func(*NetworkProfilesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPeering: Adds a peering to the specified network. -// -// - network: Name of the network resource to add peering to. -// - project: Project ID for this request. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { - 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 -// details. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksaddpeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.addPeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.addPeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.addPeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksCancelRequestRemovePeeringCall struct { - s *Service - project string - network string - networkscancelrequestremovepeeringrequest *NetworksCancelRequestRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CancelRequestRemovePeering: Cancel requests to remove a peering from the -// specified network. Applicable -// only for PeeringConnection with update_strategy=CONSENSUS. Cancels -// a -// request to remove a peering from the specified network. -// -// - network: Name of the network resource to remove peering from. -// - project: Project ID for this request. -func (r *NetworksService) CancelRequestRemovePeering(project string, network string, networkscancelrequestremovepeeringrequest *NetworksCancelRequestRemovePeeringRequest) *NetworksCancelRequestRemovePeeringCall { - c := &NetworksCancelRequestRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networkscancelrequestremovepeeringrequest = networkscancelrequestremovepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksCancelRequestRemovePeeringCall) RequestId(requestId string) *NetworksCancelRequestRemovePeeringCall { - 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 -// details. -func (c *NetworksCancelRequestRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksCancelRequestRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksCancelRequestRemovePeeringCall) Context(ctx context.Context) *NetworksCancelRequestRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksCancelRequestRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksCancelRequestRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkscancelrequestremovepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/cancelRequestRemovePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.cancelRequestRemovePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.cancelRequestRemovePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksCancelRequestRemovePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.cancelRequestRemovePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network. -// -// - network: Name of the network to delete. -// - project: Project ID for this request. -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { - 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 -// details. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network. -// -// - network: Name of the network to return. -// - project: Project ID for this request. -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Network.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 *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, 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 := &Network{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksGetEffectiveFirewallsCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns the effective firewalls on a given network. -// -// - network: Name of the network for this request. -// - project: Project ID for this request. -func (r *NetworksService) GetEffectiveFirewalls(project string, network string) *NetworksGetEffectiveFirewallsCall { - c := &NetworksGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *NetworksGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *NetworksGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksGetEffectiveFirewallsCall) Context(ctx context.Context) *NetworksGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworksGetEffectiveFirewallsResponse.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 *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*NetworksGetEffectiveFirewallsResponse, 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 := &NetworksGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network in the specified project using the data -// included -// in the request. -// -// - project: Project ID for this request. -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { - 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 -// details. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.network) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of networks available to the specified project. -// -// - project: Project ID for this request. -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkList.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 *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, 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 := &NetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksListIpAddressesCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListIpAddresses: Lists the internal IP addresses in the specified network. -// -// - network: Name of the network for this request. -// - project: Project ID for this request. -func (r *NetworksService) ListIpAddresses(project string, network string) *NetworksListIpAddressesCall { - c := &NetworksListIpAddressesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListIpAddressesCall) Filter(filter string) *NetworksListIpAddressesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListIpAddressesCall) MaxResults(maxResults int64) *NetworksListIpAddressesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListIpAddressesCall) OrderBy(orderBy string) *NetworksListIpAddressesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListIpAddressesCall) PageToken(pageToken string) *NetworksListIpAddressesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListIpAddressesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListIpAddressesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Types sets the optional parameter "types": (Optional) types filter separate -// by comma, valid values are: SUBNETWORK, -// RESERVED, PEER_USED, PEER_RESERVED, REMOTE_USED, REMOTE_RESERVED. -func (c *NetworksListIpAddressesCall) Types(types string) *NetworksListIpAddressesCall { - c.urlParams_.Set("types", types) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListIpAddressesCall) Fields(s ...googleapi.Field) *NetworksListIpAddressesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListIpAddressesCall) IfNoneMatch(entityTag string) *NetworksListIpAddressesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListIpAddressesCall) Context(ctx context.Context) *NetworksListIpAddressesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListIpAddressesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListIpAddressesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listIpAddresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.listIpAddresses", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.listIpAddresses" call. -// Any non-2xx status code is an error. Response headers are in either -// *IpAddressesList.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 *NetworksListIpAddressesCall) Do(opts ...googleapi.CallOption) (*IpAddressesList, 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 := &IpAddressesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.listIpAddresses", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListIpAddressesCall) Pages(ctx context.Context, f func(*IpAddressesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksListIpOwnersCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListIpOwners: Lists the internal IP owners in the specified network. -// -// - network: Name of the network to return. -// - project: Project ID for this request. -func (r *NetworksService) ListIpOwners(project string, network string) *NetworksListIpOwnersCall { - c := &NetworksListIpOwnersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListIpOwnersCall) Filter(filter string) *NetworksListIpOwnersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IpCidrRange sets the optional parameter "ipCidrRange": (Optional) IP CIDR -// range filter, example: "10.128.10.0/30". -func (c *NetworksListIpOwnersCall) IpCidrRange(ipCidrRange string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ipCidrRange", ipCidrRange) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListIpOwnersCall) MaxResults(maxResults int64) *NetworksListIpOwnersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListIpOwnersCall) OrderBy(orderBy string) *NetworksListIpOwnersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// OwnerProjects sets the optional parameter "ownerProjects": (Optional) -// Project IDs filter, example: "project-1,project-2". -func (c *NetworksListIpOwnersCall) OwnerProjects(ownerProjects string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ownerProjects", ownerProjects) - return c -} - -// OwnerTypes sets the optional parameter "ownerTypes": (Optional) Owner types -// filter, example: "instance,forwardingRule". -func (c *NetworksListIpOwnersCall) OwnerTypes(ownerTypes string) *NetworksListIpOwnersCall { - c.urlParams_.Set("ownerTypes", ownerTypes) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListIpOwnersCall) PageToken(pageToken string) *NetworksListIpOwnersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListIpOwnersCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListIpOwnersCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// SubnetName sets the optional parameter "subnetName": (Optional) Subnetwork -// name filter. -func (c *NetworksListIpOwnersCall) SubnetName(subnetName string) *NetworksListIpOwnersCall { - c.urlParams_.Set("subnetName", subnetName) - return c -} - -// SubnetRegion sets the optional parameter "subnetRegion": (Optional) -// Subnetwork region filter. -func (c *NetworksListIpOwnersCall) SubnetRegion(subnetRegion string) *NetworksListIpOwnersCall { - c.urlParams_.Set("subnetRegion", subnetRegion) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListIpOwnersCall) Fields(s ...googleapi.Field) *NetworksListIpOwnersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListIpOwnersCall) IfNoneMatch(entityTag string) *NetworksListIpOwnersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListIpOwnersCall) Context(ctx context.Context) *NetworksListIpOwnersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListIpOwnersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListIpOwnersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listIpOwners") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.listIpOwners", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.listIpOwners" call. -// Any non-2xx status code is an error. Response headers are in either -// *IpOwnerList.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 *NetworksListIpOwnersCall) Do(opts ...googleapi.CallOption) (*IpOwnerList, 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 := &IpOwnerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.listIpOwners", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListIpOwnersCall) Pages(ctx context.Context, f func(*IpOwnerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksListPeeringRoutesCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPeeringRoutes: Lists the peering routes exchanged over peering -// connection. -// -// - network: Name of the network for this request. -// - project: Project ID for this request. -func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { - c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Direction sets the optional parameter "direction": The direction of the -// exchanged routes. -// -// Possible values: -// -// "INCOMING" - For routes exported from peer network. -// "OUTGOING" - For routes exported from local network. -func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("direction", direction) - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListPeeringRoutesCall) OrderBy(orderBy string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListPeeringRoutesCall) PageToken(pageToken string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// PeeringName sets the optional parameter "peeringName": The response will -// show routes exchanged over the given peering connection. -func (c *NetworksListPeeringRoutesCall) PeeringName(peeringName string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("peeringName", peeringName) - return c -} - -// Region sets the optional parameter "region": The region of the request. The -// response will include all subnet routes, -// static routes and dynamic routes in the region. -func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("region", region) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListPeeringRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListPeeringRoutesCall) IfNoneMatch(entityTag string) *NetworksListPeeringRoutesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListPeeringRoutesCall) Context(ctx context.Context) *NetworksListPeeringRoutesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListPeeringRoutesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listPeeringRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.listPeeringRoutes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.listPeeringRoutes" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExchangedPeeringRoutesList.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 *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*ExchangedPeeringRoutesList, 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 := &ExchangedPeeringRoutesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.listPeeringRoutes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*ExchangedPeeringRoutesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksPatchCall struct { - s *Service - project string - network string - network2 *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified network with the data included in the -// request. -// Only routingConfig can be modified. -// -// - network: Name of the network to update. -// - project: Project ID for this request. -func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { - c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.network2 = network2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { - 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 -// details. -func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.network2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePeering: Removes a peering from the specified network. -// -// - network: Name of the network resource to remove peering from. -// - project: Project ID for this request. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { - 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 -// details. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksremovepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/removePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.removePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.removePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.removePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksRequestRemovePeeringCall struct { - s *Service - project string - network string - networksrequestremovepeeringrequest *NetworksRequestRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RequestRemovePeering: Requests to remove a peering from the specified -// network. Applicable only -// for PeeringConnection with update_strategy=CONSENSUS. -// -// - network: Name of the network resource to remove peering from. -// - project: Project ID for this request. -func (r *NetworksService) RequestRemovePeering(project string, network string, networksrequestremovepeeringrequest *NetworksRequestRemovePeeringRequest) *NetworksRequestRemovePeeringCall { - c := &NetworksRequestRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksrequestremovepeeringrequest = networksrequestremovepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksRequestRemovePeeringCall) RequestId(requestId string) *NetworksRequestRemovePeeringCall { - 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 -// details. -func (c *NetworksRequestRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRequestRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksRequestRemovePeeringCall) Context(ctx context.Context) *NetworksRequestRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksRequestRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRequestRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksrequestremovepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/requestRemovePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.requestRemovePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.requestRemovePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksRequestRemovePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.requestRemovePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksSwitchToCustomModeCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SwitchToCustomMode: Switches the network mode from auto subnet mode to -// custom subnet mode. -// -// - network: Name of the network to be updated. -// - project: Project ID for this request. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { - 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 -// details. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/switchToCustomMode") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.switchToCustomMode", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.switchToCustomMode" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.switchToCustomMode", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { - c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksUpdatePeeringCall struct { - s *Service - project string - network string - networksupdatepeeringrequest *NetworksUpdatePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePeering: Updates the specified network peering with the data included -// in the -// request. You can only modify the NetworkPeering.export_custom_routes -// field -// and the NetworkPeering.import_custom_routes field. -// -// - network: Name of the network resource which the updated peering is -// belonging to. -// - project: Project ID for this request. -func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { - c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksupdatepeeringrequest = networksupdatepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall { - 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 -// details. -func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksUpdatePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksupdatepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/updatePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.updatePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.updatePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksUpdatePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.updatePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsAddNodesCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddNodes: Adds specified number of nodes to the node group. -// -// - nodeGroup: Name of the NodeGroup resource. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { - c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsaddnodesrequest = nodegroupsaddnodesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsAddNodesCall) RequestId(requestId string) *NodeGroupsAddNodesCall { - 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 -// details. -func (c *NodeGroupsAddNodesCall) Fields(s ...googleapi.Field) *NodeGroupsAddNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAddNodesCall) Context(ctx context.Context) *NodeGroupsAddNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsAddNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsaddnodesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.addNodes", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.addNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsAddNodesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.addNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node groups. -// Note: use nodeGroups.listNodes for more details about each group. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { - c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsAggregatedListCall) Filter(filter string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsAggregatedListCall) MaxResults(maxResults int64) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsAggregatedListCall) OrderBy(orderBy string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsAggregatedListCall) PageToken(pageToken string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NodeGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAggregatedListCall) Context(ctx context.Context) *NodeGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupAggregatedList.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 *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGroupAggregatedList, 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 := &NodeGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NodeGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsDeleteCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NodeGroup resource. -// -// - nodeGroup: Name of the NodeGroup resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { - c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsDeleteCall) RequestId(requestId string) *NodeGroupsDeleteCall { - 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 -// details. -func (c *NodeGroupsDeleteCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteCall) Context(ctx context.Context) *NodeGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsDeleteNodesCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteNodes: Deletes specified nodes from the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes will be deleted. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { - c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsdeletenodesrequest = nodegroupsdeletenodesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsDeleteNodesCall) RequestId(requestId string) *NodeGroupsDeleteNodesCall { - 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 -// details. -func (c *NodeGroupsDeleteNodesCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteNodesCall) Context(ctx context.Context) *NodeGroupsDeleteNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsDeleteNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsdeletenodesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.deleteNodes", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.deleteNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteNodesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.deleteNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsGetCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NodeGroup. Get a list of available NodeGroups -// by making a list() request. -// Note: the "nodes" field should not be used. Use -// nodeGroups.listNodes -// instead. -// -// - nodeGroup: Name of the node group to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { - c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsGetCall) Fields(s ...googleapi.Field) *NodeGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsGetCall) IfNoneMatch(entityTag string) *NodeGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetCall) Context(ctx context.Context) *NodeGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroup.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 *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, 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 := &NodeGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { - c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NodeGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetIamPolicyCall) Context(ctx context.Context) *NodeGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.getIamPolicy" call. -// 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 *NodeGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsInsertCall struct { - s *Service - project string - zone string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NodeGroup resource in the specified project using the -// data -// included in the request. -// -// - initialNodeCount: Initial count of nodes in the node group. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { - c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("initialNodeCount", fmt.Sprint(initialNodeCount)) - c.nodegroup = nodegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsInsertCall) RequestId(requestId string) *NodeGroupsInsertCall { - 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 -// details. -func (c *NodeGroupsInsertCall) Fields(s ...googleapi.Field) *NodeGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsInsertCall) Context(ctx context.Context) *NodeGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node groups available to the specified -// project. -// Note: use nodeGroups.listNodes for more details about each group. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { - c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsListCall) Filter(filter string) *NodeGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListCall) MaxResults(maxResults int64) *NodeGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsListCall) OrderBy(orderBy string) *NodeGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsListCall) PageToken(pageToken string) *NodeGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsListCall) Fields(s ...googleapi.Field) *NodeGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsListCall) IfNoneMatch(entityTag string) *NodeGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListCall) Context(ctx context.Context) *NodeGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupList.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 *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, 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 := &NodeGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsListCall) Pages(ctx context.Context, f func(*NodeGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsListNodesCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNodes: Lists nodes in the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes you want to list. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { - c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsListNodesCall) Filter(filter string) *NodeGroupsListNodesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListNodesCall) MaxResults(maxResults int64) *NodeGroupsListNodesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsListNodesCall) OrderBy(orderBy string) *NodeGroupsListNodesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsListNodesCall) PageToken(pageToken string) *NodeGroupsListNodesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsListNodesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListNodesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsListNodesCall) Fields(s ...googleapi.Field) *NodeGroupsListNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListNodesCall) Context(ctx context.Context) *NodeGroupsListNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsListNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.listNodes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.listNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupsListNodes.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 *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsListNodes, 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 := &NodeGroupsListNodes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.listNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsListNodesCall) Pages(ctx context.Context, f func(*NodeGroupsListNodes) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsPatchCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified node group. -// -// - nodeGroup: Name of the NodeGroup resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, nodegroup *NodeGroup) *NodeGroupsPatchCall { - c := &NodeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroup = nodegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { - 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 -// details. -func (c *NodeGroupsPatchCall) Fields(s ...googleapi.Field) *NodeGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPatchCall) Context(ctx context.Context) *NodeGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsPerformMaintenanceCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform maintenance on a subset of nodes in the node -// group. -// -// - nodeGroup: Name of the node group scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) PerformMaintenance(project string, zone string, nodeGroup string, nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest) *NodeGroupsPerformMaintenanceCall { - c := &NodeGroupsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsperformmaintenancerequest = nodegroupsperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsPerformMaintenanceCall) RequestId(requestId string) *NodeGroupsPerformMaintenanceCall { - 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 -// details. -func (c *NodeGroupsPerformMaintenanceCall) Fields(s ...googleapi.Field) *NodeGroupsPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPerformMaintenanceCall) Context(ctx context.Context) *NodeGroupsPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { - c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetIamPolicyCall) Context(ctx context.Context) *NodeGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.setIamPolicy" call. -// 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 *NodeGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSetNodeTemplateCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNodeTemplate: Updates the node template of the node group. -// -// - nodeGroup: Name of the NodeGroup resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { - c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupssetnodetemplaterequest = nodegroupssetnodetemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsSetNodeTemplateCall) RequestId(requestId string) *NodeGroupsSetNodeTemplateCall { - 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 -// details. -func (c *NodeGroupsSetNodeTemplateCall) Fields(s ...googleapi.Field) *NodeGroupsSetNodeTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetNodeTemplateCall) Context(ctx context.Context) *NodeGroupsSetNodeTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupssetnodetemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.setNodeTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.setNodeTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSetNodeTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.setNodeTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SimulateMaintenanceEvent: Simulates maintenance event on specified nodes -// from the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes will go under -// maintenance -// -// simulation. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SimulateMaintenanceEvent(project string, zone string, nodeGroup string, nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest) *NodeGroupsSimulateMaintenanceEventCall { - c := &NodeGroupsSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupssimulatemaintenanceeventrequest = nodegroupssimulatemaintenanceeventrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsSimulateMaintenanceEventCall) RequestId(requestId string) *NodeGroupsSimulateMaintenanceEventCall { - 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 -// details. -func (c *NodeGroupsSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *NodeGroupsSimulateMaintenanceEventCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSimulateMaintenanceEventCall) Context(ctx context.Context) *NodeGroupsSimulateMaintenanceEventCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSimulateMaintenanceEventCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupssimulatemaintenanceeventrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.simulateMaintenanceEvent", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.simulateMaintenanceEvent" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSimulateMaintenanceEventCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.simulateMaintenanceEvent", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { - c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsTestIamPermissionsCall) Context(ctx context.Context) *NodeGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node templates. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { - c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTemplatesAggregatedListCall) Filter(filter string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesAggregatedListCall) MaxResults(maxResults int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTemplatesAggregatedListCall) OrderBy(orderBy string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTemplatesAggregatedListCall) PageToken(pageToken string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesAggregatedListCall) Context(ctx context.Context) *NodeTemplatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateAggregatedList.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 *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateAggregatedList, 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 := &NodeTemplateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTemplateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTemplatesDeleteCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NodeTemplate resource. -// -// - nodeTemplate: Name of the NodeTemplate resource to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { - c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodeTemplate = nodeTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeTemplatesDeleteCall) RequestId(requestId string) *NodeTemplatesDeleteCall { - 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 -// details. -func (c *NodeTemplatesDeleteCall) Fields(s ...googleapi.Field) *NodeTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesDeleteCall) Context(ctx context.Context) *NodeTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesGetCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified node template. -// -// - nodeTemplate: Name of the node template to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { - c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodeTemplate = nodeTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesGetCall) Fields(s ...googleapi.Field) *NodeTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesGetCall) IfNoneMatch(entityTag string) *NodeTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetCall) Context(ctx context.Context) *NodeTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplate.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 *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, 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 := &NodeTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { - c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NodeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeTemplatesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.getIamPolicy" call. -// 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 *NodeTemplatesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesInsertCall struct { - s *Service - project string - region string - nodetemplate *NodeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NodeTemplate resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { - c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodetemplate = nodetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeTemplatesInsertCall) RequestId(requestId string) *NodeTemplatesInsertCall { - 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 -// details. -func (c *NodeTemplatesInsertCall) Fields(s ...googleapi.Field) *NodeTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesInsertCall) Context(ctx context.Context) *NodeTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node templates available to the specified -// project. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { - c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTemplatesListCall) Filter(filter string) *NodeTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesListCall) MaxResults(maxResults int64) *NodeTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTemplatesListCall) OrderBy(orderBy string) *NodeTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTemplatesListCall) PageToken(pageToken string) *NodeTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesListCall) Fields(s ...googleapi.Field) *NodeTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesListCall) IfNoneMatch(entityTag string) *NodeTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesListCall) Context(ctx context.Context) *NodeTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateList.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 *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateList, 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 := &NodeTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTemplatesListCall) Pages(ctx context.Context, f func(*NodeTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTemplatesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { - c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesSetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.setIamPolicy" call. -// 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 *NodeTemplatesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { - c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *NodeTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { - c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTypesAggregatedListCall) Filter(filter string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesAggregatedListCall) MaxResults(maxResults int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTypesAggregatedListCall) OrderBy(orderBy string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTypesAggregatedListCall) PageToken(pageToken string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesAggregatedListCall) Context(ctx context.Context) *NodeTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTypeAggregatedList.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 *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTypeAggregatedList, 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 := &NodeTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTypesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTypesGetCall struct { - s *Service - project string - zone string - nodeType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified node type. -// -// - nodeType: Name of the node type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { - c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeType = nodeType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesGetCall) Fields(s ...googleapi.Field) *NodeTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesGetCall) IfNoneMatch(entityTag string) *NodeTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesGetCall) Context(ctx context.Context) *NodeTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes/{nodeType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeType": c.nodeType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.get" call. -// 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 *NodeTypesGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { - c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTypesListCall) Filter(filter string) *NodeTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesListCall) MaxResults(maxResults int64) *NodeTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTypesListCall) OrderBy(orderBy string) *NodeTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTypesListCall) PageToken(pageToken string) *NodeTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesListCall) Fields(s ...googleapi.Field) *NodeTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesListCall) IfNoneMatch(entityTag string) *NodeTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesListCall) Context(ctx context.Context) *NodeTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTypeList.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 *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, 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 := &NodeTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTypesListCall) Pages(ctx context.Context, f func(*NodeTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type OrganizationSecurityPoliciesAddAssociationCall struct { - s *Service - securityPolicy string - securitypolicyassociation *SecurityPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified security -// policy. -// -// This has billing implications. Projects in the hierarchy with -// effective -// hierarchical security policies will be automatically enrolled into -// Cloud -// Armor Enterprise if not already enrolled. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.addAssociation -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall { - c := &OrganizationSecurityPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyassociation = securitypolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *OrganizationSecurityPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *OrganizationSecurityPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesAddAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddAssociationCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addAssociation") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesAddRuleCall struct { - s *Service - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.addRule instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall { - c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesAddRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesAddRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addRule") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesCopyRulesCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CopyRules: Copies rules to the specified security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.cloneRules -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) CopyRules(securityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { - c := &OrganizationSecurityPoliciesCopyRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesCopyRulesCall) RequestId(requestId string) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceSecurityPolicy sets the optional parameter "sourceSecurityPolicy": The -// security policy from which to copy rules. -func (c *OrganizationSecurityPoliciesCopyRulesCall) SourceSecurityPolicy(sourceSecurityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("sourceSecurityPolicy", sourceSecurityPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Context(ctx context.Context) *OrganizationSecurityPoliciesCopyRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesCopyRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/copyRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.copyRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.copyRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesCopyRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.copyRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesDeleteCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// Use this API to remove Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to remove firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.delete instead. -// -// - securityPolicy: Name of the security policy to delete. -func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall { - c := &OrganizationSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesDeleteCall) RequestId(requestId string) *OrganizationSecurityPoliciesDeleteCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesDeleteCall) Context(ctx context.Context) *OrganizationSecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified -// policy. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.get instead. -// -// - securityPolicy: Name of the security policy to get. -func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall { - c := &OrganizationSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *OrganizationSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetAssociationCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now disabled for most organizations. Use -// firewallPolicies.getAssociation -// instead. -// -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *OrganizationSecurityPoliciesService) GetAssociation(securityPolicy string) *OrganizationSecurityPoliciesGetAssociationCall { - c := &OrganizationSecurityPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the security policy. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Name(name string) *OrganizationSecurityPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyAssociation.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 *OrganizationSecurityPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyAssociation, 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 := &SecurityPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetRuleCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.getRule instead. -// -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *OrganizationSecurityPoliciesService) GetRule(securityPolicy string) *OrganizationSecurityPoliciesGetRuleCall { - c := &OrganizationSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *OrganizationSecurityPoliciesGetRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *OrganizationSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesInsertCall struct { - s *Service - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified organization using the data -// included -// in the request. -// -// Use this API to add Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to add firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.insert instead. -func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall { - c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securitypolicy = securitypolicy - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *OrganizationSecurityPoliciesInsertCall) ParentId(parentId string) *OrganizationSecurityPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesInsertCall) RequestId(requestId string) *OrganizationSecurityPoliciesInsertCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesInsertCall) Context(ctx context.Context) *OrganizationSecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the -// specified -// organization. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.list instead. -func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall { - c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *OrganizationSecurityPoliciesListCall) Filter(filter string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *OrganizationSecurityPoliciesListCall) MaxResults(maxResults int64) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *OrganizationSecurityPoliciesListCall) OrderBy(orderBy string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *OrganizationSecurityPoliciesListCall) PageToken(pageToken string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *OrganizationSecurityPoliciesListCall) ParentId(parentId string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *OrganizationSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *OrganizationSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *OrganizationSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type OrganizationSecurityPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now disabled for most organizations. Use -// firewallPolicies.listAssociations -// instead. -func (r *OrganizationSecurityPoliciesService) ListAssociations() *OrganizationSecurityPoliciesListAssociationsCall { - c := &OrganizationSecurityPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// TargetResource sets the optional parameter "targetResource": The target -// resource to list associations. It is an organization, or a -// folder. -func (c *OrganizationSecurityPoliciesListAssociationsCall) TargetResource(targetResource string) *OrganizationSecurityPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListAssociationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListAssociationsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListAssociationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/listAssociations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listAssociations", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.listAssociations" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrganizationSecurityPoliciesListAssociationsResponse.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 *OrganizationSecurityPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*OrganizationSecurityPoliciesListAssociationsResponse, 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 := &OrganizationSecurityPoliciesListAssociationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listAssociations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPreconfiguredExpressionSets: Gets the current list of preconfigured Web -// Application Firewall (WAF) -// expressions. -func (r *OrganizationSecurityPoliciesService) ListPreconfiguredExpressionSets() *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c := &OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Filter(filter string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) MaxResults(maxResults int64) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) OrderBy(orderBy string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) PageToken(pageToken string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) ParentId(parentId string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) ReturnPartialSuccess(returnPartialSuccess bool) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/listPreconfiguredExpressionSets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesListPreconfiguredExpressionSetsResponse.ServerResponse.Heade -// r 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 *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesListPreconfiguredExpressionSetsResponse, 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 := &SecurityPoliciesListPreconfiguredExpressionSetsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesMoveCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.move instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) Move(securityPolicy string) *OrganizationSecurityPoliciesMoveCall { - c := &OrganizationSecurityPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// ParentId sets the optional parameter "parentId": The new parent of the -// security policy. -func (c *OrganizationSecurityPoliciesMoveCall) ParentId(parentId string) *OrganizationSecurityPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesMoveCall) RequestId(requestId string) *OrganizationSecurityPoliciesMoveCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesMoveCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesMoveCall) Context(ctx context.Context) *OrganizationSecurityPoliciesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/move") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.move", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesPatchCall struct { - s *Service - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the -// request. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.patch instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) Patch(securityPolicy string, securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesPatchCall { - c := &OrganizationSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesPatchCall) RequestId(requestId string) *OrganizationSecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *OrganizationSecurityPoliciesPatchCall) UpdateMask(updateMask string) *OrganizationSecurityPoliciesPatchCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesPatchCall) Context(ctx context.Context) *OrganizationSecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesPatchRuleCall struct { - s *Service - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.patchRule -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall { - c := &OrganizationSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesPatchRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *OrganizationSecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *OrganizationSecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/patchRule") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesRemoveAssociationCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified security -// policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.removeAssociation -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall { - c := &OrganizationSecurityPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Name(name string) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesRemoveAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveAssociationCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesRemoveRuleCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.removeRule -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall { - c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesRemoveRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of packetMirrorings. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { - c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *PacketMirroringsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PacketMirroringsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *PacketMirroringsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/packetMirrorings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringAggregatedList.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 *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, 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 := &PacketMirroringAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PacketMirroringsDeleteCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PacketMirroring resource. -// -// - packetMirroring: Name of the PacketMirroring resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { - c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { - 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 -// details. -func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsGetCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PacketMirroring resource. -// -// - packetMirroring: Name of the PacketMirroring resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { - c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroring.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 *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, 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 := &PacketMirroring{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsInsertCall struct { - s *Service - project string - region string - packetmirroring *PacketMirroring - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PacketMirroring resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { - c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetmirroring = packetmirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { - 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 -// details. -func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.packetmirroring) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of PacketMirroring resources available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { - c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PacketMirroringsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringList.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 *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, 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 := &PacketMirroringList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PacketMirroringsPatchCall struct { - s *Service - project string - region string - packetMirroring string - packetmirroring *PacketMirroring - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PacketMirroring resource with the data included -// in -// the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - packetMirroring: Name of the PacketMirroring resource to patch. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { - c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - c.packetmirroring = packetmirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { - 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 -// details. -func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.packetmirroring) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - 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{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { - c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PreviewFeaturesGetCall struct { - s *Service - project string - previewFeature string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details of the given PreviewFeature. -// -// - previewFeature: Name of the PreviewFeature for this request. -// - project: Project ID for this request. -func (r *PreviewFeaturesService) Get(project string, previewFeature string) *PreviewFeaturesGetCall { - c := &PreviewFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.previewFeature = previewFeature - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PreviewFeaturesGetCall) Fields(s ...googleapi.Field) *PreviewFeaturesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PreviewFeaturesGetCall) IfNoneMatch(entityTag string) *PreviewFeaturesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesGetCall) Context(ctx context.Context) *PreviewFeaturesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures/{previewFeature}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "previewFeature": c.previewFeature, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewFeature.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 *PreviewFeaturesGetCall) Do(opts ...googleapi.CallOption) (*PreviewFeature, 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 := &PreviewFeature{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PreviewFeaturesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns the details of the given PreviewFeature. -// -// - project: Project ID for this request. -func (r *PreviewFeaturesService) List(project string) *PreviewFeaturesListCall { - c := &PreviewFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PreviewFeaturesListCall) Filter(filter string) *PreviewFeaturesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PreviewFeaturesListCall) MaxResults(maxResults int64) *PreviewFeaturesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PreviewFeaturesListCall) OrderBy(orderBy string) *PreviewFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PreviewFeaturesListCall) PageToken(pageToken string) *PreviewFeaturesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PreviewFeaturesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PreviewFeaturesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PreviewFeaturesListCall) Fields(s ...googleapi.Field) *PreviewFeaturesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PreviewFeaturesListCall) IfNoneMatch(entityTag string) *PreviewFeaturesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesListCall) Context(ctx context.Context) *PreviewFeaturesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewFeatureList.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 *PreviewFeaturesListCall) Do(opts ...googleapi.CallOption) (*PreviewFeatureList, 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 := &PreviewFeatureList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PreviewFeaturesListCall) Pages(ctx context.Context, f func(*PreviewFeatureList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PreviewFeaturesUpdateCall struct { - s *Service - project string - previewFeature string - previewfeature *PreviewFeature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Patches the given PreviewFeature. This method is used to enable or -// disable -// a PreviewFeature. -// -// - previewFeature: Name of the PreviewFeature for this request. -// - project: Project ID for this request. -func (r *PreviewFeaturesService) Update(project string, previewFeature string, previewfeature *PreviewFeature) *PreviewFeaturesUpdateCall { - c := &PreviewFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.previewFeature = previewFeature - c.previewfeature = previewfeature - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PreviewFeaturesUpdateCall) RequestId(requestId string) *PreviewFeaturesUpdateCall { - 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 -// details. -func (c *PreviewFeaturesUpdateCall) Fields(s ...googleapi.Field) *PreviewFeaturesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesUpdateCall) Context(ctx context.Context) *PreviewFeaturesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.previewfeature) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures/{previewFeature}") - 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{ - "project": c.project, - "previewFeature": c.previewFeature, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PreviewFeaturesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsDisableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnHost: Disable this project as a shared VPC host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { - 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 -// details. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.disableXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.disableXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnResource: Disable a service resource (also known as service -// project) associated with -// this host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { - 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 -// details. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnResource") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.disableXpnResource", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnResource" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.disableXpnResource", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnHost: Enable this project as a shared VPC host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { - 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 -// details. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.enableXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.enableXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnResource: Enable service resource (a.k.a service project) for a -// host project, so that -// subnets in the host project can be used by instances in the service -// project. -// -// - project: Project ID for this request. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { - 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 -// details. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnResource") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.enableXpnResource", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnResource" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.enableXpnResource", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Project resource. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information (the `quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// - project: Project ID for this request. -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Project.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 *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, 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 := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnHost: Gets the shared VPC host project that this project links to. May -// be empty -// if no link exists. -// -// - project: Project ID for this request. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.getXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Project.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 *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, 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 := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.getXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnResources: Gets service resources (a.k.a service project) associated -// with this host -// project. -// -// - project: Project ID for this request. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ProjectsGetXpnResourcesCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnResources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.getXpnResources", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnResources" call. -// Any non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.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 *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, 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 := &ProjectsGetXpnResources{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.getXpnResources", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: Lists all shared VPC host projects visible to the user in an -// organization. -// -// - project: Project ID for this request. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ProjectsListXpnHostsCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsListXpnHostsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectslistxpnhostsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/listXpnHosts") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.listXpnHosts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.listXpnHosts" call. -// Any non-2xx status code is an error. Response headers are in either -// *XpnHostList.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 *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, 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 := &XpnHostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.listXpnHosts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveDisk: Moves a persistent disk from one zone to another. -// *Note*: The moveDisk API will be deprecated on September 29, 2026. -// -// Starting September 29, 2025, you can't use the moveDisk API on new -// projects. To move a disk to a different region or zone, follow the steps -// in -// Change the location of a -// disk -// (https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd). -// -// Projects that already use the moveDisk API can continue usage -// until -// September 29, 2026. -// -// Starting November 1, 2025, API responses will include a warning message -// in -// the response body about the upcoming deprecation. You can skip the -// message -// to continue using the service without interruption. -// -// - project: Project ID for this request. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.diskmoverequest = diskmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { - 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 -// details. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.diskmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveDisk") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.moveDisk", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.moveDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveInstance: Moves an instance and its attached persistent disks from one -// zone to -// another. -// *Note*: Moving VMs or disks by using this method might -// -// cause unexpected behavior. For more information, see the known -// issue -// -// (/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_mov -// einstance_api_or_the_causes_unexpected_behavior). -// [Deprecated] This method is deprecated. See moving instance across -// zones (/compute/docs/instances/moving-instance-across-zones) instead. -// -// - project: Project ID for this request. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancemoverequest = instancemoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { - 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 -// details. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancemoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveInstance") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.moveInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.moveInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetCloudArmorTierCall struct { - s *Service - project string - projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCloudArmorTier: Sets the Cloud Armor tier of the project. To set -// ENTERPRISE or above the -// billing account of the project must be subscribed to Cloud Armor -// Enterprise. See Subscribing -// to Cloud Armor Enterprise for more information. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetCloudArmorTier(project string, projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest) *ProjectsSetCloudArmorTierCall { - c := &ProjectsSetCloudArmorTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetcloudarmortierrequest = projectssetcloudarmortierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetCloudArmorTierCall) RequestId(requestId string) *ProjectsSetCloudArmorTierCall { - 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 -// details. -func (c *ProjectsSetCloudArmorTierCall) Fields(s ...googleapi.Field) *ProjectsSetCloudArmorTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCloudArmorTierCall) Context(ctx context.Context) *ProjectsSetCloudArmorTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetCloudArmorTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCloudArmorTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetcloudarmortierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCloudArmorTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setCloudArmorTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCloudArmorTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCloudArmorTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setCloudArmorTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCommonInstanceMetadata: Sets metadata common to all instances within the -// specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metadata = metadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { - 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 -// details. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCommonInstanceMetadata") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setCommonInstanceMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCommonInstanceMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setCommonInstanceMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetDefaultNetworkTierCall struct { - s *Service - project string - projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDefaultNetworkTier: Sets the default network tier of the project. The -// default network tier is -// used when an address/forwardingRule/instance is created without -// specifying -// the network tier field. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { - c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetdefaultnetworktierrequest = projectssetdefaultnetworktierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetDefaultNetworkTierCall) RequestId(requestId string) *ProjectsSetDefaultNetworkTierCall { - 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 -// details. -func (c *ProjectsSetDefaultNetworkTierCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultNetworkTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetDefaultNetworkTierCall) Context(ctx context.Context) *ProjectsSetDefaultNetworkTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetdefaultnetworktierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setDefaultNetworkTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setDefaultNetworkTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setDefaultNetworkTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetDefaultNetworkTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setDefaultNetworkTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetDefaultServiceAccountCall struct { - s *Service - project string - projectssetdefaultserviceaccountrequest *ProjectsSetDefaultServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDefaultServiceAccount: Sets the default service account of the project. -// The default service -// account is used when a VM instance is created with the service account -// email address set to "default". -// -// - project: Project ID for this request. -func (r *ProjectsService) SetDefaultServiceAccount(project string, projectssetdefaultserviceaccountrequest *ProjectsSetDefaultServiceAccountRequest) *ProjectsSetDefaultServiceAccountCall { - c := &ProjectsSetDefaultServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetdefaultserviceaccountrequest = projectssetdefaultserviceaccountrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetDefaultServiceAccountCall) RequestId(requestId string) *ProjectsSetDefaultServiceAccountCall { - 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 -// details. -func (c *ProjectsSetDefaultServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetDefaultServiceAccountCall) Context(ctx context.Context) *ProjectsSetDefaultServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetDefaultServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetDefaultServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetdefaultserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setDefaultServiceAccount") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setDefaultServiceAccount", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setDefaultServiceAccount" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetDefaultServiceAccountCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setDefaultServiceAccount", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetManagedProtectionTierCall struct { - s *Service - project string - projectssetmanagedprotectiontierrequest *ProjectsSetManagedProtectionTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetManagedProtectionTier: Sets the Cloud Armor Managed Protection (CAMP) -// tier of the project. To set -// PLUS or above the billing account of the project must be subscribed -// to -// Managed Protection Plus. See Subscribing -// to Managed Protection Plus for more information. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetManagedProtectionTier(project string, projectssetmanagedprotectiontierrequest *ProjectsSetManagedProtectionTierRequest) *ProjectsSetManagedProtectionTierCall { - c := &ProjectsSetManagedProtectionTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetmanagedprotectiontierrequest = projectssetmanagedprotectiontierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetManagedProtectionTierCall) RequestId(requestId string) *ProjectsSetManagedProtectionTierCall { - 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 -// details. -func (c *ProjectsSetManagedProtectionTierCall) Fields(s ...googleapi.Field) *ProjectsSetManagedProtectionTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetManagedProtectionTierCall) Context(ctx context.Context) *ProjectsSetManagedProtectionTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetManagedProtectionTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetManagedProtectionTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetmanagedprotectiontierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setManagedProtectionTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setManagedProtectionTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setManagedProtectionTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetManagedProtectionTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setManagedProtectionTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUsageExportBucket: Enables the usage export feature and sets theusage -// export bucket -// where reports are stored. If you provide an empty request body using -// this -// method, the usage export feature will be disabled. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.usageexportlocation = usageexportlocation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { - 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 -// details. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.usageexportlocation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setUsageExportBucket") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setUsageExportBucket", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setUsageExportBucket" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setUsageExportBucket", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesAnnounceCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Announce: Announces the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesAnnounceCall { - c := &PublicAdvertisedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *PublicAdvertisedPrefixesAnnounceCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesAnnounceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesAnnounceCall) Context(ctx context.Context) *PublicAdvertisedPrefixesAnnounceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesAnnounceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.announce", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.announce" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesAnnounceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.announce", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesDeleteCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// delete. -func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesDeleteCall { - c := &PublicAdvertisedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *PublicAdvertisedPrefixesDeleteCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesDeleteCall) Context(ctx context.Context) *PublicAdvertisedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesGetCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PublicAdvertisedPrefix resource. -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// return. -func (r *PublicAdvertisedPrefixesService) Get(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesGetCall { - c := &PublicAdvertisedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicAdvertisedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicAdvertisedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesGetCall) Context(ctx context.Context) *PublicAdvertisedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefix.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 *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefix, 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 := &PublicAdvertisedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesInsertCall struct { - s *Service - project string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PublicAdvertisedPrefix in the specified project -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesInsertCall { - c := &PublicAdvertisedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicadvertisedprefix = publicadvertisedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *PublicAdvertisedPrefixesInsertCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesInsertCall) Context(ctx context.Context) *PublicAdvertisedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicadvertisedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the PublicAdvertisedPrefixes for a project. -// -// - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) List(project string) *PublicAdvertisedPrefixesListCall { - c := &PublicAdvertisedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicAdvertisedPrefixesListCall) Filter(filter string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicAdvertisedPrefixesListCall) MaxResults(maxResults int64) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicAdvertisedPrefixesListCall) OrderBy(orderBy string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicAdvertisedPrefixesListCall) PageToken(pageToken string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicAdvertisedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicAdvertisedPrefixesListCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicAdvertisedPrefixesListCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesListCall) Context(ctx context.Context) *PublicAdvertisedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefixList.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 *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefixList, 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 := &PublicAdvertisedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicAdvertisedPrefixesListCall) Pages(ctx context.Context, f func(*PublicAdvertisedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicAdvertisedPrefixesPatchCall struct { - s *Service - project string - publicAdvertisedPrefix string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// patch. -func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertisedPrefix string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesPatchCall { - c := &PublicAdvertisedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - c.publicadvertisedprefix = publicadvertisedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicAdvertisedPrefixesPatchCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *PublicAdvertisedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicadvertisedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesWithdrawCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Withdraw: Withdraws the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { - c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.withdraw", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.withdraw" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesWithdrawCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.withdraw", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the -// specific project -// across all scopes. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { - c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixAggregatedList.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 *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, 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 := &PublicDelegatedPrefixAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicDelegatedPrefixesAnnounceCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Announce: Announces the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of theregion where -// the public delegated prefix is located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { - c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { - 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 -// details. -func (c *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.announce", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.announce" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesAnnounceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.announce", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { - c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { - 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 -// details. -func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesGetCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PublicDelegatedPrefix resource in the given -// region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { - c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.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 *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, 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 := &PublicDelegatedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesInsertCall struct { - s *Service - project string - region string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PublicDelegatedPrefix in the specified project in the -// given -// region using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { - c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { - 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 -// details. -func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the PublicDelegatedPrefixes for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { - c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.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 *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, 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 := &PublicDelegatedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicDelegatedPrefixesPatchCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PublicDelegatedPrefix resource with the data -// included -// in the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -// - region: Name of the region for this request. -func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { - c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { - 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 -// details. -func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - 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{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesWithdrawCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of theregion where -// the public delegated prefix is located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { - c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { - 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 -// details. -func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.withdraw", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.withdraw" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesWithdrawCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.withdraw", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the -// RecoverableSnapshots in your -// project across all regions and global scope. -// -// - project: Project ID for this request. -func (r *RecoverableSnapshotsService) AggregatedList(project string) *RecoverableSnapshotsAggregatedListCall { - c := &RecoverableSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RecoverableSnapshotsAggregatedListCall) Filter(filter string) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RecoverableSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RecoverableSnapshotsAggregatedListCall) MaxResults(maxResults int64) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RecoverableSnapshotsAggregatedListCall) OrderBy(orderBy string) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RecoverableSnapshotsAggregatedListCall) PageToken(pageToken string) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RecoverableSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RecoverableSnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RecoverableSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *RecoverableSnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsAggregatedListCall) Context(ctx context.Context) *RecoverableSnapshotsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/recoverableSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *RecoverableSnapshotAggregatedList.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 *RecoverableSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshotAggregatedList, 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 := &RecoverableSnapshotAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RecoverableSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*RecoverableSnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RecoverableSnapshotsDeleteCall struct { - s *Service - project string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified RecoverableSnapshot. Deleting a recoverable -// snapshot -// will delete the underlying PD snapshot and is irreversible. -// -// - project: Project ID for this request. -// - recoverableSnapshot: Name of the recoverable Snapshot resource to delete. -func (r *RecoverableSnapshotsService) Delete(project string, recoverableSnapshot string) *RecoverableSnapshotsDeleteCall { - c := &RecoverableSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.recoverableSnapshot = recoverableSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RecoverableSnapshotsDeleteCall) RequestId(requestId string) *RecoverableSnapshotsDeleteCall { - 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 -// details. -func (c *RecoverableSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsDeleteCall) Context(ctx context.Context) *RecoverableSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RecoverableSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsGetCall struct { - s *Service - project string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified RecoverableSnapshot resource. -// -// - project: Project ID for this request. -// - recoverableSnapshot: Name of the Snapshot resource to return. -func (r *RecoverableSnapshotsService) Get(project string, recoverableSnapshot string) *RecoverableSnapshotsGetCall { - c := &RecoverableSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.recoverableSnapshot = recoverableSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsGetCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RecoverableSnapshotsGetCall) IfNoneMatch(entityTag string) *RecoverableSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsGetCall) Context(ctx context.Context) *RecoverableSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *RecoverableSnapshot.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 *RecoverableSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshot, 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 := &RecoverableSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *RecoverableSnapshotsService) GetIamPolicy(project string, resource string) *RecoverableSnapshotsGetIamPolicyCall { - c := &RecoverableSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RecoverableSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RecoverableSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RecoverableSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RecoverableSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RecoverableSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RecoverableSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.getIamPolicy" call. -// 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 *RecoverableSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of all of the RecoverableSnapshots in your project. -// -// - project: Project ID for this request. -func (r *RecoverableSnapshotsService) List(project string) *RecoverableSnapshotsListCall { - c := &RecoverableSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RecoverableSnapshotsListCall) Filter(filter string) *RecoverableSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RecoverableSnapshotsListCall) MaxResults(maxResults int64) *RecoverableSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RecoverableSnapshotsListCall) OrderBy(orderBy string) *RecoverableSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RecoverableSnapshotsListCall) PageToken(pageToken string) *RecoverableSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RecoverableSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RecoverableSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsListCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RecoverableSnapshotsListCall) IfNoneMatch(entityTag string) *RecoverableSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsListCall) Context(ctx context.Context) *RecoverableSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RecoverableSnapshotList.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 *RecoverableSnapshotsListCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshotList, 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 := &RecoverableSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RecoverableSnapshotsListCall) Pages(ctx context.Context, f func(*RecoverableSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RecoverableSnapshotsRecoverCall struct { - s *Service - project string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Recover: Recovers the specified RecoverableSnapshot. -// -// - project: Project Id of the request. -// - recoverableSnapshot: Name of the recoverable resource to recover. -func (r *RecoverableSnapshotsService) Recover(project string, recoverableSnapshot string) *RecoverableSnapshotsRecoverCall { - c := &RecoverableSnapshotsRecoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.recoverableSnapshot = recoverableSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RecoverableSnapshotsRecoverCall) RequestId(requestId string) *RecoverableSnapshotsRecoverCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SnapshotName sets the optional parameter "snapshotName": Name of the -// snapshot after the recovery -// The name will be 1-63 characters long, and comply withRFC1035. -// Specifically, the name will be 1-63 characters long and match the -// regular -// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first -// character will be a lowercase letter, and all following characters can be -// a dash, lowercase letter, or digit, except the last character, which -// cannot -// be a dash. -func (c *RecoverableSnapshotsRecoverCall) SnapshotName(snapshotName string) *RecoverableSnapshotsRecoverCall { - c.urlParams_.Set("snapshotName", snapshotName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsRecoverCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsRecoverCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsRecoverCall) Context(ctx context.Context) *RecoverableSnapshotsRecoverCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsRecoverCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsRecoverCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{recoverableSnapshot}/recover") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.recover", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.recover" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RecoverableSnapshotsRecoverCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.recover", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *RecoverableSnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *RecoverableSnapshotsSetIamPolicyCall { - c := &RecoverableSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RecoverableSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.setIamPolicy" call. -// 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 *RecoverableSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RecoverableSnapshotsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *RecoverableSnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RecoverableSnapshotsTestIamPermissionsCall { - c := &RecoverableSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RecoverableSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RecoverableSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RecoverableSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RecoverableSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RecoverableSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RecoverableSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/recoverableSnapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.recoverableSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RecoverableSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.recoverableSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { - 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 -// details. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.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 *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, 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 := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { - 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 -// details. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.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 *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, 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 := &RegionAutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using -// the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { - 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 -// details. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { - c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { - 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 -// details. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsDeleteCall struct { - s *Service - project string - region string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Delete(project string, region string, backendBucket string) *RegionBackendBucketsDeleteCall { - c := &RegionBackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - return c -} - -// ForceDelete sets the optional parameter "forceDelete": Force delete the -// backend bucket even if it is still in use by other -// resources. It's intended to be used internally only for requests -// from -// wipeout. -func (c *RegionBackendBucketsDeleteCall) ForceDelete(forceDelete bool) *RegionBackendBucketsDeleteCall { - c.urlParams_.Set("forceDelete", fmt.Sprint(forceDelete)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionBackendBucketsDeleteCall) RequestId(requestId string) *RegionBackendBucketsDeleteCall { - 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 -// details. -func (c *RegionBackendBucketsDeleteCall) Fields(s ...googleapi.Field) *RegionBackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsDeleteCall) Context(ctx context.Context) *RegionBackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsGetCall struct { - s *Service - project string - region string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Get(project string, region string, backendBucket string) *RegionBackendBucketsGetCall { - c := &RegionBackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsGetCall) Fields(s ...googleapi.Field) *RegionBackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsGetCall) IfNoneMatch(entityTag string) *RegionBackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsGetCall) Context(ctx context.Context) *RegionBackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucket.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 *RegionBackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, 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 := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) GetIamPolicy(project string, region string, resource string) *RegionBackendBucketsGetIamPolicyCall { - c := &RegionBackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionBackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendBucketsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsGetIamPolicyCall) Context(ctx context.Context) *RegionBackendBucketsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.getIamPolicy" call. -// 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 *RegionBackendBucketsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsInsertCall struct { - s *Service - project string - region string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a RegionBackendBucket in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionBackendBucketsService) Insert(project string, region string, backendbucket *BackendBucket) *RegionBackendBucketsInsertCall { - c := &RegionBackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendBucketsInsertCall) RequestId(requestId string) *RegionBackendBucketsInsertCall { - 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 -// details. -func (c *RegionBackendBucketsInsertCall) Fields(s ...googleapi.Field) *RegionBackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsInsertCall) Context(ctx context.Context) *RegionBackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified -// project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionBackendBucketsService) List(project string, region string) *RegionBackendBucketsListCall { - c := &RegionBackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendBucketsListCall) Filter(filter string) *RegionBackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendBucketsListCall) MaxResults(maxResults int64) *RegionBackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendBucketsListCall) OrderBy(orderBy string) *RegionBackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendBucketsListCall) PageToken(pageToken string) *RegionBackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsListCall) Fields(s ...googleapi.Field) *RegionBackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsListCall) IfNoneMatch(entityTag string) *RegionBackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsListCall) Context(ctx context.Context) *RegionBackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketList.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 *RegionBackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, 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 := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendBucketsListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend buckets in the specified -// project in -// the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionBackendBucketsService) ListUsable(project string, region string) *RegionBackendBucketsListUsableCall { - c := &RegionBackendBucketsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendBucketsListUsableCall) Filter(filter string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendBucketsListUsableCall) MaxResults(maxResults int64) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendBucketsListUsableCall) OrderBy(orderBy string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendBucketsListUsableCall) PageToken(pageToken string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendBucketsListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsListUsableCall) Fields(s ...googleapi.Field) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsListUsableCall) IfNoneMatch(entityTag string) *RegionBackendBucketsListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsListUsableCall) Context(ctx context.Context) *RegionBackendBucketsListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketListUsable.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 *RegionBackendBucketsListUsableCall) Do(opts ...googleapi.CallOption) (*BackendBucketListUsable, 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 := &BackendBucketListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendBucketsListUsableCall) Pages(ctx context.Context, f func(*BackendBucketListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendBucketsPatchCall struct { - s *Service - project string - region string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - backendBucket: Name of the BackendBucket resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Patch(project string, region string, backendBucket string, backendbucket *BackendBucket) *RegionBackendBucketsPatchCall { - c := &RegionBackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionBackendBucketsPatchCall) RequestId(requestId string) *RegionBackendBucketsPatchCall { - 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 -// details. -func (c *RegionBackendBucketsPatchCall) Fields(s ...googleapi.Field) *RegionBackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsPatchCall) Context(ctx context.Context) *RegionBackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - 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{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendBucketsSetIamPolicyCall { - c := &RegionBackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendBucketsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsSetIamPolicyCall) Context(ctx context.Context) *RegionBackendBucketsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.setIamPolicy" call. -// 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 *RegionBackendBucketsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendBucketsTestIamPermissionsCall { - c := &RegionBackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendBucketsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendBucketsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionBackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - 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 -// details. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendService.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 *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// regional BackendService. -// -// - backendService: Name of the BackendService resource for which to get -// health. -// - project: . -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { - c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getIamPolicy" call. -// 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 *RegionBackendServicesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified project -// using -// the data included in the request. For more information, see -// Backend services overview. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { - 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 -// details. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources available to -// the -// specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendServicesListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend services in the specified -// project in -// the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.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 *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, see -// Understanding backend services This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - 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 -// details. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setIamPolicy" call. -// 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 *RegionBackendServicesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend -// service. For more information, seeGoogle -// Cloud Armor Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { - 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 -// details. -func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, -// see -// Backend services overview. -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - 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 -// details. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments by region. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.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 *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, 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 := &CommitmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCommitmentsCalculateCancellationFeeCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CalculateCancellationFee: Calculate cancellation fee for the specified -// commitment. -// -// - commitment: Name of the commitment to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) CalculateCancellationFee(project string, region string, commitment string) *RegionCommitmentsCalculateCancellationFeeCall { - c := &RegionCommitmentsCalculateCancellationFeeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsCalculateCancellationFeeCall) RequestId(requestId string) *RegionCommitmentsCalculateCancellationFeeCall { - 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 -// details. -func (c *RegionCommitmentsCalculateCancellationFeeCall) Fields(s ...googleapi.Field) *RegionCommitmentsCalculateCancellationFeeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsCalculateCancellationFeeCall) Context(ctx context.Context) *RegionCommitmentsCalculateCancellationFeeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsCalculateCancellationFeeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsCalculateCancellationFeeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/calculateCancellationFee") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.calculateCancellationFee" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsCalculateCancellationFeeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsCancelCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancel the specified commitment. -// -// - commitment: Name of the commitment to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Cancel(project string, region string, commitment string) *RegionCommitmentsCancelCall { - c := &RegionCommitmentsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsCancelCall) RequestId(requestId string) *RegionCommitmentsCancelCall { - 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 -// details. -func (c *RegionCommitmentsCancelCall) Fields(s ...googleapi.Field) *RegionCommitmentsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsCancelCall) Context(ctx context.Context) *RegionCommitmentsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified commitment resource. -// -// - commitment: Name of the commitment to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Commitment.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 *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, 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 := &Commitment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a commitment in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { - 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 -// details. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of commitments contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentList.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 *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, 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 := &CommitmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCommitmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { - c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsUpdateCall struct { - s *Service - project string - region string - commitment string - commitment2 *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified commitment with the data included in the -// request. -// Update is performed only on selected fields included as part of -// update-mask. Only the following fields can be updated: auto_renew and plan. -// -// - commitment: Name of the commitment that you want to update. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { - c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - c.commitment2 = commitment2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { - 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 -// details. -func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") - 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsUpdateReservationsCall struct { - s *Service - project string - region string - commitment string - regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateReservations: Transfers GPUs or Local SSD disks between reservations -// that are attached -// to the same commitment. -// -// - commitment: Name of the commitment for which the reservations are being -// updated. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { - c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { - 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 -// details. -func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") - 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.updateReservations" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateReservationsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all CompositeHealthCheck resources -// (all -// regional) available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionCompositeHealthChecksService) AggregatedList(project string) *RegionCompositeHealthChecksAggregatedListCall { - c := &RegionCompositeHealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCompositeHealthChecksAggregatedListCall) Filter(filter string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionCompositeHealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCompositeHealthChecksAggregatedListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksAggregatedListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCompositeHealthChecksAggregatedListCall) PageToken(pageToken string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCompositeHealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCompositeHealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksAggregatedListCall) Context(ctx context.Context) *RegionCompositeHealthChecksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/compositeHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckAggregatedList.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 *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckAggregatedList, 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 := &CompositeHealthCheckAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCompositeHealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCompositeHealthChecksDeleteCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified CompositeHealthCheck in the given region -// -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Delete(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksDeleteCall { - c := &RegionCompositeHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksDeleteCall) RequestId(requestId string) *RegionCompositeHealthChecksDeleteCall { - 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 -// details. -func (c *RegionCompositeHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksDeleteCall) Context(ctx context.Context) *RegionCompositeHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksGetCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified CompositeHealthCheck resource in the given -// region. -// -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Get(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksGetCall { - c := &RegionCompositeHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksGetCall) Context(ctx context.Context) *RegionCompositeHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheck.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 *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheck, 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 := &CompositeHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksInsertCall struct { - s *Service - project string - region string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a CompositeHealthCheck in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Insert(project string, region string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksInsertCall { - c := &RegionCompositeHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositehealthcheck = compositehealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksInsertCall) RequestId(requestId string) *RegionCompositeHealthChecksInsertCall { - 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 -// details. -func (c *RegionCompositeHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksInsertCall) Context(ctx context.Context) *RegionCompositeHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the CompositeHealthChecks for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) List(project string, region string) *RegionCompositeHealthChecksListCall { - c := &RegionCompositeHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCompositeHealthChecksListCall) Filter(filter string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCompositeHealthChecksListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCompositeHealthChecksListCall) PageToken(pageToken string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCompositeHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksListCall) Context(ctx context.Context) *RegionCompositeHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckList.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 *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckList, 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 := &CompositeHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCompositeHealthChecksListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCompositeHealthChecksPatchCall struct { - s *Service - project string - region string - compositeHealthCheck string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional CompositeHealthCheck resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - compositeHealthCheck: Name of the CompositeHealthCheck to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Patch(project string, region string, compositeHealthCheck string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksPatchCall { - c := &RegionCompositeHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - c.compositehealthcheck = compositehealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksPatchCall) RequestId(requestId string) *RegionCompositeHealthChecksPatchCall { - 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 -// details. -func (c *RegionCompositeHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksPatchCall) Context(ctx context.Context) *RegionCompositeHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - 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{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCompositeHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCompositeHealthChecksTestIamPermissionsCall { - c := &RegionCompositeHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Regional Disk Settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { - c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.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 *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, 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 := &DiskSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskSettingsPatchCall struct { - s *Service - project string - region string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Regional Disk Settings -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { - c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksettings = disksettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { - 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 -// details. -func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute3-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute3-gen.go deleted file mode 100644 index 47b898b3c84e5..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute3-gen.go +++ /dev/null @@ -1,78564 +0,0 @@ -// Copyright 2025 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 compute - -import ( - "context" - "fmt" - "net/http" - - internallog "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - gensupport "google.golang.org/api/internal/gensupport" -) - -type RegionDiskTypesGetCall struct { - s *Service - project string - region string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional disk type. -// -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskType.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 *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, 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 := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskTypesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of regional disk types available to the specified -// project. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.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 *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, 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 := &RegionDiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionDisksAddResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to a regional disk. You -// can only add one -// policy which will be applied to this disk for scheduling snapshot -// creation. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { - c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { - 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 -// details. -func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksBulkInsertCall struct { - s *Service - project string - region string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Bulk create a set of disks. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { - c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.bulkinsertdiskresource = bulkinsertdiskresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { - 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 -// details. -func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot -// creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots -// in a project different from the source disk project. -// -// - disk: Name of the regional persistent disk to snapshot. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] Specifies -// to create an application consistent snapshot by -// informing the OS to prepare for the snapshot process. -func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { - 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 -// details. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.createSnapshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksCreateSnapshotCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional persistent disk. Deleting a regional -// disk -// removes all the replicas of its data permanently and is -// irreversible. -// However, deleting a disk does not delete anysnapshots -// previously made from the disk. You must separatelydelete -// snapshots. -// -// - disk: Name of the regional persistent disk to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { - 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 -// details. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksGetCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified regional persistent disk. -// -// - disk: Name of the regional persistent disk to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Disk.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 *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, 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 := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksGetAsyncReplicationStatusCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAsyncReplicationStatus: Gets the status of current async replication for -// a given device. -// -// - disk: Name of the Disk resource whose Async replication details are -// requested. -// -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - region: The name of the zone for this request. -func (r *RegionDisksService) GetAsyncReplicationStatus(project string, region string, disk string) *RegionDisksGetAsyncReplicationStatusCall { - c := &RegionDisksGetAsyncReplicationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksGetAsyncReplicationStatusCall) Fields(s ...googleapi.Field) *RegionDisksGetAsyncReplicationStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksGetAsyncReplicationStatusCall) IfNoneMatch(entityTag string) *RegionDisksGetAsyncReplicationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetAsyncReplicationStatusCall) Context(ctx context.Context) *RegionDisksGetAsyncReplicationStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksGetAsyncReplicationStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetAsyncReplicationStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/getAsyncReplicationStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.getAsyncReplicationStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetAsyncReplicationStatusResponse.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 *RegionDisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOption) (*GetAsyncReplicationStatusResponse, 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 := &GetAsyncReplicationStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { - c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.getIamPolicy" call. -// 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 *RegionDisksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksInsertCall struct { - s *Service - project string - region string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent regional disk in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of persistent disks contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskList.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 *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, 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 := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionDisksRemoveResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from a regional disk. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { - c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { - 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 -// details. -func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified regional persistent disk. -// -// - disk: Name of the regional persistent disk. -// - project: The project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { - 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 -// details. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { - c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setIamPolicy" call. -// 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 *RegionDisksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the target regional disk. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { - 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 -// details. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStartAsyncReplicationCall struct { - s *Service - project string - region string - disk string - regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartAsyncReplication: Starts asynchronous replication. -// Must be invoked on the primary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { - c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.startAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStartAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopAsyncReplicationCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopAsyncReplication: Stops asynchronous replication. -// Can be invoked either on the primary or on the secondary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { - c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopGroupAsyncReplicationCall struct { - s *Service - project string - region string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. -// Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. This must be the region -// of the -// -// primary or secondary disks in the consistency group. -func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { - c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopGroupAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksUpdateCall struct { - s *Service - project string - region string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update the specified disk with the data included in the request. -// Update is -// performed only on selected fields included as part of update-mask. Only -// the -// following fields can be modified: user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { - c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.disk2 = disk2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { - 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 -// details. -func (c *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksUpdateKmsKeyCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateKmsKey: Rotates the customer-managed -// encryption key to the latest version for the specified persistent disk. -// -// - disk: Name of the Disk resource, should conform to RFC1035. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) UpdateKmsKey(project string, region string, disk string) *RegionDisksUpdateKmsKeyCall { - c := &RegionDisksUpdateKmsKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksUpdateKmsKeyCall) RequestId(requestId string) *RegionDisksUpdateKmsKeyCall { - 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 -// details. -func (c *RegionDisksUpdateKmsKeyCall) Fields(s ...googleapi.Field) *RegionDisksUpdateKmsKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksUpdateKmsKeyCall) Context(ctx context.Context) *RegionDisksUpdateKmsKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksUpdateKmsKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksUpdateKmsKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/updateKmsKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.updateKmsKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.updateKmsKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksUpdateKmsKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.updateKmsKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksWaitForReplicationCatchUpCall struct { - s *Service - project string - region string - disk string - regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// WaitForReplicationCatchUp: Wait for replication to catch up on the secondary -// disk. -// -// - disk: The name of the persistent disk. -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) WaitForReplicationCatchUp(project string, region string, disk string, regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest) *RegionDisksWaitForReplicationCatchUpCall { - c := &RegionDisksWaitForReplicationCatchUpCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regionwaitforreplicationcatchuprequest = regionwaitforreplicationcatchuprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksWaitForReplicationCatchUpCall) RequestId(requestId string) *RegionDisksWaitForReplicationCatchUpCall { - 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 -// details. -func (c *RegionDisksWaitForReplicationCatchUpCall) Fields(s ...googleapi.Field) *RegionDisksWaitForReplicationCatchUpCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksWaitForReplicationCatchUpCall) Context(ctx context.Context) *RegionDisksWaitForReplicationCatchUpCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksWaitForReplicationCatchUpCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksWaitForReplicationCatchUpCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionwaitforreplicationcatchuprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/waitForReplicationCatchUp") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.waitForReplicationCatchUp" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksWaitForReplicationCatchUpCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthAggregationPolicy -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionHealthAggregationPoliciesService) AggregatedList(project string) *RegionHealthAggregationPoliciesAggregatedListCall { - c := &RegionHealthAggregationPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Filter(filter string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthAggregationPoliciesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) OrderBy(orderBy string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) PageToken(pageToken string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthAggregationPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicyAggregatedList.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 *RegionHealthAggregationPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicyAggregatedList, 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 := &HealthAggregationPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthAggregationPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*HealthAggregationPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthAggregationPoliciesDeleteCall struct { - s *Service - project string - region string - healthAggregationPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthAggregationPolicy in the given region. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy resource to -// delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Delete(project string, region string, healthAggregationPolicy string) *RegionHealthAggregationPoliciesDeleteCall { - c := &RegionHealthAggregationPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesDeleteCall) RequestId(requestId string) *RegionHealthAggregationPoliciesDeleteCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesDeleteCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesGetCall struct { - s *Service - project string - region string - healthAggregationPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthAggregationPolicy resource in the given -// region. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy resource to -// return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Get(project string, region string, healthAggregationPolicy string) *RegionHealthAggregationPoliciesGetCall { - c := &RegionHealthAggregationPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesGetCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesGetCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesGetCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicy.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 *RegionHealthAggregationPoliciesGetCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicy, 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 := &HealthAggregationPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesInsertCall struct { - s *Service - project string - region string - healthaggregationpolicy *HealthAggregationPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a HealthAggregationPolicy in the specified project in the -// given -// region using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Insert(project string, region string, healthaggregationpolicy *HealthAggregationPolicy) *RegionHealthAggregationPoliciesInsertCall { - c := &RegionHealthAggregationPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthaggregationpolicy = healthaggregationpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesInsertCall) RequestId(requestId string) *RegionHealthAggregationPoliciesInsertCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesInsertCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthaggregationpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the HealthAggregationPolicies for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) List(project string, region string) *RegionHealthAggregationPoliciesListCall { - c := &RegionHealthAggregationPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthAggregationPoliciesListCall) Filter(filter string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthAggregationPoliciesListCall) MaxResults(maxResults int64) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthAggregationPoliciesListCall) OrderBy(orderBy string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthAggregationPoliciesListCall) PageToken(pageToken string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthAggregationPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesListCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesListCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesListCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicyList.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 *RegionHealthAggregationPoliciesListCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicyList, 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 := &HealthAggregationPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthAggregationPoliciesListCall) Pages(ctx context.Context, f func(*HealthAggregationPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthAggregationPoliciesPatchCall struct { - s *Service - project string - region string - healthAggregationPolicy string - healthaggregationpolicy *HealthAggregationPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthAggregationPolicy -// resource with the data included in the request. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy to update. -// The name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Patch(project string, region string, healthAggregationPolicy string, healthaggregationpolicy *HealthAggregationPolicy) *RegionHealthAggregationPoliciesPatchCall { - c := &RegionHealthAggregationPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - c.healthaggregationpolicy = healthaggregationpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesPatchCall) RequestId(requestId string) *RegionHealthAggregationPoliciesPatchCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesPatchCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthaggregationpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - 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{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthAggregationPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c := &RegionHealthAggregationPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthAggregationPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthCheckService -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionHealthCheckServicesService) AggregatedList(project string) *RegionHealthCheckServicesAggregatedListCall { - c := &RegionHealthCheckServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthCheckServicesAggregatedListCall) Filter(filter string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionHealthCheckServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesAggregatedListCall) OrderBy(orderBy string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthCheckServicesAggregatedListCall) PageToken(pageToken string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthCheckServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionHealthCheckServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthCheckServicesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesAggregatedListCall) Context(ctx context.Context) *RegionHealthCheckServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthCheckServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServiceAggregatedList.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 *RegionHealthCheckServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServiceAggregatedList, 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 := &HealthCheckServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthCheckServicesAggregatedListCall) Pages(ctx context.Context, f func(*HealthCheckServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthCheckServicesDeleteCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional HealthCheckService. -// -// - healthCheckService: Name of the HealthCheckService to delete. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { - c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { - 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 -// details. -func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesGetCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional HealthCheckService resource. -// -// - healthCheckService: Name of the HealthCheckService to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { - c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckService.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 *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, 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 := &HealthCheckService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesInsertCall struct { - s *Service - project string - region string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional HealthCheckService resource in the -// specified project and region using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { - c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthcheckservice = healthcheckservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { - 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 -// details. -func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the HealthCheckService resources that have been -// configured for the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { - c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServicesList.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 *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, 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 := &HealthCheckServicesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthCheckServicesPatchCall struct { - s *Service - project string - region string - healthCheckService string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthCheckService resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheckService: Name of the HealthCheckService to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { - c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - c.healthcheckservice = healthcheckservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { - 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 -// details. -func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - 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{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthCheckServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthCheckServicesTestIamPermissionsCall { - c := &RegionHealthCheckServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthCheckServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksDeleteCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { - c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { - 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 -// details. -func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksGetCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { - c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.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 *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, 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 := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksInsertCall struct { - s *Service - project string - region string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { - c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { - 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 -// details. -func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { - c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.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 *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, 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 := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthChecksPatchCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { - c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { - 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 -// details. -func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - 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{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthChecksTestIamPermissionsCall { - c := &RegionHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksUpdateCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - healthCheck: Name of the HealthCheck resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { - c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { - 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 -// details. -func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthSource resources -// (all -// regional) available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionHealthSourcesService) AggregatedList(project string) *RegionHealthSourcesAggregatedListCall { - c := &RegionHealthSourcesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthSourcesAggregatedListCall) Filter(filter string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionHealthSourcesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthSourcesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthSourcesAggregatedListCall) OrderBy(orderBy string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthSourcesAggregatedListCall) PageToken(pageToken string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthSourcesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionHealthSourcesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesAggregatedListCall) Context(ctx context.Context) *RegionHealthSourcesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthSources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSourceAggregatedList.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 *RegionHealthSourcesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthSourceAggregatedList, 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 := &HealthSourceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthSourcesAggregatedListCall) Pages(ctx context.Context, f func(*HealthSourceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthSourcesDeleteCall struct { - s *Service - project string - region string - healthSource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthSource in the given region -// -// - healthSource: Name of the HealthSource resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Delete(project string, region string, healthSource string) *RegionHealthSourcesDeleteCall { - c := &RegionHealthSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesDeleteCall) RequestId(requestId string) *RegionHealthSourcesDeleteCall { - 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 -// details. -func (c *RegionHealthSourcesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthSourcesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesDeleteCall) Context(ctx context.Context) *RegionHealthSourcesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesGetCall struct { - s *Service - project string - region string - healthSource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthSource resource in the given region. -// -// - healthSource: Name of the HealthSource resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Get(project string, region string, healthSource string) *RegionHealthSourcesGetCall { - c := &RegionHealthSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesGetCall) Fields(s ...googleapi.Field) *RegionHealthSourcesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesGetCall) IfNoneMatch(entityTag string) *RegionHealthSourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesGetCall) Context(ctx context.Context) *RegionHealthSourcesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSource.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 *RegionHealthSourcesGetCall) Do(opts ...googleapi.CallOption) (*HealthSource, 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 := &HealthSource{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesInsertCall struct { - s *Service - project string - region string - healthsource *HealthSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a HealthSource in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Insert(project string, region string, healthsource *HealthSource) *RegionHealthSourcesInsertCall { - c := &RegionHealthSourcesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthsource = healthsource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesInsertCall) RequestId(requestId string) *RegionHealthSourcesInsertCall { - 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 -// details. -func (c *RegionHealthSourcesInsertCall) Fields(s ...googleapi.Field) *RegionHealthSourcesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesInsertCall) Context(ctx context.Context) *RegionHealthSourcesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the HealthSources for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) List(project string, region string) *RegionHealthSourcesListCall { - c := &RegionHealthSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthSourcesListCall) Filter(filter string) *RegionHealthSourcesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthSourcesListCall) MaxResults(maxResults int64) *RegionHealthSourcesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthSourcesListCall) OrderBy(orderBy string) *RegionHealthSourcesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthSourcesListCall) PageToken(pageToken string) *RegionHealthSourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthSourcesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesListCall) Context(ctx context.Context) *RegionHealthSourcesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSourceList.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 *RegionHealthSourcesListCall) Do(opts ...googleapi.CallOption) (*HealthSourceList, 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 := &HealthSourceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthSourcesListCall) Pages(ctx context.Context, f func(*HealthSourceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthSourcesPatchCall struct { - s *Service - project string - region string - healthSource string - healthsource *HealthSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthSource resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthSource: Name of the HealthSource to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Patch(project string, region string, healthSource string, healthsource *HealthSource) *RegionHealthSourcesPatchCall { - c := &RegionHealthSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - c.healthsource = healthsource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesPatchCall) RequestId(requestId string) *RegionHealthSourcesPatchCall { - 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 -// details. -func (c *RegionHealthSourcesPatchCall) Fields(s ...googleapi.Field) *RegionHealthSourcesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesPatchCall) Context(ctx context.Context) *RegionHealthSourcesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - 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{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthSourcesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthSourcesTestIamPermissionsCall { - c := &RegionHealthSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthSourcesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthSourcesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsCancelCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified resize request. -// Cancelled resize request no longer waits for the resources to -// be -// provisioned. Cancel is only possible for requests that are in -// accepted -// state. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request to cancel. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Cancel(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c := &RegionInstanceGroupManagerResizeRequestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsCancelCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsCancelCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified, inactive resize request. Requests that are -// still -// active cannot be deleted. Deleting request does not delete instances -// that -// were provisioned previously. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request to delete. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Delete(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c := &RegionInstanceGroupManagerResizeRequestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsGetCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified resize request. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Get(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsGetCall { - c := &RegionInstanceGroupManagerResizeRequestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequest.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 *RegionInstanceGroupManagerResizeRequestsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequest, 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 := &InstanceGroupManagerResizeRequest{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsInsertCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Resize Request that starts provisioning VMs -// immediately -// or queues VM creation. -// -// - instanceGroupManager: Name of the managed instance group to which the -// resize request is scoped. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: Name of the region -// scoping this request. Name should conform to RFC1035. -func (r *RegionInstanceGroupManagerResizeRequestsService) Insert(project string, region string, instanceGroupManager string, instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c := &RegionInstanceGroupManagerResizeRequestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerresizerequest = instancegroupmanagerresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsInsertCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsInsertCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsListCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Resize Requests that are contained in the -// managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. The name -// should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region -// scoping this request. Name should conform to RFC1035. -func (r *RegionInstanceGroupManagerResizeRequestsService) List(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagerResizeRequestsListCall { - c := &RegionInstanceGroupManagerResizeRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Filter(filter string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagerResizeRequestsListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) OrderBy(orderBy string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) PageToken(pageToken string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagerResizeRequestsListResponse.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 *RegionInstanceGroupManagerResizeRequestsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerResizeRequestsListResponse, 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 := &RegionInstanceGroupManagerResizeRequestsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagerResizeRequestsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerResizeRequestsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Flags the specified instances to be immediately removed -// from the managed -// instance group. Abandoning an instance does not delete the -// instance, but it does remove the instance from any target pools that -// are -// applied by the managed instance group. This method reduces thetargetSize of -// the managed instance group by the -// number of instances that you abandon. This operation is marked asDONE when -// the action is scheduled even if the instances have -// not yet been removed from the group. You must separately verify the -// status of the abandoning action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.abandonInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.abandonInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Apply updates to selected instances the managed -// instance group. -// -// - instanceGroupManager: The name of the managed instance group, should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateInstances: Creates instances with per-instance configurations in this -// regional managed -// instance group. Instances are created using the current instance -// template. -// The create instances operation is marked DONE if -// the createInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// thecreating or actions with the listmanagedinstances -// method. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: The name of theregion -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { - c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerscreateinstancesrequest = regioninstancegroupmanagerscreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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. -// -// The request ID must be -// a valid UUID with the exception that zero UUID is not -// supported -// (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersCreateInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersCreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersCreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.createInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.createInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersCreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.createInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances -// in that group. -// -// - instanceGroupManager: Name of the managed instance group to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { - 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 -// details. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Flags the specified instances in the managed instance group -// to be -// immediately deleted. The instances are also removed from any target -// pools of which they were a member. This method reduces thetargetSize of the -// managed instance group by the number of -// instances that you delete. -// The deleteInstances operation is marked DONE if -// the deleteInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// thedeleting action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deleteInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deleteInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Deletes selected per-instance configurations for -// the managed instance -// group. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerdeleteinstanceconfigreq = regioninstancegroupmanagerdeleteinstanceconfigreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerdeleteinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deletePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance group. -// -// - instanceGroupManager: Name of the managed instance group to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.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 *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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 := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that you -// specify -// in the request. After the group is created, instances in the group -// are -// created using the specified instance template. -// This operation is marked as DONE when the group is created -// even if the instances in the group have not yet been created. You -// must -// separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// A regional managed instance group can contain up to 2000 instances. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { - 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 -// details. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of managed instance groups that are -// contained -// within the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagerList.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 *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, 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 := &RegionInstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListErrorsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListErrors: Lists all errors thrown by actions on instances for a given -// regional -// managed instance group. The filter andorderBy query parameters are not -// supported. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035, or an -// unsigned long integer: must match regexp pattern: -// (?:a-z (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// This should conform to RFC1035. -func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { - c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListErrorsCall) Filter(filter string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListErrorsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListErrorsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListErrorsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listErrors", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listErrors" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListErrorsResponse.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 *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListErrorsResponse, 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 := &RegionInstanceGroupManagersListErrorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listErrors", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListErrorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists the instances in the managed instance group and -// instances that are -// scheduled to be created. The list includes any current actions -// that the group has scheduled for its instances. The orderBy -// query parameter is not supported. The `pageToken` query parameter -// is -// supported only if the group's `listManagedInstancesResults` field is set -// to `PAGINATED`. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listManagedInstances", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.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 *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, 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 := &RegionInstanceGroupManagersListInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listManagedInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configurations defined -// for the managed -// instance group. The orderBy query parameter is not supported. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listPerInstanceConfigs", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstanceConfigsResp.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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, 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 := &RegionInstanceGroupManagersListInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is patched -// even if the instances in the group are still in the process of -// being -// patched. You must separately verify the status of the individual -// instances -// with the listmanagedinstances -// method. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { - 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 -// details. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerpatchinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Flags the specified VM instances in the managed instance -// group to be -// immediately recreated. Each instance is recreated using the group's -// current -// configuration. This operation is marked as DONE when the flag -// is set even if the instances have not yet been recreated. You -// must -// separately verify the status of each instance by checking itscurrentAction -// field; for more information, see Checking -// the status of managed instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersrecreaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.recreateInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.recreateInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Changes the intended size of the managed instance group. If you -// increase -// the size, the group creates new instances using the current -// instance -// template. If you decrease the size, the group deletes one or -// more -// instances. -// -// The resize operation is marked DONE if theresize request is successful. The -// underlying actions take -// additional time. You must separately verify the status of thecreating or -// deleting actions with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - size: Number of instances that should exist in this instance -// group -// -// manager. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resize", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the regional managed instance group with advanced -// configuration -// options like disabling creation retries. This is an extended version of -// theresize method. -// -// If you increase the size, the group creates new instances using the -// current -// instance template. If you decrease the size, the group deletes one or -// more -// instances. -// -// The resize operation is marked DONE if theresize request is successful. The -// underlying actions take -// additional time. You must separately verify the status of thecreating or -// deleting actions with the get -// orlistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionInstanceGroupManagersService) ResizeAdvanced(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest) *RegionInstanceGroupManagersResizeAdvancedCall { - c := &RegionInstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersresizeadvancedrequest = regioninstancegroupmanagersresizeadvancedrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeAdvancedCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resizeAdvanced", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resizeAdvanced" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resizeAdvanced", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResumeInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResumeInstances: Flags the specified instances in the managed instance group -// to be -// resumed. This method increases thetargetSize and decreases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// resume. -// The resumeInstances operation is marked DONE if -// the resumeInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theRESUMING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are suspended. -// For -// example, if an instance was previously suspended using the -// suspendInstances -// method, it can be resumed using the resumeInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are resumed. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) ResumeInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest) *RegionInstanceGroupManagersResumeInstancesCall { - c := &RegionInstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersresumeinstancesrequest = regioninstancegroupmanagersresumeinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersResumeInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResumeInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersResumeInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersresumeinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resumeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resumeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResumeInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resumeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policy for the instances in -// this managed -// instance group. -// [Deprecated] This method is deprecated. UseregionInstanceGroupManagers.patch -// instead. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating new -// instances or recreating -// instances in this group. Existing instances are not affected. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssettemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setInstanceTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setInstanceTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances in this -// group are -// assigned. Existing instances in the group are not affected. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setTargetPools", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setTargetPools", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersStartInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartInstances: Flags the specified instances in the managed instance group -// to be -// started. This method increases thetargetSize and decreases the -// targetStoppedSize -// of the managed instance group by the number of instances that you start. -// The startInstances operation is marked DONE if -// the startInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTARTING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are stopped. -// For -// example, if an instance was previously stopped using the -// stopInstances -// method, it can be started using the startInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are started. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) StartInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest) *RegionInstanceGroupManagersStartInstancesCall { - c := &RegionInstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersstartinstancesrequest = regioninstancegroupmanagersstartinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersStartInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStartInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStartInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStartInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersStartInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersstartinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.startInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.startInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersStartInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.startInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersStopInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopInstances: Flags the specified instances in the managed instance group -// to be -// immediately stopped. You can only specify instances that are running in -// this request. This method reduces thetargetSize and increases the -// targetStoppedSize -// of the managed instance group by the number of instances that you stop. -// The stopInstances operation is marked DONE if -// the stopInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTOPPING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays stopping the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is stopped. -// -// Stopped instances can be started using the startInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) StopInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest) *RegionInstanceGroupManagersStopInstancesCall { - c := &RegionInstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersstopinstancesrequest = regioninstancegroupmanagersstopinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersStopInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStopInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStopInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStopInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersStopInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersstopinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.stopInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.stopInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersStopInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.stopInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSuspendInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SuspendInstances: Flags the specified instances in the managed instance -// group to be -// immediately suspended. You can only specify instances that are running -// in -// this request. This method reduces thetargetSize and increases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// suspend. -// The suspendInstances operation is marked DONE if -// the suspendInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSUSPENDING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays suspension of the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is -// suspended. -// -// Suspended instances can be resumed using the resumeInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SuspendInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest) *RegionInstanceGroupManagersSuspendInstancesCall { - c := &RegionInstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssuspendinstancesrequest = regioninstancegroupmanagerssuspendinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersSuspendInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSuspendInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSuspendInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssuspendinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.suspendInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.suspendInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.suspendInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { - c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersUpdateCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is updated -// even if the instances in the group have not yet been updated. You -// must -// separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { - c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { - 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 -// details. -func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerupdateinstanceconfigreq = regioninstancegroupmanagerupdateinstanceconfigreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerupdateinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.updatePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group resource. -// -// - instanceGroup: Name of the instance group resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroup.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 *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, 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 := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance group resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.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 *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, 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 := &RegionInstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group and -// displays -// information about the named ports. Depending on the specified options, -// this -// method can list all instances or only the instances that are running. -// The orderBy query parameter is not supported. -// -// - instanceGroup: Name of the regional instance group for which we want to -// list the -// -// instances. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.listInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupsListInstances.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 *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, 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 := &RegionInstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.listInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified regional instance -// group. -// -// - instanceGroup: The name of the regional instance group where the named -// ports are updated. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { - 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 -// details. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") - 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{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.setNamedPorts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.setNamedPorts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { - c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesDeleteCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. Deleting an instance -// template is -// permanent and cannot be undone. -// -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Delete(project string, region string, instanceTemplate string) *RegionInstanceTemplatesDeleteCall { - c := &RegionInstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceTemplate = instanceTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionInstanceTemplatesDeleteCall { - 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 -// details. -func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesDeleteCall) Context(ctx context.Context) *RegionInstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesGetCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. -// -// - instanceTemplate: The name of the instance template. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Get(project string, region string, instanceTemplate string) *RegionInstanceTemplatesGetCall { - c := &RegionInstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceTemplate = instanceTemplate - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *RegionInstanceTemplatesGetCall) View(view string) *RegionInstanceTemplatesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesGetCall) Context(ctx context.Context) *RegionInstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.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 *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, 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 := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesInsertCall struct { - s *Service - project string - region string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project and region -// using the -// global instance template whose URL is included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Insert(project string, region string, instancetemplate *InstanceTemplate) *RegionInstanceTemplatesInsertCall { - c := &RegionInstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancetemplate = instancetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionInstanceTemplatesInsertCall { - 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 -// details. -func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesInsertCall) Context(ctx context.Context) *RegionInstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained within -// the -// specified project and region. -// -// - project: Project ID for this request. -// - region: The name of the regions for this request. -func (r *RegionInstanceTemplatesService) List(project string, region string) *RegionInstanceTemplatesListCall { - c := &RegionInstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *RegionInstanceTemplatesListCall) View(view string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesListCall) Context(ctx context.Context) *RegionInstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.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 *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, 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 := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstancesBulkInsertCall struct { - s *Service - project string - region string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Creates multiple instances in a given region. Count specifies -// the number of -// instances to create. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstancesService) BulkInsert(project string, region string, bulkinsertinstanceresource *BulkInsertInstanceResource) *RegionInstancesBulkInsertCall { - c := &RegionInstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.bulkinsertinstanceresource = bulkinsertinstanceresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstancesBulkInsertCall) RequestId(requestId string) *RegionInstancesBulkInsertCall { - 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 -// details. -func (c *RegionInstancesBulkInsertCall) Fields(s ...googleapi.Field) *RegionInstancesBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstancesBulkInsertCall) Context(ctx context.Context) *RegionInstancesBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstancesBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertinstanceresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instances/bulkInsert") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstances.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstances.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstancesBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstances.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsDeleteCall struct { - s *Service - project string - region string - instantSnapshotGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: deletes a Regional InstantSnapshotGroup resource -// -// - instantSnapshotGroup: Name of the InstantSnapshotGroup resource to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotGroupsService) Delete(project string, region string, instantSnapshotGroup string) *RegionInstantSnapshotGroupsDeleteCall { - c := &RegionInstantSnapshotGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshotGroup = instantSnapshotGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotGroupsDeleteCall) RequestId(requestId string) *RegionInstantSnapshotGroupsDeleteCall { - 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 -// details. -func (c *RegionInstantSnapshotGroupsDeleteCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsDeleteCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshotGroup": c.instantSnapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsGetCall struct { - s *Service - project string - region string - instantSnapshotGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: returns the specified InstantSnapshotGroup resource in the -// specified -// region. -// -// - instantSnapshotGroup: Name of the InstantSnapshotGroup resource to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotGroupsService) Get(project string, region string, instantSnapshotGroup string) *RegionInstantSnapshotGroupsGetCall { - c := &RegionInstantSnapshotGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshotGroup = instantSnapshotGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsGetCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshotGroup": c.instantSnapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotGroup.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 *RegionInstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotGroup, 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 := &InstantSnapshotGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotGroupsService) GetIamPolicy(project string, region string, resource string) *RegionInstantSnapshotGroupsGetIamPolicyCall { - c := &RegionInstantSnapshotGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionInstantSnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.getIamPolicy" call. -// 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 *RegionInstantSnapshotGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsInsertCall struct { - s *Service - project string - region string - instantsnapshotgroup *InstantSnapshotGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: creates a Regional InstantSnapshotGroup resource -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionInstantSnapshotGroupsService) Insert(project string, region string, instantsnapshotgroup *InstantSnapshotGroup) *RegionInstantSnapshotGroupsInsertCall { - c := &RegionInstantSnapshotGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantsnapshotgroup = instantsnapshotgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotGroupsInsertCall) RequestId(requestId string) *RegionInstantSnapshotGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceConsistencyGroup sets the optional parameter "sourceConsistencyGroup": -// begin_interface: MixerMutationRequestBuilder -func (c *RegionInstantSnapshotGroupsInsertCall) SourceConsistencyGroup(sourceConsistencyGroup string) *RegionInstantSnapshotGroupsInsertCall { - c.urlParams_.Set("sourceConsistencyGroup", sourceConsistencyGroup) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotGroupsInsertCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsInsertCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshotgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: retrieves the list of InstantSnapshotGroup resources contained -// within -// the specified region. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotGroupsService) List(project string, region string) *RegionInstantSnapshotGroupsListCall { - c := &RegionInstantSnapshotGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstantSnapshotGroupsListCall) Filter(filter string) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstantSnapshotGroupsListCall) MaxResults(maxResults int64) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstantSnapshotGroupsListCall) OrderBy(orderBy string) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstantSnapshotGroupsListCall) PageToken(pageToken string) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstantSnapshotGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotGroupsListCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotGroupsListCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsListCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListInstantSnapshotGroups.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 *RegionInstantSnapshotGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInstantSnapshotGroups, 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 := &ListInstantSnapshotGroups{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstantSnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListInstantSnapshotGroups) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstantSnapshotGroupsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotGroupsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionInstantSnapshotGroupsSetIamPolicyCall { - c := &RegionInstantSnapshotGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.setIamPolicy" call. -// 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 *RegionInstantSnapshotGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotGroupsTestIamPermissionsCall { - c := &RegionInstantSnapshotGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshotGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstantSnapshotGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshotGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsDeleteCall struct { - s *Service - project string - region string - instantSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that -// deleting -// a single instantSnapshot might not necessarily delete all the data on -// that -// instantSnapshot. If any data on the instantSnapshot that is marked -// for -// deletion is needed for subsequent instantSnapshots, the data will be -// moved -// to the next corresponding instantSnapshot. -// -// For more information, seeDeleting -// instantSnapshots. -// -// - instantSnapshot: Name of the InstantSnapshot resource to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) Delete(project string, region string, instantSnapshot string) *RegionInstantSnapshotsDeleteCall { - c := &RegionInstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshot = instantSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsDeleteCall) RequestId(requestId string) *RegionInstantSnapshotsDeleteCall { - 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 -// details. -func (c *RegionInstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsDeleteCall) Context(ctx context.Context) *RegionInstantSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsGetCall struct { - s *Service - project string - region string - instantSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InstantSnapshot resource in the specified region. -// -// - instantSnapshot: Name of the InstantSnapshot resource to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) Get(project string, region string, instantSnapshot string) *RegionInstantSnapshotsGetCall { - c := &RegionInstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshot = instantSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsGetCall) Context(ctx context.Context) *RegionInstantSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshot.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 *RegionInstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, 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 := &InstantSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionInstantSnapshotsGetIamPolicyCall { - c := &RegionInstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionInstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionInstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.getIamPolicy" call. -// 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 *RegionInstantSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsInsertCall struct { - s *Service - project string - region string - instantsnapshot *InstantSnapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instant snapshot in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionInstantSnapshotsService) Insert(project string, region string, instantsnapshot *InstantSnapshot) *RegionInstantSnapshotsInsertCall { - c := &RegionInstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantsnapshot = instantsnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsInsertCall) RequestId(requestId string) *RegionInstantSnapshotsInsertCall { - 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 -// details. -func (c *RegionInstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsInsertCall) Context(ctx context.Context) *RegionInstantSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of InstantSnapshot resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) List(project string, region string) *RegionInstantSnapshotsListCall { - c := &RegionInstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstantSnapshotsListCall) Filter(filter string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstantSnapshotsListCall) MaxResults(maxResults int64) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstantSnapshotsListCall) OrderBy(orderBy string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstantSnapshotsListCall) PageToken(pageToken string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsListCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsListCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsListCall) Context(ctx context.Context) *RegionInstantSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotList.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 *RegionInstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, 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 := &InstantSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstantSnapshotsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionInstantSnapshotsSetIamPolicyCall { - c := &RegionInstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.setIamPolicy" call. -// 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 *RegionInstantSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a instantSnapshot in the given region. To -// learn more -// about labels, read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionInstantSnapshotsSetLabelsCall { - c := &RegionInstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsSetLabelsCall) RequestId(requestId string) *RegionInstantSnapshotsSetLabelsCall { - 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 -// details. -func (c *RegionInstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionInstantSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotsTestIamPermissionsCall { - c := &RegionInstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigMembersGetCall struct { - s *Service - project string - region string - multiMig string - multiMigMember string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified multi-MIG member. -// -// - multiMig: The name of the multi-MIG. -// Name should conform to RFC1035 or be a resource ID. -// - multiMigMember: The name of the multi-MIG member. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: Name of the region for this request. Region name should conform to -// RFC1035. -func (r *RegionMultiMigMembersService) Get(project string, region string, multiMig string, multiMigMember string) *RegionMultiMigMembersGetCall { - c := &RegionMultiMigMembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - c.multiMigMember = multiMigMember - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigMembersGetCall) Fields(s ...googleapi.Field) *RegionMultiMigMembersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigMembersGetCall) IfNoneMatch(entityTag string) *RegionMultiMigMembersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigMembersGetCall) Context(ctx context.Context) *RegionMultiMigMembersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigMembersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigMembersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - "multiMigMember": c.multiMigMember, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigMembers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMigMember.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 *RegionMultiMigMembersGetCall) Do(opts ...googleapi.CallOption) (*MultiMigMember, 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 := &MultiMigMember{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigMembersListCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of members of a specific multi-MIG. -// -// - multiMig: The name of the multi-MIG. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: Name of the region for this request. Region name should conform to -// RFC1035. -func (r *RegionMultiMigMembersService) List(project string, region string, multiMig string) *RegionMultiMigMembersListCall { - c := &RegionMultiMigMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionMultiMigMembersListCall) Filter(filter string) *RegionMultiMigMembersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionMultiMigMembersListCall) MaxResults(maxResults int64) *RegionMultiMigMembersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionMultiMigMembersListCall) OrderBy(orderBy string) *RegionMultiMigMembersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionMultiMigMembersListCall) PageToken(pageToken string) *RegionMultiMigMembersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionMultiMigMembersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionMultiMigMembersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigMembersListCall) Fields(s ...googleapi.Field) *RegionMultiMigMembersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigMembersListCall) IfNoneMatch(entityTag string) *RegionMultiMigMembersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigMembersListCall) Context(ctx context.Context) *RegionMultiMigMembersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigMembersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigMembersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigMembers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMigMemberList.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 *RegionMultiMigMembersListCall) Do(opts ...googleapi.CallOption) (*MultiMigMemberList, 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 := &MultiMigMemberList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionMultiMigMembersListCall) Pages(ctx context.Context, f func(*MultiMigMemberList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionMultiMigsDeleteCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a multi-MIG in the specified project. -// -// - multiMig: Name of the multi-MIG to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Delete(project string, region string, multiMig string) *RegionMultiMigsDeleteCall { - c := &RegionMultiMigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionMultiMigsDeleteCall) RequestId(requestId string) *RegionMultiMigsDeleteCall { - 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 -// details. -func (c *RegionMultiMigsDeleteCall) Fields(s ...googleapi.Field) *RegionMultiMigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsDeleteCall) Context(ctx context.Context) *RegionMultiMigsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionMultiMigsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsGetCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all the details of a specific multi-MIG. -// -// - multiMig: Name of the multi-MIG resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Get(project string, region string, multiMig string) *RegionMultiMigsGetCall { - c := &RegionMultiMigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigsGetCall) Fields(s ...googleapi.Field) *RegionMultiMigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigsGetCall) IfNoneMatch(entityTag string) *RegionMultiMigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsGetCall) Context(ctx context.Context) *RegionMultiMigsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMig.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 *RegionMultiMigsGetCall) Do(opts ...googleapi.CallOption) (*MultiMig, 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 := &MultiMig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsInsertCall struct { - s *Service - project string - region string - multimig *MultiMig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a multi-MIG in the specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Insert(project string, region string, multimig *MultiMig) *RegionMultiMigsInsertCall { - c := &RegionMultiMigsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multimig = multimig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 you 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 *RegionMultiMigsInsertCall) RequestId(requestId string) *RegionMultiMigsInsertCall { - 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 -// details. -func (c *RegionMultiMigsInsertCall) Fields(s ...googleapi.Field) *RegionMultiMigsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsInsertCall) Context(ctx context.Context) *RegionMultiMigsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.multimig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionMultiMigsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of multi-MIGs in a project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) List(project string, region string) *RegionMultiMigsListCall { - c := &RegionMultiMigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionMultiMigsListCall) Filter(filter string) *RegionMultiMigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionMultiMigsListCall) MaxResults(maxResults int64) *RegionMultiMigsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionMultiMigsListCall) OrderBy(orderBy string) *RegionMultiMigsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionMultiMigsListCall) PageToken(pageToken string) *RegionMultiMigsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionMultiMigsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionMultiMigsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigsListCall) Fields(s ...googleapi.Field) *RegionMultiMigsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigsListCall) IfNoneMatch(entityTag string) *RegionMultiMigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsListCall) Context(ctx context.Context) *RegionMultiMigsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMigsList.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 *RegionMultiMigsListCall) Do(opts ...googleapi.CallOption) (*MultiMigsList, 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 := &MultiMigsList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionMultiMigsListCall) Pages(ctx context.Context, f func(*MultiMigsList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - regionnetworkendpointgroupsattachendpointsrequest *RegionNetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, region string, networkEndpointGroup string, regionnetworkendpointgroupsattachendpointsrequest *RegionNetworkEndpointGroupsAttachEndpointsRequest) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - c.regionnetworkendpointgroupsattachendpointsrequest = regionnetworkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionnetworkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsDeleteCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group. Note that the NEG -// cannot be -// deleted if it is configured as a backend of a backend service. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with RFC1035. -func (r *RegionNetworkEndpointGroupsService) Delete(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsDeleteCall { - c := &RegionNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *RegionNetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - regionnetworkendpointgroupsdetachendpointsrequest *RegionNetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach the network endpoint from the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group you are -// detaching network -// -// endpoints from. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, region string, networkEndpointGroup string, regionnetworkendpointgroupsdetachendpointsrequest *RegionNetworkEndpointGroupsDetachEndpointsRequest) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - c.regionnetworkendpointgroupsdetachendpointsrequest = regionnetworkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionnetworkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsGetCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with RFC1035. -func (r *RegionNetworkEndpointGroupsService) Get(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsGetCall { - c := &RegionNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *RegionNetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsGetCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *RegionNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsInsertCall struct { - s *Service - project string - region string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) Insert(project string, region string, networkendpointgroup *NetworkEndpointGroup) *RegionNetworkEndpointGroupsInsertCall { - c := &RegionNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsInsertCall) RequestId(requestId string) *RegionNetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional network endpoint groups available to -// the -// specified project in the given region. -// -// - project: Project ID for this request. -// - region: The name of theregion -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) List(project string, region string) *RegionNetworkEndpointGroupsListCall { - c := &RegionNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkEndpointGroupsListCall) Filter(filter string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkEndpointGroupsListCall) OrderBy(orderBy string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkEndpointGroupsListCall) PageToken(pageToken string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *RegionNetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsListCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *RegionNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of theregion -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) ListNetworkEndpoints(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkFirewallPoliciesAddAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) AddAssociation(project string, region string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *RegionNetworkFirewallPoliciesAddAssociationCall { - c := &RegionNetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// AssociatedPolicyToBeReplaced sets the optional parameter -// "associatedPolicyToBeReplaced": Name of the firewall policy associated with -// the target network to swap -// association with. This field is mutually exclusive -// with -// 'replace_existing_association'. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) AssociatedPolicyToBeReplaced(associatedPolicyToBeReplaced string) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("associatedPolicyToBeReplaced", associatedPolicyToBeReplaced) - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association already exists. -// This is false by default, in which case an error will be returned if -// an -// association already exists. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesAddRuleCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) AddRule(project string, region string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *RegionNetworkFirewallPoliciesAddRuleCall { - c := &RegionNetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesAddRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesCloneRulesCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) CloneRules(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c := &RegionNetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesDeleteCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Delete(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesDeleteCall { - c := &RegionNetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesDeleteCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Get(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetCall { - c := &RegionNetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *RegionNetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried -// association belongs. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetAssociation(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c := &RegionNetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Name(name string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *RegionNetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns the effective firewalls on a given network. -// -// - network: Network reference. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetEffectiveFirewalls(project string, region string, network string) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c := &RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlParams_.Set("network", network) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.ServerResponse.He -// ader 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 *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse, 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 := &RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) GetIamPolicy(project string, region string, resource string) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c := &RegionNetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getIamPolicy" call. -// 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 *RegionNetworkFirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetRuleCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetRule(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetRuleCall { - c := &RegionNetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *RegionNetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesInsertCall struct { - s *Service - project string - region string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new network firewall policy in the specified project and -// region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Insert(project string, region string, firewallpolicy *FirewallPolicy) *RegionNetworkFirewallPoliciesInsertCall { - c := &RegionNetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesInsertCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesInsertCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the network firewall policies that have been configured -// for the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) List(project string, region string) *RegionNetworkFirewallPoliciesListCall { - c := &RegionNetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkFirewallPoliciesListCall) Filter(filter string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkFirewallPoliciesListCall) OrderBy(orderBy string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkFirewallPoliciesListCall) PageToken(pageToken string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesListCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *RegionNetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkFirewallPoliciesPatchCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Patch(project string, region string, firewallPolicy string, firewallpolicy *FirewallPolicy) *RegionNetworkFirewallPoliciesPatchCall { - c := &RegionNetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesPatchAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchAssociation: Updates an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) PatchAssociation(project string, region string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c := &RegionNetworkFirewallPoliciesPatchAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patchAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesPatchRuleCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) PatchRule(project string, region string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *RegionNetworkFirewallPoliciesPatchRuleCall { - c := &RegionNetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesRemoveAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) RemoveAssociation(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c := &RegionNetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the association that will -// be removed. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesRemoveRuleCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) RemoveRule(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c := &RegionNetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c := &RegionNetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.setIamPolicy" call. -// 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 *RegionNetworkFirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c := &RegionNetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAddAssociationCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicyassociation *NetworkPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) AddAssociation(project string, region string, networkPolicy string, networkpolicyassociation *NetworkPolicyAssociation) *RegionNetworkPoliciesAddAssociationCall { - c := &RegionNetworkPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicyassociation = networkpolicyassociation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesAddAssociationCall) RequestId(requestId string) *RegionNetworkPoliciesAddAssociationCall { - 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 -// details. -func (c *RegionNetworkPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAddAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAddTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddTrafficClassificationRule: Inserts a rule into a network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) AddTrafficClassificationRule(project string, region string, networkPolicy string, networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesAddTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicytrafficclassificationrule = networkpolicytrafficclassificationrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesAddTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicytrafficclassificationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addTrafficClassificationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.addTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of network policies. -// -// To prevent failure, it's recommended that you set the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RegionNetworkPoliciesService) AggregatedList(project string) *RegionNetworkPoliciesAggregatedListCall { - c := &RegionNetworkPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkPoliciesAggregatedListCall) Filter(filter string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionNetworkPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkPoliciesAggregatedListCall) MaxResults(maxResults int64) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkPoliciesAggregatedListCall) OrderBy(orderBy string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkPoliciesAggregatedListCall) PageToken(pageToken string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionNetworkPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAggregatedListCall) Context(ctx context.Context) *RegionNetworkPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyAggregatedList.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 *RegionNetworkPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyAggregatedList, 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 := &NetworkPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkPoliciesDeleteCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - networkPolicy: Name of the network policy resource to delete. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Delete(project string, region string, networkPolicy string) *RegionNetworkPoliciesDeleteCall { - c := &RegionNetworkPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesDeleteCall) RequestId(requestId string) *RegionNetworkPoliciesDeleteCall { - 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 -// details. -func (c *RegionNetworkPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesDeleteCall) Context(ctx context.Context) *RegionNetworkPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network policy. -// -// - networkPolicy: Name of the network policy resource to return. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Get(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetCall { - c := &RegionNetworkPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetCall) Context(ctx context.Context) *RegionNetworkPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.get" call. -// 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 *RegionNetworkPoliciesGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetAssociationCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - networkPolicy: Name of the network policy to which the queried association -// belongs. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) GetAssociation(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetAssociationCall { - c := &RegionNetworkPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the network policy. -func (c *RegionNetworkPoliciesGetAssociationCall) Name(name string) *RegionNetworkPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyAssociation.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 *RegionNetworkPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyAssociation, 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 := &NetworkPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetTrafficClassificationRule: Gets a rule of the specified priority. -// -// - networkPolicy: Name of the network policy to which the queried rule -// belongs. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) GetTrafficClassificationRule(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesGetTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the network policy. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getTrafficClassificationRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.getTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyTrafficClassificationRule.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 *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyTrafficClassificationRule, 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 := &NetworkPolicyTrafficClassificationRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesInsertCall struct { - s *Service - project string - region string - networkpolicy *NetworkPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Insert(project string, region string, networkpolicy *NetworkPolicy) *RegionNetworkPoliciesInsertCall { - c := &RegionNetworkPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkpolicy = networkpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesInsertCall) RequestId(requestId string) *RegionNetworkPoliciesInsertCall { - 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 -// details. -func (c *RegionNetworkPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesInsertCall) Context(ctx context.Context) *RegionNetworkPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the specified -// project -// in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) List(project string, region string) *RegionNetworkPoliciesListCall { - c := &RegionNetworkPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkPoliciesListCall) Filter(filter string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkPoliciesListCall) MaxResults(maxResults int64) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkPoliciesListCall) OrderBy(orderBy string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkPoliciesListCall) PageToken(pageToken string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesListCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesListCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesListCall) Context(ctx context.Context) *RegionNetworkPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyList.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 *RegionNetworkPoliciesListCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyList, 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 := &NetworkPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkPoliciesListCall) Pages(ctx context.Context, f func(*NetworkPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkPoliciesPatchCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicy *NetworkPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the -// request. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Patch(project string, region string, networkPolicy string, networkpolicy *NetworkPolicy) *RegionNetworkPoliciesPatchCall { - c := &RegionNetworkPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicy = networkpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesPatchCall) RequestId(requestId string) *RegionNetworkPoliciesPatchCall { - 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 -// details. -func (c *RegionNetworkPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesPatchCall) Context(ctx context.Context) *RegionNetworkPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesPatchTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchTrafficClassificationRule: Patches a rule of the specified priority. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) PatchTrafficClassificationRule(project string, region string, networkPolicy string, networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesPatchTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicytrafficclassificationrule = networkpolicytrafficclassificationrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the traffic -// classification rule to patch. Only rules with -// a priority value between 1 and 2147482647 (inclusive) can be patched. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicytrafficclassificationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patchTrafficClassificationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.patchTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patchTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesRemoveAssociationCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) RemoveAssociation(project string, region string, networkPolicy string) *RegionNetworkPoliciesRemoveAssociationCall { - c := &RegionNetworkPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Name sets the optional parameter "name": Name for the association that will -// be removed. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Name(name string) *RegionNetworkPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesRemoveAssociationCall) RequestId(requestId string) *RegionNetworkPoliciesRemoveAssociationCall { - 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 -// details. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesRemoveTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveTrafficClassificationRule: Deletes a rule of the specified priority. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) RemoveTrafficClassificationRule(project string, region string, networkPolicy string) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesRemoveTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the network policy. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeTrafficClassificationRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.removeTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all NotificationEndpoint -// resources, -// regional and global, available to the specified project. -// -// - project: Name of the project scoping this request. -func (r *RegionNotificationEndpointsService) AggregatedList(project string) *RegionNotificationEndpointsAggregatedListCall { - c := &RegionNotificationEndpointsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNotificationEndpointsAggregatedListCall) Filter(filter string) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionNotificationEndpointsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNotificationEndpointsAggregatedListCall) MaxResults(maxResults int64) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNotificationEndpointsAggregatedListCall) OrderBy(orderBy string) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNotificationEndpointsAggregatedListCall) PageToken(pageToken string) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNotificationEndpointsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionNotificationEndpointsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsAggregatedListCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNotificationEndpointsAggregatedListCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsAggregatedListCall) Context(ctx context.Context) *RegionNotificationEndpointsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/notificationEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NotificationEndpointAggregatedList.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 *RegionNotificationEndpointsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NotificationEndpointAggregatedList, 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 := &NotificationEndpointAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNotificationEndpointsAggregatedListCall) Pages(ctx context.Context, f func(*NotificationEndpointAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNotificationEndpointsDeleteCall struct { - s *Service - project string - region string - notificationEndpoint string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NotificationEndpoint in the given region -// -// - notificationEndpoint: Name of the NotificationEndpoint resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Delete(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsDeleteCall { - c := &RegionNotificationEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationEndpoint = notificationEndpoint - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNotificationEndpointsDeleteCall) RequestId(requestId string) *RegionNotificationEndpointsDeleteCall { - 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 -// details. -func (c *RegionNotificationEndpointsDeleteCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsDeleteCall) Context(ctx context.Context) *RegionNotificationEndpointsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "notificationEndpoint": c.notificationEndpoint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNotificationEndpointsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsGetCall struct { - s *Service - project string - region string - notificationEndpoint string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NotificationEndpoint resource in the given -// region. -// -// - notificationEndpoint: Name of the NotificationEndpoint resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Get(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsGetCall { - c := &RegionNotificationEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationEndpoint = notificationEndpoint - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsGetCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNotificationEndpointsGetCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsGetCall) Context(ctx context.Context) *RegionNotificationEndpointsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "notificationEndpoint": c.notificationEndpoint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NotificationEndpoint.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 *RegionNotificationEndpointsGetCall) Do(opts ...googleapi.CallOption) (*NotificationEndpoint, 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 := &NotificationEndpoint{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsInsertCall struct { - s *Service - project string - region string - notificationendpoint *NotificationEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a NotificationEndpoint in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Insert(project string, region string, notificationendpoint *NotificationEndpoint) *RegionNotificationEndpointsInsertCall { - c := &RegionNotificationEndpointsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationendpoint = notificationendpoint - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNotificationEndpointsInsertCall) RequestId(requestId string) *RegionNotificationEndpointsInsertCall { - 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 -// details. -func (c *RegionNotificationEndpointsInsertCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsInsertCall) Context(ctx context.Context) *RegionNotificationEndpointsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.notificationendpoint) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNotificationEndpointsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the NotificationEndpoints for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) List(project string, region string) *RegionNotificationEndpointsListCall { - c := &RegionNotificationEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNotificationEndpointsListCall) Filter(filter string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNotificationEndpointsListCall) MaxResults(maxResults int64) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNotificationEndpointsListCall) OrderBy(orderBy string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNotificationEndpointsListCall) PageToken(pageToken string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNotificationEndpointsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsListCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNotificationEndpointsListCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsListCall) Context(ctx context.Context) *RegionNotificationEndpointsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NotificationEndpointList.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 *RegionNotificationEndpointsListCall) Do(opts ...googleapi.CallOption) (*NotificationEndpointList, 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 := &NotificationEndpointList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNotificationEndpointsListCall) Pages(ctx context.Context, f func(*NotificationEndpointList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNotificationEndpointsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNotificationEndpointsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionNotificationEndpointsTestIamPermissionsCall { - c := &RegionNotificationEndpointsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Context(ctx context.Context) *RegionNotificationEndpointsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionNotificationEndpointsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified region-specific Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Delete(project string, region string, operationid string) *RegionOperationsDeleteCall { - c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type RegionOperationsGetCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified region-specific Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Get(project string, region string, operationid string) *RegionOperationsGetCall { - c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionOperationsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { - c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionOperationsWaitCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method differs from the -// `GET` method in that it waits for no more than the default -// deadline (2 minutes) and then returns the current state of the -// operation, -// which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Wait(project string, region string, operationid string) *RegionOperationsWaitCall { - c := &RegionOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsWaitCall) Fields(s ...googleapi.Field) *RegionOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsWaitCall) Context(ctx context.Context) *RegionOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsDeleteCall struct { - s *Service - project string - region string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified RecoverableSnapshot. Deleting a recoverable -// snapshot -// will delete the underlying PD snapshot and is irreversible. -// -// - project: Project ID for this request. -// - recoverableSnapshot: Name of the recoverable Snapshot resource to delete. -// - region: Name of the region for this request. -func (r *RegionRecoverableSnapshotsService) Delete(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsDeleteCall { - c := &RegionRecoverableSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.recoverableSnapshot = recoverableSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionRecoverableSnapshotsDeleteCall) RequestId(requestId string) *RegionRecoverableSnapshotsDeleteCall { - 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 -// details. -func (c *RegionRecoverableSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsDeleteCall) Context(ctx context.Context) *RegionRecoverableSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionRecoverableSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsGetCall struct { - s *Service - project string - region string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified RecoverableSnapshot resource. -// -// - project: Project ID for this request. -// - recoverableSnapshot: Name of the Snapshot resource to return. -// - region: Name of the region for this request. -func (r *RegionRecoverableSnapshotsService) Get(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsGetCall { - c := &RegionRecoverableSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.recoverableSnapshot = recoverableSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionRecoverableSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionRecoverableSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsGetCall) Context(ctx context.Context) *RegionRecoverableSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *RecoverableSnapshot.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 *RegionRecoverableSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshot, 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 := &RecoverableSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionRecoverableSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionRecoverableSnapshotsGetIamPolicyCall { - c := &RegionRecoverableSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionRecoverableSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionRecoverableSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.getIamPolicy" call. -// 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 *RegionRecoverableSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of RecoverableSnapshot resources contained -// within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionRecoverableSnapshotsService) List(project string, region string) *RegionRecoverableSnapshotsListCall { - c := &RegionRecoverableSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionRecoverableSnapshotsListCall) Filter(filter string) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionRecoverableSnapshotsListCall) MaxResults(maxResults int64) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionRecoverableSnapshotsListCall) OrderBy(orderBy string) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionRecoverableSnapshotsListCall) PageToken(pageToken string) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionRecoverableSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionRecoverableSnapshotsListCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionRecoverableSnapshotsListCall) IfNoneMatch(entityTag string) *RegionRecoverableSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsListCall) Context(ctx context.Context) *RegionRecoverableSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RecoverableSnapshotList.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 *RegionRecoverableSnapshotsListCall) Do(opts ...googleapi.CallOption) (*RecoverableSnapshotList, 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 := &RecoverableSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionRecoverableSnapshotsListCall) Pages(ctx context.Context, f func(*RecoverableSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionRecoverableSnapshotsRecoverCall struct { - s *Service - project string - region string - recoverableSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Recover: Recovers the specified RecoverableSnapshot. -// -// - project: Project Id of the request. -// - recoverableSnapshot: Name of the recoverable resource to recover. -// - region: Name of the region for this request. -func (r *RegionRecoverableSnapshotsService) Recover(project string, region string, recoverableSnapshot string) *RegionRecoverableSnapshotsRecoverCall { - c := &RegionRecoverableSnapshotsRecoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.recoverableSnapshot = recoverableSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionRecoverableSnapshotsRecoverCall) RequestId(requestId string) *RegionRecoverableSnapshotsRecoverCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SnapshotName sets the optional parameter "snapshotName": Name of the -// snapshot after the recovery -// The name will be 1-63 characters long, and comply withRFC1035. -// Specifically, the name will be 1-63 characters long and match the -// regular -// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first -// character will be a lowercase letter, and all following characters can be -// a dash, lowercase letter, or digit, except the last character, which -// cannot -// be a dash. -func (c *RegionRecoverableSnapshotsRecoverCall) SnapshotName(snapshotName string) *RegionRecoverableSnapshotsRecoverCall { - c.urlParams_.Set("snapshotName", snapshotName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionRecoverableSnapshotsRecoverCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsRecoverCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsRecoverCall) Context(ctx context.Context) *RegionRecoverableSnapshotsRecoverCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsRecoverCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsRecoverCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{recoverableSnapshot}/recover") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "recoverableSnapshot": c.recoverableSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.recover", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.recover" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionRecoverableSnapshotsRecoverCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.recover", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionRecoverableSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionRecoverableSnapshotsSetIamPolicyCall { - c := &RegionRecoverableSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionRecoverableSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.setIamPolicy" call. -// 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 *RegionRecoverableSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionRecoverableSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionRecoverableSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionRecoverableSnapshotsTestIamPermissionsCall { - c := &RegionRecoverableSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionRecoverableSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionRecoverableSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionRecoverableSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/recoverableSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionRecoverableSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionRecoverableSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionRecoverableSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesAddRuleCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) AddRule(project string, region string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *RegionSecurityPoliciesAddRuleCall { - c := &RegionSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesAddRuleCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesAddRuleCall { - 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 -// details. -func (c *RegionSecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesAddRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesDeleteCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to delete. -func (r *RegionSecurityPoliciesService) Delete(project string, region string, securityPolicy string) *RegionSecurityPoliciesDeleteCall { - c := &RegionSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesDeleteCall) RequestId(requestId string) *RegionSecurityPoliciesDeleteCall { - 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 -// details. -func (c *RegionSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesDeleteCall) Context(ctx context.Context) *RegionSecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesGetCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to get. -func (r *RegionSecurityPoliciesService) Get(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetCall { - c := &RegionSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesGetCall) Context(ctx context.Context) *RegionSecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *RegionSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesGetRuleCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *RegionSecurityPoliciesService) GetRule(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetRuleCall { - c := &RegionSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *RegionSecurityPoliciesGetRuleCall) Priority(priority int64) *RegionSecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesGetRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *RegionSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesInsertCall struct { - s *Service - project string - region string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSecurityPoliciesService) Insert(project string, region string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesInsertCall { - c := &RegionSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesInsertCall) RequestId(requestId string) *RegionSecurityPoliciesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesInsertCall { - 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 -// details. -func (c *RegionSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesInsertCall) Context(ctx context.Context) *RegionSecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the specified -// project -// and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSecurityPoliciesService) List(project string, region string) *RegionSecurityPoliciesListCall { - c := &RegionSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSecurityPoliciesListCall) Filter(filter string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSecurityPoliciesListCall) MaxResults(maxResults int64) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSecurityPoliciesListCall) OrderBy(orderBy string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSecurityPoliciesListCall) PageToken(pageToken string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesListCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesListCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesListCall) Context(ctx context.Context) *RegionSecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *RegionSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSecurityPoliciesPatchCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// To -// clear fields in the policy, leave the fields empty and specify them in -// the -// updateMask. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule -// instead. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) Patch(project string, region string, securityPolicy string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesPatchCall { - c := &RegionSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionSecurityPoliciesPatchCall) Paths(paths ...string) *RegionSecurityPoliciesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesPatchCall) RequestId(requestId string) *RegionSecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *RegionSecurityPoliciesPatchCall) UpdateMask(updateMask string) *RegionSecurityPoliciesPatchCall { - 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 -// details. -func (c *RegionSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesPatchCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesPatchRuleCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. To clear fields in the -// rule, -// leave the fields empty and specify them in the updateMask. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) PatchRule(project string, region string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *RegionSecurityPoliciesPatchRuleCall { - c := &RegionSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *RegionSecurityPoliciesPatchRuleCall) Priority(priority int64) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *RegionSecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *RegionSecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesPatchRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesRemoveRuleCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) RemoveRule(project string, region string, securityPolicy string) *RegionSecurityPoliciesRemoveRuleCall { - c := &RegionSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *RegionSecurityPoliciesRemoveRuleCall) Priority(priority int64) *RegionSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a security policy. To learn more about -// labels, -// read the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSecurityPoliciesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSecurityPoliciesSetLabelsCall { - c := &RegionSecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesSetLabelsCall) RequestId(requestId string) *RegionSecurityPoliciesSetLabelsCall { - 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 -// details. -func (c *RegionSecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesSetLabelsCall) Context(ctx context.Context) *RegionSecurityPoliciesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get region snapshot settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotSettingsService) Get(project string, region string) *RegionSnapshotSettingsGetCall { - c := &RegionSnapshotSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotSettingsGetCall) Fields(s ...googleapi.Field) *RegionSnapshotSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotSettingsGetCall) IfNoneMatch(entityTag string) *RegionSnapshotSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotSettingsGetCall) Context(ctx context.Context) *RegionSnapshotSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshotSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshotSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotSettings.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 *RegionSnapshotSettingsGetCall) Do(opts ...googleapi.CallOption) (*SnapshotSettings, 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 := &SnapshotSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotSettingsPatchCall struct { - s *Service - project string - region string - snapshotsettings *SnapshotSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch region snapshot settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotSettingsService) Patch(project string, region string, snapshotsettings *SnapshotSettings) *RegionSnapshotSettingsPatchCall { - c := &RegionSnapshotSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshotsettings = snapshotsettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotSettingsPatchCall) RequestId(requestId string) *RegionSnapshotSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionSnapshotSettingsPatchCall) UpdateMask(updateMask string) *RegionSnapshotSettingsPatchCall { - 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 -// details. -func (c *RegionSnapshotSettingsPatchCall) Fields(s ...googleapi.Field) *RegionSnapshotSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotSettingsPatchCall) Context(ctx context.Context) *RegionSnapshotSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshotsettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshotSettings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshotSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsDeleteCall struct { - s *Service - project string - region string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting -// a single snapshot might not necessarily delete all the data on -// that -// snapshot. If any data on the snapshot that is marked for deletion is -// needed for subsequent snapshots, the data will be moved to the -// next -// corresponding snapshot. -// -// For more information, seeDeleting -// snapshots. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - snapshot: Name of the snapshot resource to delete. -func (r *RegionSnapshotsService) Delete(project string, region string, snapshot string) *RegionSnapshotsDeleteCall { - c := &RegionSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsDeleteCall) RequestId(requestId string) *RegionSnapshotsDeleteCall { - 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 -// details. -func (c *RegionSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsDeleteCall) Context(ctx context.Context) *RegionSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsGetCall struct { - s *Service - project string - region string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - snapshot: Name of the Snapshot resource to return. -func (r *RegionSnapshotsService) Get(project string, region string, snapshot string) *RegionSnapshotsGetCall { - c := &RegionSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsGetCall) Context(ctx context.Context) *RegionSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Snapshot.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 *RegionSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionSnapshotsGetIamPolicyCall { - c := &RegionSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.getIamPolicy" call. -// 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 *RegionSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsInsertCall struct { - s *Service - project string - region string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a snapshot in the specified region using the data -// included -// in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotsService) Insert(project string, region string, snapshot *Snapshot) *RegionSnapshotsInsertCall { - c := &RegionSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsInsertCall) RequestId(requestId string) *RegionSnapshotsInsertCall { - 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 -// details. -func (c *RegionSnapshotsInsertCall) Fields(s ...googleapi.Field) *RegionSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsInsertCall) Context(ctx context.Context) *RegionSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotsService) List(project string, region string) *RegionSnapshotsListCall { - c := &RegionSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSnapshotsListCall) Filter(filter string) *RegionSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSnapshotsListCall) MaxResults(maxResults int64) *RegionSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSnapshotsListCall) OrderBy(orderBy string) *RegionSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSnapshotsListCall) PageToken(pageToken string) *RegionSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsListCall) Fields(s ...googleapi.Field) *RegionSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsListCall) IfNoneMatch(entityTag string) *RegionSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsListCall) Context(ctx context.Context) *RegionSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotList.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 *RegionSnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, 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 := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSnapshotsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionSnapshotsSetIamPolicyCall { - c := &RegionSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.setIamPolicy" call. -// 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 *RegionSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a regional snapshot. To learn more about -// labels, read -// the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSnapshotsSetLabelsCall { - c := &RegionSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsSetLabelsCall) RequestId(requestId string) *RegionSnapshotsSetLabelsCall { - 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 -// details. -func (c *RegionSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSnapshotsTestIamPermissionsCall { - c := &RegionSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsUpdateKmsKeyCall struct { - s *Service - project string - region string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateKmsKey: Rotates the customer-managed -// encryption key to the latest version for the specified snapshot. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - snapshot: Name of the snapshot resource to update. Should conform to -// RFC1035. -func (r *RegionSnapshotsService) UpdateKmsKey(project string, region string, snapshot string) *RegionSnapshotsUpdateKmsKeyCall { - c := &RegionSnapshotsUpdateKmsKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsUpdateKmsKeyCall) RequestId(requestId string) *RegionSnapshotsUpdateKmsKeyCall { - 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 -// details. -func (c *RegionSnapshotsUpdateKmsKeyCall) Fields(s ...googleapi.Field) *RegionSnapshotsUpdateKmsKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsUpdateKmsKeyCall) Context(ctx context.Context) *RegionSnapshotsUpdateKmsKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsUpdateKmsKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsUpdateKmsKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{snapshot}/updateKmsKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.updateKmsKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.updateKmsKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsUpdateKmsKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.updateKmsKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesDeleteCall struct { - s *Service - project string - region string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource in the region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslCertificate: Name of the SslCertificate resource to delete. -func (r *RegionSslCertificatesService) Delete(project string, region string, sslCertificate string) *RegionSslCertificatesDeleteCall { - c := &RegionSslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslCertificate = sslCertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslCertificatesDeleteCall) RequestId(requestId string) *RegionSslCertificatesDeleteCall { - 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 -// details. -func (c *RegionSslCertificatesDeleteCall) Fields(s ...googleapi.Field) *RegionSslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesDeleteCall) Context(ctx context.Context) *RegionSslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslCertificatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesGetCall struct { - s *Service - project string - region string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource in the specified region. -// Get -// a list of available SSL certificates by making a list() -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslCertificate: Name of the SslCertificate resource to return. -func (r *RegionSslCertificatesService) Get(project string, region string, sslCertificate string) *RegionSslCertificatesGetCall { - c := &RegionSslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesGetCall) Fields(s ...googleapi.Field) *RegionSslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslCertificatesGetCall) IfNoneMatch(entityTag string) *RegionSslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesGetCall) Context(ctx context.Context) *RegionSslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificate.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 *RegionSslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, 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 := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesInsertCall struct { - s *Service - project string - region string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project and -// region using -// the data included in the request -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslCertificatesService) Insert(project string, region string, sslcertificate *SslCertificate) *RegionSslCertificatesInsertCall { - c := &RegionSslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslcertificate = sslcertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslCertificatesInsertCall) RequestId(requestId string) *RegionSslCertificatesInsertCall { - 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 -// details. -func (c *RegionSslCertificatesInsertCall) Fields(s ...googleapi.Field) *RegionSslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesInsertCall) Context(ctx context.Context) *RegionSslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertificate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslCertificatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified -// project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslCertificatesService) List(project string, region string) *RegionSslCertificatesListCall { - c := &RegionSslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslCertificatesListCall) Filter(filter string) *RegionSslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslCertificatesListCall) MaxResults(maxResults int64) *RegionSslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslCertificatesListCall) OrderBy(orderBy string) *RegionSslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslCertificatesListCall) PageToken(pageToken string) *RegionSslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslCertificatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslCertificatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesListCall) Fields(s ...googleapi.Field) *RegionSslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslCertificatesListCall) IfNoneMatch(entityTag string) *RegionSslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesListCall) Context(ctx context.Context) *RegionSslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateList.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 *RegionSslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, 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 := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSslCertificatesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource and region. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSslCertificatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSslCertificatesTestIamPermissionsCall { - c := &RegionSslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *RegionSslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesDeleteCall struct { - s *Service - project string - region string - sslPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SSL policy. The SSL policy resource can be -// deleted -// only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy -// resources. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to delete. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Delete(project string, region string, sslPolicy string) *RegionSslPoliciesDeleteCall { - c := &RegionSslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesDeleteCall) RequestId(requestId string) *RegionSslPoliciesDeleteCall { - 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 -// details. -func (c *RegionSslPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSslPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesDeleteCall) Context(ctx context.Context) *RegionSslPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesGetCall struct { - s *Service - project string - region string - sslPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Lists all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Get(project string, region string, sslPolicy string) *RegionSslPoliciesGetCall { - c := &RegionSslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSslPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSslPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesGetCall) Context(ctx context.Context) *RegionSslPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPolicy.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 *RegionSslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, 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 := &SslPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesInsertCall struct { - s *Service - project string - region string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project and region using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) Insert(project string, region string, sslpolicy *SslPolicy) *RegionSslPoliciesInsertCall { - c := &RegionSslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesInsertCall) RequestId(requestId string) *RegionSslPoliciesInsertCall { - 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 -// details. -func (c *RegionSslPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSslPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesInsertCall) Context(ctx context.Context) *RegionSslPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the SSL policies that have been configured for the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) List(project string, region string) *RegionSslPoliciesListCall { - c := &RegionSslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslPoliciesListCall) Filter(filter string) *RegionSslPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslPoliciesListCall) MaxResults(maxResults int64) *RegionSslPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslPoliciesListCall) OrderBy(orderBy string) *RegionSslPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslPoliciesListCall) PageToken(pageToken string) *RegionSslPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesListCall) Fields(s ...googleapi.Field) *RegionSslPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesListCall) IfNoneMatch(entityTag string) *RegionSslPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesListCall) Context(ctx context.Context) *RegionSslPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesList.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 *RegionSslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList, 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 := &SslPoliciesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSslPoliciesListCall) Pages(ctx context.Context, f func(*SslPoliciesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSslPoliciesListAvailableFeaturesCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAvailableFeatures: Lists all features that can be specified in the SSL -// policy when using -// custom profile. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) ListAvailableFeatures(project string, region string) *RegionSslPoliciesListAvailableFeaturesCall { - c := &RegionSslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Filter(filter string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslPoliciesListAvailableFeaturesCall) MaxResults(maxResults int64) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslPoliciesListAvailableFeaturesCall) OrderBy(orderBy string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslPoliciesListAvailableFeaturesCall) PageToken(pageToken string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslPoliciesListAvailableFeaturesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Fields(s ...googleapi.Field) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesListAvailableFeaturesCall) IfNoneMatch(entityTag string) *RegionSslPoliciesListAvailableFeaturesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Context(ctx context.Context) *RegionSslPoliciesListAvailableFeaturesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.listAvailableFeatures", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.listAvailableFeatures" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesListAvailableFeaturesResponse.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 *RegionSslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) (*SslPoliciesListAvailableFeaturesResponse, 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 := &SslPoliciesListAvailableFeaturesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.listAvailableFeatures", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesPatchCall struct { - s *Service - project string - region string - sslPolicy string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified SSL policy with the data included in the -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Patch(project string, region string, sslPolicy string, sslpolicy *SslPolicy) *RegionSslPoliciesPatchCall { - c := &RegionSslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesPatchCall) RequestId(requestId string) *RegionSslPoliciesPatchCall { - 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 -// details. -func (c *RegionSslPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSslPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesPatchCall) Context(ctx context.Context) *RegionSslPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - 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{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSslPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSslPoliciesTestIamPermissionsCall { - c := &RegionSslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSslPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionSslPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesDeleteCall struct { - s *Service - project string - region string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to delete. -func (r *RegionTargetHttpProxiesService) Delete(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesDeleteCall { - c := &RegionTargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesGetCall struct { - s *Service - project string - region string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to return. -func (r *RegionTargetHttpProxiesService) Get(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesGetCall { - c := &RegionTargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxy.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 *RegionTargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, 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 := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesInsertCall struct { - s *Service - project string - region string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpProxiesService) Insert(project string, region string, targethttpproxy *TargetHttpProxy) *RegionTargetHttpProxiesInsertCall { - c := &RegionTargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpProxiesInsertCall { - 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 -// details. -func (c *RegionTargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available -// to the specified project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpProxiesService) List(project string, region string) *RegionTargetHttpProxiesListCall { - c := &RegionTargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetHttpProxiesListCall) Filter(filter string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetHttpProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetHttpProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetHttpProxiesListCall) PageToken(pageToken string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetHttpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesListCall) Context(ctx context.Context) *RegionTargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.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 *RegionTargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, 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 := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - region string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy to set a URL map for. -func (r *RegionTargetHttpProxiesService) SetUrlMap(project string, region string, targetHttpProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpProxiesSetUrlMapCall { - c := &RegionTargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpProxiesSetUrlMapCall { - 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 -// details. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - 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{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetHttpProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpProxiesTestIamPermissionsCall { - c := &RegionTargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesDeleteCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to delete. -func (r *RegionTargetHttpsProxiesService) Delete(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesDeleteCall { - c := &RegionTargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpsProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesGetCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource in the specified -// region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to return. -func (r *RegionTargetHttpsProxiesService) Get(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesGetCall { - c := &RegionTargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.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 *RegionTargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, 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 := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesInsertCall struct { - s *Service - project string - region string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpsProxiesService) Insert(project string, region string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesInsertCall { - c := &RegionTargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpsProxiesInsertCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources available -// to the specified project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpsProxiesService) List(project string, region string) *RegionTargetHttpsProxiesListCall { - c := &RegionTargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetHttpsProxiesListCall) Filter(filter string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetHttpsProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetHttpsProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetHttpsProxiesListCall) PageToken(pageToken string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetHttpsProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesListCall) Context(ctx context.Context) *RegionTargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.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 *RegionTargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, 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 := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetHttpsProxiesPatchCall struct { - s *Service - project string - region string - targetHttpsProxy string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified regional TargetHttpsProxy resource with the -// data -// included in the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to patch. -func (r *RegionTargetHttpsProxiesService) Patch(project string, region string, targetHttpsProxy string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesPatchCall { - c := &RegionTargetHttpsProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesPatchCall) RequestId(requestId string) *RegionTargetHttpsProxiesPatchCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesPatchCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesPatchCall) Context(ctx context.Context) *RegionTargetHttpsProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - region string - targetHttpsProxy string - regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set -// an -// -// SslCertificates resource for. -func (r *RegionTargetHttpsProxiesService) SetSslCertificates(project string, region string, targetHttpsProxy string, regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c := &RegionTargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.regiontargethttpsproxiessetsslcertificatesrequest = regiontargethttpsproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetSslCertificatesCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiontargethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy to set a URL map for. -func (r *RegionTargetHttpsProxiesService) SetUrlMap(project string, region string, targetHttpsProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpsProxiesSetUrlMapCall { - c := &RegionTargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetUrlMapCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetHttpsProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c := &RegionTargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesDeleteCall struct { - s *Service - project string - region string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to delete. -func (r *RegionTargetTcpProxiesService) Delete(project string, region string, targetTcpProxy string) *RegionTargetTcpProxiesDeleteCall { - c := &RegionTargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetTcpProxy = targetTcpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetTcpProxiesDeleteCall) RequestId(requestId string) *RegionTargetTcpProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesDeleteCall) Context(ctx context.Context) *RegionTargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetTcpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesGetCall struct { - s *Service - project string - region string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to return. -func (r *RegionTargetTcpProxiesService) Get(project string, region string, targetTcpProxy string) *RegionTargetTcpProxiesGetCall { - c := &RegionTargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesGetCall) Context(ctx context.Context) *RegionTargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxy.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 *RegionTargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, 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 := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesInsertCall struct { - s *Service - project string - region string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project and -// region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetTcpProxiesService) Insert(project string, region string, targettcpproxy *TargetTcpProxy) *RegionTargetTcpProxiesInsertCall { - c := &RegionTargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targettcpproxy = targettcpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetTcpProxiesInsertCall) RequestId(requestId string) *RegionTargetTcpProxiesInsertCall { - 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 -// details. -func (c *RegionTargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesInsertCall) Context(ctx context.Context) *RegionTargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetTcpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetTcpProxy resources -// available to the specified project in a given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetTcpProxiesService) List(project string, region string) *RegionTargetTcpProxiesListCall { - c := &RegionTargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetTcpProxiesListCall) Filter(filter string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetTcpProxiesListCall) MaxResults(maxResults int64) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetTcpProxiesListCall) OrderBy(orderBy string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetTcpProxiesListCall) PageToken(pageToken string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetTcpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetTcpProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesListCall) Context(ctx context.Context) *RegionTargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.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 *RegionTargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, 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 := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetTcpProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetTcpProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetTcpProxiesTestIamPermissionsCall { - c := &RegionTargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetTcpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsDeleteCall struct { - s *Service - project string - region string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to delete. -func (r *RegionUrlMapsService) Delete(project string, region string, urlMap string) *RegionUrlMapsDeleteCall { - c := &RegionUrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsDeleteCall) RequestId(requestId string) *RegionUrlMapsDeleteCall { - 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 -// details. -func (c *RegionUrlMapsDeleteCall) Fields(s ...googleapi.Field) *RegionUrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsDeleteCall) Context(ctx context.Context) *RegionUrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsGetCall struct { - s *Service - project string - region string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to return. -func (r *RegionUrlMapsService) Get(project string, region string, urlMap string) *RegionUrlMapsGetCall { - c := &RegionUrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsGetCall) Fields(s ...googleapi.Field) *RegionUrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionUrlMapsGetCall) IfNoneMatch(entityTag string) *RegionUrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsGetCall) Context(ctx context.Context) *RegionUrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMap.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 *RegionUrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, 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 := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsInsertCall struct { - s *Service - project string - region string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionUrlMapsService) Insert(project string, region string, urlmap *UrlMap) *RegionUrlMapsInsertCall { - c := &RegionUrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsInsertCall) RequestId(requestId string) *RegionUrlMapsInsertCall { - 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 -// details. -func (c *RegionUrlMapsInsertCall) Fields(s ...googleapi.Field) *RegionUrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsInsertCall) Context(ctx context.Context) *RegionUrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsInvalidateCacheCall struct { - s *Service - project string - region string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, invalidating the -// specified path, -// scoped to the specified UrlMap. -// -// For more information, see Invalidating cached -// content (/cdn/docs/invalidating-cached-content). -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap scoping this request. -func (r *RegionUrlMapsService) InvalidateCache(project string, region string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *RegionUrlMapsInvalidateCacheCall { - c := &RegionUrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsInvalidateCacheCall) RequestId(requestId string) *RegionUrlMapsInvalidateCacheCall { - 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 -// details. -func (c *RegionUrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *RegionUrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsInvalidateCacheCall) Context(ctx context.Context) *RegionUrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.invalidateCache", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.invalidateCache" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsInvalidateCacheCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.invalidateCache", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified -// project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionUrlMapsService) List(project string, region string) *RegionUrlMapsListCall { - c := &RegionUrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionUrlMapsListCall) Filter(filter string) *RegionUrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionUrlMapsListCall) MaxResults(maxResults int64) *RegionUrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionUrlMapsListCall) OrderBy(orderBy string) *RegionUrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionUrlMapsListCall) PageToken(pageToken string) *RegionUrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionUrlMapsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionUrlMapsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsListCall) Fields(s ...googleapi.Field) *RegionUrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionUrlMapsListCall) IfNoneMatch(entityTag string) *RegionUrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsListCall) Context(ctx context.Context) *RegionUrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapList.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 *RegionUrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, 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 := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionUrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionUrlMapsPatchCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to patch. -func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { - c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatchCall { - 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 -// details. -func (c *RegionUrlMapsPatchCall) Fields(s ...googleapi.Field) *RegionUrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsPatchCall) Context(ctx context.Context) *RegionUrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionUrlMapsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionUrlMapsTestIamPermissionsCall { - c := &RegionUrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionUrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsTestIamPermissionsCall) Context(ctx context.Context) *RegionUrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsUpdateCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included in -// the -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { - c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { - 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 -// details. -func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsValidateCall struct { - s *Service - project string - region string - urlMap string - regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the -// provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { - c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionurlmapsvalidaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.validate" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.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 *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, 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 := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionZonesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources under the specific region -// available to -// the specified project. -// -// - project: Project ID for this request. -// - region: Region for this request. -func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { - c := &RegionZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/zones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionZones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionZones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ZoneList.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 *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, 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 := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionZones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Region resource. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information (the `quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. -// -// - project: Project ID for this request. -// - region: Name of the region resource to return. -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Region.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 *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, 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 := &Region{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of region resources available to the specified -// project. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information -// (the `items.quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. -// -// - project: Project ID for this request. -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionList.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 *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, 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 := &RegionList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReliabilityRisksGetCall struct { - s *Service - project string - reliabilityRisk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ReliabilityRisk resource. -// -// - project: Project ID for this request. -// - reliabilityRisk: Name of the ReliabilityRisk resource to return. -func (r *ReliabilityRisksService) Get(project string, reliabilityRisk string) *ReliabilityRisksGetCall { - c := &ReliabilityRisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.reliabilityRisk = reliabilityRisk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReliabilityRisksGetCall) Fields(s ...googleapi.Field) *ReliabilityRisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReliabilityRisksGetCall) IfNoneMatch(entityTag string) *ReliabilityRisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReliabilityRisksGetCall) Context(ctx context.Context) *ReliabilityRisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReliabilityRisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReliabilityRisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/reliabilityRisks/{reliabilityRisk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "reliabilityRisk": c.reliabilityRisk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reliabilityRisks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reliabilityRisks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReliabilityRisk.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 *ReliabilityRisksGetCall) Do(opts ...googleapi.CallOption) (*ReliabilityRisk, 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 := &ReliabilityRisk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reliabilityRisks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReliabilityRisksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of reliabilityRisks available in the specified -// project. -// -// - project: Project ID for this request. -func (r *ReliabilityRisksService) List(project string) *ReliabilityRisksListCall { - c := &ReliabilityRisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReliabilityRisksListCall) Filter(filter string) *ReliabilityRisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReliabilityRisksListCall) MaxResults(maxResults int64) *ReliabilityRisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReliabilityRisksListCall) OrderBy(orderBy string) *ReliabilityRisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReliabilityRisksListCall) PageToken(pageToken string) *ReliabilityRisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReliabilityRisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReliabilityRisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReliabilityRisksListCall) Fields(s ...googleapi.Field) *ReliabilityRisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReliabilityRisksListCall) IfNoneMatch(entityTag string) *ReliabilityRisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReliabilityRisksListCall) Context(ctx context.Context) *ReliabilityRisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReliabilityRisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReliabilityRisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/reliabilityRisks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reliabilityRisks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reliabilityRisks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReliabilityRisksListResponse.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 *ReliabilityRisksListCall) Do(opts ...googleapi.CallOption) (*ReliabilityRisksListResponse, 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 := &ReliabilityRisksListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reliabilityRisks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReliabilityRisksListCall) Pages(ctx context.Context, f func(*ReliabilityRisksListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationBlocksGetCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation block. -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) Get(project string, zone string, reservation string, reservationBlock string) *ReservationBlocksGetCall { - c := &ReservationBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock - return c -} - -// View sets the optional parameter "view": View of the Block. -// -// Possible values: -// -// "BASIC" - This view includes basic information about the reservation block -// "BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will default -// -// to the BASIC view. -// -// "FULL" - Includes detailed topology view. -func (c *ReservationBlocksGetCall) View(view string) *ReservationBlocksGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBlocksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationBlocksGetCall) IfNoneMatch(entityTag string) *ReservationBlocksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksGetCall) Context(ctx context.Context) *ReservationBlocksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksGetResponse.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 *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksGetResponse, 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 := &ReservationBlocksGetResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksListCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of reservation blocks under a single reservation. -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) List(project string, zone string, reservation string) *ReservationBlocksListCall { - c := &ReservationBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlocksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBlocksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationBlocksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlocksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationBlocksListCall) IfNoneMatch(entityTag string) *ReservationBlocksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksListCall) Context(ctx context.Context) *ReservationBlocksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksListResponse.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 *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksListResponse, 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 := &ReservationBlocksListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationBlocksListCall) Pages(ctx context.Context, f func(*ReservationBlocksListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Allows customers to perform maintenance on a reservation -// block -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) PerformMaintenance(project string, zone string, reservation string, reservationBlock string, reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest) *ReservationBlocksPerformMaintenanceCall { - c := &ReservationBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock - c.reservationsblocksperformmaintenancerequest = reservationsblocksperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationBlocksPerformMaintenanceCall { - 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 -// details. -func (c *ReservationBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationBlocksPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationBlocksPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsblocksperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationBlocksPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksGetCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation subBlock. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) Get(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksGetCall { - c := &ReservationSubBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - return c -} - -// View sets the optional parameter "view": View of the subBlock. -// -// Possible values: -// -// "SUB_BLOCK_VIEW_BASIC" - This view includes basic information about the -// -// reservation sub block -// -// "SUB_BLOCK_VIEW_FULL" - Includes detailed topology view. -// "SUB_BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *ReservationSubBlocksGetCall) View(view string) *ReservationSubBlocksGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksGetCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationSubBlocksGetCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksGetCall) Context(ctx context.Context) *ReservationSubBlocksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksGetResponse.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 *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksGetResponse, 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 := &ReservationSubBlocksGetResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksListCall struct { - s *Service - project string - zone string - parentName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of reservation subBlocks under a single reservation. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) List(project string, zone string, parentName string) *ReservationSubBlocksListCall { - c := &ReservationSubBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationSubBlocksListCall) Filter(filter string) *ReservationSubBlocksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationSubBlocksListCall) MaxResults(maxResults int64) *ReservationSubBlocksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationSubBlocksListCall) OrderBy(orderBy string) *ReservationSubBlocksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationSubBlocksListCall) PageToken(pageToken string) *ReservationSubBlocksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationSubBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationSubBlocksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksListCall) Fields(s ...googleapi.Field) *ReservationSubBlocksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationSubBlocksListCall) IfNoneMatch(entityTag string) *ReservationSubBlocksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksListCall) Context(ctx context.Context) *ReservationSubBlocksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksListResponse.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 *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksListResponse, 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 := &ReservationSubBlocksListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationSubBlocksListCall) Pages(ctx context.Context, f func(*ReservationSubBlocksListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationSubBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Allows customers to perform maintenance on a reservation -// subBlock -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) PerformMaintenance(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksPerformMaintenanceCall { - c := &ReservationSubBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationSubBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationSubBlocksPerformMaintenanceCall { - 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 -// details. -func (c *ReservationSubBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationSubBlocksPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationSubBlocksPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksReportFaultyCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ReportFaulty: Allows customers to report a faulty subBlock. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) ReportFaulty(project string, zone string, parentName string, reservationSubBlock string, reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest) *ReservationSubBlocksReportFaultyCall { - c := &ReservationSubBlocksReportFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - c.reservationsubblocksreportfaultyrequest = reservationsubblocksreportfaultyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationSubBlocksReportFaultyCall) RequestId(requestId string) *ReservationSubBlocksReportFaultyCall { - 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 -// details. -func (c *ReservationSubBlocksReportFaultyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksReportFaultyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksReportFaultyCall) Context(ctx context.Context) *ReservationSubBlocksReportFaultyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksReportFaultyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksReportFaultyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsubblocksreportfaultyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty") - 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{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.reportFaulty" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksReportFaultyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of reservations. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { - c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ReservationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ReservationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/reservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationAggregatedList.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 *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, 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 := &ReservationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationsDeleteCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to delete. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { - c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { - 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 -// details. -func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsGetCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to retrieve. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { - c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Reservation.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 *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, 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 := &Reservation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { - c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.getIamPolicy" call. -// 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 *ReservationsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsInsertCall struct { - s *Service - project string - zone string - reservation *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new reservation. For more information, readReserving -// zonal -// resources. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { - c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { - 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 -// details. -func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list of all the reservations that have been configured for -// the -// specified project in specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { - c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationList.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 *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, 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 := &ReservationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationsPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform maintenance on an extended reservation -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationsService) PerformMaintenance(project string, zone string, reservation string, reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest) *ReservationsPerformMaintenanceCall { - c := &ReservationsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsperformmaintenancerequest = reservationsperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsPerformMaintenanceCall) RequestId(requestId string) *ReservationsPerformMaintenanceCall { - 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 -// details. -func (c *ReservationsPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationsPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsPerformMaintenanceCall) Context(ctx context.Context) *ReservationsPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsResizeCall struct { - s *Service - project string - zone string - reservation string - reservationsresizerequest *ReservationsResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the reservation (applicable to standalone reservations -// only). For -// more information, readModifying -// reservations. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { - c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsresizerequest = reservationsresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { - 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 -// details. -func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/resize") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { - c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.setIamPolicy" call. -// 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 *ReservationsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { - c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsUpdateCall struct { - s *Service - project string - zone string - reservation string - reservation2 *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update share settings of the reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Update(project string, zone string, reservation string, reservation2 *Reservation) *ReservationsUpdateCall { - c := &ReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservation2 = reservation2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *ReservationsUpdateCall) Paths(paths ...string) *ReservationsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsUpdateCall) RequestId(requestId string) *ReservationsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Update_mask indicates -// fields to be updated as part of this request. -func (c *ReservationsUpdateCall) UpdateMask(updateMask string) *ReservationsUpdateCall { - 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 -// details. -func (c *ReservationsUpdateCall) Fields(s ...googleapi.Field) *ReservationsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsUpdateCall) Context(ctx context.Context) *ReservationsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of resource policies. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { - c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ResourcePoliciesAggregatedListCall) Filter(filter string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ResourcePoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ResourcePoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ResourcePoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesAggregatedListCall) IfNoneMatch(entityTag string) *ResourcePoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesAggregatedListCall) Context(ctx context.Context) *ResourcePoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/resourcePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyAggregatedList.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 *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyAggregatedList, 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 := &ResourcePolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(*ResourcePolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ResourcePoliciesDeleteCall struct { - s *Service - project string - region string - resourcePolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to delete. -func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { - c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesDeleteCall) RequestId(requestId string) *ResourcePoliciesDeleteCall { - 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 -// details. -func (c *ResourcePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResourcePoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesDeleteCall) Context(ctx context.Context) *ResourcePoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesGetCall struct { - s *Service - project string - region string - resourcePolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves all information of the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to retrieve. -func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { - c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesGetCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesGetCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetCall) Context(ctx context.Context) *ResourcePoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicy.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 *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePolicy, 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 := &ResourcePolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { - c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.getIamPolicy" call. -// 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 *ResourcePoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesInsertCall struct { - s *Service - project string - region string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { - c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcepolicy = resourcepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePoliciesInsertCall { - 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 -// details. -func (c *ResourcePoliciesInsertCall) Fields(s ...googleapi.Field) *ResourcePoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesInsertCall) Context(ctx context.Context) *ResourcePoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list all the resource policies that have been configured for -// the -// specified project in specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { - c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ResourcePoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesListCall) IfNoneMatch(entityTag string) *ResourcePoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesListCall) Context(ctx context.Context) *ResourcePoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyList.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 *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, 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 := &ResourcePolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ResourcePoliciesPatchCall struct { - s *Service - project string - region string - resourcePolicy string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Modify the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Id of the resource policy to patch. -func (r *ResourcePoliciesService) Patch(project string, region string, resourcePolicy string, resourcepolicy *ResourcePolicy) *ResourcePoliciesPatchCall { - c := &ResourcePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - c.resourcepolicy = resourcepolicy - return c -} - -// Paths sets the optional parameter "paths": -func (c *ResourcePoliciesPatchCall) Paths(paths ...string) *ResourcePoliciesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesPatchCall) RequestId(requestId string) *ResourcePoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *ResourcePoliciesPatchCall) UpdateMask(updateMask string) *ResourcePoliciesPatchCall { - 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 -// details. -func (c *ResourcePoliciesPatchCall) Fields(s ...googleapi.Field) *ResourcePoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesPatchCall) Context(ctx context.Context) *ResourcePoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - 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{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { - c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.setIamPolicy" call. -// 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 *ResourcePoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { - c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ResourcePoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesTestIamPermissionsCall) Context(ctx context.Context) *ResourcePoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansDeleteCall struct { - s *Service - project string - rolloutPlan string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a RolloutPlan. -// -// - project: Project ID for this request. -// - rolloutPlan: Name of the RolloutPlan resource to delete. -func (r *RolloutPlansService) Delete(project string, rolloutPlan string) *RolloutPlansDeleteCall { - c := &RolloutPlansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutPlan = rolloutPlan - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutPlansDeleteCall) RequestId(requestId string) *RolloutPlansDeleteCall { - 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 -// details. -func (c *RolloutPlansDeleteCall) Fields(s ...googleapi.Field) *RolloutPlansDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansDeleteCall) Context(ctx context.Context) *RolloutPlansDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rolloutPlan": c.rolloutPlan, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutPlansDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansGetCall struct { - s *Service - project string - rolloutPlan string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single project-scoped RolloutPlan. -// -// - project: Project ID for this request. -// - rolloutPlan: Name of the persistent rollout plan to return. -func (r *RolloutPlansService) Get(project string, rolloutPlan string) *RolloutPlansGetCall { - c := &RolloutPlansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutPlan = rolloutPlan - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutPlansGetCall) Fields(s ...googleapi.Field) *RolloutPlansGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutPlansGetCall) IfNoneMatch(entityTag string) *RolloutPlansGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansGetCall) Context(ctx context.Context) *RolloutPlansGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rolloutPlan": c.rolloutPlan, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutPlan.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 *RolloutPlansGetCall) Do(opts ...googleapi.CallOption) (*RolloutPlan, 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 := &RolloutPlan{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansInsertCall struct { - s *Service - project string - rolloutplan *RolloutPlan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new RolloutPlan in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutPlansService) Insert(project string, rolloutplan *RolloutPlan) *RolloutPlansInsertCall { - c := &RolloutPlansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutplan = rolloutplan - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutPlansInsertCall) RequestId(requestId string) *RolloutPlansInsertCall { - 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 -// details. -func (c *RolloutPlansInsertCall) Fields(s ...googleapi.Field) *RolloutPlansInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansInsertCall) Context(ctx context.Context) *RolloutPlansInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutplan) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutPlansInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RolloutPlans in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutPlansService) List(project string) *RolloutPlansListCall { - c := &RolloutPlansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RolloutPlansListCall) Filter(filter string) *RolloutPlansListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RolloutPlansListCall) MaxResults(maxResults int64) *RolloutPlansListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RolloutPlansListCall) OrderBy(orderBy string) *RolloutPlansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RolloutPlansListCall) PageToken(pageToken string) *RolloutPlansListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RolloutPlansListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutPlansListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutPlansListCall) Fields(s ...googleapi.Field) *RolloutPlansListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutPlansListCall) IfNoneMatch(entityTag string) *RolloutPlansListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansListCall) Context(ctx context.Context) *RolloutPlansListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutPlansListResponse.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 *RolloutPlansListCall) Do(opts ...googleapi.CallOption) (*RolloutPlansListResponse, 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 := &RolloutPlansListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RolloutPlansListCall) Pages(ctx context.Context, f func(*RolloutPlansListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RolloutsCancelCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the Rollout resource to cancel. -func (r *RolloutsService) Cancel(project string, rollout string) *RolloutsCancelCall { - c := &RolloutsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutsCancelCall) RequestId(requestId string) *RolloutsCancelCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Rollback sets the optional parameter "rollback": If true, then the ongoing -// rollout must be rolled back. Else, just cancel -// the rollout without taking any further actions. Note that products -// must -// support at least one of these options, however, it does not need to -// support -// both. -func (c *RolloutsCancelCall) Rollback(rollback bool) *RolloutsCancelCall { - c.urlParams_.Set("rollback", fmt.Sprint(rollback)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsCancelCall) Fields(s ...googleapi.Field) *RolloutsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsCancelCall) Context(ctx context.Context) *RolloutsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsDeleteCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the Rollout resource to delete. -func (r *RolloutsService) Delete(project string, rollout string) *RolloutsDeleteCall { - c := &RolloutsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutsDeleteCall) RequestId(requestId string) *RolloutsDeleteCall { - 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 -// details. -func (c *RolloutsDeleteCall) Fields(s ...googleapi.Field) *RolloutsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsDeleteCall) Context(ctx context.Context) *RolloutsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsGetCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single project-scoped Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the persistent rollout to return. -func (r *RolloutsService) Get(project string, rollout string) *RolloutsGetCall { - c := &RolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsGetCall) Fields(s ...googleapi.Field) *RolloutsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutsGetCall) IfNoneMatch(entityTag string) *RolloutsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsGetCall) Context(ctx context.Context) *RolloutsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Rollout.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 *RolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, 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 := &Rollout{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Rollouts in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutsService) List(project string) *RolloutsListCall { - c := &RolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RolloutsListCall) Filter(filter string) *RolloutsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RolloutsListCall) MaxResults(maxResults int64) *RolloutsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RolloutsListCall) OrderBy(orderBy string) *RolloutsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RolloutsListCall) PageToken(pageToken string) *RolloutsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RolloutsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsListCall) Fields(s ...googleapi.Field) *RolloutsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutsListCall) IfNoneMatch(entityTag string) *RolloutsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsListCall) Context(ctx context.Context) *RolloutsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutsListResponse.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 *RolloutsListCall) Do(opts ...googleapi.CallOption) (*RolloutsListResponse, 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 := &RolloutsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RolloutsListCall) Pages(ctx context.Context, f func(*RolloutsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of routers. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { - c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RoutersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RoutersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RoutersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RoutersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/routers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterAggregatedList.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 *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, 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 := &RouterAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersDeleteCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Router resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to delete. -func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { - c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall { - 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 -// details. -func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersDeleteNamedSetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteNamedSet: Deletes Named Set -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Named Set is defined. -func (r *RoutersService) DeleteNamedSet(project string, region string, router string) *RoutersDeleteNamedSetCall { - c := &RoutersDeleteNamedSetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// NamedSet sets the optional parameter "namedSet": The Named Set name for this -// request. Name must conform to RFC1035 -func (c *RoutersDeleteNamedSetCall) NamedSet(namedSet string) *RoutersDeleteNamedSetCall { - c.urlParams_.Set("namedSet", namedSet) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersDeleteNamedSetCall) RequestId(requestId string) *RoutersDeleteNamedSetCall { - 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 -// details. -func (c *RoutersDeleteNamedSetCall) Fields(s ...googleapi.Field) *RoutersDeleteNamedSetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersDeleteNamedSetCall) Context(ctx context.Context) *RoutersDeleteNamedSetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersDeleteNamedSetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteNamedSetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/deleteNamedSet") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.deleteNamedSet", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.deleteNamedSet" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersDeleteNamedSetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.deleteNamedSet", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersDeleteRoutePolicyCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteRoutePolicy: Deletes Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) DeleteRoutePolicy(project string, region string, router string) *RoutersDeleteRoutePolicyCall { - c := &RoutersDeleteRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Policy sets the optional parameter "policy": The Policy name for this -// request. Name must conform to RFC1035 -func (c *RoutersDeleteRoutePolicyCall) Policy(policy string) *RoutersDeleteRoutePolicyCall { - c.urlParams_.Set("policy", policy) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersDeleteRoutePolicyCall) RequestId(requestId string) *RoutersDeleteRoutePolicyCall { - 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 -// details. -func (c *RoutersDeleteRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersDeleteRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersDeleteRoutePolicyCall) Context(ctx context.Context) *RoutersDeleteRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersDeleteRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.deleteRoutePolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.deleteRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersDeleteRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.deleteRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Router resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to return. -func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { - c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Router.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 *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, 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 := &Router{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetNamedSetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNamedSet: Returns specified Named Set -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for the named set. The name -// should -// -// conform to RFC1035. -func (r *RoutersService) GetNamedSet(project string, region string, router string) *RoutersGetNamedSetCall { - c := &RoutersGetNamedSetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// NamedSet sets the optional parameter "namedSet": The Named Set name for this -// request. Name must conform to RFC1035 -func (c *RoutersGetNamedSetCall) NamedSet(namedSet string) *RoutersGetNamedSetCall { - c.urlParams_.Set("namedSet", namedSet) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetNamedSetCall) Fields(s ...googleapi.Field) *RoutersGetNamedSetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetNamedSetCall) IfNoneMatch(entityTag string) *RoutersGetNamedSetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetNamedSetCall) Context(ctx context.Context) *RoutersGetNamedSetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetNamedSetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNamedSetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNamedSet") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getNamedSet", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNamedSet" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersGetNamedSetResponse.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 *RoutersGetNamedSetCall) Do(opts ...googleapi.CallOption) (*RoutersGetNamedSetResponse, 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 := &RoutersGetNamedSetResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getNamedSet", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetNatIpInfoCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNatIpInfo: Retrieves runtime NAT IP information. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for Nat IP information. The -// name -// -// should conform to RFC1035. -func (r *RoutersService) GetNatIpInfo(project string, region string, router string) *RoutersGetNatIpInfoCall { - c := &RoutersGetNatIpInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// NatName sets the optional parameter "natName": Name of the nat service to -// filter the NAT IP information. -// If it is omitted, all nats for this router will be returned. -// Name should conform to RFC1035. -func (c *RoutersGetNatIpInfoCall) NatName(natName string) *RoutersGetNatIpInfoCall { - c.urlParams_.Set("natName", natName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetNatIpInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatIpInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetNatIpInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatIpInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetNatIpInfoCall) Context(ctx context.Context) *RoutersGetNatIpInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetNatIpInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNatIpInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getNatIpInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNatIpInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *NatIpInfoResponse.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 *RoutersGetNatIpInfoCall) Do(opts ...googleapi.CallOption) (*NatIpInfoResponse, 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 := &NatIpInfoResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getNatIpInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetNatMappingInfoCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for Nat Mapping information -// of -// -// VM endpoints. -func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { - c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersGetNatMappingInfoCall) Filter(filter string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersGetNatMappingInfoCall) MaxResults(maxResults int64) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// NatName sets the optional parameter "natName": Name of the nat service to -// filter the Nat Mapping information. -// If it is omitted, all nats for this router will be returned. -// Name should conform to RFC1035. -func (c *RoutersGetNatMappingInfoCall) NatName(natName string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("natName", natName) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersGetNatMappingInfoCall) OrderBy(orderBy string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersGetNatMappingInfoCall) PageToken(pageToken string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersGetNatMappingInfoCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetNatMappingInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetNatMappingInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatMappingInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetNatMappingInfoCall) Context(ctx context.Context) *RoutersGetNatMappingInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetNatMappingInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getNatMappingInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNatMappingInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmEndpointNatMappingsList.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 *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndpointNatMappingsList, 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 := &VmEndpointNatMappingsList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getNatMappingInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersGetNatMappingInfoCall) Pages(ctx context.Context, f func(*VmEndpointNatMappingsList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersGetRoutePolicyCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRoutePolicy: Returns specified Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for the route policy. The -// name should -// -// conform to RFC1035. -func (r *RoutersService) GetRoutePolicy(project string, region string, router string) *RoutersGetRoutePolicyCall { - c := &RoutersGetRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Policy sets the optional parameter "policy": The Policy name for this -// request. Name must conform to RFC1035 -func (c *RoutersGetRoutePolicyCall) Policy(policy string) *RoutersGetRoutePolicyCall { - c.urlParams_.Set("policy", policy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersGetRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetRoutePolicyCall) IfNoneMatch(entityTag string) *RoutersGetRoutePolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetRoutePolicyCall) Context(ctx context.Context) *RoutersGetRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getRoutePolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersGetRoutePolicyResponse.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 *RoutersGetRoutePolicyCall) Do(opts ...googleapi.CallOption) (*RoutersGetRoutePolicyResponse, 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 := &RoutersGetRoutePolicyResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetRouterStatusCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRouterStatus: Retrieves runtime information of the specified router. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query. -func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { - c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetRouterStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getRouterStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getRouterStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRouterStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterStatusResponse.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 *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, 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 := &RouterStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getRouterStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersInsertCall struct { - s *Service - project string - region string - router *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Router resource in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { - c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall { - 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 -// details. -func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Router resources available to the specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RoutersService) List(project string, region string) *RoutersListCall { - c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListCall) Filter(filter string) *RoutersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterList.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 *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, 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 := &RouterList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersListBgpRoutesCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListBgpRoutes: Retrieves a list of router bgp routes available to the -// specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name or id of the resource for this request. -// Name should conform to RFC1035. -func (r *RoutersService) ListBgpRoutes(project string, region string, router string) *RoutersListBgpRoutesCall { - c := &RoutersListBgpRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// AddressFamily sets the optional parameter "addressFamily": (Required) limit -// results to this address family (either IPv4 or IPv6) -// -// Possible values: -// -// "IPV4" -// "IPV6" -// "UNSPECIFIED_IP_VERSION" (default) -func (c *RoutersListBgpRoutesCall) AddressFamily(addressFamily string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("addressFamily", addressFamily) - return c -} - -// DestinationPrefix sets the optional parameter "destinationPrefix": Limit -// results to destinations that are subnets of this CIDR range -func (c *RoutersListBgpRoutesCall) DestinationPrefix(destinationPrefix string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("destinationPrefix", destinationPrefix) - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListBgpRoutesCall) Filter(filter string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListBgpRoutesCall) MaxResults(maxResults int64) *RoutersListBgpRoutesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListBgpRoutesCall) OrderBy(orderBy string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListBgpRoutesCall) PageToken(pageToken string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Peer sets the optional parameter "peer": (Required) limit results to the BGP -// peer with the given name. -// Name should conform to RFC1035. -func (c *RoutersListBgpRoutesCall) Peer(peer string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("peer", peer) - return c -} - -// PolicyApplied sets the optional parameter "policyApplied": When true, the -// method returns post-policy routes. Otherwise, it returns -// pre-policy routes. -func (c *RoutersListBgpRoutesCall) PolicyApplied(policyApplied bool) *RoutersListBgpRoutesCall { - c.urlParams_.Set("policyApplied", fmt.Sprint(policyApplied)) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListBgpRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListBgpRoutesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// RouteType sets the optional parameter "routeType": (Required) limit results -// to this type of route (either LEARNED or -// ADVERTISED) -// -// Possible values: -// -// "ADVERTISED" -// "LEARNED" -// "UNSPECIFIED_ROUTE_TYPE" (default) -func (c *RoutersListBgpRoutesCall) RouteType(routeType string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("routeType", routeType) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListBgpRoutesCall) Fields(s ...googleapi.Field) *RoutersListBgpRoutesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListBgpRoutesCall) IfNoneMatch(entityTag string) *RoutersListBgpRoutesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListBgpRoutesCall) Context(ctx context.Context) *RoutersListBgpRoutesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListBgpRoutesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListBgpRoutesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listBgpRoutes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.listBgpRoutes" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersListBgpRoutes.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 *RoutersListBgpRoutesCall) Do(opts ...googleapi.CallOption) (*RoutersListBgpRoutes, 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 := &RoutersListBgpRoutes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.listBgpRoutes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListBgpRoutesCall) Pages(ctx context.Context, f func(*RoutersListBgpRoutes) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersListNamedSetsCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListNamedSets: Retrieves a list of router named set subresources available -// to the -// specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name or id of the resource for this request. -// Name should conform to RFC1035. -func (r *RoutersService) ListNamedSets(project string, region string, router string) *RoutersListNamedSetsCall { - c := &RoutersListNamedSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListNamedSetsCall) Filter(filter string) *RoutersListNamedSetsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListNamedSetsCall) MaxResults(maxResults int64) *RoutersListNamedSetsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListNamedSetsCall) OrderBy(orderBy string) *RoutersListNamedSetsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListNamedSetsCall) PageToken(pageToken string) *RoutersListNamedSetsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListNamedSetsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListNamedSetsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListNamedSetsCall) Fields(s ...googleapi.Field) *RoutersListNamedSetsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListNamedSetsCall) IfNoneMatch(entityTag string) *RoutersListNamedSetsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListNamedSetsCall) Context(ctx context.Context) *RoutersListNamedSetsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListNamedSetsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListNamedSetsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/listNamedSets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listNamedSets", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.listNamedSets" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersListNamedSets.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 *RoutersListNamedSetsCall) Do(opts ...googleapi.CallOption) (*RoutersListNamedSets, 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 := &RoutersListNamedSets{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.listNamedSets", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListNamedSetsCall) Pages(ctx context.Context, f func(*RoutersListNamedSets) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersListRoutePoliciesCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListRoutePolicies: Retrieves a list of router route policy subresources -// available to the -// specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name or id of the resource for this request. -// Name should conform to RFC1035. -func (r *RoutersService) ListRoutePolicies(project string, region string, router string) *RoutersListRoutePoliciesCall { - c := &RoutersListRoutePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListRoutePoliciesCall) Filter(filter string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListRoutePoliciesCall) MaxResults(maxResults int64) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListRoutePoliciesCall) OrderBy(orderBy string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListRoutePoliciesCall) PageToken(pageToken string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListRoutePoliciesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListRoutePoliciesCall) Fields(s ...googleapi.Field) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListRoutePoliciesCall) IfNoneMatch(entityTag string) *RoutersListRoutePoliciesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListRoutePoliciesCall) Context(ctx context.Context) *RoutersListRoutePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListRoutePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListRoutePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listRoutePolicies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.listRoutePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersListRoutePolicies.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 *RoutersListRoutePoliciesCall) Do(opts ...googleapi.CallOption) (*RoutersListRoutePolicies, 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 := &RoutersListRoutePolicies{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.listRoutePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListRoutePoliciesCall) Pages(ctx context.Context, f func(*RoutersListRoutePolicies) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to patch. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { - 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 -// details. -func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersPatchNamedSetCall struct { - s *Service - project string - region string - router string - namedset *NamedSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchNamedSet: Patches Named Set -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Named Set is defined. -func (r *RoutersService) PatchNamedSet(project string, region string, router string, namedset *NamedSet) *RoutersPatchNamedSetCall { - c := &RoutersPatchNamedSetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.namedset = namedset - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersPatchNamedSetCall) RequestId(requestId string) *RoutersPatchNamedSetCall { - 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 -// details. -func (c *RoutersPatchNamedSetCall) Fields(s ...googleapi.Field) *RoutersPatchNamedSetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPatchNamedSetCall) Context(ctx context.Context) *RoutersPatchNamedSetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPatchNamedSetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchNamedSetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namedset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/patchNamedSet") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patchNamedSet", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patchNamedSet" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersPatchNamedSetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.patchNamedSet", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersPatchRoutePolicyCall struct { - s *Service - project string - region string - router string - routepolicy *RoutePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRoutePolicy: Patches Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) PatchRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersPatchRoutePolicyCall { - c := &RoutersPatchRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.routepolicy = routepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersPatchRoutePolicyCall) RequestId(requestId string) *RoutersPatchRoutePolicyCall { - 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 -// details. -func (c *RoutersPatchRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersPatchRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPatchRoutePolicyCall) Context(ctx context.Context) *RoutersPatchRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPatchRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patchRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patchRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersPatchRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.patchRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersPreviewCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Preview: Preview fields auto-generated during router create andupdate -// operations. -// Calling this method does NOT create or update the router. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query. -func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { - c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/preview") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.preview", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.preview" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersPreviewResponse.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 *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, 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 := &RoutersPreviewResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.preview", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { - c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersUpdateCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified Router resource with the data included in -// the -// request. This method conforms toPUT semantics, which requests that the -// state of the -// target resource be created or replaced with the state defined by -// the -// representation enclosed in the request message payload. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to update. -func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { - c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall { - 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 -// details. -func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersUpdateNamedSetCall struct { - s *Service - project string - region string - router string - namedset *NamedSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateNamedSet: Updates or creates new Named Set -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Named Set is defined. -func (r *RoutersService) UpdateNamedSet(project string, region string, router string, namedset *NamedSet) *RoutersUpdateNamedSetCall { - c := &RoutersUpdateNamedSetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.namedset = namedset - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersUpdateNamedSetCall) RequestId(requestId string) *RoutersUpdateNamedSetCall { - 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 -// details. -func (c *RoutersUpdateNamedSetCall) Fields(s ...googleapi.Field) *RoutersUpdateNamedSetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersUpdateNamedSetCall) Context(ctx context.Context) *RoutersUpdateNamedSetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersUpdateNamedSetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateNamedSetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.namedset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/updateNamedSet") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.updateNamedSet", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.updateNamedSet" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersUpdateNamedSetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.updateNamedSet", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersUpdateRoutePolicyCall struct { - s *Service - project string - region string - router string - routepolicy *RoutePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateRoutePolicy: Updates or creates new Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) UpdateRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersUpdateRoutePolicyCall { - c := &RoutersUpdateRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.routepolicy = routepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersUpdateRoutePolicyCall) RequestId(requestId string) *RoutersUpdateRoutePolicyCall { - 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 -// details. -func (c *RoutersUpdateRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersUpdateRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersUpdateRoutePolicyCall) Context(ctx context.Context) *RoutersUpdateRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersUpdateRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.updateRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.updateRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersUpdateRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.updateRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesDeleteCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Route resource. -// -// - project: Project ID for this request. -// - route: Name of the Route resource to delete. -func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { - c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall { - 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 -// details. -func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesGetCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Route resource. -// -// - project: Project ID for this request. -// - route: Name of the Route resource to return. -func (r *RoutesService) Get(project string, route string) *RoutesGetCall { - c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Route.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 *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, 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 := &Route{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesInsertCall struct { - s *Service - project string - route *Route - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Route resource in the specified project using the data -// included -// in the request. -// -// - project: Project ID for this request. -func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { - c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall { - 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 -// details. -func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.route) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Route resources available to the specified -// project. -// -// - project: Project ID for this request. -func (r *RoutesService) List(project string) *RoutesListCall { - c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutesListCall) Filter(filter string) *RoutesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouteList.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 *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, 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 := &RouteList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { - c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesAddRuleCall struct { - s *Service - project string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesAddRuleCall { - c := &SecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesAddRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesAddRuleCall { - 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 -// details. -func (c *SecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesAddRuleCall) Context(ctx context.Context) *SecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/addRule") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SecurityPolicy resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SecurityPoliciesService) AggregatedList(project string) *SecurityPoliciesAggregatedListCall { - c := &SecurityPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesAggregatedListCall) Filter(filter string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SecurityPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesAggregatedListCall) MaxResults(maxResults int64) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesAggregatedListCall) OrderBy(orderBy string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesAggregatedListCall) PageToken(pageToken string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SecurityPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SecurityPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesAggregatedListCall) Context(ctx context.Context) *SecurityPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesAggregatedList.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 *SecurityPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesAggregatedList, 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 := &SecurityPoliciesAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SecurityPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SecurityPoliciesAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SecurityPoliciesDeleteCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to delete. -func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { - c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesDeleteCall) RequestId(requestId string) *SecurityPoliciesDeleteCall { - 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 -// details. -func (c *SecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *SecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesDeleteCall) Context(ctx context.Context) *SecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesGetCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to get. -func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { - c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesGetCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesGetCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesGetCall) Context(ctx context.Context) *SecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesGetRuleCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *SecurityPoliciesService) GetRule(project string, securityPolicy string) *SecurityPoliciesGetRuleCall { - c := &SecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *SecurityPoliciesGetRuleCall) Priority(priority int64) *SecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesGetRuleCall) Context(ctx context.Context) *SecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesInsertCall struct { - s *Service - project string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { - c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPoliciesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *SecurityPoliciesInsertCall { - 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 -// details. -func (c *SecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *SecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesInsertCall) Context(ctx context.Context) *SecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the specified -// project. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { - c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesListCall) Filter(filter string) *SecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesListCall) MaxResults(maxResults int64) *SecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesListCall) OrderBy(orderBy string) *SecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesListCall) PageToken(pageToken string) *SecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesListCall) Fields(s ...googleapi.Field) *SecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesListCall) IfNoneMatch(entityTag string) *SecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesListCall) Context(ctx context.Context) *SecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SecurityPoliciesListPreconfiguredExpressionSetsCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPreconfiguredExpressionSets: Gets the current list of preconfigured Web -// Application Firewall (WAF) -// expressions. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) ListPreconfiguredExpressionSets(project string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c := &SecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Filter(filter string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) MaxResults(maxResults int64) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) OrderBy(orderBy string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) PageToken(pageToken string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Fields(s ...googleapi.Field) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) IfNoneMatch(entityTag string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Context(ctx context.Context) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.listPreconfiguredExpressionSets", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.listPreconfiguredExpressionSets" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesListPreconfiguredExpressionSetsResponse.ServerResponse.Heade -// r 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 *SecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesListPreconfiguredExpressionSetsResponse, 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 := &SecurityPoliciesListPreconfiguredExpressionSetsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.listPreconfiguredExpressionSets", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesPatchCall struct { - s *Service - project string - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// To -// clear fields in the policy, leave the fields empty and specify them in -// the -// updateMask. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule -// instead. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { - c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - return c -} - -// Paths sets the optional parameter "paths": -func (c *SecurityPoliciesPatchCall) Paths(paths ...string) *SecurityPoliciesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesPatchCall) RequestId(requestId string) *SecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *SecurityPoliciesPatchCall) UpdateMask(updateMask string) *SecurityPoliciesPatchCall { - 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 -// details. -func (c *SecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesPatchCall) Context(ctx context.Context) *SecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesPatchRuleCall struct { - s *Service - project string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. To clear fields in the -// rule, -// leave the fields empty and specify them in the updateMask. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) PatchRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesPatchRuleCall { - c := &SecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *SecurityPoliciesPatchRuleCall) Priority(priority int64) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *SecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *SecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesPatchRuleCall) Context(ctx context.Context) *SecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesRemoveRuleCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) RemoveRule(project string, securityPolicy string) *SecurityPoliciesRemoveRuleCall { - c := &SecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *SecurityPoliciesRemoveRuleCall) Priority(priority int64) *SecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *SecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a security policy. To learn more about -// labels, -// read the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SecurityPoliciesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SecurityPoliciesSetLabelsCall { - c := &SecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *SecurityPoliciesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesSetLabelsCall) Context(ctx context.Context) *SecurityPoliciesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { - c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SecurityPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SecurityPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all ServiceAttachment -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *ServiceAttachmentsService) AggregatedList(project string) *ServiceAttachmentsAggregatedListCall { - c := &ServiceAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ServiceAttachmentsAggregatedListCall) Filter(filter string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ServiceAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ServiceAttachmentsAggregatedListCall) MaxResults(maxResults int64) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ServiceAttachmentsAggregatedListCall) OrderBy(orderBy string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ServiceAttachmentsAggregatedListCall) PageToken(pageToken string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ServiceAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ServiceAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *ServiceAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsAggregatedListCall) Context(ctx context.Context) *ServiceAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/serviceAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachmentAggregatedList.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 *ServiceAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ServiceAttachmentAggregatedList, 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 := &ServiceAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ServiceAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*ServiceAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ServiceAttachmentsDeleteCall struct { - s *Service - project string - region string - serviceAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ServiceAttachment in the given scope -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -// - serviceAttachment: Name of the ServiceAttachment resource to delete. -func (r *ServiceAttachmentsService) Delete(project string, region string, serviceAttachment string) *ServiceAttachmentsDeleteCall { - c := &ServiceAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsDeleteCall) RequestId(requestId string) *ServiceAttachmentsDeleteCall { - 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 -// details. -func (c *ServiceAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ServiceAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsDeleteCall) Context(ctx context.Context) *ServiceAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsGetCall struct { - s *Service - project string - region string - serviceAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ServiceAttachment resource in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -// - serviceAttachment: Name of the ServiceAttachment resource to return. -func (r *ServiceAttachmentsService) Get(project string, region string, serviceAttachment string) *ServiceAttachmentsGetCall { - c := &ServiceAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - return c -} - -// ShowNatIps sets the optional parameter "showNatIps": Indicates whether NAT -// IPs should be included in the response. -func (c *ServiceAttachmentsGetCall) ShowNatIps(showNatIps bool) *ServiceAttachmentsGetCall { - c.urlParams_.Set("showNatIps", fmt.Sprint(showNatIps)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsGetCall) Fields(s ...googleapi.Field) *ServiceAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsGetCall) IfNoneMatch(entityTag string) *ServiceAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsGetCall) Context(ctx context.Context) *ServiceAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachment.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 *ServiceAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceAttachment, 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 := &ServiceAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) GetIamPolicy(project string, region string, resource string) *ServiceAttachmentsGetIamPolicyCall { - c := &ServiceAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ServiceAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ServiceAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ServiceAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ServiceAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ServiceAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsGetIamPolicyCall) Context(ctx context.Context) *ServiceAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.getIamPolicy" call. -// 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 *ServiceAttachmentsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsInsertCall struct { - s *Service - project string - region string - serviceattachment *ServiceAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ServiceAttachment in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *ServiceAttachmentsService) Insert(project string, region string, serviceattachment *ServiceAttachment) *ServiceAttachmentsInsertCall { - c := &ServiceAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceattachment = serviceattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsInsertCall) RequestId(requestId string) *ServiceAttachmentsInsertCall { - 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 -// details. -func (c *ServiceAttachmentsInsertCall) Fields(s ...googleapi.Field) *ServiceAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsInsertCall) Context(ctx context.Context) *ServiceAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.serviceattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the ServiceAttachments for a project in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *ServiceAttachmentsService) List(project string, region string) *ServiceAttachmentsListCall { - c := &ServiceAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ServiceAttachmentsListCall) Filter(filter string) *ServiceAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ServiceAttachmentsListCall) MaxResults(maxResults int64) *ServiceAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ServiceAttachmentsListCall) OrderBy(orderBy string) *ServiceAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ServiceAttachmentsListCall) PageToken(pageToken string) *ServiceAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ServiceAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ServiceAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsListCall) Fields(s ...googleapi.Field) *ServiceAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsListCall) IfNoneMatch(entityTag string) *ServiceAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsListCall) Context(ctx context.Context) *ServiceAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachmentList.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 *ServiceAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ServiceAttachmentList, 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 := &ServiceAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ServiceAttachmentsListCall) Pages(ctx context.Context, f func(*ServiceAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ServiceAttachmentsPatchCall struct { - s *Service - project string - region string - serviceAttachment string - serviceattachment *ServiceAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified ServiceAttachment resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: The region scoping this request and should conform to RFC1035. -// - serviceAttachment: The resource id of the ServiceAttachment to patch. It -// should conform to -// RFC1035 resource name or be a string form on an unsigned long number. -func (r *ServiceAttachmentsService) Patch(project string, region string, serviceAttachment string, serviceattachment *ServiceAttachment) *ServiceAttachmentsPatchCall { - c := &ServiceAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - c.serviceattachment = serviceattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsPatchCall) RequestId(requestId string) *ServiceAttachmentsPatchCall { - 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 -// details. -func (c *ServiceAttachmentsPatchCall) Fields(s ...googleapi.Field) *ServiceAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsPatchCall) Context(ctx context.Context) *ServiceAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.serviceattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - 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{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ServiceAttachmentsSetIamPolicyCall { - c := &ServiceAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ServiceAttachmentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsSetIamPolicyCall) Context(ctx context.Context) *ServiceAttachmentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.setIamPolicy" call. -// 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 *ServiceAttachmentsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ServiceAttachmentsTestIamPermissionsCall { - c := &ServiceAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ServiceAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *ServiceAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ServiceAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsDeleteCall struct { - s *Service - project string - snapshotGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SnapshotGroup resource -// -// - project: Project ID for this request. -// - snapshotGroup: Name of the SnapshotGroup resource to delete. -func (r *SnapshotGroupsService) Delete(project string, snapshotGroup string) *SnapshotGroupsDeleteCall { - c := &SnapshotGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshotGroup = snapshotGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotGroupsDeleteCall) RequestId(requestId string) *SnapshotGroupsDeleteCall { - 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 -// details. -func (c *SnapshotGroupsDeleteCall) Fields(s ...googleapi.Field) *SnapshotGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsDeleteCall) Context(ctx context.Context) *SnapshotGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups/{snapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshotGroup": c.snapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsGetCall struct { - s *Service - project string - snapshotGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: returns the specified SnapshotGroup resource. -// -// - project: Project ID for this request. -// - snapshotGroup: Name of the SnapshotGroup resource to return. -func (r *SnapshotGroupsService) Get(project string, snapshotGroup string) *SnapshotGroupsGetCall { - c := &SnapshotGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshotGroup = snapshotGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotGroupsGetCall) Fields(s ...googleapi.Field) *SnapshotGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotGroupsGetCall) IfNoneMatch(entityTag string) *SnapshotGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsGetCall) Context(ctx context.Context) *SnapshotGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups/{snapshotGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshotGroup": c.snapshotGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotGroup.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 *SnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*SnapshotGroup, 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 := &SnapshotGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotGroupsService) GetIamPolicy(project string, resource string) *SnapshotGroupsGetIamPolicyCall { - c := &SnapshotGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *SnapshotGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *SnapshotGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *SnapshotGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsGetIamPolicyCall) Context(ctx context.Context) *SnapshotGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.getIamPolicy" call. -// 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 *SnapshotGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsInsertCall struct { - s *Service - project string - snapshotgroup *SnapshotGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a snapshot group in the specified project using the data -// included -// in the request. -// -// - project: Project ID for this request. -func (r *SnapshotGroupsService) Insert(project string, snapshotgroup *SnapshotGroup) *SnapshotGroupsInsertCall { - c := &SnapshotGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshotgroup = snapshotgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotGroupsInsertCall) RequestId(requestId string) *SnapshotGroupsInsertCall { - 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 -// details. -func (c *SnapshotGroupsInsertCall) Fields(s ...googleapi.Field) *SnapshotGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsInsertCall) Context(ctx context.Context) *SnapshotGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshotgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: retrieves the list of SnapshotGroup resources contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *SnapshotGroupsService) List(project string) *SnapshotGroupsListCall { - c := &SnapshotGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SnapshotGroupsListCall) Filter(filter string) *SnapshotGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SnapshotGroupsListCall) MaxResults(maxResults int64) *SnapshotGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SnapshotGroupsListCall) OrderBy(orderBy string) *SnapshotGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SnapshotGroupsListCall) PageToken(pageToken string) *SnapshotGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SnapshotGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SnapshotGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotGroupsListCall) Fields(s ...googleapi.Field) *SnapshotGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotGroupsListCall) IfNoneMatch(entityTag string) *SnapshotGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsListCall) Context(ctx context.Context) *SnapshotGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListSnapshotGroups.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 *SnapshotGroupsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotGroups, 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 := &ListSnapshotGroups{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListSnapshotGroups) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SnapshotGroupsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotGroupsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotGroupsSetIamPolicyCall { - c := &SnapshotGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsSetIamPolicyCall) Context(ctx context.Context) *SnapshotGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.setIamPolicy" call. -// 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 *SnapshotGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotGroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotGroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotGroupsTestIamPermissionsCall { - c := &SnapshotGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotGroupsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SnapshotGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotSettingsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get snapshot settings. -// -// - project: Project ID for this request. -func (r *SnapshotSettingsService) Get(project string) *SnapshotSettingsGetCall { - c := &SnapshotSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotSettingsGetCall) Fields(s ...googleapi.Field) *SnapshotSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotSettingsGetCall) IfNoneMatch(entityTag string) *SnapshotSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotSettingsGetCall) Context(ctx context.Context) *SnapshotSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotSettings.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 *SnapshotSettingsGetCall) Do(opts ...googleapi.CallOption) (*SnapshotSettings, 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 := &SnapshotSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotSettingsPatchCall struct { - s *Service - project string - snapshotsettings *SnapshotSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch snapshot settings. -// -// - project: Project ID for this request. -func (r *SnapshotSettingsService) Patch(project string, snapshotsettings *SnapshotSettings) *SnapshotSettingsPatchCall { - c := &SnapshotSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshotsettings = snapshotsettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotSettingsPatchCall) RequestId(requestId string) *SnapshotSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *SnapshotSettingsPatchCall) UpdateMask(updateMask string) *SnapshotSettingsPatchCall { - 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 -// details. -func (c *SnapshotSettingsPatchCall) Fields(s ...googleapi.Field) *SnapshotSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotSettingsPatchCall) Context(ctx context.Context) *SnapshotSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshotsettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotSettings") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the snapshots in your -// project -// across all regions and global scope. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *SnapshotsService) AggregatedList(project string) *SnapshotsAggregatedListCall { - c := &SnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SnapshotsAggregatedListCall) Filter(filter string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SnapshotsAggregatedListCall) MaxResults(maxResults int64) *SnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SnapshotsAggregatedListCall) OrderBy(orderBy string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SnapshotsAggregatedListCall) PageToken(pageToken string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *SnapshotsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *SnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsAggregatedListCall) Context(ctx context.Context) *SnapshotsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotAggregatedList.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 *SnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*SnapshotAggregatedList, 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 := &SnapshotAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*SnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SnapshotsDeleteCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting -// a single snapshot might not necessarily delete all the data on -// that -// snapshot. If any data on the snapshot that is marked for deletion is -// needed for subsequent snapshots, the data will be moved to the -// next -// corresponding snapshot. -// -// For more information, seeDeleting -// snapshots. -// -// - project: Project ID for this request. -// - snapshot: Name of the Snapshot resource to delete. -func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { - c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall { - 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 -// details. -func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsGetCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. -// -// - project: Project ID for this request. -// - snapshot: Name of the Snapshot resource to return. -func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { - c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Snapshot.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 *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { - c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *SnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *SnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *SnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsGetIamPolicyCall) Context(ctx context.Context) *SnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.getIamPolicy" call. -// 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 *SnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsInsertCall struct { - s *Service - project string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a snapshot in the specified project using the data -// included -// in the request. For regular snapshot creation, consider using this -// method -// instead of disks.createSnapshot, -// as this method supports more features, such as creating snapshots in -// a -// project different from the source disk project. -// -// - project: Project ID for this request. -func (r *SnapshotsService) Insert(project string, snapshot *Snapshot) *SnapshotsInsertCall { - c := &SnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotsInsertCall) RequestId(requestId string) *SnapshotsInsertCall { - 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 -// details. -func (c *SnapshotsInsertCall) Fields(s ...googleapi.Field) *SnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsInsertCall) Context(ctx context.Context) *SnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *SnapshotsService) List(project string) *SnapshotsListCall { - c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotList.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 *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, 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 := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SnapshotsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall { - c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsSetIamPolicyCall) Context(ctx context.Context) *SnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setIamPolicy" call. -// 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 *SnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a snapshot. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { - c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { - c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsUpdateKmsKeyCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateKmsKey: Rotates the customer-managed -// encryption key to the latest version for the specified snapshot. -// -// - project: Project ID for this request. -// - snapshot: Name of the snapshot resource to update. Should conform to -// RFC1035. -func (r *SnapshotsService) UpdateKmsKey(project string, snapshot string) *SnapshotsUpdateKmsKeyCall { - c := &SnapshotsUpdateKmsKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotsUpdateKmsKeyCall) RequestId(requestId string) *SnapshotsUpdateKmsKeyCall { - 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 -// details. -func (c *SnapshotsUpdateKmsKeyCall) Fields(s ...googleapi.Field) *SnapshotsUpdateKmsKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsUpdateKmsKeyCall) Context(ctx context.Context) *SnapshotsUpdateKmsKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsUpdateKmsKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsUpdateKmsKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{snapshot}/updateKmsKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.updateKmsKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.updateKmsKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsUpdateKmsKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.updateKmsKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SslCertificate resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SslCertificatesService) AggregatedList(project string) *SslCertificatesAggregatedListCall { - c := &SslCertificatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslCertificatesAggregatedListCall) Filter(filter string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SslCertificatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslCertificatesAggregatedListCall) MaxResults(maxResults int64) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslCertificatesAggregatedListCall) OrderBy(orderBy string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslCertificatesAggregatedListCall) PageToken(pageToken string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslCertificatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SslCertificatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesAggregatedListCall) Fields(s ...googleapi.Field) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesAggregatedListCall) IfNoneMatch(entityTag string) *SslCertificatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesAggregatedListCall) Context(ctx context.Context) *SslCertificatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateAggregatedList.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 *SslCertificatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SslCertificateAggregatedList, 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 := &SslCertificateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslCertificatesAggregatedListCall) Pages(ctx context.Context, f func(*SslCertificateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslCertificatesDeleteCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource. -// -// - project: Project ID for this request. -// - sslCertificate: Name of the SslCertificate resource to delete. -func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { - c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall { - 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 -// details. -func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertificatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesGetCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource. -// -// - project: Project ID for this request. -// - sslCertificate: Name of the SslCertificate resource to return. -func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { - c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificate.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 *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, 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 := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesInsertCall struct { - s *Service - project string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { - c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslcertificate = sslcertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall { - 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 -// details. -func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertificate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertificatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { - c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslCertificatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslCertificatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateList.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 *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, 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 := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslCertificatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { - c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SslPolicy resources, regional and -// global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SslPoliciesService) AggregatedList(project string) *SslPoliciesAggregatedListCall { - c := &SslPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesAggregatedListCall) Filter(filter string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SslPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesAggregatedListCall) MaxResults(maxResults int64) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesAggregatedListCall) OrderBy(orderBy string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesAggregatedListCall) PageToken(pageToken string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SslPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SslPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesAggregatedListCall) Context(ctx context.Context) *SslPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesAggregatedList.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 *SslPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesAggregatedList, 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 := &SslPoliciesAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SslPoliciesAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslPoliciesDeleteCall struct { - s *Service - project string - sslPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SSL policy. The SSL policy resource can be -// deleted -// only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy -// resources. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to delete. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Delete(project string, sslPolicy string) *SslPoliciesDeleteCall { - c := &SslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesDeleteCall) RequestId(requestId string) *SslPoliciesDeleteCall { - 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 -// details. -func (c *SslPoliciesDeleteCall) Fields(s ...googleapi.Field) *SslPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesDeleteCall) Context(ctx context.Context) *SslPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesGetCall struct { - s *Service - project string - sslPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Lists all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Get(project string, sslPolicy string) *SslPoliciesGetCall { - c := &SslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesGetCall) Fields(s ...googleapi.Field) *SslPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesGetCall) IfNoneMatch(entityTag string) *SslPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesGetCall) Context(ctx context.Context) *SslPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPolicy.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 *SslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, 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 := &SslPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesInsertCall struct { - s *Service - project string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Returns the specified SSL policy resource. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) Insert(project string, sslpolicy *SslPolicy) *SslPoliciesInsertCall { - c := &SslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesInsertCall) RequestId(requestId string) *SslPoliciesInsertCall { - 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 -// details. -func (c *SslPoliciesInsertCall) Fields(s ...googleapi.Field) *SslPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesInsertCall) Context(ctx context.Context) *SslPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the SSL policies that have been configured for the -// specified -// project. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) List(project string) *SslPoliciesListCall { - c := &SslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesListCall) Filter(filter string) *SslPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesListCall) MaxResults(maxResults int64) *SslPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesListCall) OrderBy(orderBy string) *SslPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesListCall) PageToken(pageToken string) *SslPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesListCall) Fields(s ...googleapi.Field) *SslPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesListCall) IfNoneMatch(entityTag string) *SslPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesListCall) Context(ctx context.Context) *SslPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesList.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 *SslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList, 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 := &SslPoliciesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslPoliciesListCall) Pages(ctx context.Context, f func(*SslPoliciesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslPoliciesListAvailableFeaturesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAvailableFeatures: Lists all features that can be specified in the SSL -// policy when using -// custom profile. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) ListAvailableFeatures(project string) *SslPoliciesListAvailableFeaturesCall { - c := &SslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesListAvailableFeaturesCall) Filter(filter string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesListAvailableFeaturesCall) MaxResults(maxResults int64) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesListAvailableFeaturesCall) OrderBy(orderBy string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesListAvailableFeaturesCall) PageToken(pageToken string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesListAvailableFeaturesCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesListAvailableFeaturesCall) Fields(s ...googleapi.Field) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesListAvailableFeaturesCall) IfNoneMatch(entityTag string) *SslPoliciesListAvailableFeaturesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesListAvailableFeaturesCall) Context(ctx context.Context) *SslPoliciesListAvailableFeaturesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/listAvailableFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.listAvailableFeatures", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.listAvailableFeatures" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesListAvailableFeaturesResponse.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 *SslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) (*SslPoliciesListAvailableFeaturesResponse, 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 := &SslPoliciesListAvailableFeaturesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.listAvailableFeatures", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesPatchCall struct { - s *Service - project string - sslPolicy string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified SSL policy with the data included in the -// request. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Patch(project string, sslPolicy string, sslpolicy *SslPolicy) *SslPoliciesPatchCall { - c := &SslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesPatchCall) RequestId(requestId string) *SslPoliciesPatchCall { - 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 -// details. -func (c *SslPoliciesPatchCall) Fields(s ...googleapi.Field) *SslPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesPatchCall) Context(ctx context.Context) *SslPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - 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{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SslPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslPoliciesTestIamPermissionsCall { - c := &SslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SslPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of storage pool types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *StoragePoolTypesService) AggregatedList(project string) *StoragePoolTypesAggregatedListCall { - c := &StoragePoolTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolTypesAggregatedListCall) Filter(filter string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *StoragePoolTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolTypesAggregatedListCall) MaxResults(maxResults int64) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolTypesAggregatedListCall) OrderBy(orderBy string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolTypesAggregatedListCall) PageToken(pageToken string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *StoragePoolTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesAggregatedListCall) Fields(s ...googleapi.Field) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesAggregatedListCall) IfNoneMatch(entityTag string) *StoragePoolTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesAggregatedListCall) Context(ctx context.Context) *StoragePoolTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/storagePoolTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolTypeAggregatedList.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 *StoragePoolTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*StoragePoolTypeAggregatedList, 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 := &StoragePoolTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolTypesAggregatedListCall) Pages(ctx context.Context, f func(*StoragePoolTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolTypesGetCall struct { - s *Service - project string - zone string - storagePoolType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified storage pool type. -// -// - project: Project ID for this request. -// - storagePoolType: Name of the storage pool type to return. -// - zone: The name of the zone for this request. -func (r *StoragePoolTypesService) Get(project string, zone string, storagePoolType string) *StoragePoolTypesGetCall { - c := &StoragePoolTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePoolType = storagePoolType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesGetCall) Fields(s ...googleapi.Field) *StoragePoolTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesGetCall) IfNoneMatch(entityTag string) *StoragePoolTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesGetCall) Context(ctx context.Context) *StoragePoolTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePoolType": c.storagePoolType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolType.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 *StoragePoolTypesGetCall) Do(opts ...googleapi.CallOption) (*StoragePoolType, 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 := &StoragePoolType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of storage pool types available to the -// specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolTypesService) List(project string, zone string) *StoragePoolTypesListCall { - c := &StoragePoolTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolTypesListCall) Filter(filter string) *StoragePoolTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolTypesListCall) MaxResults(maxResults int64) *StoragePoolTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolTypesListCall) OrderBy(orderBy string) *StoragePoolTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolTypesListCall) PageToken(pageToken string) *StoragePoolTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesListCall) Fields(s ...googleapi.Field) *StoragePoolTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesListCall) IfNoneMatch(entityTag string) *StoragePoolTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesListCall) Context(ctx context.Context) *StoragePoolTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePoolTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolTypeList.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 *StoragePoolTypesListCall) Do(opts ...googleapi.CallOption) (*StoragePoolTypeList, 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 := &StoragePoolTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolTypesListCall) Pages(ctx context.Context, f func(*StoragePoolTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of storage pools. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *StoragePoolsService) AggregatedList(project string) *StoragePoolsAggregatedListCall { - c := &StoragePoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsAggregatedListCall) Filter(filter string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *StoragePoolsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsAggregatedListCall) MaxResults(maxResults int64) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsAggregatedListCall) OrderBy(orderBy string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsAggregatedListCall) PageToken(pageToken string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *StoragePoolsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsAggregatedListCall) Fields(s ...googleapi.Field) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsAggregatedListCall) IfNoneMatch(entityTag string) *StoragePoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsAggregatedListCall) Context(ctx context.Context) *StoragePoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/storagePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolAggregatedList.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 *StoragePoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*StoragePoolAggregatedList, 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 := &StoragePoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsAggregatedListCall) Pages(ctx context.Context, f func(*StoragePoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsDeleteCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified storage pool. Deleting a storagePool -// removes its data permanently and is irreversible. However, deleting -// a -// storagePool does not delete any snapshots previously -// made from the storagePool. You must separately delete -// snapshots. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to delete. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Delete(project string, zone string, storagePool string) *StoragePoolsDeleteCall { - c := &StoragePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsDeleteCall) RequestId(requestId string) *StoragePoolsDeleteCall { - 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 -// details. -func (c *StoragePoolsDeleteCall) Fields(s ...googleapi.Field) *StoragePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsDeleteCall) Context(ctx context.Context) *StoragePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsGetCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified storage pool. Gets a list of available -// storage pools by making a list() request. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to return. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Get(project string, zone string, storagePool string) *StoragePoolsGetCall { - c := &StoragePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsGetCall) Fields(s ...googleapi.Field) *StoragePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsGetCall) IfNoneMatch(entityTag string) *StoragePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsGetCall) Context(ctx context.Context) *StoragePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePool.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 *StoragePoolsGetCall) Do(opts ...googleapi.CallOption) (*StoragePool, 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 := &StoragePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) GetIamPolicy(project string, zone string, resource string) *StoragePoolsGetIamPolicyCall { - c := &StoragePoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *StoragePoolsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *StoragePoolsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *StoragePoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *StoragePoolsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsGetIamPolicyCall) IfNoneMatch(entityTag string) *StoragePoolsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsGetIamPolicyCall) Context(ctx context.Context) *StoragePoolsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.getIamPolicy" call. -// 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 *StoragePoolsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsInsertCall struct { - s *Service - project string - zone string - storagepool *StoragePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a storage pool in the specified project using the data -// in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Insert(project string, zone string, storagepool *StoragePool) *StoragePoolsInsertCall { - c := &StoragePoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagepool = storagepool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsInsertCall) RequestId(requestId string) *StoragePoolsInsertCall { - 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 -// details. -func (c *StoragePoolsInsertCall) Fields(s ...googleapi.Field) *StoragePoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsInsertCall) Context(ctx context.Context) *StoragePoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.storagepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of storage pools contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) List(project string, zone string) *StoragePoolsListCall { - c := &StoragePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsListCall) Filter(filter string) *StoragePoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsListCall) MaxResults(maxResults int64) *StoragePoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsListCall) OrderBy(orderBy string) *StoragePoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsListCall) PageToken(pageToken string) *StoragePoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsListCall) Fields(s ...googleapi.Field) *StoragePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsListCall) IfNoneMatch(entityTag string) *StoragePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsListCall) Context(ctx context.Context) *StoragePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolList.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 *StoragePoolsListCall) Do(opts ...googleapi.CallOption) (*StoragePoolList, 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 := &StoragePoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsListCall) Pages(ctx context.Context, f func(*StoragePoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsListDisksCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListDisks: Lists the disks in a specified storage pool. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to list disks of. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) ListDisks(project string, zone string, storagePool string) *StoragePoolsListDisksCall { - c := &StoragePoolsListDisksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsListDisksCall) Filter(filter string) *StoragePoolsListDisksCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsListDisksCall) MaxResults(maxResults int64) *StoragePoolsListDisksCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsListDisksCall) OrderBy(orderBy string) *StoragePoolsListDisksCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsListDisksCall) PageToken(pageToken string) *StoragePoolsListDisksCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsListDisksCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsListDisksCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsListDisksCall) Fields(s ...googleapi.Field) *StoragePoolsListDisksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsListDisksCall) IfNoneMatch(entityTag string) *StoragePoolsListDisksCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsListDisksCall) Context(ctx context.Context) *StoragePoolsListDisksCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsListDisksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsListDisksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.listDisks", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.listDisks" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolListDisks.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 *StoragePoolsListDisksCall) Do(opts ...googleapi.CallOption) (*StoragePoolListDisks, 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 := &StoragePoolListDisks{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.listDisks", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsListDisksCall) Pages(ctx context.Context, f func(*StoragePoolListDisks) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *StoragePoolsSetIamPolicyCall { - c := &StoragePoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *StoragePoolsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsSetIamPolicyCall) Context(ctx context.Context) *StoragePoolsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.setIamPolicy" call. -// 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 *StoragePoolsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a storage pools. To learn more about labels, -// read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *StoragePoolsSetLabelsCall { - c := &StoragePoolsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsSetLabelsCall) RequestId(requestId string) *StoragePoolsSetLabelsCall { - 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 -// details. -func (c *StoragePoolsSetLabelsCall) Fields(s ...googleapi.Field) *StoragePoolsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsSetLabelsCall) Context(ctx context.Context) *StoragePoolsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{resource}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *StoragePoolsTestIamPermissionsCall { - c := &StoragePoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *StoragePoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsTestIamPermissionsCall) Context(ctx context.Context) *StoragePoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *StoragePoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsUpdateCall struct { - s *Service - project string - zone string - storagePool string - storagepool *StoragePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified storagePool with the data included in the -// request. -// The update is performed only on selected fields included as part -// of update-mask. Only the following fields can be -// modified: -// pool_provisioned_capacity_gb, pool_provisioned_iops -// and -// pool_provisioned_throughput. -// -// - project: Project ID for this request. -// - storagePool: The storagePool name for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Update(project string, zone string, storagePool string, storagepool *StoragePool) *StoragePoolsUpdateCall { - c := &StoragePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - c.storagepool = storagepool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsUpdateCall) RequestId(requestId string) *StoragePoolsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *StoragePoolsUpdateCall) UpdateMask(updateMask string) *StoragePoolsUpdateCall { - 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 -// details. -func (c *StoragePoolsUpdateCall) Fields(s ...googleapi.Field) *StoragePoolsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsUpdateCall) Context(ctx context.Context) *StoragePoolsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.storagepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - 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{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of subnetworks. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { - c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SubnetworksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SubnetworksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SubnetworksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksAggregatedListCall) Views(views ...string) *SubnetworksAggregatedListCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkAggregatedList.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 *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, 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 := &SubnetworkAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksDeleteCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified subnetwork. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to delete. -func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { - c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall { - 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 -// details. -func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksExpandIpCidrRangeCall struct { - s *Service - project string - region string - subnetwork string - subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to update. -func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { - c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall { - 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 -// details. -func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetworksexpandipcidrrangerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.expandIpCidrRange", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.expandIpCidrRange" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksExpandIpCidrRangeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.expandIpCidrRange", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksGetCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified subnetwork. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to return. -func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { - c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksGetCall) Views(views ...string) *SubnetworksGetCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Subnetwork.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 *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, 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 := &Subnetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { - c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *SubnetworksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.getIamPolicy" call. -// 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 *SubnetworksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksInsertCall struct { - s *Service - project string - region string - subnetwork *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a subnetwork in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { - c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall { - 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 -// details. -func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of subnetworks available to the specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { - c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksListCall) Views(views ...string) *SubnetworksListCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkList.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 *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, 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 := &SubnetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves an aggregated list of all usable subnetworks in the -// project. -// -// - project: Project ID for this request. -func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { - c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksListUsableCall) Filter(filter string) *SubnetworksListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksListUsableCall) MaxResults(maxResults int64) *SubnetworksListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksListUsableCall) OrderBy(orderBy string) *SubnetworksListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksListUsableCall) PageToken(pageToken string) *SubnetworksListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProject sets the optional parameter "serviceProject": The project id -// or project number in which the subnetwork is intended to be -// used. Only applied for Shared VPC. See Shared VPC -// documentation (https://cloud.google.com/vpc/docs/shared-vpc/) -func (c *SubnetworksListUsableCall) ServiceProject(serviceProject string) *SubnetworksListUsableCall { - c.urlParams_.Set("serviceProject", serviceProject) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksListUsableCall) Fields(s ...googleapi.Field) *SubnetworksListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksListUsableCall) IfNoneMatch(entityTag string) *SubnetworksListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksListUsableCall) Context(ctx context.Context) *SubnetworksListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/subnetworks/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *UsableSubnetworksAggregatedList.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 *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSubnetworksAggregatedList, 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 := &UsableSubnetworksAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksListUsableCall) Pages(ctx context.Context, f func(*UsableSubnetworksAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksPatchCall struct { - s *Service - project string - region string - subnetwork string - subnetwork2 *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified subnetwork with the data included in the -// request. -// Only certain fields can be updated with a patch request -// as indicated in the field descriptions. -// You must specify the current fingerprint of the -// subnetwork resource being patched. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to patch. -func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { - c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetwork2 = subnetwork2 - return c -} - -// DrainTimeoutSeconds sets the optional parameter "drainTimeoutSeconds": The -// drain timeout specifies the upper bound in seconds on the amount of -// time allowed to drain connections from the current ACTIVE subnetwork -// to the current BACKUP subnetwork. The drain timeout is only applicable -// when the following conditions are true: -// - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER -// - the subnetwork being patched has role = BACKUP -// - the patch request is setting the role to ACTIVE. Note that after this -// patch operation the roles of the ACTIVE and BACKUP subnetworks will be -// swapped. -func (c *SubnetworksPatchCall) DrainTimeoutSeconds(drainTimeoutSeconds int64) *SubnetworksPatchCall { - c.urlParams_.Set("drainTimeoutSeconds", fmt.Sprint(drainTimeoutSeconds)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksPatchCall) RequestId(requestId string) *SubnetworksPatchCall { - 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 -// details. -func (c *SubnetworksPatchCall) Fields(s ...googleapi.Field) *SubnetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksPatchCall) Context(ctx context.Context) *SubnetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetwork2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall { - c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setIamPolicy" call. -// 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 *SubnetworksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksSetPrivateIpGoogleAccessCall struct { - s *Service - project string - region string - subnetwork string - subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access Google -// services without assigning -// external IP addresses through Private Google Access. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource. -func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { - c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall { - 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 -// details. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetworkssetprivateipgoogleaccessrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.setPrivateIpGoogleAccess", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.setPrivateIpGoogleAccess", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { - c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesDeleteCall struct { - s *Service - project string - targetGrpcProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetGrpcProxy in the given scope -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to delete. -func (r *TargetGrpcProxiesService) Delete(project string, targetGrpcProxy string) *TargetGrpcProxiesDeleteCall { - c := &TargetGrpcProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesDeleteCall) RequestId(requestId string) *TargetGrpcProxiesDeleteCall { - 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 -// details. -func (c *TargetGrpcProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesDeleteCall) Context(ctx context.Context) *TargetGrpcProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesGetCall struct { - s *Service - project string - targetGrpcProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetGrpcProxy resource in the given scope. -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to return. -func (r *TargetGrpcProxiesService) Get(project string, targetGrpcProxy string) *TargetGrpcProxiesGetCall { - c := &TargetGrpcProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesGetCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetGrpcProxiesGetCall) IfNoneMatch(entityTag string) *TargetGrpcProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesGetCall) Context(ctx context.Context) *TargetGrpcProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetGrpcProxy.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 *TargetGrpcProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetGrpcProxy, 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 := &TargetGrpcProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesInsertCall struct { - s *Service - project string - targetgrpcproxy *TargetGrpcProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetGrpcProxy in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *TargetGrpcProxiesService) Insert(project string, targetgrpcproxy *TargetGrpcProxy) *TargetGrpcProxiesInsertCall { - c := &TargetGrpcProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetgrpcproxy = targetgrpcproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesInsertCall) RequestId(requestId string) *TargetGrpcProxiesInsertCall { - 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 -// details. -func (c *TargetGrpcProxiesInsertCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesInsertCall) Context(ctx context.Context) *TargetGrpcProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetgrpcproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the TargetGrpcProxies for a project in the given scope. -// -// - project: Project ID for this request. -func (r *TargetGrpcProxiesService) List(project string) *TargetGrpcProxiesListCall { - c := &TargetGrpcProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetGrpcProxiesListCall) Filter(filter string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetGrpcProxiesListCall) MaxResults(maxResults int64) *TargetGrpcProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetGrpcProxiesListCall) OrderBy(orderBy string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetGrpcProxiesListCall) PageToken(pageToken string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetGrpcProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetGrpcProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesListCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetGrpcProxiesListCall) IfNoneMatch(entityTag string) *TargetGrpcProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesListCall) Context(ctx context.Context) *TargetGrpcProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetGrpcProxyList.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 *TargetGrpcProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetGrpcProxyList, 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 := &TargetGrpcProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetGrpcProxiesListCall) Pages(ctx context.Context, f func(*TargetGrpcProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetGrpcProxiesPatchCall struct { - s *Service - project string - targetGrpcProxy string - targetgrpcproxy *TargetGrpcProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetGrpcProxy resource with the data included -// in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to patch. -func (r *TargetGrpcProxiesService) Patch(project string, targetGrpcProxy string, targetgrpcproxy *TargetGrpcProxy) *TargetGrpcProxiesPatchCall { - c := &TargetGrpcProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - c.targetgrpcproxy = targetgrpcproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesPatchCall) RequestId(requestId string) *TargetGrpcProxiesPatchCall { - 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 -// details. -func (c *TargetGrpcProxiesPatchCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesPatchCall) Context(ctx context.Context) *TargetGrpcProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetgrpcproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - 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{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetGrpcProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetGrpcProxiesTestIamPermissionsCall { - c := &TargetGrpcProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetGrpcProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetGrpcProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetHttpProxy resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetHttpProxiesService) AggregatedList(project string) *TargetHttpProxiesAggregatedListCall { - c := &TargetHttpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpProxiesAggregatedListCall) Filter(filter string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetHttpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetHttpProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyAggregatedList.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 *TargetHttpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyAggregatedList, 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 := &TargetHttpProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpProxiesDeleteCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to delete. -func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { - c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall { - 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 -// details. -func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesGetCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to return. -func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { - c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxy.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 *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, 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 := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesInsertCall struct { - s *Service - project string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified -// project using the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { - c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall { - 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 -// details. -func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available -// to the specified project. -// -// - project: Project ID for this request. -func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { - c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.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 *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, 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 := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpProxiesPatchCall struct { - s *Service - project string - targetHttpProxy string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetHttpProxy resource with the data included -// in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to patch. -func (r *TargetHttpProxiesService) Patch(project string, targetHttpProxy string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesPatchCall { - c := &TargetHttpProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesPatchCall) RequestId(requestId string) *TargetHttpProxiesPatchCall { - 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 -// details. -func (c *TargetHttpProxiesPatchCall) Fields(s ...googleapi.Field) *TargetHttpProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesPatchCall) Context(ctx context.Context) *TargetHttpProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - 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{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy to set a URL map for. -func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { - c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall { - 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 -// details. -func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - 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{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { - c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetHttpsProxy resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetHttpsProxiesService) AggregatedList(project string) *TargetHttpsProxiesAggregatedListCall { - c := &TargetHttpsProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpsProxiesAggregatedListCall) Filter(filter string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetHttpsProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpsProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpsProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpsProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpsProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetHttpsProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpsProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyAggregatedList.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 *TargetHttpsProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyAggregatedList, 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 := &TargetHttpsProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpsProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpsProxiesDeleteCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to delete. -func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { - c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall { - 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 -// details. -func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesGetCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to return. -func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { - c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.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 *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, 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 := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesInsertCall struct { - s *Service - project string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified -// project using the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { - c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall { - 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 -// details. -func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { - c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpsProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpsProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.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 *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, 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 := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpsProxiesPatchCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetHttpsProxy resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to patch. -func (r *TargetHttpsProxiesService) Patch(project string, targetHttpsProxy string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesPatchCall { - c := &TargetHttpsProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesPatchCall) RequestId(requestId string) *TargetHttpsProxiesPatchCall { - 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 -// details. -func (c *TargetHttpsProxiesPatchCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesPatchCall) Context(ctx context.Context) *TargetHttpsProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetCertificateMapCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetcertificatemaprequest *TargetHttpsProxiesSetCertificateMapRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCertificateMap: Changes the Certificate Map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose -// CertificateMap is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetHttpsProxiesService) SetCertificateMap(project string, targetHttpsProxy string, targethttpsproxiessetcertificatemaprequest *TargetHttpsProxiesSetCertificateMapRequest) *TargetHttpsProxiesSetCertificateMapCall { - c := &TargetHttpsProxiesSetCertificateMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetcertificatemaprequest = targethttpsproxiessetcertificatemaprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetCertificateMapCall) RequestId(requestId string) *TargetHttpsProxiesSetCertificateMapCall { - 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 -// details. -func (c *TargetHttpsProxiesSetCertificateMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetCertificateMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetCertificateMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetCertificateMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetCertificateMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetCertificateMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetcertificatemaprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setCertificateMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setCertificateMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetCertificateMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setCertificateMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetQuicOverrideCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set the QUIC -// override policy for. -// -// The name should conform to RFC1035. -func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { - c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetquicoverriderequest = targethttpsproxiessetquicoverriderequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetQuicOverrideCall) RequestId(requestId string) *TargetHttpsProxiesSetQuicOverrideCall { - 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 -// details. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetQuicOverrideCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Context(ctx context.Context) *TargetHttpsProxiesSetQuicOverrideCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetquicoverriderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setQuicOverride", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setQuicOverride" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetQuicOverrideCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setQuicOverride", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set -// an -// -// SslCertificates resource for. -func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { - c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall { - 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 -// details. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetSslPolicyCall struct { - s *Service - project string - targetHttpsProxy string - sslpolicyreference *SslPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslPolicy: Sets the SSL policy for TargetHttpsProxy. The SSL policy -// specifies the -// server-side support for SSL features. This affects connections -// between -// clients and the HTTPS proxy load balancer. They do not affect the -// connection between the load balancer and the backends. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose SSL policy -// is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetHttpsProxiesService) SetSslPolicy(project string, targetHttpsProxy string, sslpolicyreference *SslPolicyReference) *TargetHttpsProxiesSetSslPolicyCall { - c := &TargetHttpsProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.sslpolicyreference = sslpolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetSslPolicyCall) RequestId(requestId string) *TargetHttpsProxiesSetSslPolicyCall { - 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 -// details. -func (c *TargetHttpsProxiesSetSslPolicyCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetSslPolicyCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose URL map -// is -// -// to be set. -func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { - c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall { - 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 -// details. -func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { - c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target instances. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { - c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetInstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetInstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetInstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstanceAggregatedList.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 *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, 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 := &TargetInstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetInstancesDeleteCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetInstance resource. -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to delete. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { - c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall { - 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 -// details. -func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesGetCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetInstance resource. -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to return. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { - c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstance.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 *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, 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 := &TargetInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesInsertCall struct { - s *Service - project string - zone string - targetinstance *TargetInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetInstance resource in the specified project and zone -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { - c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetinstance = targetinstance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall { - 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 -// details. -func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetinstance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetInstance resources available to the -// specified -// project and zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { - c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetInstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetInstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstanceList.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 *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, 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 := &TargetInstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetInstancesSetSecurityPolicyCall struct { - s *Service - project string - zone string - targetInstance string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified target -// instance. For more information, seeGoogle -// Cloud Armor Overview -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) SetSecurityPolicy(project string, zone string, targetInstance string, securitypolicyreference *SecurityPolicyReference) *TargetInstancesSetSecurityPolicyCall { - c := &TargetInstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesSetSecurityPolicyCall) RequestId(requestId string) *TargetInstancesSetSecurityPolicyCall { - 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 -// details. -func (c *TargetInstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetInstancesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesSetSecurityPolicyCall) Context(ctx context.Context) *TargetInstancesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { - c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAddHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddHealthCheck: Adds health check URLs to a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the target pool to add a health check to. -func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { - c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall { - 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 -// details. -func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsaddhealthcheckrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.addHealthCheck", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addHealthCheck" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsAddHealthCheckCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.addHealthCheck", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAddInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstance: Adds an instance to a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to add instances to. -func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { - c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall { - 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 -// details. -func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAddInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsaddinstancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.addInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsAddInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.addInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target pools. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { - c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetPoolsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetPoolsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetPoolsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolAggregatedList.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 *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, 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 := &TargetPoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetPoolsDeleteCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to delete. -func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { - c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall { - 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 -// details. -func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsGetCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to return. -func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { - c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPool.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 *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, 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 := &TargetPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsGetHealthCall struct { - s *Service - project string - region string - targetPool string - instancereference *InstanceReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for each IP for -// the -// instance that is referenced by the given target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to which the queried instance -// belongs. -func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { - c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.instancereference = instancereference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancereference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolInstanceHealth.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 *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, 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 := &TargetPoolInstanceHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsInsertCall struct { - s *Service - project string - region string - targetpool *TargetPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target pool in the specified project and region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { - c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetpool = targetpool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall { - 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 -// details. -func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target pools available to the specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { - c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetPoolsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetPoolsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolList.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 *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, 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 := &TargetPoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetPoolsRemoveHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveHealthCheck: Removes health check URL from a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetPool: Name of the target pool to remove health checks from. -func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { - c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall { - 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 -// details. -func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsremovehealthcheckrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.removeHealthCheck", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeHealthCheck" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsRemoveHealthCheckCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.removeHealthCheck", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsRemoveInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstance: Removes instance URL from a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to remove instances from. -func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { - c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall { - 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 -// details. -func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsremoveinstancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.removeInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsRemoveInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.removeInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsSetBackupCall struct { - s *Service - project string - region string - targetPool string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackup: Changes a backup target pool's configurations. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to set a backup pool for. -func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { - c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetreference = targetreference - return c -} - -// FailoverRatio sets the optional parameter "failoverRatio": New failoverRatio -// value for the target pool. -func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { - c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall { - 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 -// details. -func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsSetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.setBackup", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsSetBackupCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.setBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsSetSecurityPolicyCall struct { - s *Service - project string - region string - targetPool string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified target pool. -// For more information, seeGoogle -// Cloud Armor Overview -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to which the security policy -// should be -// -// set. The name should conform to RFC1035. -func (r *TargetPoolsService) SetSecurityPolicy(project string, region string, targetPool string, securitypolicyreference *SecurityPolicyReference) *TargetPoolsSetSecurityPolicyCall { - c := &TargetPoolsSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsSetSecurityPolicyCall) RequestId(requestId string) *TargetPoolsSetSecurityPolicyCall { - 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 -// details. -func (c *TargetPoolsSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetPoolsSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsSetSecurityPolicyCall) Context(ctx context.Context) *TargetPoolsSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { - c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesDeleteCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetSslProxy resource. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource to delete. -func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { - c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall { - 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 -// details. -func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesGetCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetSslProxy resource. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource to return. -func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { - c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetSslProxy.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 *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, 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 := &TargetSslProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesInsertCall struct { - s *Service - project string - targetsslproxy *TargetSslProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetSslProxy resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { - c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetsslproxy = targetsslproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall { - 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 -// details. -func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetSslProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { - c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetSslProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetSslProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetSslProxyList.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 *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, 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 := &TargetSslProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetSslProxiesSetBackendServiceCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose BackendService -// resource -// -// is to be set. -func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { - c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall { - 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 -// details. -func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setBackendService", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setBackendService" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetBackendServiceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setBackendService", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetCertificateMapCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetcertificatemaprequest *TargetSslProxiesSetCertificateMapRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCertificateMap: Changes the Certificate Map for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose CertificateMap -// is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetSslProxiesService) SetCertificateMap(project string, targetSslProxy string, targetsslproxiessetcertificatemaprequest *TargetSslProxiesSetCertificateMapRequest) *TargetSslProxiesSetCertificateMapCall { - c := &TargetSslProxiesSetCertificateMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetcertificatemaprequest = targetsslproxiessetcertificatemaprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetCertificateMapCall) RequestId(requestId string) *TargetSslProxiesSetCertificateMapCall { - 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 -// details. -func (c *TargetSslProxiesSetCertificateMapCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetCertificateMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetCertificateMapCall) Context(ctx context.Context) *TargetSslProxiesSetCertificateMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetCertificateMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetCertificateMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetcertificatemaprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setCertificateMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setCertificateMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetCertificateMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setCertificateMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetProxyHeaderCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose ProxyHeader is -// to be set. -func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { - c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall { - 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 -// details. -func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setProxyHeader", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setProxyHeader" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetProxyHeaderCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setProxyHeader", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetSslCertificatesCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose SslCertificate -// resource -// -// is to be set. -func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { - c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall { - 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 -// details. -func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetSslPolicyCall struct { - s *Service - project string - targetSslProxy string - sslpolicyreference *SslPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslPolicy: Sets the SSL policy for TargetSslProxy. The SSL policy -// specifies the -// server-side support for SSL features. This affects connections -// between -// clients and the load balancer. They do not affect the -// connection between the load balancer and the backends. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose SSL policy is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetSslProxiesService) SetSslPolicy(project string, targetSslProxy string, sslpolicyreference *SslPolicyReference) *TargetSslProxiesSetSslPolicyCall { - c := &TargetSslProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.sslpolicyreference = sslpolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetSslPolicyCall) RequestId(requestId string) *TargetSslProxiesSetSslPolicyCall { - 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 -// details. -func (c *TargetSslProxiesSetSslPolicyCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetSslPolicyCall) Context(ctx context.Context) *TargetSslProxiesSetSslPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { - c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetSslProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetSslProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetTcpProxy resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetTcpProxiesService) AggregatedList(project string) *TargetTcpProxiesAggregatedListCall { - c := &TargetTcpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetTcpProxiesAggregatedListCall) Filter(filter string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetTcpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetTcpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetTcpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetTcpProxiesAggregatedListCall) PageToken(pageToken string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetTcpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetTcpProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesAggregatedListCall) Context(ctx context.Context) *TargetTcpProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyAggregatedList.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 *TargetTcpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyAggregatedList, 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 := &TargetTcpProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetTcpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetTcpProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetTcpProxiesDeleteCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to delete. -func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { - c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall { - 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 -// details. -func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesGetCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to return. -func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { - c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxy.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 *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, 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 := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesInsertCall struct { - s *Service - project string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { - c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targettcpproxy = targettcpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall { - 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 -// details. -func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetTcpProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { - c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetTcpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.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 *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, 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 := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetTcpProxiesSetBackendServiceCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetTcpProxy. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource whose BackendService -// resource -// -// is to be set. -func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { - c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall { - 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 -// details. -func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") - 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{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setBackendService", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setBackendService" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetBackendServiceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setBackendService", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesSetProxyHeaderCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource whose ProxyHeader is -// to be set. -func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { - c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall { - 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 -// details. -func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") - 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{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setProxyHeader", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setProxyHeader" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetProxyHeaderCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setProxyHeader", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetTcpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetTcpProxiesTestIamPermissionsCall { - c := &TargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetTcpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetTcpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target VPN gateways. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { - c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetVpnGatewaysAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetVpnGatewaysAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetVpnGatewaysAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayAggregatedList.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 *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, 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 := &TargetVpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetVpnGatewaysDeleteCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetVpnGateway: Name of the target VPN gateway to delete. -func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { - c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall { - 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 -// details. -func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysGetCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetVpnGateway: Name of the target VPN gateway to return. -func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { - c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGateway.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 *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, 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 := &TargetVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysInsertCall struct { - s *Service - project string - region string - targetvpngateway *TargetVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target VPN gateway in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { - c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetvpngateway = targetvpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall { - 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 -// details. -func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetvpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target VPN gateways available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { - c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayList.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 *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, 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 := &TargetVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetVpnGatewaysSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a TargetVpnGateway. To learn more about -// labels, read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetVpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *TargetVpnGatewaysSetLabelsCall { - c := &TargetVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysSetLabelsCall) RequestId(requestId string) *TargetVpnGatewaysSetLabelsCall { - 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 -// details. -func (c *TargetVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysSetLabelsCall) Context(ctx context.Context) *TargetVpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { - c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all UrlMap resources, regional and -// global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *UrlMapsService) AggregatedList(project string) *UrlMapsAggregatedListCall { - c := &UrlMapsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *UrlMapsAggregatedListCall) Filter(filter string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *UrlMapsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *UrlMapsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *UrlMapsAggregatedListCall) MaxResults(maxResults int64) *UrlMapsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *UrlMapsAggregatedListCall) OrderBy(orderBy string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *UrlMapsAggregatedListCall) PageToken(pageToken string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *UrlMapsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *UrlMapsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *UrlMapsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *UrlMapsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsAggregatedListCall) Fields(s ...googleapi.Field) *UrlMapsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsAggregatedListCall) IfNoneMatch(entityTag string) *UrlMapsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsAggregatedListCall) Context(ctx context.Context) *UrlMapsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsAggregatedList.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 *UrlMapsAggregatedListCall) Do(opts ...googleapi.CallOption) (*UrlMapsAggregatedList, 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 := &UrlMapsAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *UrlMapsAggregatedListCall) Pages(ctx context.Context, f func(*UrlMapsAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type UrlMapsDeleteCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to delete. -func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { - c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall { - 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 -// details. -func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsGetCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to return. -func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { - c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMap.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 *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, 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 := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsInsertCall struct { - s *Service - project string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { - c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall { - 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 -// details. -func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsInvalidateCacheCall struct { - s *Service - project string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, invalidating the -// specified path, -// scoped to the specified UrlMap. -// -// For more information, see Invalidating cached -// content (/cdn/docs/invalidating-cached-content). -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap scoping this request. -func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { - c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall { - 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 -// details. -func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}/invalidateCache") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.invalidateCache", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.invalidateCache" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsInvalidateCacheCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.invalidateCache", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *UrlMapsService) List(project string) *UrlMapsListCall { - c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *UrlMapsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *UrlMapsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapList.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 *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, 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 := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type UrlMapsPatchCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to patch. -func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { - c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall { - 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 -// details. -func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { - c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsUpdateCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included in -// the -// request. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { - c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall { - 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 -// details. -func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsValidateCall struct { - s *Service - project string - urlMap string - urlmapsvalidaterequest *UrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the -// provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { - c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmapsvalidaterequest = urlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapsvalidaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}/validate") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.validate" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.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 *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, 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 := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.validate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN gateways. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { - c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnGatewaysAggregatedListCall) Filter(filter string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *VpnGatewaysAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnGatewaysAggregatedListCall) OrderBy(orderBy string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnGatewaysAggregatedListCall) PageToken(pageToken string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnGatewaysAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *VpnGatewaysAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *VpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysAggregatedListCall) Context(ctx context.Context) *VpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewayAggregatedList.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 *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayAggregatedList, 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 := &VpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*VpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnGatewaysDeleteCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to delete. -func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { - c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysDeleteCall) RequestId(requestId string) *VpnGatewaysDeleteCall { - 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 -// details. -func (c *VpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *VpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysDeleteCall) Context(ctx context.Context) *VpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysGetCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to return. -func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { - c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysGetCall) Fields(s ...googleapi.Field) *VpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysGetCall) IfNoneMatch(entityTag string) *VpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysGetCall) Context(ctx context.Context) *VpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGateway.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 *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, 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 := &VpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysGetStatusCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetStatus: Returns the status for the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to return. -func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { - c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysGetStatusCall) Fields(s ...googleapi.Field) *VpnGatewaysGetStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysGetStatusCall) IfNoneMatch(entityTag string) *VpnGatewaysGetStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysGetStatusCall) Context(ctx context.Context) *VpnGatewaysGetStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysGetStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.getStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.getStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewaysGetStatusResponse.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 *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGatewaysGetStatusResponse, 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 := &VpnGatewaysGetStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.getStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysInsertCall struct { - s *Service - project string - region string - vpngateway *VpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VPN gateway in the specified project and region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { - c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpngateway = vpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysInsertCall) RequestId(requestId string) *VpnGatewaysInsertCall { - 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 -// details. -func (c *VpnGatewaysInsertCall) Fields(s ...googleapi.Field) *VpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysInsertCall) Context(ctx context.Context) *VpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VPN gateways available to the specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { - c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnGatewaysListCall) Filter(filter string) *VpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnGatewaysListCall) MaxResults(maxResults int64) *VpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnGatewaysListCall) OrderBy(orderBy string) *VpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnGatewaysListCall) PageToken(pageToken string) *VpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysListCall) Fields(s ...googleapi.Field) *VpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysListCall) IfNoneMatch(entityTag string) *VpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysListCall) Context(ctx context.Context) *VpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewayList.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 *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, 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 := &VpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnGatewaysListCall) Pages(ctx context.Context, f func(*VpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnGatewaysSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a VpnGateway. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { - c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysSetLabelsCall) RequestId(requestId string) *VpnGatewaysSetLabelsCall { - 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 -// details. -func (c *VpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *VpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysSetLabelsCall) Context(ctx context.Context) *VpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnGatewaysTestIamPermissionsCall { - c := &VpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *VpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *VpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN tunnels. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { - c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *VpnTunnelsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnTunnelsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *VpnTunnelsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnelAggregatedList.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 *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, 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 := &VpnTunnelAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnTunnelsDeleteCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VpnTunnel resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnTunnel: Name of the VpnTunnel resource to delete. -func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { - c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall { - 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 -// details. -func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsGetCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VpnTunnel resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnTunnel: Name of the VpnTunnel resource to return. -func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { - c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnel.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 *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, 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 := &VpnTunnel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsInsertCall struct { - s *Service - project string - region string - vpntunnel *VpnTunnel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VpnTunnel resource in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { - c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpntunnel = vpntunnel - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall { - 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 -// details. -func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vpntunnel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VpnTunnel resources contained in the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { - c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnTunnelsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnTunnelsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnelList.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 *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, 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 := &VpnTunnelList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnTunnelsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a VpnTunnel. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnTunnelsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnTunnelsSetLabelsCall { - c := &VpnTunnelsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsSetLabelsCall) RequestId(requestId string) *VpnTunnelsSetLabelsCall { - 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 -// details. -func (c *VpnTunnelsSetLabelsCall) Fields(s ...googleapi.Field) *VpnTunnelsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsSetLabelsCall) Context(ctx context.Context) *VpnTunnelsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { - c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsDeleteCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified wire group in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the wire group resource to delete. -func (r *WireGroupsService) Delete(project string, crossSiteNetwork string, wireGroup string) *WireGroupsDeleteCall { - c := &WireGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsDeleteCall) RequestId(requestId string) *WireGroupsDeleteCall { - 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 -// details. -func (c *WireGroupsDeleteCall) Fields(s ...googleapi.Field) *WireGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsDeleteCall) Context(ctx context.Context) *WireGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsGetCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified wire group resource in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the wire group resource to return. -func (r *WireGroupsService) Get(project string, crossSiteNetwork string, wireGroup string) *WireGroupsGetCall { - c := &WireGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *WireGroupsGetCall) Fields(s ...googleapi.Field) *WireGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *WireGroupsGetCall) IfNoneMatch(entityTag string) *WireGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsGetCall) Context(ctx context.Context) *WireGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WireGroup.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 *WireGroupsGetCall) Do(opts ...googleapi.CallOption) (*WireGroup, 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 := &WireGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsInsertCall struct { - s *Service - project string - crossSiteNetwork string - wiregroup *WireGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a wire group in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -func (r *WireGroupsService) Insert(project string, crossSiteNetwork string, wiregroup *WireGroup) *WireGroupsInsertCall { - c := &WireGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wiregroup = wiregroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsInsertCall) RequestId(requestId string) *WireGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. -func (c *WireGroupsInsertCall) ValidateOnly(validateOnly bool) *WireGroupsInsertCall { - 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 -// details. -func (c *WireGroupsInsertCall) Fields(s ...googleapi.Field) *WireGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsInsertCall) Context(ctx context.Context) *WireGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wiregroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsListCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the wire groups for a project in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -func (r *WireGroupsService) List(project string, crossSiteNetwork string) *WireGroupsListCall { - c := &WireGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *WireGroupsListCall) Filter(filter string) *WireGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *WireGroupsListCall) MaxResults(maxResults int64) *WireGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *WireGroupsListCall) OrderBy(orderBy string) *WireGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *WireGroupsListCall) PageToken(pageToken string) *WireGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *WireGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *WireGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *WireGroupsListCall) Fields(s ...googleapi.Field) *WireGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *WireGroupsListCall) IfNoneMatch(entityTag string) *WireGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsListCall) Context(ctx context.Context) *WireGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *WireGroupList.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 *WireGroupsListCall) Do(opts ...googleapi.CallOption) (*WireGroupList, 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 := &WireGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *WireGroupsListCall) Pages(ctx context.Context, f func(*WireGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type WireGroupsPatchCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - wiregroup *WireGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified wire group resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the WireGroups resource to patch. -func (r *WireGroupsService) Patch(project string, crossSiteNetwork string, wireGroup string, wiregroup *WireGroup) *WireGroupsPatchCall { - c := &WireGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - c.wiregroup = wiregroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsPatchCall) RequestId(requestId string) *WireGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *WireGroupsPatchCall) UpdateMask(updateMask string) *WireGroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. -func (c *WireGroupsPatchCall) ValidateOnly(validateOnly bool) *WireGroupsPatchCall { - 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 -// details. -func (c *WireGroupsPatchCall) Fields(s ...googleapi.Field) *WireGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsPatchCall) Context(ctx context.Context) *WireGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wiregroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneFolderOperationsGetCall struct { - s *Service - folder string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. -// -// - folder: Folder ID for this request. -// - operation: Name of the Operations resource to return. -// - zone: Name of the zone for this request. -func (r *ZoneFolderOperationsService) Get(folder string, zone string, operation string) *ZoneFolderOperationsGetCall { - c := &ZoneFolderOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.folder = folder - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneFolderOperationsGetCall) Fields(s ...googleapi.Field) *ZoneFolderOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneFolderOperationsGetCall) IfNoneMatch(entityTag string) *ZoneFolderOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneFolderOperationsGetCall) Context(ctx context.Context) *ZoneFolderOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneFolderOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneFolderOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+folder}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "folder": c.folder, - "zone": c.zone, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneFolderOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneFolderOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneFolderOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneFolderOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneFolderOperationsListCall struct { - s *Service - folder string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// folder. -// -// - folder: Folder ID for this request. -// - zone: Name of the zone for request. -func (r *ZoneFolderOperationsService) List(folder string, zone string) *ZoneFolderOperationsListCall { - c := &ZoneFolderOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.folder = folder - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneFolderOperationsListCall) Filter(filter string) *ZoneFolderOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneFolderOperationsListCall) MaxResults(maxResults int64) *ZoneFolderOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneFolderOperationsListCall) OrderBy(orderBy string) *ZoneFolderOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneFolderOperationsListCall) PageToken(pageToken string) *ZoneFolderOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneFolderOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneFolderOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneFolderOperationsListCall) Fields(s ...googleapi.Field) *ZoneFolderOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneFolderOperationsListCall) IfNoneMatch(entityTag string) *ZoneFolderOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneFolderOperationsListCall) Context(ctx context.Context) *ZoneFolderOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneFolderOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneFolderOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+folder}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "folder": c.folder, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneFolderOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneFolderOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *ZoneFolderOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneFolderOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneFolderOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified zone-specific Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Delete(project string, zone string, operationid string) *ZoneOperationsDeleteCall { - c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Get(project string, zone string, operationid string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for request. -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneOperationsWaitCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method waits for no more than the -// 2 minutes and then returns the current state of the -// operation, which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Wait(project string, zone string, operationid string) *ZoneOperationsWaitCall { - c := &ZoneOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsWaitCall) Fields(s ...googleapi.Field) *ZoneOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsWaitCall) Context(ctx context.Context) *ZoneOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneOrganizationOperationsGetCall struct { - s *Service - organization string - zone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. -// -// - operation: Name of the Operations resource to return. Parent is derived -// from this -// -// field. -// - organization: Organization ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOrganizationOperationsService) Get(organization string, zone string, operation string) *ZoneOrganizationOperationsGetCall { - c := &ZoneOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.organization = organization - c.zone = zone - c.operation = operation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOrganizationOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOrganizationOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOrganizationOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOrganizationOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOrganizationOperationsGetCall) Context(ctx context.Context) *ZoneOrganizationOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOrganizationOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+organization}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "organization": c.organization, - "zone": c.zone, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOrganizationOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOrganizationOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneOrganizationOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOrganizationOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneOrganizationOperationsListCall struct { - s *Service - organization string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// organization. -// -// - organization: Organization ID for this request. -// - zone: Name of the zone for request. -func (r *ZoneOrganizationOperationsService) List(organization string, zone string) *ZoneOrganizationOperationsListCall { - c := &ZoneOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.organization = organization - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneOrganizationOperationsListCall) Filter(filter string) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneOrganizationOperationsListCall) MaxResults(maxResults int64) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneOrganizationOperationsListCall) OrderBy(orderBy string) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneOrganizationOperationsListCall) PageToken(pageToken string) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneOrganizationOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOrganizationOperationsListCall) Fields(s ...googleapi.Field) *ZoneOrganizationOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOrganizationOperationsListCall) IfNoneMatch(entityTag string) *ZoneOrganizationOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOrganizationOperationsListCall) Context(ctx context.Context) *ZoneOrganizationOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOrganizationOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{+organization}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "organization": c.organization, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOrganizationOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOrganizationOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *ZoneOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOrganizationOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneOrganizationOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneQueuedResourcesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the queued resources -// in a project -// across all zones. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ZoneQueuedResourcesService) AggregatedList(project string) *ZoneQueuedResourcesAggregatedListCall { - c := &ZoneQueuedResourcesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneQueuedResourcesAggregatedListCall) Filter(filter string) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ZoneQueuedResourcesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneQueuedResourcesAggregatedListCall) MaxResults(maxResults int64) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneQueuedResourcesAggregatedListCall) OrderBy(orderBy string) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneQueuedResourcesAggregatedListCall) PageToken(pageToken string) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneQueuedResourcesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ZoneQueuedResourcesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneQueuedResourcesAggregatedListCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneQueuedResourcesAggregatedListCall) IfNoneMatch(entityTag string) *ZoneQueuedResourcesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesAggregatedListCall) Context(ctx context.Context) *ZoneQueuedResourcesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/queuedResources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueuedResourcesAggregatedList.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 *ZoneQueuedResourcesAggregatedListCall) Do(opts ...googleapi.CallOption) (*QueuedResourcesAggregatedList, 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 := &QueuedResourcesAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneQueuedResourcesAggregatedListCall) Pages(ctx context.Context, f func(*QueuedResourcesAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneQueuedResourcesCancelCall struct { - s *Service - project string - zone string - queuedResource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a QueuedResource. Only a resource in ACCEPTED state may -// be -// cancelled. -// -// - project: Project ID for this request. -// - queuedResource: Name of the QueuedResource to cancel. -// - zone: Name of the zone for this request. -func (r *ZoneQueuedResourcesService) Cancel(project string, zone string, queuedResource string) *ZoneQueuedResourcesCancelCall { - c := &ZoneQueuedResourcesCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.queuedResource = queuedResource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneQueuedResourcesCancelCall) RequestId(requestId string) *ZoneQueuedResourcesCancelCall { - 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 -// details. -func (c *ZoneQueuedResourcesCancelCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesCancelCall) Context(ctx context.Context) *ZoneQueuedResourcesCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "queuedResource": c.queuedResource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneQueuedResourcesCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneQueuedResourcesDeleteCall struct { - s *Service - project string - zone string - queuedResource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a QueuedResource. For a QueuedResource in ACCEPTED state, -// call -// cancel on the resource before deleting, to make sure no VMs have -// been -// provisioned and may require cleaning up. For a QueuedResource -// in -// PROVISIONING state the request to delete is registered for -// execution -// following the provisioning. -// -// - project: Project ID for this request. -// - queuedResource: Name of the QueuedResource to delete. -// - zone: Name of the zone for this request. -func (r *ZoneQueuedResourcesService) Delete(project string, zone string, queuedResource string) *ZoneQueuedResourcesDeleteCall { - c := &ZoneQueuedResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.queuedResource = queuedResource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneQueuedResourcesDeleteCall) RequestId(requestId string) *ZoneQueuedResourcesDeleteCall { - 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 -// details. -func (c *ZoneQueuedResourcesDeleteCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesDeleteCall) Context(ctx context.Context) *ZoneQueuedResourcesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "queuedResource": c.queuedResource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneQueuedResourcesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneQueuedResourcesGetCall struct { - s *Service - project string - zone string - queuedResource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified QueuedResource resource. -// -// - project: Project ID for this request. -// - queuedResource: Name of the QueuedResource resource to return. -// - zone: Name of the zone for this request. -func (r *ZoneQueuedResourcesService) Get(project string, zone string, queuedResource string) *ZoneQueuedResourcesGetCall { - c := &ZoneQueuedResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.queuedResource = queuedResource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneQueuedResourcesGetCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneQueuedResourcesGetCall) IfNoneMatch(entityTag string) *ZoneQueuedResourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesGetCall) Context(ctx context.Context) *ZoneQueuedResourcesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "queuedResource": c.queuedResource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueuedResource.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 *ZoneQueuedResourcesGetCall) Do(opts ...googleapi.CallOption) (*QueuedResource, 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 := &QueuedResource{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneQueuedResourcesInsertCall struct { - s *Service - project string - zone string - queuedresource *QueuedResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a QueuedResource. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneQueuedResourcesService) Insert(project string, zone string, queuedresource *QueuedResource) *ZoneQueuedResourcesInsertCall { - c := &ZoneQueuedResourcesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.queuedresource = queuedresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneQueuedResourcesInsertCall) RequestId(requestId string) *ZoneQueuedResourcesInsertCall { - 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 -// details. -func (c *ZoneQueuedResourcesInsertCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesInsertCall) Context(ctx context.Context) *ZoneQueuedResourcesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.queuedresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneQueuedResourcesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneQueuedResourcesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of QueuedResource resources. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneQueuedResourcesService) List(project string, zone string) *ZoneQueuedResourcesListCall { - c := &ZoneQueuedResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneQueuedResourcesListCall) Filter(filter string) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneQueuedResourcesListCall) MaxResults(maxResults int64) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneQueuedResourcesListCall) OrderBy(orderBy string) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneQueuedResourcesListCall) PageToken(pageToken string) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneQueuedResourcesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneQueuedResourcesListCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneQueuedResourcesListCall) IfNoneMatch(entityTag string) *ZoneQueuedResourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneQueuedResourcesListCall) Context(ctx context.Context) *ZoneQueuedResourcesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneQueuedResourcesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneQueuedResourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneQueuedResources.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueuedResourceList.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 *ZoneQueuedResourcesListCall) Do(opts ...googleapi.CallOption) (*QueuedResourceList, 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 := &QueuedResourceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneQueuedResources.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneQueuedResourcesListCall) Pages(ctx context.Context, f func(*QueuedResourceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneVmExtensionPoliciesDeleteCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a specified zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the zone VM extension policy to delete. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Delete(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesDeleteCall { - c := &ZoneVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesDeleteCall) RequestId(requestId string) *ZoneVmExtensionPoliciesDeleteCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesGetCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves details of a specific zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the VM extension policy resource to return. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Get(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesGetCall { - c := &ZoneVmExtensionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneVmExtensionPoliciesGetCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneVmExtensionPoliciesGetCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesGetCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicy.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 *ZoneVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicy, 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 := &VmExtensionPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesInsertCall struct { - s *Service - project string - zone string - vmextensionpolicy *VmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new zone-level VM extension policy within a project. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Insert(project string, zone string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesInsertCall { - c := &ZoneVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmextensionpolicy = vmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesInsertCall) RequestId(requestId string) *ZoneVmExtensionPoliciesInsertCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesInsertCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all VM extension policies within a specific zone for a project. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) List(project string, zone string) *ZoneVmExtensionPoliciesListCall { - c := &ZoneVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneVmExtensionPoliciesListCall) Filter(filter string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneVmExtensionPoliciesListCall) MaxResults(maxResults int64) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneVmExtensionPoliciesListCall) OrderBy(orderBy string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneVmExtensionPoliciesListCall) PageToken(pageToken string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesListCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicyList.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 *ZoneVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicyList, 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 := &VmExtensionPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*VmExtensionPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneVmExtensionPoliciesUpdateCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - vmextensionpolicy *VmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Modifies an existing zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the zone VM extension policy to update. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Update(project string, zone string, vmExtensionPolicy string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesUpdateCall { - c := &ZoneVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - c.vmextensionpolicy = vmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesUpdateCall) RequestId(requestId string) *ZoneVmExtensionPoliciesUpdateCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - 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{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZonesGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Zone resource. -// -// - project: Project ID for this request. -// - zone: Name of the zone resource to return. -func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { - c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zones.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Zone.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 *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, 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 := &Zone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zones.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources available to the specified -// project. -// -// - project: Project ID for this request. -func (r *ZonesService) List(project string) *ZonesListCall { - c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZonesListCall) Filter(filter string) *ZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZonesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ZoneList.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 *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, 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 := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json deleted file mode 100644 index ed0fdb34e65a7..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ /dev/null @@ -1,111909 +0,0 @@ -{ - "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." - }, - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Cloud Storage and see the email address for your Google Account" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Cloud Storage and see the email address of your Google Account" - } - } - } - }, - "basePath": "/compute/beta/", - "baseUrl": "https://compute.googleapis.com/compute/beta/", - "batchPath": "batch/compute/beta", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/compute/", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "id": "compute:beta", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://compute.mtls.googleapis.com/", - "name": "compute", - "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" - }, - "userIp": { - "description": "Legacy name for parameter that has been superseded by `quotaUser`.", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "acceleratorTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of accelerator types.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/acceleratorTypes", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/acceleratorTypes", - "response": { - "$ref": "AcceleratorTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified accelerator type.", - "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.get", - "parameterOrder": [ - "project", - "zone", - "acceleratorType" - ], - "parameters": { - "acceleratorType": { - "description": "Name of the accelerator type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of accelerator types that are available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", - "httpMethod": "GET", - "id": "compute.acceleratorTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/acceleratorTypes", - "response": { - "$ref": "AcceleratorTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "addresses": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of addresses.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/addresses", - "httpMethod": "GET", - "id": "compute.addresses.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/addresses", - "response": { - "$ref": "AddressAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - "httpMethod": "DELETE", - "id": "compute.addresses.delete", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - "httpMethod": "GET", - "id": "compute.addresses.get", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}", - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an address resource in the specified project by using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/addresses", - "httpMethod": "POST", - "id": "compute.addresses.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses", - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of addresses contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/addresses", - "httpMethod": "GET", - "id": "compute.addresses.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/addresses", - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified address resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", - "httpMethod": "POST", - "id": "compute.addresses.move", - "parameterOrder": [ - "project", - "region", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to move.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Source project ID which the Address is moved from.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{address}/move", - "request": { - "$ref": "RegionAddressesMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an Address. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.addresses.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.addresses.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "advice": { - "methods": { - "calendarMode": { - "description": "Advise how, where and when to create the requested amount of instances\nwith specified accelerators, within the specified time and location limits.\nThe method recommends creating future reservations for the requested\nresources.", - "flatPath": "projects/{project}/regions/{region}/advice/calendarMode", - "httpMethod": "POST", - "id": "compute.advice.calendarMode", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/advice/calendarMode", - "request": { - "$ref": "CalendarModeAdviceRequest" - }, - "response": { - "$ref": "CalendarModeAdviceResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "autoscalers": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of autoscalers.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/autoscalers", - "httpMethod": "GET", - "id": "compute.autoscalers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/autoscalers", - "response": { - "$ref": "AutoscalerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified autoscaler.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "id": "compute.autoscalers.delete", - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified autoscaler resource.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "id": "compute.autoscalers.get", - "parameterOrder": [ - "project", - "zone", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an autoscaler in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "POST", - "id": "compute.autoscalers.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of autoscalers contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "GET", - "id": "compute.autoscalers.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "response": { - "$ref": "AutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates an autoscaler in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "PATCH", - "id": "compute.autoscalers.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to patch.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.autoscalers.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an autoscaler in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/autoscalers", - "httpMethod": "PUT", - "id": "compute.autoscalers.update", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to update.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendBuckets": { - "methods": { - "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend\nbucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendBuckets.addSignedUrlKey", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all BackendBucket resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/backendBuckets", - "httpMethod": "GET", - "id": "compute.backendBuckets.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/backendBuckets", - "response": { - "$ref": "BackendBucketAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified BackendBucket resource.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "id": "compute.backendBuckets.delete", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend\nbucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendBuckets.deleteSignedUrlKey", - "parameterOrder": [ - "project", - "backendBucket", - "keyName" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "keyName": { - "description": "The name of the Signed URL Key to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified BackendBucket resource.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "id": "compute.backendBuckets.get", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.backendBuckets.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a BackendBucket resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/backendBuckets", - "httpMethod": "POST", - "id": "compute.backendBuckets.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/backendBuckets", - "httpMethod": "GET", - "id": "compute.backendBuckets.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendBuckets", - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend buckets in the specified project.", - "flatPath": "projects/{project}/global/backendBuckets/listUsable", - "httpMethod": "GET", - "id": "compute.backendBuckets.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendBuckets/listUsable", - "response": { - "$ref": "BackendBucketListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "id": "compute.backendBuckets.patch", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setEdgeSecurityPolicy": { - "description": "Sets the edge security policy for the specified backend bucket.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendBuckets.setEdgeSecurityPolicy", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.backendBuckets.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.backendBuckets.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - "httpMethod": "PUT", - "id": "compute.backendBuckets.update", - "parameterOrder": [ - "project", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "backendServices": { - "methods": { - "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend\nservice.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendServices.addSignedUrlKey", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - "request": { - "$ref": "SignedUrlKey" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all BackendService resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/backendServices", - "httpMethod": "GET", - "id": "compute.backendServices.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/backendServices", - "response": { - "$ref": "BackendServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified BackendService resource.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "DELETE", - "id": "compute.backendServices.delete", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend\nservice.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - "httpMethod": "POST", - "id": "compute.backendServices.deleteSignedUrlKey", - "parameterOrder": [ - "project", - "backendService", - "keyName" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the Signed URL Key should be\nadded. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "keyName": { - "description": "The name of the Signed URL Key to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified BackendService resource.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "GET", - "id": "compute.backendServices.get", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveSecurityPolicies": { - "description": "Returns effective security policies applied to this backend service.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", - "httpMethod": "GET", - "id": "compute.backendServices.getEffectiveSecurityPolicies", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the Backend Service for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", - "response": { - "$ref": "BackendServicesGetEffectiveSecurityPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for this\nBackendService.\n\nExample request body:\n\n{\n \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\"\n}", - "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "id": "compute.backendServices.getHealth", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the queried instance belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/getHealth", - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.backendServices.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a BackendService resource in the specified project using\nthe data included in the request. For more information, see\nBackend services overview.", - "flatPath": "projects/{project}/global/backendServices", - "httpMethod": "POST", - "id": "compute.backendServices.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendService resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/backendServices", - "httpMethod": "GET", - "id": "compute.backendServices.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendServices", - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend services in the specified project.", - "flatPath": "projects/{project}/global/backendServices/listUsable", - "httpMethod": "GET", - "id": "compute.backendServices.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/backendServices/listUsable", - "response": { - "$ref": "BackendServiceListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified BackendService resource with the data included in the\nrequest. For more information, see \nBackend services overview. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "PATCH", - "id": "compute.backendServices.patch", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setEdgeSecurityPolicy": { - "description": "Sets the edge security policy for the specified backend service.", - "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setEdgeSecurityPolicy", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the edge security policy\nshould be set. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified backend\nservice. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.backendServices.setSecurityPolicy", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.backendServices.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified BackendService resource with the data included in the\nrequest. For more information, seeBackend\nservices overview.", - "flatPath": "projects/{project}/global/backendServices/{backendService}", - "httpMethod": "PUT", - "id": "compute.backendServices.update", - "parameterOrder": [ - "project", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "crossSiteNetworks": { - "methods": { - "delete": { - "description": "Deletes the specified cross-site network in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "DELETE", - "id": "compute.crossSiteNetworks.delete", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified cross-site network in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "GET", - "id": "compute.crossSiteNetworks.get", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "response": { - "$ref": "CrossSiteNetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a cross-site network in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/crossSiteNetworks", - "httpMethod": "POST", - "id": "compute.crossSiteNetworks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks", - "request": { - "$ref": "CrossSiteNetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the cross-site networks for a project in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks", - "httpMethod": "GET", - "id": "compute.crossSiteNetworks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks", - "response": { - "$ref": "CrossSiteNetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified cross-site network with the data included in\nthe request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "httpMethod": "PATCH", - "id": "compute.crossSiteNetworks.patch", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "description": "Name of the cross-site network to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}", - "request": { - "$ref": "CrossSiteNetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskSettings": { - "methods": { - "get": { - "description": "Get Zonal Disk Settings.", - "flatPath": "projects/{project}/zones/{zone}/diskSettings", - "httpMethod": "GET", - "id": "compute.diskSettings.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskSettings", - "response": { - "$ref": "DiskSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Zonal Disk Settings", - "flatPath": "projects/{project}/zones/{zone}/diskSettings", - "httpMethod": "PATCH", - "id": "compute.diskSettings.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskSettings", - "request": { - "$ref": "DiskSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "diskTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of disk types.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/diskTypes", - "httpMethod": "GET", - "id": "compute.diskTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/diskTypes", - "response": { - "$ref": "DiskTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified disk type.", - "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - "httpMethod": "GET", - "id": "compute.diskTypes.get", - "parameterOrder": [ - "project", - "zone", - "diskType" - ], - "parameters": { - "diskType": { - "description": "Name of the disk type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of disk types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/diskTypes", - "httpMethod": "GET", - "id": "compute.diskTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/diskTypes", - "response": { - "$ref": "DiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "disks": { - "methods": { - "addResourcePolicies": { - "description": "Adds existing resource policies to a disk. You can only add one\npolicy which will be applied to this disk for scheduling snapshot\ncreation.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.disks.addResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - "request": { - "$ref": "DisksAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of persistent disks.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/disks", - "httpMethod": "GET", - "id": "compute.disks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/disks", - "response": { - "$ref": "DiskAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "bulkInsert": { - "description": "Bulk create a set of disks.", - "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", - "httpMethod": "POST", - "id": "compute.disks.bulkInsert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/bulkInsert", - "request": { - "$ref": "BulkInsertDiskResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkSetLabels": { - "description": "Sets the labels on many disks at once. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/disks/bulkSetLabels", - "httpMethod": "POST", - "id": "compute.disks.bulkSetLabels", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/bulkSetLabels", - "request": { - "$ref": "BulkZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk. For regular snapshot\ncreation, consider using snapshots.insert\ninstead, as that method supports more features, such as creating snapshots\nin a project different from the source disk project.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "id": "compute.disks.createSnapshot", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to snapshot.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent snapshot by\ninforming the OS to prepare for the snapshot process.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified persistent disk. Deleting a disk removes its data\npermanently and is irreversible. However, deleting a disk does not\ndelete any snapshots\npreviously made from the disk. You must separatelydelete\nsnapshots.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "DELETE", - "id": "compute.disks.delete", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to delete.", - "location": "path", - "pattern": "\\S{1,66}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified persistent disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "GET", - "id": "compute.disks.get", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the persistent disk to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.disks.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a persistent disk in the specified project using the data\nin the request. You can create a disk from a source\n(sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data disk by\nomitting all properties. You can also create a disk that is larger than\nthe default size by specifying the sizeGb property.", - "flatPath": "projects/{project}/zones/{zone}/disks", - "httpMethod": "POST", - "id": "compute.disks.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceImage": { - "description": "Source image to restore onto a disk. This field is optional.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of persistent disks contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/disks", - "httpMethod": "GET", - "id": "compute.disks.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks", - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from a disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.disks.removeResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", - "request": { - "$ref": "DisksRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the specified persistent disk.\nYou can only increase the size of the disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", - "httpMethod": "POST", - "id": "compute.disks.resize", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", - "request": { - "$ref": "DisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.disks.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a disk. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.disks.setLabels", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startAsyncReplication": { - "description": "Starts asynchronous replication.\nMust be invoked on the primary disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.startAsyncReplication", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - "request": { - "$ref": "DisksStartAsyncReplicationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopAsyncReplication": { - "description": "Stops asynchronous replication.\nCan be invoked either on the primary or on the secondary disk.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.stopAsyncReplication", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopGroupAsyncReplication": { - "description": "Stops asynchronous replication for a consistency group of disks.\nCan be invoked either in the primary or secondary scope.", - "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - "httpMethod": "POST", - "id": "compute.disks.stopGroupAsyncReplication", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request. This must be the zone of the primary\nor secondary disks in the consistency group.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - "request": { - "$ref": "DisksStopGroupAsyncReplicationResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.disks.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified disk with the data included in the request.\nThe update is performed only on selected fields included as part\nof update-mask. Only the following fields can be modified: user_license.", - "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - "httpMethod": "PATCH", - "id": "compute.disks.update", - "parameterOrder": [ - "project", - "zone", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/disks/{disk}", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "externalVpnGateways": { - "methods": { - "delete": { - "description": "Deletes the specified externalVpnGateway.", - "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "httpMethod": "DELETE", - "id": "compute.externalVpnGateways.delete", - "parameterOrder": [ - "project", - "externalVpnGateway" - ], - "parameters": { - "externalVpnGateway": { - "description": "Name of the externalVpnGateways to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified externalVpnGateway. Get a list of available\nexternalVpnGateways by making a list() request.", - "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "httpMethod": "GET", - "id": "compute.externalVpnGateways.get", - "parameterOrder": [ - "project", - "externalVpnGateway" - ], - "parameters": { - "externalVpnGateway": { - "description": "Name of the externalVpnGateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - "response": { - "$ref": "ExternalVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ExternalVpnGateway in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/externalVpnGateways", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways", - "request": { - "$ref": "ExternalVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of ExternalVpnGateway available to the specified\nproject.", - "flatPath": "projects/{project}/global/externalVpnGateways", - "httpMethod": "GET", - "id": "compute.externalVpnGateways.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/externalVpnGateways", - "response": { - "$ref": "ExternalVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.externalVpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addPacketMirroringRule": { - "description": "Inserts a packet mirroring rule into a firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.addRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.firewallPolicies.cloneRules", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.firewallPolicies.delete", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.firewallPolicies.get", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPacketMirroringRule": { - "description": "Gets a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.firewallPolicies.getRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "locations/global/firewallPolicies", - "httpMethod": "POST", - "id": "compute.firewallPolicies.insert", - "parameters": { - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified\nfolder or organization.", - "flatPath": "locations/global/firewallPolicies", - "httpMethod": "GET", - "id": "compute.firewallPolicies.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.", - "flatPath": "locations/global/firewallPolicies/listAssociations", - "httpMethod": "GET", - "id": "compute.firewallPolicies.listAssociations", - "parameters": { - "includeInheritedPolicies": { - "description": "If set to \"true\", the response will contain a list of all associations for\nthe containing folders and the containing organization of the target. The\nparameter has no effect if the target is an organization.", - "location": "query", - "type": "boolean" - }, - "targetResource": { - "description": "The target resource to list associations. It is an organization, or a\nfolder.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/listAssociations", - "response": { - "$ref": "FirewallPoliciesListAssociationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", - "httpMethod": "POST", - "id": "compute.firewallPolicies.move", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "The new parent of the firewall policy. The ID can be either be\n\"folders/[FOLDER_ID]\" if the parent is a folder or\n\"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/move", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.firewallPolicies.patch", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPacketMirroringRule": { - "description": "Patches a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.patchPacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.patchRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified firewall policy.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removeAssociation", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePacketMirroringRule": { - "description": "Deletes a packet mirroring rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removePacketMirroringRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.firewallPolicies.removeRule", - "parameterOrder": [ - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.firewallPolicies.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalOrganizationSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.firewallPolicies.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "(firewallPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "firewalls": { - "methods": { - "delete": { - "description": "Deletes the specified firewall.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "DELETE", - "id": "compute.firewalls.delete", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified firewall.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "GET", - "id": "compute.firewalls.get", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "response": { - "$ref": "Firewall" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a firewall rule in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/firewalls", - "httpMethod": "POST", - "id": "compute.firewalls.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of firewall rules available to the specified\nproject.", - "flatPath": "projects/{project}/global/firewalls", - "httpMethod": "GET", - "id": "compute.firewalls.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/firewalls", - "response": { - "$ref": "FirewallList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified firewall rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "PATCH", - "id": "compute.firewalls.patch", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.firewalls.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified firewall rule with the data included in the\nrequest.\nNote that all fields will be updated if using PUT, even fields that are not\nspecified. To update individual fields, please use PATCH instead.", - "flatPath": "projects/{project}/global/firewalls/{firewall}", - "httpMethod": "PUT", - "id": "compute.firewalls.update", - "parameterOrder": [ - "project", - "firewall" - ], - "parameters": { - "firewall": { - "description": "Name of the firewall rule to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewalls/{firewall}", - "request": { - "$ref": "Firewall" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "forwardingRules": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of forwarding rules.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/forwardingRules", - "httpMethod": "GET", - "id": "compute.forwardingRules.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/forwardingRules", - "response": { - "$ref": "ForwardingRuleAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified ForwardingRule resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "id": "compute.forwardingRules.delete", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified ForwardingRule resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "id": "compute.forwardingRules.get", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ForwardingRule resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules", - "httpMethod": "POST", - "id": "compute.forwardingRules.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of ForwardingRule resources available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules", - "httpMethod": "GET", - "id": "compute.forwardingRules.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules", - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified forwarding rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules. Currently, you can only\npatch the network_tier field.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "id": "compute.forwardingRules.patch", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels,\nread the \nLabeling Resources documentation.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.forwardingRules.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "description": "Changes target URL for forwarding rule. The new target should be of the\nsame type as the old target.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "id": "compute.forwardingRules.setTarget", - "parameterOrder": [ - "project", - "region", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource in which target is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.forwardingRules.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "futureReservations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of future reservations.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/futureReservations", - "httpMethod": "GET", - "id": "compute.futureReservations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/futureReservations", - "response": { - "$ref": "FutureReservationsAggregatedListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "cancel": { - "description": "Cancel the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", - "httpMethod": "POST", - "id": "compute.futureReservations.cancel", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "DELETE", - "id": "compute.futureReservations.delete", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves information about the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "GET", - "id": "compute.futureReservations.get", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "response": { - "$ref": "FutureReservation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new Future Reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations", - "httpMethod": "POST", - "id": "compute.futureReservations.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations", - "request": { - "$ref": "FutureReservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list of all the future reservations that have been configured for the\nspecified project in specified zone.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations", - "httpMethod": "GET", - "id": "compute.futureReservations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations", - "response": { - "$ref": "FutureReservationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified future reservation.", - "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "httpMethod": "PATCH", - "id": "compute.futureReservations.update", - "parameterOrder": [ - "project", - "zone", - "futureReservation" - ], - "parameters": { - "futureReservation": { - "description": "Name of the reservation to update. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", - "request": { - "$ref": "FutureReservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalAddresses": { - "methods": { - "delete": { - "description": "Deletes the specified address resource.", - "flatPath": "projects/{project}/global/addresses/{address}", - "httpMethod": "DELETE", - "id": "compute.globalAddresses.delete", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified address resource.", - "flatPath": "projects/{project}/global/addresses/{address}", - "httpMethod": "GET", - "id": "compute.globalAddresses.get", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}", - "response": { - "$ref": "Address" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an address resource in the specified project by using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/addresses", - "httpMethod": "POST", - "id": "compute.globalAddresses.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses", - "request": { - "$ref": "Address" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of global addresses.", - "flatPath": "projects/{project}/global/addresses", - "httpMethod": "GET", - "id": "compute.globalAddresses.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/addresses", - "response": { - "$ref": "AddressList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified address resource from one project to another project.", - "flatPath": "projects/{project}/global/addresses/{address}/move", - "httpMethod": "POST", - "id": "compute.globalAddresses.move", - "parameterOrder": [ - "project", - "address" - ], - "parameters": { - "address": { - "description": "Name of the address resource to move.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Source project ID which the Address is moved from.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{address}/move", - "request": { - "$ref": "GlobalAddressesMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/addresses/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.globalAddresses.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/addresses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.globalAddresses.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/addresses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalForwardingRules": { - "methods": { - "delete": { - "description": "Deletes the specified GlobalForwardingRule resource.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "DELETE", - "id": "compute.globalForwardingRules.delete", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified GlobalForwardingRule resource. Gets a list of\navailable forwarding rules by making a list() request.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "GET", - "id": "compute.globalForwardingRules.get", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "response": { - "$ref": "ForwardingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a GlobalForwardingRule resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/forwardingRules", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of GlobalForwardingRule resources available to the\nspecified project.", - "flatPath": "projects/{project}/global/forwardingRules", - "httpMethod": "GET", - "id": "compute.globalForwardingRules.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/forwardingRules", - "response": { - "$ref": "ForwardingRuleList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified forwarding rule with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules. Currently, you can only\npatch the network_tier field.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}", - "httpMethod": "PATCH", - "id": "compute.globalForwardingRules.patch", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}", - "request": { - "$ref": "ForwardingRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels,\nread the \nLabeling resources documentation.", - "flatPath": "projects/{project}/global/forwardingRules/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTarget": { - "description": "Changes target URL for the GlobalForwardingRule resource. The new target\nshould be of the same type as the old target.", - "flatPath": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.setTarget", - "parameterOrder": [ - "project", - "forwardingRule" - ], - "parameters": { - "forwardingRule": { - "description": "Name of the ForwardingRule resource in which target is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.globalForwardingRules.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/forwardingRules/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalNetworkEndpointGroups": { - "methods": { - "attachNetworkEndpoints": { - "description": "Attach a network endpoint to the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "GlobalNetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group.Note that the NEG cannot be\ndeleted if there are backend services referencing it.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.globalNetworkEndpointGroups.delete", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach the network endpoint from the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are removing network\nendpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "GlobalNetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.globalNetworkEndpointGroups.get", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/global/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of network endpoint groups that are located in the\nspecified project.", - "flatPath": "projects/{project}/global/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.globalNetworkEndpointGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOperations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all operations.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/operations", - "httpMethod": "GET", - "id": "compute.globalOperations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/operations", - "response": { - "$ref": "OperationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Operations resource.", - "flatPath": "projects/{project}/global/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.globalOperations.delete", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified Operations resource.", - "flatPath": "projects/{project}/global/operations/{operation}", - "httpMethod": "GET", - "id": "compute.globalOperations.get", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\nproject.", - "flatPath": "projects/{project}/global/operations", - "httpMethod": "GET", - "id": "compute.globalOperations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method differs from the\n`GET` method in that it waits for no more than the default\ndeadline (2 minutes) and then returns the current state of the operation,\nwhich might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/global/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.globalOperations.wait", - "parameterOrder": [ - "project", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalOrganizationOperations": { - "methods": { - "delete": { - "description": "Deletes the specified Operations resource.", - "flatPath": "locations/global/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.globalOrganizationOperations.delete", - "parameterOrder": [ - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations\nby making a `list()` request.", - "flatPath": "locations/global/operations/{operation}", - "httpMethod": "GET", - "id": "compute.globalOrganizationOperations.get", - "parameterOrder": [ - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return. Parent is derived from this\nfield.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request. Not used. Parent is derived from resource_id.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within the specified\norganization.", - "flatPath": "locations/global/operations", - "httpMethod": "GET", - "id": "compute.globalOrganizationOperations.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "globalPublicDelegatedPrefixes": { - "methods": { - "delete": { - "description": "Deletes the specified global PublicDelegatedPrefix.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "DELETE", - "id": "compute.globalPublicDelegatedPrefixes.delete", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified global PublicDelegatedPrefix resource.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "GET", - "id": "compute.globalPublicDelegatedPrefixes.get", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "PublicDelegatedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a global PublicDelegatedPrefix in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes", - "httpMethod": "POST", - "id": "compute.globalPublicDelegatedPrefixes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the global PublicDelegatedPrefixes for a project.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.globalPublicDelegatedPrefixes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified global PublicDelegatedPrefix resource with the data\nincluded in the request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "PATCH", - "id": "compute.globalPublicDelegatedPrefixes.patch", - "parameterOrder": [ - "project", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "globalVmExtensionPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all VM Extension Policy resources\navailable to the specified project.\n\nTo prevent failure, it's recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vmExtensionPolicies", - "response": { - "$ref": "VmExtensionPolicyAggregatedListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Purge scoped resources (zonal policies) from a global VM extension\npolicy, and then delete the global VM extension policy. Purge of the scoped\nresources is a pre-condition of the global VM extension policy deletion.\nThe deletion of the global VM extension policy happens after the purge\nrollout is done, so it's not a part of the LRO. It's an automatic process\nthat triggers in the backend.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", - "httpMethod": "POST", - "id": "compute.globalVmExtensionPolicies.delete", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the global VM extension policy to purge scoped resources for.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete", - "request": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutInput" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a global VM extension policy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.get", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the GlobalVmExtensionPolicy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "response": { - "$ref": "GlobalVmExtensionPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new project level GlobalVmExtensionPolicy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies", - "httpMethod": "POST", - "id": "compute.globalVmExtensionPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies", - "request": { - "$ref": "GlobalVmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists global VM extension policies.", - "flatPath": "projects/{project}/global/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.globalVmExtensionPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies", - "response": { - "$ref": "GlobalVmExtensionPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a global VM extension policy.", - "flatPath": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "httpMethod": "PATCH", - "id": "compute.globalVmExtensionPolicies.update", - "parameterOrder": [ - "project", - "globalVmExtensionPolicy" - ], - "parameters": { - "globalVmExtensionPolicy": { - "description": "Name of the global VM extension policy to update.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}", - "request": { - "$ref": "GlobalVmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "healthChecks": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthCheck resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthChecks", - "httpMethod": "GET", - "id": "compute.healthChecks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthChecks", - "response": { - "$ref": "HealthChecksAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthCheck resource.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "id": "compute.healthChecks.delete", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthCheck resource.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "GET", - "id": "compute.healthChecks.get", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/healthChecks", - "httpMethod": "POST", - "id": "compute.healthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/healthChecks", - "httpMethod": "GET", - "id": "compute.healthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/healthChecks", - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "id": "compute.healthChecks.patch", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.healthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "id": "compute.healthChecks.update", - "parameterOrder": [ - "project", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.httpHealthChecks.delete", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HttpHealthCheck resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "GET", - "id": "compute.httpHealthChecks.get", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "response": { - "$ref": "HttpHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpHealthChecks", - "httpMethod": "POST", - "id": "compute.httpHealthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/httpHealthChecks", - "httpMethod": "GET", - "id": "compute.httpHealthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/httpHealthChecks", - "response": { - "$ref": "HttpHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.httpHealthChecks.patch", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.httpHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "httpMethod": "PUT", - "id": "compute.httpHealthChecks.update", - "parameterOrder": [ - "project", - "httpHealthCheck" - ], - "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", - "request": { - "$ref": "HttpHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "httpsHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.httpsHealthChecks.delete", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HttpsHealthCheck resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "GET", - "id": "compute.httpsHealthChecks.get", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "response": { - "$ref": "HttpsHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpsHealthChecks", - "httpMethod": "POST", - "id": "compute.httpsHealthChecks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/httpsHealthChecks", - "httpMethod": "GET", - "id": "compute.httpsHealthChecks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/httpsHealthChecks", - "response": { - "$ref": "HttpsHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.httpsHealthChecks.patch", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.httpsHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "httpMethod": "PUT", - "id": "compute.httpsHealthChecks.update", - "parameterOrder": [ - "project", - "httpsHealthCheck" - ], - "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", - "request": { - "$ref": "HttpsHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "imageFamilyViews": { - "methods": { - "get": { - "description": "Returns the latest image that is part of an image family, is not\ndeprecated and is rolled out in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", - "httpMethod": "GET", - "id": "compute.imageFamilyViews.get", - "parameterOrder": [ - "project", - "zone", - "family" - ], - "parameters": { - "family": { - "description": "Name of the image family to search for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/imageFamilyViews/{family}", - "response": { - "$ref": "ImageFamilyView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "images": { - "methods": { - "delete": { - "description": "Deletes the specified image.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "DELETE", - "id": "compute.images.delete", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deprecate": { - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", - "flatPath": "projects/{project}/global/images/{image}/deprecate", - "httpMethod": "POST", - "id": "compute.images.deprecate", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Image name.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}/deprecate", - "request": { - "$ref": "DeprecationStatus" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified image.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "GET", - "id": "compute.images.get", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getFromFamily": { - "description": "Returns the latest image that is part of an image family and is not\ndeprecated. For more information on image families, seePublic\nimage families documentation.", - "flatPath": "projects/{project}/global/images/family/{family}", - "httpMethod": "GET", - "id": "compute.images.getFromFamily", - "parameterOrder": [ - "project", - "family" - ], - "parameters": { - "family": { - "description": "Name of the image family to search for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "The image project that the image belongs to. For example, to get a CentOS\nimage, specify centos-cloud as the image project.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/family/{family}", - "response": { - "$ref": "Image" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/images/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.images.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an image in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/images", - "httpMethod": "POST", - "id": "compute.images.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "forceCreate": { - "description": "Force image creation if true.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images", - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of custom images\navailable to the specified project. Custom images are images you\ncreate that belong to your project. This method does not\nget any images that belong to other projects, including publicly-available\nimages, like Debian 8. If you want to get a list of publicly-available\nimages, use this method to make a request to the respective image project,\nsuch as debian-cloud or windows-cloud.", - "flatPath": "projects/{project}/global/images", - "httpMethod": "GET", - "id": "compute.images.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The zone query parameter.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "path": "projects/{project}/global/images", - "response": { - "$ref": "ImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified image with the data included in the request.\nOnly the following fields can be modified: family, description,\ndeprecation status.", - "flatPath": "projects/{project}/global/images/{image}", - "httpMethod": "PATCH", - "id": "compute.images.patch", - "parameterOrder": [ - "project", - "image" - ], - "parameters": { - "image": { - "description": "Name of the image resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/images/{image}", - "request": { - "$ref": "Image" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/images/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.images.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an image. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/images/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.images.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/images/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.images.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/images/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagerResizeRequests": { - "methods": { - "cancel": { - "description": "Cancels the specified resize request and removes it from the queue.\nCancelled resize request does no longer wait for the resources to be\nprovisioned. Cancel is only possible for requests that are accepted in the\nqueue.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "httpMethod": "POST", - "id": "compute.instanceGroupManagerResizeRequests.cancel", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to cancel.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified, inactive resize request. Requests that are still\nactive cannot be deleted. Deleting request does not delete instances that\nwere provisioned previously.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "DELETE", - "id": "compute.instanceGroupManagerResizeRequests.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to delete.\nThe name should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified resize request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "GET", - "id": "compute.instanceGroupManagerResizeRequests.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the href=\"/compute/docs/regions-zones/#available\"\u003ezone\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new resize request that starts provisioning VMs immediately\nor queues VM creation.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "POST", - "id": "compute.instanceGroupManagerResizeRequests.insert", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group to which the resize request will\nbe added.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located and where the resize request will be created.\nName should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "request": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of resize requests that are contained in the\nmanaged instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "GET", - "id": "compute.instanceGroupManagerResizeRequests.list", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "response": { - "$ref": "InstanceGroupManagerResizeRequestsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceGroupManagers": { - "methods": { - "abandonInstances": { - "description": "Flags the specified instances to be removed from the\nmanaged instance group. Abandoning an instance does not delete the\ninstance, but it does remove the instance from any target pools that are\napplied by the managed instance group. This method reduces thetargetSize of the managed instance group by the\nnumber of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have\nnot yet been removed from the group. You must separately verify the\nstatus of the abandoning action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.abandonInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "request": { - "$ref": "InstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of managed instance groups and groups them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceGroupManagers", - "response": { - "$ref": "InstanceGroupManagerAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "applyUpdatesToInstances": { - "description": "Applies changes to selected instances on the managed instance group.\nThis method can be used to apply new overrides and/or new versions.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.applyUpdatesToInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located. Should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "request": { - "$ref": "InstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createInstances": { - "description": "Creates instances with per-instance configurations in this managed instance\ngroup. Instances are created using the current instance template. Thecreate instances operation is marked DONE if thecreateInstances request is successful. The underlying actions\ntake additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances\nmethod.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.createInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "request": { - "$ref": "InstanceGroupManagersCreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified managed instance group and all of the instances\nin that group. Note that the instance group must not belong to a\nbackend service. Read\nDeleting an instance group for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "id": "compute.instanceGroupManagers.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "description": "Flags the specified instances in the managed instance group for immediate\ndeletion. The instances are also removed from any target\npools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of\ninstances that you delete. This operation is marked as DONE\nwhen the action is scheduled even if the instances are still being deleted.\nYou must separately verify the status of the deleting action\nwith thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.deleteInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "request": { - "$ref": "InstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configurations for the managed instance\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance\ngroup is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersDeletePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified managed instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAvailableAcceleratorTopologies": { - "description": "Returns information about available accelerator topologies for a given MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", - "parameterOrder": [ - "project", - "zone", - "resourceId" - ], - "parameters": { - "project": { - "description": "Required. Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resourceId": { - "description": "Required. The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Required. The name of thezone where the managed\ninstance group is located.\nName should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies", - "response": { - "$ref": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a managed instance group using the information that you specify\nin the request. After the group is created, instances in the group are\ncreated using the specified instance template.\nThis operation is marked as DONE when the group is created\neven if the instances in the group have not yet been created. You\nmust separately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nA managed instance group can have up to 1000 VM instances per group. Please\ncontact Cloud Support if you need an increase in\nthis limit.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of managed instance groups that are contained within the\nspecified project and zone.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers", - "response": { - "$ref": "InstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given managed\ninstance group. The filter and orderBy query\nparameters are not supported.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "httpMethod": "GET", - "id": "compute.instanceGroupManagers.listErrors", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035, or an\nunsigned long integer: must match regexp pattern:\n(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "response": { - "$ref": "InstanceGroupManagersListErrorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance\nin the list has a currentAction, which indicates the action\nthat the managed instance group is performing on the instance. For example,\nif the group is still creating an instance, the currentAction\nis CREATING. If a previous action failed, the\nlist displays the errors for that failed action. The orderBy\nquery parameter is not supported. The `pageToken` query parameter is\nsupported only if the group's `listManagedInstancesResults` field is set\nto `PAGINATED`.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.listManagedInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "response": { - "$ref": "InstanceGroupManagersListManagedInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configurations defined for the managed\ninstance group. The orderBy query parameter is not supported.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.listPerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "response": { - "$ref": "InstanceGroupManagersListPerInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is patched\neven if the instances in the group are still in the process of being\npatched. You must separately verify the status of the individual instances\nwith thelistManagedInstances\nmethod. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "id": "compute.instanceGroupManagers.patch", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nyou want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPerInstanceConfigs": { - "description": "Inserts or patches per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersPatchPerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "recreateInstances": { - "description": "Flags the specified VM instances in the managed instance group to be\nimmediately recreated. Each instance is recreated using the group's current\nconfiguration. This operation is marked as DONE when the flag\nis set even if the instances have not yet been recreated. You must\nseparately verify the status of each instance by checking itscurrentAction field; for more information, see Checking\nthe status of managed instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.recreateInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "request": { - "$ref": "InstanceGroupManagersRecreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the managed instance group. If you increase the size, the group\ncreates new instances using the current instance template. If you decrease\nthe size, the group deletes instances. The resize operation is markedDONE when the resize actions are scheduled even if the group\nhas not yet added or deleted any instances. You must separately\nverify the status of the creating or deleting\nactions with thelistmanagedinstances\nmethod.\n\nWhen resizing down, the instance group arbitrarily chooses the order in\nwhich VMs are deleted. The group takes into account some VM attributes when\nmaking the selection including:\n\n+ The status of the VM instance.\n+ The health of the VM instance.\n+ The instance template version the VM is based on.\n+ For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resize", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager", - "size" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "size": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "description": "Resizes the managed instance group with advanced configuration options like\ndisabling creation retries. This is an extended version of theresize method.\n\nIf you increase the size of the instance group, the group creates new\ninstances using the current instance template. If you decrease the size,\nthe group deletes instances. The resize operation is markedDONE when the resize actions are scheduled even if the group\nhas not yet added or deleted any instances. You must separately\nverify the status of the creating,creatingWithoutRetries, or deleting actions with\nthe get\norlistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resizeAdvanced", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "request": { - "$ref": "InstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resumeInstances": { - "description": "Flags the specified instances in the managed instance group to be\nresumed. This method increases thetargetSize and decreases the targetSuspendedSize\nof the managed instance group by the number of instances that you resume.\nThe resumeInstances operation is marked DONE if\nthe resumeInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are suspended. For\nexample, if an instance was previously suspended using the suspendInstances\nmethod, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.resumeInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "request": { - "$ref": "InstanceGroupManagersResumeInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "deprecated": true, - "description": "Motifies the autohealing policy for the instances in this managed\ninstance group.\n[Deprecated] This method is deprecated. UseinstanceGroupManagers.patch instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setAutoHealingPolicies", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "request": { - "$ref": "InstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this\ngroup. The templates for existing instances in the group do not change\nunless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance\ngroup are assigned. The target pools automatically apply to all of the\ninstances in the managed instance group. This operation is markedDONE when you make the request even if the instances have not\nyet been added to their target pools. The change might take some time to\napply to all of the instances in the group depending on the size of the\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setTargetPools", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startInstances": { - "description": "Flags the specified instances in the managed instance group to be\nstarted. This method increases thetargetSize and decreases the targetStoppedSize\nof the managed instance group by the number of instances that you start.\nThe startInstances operation is marked DONE if\nthe startInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are stopped. For\nexample, if an instance was previously stopped using the stopInstances\nmethod, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.startInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "request": { - "$ref": "InstanceGroupManagersStartInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately stopped. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetStoppedSize\nof the managed instance group by the number of instances that you stop.\nThe stopInstances operation is marked DONE if\nthe stopInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays stopping the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is stopped.\n\nStopped instances can be started using the startInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.stopInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "request": { - "$ref": "InstanceGroupManagersStopInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspendInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately suspended. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetSuspendedSize\nof the managed instance group by the number of instances that you suspend.\nThe suspendInstances operation is marked DONE if\nthe suspendInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays suspension of the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.suspendInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone where the managed\ninstance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "request": { - "$ref": "InstanceGroupManagersSuspendInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is updated\neven if the instances in the group have not yet been updated. You must\nseparately verify the status of the individual instances with thelistManagedInstances\nmethod.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "id": "compute.instanceGroupManagers.update", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the managed instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "description": "Inserts or updates per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", - "parameterOrder": [ - "project", - "zone", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of thezone\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "request": { - "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the\ninstances in the instance group must be in the same network/subnetwork.\nRead \nAdding instances for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.addInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where you are adding instances.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", - "request": { - "$ref": "InstanceGroupsAddInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceGroups", - "httpMethod": "GET", - "id": "compute.instanceGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceGroups", - "response": { - "$ref": "InstanceGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified instance group. The instances in the group are not\ndeleted. Note that instance group must not belong to a backend service.\nRead\nDeleting an instance group for more information.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "DELETE", - "id": "compute.instanceGroups.delete", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified zonal instance group. Get a list of available zonal\ninstance groups by making a list() request.\n\nFor managed instance groups, use theinstanceGroupManagers\nor regionInstanceGroupManagers\nmethods instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "id": "compute.instanceGroups.get", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups", - "httpMethod": "POST", - "id": "compute.instanceGroups.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere you want to create the instance group.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups", - "request": { - "$ref": "InstanceGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of zonal instance group resources contained within the\nspecified zone.\n\nFor managed instance groups, use theinstanceGroupManagers\nor regionInstanceGroupManagers\nmethods instead.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups", - "httpMethod": "GET", - "id": "compute.instanceGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups", - "response": { - "$ref": "InstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "description": "Lists the instances in the specified instance group.\nThe orderBy query parameter is not supported.\nThe filter query parameter is supported, but only for\nexpressions that use `eq` (equal) or `ne` (not equal) operators.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.listInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroup": { - "description": "The name of the instance group from which you want to generate a list\nof included instances.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances", - "request": { - "$ref": "InstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "InstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeInstances": { - "description": "Removes one or more instances from the specified instance group, but does\nnot delete those instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "httpMethod": "POST", - "id": "compute.instanceGroups.removeInstances", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where the specified instances will be\nremoved.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances", - "request": { - "$ref": "InstanceGroupsRemoveInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNamedPorts": { - "description": "Sets the named ports for the specified instance group.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "id": "compute.instanceGroups.setNamedPorts", - "parameterOrder": [ - "project", - "zone", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the instance group where the named ports are updated.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone\nwhere the instance group is located.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts", - "request": { - "$ref": "InstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instanceSettings": { - "methods": { - "get": { - "description": "Get Instance settings.", - "flatPath": "projects/{project}/zones/{zone}/instanceSettings", - "httpMethod": "GET", - "id": "compute.instanceSettings.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceSettings", - "response": { - "$ref": "InstanceSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Instance settings", - "flatPath": "projects/{project}/zones/{zone}/instanceSettings", - "httpMethod": "PATCH", - "id": "compute.instanceSettings.patch", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The zone scoping this request. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instanceSettings", - "request": { - "$ref": "InstanceSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instanceTemplates": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all InstanceTemplates resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instanceTemplates", - "httpMethod": "GET", - "id": "compute.instanceTemplates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instanceTemplates", - "response": { - "$ref": "InstanceTemplateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is\npermanent and cannot be undone. It is not possible to delete templates\nthat are already in use by a managed instance group.", - "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "id": "compute.instanceTemplates.delete", - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified instance template.", - "flatPath": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "id": "compute.instanceTemplates.get", - "parameterOrder": [ - "project", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instanceTemplates.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance template in the specified project using the\ndata that is included in the request. If you are creating a new template to\nupdate an existing instance group, your new instance template must use the\nsame network or, if applicable, the same subnetwork as the original\ntemplate.", - "flatPath": "projects/{project}/global/instanceTemplates", - "httpMethod": "POST", - "id": "compute.instanceTemplates.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates", - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of instance templates that are contained within\nthe specified project.", - "flatPath": "projects/{project}/global/instanceTemplates", - "httpMethod": "GET", - "id": "compute.instanceTemplates.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates", - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instanceTemplates.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instanceTemplates.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "instances": { - "methods": { - "addAccessConfig": { - "description": "Adds an access config to an instance's network interface.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.addAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to add to this instance.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addNetworkInterface": { - "description": "Adds one dynamic network interface to an active instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface", - "httpMethod": "POST", - "id": "compute.instances.addNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request stored as resource_id.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface", - "request": { - "$ref": "NetworkInterface" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addResourcePolicies": { - "description": "Adds existing resource policies to an instance. You can only add one\npolicy right now which will be applied to this instance for scheduling live\nmigrations.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.instances.addResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", - "request": { - "$ref": "InstancesAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the instances in your project\nacross all regions and zones.\n\nThe performance of this method degrades when a filter is specified on a\nproject that has a very large number of instances.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instances", - "httpMethod": "GET", - "id": "compute.instances.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instances", - "response": { - "$ref": "InstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachDisk": { - "description": "Attaches an existing Disk resource to an instance. You must first\ncreate the disk before you can attach it. It is not possible to create\nand attach a disk at the same time. For more information, readAdding a\npersistent disk to your instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - "httpMethod": "POST", - "id": "compute.instances.attachDisk", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "forceAttach": { - "description": "Whether to force attach the regional disk even if it's currently attached\nto another instance. If you try to force attach a zonal disk to an\ninstance, you will receive an error.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/attachDisk", - "request": { - "$ref": "AttachedDisk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkInsert": { - "description": "Creates multiple instances. Count specifies the number of instances to\ncreate. For more information, seeAbout bulk\ncreation of VMs.", - "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", - "httpMethod": "POST", - "id": "compute.instances.bulkInsert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/bulkInsert", - "request": { - "$ref": "BulkInsertInstanceResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified Instance resource. For more information, seeDeleting\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "DELETE", - "id": "compute.instances.delete", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "noGracefulShutdown": { - "description": "If set to true, Graceful Shutdown is skipped.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteAccessConfig": { - "description": "Deletes an access config from an instance's network interface.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.deleteAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "accessConfig", - "networkInterface" - ], - "parameters": { - "accessConfig": { - "description": "The name of the access config to delete.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteNetworkInterface": { - "description": "Deletes one dynamic network interface from an active instance.\nInstancesDeleteNetworkInterfaceRequest indicates:\n- instance from which to delete, using project+zone+resource_id fields;\n- dynamic network interface to be deleted, using network_interface_name\nfield;", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface", - "httpMethod": "POST", - "id": "compute.instances.deleteNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterfaceName" - ], - "parameters": { - "instance": { - "description": "The instance name for this request stored as resource_id.\nName should conform to RFC1035 or be an unsigned long integer.", - "location": "path", - "required": true, - "type": "string" - }, - "networkInterfaceName": { - "description": "The name of the dynamic network interface to be deleted from the instance.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachDisk": { - "description": "Detaches a disk from an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", - "httpMethod": "POST", - "id": "compute.instances.detachDisk", - "parameterOrder": [ - "project", - "zone", - "instance", - "deviceName" - ], - "parameters": { - "deviceName": { - "description": "The device name of the disk to detach. Make a get() request on\nthe instance to view currently attached disks and device names.", - "location": "query", - "required": true, - "type": "string" - }, - "instance": { - "description": "Instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/detachDisk", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Instance resource.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "GET", - "id": "compute.instances.get", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "response": { - "$ref": "Instance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns effective firewalls applied to an interface of the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.instances.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to get the effective firewalls.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", - "response": { - "$ref": "InstancesGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getGuestAttributes": { - "description": "Returns the specified guest attributes entry.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "httpMethod": "GET", - "id": "compute.instances.getGuestAttributes", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "queryPath": { - "description": "Specifies the guest attributes path to be queried.", - "location": "query", - "type": "string" - }, - "variableKey": { - "description": "Specifies the key for the guest attributes entry.", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", - "response": { - "$ref": "GuestAttributes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instances.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPartnerMetadata": { - "description": "Gets partner metadata of the specified instance and namespaces.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata", - "httpMethod": "GET", - "id": "compute.instances.getPartnerMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "namespaces": { - "description": "Comma separated partner metadata namespaces.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata", - "response": { - "$ref": "PartnerMetadata" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getScreenshot": { - "description": "Returns the screenshot from the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", - "httpMethod": "GET", - "id": "compute.instances.getScreenshot", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/screenshot", - "response": { - "$ref": "Screenshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getSerialPortOutput": { - "description": "Returns the last 1 MB of serial port output from the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", - "httpMethod": "GET", - "id": "compute.instances.getSerialPortOutput", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "port": { - "default": "1", - "description": "Specifies which COM or serial port to retrieve data from.", - "format": "int32", - "location": "query", - "maximum": "4", - "minimum": "1", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "start": { - "description": "Specifies the starting byte position of the output to return. To start with\nthe first byte of output to the specified port, omit this field or set it\nto `0`.\n\nIf the output for that byte position is available, this field matches the\n`start` parameter sent with the request. If the amount of serial console\noutput exceeds the size of the buffer (1 MB), the oldest output is\ndiscarded and is no longer available. If the requested start position\nrefers to discarded output, the start position is adjusted to the oldest\noutput still available, and the adjusted start position is returned as the\n`start` property value.\n\nYou can also provide a negative start position, which translates to the\nmost recent number of bytes written to the serial port. For example, -3 is\ninterpreted as the most recent 3 bytes written to the serial console. Note\nthat the negative start is bounded by the retained buffer size, and the\nreturned serial console output will not exceed the max buffer size.", - "format": "int64", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/serialPort", - "response": { - "$ref": "SerialPortOutput" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getShieldedInstanceIdentity": { - "description": "Returns the Shielded Instance Identity of an instance", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", - "httpMethod": "GET", - "id": "compute.instances.getShieldedInstanceIdentity", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", - "response": { - "$ref": "ShieldedInstanceIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getShieldedVmIdentity": { - "description": "Returns the Shielded VM Identity of an instance", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - "httpMethod": "GET", - "id": "compute.instances.getShieldedVmIdentity", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity", - "response": { - "$ref": "ShieldedVmIdentity" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances", - "httpMethod": "POST", - "id": "compute.instances.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceInstanceTemplate": { - "description": "Specifies instance template to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the\nfollowing are all valid URLs to an instance template:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate", - "location": "query", - "type": "string" - }, - "sourceMachineImage": { - "description": "Specifies the machine image to use to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the\nfollowing are all valid URLs to a machine image:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage\n - projects/project/global/global/machineImages/machineImage\n - global/machineImages/machineImage", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances", - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of instances contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instances", - "httpMethod": "GET", - "id": "compute.instances.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances", - "response": { - "$ref": "InstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listReferrers": { - "description": "Retrieves a list of resources that refer to the VM instance specified in\nthe request. For example, if the VM instance is part of a managed or\nunmanaged instance group, the referrers list includes the instance group.\nFor more information, readViewing\nreferrers to VM instances.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/referrers", - "httpMethod": "GET", - "id": "compute.instances.listReferrers", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instance": { - "description": "Name of the target instance scoping this request, or '-' if the\nrequest should span over all instances in the container.", - "location": "path", - "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/referrers", - "response": { - "$ref": "InstanceListReferrers" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patchPartnerMetadata": { - "description": "Patches partner metadata of the specified instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata", - "httpMethod": "POST", - "id": "compute.instances.patchPartnerMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata", - "request": { - "$ref": "PartnerMetadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "performMaintenance": { - "description": "Perform a manual maintenance on the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance", - "httpMethod": "POST", - "id": "compute.instances.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.instances.removeResourcePolicies", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", - "request": { - "$ref": "InstancesRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reportHostAsFaulty": { - "description": "Mark the host as faulty and try to restart the instance on a new host.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty", - "httpMethod": "POST", - "id": "compute.instances.reportHostAsFaulty", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty", - "request": { - "$ref": "InstancesReportHostAsFaultyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reset": { - "description": "Performs a reset on the instance. This is a hard reset. The VM\ndoes not do a graceful shutdown. For more information, seeResetting\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/reset", - "httpMethod": "POST", - "id": "compute.instances.reset", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/reset", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resume": { - "description": "Resumes an instance that was suspended using theinstances().suspend\nmethod.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/resume", - "httpMethod": "POST", - "id": "compute.instances.resume", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to resume.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/resume", - "request": { - "$ref": "InstancesResumeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "sendDiagnosticInterrupt": { - "description": "Sends diagnostic interrupt to the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", - "httpMethod": "POST", - "id": "compute.instances.sendDiagnosticInterrupt", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDeletionProtection": { - "description": "Sets deletion protection on the instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", - "httpMethod": "POST", - "id": "compute.instances.setDeletionProtection", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "deletionProtection": { - "default": "true", - "description": "Whether the resource should be protected against deletion.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDiskAutoDelete": { - "description": "Sets the auto-delete flag for a disk attached to an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "httpMethod": "POST", - "id": "compute.instances.setDiskAutoDelete", - "parameterOrder": [ - "project", - "zone", - "instance", - "autoDelete", - "deviceName" - ], - "parameters": { - "autoDelete": { - "description": "Whether to auto-delete the disk when the instance is deleted.", - "location": "query", - "required": true, - "type": "boolean" - }, - "deviceName": { - "description": "The device name of the disk to modify. Make a get() request\non the instance to view currently attached disks and device names.", - "location": "query", - "pattern": "\\w[\\w.-]{0,254}", - "required": true, - "type": "string" - }, - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instances.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets labels on an instance. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", - "httpMethod": "POST", - "id": "compute.instances.setLabels", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setLabels", - "request": { - "$ref": "InstancesSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineResources": { - "description": "Changes the number and/or type of accelerator for a stopped instance to the\nvalues specified in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", - "httpMethod": "POST", - "id": "compute.instances.setMachineResources", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", - "request": { - "$ref": "InstancesSetMachineResourcesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMachineType": { - "description": "Changes the machine type for a stopped instance to the machine\ntype specified in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", - "httpMethod": "POST", - "id": "compute.instances.setMachineType", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMachineType", - "request": { - "$ref": "InstancesSetMachineTypeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMetadata": { - "description": "Sets metadata for the specified instance to the data included\nin the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", - "httpMethod": "POST", - "id": "compute.instances.setMetadata", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMetadata", - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setMinCpuPlatform": { - "description": "Changes the minimum CPU platform that this instance should use.\nThis method can only\nbe called on a stopped instance. For more information, readSpecifying a\nMinimum CPU Platform.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "httpMethod": "POST", - "id": "compute.instances.setMinCpuPlatform", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", - "request": { - "$ref": "InstancesSetMinCpuPlatformRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setName": { - "description": "Sets name of an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setName", - "httpMethod": "POST", - "id": "compute.instances.setName", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setName", - "request": { - "$ref": "InstancesSetNameRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setScheduling": { - "description": "Sets an instance's scheduling options. You can only call this method on astopped instance,\nthat is, a VM instance that is in a `TERMINATED` state. SeeInstance Life\nCycle for more information on the possible instance states.\nFor more information about setting scheduling options for a VM, seeSet\nVM host maintenance policy.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", - "httpMethod": "POST", - "id": "compute.instances.setScheduling", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setScheduling", - "request": { - "$ref": "Scheduling" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified instance.\nFor more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.instances.setSecurityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the Instance resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", - "request": { - "$ref": "InstancesSetSecurityPolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setServiceAccount": { - "description": "Sets the service account on the instance. For more information,\nreadChanging\nthe service account and access scopes for an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "httpMethod": "POST", - "id": "compute.instances.setServiceAccount", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", - "request": { - "$ref": "InstancesSetServiceAccountRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setShieldedInstanceIntegrityPolicy": { - "description": "Sets the Shielded Instance integrity policy for an instance. You can\nonly use this method on a running instance. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - "httpMethod": "PATCH", - "id": "compute.instances.setShieldedInstanceIntegrityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - "request": { - "$ref": "ShieldedInstanceIntegrityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setShieldedVmIntegrityPolicy": { - "description": "Sets the Shielded VM integrity policy for a VM instance. You can\nonly use this method on a running VM instance. This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", - "httpMethod": "PATCH", - "id": "compute.instances.setShieldedVmIntegrityPolicy", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy", - "request": { - "$ref": "ShieldedVmIntegrityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTags": { - "description": "Sets network tags\nfor the specified instance to the data included in the request.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - "httpMethod": "POST", - "id": "compute.instances.setTags", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - "request": { - "$ref": "Tags" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "simulateMaintenanceEvent": { - "description": "Simulates a host maintenance event on a VM. For more information, see\nSimulate a host maintenance event.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - "httpMethod": "POST", - "id": "compute.instances.simulateMaintenanceEvent", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "withExtendedNotifications": { - "description": "Determines whether the customers receive notifications before migration.\nOnly applicable to SF vms.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "start": { - "description": "Starts an instance that was stopped using theinstances().stop\nmethod. For more information, seeRestart an\ninstance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", - "httpMethod": "POST", - "id": "compute.instances.start", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/start", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startWithEncryptionKey": { - "description": "Starts an instance that was stopped using theinstances().stop\nmethod. For more information, seeRestart an\ninstance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "httpMethod": "POST", - "id": "compute.instances.startWithEncryptionKey", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to start.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - "request": { - "$ref": "InstancesStartWithEncryptionKeyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stop": { - "description": "Stops a running instance, shutting it down cleanly, and allows\nyou to restart the instance at a later time. Stopped instances do not incur\nVM usage charges while they are stopped. However, resources that the VM is\nusing, such as persistent disks and static IP addresses, will continue to\nbe charged until they are deleted. For more information, seeStopping\nan instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/stop", - "httpMethod": "POST", - "id": "compute.instances.stop", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "discardLocalSsd": { - "description": "This property is required if the instance has any attached Local SSD disks.\nIf false, Local SSD data will be preserved when the instance is suspended.\nIf true, the contents of any attached Local SSD disks will be discarded.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Name of the instance resource to stop.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "noGracefulShutdown": { - "description": "If set to true, Graceful Shutdown is skipped.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/stop", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspend": { - "description": "This method suspends a running instance, saving its state to persistent\nstorage, and allows you to resume the instance at a later time. Suspended\ninstances have no compute costs (cores or RAM), and incur only storage\ncharges for the saved VM memory and localSSD data. Any charged resources\nthe virtual machine was using, such as persistent disks and static IP\naddresses, will continue to be charged while the instance is suspended.\nFor more information, see\nSuspending and resuming an instance.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/suspend", - "httpMethod": "POST", - "id": "compute.instances.suspend", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "discardLocalSsd": { - "description": "This property is required if the instance has any attached Local SSD disks.\nIf false, Local SSD data will be preserved when the instance is suspended.\nIf true, the contents of any attached Local SSD disks will be discarded.", - "location": "query", - "type": "boolean" - }, - "instance": { - "description": "Name of the instance resource to suspend.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/suspend", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instances.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an instance only if the necessary resources are available. This\nmethod can update only a specific set of instance properties. See\nUpdating a running instance for a list of updatable instance\nproperties.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}", - "httpMethod": "PUT", - "id": "compute.instances.update", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "minimalAction": { - "description": "Specifies the action to take when updating an instance even if the\nupdated properties do not require it. If not specified, then\nCompute Engine acts based on the minimum action that the updated\nproperties require.", - "enum": [ - "INVALID", - "NO_EFFECT", - "REFRESH", - "RESTART" - ], - "enumDescriptions": [ - "", - "No changes can be made to the instance.", - "The instance will not restart.", - "The instance will restart." - ], - "location": "query", - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "Specifies the most disruptive action that can be taken on the instance\nas part of the update. Compute Engine returns an error if the\ninstance properties require a more disruptive action as part of the\ninstance update. Valid options from lowest to highest are\nNO_EFFECT, REFRESH, and RESTART.", - "enum": [ - "INVALID", - "NO_EFFECT", - "REFRESH", - "RESTART" - ], - "enumDescriptions": [ - "", - "No changes can be made to the instance.", - "The instance will not restart.", - "The instance will restart." - ], - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}", - "request": { - "$ref": "Instance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateAccessConfig": { - "description": "Updates the specified access config from an instance's network interface\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - "httpMethod": "POST", - "id": "compute.instances.updateAccessConfig", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface where the access config is attached.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", - "request": { - "$ref": "AccessConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateDisplayDevice": { - "description": "Updates the Display config for a VM instance. You can\nonly use this method on a stopped VM instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - "httpMethod": "PATCH", - "id": "compute.instances.updateDisplayDevice", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", - "request": { - "$ref": "DisplayDevice" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateNetworkInterface": { - "description": "Updates an instance's network interface. This method can only update an\ninterface's alias IP range and attached network. See Modifying\nalias IP ranges for an existing instance for instructions on\nchanging alias IP ranges. See Migrating\na VM between networks for instructions on migrating an interface.\nThis method follows PATCH semantics.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - "httpMethod": "PATCH", - "id": "compute.instances.updateNetworkInterface", - "parameterOrder": [ - "project", - "zone", - "instance", - "networkInterface" - ], - "parameters": { - "instance": { - "description": "The instance name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "networkInterface": { - "description": "The name of the network interface to update.", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", - "request": { - "$ref": "NetworkInterface" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateShieldedInstanceConfig": { - "description": "Updates the Shielded Instance config for an instance. You can\nonly use this method on a stopped instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", - "httpMethod": "PATCH", - "id": "compute.instances.updateShieldedInstanceConfig", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name or id of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", - "request": { - "$ref": "ShieldedInstanceConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateShieldedVmConfig": { - "description": "Updates the Shielded VM config for a VM instance. You can\nonly use this method on a stopped VM instance. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", - "httpMethod": "PATCH", - "id": "compute.instances.updateShieldedVmConfig", - "parameterOrder": [ - "project", - "zone", - "instance" - ], - "parameters": { - "instance": { - "description": "Name of the instance scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig", - "request": { - "$ref": "ShieldedVmConfig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "instantSnapshots": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of instantSnapshots.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/instantSnapshots", - "httpMethod": "GET", - "id": "compute.instantSnapshots.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/instantSnapshots", - "response": { - "$ref": "InstantSnapshotAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting\na single instantSnapshot might not necessarily delete all the data on that\ninstantSnapshot. If any data on the instantSnapshot that is marked for\ndeletion is needed for subsequent instantSnapshots, the data will be moved\nto the next corresponding instantSnapshot.\n\nFor more information, seeDeleting\ninstantSnapshots.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "httpMethod": "DELETE", - "id": "compute.instantSnapshots.delete", - "parameterOrder": [ - "project", - "zone", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InstantSnapshot resource in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "httpMethod": "GET", - "id": "compute.instantSnapshots.get", - "parameterOrder": [ - "project", - "zone", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "InstantSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.instantSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instant snapshot in the specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", - "httpMethod": "POST", - "id": "compute.instantSnapshots.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots", - "request": { - "$ref": "InstantSnapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of InstantSnapshot resources contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots", - "httpMethod": "GET", - "id": "compute.instantSnapshots.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots", - "response": { - "$ref": "InstantSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.instantSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a instantSnapshot in the given zone. To learn more about\nlabels, read the Labeling\nResources documentation.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.instantSnapshots.setLabels", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels", - "request": { - "$ref": "ZoneSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.instantSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectAttachmentGroups": { - "methods": { - "delete": { - "description": "Deletes the specified InterconnectAttachmentGroup in the given scope", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "DELETE", - "id": "compute.interconnectAttachmentGroups.delete", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InterconnectAttachmentGroup resource in the given\nscope.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.get", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "response": { - "$ref": "InterconnectAttachmentGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getOperationalStatus": { - "description": "Returns the InterconnectAttachmentStatuses for the specified\nInterconnectAttachmentGroup resource.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.getOperationalStatus", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the interconnectAttachmentGroup resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus", - "response": { - "$ref": "InterconnectAttachmentGroupsGetOperationalStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a InterconnectAttachmentGroup in the specified project in the given\nscope using the parameters that are included in the request.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups", - "request": { - "$ref": "InterconnectAttachmentGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the InterconnectAttachmentGroups for a project in the given scope.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups", - "httpMethod": "GET", - "id": "compute.interconnectAttachmentGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups", - "response": { - "$ref": "InterconnectAttachmentGroupsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified InterconnectAttachmentGroup resource with the data\nincluded in the request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "httpMethod": "PATCH", - "id": "compute.interconnectAttachmentGroups.patch", - "parameterOrder": [ - "project", - "interconnectAttachmentGroup" - ], - "parameters": { - "interconnectAttachmentGroup": { - "description": "Name of the InterconnectAttachmentGroup resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", - "request": { - "$ref": "InterconnectAttachmentGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectAttachmentGroups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectAttachmentGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/interconnectAttachments", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/interconnectAttachments", - "response": { - "$ref": "InterconnectAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "DELETE", - "id": "compute.interconnectAttachments.delete", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified interconnect attachment.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.get", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "response": { - "$ref": "InterconnectAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", - "request": { - "$ref": "InterconnectAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of interconnect attachments contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments", - "httpMethod": "GET", - "id": "compute.interconnectAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments", - "response": { - "$ref": "InterconnectAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified interconnect attachment with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "httpMethod": "PATCH", - "id": "compute.interconnectAttachments.patch", - "parameterOrder": [ - "project", - "region", - "interconnectAttachment" - ], - "parameters": { - "interconnectAttachment": { - "description": "Name of the interconnect attachment to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}", - "request": { - "$ref": "InterconnectAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an InterconnectAttachment. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectGroups": { - "methods": { - "createMembers": { - "description": "Create Interconnects with redundancy by creating them in a specified\ninterconnect group.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers", - "httpMethod": "POST", - "id": "compute.interconnectGroups.createMembers", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the group resource to create members for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers", - "request": { - "$ref": "InterconnectGroupsCreateMembersRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified InterconnectGroup in the given scope", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "DELETE", - "id": "compute.interconnectGroups.delete", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InterconnectGroup resource in the given scope.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "GET", - "id": "compute.interconnectGroups.get", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "response": { - "$ref": "InterconnectGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.interconnectGroups.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getOperationalStatus": { - "description": "Returns the interconnectStatuses for the specified\nInterconnectGroup.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus", - "httpMethod": "GET", - "id": "compute.interconnectGroups.getOperationalStatus", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the interconnectGroup resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus", - "response": { - "$ref": "InterconnectGroupsGetOperationalStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a InterconnectGroup in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/interconnectGroups", - "httpMethod": "POST", - "id": "compute.interconnectGroups.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups", - "request": { - "$ref": "InterconnectGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the InterconnectGroups for a project in the given scope.", - "flatPath": "projects/{project}/global/interconnectGroups", - "httpMethod": "GET", - "id": "compute.interconnectGroups.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectGroups", - "response": { - "$ref": "InterconnectGroupsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified InterconnectGroup resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "httpMethod": "PATCH", - "id": "compute.interconnectGroups.patch", - "parameterOrder": [ - "project", - "interconnectGroup" - ], - "parameters": { - "interconnectGroup": { - "description": "Name of the InterconnectGroup resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{interconnectGroup}", - "request": { - "$ref": "InterconnectGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.interconnectGroups.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnectGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnectGroups.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectLocations": { - "methods": { - "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of\navailable interconnect locations by making a list() request.", - "flatPath": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "httpMethod": "GET", - "id": "compute.interconnectLocations.get", - "parameterOrder": [ - "project", - "interconnectLocation" - ], - "parameters": { - "interconnectLocation": { - "description": "Name of the interconnect location to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectLocations/{interconnectLocation}", - "response": { - "$ref": "InterconnectLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of interconnect locations available to the specified\nproject.", - "flatPath": "projects/{project}/global/interconnectLocations", - "httpMethod": "GET", - "id": "compute.interconnectLocations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectLocations", - "response": { - "$ref": "InterconnectLocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnectRemoteLocations": { - "methods": { - "get": { - "description": "Returns the details for the specified interconnect remote location. Gets a\nlist of available interconnect remote locations by making alist() request.", - "flatPath": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", - "httpMethod": "GET", - "id": "compute.interconnectRemoteLocations.get", - "parameterOrder": [ - "project", - "interconnectRemoteLocation" - ], - "parameters": { - "interconnectRemoteLocation": { - "description": "Name of the interconnect remote location to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}", - "response": { - "$ref": "InterconnectRemoteLocation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of interconnect remote locations available to the\nspecified project.", - "flatPath": "projects/{project}/global/interconnectRemoteLocations", - "httpMethod": "GET", - "id": "compute.interconnectRemoteLocations.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnectRemoteLocations", - "response": { - "$ref": "InterconnectRemoteLocationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "interconnects": { - "methods": { - "delete": { - "description": "Deletes the specified Interconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "DELETE", - "id": "compute.interconnects.delete", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Interconnect. Get a list of available Interconnects\nby making a list() request.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "GET", - "id": "compute.interconnects.get", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "response": { - "$ref": "Interconnect" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified\nInterconnect.\n\nIn the event of a\nglobal outage, do not use this API to make decisions about where to\nredirect your network traffic.\n\nUnlike a VLAN attachment, which is regional, a Cloud Interconnect\nconnection is a global resource. A global outage can prevent this\nAPI from functioning properly.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", - "httpMethod": "GET", - "id": "compute.interconnects.getDiagnostics", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", - "response": { - "$ref": "InterconnectsGetDiagnosticsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getMacsecConfig": { - "description": "Returns the interconnectMacsecConfig for the specified\nInterconnect.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig", - "httpMethod": "GET", - "id": "compute.interconnects.getMacsecConfig", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig", - "response": { - "$ref": "InterconnectsGetMacsecConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an Interconnect in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/interconnects", - "httpMethod": "POST", - "id": "compute.interconnects.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects", - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Interconnects available to the specified project.", - "flatPath": "projects/{project}/global/interconnects", - "httpMethod": "GET", - "id": "compute.interconnects.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/interconnects", - "response": { - "$ref": "InterconnectList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified Interconnect with the data included in the request.\nThis method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/interconnects/{interconnect}", - "httpMethod": "PATCH", - "id": "compute.interconnects.patch", - "parameterOrder": [ - "project", - "interconnect" - ], - "parameters": { - "interconnect": { - "description": "Name of the interconnect to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{interconnect}", - "request": { - "$ref": "Interconnect" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on an Interconnect. To learn more about labels,\nread the Labeling\nResources documentation.", - "flatPath": "projects/{project}/global/interconnects/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.interconnects.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/interconnects/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.interconnects.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/interconnects/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenseCodes": { - "methods": { - "get": { - "description": "Return a specified license code. License codes are mirrored across\nall projects that have permissions to read the License Code.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{licenseCode}", - "httpMethod": "GET", - "id": "compute.licenseCodes.get", - "parameterOrder": [ - "project", - "licenseCode" - ], - "parameters": { - "licenseCode": { - "description": "Number corresponding to the License code resource to return.", - "location": "path", - "pattern": "[0-9]{0,61}?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{licenseCode}", - "response": { - "$ref": "LicenseCode" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.licenseCodes.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "licenses": { - "methods": { - "delete": { - "description": "Deletes the specified license.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "DELETE", - "id": "compute.licenses.delete", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "Name of the license resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified License resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "GET", - "id": "compute.licenses.get", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "Name of the License resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "response": { - "$ref": "License" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.licenses.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a License resource in the specified project.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses", - "httpMethod": "POST", - "id": "compute.licenses.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses", - "request": { - "$ref": "License" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "description": "Retrieves the list of licenses\navailable in the specified project. This method does not\nget any licenses that belong to other projects, including licenses attached\nto publicly-available images, like Debian 9. If you want to get a list of\npublicly-available licenses, use this method to make a request to the\nrespective image project, such as debian-cloud orwindows-cloud.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses", - "httpMethod": "GET", - "id": "compute.licenses.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/licenses", - "response": { - "$ref": "LicensesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.licenses.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.licenses.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a License resource in the specified project.\n *Caution* This resource is intended\nfor use only by third-party partners who are creatingCloud Marketplace\nimages.", - "flatPath": "projects/{project}/global/licenses/{license}", - "httpMethod": "PATCH", - "id": "compute.licenses.update", - "parameterOrder": [ - "project", - "license" - ], - "parameters": { - "license": { - "description": "The license name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/licenses/{license}", - "request": { - "$ref": "License" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "machineImages": { - "methods": { - "delete": { - "description": "Deletes the specified machine image. Deleting a machine image is permanent\nand cannot be undone.", - "flatPath": "projects/{project}/global/machineImages/{machineImage}", - "httpMethod": "DELETE", - "id": "compute.machineImages.delete", - "parameterOrder": [ - "project", - "machineImage" - ], - "parameters": { - "machineImage": { - "description": "The name of the machine image to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{machineImage}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified machine image.", - "flatPath": "projects/{project}/global/machineImages/{machineImage}", - "httpMethod": "GET", - "id": "compute.machineImages.get", - "parameterOrder": [ - "project", - "machineImage" - ], - "parameters": { - "machineImage": { - "description": "The name of the machine image.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{machineImage}", - "response": { - "$ref": "MachineImage" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/machineImages/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.machineImages.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a machine image in the specified project using the\ndata that is included in the request. If you are creating a new machine\nimage to update an existing instance, your new machine image should use the\nsame network or, if applicable, the same subnetwork as the original\ninstance.", - "flatPath": "projects/{project}/global/machineImages", - "httpMethod": "POST", - "id": "compute.machineImages.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceInstance": { - "description": "Required. Source instance that is used to create the machine image from.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages", - "request": { - "$ref": "MachineImage" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of machine images that are contained within\nthe specified project.", - "flatPath": "projects/{project}/global/machineImages", - "httpMethod": "GET", - "id": "compute.machineImages.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/machineImages", - "response": { - "$ref": "MachineImageList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/machineImages/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.machineImages.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a machine image. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/machineImages/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.machineImages.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/machineImages/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.machineImages.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/machineImages/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "machineTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of machine types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/machineTypes", - "httpMethod": "GET", - "id": "compute.machineTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/machineTypes", - "response": { - "$ref": "MachineTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified machine type.", - "flatPath": "projects/{project}/zones/{zone}/machineTypes/{machineType}", - "httpMethod": "GET", - "id": "compute.machineTypes.get", - "parameterOrder": [ - "project", - "zone", - "machineType" - ], - "parameters": { - "machineType": { - "description": "Name of the machine type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/machineTypes/{machineType}", - "response": { - "$ref": "MachineType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of machine types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/machineTypes", - "httpMethod": "GET", - "id": "compute.machineTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/machineTypes", - "response": { - "$ref": "MachineTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NetworkAttachment resources,\nregional and global, available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkAttachments", - "httpMethod": "GET", - "id": "compute.networkAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkAttachments", - "response": { - "$ref": "NetworkAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NetworkAttachment in the given scope", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "DELETE", - "id": "compute.networkAttachments.delete", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NetworkAttachment resource in the given scope.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "GET", - "id": "compute.networkAttachments.get", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "response": { - "$ref": "NetworkAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.networkAttachments.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NetworkAttachment in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments", - "httpMethod": "POST", - "id": "compute.networkAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments", - "request": { - "$ref": "NetworkAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the NetworkAttachments for a project in the given scope.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments", - "httpMethod": "GET", - "id": "compute.networkAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments", - "response": { - "$ref": "NetworkAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified NetworkAttachment resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "httpMethod": "PATCH", - "id": "compute.networkAttachments.patch", - "parameterOrder": [ - "project", - "region", - "networkAttachment" - ], - "parameters": { - "networkAttachment": { - "description": "Name of the NetworkAttachment resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}", - "request": { - "$ref": "NetworkAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.networkAttachments.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkEdgeSecurityServices": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NetworkEdgeSecurityService resources available to\nthe specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkEdgeSecurityServices", - "httpMethod": "GET", - "id": "compute.networkEdgeSecurityServices.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkEdgeSecurityServices", - "response": { - "$ref": "NetworkEdgeSecurityServiceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified service.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "DELETE", - "id": "compute.networkEdgeSecurityServices.delete", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets a specified NetworkEdgeSecurityService.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "GET", - "id": "compute.networkEdgeSecurityServices.get", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "response": { - "$ref": "NetworkEdgeSecurityService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new service in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices", - "httpMethod": "POST", - "id": "compute.networkEdgeSecurityServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices", - "request": { - "$ref": "NetworkEdgeSecurityService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "httpMethod": "PATCH", - "id": "compute.networkEdgeSecurityServices.patch", - "parameterOrder": [ - "project", - "region", - "networkEdgeSecurityService" - ], - "parameters": { - "networkEdgeSecurityService": { - "description": "Name of the network edge security service to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}", - "request": { - "$ref": "NetworkEdgeSecurityService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "networkEndpointGroups": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of network endpoint groups and sorts them by zone.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group. The network endpoints in the\nNEG and the VM instances they belong to are not terminated when the NEG is\ndeleted. Note that the NEG cannot be deleted if there are backend services\nreferencing it.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.networkEndpointGroups.delete", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach a list of network endpoints from the specified network endpoint\ngroup.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are removing network\nendpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.get", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of network endpoint groups that are located in the\nspecified project and zone.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.networkEndpointGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of thezone\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "zone", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "request": { - "$ref": "NetworkEndpointGroupsListEndpointsRequest" - }, - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkEndpointGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkFirewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addPacketMirroringRule": { - "description": "Inserts a packet mirroring rule into a firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.addRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of network firewall policies, listing network\nfirewall policies from all applicable scopes (global and regional) and\ngrouping the results per scope.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/firewallPolicies", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/firewallPolicies", - "response": { - "$ref": "NetworkFirewallPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.cloneRules", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.networkFirewallPolicies.delete", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.get", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getPacketMirroringRule": { - "description": "Gets a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.getRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/global/firewallPolicies", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified project.", - "flatPath": "projects/{project}/global/firewallPolicies", - "httpMethod": "GET", - "id": "compute.networkFirewallPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.networkFirewallPolicies.patch", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPacketMirroringRule": { - "description": "Patches a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.patchPacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.patchRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified firewall policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removeAssociation", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePacketMirroringRule": { - "description": "Deletes a packet mirroring rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removePacketMirroringRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.removeRule", - "parameterOrder": [ - "project", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networkFirewallPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networkProfiles": { - "methods": { - "get": { - "description": "Returns the specified network profile.", - "flatPath": "projects/{project}/global/networkProfiles/{networkProfile}", - "httpMethod": "GET", - "id": "compute.networkProfiles.get", - "parameterOrder": [ - "project", - "networkProfile" - ], - "parameters": { - "networkProfile": { - "description": "Name of the network profile to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networkProfiles/{networkProfile}", - "response": { - "$ref": "NetworkProfile" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of network profiles available to the specified\nproject.", - "flatPath": "projects/{project}/global/networkProfiles", - "httpMethod": "GET", - "id": "compute.networkProfiles.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networkProfiles", - "response": { - "$ref": "NetworkProfilesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "networks": { - "methods": { - "addPeering": { - "description": "Adds a peering to the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/addPeering", - "httpMethod": "POST", - "id": "compute.networks.addPeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to add peering to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/addPeering", - "request": { - "$ref": "NetworksAddPeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "DELETE", - "id": "compute.networks.delete", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "GET", - "id": "compute.networks.get", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "response": { - "$ref": "Network" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns the effective firewalls on a given network.", - "flatPath": "projects/{project}/global/networks/{network}/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.networks.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/getEffectiveFirewalls", - "response": { - "$ref": "NetworksGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/networks", - "httpMethod": "POST", - "id": "compute.networks.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks", - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of networks available to the specified project.", - "flatPath": "projects/{project}/global/networks", - "httpMethod": "GET", - "id": "compute.networks.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networks", - "response": { - "$ref": "NetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPeeringRoutes": { - "description": "Lists the peering routes exchanged over peering connection.", - "flatPath": "projects/{project}/global/networks/{network}/listPeeringRoutes", - "httpMethod": "GET", - "id": "compute.networks.listPeeringRoutes", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "direction": { - "description": "The direction of the exchanged routes.", - "enum": [ - "INCOMING", - "OUTGOING" - ], - "enumDescriptions": [ - "For routes exported from peer network.", - "For routes exported from local network." - ], - "location": "query", - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "network": { - "description": "Name of the network for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "peeringName": { - "description": "The response will show routes exchanged over the given peering connection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region of the request. The response will include all subnet routes,\nstatic routes and dynamic routes in the region.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/networks/{network}/listPeeringRoutes", - "response": { - "$ref": "ExchangedPeeringRoutesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified network with the data included in the request.\nOnly routingConfig can be modified.", - "flatPath": "projects/{project}/global/networks/{network}", - "httpMethod": "PATCH", - "id": "compute.networks.patch", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}", - "request": { - "$ref": "Network" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removePeering": { - "description": "Removes a peering from the specified network.", - "flatPath": "projects/{project}/global/networks/{network}/removePeering", - "httpMethod": "POST", - "id": "compute.networks.removePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to remove peering from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/removePeering", - "request": { - "$ref": "NetworksRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "requestRemovePeering": { - "description": "Requests to remove a peering from the specified network. Applicable only\nfor PeeringConnection with update_strategy=CONSENSUS.", - "flatPath": "projects/{project}/global/networks/{network}/requestRemovePeering", - "httpMethod": "POST", - "id": "compute.networks.requestRemovePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource to remove peering from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/requestRemovePeering", - "request": { - "$ref": "NetworksRequestRemovePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "switchToCustomMode": { - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", - "flatPath": "projects/{project}/global/networks/{network}/switchToCustomMode", - "httpMethod": "POST", - "id": "compute.networks.switchToCustomMode", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network to be updated.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/switchToCustomMode", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/networks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.networks.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "updatePeering": { - "description": "Updates the specified network peering with the data included in the\nrequest. You can only modify the NetworkPeering.export_custom_routes field\nand the NetworkPeering.import_custom_routes field.", - "flatPath": "projects/{project}/global/networks/{network}/updatePeering", - "httpMethod": "PATCH", - "id": "compute.networks.updatePeering", - "parameterOrder": [ - "project", - "network" - ], - "parameters": { - "network": { - "description": "Name of the network resource which the updated peering is belonging to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/networks/{network}/updatePeering", - "request": { - "$ref": "NetworksUpdatePeeringRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "nodeGroups": { - "methods": { - "addNodes": { - "description": "Adds specified number of nodes to the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.addNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes", - "request": { - "$ref": "NodeGroupsAddNodesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of node groups.\nNote: use nodeGroups.listNodes for more details about each group.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeGroups", - "httpMethod": "GET", - "id": "compute.nodeGroups.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeGroups", - "response": { - "$ref": "NodeGroupAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NodeGroup resource.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "DELETE", - "id": "compute.nodeGroups.delete", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteNodes": { - "description": "Deletes specified nodes from the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.deleteNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes will be deleted.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes", - "request": { - "$ref": "NodeGroupsDeleteNodesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NodeGroup. Get a list of available NodeGroups\nby making a list() request.\nNote: the \"nodes\" field should not be used. Use nodeGroups.listNodes\ninstead.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "GET", - "id": "compute.nodeGroups.get", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the node group to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "response": { - "$ref": "NodeGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.nodeGroups.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NodeGroup resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups", - "httpMethod": "POST", - "id": "compute.nodeGroups.insert", - "parameterOrder": [ - "project", - "zone", - "initialNodeCount" - ], - "parameters": { - "initialNodeCount": { - "description": "Initial count of nodes in the node group.", - "format": "int32", - "location": "query", - "required": true, - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups", - "request": { - "$ref": "NodeGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of node groups available to the specified project.\nNote: use nodeGroups.listNodes for more details about each group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups", - "httpMethod": "GET", - "id": "compute.nodeGroups.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups", - "response": { - "$ref": "NodeGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNodes": { - "description": "Lists nodes in the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes", - "httpMethod": "POST", - "id": "compute.nodeGroups.listNodes", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes you want to list.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes", - "response": { - "$ref": "NodeGroupsListNodes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "httpMethod": "PATCH", - "id": "compute.nodeGroups.patch", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}", - "request": { - "$ref": "NodeGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "performMaintenance": { - "description": "Perform maintenance on a subset of nodes in the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance", - "httpMethod": "POST", - "id": "compute.nodeGroups.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the node group scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance", - "request": { - "$ref": "NodeGroupsPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.nodeGroups.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setNodeTemplate": { - "description": "Updates the node template of the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate", - "httpMethod": "POST", - "id": "compute.nodeGroups.setNodeTemplate", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate", - "request": { - "$ref": "NodeGroupsSetNodeTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "simulateMaintenanceEvent": { - "description": "Simulates maintenance event on specified nodes from the node group.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", - "httpMethod": "POST", - "id": "compute.nodeGroups.simulateMaintenanceEvent", - "parameterOrder": [ - "project", - "zone", - "nodeGroup" - ], - "parameters": { - "nodeGroup": { - "description": "Name of the NodeGroup resource whose nodes will go under maintenance\nsimulation.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent", - "request": { - "$ref": "NodeGroupsSimulateMaintenanceEventRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.nodeGroups.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "nodeTemplates": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of node templates.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeTemplates", - "httpMethod": "GET", - "id": "compute.nodeTemplates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeTemplates", - "response": { - "$ref": "NodeTemplateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified NodeTemplate resource.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "httpMethod": "DELETE", - "id": "compute.nodeTemplates.delete", - "parameterOrder": [ - "project", - "region", - "nodeTemplate" - ], - "parameters": { - "nodeTemplate": { - "description": "Name of the NodeTemplate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified node template.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "httpMethod": "GET", - "id": "compute.nodeTemplates.get", - "parameterOrder": [ - "project", - "region", - "nodeTemplate" - ], - "parameters": { - "nodeTemplate": { - "description": "Name of the node template to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}", - "response": { - "$ref": "NodeTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.nodeTemplates.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a NodeTemplate resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates", - "httpMethod": "POST", - "id": "compute.nodeTemplates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates", - "request": { - "$ref": "NodeTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of node templates available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates", - "httpMethod": "GET", - "id": "compute.nodeTemplates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates", - "response": { - "$ref": "NodeTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.nodeTemplates.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.nodeTemplates.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "nodeTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of node types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/nodeTypes", - "httpMethod": "GET", - "id": "compute.nodeTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/nodeTypes", - "response": { - "$ref": "NodeTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified node type.", - "flatPath": "projects/{project}/zones/{zone}/nodeTypes/{nodeType}", - "httpMethod": "GET", - "id": "compute.nodeTypes.get", - "parameterOrder": [ - "project", - "zone", - "nodeType" - ], - "parameters": { - "nodeType": { - "description": "Name of the node type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeTypes/{nodeType}", - "response": { - "$ref": "NodeType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of node types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/nodeTypes", - "httpMethod": "GET", - "id": "compute.nodeTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/nodeTypes", - "response": { - "$ref": "NodeTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "organizationSecurityPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified security policy.\n\nThis has billing implications. Projects in the hierarchy with effective\nhierarchical security policies will be automatically enrolled into Cloud\nArmor Enterprise if not already enrolled.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.addAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association of the attachment\nalready exists. This is false by default, in which case an error will be\nreturned if an association already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/addAssociation", - "request": { - "$ref": "SecurityPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.addRule instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.addRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "copyRules": { - "description": "Copies rules to the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.cloneRules\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/copyRules", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.copyRules", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "sourceSecurityPolicy": { - "description": "The security policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/copyRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.\n\nUse this API to remove Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to remove firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.delete instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.organizationSecurityPolicies.delete", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.get instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.get", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.getAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.getAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "name": { - "description": "The name of the association to get from the security policy.", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/getAssociation", - "response": { - "$ref": "SecurityPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.getRule instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.getRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified organization using the data included\nin the request.\n\nUse this API to add Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to add firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.insert instead.", - "flatPath": "locations/global/securityPolicies", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.insert", - "parameters": { - "parentId": { - "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\"\nif the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the\nparent is an organization.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified\norganization.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is now\ndisabled for most organizations. Use firewallPolicies.list instead.", - "flatPath": "locations/global/securityPolicies", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.list", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.\n\nUse this API to read Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to read firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.listAssociations\ninstead.", - "flatPath": "locations/global/securityPolicies/listAssociations", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.listAssociations", - "parameters": { - "targetResource": { - "description": "The target resource to list associations. It is an organization, or a\nfolder.", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/listAssociations", - "response": { - "$ref": "OrganizationSecurityPoliciesListAssociationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF)\nexpressions.", - "flatPath": "locations/global/securityPolicies/listPreconfiguredExpressionSets", - "httpMethod": "GET", - "id": "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentId": { - "description": "Parent ID for this request.", - "location": "query", - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "locations/global/securityPolicies/listPreconfiguredExpressionSets", - "response": { - "$ref": "SecurityPoliciesListPreconfiguredExpressionSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "move": { - "description": "Moves the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.move instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/move", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.move", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "parentId": { - "description": "The new parent of the security policy.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/move", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patch instead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.organizationSecurityPolicies.patch", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.patchRule\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.patchRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified security policy.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeAssociation\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.removeAssociation", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "name": { - "description": "Name for the attachment that will be removed.", - "location": "query", - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.\n\nUse this API to modify Cloud Armor policies. Previously, alpha and beta\nversions of this API were used to modify firewall policies. This usage is\nnow disabled for most organizations. Use firewallPolicies.removeRule\ninstead.", - "flatPath": "locations/global/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.organizationSecurityPolicies.removeRule", - "parameterOrder": [ - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "(securityPolicies/)?[0-9]{0,20}", - "required": true, - "type": "string" - } - }, - "path": "locations/global/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "packetMirrorings": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of packetMirrorings.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/packetMirrorings", - "httpMethod": "GET", - "id": "compute.packetMirrorings.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/packetMirrorings", - "response": { - "$ref": "PacketMirroringAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified PacketMirroring resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "DELETE", - "id": "compute.packetMirrorings.delete", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PacketMirroring resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "GET", - "id": "compute.packetMirrorings.get", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "response": { - "$ref": "PacketMirroring" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PacketMirroring resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings", - "httpMethod": "POST", - "id": "compute.packetMirrorings.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings", - "request": { - "$ref": "PacketMirroring" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of PacketMirroring resources available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings", - "httpMethod": "GET", - "id": "compute.packetMirrorings.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings", - "response": { - "$ref": "PacketMirroringList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified PacketMirroring resource with the data included in\nthe request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "httpMethod": "PATCH", - "id": "compute.packetMirrorings.patch", - "parameterOrder": [ - "project", - "region", - "packetMirroring" - ], - "parameters": { - "packetMirroring": { - "description": "Name of the PacketMirroring resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}", - "request": { - "$ref": "PacketMirroring" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.packetMirrorings.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "previewFeatures": { - "methods": { - "get": { - "description": "Returns the details of the given PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures/{previewFeature}", - "httpMethod": "GET", - "id": "compute.previewFeatures.get", - "parameterOrder": [ - "project", - "previewFeature" - ], - "parameters": { - "previewFeature": { - "description": "Name of the PreviewFeature for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/previewFeatures/{previewFeature}", - "response": { - "$ref": "PreviewFeature" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Returns the details of the given PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures", - "httpMethod": "GET", - "id": "compute.previewFeatures.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/previewFeatures", - "response": { - "$ref": "PreviewFeatureList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Patches the given PreviewFeature. This method is used to enable or disable\na PreviewFeature.", - "flatPath": "projects/{project}/global/previewFeatures/{previewFeature}", - "httpMethod": "PATCH", - "id": "compute.previewFeatures.update", - "parameterOrder": [ - "project", - "previewFeature" - ], - "parameters": { - "previewFeature": { - "description": "Name of the PreviewFeature for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/previewFeatures/{previewFeature}", - "request": { - "$ref": "PreviewFeature" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "projects": { - "methods": { - "disableXpnHost": { - "description": "Disable this project as a shared VPC host project.", - "flatPath": "projects/{project}/disableXpnHost", - "httpMethod": "POST", - "id": "compute.projects.disableXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/disableXpnHost", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "disableXpnResource": { - "description": "Disable a service resource (also known as service project) associated with\nthis host project.", - "flatPath": "projects/{project}/disableXpnResource", - "httpMethod": "POST", - "id": "compute.projects.disableXpnResource", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/disableXpnResource", - "request": { - "$ref": "ProjectsDisableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnHost": { - "description": "Enable this project as a shared VPC host project.", - "flatPath": "projects/{project}/enableXpnHost", - "httpMethod": "POST", - "id": "compute.projects.enableXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/enableXpnHost", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "enableXpnResource": { - "description": "Enable service resource (a.k.a service project) for a host project, so that\nsubnets in the host project can be used by instances in the service\nproject.", - "flatPath": "projects/{project}/enableXpnResource", - "httpMethod": "POST", - "id": "compute.projects.enableXpnResource", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/enableXpnResource", - "request": { - "$ref": "ProjectsEnableXpnResourceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Project resource.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information (the `quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.", - "flatPath": "projects/{project}", - "httpMethod": "GET", - "id": "compute.projects.get", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}", - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getXpnHost": { - "description": "Gets the shared VPC host project that this project links to. May be empty\nif no link exists.", - "flatPath": "projects/{project}/getXpnHost", - "httpMethod": "GET", - "id": "compute.projects.getXpnHost", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/getXpnHost", - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "getXpnResources": { - "description": "Gets service resources (a.k.a service project) associated with this host\nproject.", - "flatPath": "projects/{project}/getXpnResources", - "httpMethod": "GET", - "id": "compute.projects.getXpnResources", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/getXpnResources", - "response": { - "$ref": "ProjectsGetXpnResources" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "listXpnHosts": { - "description": "Lists all shared VPC host projects visible to the user in an organization.", - "flatPath": "projects/{project}/listXpnHosts", - "httpMethod": "POST", - "id": "compute.projects.listXpnHosts", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/listXpnHosts", - "request": { - "$ref": "ProjectsListXpnHostsRequest" - }, - "response": { - "$ref": "XpnHostList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveDisk": { - "deprecated": true, - "description": "Moves a persistent disk from one zone to another.\n*Note*: The moveDisk API will be deprecated on September 29, 2026.\n\nStarting September 29, 2025, you can't use the moveDisk API on new\nprojects. To move a disk to a different region or zone, follow the steps in\n[Change the location of a\ndisk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).\n\nProjects that already use the moveDisk API can continue usage until\nSeptember 29, 2026.\n\nStarting November 1, 2025, API responses will include a warning message in\nthe response body about the upcoming deprecation. You can skip the message\nto continue using the service without interruption.", - "flatPath": "projects/{project}/moveDisk", - "httpMethod": "POST", - "id": "compute.projects.moveDisk", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/moveDisk", - "request": { - "$ref": "DiskMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "moveInstance": { - "deprecated": true, - "description": "Moves an instance and its attached persistent disks from one zone to\nanother.\n*Note*: Moving VMs or disks by using this method might\n cause unexpected behavior. For more information, see the [known\n issue](/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).\n[Deprecated] This method is deprecated. See [moving instance across\nzones](/compute/docs/instances/moving-instance-across-zones) instead.", - "flatPath": "projects/{project}/moveInstance", - "httpMethod": "POST", - "id": "compute.projects.moveInstance", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/moveInstance", - "request": { - "$ref": "InstanceMoveRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCloudArmorTier": { - "description": "Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the\nbilling account of the project must be subscribed to Cloud Armor\nEnterprise. See Subscribing\nto Cloud Armor Enterprise for more information.", - "flatPath": "projects/{project}/setCloudArmorTier", - "httpMethod": "POST", - "id": "compute.projects.setCloudArmorTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setCloudArmorTier", - "request": { - "$ref": "ProjectsSetCloudArmorTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCommonInstanceMetadata": { - "description": "Sets metadata common to all instances within the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/setCommonInstanceMetadata", - "httpMethod": "POST", - "id": "compute.projects.setCommonInstanceMetadata", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setCommonInstanceMetadata", - "request": { - "$ref": "Metadata" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setDefaultNetworkTier": { - "description": "Sets the default network tier of the project. The default network tier is\nused when an address/forwardingRule/instance is created without specifying\nthe network tier field.", - "flatPath": "projects/{project}/setDefaultNetworkTier", - "httpMethod": "POST", - "id": "compute.projects.setDefaultNetworkTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setDefaultNetworkTier", - "request": { - "$ref": "ProjectsSetDefaultNetworkTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setManagedProtectionTier": { - "description": "Sets the Cloud Armor Managed Protection (CAMP) tier of the project. To set\nPLUS or above the billing account of the project must be subscribed to\nManaged Protection Plus. See Subscribing\nto Managed Protection Plus for more information.", - "flatPath": "projects/{project}/setManagedProtectionTier", - "httpMethod": "POST", - "id": "compute.projects.setManagedProtectionTier", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setManagedProtectionTier", - "request": { - "$ref": "ProjectsSetManagedProtectionTierRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUsageExportBucket": { - "description": "Enables the usage export feature and sets theusage export bucket\nwhere reports are stored. If you provide an empty request body using this\nmethod, the usage export feature will be disabled.", - "flatPath": "projects/{project}/setUsageExportBucket", - "httpMethod": "POST", - "id": "compute.projects.setUsageExportBucket", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/setUsageExportBucket", - "request": { - "$ref": "UsageExportLocation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "publicAdvertisedPrefixes": { - "methods": { - "announce": { - "description": "Announces the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.announce", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "The name of the public advertised prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "DELETE", - "id": "compute.publicAdvertisedPrefixes.delete", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PublicAdvertisedPrefix resource.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "GET", - "id": "compute.publicAdvertisedPrefixes.get", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "response": { - "$ref": "PublicAdvertisedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PublicAdvertisedPrefix in the specified project\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes", - "request": { - "$ref": "PublicAdvertisedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the PublicAdvertisedPrefixes for a project.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes", - "httpMethod": "GET", - "id": "compute.publicAdvertisedPrefixes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes", - "response": { - "$ref": "PublicAdvertisedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified Router resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "httpMethod": "PATCH", - "id": "compute.publicAdvertisedPrefixes.patch", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "Name of the PublicAdvertisedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", - "request": { - "$ref": "PublicAdvertisedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "withdraw": { - "description": "Withdraws the specified PublicAdvertisedPrefix", - "flatPath": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", - "httpMethod": "POST", - "id": "compute.publicAdvertisedPrefixes.withdraw", - "parameterOrder": [ - "project", - "publicAdvertisedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicAdvertisedPrefix": { - "description": "The name of the public advertised prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "publicDelegatedPrefixes": { - "methods": { - "aggregatedList": { - "description": "Lists all PublicDelegatedPrefix resources owned by the specific project\nacross all scopes.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "announce": { - "description": "Announces the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.announce", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "The name of the public delegated prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion where\nthe public delegated prefix is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "DELETE", - "id": "compute.publicDelegatedPrefixes.delete", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified PublicDelegatedPrefix resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.get", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "response": { - "$ref": "PublicDelegatedPrefix" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a PublicDelegatedPrefix in the specified project in the given\nregion using the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the PublicDelegatedPrefixes for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "httpMethod": "GET", - "id": "compute.publicDelegatedPrefixes.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes", - "response": { - "$ref": "PublicDelegatedPrefixList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified PublicDelegatedPrefix resource with the data included\nin the request. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "httpMethod": "PATCH", - "id": "compute.publicDelegatedPrefixes.patch", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "Name of the PublicDelegatedPrefix resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", - "request": { - "$ref": "PublicDelegatedPrefix" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "withdraw": { - "description": "Withdraws the specified PublicDelegatedPrefix in the given region.", - "flatPath": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", - "httpMethod": "POST", - "id": "compute.publicDelegatedPrefixes.withdraw", - "parameterOrder": [ - "project", - "region", - "publicDelegatedPrefix" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "publicDelegatedPrefix": { - "description": "The name of the public delegated prefix. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion where\nthe public delegated prefix is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionAutoscalers": { - "methods": { - "delete": { - "description": "Deletes the specified autoscaler.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "DELETE", - "id": "compute.regionAutoscalers.delete", - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified autoscaler.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "httpMethod": "GET", - "id": "compute.regionAutoscalers.get", - "parameterOrder": [ - "project", - "region", - "autoscaler" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", - "response": { - "$ref": "Autoscaler" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an autoscaler in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "POST", - "id": "compute.regionAutoscalers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of autoscalers contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "GET", - "id": "compute.regionAutoscalers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "response": { - "$ref": "RegionAutoscalerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates an autoscaler in the specified project using\nthe data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "PATCH", - "id": "compute.regionAutoscalers.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to patch.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionAutoscalers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates an autoscaler in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/autoscalers", - "httpMethod": "PUT", - "id": "compute.regionAutoscalers.update", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to update.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/autoscalers", - "request": { - "$ref": "Autoscaler" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionBackendBuckets": { - "methods": { - "delete": { - "description": "Deletes the specified regional BackendBucket resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "DELETE", - "id": "compute.regionBackendBuckets.delete", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "forceDelete": { - "description": "Force delete the backend bucket even if it is still in use by other\nresources. It's intended to be used internally only for requests from\nwipeout.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional BackendBucket resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.get", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "response": { - "$ref": "BackendBucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a RegionBackendBucket in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified\nproject in the given region.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets", - "response": { - "$ref": "BackendBucketList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend buckets in the specified project in\nthe given region.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/listUsable", - "httpMethod": "GET", - "id": "compute.regionBackendBuckets.listUsable", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/listUsable", - "response": { - "$ref": "BackendBucketListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "httpMethod": "PATCH", - "id": "compute.regionBackendBuckets.patch", - "parameterOrder": [ - "project", - "region", - "backendBucket" - ], - "parameters": { - "backendBucket": { - "description": "Name of the BackendBucket resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{backendBucket}", - "request": { - "$ref": "BackendBucket" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionBackendBuckets.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendBuckets/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionBackendServices": { - "methods": { - "delete": { - "description": "Deletes the specified regional BackendService resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "DELETE", - "id": "compute.regionBackendServices.delete", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional BackendService resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "GET", - "id": "compute.regionBackendServices.get", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "response": { - "$ref": "BackendService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for this\nregional BackendService.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth", - "httpMethod": "POST", - "id": "compute.regionBackendServices.getHealth", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource for which to get health.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth", - "request": { - "$ref": "ResourceGroupReference" - }, - "response": { - "$ref": "BackendServiceGroupHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionBackendServices.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a regional BackendService resource in the specified project using\nthe data included in the request. For more information, see\nBackend services overview.", - "flatPath": "projects/{project}/regions/{region}/backendServices", - "httpMethod": "POST", - "id": "compute.regionBackendServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of regional BackendService resources available to the\nspecified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/backendServices", - "httpMethod": "GET", - "id": "compute.regionBackendServices.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendServices", - "response": { - "$ref": "BackendServiceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves a list of all usable backend services in the specified project in\nthe given region.", - "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", - "httpMethod": "GET", - "id": "compute.regionBackendServices.listUsable", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/listUsable", - "response": { - "$ref": "BackendServiceListUsable" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional BackendService resource with the data\nincluded in the request. For more information, see \nUnderstanding backend services This method\nsupports PATCH semantics and uses the JSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PATCH", - "id": "compute.regionBackendServices.patch", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendServices.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified backend\nservice. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.regionBackendServices.setSecurityPolicy", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionBackendServices.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified regional BackendService resource with the data\nincluded in the request. For more information,\nsee \nBackend services overview.", - "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", - "httpMethod": "PUT", - "id": "compute.regionBackendServices.update", - "parameterOrder": [ - "project", - "region", - "backendService" - ], - "parameters": { - "backendService": { - "description": "Name of the BackendService resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/backendServices/{backendService}", - "request": { - "$ref": "BackendService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCommitments": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of commitments by region.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/commitments", - "httpMethod": "GET", - "id": "compute.regionCommitments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/commitments", - "response": { - "$ref": "CommitmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified commitment resource.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "GET", - "id": "compute.regionCommitments.get", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}", - "response": { - "$ref": "Commitment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a commitment in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/commitments", - "httpMethod": "POST", - "id": "compute.regionCommitments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments", - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of commitments contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/commitments", - "httpMethod": "GET", - "id": "compute.regionCommitments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/commitments", - "response": { - "$ref": "CommitmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionCommitments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified commitment with the data included in the request.\nUpdate is performed only on selected fields included as part of\nupdate-mask. Only the following fields can be updated: auto_renew and plan.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}", - "httpMethod": "PATCH", - "id": "compute.regionCommitments.update", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment that you want to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}", - "request": { - "$ref": "Commitment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateReservations": { - "description": "Transfers GPUs or Local SSD disks between reservations that are attached\nto the same commitment.", - "flatPath": "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations", - "httpMethod": "POST", - "id": "compute.regionCommitments.updateReservations", - "parameterOrder": [ - "project", - "region", - "commitment" - ], - "parameters": { - "commitment": { - "description": "Name of the commitment for which the reservations are being updated.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations", - "request": { - "$ref": "RegionCommitmentsUpdateReservationsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionCompositeHealthChecks": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all CompositeHealthCheck resources (all\nregional) available to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/compositeHealthChecks", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/compositeHealthChecks", - "response": { - "$ref": "CompositeHealthCheckAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified CompositeHealthCheck in the given region", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "DELETE", - "id": "compute.regionCompositeHealthChecks.delete", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified CompositeHealthCheck resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.get", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "response": { - "$ref": "CompositeHealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a CompositeHealthCheck in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks", - "httpMethod": "POST", - "id": "compute.regionCompositeHealthChecks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks", - "request": { - "$ref": "CompositeHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the CompositeHealthChecks for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks", - "httpMethod": "GET", - "id": "compute.regionCompositeHealthChecks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks", - "response": { - "$ref": "CompositeHealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional CompositeHealthCheck resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "httpMethod": "PATCH", - "id": "compute.regionCompositeHealthChecks.patch", - "parameterOrder": [ - "project", - "region", - "compositeHealthCheck" - ], - "parameters": { - "compositeHealthCheck": { - "description": "Name of the CompositeHealthCheck to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}", - "request": { - "$ref": "CompositeHealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionCompositeHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/compositeHealthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDiskSettings": { - "methods": { - "get": { - "description": "Get Regional Disk Settings.", - "flatPath": "projects/{project}/regions/{region}/diskSettings", - "httpMethod": "GET", - "id": "compute.regionDiskSettings.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskSettings", - "response": { - "$ref": "DiskSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch Regional Disk Settings", - "flatPath": "projects/{project}/regions/{region}/diskSettings", - "httpMethod": "PATCH", - "id": "compute.regionDiskSettings.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskSettings", - "request": { - "$ref": "DiskSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionDiskTypes": { - "methods": { - "get": { - "description": "Returns the specified regional disk type.", - "flatPath": "projects/{project}/regions/{region}/diskTypes/{diskType}", - "httpMethod": "GET", - "id": "compute.regionDiskTypes.get", - "parameterOrder": [ - "project", - "region", - "diskType" - ], - "parameters": { - "diskType": { - "description": "Name of the disk type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/diskTypes/{diskType}", - "response": { - "$ref": "DiskType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of regional disk types available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/diskTypes", - "httpMethod": "GET", - "id": "compute.regionDiskTypes.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/diskTypes", - "response": { - "$ref": "RegionDiskTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionDisks": { - "methods": { - "addResourcePolicies": { - "description": "Adds existing resource policies to a regional disk. You can only add one\npolicy which will be applied to this disk for scheduling snapshot\ncreation.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies", - "httpMethod": "POST", - "id": "compute.regionDisks.addResourcePolicies", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies", - "request": { - "$ref": "RegionDisksAddResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "bulkInsert": { - "description": "Bulk create a set of disks.", - "flatPath": "projects/{project}/regions/{region}/disks/bulkInsert", - "httpMethod": "POST", - "id": "compute.regionDisks.bulkInsert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/bulkInsert", - "request": { - "$ref": "BulkInsertDiskResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk. For regular snapshot\ncreation, consider using snapshots.insert\ninstead, as that method supports more features, such as creating snapshots\nin a project different from the source disk project.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/createSnapshot", - "httpMethod": "POST", - "id": "compute.regionDisks.createSnapshot", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to snapshot.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/createSnapshot", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified regional persistent disk. Deleting a regional disk\nremoves all the replicas of its data permanently and is irreversible.\nHowever, deleting a disk does not delete anysnapshots\npreviously made from the disk. You must separatelydelete\nsnapshots.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "DELETE", - "id": "compute.regionDisks.delete", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to delete.", - "location": "path", - "pattern": "\\S{1,66}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns a specified regional persistent disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "GET", - "id": "compute.regionDisks.get", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "response": { - "$ref": "Disk" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionDisks.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a persistent regional disk in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/disks", - "httpMethod": "POST", - "id": "compute.regionDisks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceImage": { - "description": "Source image to restore onto a disk. This field is optional.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of persistent disks contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/disks", - "httpMethod": "GET", - "id": "compute.regionDisks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/disks", - "response": { - "$ref": "DiskList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeResourcePolicies": { - "description": "Removes resource policies from a regional disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies", - "httpMethod": "POST", - "id": "compute.regionDisks.removeResourcePolicies", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies", - "request": { - "$ref": "RegionDisksRemoveResourcePoliciesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the specified regional persistent disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/resize", - "httpMethod": "POST", - "id": "compute.regionDisks.resize", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "Name of the regional persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "The project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/resize", - "request": { - "$ref": "RegionDisksResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionDisks.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on the target regional disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionDisks.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startAsyncReplication": { - "description": "Starts asynchronous replication.\nMust be invoked on the primary disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.startAsyncReplication", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication", - "request": { - "$ref": "RegionDisksStartAsyncReplicationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopAsyncReplication": { - "description": "Stops asynchronous replication.\nCan be invoked either on the primary or on the secondary disk.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.stopAsyncReplication", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The name of the persistent disk.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopGroupAsyncReplication": { - "description": "Stops asynchronous replication for a consistency group of disks.\nCan be invoked either in the primary or secondary scope.", - "flatPath": "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication", - "httpMethod": "POST", - "id": "compute.regionDisks.stopGroupAsyncReplication", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request. This must be the region of the\nprimary or secondary disks in the consistency group.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication", - "request": { - "$ref": "DisksStopGroupAsyncReplicationResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionDisks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Update the specified disk with the data included in the request. Update is\nperformed only on selected fields included as part of update-mask. Only the\nfollowing fields can be modified: user_license.", - "flatPath": "projects/{project}/regions/{region}/disks/{disk}", - "httpMethod": "PATCH", - "id": "compute.regionDisks.update", - "parameterOrder": [ - "project", - "region", - "disk" - ], - "parameters": { - "disk": { - "description": "The disk name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/disks/{disk}", - "request": { - "$ref": "Disk" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionHealthAggregationPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthAggregationPolicy resources,\nregional and global, available to the specified project.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthAggregationPolicies", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthAggregationPolicies", - "response": { - "$ref": "HealthAggregationPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthAggregationPolicy in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionHealthAggregationPolicies.delete", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthAggregationPolicy resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.get", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "response": { - "$ref": "HealthAggregationPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a HealthAggregationPolicy in the specified project in the given\nregion using the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies", - "httpMethod": "POST", - "id": "compute.regionHealthAggregationPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies", - "request": { - "$ref": "HealthAggregationPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the HealthAggregationPolicies for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies", - "httpMethod": "GET", - "id": "compute.regionHealthAggregationPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies", - "response": { - "$ref": "HealthAggregationPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthAggregationPolicy\nresource with the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionHealthAggregationPolicies.patch", - "parameterOrder": [ - "project", - "region", - "healthAggregationPolicy" - ], - "parameters": { - "healthAggregationPolicy": { - "description": "Name of the HealthAggregationPolicy to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}", - "request": { - "$ref": "HealthAggregationPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthAggregationPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthAggregationPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionHealthCheckServices": { - "methods": { - "delete": { - "description": "Deletes the specified regional HealthCheckService.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "DELETE", - "id": "compute.regionHealthCheckServices.delete", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to delete. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified regional HealthCheckService resource.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "GET", - "id": "compute.regionHealthCheckServices.get", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "response": { - "$ref": "HealthCheckService" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a regional HealthCheckService resource in the\nspecified project and region using the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices", - "httpMethod": "POST", - "id": "compute.regionHealthCheckServices.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices", - "request": { - "$ref": "HealthCheckService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the HealthCheckService resources that have been\nconfigured for the specified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices", - "httpMethod": "GET", - "id": "compute.regionHealthCheckServices.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices", - "response": { - "$ref": "HealthCheckServicesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthCheckService resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "httpMethod": "PATCH", - "id": "compute.regionHealthCheckServices.patch", - "parameterOrder": [ - "project", - "region", - "healthCheckService" - ], - "parameters": { - "healthCheckService": { - "description": "Name of the HealthCheckService to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}", - "request": { - "$ref": "HealthCheckService" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthCheckServices.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionHealthChecks": { - "methods": { - "delete": { - "description": "Deletes the specified HealthCheck resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "DELETE", - "id": "compute.regionHealthChecks.delete", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthCheck resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "GET", - "id": "compute.regionHealthChecks.get", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "response": { - "$ref": "HealthCheck" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/healthChecks", - "httpMethod": "POST", - "id": "compute.regionHealthChecks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/healthChecks", - "httpMethod": "GET", - "id": "compute.regionHealthChecks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks", - "response": { - "$ref": "HealthCheckList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "PATCH", - "id": "compute.regionHealthChecks.patch", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthChecks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a HealthCheck resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "httpMethod": "PUT", - "id": "compute.regionHealthChecks.update", - "parameterOrder": [ - "project", - "region", - "healthCheck" - ], - "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionHealthSources": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthSource resources (all\nregional) available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/healthSources", - "httpMethod": "GET", - "id": "compute.regionHealthSources.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/healthSources", - "response": { - "$ref": "HealthSourceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified HealthSource in the given region", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "DELETE", - "id": "compute.regionHealthSources.delete", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified HealthSource resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "GET", - "id": "compute.regionHealthSources.get", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "response": { - "$ref": "HealthSource" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a HealthSource in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/healthSources", - "httpMethod": "POST", - "id": "compute.regionHealthSources.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources", - "request": { - "$ref": "HealthSource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the HealthSources for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/healthSources", - "httpMethod": "GET", - "id": "compute.regionHealthSources.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/healthSources", - "response": { - "$ref": "HealthSourceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified regional HealthSource resource\nwith the data included in the request. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "httpMethod": "PATCH", - "id": "compute.regionHealthSources.patch", - "parameterOrder": [ - "project", - "region", - "healthSource" - ], - "parameters": { - "healthSource": { - "description": "Name of the HealthSource to update. The name\nmust be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", - "request": { - "$ref": "HealthSource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionHealthSources.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagerResizeRequests": { - "methods": { - "cancel": { - "description": "Cancels the specified resize request.\nCancelled resize request no longer waits for the resources to be\nprovisioned. Cancel is only possible for requests that are in accepted\nstate.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagerResizeRequests.cancel", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to cancel.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified, inactive resize request. Requests that are still\nactive cannot be deleted. Deleting request does not delete instances that\nwere provisioned previously.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceGroupManagerResizeRequests.delete", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request to delete.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified resize request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagerResizeRequests.get", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "resizeRequest" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "resizeRequest": { - "description": "The name of the resize request.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "response": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new Resize Request that starts provisioning VMs immediately\nor queues VM creation.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagerResizeRequests.insert", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to which the resize request is scoped.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "request": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of Resize Requests that are contained in the\nmanaged instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagerResizeRequests.list", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region\nscoping this request. Name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", - "response": { - "$ref": "RegionInstanceGroupManagerResizeRequestsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceGroupManagers": { - "methods": { - "abandonInstances": { - "description": "Flags the specified instances to be immediately removed from the managed\ninstance group. Abandoning an instance does not delete the\ninstance, but it does remove the instance from any target pools that are\napplied by the managed instance group. This method reduces thetargetSize of the managed instance group by the\nnumber of instances that you abandon. This operation is marked asDONE when the action is scheduled even if the instances have\nnot yet been removed from the group. You must separately verify the\nstatus of the abandoning action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.abandonInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances", - "request": { - "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "applyUpdatesToInstances": { - "description": "Apply updates to selected instances the managed instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances", - "request": { - "$ref": "RegionInstanceGroupManagersApplyUpdatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "createInstances": { - "description": "Creates instances with per-instance configurations in this regional managed\ninstance group. Instances are created using the current instance template.\nThe create instances operation is marked DONE if\nthe createInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances\nmethod.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.createInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the managed instance group is located.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", - "request": { - "$ref": "RegionInstanceGroupManagersCreateInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified managed instance group and all of the instances\nin that group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceGroupManagers.delete", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately deleted. The instances are also removed from any target\npools of which they were a member. This method reduces thetargetSize of the managed instance group by the number of\ninstances that you delete.\nThe deleteInstances operation is marked DONE if\nthe deleteInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of thedeleting action with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.deleteInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances", - "request": { - "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configurations for the managed instance\ngroup.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerDeleteInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all of the details about the specified managed instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.get", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group to return.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "response": { - "$ref": "InstanceGroupManager" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a managed instance group using the information that you specify\nin the request. After the group is created, instances in the group are\ncreated using the specified instance template.\nThis operation is marked as DONE when the group is created\neven if the instances in the group have not yet been created. You must\nseparately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nA regional managed instance group can contain up to 2000 instances.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of managed instance groups that are contained\nwithin the specified region.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers", - "response": { - "$ref": "RegionInstanceGroupManagerList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listErrors": { - "description": "Lists all errors thrown by actions on instances for a given regional\nmanaged instance group. The filter andorderBy query parameters are not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagers.listErrors", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035, or an\nunsigned long integer: must match regexp pattern:\n(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nThis should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", - "response": { - "$ref": "RegionInstanceGroupManagersListErrorsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are\nscheduled to be created. The list includes any current actions\nthat the group has scheduled for its instances. The orderBy\nquery parameter is not supported. The `pageToken` query parameter is\nsupported only if the group's `listManagedInstancesResults` field is set\nto `PAGINATED`.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.listManagedInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances", - "response": { - "$ref": "RegionInstanceGroupManagersListInstancesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configurations defined for the managed\ninstance group. The orderBy query parameter is not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs", - "response": { - "$ref": "RegionInstanceGroupManagersListInstanceConfigsResp" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is patched\neven if the instances in the group are still in the process of being\npatched. You must separately verify the status of the individual instances\nwith the listmanagedinstances\nmethod. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PATCH", - "id": "compute.regionInstanceGroupManagers.patch", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchPerInstanceConfigs": { - "description": "Inserts or patches per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerPatchInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "recreateInstances": { - "description": "Flags the specified VM instances in the managed instance group to be\nimmediately recreated. Each instance is recreated using the group's current\nconfiguration. This operation is marked as DONE when the flag\nis set even if the instances have not yet been recreated. You must\nseparately verify the status of each instance by checking itscurrentAction field; for more information, see Checking\nthe status of managed instances.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.recreateInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances", - "request": { - "$ref": "RegionInstanceGroupManagersRecreateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Changes the intended size of the managed instance group. If you increase\nthe size, the group creates new instances using the current instance\ntemplate. If you decrease the size, the group deletes one or more\ninstances.\n\nThe resize operation is marked DONE if theresize request is successful. The underlying actions take\nadditional time. You must separately verify the status of thecreating or deleting actions with thelistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resize", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager", - "size" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "size": { - "description": "Number of instances that should exist in this instance group\nmanager.", - "format": "int32", - "location": "query", - "minimum": "0", - "required": true, - "type": "integer" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resizeAdvanced": { - "description": "Resizes the regional managed instance group with advanced configuration\noptions like disabling creation retries. This is an extended version of theresize method.\n\nIf you increase the size, the group creates new instances using the current\ninstance template. If you decrease the size, the group deletes one or more\ninstances.\n\nThe resize operation is marked DONE if theresize request is successful. The underlying actions take\nadditional time. You must separately verify the status of thecreating or deleting actions with the get\norlistmanagedinstances\nmethod.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is removed or deleted.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resizeAdvanced", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.\nIt must be a string that meets the requirements in RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced", - "request": { - "$ref": "RegionInstanceGroupManagersResizeAdvancedRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resumeInstances": { - "description": "Flags the specified instances in the managed instance group to be\nresumed. This method increases thetargetSize and decreases the targetSuspendedSize\nof the managed instance group by the number of instances that you resume.\nThe resumeInstances operation is marked DONE if\nthe resumeInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are suspended. For\nexample, if an instance was previously suspended using the suspendInstances\nmethod, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.resumeInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", - "request": { - "$ref": "RegionInstanceGroupManagersResumeInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setAutoHealingPolicies": { - "deprecated": true, - "description": "Modifies the autohealing policy for the instances in this managed\ninstance group.\n[Deprecated] This method is deprecated. UseregionInstanceGroupManagers.patch instead.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", - "request": { - "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating\ninstances in this group. Existing instances are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are\nassigned. Existing instances in the group are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setTargetPools", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", - "request": { - "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "startInstances": { - "description": "Flags the specified instances in the managed instance group to be\nstarted. This method increases thetargetSize and decreases the targetStoppedSize\nof the managed instance group by the number of instances that you start.\nThe startInstances operation is marked DONE if\nthe startInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances\nmethod.\n\nIn this request, you can only specify instances that are stopped. For\nexample, if an instance was previously stopped using the stopInstances\nmethod, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified\ninstances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.startInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", - "request": { - "$ref": "RegionInstanceGroupManagersStartInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "stopInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately stopped. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetStoppedSize\nof the managed instance group by the number of instances that you stop.\nThe stopInstances operation is marked DONE if\nthe stopInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays stopping the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is stopped.\n\nStopped instances can be started using the startInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.stopInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", - "request": { - "$ref": "RegionInstanceGroupManagersStopInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "suspendInstances": { - "description": "Flags the specified instances in the managed instance group to be\nimmediately suspended. You can only specify instances that are running in\nthis request. This method reduces thetargetSize and increases the targetSuspendedSize\nof the managed instance group by the number of instances that you suspend.\nThe suspendInstances operation is marked DONE if\nthe suspendInstances request is successful. The underlying\nactions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances\nmethod.\n\nIf the standbyPolicy.initialDelaySec field is set, the group\ndelays suspension of the instances until initialDelaySec have\npassed from instance.creationTimestamp (that is, when the\ninstance was created). This delay gives your application time to\nset itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there\nwill be zero delay.\n\nIf the group is part of a backend\nservice that has enabled\nconnection draining, it can take up to 60 seconds after the connection\ndraining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances\nmethod.\n\nYou can specify a maximum of 1000 instances with this method per request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.suspendInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "Name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", - "request": { - "$ref": "RegionInstanceGroupManagersSuspendInstancesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates a managed instance group using the information that you specify\nin the request.\nThis operation is marked as DONE when the group is updated\neven if the instances in the group have not yet been updated. You must\nseparately verify the status of the individual instances with thelistmanagedinstances\nmethod.\n\nIf you update your group to specify a new template or instance\nconfiguration, it's possible that your intended specification for each VM\nin the group is different from the current state of that VM. To learn how\nto apply an updated configuration to the VMs in a MIG, seeUpdating instances in\na MIG.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "httpMethod": "PUT", - "id": "compute.regionInstanceGroupManagers.update", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the instance group manager.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}", - "request": { - "$ref": "InstanceGroupManager" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updatePerInstanceConfigs": { - "description": "Inserts or updates per-instance configurations for the managed instance\ngroup. perInstanceConfig.name serves as a key used to\ndistinguish whether to perform insert or patch.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.\nIt should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request, should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", - "request": { - "$ref": "RegionInstanceGroupManagerUpdateInstanceConfigReq" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstanceGroups": { - "methods": { - "get": { - "description": "Returns the specified instance group resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroups.get", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "Name of the instance group resource to return.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}", - "response": { - "$ref": "InstanceGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of instance group resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups", - "httpMethod": "GET", - "id": "compute.regionInstanceGroups.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups", - "response": { - "$ref": "RegionInstanceGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listInstances": { - "description": "Lists the instances in the specified instance group and displays\ninformation about the named ports. Depending on the specified options, this\nmethod can list all instances or only the instances that are running.\nThe orderBy query parameter is not supported.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.listInstances", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "instanceGroup": { - "description": "Name of the regional instance group for which we want to list the\ninstances.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances", - "request": { - "$ref": "RegionInstanceGroupsListInstancesRequest" - }, - "response": { - "$ref": "RegionInstanceGroupsListInstances" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setNamedPorts": { - "description": "Sets the named ports for the specified regional instance group.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.setNamedPorts", - "parameterOrder": [ - "project", - "region", - "instanceGroup" - ], - "parameters": { - "instanceGroup": { - "description": "The name of the regional instance group where the named ports are updated.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts", - "request": { - "$ref": "RegionInstanceGroupsSetNamedPortsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstanceGroups.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstanceTemplates": { - "methods": { - "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is\npermanent and cannot be undone.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceTemplates.delete", - "parameterOrder": [ - "project", - "region", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified instance template.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "httpMethod": "GET", - "id": "compute.regionInstanceTemplates.get", - "parameterOrder": [ - "project", - "region", - "instanceTemplate" - ], - "parameters": { - "instanceTemplate": { - "description": "The name of the instance template.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}", - "response": { - "$ref": "InstanceTemplate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instance template in the specified project and region using the\nglobal instance template whose URL is included in the request.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates", - "httpMethod": "POST", - "id": "compute.regionInstanceTemplates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates", - "request": { - "$ref": "InstanceTemplate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of instance templates that are contained within the\nspecified project and region.", - "flatPath": "projects/{project}/regions/{region}/instanceTemplates", - "httpMethod": "GET", - "id": "compute.regionInstanceTemplates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the regions for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "view": { - "description": "View of the instance template.", - "enum": [ - "BASIC", - "FULL", - "INSTANCE_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "Include everything except Partner Metadata.", - "Include everything.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instanceTemplates", - "response": { - "$ref": "InstanceTemplateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionInstances": { - "methods": { - "bulkInsert": { - "description": "Creates multiple instances in a given region. Count specifies the number of\ninstances to create.", - "flatPath": "projects/{project}/regions/{region}/instances/bulkInsert", - "httpMethod": "POST", - "id": "compute.regionInstances.bulkInsert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instances/bulkInsert", - "request": { - "$ref": "BulkInsertInstanceResource" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionInstantSnapshots": { - "methods": { - "delete": { - "description": "Deletes the specified InstantSnapshot resource. Keep in mind that deleting\na single instantSnapshot might not necessarily delete all the data on that\ninstantSnapshot. If any data on the instantSnapshot that is marked for\ndeletion is needed for subsequent instantSnapshots, the data will be moved\nto the next corresponding instantSnapshot.\n\nFor more information, seeDeleting\ninstantSnapshots.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "httpMethod": "DELETE", - "id": "compute.regionInstantSnapshots.delete", - "parameterOrder": [ - "project", - "region", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified InstantSnapshot resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.get", - "parameterOrder": [ - "project", - "region", - "instantSnapshot" - ], - "parameters": { - "instantSnapshot": { - "description": "Name of the InstantSnapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}", - "response": { - "$ref": "InstantSnapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates an instant snapshot in the specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots", - "request": { - "$ref": "InstantSnapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of InstantSnapshot resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots", - "httpMethod": "GET", - "id": "compute.regionInstantSnapshots.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots", - "response": { - "$ref": "InstantSnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a instantSnapshot in the given region. To learn more\nabout labels, read the Labeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionInstantSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionMultiMigs": { - "methods": { - "delete": { - "description": "Deletes a multi-MIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "DELETE", - "id": "compute.regionMultiMigs.delete", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the multi-MIG to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns all the details of a specific multi-MIG.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.get", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the multi-MIG resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "MultiMig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a multi-MIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "POST", - "id": "compute.regionMultiMigs.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents you from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "request": { - "$ref": "MultiMig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of multi-MIGs in a project and region.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "response": { - "$ref": "MultiMigsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkEndpointGroups": { - "methods": { - "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group where you are attaching network\nendpoints to. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints", - "request": { - "$ref": "RegionNetworkEndpointGroupsAttachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network endpoint group. Note that the NEG cannot be\ndeleted if it is configured as a backend of a backend service.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkEndpointGroups.delete", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group to delete. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "detachNetworkEndpoints": { - "description": "Detach the network endpoint from the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group you are detaching network\nendpoints from. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints", - "request": { - "$ref": "RegionNetworkEndpointGroupsDetachEndpointsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "httpMethod": "GET", - "id": "compute.regionNetworkEndpointGroups.get", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "networkEndpointGroup": { - "description": "The name of the network endpoint group. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nthe network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}", - "response": { - "$ref": "NetworkEndpointGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a network endpoint group in the specified project using the\nparameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region where\nyou want to create the network endpoint group. It should comply with\nRFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups", - "request": { - "$ref": "NetworkEndpointGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of regional network endpoint groups available to the\nspecified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups", - "httpMethod": "GET", - "id": "compute.regionNetworkEndpointGroups.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups", - "response": { - "$ref": "NetworkEndpointGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", - "flatPath": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "httpMethod": "POST", - "id": "compute.regionNetworkEndpointGroups.listNetworkEndpoints", - "parameterOrder": [ - "project", - "region", - "networkEndpointGroup" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "networkEndpointGroup": { - "description": "The name of the network endpoint group from which you want to generate a\nlist of included network endpoints. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of theregion\nwhere the network endpoint group is located. It should comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints", - "response": { - "$ref": "NetworkEndpointGroupsListNetworkEndpoints" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkFirewallPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.addAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "associatedPolicyToBeReplaced": { - "description": "Name of the firewall policy associated with the target network to swap\nassociation with. This field is mutually exclusive with\n'replace_existing_association'.", - "location": "query", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "type": "string" - }, - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "replaceExistingAssociation": { - "description": "Indicates whether or not to replace it if an association already exists.\nThis is false by default, in which case an error will be returned if an\nassociation already exists.", - "location": "query", - "type": "boolean" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addRule": { - "description": "Inserts a rule into a network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.addRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "maxPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "minPriority": { - "description": "When rule.priority is not specified, auto choose a unused priority betweenminPriority and maxPriority\u003e.\nThis field is exclusive with rule.priority.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "cloneRules": { - "description": "Copies rules to the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.cloneRules", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sourceFirewallPolicy": { - "description": "The firewall policy from which to copy rules.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkFirewallPolicies.delete", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.get", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "response": { - "$ref": "FirewallPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "The name of the association to get from the firewall policy.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation", - "response": { - "$ref": "FirewallPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getEffectiveFirewalls": { - "description": "Returns the effective firewalls on a given network.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", - "parameterOrder": [ - "project", - "region", - "network" - ], - "parameters": { - "network": { - "description": "Network reference", - "location": "query", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls", - "response": { - "$ref": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.getRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule", - "response": { - "$ref": "FirewallPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new network firewall policy in the specified project and region.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the network firewall policies that have been configured\nfor the specified project in the given region.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkFirewallPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies", - "response": { - "$ref": "FirewallPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionNetworkFirewallPolicies.patch", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", - "request": { - "$ref": "FirewallPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchAssociation": { - "description": "Updates an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.patchAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation", - "request": { - "$ref": "FirewallPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.patchRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule", - "request": { - "$ref": "FirewallPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified network firewall policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.removeAssociation", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "name": { - "description": "Name for the association that will be removed.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.removeRule", - "parameterOrder": [ - "project", - "region", - "firewallPolicy" - ], - "parameters": { - "firewallPolicy": { - "description": "Name of the firewall policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the firewall policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionNetworkFirewallPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionNetworkPolicies": { - "methods": { - "addAssociation": { - "description": "Inserts an association for the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.addAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation", - "request": { - "$ref": "NetworkPolicyAssociation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addTrafficClassificationRule": { - "description": "Inserts a rule into a network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.addTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule", - "request": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of network policies.\n\nTo prevent failure, it's recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/networkPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/networkPolicies", - "response": { - "$ref": "NetworkPolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionNetworkPolicies.delete", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.get", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "response": { - "$ref": "NetworkPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getAssociation": { - "description": "Gets an association with the specified name.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.getAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "name": { - "description": "The name of the association to get from the network policy.", - "location": "query", - "type": "string" - }, - "networkPolicy": { - "description": "Name of the network policy to which the queried association belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation", - "response": { - "$ref": "NetworkPolicyAssociation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getTrafficClassificationRule": { - "description": "Gets a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.getTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to get from the network policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule", - "response": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID\nso that if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies", - "request": { - "$ref": "NetworkPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the policies that have been configured for the specified project\nin the given region.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies", - "httpMethod": "GET", - "id": "compute.regionNetworkPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies", - "response": { - "$ref": "NetworkPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the\nrequest.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionNetworkPolicies.patch", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}", - "request": { - "$ref": "NetworkPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchTrafficClassificationRule": { - "description": "Patches a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.patchTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the traffic classification rule to patch. Only rules with\na priority value between 1 and 2147482647 (inclusive) can be patched.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule", - "request": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeAssociation": { - "description": "Removes an association for the specified network policy.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.removeAssociation", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "name": { - "description": "Name for the association that will be removed.", - "location": "query", - "type": "string" - }, - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeTrafficClassificationRule": { - "description": "Deletes a rule of the specified priority.", - "flatPath": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule", - "httpMethod": "POST", - "id": "compute.regionNetworkPolicies.removeTrafficClassificationRule", - "parameterOrder": [ - "project", - "region", - "networkPolicy" - ], - "parameters": { - "networkPolicy": { - "description": "Name of the network policy resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "priority": { - "description": "The priority of the rule to remove from the network policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionNotificationEndpoints": { - "methods": { - "delete": { - "description": "Deletes the specified NotificationEndpoint in the given region", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "httpMethod": "DELETE", - "id": "compute.regionNotificationEndpoints.delete", - "parameterOrder": [ - "project", - "region", - "notificationEndpoint" - ], - "parameters": { - "notificationEndpoint": { - "description": "Name of the NotificationEndpoint resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified NotificationEndpoint resource in the given region.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.get", - "parameterOrder": [ - "project", - "region", - "notificationEndpoint" - ], - "parameters": { - "notificationEndpoint": { - "description": "Name of the NotificationEndpoint resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}", - "response": { - "$ref": "NotificationEndpoint" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Create a NotificationEndpoint in the specified project in the given region\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints", - "httpMethod": "POST", - "id": "compute.regionNotificationEndpoints.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints", - "request": { - "$ref": "NotificationEndpoint" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the NotificationEndpoints for a project in the given region.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints", - "response": { - "$ref": "NotificationEndpointList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionNotificationEndpoints.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionOperations": { - "methods": { - "delete": { - "description": "Deletes the specified region-specific Operations resource.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.regionOperations.delete", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified region-specific Operations resource.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.regionOperations.get", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/operations", - "httpMethod": "GET", - "id": "compute.regionOperations.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method differs from the\n`GET` method in that it waits for no more than the default\ndeadline (2 minutes) and then returns the current state of the operation,\nwhich might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/regions/{region}/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.regionOperations.wait", - "parameterOrder": [ - "project", - "region", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionSecurityPolicies": { - "methods": { - "addRule": { - "description": "Inserts a rule into a security policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.addRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionSecurityPolicies.delete", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.get", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.getRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified project\nand region.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies", - "httpMethod": "GET", - "id": "compute.regionSecurityPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request. To\nclear fields in the policy, leave the fields empty and specify them in the\nupdateMask. This cannot be used to be update the rules in the policy.\nPlease use the per rule methods like addRule, patchRule, and removeRule\ninstead.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionSecurityPolicies.patch", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority. To clear fields in the rule,\nleave the fields empty and specify them in the updateMask.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.patchRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.removeRule", - "parameterOrder": [ - "project", - "region", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels,\nread the Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionSecurityPolicies.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionSnapshotSettings": { - "methods": { - "get": { - "description": "Get region snapshot settings.", - "flatPath": "projects/{project}/regions/{region}/snapshotSettings", - "httpMethod": "GET", - "id": "compute.regionSnapshotSettings.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshotSettings", - "response": { - "$ref": "SnapshotSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch region snapshot settings.", - "flatPath": "projects/{project}/regions/{region}/snapshotSettings", - "httpMethod": "PATCH", - "id": "compute.regionSnapshotSettings.patch", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshotSettings", - "request": { - "$ref": "SnapshotSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionSnapshots": { - "methods": { - "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting\na single snapshot might not necessarily delete all the data on that\nsnapshot. If any data on the snapshot that is marked for deletion is\nneeded for subsequent snapshots, the data will be moved to the next\ncorresponding snapshot.\n\nFor more information, seeDeleting\nsnapshots.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "httpMethod": "DELETE", - "id": "compute.regionSnapshots.delete", - "parameterOrder": [ - "project", - "region", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Snapshot resource.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "httpMethod": "GET", - "id": "compute.regionSnapshots.get", - "parameterOrder": [ - "project", - "region", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{snapshot}", - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.regionSnapshots.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a snapshot in the specified region using the data included\nin the request.", - "flatPath": "projects/{project}/regions/{region}/snapshots", - "httpMethod": "POST", - "id": "compute.regionSnapshots.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Snapshot resources contained within\nthe specified region.", - "flatPath": "projects/{project}/regions/{region}/snapshots", - "httpMethod": "GET", - "id": "compute.regionSnapshots.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/snapshots", - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.regionSnapshots.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a regional snapshot. To learn more about labels, read\nthe Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.regionSnapshots.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSnapshots.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/snapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionSslCertificates": { - "methods": { - "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "id": "compute.regionSslCertificates.delete", - "parameterOrder": [ - "project", - "region", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get\na list of available SSL certificates by making a list()\nrequest.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "id": "compute.regionSslCertificates.get", - "parameterOrder": [ - "project", - "region", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}", - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using\nthe data included in the request", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", - "httpMethod": "POST", - "id": "compute.regionSslCertificates.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates", - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified\nproject in the specified region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates", - "httpMethod": "GET", - "id": "compute.regionSslCertificates.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates", - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource and region.", - "flatPath": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSslCertificates.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionSslPolicies": { - "methods": { - "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted\nonly if it is not in use by any TargetHttpsProxy or TargetSslProxy\nresources.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "DELETE", - "id": "compute.regionSslPolicies.delete", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to delete. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.get", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "response": { - "$ref": "SslPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project and region using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies", - "httpMethod": "POST", - "id": "compute.regionSslPolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the SSL policies that have been configured for the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies", - "response": { - "$ref": "SslPoliciesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using\ncustom profile.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures", - "httpMethod": "GET", - "id": "compute.regionSslPolicies.listAvailableFeatures", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures", - "response": { - "$ref": "SslPoliciesListAvailableFeaturesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "httpMethod": "PATCH", - "id": "compute.regionSslPolicies.patch", - "parameterOrder": [ - "project", - "region", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/sslPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionSslPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/sslPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetHttpProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetHttpProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.get", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpProxy resources available\nto the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.regionTargetHttpProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetHttpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetHttpsProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetHttpsProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.get", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region\nusing the data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available\nto the specified project in the specified region.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.regionTargetHttpsProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified regional TargetHttpsProxy resource with the data\nincluded in the request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.regionTargetHttpsProxies.patch", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setSslCertificates", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set an\nSslCertificates resource for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "request": { - "$ref": "RegionTargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.setUrlMap", - "parameterOrder": [ - "project", - "region", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetHttpsProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionTargetTcpProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "id": "compute.regionTargetTcpProxies.delete", - "parameterOrder": [ - "project", - "region", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "id": "compute.regionTargetTcpProxies.get", - "parameterOrder": [ - "project", - "region", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies", - "httpMethod": "POST", - "id": "compute.regionTargetTcpProxies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies", - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of TargetTcpProxy resources\navailable to the specified project in a given region.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.regionTargetTcpProxies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetTcpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionTargetTcpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetTcpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regionUrlMaps": { - "methods": { - "delete": { - "description": "Deletes the specified UrlMap resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "id": "compute.regionUrlMaps.delete", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified UrlMap resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "GET", - "id": "compute.regionUrlMaps.get", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a UrlMap resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/urlMaps", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path,\nscoped to the specified UrlMap.\n\nFor more information, see [Invalidating cached\ncontent](/cdn/docs/invalidating-cached-content).", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.invalidateCache", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache", - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of UrlMap resources available to the specified\nproject in the specified region.", - "flatPath": "projects/{project}/regions/{region}/urlMaps", - "httpMethod": "GET", - "id": "compute.regionUrlMaps.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps", - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified UrlMap resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "id": "compute.regionUrlMaps.patch", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified UrlMap resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "httpMethod": "PUT", - "id": "compute.regionUrlMaps.update", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "begin_interface: MixerMutationRequestBuilder\nRequest ID to support idempotency.", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the\nprovided UrlMap will be run. Calling this method does NOT create the\nUrlMap.", - "flatPath": "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "id": "compute.regionUrlMaps.validate", - "parameterOrder": [ - "project", - "region", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to be validated as.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate", - "request": { - "$ref": "RegionUrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "regionZones": { - "methods": { - "list": { - "description": "Retrieves the list of Zone resources under the specific region available to\nthe specified project.", - "flatPath": "projects/{project}/regions/{region}/zones", - "httpMethod": "GET", - "id": "compute.regionZones.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/zones", - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "regions": { - "methods": { - "get": { - "description": "Returns the specified Region resource.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information (the `quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.\n\nThis method fails if the quota information is unavailable for the region\nand if the organization policy constraint\ncompute.requireBasicQuotaInResponse is enforced. This\nconstraint, when enforced, disables the fail-open behaviour when quota\ninformation (the `items.quotas` field) is unavailable for the region.\nIt is recommended to use the default setting\nfor the constraint unless your application requires the fail-closed\nbehaviour for this method.", - "flatPath": "projects/{project}/regions/{region}", - "httpMethod": "GET", - "id": "compute.regions.get", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}", - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of region resources available to the specified project.\n\nTo decrease latency for this method, you can optionally omit any unneeded\ninformation from the response by using a field mask. This practice is\nespecially recommended for unused quota information\n(the `items.quotas` field).\nTo exclude one or more fields, set your request's `fields` query parameter\nto only include the fields you need. For example, to only include the `id`\nand `selfLink` fields, add the query parameter `?fields=id,selfLink` to\nyour request.\n\nThis method fails if the quota information is unavailable for the region\nand if the organization policy constraint\ncompute.requireBasicQuotaInResponse is enforced. This\nconstraint, when enforced, disables the fail-open behaviour when quota\ninformation (the `items.quotas` field) is unavailable for the region.\nIt is recommended to use the default setting\nfor the constraint unless your application requires the fail-closed\nbehaviour for this method.", - "flatPath": "projects/{project}/regions", - "httpMethod": "GET", - "id": "compute.regions.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions", - "response": { - "$ref": "RegionList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "reservationBlocks": { - "methods": { - "get": { - "description": "Retrieves information about the specified reservation block.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", - "httpMethod": "GET", - "id": "compute.reservationBlocks.get", - "parameterOrder": [ - "project", - "zone", - "reservation", - "reservationBlock" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationBlock": { - "description": "The name of the reservation block.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the Block.", - "enum": [ - "BASIC", - "BLOCK_VIEW_UNSPECIFIED", - "FULL" - ], - "enumDescriptions": [ - "This view includes basic information about the reservation block", - "The default / unset value. The API will default to the BASIC view.", - "Includes detailed topology view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}", - "response": { - "$ref": "ReservationBlocksGetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.reservationBlocks.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of reservation blocks under a single reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", - "httpMethod": "GET", - "id": "compute.reservationBlocks.list", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks", - "response": { - "$ref": "ReservationBlocksListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Allows customers to perform maintenance on a reservation block", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservationBlocks.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "reservation", - "reservationBlock" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationBlock": { - "description": "The name of the reservation block.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", - "request": { - "$ref": "ReservationsBlocksPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.reservationBlocks.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetNestedPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.reservationBlocks.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "reservationSubBlocks": { - "methods": { - "get": { - "description": "Retrieves information about the specified reservation subBlock.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}", - "httpMethod": "GET", - "id": "compute.reservationSubBlocks.get", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "view": { - "description": "View of the subBlock.", - "enum": [ - "SUB_BLOCK_VIEW_BASIC", - "SUB_BLOCK_VIEW_FULL", - "SUB_BLOCK_VIEW_UNSPECIFIED" - ], - "enumDescriptions": [ - "This view includes basic information about the reservation sub block", - "Includes detailed topology view.", - "The default / unset value. The API will default to the BASIC view." - ], - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}", - "response": { - "$ref": "ReservationSubBlocksGetResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.reservationSubBlocks.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of reservation subBlocks under a single reservation.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks", - "httpMethod": "GET", - "id": "compute.reservationSubBlocks.list", - "parameterOrder": [ - "project", - "zone", - "parentName" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks", - "response": { - "$ref": "ReservationSubBlocksListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Allows customers to perform maintenance on a reservation subBlock", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "reportFaulty": { - "description": "Allows customers to report a faulty subBlock.", - "flatPath": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.reportFaulty", - "parameterOrder": [ - "project", - "zone", - "parentName", - "reservationSubBlock" - ], - "parameters": { - "parentName": { - "description": "The name of the parent reservation and parent block. In the format of\nreservations/{reservation_name}/reservationBlocks/{reservation_block_name}", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservationSubBlock": { - "description": "The name of the reservation subBlock.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty", - "request": { - "$ref": "ReservationSubBlocksReportFaultyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetNestedPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.reservationSubBlocks.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "parentResource", - "resource" - ], - "parameters": { - "parentResource": { - "description": "Name or id of parent resource of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-zA-Z0-9/]{0,255}[a-zA-Z0-9])?", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "reservations": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of reservations.\n\nTo prevent failure, it is recommended that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/reservations", - "httpMethod": "GET", - "id": "compute.reservations.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/reservations", - "response": { - "$ref": "ReservationAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "DELETE", - "id": "compute.reservations.delete", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves information about the specified reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "GET", - "id": "compute.reservations.get", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to retrieve.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "response": { - "$ref": "Reservation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.reservations.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new reservation. For more information, readReserving zonal\nresources.", - "flatPath": "projects/{project}/zones/{zone}/reservations", - "httpMethod": "POST", - "id": "compute.reservations.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations", - "request": { - "$ref": "Reservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list of all the reservations that have been configured for the\nspecified project in specified zone.", - "flatPath": "projects/{project}/zones/{zone}/reservations", - "httpMethod": "GET", - "id": "compute.reservations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations", - "response": { - "$ref": "ReservationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "performMaintenance": { - "description": "Perform maintenance on an extended reservation", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", - "httpMethod": "POST", - "id": "compute.reservations.performMaintenance", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "The name of the reservation.\nName should conform to RFC1035 or be a resource ID.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request. Zone name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", - "request": { - "$ref": "ReservationsPerformMaintenanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "resize": { - "description": "Resizes the reservation (applicable to standalone reservations only). For\nmore information, readModifying\nreservations.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/resize", - "httpMethod": "POST", - "id": "compute.reservations.resize", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}/resize", - "request": { - "$ref": "ReservationsResizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.reservations.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.reservations.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Update share settings of the reservation.", - "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}", - "httpMethod": "PATCH", - "id": "compute.reservations.update", - "parameterOrder": [ - "project", - "zone", - "reservation" - ], - "parameters": { - "paths": { - "location": "query", - "repeated": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "reservation": { - "description": "Name of the reservation to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/reservations/{reservation}", - "request": { - "$ref": "Reservation" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "resourcePolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of resource policies.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/resourcePolicies", - "httpMethod": "GET", - "id": "compute.resourcePolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/resourcePolicies", - "response": { - "$ref": "ResourcePolicyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "DELETE", - "id": "compute.resourcePolicies.delete", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resourcePolicy": { - "description": "Name of the resource policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves all information of the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "GET", - "id": "compute.resourcePolicies.get", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resourcePolicy": { - "description": "Name of the resource policy to retrieve.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "response": { - "$ref": "ResourcePolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.resourcePolicies.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies", - "httpMethod": "POST", - "id": "compute.resourcePolicies.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies", - "request": { - "$ref": "ResourcePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "A list all the resource policies that have been configured for the\nspecified project in specified region.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies", - "httpMethod": "GET", - "id": "compute.resourcePolicies.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies", - "response": { - "$ref": "ResourcePolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Modify the specified resource policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "httpMethod": "PATCH", - "id": "compute.resourcePolicies.patch", - "parameterOrder": [ - "project", - "region", - "resourcePolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resourcePolicy": { - "description": "Id of the resource policy to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}", - "request": { - "$ref": "ResourcePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.resourcePolicies.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.resourcePolicies.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "rolloutPlans": { - "methods": { - "delete": { - "description": "Deletes a RolloutPlan.", - "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "httpMethod": "DELETE", - "id": "compute.rolloutPlans.delete", - "parameterOrder": [ - "project", - "rolloutPlan" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rolloutPlan": { - "description": "Name of the RolloutPlan resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a single project-scoped RolloutPlan.", - "flatPath": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "httpMethod": "GET", - "id": "compute.rolloutPlans.get", - "parameterOrder": [ - "project", - "rolloutPlan" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "rolloutPlan": { - "description": "Name of the persistent rollout plan to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans/{rolloutPlan}", - "response": { - "$ref": "RolloutPlan" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new RolloutPlan in a given project and location.", - "flatPath": "projects/{project}/global/rolloutPlans", - "httpMethod": "POST", - "id": "compute.rolloutPlans.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/rolloutPlans", - "request": { - "$ref": "RolloutPlan" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists RolloutPlans in a given project and location.", - "flatPath": "projects/{project}/global/rolloutPlans", - "httpMethod": "GET", - "id": "compute.rolloutPlans.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/rolloutPlans", - "response": { - "$ref": "RolloutPlansListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "rollouts": { - "methods": { - "cancel": { - "description": "Cancels a Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "PATCH", - "id": "compute.rollouts.cancel", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rollback": { - "description": "Optional. If true, then the ongoing rollout must be rolled back. Else, just cancel\nthe rollout without taking any further actions. Note that products must\nsupport at least one of these options, however, it does not need to support\nboth.", - "location": "query", - "type": "boolean" - }, - "rollout": { - "description": "Name of the Rollout resource to cancel.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "delete": { - "description": "Deletes a Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "DELETE", - "id": "compute.rollouts.delete", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "rollout": { - "description": "Name of the Rollout resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets details of a single project-scoped Rollout.", - "flatPath": "projects/{project}/global/rollouts/{rollout}", - "httpMethod": "GET", - "id": "compute.rollouts.get", - "parameterOrder": [ - "project", - "rollout" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "rollout": { - "description": "Name of the persistent rollout to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/rollouts/{rollout}", - "response": { - "$ref": "Rollout" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Lists Rollouts in a given project and location.", - "flatPath": "projects/{project}/global/rollouts", - "httpMethod": "GET", - "id": "compute.rollouts.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/rollouts", - "response": { - "$ref": "RolloutsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "routers": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of routers.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/routers", - "httpMethod": "GET", - "id": "compute.routers.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/routers", - "response": { - "$ref": "RouterAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Router resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "DELETE", - "id": "compute.routers.delete", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "deleteRoutePolicy": { - "description": "Deletes Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.deleteRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "policy": { - "description": "The Policy name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Router resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "GET", - "id": "compute.routers.get", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "response": { - "$ref": "Router" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getNatIpInfo": { - "description": "Retrieves runtime NAT IP information.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", - "httpMethod": "GET", - "id": "compute.routers.getNatIpInfo", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "natName": { - "description": "Name of the nat service to filter the NAT IP information.\nIf it is omitted, all nats for this router will be returned.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query for Nat IP information. The name\nshould conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo", - "response": { - "$ref": "NatIpInfoResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", - "httpMethod": "GET", - "id": "compute.routers.getNatMappingInfo", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "natName": { - "description": "Name of the nat service to filter the Nat Mapping information.\nIf it is omitted, all nats for this router will be returned.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "router": { - "description": "Name of the Router resource to query for Nat Mapping information of\nVM endpoints.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo", - "response": { - "$ref": "VmEndpointNatMappingsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRoutePolicy": { - "description": "Returns specified Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", - "httpMethod": "GET", - "id": "compute.routers.getRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "policy": { - "description": "The Policy name for this request. Name must conform to RFC1035", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query for the route policy. The name should\nconform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", - "response": { - "$ref": "RoutersGetRoutePolicyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRouterStatus": { - "description": "Retrieves runtime information of the specified router.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRouterStatus", - "httpMethod": "GET", - "id": "compute.routers.getRouterStatus", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/getRouterStatus", - "response": { - "$ref": "RouterStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a Router resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/routers", - "httpMethod": "POST", - "id": "compute.routers.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of Router resources available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/routers", - "httpMethod": "GET", - "id": "compute.routers.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/routers", - "response": { - "$ref": "RouterList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listBgpRoutes": { - "description": "Retrieves a list of router bgp routes available to the specified project.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", - "httpMethod": "GET", - "id": "compute.routers.listBgpRoutes", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "addressFamily": { - "default": "UNSPECIFIED_IP_VERSION", - "description": "(Required) limit results to this address family (either IPv4 or IPv6)", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_IP_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "location": "query", - "type": "string" - }, - "destinationPrefix": { - "description": "Limit results to destinations that are subnets of this CIDR range", - "location": "query", - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "peer": { - "description": "(Required) limit results to the BGP peer with the given name.\nName should conform to RFC1035.", - "location": "query", - "type": "string" - }, - "policyApplied": { - "default": "true", - "description": "When true, the method returns post-policy routes. Otherwise, it returns\npre-policy routes.", - "location": "query", - "type": "boolean" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "routeType": { - "default": "UNSPECIFIED_ROUTE_TYPE", - "description": "(Required) limit results to this type of route (either LEARNED or\nADVERTISED)", - "enum": [ - "ADVERTISED", - "LEARNED", - "UNSPECIFIED_ROUTE_TYPE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "location": "query", - "type": "string" - }, - "router": { - "description": "Name or id of the resource for this request.\nName should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", - "response": { - "$ref": "RoutersListBgpRoutes" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listRoutePolicies": { - "description": "Retrieves a list of router route policy subresources available to the\nspecified project.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", - "httpMethod": "GET", - "id": "compute.routers.listRoutePolicies", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "router": { - "description": "Name or id of the resource for this request.\nName should conform to RFC1035.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", - "response": { - "$ref": "RoutersListRoutePolicies" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified Router resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "PATCH", - "id": "compute.routers.patch", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRoutePolicy": { - "description": "Patches Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.patchRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", - "request": { - "$ref": "RoutePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "preview": { - "description": "Preview fields auto-generated during router create andupdate operations.\nCalling this method does NOT create or update the router.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/preview", - "httpMethod": "POST", - "id": "compute.routers.preview", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "router": { - "description": "Name of the Router resource to query.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/preview", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "RoutersPreviewResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/routers/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.routers.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified Router resource with the data included in the\nrequest. This method conforms toPUT semantics, which requests that the state of the\ntarget resource be created or replaced with the state defined by the\nrepresentation enclosed in the request message payload.", - "flatPath": "projects/{project}/regions/{region}/routers/{router}", - "httpMethod": "PUT", - "id": "compute.routers.update", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}", - "request": { - "$ref": "Router" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "updateRoutePolicy": { - "description": "Updates or creates new Route Policy", - "flatPath": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", - "httpMethod": "POST", - "id": "compute.routers.updateRoutePolicy", - "parameterOrder": [ - "project", - "region", - "router" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "router": { - "description": "Name of the Router resource where Route Policy is defined.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", - "request": { - "$ref": "RoutePolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "routes": { - "methods": { - "delete": { - "description": "Deletes the specified Route resource.", - "flatPath": "projects/{project}/global/routes/{route}", - "httpMethod": "DELETE", - "id": "compute.routes.delete", - "parameterOrder": [ - "project", - "route" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "route": { - "description": "Name of the Route resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{route}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Route resource.", - "flatPath": "projects/{project}/global/routes/{route}", - "httpMethod": "GET", - "id": "compute.routes.get", - "parameterOrder": [ - "project", - "route" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "route": { - "description": "Name of the Route resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{route}", - "response": { - "$ref": "Route" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a Route resource in the specified project using the data included\nin the request.", - "flatPath": "projects/{project}/global/routes", - "httpMethod": "POST", - "id": "compute.routes.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/routes", - "request": { - "$ref": "Route" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Route resources available to the specified project.", - "flatPath": "projects/{project}/global/routes", - "httpMethod": "GET", - "id": "compute.routes.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/routes", - "response": { - "$ref": "RouteList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/routes/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.routes.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/routes/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "securityPolicies": { - "methods": { - "addRule": { - "description": "Inserts a rule into a security policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/addRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.addRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/addRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves the list of all SecurityPolicy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/securityPolicies", - "httpMethod": "GET", - "id": "compute.securityPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/securityPolicies", - "response": { - "$ref": "SecurityPoliciesAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "DELETE", - "id": "compute.securityPolicies.delete", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "List all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "GET", - "id": "compute.securityPolicies.get", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to get.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "response": { - "$ref": "SecurityPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getRule": { - "description": "Gets a rule at the specified priority.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/getRule", - "httpMethod": "GET", - "id": "compute.securityPolicies.getRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to get from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to which the queried rule belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/getRule", - "response": { - "$ref": "SecurityPolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new policy in the specified project using the data included in\nthe request.", - "flatPath": "projects/{project}/global/securityPolicies", - "httpMethod": "POST", - "id": "compute.securityPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "List all the policies that have been configured for the specified project.", - "flatPath": "projects/{project}/global/securityPolicies", - "httpMethod": "GET", - "id": "compute.securityPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies", - "response": { - "$ref": "SecurityPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF)\nexpressions.", - "flatPath": "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets", - "httpMethod": "GET", - "id": "compute.securityPolicies.listPreconfiguredExpressionSets", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets", - "response": { - "$ref": "SecurityPoliciesListPreconfiguredExpressionSetsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified policy with the data included in the request. To\nclear fields in the policy, leave the fields empty and specify them in the\nupdateMask. This cannot be used to be update the rules in the policy.\nPlease use the per rule methods like addRule, patchRule, and removeRule\ninstead.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", - "httpMethod": "PATCH", - "id": "compute.securityPolicies.patch", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}", - "request": { - "$ref": "SecurityPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "patchRule": { - "description": "Patches a rule at the specified priority. To clear fields in the rule,\nleave the fields empty and specify them in the updateMask.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.patchRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to patch.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Indicates fields to be cleared as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "If true, the request will not be committed.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule", - "request": { - "$ref": "SecurityPolicyRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeRule": { - "description": "Deletes a rule at the specified priority.", - "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule", - "httpMethod": "POST", - "id": "compute.securityPolicies.removeRule", - "parameterOrder": [ - "project", - "securityPolicy" - ], - "parameters": { - "priority": { - "description": "The priority of the rule to remove from the security policy.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "securityPolicy": { - "description": "Name of the security policy to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels,\nread the Labeling Resources\ndocumentation.", - "flatPath": "projects/{project}/global/securityPolicies/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.securityPolicies.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/securityPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.securityPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/securityPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "serviceAttachments": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all ServiceAttachment resources,\nregional and global, available to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/serviceAttachments", - "httpMethod": "GET", - "id": "compute.serviceAttachments.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/serviceAttachments", - "response": { - "$ref": "ServiceAttachmentAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified ServiceAttachment in the given scope", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "DELETE", - "id": "compute.serviceAttachments.delete", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "serviceAttachment": { - "description": "Name of the ServiceAttachment resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified ServiceAttachment resource in the given scope.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "GET", - "id": "compute.serviceAttachments.get", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "serviceAttachment": { - "description": "Name of the ServiceAttachment resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "showNatIps": { - "description": "Indicates whether NAT IPs should be included in the response.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "response": { - "$ref": "ServiceAttachment" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.serviceAttachments.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a ServiceAttachment in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments", - "httpMethod": "POST", - "id": "compute.serviceAttachments.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments", - "request": { - "$ref": "ServiceAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the ServiceAttachments for a project in the given scope.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments", - "httpMethod": "GET", - "id": "compute.serviceAttachments.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region of this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments", - "response": { - "$ref": "ServiceAttachmentList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified ServiceAttachment resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "httpMethod": "PATCH", - "id": "compute.serviceAttachments.patch", - "parameterOrder": [ - "project", - "region", - "serviceAttachment" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region scoping this request and should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "serviceAttachment": { - "description": "The resource id of the ServiceAttachment to patch. It should conform to\nRFC1035 resource name or be a string form on an unsigned long number.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}", - "request": { - "$ref": "ServiceAttachment" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.serviceAttachments.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.serviceAttachments.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "snapshotSettings": { - "methods": { - "get": { - "description": "Get snapshot settings.", - "flatPath": "projects/{project}/global/snapshotSettings", - "httpMethod": "GET", - "id": "compute.snapshotSettings.get", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotSettings", - "response": { - "$ref": "SnapshotSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patch snapshot settings.", - "flatPath": "projects/{project}/global/snapshotSettings", - "httpMethod": "PATCH", - "id": "compute.snapshotSettings.patch", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/snapshotSettings", - "request": { - "$ref": "SnapshotSettings" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "snapshots": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of all of the snapshots in your project\nacross all regions and global scope.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/snapshots", - "httpMethod": "GET", - "id": "compute.snapshots.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/snapshots", - "response": { - "$ref": "SnapshotAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting\na single snapshot might not necessarily delete all the data on that\nsnapshot. If any data on the snapshot that is marked for deletion is\nneeded for subsequent snapshots, the data will be moved to the next\ncorresponding snapshot.\n\nFor more information, seeDeleting\nsnapshots.", - "flatPath": "projects/{project}/global/snapshots/{snapshot}", - "httpMethod": "DELETE", - "id": "compute.snapshots.delete", - "parameterOrder": [ - "project", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{snapshot}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified Snapshot resource.", - "flatPath": "projects/{project}/global/snapshots/{snapshot}", - "httpMethod": "GET", - "id": "compute.snapshots.get", - "parameterOrder": [ - "project", - "snapshot" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "snapshot": { - "description": "Name of the Snapshot resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{snapshot}", - "response": { - "$ref": "Snapshot" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/global/snapshots/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.snapshots.getIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a snapshot in the specified project using the data included\nin the request. For regular snapshot creation, consider using this method\ninstead of disks.createSnapshot,\nas this method supports more features, such as creating snapshots in a\nproject different from the source disk project.", - "flatPath": "projects/{project}/global/snapshots", - "httpMethod": "POST", - "id": "compute.snapshots.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots", - "request": { - "$ref": "Snapshot" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of Snapshot resources contained within\nthe specified project.", - "flatPath": "projects/{project}/global/snapshots", - "httpMethod": "GET", - "id": "compute.snapshots.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/snapshots", - "response": { - "$ref": "SnapshotList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/global/snapshots/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.snapshots.setIamPolicy", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/setIamPolicy", - "request": { - "$ref": "GlobalSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setLabels": { - "description": "Sets the labels on a snapshot. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/global/snapshots/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.snapshots.setLabels", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/setLabels", - "request": { - "$ref": "GlobalSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/snapshots/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.snapshots.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/snapshots/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "sslCertificates": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all SslCertificate resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/sslCertificates", - "httpMethod": "GET", - "id": "compute.sslCertificates.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/sslCertificates", - "response": { - "$ref": "SslCertificateAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified SslCertificate resource.", - "flatPath": "projects/{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "DELETE", - "id": "compute.sslCertificates.delete", - "parameterOrder": [ - "project", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{sslCertificate}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified SslCertificate resource.", - "flatPath": "projects/{project}/global/sslCertificates/{sslCertificate}", - "httpMethod": "GET", - "id": "compute.sslCertificates.get", - "parameterOrder": [ - "project", - "sslCertificate" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "sslCertificate": { - "description": "Name of the SslCertificate resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{sslCertificate}", - "response": { - "$ref": "SslCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a SslCertificate resource in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/global/sslCertificates", - "httpMethod": "POST", - "id": "compute.sslCertificates.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates", - "request": { - "$ref": "SslCertificate" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/sslCertificates", - "httpMethod": "GET", - "id": "compute.sslCertificates.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslCertificates", - "response": { - "$ref": "SslCertificateList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/sslCertificates/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.sslCertificates.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslCertificates/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "sslPolicies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all SslPolicy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/sslPolicies", - "httpMethod": "GET", - "id": "compute.sslPolicies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/sslPolicies", - "response": { - "$ref": "SslPoliciesAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted\nonly if it is not in use by any TargetHttpsProxy or TargetSslProxy\nresources.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "DELETE", - "id": "compute.sslPolicies.delete", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to delete. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "GET", - "id": "compute.sslPolicies.get", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "response": { - "$ref": "SslPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Returns the specified SSL policy resource.", - "flatPath": "projects/{project}/global/sslPolicies", - "httpMethod": "POST", - "id": "compute.sslPolicies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all the SSL policies that have been configured for the specified\nproject.", - "flatPath": "projects/{project}/global/sslPolicies", - "httpMethod": "GET", - "id": "compute.sslPolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslPolicies", - "response": { - "$ref": "SslPoliciesList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using\ncustom profile.", - "flatPath": "projects/{project}/global/sslPolicies/listAvailableFeatures", - "httpMethod": "GET", - "id": "compute.sslPolicies.listAvailableFeatures", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/sslPolicies/listAvailableFeatures", - "response": { - "$ref": "SslPoliciesListAvailableFeaturesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", - "flatPath": "projects/{project}/global/sslPolicies/{sslPolicy}", - "httpMethod": "PATCH", - "id": "compute.sslPolicies.patch", - "parameterOrder": [ - "project", - "sslPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "sslPolicy": { - "description": "Name of the SSL policy to update. The name must be 1-63 characters long,\nand comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{sslPolicy}", - "request": { - "$ref": "SslPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/sslPolicies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.sslPolicies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/sslPolicies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "storagePoolTypes": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of storage pool types.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/storagePoolTypes", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/storagePoolTypes", - "response": { - "$ref": "StoragePoolTypeAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "get": { - "description": "Returns the specified storage pool type.", - "flatPath": "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.get", - "parameterOrder": [ - "project", - "zone", - "storagePoolType" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "storagePoolType": { - "description": "Name of the storage pool type to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}", - "response": { - "$ref": "StoragePoolType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of storage pool types available to the specified\nproject.", - "flatPath": "projects/{project}/zones/{zone}/storagePoolTypes", - "httpMethod": "GET", - "id": "compute.storagePoolTypes.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePoolTypes", - "response": { - "$ref": "StoragePoolTypeList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "storagePools": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of storage pools.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/storagePools", - "httpMethod": "GET", - "id": "compute.storagePools.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/storagePools", - "response": { - "$ref": "StoragePoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified storage pool. Deleting a storagePool\nremoves its data permanently and is irreversible. However, deleting a\nstoragePool does not delete any snapshots previously\nmade from the storagePool. You must separately delete\nsnapshots.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "DELETE", - "id": "compute.storagePools.delete", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "storagePool": { - "description": "Name of the storage pool to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns a specified storage pool. Gets a list of available\nstorage pools by making a list() request.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "GET", - "id": "compute.storagePools.get", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "storagePool": { - "description": "Name of the storage pool to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "response": { - "$ref": "StoragePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.storagePools.getIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a storage pool in the specified project using the data\nin the request.", - "flatPath": "projects/{project}/zones/{zone}/storagePools", - "httpMethod": "POST", - "id": "compute.storagePools.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools", - "request": { - "$ref": "StoragePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of storage pools contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/storagePools", - "httpMethod": "GET", - "id": "compute.storagePools.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools", - "response": { - "$ref": "StoragePoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listDisks": { - "description": "Lists the disks in a specified storage pool.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks", - "httpMethod": "GET", - "id": "compute.storagePools.listDisks", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "storagePool": { - "description": "Name of the storage pool to list disks of.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks", - "response": { - "$ref": "StoragePoolListDisks" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.storagePools.setIamPolicy", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy", - "request": { - "$ref": "ZoneSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.storagePools.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified storagePool with the data included in the request.\nThe update is performed only on selected fields included as part\nof update-mask. Only the following fields can be modified:\npool_provisioned_capacity_gb, pool_provisioned_iops and\npool_provisioned_throughput.", - "flatPath": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "httpMethod": "PATCH", - "id": "compute.storagePools.update", - "parameterOrder": [ - "project", - "zone", - "storagePool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "storagePool": { - "description": "The storagePool name for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/storagePools/{storagePool}", - "request": { - "$ref": "StoragePool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "subnetworks": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of subnetworks.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/subnetworks", - "httpMethod": "GET", - "id": "compute.subnetworks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/aggregated/subnetworks", - "response": { - "$ref": "SubnetworkAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified subnetwork.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "DELETE", - "id": "compute.subnetworks.delete", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "expandIpCidrRange": { - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "httpMethod": "POST", - "id": "compute.subnetworks.expandIpCidrRange", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange", - "request": { - "$ref": "SubnetworksExpandIpCidrRangeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified subnetwork.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "GET", - "id": "compute.subnetworks.get", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "response": { - "$ref": "Subnetwork" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such\npolicy or resource exists.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "httpMethod": "GET", - "id": "compute.subnetworks.getIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "optionsRequestedPolicyVersion": { - "description": "Requested IAM Policy version.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a subnetwork in the specified project using the data\nincluded in the request.", - "flatPath": "projects/{project}/regions/{region}/subnetworks", - "httpMethod": "POST", - "id": "compute.subnetworks.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks", - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of subnetworks available to the specified\nproject.", - "flatPath": "projects/{project}/regions/{region}/subnetworks", - "httpMethod": "GET", - "id": "compute.subnetworks.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "views": { - "description": "Defines the extra views returned back in the subnetwork resource.\nSupported values:\n \n - WITH_UTILIZATION: Utilization data is included in the\n response.", - "enum": [ - "DEFAULT", - "WITH_UTILIZATION" - ], - "enumDescriptions": [ - "", - "Utilization data is included in the response." - ], - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks", - "response": { - "$ref": "SubnetworkList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "listUsable": { - "description": "Retrieves an aggregated list of all usable subnetworks in the project.", - "flatPath": "projects/{project}/aggregated/subnetworks/listUsable", - "httpMethod": "GET", - "id": "compute.subnetworks.listUsable", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProject": { - "description": "The project id or project number in which the subnetwork is intended to be\nused. Only applied for Shared VPC. See [Shared VPC\ndocumentation](https://cloud.google.com/vpc/docs/shared-vpc/)", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/subnetworks/listUsable", - "response": { - "$ref": "UsableSubnetworksAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified subnetwork with the data included in the request.\nOnly certain fields can be updated with a patch request\nas indicated in the field descriptions.\nYou must specify the current fingerprint of the\nsubnetwork resource being patched.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "httpMethod": "PATCH", - "id": "compute.subnetworks.patch", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "drainTimeoutSeconds": { - "description": "The drain timeout specifies the upper bound in seconds on the amount of\ntime allowed to drain connections from the current ACTIVE subnetwork\nto the current BACKUP subnetwork. The drain timeout is only applicable\nwhen the following conditions are true:\n - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER\n - the subnetwork being patched has role = BACKUP\n - the patch request is setting the role to ACTIVE. Note that after this\n patch operation the roles of the ACTIVE and BACKUP subnetworks will be\n swapped.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}", - "request": { - "$ref": "Subnetwork" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource.\nReplaces any existing policy.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "httpMethod": "POST", - "id": "compute.subnetworks.setIamPolicy", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", - "request": { - "$ref": "RegionSetPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setPrivateIpGoogleAccess": { - "description": "Set whether VMs in this subnet can access Google services without assigning\nexternal IP addresses through Private Google Access.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "httpMethod": "POST", - "id": "compute.subnetworks.setPrivateIpGoogleAccess", - "parameterOrder": [ - "project", - "region", - "subnetwork" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "subnetwork": { - "description": "Name of the Subnetwork resource.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess", - "request": { - "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.subnetworks.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetGrpcProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetGrpcProxy in the given scope", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "DELETE", - "id": "compute.targetGrpcProxies.delete", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetGrpcProxy resource in the given scope.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "GET", - "id": "compute.targetGrpcProxies.get", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "response": { - "$ref": "TargetGrpcProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetGrpcProxy in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/targetGrpcProxies", - "httpMethod": "POST", - "id": "compute.targetGrpcProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies", - "request": { - "$ref": "TargetGrpcProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the TargetGrpcProxies for a project in the given scope.", - "flatPath": "projects/{project}/global/targetGrpcProxies", - "httpMethod": "GET", - "id": "compute.targetGrpcProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetGrpcProxies", - "response": { - "$ref": "TargetGrpcProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetGrpcProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "httpMethod": "PATCH", - "id": "compute.targetGrpcProxies.patch", - "parameterOrder": [ - "project", - "targetGrpcProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetGrpcProxy": { - "description": "Name of the TargetGrpcProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}", - "request": { - "$ref": "TargetGrpcProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetGrpcProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetHttpProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "DELETE", - "id": "compute.targetHttpProxies.delete", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpProxy resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.get", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "response": { - "$ref": "TargetHttpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpProxy resource in the specified\nproject using the data included in the request.", - "flatPath": "projects/{project}/global/targetHttpProxies", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpProxy resources available\nto the specified project.", - "flatPath": "projects/{project}/global/targetHttpProxies", - "httpMethod": "GET", - "id": "compute.targetHttpProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetHttpProxies", - "response": { - "$ref": "TargetHttpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetHttpProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "httpMethod": "PATCH", - "id": "compute.targetHttpProxies.patch", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{targetHttpProxy}", - "request": { - "$ref": "TargetHttpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", - "flatPath": "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.setUrlMap", - "parameterOrder": [ - "project", - "targetHttpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpProxy": { - "description": "Name of the TargetHttpProxy to set a URL map for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetHttpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetHttpsProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "DELETE", - "id": "compute.targetHttpsProxies.delete", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetHttpsProxy resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.get", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "response": { - "$ref": "TargetHttpsProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified\nproject using the data included in the request.", - "flatPath": "projects/{project}/global/targetHttpsProxies", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetHttpsProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetHttpsProxies", - "httpMethod": "GET", - "id": "compute.targetHttpsProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetHttpsProxies", - "response": { - "$ref": "TargetHttpsProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified TargetHttpsProxy resource with the data included in\nthe request. This method supports PATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "httpMethod": "PATCH", - "id": "compute.targetHttpsProxies.patch", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}", - "request": { - "$ref": "TargetHttpsProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCertificateMap": { - "description": "Changes the Certificate Map for TargetHttpsProxy.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setCertificateMap", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose CertificateMap is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap", - "request": { - "$ref": "TargetHttpsProxiesSetCertificateMapRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setQuicOverride": { - "description": "Sets the QUIC override policy for TargetHttpsProxy.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setQuicOverride", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set the QUIC override policy for.\nThe name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride", - "request": { - "$ref": "TargetHttpsProxiesSetQuicOverrideRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", - "flatPath": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setSslCertificates", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource to set an\nSslCertificates resource for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", - "request": { - "$ref": "TargetHttpsProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslPolicy": { - "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the\nserver-side support for SSL features. This affects connections between\nclients and the HTTPS proxy load balancer. They do not affect the\nconnection between the load balancer and the backends.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setSslPolicy", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose SSL policy is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy", - "request": { - "$ref": "SslPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", - "flatPath": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.setUrlMap", - "parameterOrder": [ - "project", - "targetHttpsProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetHttpsProxy": { - "description": "Name of the TargetHttpsProxy resource whose URL map is\nto be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", - "request": { - "$ref": "UrlMapReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetHttpsProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetHttpsProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetInstances": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of target instances.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetInstances", - "httpMethod": "GET", - "id": "compute.targetInstances.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetInstances", - "response": { - "$ref": "TargetInstanceAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetInstance resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "DELETE", - "id": "compute.targetInstances.delete", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetInstance resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "httpMethod": "GET", - "id": "compute.targetInstances.get", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}", - "response": { - "$ref": "TargetInstance" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetInstance resource in the specified project and zone using\nthe data included in the request.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances", - "httpMethod": "POST", - "id": "compute.targetInstances.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances", - "request": { - "$ref": "TargetInstance" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of TargetInstance resources available to the specified\nproject and zone.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances", - "httpMethod": "GET", - "id": "compute.targetInstances.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances", - "response": { - "$ref": "TargetInstanceList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified target\ninstance. For more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.targetInstances.setSecurityPolicy", - "parameterOrder": [ - "project", - "zone", - "targetInstance" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetInstance": { - "description": "Name of the TargetInstance resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetInstances.testIamPermissions", - "parameterOrder": [ - "project", - "zone", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "The name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetPools": { - "methods": { - "addHealthCheck": { - "description": "Adds health check URLs to a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "httpMethod": "POST", - "id": "compute.targetPools.addHealthCheck", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the target pool to add a health check to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", - "request": { - "$ref": "TargetPoolsAddHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "addInstance": { - "description": "Adds an instance to a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "httpMethod": "POST", - "id": "compute.targetPools.addInstance", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to add instances to.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance", - "request": { - "$ref": "TargetPoolsAddInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "aggregatedList": { - "description": "Retrieves an aggregated list of target pools.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetPools", - "httpMethod": "GET", - "id": "compute.targetPools.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetPools", - "response": { - "$ref": "TargetPoolAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "DELETE", - "id": "compute.targetPools.delete", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "httpMethod": "GET", - "id": "compute.targetPools.get", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}", - "response": { - "$ref": "TargetPool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getHealth": { - "description": "Gets the most recent health check results for each IP for the\ninstance that is referenced by the given target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "httpMethod": "POST", - "id": "compute.targetPools.getHealth", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to which the queried instance belongs.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth", - "request": { - "$ref": "InstanceReference" - }, - "response": { - "$ref": "TargetPoolInstanceHealth" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a target pool in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetPools", - "httpMethod": "POST", - "id": "compute.targetPools.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools", - "request": { - "$ref": "TargetPool" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of target pools available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/targetPools", - "httpMethod": "GET", - "id": "compute.targetPools.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetPools", - "response": { - "$ref": "TargetPoolList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "removeHealthCheck": { - "description": "Removes health check URL from a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "httpMethod": "POST", - "id": "compute.targetPools.removeHealthCheck", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the target pool to remove health checks from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", - "request": { - "$ref": "TargetPoolsRemoveHealthCheckRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "removeInstance": { - "description": "Removes instance URL from a target pool.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "httpMethod": "POST", - "id": "compute.targetPools.removeInstance", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to remove instances from.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance", - "request": { - "$ref": "TargetPoolsRemoveInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setBackup": { - "description": "Changes a backup target pool's configurations.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "httpMethod": "POST", - "id": "compute.targetPools.setBackup", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "failoverRatio": { - "description": "New failoverRatio value for the target pool.", - "format": "float", - "location": "query", - "type": "number" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to set a backup pool for.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup", - "request": { - "$ref": "TargetReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSecurityPolicy": { - "description": "Sets the Google Cloud Armor security policy for the specified target pool.\nFor more information, seeGoogle\nCloud Armor Overview", - "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", - "httpMethod": "POST", - "id": "compute.targetPools.setSecurityPolicy", - "parameterOrder": [ - "project", - "region", - "targetPool" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetPool": { - "description": "Name of the TargetPool resource to which the security policy should be\nset. The name should conform to RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", - "request": { - "$ref": "SecurityPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetPools.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetSslProxies": { - "methods": { - "delete": { - "description": "Deletes the specified TargetSslProxy resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "DELETE", - "id": "compute.targetSslProxies.delete", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetSslProxy resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "httpMethod": "GET", - "id": "compute.targetSslProxies.get", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}", - "response": { - "$ref": "TargetSslProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetSslProxy resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/targetSslProxies", - "httpMethod": "POST", - "id": "compute.targetSslProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies", - "request": { - "$ref": "TargetSslProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetSslProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetSslProxies", - "httpMethod": "GET", - "id": "compute.targetSslProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetSslProxies", - "response": { - "$ref": "TargetSslProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "description": "Changes the BackendService for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setBackendService", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose BackendService resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService", - "request": { - "$ref": "TargetSslProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setCertificateMap": { - "description": "Changes the Certificate Map for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setCertificateMap", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose CertificateMap is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap", - "request": { - "$ref": "TargetSslProxiesSetCertificateMapRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setProxyHeader", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader", - "request": { - "$ref": "TargetSslProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslCertificates": { - "description": "Changes SslCertificates for TargetSslProxy.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setSslCertificates", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose SslCertificate resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates", - "request": { - "$ref": "TargetSslProxiesSetSslCertificatesRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setSslPolicy": { - "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the\nserver-side support for SSL features. This affects connections between\nclients and the load balancer. They do not affect the\nconnection between the load balancer and the backends.", - "flatPath": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy", - "httpMethod": "POST", - "id": "compute.targetSslProxies.setSslPolicy", - "parameterOrder": [ - "project", - "targetSslProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetSslProxy": { - "description": "Name of the TargetSslProxy resource whose SSL policy is\nto be set. The name must be 1-63 characters long, and comply with RFC1035.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy", - "request": { - "$ref": "SslPolicyReference" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetSslProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetSslProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetSslProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetTcpProxies": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all TargetTcpProxy resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "DELETE", - "id": "compute.targetTcpProxies.delete", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified TargetTcpProxy resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.get", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}", - "response": { - "$ref": "TargetTcpProxy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/targetTcpProxies", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies", - "request": { - "$ref": "TargetTcpProxy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of TargetTcpProxy resources\navailable to the specified project.", - "flatPath": "projects/{project}/global/targetTcpProxies", - "httpMethod": "GET", - "id": "compute.targetTcpProxies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/targetTcpProxies", - "response": { - "$ref": "TargetTcpProxyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setBackendService": { - "description": "Changes the BackendService for TargetTcpProxy.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.setBackendService", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource whose BackendService resource\nis to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService", - "request": { - "$ref": "TargetTcpProxiesSetBackendServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", - "flatPath": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.setProxyHeader", - "parameterOrder": [ - "project", - "targetTcpProxy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetTcpProxy": { - "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader", - "request": { - "$ref": "TargetTcpProxiesSetProxyHeaderRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetTcpProxies.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "targetVpnGateways": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of target VPN gateways.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/targetVpnGateways", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/targetVpnGateways", - "response": { - "$ref": "TargetVpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified target VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "DELETE", - "id": "compute.targetVpnGateways.delete", - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "targetVpnGateway": { - "description": "Name of the target VPN gateway to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified target VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.get", - "parameterOrder": [ - "project", - "region", - "targetVpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "targetVpnGateway": { - "description": "Name of the target VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", - "response": { - "$ref": "TargetVpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a target VPN gateway in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways", - "request": { - "$ref": "TargetVpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of target VPN gateways available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways", - "httpMethod": "GET", - "id": "compute.targetVpnGateways.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways", - "response": { - "$ref": "TargetVpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.targetVpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "urlMaps": { - "methods": { - "aggregatedList": { - "description": "Retrieves the list of all UrlMap resources, regional and global,\navailable to the specified project.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/urlMaps", - "httpMethod": "GET", - "id": "compute.urlMaps.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/urlMaps", - "response": { - "$ref": "UrlMapsAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified UrlMap resource.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "DELETE", - "id": "compute.urlMaps.delete", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified UrlMap resource.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "GET", - "id": "compute.urlMaps.get", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "response": { - "$ref": "UrlMap" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a UrlMap resource in the specified project using\nthe data included in the request.", - "flatPath": "projects/{project}/global/urlMaps", - "httpMethod": "POST", - "id": "compute.urlMaps.insert", - "parameterOrder": [ - "project" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path,\nscoped to the specified UrlMap.\n\nFor more information, see [Invalidating cached\ncontent](/cdn/docs/invalidating-cached-content).", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}/invalidateCache", - "httpMethod": "POST", - "id": "compute.urlMaps.invalidateCache", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}/invalidateCache", - "request": { - "$ref": "CacheInvalidationRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves the list of UrlMap resources available to the specified\nproject.", - "flatPath": "projects/{project}/global/urlMaps", - "httpMethod": "GET", - "id": "compute.urlMaps.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/urlMaps", - "response": { - "$ref": "UrlMapList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Patches the specified UrlMap resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and uses theJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "PATCH", - "id": "compute.urlMaps.patch", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to patch.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/global/urlMaps/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.urlMaps.testIamPermissions", - "parameterOrder": [ - "project", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Updates the specified UrlMap resource with the data included in the\nrequest.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}", - "httpMethod": "PUT", - "id": "compute.urlMaps.update", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}", - "request": { - "$ref": "UrlMap" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the\nprovided UrlMap will be run. Calling this method does NOT create the\nUrlMap.", - "flatPath": "projects/{project}/global/urlMaps/{urlMap}/validate", - "httpMethod": "POST", - "id": "compute.urlMaps.validate", - "parameterOrder": [ - "project", - "urlMap" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "urlMap": { - "description": "Name of the UrlMap resource to be validated as.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/urlMaps/{urlMap}/validate", - "request": { - "$ref": "UrlMapsValidateRequest" - }, - "response": { - "$ref": "UrlMapsValidateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "vpnGateways": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of VPN gateways.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vpnGateways", - "httpMethod": "GET", - "id": "compute.vpnGateways.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vpnGateways", - "response": { - "$ref": "VpnGatewayAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "httpMethod": "DELETE", - "id": "compute.vpnGateways.delete", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "httpMethod": "GET", - "id": "compute.vpnGateways.get", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}", - "response": { - "$ref": "VpnGateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "getStatus": { - "description": "Returns the status for the specified VPN gateway.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", - "httpMethod": "GET", - "id": "compute.vpnGateways.getStatus", - "parameterOrder": [ - "project", - "region", - "vpnGateway" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnGateway": { - "description": "Name of the VPN gateway to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", - "response": { - "$ref": "VpnGatewaysGetStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a VPN gateway in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways", - "httpMethod": "POST", - "id": "compute.vpnGateways.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways", - "request": { - "$ref": "VpnGateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of VPN gateways available to the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways", - "httpMethod": "GET", - "id": "compute.vpnGateways.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways", - "response": { - "$ref": "VpnGatewayList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a VpnGateway. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.vpnGateways.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.vpnGateways.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "vpnTunnels": { - "methods": { - "aggregatedList": { - "description": "Retrieves an aggregated list of VPN tunnels.\n\nTo prevent failure, Google recommends that you set the\n`returnPartialSuccess` parameter to `true`.", - "flatPath": "projects/{project}/aggregated/vpnTunnels", - "httpMethod": "GET", - "id": "compute.vpnTunnels.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region,\nglobal) should be included in the response. For new resource types added\nafter this field, the flag has no effect as new resource types will always\ninclude every visible scope for each scope type in response. For resource\ntypes which predate this field, if this flag is omitted or false, only\nscopes of the scope types where the resource type is expected to be found\nwill be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "serviceProjectNumber": { - "description": "The Shared VPC service project id or service project number for which\naggregated list request is invoked for subnetworks list-usable api.", - "format": "int64", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/aggregated/vpnTunnels", - "response": { - "$ref": "VpnTunnelAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "delete": { - "description": "Deletes the specified VpnTunnel resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "DELETE", - "id": "compute.vpnTunnels.delete", - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vpnTunnel": { - "description": "Name of the VpnTunnel resource to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified VpnTunnel resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "httpMethod": "GET", - "id": "compute.vpnTunnels.get", - "parameterOrder": [ - "project", - "region", - "vpnTunnel" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "vpnTunnel": { - "description": "Name of the VpnTunnel resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}", - "response": { - "$ref": "VpnTunnel" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a VpnTunnel resource in the specified project and region using\nthe data included in the request.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels", - "httpMethod": "POST", - "id": "compute.vpnTunnels.insert", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels", - "request": { - "$ref": "VpnTunnel" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of VpnTunnel resources contained in the specified\nproject and region.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels", - "httpMethod": "GET", - "id": "compute.vpnTunnels.list", - "parameterOrder": [ - "project", - "region" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels", - "response": { - "$ref": "VpnTunnelList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "setLabels": { - "description": "Sets the labels on a VpnTunnel. To learn more about labels, read theLabeling\nResources documentation.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - "httpMethod": "POST", - "id": "compute.vpnTunnels.setLabels", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels", - "request": { - "$ref": "RegionSetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", - "flatPath": "projects/{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "httpMethod": "POST", - "id": "compute.vpnTunnels.testIamPermissions", - "parameterOrder": [ - "project", - "region", - "resource" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "The name of the region for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions", - "request": { - "$ref": "TestPermissionsRequest" - }, - "response": { - "$ref": "TestPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "wireGroups": { - "methods": { - "delete": { - "description": "Deletes the specified wire group in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "DELETE", - "id": "compute.wireGroups.delete", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "wireGroup": { - "description": "Name of the wire group resource to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Gets the specified wire group resource in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "GET", - "id": "compute.wireGroups.get", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "wireGroup": { - "description": "Name of the wire group resource to return.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "response": { - "$ref": "WireGroup" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a wire group in the specified project in the given scope\nusing the parameters that are included in the request.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "httpMethod": "POST", - "id": "compute.wireGroups.insert", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "request": { - "$ref": "WireGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists the wire groups for a project in the given scope.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "httpMethod": "GET", - "id": "compute.wireGroups.list", - "parameterOrder": [ - "project", - "crossSiteNetwork" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups", - "response": { - "$ref": "WireGroupList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "patch": { - "description": "Updates the specified wire group resource with the data included in the\nrequest. This method supportsPATCH\nsemantics and usesJSON merge\npatch format and processing rules.", - "flatPath": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "httpMethod": "PATCH", - "id": "compute.wireGroups.patch", - "parameterOrder": [ - "project", - "crossSiteNetwork", - "wireGroup" - ], - "parameters": { - "crossSiteNetwork": { - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).\nend_interface: MixerMutationRequestBuilder", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "update_mask indicates fields to be updated as part of this request.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it.", - "location": "query", - "type": "boolean" - }, - "wireGroup": { - "description": "Name of the WireGroups resource to patch.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}", - "request": { - "$ref": "WireGroup" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "zoneOperations": { - "methods": { - "delete": { - "description": "Deletes the specified zone-specific Operations resource.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}", - "httpMethod": "DELETE", - "id": "compute.zoneOperations.delete", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to delete, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves the specified zone-specific Operations resource.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}", - "httpMethod": "GET", - "id": "compute.zoneOperations.get", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves a list of Operation resources contained within\nthe specified zone.", - "flatPath": "projects/{project}/zones/{zone}/operations", - "httpMethod": "GET", - "id": "compute.zoneOperations.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations", - "response": { - "$ref": "OperationList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "wait": { - "description": "Waits for the specified Operation resource to return as `DONE`\nor for the request to approach the 2 minute deadline, and retrieves the\nspecified Operation resource. This method waits for no more than the\n2 minutes and then returns the current state of the\noperation, which might be `DONE` or still in progress.\n\nThis method is called on a best-effort basis. Specifically:\n \n \n - In uncommon cases, when the server is overloaded, the request might\n return before the default deadline is reached, or might return after zero\n seconds.\n - If the default deadline is reached, there is no guarantee that the\n operation is actually done when the method returns. Be prepared to retry\n if the operation is not `DONE`.", - "flatPath": "projects/{project}/zones/{zone}/operations/{operation}/wait", - "httpMethod": "POST", - "id": "compute.zoneOperations.wait", - "parameterOrder": [ - "project", - "zone", - "operation" - ], - "parameters": { - "operation": { - "description": "Name of the Operations resource to return, or its unique numeric\nidentifier.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/operations/{operation}/wait", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, - "zoneVmExtensionPolicies": { - "methods": { - "delete": { - "description": "Deletes a specified zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "DELETE", - "id": "compute.zoneVmExtensionPolicies.delete", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the zone VM extension policy to delete.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Retrieves details of a specific zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "GET", - "id": "compute.zoneVmExtensionPolicies.get", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the VM extension policy resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "response": { - "$ref": "VmExtensionPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a new zone-level VM extension policy within a project.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "httpMethod": "POST", - "id": "compute.zoneVmExtensionPolicies.insert", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "request": { - "$ref": "VmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Lists all VM extension policies within a specific zone for a project.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "httpMethod": "GET", - "id": "compute.zoneVmExtensionPolicies.list", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies", - "response": { - "$ref": "VmExtensionPolicyList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "update": { - "description": "Modifies an existing zone VM extension policy.", - "flatPath": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "httpMethod": "PATCH", - "id": "compute.zoneVmExtensionPolicies.update", - "parameterOrder": [ - "project", - "zone", - "vmExtensionPolicy" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "requestId": { - "description": "An optional request ID to identify requests. Specify a unique request ID so\nthat if you must retry your request, the server will know to ignore the\nrequest if it has already been completed.\n\nFor example, consider a situation where you make an initial request and\nthe request times out. If you make the request again with the same\nrequest ID, the server can check if original operation with the same\nrequest ID was received, and if so, will ignore the second request. This\nprevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be\na valid UUID with the exception that zero UUID is not supported\n(00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "vmExtensionPolicy": { - "description": "Name of the zone VM extension policy to update.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}", - "request": { - "$ref": "VmExtensionPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - } - } - }, - "zones": { - "methods": { - "get": { - "description": "Returns the specified Zone resource.", - "flatPath": "projects/{project}/zones/{zone}", - "httpMethod": "GET", - "id": "compute.zones.get", - "parameterOrder": [ - "project", - "zone" - ], - "parameters": { - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "zone": { - "description": "Name of the zone resource to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - } - }, - "path": "projects/{project}/zones/{zone}", - "response": { - "$ref": "Zone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "list": { - "description": "Retrieves the list of Zone resources available to the specified project.", - "flatPath": "projects/{project}/zones", - "httpMethod": "GET", - "id": "compute.zones.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. Most\nCompute resources support two types of filter expressions:\nexpressions that support regular expressions and expressions that follow\nAPI improvement proposal AIP-160.\nThese two types of filter expressions cannot be mixed in one request.\n\nIf you want to use AIP-160, your expression must specify the field name, an\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. The operator\nmust be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`.\n\nFor example, if you are filtering Compute Engine instances, you can\nexclude instances named `example-instance` by specifying\n`name != example-instance`.\n\nThe `:*` comparison can be used to test whether a key has been defined.\nFor example, to find all objects with `owner` label use:\n```\nlabels.owner:*\n```\n\nYou can also filter nested fields. For example, you could specify\n`scheduling.automaticRestart = false` to include instances only\nif they are not scheduled for automatic restarts. You can use filtering\non nested fields to filter based onresource labels.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. For example:\n```\n(scheduling.automaticRestart = true)\n(cpuPlatform = \"Intel Skylake\")\n```\nBy default, each expression is an `AND` expression. However, you\ncan include `AND` and `OR` expressions explicitly.\nFor example:\n```\n(cpuPlatform = \"Intel Skylake\") OR\n(cpuPlatform = \"Intel Broadwell\") AND\n(scheduling.automaticRestart = true)\n```\n\nIf you want to use a regular expression, use the `eq` (equal) or `ne`\n(not equal) operator against a single un-parenthesized expression with or\nwithout quotes or against multiple parenthesized expressions. Examples:\n\n`fieldname eq unquoted literal`\n`fieldname eq 'single quoted literal'`\n`fieldname eq \"double quoted literal\"`\n`(fieldname1 eq literal) (fieldname2 ne \"literal\")`\n\nThe literal value is interpreted as a regular expression using GoogleRE2 library syntax.\nThe literal value must match the entire field.\n\nFor example, to filter for instances that do not end with name \"instance\",\nyou would use `name ne .*instance`.\n\nYou cannot combine constraints on multiple fields using regular\nexpressions.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned.\nIf the number of available results is larger than `maxResults`,\nCompute Engine returns a `nextPageToken` that can be used to get\nthe next page of results in subsequent list requests. Acceptable values are\n`0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results\nare returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation\ntimestamp using `orderBy=\"creationTimestamp desc\"`. This sorts\nresults based on the `creationTimestamp` field in\nreverse chronological order (newest result first). Use this to sort\nresources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or\n`creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the\n`nextPageToken` returned by a previous list request to get\nthe next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case\nof failure. The default value is false.\n\nFor example, when partial success behavior is enabled, aggregatedList for a\nsingle zone scope either returns all resources in the zone or no resources,\nwith an error code.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/zones", - "response": { - "$ref": "ZoneList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - } - }, - "revision": "20251031", - "rootUrl": "https://compute.googleapis.com/", - "schemas": { - "AWSV4Signature": { - "description": "Contains the configurations necessary to generate a signature for access to\nprivate storage buckets that support Signature Version 4 for authentication.\nThe service name for generating the authentication header will always default\nto 's3'.", - "id": "AWSV4Signature", - "properties": { - "accessKey": { - "description": "The access key used for s3 bucket authentication. Required for updating or\ncreating a backend that uses AWS v4 signature authentication, but will not\nbe returned as part of the configuration when queried with a REST API GET\nrequest.\n\n@InputOnly", - "type": "string" - }, - "accessKeyId": { - "description": "The identifier of an access key used for s3 bucket authentication.", - "type": "string" - }, - "accessKeyVersion": { - "description": "The optional version identifier for the access key. You can use this to\nkeep track of different iterations of your access key.", - "type": "string" - }, - "originRegion": { - "description": "The name of the cloud region of your origin. This is a free-form field with\nthe name of the region your cloud uses to host your origin. For example,\n\"us-east-1\" for AWS or \"us-ashburn-1\" for OCI.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorConfig": { - "description": "A specification of the type and number of accelerator cards attached to the\ninstance.", - "id": "AcceleratorConfig", - "properties": { - "acceleratorCount": { - "description": "The number of the guest accelerator cards exposed to this instance.", - "format": "int32", - "type": "integer" - }, - "acceleratorType": { - "description": "Full or partial URL of the accelerator type resource to attach to this\ninstance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100\nIf you are creating an instance template, specify only the\naccelerator name.\nSee GPUs on Compute Engine\nfor a full list of accelerator types.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfo": { - "description": "Info for accelerator topologies within a densely packed reservation.", - "id": "AcceleratorTopologiesInfo", - "properties": { - "acceleratorTopologyInfos": { - "description": "Info for each accelerator topology.", - "items": { - "$ref": "AcceleratorTopologiesInfoAcceleratorTopologyInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfoAcceleratorTopologyInfo": { - "description": "Info for a slice of a given topology.", - "id": "AcceleratorTopologiesInfoAcceleratorTopologyInfo", - "properties": { - "acceleratorTopology": { - "description": "The accelerator topology.", - "type": "string" - }, - "infoPerTopologyStates": { - "description": "Info for each topology state.", - "items": { - "$ref": "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState" - }, - "type": "array" - } - }, - "type": "object" - }, - "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState": { - "description": "Info for each topology state.", - "id": "AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState", - "properties": { - "count": { - "description": "The number of accelerator topologies in this state.", - "format": "int32", - "type": "integer" - }, - "state": { - "description": "The state of the accelerator topology.", - "enum": [ - "AVAILABLE", - "RUNNING", - "TOPOLOGY_STATE_UNSPECIFIED", - "UNHEALTHY" - ], - "enumDescriptions": [ - "The accelerator topology is available.", - "The accelerator topology is running.", - "The state of the topology is unspecified.", - "The accelerator topology is unhealthy." - ], - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorType": { - "description": "Represents an Accelerator Type resource.\n\nGoogle Cloud Platform provides graphics processing units (accelerators) that\nyou can add to VM instances to improve or accelerate performance when working\nwith intensive workloads. For more information, readGPUs on Compute Engine.", - "id": "AcceleratorType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this accelerator type." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#acceleratorType", - "description": "[Output Only] The type of the resource. Alwayscompute#acceleratorType for accelerator types.", - "type": "string" - }, - "maximumCardsPerInstance": { - "description": "[Output Only] Maximum number of accelerator cards allowed per instance.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined, fully qualified URL for this resource.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the accelerator type resides,\nsuch as us-central1-a.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "AcceleratorTypeAggregatedList": { - "id": "AcceleratorTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AcceleratorTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of accelerator types." - }, - "description": "A list of AcceleratorTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#acceleratorTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#acceleratorTypeAggregatedList for aggregated lists of\naccelerator types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AcceleratorTypeList": { - "description": "Contains a list of accelerator types.", - "id": "AcceleratorTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of AcceleratorType resources.", - "items": { - "$ref": "AcceleratorType" - }, - "type": "array" - }, - "kind": { - "default": "compute#acceleratorTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#acceleratorTypeList for lists of accelerator types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AcceleratorTypesScopedList": { - "id": "AcceleratorTypesScopedList", - "properties": { - "acceleratorTypes": { - "description": "[Output Only] A list of accelerator types contained in this scope.", - "items": { - "$ref": "AcceleratorType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the accelerator\ntypes list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AccessConfig": { - "description": "An access configuration attached to an instance's network interface.\nOnly one access config per instance is supported.", - "id": "AccessConfig", - "properties": { - "externalIpv6": { - "description": "Applies to ipv6AccessConfigs only.\nThe first IPv6 address of the external IPv6 range associated\nwith this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To\nuse a static external IP address, it must be unused and in the same region\nas the instance's zone. If not specified, Google Cloud will automatically\nassign an external IPv6 address from the instance's subnetwork.", - "type": "string" - }, - "externalIpv6PrefixLength": { - "description": "Applies to ipv6AccessConfigs only. The prefix length of the\nexternal IPv6 range.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#accessConfig", - "description": "[Output Only] Type of the resource. Alwayscompute#accessConfig for access configs.", - "type": "string" - }, - "name": { - "description": "The name of this access configuration. In accessConfigs\n(IPv4), the default and recommended name is External NAT, but\nyou can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the\nrecommend name is External IPv6.", - "type": "string" - }, - "natIP": { - "description": "Applies to accessConfigs (IPv4) only. Anexternal IP\naddress associated with this instance. Specify an unused static\nexternal IP address available to the project or leave this field undefined\nto use an IP from a shared ephemeral IP address pool. If you specify a\nstatic external IP address, it must live in the same region as the zone of\nthe instance.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring this access\nconfiguration and can only take the following values: PREMIUM,STANDARD.\n\nIf an AccessConfig is specified without a valid external IP address, an\nephemeral IP will be created with this networkTier.\n\nIf an AccessConfig with a valid external IP address is specified, it must\nmatch that of the networkTier associated with the Address resource owning\nthat IP.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "publicPtrDomainName": { - "description": "The DNS domain name for the public PTR record.\n\nYou can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for\nfirst IP in associated external IPv6 range.", - "type": "string" - }, - "securityPolicy": { - "description": "The resource URL for the security policy associated with this access\nconfig.", - "type": "string" - }, - "setPublicPtr": { - "description": "Specifies whether a public DNS 'PTR' record should be created to map the\nexternal IP address of the instance to a DNS domain name.\n\nThis field is not used in ipv6AccessConfig. A default PTR\nrecord will be created if the VM has external IPv6 range associated.", - "type": "boolean" - }, - "type": { - "description": "The type of configuration. In accessConfigs (IPv4), the\ndefault and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option isDIRECT_IPV6.", - "enum": [ - "DIRECT_IPV6", - "ONE_TO_ONE_NAT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Address": { - "description": "Represents an IP Address resource.\n\nGoogle Compute Engine has two IP Address resources:\n\n* [Global (external and\ninternal)](https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses)\n* [Regional (external and\ninternal)](https://cloud.google.com/compute/docs/reference/rest/beta/addresses)\n\nFor more information, see\nReserving a static external IP address.", - "id": "Address", - "properties": { - "address": { - "description": "The static IP address represented by this resource.", - "type": "string" - }, - "addressType": { - "description": "The type of address to reserve, either INTERNAL orEXTERNAL. If unspecified, defaults to EXTERNAL.", - "enum": [ - "EXTERNAL", - "INTERNAL", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "A publicly visible external IP address.", - "A private network IP address, for use with an Instance or Internal Load\nBalancer forwarding rule.", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipCollection": { - "description": "Reference to the source of external IPv4 addresses,\nlike a PublicDelegatedPrefix (PDP) for BYOIP.\nThe PDP must support enhanced IPv4 allocations.\n\nUse one of the following formats to specify a PDP when reserving an\nexternal IPv4 address using BYOIP.\n \n - \n Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name\n - \n Partial URL, as in\n \n \n - projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name\n - regions/region/publicDelegatedPrefixes/pdp-name", - "type": "string" - }, - "ipVersion": { - "description": "The IP version that will be used by this address. Valid options areIPV4 or IPV6.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "ipv6EndpointType": { - "description": "The endpoint type of this address, which should be VM\nor NETLB. This is used for deciding which type of endpoint\nthis address can be used after the external IPv6 address reservation.", - "enum": [ - "NETLB", - "VM" - ], - "enumDescriptions": [ - "Reserved IPv6 address can be used on network load balancer.", - "Reserved IPv6 address can be used on VM." - ], - "type": "string" - }, - "kind": { - "default": "compute#address", - "description": "[Output Only] Type of the resource. Always compute#address for\naddresses.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this Address, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an Address.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.addresses.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character\nmust be a lowercase letter, and all following characters (except for the\nlast character) must be a dash, lowercase letter, or digit. The last\ncharacter must be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network in which to reserve the address. This field can\nonly be used with INTERNAL type with theVPC_PEERING purpose.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring this address and\ncan only take the following values: PREMIUM orSTANDARD. Internal IP addresses are always Premium Tier;\nglobal external IP addresses are always Premium Tier; regional external IP\naddresses can be either Standard or Premium Tier.\n\nIf this field is not specified, it is assumed to be PREMIUM.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "prefixLength": { - "description": "The prefix length if the resource represents an IP range.", - "format": "int32", - "type": "integer" - }, - "purpose": { - "description": "The purpose of this resource, which can be one of the following values:\n \n \n - GCE_ENDPOINT for addresses that are used by VM\n instances, alias IP ranges, load balancers, and similar resources.\n - DNS_RESOLVER for a DNS resolver address in a subnetwork\n for a Cloud DNS inbound\n forwarder IP addresses (regional internal IP address in a subnet of\n a VPC network)\n - VPC_PEERING for global internal IP addresses used for\n \n private services access allocated ranges.\n - NAT_AUTO for the regional external IP addresses used by\n Cloud NAT when allocating addresses using\n \n automatic NAT IP address allocation.\n - IPSEC_INTERCONNECT for addresses created from a private\n IP range that are reserved for a VLAN attachment in an\n *HA VPN over Cloud Interconnect* configuration. These addresses\n are regional resources.\n - `SHARED_LOADBALANCER_VIP` for an internal IP address that is assigned\n to multiple internal forwarding rules.\n - `PRIVATE_SERVICE_CONNECT` for a private network address that is\n used to configure Private Service Connect. Only global internal addresses\n can use this purpose.", - "enum": [ - "DNS_RESOLVER", - "GCE_ENDPOINT", - "IPSEC_INTERCONNECT", - "NAT_AUTO", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS", - "SHARED_LOADBALANCER_VIP", - "VPC_PEERING" - ], - "enumDescriptions": [ - "DNS resolver address in the subnetwork.", - "VM internal/alias IP, Internal LB service IP, etc.", - "A regional internal IP address range reserved for the VLAN attachment\nthat is used in HA VPN over Cloud Interconnect. This regional\ninternal IP address range must not overlap with any IP address range\nof subnet/route in the VPC network and its peering networks. After the\nVLAN attachment is created with the reserved IP address range, when\ncreating a new VPN gateway, its interface IP address is allocated\nfrom the associated VLAN attachment’s IP address range.", - "External IP automatically reserved for Cloud NAT.", - "A private network IP address that can be used to configure Private\nService Connect. This purpose can be specified only forGLOBAL addresses of Type INTERNAL", - "A regional internal IP address range reserved for Serverless.", - "A private network IP address that can be shared by multiple Internal\nLoad Balancer forwarding rules.", - "IP range for peer networks." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of the region where a regional address resides.\nFor regional addresses, you must specify the region as a path parameter in\nthe HTTP request URL. *This field is not applicable to global\naddresses.*", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the address, which can be one ofRESERVING, RESERVED, or IN_USE.\nAn address that is RESERVING is currently in the process of\nbeing reserved. A RESERVED address is currently reserved and\navailable to use. An IN_USE address is currently being used\nby another resource and is not available.", - "enum": [ - "IN_USE", - "RESERVED", - "RESERVING" - ], - "enumDescriptions": [ - "Address is being used by another resource and is not available.", - "Address is reserved and available to use.", - "Address is being reserved." - ], - "type": "string" - }, - "subnetwork": { - "description": "The URL of the subnetwork in which to reserve the address. If an IP address\nis specified, it must be within the subnetwork's IP range. This field can\nonly be used with INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose.", - "type": "string" - }, - "users": { - "description": "[Output Only] The URLs of the resources that are using this address.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AddressAggregatedList": { - "id": "AddressAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AddressesScopedList", - "description": "[Output Only] Name of the scope containing this set of addresses." - }, - "description": "A list of AddressesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#addressAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#addressAggregatedList for aggregated lists of\naddresses.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AddressList": { - "description": "Contains a list of addresses.", - "id": "AddressList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Address resources.", - "items": { - "$ref": "Address" - }, - "type": "array" - }, - "kind": { - "default": "compute#addressList", - "description": "[Output Only] Type of resource. Always compute#addressList for\nlists of addresses.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AddressesScopedList": { - "id": "AddressesScopedList", - "properties": { - "addresses": { - "description": "[Output Only] A list of addresses contained in this scope.", - "items": { - "$ref": "Address" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AdvancedMachineFeatures": { - "description": "Specifies options for controlling advanced machine features.\nOptions that would traditionally be configured in a BIOS belong\nhere. Features that require operating system support may have\ncorresponding entries in the GuestOsFeatures of anImage (e.g., whether or not the OS in theImage supports nested virtualization being enabled or\ndisabled).", - "id": "AdvancedMachineFeatures", - "properties": { - "enableNestedVirtualization": { - "description": "Whether to enable nested virtualization or not (default is false).", - "type": "boolean" - }, - "enableUefiNetworking": { - "description": "Whether to enable UEFI networking for instance creation.", - "type": "boolean" - }, - "performanceMonitoringUnit": { - "description": "Type of Performance Monitoring Unit requested on instance.", - "enum": [ - "ARCHITECTURAL", - "ENHANCED", - "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "Architecturally defined non-LLC events.", - "Most documented core/L2 and LLC events.", - "", - "Most documented core/L2 events." - ], - "type": "string" - }, - "threadsPerCore": { - "description": "The number of threads per physical core. To disable simultaneous\nmultithreading (SMT) set this to 1. If unset, the maximum number\nof threads supported per core by the underlying processor is\nassumed.", - "format": "int32", - "type": "integer" - }, - "turboMode": { - "description": "Turbo frequency mode to use for the instance.\nSupported modes include:\n* ALL_CORE_MAX\n\nUsing empty string or not setting this field will use the platform-specific\ndefault turbo mode.", - "type": "string" - }, - "visibleCoreCount": { - "description": "The number of physical cores to expose to an instance. Multiply by\nthe number of threads per core to compute the total number of virtual\nCPUs to expose to the instance. If unset, the number of cores is\ninferred from the instance's nominal CPU count and the underlying\nplatform's SMT width.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AliasIpRange": { - "description": "An alias IP range attached to an instance's network interface.", - "id": "AliasIpRange", - "properties": { - "ipCidrRange": { - "description": "The IP alias ranges to allocate for this interface. This IP CIDR range\nmust belong to the specified subnetwork and cannot contain IP addresses\nreserved by system or used by other network interfaces. This range may be\na single IP address (such as 10.2.3.4), a netmask (such as/24) or a CIDR-formatted string (such as10.1.2.0/24).", - "type": "string" - }, - "subnetworkRangeName": { - "description": "The name of a subnetwork secondary IP range from which to allocate an IP\nalias range. If not specified, the primary range of the subnetwork is used.", - "type": "string" - } - }, - "type": "object" - }, - "AllocationAggregateReservation": { - "description": "This reservation type is specified by total resource amounts (e.g. total\ncount of CPUs) and can account for multiple instance SKUs. In other words,\none can create instances of varying shapes against this reservation.", - "id": "AllocationAggregateReservation", - "properties": { - "hostCount": { - "description": "Count of reserved hosts of specified VM family. The host has fixed number\nof accelerators based on the accelerator/vm-family selected.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances\nrunning on the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "inUseInstanceCount": { - "description": "Number of instances currently in use in this reservation.", - "format": "int32", - "type": "integer" - }, - "inUseResources": { - "description": "[Output only] List of resources currently in use.", - "items": { - "$ref": "AllocationAggregateReservationReservedResourceInfo" - }, - "type": "array" - }, - "reservedResources": { - "description": "List of reserved resources (CPUs, memory, accelerators).", - "items": { - "$ref": "AllocationAggregateReservationReservedResourceInfo" - }, - "type": "array" - }, - "vmFamily": { - "description": "The VM family that all instances scheduled against this reservation must\nbelong to.", - "enum": [ - "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", - "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "workloadType": { - "description": "The workload type of the instances that will target this reservation.", - "enum": [ - "BATCH", - "SERVING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Reserved resources will be optimized for BATCH workloads, such as ML\ntraining.", - "Reserved resources will be optimized for SERVING workloads, such as ML\ninference.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationAggregateReservationReservedResourceInfo": { - "id": "AllocationAggregateReservationReservedResourceInfo", - "properties": { - "accelerator": { - "$ref": "AllocationAggregateReservationReservedResourceInfoAccelerator", - "description": "Properties of accelerator resources in this reservation." - } - }, - "type": "object" - }, - "AllocationAggregateReservationReservedResourceInfoAccelerator": { - "id": "AllocationAggregateReservationReservedResourceInfoAccelerator", - "properties": { - "acceleratorCount": { - "description": "Number of accelerators of specified type.", - "format": "int32", - "type": "integer" - }, - "acceleratorType": { - "description": "Full or partial URL to accelerator type. e.g.\n\"projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l\"", - "type": "string" - } - }, - "type": "object" - }, - "AllocationReservationSharingPolicy": { - "id": "AllocationReservationSharingPolicy", - "properties": { - "serviceShareType": { - "description": "Sharing config for all Google Cloud services.", - "enum": [ - "ALLOW_ALL", - "DISALLOW_ALL", - "SERVICE_SHARE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Allow all Google Cloud managed services to share reservations.", - "[Default] Disallow sharing with all Google Cloud services.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "AllocationResourceStatus", - "properties": { - "healthInfo": { - "$ref": "AllocationResourceStatusHealthInfo", - "description": "[Output only] Health information for the reservation." - }, - "reservationBlockCount": { - "description": "The number of reservation blocks associated with this reservation.", - "format": "int32", - "type": "integer" - }, - "reservationMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "Maintenance information for this reservation" - }, - "specificSkuAllocation": { - "$ref": "AllocationResourceStatusSpecificSKUAllocation", - "description": "Allocation Properties of this reservation." - } - }, - "type": "object" - }, - "AllocationResourceStatusHealthInfo": { - "description": "Health information for the reservation.", - "id": "AllocationResourceStatusHealthInfo", - "properties": { - "degradedBlockCount": { - "description": "The number of reservation blocks that are degraded.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation is degraded.", - "The reservation is healthy.", - "The health status of the reservation is unspecified." - ], - "type": "string" - }, - "healthyBlockCount": { - "description": "The number of reservation blocks that are healthy.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AllocationResourceStatusSpecificSKUAllocation": { - "description": "Contains Properties set for the reservation.", - "id": "AllocationResourceStatusSpecificSKUAllocation", - "properties": { - "sourceInstanceTemplateId": { - "description": "ID of the instance template used to populate reservation properties.", - "type": "string" - }, - "utilizations": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Per service utilization breakdown. The Key is the Google Cloud managed\nservice name.", - "type": "object" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk": { - "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", - "properties": { - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int64", - "type": "string" - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME. The default isSCSI.\nFor performance characteristics of SCSI over NVMe, seeLocal SSD performance.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "AllocationSpecificSKUAllocationReservedInstanceProperties": { - "description": "Properties of the SKU instances being reserved.\nNext ID: 9", - "id": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "properties": { - "guestAccelerators": { - "description": "Specifies accelerator type and count.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "localSsds": { - "description": "Specifies amount of local ssd to reserve with each instance. The type\nof disk is local-ssd.", - "items": { - "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the allocation close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "machineType": { - "description": "Specifies type of machine (name only) which has fixed number of vCPUs\nand fixed amount of memory. This also includes specifying custom\nmachine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", - "type": "string" - }, - "maintenanceFreezeDurationHours": { - "description": "Specifies the number of hours after reservation creation where\ninstances using the reservation won't be scheduled for maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted\nvalues are: `PERIODIC`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "minCpuPlatform": { - "description": "Minimum cpu platform the reservation.", - "type": "string" - } - }, - "type": "object" - }, - "AllocationSpecificSKUReservation": { - "description": "This reservation type allows to pre allocate specific instance\n configuration.", - "id": "AllocationSpecificSKUReservation", - "properties": { - "assuredCount": { - "description": "[Output Only] Indicates how many instances are actually usable currently.", - "format": "int64", - "type": "string" - }, - "count": { - "description": "Specifies the number of resources that are allocated.", - "format": "int64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] Indicates how many instances are in use.", - "format": "int64", - "type": "string" - }, - "instanceProperties": { - "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "The instance properties for the reservation." - }, - "sourceInstanceTemplate": { - "description": "Specifies the instance template to create the reservation. If you use\nthis field, you must exclude the instanceProperties field.\n\nThis field is optional, and it can be a full or partial URL. For example,\nthe following are all valid URLs to an instance template: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate", - "type": "string" - } - }, - "type": "object" - }, - "AttachedDisk": { - "description": "An instance-attached disk resource.", - "id": "AttachedDisk", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the attached disk. Valid values are ARM64\nor X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "boot": { - "description": "Indicates that this is a boot disk. The virtual machine will use the first\npartition of the disk for its root filesystem.", - "type": "boolean" - }, - "deviceName": { - "description": "Specifies a unique device name of your choice that is reflected into the/dev/disk/by-id/google-* tree of a Linux operating system\nrunning within the instance. This name can be used to reference the device\nfor mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this\ndisk, in the form persistent-disk-x, where x is a number\nassigned by Google Compute Engine. This field is only applicable for\npersistent disks.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts or decrypts a disk using acustomer-supplied\nencryption key.\n\nIf you are creating a new disk, this field encrypts the new disk using\nan encryption key that you provide. If you are attaching an existing\ndisk that is already encrypted, this field decrypts the disk using\nthe customer-supplied encryption key.\n\nIf you encrypt a disk using a customer-supplied key, you must provide the\nsame key again when you attempt to use this resource at a later time. For\nexample, you must provide the key when you create a snapshot or an image\nfrom the disk or when you attach the disk to a virtual machine instance.\n\nIf you do not provide an encryption key, then the disk will be encrypted\nusing an automatically generated key and you do not need to provide a key\nto use the disk later.\n\nNote:\n\nInstance templates do not storecustomer-supplied\nencryption keys, so you cannot use your own keys to encrypt disks in amanaged instance group.\n\nYou cannot create VMs that have disks with customer-supplied keys using\nthe bulk\ninsert method." - }, - "diskSizeGb": { - "description": "The size of the disk in GB.", - "format": "int64", - "type": "string" - }, - "forceAttach": { - "description": "[Input Only] Whether to force attach the regional disk even if it's\ncurrently attached to another instance. If you try to force attach a zonal\ndisk to an instance, you will receive an error.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "index": { - "description": "[Output Only] A zero-based index to this disk, where 0 is reserved for the\nboot disk. If you have many disks attached to an instance, each\ndisk would have a unique index number.", - "format": "int32", - "type": "integer" - }, - "initializeParams": { - "$ref": "AttachedDiskInitializeParams", - "description": "[Input Only] Specifies the parameters for a new disk that will be created\nalongside the new instance. Use initialization parameters to create boot\ndisks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property;\nyou can only define one or the other, but not both." - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME. For most machine types, the\ndefault is SCSI. Local SSDs can use either NVME or SCSI.\nIn certain configurations, persistent disks can use NVMe. For more\ninformation, seeAbout\npersistent disks.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#attachedDisk", - "description": "[Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.", - "type": "string" - }, - "licenses": { - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locked": { - "description": "[Output Only] Whether to indicate the attached disk is locked. The locked\ndisk is not allowed to be detached from the instance, or to be used as the\nsource of the snapshot creation, and the image creation. The instance with\nat least one locked attached disk is not allow to be used as source of\nmachine image creation, instant snapshot creation, and not allowed to be\ndeleted with --keep-disk parameter set to true for locked disks.", - "type": "boolean" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. If not specified, the default is to attach the disk\nin READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple virtual machines can use\na disk in read-only mode at a time.", - "*[Default]* Attaches this disk in read-write mode. Only one\nvirtual machine at a time can be attached to a disk in read-write mode." - ], - "type": "string" - }, - "savedState": { - "description": "For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this\nfield is set to PRESERVED if the LocalSSD data has been saved\nto a persistent location by customer request. (see the\ndiscard_local_ssd option on Stop/Suspend).\nRead-only in the api.", - "enum": [ - "DISK_SAVED_STATE_UNSPECIFIED", - "PRESERVED" - ], - "enumDescriptions": [ - "*[Default]* Disk state has not been preserved.", - "Disk state has been preserved." - ], - "type": "string" - }, - "shieldedInstanceInitialState": { - "$ref": "InitialStateConfig", - "description": "[Output Only] shielded vm initial state stored on disk" - }, - "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk\nresource. When creating a new instance boot disk, one ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source\nis required.\n\nIf desired, you can also attach existing non-root persistent disks using\nthis property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name for zonal disk,\nand the URL for regional disk.", - "type": "string" - }, - "type": { - "description": "Specifies the type of the disk, either SCRATCH orPERSISTENT. If not specified, the default isPERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "userLicenses": { - "description": "[Output Only] A list of user provided licenses. It represents a list of\nURLs to the license resource. Unlike regular licenses, user provided\nlicenses can be modified after the disk is created.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AttachedDiskInitializeParams": { - "description": "[Input Only] Specifies the parameters for a new disk that will be created\nalongside the new instance. Use initialization parameters to create boot\ndisks or local SSDs attached to the new instance.\n\nThis field is persisted and returned for instanceTemplate and not returned\nin the context of instance.\n\nThis property is mutually exclusive with the source property;\nyou can only define one or the other, but not both.", - "id": "AttachedDiskInitializeParams", - "properties": { - "architecture": { - "description": "The architecture of the attached disk. Valid values are\narm64 or x86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "description": { - "description": "An optional description. Provide this property when creating the disk.", - "type": "string" - }, - "diskName": { - "description": "Specifies the disk name. If not specified, the default is to use the name\nof the instance. If a disk with the same name already exists in the given\nregion, the existing disk is attached to the new instance and the\nnew disk is not created.", - "type": "string" - }, - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB. The size must be at least\n10 GB. If you specify a sourceImage, which is required for\nboot disks, the default size is the size of the sourceImage.\nIf you do not specify a sourceImage, the default disk size\nis 500 GB.", - "format": "int64", - "type": "string" - }, - "diskType": { - "description": "Specifies the disk type to use to create the instance. If not specified,\nthe default is pd-standard, specified using the full URL.\nFor example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard\n\n\nFor a full list of acceptable values, seePersistent disk\ntypes. If you specify this field when creating a VM, you can provide\neither the full or partial URL. For example, the following values are\nvalid:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n - projects/project/zones/zone/diskTypes/diskType \n - zones/zone/diskTypes/diskType\n\n\nIf you specify this field when creating or updating an instance template\nor all-instances configuration, specify the type of the disk, not the\nURL. For example: pd-standard.", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this disk is using confidential compute mode.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.\n\nGuest OS features are applied by merginginitializeParams.guestOsFeatures anddisks.guestOsFeatures", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this disk. These can be later modified by thedisks.setLabels method. This field is only applicable for\npersistent disks.", - "type": "object" - }, - "licenses": { - "description": "A list of publicly visible licenses. Reserved for Google's use.", - "items": { - "type": "string" - }, - "type": "array" - }, - "multiWriter": { - "description": "Indicates whether or not the disk can be read/write attached to\nmore than one instance.", - "type": "boolean" - }, - "onUpdateAction": { - "description": "Specifies which action to take on instance update with this disk. Default\nis to use the existing disk.", - "enum": [ - "RECREATE_DISK", - "RECREATE_DISK_IF_SOURCE_CHANGED", - "USE_EXISTING_DISK" - ], - "enumDescriptions": [ - "Always recreate the disk.", - "Recreate the disk if source (image, snapshot) of this disk is different\nfrom source of existing disk.", - "Use the existing disk, this is the default behaviour." - ], - "type": "string" - }, - "provisionedIops": { - "description": "Indicates how many IOPS to provision for the disk. This sets the number\nof I/O operations per second that the disk can handle. Values must be\nbetween 10,000 and 120,000. For more details, see theExtreme persistent\ndisk documentation.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "Indicates how much throughput to provision for the disk. This sets the\nnumber of throughput mb per second that the disk can handle. Values must\ngreater than or equal to 1.", - "format": "int64", - "type": "string" - }, - "replicaZones": { - "description": "Required for each regional disk associated with the instance. Specify\nthe URLs of the zones where the disk should be replicated to.\nYou must provide exactly two replica zones, and one zone must be the same\nas the instance zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the disk. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT\n\u0026 PATCH) when empty.", - "type": "object" - }, - "resourcePolicies": { - "description": "Resource policies applied to this disk for automatic snapshot creations.\nSpecified using the full or partial URL. For instance template, specify\nonly the resource policy name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceImage": { - "description": "The source image to create this disk. When creating a new instance boot\ndisk, one of initializeParams.sourceImage orinitializeParams.sourceSnapshot or disks.source\nis required.\n\nTo create a disk with one of the public operating system\nimages, specify the image by its family name. For example, specifyfamily/debian-9 to use the latest Debian 9 image:\n\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the\nimage name in the following format:\n\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns\nthe latest version of the image in that family. Replace the image name\nwith family/family-name:\n\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source image. Required if the source image is\nprotected by a customer-supplied encryption key.\n\nInstanceTemplate and InstancePropertiesPatch do not storecustomer-supplied\nencryption keys, so you cannot create disks for instances in a managed instance group if the\nsource images are encrypted with your own keys." - }, - "sourceInstantSnapshot": { - "description": "The source instant-snapshot to create this disk. When creating a new\ninstance boot disk, one of initializeParams.sourceSnapshot\nor initializeParams.sourceInstantSnapshotinitializeParams.sourceImage or disks.source\nis required.\n\nTo create a disk with a snapshot that you created, specify the\nsnapshot name in the following format:\n\nus-central1-a/instantSnapshots/my-backup\n\n\nIf the source instant-snapshot is deleted later, this field will not be\nset.", - "type": "string" - }, - "sourceSnapshot": { - "description": "The source snapshot to create this disk. When creating a new instance\nboot disk, one of initializeParams.sourceSnapshot orinitializeParams.sourceImage or disks.source\nis required.\n\nTo create a disk with a snapshot that you created, specify the\nsnapshot name in the following format:\n\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.\n\nNote: You cannot create VMs in bulk using a snapshot as the source. Use\nan image instead when you create VMs using\nthe bulk\ninsert method.", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source snapshot." - }, - "storagePool": { - "description": "The storage pool in which the new disk is created. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool\n - projects/project/zones/zone/storagePools/storagePool \n - zones/zone/storagePools/storagePool", - "type": "string" - } - }, - "type": "object" - }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n },\n {\n \"log_type\": \"ADMIN_READ\"\n }\n ]\n },\n {\n \"service\": \"sampleservice.googleapis.com\",\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\"\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:aliya@example.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts `jose@example.com` from DATA_READ logging, and\n`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.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:jose@example.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\"\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\njose@example.com from DATA_READ logging.", - "id": "AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "ADMIN_READ", - "DATA_READ", - "DATA_WRITE", - "LOG_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Admin reads. Example: CloudIAM getIamPolicy", - "Data reads. Example: CloudSQL Users list", - "Data writes. Example: CloudSQL Users create", - "Default case. Should never be this." - ], - "type": "string" - } - }, - "type": "object" - }, - "Autoscaler": { - "description": "Represents an Autoscaler resource.\n\nGoogle Compute Engine has two Autoscaler resources:\n\n* [Zonal](/compute/docs/reference/rest/beta/autoscalers)\n* [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)\n\nUse autoscalers to automatically add or delete instances from a\nmanaged instance group according to your defined autoscaling policy.\nFor more information, read Autoscaling Groups of Instances.\n\nFor zonal managed instance groups resource, use the autoscaler\nresource.\n\nFor regional managed instance groups, use theregionAutoscalers resource.", - "id": "Autoscaler", - "properties": { - "autoscalingPolicy": { - "$ref": "AutoscalingPolicy", - "description": "The configuration parameters for the autoscaling algorithm. You can define\none or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#autoscaler", - "description": "[Output Only] Type of the resource. Always compute#autoscaler\nfor autoscalers.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.autoscalers.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "recommendedSize": { - "description": "[Output Only] Target recommended MIG size (number of instances) computed by\nautoscaler. Autoscaler calculates the recommended MIG size even when the\nautoscaling policy mode is different from ON. This field is empty when\nautoscaler is not connected to an existing managed instance group or\nautoscaler did not generate its prediction.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URL of theregion\nwhere the instance group resides (for autoscalers living in regional\nscope).", - "type": "string" - }, - "scalingScheduleStatus": { - "additionalProperties": { - "$ref": "ScalingScheduleStatus" - }, - "description": "[Output Only] Status information of existing scaling schedules.", - "type": "object" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the autoscaler configuration. Current set of\npossible values:\n \n - PENDING:\n Autoscaler backend hasn't read new/updated configuration.\n - DELETING:\n Configuration is being deleted.\n - ACTIVE:\n Configuration is acknowledged to be effective. Some warnings might\n be present in the statusDetails field.\n - ERROR:\n Configuration has errors. Actionable for users. Details are present in\n the statusDetails field.\n\n\nNew values might be added in the future.", - "enum": [ - "ACTIVE", - "DELETING", - "ERROR", - "PENDING" - ], - "enumDescriptions": [ - "Configuration is acknowledged to be effective", - "Configuration is being deleted", - "Configuration has errors. Actionable for users.", - "Autoscaler backend hasn't read new/updated configuration" - ], - "type": "string" - }, - "statusDetails": { - "description": "[Output Only] Human-readable details about the current state of the\nautoscaler. Read the documentation forCommonly\nreturned status messages for examples of status messages you might\nencounter.", - "items": { - "$ref": "AutoscalerStatusDetails" - }, - "type": "array" - }, - "target": { - "description": "URL of the managed instance group that this autoscaler will scale. This\nfield is required when creating an autoscaler.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of thezone\nwhere the instance group resides (for autoscalers living in zonal scope).", - "type": "string" - } - }, - "type": "object" - }, - "AutoscalerAggregatedList": { - "id": "AutoscalerAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "AutoscalersScopedList", - "description": "[Output Only] Name of the scope containing this set of autoscalers." - }, - "description": "A list of AutoscalersScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#autoscalerAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#autoscalerAggregatedList for aggregated lists of\nautoscalers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalerList": { - "description": "Contains a list of Autoscaler resources.", - "id": "AutoscalerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "kind": { - "default": "compute#autoscalerList", - "description": "[Output Only] Type of resource. Always compute#autoscalerList\nfor lists of autoscalers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalerStatusDetails": { - "id": "AutoscalerStatusDetails", - "properties": { - "message": { - "description": "The status message.", - "type": "string" - }, - "type": { - "description": "The type of error, warning, or notice returned. Current set of possible\nvalues:\n \n - ALL_INSTANCES_UNHEALTHY (WARNING):\n All instances in the instance group are unhealthy (not in RUNNING\n state).\n - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):\n There is no backend service attached to the instance group.\n - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):\n Autoscaler recommends a size greater than maxNumReplicas.\n - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):\n The custom metric samples are not exported often enough to be\n a credible base for autoscaling.\n - CUSTOM_METRIC_INVALID (ERROR):\n The custom metric that was specified does not exist or does not have\n the necessary labels.\n - MIN_EQUALS_MAX (WARNING):\n The minNumReplicas is equal to maxNumReplicas. This means the\n autoscaler cannot add or remove instances from the instance group.\n - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):\n The autoscaler did not receive any data from the custom metric\n configured for autoscaling.\n - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):\n The autoscaler is configured to scale based on a load balancing signal\n but the instance group has not received any requests from the load\n balancer.\n - MODE_OFF (WARNING):\n Autoscaling is turned off. The number of instances in the group won't\n change automatically. The autoscaling configuration is preserved.\n - MODE_ONLY_UP (WARNING):\n Autoscaling is in the \"Autoscale only out\" mode. The autoscaler can add\n instances but not remove any.\n - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):\n The instance group cannot be autoscaled because it has more than one\n backend service attached to it.\n - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):\n There is insufficient quota for the necessary resources, such as CPU or\n number of instances.\n - REGION_RESOURCE_STOCKOUT (ERROR):\n Shown only for regional autoscalers: there is a resource stockout in\n the chosen region.\n - SCALING_TARGET_DOES_NOT_EXIST (ERROR):\n The target to be scaled does not exist.\n - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION\n (ERROR): Autoscaling does not work with an HTTP/S load balancer that\n has been configured for maxRate.\n - ZONE_RESOURCE_STOCKOUT (ERROR):\n For zonal autoscalers: there is a resource stockout in the chosen zone.\n For regional autoscalers: in at least one of the zones you're using\n there is a resource stockout.\n\n\nNew values might be added in the future. Some of the values might not be\navailable in all API versions.", - "enum": [ - "ALL_INSTANCES_UNHEALTHY", - "BACKEND_SERVICE_DOES_NOT_EXIST", - "CAPPED_AT_MAX_NUM_REPLICAS", - "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", - "CUSTOM_METRIC_INVALID", - "MIN_EQUALS_MAX", - "MISSING_CUSTOM_METRIC_DATA_POINTS", - "MISSING_LOAD_BALANCING_DATA_POINTS", - "MODE_OFF", - "MODE_ONLY_SCALE_OUT", - "MODE_ONLY_UP", - "MORE_THAN_ONE_BACKEND_SERVICE", - "NOT_ENOUGH_QUOTA_AVAILABLE", - "REGION_RESOURCE_STOCKOUT", - "SCALING_TARGET_DOES_NOT_EXIST", - "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX", - "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN", - "UNKNOWN", - "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", - "ZONE_RESOURCE_STOCKOUT" - ], - "enumDescriptions": [ - "All instances in the instance group are unhealthy (not in RUNNING state).", - "There is no backend service attached to the instance group.", - "Autoscaler recommends a size greater than maxNumReplicas.", - "The custom metric samples are not exported often enough to be a credible\nbase for autoscaling.", - "The custom metric that was specified does not exist or does not have the\nnecessary labels.", - "The minNumReplicas is equal to maxNumReplicas. This means the autoscaler\ncannot add or remove instances from the instance group.", - "The autoscaler did not receive any data from the custom metric configured\nfor autoscaling.", - "The autoscaler is configured to scale based on a load balancing signal\nbut the instance group has not received any requests from the load\nbalancer.", - "Autoscaling is turned off. The number of instances in the group won't\nchange automatically. The autoscaling configuration is preserved.", - "Autoscaling is in the \"Autoscale only scale out\" mode.\nInstances in the group will be only added.", - "Autoscaling is in the \"Autoscale only out\" mode. Instances in the group\nwill be only added.", - "The instance group cannot be autoscaled because it has more than one\nbackend service attached to it.", - "There is insufficient quota for the necessary resources, such as CPU or\nnumber of instances.", - "Showed only for regional autoscalers: there is a resource stockout in\nthe chosen region.", - "The target to be scaled does not exist.", - "For some scaling schedules minRequiredReplicas is greater than\nmaxNumReplicas. Autoscaler always recommends at most maxNumReplicas\ninstances.", - "For some scaling schedules minRequiredReplicas is less than\nminNumReplicas. Autoscaler always recommends at least minNumReplicas\ninstances.", - "", - "Autoscaling does not work with an HTTP/S load balancer that has been\nconfigured for maxRate.", - "For zonal autoscalers: there is a resource stockout in the chosen zone.\nFor regional autoscalers: in at least one of the zones you're using there\nis a resource stockout." - ], - "type": "string" - } - }, - "type": "object" - }, - "AutoscalersScopedList": { - "id": "AutoscalersScopedList", - "properties": { - "autoscalers": { - "description": "[Output Only] A list of autoscalers contained in this scope.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of autoscalers\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "AutoscalingPolicy": { - "description": "Cloud Autoscaler policy.", - "id": "AutoscalingPolicy", - "properties": { - "coolDownPeriodSec": { - "description": "The number of seconds that your application takes to initialize on a VM\ninstance. This is referred to as the\n[initialization period](/compute/docs/autoscaler#cool_down_period).\nSpecifying an accurate initialization period improves\nautoscaler decisions. For example, when scaling out, the autoscaler ignores\ndata from VMs that are still initializing because those VMs might not yet\nrepresent normal usage of your application. The default initialization\nperiod is 60 seconds.\n\nInitialization periods might vary because of numerous\nfactors. We recommend that you test how long your application takes to\ninitialize. To do this, create a VM and time your application's startup\nprocess.", - "format": "int32", - "type": "integer" - }, - "cpuUtilization": { - "$ref": "AutoscalingPolicyCpuUtilization", - "description": "Defines the CPU utilization policy that allows the autoscaler to scale\nbased on the average CPU utilization of a managed instance group." - }, - "customMetricUtilizations": { - "description": "Configuration parameters of autoscaling based on a custom metric.", - "items": { - "$ref": "AutoscalingPolicyCustomMetricUtilization" - }, - "type": "array" - }, - "loadBalancingUtilization": { - "$ref": "AutoscalingPolicyLoadBalancingUtilization", - "description": "Configuration parameters of autoscaling based on load balancer." - }, - "maxNumReplicas": { - "description": "The maximum number of instances that the autoscaler can scale out to. This\nis required when creating or updating an autoscaler. The maximum number\nof replicas must not be lower than minimal number of replicas.", - "format": "int32", - "type": "integer" - }, - "minNumReplicas": { - "description": "The minimum number of replicas that the autoscaler can scale in to.\nThis cannot be less than 0. If not provided, autoscaler chooses a\ndefault value depending on maximum number of instances allowed.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "Defines the operating mode for this policy.\nThe following modes are available:\n \n - OFF: Disables the autoscaler but maintains its\n configuration.\n - ONLY_SCALE_OUT: Restricts the autoscaler to add\n VM instances only.\n - ON: Enables all autoscaler activities according to its\n policy.\n\n\nFor more information, see \n\"Turning off or restricting an autoscaler\"", - "enum": [ - "OFF", - "ON", - "ONLY_SCALE_OUT", - "ONLY_UP" - ], - "enumDescriptions": [ - "Do not automatically scale the MIG in or out.\nThe recommended_size field contains the size of MIG that would be set if\nthe actuation mode was enabled.", - "Automatically scale the MIG in and out according to the policy.", - "Automatically create VMs according to the policy, but do not scale\nthe MIG in.", - "Automatically create VMs according to the policy, but do not scale\nthe MIG in." - ], - "type": "string" - }, - "scaleDownControl": { - "$ref": "AutoscalingPolicyScaleDownControl" - }, - "scaleInControl": { - "$ref": "AutoscalingPolicyScaleInControl" - }, - "scalingSchedules": { - "additionalProperties": { - "$ref": "AutoscalingPolicyScalingSchedule" - }, - "description": "Scaling schedules defined for an autoscaler. Multiple schedules\ncan be set on an autoscaler, and they can overlap. During overlapping\nperiods the greatest min_required_replicas of all scaling schedules is\napplied. Up to 128 scaling schedules are allowed.", - "type": "object" - } - }, - "type": "object" - }, - "AutoscalingPolicyCpuUtilization": { - "description": "CPU utilization policy.", - "id": "AutoscalingPolicyCpuUtilization", - "properties": { - "predictiveMethod": { - "description": "Indicates whether predictive autoscaling based on CPU metric is enabled.\nValid values are:\n\n* NONE (default). No predictive method is used. The autoscaler scales the\ngroup to meet current demand based on real-time metrics.\n* OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by\nmonitoring daily and weekly load patterns and scaling out ahead of\nanticipated demand.", - "enum": [ - "NONE", - "OPTIMIZE_AVAILABILITY", - "PREDICTIVE_METHOD_UNSPECIFIED" - ], - "enumDescriptions": [ - "No predictive method is used. The autoscaler scales the group to meet\ncurrent demand based on real-time metrics", - "Predictive autoscaling improves availability by monitoring daily and\nweekly load patterns and scaling out ahead of anticipated demand.", - "" - ], - "type": "string" - }, - "utilizationTarget": { - "description": "The target CPU utilization that the autoscaler maintains. Must be\na float value in the range (0, 1]. If not specified, the default is0.6.\n\nIf the CPU level is below the target utilization, the autoscaler scales\nin the number of instances until it reaches the minimum number of\ninstances you specified or until the average CPU of your instances\nreaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler\nscales out until it reaches the maximum number of instances you\nspecified or until the average utilization reaches the target\nutilization.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "AutoscalingPolicyCustomMetricUtilization": { - "description": "Custom utilization metric policy.", - "id": "AutoscalingPolicyCustomMetricUtilization", - "properties": { - "filter": { - "description": "A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is\nused to select a specific TimeSeries for the purpose of autoscaling and\nto determine whether the metric is exporting per-instance or\nper-group data.\n\nFor the filter to be valid for autoscaling purposes, the following rules\napply:\n \n \n - You can only use the AND operator for joining\n selectors.\n - You can only use direct equality comparison operator\n (=) without any functions for each selector.\n - You can specify the metric in both the filter string and in the\n metric field. However, if specified in both places, the metric must\n be identical.\n - The monitored resource type\n determines what kind of values are expected for the metric. If it is\n a gce_instance, the autoscaler expects the metric to\n include a separate TimeSeries for each instance in a group. In such a\n case, you cannot filter on resource labels.\n \n \n If the resource type is any other value, the autoscaler expects\n this metric to contain values that apply to the entire autoscaled\n instance group and resource label filtering can be performed to\n point autoscaler at the correct TimeSeries to scale upon. This is\n called a *per-group metric* for the purpose of autoscaling.\n \n If not specified, the type defaults to\n gce_instance.\n\n\n\nTry to provide a filter that is selective enough to pick just one\nTimeSeries for the autoscaled group or for each of the instances (if you\nare using gce_instance resource type). If multiple\nTimeSeries are returned upon the query execution, the autoscaler will sum\ntheir respective values to obtain its scaling value.", - "type": "string" - }, - "metric": { - "description": "The identifier (type) of the Stackdriver Monitoring metric. The metric\ncannot have negative values.\n\nThe metric must have a value type of INT64 orDOUBLE.", - "type": "string" - }, - "singleInstanceAssignment": { - "description": "If scaling is based on a per-group metric value that represents the\ntotal amount of work to be done or resource usage, set this value to an\namount assigned for a single instance of the scaled group. Autoscaler\nkeeps the number of instances proportional to the value of this\nmetric. The metric itself does not change value due to group\nresizing.\n\nA good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages\nor a custom metric exporting the total number of requests coming to\nyour instances.\n\nA bad example would be a metric exporting an average or median latency,\nsince this value can't include a chunk assignable to a single instance,\nit could be better used with utilization_target instead.", - "format": "double", - "type": "number" - }, - "utilizationTarget": { - "description": "The target value of the metric that autoscaler maintains. This\nmust be a positive value. A utilization metric scales number of\nvirtual machines handling requests to increase or decrease\nproportionally to the metric.\n\nFor example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.\nThe autoscaler works to keep this value constant for each of the\ninstances.", - "format": "double", - "type": "number" - }, - "utilizationTargetType": { - "description": "Defines how target utilization value is expressed for a Stackdriver\nMonitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.", - "enum": [ - "DELTA_PER_MINUTE", - "DELTA_PER_SECOND", - "GAUGE" - ], - "enumDescriptions": [ - "Sets the utilization target value for a cumulative or delta metric,\nexpressed as the rate of growth per minute.", - "Sets the utilization target value for a cumulative or delta metric,\nexpressed as the rate of growth per second.", - "Sets the utilization target value for a gauge metric. The autoscaler\nwill collect the average utilization of the virtual machines from the\nlast couple of minutes, and compare the value to the utilization\ntarget value to perform autoscaling." - ], - "type": "string" - } - }, - "type": "object" - }, - "AutoscalingPolicyLoadBalancingUtilization": { - "description": "Configuration parameters of autoscaling based on load balancing.", - "id": "AutoscalingPolicyLoadBalancingUtilization", - "properties": { - "utilizationTarget": { - "description": "Fraction of backend capacity utilization (set in HTTP(S) load balancing\nconfiguration) that the autoscaler maintains. Must be a positive float\nvalue. If not defined, the default is 0.8.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "AutoscalingPolicyScaleDownControl": { - "description": "Configuration that allows for slower scale in so that even if Autoscaler\nrecommends an abrupt scale in of a MIG, it will be throttled as specified\nby the parameters below.", - "id": "AutoscalingPolicyScaleDownControl", - "properties": { - "maxScaledDownReplicas": { - "$ref": "FixedOrPercent", - "description": "Maximum allowed number (or %) of VMs that can be deducted from the peak\nrecommendation during the window autoscaler looks at when computing\nrecommendations. Possibly all these VMs can be deleted at once so user\nservice needs to be prepared to lose that many VMs in one step." - }, - "timeWindowSec": { - "description": "How far back autoscaling looks when computing recommendations to\ninclude directives regarding slower scale in, as described above.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AutoscalingPolicyScaleInControl": { - "description": "Configuration that allows for slower scale in so that even if Autoscaler\nrecommends an abrupt scale in of a MIG, it will be throttled as specified\nby the parameters below.", - "id": "AutoscalingPolicyScaleInControl", - "properties": { - "maxScaledInReplicas": { - "$ref": "FixedOrPercent", - "description": "Maximum allowed number (or %) of VMs that can be deducted from the peak\nrecommendation during the window autoscaler looks at when computing\nrecommendations. Possibly all these VMs can be deleted at once so user\nservice needs to be prepared to lose that many VMs in one step." - }, - "timeWindowSec": { - "description": "How far back autoscaling looks when computing recommendations to\ninclude directives regarding slower scale in, as described above.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "AutoscalingPolicyScalingSchedule": { - "description": "Scaling based on user-defined schedule. The message describes a single\nscaling schedule. A scaling schedule changes the minimum number of VM\ninstances an autoscaler can recommend, which can trigger scaling out.", - "id": "AutoscalingPolicyScalingSchedule", - "properties": { - "description": { - "description": "A description of a scaling schedule.", - "type": "string" - }, - "disabled": { - "description": "A boolean value that specifies whether a scaling schedule can influence\nautoscaler recommendations. If set to true, then a scaling schedule has\nno effect. This field is optional, and its value is false by default.", - "type": "boolean" - }, - "durationSec": { - "description": "The duration of time intervals, in seconds, for which this\nscaling schedule is to run. The minimum allowed value is 300.\nThis field is required.", - "format": "int32", - "type": "integer" - }, - "minRequiredReplicas": { - "description": "The minimum number of VM instances that the autoscaler will\nrecommend in time intervals starting according to schedule. This field is\nrequired.", - "format": "int32", - "type": "integer" - }, - "schedule": { - "description": "The start timestamps of time intervals when this scaling\nschedule is to provide a scaling signal. This field uses the extended\ncron format (with an optional year field). The expression can describe a\nsingle timestamp if the optional year is set, in which case the scaling\nschedule runs once. The schedule is interpreted with respect to\ntime_zone. This field is required. Note: These timestamps only describe\nwhen autoscaler starts providing the scaling signal. The VMs\nneed additional time to become serving.", - "type": "string" - }, - "timeZone": { - "description": "The time zone to use when interpreting the schedule.\nThe value of this field must be a time zone name from the tz database:\nhttps://en.wikipedia.org/wiki/Tz_database. This field is assigned a\ndefault value of \"UTC\" if left empty.", - "type": "string" - } - }, - "type": "object" - }, - "Backend": { - "description": "Message containing information of one individual backend.", - "id": "Backend", - "properties": { - "balancingMode": { - "description": "Specifies how to determine whether the backend of a load balancer can\nhandle additional traffic or is fully loaded. For usage guidelines, see\nConnection balancing mode.\n\nBackends must use compatible balancing modes. For more information, see\nSupported balancing modes and target capacity settings and\nRestrictions and guidance for instance groups.\n\nNote: Currently, if you use the API to configure incompatible balancing\nmodes, the configuration might be accepted even though it has no impact\nand is ignored. Specifically, Backend.maxUtilization is ignored when\nBackend.balancingMode is RATE. In the future, this incompatible combination\nwill be rejected.", - "enum": [ - "CONNECTION", - "CUSTOM_METRICS", - "IN_FLIGHT", - "RATE", - "UTILIZATION" - ], - "enumDescriptions": [ - "Balance based on the number of simultaneous connections.", - "Based on custom defined and reported metrics.", - "Balance based on the number of in-flight requests.", - "Balance based on requests per second (RPS).", - "Balance based on the backend utilization." - ], - "type": "string" - }, - "capacityScaler": { - "description": "A multiplier applied to the backend's target capacity of its balancing\nmode.\nThe default value is 1, which means the group serves up to\n100% of its configured capacity (depending onbalancingMode). A setting of 0 means the group is\ncompletely drained, offering 0% of its available capacity. The valid ranges\nare 0.0 and [0.1,1.0].\nYou cannot configure a setting larger than 0 and smaller than0.1.\nYou cannot configure a setting of 0 when there is only one\nbackend attached to the backend service.\n\nNot available with backends that don't support using abalancingMode. This includes backends such as global\ninternet NEGs, regional serverless NEGs, and PSC NEGs.", - "format": "float", - "type": "number" - }, - "customMetrics": { - "description": "List of custom metrics that are used for CUSTOM_METRICS\nBalancingMode.", - "items": { - "$ref": "BackendCustomMetric" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "failover": { - "description": "This field designates whether this is a failover backend. More than one\nfailover backend can be configured for a given BackendService.", - "type": "boolean" - }, - "group": { - "description": "The fully-qualified URL of aninstance\ngroup or network endpoint\ngroup (NEG) resource. To determine what types of backends a load\nbalancer supports, see the [Backend services\noverview](https://cloud.google.com/load-balancing/docs/backend-service#backends).\n\nYou must use the *fully-qualified* URL (starting withhttps://www.googleapis.com/) to specify the instance group\nor NEG. Partial URLs are not supported.\n\nIf haPolicy is specified, backends must refer to NEG resources of type\nGCE_VM_IP.", - "type": "string" - }, - "maxConnections": { - "description": "Defines a target maximum number of simultaneous connections. For usage\nguidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode. Not available if the backend'sbalancingMode is RATE.", - "format": "int32", - "type": "integer" - }, - "maxConnectionsPerEndpoint": { - "description": "Defines a target maximum number of simultaneous connections. For usage\nguidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isRATE.", - "format": "int32", - "type": "integer" - }, - "maxConnectionsPerInstance": { - "description": "Defines a target maximum number of simultaneous connections.\nFor usage guidelines, seeConnection\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isRATE.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequests": { - "description": "Defines a maximum number of in-flight requests for the whole NEG or\ninstance group. Not available if backend's balancingMode isRATE or CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequestsPerEndpoint": { - "description": "Defines a maximum number of in-flight requests for a single endpoint.\nNot available if backend's balancingMode is RATE\nor CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxInFlightRequestsPerInstance": { - "description": "Defines a maximum number of in-flight requests for a single VM.\nNot available if backend's balancingMode is RATE\nor CONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxRate": { - "description": "Defines a maximum number of HTTP requests per second (RPS). For\nusage guidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "int32", - "type": "integer" - }, - "maxRatePerEndpoint": { - "description": "Defines a maximum target for requests per second (RPS). For usage\nguidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "float", - "type": "number" - }, - "maxRatePerInstance": { - "description": "Defines a maximum target for requests per second (RPS). For usage\nguidelines, seeRate\nbalancing mode and Utilization\nbalancing mode.\n\nNot available if the backend's balancingMode isCONNECTION.", - "format": "float", - "type": "number" - }, - "maxUtilization": { - "description": "Optional parameter to define a target capacity for theUTILIZATION balancing mode. The valid range is[0.0, 1.0].\n\nFor usage guidelines, seeUtilization\nbalancing mode.", - "format": "float", - "type": "number" - }, - "preference": { - "description": "This field indicates whether this backend should be fully utilized before\nsending traffic to backends with default preference. The possible values\nare:\n \n - PREFERRED: Backends with this preference level will be\n filled up to their capacity limits first, based on RTT.\n - DEFAULT: If preferred backends don't have enough\n capacity, backends in this layer would be used and traffic would be\n assigned based on the load balancing algorithm you use. This is the\n default", - "enum": [ - "DEFAULT", - "PREFERENCE_UNSPECIFIED", - "PREFERRED" - ], - "enumDescriptions": [ - "No preference.", - "If preference is unspecified, we set it to the DEFAULT value", - "Traffic will be sent to this backend first." - ], - "type": "string" - }, - "trafficDuration": { - "enum": [ - "LONG", - "SHORT", - "TRAFFIC_DURATION_UNSPECIFIED" - ], - "enumDescriptions": [ - "Most of the requests are expected to take more than multiple seconds to\nfinish.", - "Most requests are expected to finish with a sub-second latency.", - "Traffic duration is unspecified." - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendBucket": { - "description": "Represents a Cloud Storage Bucket resource.\n\nThis Cloud Storage bucket resource is referenced by a URL map of a load\nbalancer. For more information, readBackend Buckets.", - "id": "BackendBucket", - "properties": { - "bucketName": { - "description": "Cloud Storage bucket name.", - "type": "string" - }, - "cdnPolicy": { - "$ref": "BackendBucketCdnPolicy", - "description": "Cloud CDN configuration for this BackendBucket." - }, - "compressionMode": { - "description": "Compress text responses using Brotli or gzip compression, based on\nthe client's Accept-Encoding header.", - "enum": [ - "AUTOMATIC", - "DISABLED" - ], - "enumDescriptions": [ - "Automatically uses the best compression based on the Accept-Encoding\nheader sent by the client.", - "Disables compression. Existing compressed responses cached by\nCloud CDN will not be served to clients." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customResponseHeaders": { - "description": "Headers that the Application Load Balancer should add to proxied responses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client\nwhen the resource is created.", - "type": "string" - }, - "edgeSecurityPolicy": { - "description": "[Output Only] The resource URL for the edge security policy associated with\nthis backend bucket.", - "type": "string" - }, - "enableCdn": { - "description": "If true, enable Cloud CDN for this BackendBucket.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#backendBucket", - "description": "Type of the resource.", - "type": "string" - }, - "loadBalancingScheme": { - "description": "The value can only be INTERNAL_MANAGED for cross-region internal layer 7\nload balancer.\n\nIf loadBalancingScheme is not specified, the backend bucket can be used by\nclassic global external load balancers, or global application external load\nbalancers, or both.", - "enum": [ - "EXTERNAL_MANAGED", - "INTERNAL_MANAGED" - ], - "enumDescriptions": [ - "Signifies that this will be used for regional external Application Load\nBalancers.", - "Signifies that this will be used for internal Application Load Balancers." - ], - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "BackendBucketParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the regional backend bucket\nresides. This field is not applicable to global backend buckets.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "usedBy": { - "description": "[Output Only] List of resources referencing that backend bucket.", - "items": { - "$ref": "BackendBucketUsedBy" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketAggregatedList": { - "id": "BackendBucketAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "BackendBucketsScopedList", - "description": "Name of the scope containing this set of BackendBuckets." - }, - "description": "A list of BackendBucketsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#backendBucketAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicy": { - "description": "Message containing Cloud CDN configuration for a backend bucket.", - "id": "BackendBucketCdnPolicy", - "properties": { - "bypassCacheOnRequestHeaders": { - "description": "Bypass the cache when the specified request headers are matched - e.g.\nPragma or Authorization headers. Up to 5 headers can be specified.\nThe cache is bypassed for all cdnPolicy.cacheMode settings.", - "items": { - "$ref": "BackendBucketCdnPolicyBypassCacheOnRequestHeader" - }, - "type": "array" - }, - "cacheKeyPolicy": { - "$ref": "BackendBucketCdnPolicyCacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - }, - "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend.\nThe possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching\nheaders to cache content. Responses without these headers will not be\ncached at Google's edge, and will require a full trip to the origin on\nevery request, potentially impacting performance and increasing load on\nthe origin server.FORCE_CACHE_ALL Cache all content, ignoring any \"private\",\n\"no-store\" or \"no-cache\" directives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content,\nincluding common image formats, media (video and audio), and web assets\n(JavaScript and CSS). Requests and responses that are marked as\nuncacheable, as well as dynamic content (including HTML), will not be\ncached.\n\nIf no value is provided for cdnPolicy.cacheMode, it defaults\nto CACHE_ALL_STATIC.", - "enum": [ - "CACHE_ALL_STATIC", - "FORCE_CACHE_ALL", - "INVALID_CACHE_MODE", - "USE_ORIGIN_HEADERS" - ], - "enumDescriptions": [ - "Automatically cache static content, including common image formats,\nmedia (video and audio), and web assets (JavaScript and CSS).\nRequests and responses that are marked as uncacheable, as well as\ndynamic content (including HTML), will not be cached.", - "Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\"\ndirectives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.", - "", - "Requires the origin to set valid caching headers to cache content.\nResponses without these headers will not be cached at Google's edge,\nand will require a full trip to the origin on every request,\npotentially impacting performance and increasing load on the\norigin server." - ], - "type": "string" - }, - "clientTtl": { - "description": "Specifies a separate client (e.g. browser client) maximum TTL. This is\nused to clamp the max-age (or Expires) value sent to the client. With\nFORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the\nresponse max-age directive, along with a \"public\" directive. For\ncacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age\nfrom the origin (if specified), or else sets the response max-age\ndirective to the lesser of the client_ttl and default_ttl, and also\nensures a \"public\" cache-control directive is present.\nIf a client TTL is not specified, a default value (1 hour) will be used.\nThe maximum allowed value is 31,622,400s (1 year).", - "format": "int32", - "type": "integer" - }, - "defaultTtl": { - "description": "Specifies the default TTL for cached content served by this origin for\nresponses that do not have an existing valid TTL (max-age or s-maxage).\nSetting a TTL of \"0\" means \"always revalidate\".\nThe value of defaultTTL cannot be set to a value greater than that of\nmaxTTL, but can be equal.\nWhen the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL\nwill overwrite the TTL set in all responses. The maximum allowed value is\n31,622,400s (1 year), noting that infrequently accessed objects may be\nevicted from the cache before the defined TTL.", - "format": "int32", - "type": "integer" - }, - "maxTtl": { - "description": "Specifies the maximum allowed TTL for cached content served by this\norigin.\nCache directives that attempt to set a max-age or s-maxage higher than\nthis, or an Expires header more than maxTTL seconds in the future will\nbe capped at the value of maxTTL, as if it were the value of an\ns-maxage Cache-Control directive.\nHeaders sent to the client will not be modified.\nSetting a TTL of \"0\" means \"always revalidate\".\nThe maximum allowed value is 31,622,400s (1 year), noting that\ninfrequently accessed objects may be evicted from the cache before\nthe defined TTL.", - "format": "int32", - "type": "integer" - }, - "negativeCaching": { - "description": "Negative caching allows per-status code TTLs to be set, in order\nto apply fine-grained caching for common errors or redirects.\nThis can reduce the load on your origin and improve end-user\nexperience by reducing response latency.\nWhen the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS,\nnegative caching applies to responses with the specified response code\nthat lack any Cache-Control, Expires, or Pragma: no-cache directives.\nWhen the cache mode is set to FORCE_CACHE_ALL, negative caching applies\nto all responses with the specified response code, and override any\ncaching headers.\nBy default, Cloud CDN will apply the following default TTLs to these\nstatus codes:\nHTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m\nHTTP 404 (Not Found), 410 (Gone),\n451 (Unavailable For Legal Reasons): 120s\nHTTP 405 (Method Not Found), 501 (Not Implemented): 60s.\nThese defaults can be overridden in negative_caching_policy.", - "type": "boolean" - }, - "negativeCachingPolicy": { - "description": "Sets a cache TTL for the specified HTTP status code.\nnegative_caching must be enabled to configure negative_caching_policy.\nOmitting the policy and leaving negative_caching enabled will use\nCloud CDN's default cache TTLs.\nNote that when specifying an explicit negative_caching_policy, you\nshould take care to specify a cache TTL for all response codes\nthat you wish to cache. Cloud CDN will not apply any default\nnegative caching when a policy exists.", - "items": { - "$ref": "BackendBucketCdnPolicyNegativeCachingPolicy" - }, - "type": "array" - }, - "requestCoalescing": { - "description": "If true then Cloud CDN will combine multiple concurrent cache fill\nrequests into a small number of requests to the origin.", - "type": "boolean" - }, - "serveWhileStale": { - "description": "Serve existing content from the cache (if available) when revalidating\ncontent with the origin, or when an error is encountered when refreshing\nthe cache.\nThis setting defines the default \"max-stale\" duration for any cached\nresponses that do not specify a max-stale directive. Stale responses that\nexceed the TTL configured here will not be served. The default limit\n(max-stale) is 86400s (1 day), which will allow stale content to be\nserved up to this limit beyond the max-age (or s-maxage) of a cached\nresponse.\nThe maximum allowed value is 604800 (1 week).\nSet this to zero (0) to disable serve-while-stale.", - "format": "int32", - "type": "integer" - }, - "signedUrlCacheMaxAgeSec": { - "description": "Maximum number of seconds the response to a signed URL request will be\nconsidered fresh. After this time period, the response will be\nrevalidated before being served. Defaults to 1hr (3600s). When serving\nresponses to signed URL requests, Cloud CDN will internally behave as\nthough all responses from this backend had a \"Cache-Control:\npublic, max-age=[TTL]\" header, regardless of any existing\nCache-Control header. The actual headers served in responses will not be\naltered.", - "format": "int64", - "type": "string" - }, - "signedUrlKeyNames": { - "description": "[Output Only] Names of the keys for signing request URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyBypassCacheOnRequestHeader": { - "description": "Bypass the cache when the specified request headers are present,\ne.g. Pragma or Authorization headers. Values are case insensitive.\nThe presence of such a header overrides the cache_mode setting.", - "id": "BackendBucketCdnPolicyBypassCacheOnRequestHeader", - "properties": { - "headerName": { - "description": "The header field name to match on when bypassing cache.\nValues are case-insensitive.", - "type": "string" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyCacheKeyPolicy": { - "description": "Message containing what to include in the cache key for a request for\nCloud CDN.", - "id": "BackendBucketCdnPolicyCacheKeyPolicy", - "properties": { - "includeHttpHeaders": { - "description": "Allows HTTP request headers (by name) to be used in the cache key.", - "items": { - "type": "string" - }, - "type": "array" - }, - "queryStringWhitelist": { - "description": "Names of query string parameters to include in cache keys. Default\nparameters are always included. '\u0026' and '=' will be percent encoded\nand not treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendBucketCdnPolicyNegativeCachingPolicy": { - "description": "Specify CDN TTLs for response error codes.", - "id": "BackendBucketCdnPolicyNegativeCachingPolicy", - "properties": { - "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes\n300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be\nspecified as values, and you cannot specify a status code more than\nonce.", - "format": "int32", - "type": "integer" - }, - "ttl": { - "description": "The TTL (in seconds) for which to cache responses with the\ncorresponding status code.\nThe maximum allowed value is 1800s (30 minutes), noting that\ninfrequently accessed objects may be evicted from the cache before the\ndefined TTL.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BackendBucketList": { - "description": "Contains a list of BackendBucket resources.", - "id": "BackendBucketList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendBucketList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketListUsable": { - "id": "BackendBucketListUsable", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableBackendBucketList", - "description": "[Output Only] Type of resource. Alwayscompute#usableBackendBucketList for lists of usable backend\nbuckets.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketParams": { - "description": "Additional Backend Bucket parameters.", - "id": "BackendBucketParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "BackendBucketUsedBy": { - "id": "BackendBucketUsedBy", - "properties": { - "reference": { - "description": "[Output Only] Server-defined URL for UrlMaps referencing that\nBackendBucket.", - "type": "string" - } - }, - "type": "object" - }, - "BackendBucketsScopedList": { - "id": "BackendBucketsScopedList", - "properties": { - "backendBuckets": { - "description": "A list of BackendBuckets contained in this scope.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendCustomMetric": { - "description": "Custom Metrics are used for CUSTOM_METRICS balancing_mode.", - "id": "BackendCustomMetric", - "properties": { - "dryRun": { - "description": "If true, the metric data is collected and reported to Cloud\nMonitoring, but is not used for load balancing.", - "type": "boolean" - }, - "maxUtilization": { - "description": "Optional parameter to define a target utilization for the Custom Metrics\nbalancing mode. The valid range is [0.0, 1.0].", - "format": "float", - "type": "number" - }, - "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters\nlong and match the regular expression\n`[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the\nfirst character must be a lowercase letter, and all following\ncharacters must be a dash, period, underscore, lowercase letter, or\ndigit, except the last character, which cannot be a dash, period, or\nunderscore. For usage guidelines, see Custom Metrics balancing mode. This\nfield can only be used for a global or regional backend service with the\nloadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "BackendService": { - "description": "Represents a Backend Service resource.\n\nA backend service defines how Google Cloud load balancers distribute traffic.\nThe backend service configuration contains a set of values, such as the\nprotocol used to connect to backends, various distribution and session\nsettings, health checks, and timeouts. These settings provide fine-grained\ncontrol over how your load balancer behaves. Most of the settings have\ndefault values that allow for easy configuration if you need to get started\nquickly.\n\nBackend services in Google Compute Engine can be either regionally or\nglobally scoped.\n\n* [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices)\n* [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices)\n\nFor more information, seeBackend\nServices.", - "id": "BackendService", - "properties": { - "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds. This setting is applicable to Application\nLoad Balancers and Traffic Director and requires\nGENERATED_COOKIE or HTTP_COOKIE session affinity.\n\nIf set to 0, the cookie is non-persistent and lasts only until\nthe end of the browser session (or equivalent). The maximum allowed value\nis two weeks (1,209,600).\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "backends": { - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - }, - "type": "array" - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService. Only available for\nspecified load balancer types." - }, - "circuitBreakers": { - "$ref": "CircuitBreakers" - }, - "compressionMode": { - "description": "Compress text responses using Brotli or gzip compression, based on\nthe client's Accept-Encoding header.", - "enum": [ - "AUTOMATIC", - "DISABLED" - ], - "enumDescriptions": [ - "Automatically uses the best compression based on the Accept-Encoding\nheader sent by the client.", - "Disables compression. Existing compressed responses cached by\nCloud CDN will not be served to clients." - ], - "type": "string" - }, - "connectionDraining": { - "$ref": "ConnectionDraining", - "description": "connectionDraining cannot be specified with haPolicy." - }, - "connectionTrackingPolicy": { - "$ref": "BackendServiceConnectionTrackingPolicy", - "description": "Connection Tracking configuration for this BackendService. Connection\ntracking policy settings are only available for external passthrough\nNetwork Load Balancers and internal passthrough Network Load Balancers.\n\nconnectionTrackingPolicy cannot be specified with haPolicy." - }, - "consistentHash": { - "$ref": "ConsistentHashLoadBalancerSettings", - "description": "Consistent Hash-based load balancing can be used to provide soft session\naffinity based on HTTP headers, cookies or other properties. This load\nbalancing policy is applicable only for HTTP connections. The affinity to a\nparticular destination host will be lost when one or more hosts are\nadded/removed from the destination service. This field specifies parameters\nthat control consistent hashing. This field is only applicable whenlocalityLbPolicy is set to MAGLEV orRING_HASH.\n\nThis field is applicable to either:\n \n - A regional backend service with the service_protocol set to HTTP,\n HTTPS, HTTP2 or H2C, and load_balancing_scheme set to\n INTERNAL_MANAGED. \n - A global backend service with the\n load_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customMetrics": { - "description": "List of custom metrics that are used for theWEIGHTED_ROUND_ROBIN locality_lb_policy.", - "items": { - "$ref": "BackendServiceCustomMetric" - }, - "type": "array" - }, - "customRequestHeaders": { - "description": "Headers that the load balancer adds to proxied requests. See [Creating\ncustom\nheaders](https://cloud.google.com/load-balancing/docs/custom-headers).", - "items": { - "type": "string" - }, - "type": "array" - }, - "customResponseHeaders": { - "description": "Headers that the load balancer adds to proxied responses. See [Creating\ncustom\nheaders](https://cloud.google.com/load-balancing/docs/custom-headers).", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "dynamicForwarding": { - "$ref": "BackendServiceDynamicForwarding", - "description": "Dynamic forwarding configuration. This field is used to configure the\nbackend service with dynamic forwarding feature which together with Service\nExtension allows customized and complex routing logic." - }, - "edgeSecurityPolicy": { - "description": "[Output Only] The resource URL for the edge security policy associated with\nthis backend service.", - "type": "string" - }, - "enableCDN": { - "description": "If true, enables Cloud CDN for the backend service of a\nglobal external Application Load Balancer.", - "type": "boolean" - }, - "externalManagedMigrationState": { - "description": "Specifies the canary migration state. Possible values are PREPARE,\nTEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC.\n\nTo begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be\nchanged to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before\nthe loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate traffic by percentage using\nexternalManagedMigrationTestingPercentage.\n\nRolling back a migration requires the states to be set in reverse order. So\nchanging the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to\nbe set to TEST_ALL_TRAFFIC at the same time. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate some traffic back to\nEXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", - "enum": [ - "PREPARE", - "TEST_ALL_TRAFFIC", - "TEST_BY_PERCENTAGE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "externalManagedMigrationTestingPercentage": { - "description": "Determines the fraction of requests that should be processed by the Global\nexternal Application Load Balancer.\n\nThe value of this field must be in the range [0, 100].\n\nSession affinity options will slightly affect this routing behavior, for\nmore details, see:Session\nAffinity.\n\nThis value can only be set if the loadBalancingScheme in the BackendService\nis set to EXTERNAL (when using the classic Application Load Balancer) and\nthe migration state is TEST_BY_PERCENTAGE.", - "format": "float", - "type": "number" - }, - "failoverPolicy": { - "$ref": "BackendServiceFailoverPolicy", - "description": "Requires at least one backend instance group to be defined\nas a backup (failover) backend.\nFor load balancers that have configurable failover:\n[Internal passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\n\nfailoverPolicy cannot be specified with haPolicy." - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a BackendService. An up-to-date fingerprint must be provided in\norder to update the BackendService, otherwise the request will\nfail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a BackendService.", - "format": "byte", - "type": "string" - }, - "haPolicy": { - "$ref": "BackendServiceHAPolicy", - "description": "Configures self-managed High Availability (HA) for External and Internal\nProtocol Forwarding.\n\nThe backends of this regional backend service must only specify zonal\nnetwork endpoint groups (NEGs) of type GCE_VM_IP.\n\nWhen haPolicy is set for an Internal Passthrough Network Load Balancer, the\nregional backend service must set the network field. All zonal NEGs must\nbelong to the same network. However, individual NEGs can\nbelong to different subnetworks of that network.\n\nWhen haPolicy is specified, the set of attached network endpoints across\nall backends comprise an High Availability domain from which one endpoint\nis selected as the active endpoint (the leader) that receives all\ntraffic.\n\nhaPolicy can be added only at backend service creation time. Once set up,\nit cannot be deleted.\n\nNote that haPolicy is not for load balancing, and therefore cannot be\nspecified with sessionAffinity, connectionTrackingPolicy, and\nfailoverPolicy.\n\nhaPolicy requires customers to be responsible for tracking backend\nendpoint health and electing a leader among the healthy endpoints.\nTherefore, haPolicy cannot be specified with healthChecks.\n\nhaPolicy can only be specified for External Passthrough Network Load\nBalancers and Internal Passthrough Network Load Balancers." - }, - "healthChecks": { - "description": "The list of URLs to the healthChecks, httpHealthChecks (legacy), or\nhttpsHealthChecks (legacy) resource for health checking this backend\nservice. Not all backend services support legacy health checks. See\nLoad balancer guide. Currently, at most one health check can be\nspecified for each backend service. Backend services with\ninstance group or zonal NEG backends must have a health check unless\nhaPolicy is specified. Backend services with internet or serverless NEG\nbackends must not have a health check.\n\nhealthChecks[] cannot be specified with haPolicy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "iap": { - "$ref": "BackendServiceIAP", - "description": "The configurations for Identity-Aware Proxy on this resource.\nNot available for internal passthrough Network Load Balancers and external\npassthrough Network Load Balancers." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipAddressSelectionPolicy": { - "description": "Specifies a preference for traffic sent from the proxy to the backend (or\nfrom the client to the backend for proxyless gRPC).\nThe possible values are:\n \n - IPV4_ONLY: Only send IPv4 traffic to the backends of the\n backend service (Instance Group, Managed Instance Group, Network Endpoint\n Group), regardless of traffic from the client to the proxy. Only IPv4\n health checks are used to check the health of the backends. This is the\n default setting.\n - PREFER_IPV6: Prioritize the connection to the endpoint's\n IPv6 address over its IPv4 address (provided there is a healthy IPv6\n address).\n - IPV6_ONLY: Only send IPv6 traffic to the backends of the\n backend service (Instance Group, Managed Instance Group, Network Endpoint\n Group), regardless of traffic from the client to the proxy. Only IPv6\n health checks are used to check the health of the backends.\n\n\n\nThis field is applicable to either:\n \n - Advanced global external Application Load Balancer (load balancing\n scheme EXTERNAL_MANAGED), \n - Regional external Application Load\n Balancer, \n - Internal proxy Network Load Balancer (load balancing\n scheme INTERNAL_MANAGED), \n - Regional internal Application Load\n Balancer (load balancing scheme INTERNAL_MANAGED), \n - Traffic\n Director with Envoy proxies and proxyless gRPC (load balancing scheme\n INTERNAL_SELF_MANAGED).", - "enum": [ - "IPV4_ONLY", - "IPV6_ONLY", - "IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED", - "PREFER_IPV6" - ], - "enumDescriptions": [ - "Only send IPv4 traffic to the backends of the Backend Service\n(Instance Group, Managed Instance Group, Network Endpoint Group)\nregardless of traffic from the client to the proxy.\nOnly IPv4 health-checks are used to check the health of the backends.\nThis is the default setting.", - "Only send IPv6 traffic to the backends of the Backend Service\n(Instance Group, Managed Instance Group, Network Endpoint Group)\nregardless of traffic from the client to the proxy. Only IPv6\nhealth-checks are used to check the health of the backends.", - "Unspecified IP address selection policy.", - "Prioritize the connection to the endpoints IPv6 address\nover its IPv4 address (provided there is a healthy IPv6 address)." - ], - "type": "string" - }, - "kind": { - "default": "compute#backendService", - "description": "[Output Only] Type of resource. Always compute#backendService\nfor backend services.", - "type": "string" - }, - "loadBalancingScheme": { - "description": "Specifies the load balancer type. A backend service\ncreated for one type of load balancer cannot be used with another.\nFor more information, refer toChoosing\na load balancer.", - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "INTERNAL", - "INTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "Signifies that this will be used for classic Application Load Balancers,\nglobal external proxy Network Load Balancers,\nor external passthrough Network Load Balancers.", - "Signifies that this will be used for global external Application Load\nBalancers, regional external Application Load Balancers, or regional\nexternal proxy Network Load Balancers.", - "Signifies that this will be used for internal passthrough Network Load\nBalancers.", - "Signifies that this will be used for internal Application Load Balancers.", - "Signifies that this will be used by Traffic Director.", - "" - ], - "type": "string" - }, - "localityLbPolicies": { - "description": "A list of locality load-balancing policies to be used in order of\npreference. When you use localityLbPolicies, you must set at least one\nvalue for either the localityLbPolicies[].policy or the\nlocalityLbPolicies[].customPolicy field. localityLbPolicies overrides any\nvalue set in the localityLbPolicy field.\n\nFor an example of how to use this field, seeDefine\na list of preferred policies.\n\nCaution: This field and its children are intended for use in a service mesh\nthat includes gRPC clients only. Envoy proxies can't use backend services\nthat have this configuration.", - "items": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfig" - }, - "type": "array" - }, - "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The\npossible values are:\n \n - ROUND_ROBIN: This is a simple policy in which each healthy\n backend is selected in round robin order. This is the default.\n - LEAST_REQUEST: An O(1) algorithm which\n selects two random healthy hosts and picks the host which has fewer active\n requests.\n - RING_HASH: The ring/modulo hash load balancer implements\n consistent hashing to backends. The algorithm has the property that the\n addition/removal of a host from a set of N hosts only affects 1/N of the\n requests.\n - RANDOM: The load balancer selects a random healthy\n host.\n - ORIGINAL_DESTINATION: Backend host is selected\n based on the client connection metadata, i.e., connections are opened to\n the same address as the destination address of the incoming connection\n before the connection was redirected to the load balancer.\n - MAGLEV: used as a drop in replacement for the ring hash\n load balancer. Maglev is not as stable as ring hash but has faster table\n lookup build times and host selection times. For more information about\n Maglev, see Maglev:\n A Fast and Reliable Software Network Load Balancer.\n - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin\n Load Balancing using weights computed from Backend reported Custom Metrics.\n If set, the Backend Service responses are expected to contain non-standard\n HTTP response header field Endpoint-Load-Metrics. The reported\n metrics to use for computing the weights are specified via thecustomMetrics field.\n \n This field is applicable to either:\n - A regional backend service with the service_protocol set to HTTP,\n HTTPS, HTTP2 or H2C, and load_balancing_scheme set to\n INTERNAL_MANAGED. \n - A global backend service with the\n load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or\n EXTERNAL_MANAGED.\n \n \n If sessionAffinity is not configured—that is, if session\n affinity remains at the default value of NONE—then the\n default value for localityLbPolicy\n is ROUND_ROBIN. If session affinity is set to a value other\n than NONE,\n then the default value for localityLbPolicy isMAGLEV.\n \n Only ROUND_ROBIN and RING_HASH are supported\n when the backend service is referenced by a URL map that is bound to\n target gRPC proxy that has validateForProxyless field set to true.\n \n localityLbPolicy cannot be specified with haPolicy.", - "enum": [ - "INVALID_LB_POLICY", - "LEAST_REQUEST", - "MAGLEV", - "ORIGINAL_DESTINATION", - "RANDOM", - "RING_HASH", - "ROUND_ROBIN", - "WEIGHTED_GCP_RENDEZVOUS", - "WEIGHTED_MAGLEV", - "WEIGHTED_ROUND_ROBIN" - ], - "enumDescriptions": [ - "", - "An O(1) algorithm which selects two random healthy hosts and\npicks the host which has fewer active requests.", - "This algorithm implements consistent hashing to backends. Maglev can be\nused as a drop in replacement for the ring hash load balancer. Maglev is\nnot as stable as ring hash but has faster table lookup build times and\nhost selection times. For more information about Maglev, seeMaglev:\nA Fast and Reliable Software Network Load Balancer.", - "Backend host is selected based on the client connection metadata, i.e.,\nconnections are opened to the same address as the destination address of\nthe incoming connection before the connection was redirected to the load\nbalancer.", - "The load balancer selects a random healthy host.", - "The ring/modulo hash load balancer implements consistent hashing to\nbackends. The algorithm has the property that the addition/removal\nof a host from a set of N hosts only affects 1/N of the requests.", - "This is a simple policy in which each healthy backend is selected\nin round robin order. This is the default.", - "Per-instance weighted Load Balancing via health check reported weights.\nIn internal passthrough network load balancing, it is weighted\nrendezvous hashing.\nThis option is only supported in internal passthrough network load\nbalancing.", - "Per-instance weighted Load Balancing via health check reported weights.\nIf set, the Backend Service must configure a non legacy HTTP-based Health\nCheck, and health check replies are expected to contain non-standard HTTP\nresponse header field X-Load-Balancing-Endpoint-Weight to specify the\nper-instance weights.\nIf set, Load Balancing is weighted based on the\nper-instance weights reported in the last processed health check replies,\nas long as every instance either reported a valid weight or had\nUNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight.\nThis option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed\nfrom Backend reported Custom Metrics. If set, the Backend Service\nresponses are expected to contain non-standard HTTP response header field\nEndpoint-Load-Metrics. The reported metrics\nto use for computing the weights are specified via the\ncustomMetrics fields." - ], - "type": "string" - }, - "logConfig": { - "$ref": "BackendServiceLogConfig", - "description": "This field denotes the logging options for the load balancer traffic served\nby this backend service. If logging is enabled, logs will be exported to\nStackdriver." - }, - "maxStreamDuration": { - "$ref": "Duration", - "description": "Specifies the default maximum duration (timeout) for streams to this\nservice. Duration is computed from the beginning of the stream until the\nresponse has been completely processed, including all retries. A stream\nthat does not complete in this duration is closed.\n\nIf not specified, there will be no timeout limit, i.e. the maximum\nduration is infinite.\n\nThis value can be overridden in the PathMatcher configuration of the\nUrlMap that references this backend service.\n\nThis field is only allowed when the loadBalancingScheme of\nthe backend service is INTERNAL_SELF_MANAGED." - }, - "metadatas": { - "additionalProperties": { - "type": "string" - }, - "description": "Deployment metadata associated with the resource to be set by a GKE hub\ncontroller and read by the backend RCTH", - "type": "object" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network to which this backend service belongs.\n\nThis field must be set for Internal Passthrough Network Load Balancers when\nthe haPolicy is enabled, and for External Passthrough Network Load\nBalancers when the haPolicy fastIpMove is enabled.\n\nThis field can only be specified when the load balancing scheme is set toINTERNAL, or when the load balancing scheme is set toEXTERNAL and haPolicy fastIpMove is enabled.", - "type": "string" - }, - "networkPassThroughLbTrafficPolicy": { - "$ref": "BackendServiceNetworkPassThroughLbTrafficPolicy", - "description": "Configures traffic steering properties of internal passthrough Network\nLoad Balancers.\n\nnetworkPassThroughLbTrafficPolicy cannot be specified with haPolicy." - }, - "outlierDetection": { - "$ref": "OutlierDetection", - "description": "Settings controlling the ejection of unhealthy backend endpoints from the\nload balancing pool of each individual proxy instance that processes the\ntraffic for the given backend service. If not set, this feature is\nconsidered disabled.\n\nResults of the outlier detection algorithm (ejection of endpoints from the\nload balancing pool and returning them back to the pool) are executed\nindependently by each proxy instance of the load balancer. In most cases,\nmore than one proxy instance handles the traffic received by a backend\nservice. Thus, it is possible that an unhealthy endpoint is detected and\nejected by only some of the proxies, and while this happens, other proxies\nmay continue to send requests to the same unhealthy endpoint until they\ndetect and eject the unhealthy endpoint.\n\nApplicable backend endpoints can be:\n \n - VM instances in an Instance Group\n - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT)\n - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT)\n - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud\n Functions Services \n - Private Service Connect NEGs, that resolve to\n Google-managed regional API endpoints or managed services published using\n Private Service Connect\n\n\n\nApplicable backend service types can be:\n \n - A global backend service with the loadBalancingScheme set to\n INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. \n - A regional backend\n service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and\n loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not\n supported for Serverless NEGs.\n\n\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true." - }, - "params": { - "$ref": "BackendServiceParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "port": { - "deprecated": true, - "description": "Deprecated in favor of portName. The TCP port to connect on\nthe backend. The default value is 80.\nFor internal passthrough Network Load Balancers and external passthrough\nNetwork Load Balancers, omit port.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "A named port on a backend instance group representing the port for\ncommunication to the backend VMs in that group. The\nnamed port must be [defined on each backend instance\ngroup](https://cloud.google.com/load-balancing/docs/backend-service#named_ports).\nThis parameter has no meaning if the backends are NEGs. For internal\npassthrough Network Load Balancers and external passthrough Network Load\nBalancers, omit port_name.", - "type": "string" - }, - "protocol": { - "description": "The protocol this BackendService uses to communicate\nwith backends.\n\nPossible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or GRPC.\ndepending on the chosen load balancer or Traffic Director configuration.\nRefer to the documentation for the load balancers or for Traffic Director\nfor more information.\n\nMust be set to GRPC when the backend service is referenced by a URL map\nthat is bound to target gRPC proxy.", - "enum": [ - "GRPC", - "H2C", - "HTTP", - "HTTP2", - "HTTPS", - "SSL", - "TCP", - "UDP", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "gRPC (available for Traffic Director).", - "HTTP2 over cleartext", - "", - "HTTP/2 with SSL.", - "", - "TCP proxying with SSL.", - "TCP proxying or TCP pass-through.", - "UDP.", - "If a Backend Service has UNSPECIFIED as its protocol, it can be used with\nany L3/L4 Forwarding Rules." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional backend service\nresides. This field is not applicable to global backend services.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\nbackend service.", - "type": "string" - }, - "securitySettings": { - "$ref": "SecuritySettings", - "description": "This field specifies the security settings that apply to this backend\nservice. This field is applicable to a global backend service with the\nload_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "serviceBindings": { - "description": "URLs of networkservices.ServiceBinding resources.\n\nCan only be set if load balancing scheme is INTERNAL_SELF_MANAGED.\nIf set, lists of backends and health checks must be both empty.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceLbPolicy": { - "description": "URL to networkservices.ServiceLbPolicy resource.\n\nCan only be set if load balancing scheme is EXTERNAL_MANAGED,\nINTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.", - "type": "string" - }, - "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nOnly NONE and HEADER_FIELD are supported\nwhen the backend service is referenced by a URL map that is bound to\ntarget gRPC proxy that has validateForProxyless field set to true.\n\nFor more details, see:\n[Session\nAffinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).\n\nsessionAffinity cannot be specified with haPolicy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_NO_DESTINATION", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "HEADER_FIELD", - "HTTP_COOKIE", - "NONE", - "STRONG_COOKIE_AFFINITY" - ], - "enumDescriptions": [ - "2-tuple hash on packet's source and destination IP addresses. Connections\nfrom the same source IP address to the same destination IP address will be\nserved by the same backend VM while that VM remains healthy.", - "1-tuple hash only on packet's source IP address. Connections from the\nsame source IP address will be served by the same backend VM while that VM\nremains healthy. This option can only be used for Internal TCP/UDP\nLoad Balancing.", - "5-tuple hash on packet's source and destination IP addresses, IP protocol,\nand source and destination ports. Connections for the same IP protocol\nfrom the same source IP address and port to the same destination IP address\nand port will be served by the same backend VM while that VM remains\nhealthy. This option cannot be used for HTTP(S) load balancing.", - "3-tuple hash on packet's source and destination IP addresses, and IP\nprotocol. Connections for the same IP protocol from the same source IP\naddress to the same destination IP address will be served by the same\nbackend VM while that VM remains healthy. This option cannot be used for\nHTTP(S) load balancing.", - "Hash based on a cookie generated by the L7 loadbalancer.\nOnly valid for HTTP(S) load balancing.", - "The hash is based on a user specified header field.", - "The hash is based on a user provided cookie.", - "No session affinity. Connections from the same client IP may go\nto any instance in the pool.", - "Strong cookie-based affinity. Connections bearing the same cookie will be\nserved by the same backend VM while that VM remains healthy, as long as the\ncookie has not expired." - ], - "type": "string" - }, - "strongSessionAffinityCookie": { - "$ref": "BackendServiceHttpCookie", - "description": "Describes the HTTP cookie used for stateful session affinity. This field is\napplicable and required if the sessionAffinity is set toSTRONG_COOKIE_AFFINITY." - }, - "subsetting": { - "$ref": "Subsetting", - "description": "subsetting cannot be specified with haPolicy." - }, - "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the\ntype of load balancer. For more information see,\nBackend service settings.\nThe default is 30 seconds.\nThe full range of timeout values allowed goes from 1\nthrough 2,147,483,647 seconds.\n\nThis value can be overridden in the PathMatcher configuration of the\nUrlMap that references this backend service.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.\nInstead, use maxStreamDuration.", - "format": "int32", - "type": "integer" - }, - "tlsSettings": { - "$ref": "BackendServiceTlsSettings", - "description": "Configuration for Backend Authenticated TLS and mTLS. May only be specified\nwhen the backend protocol is SSL, HTTPS or HTTP2." - }, - "usedBy": { - "description": "[Output Only] List of resources referencing given backend service.", - "items": { - "$ref": "BackendServiceUsedBy" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServiceAggregatedList": { - "description": "Contains a list of BackendServicesScopedList.", - "id": "BackendServiceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." - }, - "description": "A list of BackendServicesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#backendServiceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicy": { - "description": "Message containing Cloud CDN configuration for a backend service.", - "id": "BackendServiceCdnPolicy", - "properties": { - "bypassCacheOnRequestHeaders": { - "description": "Bypass the cache when the specified request headers are matched - e.g.\nPragma or Authorization headers. Up to 5 headers can be specified.\nThe cache is bypassed for all cdnPolicy.cacheMode settings.", - "items": { - "$ref": "BackendServiceCdnPolicyBypassCacheOnRequestHeader" - }, - "type": "array" - }, - "cacheKeyPolicy": { - "$ref": "CacheKeyPolicy", - "description": "The CacheKeyPolicy for this CdnPolicy." - }, - "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend.\nThe possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid caching\nheaders to cache content. Responses without these headers will not be\ncached at Google's edge, and will require a full trip to the origin on\nevery request, potentially impacting performance and increasing load on\nthe origin server.FORCE_CACHE_ALL Cache all content, ignoring any \"private\",\n\"no-store\" or \"no-cache\" directives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache static content,\nincluding common image formats, media (video and audio), and web assets\n(JavaScript and CSS). Requests and responses that are marked as\nuncacheable, as well as dynamic content (including HTML), will not be\ncached.\n\nIf no value is provided for cdnPolicy.cacheMode, it defaults\nto CACHE_ALL_STATIC.", - "enum": [ - "CACHE_ALL_STATIC", - "FORCE_CACHE_ALL", - "INVALID_CACHE_MODE", - "USE_ORIGIN_HEADERS" - ], - "enumDescriptions": [ - "Automatically cache static content, including common image formats,\nmedia (video and audio), and web assets (JavaScript and CSS).\nRequests and responses that are marked as uncacheable, as well as\ndynamic content (including HTML), will not be cached.", - "Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\"\ndirectives in Cache-Control response headers.\nWarning: this may result in Cloud CDN caching private,\nper-user (user identifiable) content.", - "", - "Requires the origin to set valid caching headers to cache content.\nResponses without these headers will not be cached at Google's edge,\nand will require a full trip to the origin on every request,\npotentially impacting performance and increasing load on the\norigin server." - ], - "type": "string" - }, - "clientTtl": { - "description": "Specifies a separate client (e.g. browser client) maximum TTL. This is\nused to clamp the max-age (or Expires) value sent to the client. With\nFORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the\nresponse max-age directive, along with a \"public\" directive. For\ncacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age\nfrom the origin (if specified), or else sets the response max-age\ndirective to the lesser of the client_ttl and default_ttl, and also\nensures a \"public\" cache-control directive is present.\nIf a client TTL is not specified, a default value (1 hour) will be used.\nThe maximum allowed value is 31,622,400s (1 year).", - "format": "int32", - "type": "integer" - }, - "defaultTtl": { - "description": "Specifies the default TTL for cached content served by this origin for\nresponses that do not have an existing valid TTL (max-age or s-maxage).\nSetting a TTL of \"0\" means \"always revalidate\".\nThe value of defaultTTL cannot be set to a value greater than that of\nmaxTTL, but can be equal.\nWhen the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL\nwill overwrite the TTL set in all responses. The maximum allowed value is\n31,622,400s (1 year), noting that infrequently accessed objects may be\nevicted from the cache before the defined TTL.", - "format": "int32", - "type": "integer" - }, - "maxTtl": { - "description": "Specifies the maximum allowed TTL for cached content served by this\norigin.\nCache directives that attempt to set a max-age or s-maxage higher than\nthis, or an Expires header more than maxTTL seconds in the future will\nbe capped at the value of maxTTL, as if it were the value of an\ns-maxage Cache-Control directive.\nHeaders sent to the client will not be modified.\nSetting a TTL of \"0\" means \"always revalidate\".\nThe maximum allowed value is 31,622,400s (1 year), noting that\ninfrequently accessed objects may be evicted from the cache before\nthe defined TTL.", - "format": "int32", - "type": "integer" - }, - "negativeCaching": { - "description": "Negative caching allows per-status code TTLs to be set, in order\nto apply fine-grained caching for common errors or redirects.\nThis can reduce the load on your origin and improve end-user\nexperience by reducing response latency.\nWhen the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS,\nnegative caching applies to responses with the specified response code\nthat lack any Cache-Control, Expires, or Pragma: no-cache directives.\nWhen the cache mode is set to FORCE_CACHE_ALL, negative caching applies\nto all responses with the specified response code, and override any\ncaching headers.\nBy default, Cloud CDN will apply the following default TTLs to these\nstatus codes:\nHTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m\nHTTP 404 (Not Found), 410 (Gone),\n451 (Unavailable For Legal Reasons): 120s\nHTTP 405 (Method Not Found), 501 (Not Implemented): 60s.\nThese defaults can be overridden in negative_caching_policy.", - "type": "boolean" - }, - "negativeCachingPolicy": { - "description": "Sets a cache TTL for the specified HTTP status code.\nnegative_caching must be enabled to configure negative_caching_policy.\nOmitting the policy and leaving negative_caching enabled will use\nCloud CDN's default cache TTLs.\nNote that when specifying an explicit negative_caching_policy, you\nshould take care to specify a cache TTL for all response codes\nthat you wish to cache. Cloud CDN will not apply any default\nnegative caching when a policy exists.", - "items": { - "$ref": "BackendServiceCdnPolicyNegativeCachingPolicy" - }, - "type": "array" - }, - "requestCoalescing": { - "description": "If true then Cloud CDN will combine multiple concurrent cache fill\nrequests into a small number of requests to the origin.", - "type": "boolean" - }, - "serveWhileStale": { - "description": "Serve existing content from the cache (if available) when revalidating\ncontent with the origin, or when an error is encountered when refreshing\nthe cache.\nThis setting defines the default \"max-stale\" duration for any cached\nresponses that do not specify a max-stale directive. Stale responses that\nexceed the TTL configured here will not be served. The default limit\n(max-stale) is 86400s (1 day), which will allow stale content to be\nserved up to this limit beyond the max-age (or s-maxage) of a cached\nresponse.\nThe maximum allowed value is 604800 (1 week).\nSet this to zero (0) to disable serve-while-stale.", - "format": "int32", - "type": "integer" - }, - "signedUrlCacheMaxAgeSec": { - "description": "Maximum number of seconds the response to a signed URL request will be\nconsidered fresh. After this time period, the response will be\nrevalidated before being served. Defaults to 1hr (3600s). When serving\nresponses to signed URL requests, Cloud CDN will internally behave as\nthough all responses from this backend had a \"Cache-Control:\npublic, max-age=[TTL]\" header, regardless of any existing\nCache-Control header. The actual headers served in responses will not be\naltered.", - "format": "int64", - "type": "string" - }, - "signedUrlKeyNames": { - "description": "[Output Only] Names of the keys for signing request URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicyBypassCacheOnRequestHeader": { - "description": "Bypass the cache when the specified request headers are present,\ne.g. Pragma or Authorization headers. Values are case insensitive.\nThe presence of such a header overrides the cache_mode setting.", - "id": "BackendServiceCdnPolicyBypassCacheOnRequestHeader", - "properties": { - "headerName": { - "description": "The header field name to match on when bypassing cache.\nValues are case-insensitive.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceCdnPolicyNegativeCachingPolicy": { - "description": "Specify CDN TTLs for response error codes.", - "id": "BackendServiceCdnPolicyNegativeCachingPolicy", - "properties": { - "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes\n300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be\nspecified as values, and you cannot specify a status code more than\nonce.", - "format": "int32", - "type": "integer" - }, - "ttl": { - "description": "The TTL (in seconds) for which to cache responses with the\ncorresponding status code.\nThe maximum allowed value is 1800s (30 minutes), noting that\ninfrequently accessed objects may be evicted from the cache before the\ndefined TTL.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BackendServiceConnectionTrackingPolicy": { - "description": "Connection Tracking configuration for this BackendService.", - "id": "BackendServiceConnectionTrackingPolicy", - "properties": { - "connectionPersistenceOnUnhealthyBackends": { - "description": "Specifies connection persistence when backends are unhealthy. The default\nvalue is DEFAULT_FOR_PROTOCOL.\n\nIf set to DEFAULT_FOR_PROTOCOL, the existing connections\npersist on unhealthy backends only for connection-oriented protocols\n(TCP and SCTP) and only if the Tracking Mode isPER_CONNECTION (default tracking mode) or the Session\nAffinity is configured for 5-tuple. They do not persist forUDP.\n\nIf set to NEVER_PERSIST, after a backend becomes unhealthy,\nthe existing connections on the unhealthy backend are never persisted on\nthe unhealthy backend. They are always diverted to newly selected healthy\nbackends (unless all backends are unhealthy).\n\nIf set to ALWAYS_PERSIST, existing connections always\npersist on unhealthy backends regardless of protocol and session\naffinity. It is generally not recommended to use this mode overriding the\ndefault.\n\nFor more details, see [Connection Persistence for Network Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#connection-persistence)\nand [Connection Persistence for Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal#connection-persistence).", - "enum": [ - "ALWAYS_PERSIST", - "DEFAULT_FOR_PROTOCOL", - "NEVER_PERSIST" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "enableStrongAffinity": { - "description": "Enable Strong Session Affinity for external passthrough Network Load\nBalancers. This option is not available publicly.", - "type": "boolean" - }, - "idleTimeoutSec": { - "description": "Specifies how long to keep a Connection Tracking entry while there is no\nmatching traffic (in seconds).\n\nFor internal passthrough Network Load Balancers:\n \n - The minimum (default) is 10 minutes and the maximum is 16 hours.\n - It can be set only if Connection Tracking is less than 5-tuple\n (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or CLIENT_IP_PROTO, and Tracking\n Mode is PER_SESSION).\n\n\n\nFor external passthrough Network Load Balancers the default is 60\nseconds. This option is not available publicly.", - "format": "int32", - "type": "integer" - }, - "trackingMode": { - "description": "Specifies the key used for connection tracking. There are two\noptions:\n \n - PER_CONNECTION: This is the default mode. The Connection\n Tracking is performed as per the Connection Key (default Hash Method) for\n the specific protocol.\n - PER_SESSION: The Connection Tracking is performed as per\n the configured Session Affinity. It matches the configured Session\n Affinity.\n\n\n\nFor more details, see [Tracking Mode for Network Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#tracking-mode)\nand [Tracking Mode for Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal#tracking-mode).", - "enum": [ - "INVALID_TRACKING_MODE", - "PER_CONNECTION", - "PER_SESSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceCustomMetric": { - "description": "Custom Metrics are used for WEIGHTED_ROUND_ROBIN\nlocality_lb_policy.", - "id": "BackendServiceCustomMetric", - "properties": { - "dryRun": { - "description": "If true, the metric data is not used for load balancing.", - "type": "boolean" - }, - "name": { - "description": "Name of a custom utilization signal. The name must be 1-64 characters\nlong and match the regular expression\n`[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the\nfirst character must be a lowercase letter, and all following\ncharacters must be a dash, period, underscore, lowercase letter, or\ndigit, except the last character, which cannot be a dash, period, or\nunderscore. For usage guidelines, see Custom Metrics balancing mode. This\nfield can only be used for a global or regional backend service with the\nloadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceDynamicForwarding": { - "description": "Defines a dynamic forwarding configuration for the backend service.", - "id": "BackendServiceDynamicForwarding", - "properties": { - "ipPortSelection": { - "$ref": "BackendServiceDynamicForwardingIpPortSelection", - "description": "IP:PORT based dynamic forwarding configuration." - } - }, - "type": "object" - }, - "BackendServiceDynamicForwardingIpPortSelection": { - "description": "Defines a IP:PORT based dynamic forwarding configuration for the backend\nservice. Some ranges are restricted: Restricted\nranges.", - "id": "BackendServiceDynamicForwardingIpPortSelection", - "properties": { - "enabled": { - "description": "A boolean flag enabling IP:PORT based dynamic forwarding.", - "type": "boolean" - } - }, - "type": "object" - }, - "BackendServiceFailoverPolicy": { - "description": "For load balancers that have configurable\nfailover:\n[Internal passthrough Network Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\nOn failover or failback, this field indicates whether connection draining\nwill be honored. Google Cloud has a fixed connection draining timeout of\n10 minutes. A setting of true terminates existing TCP\nconnections to the active pool during failover and failback, immediately\ndraining traffic. A setting of false allows existing TCP\nconnections to persist, even on VMs no longer in the active pool, for up\nto the duration of the connection draining timeout (10 minutes).", - "id": "BackendServiceFailoverPolicy", - "properties": { - "disableConnectionDrainOnFailover": { - "description": "This can be set to true only if the protocol isTCP.\n\nThe default is false.", - "type": "boolean" - }, - "dropTrafficIfUnhealthy": { - "description": "If set to true, connections to the\nload balancer are dropped when all primary and all backup backend VMs are\nunhealthy.If set to false, connections are distributed\namong all primary VMs when all primary and all backup backend VMs are\n unhealthy.\nFor load balancers that have configurable\nfailover:\n[Internal passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external passthrough\nNetwork Load\nBalancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).\nThe default is false.", - "type": "boolean" - }, - "failoverRatio": { - "description": "The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a\nfailover when the number of healthy primary VMs equals zero.\nFor all other values, the load balancer performs a failover when the\ntotal number of healthy primary VMs is less than this ratio.\nFor load balancers that have configurable\nfailover:\n[Internal TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)\nand [external TCP/UDP Load\nBalancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceGroupHealth": { - "id": "BackendServiceGroupHealth", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata defined as annotations on the network endpoint group.", - "type": "object" - }, - "healthStatus": { - "description": "Health state of the backend instances or endpoints in requested instance or\nnetwork endpoint group, determined based on configured health checks.", - "items": { - "$ref": "HealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendServiceGroupHealth", - "description": "[Output Only] Type of resource. Alwayscompute#backendServiceGroupHealth for the health of backend\nservices.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceHAPolicy": { - "id": "BackendServiceHAPolicy", - "properties": { - "fastIPMove": { - "description": "Specifies whether fast IP move is enabled, and if so, the mechanism to\nachieve it.\n\nSupported values are:\n \n - DISABLED: Fast IP Move is disabled. You can only use the\n haPolicy.leader API to update the leader.\n - \u003eGARP_RA: Provides a method to very quickly define a new network\n endpoint as the leader. This method is faster than updating the leader\n using the haPolicy.leader API. Fast IP move works as follows: The VM\n hosting the network endpoint that should become the new leader sends\n either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router\n Advertisement(RA) packet (IPv6). Google Cloud immediately but\n temporarily associates the forwarding rule IP address with that VM, and\n both new and in-flight packets are quickly delivered to that VM.\n\n\n\nNote the important properties of the Fast IP Move functionality:\n \n - The GARP/RA-initiated re-routing stays active for approximately 20\n minutes. After triggering fast failover, you must also\n appropriately set the haPolicy.leader.\n - The new leader instance should continue to send GARP/RA packets\n periodically every 10 seconds until at least 10 minutes after updating\n the haPolicy.leader (but stop immediately if it is no longer the leader).\n - After triggering a fast failover, we recommend that you wait at least\n 3 seconds before sending another GARP/RA packet from a different VM\n instance to avoid race conditions.\n - Don't send GARP/RA packets from different VM\n instances at the same time. If multiple instances continue to send\n GARP/RA packets, traffic might be routed to different destinations in an\n alternating order. This condition ceases when a single instance\n issues a GARP/RA packet.\n - The GARP/RA request always takes priority over the leader API.\n Using the haPolicy.leader API to change the leader to a different\n instance will have no effect until the GARP/RA request becomes\n inactive.\n - The GARP/RA packets should follow the GARP/RA\n Packet Specifications..\n - When multiple forwarding rules refer to a regional backend service,\n you need only send a GARP or RA packet for a single forwarding rule\n virtual IP. The virtual IPs for all forwarding rules targeting the same\n backend service will also be moved to the sender of the GARP or RA\n packet. \n\n\n\nThe following are the Fast IP Move limitations (that is, when fastIPMove\nis not DISABLED):\n \n - Multiple forwarding rules cannot use the same IP address if one of\n them refers to a regional backend service with fastIPMove.\n - The regional backend service must set the network field, and all\n NEGs must belong to that network. However, individual\n NEGs can belong to different subnetworks of that network. \n - The maximum number of network endpoints across all backends of a\n backend service with fastIPMove is 32.\n - The maximum number of backend services with fastIPMove that can have\n the same network endpoint attached to one of its backends is 64.\n - The maximum number of backend services with fastIPMove in a VPC in a\n region is 64.\n - The network endpoints that are attached to a backend of a backend\n service with fastIPMove cannot resolve to Gen3+ machines for IPv6.\n - Traffic directed to the leader by a static route next hop will not be\n redirected to a new leader by fast failover. Such traffic will only be\n redirected once an haPolicy.leader update has taken effect. Only traffic\n to the forwarding rule's virtual IP will be redirected to a new leader by\n fast failover.\n\n\nhaPolicy.fastIPMove can be set only at backend service creation time.\nOnce set, it cannot be updated.\n\nBy default, fastIpMove is set to DISABLED.", - "enum": [ - "DISABLED", - "GARP_RA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "leader": { - "$ref": "BackendServiceHAPolicyLeader", - "description": "Selects one of the network endpoints attached to the backend NEGs of\nthis service as the active endpoint (the leader) that receives all\ntraffic.\n\nWhen the leader changes, there is no connection draining to persist\nexisting connections on the old leader.\n\nYou are responsible for selecting a suitable endpoint as the\nleader. For example, preferring a healthy endpoint over unhealthy ones.\nNote that this service does not track backend endpoint health, and\nselects the configured leader unconditionally." - } - }, - "type": "object" - }, - "BackendServiceHAPolicyLeader": { - "id": "BackendServiceHAPolicyLeader", - "properties": { - "backendGroup": { - "description": "A fully-qualified URL (starting with https://www.googleapis.com/)\nof the zonal Network Endpoint Group (NEG) with `GCE_VM_IP` endpoints\nthat the leader is attached to.\n\nThe leader's backendGroup must already be specified as a backend of\nthis backend service. Removing a backend that is designated as the\nleader's backendGroup is not permitted.", - "type": "string" - }, - "networkEndpoint": { - "$ref": "BackendServiceHAPolicyLeaderNetworkEndpoint", - "description": "The network endpoint within the leader.backendGroup that is\ndesignated as the leader.\n\nThis network endpoint cannot be detached from the NEG specified in\nthe haPolicy.leader.backendGroup until the leader is updated with\nanother network endpoint, or the leader is removed from the haPolicy." - } - }, - "type": "object" - }, - "BackendServiceHAPolicyLeaderNetworkEndpoint": { - "id": "BackendServiceHAPolicyLeaderNetworkEndpoint", - "properties": { - "instance": { - "description": "The name of the VM instance of the leader network endpoint. The\ninstance must already be attached to the NEG specified in the\nhaPolicy.leader.backendGroup.\n\nThe name must be 1-63 characters long, and comply with RFC1035.\nAuthorization requires the following IAM permission on the\nspecified resource instance: compute.instances.use", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceHttpCookie": { - "description": "The HTTP cookie used for stateful session affinity.", - "id": "BackendServiceHttpCookie", - "properties": { - "name": { - "description": "Name of the cookie.", - "type": "string" - }, - "path": { - "description": "Path to set for the cookie.", - "type": "string" - }, - "ttl": { - "$ref": "Duration", - "description": "Lifetime of the cookie." - } - }, - "type": "object" - }, - "BackendServiceIAP": { - "description": "Identity-Aware Proxy", - "id": "BackendServiceIAP", - "properties": { - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all\nincoming requests.", - "type": "boolean" - }, - "oauth2ClientId": { - "description": "OAuth2 client ID to use for the authentication flow.", - "type": "string" - }, - "oauth2ClientSecret": { - "description": "OAuth2 client secret to use for the authentication flow.\nFor security reasons, this value cannot be retrieved via the API.\nInstead, the SHA-256 hash of the value is returned in the\noauth2ClientSecretSha256 field.\n\n@InputOnly", - "type": "string" - }, - "oauth2ClientSecretSha256": { - "description": "[Output Only] SHA256 hash value for the field oauth2_client_secret above.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceList": { - "description": "Contains a list of BackendService resources.", - "id": "BackendServiceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendServiceList", - "description": "[Output Only] Type of resource. Alwayscompute#backendServiceList for lists of backend services.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceListUsable": { - "description": "Contains a list of usable BackendService resources.", - "id": "BackendServiceListUsable", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendService resources.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableBackendServiceList", - "description": "[Output Only] Type of resource. Alwayscompute#usableBackendServiceList for lists of usable backend\nservices.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfig": { - "description": "Container for either a built-in LB policy supported by gRPC or Envoy or\na custom one implemented by the end user.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfig", - "properties": { - "customPolicy": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" - }, - "policy": { - "$ref": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy": { - "description": "The configuration for a custom policy implemented by the user and\ndeployed with the client.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", - "properties": { - "data": { - "description": "An optional, arbitrary JSON object with configuration data, understood\nby a locally installed custom policy implementation.", - "type": "string" - }, - "name": { - "description": "Identifies the custom policy.\n\nThe value should match the name of a custom implementation registered\non the gRPC clients. It should follow protocol buffer message naming\nconventions and include the full path (for example,\nmyorg.CustomLbPolicy). The maximum length is 256 characters.\n\nDo not specify the same custom policy more than once for a\nbackend. If you do, the configuration is rejected.\n\nFor an example of how to use this field, seeUse\na custom policy.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceLocalityLoadBalancingPolicyConfigPolicy": { - "description": "The configuration for a built-in load balancing policy.", - "id": "BackendServiceLocalityLoadBalancingPolicyConfigPolicy", - "properties": { - "name": { - "description": "The name of a locality load-balancing policy. Valid values include\nROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information\nabout these values, see the description of localityLbPolicy.\n\nDo not specify the same policy more than once for a\nbackend. If you do, the configuration is rejected.", - "enum": [ - "INVALID_LB_POLICY", - "LEAST_REQUEST", - "MAGLEV", - "ORIGINAL_DESTINATION", - "RANDOM", - "RING_HASH", - "ROUND_ROBIN", - "WEIGHTED_GCP_RENDEZVOUS", - "WEIGHTED_MAGLEV", - "WEIGHTED_ROUND_ROBIN" - ], - "enumDescriptions": [ - "", - "An O(1) algorithm which selects two random healthy hosts and\npicks the host which has fewer active requests.", - "This algorithm implements consistent hashing to backends. Maglev can be\nused as a drop in replacement for the ring hash load balancer. Maglev is\nnot as stable as ring hash but has faster table lookup build times and\nhost selection times. For more information about Maglev, seeMaglev:\nA Fast and Reliable Software Network Load Balancer.", - "Backend host is selected based on the client connection metadata, i.e.,\nconnections are opened to the same address as the destination address of\nthe incoming connection before the connection was redirected to the load\nbalancer.", - "The load balancer selects a random healthy host.", - "The ring/modulo hash load balancer implements consistent hashing to\nbackends. The algorithm has the property that the addition/removal\nof a host from a set of N hosts only affects 1/N of the requests.", - "This is a simple policy in which each healthy backend is selected\nin round robin order. This is the default.", - "Per-instance weighted Load Balancing via health check reported weights.\nIn internal passthrough network load balancing, it is weighted\nrendezvous hashing.\nThis option is only supported in internal passthrough network load\nbalancing.", - "Per-instance weighted Load Balancing via health check reported weights.\nIf set, the Backend Service must configure a non legacy HTTP-based Health\nCheck, and health check replies are expected to contain non-standard HTTP\nresponse header field X-Load-Balancing-Endpoint-Weight to specify the\nper-instance weights.\nIf set, Load Balancing is weighted based on the\nper-instance weights reported in the last processed health check replies,\nas long as every instance either reported a valid weight or had\nUNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight.\nThis option is only supported in Network Load Balancing.", - "Per-endpoint weighted round-robin Load Balancing using weights computed\nfrom Backend reported Custom Metrics. If set, the Backend Service\nresponses are expected to contain non-standard HTTP response header field\nEndpoint-Load-Metrics. The reported metrics\nto use for computing the weights are specified via the\ncustomMetrics fields." - ], - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceLogConfig": { - "description": "The available logging options for the load balancer traffic served by this\nbackend service.", - "id": "BackendServiceLogConfig", - "properties": { - "enable": { - "description": "Denotes whether to enable logging for the load balancer\ntraffic served by this backend service. The default value is false.", - "type": "boolean" - }, - "optionalFields": { - "description": "This field can only be specified if logging is enabled for this backend\nservice and \"logConfig.optionalMode\" was set to CUSTOM. Contains a list\nof optional fields you want to include in the logs. For example:\nserverInstance, serverGkeDetails.cluster,\nserverGkeDetails.pod.podNamespace", - "items": { - "type": "string" - }, - "type": "array" - }, - "optionalMode": { - "description": "This field can only be specified if logging is enabled for this backend\nservice. Configures whether all, none or a subset of optional fields\nshould be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL,\nEXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.", - "enum": [ - "CUSTOM", - "EXCLUDE_ALL_OPTIONAL", - "INCLUDE_ALL_OPTIONAL" - ], - "enumDescriptions": [ - "A subset of optional fields.", - "None optional fields.", - "All optional fields." - ], - "type": "string" - }, - "sampleRate": { - "description": "This field can only be specified if logging is enabled for this backend\nservice. The value of the field must be in [0, 1]. This configures the\nsampling rate of requests to the load balancer where 1.0 means all logged\nrequests are reported and 0.0 means no logged requests are reported. The\ndefault value is 1.0.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceNetworkPassThroughLbTrafficPolicy": { - "id": "BackendServiceNetworkPassThroughLbTrafficPolicy", - "properties": { - "zonalAffinity": { - "$ref": "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", - "description": "When configured, new connections are load balanced across healthy backend\nendpoints in the local zone." - } - }, - "type": "object" - }, - "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity": { - "id": "BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity", - "properties": { - "spillover": { - "description": "This field indicates whether zonal affinity is enabled or not. The\npossible values are:\n \n - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity\n is disabled. The load balancer distributes new connections to all\n healthy backend endpoints across all zones.\n - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is\n enabled. The load balancer distributes new connections to all healthy\n backend endpoints in the local zone only. If there are no healthy\n backend endpoints in the local zone, the load balancer distributes\n new connections to all backend endpoints in the local zone.\n - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is\n enabled. The load balancer distributes new connections to all healthy\n backend endpoints in the local zone only. If there aren't enough\n healthy backend endpoints in the local zone, the load balancer\n distributes new connections to all healthy backend endpoints across all\n zones.", - "enum": [ - "ZONAL_AFFINITY_DISABLED", - "ZONAL_AFFINITY_SPILL_CROSS_ZONE", - "ZONAL_AFFINITY_STAY_WITHIN_ZONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "spilloverRatio": { - "description": "The value of the field must be in [0, 1]. When the ratio of the count\nof healthy backend endpoints in a zone to the count of backend\nendpoints in that same zone is equal to or above this threshold, the\nload balancer distributes new connections to all healthy endpoints in\nthe local zone only. When the ratio of the count of healthy backend\nendpoints in a zone to the count of backend endpoints in that same\nzone is below this threshold, the load balancer distributes all new\nconnections to all healthy endpoints across all zones.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "BackendServiceParams": { - "description": "Additional Backend Service parameters.", - "id": "BackendServiceParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "BackendServiceReference": { - "id": "BackendServiceReference", - "properties": { - "backendService": { - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceTlsSettings": { - "id": "BackendServiceTlsSettings", - "properties": { - "authenticationConfig": { - "description": "Reference to the BackendAuthenticationConfig resource from the\nnetworksecurity.googleapis.com namespace. Can be used in authenticating\nTLS connections to the backend, as specified by the authenticationMode\nfield. Can only be specified if authenticationMode is not NONE.", - "type": "string" - }, - "identity": { - "description": "Assigns the Managed Identity for the BackendService Workload.\n\n\nUse this property to configure the load balancer back-end to use\ncertificates and roots of trust provisioned by the Managed Workload\nIdentity system. \n\n The `identity` property is the\nfully-specified SPIFFE ID to use in the SVID presented by the Load\nBalancer Workload. \n\n The SPIFFE ID must be a resource starting with the\n`trustDomain` property value, followed by the path to the Managed\nWorkload Identity. \n\n Supported SPIFFE ID format: \n \n - //\u003ctrust_domain\u003e/ns/\u003cnamespace\u003e/sa/\u003csubject\u003e\n\n\nThe Trust Domain within the Managed Identity must refer to a valid\nWorkload Identity Pool. The TrustConfig and CertificateIssuanceConfig\nwill be inherited from the Workload Identity Pool. \n\n Restrictions: \n \n - If you set the `identity` property, you cannot manually set\n the following fields: \n - tlsSettings.sni\n - tlsSettings.subjectAltNames\n - tlsSettings.authenticationConfig\n \n\nWhen defining a `identity` for a RegionBackendServices, the\ncorresponding Workload Identity Pool must have a ca_pool\nconfigured in the same region. \n\n The system will set up a read-onlytlsSettings.authenticationConfig for the Managed Identity.", - "type": "string" - }, - "sni": { - "description": "Server Name Indication - see RFC3546 section 3.1. If set, the load\nbalancer sends this string as the SNI hostname in the TLS connection to\nthe backend, and requires that this string match a Subject Alternative\nName (SAN) in the backend's server certificate. With a Regional Internet\nNEG backend, if the SNI is specified here, the load balancer uses it\nregardless of whether the Regional Internet NEG is specified with FQDN or\nIP address and port. When both sni and subjectAltNames[] are specified,\nthe load balancer matches the backend certificate's SAN only to\nsubjectAltNames[].", - "type": "string" - }, - "subjectAltNames": { - "description": "A list of Subject Alternative Names (SANs) that the Load Balancer\nverifies during a TLS handshake with the backend. When the server\npresents its X.509 certificate to the Load Balancer, the Load Balancer\ninspects the certificate's SAN field, and requires that at least one SAN\nmatch one of the subjectAltNames in the list. This field is limited to 5\nentries. When both sni and subjectAltNames[] are specified, the load\nbalancer matches the backend certificate's SAN only to subjectAltNames[].", - "items": { - "$ref": "BackendServiceTlsSettingsSubjectAltName" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServiceTlsSettingsSubjectAltName": { - "description": "A Subject Alternative Name that the load balancer matches against the SAN\nfield in the TLS certificate provided by the backend, specified as either\na DNS name or a URI, in accordance with RFC 5280 4.2.1.6", - "id": "BackendServiceTlsSettingsSubjectAltName", - "properties": { - "dnsName": { - "description": "The SAN specified as a DNS Name.", - "type": "string" - }, - "uniformResourceIdentifier": { - "description": "The SAN specified as a URI.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServiceUsedBy": { - "id": "BackendServiceUsedBy", - "properties": { - "reference": { - "description": "[Output Only] Server-defined URL for resources referencing given\nBackendService like UrlMaps, TargetTcpProxies, TargetSslProxies\nand ForwardingRule.", - "type": "string" - } - }, - "type": "object" - }, - "BackendServicesGetEffectiveSecurityPoliciesResponse": { - "id": "BackendServicesGetEffectiveSecurityPoliciesResponse", - "properties": { - "securityPolicies": { - "description": "Effective security policies for the backend service.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "BackendServicesScopedList": { - "id": "BackendServicesScopedList", - "properties": { - "backendServices": { - "description": "A list of BackendServices contained in this scope.", - "items": { - "$ref": "BackendService" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "BfdPacket": { - "id": "BfdPacket", - "properties": { - "authenticationPresent": { - "description": "The Authentication Present bit of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "type": "boolean" - }, - "controlPlaneIndependent": { - "description": "The Control Plane Independent bit of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "type": "boolean" - }, - "demand": { - "description": "The demand bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "diagnostic": { - "description": "The diagnostic code specifies the local system's reason for the last change\nin session state. This allows remote systems to determine the reason that\nthe previous session failed, for example. These diagnostic codes are\nspecified in section 4.1 ofRFC5880", - "enum": [ - "ADMINISTRATIVELY_DOWN", - "CONCATENATED_PATH_DOWN", - "CONTROL_DETECTION_TIME_EXPIRED", - "DIAGNOSTIC_UNSPECIFIED", - "ECHO_FUNCTION_FAILED", - "FORWARDING_PLANE_RESET", - "NEIGHBOR_SIGNALED_SESSION_DOWN", - "NO_DIAGNOSTIC", - "PATH_DOWN", - "REVERSE_CONCATENATED_PATH_DOWN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "final": { - "description": "The Final bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "length": { - "description": "The length of the BFD Control packet in bytes. This is specified in section\n4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minEchoRxIntervalMs": { - "description": "The Required Min Echo RX Interval value in the BFD packet. This is\nspecified in section 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minRxIntervalMs": { - "description": "The Required Min RX Interval value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "minTxIntervalMs": { - "description": "The Desired Min TX Interval value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "multiplier": { - "description": "The detection time multiplier of the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "multipoint": { - "description": "The multipoint bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "myDiscriminator": { - "description": "The My Discriminator value in the BFD packet. This is specified in section\n4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - }, - "poll": { - "description": "The Poll bit of the BFD packet. This is specified in section 4.1 ofRFC5880", - "type": "boolean" - }, - "state": { - "description": "The current BFD session state as seen by the transmitting system. These\nstates are specified in section 4.1 ofRFC5880", - "enum": [ - "ADMIN_DOWN", - "DOWN", - "INIT", - "STATE_UNSPECIFIED", - "UP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "version": { - "description": "The version number of the BFD protocol, as specified in section 4.1 ofRFC5880.", - "format": "uint32", - "type": "integer" - }, - "yourDiscriminator": { - "description": "The Your Discriminator value in the BFD packet. This is specified in\nsection 4.1 ofRFC5880", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "BfdStatus": { - "description": "Next free: 15", - "id": "BfdStatus", - "properties": { - "bfdSessionInitializationMode": { - "description": "The BFD session initialization mode for this BGP peer.\nIf set to ACTIVE, the Cloud Router will initiate the BFD session for\nthis BGP peer. If set to PASSIVE, the Cloud Router will wait for the\npeer router to initiate the BFD session for this BGP peer. If set to\nDISABLED, BFD is disabled for this BGP peer.", - "enum": [ - "ACTIVE", - "DISABLED", - "PASSIVE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "configUpdateTimestampMicros": { - "description": "Unix timestamp of the most recent config update.", - "format": "int64", - "type": "string" - }, - "controlPacketCounts": { - "$ref": "BfdStatusPacketCounts", - "description": "Control packet counts for the current BFD session." - }, - "controlPacketIntervals": { - "description": "Inter-packet time interval statistics for control packets.", - "items": { - "$ref": "PacketIntervals" - }, - "type": "array" - }, - "localDiagnostic": { - "description": "The diagnostic code specifies the local system's reason for the last change\nin session state. This allows remote systems to determine the reason that\nthe previous session failed, for example. These diagnostic codes are\nspecified in section 4.1 ofRFC5880", - "enum": [ - "ADMINISTRATIVELY_DOWN", - "CONCATENATED_PATH_DOWN", - "CONTROL_DETECTION_TIME_EXPIRED", - "DIAGNOSTIC_UNSPECIFIED", - "ECHO_FUNCTION_FAILED", - "FORWARDING_PLANE_RESET", - "NEIGHBOR_SIGNALED_SESSION_DOWN", - "NO_DIAGNOSTIC", - "PATH_DOWN", - "REVERSE_CONCATENATED_PATH_DOWN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "localState": { - "description": "The current BFD session state as seen by the transmitting system. These\nstates are specified in section 4.1 ofRFC5880", - "enum": [ - "ADMIN_DOWN", - "DOWN", - "INIT", - "STATE_UNSPECIFIED", - "UP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "negotiatedLocalControlTxIntervalMs": { - "description": "Negotiated transmit interval for control packets.", - "format": "uint32", - "type": "integer" - }, - "rxPacket": { - "$ref": "BfdPacket", - "description": "The most recent Rx control packet for this BFD session." - }, - "txPacket": { - "$ref": "BfdPacket", - "description": "The most recent Tx control packet for this BFD session." - }, - "uptimeMs": { - "description": "Session uptime in milliseconds. Value will be 0 if session is not up.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "BfdStatusPacketCounts": { - "id": "BfdStatusPacketCounts", - "properties": { - "numRx": { - "description": "Number of packets received since the beginning of the current BFD\nsession.", - "format": "uint32", - "type": "integer" - }, - "numRxRejected": { - "description": "Number of packets received that were rejected because of errors since the\nbeginning of the current BFD session.", - "format": "uint32", - "type": "integer" - }, - "numRxSuccessful": { - "description": "Number of packets received that were successfully processed since the\nbeginning of the current BFD session.", - "format": "uint32", - "type": "integer" - }, - "numTx": { - "description": "Number of packets transmitted since the beginning of the current BFD\nsession.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "BgpRoute": { - "id": "BgpRoute", - "properties": { - "asPaths": { - "description": "[Output only] AS-PATH for the route", - "items": { - "$ref": "BgpRouteAsPath" - }, - "type": "array" - }, - "communities": { - "description": "[Output only] BGP communities in human-readable A:B format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destination": { - "$ref": "BgpRouteNetworkLayerReachabilityInformation", - "description": "[Output only] Destination IP range for the route, in human-readable CIDR\nformat" - }, - "med": { - "description": "[Output only] BGP multi-exit discriminator", - "format": "uint32", - "type": "integer" - }, - "origin": { - "description": "[Output only] BGP origin (EGP, IGP or INCOMPLETE)", - "enum": [ - "BGP_ORIGIN_EGP", - "BGP_ORIGIN_IGP", - "BGP_ORIGIN_INCOMPLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BgpRouteAsPath": { - "id": "BgpRouteAsPath", - "properties": { - "asns": { - "description": "[Output only] ASNs in the path segment. When type is SEQUENCE, these are\nordered.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "asns32": { - "description": "[Output only] ASNs in the path segment. This field is for better\nsupport of 32 bit ASNs as the other asns field suffers from overflow when\nthe ASN is larger. When type is SEQUENCE, these are ordered.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "type": { - "description": "[Output only] Type of AS-PATH segment (SEQUENCE or SET)", - "enum": [ - "AS_PATH_TYPE_SEQUENCE", - "AS_PATH_TYPE_SET" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "BgpRouteNetworkLayerReachabilityInformation": { - "description": "Network Layer Reachability Information (NLRI) for a route.", - "id": "BgpRouteNetworkLayerReachabilityInformation", - "properties": { - "pathId": { - "description": "If the BGP session supports multiple paths (RFC 7911), the path\nidentifier for this route.", - "format": "uint32", - "type": "integer" - }, - "prefix": { - "description": "Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16.", - "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.\n\nIf the condition evaluates to `true`, then this binding applies to the\ncurrent request.\n\nIf the condition evaluates to `false`, then this binding does not apply to\nthe current request. However, a different role binding might grant the same\nrole to one or more of the principals in this binding.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM\ndocumentation](https://cloud.google.com/iam/help/conditions/resource-policies)." - }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n Does not include identities that come from external identity providers\n (IdPs) through identity federation.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@example.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a Google\n service account. For example,\n `my-other-app@appspot.gserviceaccount.com`.\n\n* `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An\n identifier for a\n [Kubernetes service\n account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).\n For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n\n\n\n* `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:\n A single identity in a workforce identity pool.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:\n All workforce identities in a group.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:\n All workforce identities with a specific attribute value.\n\n* `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:\n All identities in a workforce identity pool.\n\n* `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:\n A single identity in a workload identity pool.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:\n A workload identity pool group.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:\n All identities in a workload identity pool with a certain attribute.\n\n* `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:\n All identities in a workload identity pool.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a user that has been recently deleted. For\n example, `alice@example.com?uid=123456789012345678901`. If the user is\n recovered, this value reverts to `user:{emailid}` and the recovered user\n retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus\n unique identifier) representing a service account that has been recently\n deleted. For example,\n `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.\n If the service account is undeleted, this value reverts to\n `serviceAccount:{emailid}` and the undeleted service account retains the\n role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a Google group that has been recently\n deleted. For example, `admins@example.com?uid=123456789012345678901`. If\n the group is recovered, this value reverts to `group:{emailid}` and the\n recovered group retains the role in the binding.\n\n* `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:\n Deleted single identity in a workforce identity pool. For example,\n `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\n\nFor an overview of the IAM roles and permissions, see the\n[IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For\na list of the available pre-defined roles, see\n[here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertDiskResource": { - "description": "A transient resource used in compute.disks.bulkInsert and\ncompute.regionDisks.bulkInsert. It is only used to process\nrequests and is not persisted.", - "id": "BulkInsertDiskResource", - "properties": { - "sourceConsistencyGroupPolicy": { - "description": "The URL of the DiskConsistencyGroupPolicy for the group of disks to clone.\nThis may be a full or partial URL, such as:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertInstanceResource": { - "description": "A transient resource used in compute.instances.bulkInsert and\ncompute.regionInstances.bulkInsert . This resource is not persisted\nanywhere, it is used only for processing the requests.", - "id": "BulkInsertInstanceResource", - "properties": { - "count": { - "description": "The maximum number of instances to create.", - "format": "int64", - "type": "string" - }, - "instanceProperties": { - "$ref": "InstanceProperties", - "description": "The instance properties defining the VM instances to be created. Required\nif sourceInstanceTemplate is not provided." - }, - "locationPolicy": { - "$ref": "LocationPolicy", - "description": "Policy for choosing target zone. For more information, seeCreate VMs in\nbulk." - }, - "minCount": { - "description": "The minimum number of instances to create. If no min_count is\nspecified then count is used as the default value. Ifmin_count instances cannot be created, then no instances will\nbe created and instances already created will be deleted.", - "format": "int64", - "type": "string" - }, - "namePattern": { - "description": "The string pattern used for the names of the VMs.\nEither name_pattern or per_instance_properties\nmust be set. The pattern must contain one continuous sequence of\nplaceholder hash characters (#) with each character corresponding to one\ndigit of the generated instance name. Example: a name_pattern\nof inst-#### generates instance names such asinst-0001 and inst-0002. If existing instances\nin the same project and zone have names that match the name pattern\nthen the generated instance numbers start after the biggest\nexisting number. For example, if there exists an instance with nameinst-0050, then instance names generated using the patterninst-#### begin with inst-0051. The name pattern\nplaceholder #...# can contain up to 18 characters.", - "type": "string" - }, - "perInstanceProperties": { - "additionalProperties": { - "$ref": "BulkInsertInstanceResourcePerInstanceProperties" - }, - "description": "Per-instance properties to be set on individual instances.\nKeys of this map specify requested instance names.\nCan be empty if name_pattern is used.", - "type": "object" - }, - "sourceInstanceTemplate": { - "description": "Specifies the instance template from which to create instances. You may\ncombine sourceInstanceTemplate withinstanceProperties to override specific values from an\nexisting instance template. Bulk API follows the semantics of JSON Merge\nPatch described by RFC\n7396.\n\nIt can be a full or partial URL. For example, the following are\nall valid URLs to an instance template: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate\n - projects/project/global/instanceTemplates/instanceTemplate\n - global/instanceTemplates/instanceTemplate\n\n\n\nThis field is optional.", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertInstanceResourcePerInstanceProperties": { - "description": "Per-instance properties to be set on individual instances.\nTo be extended in the future.", - "id": "BulkInsertInstanceResourcePerInstanceProperties", - "properties": { - "hostname": { - "description": "Specifies the hostname of the instance. More details in:\nhttps://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention", - "type": "string" - }, - "name": { - "description": "This field is only temporary. It will be removed. Do not use it.", - "type": "string" - } - }, - "type": "object" - }, - "BulkInsertOperationStatus": { - "id": "BulkInsertOperationStatus", - "properties": { - "createdVmCount": { - "description": "[Output Only] Count of VMs successfully created so far.", - "format": "int32", - "type": "integer" - }, - "deletedVmCount": { - "description": "[Output Only] Count of VMs that got deleted during rollback.", - "format": "int32", - "type": "integer" - }, - "failedToCreateVmCount": { - "description": "[Output Only] Count of VMs that started creating but encountered an\nerror.", - "format": "int32", - "type": "integer" - }, - "status": { - "description": "[Output Only] Creation status of BulkInsert operation - information\nif the flow is rolling forward or rolling back.", - "enum": [ - "CREATING", - "DONE", - "ROLLING_BACK", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "Rolling forward - creating VMs.", - "Done", - "Rolling back - cleaning up after an error.", - "" - ], - "type": "string" - }, - "targetVmCount": { - "description": "[Output Only] Count of VMs originally planned to be created.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BulkSetLabelsRequest": { - "id": "BulkSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You may\noptionally provide an up-to-date fingerprint hash in order to update or\nchange labels. Make a get() request to the resource to get the\nlatest fingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "BulkZoneSetLabelsRequest": { - "id": "BulkZoneSetLabelsRequest", - "properties": { - "requests": { - "items": { - "$ref": "BulkSetLabelsRequest" - }, - "type": "array" - } - }, - "type": "object" - }, - "BundledLocalSsds": { - "id": "BundledLocalSsds", - "properties": { - "defaultInterface": { - "description": "The default disk interface if the interface is not specified.", - "type": "string" - }, - "partitionCount": { - "description": "The number of partitions.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "CacheInvalidationRule": { - "id": "CacheInvalidationRule", - "properties": { - "cacheTags": { - "description": "A list of cache tags used to identify cached objects.\n\n \n - Cache tags are specified when the response is first cached, by setting\n the `Cache-Tag` response header at the origin.\n - Multiple cache tags in the same invalidation request are treated as\n Boolean `OR` - for example, `tag1 OR tag2 OR tag3`.\n - If other fields are also specified, these are treated as Boolean `AND`\n with any tags.\n\n\nUp to 10 tags can be specified in a single invalidation request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "host": { - "description": "If set, this invalidation rule will only apply to requests with a Host\nheader matching host.", - "type": "string" - }, - "path": { - "type": "string" - } - }, - "type": "object" - }, - "CacheKeyPolicy": { - "description": "Message containing what to include in the cache key for a request for Cloud\nCDN.", - "id": "CacheKeyPolicy", - "properties": { - "includeHost": { - "description": "If true, requests to different hosts will be cached separately.", - "type": "boolean" - }, - "includeHttpHeaders": { - "description": "Allows HTTP request headers (by name) to be used in the cache key.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includeNamedCookies": { - "description": "Allows HTTP cookies (by name) to be used in the cache key.\nThe name=value pair will be used in the cache key Cloud CDN generates.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includeProtocol": { - "description": "If true, http and https requests will be cached separately.", - "type": "boolean" - }, - "includeQueryString": { - "description": "If true, include query string parameters in the cache key according to\nquery_string_whitelist and query_string_blacklist. If neither is set, the\nentire query string will be included. If false, the query string will be\nexcluded from the cache key entirely.", - "type": "boolean" - }, - "queryStringBlacklist": { - "description": "Names of query string parameters to exclude in cache keys. All other\nparameters will be included. Either specify query_string_whitelist or\nquery_string_blacklist, not both. '\u0026' and '=' will be percent encoded and\nnot treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - }, - "queryStringWhitelist": { - "description": "Names of query string parameters to include in cache keys. All other\nparameters will be excluded. Either specify query_string_whitelist or\nquery_string_blacklist, not both. '\u0026' and '=' will be percent encoded and\nnot treated as delimiters.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CalendarModeAdviceRequest": { - "description": "A request to recommend the best way to consume the specified resources in the\nfuture.", - "id": "CalendarModeAdviceRequest", - "properties": { - "futureResourcesSpecs": { - "additionalProperties": { - "$ref": "FutureResourcesSpec" - }, - "description": "Specification of resources to create in the future.\nThe key of the map is an arbitrary string specified by the caller.\nValue of the map is a specification of required resources and their\nconstraints. Currently only one value is allowed in this map.", - "type": "object" - } - }, - "type": "object" - }, - "CalendarModeAdviceResponse": { - "description": "A response containing the recommended way of creating the specified resources\nin the future. It contains (will contain) multiple recommendations that can\nbe analyzed by the customer and the best one can be picked.", - "id": "CalendarModeAdviceResponse", - "properties": { - "recommendations": { - "description": "Recommendations where, how and when to create the requested resources\nin order to maximize their obtainability and minimize cost.", - "items": { - "$ref": "CalendarModeRecommendation" - }, - "type": "array" - } - }, - "type": "object" - }, - "CalendarModeRecommendation": { - "description": "A single recommendation to create requested resources. Contains detailed\nrecommendations for every future resources specification specified in\nCalendarModeAdviceRequest.", - "id": "CalendarModeRecommendation", - "properties": { - "recommendationsPerSpec": { - "additionalProperties": { - "$ref": "FutureResourcesRecommendation" - }, - "description": "Recommendations for every future resource specification passed in\nCalendarModeAdviceRequest. Keys of the map correspond to keys\nspecified in the request.", - "type": "object" - } - }, - "type": "object" - }, - "CircuitBreakers": { - "description": "Settings controlling the volume of requests, connections and retries to this\nbackend service.", - "id": "CircuitBreakers", - "properties": { - "connectTimeout": { - "$ref": "Duration", - "description": "The timeout for new network connections to hosts." - }, - "maxConnections": { - "description": "The maximum number of connections to the backend service. If not specified,\nthere is no limit.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxPendingRequests": { - "description": "The maximum number of pending requests allowed to the backend service. If\nnot specified, there is no limit.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxRequests": { - "description": "The maximum number of parallel requests that allowed to the backend\nservice. If not specified, there is no limit.", - "format": "int32", - "type": "integer" - }, - "maxRequestsPerConnection": { - "description": "Maximum requests for a single connection to the backend service.\nThis parameter is respected by both the HTTP/1.1 and HTTP/2\nimplementations. If not specified, there is no limit. Setting this\nparameter to 1 will effectively disable keep alive.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "maxRetries": { - "description": "The maximum number of parallel retries allowed to the backend cluster. If\nnot specified, the default is 1.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Commitment": { - "description": "Represents a regional resource-based commitment resource.\n\nCreating this commitment resource means that you are purchasing a\nresource-based committed use contract, with an explicit start and end time.\nYou can purchase resource-based commitments for both hardware and software\nresources. For more information, read\nResource-based committed use discounts", - "id": "Commitment", - "properties": { - "autoRenew": { - "description": "Specifies whether to automatically renew the commitment at the end of its\ncurrent term. The default value is false. If you set the field\nto true, each time your commitment reaches the end of its\nterm, Compute Engine automatically renews it for another term. You can\nupdate this field anytime before the commitment expires. For example, if\nthe commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you can\nupdate this field until 11:59 PM UTC-8 on January 2, 2027.", - "type": "boolean" - }, - "category": { - "description": "The category of the commitment; specifies whether the commitment is for\nhardware or software resources. Category MACHINE specifies\nthat you are committing to hardware machine resources such asVCPU or MEMORY, listed in resources.\nCategory LICENSE specifies that you are committing to software\nlicenses, listed in licenseResources.\nNote that if you specify MACHINE commitments, then you must\nalso specify a type to indicate the machine series of the\nhardware resource that you are committing to.", - "enum": [ - "CATEGORY_UNSPECIFIED", - "LICENSE", - "MACHINE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customEndTimestamp": { - "description": "[Input Only] Optional, specifies the requested commitment end time inRFC3339 text format. Use this option when the desired\ncommitment's end date is later than the start date + term duration.", - "type": "string" - }, - "description": { - "description": "An optional description of the commitment. You can provide this property\nwhen you create the resource.", - "type": "string" - }, - "endTimestamp": { - "description": "[Output Only] Commitment end time inRFC3339\ntext format.", - "type": "string" - }, - "existingReservations": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#commitment", - "description": "[Output Only] Type of the resource. Always compute#commitment\nfor commitments.", - "type": "string" - }, - "licenseResource": { - "$ref": "LicenseResourceCommitment", - "description": "The license specification required as part of a license commitment." - }, - "mergeSourceCommitments": { - "description": "The list of source commitments that you are merging to create the new\nmerged commitment. For more information, see\nMerging commitments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Name of the commitment. You must specify a name when you purchase the\ncommitment. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "plan": { - "description": "The minimum time duration that you commit to purchasing resources.\nThe plan that you choose determines the preset term length of the\ncommitment (which is 1 year or 3 years) and affects the discount rate that\nyou receive for your resources. Committing to a longer time duration\ntypically gives you a higher discount rate. The supported values for this\nfield are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 years).", - "enum": [ - "INVALID", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the commitment and committed\nresources are located.", - "type": "string" - }, - "reservations": { - "description": "The list of new reservations that you want to create and attach to this\ncommitment.\n\nYou must attach reservations to your commitment if your commitment\nspecifies any GPUs or Local SSD disks. For more information, see \nAttach reservations to resource-based commitments.\n\nSpecify this property only if you want to create new\nreservations to attach. To attach existing reservations, specify theexistingReservations property instead.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "CommitmentResourceStatus", - "description": "[Output Only] Status information for Commitment resource." - }, - "resources": { - "description": "The list of all the hardware resources, with their types and amounts, that\nyou want to commit to. Specify as a separate entry in the list for each\nindividual resource type.", - "items": { - "$ref": "ResourceCommitment" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "splitSourceCommitment": { - "description": "The source commitment from which you are transferring resources to create\nthe new split commitment. For more information, see \nSplit commitments.", - "type": "string" - }, - "startTimestamp": { - "description": "[Output Only] Commitment start time inRFC3339\ntext format.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the commitment with regards to eventual expiration\n(each commitment has an end date defined). Status can be one of the\nfollowing values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED.", - "enum": [ - "ACTIVE", - "CANCELLED", - "CREATING", - "EXPIRED", - "NOT_YET_ACTIVE" - ], - "enumDescriptions": [ - "", - "Deprecate CANCELED status. Will use separate status to differentiate\ncancel by mergeCud or manual cancellation.", - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - }, - "type": { - "description": "The type of commitment; specifies the\nmachine series for which you want to commit to purchasing resources.\nThe choice of machine series affects the discount rate and the eligible\nresource types.\n\n The type must be one of the following:ACCELERATOR_OPTIMIZED, ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, COMPUTE_OPTIMIZED_C2D,\n COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, GENERAL_PURPOSE,GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3.\nFor example, type MEMORY_OPTIMIZED specifies a commitment\nthat applies only to eligible resources of memory optimized M1 and M2\nmachine series. Type GENERAL_PURPOSE specifies a commitment\nthat applies only to eligible resources of general purpose N1 machine\nseries.", - "enum": [ - "ACCELERATOR_OPTIMIZED", - "ACCELERATOR_OPTIMIZED_A3", - "ACCELERATOR_OPTIMIZED_A3_MEGA", - "ACCELERATOR_OPTIMIZED_A3_ULTRA", - "ACCELERATOR_OPTIMIZED_A4", - "COMPUTE_OPTIMIZED", - "COMPUTE_OPTIMIZED_C2D", - "COMPUTE_OPTIMIZED_C3", - "COMPUTE_OPTIMIZED_C3D", - "COMPUTE_OPTIMIZED_H3", - "COMPUTE_OPTIMIZED_H4D", - "GENERAL_PURPOSE", - "GENERAL_PURPOSE_C4", - "GENERAL_PURPOSE_C4A", - "GENERAL_PURPOSE_C4D", - "GENERAL_PURPOSE_E2", - "GENERAL_PURPOSE_N2", - "GENERAL_PURPOSE_N2D", - "GENERAL_PURPOSE_N4", - "GENERAL_PURPOSE_N4D", - "GENERAL_PURPOSE_T2D", - "GRAPHICS_OPTIMIZED", - "MEMORY_OPTIMIZED", - "MEMORY_OPTIMIZED_M3", - "MEMORY_OPTIMIZED_M4", - "MEMORY_OPTIMIZED_M4_6TB", - "MEMORY_OPTIMIZED_X4_16TB", - "MEMORY_OPTIMIZED_X4_24TB", - "MEMORY_OPTIMIZED_X4_32TB", - "STORAGE_OPTIMIZED_Z3", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Note for internal users: When adding a new enum Type for v1, make sure\nto also add it in the comment for the `optional Type type` definition.\nThis ensures that the public documentation displays the new enum Type." - ], - "type": "string" - } - }, - "type": "object" - }, - "CommitmentAggregatedList": { - "id": "CommitmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "CommitmentsScopedList", - "description": "[Output Only] Name of the scope containing this set of commitments." - }, - "description": "A list of CommitmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#commitmentAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#commitmentAggregatedList for aggregated lists of\ncommitments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CommitmentList": { - "description": "Contains a list of Commitment resources.", - "id": "CommitmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Commitment resources.", - "items": { - "$ref": "Commitment" - }, - "type": "array" - }, - "kind": { - "default": "compute#commitmentList", - "description": "[Output Only] Type of resource. Always compute#commitmentList\nfor lists of commitments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CommitmentResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "CommitmentResourceStatus", - "properties": { - "customTermEligibilityEndTimestamp": { - "description": "[Output Only] Indicates the end time of customer's eligibility to send\ncustom term requests in RFC3339 text format. Term extension requests that\n(not the end time in the request) after this time will be rejected.", - "type": "string" - } - }, - "type": "object" - }, - "CommitmentsScopedList": { - "id": "CommitmentsScopedList", - "properties": { - "commitments": { - "description": "[Output Only] The list of commitments contained in this scope.", - "items": { - "$ref": "Commitment" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of commitments\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthCheck": { - "description": "Represents a composite health check.\n\nA composite health check resource specifies the health source resources and\nthe health destination resource to which the aggregated health result from\nthe health source resources is delivered.", - "id": "CompositeHealthCheck", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a CompositeHealthCheck. An up-to-date fingerprint\nmust be provided in order to patch the CompositeHealthCheck; Otherwise,\nthe request will fail with error 412 conditionNotMet. To see\nthe latest fingerprint, make a get() request to retrieve the\nCompositeHealthCheck.", - "format": "byte", - "type": "string" - }, - "healthDestination": { - "description": "URL to the destination resource. Must be set. Must be aForwardingRule. The ForwardingRule must have\nload balancing scheme INTERNAL orINTERNAL_MANAGED and must be regional and in the same region\nas the CompositeHealthCheck (cross-region deployment forINTERNAL_MANAGED is not supported). Can be mutated.", - "type": "string" - }, - "healthSources": { - "description": "URLs to the HealthSource resources whose results are AND'ed.\nI.e. he aggregated result is is HEALTHY only if all sources\nare HEALTHY. Must have at least 1. Must not have more than 10.\nMust be regional and in the same region as theCompositeHealthCheck. Can be mutated.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#compositeHealthCheck", - "description": "[Output Only] Type of the resource. Alwayscompute#compositeHealthCheck for composite health checks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the composite health check resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "CompositeHealthCheckAggregatedList": { - "description": "Contains a list of CompositeHealthChecksScopedList.", - "id": "CompositeHealthCheckAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "CompositeHealthChecksScopedList", - "description": "Name of the scope containing this set of CompositeHealthChecks." - }, - "description": "A list of CompositeHealthChecksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#compositeHealthCheckAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthCheckList": { - "id": "CompositeHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of CompositeHealthCheck resources.", - "items": { - "$ref": "CompositeHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#compositeHealthCheckList", - "description": "[Output Only] Type of the resource. Alwayscompute#compositeHealthCheck for composite health checks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CompositeHealthChecksScopedList": { - "id": "CompositeHealthChecksScopedList", - "properties": { - "compositeHealthChecks": { - "description": "A list of CompositeHealthChecks contained in this scope.", - "items": { - "$ref": "CompositeHealthCheck" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of composite health checks\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ConfidentialInstanceConfig": { - "description": "A set of Confidential Instance options.", - "id": "ConfidentialInstanceConfig", - "properties": { - "confidentialInstanceType": { - "description": "Defines the type of technology used by the confidential instance.", - "enum": [ - "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", - "SEV", - "SEV_SNP", - "TDX" - ], - "enumDescriptions": [ - "No type specified. Do not use this value.", - "AMD Secure Encrypted Virtualization.", - "AMD Secure Encrypted Virtualization - Secure Nested Paging.", - "Intel Trust Domain eXtension." - ], - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Defines whether the instance should have confidential compute enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "ConnectionDraining": { - "description": "Message containing connection draining configuration.", - "id": "ConnectionDraining", - "properties": { - "drainingTimeoutSec": { - "description": "Configures a duration timeout for existing requests on a removed backend\ninstance. For supported load balancers and protocols, as described inEnabling\nconnection draining.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ConsistentHashLoadBalancerSettings": { - "description": "This message defines settings for a consistent hash style load balancer.", - "id": "ConsistentHashLoadBalancerSettings", - "properties": { - "httpCookie": { - "$ref": "ConsistentHashLoadBalancerSettingsHttpCookie", - "description": "Hash is based on HTTP Cookie. This field describes a HTTP cookie that will\nbe used as the hash key for the consistent hash load balancer. If the\ncookie is not present, it will be generated. This field is applicable if\nthe sessionAffinity is set to HTTP_COOKIE.\n\nNot supported when the backend service is referenced by a URL map that is\nbound to target gRPC proxy that has validateForProxyless field set to true." - }, - "httpHeaderName": { - "description": "The hash based on the value of the specified header field. This field is\napplicable if the sessionAffinity is set toHEADER_FIELD.", - "type": "string" - }, - "minimumRingSize": { - "description": "The minimum number of virtual nodes to use for the hash ring. Defaults to\n1024. Larger ring sizes result in more granular load distributions. If the\nnumber of hosts in the load balancing pool is larger than the ring size,\neach host will be assigned a single virtual node.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ConsistentHashLoadBalancerSettingsHttpCookie": { - "description": "The information about the HTTP Cookie on which the hash function is based\nfor load balancing policies that use a consistent hash.", - "id": "ConsistentHashLoadBalancerSettingsHttpCookie", - "properties": { - "name": { - "description": "Name of the cookie.", - "type": "string" - }, - "path": { - "description": "Path to set for the cookie.", - "type": "string" - }, - "ttl": { - "$ref": "Duration", - "description": "Lifetime of the cookie." - } - }, - "type": "object" - }, - "CorsPolicy": { - "description": "The specification for allowing client-side cross-origin requests. For more\ninformation about the W3C recommendation for cross-origin resource sharing\n(CORS), see Fetch API Living\nStandard.", - "id": "CorsPolicy", - "properties": { - "allowCredentials": { - "description": "In response to a preflight request, setting this to true\nindicates that\nthe actual request can include user credentials. This field translates to\nthe Access-Control-Allow-Credentials header.\n\nDefault is false.", - "type": "boolean" - }, - "allowHeaders": { - "description": "Specifies the content for the Access-Control-Allow-Headers\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowMethods": { - "description": "Specifies the content for the Access-Control-Allow-Methods\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOriginRegexes": { - "description": "Specifies a regular expression that matches allowed origins. For\nmore information, see regular expression syntax. \n\nAn origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOrigins": { - "description": "Specifies the list of origins that is allowed to do CORS requests.\n\nAn origin is allowed if it matches either an item inallowOrigins or an item inallowOriginRegexes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "disabled": { - "description": "If true, disables the CORS policy.\nThe default value is false, which indicates that the CORS\npolicy is in effect.", - "type": "boolean" - }, - "exposeHeaders": { - "description": "Specifies the content for the Access-Control-Expose-Headers\nheader.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxAge": { - "description": "Specifies how long results of a preflight request can be cached in\nseconds. This field translates to the Access-Control-Max-Age\nheader.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "CrossSiteNetwork": { - "description": "A resource that represents a cross-site network.\n\nYou can use cross-site networks to connect your on-premises networks to\neach other through Interconnect connections.", - "id": "CrossSiteNetwork", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of the cross-site network.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#crossSiteNetwork", - "description": "[Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for cross-site networks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "CrossSiteNetworkList": { - "description": "Response to the list request that contains a list of cross-site networks.", - "id": "CrossSiteNetworkList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of CrossSiteNetwork resources.", - "items": { - "$ref": "CrossSiteNetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#crossSiteNetwork", - "description": "[Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for cross-site networks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "CustomErrorResponsePolicy": { - "description": "Specifies the custom error response policy that must be applied when the\nbackend service or backend bucket responds with an error.", - "id": "CustomErrorResponsePolicy", - "properties": { - "errorResponseRules": { - "description": "Specifies rules for returning error responses.\n\nIn a given policy, if you specify rules for both a range of error codes\nas well as rules for specific error codes then rules with specific error\ncodes have a higher priority. For example, assume that you configure a rule\nfor 401 (Un-authorized) code, and another for all 4 series\nerror codes (4XX). If the backend service returns a401, then the rule for 401 will be applied.\nHowever if the backend service returns a 403, the rule for4xx takes effect.", - "items": { - "$ref": "CustomErrorResponsePolicyCustomErrorResponseRule" - }, - "type": "array" - }, - "errorService": { - "description": "The full or partial URL to the BackendBucket resource that\ncontains the custom error content. Examples are:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket\n - compute/v1/projects/project/global/backendBuckets/myBackendBucket\n - global/backendBuckets/myBackendBucket\n\nIf errorService is not specified at lower levels likepathMatcher, pathRule and routeRule,\nan errorService specified at a higher level in theUrlMap will be used. IfUrlMap.defaultCustomErrorResponsePolicy contains one or moreerrorResponseRules[], it must specifyerrorService. \n\nIf load balancer cannot reach\nthe backendBucket, a simple Not Found Error will\nbe returned, with the original response code (oroverrideResponseCode if configured).\n\nerrorService is not supported for internal or regionalHTTP/HTTPS load balancers.", - "type": "string" - } - }, - "type": "object" - }, - "CustomErrorResponsePolicyCustomErrorResponseRule": { - "description": "Specifies the mapping between the response code that will be returned along\nwith the custom error content and the response code returned by the backend\nservice.", - "id": "CustomErrorResponsePolicyCustomErrorResponseRule", - "properties": { - "matchResponseCodes": { - "description": "Valid values include:\n \n \n - A number between 400 and 599: For example\n 401 or 503, in which case the load balancer\n applies the policy if the error code exactly matches this value.\n - 5xx: Load Balancer will apply the policy if the\n backend service responds with any response code in the range of\n 500 to 599. \n - 4xx: Load\n Balancer will apply the policy if the backend service responds with any\n response code in the range of 400 to\n 499.\n\nValues must be unique within matchResponseCodes and across allerrorResponseRules ofCustomErrorResponsePolicy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "overrideResponseCode": { - "description": "The HTTP status code returned with the response containing the custom\nerror content. If overrideResponseCode is not supplied, the\nsame response code returned by the original backend bucket or backend\nservice is returned to the client.", - "format": "int32", - "type": "integer" - }, - "path": { - "description": "The full path to a file within backendBucket . For example:/errors/defaultError.html \n\npath must start\nwith a leading slash. path cannot have trailing slashes.\n\nIf the file is not available in backendBucket or the\nload balancer cannot reach the BackendBucket, a simpleNot Found Error is returned to the client. \n\nThe value must\nbe from 1 to 1024 characters", - "type": "string" - } - }, - "type": "object" - }, - "CustomerEncryptionKey": { - "id": "CustomerEncryptionKey", - "properties": { - "kmsKeyName": { - "description": "The name of the encryption key that is stored in Google Cloud KMS.\nFor example:\n\n\"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n\nThe fully-qualifed key name may be returned for resource GET requests. For \nexample: \n\n\"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n/cryptoKeyVersions/1", - "type": "string" - }, - "kmsKeyServiceAccount": { - "description": "The service account being used for the encryption request for the given KMS\nkey. If absent, the Compute Engine default service account is used.\nFor example:\n\n\"kmsKeyServiceAccount\": \"name@project_id.iam.gserviceaccount.com/", - "type": "string" - }, - "rawKey": { - "description": "Specifies a 256-bit customer-supplied\nencryption key, encoded in RFC\n4648 base64 to either encrypt or decrypt this resource. You can\nprovide either the rawKey or thersaEncryptedKey.\nFor example:\n\n\"rawKey\":\n\"SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=\"", - "type": "string" - }, - "rsaEncryptedKey": { - "description": "Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit\ncustomer-supplied encryption key to either encrypt or decrypt this\nresource. You can provide either the rawKey or thersaEncryptedKey.\nFor example:\n\n\"rsaEncryptedKey\":\n\"ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH\nz0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD\nD6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==\"\n\nThe key must meet the following requirements before you can provide it to \nCompute Engine: \n \n 1. The key is wrapped using a RSA public key certificate provided by \n Google. \n 2. After being wrapped, the key must be encoded in RFC 4648 base64 \n encoding. \n\nGets the RSA public key certificate provided by Google at: \n\n\nhttps://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem", - "type": "string" - }, - "sha256": { - "description": "[Output only] TheRFC\n4648 base64 encoded SHA-256 hash of the customer-supplied\nencryption key that protects this resource.", - "type": "string" - } - }, - "type": "object" - }, - "CustomerEncryptionKeyProtectedDisk": { - "id": "CustomerEncryptionKeyProtectedDisk", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with the disk with acustomer-supplied\nencryption key." - }, - "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk\nresource. This field is only applicable for persistent disks.\nFor example:\n\n\"source\": \"/compute/v1/projects/project_id/zones/zone/disks/\ndisk_name", - "type": "string" - } - }, - "type": "object" - }, - "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of\nday and time zone are either specified elsewhere or are insignificant. The\ndate is relative to the Gregorian Calendar. This can represent one of the\nfollowing:\n\n* A full date, with non-zero year, month, and day values.\n* A month and day, with a zero year (for example, an anniversary).\n* A year on its own, with a zero month and a zero day.\n* A year and month, with a zero day (for example, a credit card expiration\n date).\n\nRelated types:\n\n* google.type.TimeOfDay\n* google.type.DateTime\n* google.protobuf.Timestamp", - "id": "Date", - "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0\nto specify a year by itself or a year and month where the day isn't\nsignificant.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a\nmonth and day.", - "format": "int32", - "type": "integer" - }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without\na year.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "DeprecationStatus": { - "description": "Deprecation status for a public resource.", - "id": "DeprecationStatus", - "properties": { - "deleted": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to DELETED. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "deprecated": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to DEPRECATED. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "obsolete": { - "description": "An optional RFC3339 timestamp on or after which the state of this\nresource is intended to change to OBSOLETE. This is only\ninformational and the status will not change unless the client explicitly\nchanges it.", - "type": "string" - }, - "replacement": { - "description": "The URL of the suggested replacement for a deprecated resource.\nThe suggested replacement resource must be the same kind of resource as the\ndeprecated resource.", - "type": "string" - }, - "state": { - "description": "The deprecation state of this resource. This can be ACTIVE,DEPRECATED, OBSOLETE, or DELETED.\nOperations which communicate the end of life date for an image, can useACTIVE. Operations which create a new resource using aDEPRECATED resource will return successfully, but with a\nwarning indicating the deprecated resource and recommending its\nreplacement. Operations which use OBSOLETE orDELETED resources will be rejected and result in an error.", - "enum": [ - "ACTIVE", - "DELETED", - "DEPRECATED", - "OBSOLETE" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "stateOverride": { - "$ref": "RolloutPolicy", - "description": "The rollout policy for this deprecation. This policy is only enforced by\nimage family views. The rollout policy restricts the zones where the\nassociated resource is considered in a deprecated state. When the rollout\npolicy does not include the user specified zone, or if the zone is rolled\nout, the associated resource is considered in a deprecated state.\n\nThe rollout policy for this deprecation is read-only, except for\nallowlisted users. This field might not be configured. To view the latest\nnon-deprecated image in a specific zone, use theimageFamilyViews.get method." - } - }, - "type": "object" - }, - "Disk": { - "description": "Represents a Persistent Disk resource.\n\nGoogle Compute Engine has two Disk resources:\n\n* [Zonal](/compute/docs/reference/rest/beta/disks)\n* [Regional](/compute/docs/reference/rest/beta/regionDisks)\n\nPersistent disks are required for running your VM instances.\nCreate both boot and non-boot (data) persistent disks. For more information,\nread Persistent Disks. For more\nstorage options, read Storage options.\n\nThe disks resource represents a zonal persistent disk.\nFor more information, readZonal persistent disks.\n\nThe regionDisks resource represents a\nregional persistent disk. For more information, read\nRegional resources.", - "id": "Disk", - "properties": { - "accessMode": { - "description": "The access mode of the disk.\n \n \n - READ_WRITE_SINGLE: The default AccessMode, means the\n disk can be attached to single instance in RW mode.\n - READ_WRITE_MANY: The AccessMode means the disk can be\n attached to multiple instances in RW mode.\n - READ_ONLY_MANY: The AccessMode means the disk can be\n attached to multiple instances in RO mode.\n\n\nThe AccessMode is only valid for Hyperdisk disk types.", - "enum": [ - "READ_ONLY_MANY", - "READ_WRITE_MANY", - "READ_WRITE_SINGLE" - ], - "enumDescriptions": [ - "The AccessMode means the disk can be attached to multiple instances in RO\nmode.", - "The AccessMode means the disk can be attached to multiple instances in RW\nmode.", - "The default AccessMode, means the disk can be attached to single instance\nin RW mode." - ], - "type": "string" - }, - "architecture": { - "description": "The architecture of the disk. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "asyncPrimaryDisk": { - "$ref": "DiskAsyncReplication", - "description": "Disk asynchronously replicated into this disk." - }, - "asyncSecondaryDisks": { - "additionalProperties": { - "$ref": "DiskAsyncReplicationList" - }, - "description": "[Output Only] A list of disks this disk is asynchronously replicated to.", - "type": "object" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the disk using a\ncustomer-supplied encryption key or a \ncustomer-managed encryption key.\n\nEncryption keys do not protect access to metadata of the disk.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the\nsame key if you use the disk later. For example, to create a disk snapshot,\nto create a disk image, to create a machine image, or to attach the disk to\na virtual machine.\n\nAfter you encrypt a disk with a customer-managed key, thediskEncryptionKey.kmsKeyName is set to a key *version*\nname once the disk is created. The disk is encrypted with this version of\nthe key. In the response, diskEncryptionKey.kmsKeyName appears\nin the following format:\n\n\"diskEncryptionKey.kmsKeyName\":\n\"projects/kms_project_id/locations/region/keyRings/\nkey_region/cryptoKeys/key\n/cryptoKeysVersions/version\n\nIf you do not provide an encryption key when creating the disk, then the \ndisk is encrypted using an automatically generated key and you don't need \nto provide a key to use the disk later." - }, - "enableConfidentialCompute": { - "description": "Whether this disk is using confidential compute mode.", - "type": "boolean" - }, - "eraseWindowsVssSignature": { - "description": "Specifies whether the disk restored from a source snapshot should erase\nWindows specific VSS signature.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interface": { - "deprecated": true, - "description": "[Deprecated] Specifies the disk interface to use for attaching this disk,\nwhich is either SCSI or NVME. The default isSCSI.", - "enum": [ - "NVME", - "SCSI", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#disk", - "description": "[Output Only] Type of the resource. Always compute#disk for\ndisks.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this disk, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a disk.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this disk. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "lastAttachTimestamp": { - "description": "[Output Only] Last attach timestamp inRFC3339\ntext format.", - "type": "string" - }, - "lastDetachTimestamp": { - "description": "[Output Only] Last detach timestamp inRFC3339\ntext format.", - "type": "string" - }, - "licenseCodes": { - "description": "Integer license codes indicating which licenses are attached to this disk.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "A list of publicly visible licenses. Reserved for Google's use.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the disk close to other resources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "locked": { - "description": "[Output Only] The field indicates if the disk is created from a locked\nsource image. Attachment of a disk created from a locked source image will\ncause the following operations to become irreversibly prohibited:\n \n - R/W or R/O disk attachment to any other instance\n - Disk detachment. And the disk can only be deleted when the instance\n is deleted\n - Creation of images or snapshots\n - Disk cloning\n\n\n\nFurthermore, the instance with at least one disk with locked flag set to\ntrue will be prohibited from performing the operations below:\n \n - Further attachment of secondary disks.\n - Detachment of any disks\n - Create machine images\n - Create instance template\n - Delete the instance with --keep-disk parameter set to true for locked\n disks\n - Attach a locked disk with --auto-delete parameter set to false", - "type": "boolean" - }, - "multiWriter": { - "description": "Indicates whether or not the disk can be read/write attached to\nmore than one instance.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.disks.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "options": { - "description": "Internal use only.", - "type": "string" - }, - "params": { - "$ref": "DiskParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "physicalBlockSizeBytes": { - "description": "Physical block size of the persistent disk, in bytes.\nIf not present in a request, a default value is used.\nThe currently supported size is 4096, other sizes may be added in\nthe future.\nIf an unsupported value is requested, the error message will list\nthe supported values for the caller's project.", - "format": "int64", - "type": "string" - }, - "provisionedIops": { - "description": "Indicates how many IOPS to provision for the disk. This sets the number\nof I/O operations per second that the disk can handle. Values must be\nbetween 10,000 and 120,000. For more details, see theExtreme persistent\ndisk documentation.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "Indicates how much throughput to provision for the disk. This sets the\nnumber of throughput mb per second that the disk can handle. Values must be\ngreater than or equal to 1.", - "format": "int64", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the disk resides. Only applicable for\nregional resources.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "replicaZones": { - "description": "URLs of the zones where the disk should be replicated to. Only applicable\nfor regional resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourcePolicies": { - "description": "Resource policies applied to this disk for automatic snapshot creations.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "DiskResourceStatus", - "description": "[Output Only] Status information for the disk resource." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "sizeGb": { - "description": "Size, in GB, of the persistent disk. You can specify\nthis field when creating a persistent disk using thesourceImage, sourceSnapshot, orsourceDisk parameter, or specify it alone to create an empty\npersistent disk.\n\nIf you specify this field along with a source, the value ofsizeGb must not be less than the size of the\nsource.\nAcceptable values are greater than 0.", - "format": "int64", - "type": "string" - }, - "sourceConsistencyGroupPolicy": { - "description": "[Output Only] URL of the DiskConsistencyGroupPolicy for a secondary disk\nthat was created using a consistency group.", - "type": "string" - }, - "sourceConsistencyGroupPolicyId": { - "description": "[Output Only] ID of the DiskConsistencyGroupPolicy for a secondary disk\nthat was created using a consistency group.", - "type": "string" - }, - "sourceDisk": { - "description": "The source disk used to create this disk. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The unique ID of the disk used to create this disk. This\nvalue identifies the exact disk that was used to create this persistent\ndisk. For example, if you created the persistent disk from a disk that\nwas later deleted and recreated under the same name, the source disk ID\nwould identify the exact version of the disk that was used.", - "type": "string" - }, - "sourceImage": { - "description": "The source image used to create this disk. If the source image is\ndeleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify\nthe image by its family name. For example, specifyfamily/debian-9 to use the latest Debian 9 image:\n\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the\nimage name in the following format:\n\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns\nthe latest version of the image in that family. Replace the image name\nwith family/family-name:\n\nglobal/images/family/my-image-family", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source image. Required if the source image is\nprotected by a customer-supplied encryption key." - }, - "sourceImageId": { - "description": "[Output Only] The ID value of the image used to create this disk. This\nvalue identifies the exact image that was used to create this persistent\ndisk. For example, if you created the persistent disk from an image that\nwas later deleted and recreated under the same name, the source image ID\nwould identify the exact version of the image that was used.", - "type": "string" - }, - "sourceInstantSnapshot": { - "description": "The source instant snapshot used to create this disk. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot\n - projects/project/zones/zone/instantSnapshots/instantSnapshot \n - zones/zone/instantSnapshots/instantSnapshot", - "type": "string" - }, - "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this\ndisk. This value identifies the exact instant snapshot that was used to\ncreate this persistent disk. For example, if you created the persistent\ndisk from an instant snapshot that was later deleted and recreated under\nthe same name, the source instant snapshot ID would identify the exact\nversion of the instant snapshot that was used.", - "type": "string" - }, - "sourceSnapshot": { - "description": "The source snapshot used to create this disk. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n - projects/project/global/snapshots/snapshot\n - global/snapshots/snapshot", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source snapshot. Required if the source snapshot\nis protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "description": "[Output Only] The unique ID of the snapshot used to create this disk. This\nvalue identifies the exact snapshot that was used to create this persistent\ndisk. For example, if you created the persistent disk from a snapshot that\nwas later deleted and recreated under the same name, the source snapshot ID\nwould identify the exact version of the snapshot that was used.", - "type": "string" - }, - "sourceStorageObject": { - "description": "The full Google Cloud Storage URI where the disk image is stored. This file\nmust be a gzip-compressed tarball whose name ends in .tar.gz or virtual\nmachine disk whose name ends in vmdk. Valid URIs may start with gs:// or\nhttps://storage.googleapis.com/. This flag is not optimized for creating\nmultiple disks from a source storage object. To create many disks from a\nsource storage object, use gcloud compute images\nimport instead.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of disk creation.\n \n \n - CREATING: Disk is provisioning.\n - RESTORING: Source data is being copied into the\n disk.\n - FAILED: Disk creation failed.\n - READY: Disk is ready for use.\n - DELETING: Disk is deleting.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "RESTORING", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "Disk is provisioning", - "Disk is deleting.", - "Disk creation failed.", - "Disk is ready for use.", - "Source data is being copied into the disk.", - "Disk is currently unavailable and cannot be accessed, attached or\ndetached." - ], - "type": "string" - }, - "storagePool": { - "description": "The storage pool in which the new disk is created. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool\n - projects/project/zones/zone/storagePools/storagePool \n - zones/zone/storagePools/storagePool", - "type": "string" - }, - "storageType": { - "description": "[Deprecated] Storage type of the persistent disk.", - "enum": [ - "HDD", - "SSD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": { - "description": "URL of the disk type resource describing which disk type to use to create\nthe disk. Provide this when creating the disk. For example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent disk\ntypes.", - "type": "string" - }, - "userLicenses": { - "description": "A list of publicly visible user-licenses. Unlike regular licenses, user\nprovided licenses can be modified after the disk is created. This includes\na list of URLs to the license resource. For example, to provide a debian\nlicense:\n\nhttps://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch", - "items": { - "type": "string" - }, - "type": "array" - }, - "users": { - "description": "[Output Only] Links to the users of the disk (attached instances)\nin form:projects/project/zones/zone/instances/instance", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the disk resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "DiskAggregatedList": { - "id": "DiskAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "DisksScopedList", - "description": "[Output Only] Name of the scope containing this set of disks." - }, - "description": "A list of DisksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#diskAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#diskAggregatedList for aggregated lists of persistent\ndisks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskAsyncReplication": { - "id": "DiskAsyncReplication", - "properties": { - "consistencyGroupPolicy": { - "description": "[Output Only] URL of the DiskConsistencyGroupPolicy if replication was\nstarted on the disk as a member of a group.", - "type": "string" - }, - "consistencyGroupPolicyId": { - "description": "[Output Only] ID of the DiskConsistencyGroupPolicy if replication was\nstarted on the disk as a member of a group.", - "type": "string" - }, - "disk": { - "description": "The other disk asynchronously replicated to or from the current disk.\nYou can provide this as a partial or full URL to the resource.\nFor example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - }, - "diskId": { - "description": "[Output Only] The unique ID of the other disk asynchronously replicated\nto or from the current disk. This value identifies the exact disk that\nwas used to create this replication. For example, if you started\nreplicating the persistent disk from a disk that was later deleted and\nrecreated under the same name, the disk ID would identify the exact\nversion of the disk that was used.", - "type": "string" - } - }, - "type": "object" - }, - "DiskAsyncReplicationList": { - "id": "DiskAsyncReplicationList", - "properties": { - "asyncReplicationDisk": { - "$ref": "DiskAsyncReplication" - } - }, - "type": "object" - }, - "DiskInstantiationConfig": { - "description": "A specification of the desired way to instantiate a disk in the instance\ntemplate when its created from a source instance.", - "id": "DiskInstantiationConfig", - "properties": { - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "customImage": { - "description": "The custom source image to be used to restore this disk when instantiating\nthis instance template.", - "type": "string" - }, - "deviceName": { - "description": "Specifies the device name of the disk to which the configurations apply to.", - "type": "string" - }, - "instantiateFrom": { - "description": "Specifies whether to include the disk and what image to use. Possible\nvalues are:\n \n \n - source-image: to use the same image that was used to\n create the source instance's corresponding disk. Applicable to the boot\n disk and additional read-write disks.\n - source-image-family: to use the same image family that\n was used to create the source instance's corresponding disk. Applicable\n to the boot disk and additional read-write disks.\n - custom-image: to use a user-provided image url for disk\n creation. Applicable to the boot disk and additional read-write\n disks. \n - attach-read-only: to attach a read-only\n disk. Applicable to read-only disks.\n - do-not-include: to exclude a disk from the template.\n Applicable to additional read-write disks, local SSDs, and read-only\n disks.", - "enum": [ - "ATTACH_READ_ONLY", - "BLANK", - "CUSTOM_IMAGE", - "DEFAULT", - "DO_NOT_INCLUDE", - "SOURCE_IMAGE", - "SOURCE_IMAGE_FAMILY" - ], - "enumDescriptions": [ - "Attach the existing disk in read-only mode. The request will fail if the\ndisk was attached in read-write mode on the source instance. Applicable\nto: read-only disks.", - "Create a blank disk. The disk will be created unformatted. Applicable to:\nadditional read-write disks, local SSDs.", - "Use the custom image specified in the custom_image field. Applicable to:\nboot disk, additional read-write disks.", - "Use the default instantiation option for the corresponding type of disk.\nFor boot disk and any other R/W disks, new custom images will be created\nfrom each disk. For read-only disks, they will be attached in read-only\nmode. Local SSD disks will be created as blank volumes.", - "Do not include the disk in the instance template. Applicable to:\nadditional read-write disks, local SSDs, read-only disks.", - "Use the same source image used for creation of the source instance's\ncorresponding disk. The request will fail if the source VM's disk was\ncreated from a snapshot. Applicable to: boot disk, additional read-write\ndisks.", - "Use the same source image family used for creation of the source\ninstance's corresponding disk. The request will fail if the source image\nof the source disk does not belong to any image family. Applicable to:\nboot disk, additional read-write disks." - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskList": { - "description": "A list of Disk resources.", - "id": "DiskList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Disk resources.", - "items": { - "$ref": "Disk" - }, - "type": "array" - }, - "kind": { - "default": "compute#diskList", - "description": "[Output Only] Type of resource. Always compute#diskList for\nlists of disks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskMoveRequest": { - "id": "DiskMoveRequest", - "properties": { - "destinationZone": { - "description": "The URL of the destination zone to move the disk. This can be a full or\npartial URL. For example, the following are all valid URLs to a zone:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n - projects/project/zones/zone \n - zones/zone", - "type": "string" - }, - "targetDisk": { - "description": "The URL of the target disk to move. This can be a full or partial URL.\nFor example, the following are all valid URLs to a disk:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "DiskParams": { - "description": "Additional disk params.", - "id": "DiskParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the disk. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "DiskResourceStatus": { - "id": "DiskResourceStatus", - "properties": { - "asyncPrimaryDisk": { - "$ref": "DiskResourceStatusAsyncReplicationStatus" - }, - "asyncSecondaryDisks": { - "additionalProperties": { - "$ref": "DiskResourceStatusAsyncReplicationStatus" - }, - "description": "Key: disk, value: AsyncReplicationStatus message", - "type": "object" - } - }, - "type": "object" - }, - "DiskResourceStatusAsyncReplicationStatus": { - "id": "DiskResourceStatusAsyncReplicationStatus", - "properties": { - "state": { - "enum": [ - "ACTIVE", - "CREATED", - "STARTING", - "STATE_UNSPECIFIED", - "STOPPED", - "STOPPING" - ], - "enumDescriptions": [ - "Replication is active.", - "Secondary disk is created and is waiting for replication to start.", - "Replication is starting.", - "", - "Replication is stopped.", - "Replication is stopping." - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskSettings": { - "id": "DiskSettings", - "properties": { - "accessLocation": { - "$ref": "DiskSettingsAccessLocation", - "description": "Policy of which locations are allowed to create regional\nsnapshots." - } - }, - "type": "object" - }, - "DiskSettingsAccessLocation": { - "description": "AccessLocation is only used for regional snapshot. It contains which\nregions are allowed to create a regional snapshot from disks located in the\ngiven region/zone.\nIt includes key-value pairs designed to store the following structure. The\nkeys should match their corresponding values, which must be provided:\naccess_location: {\n locations {\n us-central1 {\n region: \"us-central1\"\n },\n asia-west2 {\n region: \"asia-west2\"\n }\n }\n}", - "id": "DiskSettingsAccessLocation", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "DiskSettingsAccessLocationAccessLocationPreference" - }, - "description": "List of regions that can create a regional\nsnapshot from the current region", - "type": "object" - }, - "policy": { - "description": "Policy of which location is allowed to access snapshot.", - "enum": [ - "ALL_REGIONS", - "POLICY_UNSPECIFIED", - "SPECIFIC_REGIONS" - ], - "enumDescriptions": [ - "Any regions will be able to access the source location.", - "", - "Only allowlisted regions will be able to create region scoped\nsnapshots" - ], - "type": "string" - } - }, - "type": "object" - }, - "DiskSettingsAccessLocationAccessLocationPreference": { - "description": "A structure for specifying an allowed target region to create snapshot.", - "id": "DiskSettingsAccessLocationAccessLocationPreference", - "properties": { - "region": { - "description": "Accessible region name", - "type": "string" - } - }, - "type": "object" - }, - "DiskType": { - "description": "Represents a Disk Type resource.\n\nGoogle Compute Engine has two Disk Type resources:\n\n* [Regional](/compute/docs/reference/rest/beta/regionDiskTypes)\n* [Zonal](/compute/docs/reference/rest/beta/diskTypes)\n\nYou can choose from a variety of disk types based on your needs.\nFor more information, readStorage options.\n\nThe diskTypes resource represents disk types for a zonal\npersistent disk.\nFor more information, readZonal persistent disks.\n\nThe regionDiskTypes resource represents disk types for a\nregional persistent disk. For more information, read Regional persistent disks.", - "id": "DiskType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultDiskSizeGb": { - "description": "[Output Only] Server-defined default disk size in GB.", - "format": "int64", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this disk type." - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#diskType", - "description": "[Output Only] Type of the resource. Always compute#diskType\nfor disk types.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the disk type resides. Only\napplicable for regional resources.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "validDiskSize": { - "description": "[Output Only] An optional textual description of the valid disk size,\nsuch as \"10GB-10TB\".", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the disk type resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "DiskTypeAggregatedList": { - "id": "DiskTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "DiskTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of disk types." - }, - "description": "A list of DiskTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#diskTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#diskTypeAggregatedList.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskTypeList": { - "description": "Contains a list of disk types.", - "id": "DiskTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "kind": { - "default": "compute#diskTypeList", - "description": "[Output Only] Type of resource. Always compute#diskTypeList\nfor disk types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DiskTypesScopedList": { - "id": "DiskTypesScopedList", - "properties": { - "diskTypes": { - "description": "[Output Only] A list of disk types contained in this scope.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of disk types\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DisksAddResourcePoliciesRequest": { - "id": "DisksAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Full or relative path to the resource policy to be added to this disk. You\ncan only specify one resource policy.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "DisksRemoveResourcePoliciesRequest": { - "id": "DisksRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "DisksResizeRequest": { - "id": "DisksResizeRequest", - "properties": { - "sizeGb": { - "description": "The new size of the persistent disk, which is specified in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "DisksScopedList": { - "id": "DisksScopedList", - "properties": { - "disks": { - "description": "[Output Only] A list of disks contained in this scope.", - "items": { - "$ref": "Disk" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of disks when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "DisksStartAsyncReplicationRequest": { - "id": "DisksStartAsyncReplicationRequest", - "properties": { - "asyncSecondaryDisk": { - "description": "The secondary disk to start asynchronous replication to.\nYou can provide this as a partial or full URL to the resource. For example,\nthe following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "DisksStopGroupAsyncReplicationResource": { - "description": "A transient resource used in compute.disks.stopGroupAsyncReplication and\ncompute.regionDisks.stopGroupAsyncReplication. It is only used to process\nrequests and is not persisted.", - "id": "DisksStopGroupAsyncReplicationResource", - "properties": { - "resourcePolicy": { - "description": "The URL of the DiskConsistencyGroupPolicy for the group of disks to stop.\nThis may be a full or partial URL, such as:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n projects/project/regions/region/resourcePolicies/resourcePolicy\n \n - \n regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "DisplayDevice": { - "description": "A set of Display Device options", - "id": "DisplayDevice", - "properties": { - "enableDisplay": { - "description": "Defines whether the instance has Display enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "DistributionPolicy": { - "id": "DistributionPolicy", - "properties": { - "targetShape": { - "description": "The distribution shape to which the group converges either proactively or\non resize events (depending on the value set inupdatePolicy.instanceRedistributionType).", - "enum": [ - "ANY", - "ANY_SINGLE_ZONE", - "BALANCED", - "EVEN" - ], - "enumDescriptions": [ - "The group picks zones for creating VM instances to fulfill the requested\nnumber of VMs within present resource constraints and to maximize\nutilization of unused zonal reservations. Recommended for batch workloads\nthat do not require high availability.", - "The group creates all VM instances within a single zone. The zone is\nselected based on the present resource constraints and to maximize\nutilization of unused zonal reservations.\nRecommended for batch workloads with heavy interprocess communication.", - "The group prioritizes acquisition of resources, scheduling VMs in zones\nwhere resources are available while distributing VMs as evenly as\npossible across selected zones to minimize the impact of zonal failure.\nRecommended for highly available serving workloads.", - "The group schedules VM instance creation and deletion to achieve and\nmaintain an even number of managed instances across the selected zones.\nThe distribution is even when the number of managed instances does not\ndiffer by more than 1 between any two zones. Recommended for highly\navailable serving workloads." - ], - "type": "string" - }, - "zones": { - "description": "Zones where the regional managed instance group will create and manage\nits instances.", - "items": { - "$ref": "DistributionPolicyZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, - "DistributionPolicyZoneConfiguration": { - "id": "DistributionPolicyZoneConfiguration", - "properties": { - "zone": { - "annotations": { - "required": [ - "compute.regionInstanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.update" - ] - }, - "description": "The URL of thezone.\nThe zone must exist in the region where the managed instance group is\nlocated.", - "type": "string" - } - }, - "type": "object" - }, - "Duration": { - "description": "A Duration represents a fixed-length span of time represented\nas a count of seconds and fractions of seconds at nanosecond\nresolution. It is independent of any calendar and concepts like \"day\"\nor \"month\". Range is approximately 10,000 years.", - "id": "Duration", - "properties": { - "nanos": { - "description": "Span of time that's a fraction of a second at nanosecond resolution.\nDurations less than one second are represented with a 0\n`seconds` field and a positive `nanos` field. Must be from 0\nto 999,999,999 inclusive.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Span of time at a resolution of a second. Must be from 0\nto 315,576,000,000 inclusive. Note: these bounds are computed from:\n60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ErrorInfo": { - "description": "Describes the cause of the error with structured details.\n\nExample of an error when contacting the \"pubsub.googleapis.com\" API when it\nis not enabled:\n\n { \"reason\": \"API_DISABLED\"\n \"domain\": \"googleapis.com\"\n \"metadata\": {\n \"resource\": \"projects/123\",\n \"service\": \"pubsub.googleapis.com\"\n }\n }\n\nThis response indicates that the pubsub.googleapis.com API is not enabled.\n\nExample of an error that is returned when attempting to create a Spanner\ninstance in a region that is out of stock:\n\n { \"reason\": \"STOCKOUT\"\n \"domain\": \"spanner.googleapis.com\",\n \"metadata\": {\n \"availableRegions\": \"us-central1,us-east2\"\n }\n }", - "id": "ErrorInfo", - "properties": { - "domain": { - "description": "The logical grouping to which the \"reason\" belongs. The error domain\nis typically the registered service name of the tool or product that\ngenerates the error. Example: \"pubsub.googleapis.com\". If the error is\ngenerated by some common infrastructure, the error domain must be a\nglobally unique value that identifies the infrastructure. For Google API\ninfrastructure, the error domain is \"googleapis.com\".", - "type": "string" - }, - "metadatas": { - "additionalProperties": { - "type": "string" - }, - "description": "Additional structured details about this error.\n\nKeys must match a regular expression of `a-z+` but should\nideally be lowerCamelCase. Also, they must be limited to 64 characters in\nlength. When identifying the current value of an exceeded limit, the units\nshould be contained in the key, not the value. For example, rather than\n`{\"instanceLimit\": \"100/request\"}`, should be returned as,\n`{\"instanceLimitPerRequest\": \"100\"}`, if the client exceeds the number of\ninstances that can be created in a single (batch) request.", - "type": "object" - }, - "reason": { - "description": "The reason of the error. This is a constant value that identifies the\nproximate cause of the error. Error reasons are unique within a particular\ndomain of errors. This should be at most 63 characters and match a\nregular expression of `A-Z+[A-Z0-9]`, which represents\nUPPER_SNAKE_CASE.", - "type": "string" - } - }, - "type": "object" - }, - "ExchangedPeeringRoute": { - "id": "ExchangedPeeringRoute", - "properties": { - "destRange": { - "description": "The destination range of the route.", - "type": "string" - }, - "imported": { - "description": "True if the peering route has been imported from a peer. The actual import\nhappens if the field networkPeering.importCustomRoutes is true\nfor this network, and networkPeering.exportCustomRoutes is\ntrue for the peer network, and the import does not result in a route\nconflict.", - "type": "boolean" - }, - "nextHopRegion": { - "description": "The region of peering route next hop, only applies to dynamic routes.", - "type": "string" - }, - "priority": { - "description": "The priority of the peering route.", - "format": "uint32", - "type": "integer" - }, - "type": { - "description": "The type of the peering route.", - "enum": [ - "DYNAMIC_PEERING_ROUTE", - "STATIC_PEERING_ROUTE", - "SUBNET_PEERING_ROUTE" - ], - "enumDescriptions": [ - "For routes exported from local network.", - "The peering route.", - "The peering route corresponding to subnetwork range." - ], - "type": "string" - } - }, - "type": "object" - }, - "ExchangedPeeringRoutesList": { - "id": "ExchangedPeeringRoutesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ExchangedPeeringRoute resources.", - "items": { - "$ref": "ExchangedPeeringRoute" - }, - "type": "array" - }, - "kind": { - "default": "compute#exchangedPeeringRoutesList", - "description": "[Output Only] Type of resource. Alwayscompute#exchangedPeeringRoutesList for exchanged peering\nroutes lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL)\nsyntax. CEL is a C-like expression language. The syntax and semantics of CEL\nare documented at https://github.com/google/cel-spec.\n\nExample (Comparison):\n\n title: \"Summary size limit\"\n description: \"Determines if a summary is less than 100 chars\"\n expression: \"document.summary.size() \u003c 100\"\n\nExample (Equality):\n\n title: \"Requestor is owner\"\n description: \"Determines if requestor is the document owner\"\n expression: \"document.owner == request.auth.claims.email\"\n\nExample (Logic):\n\n title: \"Public documents\"\n description: \"Determine whether the document should be publicly visible\"\n expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\"\n\nExample (Data Manipulation):\n\n title: \"Notification string\"\n description: \"Create a notification string with a timestamp.\"\n expression: \"'New message received at ' + string(document.create_time)\"\n\nThe exact variables and functions that may be referenced within an expression\nare determined by the service that evaluates it. See the service\ndocumentation for additional information.", - "id": "Expr", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language\nsyntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error\nreporting, 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\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGateway": { - "description": "Represents an external VPN gateway.\n\nExternal VPN gateway is the on-premises VPN gateway(s) or another cloud\nprovider's VPN gateway that connects to your Google Cloud VPN gateway.\n\nTo create a highly available VPN from Google Cloud Platform to your\nVPN gateway or another cloud provider's VPN gateway, you must create a\nexternal VPN gateway resource with information about the other gateway.\n\nFor more information about using external VPN gateways, see\nCreating an HA VPN gateway and tunnel pair to a peer VPN.", - "id": "ExternalVpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interfaces": { - "description": "A list of interfaces for this external VPN gateway.\n\nIf your peer-side gateway is an on-premises gateway and non-AWS cloud\nproviders' gateway, at most two interfaces can be provided for an external\nVPN gateway. If your peer side is an AWS virtual private gateway, four\ninterfaces should be provided for an external VPN gateway.", - "items": { - "$ref": "ExternalVpnGatewayInterface" - }, - "type": "array" - }, - "kind": { - "default": "compute#externalVpnGateway", - "description": "[Output Only] Type of the resource. Alwayscompute#externalVpnGateway for externalVpnGateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this ExternalVpnGateway,\nwhich is essentially a hash of the labels set used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an ExternalVpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.externalVpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "redundancyType": { - "description": "Indicates the user-supplied redundancy type of this external VPN gateway.", - "enum": [ - "FOUR_IPS_REDUNDANCY", - "SINGLE_IP_INTERNALLY_REDUNDANT", - "TWO_IPS_REDUNDANCY" - ], - "enumDescriptions": [ - "The external VPN gateway has four public IP addresses; at the time of\nwriting this API, the AWS virtual private gateway is an example which has\nfour public IP addresses for high availability connections; there should\nbe two VPN connections in the AWS virtual private gateway , each AWS VPN\nconnection has two public IP addresses; please make sure to put two\npublic IP addresses from one AWS VPN connection into interfaces 0 and 1\nof this external VPN gateway, and put the other two public IP addresses\nfrom another AWS VPN connection into interfaces 2 and 3 of this external\nVPN gateway. When displaying highly available configuration status\nfor the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN\ngateway, Google will always detect whether interfaces 0 and 1 are\nconnected on one interface of HA Cloud VPN gateway, and detect whether\ninterfaces 2 and 3 are connected to another interface of the HA Cloud VPN\ngateway.", - "The external VPN gateway has only one public IP address which internally\nprovide redundancy or failover.", - "The external VPN gateway has two public IP addresses which are redundant\nwith each other, the following two types of setup on your on-premises\nside would have this type of redundancy:\n(1) Two separate on-premises gateways, each with one public IP address,\n the two on-premises gateways are redundant with each other.\n(2) A single on-premise gateway with two public IP addresses that are\n redundant with eatch other." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGatewayInterface": { - "description": "The interface for the external VPN gateway.", - "id": "ExternalVpnGatewayInterface", - "properties": { - "id": { - "description": "The numeric ID of this interface.\nThe allowed input values for this id for different redundancy types of\nexternal VPN gateway:\n \n - SINGLE_IP_INTERNALLY_REDUNDANT - 0\n - TWO_IPS_REDUNDANCY - 0, 1\n - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3", - "format": "uint32", - "type": "integer" - }, - "ipAddress": { - "description": "IP address of the interface in the external VPN gateway. Only IPv4 is\nsupported. This IP address can be either from your on-premise gateway or\nanother Cloud provider's VPN gateway, it cannot be an IP address from\nGoogle Compute Engine.", - "type": "string" - }, - "ipv6Address": { - "description": "IPv6 address of the interface in the external VPN gateway. This IPv6\naddress can be either from your on-premise gateway or another Cloud\nprovider's VPN gateway, it cannot be an IP address from Google Compute\nEngine. Must specify an IPv6 address (not IPV4-mapped) using any format\ndescribed in RFC 4291 (e.g. 2001:db8:0:0:2d9:51:0:0). The output format\nis RFC 5952 format (e.g. 2001:db8::2d9:51:0:0).", - "type": "string" - } - }, - "type": "object" - }, - "ExternalVpnGatewayList": { - "description": "Response to the list request, and contains a list of externalVpnGateways.", - "id": "ExternalVpnGatewayList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ExternalVpnGateway resources.", - "items": { - "$ref": "ExternalVpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#externalVpnGatewayList", - "description": "[Output Only] Type of resource. Always compute#externalVpnGatewayList for lists of externalVpnGateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FileContentBuffer": { - "id": "FileContentBuffer", - "properties": { - "content": { - "description": "The raw content in the secure keys file.", - "format": "byte", - "type": "string" - }, - "fileType": { - "description": "The file type of source file.", - "enum": [ - "BIN", - "UNDEFINED", - "X509" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Firewall": { - "description": "Represents a Firewall Rule resource.\n\nFirewall rules allow or deny ingress traffic to, and egress traffic from your\ninstances. For more information, readFirewall rules.", - "id": "Firewall", - "properties": { - "allowed": { - "description": "The list of ALLOW rules specified by this firewall. Each rule specifies a\nprotocol and port-range tuple that describes a permitted connection.", - "items": { - "properties": { - "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be one of the\nfollowing well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies.\nThis field is only applicable for the UDP or TCP protocol.\nEach entry must be either an integer or a range.\nIf not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"],\nand [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "denied": { - "description": "The list of DENY rules specified by this firewall. Each rule specifies a\nprotocol and port-range tuple that describes a denied connection.", - "items": { - "properties": { - "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be one of the\nfollowing well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies.\nThis field is only applicable for the UDP or TCP protocol.\nEach entry must be either an integer or a range.\nIf not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"],\nand [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "destinationRanges": { - "description": "If destination ranges are specified, the firewall rule applies only to\ntraffic that has destination IP address in these ranges. These ranges must\nbe expressed inCIDR format. Both IPv4 and IPv6 are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "direction": { - "description": "Direction of traffic to which this firewall applies, either `INGRESS` or\n`EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot\nspecify the sourceTags fields.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "Indicates that firewall should apply to outgoing traffic.", - "Indicates that firewall should apply to incoming traffic." - ], - "type": "string" - }, - "disabled": { - "description": "Denotes whether the firewall rule is disabled. When set to true, the\nfirewall rule is not enforced and the network behaves as if it did not\nexist. If this is unspecified, the firewall rule will be enabled.", - "type": "boolean" - }, - "enableLogging": { - "deprecated": true, - "description": "Deprecated in favor of enable in LogConfig.\nThis field denotes whether to enable logging for a particular\nfirewall rule. If logging is enabled, logs will be exported t\nCloud Logging.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#firewall", - "description": "[Output Only] Type of the resource. Always compute#firewall\nfor firewall rules.", - "type": "string" - }, - "logConfig": { - "$ref": "FirewallLogConfig", - "description": "This field denotes the logging options for a particular firewall rule. If\nlogging is enabled, logs will be exported to Cloud Logging." - }, - "name": { - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character\nmust be a lowercase letter, and all following characters (except for the\nlast character) must be a dash, lowercase letter, or digit. The last\ncharacter must be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "URL of the network resource for this firewall rule. If not\nspecified when creating a firewall rule, the default network\nis used:\n\nglobal/networks/default\n\nIf you choose to specify this field, you can specify the network as a full \nor partial URL. For example, the following are all valid URLs: \n \n - \n https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n - projects/myproject/global/networks/my-network \n - global/networks/default", - "type": "string" - }, - "params": { - "$ref": "FirewallParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "priority": { - "description": "Priority for this rule.\nThis is an integer between `0` and `65535`, both inclusive.\nThe default value is `1000`.\nRelative priorities determine which rule takes effect if multiple rules\napply. Lower values indicate higher priority. For example, a rule with\npriority `0` has higher precedence than a rule with priority `1`.\nDENY rules take precedence over ALLOW rules if they have equal priority.\nNote that VPC networks have implied\nrules with a priority of `65535`. To avoid conflicts with the implied\nrules, use a priority number less than `65535`.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sourceRanges": { - "description": "If source ranges are specified, the firewall rule applies only to traffic\nthat has a source IP address in these ranges. These ranges must be\nexpressed inCIDR format. One or both of sourceRanges\nand sourceTags may be set.\nIf both fields are set, the rule applies to traffic that has a\nsource IP address within sourceRanges OR a source IP\nfrom a resource with a matching tag listed in thesourceTags field. The connection does not need to match\nboth fields for the rule to\napply. Both IPv4 and IPv6 are supported.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceServiceAccounts": { - "description": "If source service accounts are specified, the firewall rules apply only to\ntraffic originating from an instance with a service account in this list.\nSource service accounts cannot be used to control traffic to an instance's\nexternal IP address because service accounts are associated with an\ninstance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.\nIf both are set, the firewall applies to traffic that\nhas a source IP address within the sourceRanges OR a source\nIP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match\nboth fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceTags": { - "description": "If source tags are specified, the firewall rule applies only to traffic\nwith source IPs that match the primary network interfaces of VM instances\nthat have the tag and are in the same VPC network.\nSource tags cannot be used to control traffic to an instance's external IP\naddress, it only applies to traffic between instances in the same virtual\nnetwork. Because tags are associated with instances, not IP addresses.\nOne or both of sourceRanges and sourceTags may be\nset. If both fields are set, the firewall applies to traffic that has a\nsource IP address within sourceRanges OR a source IP from a\nresource with a matching tag listed in the sourceTags\nfield. The connection does not need to match both fields for the\nfirewall to apply.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating sets of instances located in the\nnetwork that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.\nIf neither targetServiceAccounts nor targetTags\nare specified, the firewall rule applies to all instances on the specified\nnetwork.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetTags": { - "description": "A list of tags that controls which instances the firewall rule\napplies to. If targetTags are specified, then the firewall\nrule applies only to instances in the VPC network that have one of those\ntags. If no targetTags are specified, the firewall rule\napplies to all instances on the specified network.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallList": { - "description": "Contains a list of firewalls.", - "id": "FirewallList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Firewall resources.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallList", - "description": "[Output Only] Type of resource. Always compute#firewallList\nfor lists of firewalls.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallLogConfig": { - "description": "The available logging options for a firewall rule.", - "id": "FirewallLogConfig", - "properties": { - "enable": { - "description": "This field denotes whether to enable logging for a particular firewall\nrule.", - "type": "boolean" - }, - "metadata": { - "description": "This field can only be specified for a particular firewall rule if\nlogging is enabled for that rule. This field denotes whether to include\nor exclude metadata for firewall logs.", - "enum": [ - "EXCLUDE_ALL_METADATA", - "INCLUDE_ALL_METADATA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FirewallParams": { - "description": "Additional firewall parameters.", - "id": "FirewallParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "FirewallPoliciesListAssociationsResponse": { - "id": "FirewallPoliciesListAssociationsResponse", - "properties": { - "associations": { - "description": "A list of associations.", - "items": { - "$ref": "FirewallPolicyAssociation" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallPoliciesListAssociationsResponse", - "description": "[Output Only] Type of firewallPolicy associations. Alwayscompute#FirewallPoliciesListAssociations for lists of\nfirewallPolicy associations.", - "type": "string" - } - }, - "type": "object" - }, - "FirewallPoliciesScopedList": { - "id": "FirewallPoliciesScopedList", - "properties": { - "firewallPolicies": { - "description": "A list of firewall policies contained in this scope.", - "items": { - "$ref": "FirewallPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of firewall policies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallPolicy": { - "description": "Represents a Firewall Policy resource.", - "id": "FirewallPolicy", - "properties": { - "associations": { - "description": "A list of associations that belong to this firewall policy.", - "items": { - "$ref": "FirewallPolicyAssociation" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "Deprecated, please use short name instead. User-provided name of the\nOrganization firewall policy. The name should be unique in the organization\nin which the firewall policy is created.\nThis field is not applicable to network firewall policies.\nThis name must be set on creation and cannot be changed.\nThe name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which\nmeans the first character must be a lowercase letter, and all following\ncharacters must be a dash, lowercase letter, or digit, except the last\ncharacter, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the\nfirewall policy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#firewallPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies", - "type": "string" - }, - "name": { - "description": "Name of the resource. For Organization Firewall Policies it's a\n[Output Only] numeric ID allocated by Google Cloud which uniquely\nidentifies the Organization Firewall Policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "A list of packet mirroring rules that belong to this policy.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "parent": { - "description": "[Output Only] The parent of the firewall policy.\nThis field is not applicable to network firewall policies.", - "type": "string" - }, - "policySource": { - "description": "[Output Only] Source of this Firewall Policy. USER_DEFINED if\ncreated by a Cloud user, or SYSTEM if created by managed\nservices like GKE.", - "enum": [ - "SYSTEM", - "USER_DEFINED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "policyType": { - "description": "The type of the firewall policy. This field can be eitherVPC_POLICY or RDMA_ROCE_POLICY.\n\nNote: if not specified then VPC_POLICY will be used.", - "enum": [ - "RDMA_ROCE_POLICY", - "VPC_POLICY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional firewall policy resides.\nThis field is not applicable to global firewall policies.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Total count of all firewall policy rule tuples. A firewall\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "A list of rules that belong to this policy.\nThere must always be a default rule (rule with priority 2147483647 and\nmatch \"*\"). If no rules are provided when creating a firewall policy, a\ndefault rule with action \"allow\" will be added.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shortName": { - "description": "User-provided name of the Organization firewall policy. The name should be\nunique in the organization in which the firewall policy is created.\nThis field is not applicable to network firewall policies.\nThis name must be set on creation and cannot be changed. The name must be\n1-63 characters long, and comply with RFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "type": "object" - }, - "FirewallPolicyAssociation": { - "id": "FirewallPolicyAssociation", - "properties": { - "attachmentTarget": { - "description": "The target that the firewall policy is attached to.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy of the association.", - "type": "string" - }, - "firewallPolicyId": { - "description": "[Output Only] The firewall policy ID of the association.", - "type": "string" - }, - "name": { - "description": "The name for an association.", - "type": "string" - }, - "priority": { - "description": "An integer indicating the priority of an association. The priority\nmust be a positive value between 1 and 2147483647.\nFirewall Policies are evaluated from highest to lowest priority where 1\nis the highest priority and 2147483647 is the lowest priority.\nThe default value is `1000`. If two associations have the same priority\nthen lexicographical order on association names is applied.", - "format": "int32", - "type": "integer" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy of the association.", - "type": "string" - } - }, - "type": "object" - }, - "FirewallPolicyList": { - "id": "FirewallPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of FirewallPolicy resources.", - "items": { - "$ref": "FirewallPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#firewallPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#firewallPolicyList for listsof FirewallPolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FirewallPolicyRule": { - "description": "Represents a rule that describes one or more match conditions along with\nthe action to be taken when traffic matches this condition (allow or deny).", - "id": "FirewallPolicyRule", - "properties": { - "action": { - "description": "The Action to perform when the client connection triggers the rule.\nValid actions for firewall rules are: \"allow\", \"deny\",\n\"apply_security_profile_group\" and \"goto_next\".\nValid actions for packet mirroring rules are: \"mirror\", \"do_not_mirror\"\nand \"goto_next\".", - "type": "string" - }, - "description": { - "description": "An optional description for this resource.", - "type": "string" - }, - "direction": { - "description": "The direction in which this rule applies.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "disabled": { - "description": "Denotes whether the firewall policy rule is disabled. When set to true,\nthe firewall policy rule is not enforced and traffic behaves as if it did\nnot exist. If this is unspecified, the firewall policy rule will be\nenabled.", - "type": "boolean" - }, - "enableLogging": { - "description": "Denotes whether to enable logging for a particular rule. If logging is\nenabled, logs will be exported to the configured export destination in\nStackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you\ncannot enable logging on \"goto_next\" rules.", - "type": "boolean" - }, - "kind": { - "default": "compute#firewallPolicyRule", - "description": "[Output only] Type of the resource. Returnscompute#firewallPolicyRule for firewall rules andcompute#packetMirroringRule for packet mirroring rules.", - "type": "string" - }, - "match": { - "$ref": "FirewallPolicyRuleMatcher", - "description": "A match condition that incoming traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 0 and 2147483647.\nRules are evaluated from highest to lowest priority where 0 is the\nhighest priority and 2147483647 is the lowest priority.", - "format": "int32", - "type": "integer" - }, - "ruleName": { - "description": "An optional name for the rule. This field is not a unique identifier\nand can be updated.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Calculation of the complexity of a single firewall policy\nrule.", - "format": "int32", - "type": "integer" - }, - "securityProfileGroup": { - "description": "A fully-qualified URL of a SecurityProfile resource instance.\nExample:\nhttps://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group\nMust be specified if action is one of 'apply_security_profile_group' or\n'mirror'. Cannot be specified for other actions.", - "type": "string" - }, - "targetForwardingRules": { - "description": "A list of forwarding rules to which this rule applies.\nThis field allows you to control which load balancers get this rule.\nFor example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule\n - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule\n - projects/project/global/\n forwardingRules/forwardingRule\n - projects/project/regions/region/forwardingRules/\n forwardingRule", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetResources": { - "description": "A list of network resource URLs to which this rule applies. This field\nallows you to control which network's VMs get this rule. If this field\nis left blank, all VMs within the organization will receive the rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetSecureTags": { - "description": "A list of secure tags that controls which instances the firewall rule\napplies to. If targetSecureTag are specified, then the\nfirewall rule applies only to instances in the VPC network that have one\nof those EFFECTIVE secure tags, if all the target_secure_tag are in\nINEFFECTIVE state, then this rule will be ignored.targetSecureTag may not be set at the same time astargetServiceAccounts.\nIf neither targetServiceAccounts nortargetSecureTag are specified, the firewall rule applies\nto all instances on the specified network.\nMaximum number of target label tags allowed is 256.", - "items": { - "$ref": "FirewallPolicyRuleSecureTag" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetType": { - "description": "Target types of the firewall policy rule.\nDefault value is INSTANCES.", - "enum": [ - "INSTANCES", - "INTERNAL_MANAGED_LB" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "tlsInspect": { - "description": "Boolean flag indicating if the traffic should be TLS decrypted.\nCan be set only if action = 'apply_security_profile_group' and cannot\nbe set for other actions.", - "type": "boolean" - } - }, - "type": "object" - }, - "FirewallPolicyRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "FirewallPolicyRuleMatcher", - "properties": { - "destAddressGroups": { - "description": "Address groups which should be matched against the traffic destination.\nMaximum number of destination address groups is 10.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destFqdns": { - "description": "Fully Qualified Domain Name (FQDN) which should be matched against\ntraffic destination.\nMaximum number of destination fqdn allowed is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destIpRanges": { - "description": "CIDR IP address range.\nMaximum number of destination CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destNetworkScope": { - "description": "Network scope of the traffic destination.", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "destNetworkType": { - "description": "Network type of the traffic destination. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - NON_INTERNET", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "destRegionCodes": { - "description": "Region codes whose IP addresses will be used to match for destination\nof traffic. Should be specified as 2 letter country code defined as per\nISO 3166 alpha-2 country codes. ex.\"US\"\nMaximum number of dest region codes allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destThreatIntelligences": { - "description": "Names of Network Threat Intelligence lists.\nThe IPs in these lists will be matched against traffic destination.", - "items": { - "type": "string" - }, - "type": "array" - }, - "layer4Configs": { - "description": "Pairs of IP protocols and ports that the rule should match.", - "items": { - "$ref": "FirewallPolicyRuleMatcherLayer4Config" - }, - "type": "array" - }, - "srcAddressGroups": { - "description": "Address groups which should be matched against the traffic source.\nMaximum number of source address groups is 10.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcFqdns": { - "description": "Fully Qualified Domain Name (FQDN) which should be matched against\ntraffic source.\nMaximum number of source fqdn allowed is 100.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of source CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcNetworkScope": { - "description": "Network scope of the traffic source.", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "srcNetworkType": { - "description": "Network type of the traffic source. Allowed values are:\n \n \n - UNSPECIFIED\n - INTERNET\n - INTRA_VPC\n - NON_INTERNET\n - VPC_NETWORKS", - "enum": [ - "INTERNET", - "INTRA_VPC", - "NON_INTERNET", - "UNSPECIFIED", - "VPC_NETWORKS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "srcNetworks": { - "description": "Networks of the traffic source. It can be either a full or partial url.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcRegionCodes": { - "description": "Region codes whose IP addresses will be used to match for source\nof traffic. Should be specified as 2 letter country code defined as per\nISO 3166 alpha-2 country codes. ex.\"US\"\nMaximum number of source region codes allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcSecureTags": { - "description": "List of secure tag values, which should be matched at the source\nof the traffic.\nFor INGRESS rule, if all the srcSecureTag are INEFFECTIVE,\nand there is no srcIpRange, this rule will be ignored.\nMaximum number of source tag values allowed is 256.", - "items": { - "$ref": "FirewallPolicyRuleSecureTag" - }, - "type": "array" - }, - "srcThreatIntelligences": { - "description": "Names of Network Threat Intelligence lists.\nThe IPs in these lists will be matched against traffic source.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallPolicyRuleMatcherLayer4Config": { - "id": "FirewallPolicyRuleMatcherLayer4Config", - "properties": { - "ipProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be\none of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP\nprotocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP or TCP protocol. Each entry must be either\nan integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "FirewallPolicyRuleSecureTag": { - "id": "FirewallPolicyRuleSecureTag", - "properties": { - "name": { - "description": "Name of the secure tag, created with TagManager's TagValue API.", - "pattern": "tagValues/[0-9]+", - "type": "string" - }, - "state": { - "description": "[Output Only] State of the secure tag, either `EFFECTIVE` or\n`INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted\nor its network is deleted.", - "enum": [ - "EFFECTIVE", - "INEFFECTIVE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FixedOrPercent": { - "description": "Encapsulates numeric value that can be either absolute or relative.", - "id": "FixedOrPercent", - "properties": { - "calculated": { - "description": "[Output Only] Absolute value of VM instances calculated based on the\nspecific mode.\n\n \n \n - If the value is fixed, then the calculated\n value is equal to the fixed value.\n - If the value is a percent, then the\n calculated\n value is percent/100 * targetSize. For example,\n the calculated value of a 80% of a managed instance group\n with 150 instances would be (80/100 * 150) = 120 VM instances. If there\n is a remainder, the number is rounded.", - "format": "int32", - "type": "integer" - }, - "fixed": { - "description": "Specifies a fixed number of VM instances. This must be a positive integer.", - "format": "int32", - "type": "integer" - }, - "percent": { - "description": "Specifies a percentage of instances between 0 to 100%, inclusive. For\nexample, specify 80 for 80%.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "FlexibleTimeRange": { - "description": "A flexible specification of a time range that has 3 points of\nflexibility: (1) a flexible start time, (2) a flexible end time, (3) a\nflexible duration.\n\nIt is possible to specify a contradictory time range that cannot be matched\nby any Interval. This causes a validation error.", - "id": "FlexibleTimeRange", - "properties": { - "endTimeNotEarlierThan": { - "format": "google-datetime", - "type": "string" - }, - "endTimeNotLaterThan": { - "format": "google-datetime", - "type": "string" - }, - "maxDuration": { - "format": "google-duration", - "type": "string" - }, - "minDuration": { - "format": "google-duration", - "type": "string" - }, - "startTimeNotEarlierThan": { - "format": "google-datetime", - "type": "string" - }, - "startTimeNotLaterThan": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRule": { - "description": "Represents a Forwarding Rule resource.\n\nForwarding rule resources in Google Cloud can be either regional or global in\nscope:\n\n* [Global](https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules)\n* [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules)\n\nA forwarding rule and its corresponding IP address represent the frontend\nconfiguration of a Google Cloud load balancer.\nForwarding rules can also reference target instances and Cloud VPN Classic\ngateways (targetVpnGateway).\n\nFor more information, read\nForwarding rule concepts and\nUsing protocol forwarding.", - "id": "ForwardingRule", - "properties": { - "IPAddress": { - "description": "IP address for which this forwarding rule accepts traffic. When a client\nsends traffic to this IP address, the forwarding rule directs the traffic\nto the referenced target or backendService.\nWhile creating a forwarding rule, specifying an IPAddress is\nrequired under the following circumstances:\n\n \n - When the target is set to targetGrpcProxy andvalidateForProxyless is set to true, theIPAddress should be set to 0.0.0.0.\n - When the target is a Private Service Connect Google APIs\n bundle, you must specify an IPAddress.\n\n\nOtherwise, you can optionally specify an IP address that references an\nexisting static (reserved) IP address resource. When omitted, Google Cloud\nassigns an ephemeral IP address.\n\nUse one of the following formats to specify an IP address while creating a\nforwarding rule:\n\n* IP address number, as in `100.1.2.3`\n* IPv6 address range, as in `2600:1234::/96`\n* Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name\n* Partial URL or by name, as in:\n \n - projects/project_id/regions/region/addresses/address-name\n - regions/region/addresses/address-name\n - global/addresses/address-name\n - address-name\n\n\n\nThe forwarding rule's target or backendService,\nand in most cases, also the loadBalancingScheme, determine the\ntype of IP address that you can use. For detailed information, see\n[IP address\nspecifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).\n\nWhen reading an IPAddress, the API always returns the IP\naddress number.", - "type": "string" - }, - "IPProtocol": { - "description": "The IP protocol to which this rule applies.\n\nFor protocol forwarding, valid\noptions are TCP, UDP, ESP,AH, SCTP, ICMP andL3_DEFAULT.\n\nThe valid IP protocols are different for different load balancing products\nas described in [Load balancing\nfeatures](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends).", - "enum": [ - "AH", - "ESP", - "ICMP", - "L3_DEFAULT", - "SCTP", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "allPorts": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe allPorts field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, SCTP, or L3_DEFAULT.\n - It's applicable only to the following products: internal passthrough\n Network Load Balancers, backend service-based external passthrough Network\n Load Balancers, and internal and external protocol forwarding.\n - Set this field to true to allow packets addressed to any port or\n packets lacking destination port information (for example, UDP fragments\n after the first fragment) to be forwarded to the backends configured with\n this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to true.", - "type": "boolean" - }, - "allowGlobalAccess": { - "description": "If set to true, clients can access the internal passthrough Network Load\nBalancers, the regional internal Application Load Balancer, and the\nregional internal proxy Network Load Balancer from all regions.\nIf false, only allows access from the local region the load balancer is\nlocated at. Note that for INTERNAL_MANAGED forwarding rules, this field\ncannot be changed after the forwarding rule is created.", - "type": "boolean" - }, - "allowPscGlobalAccess": { - "description": "This is used in PSC consumer ForwardingRule to control whether the PSC\nendpoint can be accessed from another region.", - "type": "boolean" - }, - "allowPscPacketInjection": { - "deprecated": true, - "description": "This is used in PSC consumer ForwardingRule to control whether the producer\nis allowed to inject packets into the consumer's network. If set to true,\nthe target service attachment must have tunneling enabled and\nTunnelingConfig.RoutingMode set to PACKET_INJECTION\nNon-PSC forwarding rules should not use this field.\n\nThis field was never released to any customers and is deprecated and\nwill be removed in the future.", - "type": "boolean" - }, - "backendService": { - "description": "Identifies the backend service to which the forwarding rule sends traffic.\nRequired for internal and external passthrough Network Load Balancers;\nmust be omitted for all other load balancer types.", - "type": "string" - }, - "baseForwardingRule": { - "description": "[Output Only] The URL for the corresponding base forwarding rule. By base\nforwarding rule, we mean the forwarding rule that has the same IP address,\nprotocol, and port settings with the current forwarding rule, but without\nsourceIPRanges specified.\nAlways empty if the current forwarding rule does not have sourceIPRanges\nspecified.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "externalManagedBackendBucketMigrationState": { - "description": "Specifies the canary migration state for the backend buckets attached to\nthis forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, and\nTEST_ALL_TRAFFIC.\n\nTo begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be\nchanged to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before\nthe loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets\nattached to this forwarding rule by percentage using\nexternalManagedBackendBucketMigrationTestingPercentage.\n\nRolling back a migration requires the states to be set in reverse order. So\nchanging the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to\nbe set to TEST_ALL_TRAFFIC at the same time. Optionally, the\nTEST_BY_PERCENTAGE state can be used to migrate some traffic back to\nEXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", - "enum": [ - "PREPARE", - "TEST_ALL_TRAFFIC", - "TEST_BY_PERCENTAGE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "externalManagedBackendBucketMigrationTestingPercentage": { - "description": "Determines the fraction of requests to backend buckets that should be\nprocessed by the global external Application Load Balancer.\n\nThe value of this field must be in the range [0, 100].\n\nThis value can only be set if the loadBalancingScheme in the BackendService\nis set to EXTERNAL (when using the classic Application Load Balancer) and\nthe migration state is TEST_BY_PERCENTAGE.", - "format": "float", - "type": "number" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a ForwardingRule. Include the fingerprint in patch request to\nensure that you do not overwrite changes that were applied from another\nconcurrent request.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a ForwardingRule.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ipCollection": { - "description": "Resource reference of a PublicDelegatedPrefix. The PDP must\nbe a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode.\n\nUse one of the following formats to specify a sub-PDP when creating an IPv6\nNetLB forwarding rule using BYOIP:\nFull resource URL, as inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name\nPartial URL, as in:\n \n - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - regions/region/publicDelegatedPrefixes/sub-pdp-name", - "type": "string" - }, - "ipVersion": { - "description": "The IP Version that will be used by this forwarding rule. Valid options\nare IPV4 or IPV6.", - "enum": [ - "IPV4", - "IPV6", - "UNSPECIFIED_VERSION" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "isMirroringCollector": { - "description": "Indicates whether or not this load balancer can be used as a collector for\npacket mirroring. To prevent mirroring loops, instances behind this\nload balancer will not have their traffic mirrored even if aPacketMirroring rule applies to them.\nThis can only be set to true for load balancers that have theirloadBalancingScheme set to INTERNAL.", - "type": "boolean" - }, - "kind": { - "default": "compute#forwardingRule", - "description": "[Output Only] Type of the resource. Alwayscompute#forwardingRule for forwarding rule resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this resource, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a ForwardingRule.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "loadBalancingScheme": { - "description": "Specifies the forwarding rule type.\n\nFor more information about forwarding rules, refer to\nForwarding rule concepts.", - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "INTERNAL", - "INTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "metadataFilters": { - "description": "Opaque filter criteria used by load balancer to restrict routing\nconfiguration to a limited set of xDS\ncompliant clients. In their xDS requests to load balancer, xDS clients\npresent node\nmetadata. When there is a match, the relevant configuration\nis made available to those proxies. Otherwise, all the resources (e.g.TargetHttpProxy, UrlMap)\nreferenced by the ForwardingRule are not visible to\nthose proxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least one of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata. If multiplemetadataFilters are specified, all of them need to be satisfied\nin order to be considered a match.\n\nmetadataFilters specified here will be applifed before\nthose specified in the UrlMap that thisForwardingRule references.\n\nmetadataFilters only applies to Loadbalancers that have\ntheir loadBalancingScheme set toINTERNAL_SELF_MANAGED.", - "items": { - "$ref": "MetadataFilter" - }, - "type": "array" - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.\n\nFor Private Service Connect forwarding rules that forward traffic to Google\nAPIs, the forwarding rule name must be a 1-20 characters string with\nlowercase letters and numbers and must start with a letter.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "This field is not used for global external load balancing.\n\nFor internal passthrough Network Load Balancers, this field identifies the\nnetwork that the load balanced IP should belong to for this forwarding\nrule.\nIf the subnetwork is specified, the network of the subnetwork will be used.\nIf neither subnetwork nor this field is specified, the default network will\nbe used.\n\nFor Private Service Connect forwarding rules that forward traffic to Google\nAPIs, a network must be provided.", - "type": "string" - }, - "networkTier": { - "description": "This signifies the networking tier used for configuring\nthis load balancer and can only take the following values:PREMIUM, STANDARD.\n\nFor regional ForwardingRule, the valid values are PREMIUM andSTANDARD. For GlobalForwardingRule, the valid value isPREMIUM.\n\nIf this field is not specified, it is assumed to be PREMIUM.\nIf IPAddress is specified, this value must be equal to the\nnetworkTier of the Address.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "noAutomateDnsZone": { - "description": "This is used in PSC consumer ForwardingRule to control whether it should\ntry to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use\nthis field. Once set, this field is not mutable.", - "type": "boolean" - }, - "portRange": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe portRange field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, or SCTP, and\n - It's applicable only to the following products: external passthrough\n Network Load Balancers, internal and external proxy Network Load Balancers,\n internal and external Application Load Balancers, external protocol\n forwarding, and Classic VPN.\n - Some products have restrictions on what ports can be used. See \n port specifications for details.\n\n\n\nFor external forwarding rules, two or more forwarding rules cannot use the\nsame [IPAddress, IPProtocol] pair, and cannot have overlappingportRanges.\n\nFor internal forwarding rules within the same VPC network, two or more\nforwarding rules cannot use the same [IPAddress, IPProtocol]\npair, and cannot have overlapping portRanges.\n\n@pattern: \\\\d+(?:-\\\\d+)?", - "type": "string" - }, - "ports": { - "description": "The ports, portRange, and allPorts\nfields are mutually exclusive. Only packets addressed to ports in the\nspecified range will be forwarded to the backends configured with this\nforwarding rule.\n\nThe ports field has the following limitations:\n \n - It requires that the forwarding rule IPProtocol be TCP,\n UDP, or SCTP, and\n - It's applicable only to the following products: internal passthrough\n Network Load Balancers, backend service-based external passthrough Network\n Load Balancers, and internal protocol forwarding.\n - You can specify a list of up to five ports by number, separated by\n commas. The ports can be contiguous or discontiguous.\n\n\n\nFor external forwarding rules, two or more forwarding rules cannot use the\nsame [IPAddress, IPProtocol] pair if they share at least one\nport number.\n\nFor internal forwarding rules within the same VPC network, two or more\nforwarding rules cannot use the same [IPAddress, IPProtocol]\npair if they share at least one port number.\n\n@pattern: \\\\d+(?:-\\\\d+)?", - "items": { - "type": "string" - }, - "type": "array" - }, - "pscConnectionId": { - "description": "[Output Only] The PSC connection id of the PSC forwarding rule.", - "format": "uint64", - "type": "string" - }, - "pscConnectionStatus": { - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer and will not serve traffic\ngoing forward.", - "The connection has been accepted by the producer, but the producer needs\nto take further action before the forwarding rule can serve traffic.", - "The connection is pending acceptance by the producer.", - "The connection has been rejected by the producer.", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional forwarding rule resides.\nThis field is not applicable to global forwarding rules.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "serviceDirectoryRegistrations": { - "description": "Service Directory resources to register this forwarding rule with.\nCurrently, only supports a single Service Directory resource.", - "items": { - "$ref": "ForwardingRuleServiceDirectoryRegistration" - }, - "type": "array" - }, - "serviceLabel": { - "description": "An optional prefix to the service name for this forwarding rule.\nIf specified, the prefix is the first label of the fully qualified service\nname.\n\nThe label must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the label must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.\n\nThis field is only used for internal load balancing.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "serviceName": { - "description": "[Output Only]\nThe internal fully qualified service name for this forwarding rule.\n\nThis field is only used for internal load balancing.", - "type": "string" - }, - "sourceIpRanges": { - "description": "If not empty, this forwarding rule will only forward the traffic when the\nsource IP address matches one of the IP addresses or CIDR ranges set here.\nNote that a forwarding rule can only have up to 64 source IP ranges, and\nthis field can only be used with a regional forwarding rule whose scheme isEXTERNAL.\nEach source_ip_range entry should be either an IP address (for\nexample, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).", - "items": { - "type": "string" - }, - "type": "array" - }, - "subnetwork": { - "description": "This field identifies the subnetwork that the load balanced IP should\nbelong to for this forwarding rule, used with internal load balancers and\nexternal passthrough Network Load Balancers with IPv6.\n\nIf the network specified is in auto subnet mode, this field is optional.\nHowever, a subnetwork must be specified if the network is in custom subnet\nmode or when creating external forwarding rule with IPv6.", - "type": "string" - }, - "target": { - "description": "The URL of the target resource to receive the matched traffic. For\nregional forwarding rules, this target must be in the same region as the\nforwarding rule. For global forwarding rules, this target must be a global\nload balancing resource.\n\nThe forwarded traffic must be of a type appropriate to the target object.\n \n \n - For load balancers, see the \"Target\" column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).\n - For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle:\n \n \n - vpc-sc - APIs that support VPC Service Controls. \n - all-apis - All supported Google APIs. \n \n \n - For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment. The target is not mutable once set as a service attachment.", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRuleAggregatedList": { - "id": "ForwardingRuleAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ForwardingRulesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of ForwardingRulesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#forwardingRuleAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#forwardingRuleAggregatedList for lists of forwarding rules.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ForwardingRuleList": { - "description": "Contains a list of ForwardingRule resources.", - "id": "ForwardingRuleList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ForwardingRule resources.", - "items": { - "$ref": "ForwardingRule" - }, - "type": "array" - }, - "kind": { - "default": "compute#forwardingRuleList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ForwardingRuleReference": { - "id": "ForwardingRuleReference", - "properties": { - "forwardingRule": { - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRuleServiceDirectoryRegistration": { - "description": "Describes the auto-registration of the forwarding rule to Service Directory.\nThe region and project of the Service Directory resource generated from\nthis registration will be the same as this forwarding rule.", - "id": "ForwardingRuleServiceDirectoryRegistration", - "properties": { - "namespace": { - "description": "Service Directory namespace to register the forwarding rule under.", - "type": "string" - }, - "service": { - "description": "Service Directory service to register the forwarding rule under.", - "type": "string" - }, - "serviceDirectoryRegion": { - "description": "[Optional] Service Directory region to register this global forwarding\nrule under. Default to \"us-central1\". Only used for PSC for Google APIs.\nAll PSC for Google APIs forwarding rules on the same network should use\nthe same Service Directory region.", - "type": "string" - } - }, - "type": "object" - }, - "ForwardingRulesScopedList": { - "id": "ForwardingRulesScopedList", - "properties": { - "forwardingRules": { - "description": "A list of forwarding rules contained in this scope.", - "items": { - "$ref": "ForwardingRule" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of forwarding rules when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservation": { - "id": "FutureReservation", - "properties": { - "aggregateReservation": { - "$ref": "AllocationAggregateReservation", - "description": "Aggregate reservation details for the future reservation." - }, - "autoCreatedReservationsDeleteTime": { - "description": "Future timestamp when the FR auto-created reservations will be deleted by\nCompute Engine. Format of this field must be a valid\nhref=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339 value.", - "type": "string" - }, - "autoCreatedReservationsDuration": { - "$ref": "Duration", - "description": "Specifies the duration of auto-created reservations.\nIt represents relative time to future reservation start_time when\nauto-created reservations will be automatically deleted by Compute\nEngine. Duration time unit is represented as a count of seconds\nand fractions of seconds at nanosecond resolution." - }, - "autoDeleteAutoCreatedReservations": { - "description": "Setting for enabling or disabling automatic deletion for auto-created\nreservation. If set to true, auto-created reservations will be\ndeleted at Future Reservation's end time (default) or at user's defined\ntimestamp if any of the\n[auto_created_reservations_delete_time, auto_created_reservations_duration]\nvalues is specified.\nFor keeping auto-created reservation indefinitely, this value should be set\nto false.", - "type": "boolean" - }, - "commitmentInfo": { - "$ref": "FutureReservationCommitmentInfo", - "description": "If not present, then FR will not deliver a new commitment or update an\nexisting commitment." - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this future reservation inRFC3339\ntext format.", - "type": "string" - }, - "deploymentType": { - "description": "Type of the deployment requested as part of future reservation.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the future reservation.", - "type": "string" - }, - "enableEmergentMaintenance": { - "description": "Indicates if this group of VMs have emergent maintenance enabled.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] A unique identifier for this future reservation. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#futureReservation", - "description": "[Output Only] Type of the resource. Alwayscompute#futureReservation for future reservations.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namePrefix": { - "description": "Name prefix for the reservations to be created at the time of\ndelivery. The name prefix must comply with RFC1035.\nMaximum allowed length for name prefix is 20. Automatically created\nreservations name format will be -date-####.", - "type": "string" - }, - "planningStatus": { - "description": "Planning state before being submitted for evaluation", - "enum": [ - "DRAFT", - "PLANNING_STATUS_UNSPECIFIED", - "SUBMITTED" - ], - "enumDescriptions": [ - "Future Reservation is being drafted.", - "", - "Future Reservation has been submitted for evaluation by GCP." - ], - "type": "string" - }, - "protectionTier": { - "description": "Protection tier for the workload.", - "enum": [ - "CAPACITY_OPTIMIZED", - "PROTECTION_TIER_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling)\nat the data center during normal operating conditions. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload may be disrupted. As a consequence, it has a\nweaker availability SLO than STANDARD.", - "Unspecified protection tier.", - "STANDARD protection for workload that should be protected by redundancies\n(e.g. power, cooling) at the data center level. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload is expected to continue as normal using the\nredundancies." - ], - "type": "string" - }, - "reservationMode": { - "description": "The reservation mode which determines reservation-termination behavior and\nexpected pricing.", - "enum": [ - "CALENDAR", - "DEFAULT", - "RESERVATION_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delivered reservations will delivered at specified start time and\nterminated at specified end time along with terminating the VMs running\non it.", - "The delivered reservations do not terminate VMs at the end of\nreservations. This is default mode.", - "" - ], - "type": "string" - }, - "reservationName": { - "description": "Name of reservations where the capacity is provisioned at the time of\ndelivery of future reservations. If the reservation with the given name\ndoes not exist already, it is created automatically at the time of Approval\nwith INACTIVE state till specified start-time. Either provide the\nreservation_name or a name_prefix.", - "type": "string" - }, - "schedulingType": { - "description": "Maintenance information for this reservation", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "List of Projects/Folders to share with." - }, - "specificReservationRequired": { - "description": "Indicates whether the auto-created reservation can be consumed by VMs with\naffinity for \"any\" reservation. If the field is set, then only VMs that\ntarget the reservation by name can consume from the delivered reservation.", - "type": "boolean" - }, - "specificSkuProperties": { - "$ref": "FutureReservationSpecificSKUProperties", - "description": "Future Reservation configuration to indicate instance properties and\ntotal count." - }, - "status": { - "$ref": "FutureReservationStatus", - "description": "[Output only] Status of the Future Reservation" - }, - "timeWindow": { - "$ref": "FutureReservationTimeWindow", - "description": "Time window for this Future Reservation." - }, - "zone": { - "description": "[Output Only] URL of the Zone where this future reservation resides.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationCommitmentInfo": { - "id": "FutureReservationCommitmentInfo", - "properties": { - "commitmentName": { - "description": "name of the commitment where capacity is being delivered to.", - "type": "string" - }, - "commitmentPlan": { - "description": "Indicates if a Commitment needs to be created as part of FR delivery. If\nthis field is not present, then no\ncommitment needs to be created.", - "enum": [ - "INVALID", - "THIRTY_SIX_MONTH", - "TWELVE_MONTH" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "previousCommitmentTerms": { - "description": "Only applicable if FR is delivering to the same reservation. If set, all\nparent commitments will be extended to match the end date of the plan for\nthis commitment.", - "enum": [ - "EXTEND", - "PREVIOUSCOMMITMENTTERM_UNSPECIFIED" - ], - "enumDescriptions": [ - "All associated parent Committed Used Discount(s) end-date/term will be\nextended to the end-time of this future reservation. Default is to\nextend previous commitment(s) time to the end_time of the reservation.", - "No changes to associated parents Committed Used Discount(s) terms." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationSpecificSKUProperties": { - "id": "FutureReservationSpecificSKUProperties", - "properties": { - "instanceProperties": { - "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "Properties of the SKU instances being reserved." - }, - "sourceInstanceTemplate": { - "description": "The instance template that will be used to populate the\nReservedInstanceProperties of the future reservation", - "type": "string" - }, - "totalCount": { - "description": "Total number of instances for which capacity assurance is requested at a\nfuture time period.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatus": { - "description": "[Output only] Represents status related to the future reservation.", - "id": "FutureReservationStatus", - "properties": { - "amendmentStatus": { - "description": "[Output Only] The current status of the requested amendment.", - "enum": [ - "AMENDMENT_APPROVED", - "AMENDMENT_DECLINED", - "AMENDMENT_IN_REVIEW", - "AMENDMENT_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The requested amendment to the Future Resevation has been approved and\napplied by GCP.", - "The requested amendment to the Future Reservation has been declined by\nGCP and the original state was restored.", - "The requested amendment to the Future Reservation is currently being\nreviewd by GCP.", - "" - ], - "type": "string" - }, - "autoCreatedReservations": { - "description": "Fully qualified urls of the automatically created reservations at\nstart_time.", - "items": { - "type": "string" - }, - "type": "array" - }, - "existingMatchingUsageInfo": { - "$ref": "FutureReservationStatusExistingMatchingUsageInfo", - "description": "[Output Only] Represents the existing matching usage for the future\nreservation." - }, - "fulfilledCount": { - "description": "This count indicates the fulfilled capacity so far. This is set during\n\"PROVISIONING\" state. This count also includes capacity delivered as part\nof existing matching reservations.", - "format": "int64", - "type": "string" - }, - "lastKnownGoodState": { - "$ref": "FutureReservationStatusLastKnownGoodState", - "description": "[Output Only] This field represents the future reservation before an\namendment was requested. If the amendment is declined, the Future\nReservation will be reverted to the last known good state. The last known\ngood state is not set when updating a future reservation whose\nProcurement Status is DRAFTING." - }, - "lockTime": { - "description": "Time when Future Reservation would become LOCKED, after which no\nmodifications to Future Reservation will be allowed. Applicable only\nafter the Future Reservation is in the APPROVED state. The lock_time is\nan RFC3339 string. The procurement_status will transition to PROCURING\nstate at this time.", - "type": "string" - }, - "procurementStatus": { - "description": "Current state of this Future Reservation", - "enum": [ - "APPROVED", - "CANCELLED", - "COMMITTED", - "DECLINED", - "DRAFTING", - "FAILED", - "FAILED_PARTIALLY_FULFILLED", - "FULFILLED", - "PENDING_AMENDMENT_APPROVAL", - "PENDING_APPROVAL", - "PROCUREMENT_STATUS_UNSPECIFIED", - "PROCURING", - "PROVISIONING" - ], - "enumDescriptions": [ - "Future reservation is approved by GCP.", - "Future reservation is cancelled by the customer.", - "Future reservation is committed by the customer.", - "Future reservation is rejected by GCP.", - "Related status for PlanningStatus.Draft. Transitions to\nPENDING_APPROVAL upon user submitting FR.", - "Future reservation failed. No additional reservations were provided.", - "Future reservation is partially fulfilled. Additional reservations were\nprovided but did not reach total_count reserved instance slots.", - "Future reservation is fulfilled completely.", - "An Amendment to the Future Reservation has been requested. If the\nAmendment is declined, the Future Reservation will be restored to the\nlast known good state.", - "Future reservation is pending approval by GCP.", - "", - "Future reservation is being procured by GCP. Beyond this point, Future\nreservation is locked and no further modifications are allowed.", - "Future reservation capacity is being provisioned. This state will be\nentered after start_time, while reservations are being created to\nprovide total_count reserved instance slots. This state will not\npersist past start_time + 24h." - ], - "type": "string" - }, - "specificSkuProperties": { - "$ref": "FutureReservationStatusSpecificSKUProperties" - } - }, - "type": "object" - }, - "FutureReservationStatusExistingMatchingUsageInfo": { - "description": "[Output Only] Represents the existing matching usage for the future\nreservation.", - "id": "FutureReservationStatusExistingMatchingUsageInfo", - "properties": { - "count": { - "description": "Count to represent min(FR total_count,\nmatching_reserved_capacity+matching_unreserved_instances)", - "format": "int64", - "type": "string" - }, - "timestamp": { - "description": "Timestamp when the matching usage was calculated", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatusLastKnownGoodState": { - "description": "The state that the future reservation will be reverted to should the\namendment be declined.", - "id": "FutureReservationStatusLastKnownGoodState", - "properties": { - "description": { - "description": "[Output Only] The description of the FutureReservation before an\namendment was requested.", - "type": "string" - }, - "existingMatchingUsageInfo": { - "$ref": "FutureReservationStatusExistingMatchingUsageInfo", - "description": "[Output Only] Represents the matching usage for the future\nreservation before an amendment was requested." - }, - "futureReservationSpecs": { - "$ref": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" - }, - "lockTime": { - "description": "[Output Only] The lock time of the FutureReservation before an\namendment was requested.", - "type": "string" - }, - "namePrefix": { - "description": "[Output Only] The name prefix of the Future Reservation before an\namendment was requested.", - "type": "string" - }, - "procurementStatus": { - "description": "[Output Only] The status of the last known good state for the Future\nReservation.", - "enum": [ - "APPROVED", - "CANCELLED", - "COMMITTED", - "DECLINED", - "DRAFTING", - "FAILED", - "FAILED_PARTIALLY_FULFILLED", - "FULFILLED", - "PENDING_AMENDMENT_APPROVAL", - "PENDING_APPROVAL", - "PROCUREMENT_STATUS_UNSPECIFIED", - "PROCURING", - "PROVISIONING" - ], - "enumDescriptions": [ - "Future reservation is approved by GCP.", - "Future reservation is cancelled by the customer.", - "Future reservation is committed by the customer.", - "Future reservation is rejected by GCP.", - "Related status for PlanningStatus.Draft. Transitions to\nPENDING_APPROVAL upon user submitting FR.", - "Future reservation failed. No additional reservations were provided.", - "Future reservation is partially fulfilled. Additional reservations were\nprovided but did not reach total_count reserved instance slots.", - "Future reservation is fulfilled completely.", - "An Amendment to the Future Reservation has been requested. If the\nAmendment is declined, the Future Reservation will be restored to the\nlast known good state.", - "Future reservation is pending approval by GCP.", - "", - "Future reservation is being procured by GCP. Beyond this point, Future\nreservation is locked and no further modifications are allowed.", - "Future reservation capacity is being provisioned. This state will be\nentered after start_time, while reservations are being created to\nprovide total_count reserved instance slots. This state will not\npersist past start_time + 24h." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs": { - "description": "The properties of the last known good state for the Future Reservation.", - "id": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", - "properties": { - "shareSettings": { - "$ref": "ShareSettings", - "description": "[Output Only] The previous share settings of the Future Reservation." - }, - "specificSkuProperties": { - "$ref": "FutureReservationSpecificSKUProperties", - "description": "[Output Only] The previous instance related properties of the\nFuture Reservation." - }, - "timeWindow": { - "$ref": "FutureReservationTimeWindow", - "description": "[Output Only] The previous time window of the Future Reservation." - } - }, - "type": "object" - }, - "FutureReservationStatusSpecificSKUProperties": { - "description": "Properties to be set for the Future Reservation.", - "id": "FutureReservationStatusSpecificSKUProperties", - "properties": { - "sourceInstanceTemplateId": { - "description": "ID of the instance template used to populate the Future Reservation\nproperties.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationTimeWindow": { - "id": "FutureReservationTimeWindow", - "properties": { - "duration": { - "$ref": "Duration" - }, - "endTime": { - "type": "string" - }, - "startTime": { - "description": "Start time of the Future Reservation. The start_time is an RFC3339\nstring.", - "type": "string" - } - }, - "type": "object" - }, - "FutureReservationsAggregatedListResponse": { - "description": "Contains a list of future reservations.", - "id": "FutureReservationsAggregatedListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "FutureReservationsScopedList", - "description": "Name of the scope containing this set of future reservations." - }, - "description": "A list of Future reservation resources.", - "type": "object" - }, - "kind": { - "default": "compute#futureReservationsAggregatedListResponse", - "description": "[Output Only] Type of resource. Alwayscompute#futureReservationsAggregatedListResponse for future\nresevation aggregated list response.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservationsListResponse": { - "id": "FutureReservationsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of future reservation resources.", - "items": { - "$ref": "FutureReservation" - }, - "type": "array" - }, - "kind": { - "default": "compute#futureReservationsListResponse", - "description": "[Output Only] Type of resource.Alwayscompute#FutureReservationsListResponse for lists of\nreservations", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureReservationsScopedList": { - "id": "FutureReservationsScopedList", - "properties": { - "futureReservations": { - "description": "A list of future reservations contained in this scope.", - "items": { - "$ref": "FutureReservation" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of future reservations when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "FutureResourcesRecommendation": { - "description": "Recommendation for single resources specification, to be created in the\nfuture.", - "id": "FutureResourcesRecommendation", - "properties": { - "endTime": { - "format": "google-datetime", - "type": "string" - }, - "location": { - "description": "The advised location for resource usage. When a zone, in format\n'zones/'.\nIf not set, it means that no location is recommended - see\nother_locations for details.", - "type": "string" - }, - "otherLocations": { - "additionalProperties": { - "$ref": "FutureResourcesRecommendationOtherLocation" - }, - "description": "List of locations in the request scope that were not\nrecommended. Keys of the map are zones, in format 'zones/'.\nThe values are status information indicating the recommendation status.", - "type": "object" - }, - "recommendationId": { - "description": "Unique id of the recommendation, a UUID string generated by the API.", - "type": "string" - }, - "recommendationType": { - "description": "Type of recommendation. Currently only FUTURE_RESERVATION is supported.", - "enum": [ - "FUTURE_RESERVATION", - "RECOMMENDATION_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "A Future Reservation is recommended.", - "Default value, unused." - ], - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesRecommendationOtherLocation": { - "description": "Information about recommendation status for locations\nthat were allowed but not used by the response.", - "id": "FutureResourcesRecommendationOtherLocation", - "properties": { - "details": { - "description": "Details (human readable) describing the situation.\nFor example, if status is CONDITION_NOT_MET, then\ndetails contain information about the parameters of the time window\nthat did not meet the required conditions.", - "type": "string" - }, - "status": { - "description": "Status of recommendation in this location.", - "enum": [ - "CONDITIONS_NOT_MET", - "NOT_SUPPORTED", - "NO_CAPACITY", - "OTHER_LOCATION_STATUS_UNDEFINED", - "RECOMMENDED" - ], - "enumDescriptions": [ - "The requested resources are offered in this location\nbut the requested time window is does not meet the required conditions.", - "The requested resources are not offered in this location.\nRetrying the request will not change this status.", - "The requested resources are offered in this location\nand the requested time window is accepted\nbut there is no capacity within the requested time window.", - "Default value, unused.", - "The requested resources are offered in this location\nand it is possible to request them. However, another location\nwas better and was recommended." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpec": { - "description": "Specification of resources to be created at some time in the future within an\noptionally specified set of locations, and within the specified time range.", - "id": "FutureResourcesSpec", - "properties": { - "deploymentType": { - "description": "Indicates if the reservation allocation strategy is static (DENSE) or\ndynamic (STANDARD). Defaults to DENSE.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "locationPolicy": { - "$ref": "FutureResourcesSpecLocationPolicy", - "description": "Optional location policy allowing to exclude some zone(s) in which\nthe resources must not be created." - }, - "targetResources": { - "$ref": "FutureResourcesSpecTargetResources", - "description": "Specification of the reserved resources." - }, - "timeRangeSpec": { - "$ref": "FlexibleTimeRange", - "description": "Specification of a time range in which the resources may be created.\nThe time range specifies start of resource use and planned end of resource\nuse." - } - }, - "type": "object" - }, - "FutureResourcesSpecAggregateResources": { - "id": "FutureResourcesSpecAggregateResources", - "properties": { - "acceleratorCount": { - "description": "Size of the request, in accelerator (chip) count.", - "format": "int64", - "type": "string" - }, - "vmFamily": { - "description": "The VM family that all instances scheduled against this reservation\nmust belong to. Use for TPU reservations.", - "enum": [ - "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", - "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", - "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "workloadType": { - "description": "Workload type. Use for TPU reservations.", - "enum": [ - "BATCH", - "SERVING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Reserved resources will be optimized for BATCH workloads, such as ML\ntraining.", - "Reserved resources will be optimized for SERVING workloads, such as ML\ninference.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocalSsdPartition": { - "id": "FutureResourcesSpecLocalSsdPartition", - "properties": { - "diskInterface": { - "description": "Disk interface. Defaults to SCSI.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "diskSizeGb": { - "description": "The size of the disk in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocationPolicy": { - "description": "Specification of locations to create resources in.", - "id": "FutureResourcesSpecLocationPolicy", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "FutureResourcesSpecLocationPolicyLocation" - }, - "description": "Preferences for specified locations.\nKeys of the map are locations - zones, in format of 'zones/'.\nValues are preferences for the zones.\nIf a zone is not specified in this map, it is ALLOWed.", - "type": "object" - } - }, - "type": "object" - }, - "FutureResourcesSpecLocationPolicyLocation": { - "description": "Preference for a single specified location.", - "id": "FutureResourcesSpecLocationPolicyLocation", - "properties": { - "preference": { - "description": "Preference for this location.", - "enum": [ - "ALLOW", - "DENY", - "PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Location is allowed for use.", - "Location is prohibited.", - "Default value, unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecSpecificSKUResources": { - "id": "FutureResourcesSpecSpecificSKUResources", - "properties": { - "instanceCount": { - "description": "Size of the request, in instance count.", - "format": "int64", - "type": "string" - }, - "localSsdPartitions": { - "description": "Local SSD partitions. You do not have to include SSD partitions that\nare built in the machine type.", - "items": { - "$ref": "FutureResourcesSpecLocalSsdPartition" - }, - "type": "array" - }, - "machineType": { - "description": "The machine type to use for instances that will use the reservation.\nThis field only accepts machine type names. e.g. n2-standard-4\nand does not accept machine type full or partial url. e.g.\nprojects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4.\nUse for GPU reservations.", - "type": "string" - } - }, - "type": "object" - }, - "FutureResourcesSpecTargetResources": { - "description": "Specification of reserved resources.", - "id": "FutureResourcesSpecTargetResources", - "properties": { - "aggregateResources": { - "$ref": "FutureResourcesSpecAggregateResources" - }, - "specificSkuResources": { - "$ref": "FutureResourcesSpecSpecificSKUResources" - } - }, - "type": "object" - }, - "GRPCHealthCheck": { - "id": "GRPCHealthCheck", - "properties": { - "grpcServiceName": { - "description": "The gRPC service name for the health check. This field is optional. The\nvalue of grpc_service_name has the following meanings by convention: \n\n- Empty service_name means the overall status of all services at the\nbackend. \n\n- Non-empty service_name means the health of that gRPC service, as defined\nby the owner of the service. \n\nThe grpc_service_name can only be ASCII.", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. Valid\nvalues are 1 through 65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - } - }, - "type": "object" - }, - "GRPCTLSHealthCheck": { - "id": "GRPCTLSHealthCheck", - "properties": { - "grpcServiceName": { - "description": "The gRPC service name for the health check. This field is optional. The\nvalue of grpc_service_name has the following meanings by convention: \n\n- Empty service_name means the overall status of all services at the\nbackend. \n\n- Non-empty service_name means the health of that gRPC service, as defined\nby the owner of the service. \n\nThe grpc_service_name can only be ASCII.", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. Valid\nvalues are 1 through 65535.", - "format": "int32", - "type": "integer" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - } - }, - "type": "object" - }, - "GlobalAddressesMoveRequest": { - "id": "GlobalAddressesMoveRequest", - "properties": { - "description": { - "description": "An optional destination address description if intended to be different\nfrom the source.", - "type": "string" - }, - "destinationAddress": { - "description": "The URL of the destination address to move to. This can be a full or\npartial URL. For example, the following are all valid URLs to a address:\n \n - https://www.googleapis.com/compute/v1/projects/project/global/addresses/address \n - projects/project/global/addresses/address\n\n\nNote that destination project must be different from the source project. So/global/addresses/address is not valid partial url.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalNetworkEndpointGroupsAttachEndpointsRequest": { - "id": "GlobalNetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "GlobalNetworkEndpointGroupsDetachEndpointsRequest": { - "id": "GlobalNetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "GlobalOrganizationSetPolicyRequest": { - "id": "GlobalOrganizationSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "GlobalSetLabelsRequest": { - "id": "GlobalSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash when updating or changing\nlabels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the\nresource to get the latest fingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A list of labels to apply for this resource. Each label must comply with\nthe\nrequirements for labels. For example,\"webserver-frontend\": \"images\". A label value can also be\nempty (e.g. \"my-label\": \"\").", - "type": "object" - } - }, - "type": "object" - }, - "GlobalSetPolicyRequest": { - "id": "GlobalSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicy": { - "description": "Message describing GlobalVmExtensionPolicy object.", - "id": "GlobalVmExtensionPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "extensionPolicies": { - "additionalProperties": { - "$ref": "GlobalVmExtensionPolicyExtensionPolicy" - }, - "description": "Required. Map from extension (eg: \"cloudops\") to its policy configuration.\nThe key is the name of the extension.", - "type": "object" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSelectors": { - "description": "Optional. Selector to target VMs for a policy.\nThere is a logical \"AND\" between instance_selectors.", - "items": { - "$ref": "GlobalVmExtensionPolicyInstanceSelector" - }, - "type": "array" - }, - "kind": { - "default": "compute#globalVmExtensionPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#globalVmExtensionPolicy for globalVmExtensionPolicies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "priority": { - "description": "Optional. Used to resolve conflicts when multiple policies are active for the same\nextension. Defaults to 0.\n\nLarger the number, higher the priority. When the priority is the same,\nthe policy with the newer create time has higher priority.", - "format": "int32", - "type": "integer" - }, - "rolloutOperation": { - "$ref": "GlobalVmExtensionPolicyRolloutOperation", - "description": "Required. The rollout strategy and status." - }, - "scopedResourceStatus": { - "description": "[Output Only] The scoped resource status. It's only for tracking the\npurging status of the policy.", - "enum": [ - "SCOPED_RESOURCE_STATUS_DELETING", - "SCOPED_RESOURCE_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The zonal policies are being deleted.", - "Default value. This value is unused." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "updateTimestamp": { - "description": "[Output Only] Update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyExtensionPolicy": { - "description": "Policy for a single extension.", - "id": "GlobalVmExtensionPolicyExtensionPolicy", - "properties": { - "pinnedVersion": { - "description": "Optional. The version pinning for the extension.\nIf empty, the extension will be installed with the latest version\nreleased by the extension producer.", - "type": "string" - }, - "stringConfig": { - "description": "Optional. String configuration. Any string payload that the extension\nunderstands.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyInstanceSelector": { - "description": "Selector to target VMs for a zone VM extension policy.", - "id": "GlobalVmExtensionPolicyInstanceSelector", - "properties": { - "labelSelector": { - "$ref": "GlobalVmExtensionPolicyLabelSelector", - "description": "Optional. Labels within the LabelSelector are OR'd." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyLabelSelector": { - "description": "A LabelSelector is applicable for a VM only if it matches all labels in\nthe LabelSelector.", - "id": "GlobalVmExtensionPolicyLabelSelector", - "properties": { - "inclusionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels as key value pairs.\nA VM should contain all the pairs specified in this map to be selected;\nLabels within the LabelSelector are OR'ed.", - "type": "object" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyList": { - "description": "Response to list global VM extension policy resources.", - "id": "GlobalVmExtensionPolicyList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of GlobalVmExtensionPolicy resources.", - "items": { - "$ref": "GlobalVmExtensionPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#globalVmExtensionPolicyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperation": { - "description": "Represents the rollout operation", - "id": "GlobalVmExtensionPolicyRolloutOperation", - "properties": { - "rolloutInput": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutInput", - "description": "Required. The rollout input which defines the rollout plan." - }, - "rolloutStatus": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", - "description": "[Output Only] The rollout status of the policy." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutInput": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutInput", - "properties": { - "conflictBehavior": { - "description": "Optional. [Optional] Specifies the behavior of the Rollout if a conflict is\ndetected in a project during a Rollout. It can be one of the following\nvalues:\n1) empty : don't overwrite the local value if conflict happens. This is\nthe default behavior.\n2) \"overwrite\" : Overwrite the local value with the rollout value.\nThe concept of \"conflict\" applies to:\n1) Insert action. If the zonal policy already exists when Insert\nhappens, it's a conflict.\n2) Update action. If the zonal policy was updated out of band by a\nzonal API, it's a conflict.", - "type": "string" - }, - "name": { - "description": "Optional. The name of the rollout plan.\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "predefinedRolloutPlan": { - "description": "Optional. Predefined rollout plan.", - "enum": [ - "FAST_ROLLOUT", - "ROLLOUT_PLAN_UNSPECIFIED", - "SLOW_ROLLOUT" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "retryUuid": { - "description": "Optional. The UUID of the retry action. Only set it if this is a retry\nfor an existing resource. This is for the user re-populate the resource\nwithout changes. An error will be returned if the retry_uuid is set but\nthe resource get modified.", - "type": "string" - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutStatus": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutStatus", - "properties": { - "currentRollouts": { - "description": "[Output Only] The current rollouts for the latest version of the\nresource. There should be only one current rollout, but for\nscalability, we make it repeated.", - "items": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata" - }, - "type": "array" - }, - "previousRollout": { - "$ref": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", - "description": "[Output Only] The last completed rollout resource. This field will not\nbe populated until the first rollout is completed." - } - }, - "type": "object" - }, - "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata": { - "id": "GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata", - "properties": { - "rollout": { - "description": "[Output Only] The name of the rollout.\nEx. projects//locations/global/rollouts/.", - "type": "string" - }, - "rolloutPlan": { - "description": "[Output Only] The name of the rollout plan.\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "state": { - "description": "[Output Only] The overall state of the rollout.", - "enum": [ - "STATE_CANCELLED", - "STATE_COMPLETED", - "STATE_FAILED", - "STATE_PAUSED", - "STATE_PROCESSING", - "STATE_UNKNOWN", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Iteration was explicitly cancelled.", - "Iteration completed, with all actions being successful.", - "Iteration completed, with failures.", - "The rollout is paused.", - "Iteration is in progress.", - "Impossible to determine current state of the iteration.", - "Default value. This value is unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "GroupMaintenanceInfo": { - "description": "Maintenance Info for ReservationBlocks.", - "id": "GroupMaintenanceInfo", - "properties": { - "instanceMaintenanceOngoingCount": { - "description": "Describes number of instances that have ongoing maintenance.", - "format": "int32", - "type": "integer" - }, - "instanceMaintenancePendingCount": { - "description": "Describes number of instances that have pending maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceOngoingCount": { - "description": "Progress for ongoing maintenance for this group of VMs/hosts.\nDescribes number of hosts in the block that have ongoing maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenancePendingCount": { - "description": "Progress for ongoing maintenance for this group of VMs/hosts.\nDescribes number of hosts in the block that have pending maintenance.", - "format": "int32", - "type": "integer" - }, - "schedulingType": { - "description": "The type of maintenance for the reservation.", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "subblockInfraMaintenanceOngoingCount": { - "description": "Describes number of subblock Infrastructure that has ongoing maintenance.\nHere, Subblock Infrastructure Maintenance pertains to upstream hardware\ncontained in the Subblock that is necessary for a VM Family(e.g. NVLink\nDomains). Not all VM Families will support this field.", - "format": "int32", - "type": "integer" - }, - "subblockInfraMaintenancePendingCount": { - "description": "Describes number of subblock Infrastructure that has pending maintenance.\n Here, Subblock Infrastructure Maintenance pertains to upstream hardware\n contained in the Subblock that is necessary for a VM Family (e.g. NVLink\n Domains). Not all VM Families will support this field.", - "format": "int32", - "type": "integer" - }, - "upcomingGroupMaintenance": { - "$ref": "UpcomingMaintenance", - "description": "Maintenance information on this group of VMs." - } - }, - "type": "object" - }, - "GuestAttributes": { - "description": "A guest attributes entry.", - "id": "GuestAttributes", - "properties": { - "kind": { - "default": "compute#guestAttributes", - "description": "[Output Only] Type of the resource. Alwayscompute#guestAttributes for guest attributes entry.", - "type": "string" - }, - "queryPath": { - "description": "The path to be queried. This can be the default namespace ('') or a\nnested namespace ('\\/') or a specified key\n('\\/\\').", - "type": "string" - }, - "queryValue": { - "$ref": "GuestAttributesValue", - "description": "[Output Only] The value of the requested queried path." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "variableKey": { - "description": "The key to search for.", - "type": "string" - }, - "variableValue": { - "description": "[Output Only] The value found for the requested key.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesEntry": { - "description": "A guest attributes namespace/key/value entry.", - "id": "GuestAttributesEntry", - "properties": { - "key": { - "description": "Key for the guest attribute entry.", - "type": "string" - }, - "namespace": { - "description": "Namespace for the guest attribute entry.", - "type": "string" - }, - "value": { - "description": "Value for the guest attribute entry.", - "type": "string" - } - }, - "type": "object" - }, - "GuestAttributesValue": { - "description": "Array of guest attribute namespace/key/value tuples.", - "id": "GuestAttributesValue", - "properties": { - "items": { - "items": { - "$ref": "GuestAttributesEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "GuestOsFeature": { - "description": "Guest OS features.", - "id": "GuestOsFeature", - "properties": { - "type": { - "description": "The ID of a supported feature. To add multiple values, use commas to\nseparate values. Set to one or more of the following values:\n \n - VIRTIO_SCSI_MULTIQUEUE\n - WINDOWS\n - MULTI_IP_SUBNET\n - UEFI_COMPATIBLE\n - GVNIC\n - SEV_CAPABLE\n - SUSPEND_RESUME_COMPATIBLE\n - SEV_LIVE_MIGRATABLE_V2\n - SEV_SNP_CAPABLE\n - TDX_CAPABLE\n - IDPF\n - SNP_SVSM_CAPABLE\n\n\nFor more information, see\nEnabling guest operating system features.", - "enum": [ - "BARE_METAL_LINUX_COMPATIBLE", - "FEATURE_TYPE_UNSPECIFIED", - "GVNIC", - "IDPF", - "MULTI_IP_SUBNET", - "SECURE_BOOT", - "SEV_CAPABLE", - "SEV_LIVE_MIGRATABLE", - "SEV_LIVE_MIGRATABLE_V2", - "SEV_SNP_CAPABLE", - "SNP_SVSM_CAPABLE", - "TDX_CAPABLE", - "UEFI_COMPATIBLE", - "VIRTIO_SCSI_MULTIQUEUE", - "WINDOWS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "HTTP2HealthCheck": { - "id": "HTTP2HealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTP/2 health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTP/2 health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTP/2 health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - } - }, - "type": "object" - }, - "HTTPHealthCheck": { - "id": "HTTPHealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTP health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 80. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Also supported in legacy HTTP health checks for target pools.\nThe health check supports all backends supported by the backend service\nprovided the backend can be health checked. For example,GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT\nnetwork endpoint groups, and instance group backends. \nUSE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for pass-through load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTP health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTP health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - } - }, - "type": "object" - }, - "HTTPSHealthCheck": { - "id": "HTTPSHealthCheck", - "properties": { - "host": { - "description": "The value of the host header in the HTTPS health check request. If left\nempty (default value), the host header is set to the destination IP address\nto which health check packets are sent. The destination IP address depends\non the type of load balancer. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest", - "type": "string" - }, - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestPath": { - "description": "The request path of the HTTPS health check request. The default value is/. Must comply withRFC3986.", - "type": "string" - }, - "response": { - "description": "Creates a content-based HTTPS health check. In addition to the required\nHTTP 200 (OK) status code, you can configure the health check to pass only\nwhen the backend sends this specific ASCII response string within the first\n1024 bytes of the HTTP response body. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http", - "type": "string" - } - }, - "type": "object" - }, - "HealthAggregationPoliciesScopedList": { - "id": "HealthAggregationPoliciesScopedList", - "properties": { - "healthAggregationPolicies": { - "description": "A list of HealthAggregationPolicys contained in this scope.", - "items": { - "$ref": "HealthAggregationPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of health aggregation\npolicies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthAggregationPolicy": { - "description": "Represents a health aggregation policy.\n\nA health aggregation policy resource defines a policy to aggregate health.\n\nFor more information, see\nHealth checks overview.", - "id": "HealthAggregationPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthAggregationPolicy. An up-to-date fingerprint\nmust be provided in order to patch the HealthAggregationPolicy; Otherwise,\nthe request will fail with error 412 conditionNotMet. To see\nthe latest fingerprint, make a get() request to retrieve the\nHealthAggregationPolicy.", - "format": "byte", - "type": "string" - }, - "healthyPercentThreshold": { - "description": "Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the threshold (as a\npercentage) of healthy endpoints required in order to consider the\naggregated health result HEALTHY. Defaults to 60. Must be in\nrange [0, 100]. Not applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional,\nand will be set to the default if unspecified. Note that both this\nthreshold and minHealthyThreshold must be satisfied in order\nfor HEALTHY to be the aggregated result. \"Endpoints\" refers to network\nendpoints within a Network Endpoint Group or instances within an Instance\nGroup.", - "format": "uint32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthAggregationPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation\npolicies.", - "type": "string" - }, - "minHealthyThreshold": { - "description": "Can only be set if the policyType field isBACKEND_SERVICE_POLICY. Specifies the minimum number of\nhealthy endpoints required in order to consider the aggregated health\nresult HEALTHY. Defaults to 1. Must be positive. Not\napplicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional,\nand will be set to the default if unspecified. Note that both this\nthreshold and healthyPercentThreshold must be satisfied in\norder for HEALTHY to be the aggregated result. \"Endpoints\" refers to\nnetwork endpoints within a Network Endpoint Group or instances within an\nInstance Group.", - "format": "uint32", - "type": "integer" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "policyType": { - "description": "Specifies the type of the healthAggregationPolicy. The only allowed value\nfor global resources is DNS_PUBLIC_IP_POLICY. The only allowed\nvalue for regional resources is BACKEND_SERVICE_POLICY. Must\nbe specified when the healthAggregationPolicy is created, and cannot be\nmutated.", - "enum": [ - "BACKEND_SERVICE_POLICY", - "DNS_PUBLIC_IP_POLICY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the health aggregation policy\nresides. This field applies only to the regional resource. You must specify\nthis field as part of the HTTP request URL. It is not settable as a field\nin the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "HealthAggregationPolicyAggregatedList": { - "description": "Contains a list of HealthAggregationPoliciesScopedList.", - "id": "HealthAggregationPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthAggregationPoliciesScopedList", - "description": "Name of the scope containing this set of HealthAggregationPolicies." - }, - "description": "A list of HealthAggregationPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthAggregationPolicyAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthAggregationPolicyList": { - "id": "HealthAggregationPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthAggregationPolicy resources.", - "items": { - "$ref": "HealthAggregationPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthAggregationPolicyList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthAggregationPolicy for health aggregation\npolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheck": { - "description": "Represents a health check resource.\n\nGoogle Compute Engine has two health check resources:\n\n* [Regional](/compute/docs/reference/rest/beta/regionHealthChecks)\n* [Global](/compute/docs/reference/rest/beta/healthChecks)\n\nThese health check resources can be used for load balancing and for\nautohealing VMs in a managed instance group (MIG).\n\n**Load balancing**\n\nHealth check requirements vary depending on the type of load balancer. For\ndetails about the type of health check supported for\neach load balancer and corresponding backend type,\nsee Health\nchecks overview: Load balancer guide.\n\n**Autohealing in MIGs**\n\nThe health checks that you use for autohealing VMs in a MIG can be either\nregional or global. For more information, see Set up an\napplication health check and autohealing.\n\nFor more information, seeHealth checks\noverview.", - "id": "HealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is 5\nseconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "grpcHealthCheck": { - "$ref": "GRPCHealthCheck" - }, - "grpcTlsHealthCheck": { - "$ref": "GRPCTLSHealthCheck" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "http2HealthCheck": { - "$ref": "HTTP2HealthCheck" - }, - "httpHealthCheck": { - "$ref": "HTTPHealthCheck" - }, - "httpsHealthCheck": { - "$ref": "HTTPSHealthCheck" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthCheck", - "description": "Type of the resource.", - "type": "string" - }, - "logConfig": { - "$ref": "HealthCheckLogConfig", - "description": "Configure logging on this health check." - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nFor example, a name that is 1-63 characters long, matches the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise complies with\nRFC1035. This regular expression describes a name where the first\ncharacter is a lowercase letter, and all following characters are a dash,\nlowercase letter, or digit, except the last character, which isn't a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] Region where the health check resides. Not applicable to\nglobal health checks.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sourceRegions": { - "description": "The list of cloud regions from which health checks are performed. If any\nregions are specified, then exactly 3 regions should be specified. The\nregion names must be valid names of Google Cloud regions.\nThis can only be set for global health check.\nIf this list is non-empty, then there are restrictions\non what other health check fields are supported and what other resources\ncan use this health check:\n \n - SSL, HTTP2, and GRPC protocols are not supported.\n - The TCP request field is not supported.\n - The proxyHeader field for HTTP, HTTPS, and TCP is not\n supported.\n - The checkIntervalSec field must be at least 30.\n - The health check cannot be used with BackendService nor with managed\n instance group auto-healing.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslHealthCheck": { - "$ref": "SSLHealthCheck" - }, - "tcpHealthCheck": { - "$ref": "TCPHealthCheck" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is\n5 seconds. It is invalid for timeoutSec to have greater\nvalue than checkIntervalSec.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "Specifies the type of the healthCheck, either TCP,SSL, HTTP, HTTPS,HTTP2 or GRPC. Exactly one of the\nprotocol-specific health check fields must be specified, which must matchtype field.", - "enum": [ - "GRPC", - "GRPC_WITH_TLS", - "HTTP", - "HTTP2", - "HTTPS", - "INVALID", - "SSL", - "TCP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this many\nconsecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HealthCheckList": { - "description": "Contains a list of HealthCheck resources.", - "id": "HealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthCheck resources.", - "items": { - "$ref": "HealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthCheckLogConfig": { - "description": "Configuration of logging on a health check. If logging is enabled, logs\nwill be exported to Stackdriver.", - "id": "HealthCheckLogConfig", - "properties": { - "enable": { - "description": "Indicates whether or not to export logs. This is false by default, which\nmeans no health check logging will be done.", - "type": "boolean" - } - }, - "type": "object" - }, - "HealthCheckReference": { - "description": "A full or valid partial URL to a health check. For example, the following are\nvalid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check\n - projects/project-id/global/httpHealthChecks/health-check\n - global/httpHealthChecks/health-check", - "id": "HealthCheckReference", - "properties": { - "healthCheck": { - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckService": { - "description": "Represents a Health-Check as a Service resource.", - "id": "HealthCheckService", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthCheckService. An up-to-date fingerprint must\nbe provided in order to patch/update the HealthCheckService; Otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nHealthCheckService.", - "format": "byte", - "type": "string" - }, - "healthChecks": { - "description": "A list of URLs to the HealthCheck resources. Must have\nat least one HealthCheck, and not more than 10 for regionalHealthCheckService, and not more than 1 for globalHealthCheckService.HealthCheck resources must haveportSpecification=USE_SERVING_PORT orportSpecification=USE_FIXED_PORT. For\nregional HealthCheckService, theHealthCheck must be regional and in the same\nregion. For global HealthCheckService,HealthCheck must be global. Mix of regional and globalHealthChecks is not supported. Multiple regionalHealthChecks must belong to the same region. RegionalHealthChecks must belong to the same region as zones ofNetworkEndpointGroups. For globalHealthCheckService using globalINTERNET_IP_PORT NetworkEndpointGroups, the\nglobal HealthChecks must specify sourceRegions,\nand HealthChecks that specify sourceRegions can\nonly be used with global INTERNET_IP_PORTNetworkEndpointGroups.", - "items": { - "type": "string" - }, - "type": "array" - }, - "healthStatusAggregationPolicy": { - "description": "Optional. Policy for how the results from multiple health checks\nfor the same endpoint are aggregated. Defaults to NO_AGGREGATION\nif unspecified.\n \n - NO_AGGREGATION. An EndpointHealth message is\n returned for each pair in the health check\n service.\n - AND. If any health check of an endpoint reportsUNHEALTHY, then UNHEALTHY is theHealthState of the endpoint. If all health checks reportHEALTHY, the HealthState of the endpoint isHEALTHY.\n\n.\nThis is only allowed with regional HealthCheckService.", - "enum": [ - "AND", - "NO_AGGREGATION" - ], - "enumDescriptions": [ - "If any backend's health check reports UNHEALTHY,\nthen UNHEALTHY is the HealthState of\nthe entire health check service. If all backend's are healthy,\nthe HealthState of the health check service isHEALTHY.", - "An EndpointHealth message is returned for each\nbackend in the health check service." - ], - "type": "string" - }, - "healthStatusAggregationStrategy": { - "deprecated": true, - "description": "This field is deprecated. Use health_status_aggregation_policy\ninstead.\n\nPolicy for how the results from multiple health checks for the\nsame endpoint are aggregated.\n \n - NO_AGGREGATION. An EndpointHealth\n message is returned for each backend in the health check\n service.\n - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is theHealthState of the entire health check service. If\n all backend's are healthy, the HealthState of the\n health check service is HEALTHY.\n\n.", - "enum": [ - "AND", - "NO_AGGREGATION" - ], - "enumDescriptions": [ - "This is deprecated. Use health_status_aggregation_policy instead.\nIf any backend's health check reports UNHEALTHY,\nthen UNHEALTHY is the HealthState of\nthe entire health check service. If all backend's are healthy,\nthe HealthState of the health check service isHEALTHY.", - "This is deprecated. Use health_status_aggregation_policy instead.\nAn EndpointHealth message is returned for each\nbackend in the health check service." - ], - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthCheckService", - "description": "[Output only] Type of the resource. Alwayscompute#healthCheckServicefor health check services.", - "type": "string" - }, - "name": { - "description": "Name of the resource. The name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkEndpointGroups": { - "description": "A list of URLs to the NetworkEndpointGroup\nresources. Must not have more than 100. For regionalHealthCheckService, NEGs must be in\nzones in the region of the HealthCheckService. For globalHealthCheckServices, the NetworkEndpointGroups\nmust be global INTERNET_IP_PORT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "notificationEndpoints": { - "description": "A list of URLs to the NotificationEndpoint\nresources. Must not have more than 10. A list of endpoints for\nreceiving notifications of change in health status. For regionalHealthCheckService,NotificationEndpoint must be regional and in the\nsame region. For global HealthCheckService,NotificationEndpoint must be global.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the health check service\nresides. This field is not applicable to global health check services.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckServiceReference": { - "description": "A full or valid partial URL to a health check service. For example, the\nfollowing are valid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service\n - projects/project-id/regions/us-west1/healthCheckServices/health-check-service\n - regions/us-west1/healthCheckServices/health-check-service", - "id": "HealthCheckServiceReference", - "properties": { - "healthCheckService": { - "type": "string" - } - }, - "type": "object" - }, - "HealthCheckServicesList": { - "id": "HealthCheckServicesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthCheckService resources.", - "items": { - "$ref": "HealthCheckService" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthCheckServicesList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthCheckServicesList for lists of\nHealthCheckServices.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthChecksAggregatedList": { - "id": "HealthChecksAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthChecksScopedList", - "description": "Name of the scope containing this set of HealthChecks." - }, - "description": "A list of HealthChecksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthChecksAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthChecksScopedList": { - "id": "HealthChecksScopedList", - "properties": { - "healthChecks": { - "description": "A list of HealthChecks contained in this scope.", - "items": { - "$ref": "HealthCheck" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSource": { - "description": "Represents a health source.\n\nA health source resource specifies the source resources and the health\naggregation policy applied to the source resources to determine the\naggregated health status.", - "id": "HealthSource", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a HealthSource. An up-to-date fingerprint\nmust be provided in order to patch the HealthSource; Otherwise, the request\nwill fail with error 412 conditionNotMet. To see the latest\nfingerprint, make a get() request to retrieve the\nHealthSource.", - "format": "byte", - "type": "string" - }, - "healthAggregationPolicy": { - "description": "URL to the HealthAggregationPolicy resource. Must be set. Must\nbe regional and in the same region as the HealthSource. Can be\nmutated.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#healthSource", - "description": "[Output Only] Type of the resource. Alwayscompute#healthSource for health sources.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the health source resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "sourceType": { - "description": "Specifies the type of the HealthSource. The only allowed value\nis BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated.", - "enum": [ - "BACKEND_SERVICE" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "sources": { - "description": "URLs to the source resources. Must be size 1. Must be aBackendService if\nthe sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional\nand in the same region as the HealthSource (cross-region\ndeployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be\nmutated.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HealthSourceAggregatedList": { - "description": "Contains a list of HealthSourcesScopedList.", - "id": "HealthSourceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "HealthSourcesScopedList", - "description": "Name of the scope containing this set of HealthSources." - }, - "description": "A list of HealthSourcesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#healthSourceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSourceList": { - "id": "HealthSourceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HealthSource resources.", - "items": { - "$ref": "HealthSource" - }, - "type": "array" - }, - "kind": { - "default": "compute#healthSourceList", - "description": "[Output Only] Type of the resource. Alwayscompute#healthSource for health sources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthSourcesScopedList": { - "id": "HealthSourcesScopedList", - "properties": { - "healthSources": { - "description": "A list of HealthSources contained in this scope.", - "items": { - "$ref": "HealthSource" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nhealth sources when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HealthStatus": { - "id": "HealthStatus", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata defined as annotations for network endpoint.", - "type": "object" - }, - "forwardingRule": { - "description": "URL of the forwarding rule associated with the health status of the\ninstance.", - "type": "string" - }, - "forwardingRuleIp": { - "description": "A forwarding rule IP address assigned to this instance.", - "type": "string" - }, - "healthState": { - "description": "Health state of the IPv4 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "instance": { - "description": "URL of the instance resource.", - "type": "string" - }, - "ipAddress": { - "description": "For target pool based Network Load Balancing, it indicates the forwarding\nrule's IP address assigned to this instance. For other types of load\nbalancing, the field indicates VM internal ip.", - "type": "string" - }, - "ipv6Address": { - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the IPv6 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "port": { - "description": "The named port of the instance group, not necessarily the port that is\nhealth-checked.", - "format": "int32", - "type": "integer" - }, - "weight": { - "type": "string" - }, - "weightError": { - "enum": [ - "INVALID_WEIGHT", - "MISSING_WEIGHT", - "UNAVAILABLE_WEIGHT", - "WEIGHT_NONE" - ], - "enumDescriptions": [ - "The response to a Health Check probe had the HTTP response header field\nX-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not\na non-negative single-precision floating-point number in decimal string\nrepresentation).", - "The response to a Health Check probe did not have the HTTP response\nheader field X-Load-Balancing-Endpoint-Weight.", - "This is the value when the accompanied health status is either TIMEOUT\n(i.e.,the Health Check probe was not able to get a response in time) or\nUNKNOWN. For the latter, it should be typically because there has not\nbeen sufficient time to parse and report the weight for a new backend\n(which is with 0.0.0.0 ip address). However, it can be also due to an\noutage case for which the health status is explicitly reset to UNKNOWN.", - "This is the default value when WeightReportMode is DISABLE,\nand is also the initial value when WeightReportMode has just updated to\nENABLE or DRY_RUN and there has not been\nsufficient time to parse and report the backend weight." - ], - "type": "string" - } - }, - "type": "object" - }, - "HealthStatusForNetworkEndpoint": { - "id": "HealthStatusForNetworkEndpoint", - "properties": { - "backendService": { - "$ref": "BackendServiceReference", - "description": "URL of the backend service associated with the health state of the network\nendpoint." - }, - "forwardingRule": { - "$ref": "ForwardingRuleReference", - "description": "URL of the forwarding rule associated with the health state of the network\nendpoint." - }, - "healthCheck": { - "$ref": "HealthCheckReference", - "description": "URL of the health check associated with the health state of the network\nendpoint." - }, - "healthCheckService": { - "$ref": "HealthCheckServiceReference", - "description": "URL of the health check service associated with the health state of the\nnetwork endpoint." - }, - "healthState": { - "description": "Health state of the network endpoint determined based on the health checks\nconfigured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the ipv6 network endpoint determined based on the health\nchecks configured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - } - }, - "type": "object" - }, - "Help": { - "description": "Provides links to documentation or for performing an out of band action.\n\nFor example, if a quota check failed with an error indicating the calling\nproject hasn't enabled the accessed service, this can contain a URL pointing\ndirectly to the right place in the developer console to flip the bit.", - "id": "Help", - "properties": { - "links": { - "description": "URL(s) pointing to additional information on handling the current error.", - "items": { - "$ref": "HelpLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "HelpLink": { - "description": "Describes a URL link.", - "id": "HelpLink", - "properties": { - "description": { - "description": "Describes what the link offers.", - "type": "string" - }, - "url": { - "description": "The URL of the link.", - "type": "string" - } - }, - "type": "object" - }, - "HostRule": { - "description": "UrlMaps\nA host-matching rule for a URL. If matched, will use the namedPathMatcher to select the BackendService.", - "id": "HostRule", - "properties": { - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "hosts": { - "description": "The list of host patterns to match. They must be valid hostnames with\noptional port numbers in the format host:port.* matches any string of ([a-z0-9-.]*). In\nthat case, * must be the first character, and if followed by\nanything, the immediate following character must be either -\nor ..\n\n* based matching is not supported when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pathMatcher": { - "description": "The name of the PathMatcher to use to match the path portion\nof the URL if the hostRule matches the URL's host portion.", - "type": "string" - } - }, - "type": "object" - }, - "HttpFaultAbort": { - "description": "Specification for how requests are aborted as part of fault injection.", - "id": "HttpFaultAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request.\n\nThe value must be from 200 to 599 inclusive.\n\nFor gRPC protocol, the gRPC status code is mapped to HTTP status code\naccording to this \nmapping table. HTTP status 200 is mapped to gRPC status\nUNKNOWN. Injecting an OK status is currently not supported by\nTraffic Director.", - "format": "uint32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests\nthat is aborted as part of fault injection.\n\nThe value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultDelay": { - "description": "Specifies the delay introduced by the load balancer before forwarding the\nrequest to the backend service as part of fault injection.", - "id": "HttpFaultDelay", - "properties": { - "fixedDelay": { - "$ref": "Duration", - "description": "Specifies the value of the fixed delay interval." - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests for\nwhich a delay is introduced as part of fault injection.\n\nThe value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultInjection": { - "description": "The specification for fault injection introduced into traffic to test\nthe resiliency of clients to backend service failure. As part of fault\ninjection, when clients send requests to a backend service, delays can be\nintroduced by the load balancer on a percentage of requests before sending\nthose request to the backend service. Similarly requests from clients can be\naborted by the load balancer for a percentage of requests.", - "id": "HttpFaultInjection", - "properties": { - "abort": { - "$ref": "HttpFaultAbort", - "description": "The specification for how client requests are aborted as part of fault\ninjection." - }, - "delay": { - "$ref": "HttpFaultDelay", - "description": "The specification for how client requests are delayed as part of fault\ninjection, before being sent to a backend service." - } - }, - "type": "object" - }, - "HttpFilterConfig": { - "description": "HttpFilterConfiguration supplies additional contextual settings\nfor networkservices.HttpFilter resources enabled by Traffic\nDirector.", - "id": "HttpFilterConfig", - "properties": { - "config": { - "description": "The configuration needed to enable thenetworkservices.HttpFilter resource. The configuration must be\nYAML formatted and only contain fields defined in the protobuf identified\nin configTypeUrl", - "type": "string" - }, - "configTypeUrl": { - "description": "The fully qualified versioned proto3 type url of the protobuf that the\nfilter expects for its contextual settings, for example:type.googleapis.com/google.protobuf.Struct", - "type": "string" - }, - "filterName": { - "description": "Name of the networkservices.HttpFilter resource this\nconfiguration belongs to. This name must be known to the xDS client.\nExample: envoy.wasm", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderAction": { - "description": "The request and response header transformations that take effect before\nthe request is passed along to the selected backendService.", - "id": "HttpHeaderAction", - "properties": { - "requestHeadersToAdd": { - "description": "Headers to add to a matching request before forwarding the request to thebackendService.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "requestHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the\nrequest before forwarding the request to the backendService.", - "items": { - "type": "string" - }, - "type": "array" - }, - "responseHeadersToAdd": { - "description": "Headers to add the response before sending the response back to the\nclient.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "responseHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the\nresponse before sending the response back to the client.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpHeaderMatch": { - "description": "matchRule criteria for request header matches.", - "id": "HttpHeaderMatch", - "properties": { - "exactMatch": { - "description": "The value should exactly match contents of exactMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - }, - "headerName": { - "description": "The name of the HTTP header to match.\n\nFor matching against the HTTP request's authority, use a headerMatch\nwith the header name \":authority\".\n\nFor matching a request's method, use the headerName \":method\".\n\nWhen the URL map is bound to a target gRPC proxy that has\nthe validateForProxyless field set to true, only\nnon-binary\nuser-specified custom metadata and the `content-type` header are supported.\nThe following transport-level headers cannot be used in header matching\nrules:\n`:authority`, `:method`, `:path`, `:scheme`, `user-agent`,\n`accept-encoding`, `content-encoding`, `grpc-accept-encoding`,\n`grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`,\n`grpc-timeout` and `grpc-trace-bin`.", - "type": "string" - }, - "invertMatch": { - "description": "If set to false, the headerMatch is considered a\nmatch if the preceding match criteria are met. If set to true,\nthe headerMatch is considered a match if the preceding\nmatch criteria are NOT met.\n\nThe default setting is false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The value of the header must start with the contents ofprefixMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - }, - "presentMatch": { - "description": "A header with the contents of headerName must exist. The\nmatch takes place whether or not the request's header has a value.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "boolean" - }, - "rangeMatch": { - "$ref": "Int64RangeMatch", - "description": "The header value must be an integer and its value must be in the range\nspecified in rangeMatch. If the header does not contain an\ninteger, number or is empty, the match fails.\n\nFor example for a range [-5, 0]\n \n \n - -3 will match.\n - 0 will not match.\n - 0.25 will not match.\n - -3someString will not match.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nrangeMatch is not supported for load balancers\nthat have loadBalancingScheme set to EXTERNAL." - }, - "regexMatch": { - "description": "The value of the header must match the regular expression specified inregexMatch.\nFor more information about regular expression syntax, see Syntax.\n\nFor matching against a port specified in the HTTP request, use a\nheaderMatch with headerName set to PORT and a regular expression that\nsatisfies the RFC2616 Host header's port specifier.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - }, - "suffixMatch": { - "description": "The value of the header must end with the contents ofsuffixMatch.\n\nOnly one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or rangeMatch must be set.", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderOption": { - "description": "Specification determining how headers are added to requests or responses.", - "id": "HttpHeaderOption", - "properties": { - "headerName": { - "description": "The name of the header.", - "type": "string" - }, - "headerValue": { - "description": "The value of the header to add.", - "type": "string" - }, - "replace": { - "description": "If false, headerValue is appended to any values\nthat already\nexist for the header. If true, headerValue is set for the\nheader, discarding any values that were set for that header.\n\nThe default value is true,\nunless a variable is present in headerValue,\nin which case the default value is false.\n.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpHealthCheck": { - "description": "Represents a legacy HTTP Health Check resource.\n\nLegacy HTTP health checks are now only required by target pool-based network\nload balancers. For all other load balancers, including backend service-based\nnetwork load balancers, and for managed instance group auto-healing, you must\nuse modern (non-legacy) health checks.\n\nFor more information, seeHealth checks\noverview.", - "id": "HttpHealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is5 seconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "host": { - "description": "The value of the host header in the HTTP health check request. If left\nempty (default value), the public IP on behalf of which this health check\nis performed will be used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#httpHealthCheck", - "description": "[Output Only] Type of the resource. Alwayscompute#httpHealthCheck for HTTP health checks.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "port": { - "description": "The TCP port number for the HTTP health check request. The default value is80.", - "format": "int32", - "type": "integer" - }, - "requestPath": { - "description": "The request path of the HTTP health check request. The default value is/. This field does not support query\nparameters. Must comply withRFC3986.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is5 seconds. It is invalid for timeoutSec to have\ngreater value than checkIntervalSec.", - "format": "int32", - "type": "integer" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this\nmany consecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpHealthCheckList": { - "description": "Contains a list of HttpHealthCheck resources.", - "id": "HttpHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#httpHealthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "HttpQueryParameterMatch": { - "description": "HttpRouteRuleMatch criteria for a request's query parameter.", - "id": "HttpQueryParameterMatch", - "properties": { - "exactMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter exactly matches the contents of exactMatch.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.", - "type": "string" - }, - "name": { - "description": "The name of the query parameter to match. The query parameter must exist in\nthe request, in the absence of which the request match fails.", - "type": "string" - }, - "presentMatch": { - "description": "Specifies that the queryParameterMatch matches if the\nrequest contains the query parameter, irrespective of whether the\nparameter has a value or not.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.", - "type": "boolean" - }, - "regexMatch": { - "description": "The queryParameterMatch matches if the value of the\nparameter matches the regular expression specified byregexMatch. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of presentMatch, exactMatch, orregexMatch must be set.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRedirectAction": { - "description": "Specifies settings for an HTTP redirect.", - "id": "HttpRedirectAction", - "properties": { - "hostRedirect": { - "description": "The host that is used in the redirect response instead of the one that\nwas supplied in the request.\n\nThe value must be from 1 to 255\ncharacters.", - "type": "string" - }, - "httpsRedirect": { - "description": "If set to true, the URL scheme in the redirected request is\nset to HTTPS.\nIf set to false, the URL scheme of the redirected request\nremains the same as that of the request.\n\nThis must only be set for URL maps used inTargetHttpProxys. Setting this true forTargetHttpsProxy is not permitted.\n\nThe default is set to false.", - "type": "boolean" - }, - "pathRedirect": { - "description": "The path that is used in the redirect response instead of the one\nthat was supplied in the request.\n\npathRedirect cannot be supplied together withprefixRedirect. Supply one alone or neither. If neither is\nsupplied, the path of the original request is used for the redirect.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "prefixRedirect": { - "description": "The prefix that replaces the prefixMatch specified in\nthe HttpRouteRuleMatch, retaining the remaining portion\nof the URL before redirecting the request.\n\nprefixRedirect cannot be supplied together withpathRedirect. Supply one alone or neither. If neither is\nsupplied, the path of the original request is used for the redirect.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "redirectResponseCode": { - "description": "The HTTP Status code to use for this RedirectAction.\n\nSupported values are:\n \n - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds\n to 301.\n - FOUND, which corresponds to 302.\n - SEE_OTHER which corresponds to 303.\n - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request\n method is retained.\n - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request\n method is retained.", - "enum": [ - "FOUND", - "MOVED_PERMANENTLY_DEFAULT", - "PERMANENT_REDIRECT", - "SEE_OTHER", - "TEMPORARY_REDIRECT" - ], - "enumDescriptions": [ - "Http Status Code 302 - Found.", - "Http Status Code 301 - Moved Permanently.", - "Http Status Code 308 - Permanent Redirect maintaining HTTP method.", - "Http Status Code 303 - See Other.", - "Http Status Code 307 - Temporary Redirect maintaining HTTP method." - ], - "type": "string" - }, - "stripQuery": { - "description": "If set to true, any accompanying query portion of the original\nURL is\nremoved before redirecting the request. If set to false, the\nquery portion of the original URL is retained.\n\nThe default is set to false.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpRetryPolicy": { - "description": "The retry policy associates with HttpRouteRule", - "id": "HttpRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number retries. This number must be \u003e 0.\nIf not specified, defaults to 1.", - "format": "uint32", - "type": "integer" - }, - "perTryTimeout": { - "$ref": "Duration", - "description": "Specifies a non-zero timeout per retry attempt.\n\nIf not specified, will use the timeout set in theHttpRouteAction field.\nIf timeout in the HttpRouteAction field is not set, this field\nuses the largest timeout\namong all backend services associated with the route.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "retryConditions": { - "description": "Specifies one or more conditions when this retry policy applies. Valid\nvalues are:\n \n - 5xx: retry is attempted if the instance or endpoint\n responds with any 5xx response code, or if the instance or\n endpoint does not respond at all. For example, disconnects, reset, read\n timeout, connection failure, and refused streams.\n - gateway-error: Similar to 5xx, but only\n applies to response codes 502, 503 or504.\n - connect-failure: a retry is attempted on failures\n connecting to the instance or endpoint. For example, connection\n timeouts.\n - retriable-4xx: a retry is attempted if the instance\n or endpoint responds with a 4xx response code.\n The only error that you can retry is error code 409.\n - refused-stream: a retry is attempted if the instance\n or endpoint resets the stream with a REFUSED_STREAM error\n code. This reset type indicates that it is safe to retry.\n - cancelled: a retry is attempted if the gRPC status\n code in the response header is set to cancelled.\n - deadline-exceeded: a retry is attempted if the gRPC\n status code in the response header is set todeadline-exceeded.\n - internal: a retry is attempted if the gRPC\n status code in the response header is set tointernal.\n - resource-exhausted: a retry is attempted if the gRPC\n status code in the response header is set toresource-exhausted.\n - unavailable: a retry is attempted if the gRPC\n status code in the response header is set tounavailable.\n\nOnly the following codes are supported when the URL map is bound to\ntarget gRPC proxy that has validateForProxyless field set to true.\n \n - cancelled\n - deadline-exceeded\n - internal\n - resource-exhausted\n - unavailable", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteAction": { - "id": "HttpRouteAction", - "properties": { - "corsPolicy": { - "$ref": "CorsPolicy", - "description": "The specification for allowing client-side cross-origin requests. For more\ninformation about the W3C recommendation for cross-origin resource sharing\n(CORS), see Fetch API Living\nStandard.\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "faultInjectionPolicy": { - "$ref": "HttpFaultInjection", - "description": "The specification for fault injection introduced into traffic to test\nthe resiliency of clients to backend service failure. As part of fault\ninjection, when clients send requests to a backend service, delays can be\nintroduced by a load balancer on a percentage of requests before sending\nthose requests to the backend service. Similarly requests from clients can\nbe aborted by the load balancer for a percentage of requests.timeout and retry_policy is ignored by clients\nthat are configured with a fault_injection_policy if:\n1. The traffic is generated by fault injection AND\n2. The fault injection is not a delay fault injection.\nFault injection is not supported with the classic Application Load Balancer\n. To see which load balancers support fault injection,\nsee Load\nbalancing: Routing and traffic management features." - }, - "maxStreamDuration": { - "$ref": "Duration", - "description": "Specifies the maximum duration (timeout) for streams on the selected route.\nUnlike the timeout field where the timeout duration starts\nfrom the time the request has been fully processed (known as*end-of-stream*),\nthe duration in this field is computed from the beginning of the stream\nuntil the response has been processed, including all retries. A\nstream that does not complete in this duration is closed.\n\nIf not specified, this field uses the maximummaxStreamDuration value among all backend services associated\nwith the route.\n\nThis field is only allowed if the Url map is used with backend services\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED." - }, - "requestMirrorPolicy": { - "$ref": "RequestMirrorPolicy", - "description": "Specifies the policy on how requests intended for the route's backends\nare shadowed to a separate mirrored backend service. The load balancer does\nnot wait for responses from the shadow service. Before sending traffic\nto the shadow service, the host / authority header is suffixed with-shadow.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "retryPolicy": { - "$ref": "HttpRetryPolicy", - "description": "Specifies the retry policy associated with this route." - }, - "timeout": { - "$ref": "Duration", - "description": "Specifies the timeout for the selected route. Timeout is computed from the\ntime the request has been fully processed (known as *end-of-stream*)\nup until the response has been processed. Timeout includes\nall retries.\n\nIf not specified, this field uses the largest timeout among all backend\nservices associated with the route.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "urlRewrite": { - "$ref": "UrlRewrite", - "description": "The spec to modify the URL of the request, before forwarding the request\nto the matched service.\n\n urlRewrite is the only action supported in UrlMaps\nfor classic Application Load Balancers.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas the validateForProxyless field set to true." - }, - "weightedBackendServices": { - "description": "A list of weighted backend services to send traffic to when a route match\noccurs. The weights determine the fraction of traffic that flows to\ntheir corresponding backend service. If all traffic needs to\ngo to a single backend service, there must be oneweightedBackendService with weight set to a non-zero number.\n\nAfter a backend service is identified and before forwarding\nthe request to\nthe backend service, advanced routing actions such as URL rewrites and\nheader transformations are applied depending on additional settings\nspecified in this HttpRouteAction.", - "items": { - "$ref": "WeightedBackendService" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteRule": { - "description": "The HttpRouteRule setting specifies how to match an HTTP request\nand the corresponding routing action that load balancing proxies perform.", - "id": "HttpRouteRule", - "properties": { - "customErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "customErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nIf a policy for an\nerror code is not configured for the RouteRule, a policy for\nthe error code configured inpathMatcher.defaultCustomErrorResponsePolicy is applied. If\none is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the policy\nconfigured in UrlMap.defaultCustomErrorResponsePolicy takes\neffect. \n\nFor example, consider a UrlMap with the following configuration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy are configured\n with policies for 5xx and 4xx errors\n - A RouteRule for /coming_soon/ is configured for the\n error code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in RouteRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect. \n\nWhen\nused in conjunction withrouteRules.routeAction.retryPolicy, retries take\nprecedence. Only once all retries are exhausted, thecustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the customErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ncustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "description": { - "description": "The short description conveying the intent of this routeRule.\n\n\nThe description can have a maximum length of 1024 characters.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backendService.\n\nThe headerAction value specified here is applied before the\nmatching pathMatchers[].headerAction and afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction\n\nHeaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "httpFilterConfigs": { - "description": "Outbound route specific configuration fornetworkservices.HttpFilter resources enabled by Traffic\nDirector. httpFilterConfigs only applies for load balancers\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule for\nmore details.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "HttpFilterConfig" - }, - "type": "array" - }, - "httpFilterMetadata": { - "description": "Outbound route specific metadata supplied tonetworkservices.HttpFilter resources enabled by Traffic\nDirector. httpFilterMetadata only applies for load balancers\nwith loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule for\nmore details. \n\n The only configTypeUrl supported istype.googleapis.com/google.protobuf.Struct\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "HttpFilterConfig" - }, - "type": "array" - }, - "matchRules": { - "description": "The list of criteria for matching attributes of a request to thisrouteRule. This list has OR semantics: the request matches\nthis routeRule when any of thematchRules are satisfied. However predicates within\na given matchRule have AND semantics. All predicates\nwithin a matchRule must match for the request to\nmatch the rule.", - "items": { - "$ref": "HttpRouteRuleMatch" - }, - "type": "array" - }, - "priority": { - "description": "For routeRules within a given pathMatcher,\npriority determines the order in which a load balancer interpretsrouteRules. RouteRules are evaluated in order\nof priority, from the lowest to highest number. The priority of a\nrule decreases as its number increases (1, 2, 3, N+1). The first rule\nthat matches the request is applied.\n\n\nYou cannot configure two or more routeRules with the same priority.\nPriority for each rule must be set to a number from 0 to 2147483647\ninclusive.\n\n\nPriority numbers can have gaps, which enable you to add or remove rules\nin the future without affecting the rest of the rules. For example, 1, 2,\n3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you\ncould add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future\nwithout any impact on existing rules.", - "format": "int32", - "type": "integer" - }, - "routeAction": { - "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer\nperforms advanced routing actions, such as URL rewrites and header\ntransformations, before forwarding the request to the selected backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a route rule'srouteAction." - }, - "service": { - "description": "The full or partial URL of the backend service resource to which traffic\nis directed if this rule is matched. If routeAction is\nalso specified, advanced routing actions, such as URL rewrites,\ntake effect before sending the request to the backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.", - "type": "string" - }, - "urlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When this rule is matched, the request is redirected to a URL\nspecified by urlRedirect.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - } - }, - "type": "object" - }, - "HttpRouteRuleMatch": { - "description": "HttpRouteRuleMatch specifies a set of criteria for matching\nrequests to an HttpRouteRule. All specified criteria must\nbe satisfied for a match to occur.", - "id": "HttpRouteRuleMatch", - "properties": { - "fullPathMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must exactly match the value specified infullPathMatch after removing any query parameters and anchor\nthat may be part of the original URL.\n\nfullPathMatch must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.", - "type": "string" - }, - "headerMatches": { - "description": "Specifies a list of header match criteria, all of which must match\ncorresponding headers in the request.", - "items": { - "$ref": "HttpHeaderMatch" - }, - "type": "array" - }, - "ignoreCase": { - "description": "Specifies that prefixMatch and fullPathMatch\nmatches are case sensitive.\n\nThe default value is false.\n\nignoreCase must not be used with regexMatch.\n\nNot supported when the URL map is bound to a target gRPC proxy.", - "type": "boolean" - }, - "metadataFilters": { - "description": "Opaque filter criteria used by the load balancer to restrict routing\nconfiguration to a limited set of xDS\ncompliant clients. In their xDS requests to the load balancer, xDS clients\npresent node\nmetadata. When there is a match, the relevant routing configuration\nis made available to those proxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least one of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata. If multiple\nmetadata filters are specified, all of them need to be\nsatisfied in order to be considered a match.\n\nmetadataFilters specified here is applied after those\nspecified in ForwardingRule that refers to theUrlMap this HttpRouteRuleMatch belongs to.\n\nmetadataFilters only applies to load balancers that haveloadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "MetadataFilter" - }, - "type": "array" - }, - "pathTemplateMatch": { - "description": "If specified, the route is a pattern match expression that must match the\n:path header once the query string is removed.\n\n A pattern match allows you to match\n \n \n - The value must be between 1 and 1024 characters\n - The pattern must start with a leading slash (\"/\")\n - There may be no more than 5 operators in pattern\n\n Precisely one ofprefix_match, full_path_match,regex_match or path_template_match must be set.", - "type": "string" - }, - "prefixMatch": { - "description": "For satisfying the matchRule condition, the request's\npath must begin with the specified prefixMatch.prefixMatch must begin with a /.\n\nThe value must be from 1 to 1024 characters.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\nspecified.", - "type": "string" - }, - "queryParameterMatches": { - "description": "Specifies a list of query parameter match criteria, all of which must\nmatch corresponding query parameters in the request.\n\nNot supported when the URL map is bound to a target gRPC proxy.", - "items": { - "$ref": "HttpQueryParameterMatch" - }, - "type": "array" - }, - "regexMatch": { - "description": "For satisfying the matchRule condition, the path of the\nrequest must satisfy the regular expression specified inregexMatch after removing any query parameters and anchor\nsupplied with the original URL. For\nmore information about regular expression syntax, see Syntax.\n\nOnly one of prefixMatch, fullPathMatch,regexMatch or path_template_match must be\nspecified.\n\nRegular expressions can only be used when the loadBalancingScheme is\nset to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED.", - "type": "string" - } - }, - "type": "object" - }, - "HttpsHealthCheck": { - "description": "Represents a legacy HTTPS Health Check resource.\n\nLegacy HTTPS health checks have been deprecated. If you are using a target\npool-based network load balancer, you must use a legacy HTTP (not HTTPS)\nhealth check. For all other load balancers, including backend service-based\nnetwork load balancers, and for managed instance group auto-healing, you must\nuse modern (non-legacy) health checks.\n\nFor more information, seeHealth checks\noverview.", - "id": "HttpsHealthCheck", - "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is 5\nseconds.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this\nmany consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" - }, - "host": { - "description": "The value of the host header in the HTTPS health check request. If left\nempty (default value), the public IP on behalf of which this health check\nis performed will be used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#httpsHealthCheck", - "description": "Type of the resource.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "port": { - "description": "The TCP port number for the HTTPS health check request. The default value\nis 443.", - "format": "int32", - "type": "integer" - }, - "requestPath": { - "description": "The request path of the HTTPS health check request. The default value is\n\"/\". Must comply withRFC3986.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is\n5 seconds. It is invalid for timeoutSec to have a greater value than\ncheckIntervalSec.", - "format": "int32", - "type": "integer" - }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this\nmany consecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpsHealthCheckList": { - "description": "Contains a list of HttpsHealthCheck resources.", - "id": "HttpsHealthCheckList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of HttpsHealthCheck resources.", - "items": { - "$ref": "HttpsHealthCheck" - }, - "type": "array" - }, - "kind": { - "default": "compute#httpsHealthCheckList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Image": { - "description": "Represents an Image resource.\n\nYou can use images to create boot disks for your VM instances.\nFor more information, read Images.", - "id": "Image", - "properties": { - "architecture": { - "description": "The architecture of the image. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "archiveSizeBytes": { - "description": "Size of the image tar.gz archive stored in Google Cloud\nStorage (in bytes).", - "format": "int64", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this image." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "Size of the image when restored onto a persistent disk (in GB).", - "format": "int64", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this image is created from a confidential compute mode disk.\n[Output Only]: This field is not set by user, but from source disk.", - "type": "boolean" - }, - "family": { - "description": "The name of the image family to which this image belongs. The image\nfamily name can be from a publicly managed image family provided by\nCompute Engine, or from a custom image family you create. For example,centos-stream-9 is a publicly available image family.\nFor more information, see Image\nfamily best practices.\n\nWhen creating disks, you can specify an image family instead of a specific\nimage name. The image family always returns its latest image that is not\ndeprecated. The name of the image family must comply with RFC1035.", - "type": "string" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable\nonly for bootable images. To see a list of available options, see theguestOSfeatures[].type parameter.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "imageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the image using acustomer-supplied\nencryption key.\n\nAfter you encrypt an image with a customer-supplied key, you must provide\nthe same key if you use the image later (e.g. to create a disk from\nthe image).\n\nCustomer-supplied encryption keys do not protect access to metadata\nof the disk.\n\nIf you do not provide an encryption key when creating the image, then the\ndisk will be encrypted using an automatically generated key and you do not\nneed to provide a key to use the image later." - }, - "kind": { - "default": "compute#image", - "description": "[Output Only] Type of the resource. Always compute#image for\nimages.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this image, which is\nessentially a hash of the labels used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an image.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this image. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "licenseCodes": { - "description": "Integer license codes indicating which licenses are attached to this image.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "Any applicable license URI.", - "items": { - "type": "string" - }, - "type": "array" - }, - "locked": { - "description": "A flag for marketplace VM disk created from the image, which is designed\nfor marketplace VM disk to prevent the proprietary data on the disk from\nbeing accessed unwantedly. The flag will be inherited by the disk created\nfrom the image.\n\nThe disk with locked flag set to true will be prohibited from performing\nthe operations below:\n \n - R/W or R/O disk attach\n - Disk detach, if disk is created via create-on-create\n - Create images\n - Create snapshots\n - Create disk clone (create disk from the current disk)\n\n\n\nThe image with the locked field set to true will be prohibited from\nperforming the operations below:\n \n - Create images from the current image\n - Update the locked field for the current image\n\n\n\nThe instance with at least one disk with locked flag set to true will be\nprohibited from performing the operations below:\n \n - Secondary disk attach\n - Create instant snapshot\n - Create machine images\n - Create instance template\n - Delete the instance with --keep-disk parameter set to true", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.images.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "ImageParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "rawDisk": { - "description": "The parameters of the raw disk image.", - "properties": { - "containerType": { - "description": "The format used to encode and transmit the block device, which should beTAR. This is just a container and transmission format and not\na runtime format. Provided by the client when the disk image is created.", - "enum": [ - "TAR" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "sha1Checksum": { - "deprecated": true, - "description": "[Deprecated] This field is deprecated.\nAn optional SHA1 checksum of the disk image before unpackaging provided\nby the client when the disk image is created.", - "pattern": "[a-f0-9]{40}", - "type": "string" - }, - "source": { - "description": "The full Google Cloud Storage URL where the raw disk image archive is\nstored.\nThe following are valid formats for the URL:\n \n - https://storage.googleapis.com/bucket_name/image_archive_name\n - https://storage.googleapis.com/bucket_name/folder_name/image_archive_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - } - }, - "type": "object" - }, - "rolloutOverride": { - "$ref": "RolloutPolicy", - "description": "A rollout policy to apply to this image. When specified, the rollout policy\noverrides per-zone references to the image via the associated image family.\nThe rollout policy restricts the zones where this image is accessible when\nusing a zonal image family reference. When the rollout policy does not\ninclude the user specified zone, or if the zone is rolled out, this image\nis accessible.\n\nThe rollout policy for this image is read-only, except for allowlisted\nusers. This field might not be configured. To view the latest\nnon-deprecated image in a specific zone, use theimageFamilyViews.get method." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "shieldedInstanceInitialState": { - "$ref": "InitialStateConfig", - "description": "Set the secure boot keys of shielded instance." - }, - "sourceDisk": { - "description": "URL of the source disk used to create this image.\nFor example, the following are valid values:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDiskId": { - "description": "[Output Only]\nThe ID value of the disk used to create this image. This value may be used\nto determine whether the image was taken from the current or a previous\ninstance of a given disk name.", - "type": "string" - }, - "sourceImage": { - "description": "URL of the source image used to create this image.\nThe following are valid formats for the URL:\n \n - https://www.googleapis.com/compute/v1/projects/project_id/global/\n images/image_name\n - projects/project_id/global/images/image_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source image. Required if the\nsource image is protected by a customer-supplied encryption key." - }, - "sourceImageId": { - "description": "[Output Only]\nThe ID value of the image used to create this image. This value may be used\nto determine whether the image was taken from the current or a previous\ninstance of a given image name.", - "type": "string" - }, - "sourceSnapshot": { - "description": "URL of the source snapshot used to create this image.\nThe following are valid formats for the URL:\n \n - https://www.googleapis.com/compute/v1/projects/project_id/global/\n snapshots/snapshot_name\n - projects/project_id/global/snapshots/snapshot_name\n\n\n\nIn order to create an image, you must provide the full or partial URL of\none of the following:\n \n - The rawDisk.source URL \n - The sourceDisk URL \n - The sourceImage URL \n - The sourceSnapshot URL", - "type": "string" - }, - "sourceSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied encryption key of the source snapshot. Required if\nthe source snapshot is protected by a customer-supplied encryption key." - }, - "sourceSnapshotId": { - "description": "[Output Only]\nThe ID value of the snapshot used to create this image. This value may be\nused to determine whether the snapshot was taken from the current or a\nprevious instance of a given snapshot name.", - "type": "string" - }, - "sourceType": { - "default": "RAW", - "description": "The type of the image used to create this disk. The\ndefault and only valid value is RAW.", - "enum": [ - "RAW" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the image. An image can be used to create other\nresources, such as instances, only after the image has been successfully\ncreated and the status is set to READY. Possible\nvalues are FAILED, PENDING, orREADY.", - "enum": [ - "DELETING", - "FAILED", - "PENDING", - "READY" - ], - "enumDescriptions": [ - "Image is deleting.", - "Image creation failed due to an error.", - "Image hasn't been created as yet.", - "Image has been successfully created." - ], - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the image (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLicenses": { - "description": "A list of publicly visible user-licenses. Unlike regular licenses, user\nprovided licenses can be modified after the disk is created. This includes\na list of URLs to the license resource. For example, to provide a debian\nlicense:\n\nhttps://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ImageFamilyView": { - "id": "ImageFamilyView", - "properties": { - "image": { - "$ref": "Image", - "description": "The latest image that is part of the specified image family in the\nrequested location, and that is not deprecated." - } - }, - "type": "object" - }, - "ImageList": { - "description": "Contains a list of images.", - "id": "ImageList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Image resources.", - "items": { - "$ref": "Image" - }, - "type": "array" - }, - "kind": { - "default": "compute#imageList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ImageParams": { - "description": "Additional image params.", - "id": "ImageParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the image. Tag keys and values have\nthe same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "InitialStateConfig": { - "description": "Initial State for shielded instance,\nthese are public keys which are safe to store in public", - "id": "InitialStateConfig", - "properties": { - "dbs": { - "description": "The Key Database (db).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "dbxs": { - "description": "The forbidden key database (dbx).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "keks": { - "description": "The Key Exchange Key (KEK).", - "items": { - "$ref": "FileContentBuffer" - }, - "type": "array" - }, - "pk": { - "$ref": "FileContentBuffer", - "description": "The Platform Key (PK)." - } - }, - "type": "object" - }, - "Instance": { - "description": "Represents an Instance resource.\n\nAn instance is a virtual machine that is hosted on Google Cloud Platform.\nFor more information, readVirtual Machine Instances.", - "id": "Instance", - "properties": { - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Controls for advanced machine-related behavior features." - }, - "canIpForward": { - "description": "Allows this instance to send and receive packets with non-matching\ndestination or source IPs. This is required if you plan to use this\ninstance to forward routes. For more information, seeEnabling IP Forwarding.", - "type": "boolean" - }, - "confidentialInstanceConfig": { - "$ref": "ConfidentialInstanceConfig" - }, - "cpuPlatform": { - "description": "[Output Only] The CPU platform used by this instance.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "deletionProtection": { - "description": "Whether the resource should be protected against deletion.", - "type": "boolean" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "disks": { - "description": "Array of disks associated with this instance. Persistent disks must be\ncreated before you can assign them.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "displayDevice": { - "$ref": "DisplayDevice", - "description": "Enables display device for the instance." - }, - "eraseWindowsVssSignature": { - "description": "Specifies whether the disks restored from source snapshots or source\nmachine image should erase Windows specific VSS signature.", - "type": "boolean" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe instance's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update the instance. You must always provide an\nup-to-date fingerprint hash in order to update the instance.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "guestAccelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "hostname": { - "description": "Specifies the hostname of the instance. The specified hostname must be\nRFC1035 compliant. If hostname is not specified, the default hostname is\n[INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and\n[INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts suspended data for an instance with acustomer-managed\nencryption key.\n\nIf you are creating a new instance, this field will encrypt the local SSD\nand in-memory contents of the instance during the suspend operation.\n\nIf you do not provide an encryption key when creating the instance, then\nthe local SSD and in-memory contents will be encrypted using\nan automatically generated key during the suspend operation." - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "kind": { - "default": "compute#instance", - "description": "[Output Only] Type of the resource. Always compute#instance\nfor instances.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for this request, which is essentially a hash of\nthe label's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this instance. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "lastStartTimestamp": { - "description": "[Output Only] Last start timestamp inRFC3339 text format.", - "type": "string" - }, - "lastStopTimestamp": { - "description": "[Output Only] Last stop timestamp inRFC3339 text format.", - "type": "string" - }, - "lastSuspendedTimestamp": { - "description": "[Output Only] Last suspended timestamp inRFC3339 text format.", - "type": "string" - }, - "machineType": { - "description": "Full or partial URL of the machine type resource to use for this instance,\nin the format:zones/zone/machineTypes/machine-type. This is provided by the client\nwhen the instance is created. For example, the following is a valid partial\nurl to a predefined\nmachine type:\n\nzones/us-central1-f/machineTypes/n1-standard-1\n\n\nTo create acustom\nmachine type, provide a URL to a machine type in the following format,\nwhere CPUS is 1 or an even number up to 32 (2,\n4, 6, ... 24, etc), and MEMORY is the total\nmemory for this instance. Memory must be a multiple of 256 MB and must\nbe supplied in MB (e.g. 5 GB of memory is 5120 MB):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY\n\n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120\nFor a full list of restrictions, read theSpecifications\nfor custom machine types.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs assigned\nto this instance. This includes metadata keys that were explicitly defined\nfor the instance." - }, - "minCpuPlatform": { - "description": "Specifies aminimum CPU\nplatform for the VM instance. Applicable values are the friendly names\nof CPU platforms, such as minCpuPlatform: \"Intel\nHaswell\" or minCpuPlatform: \"Intel Sandy\nBridge\".", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network configurations for this instance. These specify how\ninterfaces are configured to interact with other network services, such as\nconnecting to the internet. Multiple interfaces are supported\nper instance.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "networkPerformanceConfig": { - "$ref": "NetworkPerformanceConfig" - }, - "params": { - "$ref": "InstanceParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance. A map from a subdomain\n(namespace) to entries map.", - "type": "object" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "privateIpv6GoogleAccess": { - "description": "The private IPv6 google access type for the VM.\nIf not specified, use INHERIT_FROM_SUBNETWORK as default.", - "enum": [ - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", - "INHERIT_FROM_SUBNETWORK" - ], - "enumDescriptions": [ - "Bidirectional private IPv6 access to/from Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Outbound private IPv6 access from VMs in this subnet to Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Each network interface inherits PrivateIpv6GoogleAccess from its\nsubnetwork." - ], - "type": "string" - }, - "reservationAffinity": { - "$ref": "ReservationAffinity", - "description": "Specifies the reservations that this instance can consume from." - }, - "resourcePolicies": { - "description": "Resource policies applied to this instance.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceStatus": { - "$ref": "ResourceStatus", - "description": "[Output Only] Specifies values set for instance attributes as\ncompared to the values requested by user in the corresponding input only\nfield." - }, - "satisfiesPzi": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Sets the scheduling options for this instance." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "serviceAccounts": { - "description": "A list of service accounts, with their specified scopes, authorized for\nthis instance. Only one service account per VM instance is supported.\n\nService accounts generate access tokens that can be accessed\nthrough the metadata server and used to authenticate applications on the\ninstance. SeeService Accounts\nfor more information.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig" - }, - "shieldedInstanceIntegrityPolicy": { - "$ref": "ShieldedInstanceIntegrityPolicy" - }, - "shieldedVmConfig": { - "$ref": "ShieldedVmConfig", - "description": "Deprecating, please use shielded_instance_config." - }, - "shieldedVmIntegrityPolicy": { - "$ref": "ShieldedVmIntegrityPolicy", - "description": "Deprecating, please use shielded_instance_integrity_policy." - }, - "sourceMachineImage": { - "description": "Source machine image", - "type": "string" - }, - "sourceMachineImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Source machine image encryption key when creating an instance from a\nmachine image." - }, - "startRestricted": { - "description": "[Output Only] Whether a VM has been restricted for start because Compute\nEngine has detected suspicious activity.", - "type": "boolean" - }, - "status": { - "description": "[Output Only] The status of the instance. One of the\nfollowing values: PROVISIONING, STAGING,RUNNING, STOPPING, SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about the status of the\ninstance, see \nInstance life cycle.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - }, - "tags": { - "$ref": "Tags", - "description": "Tags to apply to this instance. Tags are used to identify valid\nsources or targets for network firewalls and are specified by the client\nduring instance creation. The tags can be later modified by the setTags\nmethod. Each tag within the list must comply withRFC1035.\nMultiple tags can be specified via the 'tags.items' field." - }, - "zone": { - "description": "[Output Only] URL of the zone where the instance resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceAggregatedList": { - "id": "InstanceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstancesScopedList", - "description": "[Output Only] Name of the scope containing this set of instances." - }, - "description": "An object that contains a list of instances scoped by zone.", - "type": "object" - }, - "kind": { - "default": "compute#instanceAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#instanceAggregatedList for aggregated lists of\nInstance resources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceConsumptionData": { - "id": "InstanceConsumptionData", - "properties": { - "consumptionInfo": { - "$ref": "InstanceConsumptionInfo", - "description": "Resources consumed by the instance." - }, - "instance": { - "description": "Server-defined URL for the instance.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceConsumptionInfo": { - "id": "InstanceConsumptionInfo", - "properties": { - "guestCpus": { - "description": "The number of virtual CPUs that are available to the instance.", - "format": "int32", - "type": "integer" - }, - "localSsdGb": { - "description": "The amount of local SSD storage available to the instance,\ndefined in GiB.", - "format": "int32", - "type": "integer" - }, - "memoryMb": { - "description": "The amount of physical memory available to the instance,\ndefined in MiB.", - "format": "int32", - "type": "integer" - }, - "minNodeCpus": { - "description": "The minimal guaranteed number of virtual CPUs that are reserved.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroup": { - "description": "Represents an Instance Group resource.\n\nInstance Groups can be used to configure a target forload\nbalancing.\n\nInstance groups can either be managed or unmanaged.\n\nTo create \nmanaged instance groups, use the instanceGroupManager orregionInstanceGroupManager resource instead.\n\nUse zonal unmanaged instance groups if you need to applyload\nbalancing to groups of heterogeneous instances or if you need to manage\nthe instances yourself. You cannot create regional unmanaged instance groups.\n\nFor more information, readInstance\ngroups.", - "id": "InstanceGroup", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this instance group inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the named ports. The system\nuses this fingerprint to detect conflicts when multiple users change the\nnamed ports concurrently.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this instance group, generated\nby the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instanceGroup", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroup for instance groups.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - }, - "description": "The name of the instance group. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namedPorts": { - "description": "Optional. Assigns a name to a port number. For example:{name: \"http\", port: 80}\n\nThis\nallows the system to reference ports by the assigned name instead of a\nport number. Named ports can also contain multiple ports. For example:[{name: \"app1\", port: 8080}, {name:\n\"app1\", port: 8081}, {name: \"app2\", port:\n8082}]\n\nNamed ports apply to all instances in this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "network": { - "description": "[Output Only] The URL of the network to which all instances in the\ninstance group belong. If your instance has multiple network interfaces,\nthen the network and subnetwork fields only refer to the\nnetwork and subnet used by your primary interface (nic0).", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the instance group is located (for regional resources).", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] The URL for this instance group. The server generates\nthis URL.", - "type": "string" - }, - "size": { - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32", - "type": "integer" - }, - "subnetwork": { - "description": "[Output Only] The URL of the subnetwork to which all instances in the\ninstance group belong. If your instance has multiple network interfaces,\nthen the network and subnetwork fields only refer to the\nnetwork and subnet used by your primary interface (nic0).", - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of thezone\nwhere the instance group is located (for zonal resources).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - }, - "description": "A list of InstanceGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceGroupAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupAggregatedList for aggregated lists of\ninstance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupList": { - "description": "A list of InstanceGroup resources.", - "id": "InstanceGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupList for instance group lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManager": { - "description": "Represents a Managed Instance Group resource.\n\nAn instance group is a collection of VM instances that you can manage as a\nsingle entity. For more information, readInstance groups.\n\nFor zonal Managed Instance Group, use the instanceGroupManagers\nresource.\n\nFor regional Managed Instance Group, use theregionInstanceGroupManagers resource.", - "id": "InstanceGroupManager", - "properties": { - "allInstancesConfig": { - "$ref": "InstanceGroupManagerAllInstancesConfig", - "description": "Specifies configuration that overrides the instance template configuration\nfor the group." - }, - "autoHealingPolicies": { - "description": "The autohealing policy for this managed instance group. You can specify\nonly one value.", - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - }, - "baseInstanceName": { - "description": "The base instance name is a prefix that you want to attach to the names of\nall VMs in a MIG. The maximum character length is 58 and the name must\ncomply with RFC1035 format.\n\nWhen a VM is created in the group, the MIG appends a hyphen and a random\nfour-character string to the base instance name. If you want the MIG to\nassign sequential numbers instead of a random string, then end the base\ninstance name with a hyphen followed by one or more hash symbols. The hash\nsymbols indicate the number of digits. For example, a base instance name of\n\"vm-###\" results in \"vm-001\" as a VM name.\n@pattern\n[a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this managed instance group inRFC3339\ntext format.", - "type": "string" - }, - "currentActions": { - "$ref": "InstanceGroupManagerActionsSummary", - "description": "[Output Only] The list of instance actions and the number of instances\nin this managed instance group that are scheduled for each of those\nactions." - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "distributionPolicy": { - "$ref": "DistributionPolicy", - "description": "Policy specifying the intended distribution of managed instances across\nzones in a regional managed instance group." - }, - "failoverAction": { - "description": "The action to perform in case of zone failure. Only one value is supported,NO_FAILOVER. The default is NO_FAILOVER.", - "enum": [ - "NO_FAILOVER", - "UNKNOWN" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. This field may be used in optimistic locking.\nIt will be ignored when inserting an InstanceGroupManager. An up-to-date\nfingerprint must be provided in order to update the InstanceGroupManager,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an InstanceGroupManager.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "instanceFlexibilityPolicy": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicy", - "description": "Instance flexibility allowing MIG to create VMs from multiple\ntypes of machines.\nInstance flexibility configuration on MIG overrides instance\ntemplate configuration." - }, - "instanceGroup": { - "description": "[Output Only] The URL of the Instance Group resource.", - "type": "string" - }, - "instanceLifecyclePolicy": { - "$ref": "InstanceGroupManagerInstanceLifecyclePolicy", - "description": "The repair policy for this managed instance group." - }, - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create all new instances\nin the managed instance group. The templates for existing instances in the\ngroup do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "type": "string" - }, - "kind": { - "default": "compute#instanceGroupManager", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManager for managed instance groups.", - "type": "string" - }, - "listManagedInstancesResults": { - "description": "Pagination behavior of the listManagedInstances API method for\nthis managed instance group.", - "enum": [ - "PAGELESS", - "PAGINATED" - ], - "enumDescriptions": [ - "(Default) Pagination is disabled for the group'slistManagedInstances API method. maxResults\nand pageToken query parameters are ignored and all\ninstances are returned in a single response.", - "Pagination is enabled for the group's listManagedInstances\nAPI method. maxResults and pageToken query\nparameters are respected." - ], - "type": "string" - }, - "multiMig": { - "description": "URL to the multi-MIG that this Managed Instance Group belongs to.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - }, - "description": "The name of the managed instance group. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namedPorts": { - "description": "[Output Only] Named ports configured on the Instance Groups complementary\nto this Instance Group Manager.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "params": { - "$ref": "InstanceGroupManagerParams", - "description": "Input only. Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the managed instance group resides (for regional resources).", - "type": "string" - }, - "resourcePolicies": { - "$ref": "InstanceGroupManagerResourcePolicies", - "description": "Resource policies for this managed instance group." - }, - "satisfiesPzi": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] The URL for this managed instance group. The server defines\nthis URL.", - "type": "string" - }, - "serviceAccount": { - "description": "The service account to be used as credentials for all operations performed\nby the managed instance group on instances. The service accounts needs all\npermissions required to create and delete instances.\nBy default, the service account\n{projectNumber}@cloudservices.gserviceaccount.com is used.", - "type": "string" - }, - "standbyPolicy": { - "$ref": "InstanceGroupManagerStandbyPolicy", - "description": "Standby policy for stopped and suspended instances." - }, - "statefulPolicy": { - "$ref": "StatefulPolicy", - "description": "Stateful configuration for this Instanced Group Manager" - }, - "status": { - "$ref": "InstanceGroupManagerStatus", - "description": "[Output Only] The status of this managed instance group." - }, - "targetPools": { - "description": "The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically\napply to all of the instances in the managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetSize": { - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert", - "compute.regionInstanceGroupManagers.insert" - ] - }, - "description": "The target number of running instances for this managed instance group.\nYou can reduce this number by using the instanceGroupManager\ndeleteInstances or abandonInstances methods. Resizing the group also\nchanges this number.", - "format": "int32", - "type": "integer" - }, - "targetSizePolicy": { - "$ref": "InstanceGroupManagerTargetSizePolicy", - "description": "The policy that specifies how the MIG creates its VMs to achieve the target\nsize." - }, - "targetStoppedSize": { - "description": "The target number of stopped instances for this managed instance group.\nThis number changes when you: \n \n - Stop instance using the stopInstances\n method or start instances using the startInstances\n method.\n - Manually change the targetStoppedSize using the update\n method.", - "format": "int32", - "type": "integer" - }, - "targetSuspendedSize": { - "description": "The target number of suspended instances for this managed instance group.\nThis number changes when you: \n \n - Suspend instance using the suspendInstances\n method or resume instances using the resumeInstances\n method.\n - Manually change the targetSuspendedSize using the update\n method.", - "format": "int32", - "type": "integer" - }, - "updatePolicy": { - "$ref": "InstanceGroupManagerUpdatePolicy", - "description": "The update policy for this managed instance group." - }, - "versions": { - "description": "Specifies the instance templates used by this managed instance group to\ncreate instances.\n\nEach version is defined by an instanceTemplate and aname. Every version can appear at most once per instance\ngroup. This field overrides the top-level instanceTemplate\nfield. Read more about therelationships\nbetween these fields. Exactly one version must leave thetargetSize field unset. That version will be applied to all\nremaining instances. For more information, read aboutcanary\nupdates.", - "items": { - "$ref": "InstanceGroupManagerVersion" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of azone\nwhere the managed instance group is located (for zonal resources).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerActionsSummary": { - "id": "InstanceGroupManagerActionsSummary", - "properties": { - "abandoning": { - "description": "[Output Only] The total number of instances in the managed instance group\nthat are scheduled to be abandoned. Abandoning an instance removes it\nfrom the managed instance group without deleting it.", - "format": "int32", - "type": "integer" - }, - "creating": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be created or are currently being created. If the group\nfails to create any of these instances, it tries again until it creates\nthe instance successfully.\n\nIf you have disabled creation retries, this field will not be populated;\ninstead, the creatingWithoutRetries field will be populated.", - "format": "int32", - "type": "integer" - }, - "creatingWithoutRetries": { - "description": "[Output Only] The number of instances that the managed instance group\nwill attempt to create. The group attempts to create each instance\nonly once. If the group fails to create any of these instances, it\ndecreases the group's targetSize value accordingly.", - "format": "int32", - "type": "integer" - }, - "deleting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be deleted or are currently being deleted.", - "format": "int32", - "type": "integer" - }, - "none": { - "description": "[Output Only] The number of instances in the managed instance group that\nare running and have no scheduled actions.", - "format": "int32", - "type": "integer" - }, - "recreating": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be recreated or are currently being being recreated.\nRecreating an instance deletes the existing root persistent disk\nand creates a new disk from the image that is defined in the\ninstance template.", - "format": "int32", - "type": "integer" - }, - "refreshing": { - "description": "[Output Only] The number of instances in the managed instance group that\nare being reconfigured with properties that do not require a restart\nor a recreate action. For example, setting or removing target\npools for the instance.", - "format": "int32", - "type": "integer" - }, - "restarting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be restarted or are currently being restarted.", - "format": "int32", - "type": "integer" - }, - "resuming": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be resumed or are currently being resumed.", - "format": "int32", - "type": "integer" - }, - "starting": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be started or are currently being started.", - "format": "int32", - "type": "integer" - }, - "stopping": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be stopped or are currently being stopped.", - "format": "int32", - "type": "integer" - }, - "suspending": { - "description": "[Output Only] The number of instances in the managed instance group that\nare scheduled to be suspended or are currently being suspended.", - "format": "int32", - "type": "integer" - }, - "verifying": { - "description": "[Output Only] The number of instances in the managed instance group that\nare being verified. See the managedInstances[].currentAction\nproperty in the listManagedInstances method documentation.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerAggregatedList": { - "id": "InstanceGroupManagerAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceGroupManagersScopedList", - "description": "[Output Only] The name of the scope that contains this set of managed\ninstance groups." - }, - "description": "A list of InstanceGroupManagersScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceGroupManagerAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManagerAggregatedList for an aggregated\nlist of managed instance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerAllInstancesConfig": { - "id": "InstanceGroupManagerAllInstancesConfig", - "properties": { - "properties": { - "$ref": "InstancePropertiesPatch", - "description": "Properties to set on all instances in the group.\n\nYou can add or modify properties using theinstanceGroupManagers.patch orregionInstanceGroupManagers.patch. After settingallInstancesConfig on the group, you must update the group's\ninstances to apply the configuration. To apply the configuration, set the\ngroup's updatePolicy.type field to use proactive updates or\nuse the applyUpdatesToInstances method." - } - }, - "type": "object" - }, - "InstanceGroupManagerAutoHealingPolicy": { - "id": "InstanceGroupManagerAutoHealingPolicy", - "properties": { - "healthCheck": { - "description": "The URL for the health check that signals autohealing.", - "type": "string" - }, - "initialDelaySec": { - "description": "The initial delay is the number of seconds that a new VM takes to\ninitialize and run its startup script. During a VM's initial delay\nperiod, the MIG ignores unsuccessful health checks because the VM might\nbe in the startup process. This prevents the MIG from prematurely\nrecreating a VM. If the health check receives a healthy response during\nthe initial delay, it indicates that the startup process is complete and\nthe VM is ready. The value of initial delay must be between 0 and 3600\nseconds. The default value is 0.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicy": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicy", - "properties": { - "instanceSelections": { - "additionalProperties": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection" - }, - "description": "Named instance selections configuring properties that the group will use\nwhen creating new VMs.", - "type": "object" - }, - "provisioningModelMix": { - "$ref": "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", - "description": "Provisioning model configuration used by this managed instance group to\ncreate instances." - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection", - "properties": { - "disks": { - "description": "List of disks to be attached to the instances created from this\nselection.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineTypes": { - "description": "Full machine-type names, e.g. \"n1-standard-16\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "minCpuPlatform": { - "description": "Name of the minimum CPU platform to be used by this instance selection.\ne.g. 'Intel Ice Lake'.", - "type": "string" - }, - "rank": { - "description": "Preference of this instance selection. Lower number means higher\npreference. MIG will first try to create a VM based on the machine-type\nwith lowest rank and fallback to next rank based on availability.\nMachine types and instance selections with the same rank have the same\npreference.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix": { - "id": "InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix", - "properties": { - "standardCapacityBase": { - "description": "The base capacity that will always use Standard VMs to avoid risk of\nmore preemption than the minimum capacity user needs. MIG will create\nonly Standard VMs until it reaches standard_capacity_base and only\nthen will start using standard_capacity_percent_above_base to mix Spot\nwith Standard VMs.", - "format": "int32", - "type": "integer" - }, - "standardCapacityPercentAboveBase": { - "description": "The percentage of target capacity that should use Standard VM. The\nremaining percentage will use Spot VMs. The percentage applies only to\nthe capacity above standard_capacity_base.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceLifecyclePolicy": { - "id": "InstanceGroupManagerInstanceLifecyclePolicy", - "properties": { - "defaultActionOnFailure": { - "description": "The action that a MIG performs on a failed VM. If the value of the onFailedHealthCheck field\nis `DEFAULT_ACTION`, then the same action also applies to the VMs on which your application\nfails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed\nVM by recreating it. For more information, seeAbout repairing\nVMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM.", - "enum": [ - "DELETE", - "DO_NOTHING", - "REPAIR" - ], - "enumDescriptions": [ - "MIG deletes a failed or an unhealthy VM. Deleting the VM decreases\nthe target size of the MIG.", - "MIG does not repair a failed VM.", - "(default): MIG automatically repairs a failed VM by recreating it. For more information, seeAbout repairing\nVMs in a MIG." - ], - "type": "string" - }, - "forceUpdateOnRepair": { - "description": "A bit indicating whether to forcefully apply the group's latest\nconfiguration when repairing a VM. Valid options are:\n\n \n \n - NO (default): If configuration updates are available, they are not\n forcefully applied during repair. Instead, configuration updates are\n applied according to the group's update policy.\n \n - YES: If configuration updates are available, they are applied\n during repair.", - "enum": [ - "NO", - "YES" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "onFailedHealthCheck": { - "description": "The action that a MIG performs on an unhealthy VM. A VM is marked as\nunhealthy when the application running on that VM fails a health check.\nValid values are:\n \n - DEFAULT_ACTION (default): MIG uses the same action\n configured for instanceLifecyclePolicy.defaultActionOnFailure field.\n - REPAIR: MIG automatically repairs an unhealthy VM by\n recreating it.\n - DO_NOTHING: MIG doesn't repair an unhealthy VM.\n For more information, see \n About repairing VMs in a MIG.", - "enum": [ - "DEFAULT_ACTION", - "DO_NOTHING", - "REPAIR" - ], - "enumDescriptions": [ - "(Default) MIG uses the same action configured for\ninstanceLifecyclePolicy.defaultActionOnFailure field.", - "MIG doesn't repair an unhealthy VM.", - "MIG automatically repairs an unhealthy VM by recreating it." - ], - "type": "string" - }, - "onRepair": { - "$ref": "InstanceGroupManagerInstanceLifecyclePolicyOnRepair", - "description": "Configuration for VM repairs in the MIG." - } - }, - "type": "object" - }, - "InstanceGroupManagerInstanceLifecyclePolicyOnRepair": { - "description": "Configuration for VM repairs in the MIG.", - "id": "InstanceGroupManagerInstanceLifecyclePolicyOnRepair", - "properties": { - "allowChangingZone": { - "description": "Specifies whether the MIG can change a VM's zone during a repair.\nValid values are:\n \n - NO (default): MIG cannot change a VM's zone during a\n repair.\n - YES: MIG can select a different zone for the VM during\n a repair.", - "enum": [ - "NO", - "YES" - ], - "enumDescriptions": [ - "[Default] MIG cannot change a VM's zone during a repair.", - "MIG can select a different zone for the VM during a repair." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerList": { - "description": "[Output Only] A list of managed instance groups.", - "id": "InstanceGroupManagerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerList", - "description": "[Output Only] The resource type, which is always\ncompute#instanceGroupManagerList for a list of managed instance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerParams": { - "description": "Input only additional params for instance group manager creation.", - "id": "InstanceGroupManagerParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to bind to the managed instance group. The tags are\nkey-value pairs. Keys must be in the format tagKeys/123 and values in the\nformat tagValues/456. For more information, seeManage tags\nfor resources.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequest": { - "description": "InstanceGroupManagerResizeRequest represents a request to create\na number of VMs: either immediately or by queuing the request for the\nspecified time. This resize request is nested under InstanceGroupManager\nand the VMs created by this request are added to the owning\nInstanceGroupManager.", - "id": "InstanceGroupManagerResizeRequest", - "properties": { - "count": { - "deprecated": true, - "description": "This field is deprecated, please use resize_by instead.\nThe count of instances to create as part of this resize request.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this resize request inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "instances": { - "description": "The names of instances to be created by this resize request. The number of\nnames specified determines the number of instances to create. The group's\ntarget size will be increased by this number. This field cannot be used\ntogether with 'resize_by'.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerResizeRequest", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupManagerResizeRequest for\nresize requests.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroupManagerResizeRequests.insert" - ] - }, - "description": "The name of this resize request. The name must be 1-63 characters\nlong, and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of aregion\nwhere the resize request is located. Populated only for regional resize\nrequests.", - "type": "string" - }, - "requestedRunDuration": { - "$ref": "Duration", - "description": "Requested run duration for instances that will be created by this request.\nAt the end of the run duration instance will be deleted." - }, - "resizeBy": { - "description": "The number of instances to be created by this resize request. The group's\ntarget size will be increased by this number. This field cannot be used\ntogether with 'instances'.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] The URL for this resize request. The server defines\nthis URL.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "state": { - "description": "[Output only] Current state of the request.", - "enum": [ - "ACCEPTED", - "CANCELLED", - "CREATING", - "FAILED", - "PROVISIONING", - "STATE_UNSPECIFIED", - "SUCCEEDED" - ], - "enumDeprecated": [ - false, - false, - false, - false, - true, - false, - false - ], - "enumDescriptions": [ - "The request was created successfully and was accepted for provisioning\nwhen the capacity becomes available.", - "The request is cancelled.", - "Resize request is being created and may still fail creation.", - "The request failed before or during provisioning. If the request fails\nduring provisioning, any VMs that were created during provisioning are\nrolled back and removed from the MIG.", - "The value is deprecated. ResizeRequests would stay in the ACCEPTED state\nduring provisioning attempts.\nThe target resource(s) are being provisioned.", - "Default value. This value should never be returned.", - "The request succeeded." - ], - "type": "string" - }, - "status": { - "$ref": "InstanceGroupManagerResizeRequestStatus", - "description": "[Output only] Status of the request." - }, - "zone": { - "description": "[Output Only] The URL of azone\nwhere the resize request is located. Populated only for zonal resize\nrequests.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestStatus": { - "id": "InstanceGroupManagerResizeRequestStatus", - "properties": { - "error": { - "description": "[Output only] Fatal errors encountered during the queueing or\nprovisioning phases of the ResizeRequest that caused the transition to\nthe FAILED state. Contrary to the last_attempt errors, this field is\nfinal and errors are never removed from here, as the ResizeRequest is not\ngoing to retry.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "lastAttempt": { - "$ref": "InstanceGroupManagerResizeRequestStatusLastAttempt", - "description": "[Output only] Information about the last attempt to fulfill the request.\nThe value is temporary since the ResizeRequest can retry, as long as it's\nstill active and the last attempt value can either be cleared or replaced\nwith a different error. Since ResizeRequest retries infrequently, the\nvalue may be stale and no longer show an active problem. The value is\ncleared when ResizeRequest transitions to the final state (becomes\ninactive). If the final state is FAILED the error describing it will be\nstorred in the \"error\" field only." - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestStatusLastAttempt": { - "id": "InstanceGroupManagerResizeRequestStatusLastAttempt", - "properties": { - "error": { - "description": "Errors that prevented the ResizeRequest to be fulfilled.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResizeRequestsListResponse": { - "description": "[Output Only] A list of resize requests.", - "id": "InstanceGroupManagerResizeRequestsListResponse", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of resize request resources.", - "items": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupManagerResizeRequestList", - "description": "[Output Only] Type of the resource. Alwayscompute#instanceGroupManagerResizeRequestList for\na list of resize requests.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagerResourcePolicies": { - "id": "InstanceGroupManagerResourcePolicies", - "properties": { - "workloadPolicy": { - "description": "The URL of the workload policy that is specified for this managed\ninstance group.\nIt can be a full or partial URL. For example, the following are\nall valid URLs to a workload policy: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n - projects/project/regions/region/resourcePolicies/resourcePolicy\n - regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStandbyPolicy": { - "id": "InstanceGroupManagerStandbyPolicy", - "properties": { - "initialDelaySec": { - "description": "Specifies the number of seconds that the MIG should wait to suspend or\nstop a VM after that VM was created. The initial delay gives the\ninitialization script the time to prepare your VM for a quick scale out.\nThe value of initial delay must be between 0 and 3600 seconds. The\ndefault value is 0.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "Defines how a MIG resumes or starts VMs from a standby pool when the\ngroup scales out. The default mode is `MANUAL`.", - "enum": [ - "MANUAL", - "SCALE_OUT_POOL" - ], - "enumDescriptions": [ - "MIG does not automatically resume or start VMs in the standby pool when\nthe group scales out.", - "MIG automatically resumes or starts VMs in the standby pool when the\ngroup scales out, and replenishes the standby pool afterwards." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatus": { - "id": "InstanceGroupManagerStatus", - "properties": { - "allInstancesConfig": { - "$ref": "InstanceGroupManagerStatusAllInstancesConfig", - "description": "[Output only] Status of all-instances configuration on the group." - }, - "autoscaler": { - "description": "[Output Only] The URL of theAutoscaler\nthat targets this instance group manager.", - "type": "string" - }, - "bulkInstanceOperation": { - "$ref": "InstanceGroupManagerStatusBulkInstanceOperation", - "description": "[Output Only] The status of bulk instance operation." - }, - "isStable": { - "description": "[Output Only] A bit indicating whether the managed instance group is in a\nstable state. A stable state means that: none of the instances in the\nmanaged instance group is currently undergoing any type of change (for\nexample, creation, restart, or deletion); no future changes are scheduled\nfor instances in the managed instance group; and the managed instance\ngroup itself is not being modified.", - "type": "boolean" - }, - "stateful": { - "$ref": "InstanceGroupManagerStatusStateful", - "description": "[Output Only] Stateful status of the given Instance Group Manager." - }, - "versionTarget": { - "$ref": "InstanceGroupManagerStatusVersionTarget", - "description": "[Output Only] A status of consistency of Instances' versions with their\ntarget version specified by version field on Instance Group\nManager." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusAllInstancesConfig": { - "id": "InstanceGroupManagerStatusAllInstancesConfig", - "properties": { - "currentRevision": { - "description": "[Output Only] Current all-instances configuration revision.\nThis value is in RFC3339 text format.", - "type": "string" - }, - "effective": { - "description": "[Output Only] A bit indicating whether this configuration has\nbeen applied to all managed instances in the group.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusBulkInstanceOperation": { - "description": "Bulk instance operation is the creation of VMs in a MIG when the\ntargetSizePolicy.mode is set to BULK.", - "id": "InstanceGroupManagerStatusBulkInstanceOperation", - "properties": { - "inProgress": { - "description": "[Output Only] Informs whether bulk instance operation is in progress.", - "type": "boolean" - }, - "lastProgressCheck": { - "$ref": "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", - "description": "[Output Only] Information from the last progress check of bulk instance\noperation." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck": { - "id": "InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck", - "properties": { - "error": { - "description": "[Output Only] Errors encountered during bulk instance operation.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Timestamp of the last progress check of bulk instance\noperation. Timestamp is in RFC3339 text format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusStateful": { - "id": "InstanceGroupManagerStatusStateful", - "properties": { - "hasStatefulConfig": { - "description": "[Output Only] A bit indicating whether the managed instance group\nhas stateful configuration, that is, if you have configured any items\nin a stateful policy or in per-instance configs.\nThe group might report that it has no stateful configuration even when\nthere is still some preserved state on a managed instance, for example,\nif you have deleted all PICs but not yet applied those deletions.", - "type": "boolean" - }, - "isStateful": { - "deprecated": true, - "description": "[Output Only] A bit indicating whether the managed instance group\nhas stateful configuration, that is, if you have configured any items\nin a stateful policy or in per-instance configs.\nThe group might report that it has no stateful configuration even when\nthere is still some preserved state on a managed instance, for example,\nif you have deleted all PICs but not yet applied those deletions. This\nfield is deprecated in favor of has_stateful_config.", - "type": "boolean" - }, - "perInstanceConfigs": { - "$ref": "InstanceGroupManagerStatusStatefulPerInstanceConfigs", - "description": "[Output Only] Status of per-instance configurations on the instances." - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusStatefulPerInstanceConfigs": { - "id": "InstanceGroupManagerStatusStatefulPerInstanceConfigs", - "properties": { - "allEffective": { - "description": "A bit indicating if all of the group's per-instance configurations\n(listed in the output of a listPerInstanceConfigs API call) have\nstatus EFFECTIVE or there are no per-instance-configs.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerStatusVersionTarget": { - "id": "InstanceGroupManagerStatusVersionTarget", - "properties": { - "isReached": { - "description": "[Output Only] A bit indicating whether version target has been reached\nin this managed instance group, i.e. all instances are in their target\nversion. Instances' target version are specified byversion field on Instance Group Manager.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagerTargetSizePolicy": { - "id": "InstanceGroupManagerTargetSizePolicy", - "properties": { - "mode": { - "description": "The mode of target size policy based on which the MIG creates its VMs\nindividually or all at once.", - "enum": [ - "BULK", - "INDIVIDUAL", - "UNSPECIFIED_MODE" - ], - "enumDescriptions": [ - "The mode in which the MIG creates VMs all at once. In this mode, if the\nMIG is unable to create even one VM, the MIG waits until all VMs can be\ncreated at the same time.", - "The mode in which the MIG creates VMs individually. In this mode, if\nthe MIG is unable to create a VM, the MIG will continue to create the\nother VMs in the group. This is the default mode.", - "If mode is unspecified, MIG will behave as in the default `INDIVIDUAL`\nmode." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerUpdatePolicy": { - "id": "InstanceGroupManagerUpdatePolicy", - "properties": { - "instanceRedistributionType": { - "description": "The \ninstance redistribution policy for regional managed instance groups.\nValid values are: \n \n - PROACTIVE (default): The group attempts to maintain an\n even distribution of VM instances across zones in the region.\n - NONE: For non-autoscaled groups, proactive\n redistribution is disabled.", - "enum": [ - "NONE", - "PROACTIVE" - ], - "enumDescriptions": [ - "No action is being proactively performed in order to bring this IGM\nto its target instance distribution.", - "This IGM will actively converge to its target instance distribution." - ], - "type": "string" - }, - "maxSurge": { - "$ref": "FixedOrPercent", - "description": "The maximum number of instances that can be created above the specifiedtargetSize during the update process. This value can be\neither a fixed number or, if the group has 10 or more instances, a\npercentage. If you set a percentage, the number of instances is rounded\nif necessary. The default value for maxSurge is a fixed\nvalue equal to the number of zones in which the managed instance group\noperates.\n\nAt least one of either maxSurge ormaxUnavailable must be greater than 0. Learn more about maxSurge." - }, - "maxUnavailable": { - "$ref": "FixedOrPercent", - "description": "The maximum number of instances that can be unavailable during the update\nprocess. An instance is considered available if all of the following\nconditions are satisfied:\n\n \n \n - The instance's status is\n RUNNING. \n - If there is a health\n check on the instance group, the instance's health check status\n must be HEALTHY at least once. If there is no health check\n on the group, then the instance only needs to have a status of\n RUNNING to be considered available.\n\n\nThis value can be either a fixed number or, if the group has 10 or more\ninstances, a percentage. If you set a percentage, the number of instances\nis rounded if necessary. The default value formaxUnavailable is a fixed value equal to the number of zones\nin which the managed instance group operates.\n\nAt least one of either maxSurge ormaxUnavailable must be greater than 0. Learn more about maxUnavailable." - }, - "minReadySec": { - "description": "Minimum number of seconds to wait for after a newly created instance\nbecomes available. This value must be from range [0, 3600].", - "format": "int32", - "type": "integer" - }, - "minimalAction": { - "description": "Minimal action to be taken on an instance. Use this option to minimize\ndisruption as much as possible or to apply a more disruptive action than\nis necessary.\n \n - To limit disruption as much as possible, set the minimal action toREFRESH. If your update requires a more disruptive action,\n Compute Engine performs the necessary action to execute the update.\n - To apply a more disruptive action than is strictly necessary, set the\n minimal action to RESTART or REPLACE. For\n example, Compute Engine does not need to restart a VM to change its\n metadata. But if your application reads instance metadata only when a VM\n is restarted, you can set the minimal action to RESTART in\n order to pick up metadata changes.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "Most disruptive action that is allowed to be taken on an instance.\nYou can specify either NONE to forbid any actions,REFRESH to avoid restarting the VM and to limit disruption\nas much as possible. RESTART to allow actions that can be\napplied without instance replacing or REPLACE to allow all\npossible actions. If the Updater determines that the minimal update\naction needed is more disruptive than most disruptive allowed action you\nspecify it will not perform the update at all.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "replacementMethod": { - "description": "What action should be used to replace instances.\nSee minimal_action.REPLACE", - "enum": [ - "RECREATE", - "SUBSTITUTE" - ], - "enumDescriptions": [ - "Instances will be recreated (with the same name)", - "Default option: instances will be deleted and created (with a new name)" - ], - "type": "string" - }, - "type": { - "description": "The type\nof update process. You can specify either PROACTIVE so\nthat the MIG automatically updates VMs to the latest configurations orOPPORTUNISTIC so that you can select the VMs that you want\nto update.", - "enum": [ - "OPPORTUNISTIC", - "PROACTIVE" - ], - "enumDescriptions": [ - "MIG will apply new configurations\nto existing VMs only when you selectively target specific or all VMs to\nbe updated.", - "MIG will automatically apply new configurations\nto all or a subset of existing VMs and also to new VMs that are added\nto the group." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagerVersion": { - "id": "InstanceGroupManagerVersion", - "properties": { - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create new instances in\nthe managed instance group until the `targetSize` for this version is\nreached. The templates for existing instances in the group do not change\nunless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE; in those cases,\nexisting instances are updated until the `targetSize` for this version is\nreached.", - "type": "string" - }, - "name": { - "description": "Name of the version. Unique among all versions in the scope of this\nmanaged instance group.", - "type": "string" - }, - "targetSize": { - "$ref": "FixedOrPercent", - "description": "Specifies the intended number of instances to be created from theinstanceTemplate. The final number of instances created\nfrom the template will be equal to:\n \n \n - If expressed as a fixed number, the minimum of either\n targetSize.fixed or\n instanceGroupManager.targetSize is used.\n - if expressed as a percent, the targetSize\n would be (targetSize.percent/100 *\n InstanceGroupManager.targetSize) If there is a remainder, the\n number is rounded.\n \n If unset, this version will update any remaining instances not\nupdated by another version. ReadStarting\na canary update for more information." - } - }, - "type": "object" - }, - "InstanceGroupManagersAbandonInstancesRequest": { - "id": "InstanceGroupManagersAbandonInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to abandon. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersApplyUpdatesRequest": { - "description": "InstanceGroupManagers.applyUpdatesToInstances", - "id": "InstanceGroupManagersApplyUpdatesRequest", - "properties": { - "allInstances": { - "description": "Flag to update all instances instead of specified list of “instances”.\nIf the flag is set to true then the instances may not be specified\nin the request.", - "type": "boolean" - }, - "instances": { - "description": "The list of URLs of one or more instances for which you want to apply\nupdates. Each URL can be a full URL or a partial URL, such aszones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minimalAction": { - "description": "The minimal action that you want to perform on each instance during the\nupdate:\n \n \n - REPLACE: At minimum, delete the instance and create it\n again. \n - RESTART: Stop the instance and start it\n again. \n - REFRESH: Do not stop the instance and limit\n disruption as much as possible. \n - NONE: Do not\n disrupt the instance at all.\n\n\nBy default, the minimum action is NONE. If your update\nrequires a more disruptive action than you set with this flag, the\nnecessary action is performed to execute the update.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that you want to perform on each instance during\nthe update:\n \n \n - REPLACE: Delete the instance and create it again.\n - RESTART: Stop the instance and start it again.\n - REFRESH: Do not stop the instance and limit disruption\n as much as possible. \n - NONE: Do not disrupt the\n instance at all.\n\n\nBy default, the most disruptive allowed action is REPLACE. If\nyour update requires a more disruptive action than you set with this flag,\nthe update request will fail.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersCreateInstancesRequest": { - "description": "InstanceGroupManagers.createInstances", - "id": "InstanceGroupManagersCreateInstancesRequest", - "properties": { - "instances": { - "description": "[Required] List of specifications of per-instance configs.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersDeleteInstancesRequest": { - "id": "InstanceGroupManagersDeleteInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to delete. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].\nQueued instances do not have URL and can be deleted only by name.\nOne cannot specify both URLs and names in a single request.", - "items": { - "type": "string" - }, - "type": "array" - }, - "skipInstancesOnValidationError": { - "description": "Specifies whether the request should proceed despite the inclusion of\ninstances that are not members of the group or that are already in the\nprocess of being deleted or abandoned. If this field is set to `false` and\nsuch an instance is specified in the request, the operation fails. The\noperation always fails if the request contains a malformed instance URL or\na reference to an instance that exists in a zone or region other than the\ngroup's zone or region.", - "type": "boolean" - } - }, - "type": "object" - }, - "InstanceGroupManagersDeletePerInstanceConfigsReq": { - "description": "InstanceGroupManagers.deletePerInstanceConfigs", - "id": "InstanceGroupManagersDeletePerInstanceConfigsReq", - "properties": { - "names": { - "description": "The list of instance names for which we want to delete per-instance configs\non this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse": { - "id": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse", - "properties": { - "acceleratorTopologiesInfo": { - "additionalProperties": { - "$ref": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo" - }, - "description": "The accelerator topology information returned per id of the topology\nlocation.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo": { - "id": "InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo", - "properties": { - "acceleratorTopology": { - "description": "Topology in the format of: \"16x16\", \"4x4x4\", etc.", - "type": "string" - }, - "acceleratorTopologyHealth": { - "enum": [ - "DEGRADED", - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "All VM are in RUNNING state, but there is an issue with\nthe inter-chip connectivity that makes this part\nof the infrastructure ready to use as a working\ninter-chip connected group only in a degraded mode.\nThis is allowed only for Instances configured with ICI\nresiliency", - "All VM are in RUNNING state, there are no issues with the\ninter-chip connectivity.", - "Some VMs may not be in RUNNING state, or there is an\nissue with the inter-chip connectivity that makes this\npart of the infrastructure unsuitable for forming a\nworking inter-chip connected group." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListErrorsResponse": { - "id": "InstanceGroupManagersListErrorsResponse", - "properties": { - "items": { - "description": "[Output Only] The list of errors of the managed instance group.", - "items": { - "$ref": "InstanceManagedByIgmError" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListManagedInstancesResponse": { - "id": "InstanceGroupManagersListManagedInstancesResponse", - "properties": { - "managedInstances": { - "description": "[Output Only] The list of instances in the managed instance group.", - "items": { - "$ref": "ManagedInstance" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersListPerInstanceConfigsResp": { - "id": "InstanceGroupManagersListPerInstanceConfigsResp", - "properties": { - "items": { - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersPatchPerInstanceConfigsReq": { - "description": "InstanceGroupManagers.patchPerInstanceConfigs", - "id": "InstanceGroupManagersPatchPerInstanceConfigsReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to recreate. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersResizeAdvancedRequest": { - "id": "InstanceGroupManagersResizeAdvancedRequest", - "properties": { - "noCreationRetries": { - "description": "If this flag is true, the managed instance group attempts to create all\ninstances initiated by this resize request only once. If there is an error\nduring creation, the managed instance group does not retry create this\ninstance, and we will decrease the targetSize of the request\ninstead. If the flag is false, the group attempts to recreate each instance\ncontinuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance.\nAfter an instance is successfully created while this flag is enabled, the\ninstance behaves the same way as all the other instances created with a\nregular resize request. In particular, if a running instance dies\nunexpectedly at a later time and needs to be recreated, this mode does not\naffect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not\ninfluence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling\nthe get or listManagedInstances API.", - "type": "boolean" - }, - "targetSize": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagersResumeInstancesRequest": { - "id": "InstanceGroupManagersResumeInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to resume. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "properties": { - "instanceGroupManagers": { - "description": "[Output Only] The list of managed instance groups that are contained in\nthe specified project and zone.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] The warning that replaces the list of managed instance\ngroups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetAutoHealingRequest": { - "id": "InstanceGroupManagersSetAutoHealingRequest", - "properties": { - "autoHealingPolicies": { - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", - "properties": { - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed\ninstance group. The group uses this template to create all new instances\nin the managed instance group. The templates for existing instances in the\ngroup do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the target pools information. Use this optional\nproperty to prevent conflicts when multiple users change the target pools\nsettings concurrently. Obtain the fingerprint with theinstanceGroupManagers.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another\nconcurrent request.", - "format": "byte", - "type": "string" - }, - "targetPools": { - "description": "The list of target pool URLs that instances in this managed instance group\nbelong to. The managed instance group applies these target pools to all\nof the instances in the group. Existing instances and new instances in the\ngroup all receive these target pool settings.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersStartInstancesRequest": { - "id": "InstanceGroupManagersStartInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to start. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersStopInstancesRequest": { - "id": "InstanceGroupManagersStopInstancesRequest", - "properties": { - "forceStop": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nstop the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to stop. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersSuspendInstancesRequest": { - "id": "InstanceGroupManagersSuspendInstancesRequest", - "properties": { - "forceSuspend": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nsuspend the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to suspend. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupManagersUpdatePerInstanceConfigsReq": { - "description": "InstanceGroupManagers.updatePerInstanceConfigs", - "id": "InstanceGroupManagersUpdatePerInstanceConfigsReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsAddInstancesRequest": { - "id": "InstanceGroupsAddInstancesRequest", - "properties": { - "instances": { - "description": "The list of instances to add to the instance group.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsListInstances": { - "id": "InstanceGroupsListInstances", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceGroupsListInstances", - "description": "[Output Only] The resource type, which is alwayscompute#instanceGroupsListInstances for the list of instances\nin the specified instance group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupsListInstancesRequest": { - "id": "InstanceGroupsListInstancesRequest", - "properties": { - "instanceState": { - "description": "A filter for the state of the instances in the instance group. Valid\noptions are ALL or RUNNING. If you do not specify\nthis parameter the list includes all instances regardless of their state.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "Includes all instances in the generated list regardless of their state.", - "Includes instances in the generated list only if they have a RUNNING\nstate." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupsRemoveInstancesRequest": { - "id": "InstanceGroupsRemoveInstancesRequest", - "properties": { - "instances": { - "description": "The list of instances to remove from the instance group.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceGroupsScopedList": { - "id": "InstanceGroupsScopedList", - "properties": { - "instanceGroups": { - "description": "[Output Only] The list ofinstance\ngroups that are contained in this scope.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of\ninstance groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceGroupsSetNamedPortsRequest": { - "id": "InstanceGroupsSetNamedPortsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the named ports information for this instance group.\nUse this optional property to prevent conflicts when multiple users change\nthe named ports settings concurrently. Obtain the fingerprint with theinstanceGroups.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another concurrent request.\nA request with an incorrect fingerprint will fail with error412 conditionNotMet.", - "format": "byte", - "type": "string" - }, - "namedPorts": { - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstanceList": { - "description": "Contains a list of instances.", - "id": "InstanceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Instance resources.", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceList", - "description": "[Output Only] Type of resource. Always compute#instanceList\nfor lists of Instance resources.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceListReferrers": { - "description": "Contains a list of instance referrers.", - "id": "InstanceListReferrers", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Reference resources.", - "items": { - "$ref": "Reference" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceListReferrers", - "description": "[Output Only] Type of resource. Alwayscompute#instanceListReferrers for lists of Instance referrers.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceManagedByIgmError": { - "id": "InstanceManagedByIgmError", - "properties": { - "error": { - "$ref": "InstanceManagedByIgmErrorManagedInstanceError", - "description": "[Output Only] Contents of the error." - }, - "instanceActionDetails": { - "$ref": "InstanceManagedByIgmErrorInstanceActionDetails", - "description": "[Output Only] Details of the instance action that triggered this error.\nMay be null, if the error was not caused by an action on an instance.\nThis field is optional." - }, - "timestamp": { - "description": "[Output Only] The time that this error occurred.\nThis value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceManagedByIgmErrorInstanceActionDetails": { - "id": "InstanceManagedByIgmErrorInstanceActionDetails", - "properties": { - "action": { - "description": "[Output Only] Action that managed instance group was executing on\nthe instance when the error occurred. Possible values:", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "RECREATING", - "REFRESHING", - "RESTARTING", - "RESUMING", - "STARTING", - "STOPPING", - "SUSPENDING", - "VERIFYING" - ], - "enumDescriptions": [ - "The managed instance group is abandoning this instance. The instance\nwill be removed from the instance group and from any target pools that\nare associated with this group.", - "The managed instance group is creating this instance. If the group\nfails to create this instance, it will try again until it is\nsuccessful.", - "The managed instance group is attempting to create this instance\nonly once. If the group fails to create this instance, it does\nnot try again and the group's targetSize value is\ndecreased.", - "The managed instance group is permanently deleting this instance.", - "The managed instance group has not scheduled any actions for this\ninstance.", - "The managed instance group is recreating this instance.", - "The managed instance group is applying configuration changes to the\ninstance without stopping it. For example, the group can update the\ntarget pool list for an instance without stopping that instance.", - "The managed instance group is restarting this instance.", - "The managed instance group is resuming this instance.", - "The managed instance group is starting this instance.", - "The managed instance group is stopping this instance.", - "The managed instance group is suspending this instance.", - "The managed instance group is verifying this already created instance.\nVerification happens every time the instance is (re)created or restarted\nand consists of:\n 1. Waiting until health check specified as part of this managed instance\n group's autohealing policy reports HEALTHY.\n Note: Applies only if autohealing policy has a health check specified\n 2. Waiting for addition verification steps performed as post-instance\n creation (subject to future extensions)." - ], - "type": "string" - }, - "instance": { - "description": "[Output Only] The URL of the instance.\nThe URL can be set even if the instance has not yet been created.", - "type": "string" - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Version this instance was created from, or was being\ncreated from, but the creation failed. Corresponds to one of the versions\nthat were set on the Instance Group Manager resource at the time this\ninstance was being created." - } - }, - "type": "object" - }, - "InstanceManagedByIgmErrorManagedInstanceError": { - "id": "InstanceManagedByIgmErrorManagedInstanceError", - "properties": { - "code": { - "description": "[Output Only] Error code.", - "type": "string" - }, - "message": { - "description": "[Output Only] Error message.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceMoveRequest": { - "id": "InstanceMoveRequest", - "properties": { - "destinationZone": { - "description": "The URL of the destination zone to move the instance. This can be a full or\npartial URL. For example, the following are all valid URLs to a zone:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone \n - projects/project/zones/zone \n - zones/zone", - "type": "string" - }, - "targetInstance": { - "description": "The URL of the target instance to move. This can be a full or partial URL.\nFor example, the following are all valid URLs to an instance:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance \n - zones/zone/instances/instance", - "type": "string" - } - }, - "type": "object" - }, - "InstanceParams": { - "description": "Additional instance params.", - "id": "InstanceParams", - "properties": { - "requestValidForDuration": { - "$ref": "Duration", - "description": "Relative deadline for waiting for capacity. Relevant only for\nInstances.Insert API." - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the instance. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceProperties": { - "id": "InstanceProperties", - "properties": { - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Controls for advanced machine-related behavior features.\nNote that for MachineImage, this is not supported yet." - }, - "canIpForward": { - "description": "Enables instances created based on these properties to send packets with\nsource IP addresses other than their own and receive packets with\ndestination IP addresses other than their own. If these instances will be\nused as an IP gateway or it will be set as the next-hop in a Route\nresource, specify true. If unsure, leave this set tofalse. See theEnable IP forwarding\ndocumentation for more information.", - "type": "boolean" - }, - "confidentialInstanceConfig": { - "$ref": "ConfidentialInstanceConfig", - "description": "Specifies the Confidential Instance options.\nNote that for MachineImage, this is not supported yet." - }, - "description": { - "description": "An optional text description for the instances that are created from these\nproperties.", - "type": "string" - }, - "disks": { - "description": "An array of disks that are associated with the instances that are created\nfrom these properties.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "displayDevice": { - "$ref": "DisplayDevice", - "description": "Display Device properties to enable support\nfor remote display products like: Teradici,\nVNC and TeamViewer\nNote that for MachineImage, this is not supported yet." - }, - "guestAccelerators": { - "description": "A list of guest accelerator cards' type and count to use for instances\ncreated from these properties.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to instances that are created from these properties.", - "type": "object" - }, - "machineType": { - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - }, - "description": "The machine type to use for instances that are created from these\nproperties.\nThis field only accepts a machine type name, for example `n2-standard-4`.\nIf you use the machine type full or partial URL, for example\n`projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4`,\nthe request will result in an `INTERNAL_ERROR`.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from\nthese properties. These pairs can consist of custom metadata or predefined\nkeys. SeeProject and\ninstance metadata for more information." - }, - "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by instances. The instance may be\nscheduled on the specified or newer cpu/platform. Applicable values are the\nfriendly names of CPU platforms, such asminCpuPlatform: \"Intel Haswell\" orminCpuPlatform: \"Intel Sandy Bridge\". For more\ninformation, read Specifying a\nMinimum CPU Platform.", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "networkPerformanceConfig": { - "$ref": "NetworkPerformanceConfig", - "description": "Note that for MachineImage, this is not supported yet." - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance properties. A map from a\nsubdomain (namespace) to entries map.", - "type": "object" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "privateIpv6GoogleAccess": { - "description": "The private IPv6 google access type for VMs.\nIf not specified, use INHERIT_FROM_SUBNETWORK as default.\nNote that for MachineImage, this is not supported yet.", - "enum": [ - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", - "INHERIT_FROM_SUBNETWORK" - ], - "enumDescriptions": [ - "Bidirectional private IPv6 access to/from Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Outbound private IPv6 access from VMs in this subnet to Google services. If\nspecified, the subnetwork who is attached to the instance's default network\ninterface will be assigned an internal IPv6 prefix if it doesn't have\nbefore.", - "Each network interface inherits PrivateIpv6GoogleAccess from its\nsubnetwork." - ], - "type": "string" - }, - "reservationAffinity": { - "$ref": "ReservationAffinity", - "description": "Specifies the reservations that instances can consume from.\nNote that for MachineImage, this is not supported yet." - }, - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the instance. Tag keys and values\nhave the same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - }, - "resourcePolicies": { - "description": "Resource policies (names, not URLs) applied to instances created from\nthese properties.\nNote that for MachineImage, this is not supported yet.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from\nthese properties." - }, - "serviceAccounts": { - "description": "A list of service accounts with specified scopes. Access tokens for these\nservice accounts are available to the instances that are created from\nthese properties. Use metadata queries to obtain the access tokens for\nthese instances.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig", - "description": "Note that for MachineImage, this is not supported yet." - }, - "shieldedVmConfig": { - "$ref": "ShieldedVmConfig", - "description": "Specifies the Shielded VM options for the instances that are created from\nthese properties." - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from these\nproperties. The tags identify valid sources or targets for network\nfirewalls. The setTags method can modify this list of tags. Each tag within\nthe list must comply with RFC1035." - } - }, - "type": "object" - }, - "InstancePropertiesPatch": { - "description": "Represents the change that you want to make to the instance properties.", - "id": "InstancePropertiesPatch", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The label key-value pairs that you want to patch onto the instance.", - "type": "object" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "The metadata key-value pairs that you want to patch onto the instance. For\nmore information, see Project and\ninstance metadata.", - "type": "object" - } - }, - "type": "object" - }, - "InstanceReference": { - "id": "InstanceReference", - "properties": { - "instance": { - "description": "The URL for a specific instance.\n@required compute.instancegroups.addInstances/removeInstances", - "type": "string" - } - }, - "type": "object" - }, - "InstanceSettings": { - "description": "Represents a Instance Settings resource. You can use instance settings to\nconfigure default settings for Compute Engine VM instances. For example, you\ncan use it to configure default machine type of Compute Engine VM instances.", - "id": "InstanceSettings", - "properties": { - "fingerprint": { - "description": "Specifies a fingerprint for instance settings, which is essentially a hash\nof the instance settings resource's contents and used for optimistic\nlocking. The fingerprint is initially generated by Compute Engine and\nchanges after every request to modify or update the instance settings\nresource. You must always provide an up-to-date fingerprint hash in order\nto update or change the resource, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve the resource.", - "format": "byte", - "type": "string" - }, - "kind": { - "default": "compute#instanceSettings", - "description": "[Output Only] Type of the resource. Alwayscompute#instance_settings for instance settings.", - "type": "string" - }, - "metadata": { - "$ref": "InstanceSettingsMetadata", - "description": "The metadata key/value pairs assigned to all the instances in the\ncorresponding scope." - }, - "zone": { - "description": "[Output Only] URL of the zone where the resource resides\nYou must specify this field as part of the HTTP request URL. It is not\nsettable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceSettingsMetadata": { - "id": "InstanceSettingsMetadata", - "properties": { - "items": { - "additionalProperties": { - "type": "string" - }, - "description": "A metadata key/value items map.\nThe total size of all keys and values must be less than 512KB.", - "type": "object" - }, - "kind": { - "default": "compute#metadata", - "description": "[Output Only] Type of the resource. Always compute#metadata\nfor metadata.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceTemplate": { - "description": "Represents an Instance Template resource.\n\nGoogle Compute Engine has two Instance Template resources:\n\n* [Global](/compute/docs/reference/rest/beta/instanceTemplates)\n* [Regional](/compute/docs/reference/rest/beta/regionInstanceTemplates)\n\nYou can reuse a global instance template in\ndifferent regions whereas you can use a regional instance template in a\nspecified region only. If you want to reduce cross-region dependency or\nachieve data residency, use a regional instance template.\n\nTo create VMs, managed instance groups, and reservations, you can use either\nglobal or regional instance templates.\n\nFor more information, readInstance Templates.", - "id": "InstanceTemplate", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this instance template inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this instance template. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instanceTemplate", - "description": "[Output Only] The resource type, which is alwayscompute#instanceTemplate for instance templates.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceTemplates.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "properties": { - "$ref": "InstanceProperties", - "description": "The instance properties for this instance template." - }, - "region": { - "description": "[Output Only] URL of the region where the instance template resides. Only\napplicable for regional resources.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] The URL for this instance template. The server defines this\nURL.", - "type": "string" - }, - "sourceInstance": { - "description": "The source instance used to create the template. You can provide this as a\npartial or full URL to the resource. For example, the following are valid\nvalues:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance", - "type": "string" - }, - "sourceInstanceParams": { - "$ref": "SourceInstanceParams", - "description": "The source instance params to use to create this instance template." - } - }, - "type": "object" - }, - "InstanceTemplateAggregatedList": { - "description": "Contains a list of InstanceTemplatesScopedList.", - "id": "InstanceTemplateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceTemplatesScopedList", - "description": "The name of the scope that contains this set of instance templates." - }, - "description": "A list of InstanceTemplatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceTemplateAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceTemplateList": { - "description": "A list of instance templates.", - "id": "InstanceTemplateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceTemplate resources.", - "items": { - "$ref": "InstanceTemplate" - }, - "type": "array" - }, - "kind": { - "default": "compute#instanceTemplateList", - "description": "[Output Only] The resource type, which is alwayscompute#instanceTemplatesListResponse for instance template\nlists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceTemplatesScopedList": { - "id": "InstanceTemplatesScopedList", - "properties": { - "instanceTemplates": { - "description": "[Output Only] A list of instance templates that are contained within\nthe specified project and zone.", - "items": { - "$ref": "InstanceTemplate" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of instance\ntemplates when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceWithNamedPorts": { - "id": "InstanceWithNamedPorts", - "properties": { - "instance": { - "description": "[Output Only] The URL of the instance.", - "type": "string" - }, - "namedPorts": { - "description": "[Output Only] The named ports that belong to this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "status": { - "description": "[Output Only] The status of the instance.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - } - }, - "type": "object" - }, - "InstancesAddResourcePoliciesRequest": { - "id": "InstancesAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be added to this instance.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesBulkInsertOperationMetadata": { - "id": "InstancesBulkInsertOperationMetadata", - "properties": { - "perLocationStatus": { - "additionalProperties": { - "$ref": "BulkInsertOperationStatus" - }, - "description": "Status information per location (location name is key).\nExample key: zones/us-central1-a", - "type": "object" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponse": { - "id": "InstancesGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output Only] Effective firewalls from firewall policies.", - "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the instance.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "organizationFirewalls": { - "description": "Effective firewalls from organization policies.", - "items": { - "$ref": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output Only] The packet mirroring rules that apply to the instance.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output Only] The rules that apply to the instance. Only rules that\ntarget the specific VM instance are returned if target service accounts\nor target secure tags are specified in the rules.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy.", - "type": "string" - }, - "type": { - "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY,\nNETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.", - "enum": [ - "HIERARCHY", - "NETWORK", - "NETWORK_REGIONAL", - "SYSTEM_GLOBAL", - "SYSTEM_REGIONAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { - "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", - "id": "InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy", - "properties": { - "id": { - "description": "The unique identifier for the security policy. This\nidentifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesRemoveResourcePoliciesRequest": { - "id": "InstancesRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this instance.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesReportHostAsFaultyRequest": { - "id": "InstancesReportHostAsFaultyRequest", - "properties": { - "disruptionSchedule": { - "description": "The disruption schedule for the VM. Required field, only allows IMMEDIATE.", - "enum": [ - "DISRUPTION_SCHEDULE_UNSPECIFIED", - "FUTURE", - "IMMEDIATE" - ], - "enumDescriptions": [ - "Not used. Required as per aip/126.", - "Delay disruption for caller control. Will be default soon.", - "Default value. Disrupt the VM immediately." - ], - "type": "string" - }, - "faultReasons": { - "items": { - "$ref": "InstancesReportHostAsFaultyRequestFaultReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesReportHostAsFaultyRequestFaultReason": { - "id": "InstancesReportHostAsFaultyRequestFaultReason", - "properties": { - "behavior": { - "enum": [ - "BEHAVIOR_UNSPECIFIED", - "PERFORMANCE", - "SILENT_DATA_CORRUPTION", - "UNRECOVERABLE_GPU_ERROR" - ], - "enumDescriptions": [ - "Public reportable behaviors", - "", - "", - "" - ], - "type": "string" - }, - "description": { - "type": "string" - } - }, - "type": "object" - }, - "InstancesResumeRequest": { - "id": "InstancesResumeRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with acustomer-supplied\nencryption key.\n\nIn order to resume the instance, the disk url and its corresponding key\nmust be provided.\n\nIf the disk is not protected with a customer-supplied encryption key it\nshould not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - }, - "instanceEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Decrypts data associated with an instance that is protected with acustomer-supplied\nencryption key.\n\nIf the instance you are starting is protected with a customer-supplied\nencryption key, the correct key must be provided otherwise the\ninstance resume will not succeed." - } - }, - "type": "object" - }, - "InstancesScopedList": { - "id": "InstancesScopedList", - "properties": { - "instances": { - "description": "[Output Only] A list of instances contained in this scope.", - "items": { - "$ref": "Instance" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of instances\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstancesSetLabelsRequest": { - "id": "InstancesSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "Fingerprint of the previous set of labels for this resource,\nused to prevent conflicts. Provide the latest fingerprint value when making\na request to add or change labels.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - }, - "InstancesSetMachineResourcesRequest": { - "id": "InstancesSetMachineResourcesRequest", - "properties": { - "guestAccelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesSetMachineTypeRequest": { - "id": "InstancesSetMachineTypeRequest", - "properties": { - "machineType": { - "description": "Full or partial URL of the machine type resource. See Machine Types for a full list of\nmachine types. For example:zones/us-central1-f/machineTypes/n1-standard-1", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetMinCpuPlatformRequest": { - "id": "InstancesSetMinCpuPlatformRequest", - "properties": { - "minCpuPlatform": { - "description": "Minimum cpu/platform this instance should be started at.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetNameRequest": { - "id": "InstancesSetNameRequest", - "properties": { - "currentName": { - "description": "The current name of this resource, used to prevent conflicts. Provide the\nlatest name when making a request to change name.", - "type": "string" - }, - "name": { - "description": "The name to be applied to the instance. Needs to be RFC 1035 compliant.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetSecurityPolicyRequest": { - "id": "InstancesSetSecurityPolicyRequest", - "properties": { - "networkInterfaces": { - "description": "The network interfaces that the security policy will be applied to. Network\ninterfaces use the nicN naming format. You can only set a\nsecurity policy for network interfaces with an access config.", - "items": { - "type": "string" - }, - "type": "array" - }, - "securityPolicy": { - "description": "A full or partial URL to a security policy to add to this instance.\nIf this field is set to an empty string it will remove the associated\nsecurity policy.", - "type": "string" - } - }, - "type": "object" - }, - "InstancesSetServiceAccountRequest": { - "id": "InstancesSetServiceAccountRequest", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "scopes": { - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstancesStartWithEncryptionKeyRequest": { - "id": "InstancesStartWithEncryptionKeyRequest", - "properties": { - "disks": { - "description": "Array of disks associated with this instance that are protected with acustomer-supplied\nencryption key.\n\nIn order to start the instance, the disk url and its corresponding key must\nbe provided.\n\nIf the disk is not protected with a customer-supplied encryption key it\nshould not be specified.", - "items": { - "$ref": "CustomerEncryptionKeyProtectedDisk" - }, - "type": "array" - } - }, - "type": "object" - }, - "InstantSnapshot": { - "description": "Represents a InstantSnapshot resource.\n\nYou can use instant snapshots to create disk rollback points quickly..", - "id": "InstantSnapshot", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the instant snapshot. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "[Output Only] Size of the source disk, specified in GB.", - "format": "int64", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instantSnapshot", - "description": "[Output Only] Type of the resource. Alwayscompute#instantSnapshot for InstantSnapshot resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this InstantSnapshot, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a InstantSnapshot.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this InstantSnapshot. These can be later modified by\nthe setLabels method.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the instant snapshot resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "resourceStatus": { - "$ref": "InstantSnapshotResourceStatus", - "description": "[Output Only] Status information for the instant snapshot resource." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "sourceDisk": { - "description": "URL of the source disk used to create this instant snapshot.\nNote that the source disk must be in the same zone/region as the\ninstant snapshot to be created. This can be a full or valid partial URL.\nFor example, the following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The ID value of the disk used to create this InstantSnapshot.\nThis value may be used to determine whether the InstantSnapshot\nwas taken from the current or a previous instance of a given disk name.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the instantSnapshot. This can beCREATING, DELETING, FAILED, orREADY.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "InstantSnapshot creation is in progress.", - "InstantSnapshot is currently being deleted.", - "InstantSnapshot creation failed.", - "InstantSnapshot has been created successfully.", - "InstantSnapshot is currently unavailable and cannot be used for\nDisk restoration" - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the instant snapshot resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotAggregatedList": { - "id": "InstantSnapshotAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstantSnapshotsScopedList", - "description": "[Output Only] Name of the scope containing this set of instantSnapshots." - }, - "description": "A list of InstantSnapshotsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instantSnapshotAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#instantSnapshotAggregatedList for aggregated lists of\ninstantSnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstantSnapshotList": { - "description": "Contains a list of InstantSnapshot resources.", - "id": "InstantSnapshotList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstantSnapshot resources.", - "items": { - "$ref": "InstantSnapshot" - }, - "type": "array" - }, - "kind": { - "default": "compute#instantSnapshotList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstantSnapshotResourceStatus": { - "id": "InstantSnapshotResourceStatus", - "properties": { - "storageSizeBytes": { - "description": "[Output Only] The storage size of this instant snapshot.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "InstantSnapshotsScopedList": { - "id": "InstantSnapshotsScopedList", - "properties": { - "instantSnapshots": { - "description": "[Output Only] A list of instantSnapshots contained in this scope.", - "items": { - "$ref": "InstantSnapshot" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of\ninstantSnapshots when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Int64RangeMatch": { - "description": "HttpRouteRuleMatch criteria for field values that must stay\nwithin the specified integer range.", - "id": "Int64RangeMatch", - "properties": { - "rangeEnd": { - "description": "The end of the range (exclusive) in signed long integer format.", - "format": "int64", - "type": "string" - }, - "rangeStart": { - "description": "The start of the range (inclusive) in signed long integer format.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "Interconnect": { - "description": "Represents an Interconnect resource.\n\nAn Interconnect resource is a dedicated connection between the Google\nCloud network and your on-premises network. For more information, read the\nDedicated Interconnect Overview.", - "id": "Interconnect", - "properties": { - "aaiEnabled": { - "description": "Enable or disable the application awareness feature on this Cloud\nInterconnect.", - "type": "boolean" - }, - "adminEnabled": { - "description": "Administrative status of the interconnect. When this is set to true, the\nInterconnect is functional and can carry traffic.\nWhen set to false, no packets can be carried over the interconnect and\nno BGP routes are exchanged over it. By default, the status is set to true.", - "type": "boolean" - }, - "applicationAwareInterconnect": { - "$ref": "InterconnectApplicationAwareInterconnect", - "description": "Configuration information for application awareness on this Cloud\nInterconnect." - }, - "availableFeatures": { - "description": "[Output only] List of features available for this Interconnect connection,\nwhich can take one of the following values:\n \n - IF_MACSEC: If present, then the Interconnect connection is\n provisioned on MACsec capable hardware ports. If not present, then the\n Interconnect connection is provisioned on non-MACsec capable ports. Any\n attempt to enable MACsec will fail.\n - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is\n provisioned exclusively for Cross-Site Networking. Any attempt to configure\n VLAN attachments will fail. If not present, then the Interconnect\n connection is not provisioned for Cross-Site Networking. Any attempt to use\n it for Cross-Site Networking will fail.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "circuitInfos": { - "description": "[Output Only] A list of CircuitInfo objects, that describe the individual\ncircuits in this LAG.", - "items": { - "$ref": "InterconnectCircuitInfo" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customerName": { - "description": "Customer name, to put in the Letter of Authorization as the party\nauthorized to request a crossconnect.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "expectedOutages": { - "description": "[Output Only] A list of outages expected for this Interconnect.", - "items": { - "$ref": "InterconnectOutageNotification" - }, - "type": "array" - }, - "googleIpAddress": { - "description": "[Output Only] IP address configured on the Google side of the Interconnect\nlink. This can be used only for ping tests.", - "type": "string" - }, - "googleReferenceId": { - "description": "[Output Only] Google reference ID to be used when raising support tickets\nwith Google or otherwise to debug backend connectivity issues.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interconnectAttachments": { - "description": "[Output Only] A list of the URLs of all InterconnectAttachments configured\nto use this Interconnect.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnectGroups": { - "description": "[Output Only] URLs of InterconnectGroups that include this Interconnect.\nOrder is arbitrary and items are unique.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnectType": { - "description": "Type of interconnect, which can take one of the following values:\n \n - PARTNER: A partner-managed interconnection shared between customers\n though a partner.\n - DEDICATED: A dedicated physical interconnection with the\n customer.\n\n\nNote that a value IT_PRIVATE has been deprecated in favor of DEDICATED.", - "enum": [ - "DEDICATED", - "IT_PRIVATE", - "PARTNER" - ], - "enumDescriptions": [ - "A dedicated physical interconnection with the customer.", - "[Deprecated] A private, physical interconnection with the customer.", - "A partner-managed interconnection shared between customers via partner." - ], - "type": "string" - }, - "kind": { - "default": "compute#interconnect", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnect for interconnects.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this Interconnect, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an Interconnect.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "linkType": { - "description": "Type of link requested, which can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics\n - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics.\n - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics.\n\n\n Note that this field indicates the speed of each of\nthe links in the bundle, not the speed of the entire bundle.", - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "location": { - "description": "URL of the InterconnectLocation object that represents where this\nconnection is to be provisioned.", - "type": "string" - }, - "macsec": { - "$ref": "InterconnectMacsec", - "description": "Configuration that enables Media Access Control security (MACsec) on the\nCloud Interconnect connection between Google and your on-premises router." - }, - "macsecEnabled": { - "description": "Enable or disable MACsec on this Interconnect connection. MACsec enablement\nfails if the MACsec object is not specified.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.interconnects.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance\nnotifications regarding this Interconnect. If specified, this will be used\nfor notifications in addition to all other forms described, such as\nCloud Monitoring logs alerting and Cloud Notifications. This field is\nrequired for users who sign up for Cloud Interconnect using\nworkforce identity federation.", - "type": "string" - }, - "operationalStatus": { - "description": "[Output Only] The current status of this Interconnect's functionality,\nwhich can take one of the following values:\n \n - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to\n use. Attachments may be provisioned on this Interconnect.\n\n- OS_UNPROVISIONED: An Interconnect that has not completed turnup. No\nattachments may be provisioned on this Interconnect.\n- OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal\nmaintenance. No attachments may be provisioned or updated on this\nInterconnect.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "The interconnect is valid, turned up, and ready to use. Attachments may\nbe provisioned on this interconnect.", - "The interconnect has not completed turnup. No attachments may be\nprovisioned on this interconnect." - ], - "type": "string" - }, - "params": { - "$ref": "InterconnectParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "peerIpAddress": { - "description": "[Output Only] IP address configured on the customer side of the\nInterconnect link. The customer should configure this IP address during\nturnup when prompted by Google NOC. This can be used only for ping tests.", - "type": "string" - }, - "provisionedLinkCount": { - "description": "[Output Only] Number of links actually provisioned in this interconnect.", - "format": "int32", - "type": "integer" - }, - "remoteLocation": { - "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies the\nlocation outside of Google's network that the interconnect is connected to.", - "type": "string" - }, - "requestedFeatures": { - "description": "Optional. This parameter can be provided only with Interconnect INSERT. It\nisn't valid for Interconnect PATCH. List of features requested for this\nInterconnect connection, which can take one of the following values:\n \n - IF_MACSEC: If specified, then the connection is created on MACsec\n capable hardware ports. If not specified, non-MACsec capable ports will\n also be considered.\n - IF_CROSS_SITE_NETWORK: If specified, then the connection is created\n exclusively for Cross-Site Networking. The connection can not be used for\n Cross-Site Networking unless this feature is specified.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "requestedLinkCount": { - "description": "Target number of physical links in the link bundle, as requested by the\ncustomer.", - "format": "int32", - "type": "integer" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of Interconnect functionality, which can\ntake one of the following values:\n \n - ACTIVE: The Interconnect is valid, turned up and ready to use.\n Attachments may be provisioned on this Interconnect.\n - UNPROVISIONED: The Interconnect has not completed turnup. No\n attachments may be provisioned on this Interconnect.\n - UNDER_MAINTENANCE: The Interconnect is undergoing internal maintenance.\n No attachments may be provisioned or updated on this\n Interconnect.", - "enum": [ - "ACTIVE", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "The interconnect is valid, turned up, and ready to use. Attachments may\nbe provisioned on this interconnect.", - "The interconnect has not completed turnup. No attachments may be\nprovisioned on this interconnect." - ], - "type": "string" - }, - "subzone": { - "description": "Specific subzone in the InterconnectLocation that represents where\nthis connection is to be provisioned.", - "enum": [ - "SUBZONE_A", - "SUBZONE_B" - ], - "enumDescriptions": [ - "Subzone A.", - "Subzone B." - ], - "type": "string" - }, - "wireGroups": { - "description": "[Output Only] A list of the URLs of all CrossSiteNetwork WireGroups\nconfigured to use this Interconnect. The Interconnect cannot be deleted if\nthis list is non-empty.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnect": { - "description": "Configuration information for application awareness on this Cloud\nInterconnect.", - "id": "InterconnectApplicationAwareInterconnect", - "properties": { - "bandwidthPercentagePolicy": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" - }, - "profileDescription": { - "description": "Description for the application awareness profile on this Cloud\nInterconnect.", - "type": "string" - }, - "shapeAveragePercentages": { - "description": "Optional field to specify a list of shape average percentages to be\napplied in conjunction with StrictPriorityPolicy or\nBandwidthPercentagePolicy.", - "items": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentage" - }, - "type": "array" - }, - "strictPriorityPolicy": { - "$ref": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectBandwidthPercentage": { - "description": "Specify bandwidth percentages [1-100] for various traffic classes in\nBandwidthPercentagePolicy. The sum of all percentages must equal 100.\nAll traffic classes must have a percentage value specified.", - "id": "InterconnectApplicationAwareInterconnectBandwidthPercentage", - "properties": { - "percentage": { - "description": "Bandwidth percentage for a specific traffic class.", - "format": "uint32", - "type": "integer" - }, - "trafficClass": { - "description": "TrafficClass whose bandwidth percentage is being specified.", - "enum": [ - "TC1", - "TC2", - "TC3", - "TC4", - "TC5", - "TC6" - ], - "enumDescriptions": [ - "Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx.", - "Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx.", - "Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx.", - "Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx.", - "Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx.", - "Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy": { - "id": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy", - "properties": { - "bandwidthPercentages": { - "description": "Specify bandwidth percentages for various traffic classes for queuing\ntype Bandwidth Percent.", - "items": { - "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentage" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectApplicationAwareInterconnectStrictPriorityPolicy": { - "description": "Specify configuration for StrictPriorityPolicy.", - "id": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy", - "properties": {}, - "type": "object" - }, - "InterconnectAttachment": { - "description": "Represents an Interconnect Attachment (VLAN) resource.\n\nYou can use Interconnect attachments (VLANS) to connect your Virtual Private\nCloud networks to your on-premises networks through an Interconnect.\nFor more information, read\nCreating VLAN Attachments.", - "id": "InterconnectAttachment", - "properties": { - "adminEnabled": { - "description": "Determines whether this Attachment will carry packets.\nNot present for PARTNER_PROVIDER.", - "type": "boolean" - }, - "attachmentGroup": { - "description": "[Output Only] URL of the AttachmentGroup that includes this Attachment.", - "type": "string" - }, - "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For\nattachments of type DEDICATED, the user can set the bandwidth.\nFor attachments of type PARTNER, the Google Partner that is operating\nthe interconnect must set the bandwidth.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED,\nand can take one of the following values:\n \n - BPS_50M: 50 Mbit/s\n - BPS_100M: 100 Mbit/s\n - BPS_200M: 200 Mbit/s\n - BPS_300M: 300 Mbit/s\n - BPS_400M: 400 Mbit/s\n - BPS_500M: 500 Mbit/s\n - BPS_1G: 1 Gbit/s\n - BPS_2G: 2 Gbit/s\n - BPS_5G: 5 Gbit/s\n - BPS_10G: 10 Gbit/s\n - BPS_20G: 20 Gbit/s\n - BPS_50G: 50 Gbit/s\n - BPS_100G: 100 Gbit/s", - "enum": [ - "BPS_100G", - "BPS_100M", - "BPS_10G", - "BPS_1G", - "BPS_200M", - "BPS_20G", - "BPS_2G", - "BPS_300M", - "BPS_400M", - "BPS_500M", - "BPS_50G", - "BPS_50M", - "BPS_5G" - ], - "enumDescriptions": [ - "100 Gbit/s", - "100 Mbit/s", - "10 Gbit/s", - "1 Gbit/s", - "200 Mbit/s", - "20 Gbit/s", - "2 Gbit/s", - "300 Mbit/s", - "400 Mbit/s", - "500 Mbit/s", - "50 Gbit/s", - "50 Mbit/s", - "5 Gbit/s" - ], - "type": "string" - }, - "candidateCloudRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ip_address and\n candidate_customer_router_ip_address must be the same.\n - Max prefix length is 31.", - "type": "string" - }, - "candidateCloudRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the cloud router\ninterface for this interconnect attachment.\n \n - Both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address fields must be set or both must be\n unset.\n - Prefix length of both candidate_cloud_router_ipv6_address and\n candidate_customer_router_ipv6_address must be the same.\n - Max prefix length is 126.", - "type": "string" - }, - "candidateCustomerRouterIpAddress": { - "description": "Single IPv4 address + prefix length to be configured on the customer router\ninterface for this interconnect attachment.", - "type": "string" - }, - "candidateCustomerRouterIpv6Address": { - "description": "Single IPv6 address + prefix length to be configured on the customer router\ninterface for this interconnect attachment.", - "type": "string" - }, - "candidateIpv6Subnets": { - "description": "This field is not available.", - "items": { - "type": "string" - }, - "type": "array" - }, - "candidateSubnets": { - "description": "Input only. Up to 16 candidate prefixes that can be used to restrict the allocation\nof cloudRouterIpAddress and customerRouterIpAddress for this attachment.\nAll prefixes must be within link-local address space (169.254.0.0/16) and\nmust be /29 or shorter (/28, /27, etc). Google will attempt to select an\nunused /29 from the supplied candidate prefix(es). The request will fail if\nall possible /29s are in use on Google's edge. If not supplied, Google will\nrandomly select an unused /29 from all of link-local space.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cloudRouterIpAddress": { - "description": "[Output Only] IPv4 address + prefix length to be configured on Cloud Router\nInterface for this interconnect attachment.", - "type": "string" - }, - "cloudRouterIpv6Address": { - "description": "[Output Only] IPv6 address + prefix length to be configured on Cloud\nRouter Interface for this interconnect attachment.", - "type": "string" - }, - "cloudRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "configurationConstraints": { - "$ref": "InterconnectAttachmentConfigurationConstraints", - "description": "[Output Only] Constraints for this attachment, if any. The attachment does\nnot work if these constraints are not met." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customerRouterIpAddress": { - "description": "[Output Only] IPv4 address + prefix length to be configured on the customer\nrouter subinterface for this interconnect attachment.", - "type": "string" - }, - "customerRouterIpv6Address": { - "description": "[Output Only] IPv6 address + prefix length to be configured on the\ncustomer router subinterface for this interconnect attachment.", - "type": "string" - }, - "customerRouterIpv6InterfaceId": { - "description": "This field is not available.", - "type": "string" - }, - "dataplaneVersion": { - "description": "[Output Only] Dataplane version for this InterconnectAttachment. This\nfield is only present for Dataplane version 2 and higher. Absence of this\nfield in the API output indicates that the Dataplane is version 1.", - "format": "int32", - "type": "integer" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "edgeAvailabilityDomain": { - "description": "Input only. Desired availability domain for the attachment. Only available for type\nPARTNER, at creation time, and can take one of the following values:\n \n - AVAILABILITY_DOMAIN_ANY\n - AVAILABILITY_DOMAIN_1\n - AVAILABILITY_DOMAIN_2\n\n\nFor improved reliability, customers should configure a pair of attachments,\none per availability domain. The selected availability domain will be\nprovided to the Partner via the pairing key, so that the provisioned\ncircuit will lie in the specified domain. If not specified, the value will\ndefault to AVAILABILITY_DOMAIN_ANY.", - "enum": [ - "AVAILABILITY_DOMAIN_1", - "AVAILABILITY_DOMAIN_2", - "AVAILABILITY_DOMAIN_ANY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "encryption": { - "description": "Indicates the user-supplied encryption option of this VLAN attachment\n(interconnectAttachment). Can only be specified at attachment creation\nfor PARTNER or DEDICATED attachments.\nPossible values are:\n \n - NONE - This is the default value, which means that the\n VLAN attachment carries unencrypted traffic. VMs are able to send\n traffic to, or receive traffic from, such a VLAN attachment.\n - IPSEC - The VLAN attachment carries only encrypted\n traffic that is encrypted by an IPsec device, such as an HA VPN gateway or\n third-party IPsec VPN. VMs cannot directly send traffic to, or receive\n traffic from, such a VLAN attachment. To use *HA VPN over Cloud\n Interconnect*, the VLAN attachment must be created with this\n option.", - "enum": [ - "IPSEC", - "NONE" - ], - "enumDescriptions": [ - "The interconnect attachment will carry only encrypted traffic that is\nencrypted by an IPsec device such as HA VPN gateway;\nVMs cannot directly send traffic to or receive traffic from such an\ninterconnect attachment. To use HA VPN over Cloud Interconnect,\nthe interconnect attachment must be created with this option.", - "This is the default value, which means the Interconnect Attachment will\ncarry unencrypted traffic. VMs will be able to send traffic to or receive\ntraffic from such interconnect attachment." - ], - "type": "string" - }, - "googleReferenceId": { - "deprecated": true, - "description": "[Output Only] Google reference ID, to be used when raising support tickets\nwith Google or otherwise to debug backend connectivity issues.\n[Deprecated] This field is not used.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interconnect": { - "description": "URL of the underlying Interconnect object that this attachment's traffic\nwill traverse through.", - "type": "string" - }, - "ipsecInternalAddresses": { - "description": "A list of URLs of addresses that have been reserved for the VLAN\nattachment. Used only for the VLAN attachment that has the encryption\noption as IPSEC. The addresses must be regional internal IP address ranges.\nWhen creating an HA VPN gateway over the VLAN attachment, if the attachment\nis configured to use a regional internal IP address, then the VPN gateway's\nIP address is allocated from the IP address range specified here. For\nexample, if the HA VPN gateway's interface 0 is paired to this VLAN\nattachment, then a regional internal IP address for the VPN gateway\ninterface 0 will be allocated from the IP address specified for this\nVLAN attachment.\nIf this field is not specified when creating the VLAN attachment, then\nlater on when creating an HA VPN gateway on this VLAN attachment, the HA\nVPN gateway's IP address is allocated from the regional external IP address\npool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachment", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectAttachment for interconnect attachments.", - "type": "string" - }, - "l2Forwarding": { - "$ref": "InterconnectAttachmentL2Forwarding", - "description": "L2 Interconnect Attachment related config. This field is required if the\ntype is L2_DEDICATED.\n\nThe configuration specifies how VLAN tags (like dot1q, qinq, or dot1ad)\nwithin L2 packets are mapped to the destination appliances IP addresses.\nThe packet is then encapsulated with the appliance IP address and sent to\nthe edge appliance." - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this InterconnectAttachment,\nwhich is essentially a hash of the labels set used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an InterconnectAttachment.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "mtu": { - "description": "Maximum Transmission Unit (MTU), in bytes, of packets passing through this\ninterconnect attachment.\nValid values are 1440, 1460, 1500, and 8896. If not specified,\nthe value will default to 1440.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "operationalStatus": { - "description": "[Output Only] The current status of whether or not this interconnect\nattachment is functional, which can take one of the following values:\n \n - OS_ACTIVE: The attachment has been turned up and is ready to\n use. \n - OS_UNPROVISIONED: The attachment is not ready to use yet,\n because turnup is not complete.", - "enum": [ - "OS_ACTIVE", - "OS_UNPROVISIONED" - ], - "enumDescriptions": [ - "Indicates that attachment has been turned up and is ready to\nuse.", - "Indicates that attachment is not ready to use yet, because\nturnup is not complete." - ], - "type": "string" - }, - "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not\npresent for DEDICATED].\nThe opaque identifier of a PARTNER attachment used to initiate\nprovisioning with a selected partner.\nOf the form \"XXXXX/region/domain\"", - "type": "string" - }, - "params": { - "$ref": "InterconnectAttachmentParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "partnerAsn": { - "description": "Optional BGP ASN for the router supplied by a Layer 3 Partner if they\nconfigured BGP on behalf of the customer.\nOutput only for PARTNER type, input only for PARTNER_PROVIDER, not\navailable for DEDICATED.", - "format": "int64", - "type": "string" - }, - "partnerMetadata": { - "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display\nto customers.\nOutput only for PARTNER type, mutable for PARTNER_PROVIDER, not\navailable for DEDICATED." - }, - "privateInterconnectInfo": { - "$ref": "InterconnectAttachmentPrivateInfo", - "description": "[Output Only] Information specific to an InterconnectAttachment.\nThis property is populated if the interconnect that\nthis is attached to is of type DEDICATED." - }, - "region": { - "description": "[Output Only] URL of the region where the regional interconnect attachment\nresides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "remoteService": { - "description": "[Output Only]\nIf the attachment is on a Cross-Cloud Interconnect connection, this field\ncontains the interconnect's remote location service provider. Example\nvalues: \"Amazon Web Services\" \"Microsoft Azure\".\n\nThe field is set only for attachments on Cross-Cloud Interconnect\nconnections. Its value is copied from the InterconnectRemoteLocation\nremoteService field.", - "type": "string" - }, - "router": { - "description": "URL of the Cloud Router to be used for dynamic routing. This router must be\nin the same region as this InterconnectAttachment. The\nInterconnectAttachment will automatically connect the Interconnect to the\nnetwork \u0026 region within which the Cloud Router is configured.", - "type": "string" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "stackType": { - "description": "The stack type for this interconnect attachment to identify whether the\nIPv6 feature is enabled or not. If not specified, IPV4_ONLY\nwill be used.\n\nThis field can be both set at interconnect attachments creation and\nupdate interconnect attachment operations.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "The interconnect attachment can have both IPv4 and IPv6 addresses.", - "The interconnect attachment will only be assigned IPv4 addresses." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of this attachment's functionality.\nEnum values ACTIVE and UNPROVISIONED are shared by DEDICATED/PRIVATE,\nPARTNER, and PARTNER_PROVIDER interconnect attachments, while enum values\nPENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used\nfor only PARTNER and PARTNER_PROVIDER interconnect attachments.\nThis state can take one of the following values:\n \n - ACTIVE: The attachment has been turned up and is ready to use.\n - UNPROVISIONED: The attachment is not ready to use yet, because turnup\n is not complete.\n - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet\n been configured on the Partner side.\n - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of\n provisioning after a PARTNER_PROVIDER attachment was created that\n references it. \n - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER\n attachment that is waiting for a customer to activate it. \n - DEFUNCT:\n The attachment was deleted externally and is no longer functional. This\n could be because the associated Interconnect was removed, or because the\n other side of a Partner attachment was deleted.", - "enum": [ - "ACTIVE", - "DEFUNCT", - "PARTNER_REQUEST_RECEIVED", - "PENDING_CUSTOMER", - "PENDING_PARTNER", - "STATE_UNSPECIFIED", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "Indicates that attachment has been turned up and is ready to use.", - "The attachment was deleted externally and is no longer functional.\nThis could be because the associated Interconnect was wiped out,\nor because the other side of a Partner attachment was deleted.", - "A PARTNER attachment is in the process of provisioning after a\nPARTNER_PROVIDER attachment was created that references it.", - "PARTNER or PARTNER_PROVIDER attachment that is waiting for the customer\nto activate.", - "A newly created PARTNER attachment that has not yet been configured on\nthe Partner side.", - "", - "Indicates that attachment is not ready to use yet, because turnup is not\ncomplete." - ], - "type": "string" - }, - "subnetLength": { - "description": "Input only. Length of the IPv4 subnet mask.\nAllowed values:\n \n \n - 29 (default)\n - 30\n\nThe default value is 29, except for Cross-Cloud Interconnect\nconnections that use an InterconnectRemoteLocation with a\nconstraints.subnetLengthRange.min equal to 30. For example,\nconnections that use an Azure remote location fall into this\ncategory. In these cases, the default value is 30, and requesting\n29 returns an error.\n\nWhere both 29 and 30 are allowed, 29 is preferred, because it gives\nGoogle Cloud Support more debugging visibility.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of interconnect attachment this is, which can take one of the\nfollowing values:\n \n - DEDICATED: an attachment to a Dedicated Interconnect.\n - PARTNER: an attachment to a Partner Interconnect, created by the\n customer.\n - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by\n the partner.\n\n- L2_DEDICATED: a L2 attachment to a Dedicated Interconnect.", - "enum": [ - "DEDICATED", - "L2_DEDICATED", - "PARTNER", - "PARTNER_PROVIDER" - ], - "enumDescriptions": [ - "Attachment to a dedicated interconnect.", - "Attachment to a dedicated interconnect, forwarding L2 packets.", - "Attachment to a partner interconnect, created by the customer.", - "Attachment to a partner interconnect, created by the partner." - ], - "type": "string" - }, - "vlanTag8021q": { - "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4093.\nOnly specified at creation time.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentAggregatedList": { - "id": "InterconnectAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InterconnectAttachmentsScopedList", - "description": "Name of the scope containing this set of interconnect attachments." - }, - "description": "A list of InterconnectAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#interconnectAttachmentAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectAttachmentAggregatedList for aggregated\nlists of interconnect attachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraints": { - "id": "InterconnectAttachmentConfigurationConstraints", - "properties": { - "bgpMd5": { - "description": "[Output Only] Whether the attachment's BGP session\nrequires/allows/disallows BGP MD5 authentication. This can take one of\nthe following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED.\n\nFor example, a Cross-Cloud Interconnect connection to a remote cloud\nprovider that requires BGP MD5 authentication has the\ninterconnectRemoteLocation attachment_configuration_constraints.bgp_md5\nfield set to MD5_REQUIRED, and that property is propagated to the\nattachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is\nreturned if MD5 is requested.", - "enum": [ - "MD5_OPTIONAL", - "MD5_REQUIRED", - "MD5_UNSUPPORTED" - ], - "enumDescriptions": [ - "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be\nconfigured.", - "MD5_REQUIRED: BGP MD5 authentication must be configured.", - "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" - ], - "type": "string" - }, - "bgpPeerAsnRanges": { - "description": "[Output Only] List of ASN ranges that the remote location is known to\nsupport. Formatted as an array of inclusive ranges {min: min-value, max:\nmax-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}]\nallows the peer ASN to be 123 or anything in the range 64512-65534.\n\nThis field is only advisory. Although the API accepts other ranges, these\nare the ranges that we recommend.", - "items": { - "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { - "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", - "properties": { - "max": { - "format": "uint32", - "type": "integer" - }, - "min": { - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroup": { - "description": "An interconnect attachment group resource allows customers to create,\nanalyze, and expand highly available deployments.", - "id": "InterconnectAttachmentGroup", - "properties": { - "attachments": { - "additionalProperties": { - "$ref": "InterconnectAttachmentGroupAttachment" - }, - "description": "Attachments in the AttachmentGroup. Keys are arbitrary user-specified\nstrings. Users are encouraged, but not required, to use their preferred\nformat for resource links as keys.\nNote that there are add-members and remove-members methods in gcloud.\nThe size of this map is limited by an \"Attachments per group\" quota.", - "type": "object" - }, - "configured": { - "$ref": "InterconnectAttachmentGroupConfigured" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Opaque system-generated token that uniquely identifies the configuration.\nIf provided when patching a configuration in update mode, the provided\ntoken must match the current token or the update is rejected. This provides\na reliable means of doing read-modify-write (optimistic locking) as\ndescribed byAIP 154.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "intent": { - "$ref": "InterconnectAttachmentGroupIntent" - }, - "interconnectGroup": { - "description": "The URL of an InterconnectGroup that groups these Attachments'\nInterconnects. Customers do not need to set this unless directed by\nGoogle Support.", - "type": "string" - }, - "kind": { - "default": "compute#interconnectAttachmentGroup", - "description": "[Output Only] Type of the resource. Always\ncompute#interconnectAttachmentGroup.", - "type": "string" - }, - "logicalStructure": { - "$ref": "InterconnectAttachmentGroupLogicalStructure" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupAttachment": { - "description": "An Attachment in this AttachmentGroup.", - "id": "InterconnectAttachmentGroupAttachment", - "properties": { - "attachment": { - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfigured": { - "description": "[Output Only] The redundancy this group is configured to support. The way a\nuser queries what SLA their Attachment gets is by looking at this field of\nthe Attachment's AttachmentGroup.", - "id": "InterconnectAttachmentGroupConfigured", - "properties": { - "availabilitySla": { - "$ref": "InterconnectAttachmentGroupConfiguredAvailabilitySLA" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfiguredAvailabilitySLA": { - "description": "[Output Only] Which SLA this group is configured to support, and why this\ngroup does or does not meet that SLA's requirements.", - "id": "InterconnectAttachmentGroupConfiguredAvailabilitySLA", - "properties": { - "effectiveSla": { - "enum": [ - "EFFECTIVE_SLA_UNSPECIFIED", - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intendedSlaBlockers": { - "items": { - "$ref": "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers": { - "description": "[Output Only] Reasons why configuration.availabilitySLA.sla differs from\nintent.availabilitySLA. This list is empty if and only if those are the\nsame.", - "id": "InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers", - "properties": { - "attachments": { - "description": "[Output Only] URLs of any particular Attachments to explain this\nblocker in more detail.", - "items": { - "type": "string" - }, - "type": "array" - }, - "blockerType": { - "enum": [ - "BLOCKER_TYPE_UNSPECIFIED", - "INCOMPATIBLE_METROS", - "INCOMPATIBLE_REGIONS", - "MISSING_GLOBAL_ROUTING", - "NO_ATTACHMENTS", - "NO_ATTACHMENTS_IN_METRO_AND_ZONE", - "OTHER" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "documentationLink": { - "description": "[Output Only] The url of Google Cloud public documentation explaining\nthis requirement. This is set for every type of requirement.", - "type": "string" - }, - "explanation": { - "description": "[Output Only] A human-readable explanation of this requirement and\nwhy it's not met. This is set for every type of requirement.", - "type": "string" - }, - "metros": { - "description": "[Output Only] Metros used to explain this blocker in more detail.\nThese are three-letter lowercase strings like \"iad\". This will be set\nfor some blockers (like NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does\nnot apply to others.", - "items": { - "type": "string" - }, - "type": "array" - }, - "regions": { - "description": "[Output Only] Regions used to explain this blocker in more\ndetail. These are region names formatted like \"us-central1\". This\nwill be set for some blockers (like INCOMPATIBLE_REGIONS) but does\nnot apply to others.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zones": { - "description": "[Output Only] Zones used to explain this blocker in more detail.\nFormat is \"zone1\" and/or \"zone2\". This will be set for some blockers\n(like MISSING_ZONE) but does not apply to others.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupIntent": { - "description": "The user's intent for this AttachmentGroup. This is the only required field\nbesides the name that must be specified on group creation.", - "id": "InterconnectAttachmentGroupIntent", - "properties": { - "availabilitySla": { - "enum": [ - "AVAILABILITY_SLA_UNSPECIFIED", - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructure": { - "description": "[Output Only] An analysis of the logical layout of Attachments in this\ngroup. Every Attachment in the group is shown once in this structure.", - "id": "InterconnectAttachmentGroupLogicalStructure", - "properties": { - "regions": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegion" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegion": { - "description": "[Output Only] The regions Attachments in this group are in.", - "id": "InterconnectAttachmentGroupLogicalStructureRegion", - "properties": { - "metros": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetro" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] The name of a region, like \"us-central1\".", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetro": { - "description": "[Output Only] The metros of Attachments in this group in this region.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetro", - "properties": { - "facilities": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility" - }, - "type": "array" - }, - "metro": { - "description": "[Output Only] The name of the metro, as a three-letter lowercase\nstring like \"iad\". This is the first component of the location of an\nInterconnect.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility": { - "description": "[Output Only] The facilities used for this group's Attachments'\nInterconnects.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacility", - "properties": { - "facility": { - "description": "[Output Only] The name of a facility, like \"iad-1234\".", - "type": "string" - }, - "zones": { - "items": { - "$ref": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone": { - "description": "[Output Only] The zones that Attachments in this group are present\nin, in the given facilities. This is inherited from their\nInterconnects.", - "id": "InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone", - "properties": { - "attachments": { - "description": "[Output Only] URLs of Attachments in the given zone, to the given\nregion, on Interconnects in the given facility and metro. Every\nAttachment in the AG has such an entry.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The name of a zone, either \"zone1\" or \"zone2\".", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsGetOperationalStatusResponse": { - "description": "Response for the InterconnectAttachmentGroupsGetOperationalStatusResponse.", - "id": "InterconnectAttachmentGroupsGetOperationalStatusResponse", - "properties": { - "etag": { - "type": "string" - }, - "result": { - "$ref": "InterconnectAttachmentGroupsOperationalStatus" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsListResponse": { - "id": "InterconnectAttachmentGroupsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectAttachmentGroup resources.", - "items": { - "$ref": "InterconnectAttachmentGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachmentGroup", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface:\nMixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsOperationalStatus": { - "id": "InterconnectAttachmentGroupsOperationalStatus", - "properties": { - "attachmentStatuses": { - "items": { - "$ref": "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus" - }, - "type": "array" - }, - "configured": { - "$ref": "InterconnectAttachmentGroupConfigured" - }, - "groupStatus": { - "description": "Summarizes the status of the group.", - "enum": [ - "DEGRADED", - "FULLY_DOWN", - "FULLY_UP", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intent": { - "$ref": "InterconnectAttachmentGroupIntent" - }, - "operational": { - "$ref": "InterconnectAttachmentGroupConfigured", - "description": "The operational state of the group, including only active Attachments." - } - }, - "type": "object" - }, - "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus": { - "description": "The status of one Attachment in the group. List order is arbitrary.", - "id": "InterconnectAttachmentGroupsOperationalStatusAttachmentStatus", - "properties": { - "adminEnabled": { - "description": "Whether this Attachment is enabled. This becomes false when the customer\ndrains their Attachment.", - "type": "boolean" - }, - "attachment": { - "description": "The URL of the Attachment being described.", - "type": "string" - }, - "isActive": { - "description": "Whether this Attachment is participating in the redundant configuration.\nThis will be ACTIVE if and only if the status below is CONNECTION_UP.\nAny INACTIVE Attachments are excluded from the analysis that generates\noperational.availabilitySLA.", - "enum": [ - "ACTIVE", - "INACTIVE", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "status": { - "description": "Whether this Attachment is active, and if so, whether BGP is up.", - "enum": [ - "ATTACHMENT_STATUS_UNKNOWN", - "CONNECTION_DISABLED", - "CONNECTION_DOWN", - "CONNECTION_UP", - "DEFUNCT", - "IPSEC_CONFIGURATION_NEEDED_STATUS", - "IPSEC_READY_TO_RESUME_FLOW_STATUS", - "IPV4_DOWN_IPV6_UP", - "IPV4_UP_IPV6_DOWN", - "PARTNER_REQUEST_RECEIVED", - "PENDING_CUSTOMER", - "PENDING_PARTNER", - "PROVISIONED", - "ROUTER_CONFIGURATION_BROKEN", - "UNPROVISIONED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2Forwarding": { - "description": "L2 Interconnect Attachment related configuration.", - "id": "InterconnectAttachmentL2Forwarding", - "properties": { - "applianceMappings": { - "additionalProperties": { - "$ref": "InterconnectAttachmentL2ForwardingApplianceMapping" - }, - "description": "Optional. A map of VLAN tags to appliances and optional inner mapping\nrules. If VLANs are not explicitly mapped to any appliance, the\ndefaultApplianceIpAddress is used.\n\nEach VLAN tag can be a single number or a range of numbers in the range\nof 1 to 4094, e.g., \"1\" or \"4001-4094\". Non-empty and non-overlapping\nVLAN tag ranges are enforced, and violating operations will be rejected.\n\nThe VLAN tags in the Ethernet header must use an ethertype value of\n0x88A8 or 0x8100.", - "type": "object" - }, - "defaultApplianceIpAddress": { - "description": "Optional. A single IPv4 or IPv6 address used as the default destination\nIP when there is no VLAN mapping result found.\n\nUnset field (null-value) indicates the unmatched packet should be\ndropped.", - "type": "string" - }, - "geneveHeader": { - "$ref": "InterconnectAttachmentL2ForwardingGeneveHeader", - "description": "Optional. It represents the structure of a Geneve (Generic Network\nVirtualization Encapsulation) header, as defined in RFC8926. It encapsulates packets from various\nprotocols (e.g., Ethernet, IPv4, IPv6) for use in network virtualization\nenvironments." - }, - "network": { - "description": "Required. Resource URL of the network to which this attachment belongs.", - "type": "string" - }, - "tunnelEndpointIpAddress": { - "description": "Required. A single IPv4 or IPv6 address. This address will be used as the\nsource IP address for packets sent to the appliances, and must be used as\nthe destination IP address for packets that should be sent out through\nthis attachment.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingApplianceMapping": { - "description": "Two-level VLAN-to-Appliance mapping rule.", - "id": "InterconnectAttachmentL2ForwardingApplianceMapping", - "properties": { - "applianceIpAddress": { - "description": "Optional. A single IPv4 or IPv6 address used as the destination IP\naddress for ingress packets that match on a VLAN tag, but do not match\na more specific inner VLAN tag.\n\nUnset field (null-value) indicates both VLAN tags are required to be\nmapped. Otherwise, defaultApplianceIpAddress is used.", - "type": "string" - }, - "innerVlanToApplianceMappings": { - "description": "Optional. Used to match against the inner VLAN when the packet\ncontains two VLAN tags.\n\nA list of mapping rules from inner VLAN tags to IP addresses. If the\ninner VLAN is not explicitly mapped to an IP address range, the\napplianceIpAddress is used.", - "items": { - "$ref": "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping" - }, - "type": "array" - }, - "name": { - "description": "Optional. The name of this appliance mapping rule.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping": { - "description": "The inner VLAN-to-Appliance mapping.", - "id": "InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping", - "properties": { - "innerApplianceIpAddress": { - "description": "Required in this object. A single IPv4 or IPv6 address used as the\ndestination IP address for ingress packets that match on both VLAN\ntags.", - "type": "string" - }, - "innerVlanTags": { - "description": "Required in this object. Used to match the inner VLAN tag on the\npacket. Each entry can be a single number or a range of numbers in\nthe range of 1 to 4094, e.g., [\"1\", \"4001-4094\"] is valid. Non-empty\nand Non-overlapping VLAN tag ranges are enforced, and violating\noperations will be rejected.\n\nThe inner VLAN tags must have an ethertype value of 0x8100.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentL2ForwardingGeneveHeader": { - "description": "GeneveHeader related configurations.", - "id": "InterconnectAttachmentL2ForwardingGeneveHeader", - "properties": { - "vni": { - "description": "Optional. VNI is a 24-bit unique virtual network identifier, from 0 to\n16,777,215.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentList": { - "description": "Response to the list request, and contains a list of interconnect\nattachments.", - "id": "InterconnectAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectAttachment resources.", - "items": { - "$ref": "InterconnectAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachmentList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectAttachmentList for lists of interconnect\nattachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentParams": { - "description": "Additional interconnect attachment parameters.", - "id": "InterconnectAttachmentParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentPartnerMetadata": { - "description": "Informational metadata about Partner attachments from Partners to display\nto customers. These fields are propagated from PARTNER_PROVIDER\nattachments to their corresponding PARTNER attachments.", - "id": "InterconnectAttachmentPartnerMetadata", - "properties": { - "interconnectName": { - "description": "Plain text name of the Interconnect this attachment is connected to, as\ndisplayed in the Partner's portal. For instance \"Chicago 1\".\nThis value may be validated to match approved Partner values.", - "type": "string" - }, - "partnerName": { - "description": "Plain text name of the Partner providing this attachment.\nThis value may be validated to match approved Partner values.", - "type": "string" - }, - "portalUrl": { - "description": "URL of the Partner's portal for this Attachment. Partners may customise\nthis to be a deep link to the specific resource on the Partner portal.\nThis value may be validated to match approved Partner values.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectAttachmentPrivateInfo": { - "description": "Information for an interconnect attachment when this belongs to an\ninterconnect of type DEDICATED.", - "id": "InterconnectAttachmentPrivateInfo", - "properties": { - "tag8021q": { - "description": "[Output Only] 802.1q encapsulation tag to be used for traffic between\nGoogle and the customer, going to and from this network and region.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentsScopedList": { - "id": "InterconnectAttachmentsScopedList", - "properties": { - "interconnectAttachments": { - "description": "A list of interconnect attachments contained in this scope.", - "items": { - "$ref": "InterconnectAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectCircuitInfo": { - "description": "Describes a single physical circuit between the Customer and Google.\nCircuitInfo objects are created by Google, so all fields are output only.", - "id": "InterconnectCircuitInfo", - "properties": { - "customerDemarcId": { - "description": "Customer-side demarc ID for this circuit.", - "type": "string" - }, - "googleCircuitId": { - "description": "Google-assigned unique ID for this circuit. Assigned at circuit turn-up.", - "type": "string" - }, - "googleDemarcId": { - "description": "Google-side demarc ID for this circuit. Assigned at circuit turn-up and\nprovided by Google to the customer in the LOA.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnostics": { - "description": "Diagnostics information about the Interconnect connection, which contains\ndetailed and current technical information about Google's side of the\nconnection.", - "id": "InterconnectDiagnostics", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects,\ndescribing individual neighbors currently seen by the Google router in\nthe ARP cache for the Interconnect.\nThis will be empty when the Interconnect is not bundled.", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "bundleAggregationType": { - "description": "The aggregation type of the bundle interface.", - "enum": [ - "BUNDLE_AGGREGATION_TYPE_LACP", - "BUNDLE_AGGREGATION_TYPE_STATIC" - ], - "enumDescriptions": [ - "LACP is enabled.", - "LACP is disabled." - ], - "type": "string" - }, - "bundleOperationalStatus": { - "description": "The operational status of the bundle interface.", - "enum": [ - "BUNDLE_OPERATIONAL_STATUS_DOWN", - "BUNDLE_OPERATIONAL_STATUS_UP" - ], - "enumDescriptions": [ - "If bundleAggregationType is LACP: LACP is not established and/or all\nlinks in the bundle have DOWN operational status. If\nbundleAggregationType is STATIC: one or more links in the bundle has\nDOWN operational status.", - "If bundleAggregationType is LACP: LACP is established and at least one\nlink in the bundle has UP operational status. If bundleAggregationType\nis STATIC: all links in the bundle (typically just one) have UP\noperational status." - ], - "type": "string" - }, - "links": { - "description": "A list of InterconnectDiagnostics.LinkStatus objects,\ndescribing the status for each link on the Interconnect.", - "items": { - "$ref": "InterconnectDiagnosticsLinkStatus" - }, - "type": "array" - }, - "macAddress": { - "description": "The MAC address of the Interconnect's bundle interface.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsARPEntry": { - "description": "Describing the ARP neighbor entries seen on this link", - "id": "InterconnectDiagnosticsARPEntry", - "properties": { - "ipAddress": { - "description": "The IP address of this ARP neighbor.", - "type": "string" - }, - "macAddress": { - "description": "The MAC address of this ARP neighbor.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkLACPStatus": { - "id": "InterconnectDiagnosticsLinkLACPStatus", - "properties": { - "googleSystemId": { - "description": "System ID of the port on Google's side of the LACP exchange.", - "type": "string" - }, - "neighborSystemId": { - "description": "System ID of the port on the neighbor's side of the LACP exchange.", - "type": "string" - }, - "state": { - "description": "The state of a LACP link, which can take one of the following values:\n \n - ACTIVE: The link is configured and active within the bundle.\n - DETACHED: The link is not configured within the bundle. This means\n that the rest of the object should be empty.", - "enum": [ - "ACTIVE", - "DETACHED" - ], - "enumDescriptions": [ - "The link is configured and active within the bundle.", - "The link is not configured within the bundle, this means the rest of\nthe object should be empty." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkOpticalPower": { - "id": "InterconnectDiagnosticsLinkOpticalPower", - "properties": { - "state": { - "description": "The status of the current value when compared to the warning and alarm\nlevels for the receiving or transmitting transceiver. Possible states\ninclude:\n \n \n - OK: The value has not crossed a warning threshold.\n - LOW_WARNING: The value has crossed below the low\n warning threshold. \n - HIGH_WARNING: The value has\n crossed above the high warning threshold.\n - LOW_ALARM: The value has crossed below the low alarm\n threshold.\n - HIGH_ALARM: The value has crossed above the high alarm\n threshold.", - "enum": [ - "HIGH_ALARM", - "HIGH_WARNING", - "LOW_ALARM", - "LOW_WARNING", - "OK" - ], - "enumDescriptions": [ - "The value has crossed above the high alarm threshold.", - "The value of the current optical power has crossed above the high\nwarning threshold.", - "The value of the current optical power has crossed below the low alarm\nthreshold.", - "The value of the current optical power has crossed below the low\nwarning threshold.", - "The value of the current optical power has not crossed a warning\nthreshold." - ], - "type": "string" - }, - "value": { - "description": "Value of the current receiving or transmitting optical power, read in\ndBm. Take a known good optical value, give it a 10% margin and trigger\nwarnings relative to that value. In general, a -7dBm warning and a -11dBm\nalarm are good optical value estimates for most links.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "InterconnectDiagnosticsLinkStatus": { - "id": "InterconnectDiagnosticsLinkStatus", - "properties": { - "arpCaches": { - "description": "A list of InterconnectDiagnostics.ARPEntry objects,\ndescribing the ARP neighbor entries seen on this link.\nThis will be empty if the link is bundled", - "items": { - "$ref": "InterconnectDiagnosticsARPEntry" - }, - "type": "array" - }, - "circuitId": { - "description": "The unique ID for this link assigned during turn up by Google.", - "type": "string" - }, - "googleDemarc": { - "description": "The Demarc address assigned by Google and provided in the LoA.", - "type": "string" - }, - "lacpStatus": { - "$ref": "InterconnectDiagnosticsLinkLACPStatus" - }, - "macsec": { - "$ref": "InterconnectDiagnosticsMacsecStatus", - "description": "Describes the status of MACsec encryption on this link." - }, - "operationalStatus": { - "description": "The operational status of the link.", - "enum": [ - "LINK_OPERATIONAL_STATUS_DOWN", - "LINK_OPERATIONAL_STATUS_UP" - ], - "enumDescriptions": [ - "The interface is unable to communicate with the remote end.", - "The interface has low level communication with the remote end." - ], - "type": "string" - }, - "receivingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower", - "description": "An InterconnectDiagnostics.LinkOpticalPower object,\ndescribing the current value and status of the received light level." - }, - "transmittingOpticalPower": { - "$ref": "InterconnectDiagnosticsLinkOpticalPower", - "description": "An InterconnectDiagnostics.LinkOpticalPower object,\ndescribing the current value and status of the transmitted light level." - } - }, - "type": "object" - }, - "InterconnectDiagnosticsMacsecStatus": { - "description": "Describes the status of MACsec encryption on the link.", - "id": "InterconnectDiagnosticsMacsecStatus", - "properties": { - "ckn": { - "description": "Indicates the Connectivity Association Key Name (CKN)\ncurrently being used if MACsec is operational.", - "type": "string" - }, - "operational": { - "description": "Indicates whether or not MACsec is operational on this link.", - "type": "boolean" - } - }, - "type": "object" - }, - "InterconnectGroup": { - "description": "An interconnect group resource allows customers to create, analyze, and\nexpand their redundant connections.", - "id": "InterconnectGroup", - "properties": { - "configured": { - "$ref": "InterconnectGroupConfigured" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Opaque system-generated token that uniquely identifies the configuration.\nIf provided when patching a configuration in update mode, the provided\ntoken must match the current token or the update is rejected. This provides\na reliable means of doing read-modify-write (optimistic locking) as\ndescribed by AIP 154.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "intent": { - "$ref": "InterconnectGroupIntent" - }, - "interconnects": { - "additionalProperties": { - "$ref": "InterconnectGroupInterconnect" - }, - "description": "Interconnects in the InterconnectGroup. Keys are arbitrary user-specified\nstrings. Users are encouraged, but not required, to use their preferred\nformat for resource links as keys.\nNote that there are add-members and remove-members methods in gcloud.\nThe size of this map is limited by an \"Interconnects per group\" quota.", - "type": "object" - }, - "kind": { - "default": "compute#InterconnectGroup", - "description": "[Output Only] Type of the resource. Always compute#InterconnectGroup", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.interconnectGroups.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalStructure": { - "$ref": "InterconnectGroupPhysicalStructure" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupConfigured": { - "description": "[Output Only] The status of the group as configured. This has the same\nstructure as the operational field reported by the OperationalStatus\nmethod, but does not take into account the operational status of each\nresource.", - "id": "InterconnectGroupConfigured", - "properties": { - "topologyCapability": { - "$ref": "InterconnectGroupConfiguredTopologyCapability" - } - }, - "type": "object" - }, - "InterconnectGroupConfiguredTopologyCapability": { - "description": "[Output Only] How reliable this topology is configured to be, and why\nthis group does or does not meet the requirements for the intended\ncapability.", - "id": "InterconnectGroupConfiguredTopologyCapability", - "properties": { - "intendedCapabilityBlockers": { - "items": { - "$ref": "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers" - }, - "type": "array" - }, - "supportedSla": { - "enum": [ - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers": { - "description": "[Output Only] Reasons why configuration.topologyCapability.sla differs\nfrom intent.topologyCapability. This list is empty if and only if those\nare the same.", - "id": "InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers", - "properties": { - "blockerType": { - "enum": [ - "INCOMPATIBLE_METROS", - "NOT_AVAILABLE", - "NO_INTERCONNECTS", - "NO_INTERCONNECTS_IN_METRO_AND_ZONE", - "OTHER", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "documentationLink": { - "description": "[Output Only] The url of Google Cloud public documentation explaining\nthis requirement. This is set for every type of requirement.", - "type": "string" - }, - "explanation": { - "description": "[Output Only] A human-readable explanation of this requirement and\nwhy it's not met. This is set for every type of requirement.", - "type": "string" - }, - "facilities": { - "description": "[Output Only] Facilities used to explain this blocker in more detail.\nLike physicalStructure.metros.facilities.facility, this is a numeric\nstring like \"5467\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "interconnects": { - "description": "[Output Only] Interconnects used to explain this blocker in more\ndetail.", - "items": { - "type": "string" - }, - "type": "array" - }, - "metros": { - "description": "[Output Only] Metros used to explain this blocker in more detail.\nThese are three-letter lowercase strings like \"iad\". A blocker like\nINCOMPATIBLE_METROS will specify the problematic metros in this\nfield.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zones": { - "description": "[Output Only] Zones used to explain this blocker in more detail.\nZone names are \"zone1\" and/or \"zone2\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupIntent": { - "description": "The user's intent for this group. This is the only required field besides\nthe name that must be specified on group creation.", - "id": "InterconnectGroupIntent", - "properties": { - "topologyCapability": { - "enum": [ - "NO_SLA", - "PRODUCTION_CRITICAL", - "PRODUCTION_NON_CRITICAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupInterconnect": { - "description": "An Interconnect in this InterconnectGroup.", - "id": "InterconnectGroupInterconnect", - "properties": { - "interconnect": { - "description": "The URL of an Interconnect in this group. All Interconnects in the group\nare unique.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructure": { - "description": "[Output Only] An analysis of the physical layout of Interconnects in this\ngroup. Every Interconnect in the group is shown once in this structure.", - "id": "InterconnectGroupPhysicalStructure", - "properties": { - "metros": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetros" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetros": { - "description": "[Output Only] The metros Interconnects in this group are in.", - "id": "InterconnectGroupPhysicalStructureMetros", - "properties": { - "facilities": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetrosFacilities" - }, - "type": "array" - }, - "metro": { - "description": "[Output Only] The name of the metro, as a three-letter lowercase string\nlike \"iad\". This is the first component of the location of\nInterconnects underneath this.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetrosFacilities": { - "description": "[Output Only] The facilities Interconnects in this metro are present\nin.", - "id": "InterconnectGroupPhysicalStructureMetrosFacilities", - "properties": { - "facility": { - "description": "[Output Only] The ID of this facility, as a numeric string like\n\"5467\". This is the third component of the location of Interconnects\nin this facility.", - "type": "string" - }, - "zones": { - "items": { - "$ref": "InterconnectGroupPhysicalStructureMetrosFacilitiesZones" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectGroupPhysicalStructureMetrosFacilitiesZones": { - "description": "[Output Only] The zones that Interconnects in this facility are\npresent in.", - "id": "InterconnectGroupPhysicalStructureMetrosFacilitiesZones", - "properties": { - "interconnects": { - "description": "[Output Only] URLs of Interconnects in this redundancy group in the\ngiven metro, facility, and zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The name of the zone, either \"zone1\" or \"zone2\".\nThis is the second component of the location of Interconnects in\nthis facility.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembers": { - "id": "InterconnectGroupsCreateMembers", - "properties": { - "intentMismatchBehavior": { - "description": "How to behave when configured.topologyCapability.supportedSLA would not\nequal intent.topologyCapability after this call.", - "enum": [ - "CREATE", - "REJECT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "interconnects": { - "items": { - "$ref": "InterconnectGroupsCreateMembersInterconnectInput" - }, - "type": "array" - }, - "templateInterconnect": { - "$ref": "InterconnectGroupsCreateMembersInterconnectInput", - "description": "Parameters for the Interconnects to create." - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembersInterconnectInput": { - "description": "LINT.IfChange", - "id": "InterconnectGroupsCreateMembersInterconnectInput", - "properties": { - "adminEnabled": { - "description": "Administrative status of the interconnect. When this is set to true, the\nInterconnect is functional and can carry traffic.\nWhen set to false, no packets can be carried over the interconnect and\nno BGP routes are exchanged over it. By default, the status is set to\ntrue.", - "type": "boolean" - }, - "customerName": { - "description": "Customer name, to put in the Letter of Authorization as the party\nauthorized to request a crossconnect.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "facility": { - "description": "A zone-free location to use for all Interconnects created in this call,\nlike \"iad-1234\".", - "type": "string" - }, - "interconnectType": { - "description": "Type of interconnect, which can take one of the following values:\n \n - PARTNER: A partner-managed interconnection shared between\n customers though a partner. \n - DEDICATED: A dedicated physical\n interconnection with the customer.\n\n Note that a value IT_PRIVATE\nhas been deprecated in favor of DEDICATED.", - "enum": [ - "DEDICATED", - "IT_PRIVATE", - "PARTNER" - ], - "enumDescriptions": [ - "A dedicated physical interconnection with the customer.", - "[Deprecated] A private, physical interconnection with the customer.", - "A partner-managed interconnection shared between customers via partner." - ], - "type": "string" - }, - "linkType": { - "description": "Type of link requested, which can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics\n - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics.\n - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4\n optics.\n\n Note that this field indicates the speed of each of the\nlinks in the bundle, not the speed of the entire bundle.", - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "name": { - "description": "Name of the Interconnects to be created. This must be specified on the\ntemplate and/or on each individual interconnect. The name, if not empty,\nmust be 1-63 characters long, and comply with RFC1035.\nSpecifically, any nonempty name must be 1-63 characters long and match\nthe regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "type": "string" - }, - "nocContactEmail": { - "description": "Email address to contact the customer NOC for operations and maintenance\nnotifications regarding this Interconnect. If specified, this will be\nused for notifications in addition to all other forms described, such as\nCloud Monitoring logs alerting and Cloud Notifications. This field is\nrequired for users who sign up for Cloud Interconnect using\nworkforce identity federation.", - "type": "string" - }, - "remoteLocation": { - "description": "Indicates that this is a Cross-Cloud Interconnect. This field specifies\nthe location outside of Google's network that the interconnect is\nconnected to.", - "type": "string" - }, - "requestedFeatures": { - "description": "Optional. List of features requested for this Interconnect connection,\nwhich can take one of the following values:\n \n - IF_MACSEC: If specified, then the connection is created on MACsec\n capable hardware ports. If not specified, non-MACsec capable ports will\n also be considered.\n - IF_CROSS_SITE_NETWORK: If specified, then the connection is created\n exclusively for Cross-Site Networking. The connection can not be used for\n Cross-Site Networking unless this feature is specified.", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "requestedLinkCount": { - "description": "Target number of physical links in the link bundle, as requested by the\ncustomer.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectGroupsCreateMembersRequest": { - "id": "InterconnectGroupsCreateMembersRequest", - "properties": { - "request": { - "$ref": "InterconnectGroupsCreateMembers" - } - }, - "type": "object" - }, - "InterconnectGroupsGetOperationalStatusResponse": { - "description": "Response for the InterconnectGroupsGetOperationalStatusResponse.", - "id": "InterconnectGroupsGetOperationalStatusResponse", - "properties": { - "etag": { - "type": "string" - }, - "result": { - "$ref": "InterconnectGroupsOperationalStatus" - } - }, - "type": "object" - }, - "InterconnectGroupsListResponse": { - "id": "InterconnectGroupsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectGroup resources.", - "items": { - "$ref": "InterconnectGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#InterconnectGroup", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectGroupsOperationalStatus": { - "description": "Request to get the status of the interconnect group with extra detail.", - "id": "InterconnectGroupsOperationalStatus", - "properties": { - "configured": { - "$ref": "InterconnectGroupConfigured", - "description": "The configuration analysis, as returned by Get." - }, - "groupStatus": { - "description": "Summarizes the status of the group.", - "enum": [ - "DEGRADED", - "FULLY_DOWN", - "FULLY_UP", - "GROUPS_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "intent": { - "$ref": "InterconnectGroupIntent", - "description": "The intent of the resource, as returned by Get." - }, - "interconnectStatuses": { - "items": { - "$ref": "InterconnectGroupsOperationalStatusInterconnectStatus" - }, - "type": "array" - }, - "operational": { - "$ref": "InterconnectGroupConfigured", - "description": "The operational state of the group, including only active Interconnects." - } - }, - "type": "object" - }, - "InterconnectGroupsOperationalStatusInterconnectStatus": { - "description": "The status of one Interconnect in the group. The order is arbitrary.", - "id": "InterconnectGroupsOperationalStatusInterconnectStatus", - "properties": { - "adminEnabled": { - "description": "Whether the Interconnect is enabled.", - "type": "boolean" - }, - "diagnostics": { - "$ref": "InterconnectDiagnostics", - "description": "The diagnostics of the Interconnect, as returned by the existing\nget-diagnostics method." - }, - "interconnect": { - "description": "The URL of the Interconnect being described.", - "type": "string" - }, - "isActive": { - "description": "Whether this interconnect is participating in the redundant\nconfiguration.", - "enum": [ - "ACTIVE", - "INACTIVE", - "IS_ACTIVE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectList": { - "description": "Response to the list request, and contains a list of interconnects.", - "id": "InterconnectList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Interconnect resources.", - "items": { - "$ref": "Interconnect" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectList for lists of interconnects.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectLocation": { - "description": "Represents an Interconnect Attachment (VLAN) Location resource.\n\nYou can use this resource to find location details about an Interconnect\nattachment (VLAN). For more information about interconnect attachments, read\nCreating VLAN Attachments.", - "id": "InterconnectLocation", - "properties": { - "address": { - "description": "[Output Only] The postal address of the Point of Presence, each line in\nthe address is separated by a newline character.", - "type": "string" - }, - "availabilityZone": { - "description": "[Output Only] Availability zone for this InterconnectLocation. Within a\nmetropolitan area (metro), maintenance will not be simultaneously scheduled\nin more than one availability zone. Example: \"zone1\" or \"zone2\".", - "type": "string" - }, - "availableFeatures": { - "description": "[Output only] List of features available at this InterconnectLocation,\nwhich can take one of the following values:\n \n - IF_MACSEC\n - IF_CROSS_SITE_NETWORK", - "items": { - "enum": [ - "IF_CROSS_SITE_NETWORK", - "IF_L2_FORWARDING", - "IF_MACSEC" - ], - "enumDescriptions": [ - "Cross-Site Networking", - "L2 Interconnect Attachment Forwarding", - "Media Access Control security (MACsec)" - ], - "type": "string" - }, - "type": "array" - }, - "availableLinkTypes": { - "description": "[Output only] List of link types available at this InterconnectLocation,\nwhich can take one of the following values:\n \n - LINK_TYPE_ETHERNET_10G_LR\n - LINK_TYPE_ETHERNET_100G_LR\n - LINK_TYPE_ETHERNET_400G_LR4", - "items": { - "enum": [ - "LINK_TYPE_ETHERNET_100G_LR", - "LINK_TYPE_ETHERNET_10G_LR", - "LINK_TYPE_ETHERNET_400G_LR4" - ], - "enumDescriptions": [ - "100G Ethernet, LR Optics.", - "10G Ethernet, LR Optics.\n[(rate_bps) = 10000000000];", - "400G Ethernet, LR4 Optics." - ], - "type": "string" - }, - "type": "array" - }, - "city": { - "description": "[Output Only] Metropolitan area designator that indicates which city an\ninterconnect is located.\nFor example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", - "type": "string" - }, - "continent": { - "description": "[Output Only] Continent for this location, which can take one of the\nfollowing values:\n \n - AFRICA\n - ASIA_PAC\n - EUROPE\n - NORTH_AMERICA\n - SOUTH_AMERICA", - "enum": [ - "AFRICA", - "ASIA_PAC", - "C_AFRICA", - "C_ASIA_PAC", - "C_EUROPE", - "C_NORTH_AMERICA", - "C_SOUTH_AMERICA", - "EUROPE", - "NORTH_AMERICA", - "SOUTH_AMERICA" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "crossSiteInterconnectInfos": { - "description": "[Output Only] A list of InterconnectLocation.CrossSiteInterconnectInfo\nobjects, that describe where Cross-Site Interconnect wires may connect to\nfrom this location and associated connection parameters. Cross-Site\nInterconnect isn't allowed to locations which are not listed.", - "items": { - "$ref": "InterconnectLocationCrossSiteInterconnectInfo" - }, - "type": "array" - }, - "description": { - "description": "[Output Only] An optional description of the resource.", - "type": "string" - }, - "facilityProvider": { - "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", - "type": "string" - }, - "facilityProviderFacilityId": { - "description": "[Output Only] A provider-assigned Identifier for this facility (e.g.,\nAshburn-DC1).", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#interconnectLocation", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectLocation for interconnect locations.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "peeringdbFacilityId": { - "description": "[Output Only] The peeringdb identifier for this facility (corresponding\nwith a netfac type in peeringdb).", - "type": "string" - }, - "regionInfos": { - "description": "[Output Only] A list of InterconnectLocation.RegionInfo objects, that\ndescribe parameters pertaining to the relation between this\nInterconnectLocation and various Google Cloud regions.", - "items": { - "$ref": "InterconnectLocationRegionInfo" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "singleRegionProductionCriticalPeerLocations": { - "description": "[Output Only] URLs of the other locations that can pair up with this\nlocation to support Single-Region 99.99% SLA. E.g. iad-zone1-1 and\niad-zone2-5467 are Single-Region 99.99% peer locations of each other.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "[Output Only] The status of this InterconnectLocation, which can take one\nof the following values:\n \n - CLOSED: The InterconnectLocation is closed and is unavailable for\n provisioning new Interconnects.\n - AVAILABLE: The InterconnectLocation is available for provisioning new\n Interconnects.", - "enum": [ - "AVAILABLE", - "CLOSED" - ], - "enumDescriptions": [ - "The InterconnectLocation is available for provisioning new Interconnects.", - "The InterconnectLocation is closed for provisioning new Interconnects." - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - } - }, - "type": "object" - }, - "InterconnectLocationCrossSiteInterconnectInfo": { - "description": "Information about Cross-Site Interconnect wires which may be created\nbetween the containing location and another remote location.", - "id": "InterconnectLocationCrossSiteInterconnectInfo", - "properties": { - "city": { - "description": "The remote location for Cross-Site Interconnect wires. This specifies an\nInterconnectLocation city (metropolitan area designator), which itself\nmay match multiple InterconnectLocations.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectLocationList": { - "description": "Response to the list request, and contains a list of interconnect locations.", - "id": "InterconnectLocationList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectLocation resources.", - "items": { - "$ref": "InterconnectLocation" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectLocationList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectLocationList for lists of interconnect\nlocations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectLocationRegionInfo": { - "description": "Information about any potential InterconnectAttachments between an\nInterconnect at a specific InterconnectLocation, and a specific Cloud\nRegion.", - "id": "InterconnectLocationRegionInfo", - "properties": { - "expectedRttMs": { - "description": "Expected round-trip time in milliseconds, from this InterconnectLocation\nto a VM in this region.", - "format": "int64", - "type": "string" - }, - "l2ForwardingEnabled": { - "description": "Identifies whether L2 Interconnect Attachments can be created in this\nregion for interconnects that are in this location.", - "type": "boolean" - }, - "locationPresence": { - "description": "Identifies the network presence of this location.", - "enum": [ - "GLOBAL", - "LOCAL_REGION", - "LP_GLOBAL", - "LP_LOCAL_REGION" - ], - "enumDescriptions": [ - "This region is not in any common network presence with this\nInterconnectLocation.", - "This region shares the same regional network presence as this\nInterconnectLocation.", - "[Deprecated] This region is not in any common network presence with\nthis InterconnectLocation.", - "[Deprecated] This region shares the same regional network presence as\nthis InterconnectLocation." - ], - "type": "string" - }, - "region": { - "description": "URL for the region of this location.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectMacsec": { - "description": "Configuration information for enabling Media Access Control security\n(MACsec) on this Cloud Interconnect connection between Google and your\non-premises router.", - "id": "InterconnectMacsec", - "properties": { - "failOpen": { - "description": "If set to true, the Interconnect connection is configured with ashould-secure MACsec security policy, that allows the Google\nrouter to fallback to cleartext traffic if the MKA session cannot be\nestablished. By default, the Interconnect connection is configured with amust-secure security policy that drops all traffic if the\nMKA session cannot be established with your router.", - "type": "boolean" - }, - "preSharedKeys": { - "description": "Required. A keychain placeholder describing a set of named key objects\nalong with their start times. A MACsec CKN/CAK is generated for each\nkey in the key chain. Google router automatically picks the key with\nthe most recent startTime when establishing or re-establishing a MACsec\nsecure link.", - "items": { - "$ref": "InterconnectMacsecPreSharedKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectMacsecConfig": { - "description": "MACsec configuration information for the Interconnect connection. Contains\nthe generated Connectivity Association Key Name (CKN) and the key (CAK) for\nthis Interconnect connection.", - "id": "InterconnectMacsecConfig", - "properties": { - "preSharedKeys": { - "description": "A keychain placeholder describing a set of named key objects\nalong with their start times. A MACsec CKN/CAK is generated for each key in\nthe key chain. Google router automatically picks the key with the most\nrecent startTime when establishing or re-establishing a MACsec secure link.", - "items": { - "$ref": "InterconnectMacsecConfigPreSharedKey" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectMacsecConfigPreSharedKey": { - "description": "Describes a pre-shared key used to setup MACsec in static connectivity\nassociation key (CAK) mode.", - "id": "InterconnectMacsecConfigPreSharedKey", - "properties": { - "cak": { - "description": "An auto-generated Connectivity Association Key (CAK) for this key.", - "type": "string" - }, - "ckn": { - "description": "An auto-generated Connectivity Association Key Name (CKN) for this key.", - "type": "string" - }, - "name": { - "description": "User provided name for this pre-shared key.", - "type": "string" - }, - "startTime": { - "description": "User provided timestamp on or after which this key is valid.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectMacsecPreSharedKey": { - "description": "Describes a pre-shared key used to setup MACsec in static connectivity\nassociation key (CAK) mode.", - "id": "InterconnectMacsecPreSharedKey", - "properties": { - "name": { - "description": "Required. A name for this pre-shared key.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be\na dash.", - "type": "string" - }, - "startTime": { - "description": "A RFC3339 timestamp on or after which the key is\nvalid. startTime can be in the future. If the keychain has a single\nkey, startTime can be omitted. If the keychain has multiple keys,\nstartTime is mandatory for each key. The start times of keys must be in\nincreasing order. The start times of two consecutive keys must be\nat least 6 hours apart.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectOutageNotification": { - "description": "Description of a planned outage on this Interconnect.", - "id": "InterconnectOutageNotification", - "properties": { - "affectedCircuits": { - "description": "If issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit\nIDs that will be affected.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "A description about the purpose of the outage.", - "type": "string" - }, - "endTime": { - "description": "Scheduled end time for the outage (milliseconds since Unix\nepoch).", - "format": "int64", - "type": "string" - }, - "issueType": { - "description": "Form this outage is expected to take, which can take one of the following\nvalues:\n \n - OUTAGE: The Interconnect may be completely out of service for\n some or all of the specified window.\n - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole\n should remain up, but with reduced bandwidth.\n\n\nNote that the versions of this enum prefixed with \"IT_\" have been\ndeprecated in favor of the unprefixed values.", - "enum": [ - "IT_OUTAGE", - "IT_PARTIAL_OUTAGE", - "OUTAGE", - "PARTIAL_OUTAGE" - ], - "enumDescriptions": [ - "[Deprecated] The Interconnect may be completely out of service for some\nor all of the specified window.", - "[Deprecated] Some circuits comprising the Interconnect will be out of\nservice during the expected window. The interconnect as a whole should\nremain up, albeit with reduced bandwidth.", - "The Interconnect may be completely out of service for some or all of\nthe specified window.", - "Some circuits comprising the Interconnect will be out of service during\nthe expected window. The interconnect as a whole should remain\nup, albeit with reduced bandwidth." - ], - "type": "string" - }, - "name": { - "description": "Unique identifier for this outage notification.", - "type": "string" - }, - "source": { - "description": "The party that generated this notification, which can take the following\nvalue:\n \n - GOOGLE: this notification as generated by Google.\n\n\nNote that the value of NSRC_GOOGLE has been deprecated in favor of\nGOOGLE.", - "enum": [ - "GOOGLE", - "NSRC_GOOGLE" - ], - "enumDescriptions": [ - "This notification was generated by Google.", - "[Deprecated] This notification was generated by Google." - ], - "type": "string" - }, - "startTime": { - "description": "Scheduled start time for the outage (milliseconds since Unix\nepoch).", - "format": "int64", - "type": "string" - }, - "state": { - "description": "State of this notification, which can take one of the following values:\n \n - ACTIVE: This outage notification is active. The event could be in\n the past, present, or future. See start_time and end_time for\n scheduling.\n - CANCELLED: The outage associated with this notification was cancelled\n before the outage was due to start.\n - COMPLETED: The outage associated with this notification is complete.\n\n\nNote that the versions of this enum prefixed with \"NS_\" have been\ndeprecated in favor of the unprefixed values.", - "enum": [ - "ACTIVE", - "CANCELLED", - "COMPLETED", - "NS_ACTIVE", - "NS_CANCELED" - ], - "enumDescriptions": [ - "This outage notification is active. The event could be in the future,\npresent, or past. See start_time and end_time for scheduling.", - "The outage associated with this notification was cancelled before the\noutage was due to start.", - "The outage associated with this notification is complete.", - "[Deprecated] This outage notification is active. The event could be in\nthe future, present, or past. See start_time and end_time for\nscheduling.", - "[Deprecated] The outage associated with this notification was canceled\nbefore the outage was due to start." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectParams": { - "description": "Additional interconnect parameters.", - "id": "InterconnectParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "InterconnectRemoteLocation": { - "description": "Represents a Cross-Cloud Interconnect Remote Location resource.\n\nYou can use this resource to find remote location details about an\nInterconnect attachment (VLAN).", - "id": "InterconnectRemoteLocation", - "properties": { - "address": { - "description": "[Output Only] The postal address of the Point of Presence, each line in\nthe address is separated by a newline character.", - "type": "string" - }, - "attachmentConfigurationConstraints": { - "$ref": "InterconnectAttachmentConfigurationConstraints", - "description": "[Output Only] Subset of fields from InterconnectAttachment's\n|configurationConstraints| field that apply to all attachments for this\nremote location." - }, - "city": { - "description": "[Output Only] Metropolitan area designator that indicates which city an\ninterconnect is located.\nFor example: \"Chicago, IL\", \"Amsterdam, Netherlands\".", - "type": "string" - }, - "constraints": { - "$ref": "InterconnectRemoteLocationConstraints", - "description": "[Output Only] Constraints on the parameters for creating Cross-Cloud\nInterconnect and associated InterconnectAttachments." - }, - "continent": { - "description": "[Output Only] Continent for this location, which can take one of the\nfollowing values:\n \n - AFRICA\n - ASIA_PAC\n - EUROPE\n - NORTH_AMERICA\n - SOUTH_AMERICA", - "enum": [ - "AFRICA", - "ASIA_PAC", - "EUROPE", - "NORTH_AMERICA", - "SOUTH_AMERICA" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] An optional description of the resource.", - "type": "string" - }, - "facilityProvider": { - "description": "[Output Only] The name of the provider for this facility (e.g., EQUINIX).", - "type": "string" - }, - "facilityProviderFacilityId": { - "description": "[Output Only] A provider-assigned Identifier for this facility (e.g.,\nAshburn-DC1).", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#interconnectRemoteLocation", - "description": "[Output Only] Type of the resource. Alwayscompute#interconnectRemoteLocation for interconnect remote\nlocations.", - "type": "string" - }, - "lacp": { - "description": "[Output Only] Link Aggregation Control Protocol (LACP) constraints, which\ncan take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED", - "enum": [ - "LACP_SUPPORTED", - "LACP_UNSUPPORTED" - ], - "enumDescriptions": [ - "LACP_SUPPORTED: LACP is supported, and enabled by default on\nthe Cross-Cloud Interconnect.", - "LACP_UNSUPPORTED: LACP is not supported and is not be enabled on this\nport. GetDiagnostics shows bundleAggregationType as \"static\". GCP does\nnot support LAGs without LACP, so requestedLinkCount must be 1." - ], - "type": "string" - }, - "maxLagSize100Gbps": { - "description": "[Output Only]\nThe maximum number of 100 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 100 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_100_gbps.", - "format": "int32", - "type": "integer" - }, - "maxLagSize10Gbps": { - "description": "[Output Only]\nThe maximum number of 10 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 10 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_10_gbps.", - "format": "int32", - "type": "integer" - }, - "maxLagSize400Gbps": { - "description": "[Output Only]\nThe maximum number of 400 Gbps ports supported in a link aggregation group\n(LAG). When linkType is 400 Gbps, requestedLinkCount cannot exceed\nmax_lag_size_400_gbps.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "peeringdbFacilityId": { - "description": "[Output Only] The peeringdb identifier for this facility (corresponding\nwith a netfac type in peeringdb).", - "type": "string" - }, - "permittedConnections": { - "description": "[Output Only] Permitted connections.", - "items": { - "$ref": "InterconnectRemoteLocationPermittedConnections" - }, - "type": "array" - }, - "remoteService": { - "description": "[Output Only] Indicates the service provider present at the remote\nlocation. Example values: \"Amazon Web Services\", \"Microsoft Azure\".", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of this InterconnectRemoteLocation, which can take\none of the following values:\n \n - CLOSED: The InterconnectRemoteLocation is closed and is unavailable\n for provisioning new Cross-Cloud Interconnects. \n - AVAILABLE: The\n InterconnectRemoteLocation is available for provisioning new\n Cross-Cloud Interconnects.", - "enum": [ - "AVAILABLE", - "CLOSED" - ], - "enumDescriptions": [ - "The InterconnectRemoteLocation is available for provisioning new\nCross-Cloud Interconnects.", - "The InterconnectRemoteLocation is closed for provisioning new\nCross-Cloud Interconnects." - ], - "type": "string" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationConstraints": { - "id": "InterconnectRemoteLocationConstraints", - "properties": { - "portPairRemoteLocation": { - "description": "[Output Only] Port pair remote location constraints, which can take one\nof the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION,\nPORT_PAIR_MATCHING_REMOTE_LOCATION.\n\nGoogle Cloud API refers only to individual ports, but the UI uses this\nfield when ordering a pair of ports, to prevent users from accidentally\nordering something that is incompatible with their cloud provider.\nSpecifically, when ordering a redundant pair of Cross-Cloud Interconnect\nports, and one of them uses a remote location with\nportPairMatchingRemoteLocation set to matching, the UI requires that\nboth ports use the same remote location.", - "enum": [ - "PORT_PAIR_MATCHING_REMOTE_LOCATION", - "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - ], - "enumDescriptions": [ - "If PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider\nallocates ports in pairs, and the user should choose the same remote\nlocation for both ports.", - "If PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision\na redundant pair of Cross-Cloud Interconnects using two different\nremote locations in the same city." - ], - "type": "string" - }, - "portPairVlan": { - "description": "[Output Only] Port pair VLAN constraints, which can take one of the\nfollowing values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN", - "enum": [ - "PORT_PAIR_MATCHING_VLAN", - "PORT_PAIR_UNCONSTRAINED_VLAN" - ], - "enumDescriptions": [ - "If PORT_PAIR_MATCHING_VLAN, the Interconnect for this attachment is\npart of a pair of ports that should have matching VLAN allocations.\nThis occurs with Cross-Cloud Interconnect to Azure remote locations.\nWhile GCP's API does not explicitly group pairs of ports, the UI uses\nthis field to ensure matching VLAN ids when configuring a redundant\nVLAN pair.", - "PORT_PAIR_UNCONSTRAINED_VLAN means there is no constraint." - ], - "type": "string" - }, - "subnetLengthRange": { - "$ref": "InterconnectRemoteLocationConstraintsSubnetLengthRange", - "description": "[Output Only]\n\n[min-length, max-length] \n\nThe minimum and maximum value (inclusive) for the IPv4 subnet\nlength.\n\n For example, an interconnectRemoteLocation for Azure has {min: 30,\nmax:\n30} because Azure requires /30 subnets. \n\nThis range specifies the values supported by both cloud providers.\nInterconnect currently supports /29 and /30 IPv4 subnet lengths. If a\nremote cloud has no constraint on IPv4 subnet length, the range would\nthus be {min: 29, max: 30}." - } - }, - "type": "object" - }, - "InterconnectRemoteLocationConstraintsSubnetLengthRange": { - "id": "InterconnectRemoteLocationConstraintsSubnetLengthRange", - "properties": { - "max": { - "format": "int32", - "type": "integer" - }, - "min": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationList": { - "description": "Response to the list request, and contains a list of interconnect remote\nlocations.", - "id": "InterconnectRemoteLocationList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectRemoteLocation resources.", - "items": { - "$ref": "InterconnectRemoteLocation" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectRemoteLocationList", - "description": "[Output Only] Type of resource. Alwayscompute#interconnectRemoteLocationList for lists of\ninterconnect remote locations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token lets you get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectRemoteLocationPermittedConnections": { - "id": "InterconnectRemoteLocationPermittedConnections", - "properties": { - "interconnectLocation": { - "description": "[Output Only] URL of an Interconnect location that is permitted to\nconnect to this Interconnect remote location.", - "type": "string" - } - }, - "type": "object" - }, - "InterconnectsGetDiagnosticsResponse": { - "description": "Response for the InterconnectsGetDiagnosticsRequest.", - "id": "InterconnectsGetDiagnosticsResponse", - "properties": { - "result": { - "$ref": "InterconnectDiagnostics" - } - }, - "type": "object" - }, - "InterconnectsGetMacsecConfigResponse": { - "description": "Response for the InterconnectsGetMacsecConfigRequest.", - "id": "InterconnectsGetMacsecConfigResponse", - "properties": { - "etag": { - "description": "end_interface: MixerGetResponseWithEtagBuilder", - "type": "string" - }, - "result": { - "$ref": "InterconnectMacsecConfig" - } - }, - "type": "object" - }, - "License": { - "description": "Represents a License resource.\n\nA License represents billing and aggregate usage data forpublic andmarketplace images.\n *Caution* This resource is intended for\nuse only by third-party partners who are creatingCloud Marketplace\nimages.", - "id": "License", - "properties": { - "allowedReplacementLicenses": { - "description": "Specifies licenseCodes of licenses that can replace this license. Note:\nsuch replacements are allowed even if removable_from_disk is false.", - "items": { - "type": "string" - }, - "type": "array" - }, - "appendableToDisk": { - "description": "If true, this license can be appended to an existing disk's set of\nlicenses.", - "type": "boolean" - }, - "chargesUseFee": { - "description": "[Output Only] Deprecated. This field no longer reflects whether a license\ncharges a usage fee.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource; provided by the client\nwhen the resource is created.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "incompatibleLicenses": { - "description": "Specifies licenseCodes of licenses that are incompatible with this license.\nIf a license is incompatible with this license, it cannot be attached to\nthe same disk or image.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#license", - "description": "[Output Only] Type of resource. Always compute#license for\nlicenses.", - "type": "string" - }, - "licenseCode": { - "description": "[Output Only] The unique code used to attach this license to images,\nsnapshots, and disks.", - "format": "uint64", - "type": "string" - }, - "minimumRetention": { - "$ref": "Duration", - "description": "If set, this license will be unable to be removed or replaced once attached\nto a disk until the minimum_retention period has passed." - }, - "multiTenantOnly": { - "description": "If true, this license can only be used on VMs on multi tenant nodes.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.images.insert" - ] - }, - "description": "Name of the resource. The name must be 1-63 characters long and\ncomply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "osLicense": { - "description": "If true, indicates this is an OS license. Only one OS license can be\nattached to a disk or image at a time.", - "type": "boolean" - }, - "removableFromDisk": { - "description": "If true, this license can be removed from a disk's set of licenses, with no\nreplacement license needed.", - "type": "boolean" - }, - "requiredCoattachedLicenses": { - "description": "Specifies the set of permissible coattached licenseCodes of licenses that\nsatisfy the coattachment requirement of this license. At least one license\nfrom the set must be attached to the same disk or image as this license.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceRequirements": { - "$ref": "LicenseResourceRequirements", - "description": "[Input Only] Deprecated." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "soleTenantOnly": { - "description": "If true, this license can only be used on VMs on sole tenant nodes.", - "type": "boolean" - }, - "transferable": { - "description": "If false, licenses will not be copied from the source resource when\ncreating an image from a disk, disk from snapshot, or snapshot from disk.", - "type": "boolean" - }, - "updateTimestamp": { - "description": "[Output Only] Last update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseCode": { - "description": "Represents a License Code resource.\n\nA License Code is a unique identifier used to represent alicense\nresource.\n *Caution* This resource is intended for\nuse only by third-party partners who are creatingCloud Marketplace\nimages.", - "id": "LicenseCode", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] Description of this License Code.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#licenseCode", - "description": "[Output Only] Type of resource. Always compute#licenseCode for\nlicenses.", - "type": "string" - }, - "licenseAlias": { - "description": "[Output Only] URL and description aliases of Licenses with the same\nLicense Code.", - "items": { - "$ref": "LicenseCodeLicenseAlias" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.licenses.insert" - ] - }, - "description": "[Output Only] Name of the resource. The name is 1-20 characters long and\nmust be a valid 64 bit integer.", - "pattern": "[0-9]{0,20}?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "state": { - "description": "[Output Only] Current state of this License Code.", - "enum": [ - "DISABLED", - "ENABLED", - "RESTRICTED", - "STATE_UNSPECIFIED", - "TERMINATED" - ], - "enumDescriptions": [ - "Machines are not allowed to attach boot disks with this License Code.\nRequests to create new resources with this license will be rejected.", - "Use is allowed for anyone with USE_READ_ONLY access to this License Code.", - "Use of this license is limited to a project whitelist.", - "", - "Reserved state." - ], - "type": "string" - }, - "transferable": { - "description": "[Output Only] If true, the license will remain attached when creating\nimages or snapshots from disks. Otherwise, the license is not transferred.", - "type": "boolean" - } - }, - "type": "object" - }, - "LicenseCodeLicenseAlias": { - "id": "LicenseCodeLicenseAlias", - "properties": { - "description": { - "description": "[Output Only] Description of this License Code.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] URL of license corresponding to this License Code.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseResourceCommitment": { - "description": "Commitment for a particular license resource.", - "id": "LicenseResourceCommitment", - "properties": { - "amount": { - "description": "The number of licenses you plan to purchase.", - "format": "int64", - "type": "string" - }, - "coresPerLicense": { - "description": "The number of cores per license.", - "type": "string" - }, - "license": { - "description": "The applicable license URI.", - "type": "string" - } - }, - "type": "object" - }, - "LicenseResourceRequirements": { - "id": "LicenseResourceRequirements", - "properties": { - "minGuestCpuCount": { - "description": "[Input Only] Deprecated. This field no longer reflects the minimum number\nof guest cpus required to use the Instance.", - "format": "int32", - "type": "integer" - }, - "minMemoryMb": { - "description": "[Input Only] Deprecated. This field no longer reflects the minimum memory\nrequired to use the Instance.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "LicensesListResponse": { - "id": "LicensesListResponse", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of License resources.", - "items": { - "$ref": "License" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "LocalDisk": { - "id": "LocalDisk", - "properties": { - "diskCount": { - "description": "Specifies the number of such disks.", - "format": "int32", - "type": "integer" - }, - "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", - "format": "int32", - "type": "integer" - }, - "diskType": { - "description": "Specifies the desired disk type on the node. This disk type must be a\nlocal storage type (e.g.: local-ssd).\nNote that for nodeTemplates, this should be the name of the disk type and\nnot its URL.", - "type": "string" - } - }, - "type": "object" - }, - "LocalizedMessage": { - "description": "Provides a localized error message that is safe to return to the user\nwhich can be attached to an RPC error.", - "id": "LocalizedMessage", - "properties": { - "locale": { - "description": "The locale used following the specification defined at\nhttps://www.rfc-editor.org/rfc/bcp/bcp47.txt.\nExamples are: \"en-US\", \"fr-CH\", \"es-MX\"", - "type": "string" - }, - "message": { - "description": "The localized error message in the above locale.", - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicy": { - "description": "Configuration for location policy among multiple possible locations\n(e.g. preferences for zone selection among zones in a single region).", - "id": "LocationPolicy", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "LocationPolicyLocation" - }, - "description": "Location configurations mapped by location name.\nCurrently only zone names are supported and must be represented as valid\ninternal URLs, such as zones/us-central1-a.", - "type": "object" - }, - "targetShape": { - "description": "Strategy for distributing VMs across zones in a region.", - "enum": [ - "ANY", - "ANY_SINGLE_ZONE", - "BALANCED" - ], - "enumDescriptions": [ - "GCE picks zones for creating VM instances to fulfill the requested\nnumber of VMs within present resource constraints and to maximize\nutilization of unused zonal reservations. Recommended for batch workloads\nthat do not require high availability.", - "GCE always selects a single zone for all the VMs, optimizing for resource\nquotas, available reservations and general capacity. Recommended for\nbatch workloads that cannot tollerate distribution over multiple zones.\nThis the default shape in Bulk Insert and Capacity Advisor APIs.", - "GCE prioritizes acquisition of resources, scheduling VMs in zones\nwhere resources are available while distributing VMs as evenly as\npossible across allowed zones to minimize the impact of zonal failure.\nRecommended for highly available serving workloads." - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicyLocation": { - "id": "LocationPolicyLocation", - "properties": { - "constraints": { - "$ref": "LocationPolicyLocationConstraints", - "description": "Constraints that the caller requires on the result distribution\nin this zone." - }, - "preference": { - "description": "Preference for a given location. Set to either ALLOW orDENY.", - "enum": [ - "ALLOW", - "DENY", - "PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Location is allowed for use.", - "Location is prohibited.", - "Default value, unused." - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationPolicyLocationConstraints": { - "description": "Per-zone constraints on location policy for this zone.", - "id": "LocationPolicyLocationConstraints", - "properties": { - "maxCount": { - "description": "Maximum number of items that are allowed to be placed in this zone.\nThe value must be non-negative.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "MachineImage": { - "description": "Represents a machine image resource.\n\nA machine image is a Compute Engine resource that stores all the\nconfiguration, metadata, permissions, and data from one or more disks\nrequired to create a Virtual machine (VM) instance. For more information, seeMachine images.", - "id": "MachineImage", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this machine image inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent machine image by\ninforming the OS to prepare for the snapshot process.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] A unique identifier for this machine image. The server\ndefines this identifier.", - "format": "uint64", - "type": "string" - }, - "instanceProperties": { - "$ref": "InstanceProperties", - "description": "[Output Only] Properties of source instance" - }, - "kind": { - "default": "compute#machineImage", - "description": "[Output Only] The resource type, which is alwayscompute#machineImage for machine image.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this machine image, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\nmachine image.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this machine image. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "machineImageEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the machine image using acustomer-supplied\nencryption key.\n\nAfter you encrypt a machine image using a customer-supplied key, you must\nprovide the same key if you use the machine image later. For example, you\nmust provide the encryption key when you create an instance from the\nencrypted machine image in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the\nmachine image.\n\nIf you do not provide an encryption key when creating the machine image,\nthen the machine image will be encrypted using an automatically generated\nkey and you do not need to provide a key to use the machine image later." - }, - "name": { - "annotations": { - "required": [ - "compute.machineImages.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "savedDisks": { - "description": "An array of Machine Image specific properties for disks attached to the\nsource instance", - "items": { - "$ref": "SavedDisk" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] The URL for this machine image. The server defines this URL.", - "type": "string" - }, - "sourceDiskEncryptionKeys": { - "description": "[Input Only] Thecustomer-supplied\nencryption key of the disks attached to the source instance. Required\nif the source disk is protected by a customer-supplied encryption key.", - "items": { - "$ref": "SourceDiskEncryptionKey" - }, - "type": "array" - }, - "sourceInstance": { - "description": "The source instance used to create the machine image. You can provide this\nas a partial or full URL to the resource. For example, the following are\nvalid values: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance", - "type": "string" - }, - "sourceInstanceProperties": { - "$ref": "SourceInstanceProperties", - "description": "[Output Only] DEPRECATED: Please use instance_properties\ninstead for source instance related properties. New properties will not be\nadded to this field." - }, - "status": { - "description": "[Output Only] The status of the machine image. One of the following values:INVALID, CREATING, READY,DELETING, and UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "storageLocations": { - "description": "The regional or multi-regional Cloud Storage bucket location where themachine image is\nstored.", - "items": { - "type": "string" - }, - "type": "array" - }, - "totalStorageBytes": { - "description": "[Output Only] Total size of the storage used by the machine image.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "MachineImageList": { - "description": "A list of machine images.", - "id": "MachineImageList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of MachineImage resources.", - "items": { - "$ref": "MachineImage" - }, - "type": "array" - }, - "kind": { - "default": "compute#machineImageList", - "description": "[Output Only] The resource type, which is alwayscompute#machineImagesListResponse for machine image lists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineType": { - "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance\nand pricing requirements. For more information, readMachine Types.", - "id": "MachineType", - "properties": { - "accelerators": { - "description": "[Output Only] A list of accelerator configurations assigned to this\nmachine type.", - "items": { - "properties": { - "guestAcceleratorCount": { - "description": "Number of accelerator cards exposed to the guest.", - "format": "int32", - "type": "integer" - }, - "guestAcceleratorType": { - "description": "The accelerator type resource name, not a full URL, e.g.nvidia-tesla-t4.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "architecture": { - "description": "[Output Only] The architecture of the machine type.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "bundledLocalSsds": { - "$ref": "BundledLocalSsds", - "description": "[Output Only] The configuration of bundled local SSD for the machine type." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this machine type.\nOnly applicable if the machine type is unavailable." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "guestCpus": { - "description": "[Output Only] The number of virtual CPUs that are available to the\ninstance.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "isSharedCpu": { - "description": "[Output Only] Whether this machine type has a shared CPU. SeeShared-core machine\ntypes for more information.", - "type": "boolean" - }, - "kind": { - "default": "compute#machineType", - "description": "[Output Only] The type of the resource. Alwayscompute#machineType for machine types.", - "type": "string" - }, - "maximumPersistentDisks": { - "description": "[Output Only] Maximum persistent disks allowed.", - "format": "int32", - "type": "integer" - }, - "maximumPersistentDisksSizeGb": { - "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", - "format": "int64", - "type": "string" - }, - "memoryMb": { - "description": "[Output Only] The amount of physical memory available to the instance,\ndefined in MB.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the machine type resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "MachineTypeAggregatedList": { - "id": "MachineTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "MachineTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of machine types." - }, - "description": "A list of MachineTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#machineTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#machineTypeAggregatedList for aggregated lists of\nmachine types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineTypeList": { - "description": "Contains a list of machine types.", - "id": "MachineTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of MachineType resources.", - "items": { - "$ref": "MachineType" - }, - "type": "array" - }, - "kind": { - "default": "compute#machineTypeList", - "description": "[Output Only] Type of resource. Always compute#machineTypeList\nfor lists of machine types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "properties": { - "machineTypes": { - "description": "[Output Only] A list of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the machine types\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ManagedInstance": { - "description": "A Managed Instance resource.", - "id": "ManagedInstance", - "properties": { - "allInstancesConfig": { - "$ref": "ManagedInstanceAllInstancesConfig", - "description": "[Output Only] Current all-instances configuration revision applied to this\ninstance." - }, - "currentAction": { - "description": "[Output Only] The current action that the managed instance group has\nscheduled for the instance. Possible values:\n \n - NONE The instance is running, and the managed\n instance group does not have any scheduled actions for this instance.\n - CREATING The managed instance group is creating this\n instance. If the group fails to create this instance, it will try again\n until it is successful.\n - CREATING_WITHOUT_RETRIES The managed instance group\n is attempting to create this instance only once. If the group fails\n to create this instance, it does not try again and the group'stargetSize value is decreased instead.\n - RECREATING The managed instance group is recreating\n this instance.\n - DELETING The managed instance group is permanently\n deleting this instance.\n - ABANDONING The managed instance group is abandoning\n this instance. The instance will be removed from the instance group\n and from any target pools that are associated with this group.\n - RESTARTING The managed instance group is restarting\n the instance.\n - REFRESHING The managed instance group is applying\n configuration changes to the instance without stopping it. For example,\n the group can update the target pool list for an instance without\n stopping that instance.\n - VERIFYING The managed instance group has created the\n instance and it is in the process of being verified.", - "enum": [ - "ABANDONING", - "CREATING", - "CREATING_WITHOUT_RETRIES", - "DELETING", - "NONE", - "RECREATING", - "REFRESHING", - "RESTARTING", - "RESUMING", - "STARTING", - "STOPPING", - "SUSPENDING", - "VERIFYING" - ], - "enumDescriptions": [ - "The managed instance group is abandoning this instance. The instance\nwill be removed from the instance group and from any target pools that\nare associated with this group.", - "The managed instance group is creating this instance. If the group\nfails to create this instance, it will try again until it is\nsuccessful.", - "The managed instance group is attempting to create this instance\nonly once. If the group fails to create this instance, it does\nnot try again and the group's targetSize value is\ndecreased.", - "The managed instance group is permanently deleting this instance.", - "The managed instance group has not scheduled any actions for this\ninstance.", - "The managed instance group is recreating this instance.", - "The managed instance group is applying configuration changes to the\ninstance without stopping it. For example, the group can update the\ntarget pool list for an instance without stopping that instance.", - "The managed instance group is restarting this instance.", - "The managed instance group is resuming this instance.", - "The managed instance group is starting this instance.", - "The managed instance group is stopping this instance.", - "The managed instance group is suspending this instance.", - "The managed instance group is verifying this already created instance.\nVerification happens every time the instance is (re)created or restarted\nand consists of:\n 1. Waiting until health check specified as part of this managed instance\n group's autohealing policy reports HEALTHY.\n Note: Applies only if autohealing policy has a health check specified\n 2. Waiting for addition verification steps performed as post-instance\n creation (subject to future extensions)." - ], - "type": "string" - }, - "id": { - "description": "[Output only] The unique identifier for this resource. This field is empty\nwhen instance does not exist.", - "format": "uint64", - "type": "string" - }, - "instance": { - "description": "[Output Only] The URL of the instance. The URL can exist even if the\ninstance has not yet been created.", - "type": "string" - }, - "instanceHealth": { - "description": "[Output Only] Health state of the instance per health-check.", - "items": { - "$ref": "ManagedInstanceInstanceHealth" - }, - "type": "array" - }, - "instanceStatus": { - "description": "[Output Only] The status of the instance. This field is empty when\nthe instance does not exist.", - "enum": [ - "DEPROVISIONING", - "PENDING", - "PENDING_STOP", - "PROVISIONING", - "REPAIRING", - "RUNNING", - "STAGING", - "STOPPED", - "STOPPING", - "SUSPENDED", - "SUSPENDING", - "TERMINATED" - ], - "enumDescriptions": [ - "The instance is halted and we are performing tear down tasks like network\ndeprogramming, releasing quota, IP, tearing down disks etc.", - "For Flex Start provisioning instance is waiting for available capacity\nfrom Dynamic Workload Scheduler (DWS).", - "The instance is gracefully shutting down.", - "Resources are being allocated for the instance.", - "The instance is in repair.", - "The instance is running.", - "All required resources have been allocated and the instance\nis being started.", - "The instance has stopped successfully.", - "The instance is currently stopping (either being deleted or killed).", - "The instance has suspended.", - "The instance is suspending.", - "The instance has stopped (either by explicit action or underlying\nfailure)." - ], - "type": "string" - }, - "lastAttempt": { - "$ref": "ManagedInstanceLastAttempt", - "description": "[Output Only] Information about the last attempt to create or delete\nthe instance." - }, - "name": { - "description": "[Output Only] The name of the instance. The name always exists even if the\ninstance has not yet been created.", - "type": "string" - }, - "preservedStateFromConfig": { - "$ref": "PreservedState", - "description": "[Output Only] Preserved state applied from per-instance config\nfor this instance." - }, - "preservedStateFromPolicy": { - "$ref": "PreservedState", - "description": "[Output Only] Preserved state generated based on stateful policy\nfor this instance." - }, - "propertiesFromFlexibilityPolicy": { - "$ref": "ManagedInstancePropertiesFromFlexibilityPolicy", - "description": "[Output Only] Instance properties selected for this instance resulting from\nInstanceFlexibilityPolicy." - }, - "scheduling": { - "$ref": "ManagedInstanceScheduling", - "description": "[Output Only] Information about the termination timestamp of the instance,\nif applicable." - }, - "targetStatus": { - "description": "[Output Only] The eventual status of the instance. The instance group\nmanager will not be identified as stable till each managed instance reaches\nits targetStatus.", - "enum": [ - "ABANDONED", - "DELETED", - "RUNNING", - "STOPPED", - "SUSPENDED" - ], - "enumDescriptions": [ - "The managed instance will eventually be ABANDONED, i.e. dissociated\nfrom the managed instance group.", - "The managed instance will eventually be DELETED.", - "The managed instance will eventually reach status RUNNING.", - "The managed instance will eventually reach status TERMINATED.", - "The managed instance will eventually reach status SUSPENDED." - ], - "type": "string" - }, - "version": { - "$ref": "ManagedInstanceVersion", - "description": "[Output Only] Intended version of this instance." - } - }, - "type": "object" - }, - "ManagedInstanceAllInstancesConfig": { - "id": "ManagedInstanceAllInstancesConfig", - "properties": { - "revision": { - "description": "[Output Only] Current all-instances configuration revision.\nThis value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceInstanceHealth": { - "id": "ManagedInstanceInstanceHealth", - "properties": { - "detailedHealthState": { - "description": "[Output Only] The current detailed instance health state.", - "enum": [ - "DRAINING", - "HEALTHY", - "TIMEOUT", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "The instance is being drained. The existing connections to the instance\nhave time to complete, but the new ones are being refused.", - "The instance is reachable i.e. a connection to the application health\nchecking endpoint can be established, and conforms to the requirements\ndefined by the health check.", - "The instance is unreachable i.e. a connection to the application health\nchecking endpoint cannot be established, or the server does not respond\nwithin the specified timeout.", - "The instance is reachable, but does not conform to the requirements\ndefined by the health check.", - "The health checking system is aware of the instance but its health is\nnot known at the moment." - ], - "type": "string" - }, - "healthCheck": { - "description": "[Output Only] The URL for the health check that verifies whether the\ninstance is healthy.", - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceLastAttempt": { - "id": "ManagedInstanceLastAttempt", - "properties": { - "errors": { - "description": "[Output Only] Encountered errors during the last attempt to create or\ndelete the instance.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ManagedInstancePropertiesFromFlexibilityPolicy": { - "id": "ManagedInstancePropertiesFromFlexibilityPolicy", - "properties": { - "disks": { - "description": "List of disks to be attached to the instance.", - "items": { - "$ref": "AttachedDisk" - }, - "type": "array" - }, - "machineType": { - "description": "The machine type to be used for this instance.", - "type": "string" - }, - "minCpuPlatform": { - "description": "Name of the minimum CPU platform to be used by this instance.\ne.g. 'Intel Ice Lake'.", - "type": "string" - }, - "provisioningModel": { - "description": "The provisioning model to be used for this instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceScheduling": { - "id": "ManagedInstanceScheduling", - "properties": { - "terminationTimestamp": { - "description": "[Output Only] The timestamp at which the managed instance will be\nterminated. This is in RFC3339 text format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceVersion": { - "id": "ManagedInstanceVersion", - "properties": { - "instanceTemplate": { - "description": "[Output Only] The intended template of the instance. This field is empty\nwhen current_action is one of { DELETING, ABANDONING }.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the version.", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "A metadata key/value entry.", - "id": "Metadata", - "properties": { - "fingerprint": { - "description": "Specifies a fingerprint for this request, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve the resource.", - "format": "byte", - "type": "string" - }, - "items": { - "description": "Array of key/value pairs. The total size of all keys and values must be\nless than 512 KB.", - "items": { - "description": "Metadata", - "properties": { - "key": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Key for the metadata entry. Keys must conform to the following\nregexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length.\nThis is reflected as part of a URL in the metadata server. Additionally, to\navoid ambiguity, keys must not conflict with any other metadata keys\nfor the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "type": "string" - }, - "value": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Value for the metadata entry. These are free-form strings, and only\nhave meaning as interpreted by the image running in the instance. The\nonly restriction placed on values is that their size must be less than\nor equal to 262144 bytes (256 KiB).", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "kind": { - "default": "compute#metadata", - "description": "[Output Only] Type of the resource. Always compute#metadata\nfor metadata.", - "type": "string" - } - }, - "type": "object" - }, - "MetadataFilter": { - "description": "Opaque filter criteria used by load balancers to restrict routing\nconfiguration to a limited set of load balancing proxies. Proxies and\nsidecars involved in load balancing would typically present metadata to the\nload balancers that need to match criteria specified here. If a match takes\nplace, the relevant configuration is made available to those\nproxies.\n\nFor each metadataFilter in this list, if itsfilterMatchCriteria is set to MATCH_ANY, at least\none of thefilterLabels must match the corresponding label provided in\nthe metadata. If its filterMatchCriteria is set to\nMATCH_ALL, then all of its filterLabels must match with\ncorresponding labels provided in the metadata.\n\nAn example for using metadataFilters would be: if\nload balancing involves\nEnvoys, they receive routing configuration when values inmetadataFilters match values supplied in of their XDS requests to loadbalancers.", - "id": "MetadataFilter", - "properties": { - "filterLabels": { - "description": "The list of label value pairs that must match labels in the provided\nmetadata based on filterMatchCriteria\n\nThis list must not be empty and can have at the most 64 entries.", - "items": { - "$ref": "MetadataFilterLabelMatch" - }, - "type": "array" - }, - "filterMatchCriteria": { - "description": "Specifies how individual filter label matches\nwithin the list of filterLabels and contributes toward the\noverall metadataFilter match.\n\n Supported values are:\n \n - MATCH_ANY: at least one of the filterLabels\n must have a matching label in the provided metadata.\n - MATCH_ALL: all filterLabels must have\n matching labels in the provided metadata.", - "enum": [ - "MATCH_ALL", - "MATCH_ANY", - "NOT_SET" - ], - "enumDescriptions": [ - "Specifies that all filterLabels must match for themetadataFilter to be considered a match.", - "Specifies that any filterLabel must match for themetadataFilter to be considered a match.", - "Indicates that the match criteria was not set. AmetadataFilter must never be created with this value." - ], - "type": "string" - } - }, - "type": "object" - }, - "MetadataFilterLabelMatch": { - "description": "MetadataFilter label name value pairs that are expected\nto match corresponding labels presented as metadata to the load balancer.", - "id": "MetadataFilterLabelMatch", - "properties": { - "name": { - "description": "Name of metadata label.\n\n The name can have a maximum length of 1024 characters and must be at\nleast 1 character long.", - "type": "string" - }, - "value": { - "description": "The value of the label must match the specified value.\n\nvalue can have a maximum length of 1024 characters.", - "type": "string" - } - }, - "type": "object" - }, - "MultiMig": { - "description": "Multi-MIG represents a group of managed instance groups.", - "id": "MultiMig", - "properties": { - "creationTimestamp": { - "description": "[Output only] The creation timestamp of this multi-MIG in RFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output only] The unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#multiMig", - "description": "[Output only] Type of the resource. Alwayscompute#multiMig for multi-MIGs.", - "type": "string" - }, - "name": { - "description": "The name of the multi-MIG.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output only] The URL of the region where the resource resides. You must\nspecify this field as part of the HTTP request URL. You cannot set the\nregion as a field in the request body.", - "type": "string" - }, - "resourcePolicies": { - "$ref": "MultiMigResourcePolicies", - "description": "Resource policies for this multi-MIG." - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "$ref": "MultiMigStatus" - } - }, - "type": "object" - }, - "MultiMigResourcePolicies": { - "description": "Resource policies message for a multi-MIG. Specifies the workload policy\nconfiguration of the multi-MIG.", - "id": "MultiMigResourcePolicies", - "properties": { - "workloadPolicy": { - "description": "The URL of the workload policy for this multi-MIG.\nIt can be a full or partial URL. For example, the following are\nall valid URLs to a workload policy: \n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy\n - projects/project/regions/region/resourcePolicies/resourcePolicy\n - regions/region/resourcePolicies/resourcePolicy", - "type": "string" - } - }, - "type": "object" - }, - "MultiMigStatus": { - "id": "MultiMigStatus", - "properties": { - "appliedAcceleratorTopologies": { - "description": "[Output Only] The accelerator topology applied to this multi-MIG.\nCurrently only one accelerator topology is supported.", - "items": { - "$ref": "MultiMigStatusAcceleratorTopology" - }, - "type": "array" - } - }, - "type": "object" - }, - "MultiMigStatusAcceleratorTopology": { - "id": "MultiMigStatusAcceleratorTopology", - "properties": { - "acceleratorTopology": { - "description": "[Output Only] Topology in the format of: \"16x16\", \"4x4x4\", etc.\nThe value is the same as configured in the WorkloadPolicy.", - "type": "string" - }, - "acceleratorTopologyState": { - "description": "[Output Only] The state of the accelerator topology.", - "enum": [ - "ACTIVATING", - "ACTIVE", - "ACTIVE_DEGRADED", - "DEACTIVATING", - "FAILED", - "INCOMPLETE" - ], - "enumDescriptions": [ - "The accelerator topology is being activated.", - "The accelerator topology is active.", - "The accelerator topology is active but operating in degraded mode.", - "The accelerator topology is being deactivated.", - "The accelerator topology failed.", - "The configuration is incomplete and the accelerator topology cannot\nbe activated due to insufficient number of running VMs." - ], - "type": "string" - }, - "acceleratorTopologyStateLastCheck": { - "$ref": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck", - "description": "[Output Only] The result of the latest accelerator topology state\ncheck." - } - }, - "type": "object" - }, - "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck": { - "id": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck", - "properties": { - "error": { - "description": "[Output Only] Encountered errors on the last state check.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "timestamp": { - "description": "[Output Only] Timestamp is shown only if there is an error. The field\nhas // RFC3339 //\ntext format.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "MultiMigsList": { - "id": "MultiMigsList", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of multi-MIGs in the specified project and region.", - "items": { - "$ref": "MultiMig" - }, - "type": "array" - }, - "kind": { - "default": "compute#multiMigList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results formaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NamedPort": { - "description": "The named port. For example: \u003c\"http\", 80\u003e.", - "id": "NamedPort", - "properties": { - "name": { - "description": "The name for this named port.\nThe name must be 1-63 characters long, and comply withRFC1035.", - "type": "string" - }, - "port": { - "description": "The port number, which can be a value between 1 and 65535.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NatIpInfo": { - "description": "Contains NAT IP information of a NAT config (i.e. usage status, mode).", - "id": "NatIpInfo", - "properties": { - "natIpInfoMappings": { - "description": "A list of all NAT IPs assigned to this NAT config.", - "items": { - "$ref": "NatIpInfoNatIpInfoMapping" - }, - "type": "array" - }, - "natName": { - "description": "Name of the NAT config which the NAT IP belongs to.", - "type": "string" - } - }, - "type": "object" - }, - "NatIpInfoNatIpInfoMapping": { - "description": "Contains information of a NAT IP.", - "id": "NatIpInfoNatIpInfoMapping", - "properties": { - "mode": { - "description": "Specifies whether NAT IP is auto or manual.", - "enum": [ - "AUTO", - "MANUAL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "natIp": { - "description": "NAT IP address. For example: 203.0.113.11.", - "type": "string" - }, - "usage": { - "description": "Specifies whether NAT IP is currently serving at least one endpoint or\nnot.", - "enum": [ - "IN_USE", - "UNUSED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NatIpInfoResponse": { - "id": "NatIpInfoResponse", - "properties": { - "result": { - "description": "[Output Only] A list of NAT IP information.", - "items": { - "$ref": "NatIpInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "Network": { - "description": "Represents a VPC Network resource.\n\nNetworks connect resources to each other and to the internet. For more\ninformation, readVirtual Private Cloud (VPC) Network.", - "id": "Network", - "properties": { - "IPv4Range": { - "deprecated": true, - "description": "Deprecated in favor of subnet mode networks.\nThe range of internal addresses that are legal on this network. This\nrange is aCIDR specification, for example:192.168.0.0/16. Provided by the client when the network is\ncreated.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", - "type": "string" - }, - "autoCreateSubnetworks": { - "description": "Must be set to create a VPC network. If not set, a legacy network is\ncreated.\n\nWhen set to true, the VPC network is created in auto mode.\nWhen set to false, the VPC network is created in custom mode.\n\nAn auto mode VPC network starts with one subnet per region. Each subnet\nhas a predetermined range as described inAuto mode VPC network IP ranges.\n\nFor custom mode VPC networks, you can add subnets using the subnetworksinsert\nmethod.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "enableUlaInternalIpv6": { - "description": "Enable ULA internal ipv6 on this network. Enabling this feature will assign\na /48 from google defined ULA prefix fd20::/20.\n.", - "type": "boolean" - }, - "firewallPolicy": { - "description": "[Output Only] URL of the firewall policy the network is associated with.", - "type": "string" - }, - "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network,\nselected by Google Cloud.", - "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "internalIpv6Range": { - "description": "When enabling ula internal ipv6, caller optionally can specify the /48\nrange they want from the google defined ULA prefix fd20::/20. The input\nmust be a valid /48 ULA IPv6 address and must be within the fd20::/20.\nOperation will fail if the speficied /48 is already in used by another\nresource. If the field is not speficied, then a /48 range will be randomly\nallocated from fd20::/20 and returned via this field.\n.", - "type": "string" - }, - "kind": { - "default": "compute#network", - "description": "[Output Only] Type of the resource. Always compute#network for\nnetworks.", - "type": "string" - }, - "mtu": { - "description": "Maximum Transmission Unit in bytes.\nThe minimum value for this field is 1300 and the maximum value is 8896.\nThe suggested value is 1500, which is the default MTU used on the\nInternet, or 8896 if you want to use Jumbo frames. If unspecified, the\nvalue defaults to 1460.", - "format": "int32", - "type": "integer" - }, - "name": { - "annotations": { - "required": [ - "compute.networks.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all following characters (except for the last\ncharacter) must be a dash, lowercase letter, or digit. The last character\nmust be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "networkFirewallPolicyEnforcementOrder": { - "description": "The network firewall policy enforcement order. Can be either\nAFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to\nAFTER_CLASSIC_FIREWALL if the field is not specified.", - "enum": [ - "AFTER_CLASSIC_FIREWALL", - "BEFORE_CLASSIC_FIREWALL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "networkProfile": { - "description": "A full or partial URL of the network profile to apply to this network.\nThis field can be set only at resource creation time. For example, the\nfollowing are valid URLs: \n \n - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name}\n - projects/{project_id}/global/networkProfiles/{network_profile_name}", - "type": "string" - }, - "params": { - "$ref": "NetworkParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "peerings": { - "description": "[Output Only] A list of network peerings for the resource.", - "items": { - "$ref": "NetworkPeering" - }, - "type": "array" - }, - "routingConfig": { - "$ref": "NetworkRoutingConfig", - "description": "The network-level routing configuration for this network. Used by Cloud\nRouter to determine what type of network-wide routing behavior to enforce." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "subnetworks": { - "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks\nin this VPC network.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkAttachment": { - "description": "NetworkAttachments\nA network attachment resource ...", - "id": "NetworkAttachment", - "properties": { - "connectionEndpoints": { - "description": "[Output Only] An array of connections for all the producers connected\nto this network attachment.", - "items": { - "$ref": "NetworkAttachmentConnectedEndpoint" - }, - "type": "array" - }, - "connectionPreference": { - "enum": [ - "ACCEPT_AUTOMATIC", - "ACCEPT_MANUAL", - "INVALID" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored\nin this object. This field is used in optimistic locking. An up-to-date\nfingerprint must be provided in order to patch.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkAttachment", - "description": "[Output Only] Type of the resource.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.networkAttachments.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "[Output Only] The URL of the network which the Network Attachment\nbelongs to. Practically it is inferred by fetching the network of the first\nsubnetwork associated. Because it is required that all the subnetworks must\nbe from the same network, it is assured that the Network Attachment belongs\nto the same network as all the subnetworks.", - "type": "string" - }, - "producerAcceptLists": { - "description": "Projects that are allowed to connect to this network attachment.\nThe project can be specified using its id or number.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerRejectLists": { - "description": "Projects that are not allowed to connect to this network attachment.\nThe project can be specified using its id or number.", - "items": { - "type": "string" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the network attachment resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "subnetworks": { - "description": "An array of URLs where each entry is the URL of a subnet\nprovided by the service consumer to use for\nendpoints in the producers that connect to this network attachment.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkAttachmentAggregatedList": { - "description": "Contains a list of NetworkAttachmentsScopedList.", - "id": "NetworkAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkAttachmentsScopedList", - "description": "Name of the scope containing this set of NetworkAttachments." - }, - "description": "A list of NetworkAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkAttachmentAggregatedList", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkAttachmentConnectedEndpoint": { - "description": "[Output Only] A connection connected to this network attachment.", - "id": "NetworkAttachmentConnectedEndpoint", - "properties": { - "ipAddress": { - "description": "The IPv4 address assigned to the producer instance network interface.\nThis value will be a range in case of Serverless.", - "type": "string" - }, - "ipv6Address": { - "description": "The IPv6 address assigned to the producer instance network interface.\nThis is only assigned when the stack types of both the instance network\ninterface and the consumer subnet are IPv4_IPv6.", - "type": "string" - }, - "projectIdOrNum": { - "description": "The project id or number of the interface to which the IP was assigned.", - "type": "string" - }, - "secondaryIpCidrRanges": { - "description": "Alias IP ranges from the same subnetwork.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "The status of a connected endpoint to this network attachment.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The consumer allows traffic from the producer to reach its VPC.", - "The consumer network attachment no longer exists.", - "The consumer needs to take further action before traffic can be served.", - "The consumer neither allows nor prohibits traffic\nfrom the producer to reach its VPC.", - "The consumer prohibits traffic from the producer to reach its VPC.", - "" - ], - "type": "string" - }, - "subnetwork": { - "description": "The subnetwork used to assign the IP to the producer\ninstance network interface.", - "type": "string" - }, - "subnetworkCidrRange": { - "description": "[Output Only] The CIDR range of the subnet from which the IPv4 internal\nIP was allocated from.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkAttachmentList": { - "id": "NetworkAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkAttachment resources.", - "items": { - "$ref": "NetworkAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkAttachmentList", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkAttachmentsScopedList": { - "id": "NetworkAttachmentsScopedList", - "properties": { - "networkAttachments": { - "description": "A list of NetworkAttachments contained in this scope.", - "items": { - "$ref": "NetworkAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nnetwork attachments when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityService": { - "description": "Represents a Google Cloud Armor network edge security service resource.", - "id": "NetworkEdgeSecurityService", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a NetworkEdgeSecurityService. An up-to-date fingerprint must be\nprovided in order to update the NetworkEdgeSecurityService,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a NetworkEdgeSecurityService.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkEdgeSecurityService", - "description": "[Output only] Type of the resource. Alwayscompute#networkEdgeSecurityService for\nNetworkEdgeSecurityServices", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the resource resides. You must\nspecify this field as part of the HTTP request URL. It is not settable as a\nfield in the request body.", - "type": "string" - }, - "securityPolicy": { - "description": "The resource URL for the network edge security service associated with this\nnetwork edge security service.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityServiceAggregatedList": { - "id": "NetworkEdgeSecurityServiceAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkEdgeSecurityServicesScopedList", - "description": "Name of the scope containing this set of security policies." - }, - "description": "A list of NetworkEdgeSecurityServicesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkEdgeSecurityServiceAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkEdgeSecurityServiceAggregatedList for lists of\nNetwork Edge Security Services.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEdgeSecurityServicesScopedList": { - "id": "NetworkEdgeSecurityServicesScopedList", - "properties": { - "networkEdgeSecurityServices": { - "description": "A list of NetworkEdgeSecurityServices contained in this scope.", - "items": { - "$ref": "NetworkEdgeSecurityService" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nsecurity policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpoint": { - "description": "The network endpoint.", - "id": "NetworkEndpoint", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional metadata defined as annotations on the network endpoint.", - "type": "object" - }, - "clientDestinationPort": { - "description": "Represents the port number to which PSC consumer sends packets.\n\nOptional. Only valid for network endpoint groups created withGCE_VM_IP_PORTMAP endpoint type.", - "format": "int32", - "type": "integer" - }, - "fqdn": { - "description": "Optional fully qualified domain name of network endpoint. This can only be\nspecified when NetworkEndpointGroup.network_endpoint_type isNON_GCP_FQDN_PORT.", - "type": "string" - }, - "instance": { - "description": "The name or a URL of VM instance of this network endpoint.\nOptional, the field presence depends on the network endpoint type. The\nfield is required for network endpoints of type GCE_VM_IP andGCE_VM_IP_PORT.\n\nThe instance must be in the same zone of network endpoint group (for zonal\nNEGs) or in the zone within the region of the NEG (for regional NEGs).\nIf the ipAddress is specified, it must belongs to the VM\ninstance.\n\nThe name must be 1-63 characters long, and comply withRFC1035\nor be a valid URL pointing to an existing instance.", - "type": "string" - }, - "ipAddress": { - "description": "Optional IPv4 address of network endpoint. The IP address must belong to a\nVM in Compute Engine (either the primary IP or as part of an aliased IP\nrange). If the IP address is not specified, then the primary IP address for\nthe VM instance in the network that the network endpoint group belongs to\nwill be used.\n\nThis field is redundant and need not be set for network endpoints of typeGCE_VM_IP. If set, it must be set to the primary internal IP\naddress of the attached VM instance that matches the subnetwork of the NEG.\nThe primary internal IP address from any NIC of a multi-NIC VM instance can\nbe added to a NEG as long as it matches the NEG subnetwork.", - "type": "string" - }, - "ipv6Address": { - "description": "Optional IPv6 address of network endpoint.", - "type": "string" - }, - "port": { - "description": "Optional port number of network endpoint. If not specified, the\ndefaultPort for the network endpoint group will be used.\n\nThis field can not be set for network endpoints of typeGCE_VM_IP.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.\n\nA network endpoint group (NEG) defines how a set of endpoints should be\nreached, whether they are reachable, and where they are located.\nFor more information about using NEGs for different use cases, seeNetwork endpoint groups overview.", - "id": "NetworkEndpointGroup", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Metadata defined as annotations on the network endpoint group.", - "type": "object" - }, - "appEngine": { - "$ref": "NetworkEndpointGroupAppEngine", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "cloudFunction": { - "$ref": "NetworkEndpointGroupCloudFunction", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "cloudRun": { - "$ref": "NetworkEndpointGroupCloudRun", - "description": "Optional. Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine or cloudFunction may be set." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultPort": { - "description": "The default port used if the port number is not specified in the network\nendpoint.\n\nOptional. If the network endpoint type is either GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this\nfield must not be specified.", - "format": "int32", - "type": "integer" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkEndpointGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#networkEndpointGroup for network endpoint group.", - "type": "string" - }, - "loadBalancer": { - "$ref": "NetworkEndpointGroupLbNetworkEndpointGroup", - "deprecated": true, - "description": "This field is only valid when the network endpoint group is used for load\nbalancing.\n[Deprecated] This field is deprecated." - }, - "name": { - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "type": "string" - }, - "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong.\nUses default project network if unspecified.", - "type": "string" - }, - "networkEndpointType": { - "description": "Type of network endpoints in this network endpoint group. Can be one ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT,INTERNET_IP_PORT, SERVERLESS,PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP.", - "enum": [ - "GCE_VM_IP", - "GCE_VM_IP_PORT", - "GCE_VM_IP_PORTMAP", - "INTERNET_FQDN_PORT", - "INTERNET_IP_PORT", - "NON_GCP_PRIVATE_IP_PORT", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS" - ], - "enumDescriptions": [ - "The network endpoint is represented by an IP address.", - "The network endpoint is represented by IP address and port pair.", - "The network endpoint is represented by an IP, Port and Client Destination\nPort.", - "The network endpoint is represented by fully qualified domain name and\nport.", - "The network endpoint is represented by an internet IP address and port.", - "The network endpoint is represented by an IP address and port. The\nendpoint belongs to a VM or pod running in a customer's on-premises.", - "The network endpoint is either public Google APIs or\nservices exposed by other GCP Project with a Service Attachment.\nThe connection is set up by private service connect", - "The network endpoint is handled by specified serverless infrastructure." - ], - "type": "string" - }, - "pscData": { - "$ref": "NetworkEndpointGroupPscData", - "description": "Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT." - }, - "pscTargetService": { - "description": "The target service url used to set up private service connection to\na Google API or a PSC Producer Service Attachment.\nAn example value is: asia-northeast3-cloudkms.googleapis.com.\n\nOptional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT.", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of theregion\nwhere the network endpoint group is located.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "serverlessDeployment": { - "$ref": "NetworkEndpointGroupServerlessDeployment", - "description": "Only valid when networkEndpointType isSERVERLESS. Only one of cloudRun,appEngine, cloudFunction orserverlessDeployment may be set." - }, - "size": { - "description": "[Output only] Number of network endpoints in the network endpoint group.", - "format": "int32", - "type": "integer" - }, - "subnetwork": { - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG\nbelong.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of thezone\nwhere the network endpoint group is located.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupAggregatedList": { - "id": "NetworkEndpointGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkEndpointGroupsScopedList", - "description": "The name of the scope that contains this set of network endpoint groups." - }, - "description": "A list of NetworkEndpointGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkEndpointGroupAggregatedList", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupAggregatedList for aggregated\nlists of network endpoint groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupAppEngine": { - "description": "Configuration for an App Engine network endpoint group (NEG).\nThe service is optional, may be provided explicitly or in the\nURL mask. The version is optional and can only be provided\nexplicitly or in the URL mask when service is present.\n\nNote: App Engine service must be in the same project and located in the\nsame region as the Serverless NEG.", - "id": "NetworkEndpointGroupAppEngine", - "properties": { - "service": { - "description": "Optional serving service.\n\nThe service name is case-sensitive and must be 1-63\ncharacters long.\n\nExample value: default, my-service.", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse service and version fields\nfrom a request URL. URL mask allows for routing to multiple App Engine\nservices without having to create multiple Network Endpoint Groups and\nbackend services.\n\nFor example, the request URLsfoo1-dot-appname.appspot.com/v1 andfoo1-dot-appname.appspot.com/v2 can be backed by the same\nServerless NEG with URL mask\u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e.\nThe URL mask will parse them to { service = \"foo1\", version = \"v1\"\n} and { service = \"foo1\", version = \"v2\" }\nrespectively.", - "type": "string" - }, - "version": { - "description": "Optional serving version.\n\nThe version name is case-sensitive and must be 1-100\ncharacters long.\n\nExample value: v1, v2.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupCloudFunction": { - "description": "Configuration for a Cloud Function network endpoint group (NEG).\nThe function must be provided explicitly or in the URL mask.\n\nNote: Cloud Function must be in the same project and located in the same\nregion as the Serverless NEG.", - "id": "NetworkEndpointGroupCloudFunction", - "properties": { - "function": { - "description": "A user-defined name of the Cloud Function.\n\nThe function name is case-sensitive and must be 1-63\ncharacters long.\n\nExample value: func1.", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse function field from a request URL. URL\nmask allows for routing to multiple Cloud Functions without having to\ncreate multiple Network Endpoint Groups and backend services.\n\nFor example, request URLs mydomain.com/function1 andmydomain.com/function2 can be backed by the same\nServerless NEG with URL mask /\u003cfunction\u003e. The URL\nmask will parse them to { function = \"function1\" } and{ function = \"function2\" } respectively.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupCloudRun": { - "description": "Configuration for a Cloud Run network endpoint group (NEG).\nThe service must be provided explicitly or in the URL mask.\nThe tag is optional, may be provided explicitly or in the URL\nmask.\n\nNote: Cloud Run service must be in the same project and located in the same\nregion as the Serverless NEG.", - "id": "NetworkEndpointGroupCloudRun", - "properties": { - "service": { - "description": "Cloud Run service is the main resource of Cloud Run.\n\nThe service must be 1-63 characters long, and comply withRFC1035.\n\nExample value: \"run-service\".", - "type": "string" - }, - "tag": { - "description": "Optional Cloud Run tag represents the \"named-revision\" to provide additional\nfine-grained traffic routing information.\n\nThe tag must be 1-63 characters long, and comply withRFC1035.\n\nExample value: \"revision-0010\".", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse \u003cservice\u003e and\u003ctag\u003e fields from a request URL. URL mask allows for\nrouting to multiple Run services without having to create multiple\nnetwork endpoint groups and backend services.\n\nFor example, request URLs foo1.domain.com/bar1 andfoo1.domain.com/bar2 can be backed by the same Serverless\nNetwork Endpoint Group (NEG) with URL mask\u003ctag\u003e.domain.com/\u003cservice\u003e. The URL mask will\nparse them to { service=\"bar1\", tag=\"foo1\" } and {\nservice=\"bar2\", tag=\"foo2\" } respectively.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupLbNetworkEndpointGroup": { - "description": "Load balancing specific fields for network endpoint group.", - "id": "NetworkEndpointGroupLbNetworkEndpointGroup", - "properties": { - "defaultPort": { - "deprecated": true, - "description": "The default port used if the port number is not specified in the network\nendpoint.\n\nIf the network endpoint type is either GCE_VM_IP,SERVERLESS or PRIVATE_SERVICE_CONNECT, this\nfield must not be specified.\n[Deprecated] This field is deprecated.", - "format": "int32", - "type": "integer" - }, - "network": { - "deprecated": true, - "description": "The URL of the network to which all network endpoints in the NEG belong.\nUses default project network if unspecified.\n[Deprecated] This field is deprecated.", - "type": "string" - }, - "subnetwork": { - "deprecated": true, - "description": "Optional URL of the subnetwork to which all network endpoints in the NEG\nbelong.\n[Deprecated] This field is deprecated.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "[Output Only] The URL of thezone\nwhere the network endpoint group is located.\n[Deprecated] This field is deprecated.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupList": { - "id": "NetworkEndpointGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkEndpointGroup resources.", - "items": { - "$ref": "NetworkEndpointGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkEndpointGroupList", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupList for network endpoint group\nlists.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupPscData": { - "description": "All data that is specifically relevant to only network endpoint groups of\ntype PRIVATE_SERVICE_CONNECT.", - "id": "NetworkEndpointGroupPscData", - "properties": { - "consumerPscAddress": { - "description": "[Output Only] Address allocated from given subnetwork for PSC. This IP\naddress acts as a VIP for a PSC NEG, allowing it to act as an endpoint in\nL7 PSC-XLB.", - "type": "string" - }, - "producerPort": { - "description": "The psc producer port is used to connect PSC NEG with specific port on\nthe PSC Producer side; should only be used for the\nPRIVATE_SERVICE_CONNECT NEG type", - "format": "int32", - "type": "integer" - }, - "pscConnectionId": { - "description": "[Output Only] The PSC connection id of the PSC Network Endpoint Group\nConsumer.", - "format": "uint64", - "type": "string" - }, - "pscConnectionStatus": { - "description": "[Output Only] The connection status of the PSC Forwarding Rule.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer and will not serve\ntraffic going forward.", - "The connection has been accepted by the producer, but the producer\nneeds to take further action before the forwarding rule can serve\ntraffic.", - "The connection is pending acceptance by the producer.", - "The connection has been rejected by the producer.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupServerlessDeployment": { - "description": "Configuration for a serverless network endpoint group (NEG). Theplatform must be provided.\n\nNote: The target backend service must be in the same project and located in\nthe same region as the Serverless NEG.", - "id": "NetworkEndpointGroupServerlessDeployment", - "properties": { - "platform": { - "description": "The platform of the backend target(s) of this NEG.\nThe only supported value is\nAPI Gateway: apigateway.googleapis.com.", - "type": "string" - }, - "resource": { - "description": "The user-defined name of the workload/instance. This value must be\nprovided explicitly or in the urlMask. The resource\nidentified by this value is platform-specific and is as follows:\n\n \n \n 1. API Gateway: The gateway ID\n 2. App Engine: The service name\n 3. Cloud Functions: The function name\n 4. Cloud Run: The service name", - "type": "string" - }, - "urlMask": { - "description": "An URL\nmask is one of the main components of the Cloud Function.\n\nA template to parse platform-specific fields from a request URL. URL mask\nallows for routing to multiple resources on the same serverless platform\nwithout having to create multiple Network Endpoint Groups and backend\nresources. The fields parsed by this template are platform-specific and\nare as follows:\n\n \n \n 1. API Gateway: The gateway ID\n 2. App Engine: The service and version\n 3. Cloud Functions: The function name\n 4. Cloud Run: The service and tag", - "type": "string" - }, - "version": { - "description": "The optional resource version. The version identified by this value is\nplatform-specific and is follows:\n\n \n \n 1. API Gateway: Unused\n 2. App Engine: The service version\n 3. Cloud Functions: Unused\n 4. Cloud Run: The service tag", - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsAttachEndpointsRequest": { - "id": "NetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsDetachEndpointsRequest": { - "id": "NetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListEndpointsRequest": { - "id": "NetworkEndpointGroupsListEndpointsRequest", - "properties": { - "endpointFilters": { - "description": "Optional list of endpoints to query.\nThis is a more efficient but also limited version of filter parameter.\nEndpoints in the filter must have ip_address and port fields populated,\nother fields are not supported.", - "items": { - "$ref": "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter" - }, - "type": "array" - }, - "healthStatus": { - "description": "Optional query parameter for showing the health status of each network\nendpoint. Valid options are SKIP or SHOW. If you\ndon't specify this parameter, the health status of network endpoints will\nnot be provided.", - "enum": [ - "SHOW", - "SKIP" - ], - "enumDescriptions": [ - "Show the health status for each network endpoint. Impacts latency of the\ncall.", - "Health status for network endpoints will not be provided." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter": { - "id": "NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter", - "properties": { - "networkEndpoint": { - "$ref": "NetworkEndpoint" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsListNetworkEndpoints": { - "id": "NetworkEndpointGroupsListNetworkEndpoints", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkEndpointWithHealthStatus resources.", - "items": { - "$ref": "NetworkEndpointWithHealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkEndpointGroupsListNetworkEndpoints", - "description": "[Output Only] The resource type, which is alwayscompute#networkEndpointGroupsListNetworkEndpoints for the list\nof network endpoints in the specified network endpoint group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsScopedList": { - "id": "NetworkEndpointGroupsScopedList", - "properties": { - "networkEndpointGroups": { - "description": "[Output Only] The list ofnetwork\nendpoint groups that are contained in this scope.", - "items": { - "$ref": "NetworkEndpointGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of network\nendpoint groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointWithHealthStatus": { - "id": "NetworkEndpointWithHealthStatus", - "properties": { - "healths": { - "description": "[Output only] The health status of network endpoint.\n\nOptional. Displayed only if the network endpoint has centralized health\nchecking configured.", - "items": { - "$ref": "HealthStatusForNetworkEndpoint" - }, - "type": "array" - }, - "networkEndpoint": { - "$ref": "NetworkEndpoint", - "description": "[Output only] The network endpoint." - } - }, - "type": "object" - }, - "NetworkFirewallPolicyAggregatedList": { - "id": "NetworkFirewallPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "FirewallPoliciesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of FirewallPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkFirewallPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkFirewallPoliciesAggregatedList for lists of\nnetwork firewall policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkInterface": { - "description": "A network interface resource attached to an instance.", - "id": "NetworkInterface", - "properties": { - "accessConfigs": { - "description": "An array of configurations for this interface. Currently, only one access\nconfig, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have\nno external internet access.", - "items": { - "$ref": "AccessConfig" - }, - "type": "array" - }, - "aliasIpRanges": { - "description": "An array of alias IP ranges for this network interface.\nYou can only specify this field for network interfaces in VPC networks.", - "items": { - "$ref": "AliasIpRange" - }, - "type": "array" - }, - "fingerprint": { - "description": "Fingerprint hash of contents stored in this network interface.\nThis field will be ignored when inserting an Instance or\nadding a NetworkInterface. An up-to-date\nfingerprint must be provided in order to update theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.", - "format": "byte", - "type": "string" - }, - "igmpQuery": { - "description": "Indicate whether igmp query is enabled on the network interface\nor not. If enabled, also indicates the version of IGMP supported.", - "enum": [ - "IGMP_QUERY_DISABLED", - "IGMP_QUERY_V2" - ], - "enumDescriptions": [ - "The network interface has disabled IGMP query.", - "The network interface has enabled IGMP query - v2." - ], - "type": "string" - }, - "internalIpv6PrefixLength": { - "description": "The prefix length of the primary internal IPv6 range.", - "format": "int32", - "type": "integer" - }, - "ipv6AccessConfigs": { - "description": "An array of IPv6 access configurations for this interface. Currently, only\none IPv6 access config, DIRECT_IPV6, is supported. If there\nis no ipv6AccessConfig specified, then this instance will\nhave no external IPv6 Internet access.", - "items": { - "$ref": "AccessConfig" - }, - "type": "array" - }, - "ipv6AccessType": { - "description": "[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be\naccessed from the Internet. This field is always inherited from its\nsubnetwork.\n\nValid only if stackType is IPV4_IPV6.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "This network interface can have external IPv6.", - "This network interface can have internal IPv6." - ], - "type": "string" - }, - "ipv6Address": { - "description": "An IPv6 internal network address for this network interface. To\nuse a static internal IP address, it must be unused and in the same region\nas the instance's zone. If not specified, Google Cloud will automatically\nassign an internal IPv6 address from the instance's subnetwork.", - "type": "string" - }, - "kind": { - "default": "compute#networkInterface", - "description": "[Output Only] Type of the resource. Alwayscompute#networkInterface for network interfaces.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the network interface, which is generated by the\nserver. For a VM, the network interface uses the nicN naming\nformat. Where N is a value between 0 and7. The default interface value is nic0.", - "type": "string" - }, - "network": { - "description": "URL of the VPC network resource for this instance. When creating an\ninstance, if neither the network nor the subnetwork is specified, the\ndefault network global/networks/default is used. If the\nselected project doesn't have the default network, you must specify a\nnetwork or subnet. If the network is not specified but the subnetwork is\nspecified, the network is inferred.\n\nIf you specify this property, you can specify the network as\na full or partial URL. For example, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/networks/network\n - projects/project/global/networks/network\n - global/networks/default", - "type": "string" - }, - "networkAttachment": { - "description": "The URL of the network attachment that this interface should connect\nto in the following format:\nprojects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.", - "type": "string" - }, - "networkIP": { - "description": "An IPv4 internal IP address to assign to the instance for this network\ninterface. If not specified by the user, an unused internal IP is\nassigned by the system.", - "type": "string" - }, - "nicType": { - "description": "The type of vNIC to be used on this interface. This may be gVNIC or\nVirtioNet.", - "enum": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "UNSPECIFIED_NIC_TYPE", - "VIRTIO_NET" - ], - "enumDescriptions": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "No type specified.", - "VIRTIO" - ], - "type": "string" - }, - "parentNicName": { - "description": "Name of the parent network interface of a dynamic network interface.", - "type": "string" - }, - "queueCount": { - "description": "The networking queue count that's specified by users for the network\ninterface. Both Rx and Tx queues will be set to this number. It'll be empty\nif not specified by the users.", - "format": "int32", - "type": "integer" - }, - "stackType": { - "description": "The stack type for this network interface. To assign only IPv4 addresses,\nuse IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_IPV6. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at instance creation and update network\ninterface operations.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "The network interface can have both IPv4 and IPv6 addresses.", - "The network interface will only be assigned IPv4 addresses.", - "The network interface will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "subnetwork": { - "description": "The URL of the Subnetwork resource for this instance. If the network\nresource is inlegacy\nmode, do not specify this field. If the network is in auto subnet\nmode, specifying the subnetwork is optional. If the network is in custom\nsubnet mode, specifying the subnetwork is required. If you specify this\nfield, you can specify the subnetwork as a full or partial URL. For\nexample, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n - regions/region/subnetworks/subnetwork", - "type": "string" - }, - "vlan": { - "description": "VLAN tag of a dynamic network interface, must be an integer in the range\nfrom 2 to 255 inclusively.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NetworkList": { - "description": "Contains a list of networks.", - "id": "NetworkList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Network resources.", - "items": { - "$ref": "Network" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkList", - "description": "[Output Only] Type of resource. Always compute#networkList for\nlists of networks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkParams": { - "description": "Additional network parameters.", - "id": "NetworkParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "NetworkPeering": { - "description": "A network peering attached to a network resource. The message includes the\npeering name, peer network, peering state, and a flag indicating whether\nGoogle Compute Engine should automatically create routes for the peering.", - "id": "NetworkPeering", - "properties": { - "autoCreateRoutes": { - "description": "This field will be deprecated soon. Use theexchange_subnet_routes field instead.\nIndicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "connectionStatus": { - "$ref": "NetworkPeeringConnectionStatus", - "description": "[Output Only] The effective state of the peering connection\nas a whole." - }, - "exchangeSubnetRoutes": { - "description": "Indicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "exportCustomRoutes": { - "description": "Whether to export the custom routes to peer network. The default value is\nfalse.", - "type": "boolean" - }, - "exportSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are exported. The default value\nis true, all subnet routes are exported.IPv4\nspecial-use ranges are always\nexported to peers and are not controlled by this field.", - "type": "boolean" - }, - "importCustomRoutes": { - "description": "Whether to import the custom routes from peer network. The default value is\nfalse.", - "type": "boolean" - }, - "importSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are imported. The default value\nis false.IPv4\nspecial-use ranges are always\nimported from peers and are not controlled by this field.", - "type": "boolean" - }, - "name": { - "description": "Name of this peering. Provided by the client when the peering is created.\nThe name must comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all the following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "type": "string" - }, - "network": { - "description": "The URL of the peer network. It can be either full URL or partial URL. The\npeer network may belong to a different project. If the partial URL does not\ncontain project, it is assumed that the peer network is in the same project\nas the current network.", - "type": "string" - }, - "peerMtu": { - "description": "[Output Only] Maximum Transmission Unit in bytes of the peer network.", - "format": "int32", - "type": "integer" - }, - "stackType": { - "description": "Which IP version(s) of traffic and routes are allowed to be imported or\nexported between peer networks. The default value is IPV4_ONLY.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "This Peering will allow IPv4 traffic and routes to be\nexchanged. Additionally if the matching peering is\nIPV4_IPV6, IPv6 traffic and routes will be exchanged as\nwell.", - "This Peering will only allow IPv4 traffic and routes to be\nexchanged, even if the matching peering is IPV4_IPV6." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The\npeering is `ACTIVE` when there's a matching configuration in the peer\nnetwork.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "Matching configuration exists on the peer.", - "There is no matching configuration on the peer, including the case when\npeer does not exist." - ], - "type": "string" - }, - "stateDetails": { - "description": "[Output Only] Details about the current state of the peering.", - "type": "string" - }, - "updateStrategy": { - "description": "The update strategy determines the semantics for updates and deletes to the\npeering connection configuration.", - "enum": [ - "CONSENSUS", - "INDEPENDENT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Updates are reflected in the local peering but aren't applied to the\npeering connection until a complementary change is made to the\nmatching peering.\nTo delete a peering with the consensus update strategy, both the peerings\nmust request the deletion of the peering before the peering can be\ndeleted.", - "In this mode, changes to the peering configuration can\nbe unilaterally altered by changing either side of the peering.\nThis is the default value if the field is unspecified.", - "Peerings with update strategy UNSPECIFIED are created with\nupdate strategy INDEPENDENT." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatus": { - "description": "[Output Only] Describes the state of a peering connection, not just the\nlocal peering. This field provides information about the effective settings\nfor the connection as a whole, including pending delete/update requests for\nCONSENSUS peerings.", - "id": "NetworkPeeringConnectionStatus", - "properties": { - "consensusState": { - "$ref": "NetworkPeeringConnectionStatusConsensusState", - "description": "The consensus state contains information about the status of update\nand delete for a consensus peering connection." - }, - "trafficConfiguration": { - "$ref": "NetworkPeeringConnectionStatusTrafficConfiguration", - "description": "The active connectivity settings for the peering connection based on the\nsettings of the network peerings." - }, - "updateStrategy": { - "description": "The update strategy determines the update/delete semantics for this\npeering connection.", - "enum": [ - "CONSENSUS", - "INDEPENDENT", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Updates are reflected in the local peering but aren't applied to the\npeering connection until a complementary change is made to the\nmatching peering.\nTo delete a peering with the consensus update strategy, both the peerings\nmust request the deletion of the peering before the peering can be\ndeleted.", - "In this mode, changes to the peering configuration can\nbe unilaterally altered by changing either side of the peering.\nThis is the default value if the field is unspecified.", - "Peerings with update strategy UNSPECIFIED are created with\nupdate strategy INDEPENDENT." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatusConsensusState": { - "description": "The status of update/delete for a consensus peering connection. Only set\nwhen connection_status.update_strategy isCONSENSUS or a network peering is proposing to update the\nstrategy to CONSENSUS.", - "id": "NetworkPeeringConnectionStatusConsensusState", - "properties": { - "deleteStatus": { - "description": "The status of the delete request.", - "enum": [ - "DELETE_ACKNOWLEDGED", - "DELETE_STATUS_UNSPECIFIED", - "LOCAL_DELETE_REQUESTED", - "PEER_DELETE_REQUESTED" - ], - "enumDescriptions": [ - "Both network admins have agreed this consensus peering connection can\nbe deleted.", - "", - "Network admin has requested deletion of this peering connection.", - "The peer network admin has requested deletion of this peering\nconnection." - ], - "type": "string" - }, - "updateStatus": { - "description": "The status of the update request.", - "enum": [ - "IN_SYNC", - "PENDING_LOCAL_ACKNOWLEDMENT", - "PENDING_PEER_ACKNOWLEDGEMENT", - "UPDATE_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "No pending configuration update proposals to the peering connection.", - "The peer network admin has made an updatePeering call. The change is\nawaiting acknowledgment from this peering's network admin.", - "The local network admin has made an updatePeering call. The change\nis awaiting acknowledgment from the peer network admin.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPeeringConnectionStatusTrafficConfiguration": { - "id": "NetworkPeeringConnectionStatusTrafficConfiguration", - "properties": { - "exportCustomRoutesToPeer": { - "description": "Whether custom routes are being exported to the peer network.", - "type": "boolean" - }, - "exportSubnetRoutesWithPublicIpToPeer": { - "description": "Whether subnet routes with public IP ranges are being exported to the\npeer network.", - "type": "boolean" - }, - "importCustomRoutesFromPeer": { - "description": "Whether custom routes are being imported from the peer network.", - "type": "boolean" - }, - "importSubnetRoutesWithPublicIpFromPeer": { - "description": "Whether subnet routes with public IP ranges are being imported\nfrom the peer network.", - "type": "boolean" - }, - "stackType": { - "description": "Which IP version(s) of traffic and routes are being imported or\nexported between peer networks.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "This Peering will allow IPv4 traffic and routes to be\nexchanged. Additionally if the matching peering is\nIPV4_IPV6, IPv6 traffic and routes will be exchanged as\nwell.", - "This Peering will only allow IPv4 traffic and routes to be\nexchanged, even if the matching peering is IPV4_IPV6." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPerformanceConfig": { - "id": "NetworkPerformanceConfig", - "properties": { - "totalEgressBandwidthTier": { - "enum": [ - "DEFAULT", - "TIER_1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPoliciesScopedList": { - "id": "NetworkPoliciesScopedList", - "properties": { - "networkPolicies": { - "description": "A list of network policies contained in this scope.", - "items": { - "$ref": "NetworkPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of network policies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicy": { - "description": "Represents a Network Policy resource.", - "id": "NetworkPolicy", - "properties": { - "associations": { - "description": "[Output Only] A list of associations that belong to this network policy.", - "items": { - "$ref": "NetworkPolicyAssociation" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#networkPolicy for network policies", - "type": "string" - }, - "name": { - "description": "Name of the resource.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional network policy resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Total count of all network policy rule tuples. A network\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "trafficClassificationRules": { - "description": "[Output Only] A list of traffic classification rules that belong to this\npolicy.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyAggregatedList": { - "id": "NetworkPolicyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NetworkPoliciesScopedList", - "description": "Name of the scope containing this set of addresses." - }, - "description": "A list of NetworkPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#networkPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#networkPolicyAggregatedList for lists of\nnetwork policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicyAssociation": { - "id": "NetworkPolicyAssociation", - "properties": { - "attachmentTarget": { - "description": "The target that the network policy is attached to.", - "type": "string" - }, - "name": { - "description": "The name for an association.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicyList": { - "id": "NetworkPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkPolicy resources.", - "items": { - "$ref": "NetworkPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#networkPolicyList for lists of network policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRule": { - "description": "Represents a traffic classification rule that describes one or more match\nconditions along with the action to be taken when traffic matches this\ncondition.", - "id": "NetworkPolicyTrafficClassificationRule", - "properties": { - "action": { - "$ref": "NetworkPolicyTrafficClassificationRuleAction", - "description": "The Action to perform when the client connection triggers the rule." - }, - "description": { - "description": "An optional description for this resource.", - "type": "string" - }, - "disabled": { - "description": "Denotes whether the network policy rule is disabled. When set to true,\nthe network policy rule is not enforced and traffic behaves as if it did\nnot exist. If this is unspecified, the network policy rule will be\nenabled.", - "type": "boolean" - }, - "kind": { - "default": "compute#networkPolicyTrafficClassificationRule", - "description": "[Output only] Type of the resource. Alwayscompute#networkPolicyTrafficClassificationRule for network\npolicy traffic classification rules", - "type": "string" - }, - "match": { - "$ref": "NetworkPolicyTrafficClassificationRuleMatcher", - "description": "A match condition that outgoing traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 1 and 2147482647.\nThe priority values from 2147482648 to 2147483647 (1000) are reserved for\nsystem default network policy rules. Rules are evaluated from highest to\nlowest priority where 1 is the highest priority and 2147483647 is the\nlowest priority.", - "format": "int32", - "type": "integer" - }, - "ruleName": { - "description": "An optional name for the rule. This field is not a unique identifier\nand can be updated.", - "type": "string" - }, - "ruleTupleCount": { - "description": "[Output Only] Calculation of the complexity of a single network policy\nrule.", - "format": "int32", - "type": "integer" - }, - "targetSecureTags": { - "description": "A list of secure tags that controls which instances the traffic\nclassification rule applies to. If targetSecureTag are\nspecified, then the traffic classification rule applies only to instances\nin the VPC network that have one of those EFFECTIVE secure tags, if all\nthe targetSecureTag are in INEFFECTIVE state, then this rule\nwill be ignored. targetSecureTag may not be set at the same\ntime as targetServiceAccounts. If neithertargetServiceAccounts nor targetSecureTag are\nspecified, the traffic classification rule applies to all instances on\nthe specified network. Maximum number of target label tags allowed is\n256.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRuleSecureTag" - }, - "type": "array" - }, - "targetServiceAccounts": { - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleAction": { - "id": "NetworkPolicyTrafficClassificationRuleAction", - "properties": { - "dscpMode": { - "description": "DSCP mode. When set to AUTO, the DSCP value will be picked\nautomatically based on selected trafficClass. Otherwise,dscpValue needs to be explicitly specified.", - "enum": [ - "AUTO", - "CUSTOM" - ], - "enumDescriptions": [ - "DSCP value will be automatically picked up based on configured\ntraffic_class.", - "Allows to specify custom DSCP value from selected traffic_class\nrange." - ], - "type": "string" - }, - "dscpValue": { - "description": "Custom DSCP value from 0-63 range.", - "format": "int32", - "type": "integer" - }, - "trafficClass": { - "description": "The traffic class that should be applied to the matching packet.", - "enum": [ - "TC1", - "TC2", - "TC3", - "TC4", - "TC5", - "TC6" - ], - "enumDescriptions": [ - "Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx.", - "Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx.", - "Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx.", - "Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx.", - "Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx.", - "Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx." - ], - "type": "string" - }, - "type": { - "description": "Always \"apply_traffic_classification\" for traffic classification rules.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "NetworkPolicyTrafficClassificationRuleMatcher", - "properties": { - "destIpRanges": { - "description": "CIDR IP address range.\nMaximum number of destination CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - }, - "layer4Configs": { - "description": "Pairs of IP protocols and ports that the rule should match.", - "items": { - "$ref": "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of source CIDR IP ranges allowed is 5000.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config": { - "id": "NetworkPolicyTrafficClassificationRuleMatcherLayer4Config", - "properties": { - "ipProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a traffic classification rule. This value can\neither be one of the following well known protocol strings\n(tcp, udp, icmp,esp, ah, ipip,sctp), or the IP protocol number.", - "type": "string" - }, - "ports": { - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP, TCP or SCTP protocol. Each entry must be\neither an integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkPolicyTrafficClassificationRuleSecureTag": { - "id": "NetworkPolicyTrafficClassificationRuleSecureTag", - "properties": { - "name": { - "description": "Name of the secure tag, created with TagManager's TagValue API.", - "pattern": "tagValues/[0-9]+", - "type": "string" - }, - "state": { - "description": "[Output Only] State of the secure tag, either `EFFECTIVE` or\n`INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted\nor its network is deleted.", - "enum": [ - "EFFECTIVE", - "INEFFECTIVE", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfile": { - "description": "NetworkProfile represents a Google managed network profile resource.", - "id": "NetworkProfile", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "features": { - "$ref": "NetworkProfileNetworkFeatures", - "description": "[Output Only] Features supported by the network." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#networkProfile", - "description": "[Output Only] Type of the resource. Alwayscompute#networkProfile for network profiles.", - "type": "string" - }, - "location": { - "$ref": "NetworkProfileLocation", - "description": "[Output Only] Location to which the network is restricted." - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "profileType": { - "$ref": "NetworkProfileProfileType", - "description": "[Output Only] Type of the network profile." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileLocation": { - "id": "NetworkProfileLocation", - "properties": { - "name": { - "type": "string" - }, - "scope": { - "enum": [ - "REGION", - "ZONE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileNetworkFeatures": { - "id": "NetworkProfileNetworkFeatures", - "properties": { - "addressPurposes": { - "description": "Specifies what address purposes are supported. If empty, all address\npurposes are supported.", - "items": { - "enum": [ - "DNS_RESOLVER", - "GCE_ENDPOINT", - "IPSEC_INTERCONNECT", - "NAT_AUTO", - "PRIVATE_SERVICE_CONNECT", - "SERVERLESS", - "SHARED_LOADBALANCER_VIP", - "VPC_PEERING" - ], - "enumDescriptions": [ - "DNS resolver address in the subnetwork.", - "VM internal/alias IP, Internal LB service IP, etc.", - "A regional internal IP address range reserved for the VLAN attachment\nthat is used in HA VPN over Cloud Interconnect. This regional\ninternal IP address range must not overlap with any IP address range\nof subnet/route in the VPC network and its peering networks. After the\nVLAN attachment is created with the reserved IP address range, when\ncreating a new VPN gateway, its interface IP address is allocated\nfrom the associated VLAN attachment’s IP address range.", - "External IP automatically reserved for Cloud NAT.", - "A private network IP address that can be used to configure Private\nService Connect. This purpose can be specified only forGLOBAL addresses of Type INTERNAL", - "A regional internal IP address range reserved for Serverless.", - "A private network IP address that can be shared by multiple Internal\nLoad Balancer forwarding rules.", - "IP range for peer networks." - ], - "type": "string" - }, - "type": "array" - }, - "allowAliasIpRanges": { - "description": "Specifies whether alias IP ranges (and secondary address ranges) are\nallowed.", - "enum": [ - "ALIAS_IP_RANGES_ALLOWED", - "ALIAS_IP_RANGES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowAutoModeSubnet": { - "description": "Specifies whether auto mode subnet creation is allowed.", - "enum": [ - "AUTO_MODE_SUBNET_ALLOWED", - "AUTO_MODE_SUBNET_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowClassDFirewalls": { - "description": "Specifies whether firewalls for Class D address ranges are supported.", - "enum": [ - "CLASS_D_FIREWALLS_ALLOWED", - "CLASS_D_FIREWALLS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowCloudNat": { - "description": "Specifies whether cloud NAT creation is allowed.", - "enum": [ - "CLOUD_NAT_ALLOWED", - "CLOUD_NAT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowCloudRouter": { - "description": "Specifies whether cloud router creation is allowed.", - "enum": [ - "CLOUD_ROUTER_ALLOWED", - "CLOUD_ROUTER_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowDefaultNicAttachment": { - "description": "Specifies whether default NIC attachment is allowed.", - "enum": [ - "DEFAULT_NIC_ATTACHMENT_ALLOWED", - "DEFAULT_NIC_ATTACHMENT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowExternalIpAccess": { - "description": "Specifies whether VMs are allowed to have external IP access on network\ninterfaces connected to this VPC.", - "enum": [ - "EXTERNAL_IP_ACCESS_ALLOWED", - "EXTERNAL_IP_ACCESS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowFirewallPolicy": { - "description": "Specifies whether firewall policy can be attached to the network.", - "enum": [ - "FIREWALL_POLICY_ALLOWED", - "FIREWALL_POLICY_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowInterconnect": { - "description": "Specifies whether Cloud Interconnect creation is allowed.", - "enum": [ - "INTERCONNECT_ALLOWED", - "INTERCONNECT_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowIpForwarding": { - "description": "Specifies whether IP forwarding is allowed.", - "enum": [ - "IP_FORWARDING_ALLOWED", - "IP_FORWARDING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowLoadBalancing": { - "description": "Specifies whether cloud load balancing is allowed.", - "enum": [ - "LOAD_BALANCING_ALLOWED", - "LOAD_BALANCING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowMultiNicInSameNetwork": { - "description": "Specifies whether multi-nic in the same network is allowed.", - "enum": [ - "MULTI_NIC_IN_SAME_NETWORK_ALLOWED", - "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowMulticast": { - "description": "Specifies whether multicast is allowed.", - "enum": [ - "MULTICAST_ALLOWED", - "MULTICAST_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowNcc": { - "description": "Specifies whether NCC is allowed.", - "enum": [ - "NCC_ALLOWED", - "NCC_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowNetworkMigration": { - "description": "Specifies whether VM network migration is allowed.", - "enum": [ - "NETWORK_MIGRATION_ALLOWED", - "NETWORK_MIGRATION_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPacketMirroring": { - "description": "Specifies whether Packet Mirroring 1.0 is supported.", - "enum": [ - "PACKET_MIRRORING_ALLOWED", - "PACKET_MIRRORING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPrivateGoogleAccess": { - "description": "Specifies whether private Google access is allowed.", - "enum": [ - "PRIVATE_GOOGLE_ACCESS_ALLOWED", - "PRIVATE_GOOGLE_ACCESS_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowPsc": { - "description": "Specifies whether PSC creation is allowed.", - "enum": [ - "PSC_ALLOWED", - "PSC_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowSameNetworkUnicast": { - "description": "Specifies whether unicast within the same network is allowed.", - "enum": [ - "SAME_NETWORK_UNICAST_ALLOWED", - "SAME_NETWORK_UNICAST_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowStaticRoutes": { - "description": "Specifies whether static route creation is allowed.", - "enum": [ - "STATIC_ROUTES_ALLOWED", - "STATIC_ROUTES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowSubInterfaces": { - "description": "Specifies whether sub interfaces are allowed.", - "enum": [ - "SUBINTERFACES_ALLOWED", - "SUBINTERFACES_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowVpcPeering": { - "description": "Specifies whether VPC peering is allowed.", - "enum": [ - "VPC_PEERING_ALLOWED", - "VPC_PEERING_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "allowVpn": { - "description": "Specifies whether VPN creation is allowed.", - "enum": [ - "VPN_ALLOWED", - "VPN_BLOCKED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "firewallPolicyTypes": { - "items": { - "enum": [ - "RDMA_ROCE_POLICY", - "VPC_POLICY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "interfaceTypes": { - "description": "If set, limits the interface types that the network supports. If\nempty, all interface types are supported.", - "items": { - "enum": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "UNSPECIFIED_NIC_TYPE", - "VIRTIO_NET" - ], - "enumDescriptions": [ - "GVNIC", - "IDPF", - "IRDMA", - "MRDMA", - "No type specified.", - "VIRTIO" - ], - "type": "string" - }, - "type": "array" - }, - "multicast": { - "description": "Specifies which type of multicast is supported.", - "enum": [ - "MULTICAST_SDN", - "MULTICAST_ULL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "subnetPurposes": { - "description": "Specifies which subnetwork purposes are supported.", - "items": { - "enum": [ - "SUBNET_PURPOSE_CUSTOM_HARDWARE", - "SUBNET_PURPOSE_PRIVATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "subnetStackTypes": { - "description": "Specifies which subnetwork stack types are supported.", - "items": { - "enum": [ - "SUBNET_STACK_TYPE_IPV4_IPV6", - "SUBNET_STACK_TYPE_IPV4_ONLY", - "SUBNET_STACK_TYPE_IPV6_ONLY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "type": "array" - }, - "subnetworkPurposes": { - "description": "Specifies which subnetwork purposes are supported.", - "items": { - "enum": [ - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "type": "array" - }, - "subnetworkStackTypes": { - "description": "Specifies which subnetwork stack types are supported.", - "items": { - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "type": "array" - }, - "unicast": { - "description": "Specifies which type of unicast is supported.", - "enum": [ - "UNICAST_SDN", - "UNICAST_ULL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfileProfileType": { - "id": "NetworkProfileProfileType", - "properties": { - "networkType": { - "enum": [ - "RDMA", - "ULL", - "VPC" - ], - "enumDescriptions": [ - "RDMA network.", - "ULL network.", - "VPC network." - ], - "type": "string" - }, - "rdmaSubtype": { - "enum": [ - "FALCON", - "ROCE" - ], - "enumDescriptions": [ - "RDMA over Falcon.", - "RDMA over Converged Ethernet (RoCE)." - ], - "type": "string" - }, - "ullSubtype": { - "enum": [ - "OPERATOR", - "PARTICIPANT" - ], - "enumDescriptions": [ - "Exchange operator.", - "Exchange participant." - ], - "type": "string" - }, - "vpcSubtype": { - "enum": [ - "REGIONAL" - ], - "enumDescriptions": [ - "Regionally bound VPC network." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkProfilesListResponse": { - "description": "Contains a list of network profiles.", - "id": "NetworkProfilesListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NetworkProfile resources.", - "items": { - "$ref": "NetworkProfile" - }, - "type": "array" - }, - "kind": { - "default": "compute#networkProfileList", - "description": "[Output Only] Type of resource. Alwayscompute#networkProfileList for network profiles.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value\nfor\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken\nto\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkRoutingConfig": { - "description": "A routing configuration attached to a network resource. The message\nincludes the list of routers associated with the network, and a flag\nindicating the type of routing behavior to enforce network-wide.", - "id": "NetworkRoutingConfig", - "properties": { - "bgpAlwaysCompareMed": { - "description": "Enable comparison of Multi-Exit Discriminators (MED) across routes with\ndifferent neighbor ASNs when using the STANDARD BGP best path selection\nalgorithm.", - "type": "boolean" - }, - "bgpBestPathSelectionMode": { - "description": "The BGP best path selection algorithm to be employed within this network\nfor dynamic routes learned by Cloud Routers. Can be LEGACY\n(default) or STANDARD.", - "enum": [ - "LEGACY", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "bgpInterRegionCost": { - "description": "Allows to define a preferred approach for handling inter-region cost in\nthe selection process when using the STANDARD BGP best path\nselection algorithm. Can be DEFAULT orADD_COST_TO_MED.", - "enum": [ - "ADD_COST_TO_MED", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "effectiveBgpAlwaysCompareMed": { - "description": "[Output Only] Effective value of the bgp_always_compare_med\nfield.", - "type": "boolean" - }, - "effectiveBgpInterRegionCost": { - "description": "[Output Only] Effective value of the bgp_inter_region_cost\nfield.", - "enum": [ - "ADD_COST_TO_MED", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL,\nthis network's Cloud Routers will only advertise routes with subnets\nof this network in the same region as the router. If set toGLOBAL, this network's Cloud Routers will advertise\nroutes with all subnets of this network, across regions.", - "enum": [ - "GLOBAL", - "REGIONAL" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworksAddPeeringRequest": { - "id": "NetworksAddPeeringRequest", - "properties": { - "autoCreateRoutes": { - "description": "This field will be deprecated soon. Useexchange_subnet_routes in network_peering\ninstead.\nIndicates whether full mesh connectivity is created and managed\nautomatically between peered networks. Currently this field should always\nbe true since Google Compute Engine will automatically create and manage\nsubnetwork routes between two networks when peering state isACTIVE.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.networks.addPeering" - ] - }, - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - }, - "networkPeering": { - "$ref": "NetworkPeering", - "description": "Network peering parameters.\nIn order to specify route policies for peering using import and export\ncustom routes, you must specify all peering related parameters\n(name, peer network,exchange_subnet_routes) in the network_peering\nfield.\nThe corresponding fields in NetworksAddPeeringRequest will be\ndeprecated soon." - }, - "peerNetwork": { - "description": "URL of the peer network. It can be either full URL or partial URL. The\npeer network may belong to a different project. If the partial URL does not\ncontain project, it is assumed that the peer network is in the same project\nas the current network.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponse": { - "id": "NetworksGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output Only] Effective firewalls from firewall policy. It returns Global\nNetwork Firewall Policies and Hierarchical Firewall Policies. UseregionNetworkFirewallPolicies.getEffectiveFirewalls to get\nRegional Network Firewall Policies as well.", - "items": { - "$ref": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the network.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - }, - "organizationFirewalls": { - "description": "Effective firewalls from organization policies.", - "items": { - "$ref": "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "deprecated": true, - "description": "[Output Only] Deprecated, please use short name instead. The display name\nof the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output Only] The packet mirroring rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output Only] The rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "shortName": { - "description": "[Output Only] The short name of the firewall policy.", - "type": "string" - }, - "type": { - "description": "[Output Only] The type of the firewall policy.", - "enum": [ - "HIERARCHY", - "NETWORK", - "SYSTEM", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy": { - "description": "A pruned SecurityPolicy containing ID and any applicable firewall rules.", - "id": "NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the security policy. This\nidentifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "rules": { - "description": "The rules that apply to the network.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworksRemovePeeringRequest": { - "id": "NetworksRemovePeeringRequest", - "properties": { - "name": { - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksRequestRemovePeeringRequest": { - "id": "NetworksRequestRemovePeeringRequest", - "properties": { - "name": { - "description": "Name of the peering, which should conform to RFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "NetworksUpdatePeeringRequest": { - "id": "NetworksUpdatePeeringRequest", - "properties": { - "networkPeering": { - "$ref": "NetworkPeering" - } - }, - "type": "object" - }, - "NodeGroup": { - "description": "Represents a sole-tenant Node Group resource.\n\nA sole-tenant node is a physical server that is dedicated to\nhosting VM instances only for your specific project. Use sole-tenant nodes to\nkeep your instances physically separated from instances in other projects, or\nto group your instances together on the same host hardware. For more\ninformation, readSole-tenant nodes.", - "id": "NodeGroup", - "properties": { - "autoscalingPolicy": { - "$ref": "NodeGroupAutoscalingPolicy", - "description": "Specifies how autoscaling should behave." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeGroup", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeGroup for node group.", - "type": "string" - }, - "locationHint": { - "description": "An opaque location hint used to place the Node close to other\nresources.\nThis field is for use by internal tools that use the public API.\nThe location hint here on the NodeGroup overrides any location_hint\npresent in the NodeTemplate.", - "type": "string" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted values\nare: `AS_NEEDED` and `RECURRENT`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "maintenancePolicy": { - "description": "Specifies how to handle instances when a node in the group undergoes\nmaintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP.\nThe default value is DEFAULT. For more information, see\nMaintenance policies.", - "enum": [ - "DEFAULT", - "MAINTENANCE_POLICY_UNSPECIFIED", - "MIGRATE_WITHIN_NODE_GROUP", - "RESTART_IN_PLACE" - ], - "enumDescriptions": [ - "Allow the node and corresponding instances to retain default\nmaintenance behavior.", - "", - "When maintenance must be done on a node, the instances on that node will\nbe moved to other nodes in the group.\nInstances with onHostMaintenance = MIGRATE will live migrate to their\ndestinations while instances with onHostMaintenance = TERMINATE will\nterminate and then restart on their destination nodes if\nautomaticRestart = true.", - "Instances in this group will restart on the same node when maintenance\nhas completed. Instances must have onHostMaintenance = TERMINATE, and\nthey will only restart if automaticRestart = true." - ], - "type": "string" - }, - "maintenanceWindow": { - "$ref": "NodeGroupMaintenanceWindow" - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "type": "string" - }, - "nodeTemplate": { - "description": "URL of the node template to create the node group from.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "Share-settings for the node group" - }, - "size": { - "description": "[Output Only] The total number of nodes in the node group.", - "format": "int32", - "type": "integer" - }, - "status": { - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the node group resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupAggregatedList": { - "id": "NodeGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeGroupsScopedList", - "description": "[Output Only] Name of the scope containing this set of node groups." - }, - "description": "A list of NodeGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeGroupAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeGroupAggregatedList for aggregated lists of node\ngroups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupAutoscalingPolicy": { - "id": "NodeGroupAutoscalingPolicy", - "properties": { - "maxNodes": { - "description": "The maximum number of nodes that the group should have. Must be set if\nautoscaling is enabled. Maximum value allowed is 100.", - "format": "int32", - "type": "integer" - }, - "minNodes": { - "description": "The minimum number of nodes that the group should have.", - "format": "int32", - "type": "integer" - }, - "mode": { - "description": "The autoscaling mode. Set to one of: ON, OFF,\nor ONLY_SCALE_OUT. For more information, see \nAutoscaler modes.", - "enum": [ - "MODE_UNSPECIFIED", - "OFF", - "ON", - "ONLY_SCALE_OUT" - ], - "enumDescriptions": [ - "", - "Autoscaling is disabled.", - "Autocaling is fully enabled.", - "Autoscaling will only scale out and will not remove nodes." - ], - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupList": { - "description": "Contains a list of nodeGroups.", - "id": "NodeGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeGroup resources.", - "items": { - "$ref": "NodeGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeGroupList", - "description": "[Output Only] Type of resource.Always compute#nodeGroupList\nfor lists of node groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupMaintenanceWindow": { - "description": "Time window specified for daily maintenance operations. GCE's internal\nmaintenance will be performed within this window.", - "id": "NodeGroupMaintenanceWindow", - "properties": { - "maintenanceDuration": { - "$ref": "Duration", - "description": "[Output only] A predetermined duration for the window, automatically\nchosen to be the smallest possible in the given scenario." - }, - "startTime": { - "description": "Start time of the window. This must be in UTC format that resolves to one\nof 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For\nexample, both 13:00-5 and 08:00 are valid.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupNode": { - "id": "NodeGroupNode", - "properties": { - "accelerators": { - "description": "Accelerators for this node.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "consumedResources": { - "$ref": "InstanceConsumptionInfo", - "description": "Node resources that are reserved by all instances." - }, - "cpuOvercommitType": { - "description": "CPU overcommit.", - "enum": [ - "CPU_OVERCOMMIT_TYPE_UNSPECIFIED", - "ENABLED", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "disks": { - "description": "Local disk configurations.", - "items": { - "$ref": "LocalDisk" - }, - "type": "array" - }, - "instanceConsumptionData": { - "description": "Instance data that shows consumed resources on the node.", - "items": { - "$ref": "InstanceConsumptionData" - }, - "type": "array" - }, - "instances": { - "description": "Instances scheduled on this node.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the node.", - "type": "string" - }, - "nodeType": { - "description": "The type of this node.", - "type": "string" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "serverBinding": { - "$ref": "ServerBinding", - "description": "Binding properties for the physical server." - }, - "serverId": { - "description": "Server ID associated with this node.", - "type": "string" - }, - "status": { - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "REPAIRING" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "totalResources": { - "$ref": "InstanceConsumptionInfo", - "description": "Total amount of available resources on the node." - }, - "upcomingMaintenance": { - "$ref": "UpcomingMaintenance", - "description": "[Output Only] The information about an upcoming maintenance event." - } - }, - "type": "object" - }, - "NodeGroupsAddNodesRequest": { - "id": "NodeGroupsAddNodesRequest", - "properties": { - "additionalNodeCount": { - "description": "Count of additional nodes to be added to the node group.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NodeGroupsDeleteNodesRequest": { - "id": "NodeGroupsDeleteNodesRequest", - "properties": { - "nodes": { - "description": "Names of the nodes to delete.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeGroupsListNodes": { - "id": "NodeGroupsListNodes", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Node resources.", - "items": { - "$ref": "NodeGroupNode" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeGroupsListNodes", - "description": "[Output Only] The resource type, which is alwayscompute.nodeGroupsListNodes for the list of nodes in the\nspecified node group.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupsPerformMaintenanceRequest": { - "id": "NodeGroupsPerformMaintenanceRequest", - "properties": { - "nodes": { - "description": "[Required] List of nodes affected by the call.", - "items": { - "type": "string" - }, - "type": "array" - }, - "startTime": { - "description": "The start time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupsScopedList": { - "id": "NodeGroupsScopedList", - "properties": { - "nodeGroups": { - "description": "[Output Only] A list of node groups contained in this scope.", - "items": { - "$ref": "NodeGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the nodeGroup\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeGroupsSetNodeTemplateRequest": { - "id": "NodeGroupsSetNodeTemplateRequest", - "properties": { - "nodeTemplate": { - "description": "Full or partial URL of the node template resource to be updated for this\nnode group.", - "type": "string" - } - }, - "type": "object" - }, - "NodeGroupsSimulateMaintenanceEventRequest": { - "id": "NodeGroupsSimulateMaintenanceEventRequest", - "properties": { - "nodes": { - "description": "Names of the nodes to go under maintenance simulation.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeTemplate": { - "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For\nmore information, readCreating node groups\nand instances.", - "id": "NodeTemplate", - "properties": { - "accelerators": { - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "cpuOvercommitType": { - "description": "CPU overcommit.", - "enum": [ - "CPU_OVERCOMMIT_TYPE_UNSPECIFIED", - "ENABLED", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "disks": { - "items": { - "$ref": "LocalDisk" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeTemplate", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeTemplate for node templates.", - "type": "string" - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "type": "string" - }, - "nodeAffinityLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to use for node affinity, which will be used in instance scheduling.", - "type": "object" - }, - "nodeType": { - "description": "The node type to use for nodes group that are created from this template.", - "type": "string" - }, - "nodeTypeFlexibility": { - "$ref": "NodeTemplateNodeTypeFlexibility", - "description": "Do not use. Instead, use the node_type property." - }, - "region": { - "description": "[Output Only] The name of the region where the node template resides,\nsuch as us-central1.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "serverBinding": { - "$ref": "ServerBinding", - "description": "Sets the binding properties for the physical server. Valid values include:\n \n - *[Default]* RESTART_NODE_ON_ANY_SERVER:\n Restarts VMs on any available\n physical server\n - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same\n physical server whenever possible\n\n\n\nSee Sole-tenant\nnode options for more information." - }, - "status": { - "description": "[Output Only] The status of the node template. One of the following values:CREATING, READY, and DELETING.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated.", - "The node template is currently being deleted.", - "Invalid status.", - "The node template is ready." - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional, human-readable explanation of the status.", - "type": "string" - } - }, - "type": "object" - }, - "NodeTemplateAggregatedList": { - "id": "NodeTemplateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeTemplatesScopedList", - "description": "[Output Only] Name of the scope containing this set of node templates." - }, - "description": "A list of NodeTemplatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeTemplateAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeTemplateAggregatedList for aggregated lists of\nnode templates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTemplateList": { - "description": "Contains a list of node templates.", - "id": "NodeTemplateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeTemplate resources.", - "items": { - "$ref": "NodeTemplate" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeTemplateList", - "description": "[Output Only] Type of resource.Always compute#nodeTemplateList\nfor lists of node templates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTemplateNodeTypeFlexibility": { - "id": "NodeTemplateNodeTypeFlexibility", - "properties": { - "cpus": { - "type": "string" - }, - "localSsd": { - "type": "string" - }, - "memory": { - "type": "string" - } - }, - "type": "object" - }, - "NodeTemplatesScopedList": { - "id": "NodeTemplatesScopedList", - "properties": { - "nodeTemplates": { - "description": "[Output Only] A list of node templates contained in this scope.", - "items": { - "$ref": "NodeTemplate" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the node templates\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeType": { - "description": "Represent a sole-tenant Node Type resource.\n\nEach node within a node group must have a node type. A node type specifies\nthe total amount of cores and memory for that node. Currently, the only\navailable node type is n1-node-96-624 node type that has 96\nvCPUs and 624 GB of memory, available in multiple zones. For more information\nreadNode types.", - "id": "NodeType", - "properties": { - "cpuPlatform": { - "description": "[Output Only] The CPU platform used by this node type.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this node type." - }, - "description": { - "description": "[Output Only] An optional textual description of the resource.", - "type": "string" - }, - "guestCpus": { - "description": "[Output Only] The number of virtual CPUs that are available to the node\ntype.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#nodeType", - "description": "[Output Only] The type of the resource. Alwayscompute#nodeType for node types.", - "type": "string" - }, - "localSsdGb": { - "description": "[Output Only] Local SSD available to the node type, defined in GB.", - "format": "int32", - "type": "integer" - }, - "maxVms": { - "description": "[Output Only] Maximum number of VMs that can be created for this node type.", - "format": "int32", - "type": "integer" - }, - "memoryMb": { - "description": "[Output Only] The amount of physical memory available to the node type,\ndefined in MB.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "zone": { - "description": "[Output Only] The name of the zone where the node type resides,\nsuch as us-central1-a.", - "type": "string" - } - }, - "type": "object" - }, - "NodeTypeAggregatedList": { - "id": "NodeTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "NodeTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of node types." - }, - "description": "A list of NodeTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#nodeTypeAggregatedList", - "description": "[Output Only] Type of resource.Alwayscompute#nodeTypeAggregatedList for aggregated lists of node\ntypes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTypeList": { - "description": "Contains a list of node types.", - "id": "NodeTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NodeType resources.", - "items": { - "$ref": "NodeType" - }, - "type": "array" - }, - "kind": { - "default": "compute#nodeTypeList", - "description": "[Output Only] Type of resource.Always compute#nodeTypeList for\nlists of node types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NodeTypesScopedList": { - "id": "NodeTypesScopedList", - "properties": { - "nodeTypes": { - "description": "[Output Only] A list of node types contained in this scope.", - "items": { - "$ref": "NodeType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the node types\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NotificationEndpoint": { - "description": "Represents a notification endpoint.\n\nA notification endpoint resource defines an endpoint to receive notifications\nwhen there are status changes detected by the associated health check\nservice.\n\nFor more information, see\nHealth checks overview.", - "id": "NotificationEndpoint", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "grpcSettings": { - "$ref": "NotificationEndpointGrpcSettings", - "description": "Settings of the gRPC notification endpoint including the endpoint URL and\nthe retry duration." - }, - "id": { - "description": "[Output Only] A unique identifier for this resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#notificationEndpoint", - "description": "[Output Only] Type of the resource. Alwayscompute#notificationEndpoint for notification endpoints.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the notification endpoint resides.\nThis field applies only to the regional resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "NotificationEndpointGrpcSettings": { - "description": "Represents a gRPC setting that describes one gRPC notification endpoint and\nthe retry duration attempting to send notification to this endpoint.", - "id": "NotificationEndpointGrpcSettings", - "properties": { - "authority": { - "description": "Optional. If specified, this field is used to set the authority header by\nthe sender of notifications. See\nhttps://tools.ietf.org/html/rfc7540#section-8.1.2.3", - "type": "string" - }, - "endpoint": { - "description": "Endpoint to which gRPC notifications are sent. This must be a valid\ngRPCLB DNS name.", - "type": "string" - }, - "payloadName": { - "description": "Optional. If specified, this field is used to populate the \"name\" field\nin gRPC requests.", - "type": "string" - }, - "resendInterval": { - "$ref": "Duration", - "description": "Optional. This field is used to configure how often to send a full update\nof all non-healthy backends. If unspecified, full updates are not sent.\nIf specified, must be in the range between 600 seconds to 3600 seconds.\nNanos are disallowed. Can only be set for regional notification\nendpoints." - }, - "retryDurationSec": { - "description": "How much time (in seconds) is spent attempting notification retries\nuntil a successful response is received. Default is 30s. Limit is 20m\n(1200s). Must be a positive number.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "NotificationEndpointList": { - "id": "NotificationEndpointList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of NotificationEndpoint resources.", - "items": { - "$ref": "NotificationEndpoint" - }, - "type": "array" - }, - "kind": { - "default": "compute#notificationEndpointList", - "description": "[Output Only] Type of the resource. Alwayscompute#notificationEndpoint for notification endpoints.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Operation": { - "description": "Represents an Operation resource.\n\nGoogle Compute Engine has three Operation resources:\n\n* [Global](/compute/docs/reference/rest/beta/globalOperations)\n* [Regional](/compute/docs/reference/rest/beta/regionOperations)\n* [Zonal](/compute/docs/reference/rest/beta/zoneOperations)\n\nYou can use an operation resource to manage asynchronous API requests.\nFor more information, readHandling\nAPI responses.\n\nOperations can be global, regional or zonal.\n \n - For global operations, use the `globalOperations`\n resource. \n - For regional operations, use the\n `regionOperations` resource. \n - For zonal operations, use\n the `zoneOperations` resource.\n\n\n\nFor more information, read\nGlobal, Regional, and Zonal Resources.\n\nNote that completed Operation resources have a limited \nretention period.", - "id": "Operation", - "properties": { - "clientOperationId": { - "description": "[Output Only] The value of `requestId` if you provided it in the request.\nNot present otherwise.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Deprecated] This field is deprecated.", - "type": "string" - }, - "description": { - "description": "[Output Only] A textual description of the operation, which is\nset when the operation is created.", - "type": "string" - }, - "endTime": { - "description": "[Output Only] The time that this operation was completed. This value is inRFC3339\ntext format.", - "type": "string" - }, - "error": { - "description": "[Output Only] If errors are generated during processing of the operation,\nthis field will be populated.", - "properties": { - "errors": { - "description": "[Output Only] The array of errors encountered while processing this\noperation.", - "items": { - "properties": { - "code": { - "description": "[Output Only] The error type identifier for this error.", - "type": "string" - }, - "errorDetails": { - "description": "[Output Only] An optional list of messages that contain the error\ndetails. There is a set of defined message types to use for providing\ndetails.The syntax depends on the error code. For example,\nQuotaExceededInfo will have details when the error code is\nQUOTA_EXCEEDED.", - "items": { - "properties": { - "errorInfo": { - "$ref": "ErrorInfo" - }, - "help": { - "$ref": "Help" - }, - "localizedMessage": { - "$ref": "LocalizedMessage" - }, - "quotaInfo": { - "$ref": "QuotaExceededInfo" - } - }, - "type": "object" - }, - "type": "array" - }, - "location": { - "description": "[Output Only] Indicates the field in the request that caused the error.\nThis property is optional.", - "type": "string" - }, - "message": { - "description": "[Output Only] An optional, human-readable error message.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "httpErrorMessage": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error\nmessage that was returned, such as `NOT FOUND`.", - "type": "string" - }, - "httpErrorStatusCode": { - "description": "[Output Only] If the operation fails, this field contains the HTTP error\nstatus code that was returned. For example, a `404` means the\nresource was not found.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the operation. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "insertTime": { - "description": "[Output Only] The time that this operation was requested.\nThis value is inRFC3339\ntext format.", - "type": "string" - }, - "instancesBulkInsertOperationMetadata": { - "$ref": "InstancesBulkInsertOperationMetadata" - }, - "kind": { - "default": "compute#operation", - "description": "[Output Only] Type of the resource. Always `compute#operation` for\nOperation resources.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the operation.", - "type": "string" - }, - "operationGroupId": { - "description": "[Output Only] An ID that represents a group of operations, such as when a\ngroup of operations results from a `bulkInsert` API request.", - "type": "string" - }, - "operationType": { - "description": "[Output Only] The type of operation, such as `insert`,\n`update`, or `delete`, and so on.", - "type": "string" - }, - "progress": { - "description": "[Output Only] An optional progress indicator that ranges from 0 to 100.\nThere is no requirement that this be linear or support any granularity of\noperations. This should not be used to guess when the operation will be\ncomplete. This number should monotonically increase as the operation\nprogresses.", - "format": "int32", - "type": "integer" - }, - "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only\napplicable when performing regional operations.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "setCommonInstanceMetadataOperationMetadata": { - "$ref": "SetCommonInstanceMetadataOperationMetadata", - "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata,\nthis field will contain information on all underlying zonal actions and\ntheir state." - }, - "startTime": { - "description": "[Output Only] The time that this operation was started by the server.\nThis value is inRFC3339\ntext format.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the operation, which can be one of the\nfollowing:\n`PENDING`, `RUNNING`, or `DONE`.", - "enum": [ - "DONE", - "PENDING", - "RUNNING" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusMessage": { - "description": "[Output Only] An optional textual description of the current status of the\noperation.", - "type": "string" - }, - "targetId": { - "description": "[Output Only] The unique target ID, which identifies a specific incarnation\nof the target resource.", - "format": "uint64", - "type": "string" - }, - "targetLink": { - "description": "[Output Only] The URL of the resource that the operation modifies. For\noperations related to creating a snapshot, this points to the disk\nthat the snapshot was created from.", - "type": "string" - }, - "user": { - "description": "[Output Only] User who requested the operation, for example:\n`user@example.com` or\n`alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If warning messages are generated during processing of the\noperation, this field will be populated.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only\napplicable when performing per-zone operations.", - "type": "string" - } - }, - "type": "object" - }, - "OperationAggregatedList": { - "id": "OperationAggregatedList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "OperationsScopedList", - "description": "[Output Only] Name of the scope containing this set of operations." - }, - "description": "[Output Only] A map of scoped operation lists.", - "type": "object" - }, - "kind": { - "default": "compute#operationAggregatedList", - "description": "[Output Only] Type of resource. Always `compute#operationAggregatedList`\nfor aggregated lists of operations.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger than\n`maxResults`, use the `nextPageToken` as a value for\nthe query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OperationList": { - "description": "Contains a list of Operation resources.", - "id": "OperationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "kind": { - "default": "compute#operationList", - "description": "[Output Only] Type of resource. Always `compute#operations` for Operations\nresource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger than\n`maxResults`, use the `nextPageToken` as a value for\nthe query parameter `pageToken` in the next list request.\nSubsequent list requests will have their own `nextPageToken` to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OperationsScopedList": { - "id": "OperationsScopedList", - "properties": { - "operations": { - "description": "[Output Only] A list of operations contained in this scope.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of operations\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "OrganizationSecurityPoliciesListAssociationsResponse": { - "id": "OrganizationSecurityPoliciesListAssociationsResponse", - "properties": { - "associations": { - "description": "A list of associations.", - "items": { - "$ref": "SecurityPolicyAssociation" - }, - "type": "array" - }, - "kind": { - "default": "compute#organizationSecurityPoliciesListAssociationsResponse", - "description": "[Output Only] Type of securityPolicy associations. Alwayscompute#organizationSecurityPoliciesListAssociations for lists\nof securityPolicy associations.", - "type": "string" - } - }, - "type": "object" - }, - "OutlierDetection": { - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing\npool for the backend service.", - "id": "OutlierDetection", - "properties": { - "baseEjectionTime": { - "$ref": "Duration", - "description": "The base time that a backend endpoint is ejected for. Defaults to 30000ms\nor 30s.\n\nAfter a backend endpoint is returned back to the load balancing pool, it\ncan be ejected again in another ejection analysis. Thus, the total ejection\ntime is equal to the base ejection time multiplied by the number of times\nthe backend endpoint has been ejected. Defaults to 30000ms or 30s." - }, - "consecutiveErrors": { - "description": "Number of consecutive errors before a backend endpoint is ejected from the\nload balancing pool. When the backend endpoint is accessed over HTTP, a 5xx\nreturn code qualifies as an error. Defaults to 5.", - "format": "int32", - "type": "integer" - }, - "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or\nconnection errors that are mapped to one of those status codes) before a\nconsecutive gateway failure ejection occurs. Defaults to 3.", - "format": "int32", - "type": "integer" - }, - "enforcingConsecutiveErrors": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through consecutive 5xx. This setting can be\nused to disable ejection or to ramp it up slowly. Defaults to 0.", - "format": "int32", - "type": "integer" - }, - "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through consecutive gateway failures. This\nsetting can be used to disable ejection or to ramp it up slowly. Defaults\nto 100.", - "format": "int32", - "type": "integer" - }, - "enforcingSuccessRate": { - "description": "The percentage chance that a backend endpoint will be ejected when an\noutlier status is detected through success rate statistics. This setting\ncan be used to disable ejection or to ramp it up slowly. Defaults to 100.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "interval": { - "$ref": "Duration", - "description": "Time interval between ejection analysis sweeps. This can result in both new\nejections and backend endpoints being returned to service. The interval is\nequal to the number of seconds as defined in\noutlierDetection.interval.seconds plus the number of nanoseconds as defined\nin outlierDetection.interval.nanos. Defaults to 1 second." - }, - "maxEjectionPercent": { - "description": "Maximum percentage of backend endpoints in the load balancing pool for the\nbackend service that can be ejected if the ejection conditions are met.\nDefaults to 50%.", - "format": "int32", - "type": "integer" - }, - "successRateMinimumHosts": { - "description": "The number of backend endpoints in the load balancing pool that must have\nenough request volume to detect success rate outliers. If the number of\nbackend endpoints is fewer than this setting, outlier detection via success\nrate statistics is not performed for any backend endpoint in the load\nbalancing pool. Defaults to 5.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "successRateRequestVolume": { - "description": "The minimum number of total requests that must be collected in one interval\n(as defined by the interval duration above) to include this backend\nendpoint in success rate based outlier detection. If the volume is lower\nthan this setting, outlier detection via success rate statistics is not\nperformed for that backend endpoint. Defaults to 100.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - }, - "successRateStdevFactor": { - "description": "This factor is used to determine the ejection threshold for success rate\noutlier ejection. The ejection threshold is the difference between the mean\nsuccess rate, and the product of this factor and the standard deviation of\nthe mean success rate: mean - (stdev * successRateStdevFactor). This factor\nis divided by a thousand to get a double. That is, if the desired factor\nis 1.9, the runtime value should be 1900. Defaults to 1900.\n\nNot supported when the backend service uses Serverless NEG.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PacketIntervals": { - "description": "Next free: 7", - "id": "PacketIntervals", - "properties": { - "avgMs": { - "description": "Average observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "duration": { - "description": "From how long ago in the past these intervals were observed.", - "enum": [ - "DURATION_UNSPECIFIED", - "HOUR", - "MAX", - "MINUTE" - ], - "enumDescriptions": [ - "", - "", - "From BfdSession object creation time.", - "" - ], - "type": "string" - }, - "maxMs": { - "description": "Maximum observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "minMs": { - "description": "Minimum observed inter-packet interval in milliseconds.", - "format": "int64", - "type": "string" - }, - "numIntervals": { - "description": "Number of inter-packet intervals from which these statistics were derived.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "The type of packets for which inter-packet intervals were computed.", - "enum": [ - "LOOPBACK", - "RECEIVE", - "TRANSMIT", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Only applies to Echo packets. This shows the intervals between sending\nand receiving the same packet.", - "Intervals between received packets.", - "Intervals between transmitted packets.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroring": { - "description": "Represents a Packet Mirroring resource.\n\nPacket Mirroring clones the traffic of specified instances in your Virtual\nPrivate Cloud (VPC) network and forwards it to a collector destination,\nsuch as an instance group of an internal TCP/UDP load balancer, for analysis\nor examination.\nFor more information about setting up Packet Mirroring, seeUsing Packet Mirroring.", - "id": "PacketMirroring", - "properties": { - "collectorIlb": { - "$ref": "PacketMirroringForwardingRuleInfo", - "description": "The Forwarding Rule resource of typeloadBalancingScheme=INTERNAL that will be used as collector\nfor mirrored traffic.\nThe specified forwarding rule must have isMirroringCollector\nset to true." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enable": { - "description": "Indicates whether or not this packet mirroring takes effect.\nIf set to FALSE, this packet mirroring policy will not be enforced on the\nnetwork.\n\nThe default is TRUE.", - "enum": [ - "FALSE", - "TRUE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "filter": { - "$ref": "PacketMirroringFilter", - "description": "Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#packetMirroring", - "description": "[Output Only] Type of the resource. Alwayscompute#packetMirroring for packet mirrorings.", - "type": "string" - }, - "mirroredResources": { - "$ref": "PacketMirroringMirroredResourceInfo", - "description": "PacketMirroring mirroredResourceInfos.\nMirroredResourceInfo specifies a set of mirrored VM instances, subnetworks\nand/or tags for which traffic from/to all VM instances will be mirrored." - }, - "name": { - "annotations": { - "required": [ - "compute.packetMirrorings.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "$ref": "PacketMirroringNetworkInfo", - "annotations": { - "required": [ - "compute.packetMirrorings.insert" - ] - }, - "description": "Specifies the mirrored VPC network. Only packets in this network will be\nmirrored. All mirrored VMs should have a NIC in the given network.\nAll mirrored subnetworks should belong to the given network." - }, - "priority": { - "description": "The priority of applying this configuration. Priority is used to break ties\nin cases where there is more than one matching rule. In the case of two\nrules that apply for a given Instance, the one with the lowest-numbered\npriority value wins.\n\nDefault value is 1000. Valid range is 0 through 65535.", - "format": "uint32", - "type": "integer" - }, - "region": { - "description": "[Output Only] URI of the region where the packetMirroring resides.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringAggregatedList": { - "description": "Contains a list of packetMirrorings.", - "id": "PacketMirroringAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "PacketMirroringsScopedList", - "description": "Name of the scope containing this set of packetMirrorings." - }, - "description": "A list of PacketMirroring resources.", - "type": "object" - }, - "kind": { - "default": "compute#packetMirroringAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PacketMirroringFilter": { - "id": "PacketMirroringFilter", - "properties": { - "IPProtocols": { - "description": "Protocols that apply as filter on mirrored traffic.\nIf no protocols are specified, all traffic that matches the specified\nCIDR ranges is mirrored.\nIf neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is\nmirrored.", - "items": { - "type": "string" - }, - "type": "array" - }, - "cidrRanges": { - "description": "One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source\n(ingress) or destination (egress) IP in the IP header. If no ranges are\nspecified, all IPv4 traffic that matches the specified IPProtocols is\nmirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4\ntraffic is mirrored. To mirror all IPv4 and IPv6 traffic, use\n\"0.0.0.0/0,::/0\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "direction": { - "description": "Direction of traffic to mirror, either INGRESS, EGRESS, or BOTH.\nThe default is BOTH.", - "enum": [ - "BOTH", - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "Default, both directions are mirrored.", - "Only egress traffic is mirrored.", - "Only ingress traffic is mirrored." - ], - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringForwardingRuleInfo": { - "id": "PacketMirroringForwardingRuleInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the forwarding rule; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the forwarding rule representing the ILB\nconfigured as destination of the mirrored traffic.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringList": { - "description": "Contains a list of PacketMirroring resources.", - "id": "PacketMirroringList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PacketMirroring resources.", - "items": { - "$ref": "PacketMirroring" - }, - "type": "array" - }, - "kind": { - "default": "compute#packetMirroringList", - "description": "[Output Only] Type of resource. Always compute#packetMirroring\nfor packetMirrorings.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfo": { - "id": "PacketMirroringMirroredResourceInfo", - "properties": { - "instances": { - "description": "A set of virtual machine instances that are being mirrored.\nThey must live in zones contained in the same region as this\npacketMirroring.\n\nNote that this config will apply only to those network interfaces of the\nInstances that belong to the network specified in this packetMirroring.\n\nYou may specify a maximum of 50 Instances.", - "items": { - "$ref": "PacketMirroringMirroredResourceInfoInstanceInfo" - }, - "type": "array" - }, - "subnetworks": { - "description": "A set of subnetworks for which traffic from/to all VM instances will be\nmirrored. They must live in the same region as this packetMirroring.\n\nYou may specify a maximum of 5 subnetworks.", - "items": { - "$ref": "PacketMirroringMirroredResourceInfoSubnetInfo" - }, - "type": "array" - }, - "tags": { - "description": "A set of mirrored tags. Traffic from/to all VM instances that have one or\nmore of these tags will be mirrored.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfoInstanceInfo": { - "id": "PacketMirroringMirroredResourceInfoInstanceInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the instance; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the virtual machine instance which is being mirrored.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringMirroredResourceInfoSubnetInfo": { - "id": "PacketMirroringMirroredResourceInfoSubnetInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the subnetwork; defined by the\nserver.", - "type": "string" - }, - "url": { - "description": "Resource URL to the subnetwork for which\ntraffic from/to all VM instances will be mirrored.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringNetworkInfo": { - "id": "PacketMirroringNetworkInfo", - "properties": { - "canonicalUrl": { - "description": "[Output Only] Unique identifier for the network; defined by the server.", - "type": "string" - }, - "url": { - "description": "URL of the network resource.", - "type": "string" - } - }, - "type": "object" - }, - "PacketMirroringsScopedList": { - "id": "PacketMirroringsScopedList", - "properties": { - "packetMirrorings": { - "description": "A list of packetMirrorings contained in this scope.", - "items": { - "$ref": "PacketMirroring" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of packetMirrorings when the\nlist is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PartnerMetadata": { - "description": "Model definition of partner_metadata field.\nTo be used in dedicated Partner Metadata methods and to be inlined in\nthe Instance and InstanceTemplate resources.", - "id": "PartnerMetadata", - "properties": { - "fingerprint": { - "description": "Instance-level hash to be used for optimistic\nlocking.", - "format": "byte", - "type": "string" - }, - "partnerMetadata": { - "additionalProperties": { - "$ref": "StructuredEntries" - }, - "description": "Partner Metadata assigned to the instance. A map from a subdomain to\nentries map. Subdomain name must be compliant withRFC1035\ndefinition. The total size of all keys and values must be less than 2MB.\nSubdomain 'metadata.compute.googleapis.com' is reserverd for instance's\nmetadata.", - "type": "object" - } - }, - "type": "object" - }, - "PathMatcher": { - "description": "A matcher for the path portion of the URL. The BackendService\nfrom the longest-matched rule will serve the URL. If no rule was matched, the\ndefault service is used.", - "id": "PathMatcher", - "properties": { - "defaultCustomErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "defaultCustomErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nThis policy takes\neffect at the PathMatcher level and applies only when no\npolicy has been defined for the error code at lower levels likeRouteRule and PathRule within thisPathMatcher. If an error code does not have a policy defined\nin defaultCustomErrorResponsePolicy, then a policy defined for\nthe error code in UrlMap.defaultCustomErrorResponsePolicy\ntakes effect. \n\nFor example, consider a UrlMap with the following\nconfiguration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy is configured\n with policies for 5xx and 4xx errors\n - A RouteRule for /coming_soon/ is configured for the\n error code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in RouteRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect. \n\nWhen\nused in conjunction withpathMatcher.defaultRouteAction.retryPolicy, retries take\nprecedence. Only once all retries are exhausted, thedefaultCustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the defaultCustomErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ndefaultCustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "defaultRouteAction": { - "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the \npathRules or routeRules match. The load balancer\nperforms advanced routing actions, such as URL rewrites and\nheader transformations, before forwarding the request to the\nselected backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a path matcher'sdefaultRouteAction." - }, - "defaultService": { - "description": "The full or partial URL to the BackendService resource. This\nURL is used if none of the pathRules orrouteRules defined by this PathMatcher are\nmatched. For example, the\nfollowing are all valid URLs to a BackendService resource:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService\n - compute/v1/projects/project/global/backendServices/backendService\n - global/backendServices/backendService\n\n\nIf defaultRouteAction is also specified, advanced\nrouting actions, such as URL rewrites, take effect before sending the\nrequest to the backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nAuthorization requires one or more of the following Google IAM permissions on the\nspecified resource default_service: \n \n \n - compute.backendBuckets.use\n - compute.backendServices.use", - "type": "string" - }, - "defaultUrlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules orrouteRules match, the request is redirected to a URL specified\nby defaultUrlRedirect.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backend service.\n\nHeaderAction specified here are applied after the matchingHttpRouteRule HeaderAction and before theHeaderAction in the UrlMap\n\nHeaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "name": { - "description": "The name to which this PathMatcher is referred by theHostRule.", - "type": "string" - }, - "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules\nwhen routing based on simple path matching is all that's required. The\norder by which path rules are specified does not matter. Matches are always\ndone on the longest-path-first basis.\n\nFor example: a pathRule with a path /a/b/c/* will match\nbefore /a/b/* irrespective of the order in which those paths appear in this\nlist.\n\nWithin a given pathMatcher, only one ofpathRules or routeRules must be set.", - "items": { - "$ref": "PathRule" - }, - "type": "array" - }, - "routeRules": { - "description": "The list of HTTP route rules. Use this list instead ofpathRules when advanced route matching and routing actions are\ndesired. routeRules are evaluated in order of priority, from\nthe lowest to highest number.\n\nWithin a given pathMatcher, you can set only one ofpathRules or routeRules.", - "items": { - "$ref": "HttpRouteRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "PathRule": { - "description": "A path-matching rule for a URL. If matched, will use the specifiedBackendService to handle the traffic arriving at this URL.", - "id": "PathRule", - "properties": { - "customErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "customErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nIf a policy for an\nerror code is not configured for the PathRule, a policy for\nthe error code configured inpathMatcher.defaultCustomErrorResponsePolicy is applied. If\none is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the policy\nconfigured in UrlMap.defaultCustomErrorResponsePolicy takes\neffect. \n\nFor example, consider a UrlMap with the following configuration:\n \n \n - UrlMap.defaultCustomErrorResponsePolicy are configured\n with policies for 5xx and 4xx errors\n - A PathRule for /coming_soon/ is configured for the error\n code 404.\n\nIf the request is for www.myotherdomain.com and a404 is encountered, the policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 response is encountered for the requestwww.example.com/current_events/, the pathMatcher's policy\ntakes effect. If however, the request forwww.example.com/coming_soon/ encounters a 404,\nthe policy in PathRule.customErrorResponsePolicy takes\neffect. If any of the requests in this example encounter a 500\nerror code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes effect.\n\ncustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "paths": { - "description": "The list of path patterns to match. Each must start with /\nand the only place a * is allowed is at the end following\na /. The string fed to the path matcher does not include\nany text after the first ? or #, and\nthose chars are not allowed here.", - "items": { - "type": "string" - }, - "type": "array" - }, - "routeAction": { - "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer\nperforms advanced routing actions, such as URL rewrites and header\ntransformations, before forwarding the request to the selected\nbackend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nURL maps for classic Application Load Balancers only support\nthe urlRewrite action within a path rule'srouteAction." - }, - "service": { - "description": "The full or partial URL of the backend service resource to which traffic\nis directed if this rule is matched. If routeAction is\nalso specified, advanced routing actions, such as URL rewrites,\ntake effect before sending the request to the backend.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.", - "type": "string" - }, - "urlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL\nspecified by urlRedirect.\n\n\nOnly one of urlRedirect, service orrouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - } - }, - "type": "object" - }, - "PerInstanceConfig": { - "id": "PerInstanceConfig", - "properties": { - "fingerprint": { - "description": "Fingerprint of this per-instance config. This field can be used in\noptimistic locking. It is ignored when inserting a per-instance\nconfig. An up-to-date fingerprint must be provided in order to update an\nexisting per-instance configuration or the field needs to be unset.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "The name of a per-instance configuration and its corresponding instance.\nServes as a merge key during UpdatePerInstanceConfigs\noperations, that is, if a per-instance configuration with the same name\nexists then it will be updated, otherwise a new one will be created for the\nVM instance with the same name. An attempt to create a per-instance\nconfiguration for a VM instance that either doesn't exist or is not part\nof the group will result in an error.", - "type": "string" - }, - "preservedState": { - "$ref": "PreservedState", - "description": "The intended preserved state for the given instance. Does not contain\npreserved state generated from a stateful policy." - }, - "status": { - "description": "The status of applying this per-instance configuration on the corresponding\nmanaged instance.", - "enum": [ - "APPLYING", - "DELETING", - "EFFECTIVE", - "NONE", - "UNAPPLIED", - "UNAPPLIED_DELETION" - ], - "enumDescriptions": [ - "The per-instance configuration is being applied to the instance, but is\nnot yet effective, possibly waiting for the instance to, for example,REFRESH.", - "The per-instance configuration deletion is being applied on the instance,\npossibly waiting for the instance to, for example, REFRESH.", - "The per-instance configuration is effective on the instance, meaning that\nall disks, ips and metadata specified in this configuration are attached\nor set on the instance.", - "*[Default]* The default status, when no per-instance configuration\nexists.", - "The per-instance configuration is set on an instance but not been applied\nyet.", - "The per-instance configuration has been deleted, but the deletion is not\nyet applied." - ], - "type": "string" - } - }, - "type": "object" - }, - "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members`, or principals, to a single `role`. Principals can be user\naccounts, service accounts, Google groups, and domains (such as G Suite). A\n`role` is a named list of permissions; each `role` can be an IAM predefined\nrole or a user-created custom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a\n`condition`, which is a logical expression that allows access to a resource\nonly if the expression evaluates to `true`. A condition can add constraints\nbased on attributes of the request, the resource, or both. To learn which\nresources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n```\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\n \"user:eve@example.com\"\n ],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n```\n\n**YAML example:**\n\n```\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n etag: BwWWja0YfJA=\n version: 3\n```\n\nFor a description of IAM and its features, see the\n[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,\nmay specify a `condition` that determines how and when the `bindings` are\napplied. Each of the `bindings` must contain at least one principal.\n\nThe `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250\nof these principals can be Google groups. Each occurrence of a principal\ncounts towards these limits. For example, if the `bindings` grant 50\ndifferent roles to `user:alice@example.com`, and not to any other\nprincipal, then you can add another 1,450 principals to the `bindings` in\nthe `Policy`.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the\n[IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PreconfiguredWafSet": { - "id": "PreconfiguredWafSet", - "properties": { - "expressionSets": { - "description": "List of entities that are currently supported for WAF rules.", - "items": { - "$ref": "WafExpressionSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "PreservedState": { - "description": "Preserved state for a given instance.", - "id": "PreservedState", - "properties": { - "disks": { - "additionalProperties": { - "$ref": "PreservedStatePreservedDisk" - }, - "description": "Preserved disks defined for this instance.\nThis map is keyed with the device names of the disks.", - "type": "object" - }, - "externalIPs": { - "additionalProperties": { - "$ref": "PreservedStatePreservedNetworkIp" - }, - "description": "Preserved external IPs defined for this instance.\nThis map is keyed with the name of the network interface.", - "type": "object" - }, - "internalIPs": { - "additionalProperties": { - "$ref": "PreservedStatePreservedNetworkIp" - }, - "description": "Preserved internal IPs defined for this instance.\nThis map is keyed with the name of the network interface.", - "type": "object" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Preserved metadata defined for this instance.", - "type": "object" - } - }, - "type": "object" - }, - "PreservedStatePreservedDisk": { - "id": "PreservedStatePreservedDisk", - "properties": { - "autoDelete": { - "description": "These stateful disks will never be deleted during autohealing,\nupdate, instance recreate operations. This flag is used to configure\nif the disk should be deleted after it is no longer used by the group,\ne.g. when the given instance or the whole MIG is deleted.\nNote: disks attached in READ_ONLY mode cannot be\nauto-deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. If not specified, the default is to attach the\ndisk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple VM instances can use\na disk in READ_ONLY mode at a time.", - "*[Default]* Attaches this disk in READ_WRITE mode. Only\none VM instance at a time can be attached to a disk inREAD_WRITE mode." - ], - "type": "string" - }, - "source": { - "description": "The URL of the disk resource that is stateful and should be attached\nto the VM instance.", - "type": "string" - } - }, - "type": "object" - }, - "PreservedStatePreservedNetworkIp": { - "id": "PreservedStatePreservedNetworkIp", - "properties": { - "autoDelete": { - "description": "These stateful IPs will never be released during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the IP reservation should be deleted\nafter it is no longer used by the group, e.g. when the given instance\nor the whole group is deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "ipAddress": { - "$ref": "PreservedStatePreservedNetworkIpIpAddress", - "description": "Ip address representation" - } - }, - "type": "object" - }, - "PreservedStatePreservedNetworkIpIpAddress": { - "id": "PreservedStatePreservedNetworkIpIpAddress", - "properties": { - "address": { - "description": "The URL of the reservation for this IP address.", - "type": "string" - }, - "literal": { - "description": "An IPv4 internal network address to assign to the instance for this\nnetwork interface.", - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeature": { - "description": "Represents a single Google Compute Engine preview feature.", - "id": "PreviewFeature", - "properties": { - "activationStatus": { - "description": "Specifies whether the feature is enabled or disabled.", - "enum": [ - "ACTIVATION_STATE_UNSPECIFIED", - "DISABLED", - "ENABLED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "[Output Only] Description of the feature.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#previewFeature", - "description": "[Output only] The type of the feature. Always \"compute#previewFeature\" for\npreview features.", - "type": "string" - }, - "name": { - "description": "Name of the feature.", - "type": "string" - }, - "rolloutOperation": { - "$ref": "PreviewFeatureRolloutOperation", - "description": "Rollout operation of the feature." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "$ref": "PreviewFeatureStatus", - "description": "[Output only] Status of the feature." - } - }, - "type": "object" - }, - "PreviewFeatureList": { - "id": "PreviewFeatureList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PreviewFeature resources.", - "items": { - "$ref": "PreviewFeature" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperation": { - "description": "Represents the rollout operation", - "id": "PreviewFeatureRolloutOperation", - "properties": { - "rolloutInput": { - "$ref": "PreviewFeatureRolloutOperationRolloutInput", - "description": "Input only. The input for the rollout operation." - } - }, - "type": "object" - }, - "PreviewFeatureRolloutOperationRolloutInput": { - "description": "Represents the input for the rollout operation.", - "id": "PreviewFeatureRolloutOperationRolloutInput", - "properties": { - "name": { - "description": "The name of the rollout plan\nEx.\norganizations//locations/global/rolloutPlans/\nEx.\nfolders//locations/global/rolloutPlans/\nEx.\nprojects//locations/global/rolloutPlans/.", - "type": "string" - }, - "predefinedRolloutPlan": { - "description": "Predefined rollout plan.", - "enum": [ - "ROLLOUT_PLAN_FAST_ROLLOUT", - "ROLLOUT_PLAN_TWO_DAY_ROLLOUT", - "ROLLOUT_PLAN_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PreviewFeatureStatus": { - "description": "[Output Only] The status of the feature.", - "id": "PreviewFeatureStatus", - "properties": { - "description": { - "description": "[Output Only] The description of the feature.", - "type": "string" - }, - "helpLink": { - "description": "[Output Only] Link to the public documentation for the feature.", - "type": "string" - }, - "releaseStatus": { - "$ref": "PreviewFeatureStatusReleaseStatus" - } - }, - "type": "object" - }, - "PreviewFeatureStatusReleaseStatus": { - "description": "[Output Only] The release status of the feature.", - "id": "PreviewFeatureStatusReleaseStatus", - "properties": { - "stage": { - "description": "[Output Only] The stage of the feature.", - "enum": [ - "DEPRECATED", - "GA", - "PREVIEW", - "STAGE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "updateDate": { - "$ref": "Date", - "description": "Output only. The last date when a feature transitioned between ReleaseStatuses.", - "readOnly": true - } - }, - "type": "object" - }, - "Project": { - "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform\nenvironment. For more information, read about the \nResource Hierarchy.", - "id": "Project", - "properties": { - "cloudArmorTier": { - "description": "[Output Only] The Cloud Armor tier for this project. It can be one of the\nfollowing values: CA_STANDARD,CA_ENTERPRISE_PAYGO.\n\nIf this field is not specified, it is assumed to beCA_STANDARD.", - "enum": [ - "CA_ENTERPRISE_ANNUAL", - "CA_ENTERPRISE_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Enterprise tier protection billed annually.", - "Enterprise tier protection billed monthly.", - "Standard protection." - ], - "type": "string" - }, - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this\nproject. See Custom\nmetadata for more information." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultNetworkTier": { - "description": "This signifies the default network tier used for configuring resources of\nthe project and can only take the following values:PREMIUM, STANDARD. Initially the default network\ntier is PREMIUM.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "defaultServiceAccount": { - "description": "[Output Only] Default service account used by VMs running in this project.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource.", - "type": "string" - }, - "enabledFeatures": { - "description": "An optional list of restricted features enabled for use on this project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server. This is *not* the project ID, and is\njust a unique ID used by Compute Engine to identify resources.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#project", - "description": "[Output Only] Type of the resource. Always compute#project for\nprojects.", - "type": "string" - }, - "managedProtectionTier": { - "description": "[Output Only] The Cloud Armor Managed Protection (CAMP) tier for\nthis project. It can be one of the following values:CA_STANDARD, CAMP_PLUS_PAYGO.\n\nIf this field is not specified, it is assumed to beCA_STANDARD.", - "enum": [ - "CAMP_PLUS_ANNUAL", - "CAMP_PLUS_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Plus tier protection annual.", - "Plus tier protection monthly.", - "Standard protection." - ], - "type": "string" - }, - "name": { - "description": "The project ID. For example: my-example-project. Use the\nproject ID to make requests to Compute Engine.", - "type": "string" - }, - "quotas": { - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "An optional naming prefix for daily usage reports and the Google Cloud\nStorage bucket where they are stored." - }, - "vmDnsSetting": { - "description": "[Output Only] Default internal DNS setting used by VMs running in\nthis project.", - "enum": [ - "GLOBAL_DEFAULT", - "UNSPECIFIED_VM_DNS_SETTING", - "ZONAL_DEFAULT", - "ZONAL_ONLY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "xpnProjectStatus": { - "description": "[Output Only] The role this project has in a shared VPC configuration.\nCurrently, only projects with the host role, which is specified by the\nvalue HOST, are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "properties": { - "kind": { - "default": "compute#projectsGetXpnResources", - "description": "[Output Only] Type of resource. Alwayscompute#projectsGetXpnResources for lists of service resources\n(a.k.a service projects)", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "resources": { - "description": "Service resources (a.k.a service projects) attached to this project as\ntheir shared VPC host.", - "items": { - "$ref": "XpnResourceId" - }, - "type": "array" - } - }, - "type": "object" - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "properties": { - "organization": { - "description": "Optional organization ID managed by Cloud Resource Manager, for which to\nlist shared VPC host projects. If not specified, the organization will be\ninferred from the project.", - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetCloudArmorTierRequest": { - "id": "ProjectsSetCloudArmorTierRequest", - "properties": { - "cloudArmorTier": { - "description": "Managed protection tier to be set.", - "enum": [ - "CA_ENTERPRISE_ANNUAL", - "CA_ENTERPRISE_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Enterprise tier protection billed annually.", - "Enterprise tier protection billed monthly.", - "Standard protection." - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetDefaultNetworkTierRequest": { - "id": "ProjectsSetDefaultNetworkTierRequest", - "properties": { - "networkTier": { - "description": "Default network tier to be set.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetManagedProtectionTierRequest": { - "id": "ProjectsSetManagedProtectionTierRequest", - "properties": { - "managedProtectionTier": { - "description": "Managed protection tier to be set.", - "enum": [ - "CAMP_PLUS_ANNUAL", - "CAMP_PLUS_PAYGO", - "CA_STANDARD" - ], - "enumDescriptions": [ - "Plus tier protection annual.", - "Plus tier protection monthly.", - "Standard protection." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefix": { - "description": "A public advertised prefix represents an aggregated IP prefix or netblock\nwhich customers bring to cloud. The IP prefix is a single unit of route\nadvertisement and is announced globally to the internet.", - "id": "PublicAdvertisedPrefix", - "properties": { - "byoipApiVersion": { - "description": "[Output Only] The version of BYOIP API.", - "enum": [ - "V1", - "V2" - ], - "enumDescriptions": [ - "This public advertised prefix can be used to create both regional and\nglobal public delegated prefixes. It usually takes 4 weeks to create or\ndelete a public delegated prefix. The BGP status cannot be changed.", - "This public advertised prefix can only be used to create regional public\ndelegated prefixes. Public delegated prefix creation and deletion takes\nminutes and the BGP status can be modified." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "dnsVerificationIp": { - "description": "The address to be used for reverse DNS verification.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a new PublicAdvertisedPrefix. An up-to-date\nfingerprint must be provided in order to update thePublicAdvertisedPrefix, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a PublicAdvertisedPrefix.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "ipCidrRange": { - "description": "The address range, in CIDR format, represented by this public advertised\nprefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "The internet access type for IPv6 Public Advertised Prefixes.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "Default IPv6 access type. The prefix will be announced to the internet.\nAll children Public Delegated Prefixes will have IPv6 access type as\nEXTERNAL.", - "The prefix will not be announced to the internet. Prefix will be used\nprivately within Cloud. All children Public Delegated Prefixes\nwill have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "kind": { - "default": "compute#publicAdvertisedPrefix", - "description": "[Output Only] Type of the resource. Alwayscompute#publicAdvertisedPrefix for public advertised prefixes.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.publicAdvertisedPrefixes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "pdpScope": { - "description": "Specifies how child public delegated prefix will be scoped. It could\nbe one of following values:\n \n \n - `REGIONAL`: The public delegated prefix is regional only. The\n provisioning will take a few minutes.\n - `GLOBAL`: The public delegated prefix is global only. The\n provisioning will take ~4 weeks.\n - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is\n BYOIP V1 legacy prefix. This is output only value and no longer\n supported in BYOIP V2.", - "enum": [ - "GLOBAL", - "GLOBAL_AND_REGIONAL", - "REGIONAL" - ], - "enumDescriptions": [ - "The public delegated prefix is global only. The provisioning will take ~4\nweeks.", - "The public delegated prefixes is BYOIP V1 legacy prefix. This is output\nonly value and no longer supported in BYOIP V2.", - "The public delegated prefix is regional only. The provisioning will take\na few minutes." - ], - "type": "string" - }, - "publicDelegatedPrefixs": { - "description": "[Output Only] The list of public delegated prefixes that exist for this\npublic advertised prefix.", - "items": { - "$ref": "PublicAdvertisedPrefixPublicDelegatedPrefix" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sharedSecret": { - "description": "[Output Only] The shared secret to be used for reverse DNS verification.", - "type": "string" - }, - "status": { - "description": "The status of the public advertised prefix. Possible values include:\n \n \n - `INITIAL`: RPKI validation is complete.\n - `PTR_CONFIGURED`: User has configured the PTR.\n - `VALIDATED`: Reverse DNS lookup is successful.\n - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed.\n - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being\n configured.\n - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured.\n - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed.", - "enum": [ - "ANNOUNCED_TO_INTERNET", - "INITIAL", - "PREFIX_CONFIGURATION_COMPLETE", - "PREFIX_CONFIGURATION_IN_PROGRESS", - "PREFIX_REMOVAL_IN_PROGRESS", - "PTR_CONFIGURED", - "READY_TO_ANNOUNCE", - "REVERSE_DNS_LOOKUP_FAILED", - "VALIDATED" - ], - "enumDescriptions": [ - "The prefix is announced to Internet.", - "RPKI validation is complete.", - "The prefix is fully configured.", - "The prefix is being configured.", - "The prefix is being removed.", - "User has configured the PTR.", - "The prefix is currently withdrawn but ready to be announced.", - "Reverse DNS lookup failed.", - "Reverse DNS lookup is successful." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefixList": { - "id": "PublicAdvertisedPrefixList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PublicAdvertisedPrefix resources.", - "items": { - "$ref": "PublicAdvertisedPrefix" - }, - "type": "array" - }, - "kind": { - "default": "compute#publicAdvertisedPrefixList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicAdvertisedPrefix for public advertised prefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicAdvertisedPrefixPublicDelegatedPrefix": { - "description": "Represents a CIDR range which can be used to assign addresses.", - "id": "PublicAdvertisedPrefixPublicDelegatedPrefix", - "properties": { - "ipRange": { - "description": "The IP address range of the public delegated prefix", - "type": "string" - }, - "name": { - "description": "The name of the public delegated prefix", - "type": "string" - }, - "project": { - "description": "The project number of the public delegated prefix", - "type": "string" - }, - "region": { - "description": "The region of the public delegated prefix if it is regional. If absent,\nthe prefix is global.", - "type": "string" - }, - "status": { - "description": "The status of the public delegated prefix. Possible values are:\n INITIALIZING: The public delegated prefix is being initialized and\n addresses cannot be created yet.\n ANNOUNCED: The public delegated prefix is active.", - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefix": { - "description": "A PublicDelegatedPrefix resource represents an IP block within a\nPublicAdvertisedPrefix that is configured within a single cloud scope\n(global or region). IPs in the block can be allocated to resources within\nthat scope. Public delegated prefixes may be further broken up into\nsmaller IP blocks in the same scope as the parent block.", - "id": "PublicDelegatedPrefix", - "properties": { - "allocatablePrefixLength": { - "description": "The allocatable prefix length supported by this public delegated prefix.\nThis field is optional and cannot be set for prefixes in DELEGATION mode.\nIt cannot be set for IPv4 prefixes either, and it always defaults to 32.", - "format": "int32", - "type": "integer" - }, - "byoipApiVersion": { - "description": "[Output Only] The version of BYOIP API.", - "enum": [ - "V1", - "V2" - ], - "enumDescriptions": [ - "This public delegated prefix usually takes 4 weeks to delete, and the BGP\nstatus cannot be changed. Announce and Withdraw APIs can not be used on\nthis prefix.", - "This public delegated prefix takes minutes to delete. Announce and\nWithdraw APIs can be used on this prefix to change the BGP status." - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEnhancedIpv4Allocation": { - "description": "[Output Only] Whether this PDP supports enhanced IPv4 allocations.\nApplicable for IPv4 PDPs only.", - "type": "boolean" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a new PublicDelegatedPrefix. An up-to-date\nfingerprint must be provided in order to update thePublicDelegatedPrefix, otherwise the request will fail with\nerror 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a PublicDelegatedPrefix.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "ipCidrRange": { - "description": "The IP address range, in CIDR format, represented by this public\ndelegated prefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "[Output Only] The internet access type for IPv6 Public Delegated Prefixes.\nInherited from parent prefix.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "The parent public advertised prefix will be announced to the internet.\nAll children public delegated prefixes will have IPv6 access type as\nEXTERNAL.", - "The parent public advertised prefix will not be announced to the\ninternet. Prefix will be used privately within Cloud. All children\npublic delegated prefixes will have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "isLiveMigration": { - "description": "If true, the prefix will be live migrated.", - "type": "boolean" - }, - "kind": { - "default": "compute#publicDelegatedPrefix", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefix for public delegated prefixes.", - "type": "string" - }, - "mode": { - "description": "The public delegated prefix mode for IPv6 only.", - "enum": [ - "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", - "EXTERNAL_IPV6_SUBNETWORK_CREATION", - "INTERNAL_IPV6_SUBNETWORK_CREATION" - ], - "enumDescriptions": [ - "The public delegated prefix is used for further sub-delegation only. Such\nprefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only.\nSuch prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual-mode subnetworks\nonly. Such prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual stack or IPv6-only\nsubnetwork with internal access only. Such prefixes cannot set\npublicDelegatedSubPrefixes and allocatablePrefixLength. Parent public\ndelegated prefix must have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.publicDelegatedPrefixes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "parentPrefix": { - "description": "The URL of parent prefix. Either PublicAdvertisedPrefix or\nPublicDelegatedPrefix.", - "type": "string" - }, - "publicDelegatedSubPrefixs": { - "description": "The list of sub public delegated prefixes that exist for this public\ndelegated prefix.", - "items": { - "$ref": "PublicDelegatedPrefixPublicDelegatedSubPrefix" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the public delegated prefix resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the public delegated prefix, which can be one\nof following values:\n \n \n - `INITIALIZING` The public delegated prefix is being initialized and\n addresses cannot be created yet.\n - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration\n prefix and is active.\n - `ANNOUNCED` The public delegated prefix is announced and ready to\n use.\n - `DELETING` The public delegated prefix is being deprovsioned.\n - `ACTIVE` The public delegated prefix is ready to use.", - "enum": [ - "ACTIVE", - "ANNOUNCED", - "ANNOUNCED_TO_GOOGLE", - "ANNOUNCED_TO_INTERNET", - "DELETING", - "INITIALIZING", - "READY_TO_ANNOUNCE" - ], - "enumDescriptions": [ - "The public delegated prefix is ready to use.", - "The public delegated prefix is announced and ready to use.", - "The prefix is announced within Google network.", - "The prefix is announced to Internet and within Google.", - "The public delegated prefix is being deprovsioned.", - "The public delegated prefix is being initialized and addresses cannot be\ncreated yet.", - "The public delegated prefix is currently withdrawn but ready to be\nannounced." - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixAggregatedList": { - "id": "PublicDelegatedPrefixAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "PublicDelegatedPrefixesScopedList", - "description": "[Output Only] Name of the scope containing this set of\nPublicDelegatedPrefixes." - }, - "description": "A list of PublicDelegatedPrefixesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#publicDelegatedPrefixAggregatedList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefixAggregatedList for aggregated\nlists of public delegated prefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixList": { - "id": "PublicDelegatedPrefixList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of PublicDelegatedPrefix resources.", - "items": { - "$ref": "PublicDelegatedPrefix" - }, - "type": "array" - }, - "kind": { - "default": "compute#publicDelegatedPrefixList", - "description": "[Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefixList for public delegated\nprefixes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixPublicDelegatedSubPrefix": { - "description": "Represents a sub PublicDelegatedPrefix.", - "id": "PublicDelegatedPrefixPublicDelegatedSubPrefix", - "properties": { - "allocatablePrefixLength": { - "description": "The allocatable prefix length supported by this PublicDelegatedSubPrefix.", - "format": "int32", - "type": "integer" - }, - "delegateeProject": { - "description": "Name of the project scoping this PublicDelegatedSubPrefix.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEnhancedIpv4Allocation": { - "description": "[Output Only] Whether this PDP supports enhanced IPv4 allocations.\nApplicable for IPv4 PDPs only.", - "type": "boolean" - }, - "ipCidrRange": { - "description": "The IP address range, in CIDR format, represented by this sub public\ndelegated prefix.", - "type": "string" - }, - "ipv6AccessType": { - "description": "[Output Only] The internet access type for IPv6 Public Delegated Sub\nPrefixes. Inherited from parent prefix.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "The parent public advertised prefix will be announced to the internet.\nAll children public delegated prefixes will have IPv6 access type as\nEXTERNAL.", - "The parent public advertised prefix will not be announced to the\ninternet. Prefix will be used privately within Cloud. All children\npublic delegated prefixes will have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "isAddress": { - "description": "Whether the sub prefix is delegated to create Address resources in the\ndelegatee project.", - "type": "boolean" - }, - "mode": { - "description": "The PublicDelegatedSubPrefix mode for IPv6 only.", - "enum": [ - "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", - "EXTERNAL_IPV6_SUBNETWORK_CREATION", - "INTERNAL_IPV6_SUBNETWORK_CREATION" - ], - "enumDescriptions": [ - "The public delegated prefix is used for further sub-delegation only. Such\nprefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only.\nSuch prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual-mode subnetworks\nonly. Such prefixes cannot set publicDelegatedSubPrefixes. Parent public\ndelegated prefix must have IPv6 access type as EXTERNAL.", - "The public delegated prefix is used for creating dual stack or IPv6-only\nsubnetwork with internal access only. Such prefixes cannot set\npublicDelegatedSubPrefixes and allocatablePrefixLength. Parent public\ndelegated prefix must have IPv6 access type as INTERNAL." - ], - "type": "string" - }, - "name": { - "description": "The name of the sub public delegated prefix.", - "type": "string" - }, - "region": { - "description": "[Output Only] The region of the sub public delegated prefix if it is\nregional. If absent, the sub prefix is global.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the sub public delegated prefix.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "PublicDelegatedPrefixesScopedList": { - "id": "PublicDelegatedPrefixesScopedList", - "properties": { - "publicDelegatedPrefixes": { - "description": "[Output Only] A list of PublicDelegatedPrefixes contained in this scope.", - "items": { - "$ref": "PublicDelegatedPrefix" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of\npublic delegated prefixes when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Quota": { - "description": "A quotas entry.", - "id": "Quota", - "properties": { - "limit": { - "description": "[Output Only] Quota limit for this metric.", - "format": "double", - "type": "number" - }, - "metric": { - "description": "[Output Only] Name of the quota metric.", - "enum": [ - "A2_CPUS", - "AFFINITY_GROUPS", - "AUTOSCALERS", - "BACKEND_BUCKETS", - "BACKEND_SERVICES", - "C2D_CPUS", - "C2_CPUS", - "C3_CPUS", - "COMMITMENTS", - "COMMITTED_A2_CPUS", - "COMMITTED_C2D_CPUS", - "COMMITTED_C2_CPUS", - "COMMITTED_C3_CPUS", - "COMMITTED_CPUS", - "COMMITTED_E2_CPUS", - "COMMITTED_LICENSES", - "COMMITTED_LOCAL_SSD_TOTAL_GB", - "COMMITTED_M3_CPUS", - "COMMITTED_MEMORY_OPTIMIZED_CPUS", - "COMMITTED_N2A_CPUS", - "COMMITTED_N2D_CPUS", - "COMMITTED_N2_CPUS", - "COMMITTED_NVIDIA_A100_80GB_GPUS", - "COMMITTED_NVIDIA_A100_GPUS", - "COMMITTED_NVIDIA_H100_GPUS", - "COMMITTED_NVIDIA_K80_GPUS", - "COMMITTED_NVIDIA_L4_GPUS", - "COMMITTED_NVIDIA_P100_GPUS", - "COMMITTED_NVIDIA_P4_GPUS", - "COMMITTED_NVIDIA_T4_GPUS", - "COMMITTED_NVIDIA_V100_GPUS", - "COMMITTED_T2A_CPUS", - "COMMITTED_T2D_CPUS", - "COMMITTED_Z3_CPUS", - "CPUS", - "CPUS_ALL_REGIONS", - "DISKS_TOTAL_GB", - "E2_CPUS", - "EXTERNAL_MANAGED_FORWARDING_RULES", - "EXTERNAL_NETWORK_LB_FORWARDING_RULES", - "EXTERNAL_PROTOCOL_FORWARDING_RULES", - "EXTERNAL_VPN_GATEWAYS", - "FIREWALLS", - "FORWARDING_RULES", - "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES", - "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES", - "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES", - "GLOBAL_INTERNAL_ADDRESSES", - "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES", - "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES", - "GPUS_ALL_REGIONS", - "HDB_TOTAL_GB", - "HDB_TOTAL_IOPS", - "HDB_TOTAL_THROUGHPUT", - "HEALTH_CHECKS", - "IMAGES", - "INSTANCES", - "INSTANCE_GROUPS", - "INSTANCE_GROUP_MANAGERS", - "INSTANCE_TEMPLATES", - "INTERCONNECTS", - "INTERCONNECT_ATTACHMENTS_PER_REGION", - "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS", - "INTERCONNECT_TOTAL_GBPS", - "INTERNAL_ADDRESSES", - "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES", - "IN_PLACE_SNAPSHOTS", - "IN_USE_ADDRESSES", - "IN_USE_BACKUP_SCHEDULES", - "IN_USE_SNAPSHOT_SCHEDULES", - "LOCAL_SSD_TOTAL_GB", - "M1_CPUS", - "M2_CPUS", - "M3_CPUS", - "MACHINE_IMAGES", - "N2A_CPUS", - "N2D_CPUS", - "N2_CPUS", - "NETWORKS", - "NETWORK_ATTACHMENTS", - "NETWORK_ENDPOINT_GROUPS", - "NETWORK_FIREWALL_POLICIES", - "NET_LB_SECURITY_POLICIES_PER_REGION", - "NET_LB_SECURITY_POLICY_RULES_PER_REGION", - "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION", - "NODE_GROUPS", - "NODE_TEMPLATES", - "NVIDIA_A100_80GB_GPUS", - "NVIDIA_A100_GPUS", - "NVIDIA_K80_GPUS", - "NVIDIA_L4_GPUS", - "NVIDIA_P100_GPUS", - "NVIDIA_P100_VWS_GPUS", - "NVIDIA_P4_GPUS", - "NVIDIA_P4_VWS_GPUS", - "NVIDIA_T4_GPUS", - "NVIDIA_T4_VWS_GPUS", - "NVIDIA_V100_GPUS", - "PACKET_MIRRORINGS", - "PD_EXTREME_TOTAL_PROVISIONED_IOPS", - "PREEMPTIBLE_CPUS", - "PREEMPTIBLE_LOCAL_SSD_GB", - "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS", - "PREEMPTIBLE_NVIDIA_A100_GPUS", - "PREEMPTIBLE_NVIDIA_H100_GPUS", - "PREEMPTIBLE_NVIDIA_K80_GPUS", - "PREEMPTIBLE_NVIDIA_L4_GPUS", - "PREEMPTIBLE_NVIDIA_P100_GPUS", - "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_P4_GPUS", - "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_T4_GPUS", - "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS", - "PREEMPTIBLE_NVIDIA_V100_GPUS", - "PREEMPTIBLE_TPU_LITE_DEVICE_V5", - "PREEMPTIBLE_TPU_LITE_PODSLICE_V5", - "PREEMPTIBLE_TPU_PODSLICE_V4", - "PRIVATE_V6_ACCESS_SUBNETWORKS", - "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK", - "PSC_INTERNAL_LB_FORWARDING_RULES", - "PUBLIC_ADVERTISED_PREFIXES", - "PUBLIC_DELEGATED_PREFIXES", - "REGIONAL_AUTOSCALERS", - "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES", - "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES", - "REGIONAL_INSTANCE_GROUP_MANAGERS", - "REGIONAL_INTERNAL_LB_BACKEND_SERVICES", - "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES", - "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES", - "RESERVATIONS", - "RESOURCE_POLICIES", - "ROUTERS", - "ROUTES", - "SECURITY_POLICIES", - "SECURITY_POLICIES_PER_REGION", - "SECURITY_POLICY_ADVANCED_RULES_PER_REGION", - "SECURITY_POLICY_CEVAL_RULES", - "SECURITY_POLICY_RULES", - "SECURITY_POLICY_RULES_PER_REGION", - "SERVICE_ATTACHMENTS", - "SNAPSHOTS", - "SSD_TOTAL_GB", - "SSL_CERTIFICATES", - "SSL_POLICIES", - "STATIC_ADDRESSES", - "STATIC_BYOIP_ADDRESSES", - "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES", - "SUBNETWORKS", - "T2A_CPUS", - "T2D_CPUS", - "TARGET_HTTPS_PROXIES", - "TARGET_HTTP_PROXIES", - "TARGET_INSTANCES", - "TARGET_POOLS", - "TARGET_SSL_PROXIES", - "TARGET_TCP_PROXIES", - "TARGET_VPN_GATEWAYS", - "TPU_LITE_DEVICE_V5", - "TPU_LITE_PODSLICE_V5", - "TPU_PODSLICE_V4", - "URL_MAPS", - "VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES", - "VPN_GATEWAYS", - "VPN_TUNNELS", - "XPN_SERVICE_PROJECTS" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Guest CPUs", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "The total number of snapshots allowed for a single project.", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "owner": { - "description": "[Output Only] Owning resource. This is the resource on which this quota\nis applied.", - "type": "string" - }, - "usage": { - "description": "[Output Only] Current usage of this metric.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "QuotaExceededInfo": { - "description": "Additional details for quota exceeded error for resource quota.", - "id": "QuotaExceededInfo", - "properties": { - "dimensions": { - "additionalProperties": { - "type": "string" - }, - "description": "The map holding related quota dimensions.", - "type": "object" - }, - "futureLimit": { - "description": "Future quota limit being rolled out. The limit's unit depends on the quota\n type or metric.", - "format": "double", - "type": "number" - }, - "limit": { - "description": "Current effective quota limit. The limit's unit depends on the quota type\nor metric.", - "format": "double", - "type": "number" - }, - "limitName": { - "description": "The name of the quota limit.", - "type": "string" - }, - "metricName": { - "description": "The Compute Engine quota metric name.", - "type": "string" - }, - "rolloutStatus": { - "description": "Rollout status of the future quota limit.", - "enum": [ - "IN_PROGRESS", - "ROLLOUT_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "IN_PROGRESS - A rollout is in process which will change the limit value\nto future limit.", - "ROLLOUT_STATUS_UNSPECIFIED - Rollout status is not specified. The default\nvalue." - ], - "type": "string" - } - }, - "type": "object" - }, - "Reference": { - "description": "Represents a reference to a resource.", - "id": "Reference", - "properties": { - "kind": { - "default": "compute#reference", - "description": "[Output Only] Type of the resource. Always compute#reference\nfor references.", - "type": "string" - }, - "referenceType": { - "description": "A description of the reference type with no implied semantics. Possible\nvalues include:\n \n \n 1. MEMBER_OF", - "type": "string" - }, - "referrer": { - "description": "URL of the resource which refers to the target.", - "type": "string" - }, - "target": { - "description": "URL of the resource to which this reference points.", - "type": "string" - } - }, - "type": "object" - }, - "Region": { - "description": "Represents a Region resource.\n\nA region is a geographical area where a resource is located. For more\ninformation, readRegions\nand Zones.", - "id": "Region", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this region." - }, - "description": { - "description": "[Output Only] Textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#region", - "description": "[Output Only] Type of the resource. Always compute#region for\nregions.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "quotaStatusWarning": { - "description": "[Output Only] Warning of fetching the `quotas` field for this region. This\nfield is populated only if fetching of the `quotas` field fails.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "quotas": { - "description": "[Output Only] Quotas assigned to this region.", - "items": { - "$ref": "Quota" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the region, either UP orDOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "zones": { - "description": "[Output Only] A list of zones available in this region, in the form of\nresource URLs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionAddressesMoveRequest": { - "id": "RegionAddressesMoveRequest", - "properties": { - "description": { - "description": "An optional destination address description if intended to be different\nfrom the source.", - "type": "string" - }, - "destinationAddress": { - "description": "The URL of the destination address to move to. This can be a full or\npartial URL. For example, the following are all valid URLs to a address:\n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n - projects/project/regions/region/addresses/address\n\n\nNote that destination project must be different from the source project. So/regions/region/addresses/address is not valid partial url.", - "type": "string" - } - }, - "type": "object" - }, - "RegionAutoscalerList": { - "description": "Contains a list of autoscalers.", - "id": "RegionAutoscalerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Autoscaler resources.", - "items": { - "$ref": "Autoscaler" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionAutoscalerList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionCommitmentsUpdateReservationsRequest": { - "id": "RegionCommitmentsUpdateReservationsRequest", - "properties": { - "reservations": { - "description": "A list of two reservations to transfer GPUs and Local SSD disks between.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDiskTypeList": { - "id": "RegionDiskTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of DiskType resources.", - "items": { - "$ref": "DiskType" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionDiskTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#regionDiskTypeList for region disk types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionDisksAddResourcePoliciesRequest": { - "id": "RegionDisksAddResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be added to this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDisksRemoveResourcePoliciesRequest": { - "id": "RegionDisksRemoveResourcePoliciesRequest", - "properties": { - "resourcePolicies": { - "description": "Resource policies to be removed from this disk.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionDisksResizeRequest": { - "id": "RegionDisksResizeRequest", - "properties": { - "sizeGb": { - "description": "The new size of the regional persistent disk, which is specified in GB.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "RegionDisksStartAsyncReplicationRequest": { - "id": "RegionDisksStartAsyncReplicationRequest", - "properties": { - "asyncSecondaryDisk": { - "description": "The secondary disk to start asynchronous replication to.\nYou can provide this as a partial or full URL to the resource. For example,\nthe following are valid values:\n \n \n - \n https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk\n \n - \n https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk\n \n - \n projects/project/zones/zone/disks/disk\n \n - \n projects/project/regions/region/disks/disk\n \n - \n zones/zone/disks/disk\n \n - \n regions/region/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupList": { - "description": "Contains a list of InstanceGroup resources.", - "id": "RegionInstanceGroupList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroup resources.", - "items": { - "$ref": "InstanceGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupList", - "description": "The resource type.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerDeleteInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.deletePerInstanceConfigs", - "id": "RegionInstanceGroupManagerDeleteInstanceConfigReq", - "properties": { - "names": { - "description": "The list of instance names for which we want to delete per-instance configs\non this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerList": { - "description": "Contains a list of managed instance groups.", - "id": "RegionInstanceGroupManagerList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceGroupManager resources.", - "items": { - "$ref": "InstanceGroupManager" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupManagerList", - "description": "[Output Only] The resource type, which is always\ncompute#instanceGroupManagerList for a list of managed instance groups that\nexist in th regional scope.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerPatchInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.patchPerInstanceConfigs", - "id": "RegionInstanceGroupManagerPatchInstanceConfigReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerResizeRequestsListResponse": { - "id": "RegionInstanceGroupManagerResizeRequestsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Resize Request resources.", - "items": { - "$ref": "InstanceGroupManagerResizeRequest" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupManagerResizeRequestList", - "description": "[Output Only] Type of the resource. Alwayscompute#regionInstanceGroupManagerResizeRequestList for\na list of Resize Requests.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagerUpdateInstanceConfigReq": { - "description": "RegionInstanceGroupManagers.updatePerInstanceConfigs", - "id": "RegionInstanceGroupManagerUpdateInstanceConfigReq", - "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configurations to insert or patch on this managed\ninstance group.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersAbandonInstancesRequest": { - "id": "RegionInstanceGroupManagersAbandonInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to abandon. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersApplyUpdatesRequest": { - "description": "RegionInstanceGroupManagers.applyUpdatesToInstances", - "id": "RegionInstanceGroupManagersApplyUpdatesRequest", - "properties": { - "allInstances": { - "description": "Flag to update all instances instead of specified list of “instances”.\nIf the flag is set to true then the instances may not be specified\nin the request.", - "type": "boolean" - }, - "instances": { - "description": "The list of URLs of one or more instances for which you want to apply\nupdates. Each URL can be a full URL or a partial URL, such aszones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minimalAction": { - "description": "The minimal action that you want to perform on each instance during the\nupdate:\n \n \n - REPLACE: At minimum, delete the instance and create it\n again. \n - RESTART: Stop the instance and start it\n again. \n - REFRESH: Do not stop the instance and limit\n disruption as much as possible. \n - NONE: Do not\n disrupt the instance at all.\n\n\nBy default, the minimum action is NONE. If your update\nrequires a more disruptive action than you set with this flag, the\nnecessary action is performed to execute the update.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - }, - "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that you want to perform on each instance during\nthe update:\n \n \n - REPLACE: Delete the instance and create it again.\n - RESTART: Stop the instance and start it again.\n - REFRESH: Do not stop the instance and limit disruption\n as much as possible. \n - NONE: Do not disrupt the\n instance at all.\n\n\nBy default, the most disruptive allowed action is REPLACE. If\nyour update requires a more disruptive action than you set with this flag,\nthe update request will fail.", - "enum": [ - "NONE", - "REFRESH", - "REPLACE", - "RESTART" - ], - "enumDescriptions": [ - "Do not perform any action.", - "Do not stop the instance.", - "(Default.) Replace the instance according to the replacement method\noption.", - "Stop the instance and start it again." - ], - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersCreateInstancesRequest": { - "description": "RegionInstanceGroupManagers.createInstances", - "id": "RegionInstanceGroupManagersCreateInstancesRequest", - "properties": { - "instances": { - "description": "[Required] List of specifications of per-instance configs.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersDeleteInstancesRequest": { - "id": "RegionInstanceGroupManagersDeleteInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to delete. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - }, - "skipInstancesOnValidationError": { - "description": "Specifies whether the request should proceed despite the inclusion of\ninstances that are not members of the group or that are already in the\nprocess of being deleted or abandoned. If this field is set to `false` and\nsuch an instance is specified in the request, the operation fails. The\noperation always fails if the request contains a malformed instance URL or\na reference to an instance that exists in a zone or region other than the\ngroup's zone or region.", - "type": "boolean" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListErrorsResponse": { - "id": "RegionInstanceGroupManagersListErrorsResponse", - "properties": { - "items": { - "description": "[Output Only] The list of errors of the managed instance group.", - "items": { - "$ref": "InstanceManagedByIgmError" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListInstanceConfigsResp": { - "id": "RegionInstanceGroupManagersListInstanceConfigsResp", - "properties": { - "items": { - "description": "[Output Only] The list of PerInstanceConfig.", - "items": { - "$ref": "PerInstanceConfig" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersListInstancesResponse": { - "id": "RegionInstanceGroupManagersListInstancesResponse", - "properties": { - "managedInstances": { - "description": "A list of managed instances.", - "items": { - "$ref": "ManagedInstance" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersRecreateRequest": { - "id": "RegionInstanceGroupManagersRecreateRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to recreate. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersResizeAdvancedRequest": { - "id": "RegionInstanceGroupManagersResizeAdvancedRequest", - "properties": { - "noCreationRetries": { - "description": "If this flag is true, the managed instance group attempts to create all\ninstances initiated by this resize request only once. If there is an error\nduring creation, the managed instance group does not retry create this\ninstance, and we will decrease the targetSize of the request\ninstead. If the flag is false, the group attempts to recreate each instance\ncontinuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance.\nAfter an instance is successfully created while this flag is enabled, the\ninstance behaves the same way as all the other instances created with a\nregular resize request. In particular, if a running instance dies\nunexpectedly at a later time and needs to be recreated, this mode does not\naffect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not\ninfluence other resize requests in any way.\n\nYou can see which instances ar being created in which mode by calling\nthe get or listManagedInstances API.", - "type": "boolean" - }, - "targetSize": { - "description": "The number of running instances that the managed instance group should\nmaintain at any given time. The group automatically adds or removes\ninstances to maintain the number of instances specified by this parameter.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersResumeInstancesRequest": { - "id": "RegionInstanceGroupManagersResumeInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to resume. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetAutoHealingRequest": { - "id": "RegionInstanceGroupManagersSetAutoHealingRequest", - "properties": { - "autoHealingPolicies": { - "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetTargetPoolsRequest": { - "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", - "properties": { - "fingerprint": { - "description": "Fingerprint of the target pools information, which is a hash of the\ncontents. This field is used for optimistic locking when you update the\ntarget pool entries. This field is optional.", - "format": "byte", - "type": "string" - }, - "targetPools": { - "description": "The URL of all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically\napply to all of the instances in the managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSetTemplateRequest": { - "id": "RegionInstanceGroupManagersSetTemplateRequest", - "properties": { - "instanceTemplate": { - "description": "URL of the InstanceTemplate resource from which all new instances will be\ncreated.", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersStartInstancesRequest": { - "id": "RegionInstanceGroupManagersStartInstancesRequest", - "properties": { - "instances": { - "description": "The URLs of one or more instances to start. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersStopInstancesRequest": { - "id": "RegionInstanceGroupManagersStopInstancesRequest", - "properties": { - "forceStop": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nstop the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to stop. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupManagersSuspendInstancesRequest": { - "id": "RegionInstanceGroupManagersSuspendInstancesRequest", - "properties": { - "forceSuspend": { - "description": "If this flag is set to true, the Instance Group Manager will proceed to\nsuspend the instances, skipping initialization on them.", - "type": "boolean" - }, - "instances": { - "description": "The URLs of one or more instances to suspend. This can be a full URL or\na partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionInstanceGroupsListInstances": { - "id": "RegionInstanceGroupsListInstances", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InstanceWithNamedPorts resources.", - "items": { - "$ref": "InstanceWithNamedPorts" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionInstanceGroupsListInstances", - "description": "The resource type.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionInstanceGroupsListInstancesRequest": { - "id": "RegionInstanceGroupsListInstancesRequest", - "properties": { - "instanceState": { - "description": "Instances in which state should be returned. Valid options are:\n'ALL', 'RUNNING'. By default, it lists all instances.", - "enum": [ - "ALL", - "RUNNING" - ], - "enumDescriptions": [ - "Matches any status of the instances, running, non-running and others.", - "Instance is in RUNNING state if it is running." - ], - "type": "string" - }, - "portName": { - "description": "Name of port user is interested in. It is optional. If it is set, only\ninformation about this ports will be returned. If it is not set, all the\nnamed ports will be returned.\nAlways lists all instances.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - } - }, - "type": "object" - }, - "RegionInstanceGroupsSetNamedPortsRequest": { - "id": "RegionInstanceGroupsSetNamedPortsRequest", - "properties": { - "fingerprint": { - "description": "The fingerprint of the named ports information for this instance group.\nUse this optional property to prevent conflicts when multiple users change\nthe named ports settings concurrently. Obtain the fingerprint with theinstanceGroups.get\nmethod. Then, include the fingerprint in your request to ensure that you\ndo not overwrite changes that were applied from another\nconcurrent request.", - "format": "byte", - "type": "string" - }, - "namedPorts": { - "description": "The list of named ports to set for this instance group.", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionList": { - "description": "Contains a list of region resources.", - "id": "RegionList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Region resources.", - "items": { - "$ref": "Region" - }, - "type": "array" - }, - "kind": { - "default": "compute#regionList", - "description": "[Output Only] Type of resource. Always compute#regionList for\nlists of regions.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RegionNetworkEndpointGroupsAttachEndpointsRequest": { - "id": "RegionNetworkEndpointGroupsAttachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be attached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkEndpointGroupsDetachEndpointsRequest": { - "id": "RegionNetworkEndpointGroupsDetachEndpointsRequest", - "properties": { - "networkEndpoints": { - "description": "The list of network endpoints to be detached.", - "items": { - "$ref": "NetworkEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse": { - "id": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse", - "properties": { - "firewallPolicys": { - "description": "[Output only] Effective firewalls from firewall policy. It applies to\nRegional Network Firewall Policies in the specified region, Global Network\nFirewall Policies and Hierachial Firewall Policies which are associated\nwith the network.", - "items": { - "$ref": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" - }, - "type": "array" - }, - "firewalls": { - "description": "Effective firewalls on the network.", - "items": { - "$ref": "Firewall" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy": { - "id": "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", - "properties": { - "displayName": { - "description": "[Output Only] The display name of the firewall policy.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the firewall policy.", - "type": "string" - }, - "packetMirroringRules": { - "description": "[Output only] The packet mirroring rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "priority": { - "description": "[Output only] Priority of firewall policy association. Not applicable for\ntype=HIERARCHY.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "[Output only] The rules that apply to the network.", - "items": { - "$ref": "FirewallPolicyRule" - }, - "type": "array" - }, - "type": { - "description": "[Output Only] The type of the firewall policy. Can be one of HIERARCHY,\nNETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.", - "enum": [ - "HIERARCHY", - "NETWORK", - "NETWORK_REGIONAL", - "SYSTEM_GLOBAL", - "SYSTEM_REGIONAL", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RegionSetLabelsRequest": { - "id": "RegionSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash in order to update or change\nlabels. Make a get() request to the resource to get the latest\nfingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "RegionSetPolicyRequest": { - "id": "RegionSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backwacd compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "RegionTargetHttpsProxiesSetSslCertificatesRequest": { - "id": "RegionTargetHttpsProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of SslCertificate resources to associate\nwith this TargetHttpsProxy resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegionUrlMapsValidateRequest": { - "id": "RegionUrlMapsValidateRequest", - "properties": { - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - }, - "type": "object" - }, - "RequestMirrorPolicy": { - "description": "A policy that specifies how requests intended for the route's backends\nare shadowed to a separate mirrored backend service. The load balancer\ndoesn't wait for responses from the shadow service. Before sending traffic\nto the shadow service, the host or authority header is suffixed with-shadow.", - "id": "RequestMirrorPolicy", - "properties": { - "backendService": { - "description": "The full or partial URL to the BackendService resource being\nmirrored to.\n\nThe backend service configured for a mirroring\npolicy must reference backends that are of the same type as the original\nbackend service matched in the URL map.\n\nServerless NEG backends are not currently supported as a mirrored\nbackend service.", - "type": "string" - }, - "mirrorPercent": { - "description": "The percentage of requests to be mirrored to `backend_service`.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "Reservation": { - "description": "Represents a reservation resource. A reservation ensures that capacity is\nheld in a specific zone even if the reserved VMs are not running. For more\ninformation, read Reserving zonal\nresources.", - "id": "Reservation", - "properties": { - "advancedDeploymentControl": { - "$ref": "ReservationAdvancedDeploymentControl", - "description": "Advanced control for cluster management, applicable only to DENSE\ndeployment type reservations." - }, - "aggregateReservation": { - "$ref": "AllocationAggregateReservation", - "description": "Reservation for aggregated resources, providing shape flexibility." - }, - "commitment": { - "description": "[Output Only] Full or partial URL to a parent commitment. This field\ndisplays for reservations that are tied to a commitment.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deleteAfterDuration": { - "$ref": "Duration", - "description": "Duration time relative to reservation creation when Compute Engine will\nautomatically delete this resource." - }, - "deleteAtTime": { - "description": "Absolute time in future when the reservation will be\n auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.", - "type": "string" - }, - "deploymentType": { - "description": "Specifies the deployment strategy for this reservation.", - "enum": [ - "DENSE", - "DEPLOYMENT_TYPE_UNSPECIFIED", - "FLEXIBLE" - ], - "enumDescriptions": [ - "The reserved capacity is made up of densely deployed reservation blocks.", - "", - "The reserved capacity is made up of highly flexible, logical reservation\nblocks." - ], - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enableEmergentMaintenance": { - "description": "Indicates whether Compute Engine allows unplanned maintenance for your VMs;\nfor example, to fix hardware errors.", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#reservation", - "description": "[Output Only] Type of the resource. Alwayscompute#reservations for reservations.", - "type": "string" - }, - "linkedCommitments": { - "description": "[Output Only] Full or partial URL to parent commitments. This field\ndisplays for reservations that are tied to multiple commitments.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "protectionTier": { - "description": "Protection tier for the workload which specifies the workload expectations\nin the event of infrastructure failures at data center (e.g. power\nand/or cooling failures).", - "enum": [ - "CAPACITY_OPTIMIZED", - "PROTECTION_TIER_UNSPECIFIED", - "STANDARD" - ], - "enumDescriptions": [ - "CAPACITY_OPTIMIZED capacity leverages redundancies (e.g. power, cooling)\nat the data center during normal operating conditions. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload may be disrupted. As a consequence, it has a\nweaker availability SLO than STANDARD.", - "Unspecified protection tier.", - "STANDARD protection for workload that should be protected by redundancies\n(e.g. power, cooling) at the data center level. In the event of\ninfrastructure failures at data center (e.g. power and/or cooling\nfailures), this workload is expected to continue as normal using the\nredundancies." - ], - "type": "string" - }, - "reservationMode": { - "description": "[Output only] Indicates the reservation mode of the reservation.", - "enum": [ - "CALENDAR", - "DEFAULT", - "RESERVATION_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delivered reservations terminate at specified endtime along with\nterminating VMs running on it. The price for this reservation is\ndifferent from on-demand. Currently offered for A3+ GPUs and TPUs only.", - "The delivered reservations do not terminate VMs at the end of\nreservations. On-demand pricing and available for all VM families.\nThis is default mode.", - "" - ], - "type": "string" - }, - "reservationSharingPolicy": { - "$ref": "AllocationReservationSharingPolicy", - "description": "Specify the reservation sharing policy. If unspecified, the reservation\nwill not be shared with Google Cloud managed services." - }, - "resourcePolicies": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource policies to be added to this reservation. The key is defined by\nuser, and the value is resource policy url. This is to define placement\npolicy with reservation.", - "type": "object" - }, - "resourceStatus": { - "$ref": "AllocationResourceStatus", - "description": "[Output Only] Status information for Reservation resource." - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "schedulingType": { - "description": "The type of maintenance for the reservation.", - "enum": [ - "GROUPED", - "GROUP_MAINTENANCE_TYPE_UNSPECIFIED", - "INDEPENDENT" - ], - "enumDescriptions": [ - "Maintenance on all reserved instances in the reservation is synchronized.", - "Unknown maintenance type.", - "Maintenance is not synchronized for this reservation. Instead, each\ninstance has its own maintenance window." - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "shareSettings": { - "$ref": "ShareSettings", - "description": "Specify share-settings to create a shared reservation. This property is\noptional. For more information about the syntax and options for this\nfield and its subfields, see the guide for creating\na shared reservation." - }, - "specificReservation": { - "$ref": "AllocationSpecificSKUReservation", - "description": "Reservation for instances with specific machine shapes." - }, - "specificReservationRequired": { - "description": "Indicates whether the reservation can be consumed by VMs with affinity\nfor \"any\" reservation. If the field is set, then only VMs that target\nthe reservation by name can consume from this reservation.", - "type": "boolean" - }, - "status": { - "description": "[Output Only] The status of the reservation.\n \n \n - CREATING: Reservation resources are being\n allocated.\n - READY: Reservation resources have been allocated,\n and the reservation is ready for use.\n - DELETING: Reservation deletion is in progress.\n - UPDATING: Reservation update is in progress.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY", - "UPDATING" - ], - "enumDescriptions": [ - "Reservation resources are being allocated.", - "Reservation deletion is in progress.", - "", - "Reservation resources have been allocated, and the reservation is ready\nfor use.", - "Reservation update is in progress." - ], - "type": "string" - }, - "zone": { - "description": "Zone in which the reservation resides. A zone must be provided if the\nreservation is created within a commitment.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationAdvancedDeploymentControl": { - "description": "Advance control for cluster management, applicable only to DENSE deployment\ntype reservations.", - "id": "ReservationAdvancedDeploymentControl", - "properties": { - "reservationOperationalMode": { - "description": "Indicates chosen reservation operational mode for the reservation.", - "enum": [ - "ALL_CAPACITY", - "HIGHLY_AVAILABLE_CAPACITY", - "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Google Cloud does not manage the failure of machines, but provides\nadditional capacity, which is not guaranteed to be available.", - "Google Cloud manages the failure of machines to provide high\navailability.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationAffinity": { - "description": "Specifies the reservations that this instance can consume from.", - "id": "ReservationAffinity", - "properties": { - "consumeReservationType": { - "description": "Specifies the type of reservation from which this instance can consume\nresources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or NO_RESERVATION. See\nConsuming reserved instances for examples.", - "enum": [ - "ANY_RESERVATION", - "NO_RESERVATION", - "SPECIFIC_RESERVATION", - "SPECIFIC_THEN_ANY_RESERVATION", - "SPECIFIC_THEN_NO_RESERVATION", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Consume any allocation available.", - "Do not consume from any allocated capacity.", - "Must consume from a specific reservation. Must specify key value fields\nfor specifying the reservations.", - "Prefer to consume from a specific reservation, but still consume any\nreservation available if the specified reservation is not available or\nexhausted. Must specify key value fields for specifying the reservations.", - "Prefer to consume from a specific reservation, but still consume\nfrom the on-demand pool if the specified reservation is exhausted. Must\nspecify key value fields for specifying the reservations.", - "" - ], - "type": "string" - }, - "key": { - "description": "Corresponds to the label key of a reservation resource. To target aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the key and specify\nthe name of your reservation as its value.", - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of a reservation resource. This can be\neither a name to a reservation in the same project or\n\"projects/different-project/reservations/some-reservation-name\" to target a\nshared reservation in the same zone but in a different project.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationAggregatedList": { - "description": "Contains a list of reservations.", - "id": "ReservationAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ReservationsScopedList", - "description": "Name of the scope containing this set of reservations." - }, - "description": "A list of Allocation resources.", - "type": "object" - }, - "kind": { - "default": "compute#reservationAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationBlock": { - "description": "Represents a reservation block resource.", - "id": "ReservationBlock", - "properties": { - "count": { - "description": "[Output Only] The number of resources that are allocated in this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "healthInfo": { - "$ref": "ReservationBlockHealthInfo", - "description": "[Output Only] Health information for the reservation block." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] The number of instances that are currently in use on this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances running\non the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#reservationBlock", - "description": "[Output Only] Type of the resource. Alwayscompute#reservationBlock for reservation blocks.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of this reservation block generated by Google\nCompute Engine. The name must be 1-63 characters long, and comply with\nRFC1035 @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalTopology": { - "$ref": "ReservationBlockPhysicalTopology", - "description": "[Output Only] The physical topology of the reservation block." - }, - "reservationMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "[Output Only] Maintenance information for this reservation block." - }, - "reservationSubBlockCount": { - "description": "[Output Only] The number of reservation subBlocks associated with this\nreservation block.", - "format": "int32", - "type": "integer" - }, - "reservationSubBlockInUseCount": { - "description": "[Output Only] The number of in-use reservation subBlocks associated with\nthis reservation block. If at least one VM is running on a subBlock, it is\nconsidered in-use.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the reservation block.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated for the reservation block.", - "Reservation block is currently being deleted.", - "", - "Reservation block has allocated all its resources." - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] Zone in which the reservation block resides.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlockHealthInfo": { - "description": "Health information for the reservation block.", - "id": "ReservationBlockHealthInfo", - "properties": { - "degradedSubBlockCount": { - "description": "The number of subBlocks that are degraded.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation block.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation block is degraded.", - "The reservation block is healthy.", - "The health status of the reservation block is unspecified." - ], - "type": "string" - }, - "healthySubBlockCount": { - "description": "The number of subBlocks that are healthy.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopology": { - "id": "ReservationBlockPhysicalTopology", - "properties": { - "block": { - "description": "The hash of the capacity block within the cluster.", - "type": "string" - }, - "cluster": { - "description": "The cluster name of the reservation block.", - "type": "string" - }, - "instances": { - "description": "The detailed instances information for a given Block", - "items": { - "$ref": "ReservationBlockPhysicalTopologyInstance" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopologyInstance": { - "description": "The instances information for a given Block", - "id": "ReservationBlockPhysicalTopologyInstance", - "properties": { - "instanceId": { - "description": "The InstanceId of the instance", - "format": "uint64", - "type": "string" - }, - "physicalHostTopology": { - "$ref": "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", - "description": "The PhysicalHostTopology of instances within a Block resource." - }, - "projectId": { - "description": "Project where the instance lives", - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology": { - "description": "The PhysicalHostTopology of the instance within a Block resource.", - "id": "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", - "properties": { - "host": { - "description": "Host hash for a given instance", - "type": "string" - }, - "subBlock": { - "description": "Sub block hash for a given instance", - "type": "string" - } - }, - "type": "object" - }, - "ReservationBlocksGetResponse": { - "id": "ReservationBlocksGetResponse", - "properties": { - "resource": { - "$ref": "ReservationBlock" - } - }, - "type": "object" - }, - "ReservationBlocksListResponse": { - "description": "A list of reservation blocks under a single reservation.", - "id": "ReservationBlocksListResponse", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of reservation block resources.", - "items": { - "$ref": "ReservationBlock" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationBlock", - "description": "Type of the resource. Alwayscompute#reservationBlock for a list of reservation blocks.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationList": { - "id": "ReservationList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of Allocation resources.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationList", - "description": "[Output Only] Type of resource.Always compute#reservationsList\nfor listsof reservations", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationSubBlock": { - "description": "Represents a reservation subBlock resource.", - "id": "ReservationSubBlock", - "properties": { - "acceleratorTopologiesInfo": { - "$ref": "AcceleratorTopologiesInfo", - "description": "[Output Only] Slice info for the reservation subBlock." - }, - "count": { - "description": "[Output Only] The number of hosts that are allocated in this\nreservation subBlock.", - "format": "int32", - "type": "integer" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339 text format.", - "type": "string" - }, - "healthInfo": { - "$ref": "ReservationSubBlockHealthInfo", - "description": "[Output Only] Health information for the reservation subBlock." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "inUseCount": { - "description": "[Output Only] The number of instances that are currently in use on this\nreservation subBlock.", - "format": "int32", - "type": "integer" - }, - "inUseHostCount": { - "description": "Number of hosts currently in use. If there is one or more Instances running\non the host, it is considered in use.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#reservationSubBlock", - "description": "[Output Only] Type of the resource. Alwayscompute#reservationSubBlock for reservation subBlocks.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of this reservation subBlock generated by Google\nCompute Engine. The name must be 1-63 characters long, and comply with\nRFC1035 @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "physicalTopology": { - "$ref": "ReservationSubBlockPhysicalTopology", - "description": "[Output Only] The physical topology of the reservation subBlock." - }, - "reservationSubBlockMaintenance": { - "$ref": "GroupMaintenanceInfo", - "description": "Maintenance information for this reservation subBlock." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the reservation subBlock.", - "enum": [ - "CREATING", - "DELETING", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resources are being allocated for the reservation subBlock.", - "Reservation subBlock is currently being deleted.", - "", - "Reservation subBlock has allocated all its resources." - ], - "type": "string" - }, - "zone": { - "description": "[Output Only] Zone in which the reservation subBlock resides.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationSubBlockHealthInfo": { - "description": "Health information for the reservation subBlock.", - "id": "ReservationSubBlockHealthInfo", - "properties": { - "degradedHostCount": { - "description": "The number of degraded hosts in the reservation subBlock.", - "format": "int32", - "type": "integer" - }, - "degradedInfraCount": { - "description": "The number of degraded infrastructure (e.g NV link domain) in the\nreservation subblock.", - "format": "int32", - "type": "integer" - }, - "healthStatus": { - "description": "The health status of the reservation subBlock.", - "enum": [ - "DEGRADED", - "HEALTHY", - "HEALTH_STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The reservation subBlock is degraded.", - "The reservation subBlock is healthy.", - "The health status of the reservation subBlock is unspecified." - ], - "type": "string" - }, - "healthyHostCount": { - "description": "The number of healthy hosts in the reservation subBlock.", - "format": "int32", - "type": "integer" - }, - "healthyInfraCount": { - "description": "The number of healthy infrastructure (e.g NV link domain) in the\nreservation subblock.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ReservationSubBlockPhysicalTopology": { - "id": "ReservationSubBlockPhysicalTopology", - "properties": { - "block": { - "description": "The hash of the capacity block within the cluster.", - "type": "string" - }, - "cluster": { - "description": "The cluster name of the reservation subBlock.", - "type": "string" - }, - "subBlock": { - "description": "The hash of the capacity sub-block within the capacity block.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationSubBlocksGetResponse": { - "id": "ReservationSubBlocksGetResponse", - "properties": { - "resource": { - "$ref": "ReservationSubBlock" - } - }, - "type": "object" - }, - "ReservationSubBlocksListResponse": { - "description": "A list of reservation subBlocks under a single reservation.", - "id": "ReservationSubBlocksListResponse", - "properties": { - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of reservation subBlock resources.", - "items": { - "$ref": "ReservationSubBlock" - }, - "type": "array" - }, - "kind": { - "default": "compute#reservationSubBlock", - "description": "Type of the resource. Alwayscompute#reservationSubBlock for a list of reservation\nsubBlocks.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ReservationSubBlocksReportFaultyRequest": { - "id": "ReservationSubBlocksReportFaultyRequest", - "properties": { - "disruptionSchedule": { - "description": "The disruption schedule for the subBlock.", - "enum": [ - "DISRUPTION_SCHEDULE_UNSPECIFIED", - "IMMEDIATE" - ], - "enumDescriptions": [ - "", - "All VMs will be disrupted immediately." - ], - "type": "string" - }, - "failureComponent": { - "description": "The component that experienced the fault.", - "enum": [ - "FAILURE_COMPONENT_UNSPECIFIED", - "MULTIPLE_FAULTY_HOSTS", - "NVLINK_SWITCH" - ], - "enumDescriptions": [ - "", - "Multiple hosts experienced the fault.", - "The NVLink switch experienced the fault." - ], - "type": "string" - }, - "faultReasons": { - "description": "The reasons for the fault experienced with the subBlock.", - "items": { - "$ref": "ReservationSubBlocksReportFaultyRequestFaultReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationSubBlocksReportFaultyRequestFaultReason": { - "description": "The reason for the fault experienced with the subBlock.", - "id": "ReservationSubBlocksReportFaultyRequestFaultReason", - "properties": { - "behavior": { - "description": "The behavior of the fault experienced with the subBlock.", - "enum": [ - "FAULT_BEHAVIOR_UNSPECIFIED", - "GPU_ERROR", - "PERFORMANCE", - "SILENT_DATA_CORRUPTION", - "SWITCH_FAILURE" - ], - "enumDescriptions": [ - "", - "The subBlock experienced a GPU error.", - "The subBlock experienced performance issues.", - "The subBlock experienced silent data corruption.", - "The subBlock experienced a switch failure." - ], - "type": "string" - }, - "description": { - "description": "The description of the fault experienced with the subBlock.", - "type": "string" - } - }, - "type": "object" - }, - "ReservationsBlocksPerformMaintenanceRequest": { - "id": "ReservationsBlocksPerformMaintenanceRequest", - "properties": { - "maintenanceScope": { - "description": "Specifies if all, running or unused hosts are in scope for this request.", - "enum": [ - "ALL", - "MAINTENANCE_SCOPE_UNSPECIFIED", - "RUNNING_VMS", - "UNUSED_CAPACITY" - ], - "enumDescriptions": [ - "Trigger maintenance for all hosts belonging to this reservation\nirrespective of whether VMs are running on them or not.", - "Internal only", - "Trigger maintenance only on the hosts belonging to this reservation which\nhave VMs running on them.", - "Trigger maintenance only on the hosts belonging to this reservation which\ndo not have any VMs running on them. This is not allowed for Standard ExR" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationsPerformMaintenanceRequest": { - "id": "ReservationsPerformMaintenanceRequest", - "properties": { - "maintenanceScope": { - "description": "Specifies if all, running or unused hosts are in scope for this request.", - "enum": [ - "ALL", - "MAINTENANCE_SCOPE_UNSPECIFIED", - "RUNNING_VMS", - "UNUSED_CAPACITY" - ], - "enumDescriptions": [ - "Trigger maintenance for all hosts belonging to this reservation\nirrespective of whether VMs are running on them or not.", - "Internal only", - "Trigger maintenance only on the hosts belonging to this reservation which\nhave VMs running on them.", - "Trigger maintenance only on the hosts belonging to this reservation which\ndo not have any VMs running on them. This is not allowed for Standard ExR" - ], - "type": "string" - } - }, - "type": "object" - }, - "ReservationsResizeRequest": { - "id": "ReservationsResizeRequest", - "properties": { - "specificSkuCount": { - "description": "Number of allocated resources can be resized with minimum = 1 and\nmaximum = 1000.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ReservationsScopedList": { - "id": "ReservationsScopedList", - "properties": { - "reservations": { - "description": "A list of reservations contained in this scope.", - "items": { - "$ref": "Reservation" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of reservations when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourceCommitment": { - "description": "Commitment for a particular hardware resource (a commitment is composed of\none or more of these).", - "id": "ResourceCommitment", - "properties": { - "acceleratorType": { - "description": "Name of the accelerator type or GPU resource. Specify this field only when\nthe type of hardware resource is ACCELERATOR.", - "type": "string" - }, - "amount": { - "description": "The quantity of the hardware resource that you want to commit to purchasing\n(in a type-dependent unit).\n \n - For vCPUs, you must specify an integer value.\n - For memory, you specify the amount of MB that you want. The value you\n specify must be a multiple of 256 MB, with up to 6.5 GB of\n memory per every vCPU.\n - For GPUs, you must specify an integer value.\n - For Local SSD disks, you must specify the amount in GB. The size of a\n single Local SSD disk is 375 GB.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "The type of hardware resource that you want to specify.\nYou can specify any of the following values:\n \n - VCPU\n - MEMORY\n - LOCAL_SSD\n - ACCELERATOR\n\n\n\nSpecify as a separate entry in the list for each\nindividual resource type.", - "enum": [ - "ACCELERATOR", - "LOCAL_SSD", - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "properties": { - "group": { - "description": "A URI referencing one of the instance groups or network endpoint groups\nlisted in the backend service.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePoliciesScopedList": { - "id": "ResourcePoliciesScopedList", - "properties": { - "resourcePolicies": { - "description": "A list of resourcePolicies contained in this scope.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of resourcePolicies when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicy": { - "description": "Represents a Resource Policy resource. You can use resource policies to\nschedule actions for some Compute Engine resources. For example, you can\nuse them toschedule persistent disk\nsnapshots.", - "id": "ResourcePolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "type": "string" - }, - "diskConsistencyGroupPolicy": { - "$ref": "ResourcePolicyDiskConsistencyGroupPolicy", - "description": "Resource policy for disk consistency groups." - }, - "groupPlacementPolicy": { - "$ref": "ResourcePolicyGroupPlacementPolicy", - "description": "Resource policy for instances for placement configuration." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSchedulePolicy": { - "$ref": "ResourcePolicyInstanceSchedulePolicy", - "description": "Resource policy for scheduling instance operations." - }, - "kind": { - "default": "compute#resourcePolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instances.insert" - ] - }, - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The resource name must be 1-63 characters long, and comply\nwithRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "type": "string" - }, - "resourceStatus": { - "$ref": "ResourcePolicyResourceStatus", - "description": "[Output Only] The system status of the resource policy." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "snapshotSchedulePolicy": { - "$ref": "ResourcePolicySnapshotSchedulePolicy", - "description": "Resource policy for persistent disks for creating snapshots." - }, - "status": { - "description": "[Output Only] The status of resource policy creation.", - "enum": [ - "CREATING", - "DELETING", - "EXPIRED", - "INVALID", - "READY" - ], - "enumDescriptions": [ - "Resource policy is being created.", - "Resource policy is being deleted.", - "Resource policy is expired and will not run again.", - "", - "Resource policy is ready to be used." - ], - "type": "string" - }, - "workloadPolicy": { - "$ref": "ResourcePolicyWorkloadPolicy", - "description": "Resource policy for defining instance placement for MIGs." - } - }, - "type": "object" - }, - "ResourcePolicyAggregatedList": { - "description": "Contains a list of resourcePolicies.", - "id": "ResourcePolicyAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ResourcePoliciesScopedList", - "description": "Name of the scope containing this set of resourcePolicies." - }, - "description": "A list of ResourcePolicy resources.", - "type": "object" - }, - "kind": { - "default": "compute#resourcePolicyAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicyDailyCycle": { - "description": "Time window specified for daily operations.", - "id": "ResourcePolicyDailyCycle", - "properties": { - "daysInCycle": { - "description": "Defines a schedule with units measured in days. The value determines\nhow many days pass between the start of each cycle.", - "format": "int32", - "type": "integer" - }, - "duration": { - "description": "[Output only] A predetermined duration for the window, automatically\nchosen to be the smallest possible in the given scenario.", - "type": "string" - }, - "startTime": { - "description": "Start time of the window. This must be in UTC format that resolves to one\nof 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For\nexample, both 13:00-5 and 08:00 are valid.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyDiskConsistencyGroupPolicy": { - "description": "Resource policy for disk consistency groups.", - "id": "ResourcePolicyDiskConsistencyGroupPolicy", - "properties": {}, - "type": "object" - }, - "ResourcePolicyGroupPlacementPolicy": { - "description": "A GroupPlacementPolicy specifies resource placement configuration.\nIt specifies the failure bucket separation", - "id": "ResourcePolicyGroupPlacementPolicy", - "properties": { - "acceleratorTopologyMode": { - "description": "Specifies the connection mode for the accelerator topology. If not\nspecified, the default is AUTO_CONNECT.", - "enum": [ - "AUTO_CONNECT", - "PROVISION_ONLY" - ], - "enumDescriptions": [ - "The interconnected chips are pre-configured at the time of VM creation.", - "The interconnected chips are connected on demand. At the time of VM\ncreation, the chips are not connected." - ], - "type": "string" - }, - "availabilityDomainCount": { - "description": "The number of availability domains to spread instances across. If two\ninstances are in different availability domain, they are not in the same\nlow latency network.", - "format": "int32", - "type": "integer" - }, - "collocation": { - "description": "Specifies network collocation", - "enum": [ - "COLLOCATED", - "UNSPECIFIED_COLLOCATION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "gpuTopology": { - "description": "Specifies the shape of the GPU slice, in slice based GPU families eg.\nA4X.", - "type": "string" - }, - "maxDistance": { - "description": "Specifies the number of max logical switches.", - "format": "int32", - "type": "integer" - }, - "sliceCount": { - "description": "Specifies the number of slices in a multislice workload.", - "format": "int32", - "type": "integer" - }, - "tpuTopology": { - "description": "Specifies the shape of the TPU slice", - "type": "string" - }, - "vmCount": { - "description": "Number of VMs in this placement group. Google does not recommend that you\nuse this field unless you use a compact policy and you want your policy\nto work only if it contains this exact number of VMs.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ResourcePolicyHourlyCycle": { - "description": "Time window specified for hourly operations.", - "id": "ResourcePolicyHourlyCycle", - "properties": { - "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.", - "type": "string" - }, - "hoursInCycle": { - "description": "Defines a schedule with units measured in hours. The value determines\nhow many hours pass between the start of each cycle.", - "format": "int32", - "type": "integer" - }, - "startTime": { - "description": "Time within the window to start the operations.\nIt must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyInstanceSchedulePolicy": { - "description": "An InstanceSchedulePolicy specifies when and how frequent certain\noperations are performed on the instance.", - "id": "ResourcePolicyInstanceSchedulePolicy", - "properties": { - "expirationTime": { - "description": "The expiration time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - }, - "startTime": { - "description": "The start time of the schedule. The timestamp is an RFC3339 string.", - "type": "string" - }, - "timeZone": { - "description": "Specifies the time zone to be used in interpreting Schedule.schedule.\nThe value of this field must be a time zone name from the tz database:\nhttps://wikipedia.org/wiki/Tz_database.", - "type": "string" - }, - "vmStartSchedule": { - "$ref": "ResourcePolicyInstanceSchedulePolicySchedule", - "description": "Specifies the schedule for starting instances." - }, - "vmStopSchedule": { - "$ref": "ResourcePolicyInstanceSchedulePolicySchedule", - "description": "Specifies the schedule for stopping instances." - } - }, - "type": "object" - }, - "ResourcePolicyInstanceSchedulePolicySchedule": { - "description": "Schedule for an instance operation.", - "id": "ResourcePolicyInstanceSchedulePolicySchedule", - "properties": { - "schedule": { - "description": "Specifies the frequency for the operation, using the unix-cron format.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyList": { - "id": "ResourcePolicyList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of ResourcePolicy resources.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#resourcePolicyList", - "description": "[Output Only] Type of resource.Alwayscompute#resourcePoliciesList for listsof resourcePolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourcePolicyResourceStatus": { - "description": "Contains output only fields.\nUse this sub-message for all output fields set on ResourcePolicy.\nThe internal structure of this \"status\" field should mimic the structure\nof ResourcePolicy proto specification.", - "id": "ResourcePolicyResourceStatus", - "properties": { - "instanceSchedulePolicy": { - "$ref": "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", - "description": "[Output Only] Specifies a set of output values reffering to\nthe instance_schedule_policy system status.\nThis field should have the same name as corresponding policy field." - } - }, - "type": "object" - }, - "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus": { - "id": "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus", - "properties": { - "lastRunStartTime": { - "description": "[Output Only] The last time the schedule successfully ran.\nThe timestamp is an RFC3339 string.", - "type": "string" - }, - "nextRunStartTime": { - "description": "[Output Only] The next time the schedule is planned to run.\nThe actual time might be slightly different.\nThe timestamp is an RFC3339 string.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicy": { - "description": "A snapshot schedule policy specifies when and how frequently snapshots are\nto be created for the target disk. Also specifies how many and how long\nthese scheduled snapshots should be retained.", - "id": "ResourcePolicySnapshotSchedulePolicy", - "properties": { - "retentionPolicy": { - "$ref": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", - "description": "Retention policy applied to snapshots created by this resource policy." - }, - "schedule": { - "$ref": "ResourcePolicySnapshotSchedulePolicySchedule", - "description": "A Vm Maintenance Policy specifies what kind of infrastructure\nmaintenance we are allowed to perform on this VM and when. Schedule\nthat is applied to disks covered by this policy." - }, - "snapshotProperties": { - "$ref": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", - "description": "Properties with which snapshots are created such as labels, encryption\nkeys." - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicyRetentionPolicy": { - "description": "Policy for retention of scheduled snapshots.", - "id": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", - "properties": { - "maxRetentionDays": { - "description": "Maximum age of the snapshot that is allowed to be kept.", - "format": "int32", - "type": "integer" - }, - "onSourceDiskDelete": { - "description": "Specifies the behavior to apply to scheduled snapshots when\nthe source disk is deleted.", - "enum": [ - "APPLY_RETENTION_POLICY", - "KEEP_AUTO_SNAPSHOTS", - "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicySchedule": { - "description": "A schedule for disks where the schedueled operations are performed.", - "id": "ResourcePolicySnapshotSchedulePolicySchedule", - "properties": { - "dailySchedule": { - "$ref": "ResourcePolicyDailyCycle" - }, - "hourlySchedule": { - "$ref": "ResourcePolicyHourlyCycle" - }, - "weeklySchedule": { - "$ref": "ResourcePolicyWeeklyCycle" - } - }, - "type": "object" - }, - "ResourcePolicySnapshotSchedulePolicySnapshotProperties": { - "description": "Specified snapshot properties for scheduled snapshots created by this\npolicy.", - "id": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", - "properties": { - "chainName": { - "description": "Chain name that the snapshot is created in.", - "type": "string" - }, - "guestFlush": { - "description": "Indication to perform a 'guest aware' snapshot.", - "type": "boolean" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to scheduled snapshots. These can be later modified\nby the setLabels method. Label values may be empty.", - "type": "object" - }, - "region": { - "description": "Region where the snapshot is scoped to.", - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the auto snapshot (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourcePolicyWeeklyCycle": { - "description": "Time window specified for weekly operations.", - "id": "ResourcePolicyWeeklyCycle", - "properties": { - "dayOfWeeks": { - "description": "Up to 7 intervals/windows, one for each day of the week.", - "items": { - "$ref": "ResourcePolicyWeeklyCycleDayOfWeek" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourcePolicyWeeklyCycleDayOfWeek": { - "id": "ResourcePolicyWeeklyCycleDayOfWeek", - "properties": { - "day": { - "description": "Defines a schedule that runs on specific days of the week. Specify\none or more days. The following options are available:\nMONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.", - "enum": [ - "FRIDAY", - "INVALID", - "MONDAY", - "SATURDAY", - "SUNDAY", - "THURSDAY", - "TUESDAY", - "WEDNESDAY" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.", - "type": "string" - }, - "startTime": { - "description": "Time within the window to start the operations.\nIt must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePolicyWorkloadPolicy": { - "description": "Represents the workload policy.", - "id": "ResourcePolicyWorkloadPolicy", - "properties": { - "acceleratorTopology": { - "description": "Specifies the topology required to create a partition for VMs that have\ninterconnected GPUs.", - "type": "string" - }, - "acceleratorTopologyMode": { - "description": "Specifies the connection mode for the accelerator topology. If not\nspecified, the default is AUTO_CONNECT.", - "enum": [ - "AUTO_CONNECT", - "PROVISION_ONLY" - ], - "enumDescriptions": [ - "The interconnected chips are pre-configured at the time of VM creation.", - "The interconnected chips are connected on demand. At the time of VM\ncreation, the chips are not connected." - ], - "type": "string" - }, - "maxTopologyDistance": { - "description": "Specifies the maximum distance between instances.", - "enum": [ - "BLOCK", - "CLUSTER", - "SUBBLOCK" - ], - "enumDescriptions": [ - "VMs must be provisioned in the same block.", - "VMs must be provisioned in the same cluster.", - "VMs must be provisioned in the same subblock." - ], - "type": "string" - }, - "type": { - "description": "Specifies the intent of the instance placement in the MIG.", - "enum": [ - "HIGH_AVAILABILITY", - "HIGH_THROUGHPUT" - ], - "enumDescriptions": [ - "MIG spreads out the instances as much as possible for high availability.", - "MIG provisions instances as close to each other as possible for high\nthroughput." - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatus": { - "description": "Contains output only fields.\nUse this sub-message for actual values set on Instance attributes as compared\nto the value requested by the user (intent) in their instance CRUD calls.", - "id": "ResourceStatus", - "properties": { - "effectiveInstanceMetadata": { - "$ref": "ResourceStatusEffectiveInstanceMetadata", - "description": "[Output Only] Effective metadata is a field that consolidates project,\nzonal instance settings, and instance-level predefined metadata keys to\nprovide the overridden value for those metadata keys at the instance level." - }, - "physicalHost": { - "description": "[Output Only] The precise location of your instance within the zone's data\ncenter, including the block, sub-block, and host. The field is formatted as\nfollows: blockId/subBlockId/hostId.", - "type": "string" - }, - "physicalHostTopology": { - "$ref": "ResourceStatusPhysicalHostTopology", - "description": "[Output Only] A series of fields containing the global name of the Compute\nEngine cluster, as well as the ID of the block, sub-block, and host on\nwhich the running instance is located." - }, - "reservationConsumptionInfo": { - "$ref": "ResourceStatusReservationConsumptionInfo", - "description": "[Output Only] Reservation information that the instance is consuming from." - }, - "scheduling": { - "$ref": "ResourceStatusScheduling" - }, - "shutdownDetails": { - "$ref": "ResourceStatusShutdownDetails", - "description": "[Output Only] Details about the instance stopping state." - }, - "upcomingMaintenance": { - "$ref": "UpcomingMaintenance" - } - }, - "type": "object" - }, - "ResourceStatusEffectiveInstanceMetadata": { - "description": "Effective values of predefined metadata keys for an instance.", - "id": "ResourceStatusEffectiveInstanceMetadata", - "properties": { - "blockProjectSshKeysMetadataValue": { - "description": "Effective block-project-ssh-keys value at Instance level.", - "type": "boolean" - }, - "enableGuestAttributesMetadataValue": { - "description": "Effective enable-guest-attributes value at Instance level.", - "type": "boolean" - }, - "enableOsInventoryMetadataValue": { - "description": "Effective enable-os-inventory value at Instance level.", - "type": "boolean" - }, - "enableOsconfigMetadataValue": { - "description": "Effective enable-osconfig value at Instance level.", - "type": "boolean" - }, - "enableOsloginMetadataValue": { - "description": "Effective enable-oslogin value at Instance level.", - "type": "boolean" - }, - "serialPortEnableMetadataValue": { - "description": "Effective serial-port-enable value at Instance level.", - "type": "boolean" - }, - "serialPortLoggingEnableMetadataValue": { - "description": "Effective serial-port-logging-enable value at Instance level.", - "type": "boolean" - }, - "vmDnsSettingMetadataValue": { - "description": "Effective VM DNS setting at Instance level.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusPhysicalHostTopology": { - "description": "Represents the physical host topology of the host on which the VM is\nrunning.", - "id": "ResourceStatusPhysicalHostTopology", - "properties": { - "block": { - "description": "[Output Only] The ID of the block in which the running instance is\nlocated. Instances within the same block experience low network latency.", - "type": "string" - }, - "cluster": { - "description": "[Output Only] The global name of the Compute Engine cluster where the\nrunning instance is located.", - "type": "string" - }, - "host": { - "description": "[Output Only] The ID of the host on which the running instance is located.\nInstances on the same host experience the lowest possible network\nlatency.", - "type": "string" - }, - "subblock": { - "description": "[Output Only] The ID of the sub-block in which the running instance is\nlocated. Instances in the same sub-block experience lower network latency\nthan instances in the same block.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusReservationConsumptionInfo": { - "description": "Reservation consumption information that the instance is consuming from.", - "id": "ResourceStatusReservationConsumptionInfo", - "properties": { - "consumedReservation": { - "description": "[Output Only] The full resource name of the reservation that this\ninstance is consuming from.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusScheduling": { - "id": "ResourceStatusScheduling", - "properties": { - "availabilityDomain": { - "description": "Specifies the availability domain to place the instance in. The value\nmust be a number between 1 and the number of availability domains\nspecified in the spread placement policy attached to the instance.", - "format": "int32", - "type": "integer" - }, - "terminationTimestamp": { - "description": "Time in future when the instance will be terminated inRFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceStatusShutdownDetails": { - "description": "Specifies if the instance is in `PENDING_STOP` state or there is a\nprogrammed stop scheduled.", - "id": "ResourceStatusShutdownDetails", - "properties": { - "maxDuration": { - "$ref": "Duration", - "description": "The duration for graceful shutdown. Only applicable when\n`stop_state=PENDING_STOP`." - }, - "requestTimestamp": { - "description": "Past timestamp indicating the beginning of current `stopState` in RFC3339 text format.", - "type": "string" - }, - "stopState": { - "description": "Current stopping state of the instance.", - "enum": [ - "PENDING_STOP", - "STOPPING" - ], - "enumDescriptions": [ - "The instance is gracefully shutting down.", - "The instance is stopping." - ], - "type": "string" - }, - "targetState": { - "description": "Target instance state.", - "enum": [ - "DELETED", - "STOPPED" - ], - "enumDescriptions": [ - "The instance will be deleted.", - "The instance will be stopped." - ], - "type": "string" - } - }, - "type": "object" - }, - "Rollout": { - "description": "Represent a Rollout resource.", - "id": "Rollout", - "properties": { - "cancellationTime": { - "description": "Output only. The timestamp at which the Rollout was cancelled.", - "readOnly": true, - "type": "string" - }, - "completionTime": { - "description": "Output only. The timestamp at which the Rollout was completed.", - "readOnly": true, - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "currentWaveNumber": { - "description": "Output only. The number of the currently running wave.\nEx. 1", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "etag": { - "description": "Output only. etag of the Rollout\nEx. abc1234", - "readOnly": true, - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#rollout", - "description": "[Output Only] Type of the resource. Always compute#rollout\nfor rollouts.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "rolloutEntity": { - "$ref": "RolloutRolloutEntity", - "description": "Required. The resource being rolled out." - }, - "rolloutPlan": { - "description": "Required. Rollout Plan used to model the Rollout.\nEx. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "state": { - "description": "Output only. The current state of the Rollout.", - "enum": [ - "CANCELLED", - "CANCELLING", - "CANCEL_FAILED", - "COMPLETED", - "COMPLETE_FAILED", - "COMPLETING", - "FAILED", - "PAUSED", - "PAUSE_FAILED", - "PAUSING", - "PROCESSING", - "READY", - "RESUMING", - "ROLLBACK_WAVE_FAILED", - "ROLLING_BACK", - "STATE_UNSPECIFIED", - "UNINITIALIZED", - "WAVE_FAILED" - ], - "enumDescriptions": [ - "The rollout is in a failure terminal state.", - "The rollout is being cancelled.", - "An attempted cancel operation was unsuccessful.", - "The rollout is in a successful terminal state.", - "An attempted complete operation was unsuccessful.", - "The rollout is being marked as completed.", - "The rollout completed with failures.", - "The rollout is paused.", - "An attempted pause operation was unsuccessful.", - "The rollout is being paused.", - "A wave is being processed by the product.", - "The rollout has been successfully initialized and is ready to start.", - "The rollout is being resumed after being paused.", - "An attempted rollback operation failed to complete successfully.", - "A wave rollback is in progress for this rollout.", - "Undefined default state. Should never be exposed to users.", - "The rollout has been created but is not yet ready to be started.", - "The product failed to process the wave." - ], - "readOnly": true, - "type": "string" - }, - "waveDetails": { - "description": "Output only. Details about each wave of the rollout.", - "items": { - "$ref": "RolloutWaveDetails" - }, - "readOnly": true, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlan": { - "description": "Message describing RolloutPlan object", - "id": "RolloutPlan", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#rolloutPlan", - "description": "[Output Only] Type of the resource. Always compute#rolloutPlan\nfor rolloutPlans.", - "type": "string" - }, - "locationScope": { - "description": "The location scope of the rollout plan. If not specified, the location\nscope is considered as ZONAL.", - "enum": [ - "LOCATION_SCOPE_UNSPECIFIED", - "REGIONAL", - "ZONAL" - ], - "enumDescriptions": [ - "Unspecified value. Considered as ZONAL.", - "Regional scope.", - "Zonal scope." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.rolloutPlans.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "waves": { - "description": "Required. The waves included in this rollout plan.", - "items": { - "$ref": "RolloutPlanWave" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWave": { - "description": "A single wave in a rollout plan.", - "id": "RolloutPlanWave", - "properties": { - "displayName": { - "description": "Optional. The display name of this wave of the rollout plan.", - "type": "string" - }, - "number": { - "description": "Output only. The wave number.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "orchestrationOptions": { - "$ref": "RolloutPlanWaveOrchestrationOptions", - "description": "Optional. The orchestration options for this wave." - }, - "selectors": { - "description": "Required. The selectors for this wave. There is a logical AND between each selector\ndefined in a wave, so a resource must satisfy the criteria of *all* the\nspecified selectors to be in scope for the wave.", - "items": { - "$ref": "RolloutPlanWaveSelector" - }, - "type": "array" - }, - "validation": { - "$ref": "RolloutPlanWaveValidation", - "description": "Required. The validation to be performed at the end of this wave." - } - }, - "type": "object" - }, - "RolloutPlanWaveOrchestrationOptions": { - "description": "Options to control the pace of orchestration of a wave. These options are\nrequired only if the resource being rolled out follows the Orchestrated\npattern.", - "id": "RolloutPlanWaveOrchestrationOptions", - "properties": { - "delays": { - "description": "Optional. Delays, if any, to be added between batches of projects. We allow\nmultiple Delays to be specified, letting users set separate delays\nbetween batches of projects corresponding to different locations and\nbatches of projects corresponding to the same location.", - "items": { - "$ref": "RolloutPlanWaveOrchestrationOptionsDelay" - }, - "type": "array" - }, - "maxConcurrentLocations": { - "description": "Optional. Maximum number of locations to be orchestrated in parallel.", - "format": "int64", - "type": "string" - }, - "maxConcurrentResourcesPerLocation": { - "description": "Optional. Maximum number of resources to be orchestrated per location in\nparallel.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveOrchestrationOptionsDelay": { - "description": "Options to control the delay, if any, between batches of projects.", - "id": "RolloutPlanWaveOrchestrationOptionsDelay", - "properties": { - "delimiter": { - "description": "Optional. Controls whether the delay should only be added between batches of\nprojects corresponding to different locations, or also between\nbatches of projects corresponding to the same location.\n\nMust be set to DELIMITER_UNSPECIFIED if no delay is to be added.", - "enum": [ - "DELIMITER_BATCH", - "DELIMITER_LOCATION", - "DELIMITER_UNSPECIFIED" - ], - "enumDescriptions": [ - "The delay will also be added between batches of projects\ncorresponding to the same location.", - "The delay will only be added between batches of projects\ncorresponding to different locations.", - "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." - ], - "type": "string" - }, - "duration": { - "description": "Optional. The duration of the delay, if any, to be added between batches of\nprojects. A zero duration corresponds to no delay.", - "format": "google-duration", - "type": "string" - }, - "type": { - "description": "Optional. Controls whether the specified duration is to be added at the end of\neach batch, or if the total processing time for each batch will be\npadded if needed to meet the specified duration.\n\nMust be set to TYPE_UNSPECIFIED if no delay is to be added.", - "enum": [ - "TYPE_MINIMUM", - "TYPE_OFFSET", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The total processing time for each batch of projects will be padded\nif needed to meet the specified delay duration.", - "The specified delay will directly be added after each batch of\nprojects as specified by the delimiter.", - "No delay will be added between batches of projects. Processing will\ncontinue with the next batch as soon as the previous batch of LROs\nis done." - ], - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveSelector": { - "description": "A selector which specifies what resource(s) are included in a given wave.", - "id": "RolloutPlanWaveSelector", - "properties": { - "locationSelector": { - "$ref": "RolloutPlanWaveSelectorLocationSelector", - "description": "Optional. Roll out to resources by Cloud locations." - }, - "resourceHierarchySelector": { - "$ref": "RolloutPlanWaveSelectorResourceHierarchySelector", - "description": "Optional. Roll out to resources by Cloud Resource Manager resource hierarchy." - } - }, - "type": "object" - }, - "RolloutPlanWaveSelectorLocationSelector": { - "description": "Roll out to resources by location.", - "id": "RolloutPlanWaveSelectorLocationSelector", - "properties": { - "includedLocations": { - "description": "Optional. Example: \"us-central1-a\"", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWaveSelectorResourceHierarchySelector": { - "description": "Roll out to resources by Cloud Resource Manager resource hierarchy\nnodes such as projects, folders, orgs.", - "id": "RolloutPlanWaveSelectorResourceHierarchySelector", - "properties": { - "includedFolders": { - "description": "Optional. Format: \"folders/{folder_id}\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedOrganizations": { - "description": "Optional. Format: \"organizations/{organization_id}\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedProjects": { - "description": "Optional. Format: \"projects/{project_id}\"", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RolloutPlanWaveValidation": { - "description": "The validation to be performed before progressing to the next wave.", - "id": "RolloutPlanWaveValidation", - "properties": { - "timeBasedValidationMetadata": { - "$ref": "RolloutPlanWaveValidationTimeBasedValidationMetadata", - "description": "Optional. Metadata required if type = \"time\"." - }, - "type": { - "description": "Required. The type of the validation. If a type of validation is associated with\na metadata object, the appropriate metadata field mapping to the\nvalidation type must be provided in the validation message. Possible\nvalues are in quotes below alongside an explanation:\n \"manual\": The system waits for an end-user approval API before\n progressing to the next wave.\n \"time\": The system waits for a user specified duration before\n progressing to the next wave. TimeBasedValidation must be provided.", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlanWaveValidationTimeBasedValidationMetadata": { - "description": "Metadata required if type = \"time\".", - "id": "RolloutPlanWaveValidationTimeBasedValidationMetadata", - "properties": { - "waitDuration": { - "description": "Optional. The duration that the system waits in between waves. This wait starts\nafter all changes in the wave are rolled out.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "RolloutPlansListResponse": { - "description": "Contains a list of RolloutPlan resources.", - "id": "RolloutPlansListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of RolloutPlan resources.", - "items": { - "$ref": "RolloutPlan" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RolloutPolicy": { - "description": "A rollout policy configuration.", - "id": "RolloutPolicy", - "properties": { - "defaultRolloutTime": { - "description": "An optional RFC3339 timestamp on or after which the update is\nconsidered rolled out to any zone that is not explicitly stated.", - "type": "string" - }, - "locationRolloutPolicies": { - "additionalProperties": { - "type": "string" - }, - "description": "Location based rollout policies to apply to the resource.\n\nCurrently only zone names are supported and must be represented\nas valid URLs, like: zones/us-central1-a.\n\nThe value expects an RFC3339 timestamp on or after which the update is\nconsidered rolled out to the specified location.", - "type": "object" - } - }, - "type": "object" - }, - "RolloutRolloutEntity": { - "description": "Specifications of the resource to roll out.", - "id": "RolloutRolloutEntity", - "properties": { - "orchestratedEntity": { - "$ref": "RolloutRolloutEntityOrchestratedEntity", - "description": "Optional. Entity details for products using the Orchestrated Integration model." - } - }, - "type": "object" - }, - "RolloutRolloutEntityOrchestratedEntity": { - "description": "This message is used if the resource type follows the Orchestrated\nintegration model with ProgressiveRollout.", - "id": "RolloutRolloutEntityOrchestratedEntity", - "properties": { - "conflictBehavior": { - "description": "Required. Specifies the behavior of the Rollout if an out of band update is\ndetected in a project during a Rollout. It can be one of the following\nvalues:\n1) overwrite : Overwrite the local value with the rollout value.\n2) no_overwrite : Do not overwrite the local value with the rollout\nvalue.", - "type": "string" - }, - "orchestrationAction": { - "description": "Required. Orchestration action during the Rollout. It can be one of the following\nvalues:\n1) \"update\": Resources will be updated by the rollout.\n2) \"delete\": Resources will be deleted by the rollout.", - "type": "string" - }, - "orchestrationSource": { - "description": "Required. Fully qualified resource name of the resource which contains the source\nof truth of the configuration being rolled out across\nlocations/projects. For example, in the case of a global Rollout which\nis applied across regions, this contains the name of the global\nresource created by the user which contains a payload for a resource\nthat is orchestrated across regions. This follows the following format:\n//.googleapis.com/projects//locations/global//\ne.g.\n//osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1", - "type": "string" - } - }, - "type": "object" - }, - "RolloutWaveDetails": { - "description": "Additional metadata about the status of each wave provided by the server.", - "id": "RolloutWaveDetails", - "properties": { - "orchestratedWaveDetails": { - "$ref": "RolloutWaveDetailsOrchestratedWaveDetails", - "description": "Output only. Additional details of the wave for products using the Orchestrated\nIntegration model.", - "readOnly": true - }, - "waveDisplayName": { - "description": "Output only. Wave name.\nEx. wave1", - "readOnly": true, - "type": "string" - }, - "waveNumber": { - "description": "Output only. System generated number for the wave.", - "format": "int64", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RolloutWaveDetailsOrchestratedWaveDetails": { - "description": "Details of the wave for products using the Orchestrated integration\nmodel.", - "id": "RolloutWaveDetailsOrchestratedWaveDetails", - "properties": { - "completedResourcesCount": { - "description": "Output only. Resource completed so far.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "estimatedTotalResourcesCount": { - "description": "Output only. Estimated total count of resources.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "failedLocations": { - "description": "Output only. Locations that failed during orchestration, and ProgressiveRollout\nstopped retrying. There may be some successful resources rolled out in\nthe wave as the location may have failed later in the Rollout.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "failedResourcesCount": { - "description": "Output only. Resources failed.", - "format": "int64", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "RolloutsListResponse": { - "id": "RolloutsListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Rollout resources.", - "items": { - "$ref": "Rollout" - }, - "type": "array" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "Route": { - "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific\ndestination. This destination can be inside or outside the VPC network.\nFor more information, read theRoutes overview.", - "id": "Route", - "properties": { - "asPaths": { - "description": "[Output Only] AS path.", - "items": { - "$ref": "RouteAsPath" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this field when you\ncreate the resource.", - "type": "string" - }, - "destRange": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "The destination range of outgoing packets that this route applies to. Both\nIPv4 and IPv6 are supported.\nMust specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291\nformat (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952\ncompressed format.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#route", - "description": "[Output Only] Type of this resource. Always compute#routes for\nRoute resources.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a\nlowercase letter, and all following characters (except for the last\ncharacter) must be a dash, lowercase letter, or digit. The last character\nmust be a lowercase letter or digit.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "Fully-qualified URL of the network that this route applies to.", - "type": "string" - }, - "nextHopGateway": { - "description": "The URL to a gateway that should handle matching packets.\nYou can only specify the internet gateway using a full or\npartial valid URL: projects/project/global/gateways/default-internet-gateway", - "type": "string" - }, - "nextHopHub": { - "description": "[Output Only] The full resource name of the Network Connectivity Center hub\nthat will handle matching packets.", - "type": "string" - }, - "nextHopIlb": { - "description": "The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL that should handle matching\npackets or the IP address of the forwarding Rule.\nFor example, the following are all valid URLs:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n - regions/region/forwardingRules/forwardingRule\n\n\nIf an IP address is provided, must specify an IPv4 address in dot-decimal\nnotation or an IPv6 address in RFC 4291 format. For example, the following\nare all valid IP addresses:\n \n \n - 10.128.0.56\n - 2001:db8::2d9:51:0:0\n - 2001:db8:0:0:2d9:51:0:0\n\n\nIPv6 addresses will be displayed using RFC 5952 compressed format (e.g.\n2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", - "type": "string" - }, - "nextHopInstance": { - "description": "The URL to an instance that should handle matching packets. You can specify\nthis as a full or partial URL.\nFor example: \nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/", - "type": "string" - }, - "nextHopInterRegionCost": { - "description": "[Output only] Internal fixed region-to-region cost that Google Cloud\ncalculates based on factors such as network performance, distance, and\navailable bandwidth between regions.", - "format": "uint32", - "type": "integer" - }, - "nextHopInterconnectAttachment": { - "description": "[Output Only] The URL to an InterconnectAttachment which is the next hop\nfor the route.\nThis field will only be populated for dynamic routes generated by\nCloud Router with a linked interconnectAttachment or the static route\ngenerated by each L2 Interconnect Attachment.", - "type": "string" - }, - "nextHopIp": { - "description": "The network IP address of an instance that should handle matching packets.\nBoth IPv6 address and IPv4 addresses are supported.\nMust specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or\nan IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or\n2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952\ncompressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an\nIPv4-mapped IPv6 address.", - "type": "string" - }, - "nextHopMed": { - "description": "[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates\nthe desirability of a particular route in a network.", - "format": "uint32", - "type": "integer" - }, - "nextHopNetwork": { - "description": "The URL of the local network if it should handle matching packets.", - "type": "string" - }, - "nextHopOrigin": { - "description": "[Output Only] Indicates the origin of the route. Can be IGP\n(Interior Gateway Protocol), EGP (Exterior Gateway Protocol),\nor INCOMPLETE.", - "enum": [ - "EGP", - "IGP", - "INCOMPLETE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "nextHopPeering": { - "description": "[Output Only] The network peering name that should handle matching packets,\nwhich should conform to RFC1035.", - "type": "string" - }, - "nextHopVpnTunnel": { - "description": "The URL to a VpnTunnel that should handle matching packets.", - "type": "string" - }, - "params": { - "$ref": "RouteParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "priority": { - "annotations": { - "required": [ - "compute.routes.insert" - ] - }, - "description": "The priority of this route. Priority is used to break ties in cases\nwhere there is more than one matching route of equal prefix length. In\ncases where multiple routes have equal prefix length, the one with the\nlowest-numbered priority value wins. The default value is `1000`. The\npriority value must be from `0` to `65535`, inclusive.", - "format": "uint32", - "type": "integer" - }, - "routeStatus": { - "description": "[Output only] The status of the route. This status only applies to\ndynamic routes learned by Cloud Routers. This status is not applicable\nto static routes.", - "enum": [ - "ACTIVE", - "DROPPED", - "INACTIVE", - "PENDING" - ], - "enumDescriptions": [ - "This route is processed and active.", - "The route is dropped due to the VPC exceeding the dynamic route limit.\n For dynamic route limit, please refer to the\nLearned route example", - "This route is processed but inactive due to failure from the backend. The\nbackend may have rejected the route", - "This route is being processed internally. The status will change once\nprocessed." - ], - "type": "string" - }, - "routeType": { - "description": "[Output Only] The type of this route, which can be one of the following\nvalues:\n- 'TRANSIT' for a transit route that this router learned from\nanother Cloud Router and will readvertise to one of its BGP peers \n- 'SUBNET' for a route from a subnet of the VPC \n- 'BGP' for a route learned from a BGP peer of this router \n- 'STATIC' for a static route", - "enum": [ - "BGP", - "STATIC", - "SUBNET", - "TRANSIT" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "tags": { - "description": "A list of instance tags to which this route applies.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warnings": { - "description": "[Output Only] If potential misconfigurations are detected for this\nroute, this field will be populated with warning messages.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouteAsPath": { - "id": "RouteAsPath", - "properties": { - "asLists": { - "description": "[Output Only] The AS numbers of the AS Path.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "pathSegmentType": { - "description": "[Output Only] The type of the AS Path, which can be one of the following\nvalues: \n- 'AS_SET': unordered set of autonomous systems that the route\nin has traversed \n- 'AS_SEQUENCE': ordered set of autonomous\nsystems that the route has traversed \n- 'AS_CONFED_SEQUENCE':\nordered set of Member Autonomous Systems in the local confederation that\nthe route has traversed \n- 'AS_CONFED_SET': unordered set of\nMember Autonomous Systems in the local confederation that the route has\ntraversed", - "enum": [ - "AS_CONFED_SEQUENCE", - "AS_CONFED_SET", - "AS_SEQUENCE", - "AS_SET" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RouteList": { - "description": "Contains a list of Route resources.", - "id": "RouteList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Route resources.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "kind": { - "default": "compute#routeList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouteParams": { - "description": "Additional route parameters.", - "id": "RouteParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "RoutePolicy": { - "id": "RoutePolicy", - "properties": { - "description": { - "description": "An optional description of route policy.", - "type": "string" - }, - "fingerprint": { - "description": "A fingerprint for the Route Policy being applied to this Router, which is\nessentially a hash of the Route Policy used for optimistic locking.\nThe fingerprint is initially generated by Compute Engine and changes\nafter every request to modify or update Route Policy. You must always\nprovide an up-to-date fingerprint hash in order to update or change\nlabels.\n\nTo see the latest fingerprint, make a getRoutePolicy() request\nto retrieve a Route Policy.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "Route Policy name, which must be a resource ID segment and unique\nwithin all the router's Route Policies. Name should conform to RFC1035.", - "type": "string" - }, - "terms": { - "description": "List of terms (the order in the list is not important, they are evaluated\nin order of priority). Order of policies is not retained and might change\nwhen getting policy later.", - "items": { - "$ref": "RoutePolicyPolicyTerm" - }, - "type": "array" - }, - "type": { - "enum": [ - "ROUTE_POLICY_TYPE_EXPORT", - "ROUTE_POLICY_TYPE_IMPORT" - ], - "enumDescriptions": [ - "The Route Policy is an Export Policy.", - "The Route Policy is an Import Policy." - ], - "type": "string" - } - }, - "type": "object" - }, - "RoutePolicyPolicyTerm": { - "id": "RoutePolicyPolicyTerm", - "properties": { - "actions": { - "description": "CEL expressions to evaluate to modify a route when this term matches.", - "items": { - "$ref": "Expr" - }, - "type": "array" - }, - "match": { - "$ref": "Expr", - "description": "CEL expression evaluated against a route to determine if this term\napplies. When not set, the term applies to all\nroutes." - }, - "priority": { - "description": "The evaluation priority for this term, which must be between 0\n(inclusive) and 2^31 (exclusive), and unique within the list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Router": { - "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read theCloud\nRouter overview.", - "id": "Router", - "properties": { - "bgp": { - "$ref": "RouterBgp", - "description": "BGP information specific to this router." - }, - "bgpPeers": { - "description": "BGP information that must be configured into the routing stack to\nestablish BGP peering. This information must specify the peer ASN and\neither the interface name, IP address, or peer IP address. Please refer toRFC4273.", - "items": { - "$ref": "RouterBgpPeer" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "encryptedInterconnectRouter": { - "description": "Indicates if a router is dedicated for use with encrypted VLAN\nattachments (interconnectAttachments).", - "type": "boolean" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "interfaces": { - "description": "Router interfaces.\nTo create a BGP peer that uses a router interface,\nthe interface must have one of the following fields specified:\n \n - linkedVpnTunnel\n - linkedInterconnectAttachment\n - subnetwork\n\n\nYou can create a router interface without any of these fields specified.\nHowever, you cannot create a BGP peer that uses that interface.", - "items": { - "$ref": "RouterInterface" - }, - "type": "array" - }, - "kind": { - "default": "compute#router", - "description": "[Output Only] Type of resource. Always compute#router for\nrouters.", - "type": "string" - }, - "md5AuthenticationKeys": { - "description": "Keys used for MD5 authentication.", - "items": { - "$ref": "RouterMd5AuthenticationKey" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nats": { - "description": "A list of NAT services created in this router.", - "items": { - "$ref": "RouterNat" - }, - "type": "array" - }, - "nccGateway": { - "description": "URI of the ncc_gateway to which this router associated.", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.routers.insert", - "compute.routers.update" - ] - }, - "description": "URI of the network to which this router belongs.", - "type": "string" - }, - "params": { - "$ref": "RouterParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URI of the region where the router resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - } - }, - "type": "object" - }, - "RouterAdvertisedIpRange": { - "description": "Description-tagged IP ranges for the router to advertise.", - "id": "RouterAdvertisedIpRange", - "properties": { - "description": { - "description": "User-specified description for the IP range.", - "type": "string" - }, - "range": { - "description": "The IP range to advertise. The value must be a CIDR-formatted string.", - "type": "string" - } - }, - "type": "object" - }, - "RouterAggregatedList": { - "description": "Contains a list of routers.", - "id": "RouterAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "RoutersScopedList", - "description": "Name of the scope containing this set of routers." - }, - "description": "A list of Router resources.", - "type": "object" - }, - "kind": { - "default": "compute#routerAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouterBgp": { - "id": "RouterBgp", - "properties": { - "advertiseMode": { - "description": "User-specified flag to indicate which mode to use for advertisement.\nThe options are DEFAULT or CUSTOM.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\nis advertised to all peers of the router.\nThese groups will be advertised in addition to any specified prefixes.\nLeave this field blank to advertise no custom groups.", - "items": { - "enum": [ - "ALL_SUBNETS" - ], - "enumDescriptions": [ - "Advertise all available subnets (including peer VPC subnets)." - ], - "type": "string" - }, - "type": "array" - }, - "advertisedIpRanges": { - "description": "User-specified list of individual IP ranges to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\nis advertised to all peers of the router.\nThese IP ranges will be advertised in addition to any specified groups.\nLeave this field blank to advertise no custom IP ranges.", - "items": { - "$ref": "RouterAdvertisedIpRange" - }, - "type": "array" - }, - "asn": { - "description": "Local BGP Autonomous System Number (ASN).\nMust be anRFC6996 private ASN, either 16-bit or 32-bit. The\nvalue will be fixed for this router resource. All VPN tunnels that link\nto this router will have the same local ASN.", - "format": "uint32", - "type": "integer" - }, - "identifierRange": { - "description": "Explicitly specifies a range of valid BGP Identifiers for this Router. It\nis provided as a link-local IPv4 range (from 169.254.0.0/16), of size at\nleast /30, even if the BGP sessions are over IPv6. It must not overlap\nwith any IPv4 BGP session ranges.\n\n\nOther vendors commonly call this \"router ID\".", - "type": "string" - }, - "keepaliveInterval": { - "description": "The interval in seconds between BGP keepalive messages that are\nsent to the peer.\n\n\nHold time is three times the interval at which keepalive messages are\nsent, and the hold time is the maximum number of seconds allowed to\nelapse between successive keepalive messages that BGP receives from a\npeer.\n\n\nBGP will use the smaller of either the local hold time value or the\npeer's hold time value as the hold time for the BGP connection between\nthe two peers.\n\n\nIf set, this value must be between 20 and 60. The default is 20.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterBgpPeer": { - "id": "RouterBgpPeer", - "properties": { - "advertiseMode": { - "description": "User-specified flag to indicate which mode to use for advertisement.", - "enum": [ - "CUSTOM", - "DEFAULT" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode,\nwhich currently supports the following option:\n \n - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This\n excludes any routes learned for subnets that use\n VPC Network Peering.\n\n\nNote that this field can only be populated if advertise_mode is CUSTOM\nand overrides the list defined for the router (in the \"bgp\" message).\nThese groups are advertised in addition to any specified prefixes.\nLeave this field blank to advertise no custom groups.", - "items": { - "enum": [ - "ALL_SUBNETS" - ], - "enumDescriptions": [ - "Advertise all available subnets (including peer VPC subnets)." - ], - "type": "string" - }, - "type": "array" - }, - "advertisedIpRanges": { - "description": "User-specified list of individual IP ranges to advertise in custom mode.\nThis field can only be populated if advertise_mode is CUSTOM and\noverrides the list defined for the router (in the \"bgp\" message).\nThese IP ranges are advertised in addition to any specified groups.\nLeave this field blank to advertise no custom IP ranges.", - "items": { - "$ref": "RouterAdvertisedIpRange" - }, - "type": "array" - }, - "advertisedRoutePriority": { - "description": "The priority of routes advertised to this BGP peer. Where there is more\nthan one matching route of maximum length, the routes with the lowest\npriority value win.", - "format": "uint32", - "type": "integer" - }, - "bfd": { - "$ref": "RouterBgpPeerBfd", - "description": "BFD configuration for the BGP peering." - }, - "customLearnedIpRanges": { - "description": "A list of user-defined custom learned route IP address ranges for a BGP\nsession.", - "items": { - "$ref": "RouterBgpPeerCustomLearnedIpRange" - }, - "type": "array" - }, - "customLearnedRoutePriority": { - "description": "The user-defined custom learned route priority for a BGP session. This\nvalue is applied to all custom learned route ranges for the session.\nYou can choose a value from `0` to `65335`. If you don't provide a\nvalue, Google Cloud assigns a priority of `100` to the ranges.", - "format": "int32", - "type": "integer" - }, - "enable": { - "description": "The status of the BGP peer connection.\n\n\nIf set to FALSE, any active session with the peer is terminated and\nall associated routing information is removed. If set to TRUE, the\npeer connection can be established with routing information. The default\nis TRUE.", - "enum": [ - "FALSE", - "TRUE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "enableIpv4": { - "description": "Enable IPv4 traffic over BGP Peer. It is enabled by default if\nthe peerIpAddress is version 4.", - "type": "boolean" - }, - "enableIpv6": { - "description": "Enable IPv6 traffic over BGP Peer. It is enabled by default if the\npeerIpAddress is version 6.", - "type": "boolean" - }, - "exportPolicies": { - "description": "List of export policies applied to this peer, in the order they must be\nevaluated. The name must correspond to an existing policy that has\nROUTE_POLICY_TYPE_EXPORT type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "importPolicies": { - "description": "List of import policies applied to this peer, in the order they must be\nevaluated. The name must correspond to an existing policy that has\nROUTE_POLICY_TYPE_IMPORT type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "interfaceName": { - "description": "Name of the interface the BGP peer is associated with.", - "type": "string" - }, - "ipAddress": { - "description": "IP address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "ipv4NexthopAddress": { - "description": "IPv4 address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "ipv6NexthopAddress": { - "description": "IPv6 address of the interface inside Google Cloud Platform.", - "type": "string" - }, - "managementType": { - "description": "[Output Only] The resource that configures and manages this BGP peer.\n \n - MANAGED_BY_USER is the default value and can be managed by you\n or other users\n - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed\n by Cloud Interconnect, specifically by an InterconnectAttachment of type\n PARTNER. Google automatically creates, updates, and deletes this type of\n BGP peer when the PARTNER InterconnectAttachment is created, updated,\n or deleted.", - "enum": [ - "MANAGED_BY_ATTACHMENT", - "MANAGED_BY_USER" - ], - "enumDescriptions": [ - "The BGP peer is automatically created for PARTNER type\nInterconnectAttachment; Google will automatically create/delete\nthis BGP peer when the PARTNER InterconnectAttachment is\ncreated/deleted, and Google will update the ipAddress and\npeerIpAddress when the PARTNER InterconnectAttachment is provisioned.\nThis type of BGP peer cannot be created or deleted, but can be\nmodified for all fields except for name, ipAddress and peerIpAddress.", - "Default value, the BGP peer is manually created and managed by user." - ], - "type": "string" - }, - "md5AuthenticationKeyName": { - "description": "Present if MD5 authentication is enabled for the peering. Must be the\nname of one of the entries in the Router.md5_authentication_keys. The\nfield must comply with RFC1035.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of this BGP peer.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "peerAsn": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Peer BGP Autonomous System Number (ASN). Each BGP interface may use\na different value.", - "format": "uint32", - "type": "integer" - }, - "peerIpAddress": { - "description": "IP address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "peerIpv4NexthopAddress": { - "description": "IPv4 address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "peerIpv6NexthopAddress": { - "description": "IPv6 address of the BGP interface outside Google Cloud Platform.", - "type": "string" - }, - "routerApplianceInstance": { - "description": "URI of the VM instance that is used as third-party router\nappliances such as Next Gen Firewalls, Virtual Routers, or Router\nAppliances. The VM instance must be located in zones contained in the\nsame region as this Cloud Router.\nThe VM instance is the peer side of the BGP session.", - "type": "string" - } - }, - "type": "object" - }, - "RouterBgpPeerBfd": { - "id": "RouterBgpPeerBfd", - "properties": { - "minReceiveInterval": { - "description": "The minimum interval, in milliseconds, between BFD control packets\nreceived from the peer router. The actual value is negotiated between\nthe two routers and is equal to the greater of this value and the\ntransmit interval of the other router.\n\n\nIf set, this value must be between 1000 and 30000.\n\n\nThe default is 1000.", - "format": "uint32", - "type": "integer" - }, - "minTransmitInterval": { - "description": "The minimum interval, in milliseconds, between BFD control packets\ntransmitted to the peer router. The actual value is negotiated between\nthe two routers and is equal to the greater of this value and the\ncorresponding receive interval of the other router.\n\n\nIf set, this value must be between 1000 and 30000.\n\n\nThe default is 1000.", - "format": "uint32", - "type": "integer" - }, - "multiplier": { - "description": "The number of consecutive BFD packets that must be missed\nbefore BFD declares that a peer is unavailable.\n\n\nIf set, the value must be a value between 5 and 16.\n\n\nThe default is 5.", - "format": "uint32", - "type": "integer" - }, - "sessionInitializationMode": { - "description": "The BFD session initialization mode for this BGP peer.\n\n\nIf set to ACTIVE, the Cloud Router will initiate the BFD session for\nthis BGP peer. If set to PASSIVE, the Cloud Router will wait for the\npeer router to initiate the BFD session for this BGP peer. If set to\nDISABLED, BFD is disabled for this BGP peer. The default is DISABLED.", - "enum": [ - "ACTIVE", - "DISABLED", - "PASSIVE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "RouterBgpPeerCustomLearnedIpRange": { - "id": "RouterBgpPeerCustomLearnedIpRange", - "properties": { - "range": { - "description": "The custom learned route IP address range. Must be a valid\nCIDR-formatted prefix. If an IP address is provided without a subnet\nmask, it is interpreted as, for IPv4, a `/32` singular IP address\nrange, and, for IPv6, `/128`.", - "type": "string" - } - }, - "type": "object" - }, - "RouterInterface": { - "id": "RouterInterface", - "properties": { - "ipRange": { - "description": "IP address and range of the interface.\n \n - For Internet Protocol version 4 (IPv4), the IP range must be in theRFC3927 link-local IP address space. The value must\n be a CIDR-formatted string, for example, 169.254.0.1/30.\n Note: Do not truncate the IP address, as it represents the IP address of\n the interface. \n - For Internet Protocol version 6 (IPv6), the value\n must be a unique local address (ULA) range from fdff:1::/64\n with a mask length of 126 or less. This value should be a CIDR-formatted\n string, for example, fdff:1::1/112. Within the router's\n VPC, this IPv6 prefix will be reserved exclusively for this connection\n and cannot be used for any other purpose.", - "type": "string" - }, - "ipVersion": { - "description": "IP version of this interface.", - "enum": [ - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "linkedInterconnectAttachment": { - "description": "URI of the linked Interconnect attachment. It must be in the same region\nas the router. Each interface can have one linked resource, which can be\na VPN tunnel, an Interconnect attachment, or a subnetwork.", - "type": "string" - }, - "linkedVpnTunnel": { - "description": "URI of the linked VPN tunnel, which must be in the same region as the\nrouter. Each interface can have one linked resource, which can be\na VPN tunnel, an Interconnect attachment, or a subnetwork.", - "type": "string" - }, - "managementType": { - "description": "[Output Only] The resource that configures and manages this interface.\n \n - MANAGED_BY_USER is the default value and can be managed directly\n by users.\n - MANAGED_BY_ATTACHMENT is an interface that is configured and\n managed by Cloud Interconnect, specifically, by an InterconnectAttachment\n of type PARTNER. Google automatically creates, updates, and deletes\n this type of interface when the PARTNER InterconnectAttachment is\n created, updated, or deleted.", - "enum": [ - "MANAGED_BY_ATTACHMENT", - "MANAGED_BY_USER" - ], - "enumDescriptions": [ - "The interface is automatically created for PARTNER type\nInterconnectAttachment, Google will automatically create/update/delete\nthis interface when the PARTNER InterconnectAttachment is\ncreated/provisioned/deleted.\nThis type of interface cannot be manually managed by user.", - "Default value, the interface is manually created and managed by user." - ], - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "Name of this interface entry.\nThe name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "privateIpAddress": { - "description": "The regional private internal IP address that is used to establish\nBGP sessions to a VM instance acting as a third-party\nRouter Appliance, such as a Next Gen Firewall, a Virtual Router, or\nan SD-WAN VM.", - "type": "string" - }, - "redundantInterface": { - "description": "Name of the interface that will be redundant with the current interface\nyou are creating. The redundantInterface must belong to the same Cloud\nRouter as the interface here. To establish the BGP session to a Router\nAppliance VM, you must create two BGP peers. The two BGP peers must be\nattached to two separate interfaces that are redundant with each other.\nThe redundant_interface must be 1-63 characters long, and comply withRFC1035. Specifically, the redundant_interface must\nbe 1-63 characters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "subnetwork": { - "description": "The URI of the subnetwork resource that this interface belongs to, which\nmust be in the same region as the Cloud Router.\nWhen you establish a BGP session to a VM instance using this interface,\nthe VM instance must belong to the same subnetwork as the subnetwork\nspecified here.", - "type": "string" - } - }, - "type": "object" - }, - "RouterList": { - "description": "Contains a list of Router resources.", - "id": "RouterList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Router resources.", - "items": { - "$ref": "Router" - }, - "type": "array" - }, - "kind": { - "default": "compute#routerList", - "description": "[Output Only] Type of resource. Always compute#router for\nrouters.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RouterMd5AuthenticationKey": { - "id": "RouterMd5AuthenticationKey", - "properties": { - "key": { - "annotations": { - "required": [ - "compute.routers.insert" - ] - }, - "description": "[Input only] Value of the key.\n\nFor patch and update calls, it can be skipped to\ncopy the value from the previous configuration. This is allowed if the\nkey with the same name existed before the operation. Maximum length is 80\ncharacters. Can only contain printable ASCII characters.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.routers.insert", - "compute.routers.update" - ] - }, - "description": "Name used to identify the key.\n\nMust be unique within a router. Must be referenced by exactly\none bgpPeer. Must comply withRFC1035.", - "type": "string" - } - }, - "type": "object" - }, - "RouterNat": { - "description": "Represents a Nat resource. It enables the VMs within the specified\nsubnetworks to access Internet without external IP addresses. It specifies\na list of subnetworks (and the ranges within) that want to use NAT.\nCustomers can also provide the external IPs that would be used for NAT. GCP\nwould auto-allocate ephemeral IPs if no external IPs are provided.", - "id": "RouterNat", - "properties": { - "autoNetworkTier": { - "description": "The network tier to use when automatically reserving NAT IP addresses.\nMust be one of: PREMIUM, STANDARD.\nIf not specified, then the current \nproject-level default tier is used.", - "enum": [ - "FIXED_STANDARD", - "PREMIUM", - "STANDARD", - "STANDARD_OVERRIDES_FIXED_STANDARD" - ], - "enumDescriptions": [ - "Public internet quality with fixed bandwidth.", - "High quality, Google-grade network tier, support for all networking\nproducts.", - "Public internet quality, only limited support for other networking\nproducts.", - "(Output only) Temporary tier for FIXED_STANDARD when fixed standard tier\nis expired or not configured." - ], - "type": "string" - }, - "drainNatIps": { - "description": "A list of URLs of the IP resources to be drained. These IPs\nmust be valid static external IPs that have been assigned to the NAT.\nThese IPs should be used for updating/patching a NAT only.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enableDynamicPortAllocation": { - "description": "Enable Dynamic Port Allocation.\n\n\nIf not specified, it is disabled by default.\n\n\nIf set to true,\n \n - Dynamic Port Allocation will be enabled on this NAT\n config.\n - enableEndpointIndependentMapping cannot be set to true.\n - If minPorts is set, minPortsPerVm must be set to a\n power of two greater than or equal to 32. If minPortsPerVm is not set, a\n minimum of 32 ports will be allocated to a VM from this NAT\n config.", - "type": "boolean" - }, - "enableEndpointIndependentMapping": { - "type": "boolean" - }, - "endpointTypes": { - "description": "List of NAT-ted endpoint types supported by the Nat Gateway. If the list\nis empty, then it will be equivalent to include ENDPOINT_TYPE_VM", - "items": { - "enum": [ - "ENDPOINT_TYPE_MANAGED_PROXY_LB", - "ENDPOINT_TYPE_SWG", - "ENDPOINT_TYPE_VM" - ], - "enumDescriptions": [ - "This is used for regional Application Load Balancers (internal and\nexternal) and regional proxy Network Load Balancers (internal and\nexternal) endpoints.", - "This is used for Secure Web Gateway endpoints.", - "This is the default." - ], - "type": "string" - }, - "type": "array" - }, - "icmpIdleTimeoutSec": { - "description": "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - }, - "logConfig": { - "$ref": "RouterNatLogConfig", - "description": "Configure logging on this NAT." - }, - "maxPortsPerVm": { - "description": "Maximum number of ports allocated to a VM from this NAT config when\nDynamic Port Allocation is enabled.\n\n\nIf Dynamic Port Allocation is not enabled, this field has no effect.\n\n\nIf Dynamic Port Allocation is enabled, and this field is set, it must be\nset to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm\nis not set.\n\n\nIf Dynamic Port Allocation is enabled and this field is not set,\na maximum of 65536 ports will be allocated to a VM from this NAT\nconfig.", - "format": "int32", - "type": "integer" - }, - "minPortsPerVm": { - "description": "Minimum number of ports allocated to a VM from this NAT config. If not\nset, a default number of ports is allocated to a VM. This is rounded\nup to the nearest power of 2. For example, if the value of this field is\n50, at least 64 ports are allocated to a VM.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this Nat service.\nThe name must be 1-63 characters long and comply withRFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "nat64Subnetworks": { - "description": "List of Subnetwork resources whose traffic should be translated by NAT64\nGateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is\nselected for the SubnetworkIpRangeToNat64Option above.", - "items": { - "$ref": "RouterNatSubnetworkToNat64" - }, - "type": "array" - }, - "natIpAllocateOption": { - "description": "Specify the NatIpAllocateOption, which can take one of the following\nvalues: \n \n - MANUAL_ONLY: Uses only Nat IP addresses provided by\n customers. When there are not enough specified Nat IPs, the Nat service\n fails for new VMs.\n - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers\n can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should\n be empty.", - "enum": [ - "AUTO_ONLY", - "MANUAL_ONLY" - ], - "enumDescriptions": [ - "Nat IPs are allocated by GCP; customers can not specify any Nat IPs.", - "Only use Nat IPs provided by customers. When specified Nat IPs are not\nenough then the Nat service fails for new VMs." - ], - "type": "string" - }, - "natIps": { - "description": "A list of URLs of the IP resources used for this Nat service. These IP\naddresses must be valid static external IP addresses assigned to the\nproject.", - "items": { - "type": "string" - }, - "type": "array" - }, - "rules": { - "description": "A list of rules associated with this NAT.", - "items": { - "$ref": "RouterNatRule" - }, - "type": "array" - }, - "sourceSubnetworkIpRangesToNat": { - "description": "Specify the Nat option, which can take one of the following values:\n \n - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every\n Subnetwork are allowed to Nat.\n - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges\n in every Subnetwork are allowed to Nat.\n - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat\n (specified in the field subnetwork below)\n\n\nThe default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED.\nNote that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then there\nshould not be any other Router.Nat section in any Router for this network\nin this region.", - "enum": [ - "ALL_SUBNETWORKS_ALL_IP_RANGES", - "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", - "LIST_OF_SUBNETWORKS" - ], - "enumDescriptions": [ - "All the IP ranges in every Subnetwork are allowed to Nat.", - "All the primary IP ranges in every Subnetwork are allowed to Nat.", - "A list of Subnetworks are allowed to Nat (specified in the field\nsubnetwork below)" - ], - "type": "string" - }, - "sourceSubnetworkIpRangesToNat64": { - "description": "Specify the Nat option for NAT64, which can take one of the following\nvalues: \n \n - ALL_IPV6_SUBNETWORKS: All of the IP ranges in\n every Subnetwork are allowed to Nat.\n - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat\n (specified in the field nat64_subnetwork below)\n\n\nThe default is NAT64_OPTION_UNSPECIFIED.\nNote that if this field contains NAT64_ALL_V6_SUBNETWORKS no other\nRouter.Nat section in this region can also enable NAT64 for any\nSubnetworks in this network. Other Router.Nat sections can still be\npresent to enable NAT44 only.", - "enum": [ - "ALL_IPV6_SUBNETWORKS", - "LIST_OF_IPV6_SUBNETWORKS" - ], - "enumDescriptions": [ - "NAT64 is enabled for all the IPv6 subnet ranges.\nIn dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.", - "NAT64 is enabled for a list of IPv6 subnet ranges.\nIn dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.\nIf this option is used, the nat64_subnetworks field must be specified." - ], - "type": "string" - }, - "subnetworks": { - "description": "A list of Subnetwork resources whose traffic should be translated by NAT\nGateway. It is used only when LIST_OF_SUBNETWORKS is selected for the\nSubnetworkIpRangeToNatOption above.", - "items": { - "$ref": "RouterNatSubnetworkToNat" - }, - "type": "array" - }, - "tcpEstablishedIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP established connections. Defaults to 1200s\nif not set.", - "format": "int32", - "type": "integer" - }, - "tcpTimeWaitTimeoutSec": { - "description": "Timeout (in seconds) for TCP connections that are in TIME_WAIT state.\nDefaults to 120s if not set.", - "format": "int32", - "type": "integer" - }, - "tcpTransitoryIdleTimeoutSec": { - "description": "Timeout (in seconds) for TCP transitory connections. Defaults to 30s if\nnot set.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "Indicates whether this NAT is used for public or private IP\ntranslation. If unspecified, it defaults to PUBLIC.", - "enum": [ - "PRIVATE", - "PUBLIC" - ], - "enumDescriptions": [ - "NAT used for private IP translation.", - "NAT used for public IP translation.\nThis is the default." - ], - "type": "string" - }, - "udpIdleTimeoutSec": { - "description": "Timeout (in seconds) for UDP connections. Defaults to 30s if not set.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterNatLogConfig": { - "description": "Configuration of logging on a NAT.", - "id": "RouterNatLogConfig", - "properties": { - "enable": { - "description": "Indicates whether or not to export logs. This is false by default.", - "type": "boolean" - }, - "filter": { - "description": "Specify the desired filtering of logs on this NAT. If unspecified,\nlogs are exported for all connections handled by this NAT.\nThis option can take one of the following values:\n \n - ERRORS_ONLY: Export logs only for connection failures.\n - TRANSLATIONS_ONLY: Export logs only for successful\n connections.\n - ALL: Export logs for all connections, successful and\n unsuccessful.", - "enum": [ - "ALL", - "ERRORS_ONLY", - "TRANSLATIONS_ONLY" - ], - "enumDescriptions": [ - "Export logs for all (successful and unsuccessful) connections.", - "Export logs for connection failures only.", - "Export logs for successful connections only." - ], - "type": "string" - } - }, - "type": "object" - }, - "RouterNatRule": { - "id": "RouterNatRule", - "properties": { - "action": { - "$ref": "RouterNatRuleAction", - "description": "The action to be enforced for traffic that matches this rule." - }, - "description": { - "description": "An optional description of this rule.", - "type": "string" - }, - "match": { - "description": "CEL expression that specifies the match condition that egress traffic\nfrom a VM is evaluated against. If it evaluates to true, the\ncorresponding `action` is enforced.\n\nThe following examples are valid match expressions for public NAT:\n\n`inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip,\n '2.2.0.0/16')`\n\n`destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'`\n\nThe following example is a valid match expression for private NAT:\n\n`nexthop.hub ==\n'//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1'`", - "type": "string" - }, - "ruleNumber": { - "description": "An integer uniquely identifying a rule in the list. The rule number\nmust be a positive value between 0 and 65000, and\nmust be unique among rules within a NAT.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterNatRuleAction": { - "id": "RouterNatRuleAction", - "properties": { - "sourceNatActiveIps": { - "description": "A list of URLs of the IP resources used for this NAT rule. These IP\naddresses must be valid static external IP addresses assigned to the\nproject.\nThis field is used for public NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatActiveRanges": { - "description": "A list of URLs of the subnetworks used as source ranges for this\nNAT Rule. These subnetworks must have purpose set to PRIVATE_NAT.\nThis field is used for private NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatDrainIps": { - "description": "A list of URLs of the IP resources to be drained. These IPs\nmust be valid static external IPs that have been assigned to the NAT.\nThese IPs should be used for updating/patching a NAT rule only.\nThis field is used for public NAT.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceNatDrainRanges": { - "description": "A list of URLs of subnetworks representing source ranges to be\ndrained. This is only supported on patch/update, and these\nsubnetworks must have previously been used as active ranges in this\nNAT Rule.\nThis field is used for private NAT.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterNatSubnetworkToNat": { - "description": "Defines the IP ranges that want to use NAT for a subnetwork.", - "id": "RouterNatSubnetworkToNat", - "properties": { - "name": { - "description": "URL for the subnetwork resource that will use NAT.", - "type": "string" - }, - "secondaryIpRangeNames": { - "description": "A list of the secondary ranges of the Subnetwork that are allowed to\nuse NAT. This can be populated only if \"LIST_OF_SECONDARY_IP_RANGES\"\nis one of the values in source_ip_ranges_to_nat.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sourceIpRangesToNat": { - "description": "Specify the options for NAT ranges in the Subnetwork. All\noptions of a single value are valid except\nNAT_IP_RANGE_OPTION_UNSPECIFIED.\nThe only valid option with multiple values is: [\"PRIMARY_IP_RANGE\",\n\"LIST_OF_SECONDARY_IP_RANGES\"]\nDefault: [ALL_IP_RANGES]", - "items": { - "enum": [ - "ALL_IP_RANGES", - "LIST_OF_SECONDARY_IP_RANGES", - "PRIMARY_IP_RANGE" - ], - "enumDescriptions": [ - "The primary and all the secondary ranges are allowed to Nat.", - "A list of secondary ranges are allowed to Nat.", - "The primary range is allowed to Nat." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterNatSubnetworkToNat64": { - "description": "Specifies a subnetwork to enable NAT64.", - "id": "RouterNatSubnetworkToNat64", - "properties": { - "name": { - "description": "URL for the subnetwork resource that will use NAT64.", - "type": "string" - } - }, - "type": "object" - }, - "RouterParams": { - "description": "Additional router parameters.", - "id": "RouterParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nThe field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.\n* Inconsistent format is not supported. For instance:\n {\"tagKeys/333\" : \"tagValues/444\", \"123/env\" : \"prod\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "RouterStatus": { - "id": "RouterStatus", - "properties": { - "bestRoutes": { - "description": "A list of the best dynamic routes for this Cloud Router's Virtual Private\nCloud (VPC) network in the same region as this Cloud Router.\n\nLists all of the best routes per prefix that are programmed into this\nregion's VPC data plane.\n\nWhen global dynamic routing mode is turned on in the VPC network, this list\ncan include cross-region dynamic routes from Cloud Routers in other\nregions.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bestRoutesForRouter": { - "description": "A list of the best BGP routes learned by this Cloud Router.\n\nIt is possible that routes listed might not be programmed into the data\nplane, if the Google Cloud control plane finds a more optimal route for a\nprefix than a route learned by this Cloud Router.", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bgpPeerStatus": { - "items": { - "$ref": "RouterStatusBgpPeerStatus" - }, - "type": "array" - }, - "natStatus": { - "items": { - "$ref": "RouterStatusNatStatus" - }, - "type": "array" - }, - "nccGateway": { - "description": "URI of the ncc_gateway to which this router associated.", - "type": "string" - }, - "network": { - "description": "URI of the network to which this router belongs.", - "type": "string" - } - }, - "type": "object" - }, - "RouterStatusBgpPeerStatus": { - "id": "RouterStatusBgpPeerStatus", - "properties": { - "advertisedRoutes": { - "description": "Routes that were advertised to the remote BGP peer", - "items": { - "$ref": "Route" - }, - "type": "array" - }, - "bfdStatus": { - "$ref": "BfdStatus" - }, - "enableIpv4": { - "description": "Enable IPv4 traffic over BGP Peer.\nIt is enabled by default if the peerIpAddress is version 4.", - "type": "boolean" - }, - "enableIpv6": { - "description": "Enable IPv6 traffic over BGP Peer.\nIt is enabled by default if the peerIpAddress is version 6.", - "type": "boolean" - }, - "ipAddress": { - "description": "IP address of the local BGP interface.", - "type": "string" - }, - "ipv4NexthopAddress": { - "description": "IPv4 address of the local BGP interface.", - "type": "string" - }, - "ipv6NexthopAddress": { - "description": "IPv6 address of the local BGP interface.", - "type": "string" - }, - "linkedVpnTunnel": { - "description": "URL of the VPN tunnel that this BGP peer controls.", - "type": "string" - }, - "md5AuthEnabled": { - "description": "Informs whether MD5 authentication is enabled on this BGP peer.", - "type": "boolean" - }, - "name": { - "description": "Name of this BGP peer. Unique within the Routers resource.", - "type": "string" - }, - "numLearnedRoutes": { - "description": "Number of routes learned from the remote BGP Peer.", - "format": "uint32", - "type": "integer" - }, - "peerIpAddress": { - "description": "IP address of the remote BGP interface.", - "type": "string" - }, - "peerIpv4NexthopAddress": { - "description": "IPv4 address of the remote BGP interface.", - "type": "string" - }, - "peerIpv6NexthopAddress": { - "description": "IPv6 address of the remote BGP interface.", - "type": "string" - }, - "routerApplianceInstance": { - "description": "[Output only] URI of the VM instance that is used as third-party router\nappliances such as Next Gen Firewalls, Virtual Routers, or Router\nAppliances.\nThe VM instance is the peer side of the BGP session.", - "type": "string" - }, - "state": { - "description": "The state of the BGP session. For a list of possible values for this\nfield, seeBGP session states.", - "type": "string" - }, - "status": { - "description": "Status of the BGP peer: {UP, DOWN}", - "enum": [ - "DOWN", - "UNKNOWN", - "UP" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "statusReason": { - "description": "Indicates why particular status was returned.", - "enum": [ - "IPV4_PEER_ON_IPV6_ONLY_CONNECTION", - "IPV6_PEER_ON_IPV4_ONLY_CONNECTION", - "MD5_AUTH_INTERNAL_PROBLEM", - "STATUS_REASON_UNSPECIFIED" - ], - "enumDescriptions": [ - "BGP peer disabled because it requires IPv4 but the underlying\nconnection is IPv6-only.", - "BGP peer disabled because it requires IPv6 but the underlying\nconnection is IPv4-only.", - "Indicates internal problems with configuration of MD5 authentication.\nThis particular reason can only be returned when md5AuthEnabled is true\nand status is DOWN.", - "" - ], - "type": "string" - }, - "uptime": { - "description": "Time this session has been up.\nFormat:\n 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds", - "type": "string" - }, - "uptimeSeconds": { - "description": "Time this session has been up, in seconds.\nFormat:\n 145", - "type": "string" - } - }, - "type": "object" - }, - "RouterStatusNatStatus": { - "description": "Status of a NAT contained in this router.", - "id": "RouterStatusNatStatus", - "properties": { - "autoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT. Example: [\"1.1.1.1\", \"129.2.16.89\"]", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainAutoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainUserAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minExtraNatIpsNeeded": { - "description": "The number of extra IPs to allocate. This will be greater than 0 only if\nuser-specified IPs are NOT enough to allow all configured VMs to use NAT.\nThis value is meaningful only when auto-allocation of NAT IPs is *not*\nused.", - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Unique name of this NAT.", - "type": "string" - }, - "numVmEndpointsWithNatMappings": { - "description": "Number of VM endpoints (i.e., Nics) that can use NAT.", - "format": "int32", - "type": "integer" - }, - "ruleStatus": { - "description": "Status of rules in this NAT.", - "items": { - "$ref": "RouterStatusNatStatusNatRuleStatus" - }, - "type": "array" - }, - "userAllocatedNatIpResources": { - "description": "A list of fully qualified URLs of reserved IP address resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "userAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT.\nThey will be raw IP strings like \"179.12.26.133\".", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RouterStatusNatStatusNatRuleStatus": { - "description": "Status of a NAT Rule contained in this NAT.", - "id": "RouterStatusNatStatusNatRuleStatus", - "properties": { - "activeNatIps": { - "description": "A list of active IPs for NAT.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "drainNatIps": { - "description": "A list of IPs for NAT that are in drain mode.\nExample: [\"1.1.1.1\", \"179.12.26.133\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "minExtraIpsNeeded": { - "description": "The number of extra IPs to allocate. This will be greater than 0 only\nif the existing IPs in this NAT Rule are NOT enough to allow all\nconfigured VMs to use NAT.", - "format": "int32", - "type": "integer" - }, - "numVmEndpointsWithNatMappings": { - "description": "Number of VM endpoints (i.e., NICs) that have NAT Mappings from this\nNAT Rule.", - "format": "int32", - "type": "integer" - }, - "ruleNumber": { - "description": "Rule number of the rule.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RouterStatusResponse": { - "id": "RouterStatusResponse", - "properties": { - "kind": { - "default": "compute#routerStatusResponse", - "description": "Type of resource.", - "type": "string" - }, - "result": { - "$ref": "RouterStatus" - } - }, - "type": "object" - }, - "RoutersGetRoutePolicyResponse": { - "id": "RoutersGetRoutePolicyResponse", - "properties": { - "resource": { - "$ref": "RoutePolicy" - } - }, - "type": "object" - }, - "RoutersListBgpRoutes": { - "id": "RoutersListBgpRoutes", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#routersListBgpRoutes", - "description": "[Output Only] Type of resource. Alwayscompute#routersListBgpRoutes for lists of bgp routes.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of bgp routes.", - "items": { - "$ref": "BgpRoute" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RoutersListRoutePolicies": { - "id": "RoutersListRoutePolicies", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#routersListRoutePolicies", - "description": "[Output Only] Type of resource. Alwayscompute#routersListRoutePolicies for lists of route policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of route policies.", - "items": { - "$ref": "RoutePolicy" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "RoutersPreviewResponse": { - "id": "RoutersPreviewResponse", - "properties": { - "resource": { - "$ref": "Router", - "description": "Preview of given router." - } - }, - "type": "object" - }, - "RoutersScopedList": { - "id": "RoutersScopedList", - "properties": { - "routers": { - "description": "A list of routers contained in this scope.", - "items": { - "$ref": "Router" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of routers when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SSLHealthCheck": { - "id": "SSLHealthCheck", - "properties": { - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 443. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \n USE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "request": { - "description": "Instructs the health check prober to send this exact ASCII string, up to\n1024 bytes in length, after establishing the TCP connection and SSL\nhandshake.", - "type": "string" - }, - "response": { - "description": "Creates a content-based SSL health check. In addition to establishing a\nTCP connection and the TLS handshake, you can configure the health check to\npass only when the backend sends this exact response ASCII string, up to\n1024 bytes in length. For details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", - "type": "string" - } - }, - "type": "object" - }, - "SavedAttachedDisk": { - "description": "DEPRECATED: Please use compute#savedDisk instead.\nAn instance-attached disk resource.", - "id": "SavedAttachedDisk", - "properties": { - "autoDelete": { - "description": "Specifies whether the disk will be auto-deleted when the instance is\ndeleted (but not when the disk is detached from the instance).", - "type": "boolean" - }, - "boot": { - "description": "Indicates that this is a boot disk. The virtual machine will use the first\npartition of the disk for its root filesystem.", - "type": "boolean" - }, - "deviceName": { - "description": "Specifies the name of the disk attached to the source instance.", - "type": "string" - }, - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The encryption key for the disk." - }, - "diskSizeGb": { - "description": "The size of the disk in base-2 GB.", - "format": "int64", - "type": "string" - }, - "diskType": { - "description": "[Output Only] URL of the disk type resource. For example:projects/project/zones/zone/diskTypes/pd-standard or\npd-ssd", - "type": "string" - }, - "guestOsFeatures": { - "description": "A list of features to enable on the guest operating system. Applicable only\nfor bootable images. Read\nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "index": { - "description": "Specifies zero-based index of the disk that is attached to the source\ninstance.", - "format": "int32", - "type": "integer" - }, - "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is\neither SCSI or NVME.", - "enum": [ - "NVME", - "SCSI" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#savedAttachedDisk", - "description": "[Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.", - "type": "string" - }, - "licenses": { - "description": "[Output Only] Any valid publicly visible licenses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mode": { - "description": "The mode in which this disk is attached to the source instance, eitherREAD_WRITE or READ_ONLY.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "Attaches this disk in read-only mode. Multiple virtual machines can use\na disk in read-only mode at a time.", - "*[Default]* Attaches this disk in read-write mode. Only one\nvirtual machine at a time can be attached to a disk in read-write mode." - ], - "type": "string" - }, - "source": { - "description": "Specifies a URL of the disk attached to the source instance.", - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] A size of the storage used by the disk's snapshot by this\nmachine image.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": { - "description": "Specifies the type of the attached disk, either SCRATCH orPERSISTENT.", - "enum": [ - "PERSISTENT", - "SCRATCH" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SavedDisk": { - "description": "An instance-attached disk resource.", - "id": "SavedDisk", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the attached disk.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "kind": { - "default": "compute#savedDisk", - "description": "[Output Only] Type of the resource. Always compute#savedDisk\nfor attached disks.", - "type": "string" - }, - "sourceDisk": { - "description": "Specifies a URL of the disk attached to the source instance.", - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] Size of the individual disk snapshot used by this machine\nimage.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ScalingScheduleStatus": { - "id": "ScalingScheduleStatus", - "properties": { - "lastStartTime": { - "description": "[Output Only] The last time the scaling schedule became active.\nNote: this is a timestamp when a schedule actually became active, not when\nit was planned to do so.\nThe timestamp is in RFC3339\ntext format.", - "type": "string" - }, - "nextStartTime": { - "description": "[Output Only] The next time the scaling schedule is to become active.\nNote: this is a timestamp when a schedule is planned to run, but the actual\ntime might be slightly different.\nThe timestamp is in RFC3339\ntext format.", - "type": "string" - }, - "state": { - "description": "[Output Only] The current state of a scaling schedule.", - "enum": [ - "ACTIVE", - "DISABLED", - "OBSOLETE", - "READY" - ], - "enumDescriptions": [ - "The current autoscaling recommendation is influenced by this scaling\nschedule.", - "This scaling schedule has been disabled by the user.", - "This scaling schedule will never become active again.", - "The current autoscaling recommendation is not influenced by this scaling\nschedule." - ], - "type": "string" - } - }, - "type": "object" - }, - "Scheduling": { - "description": "Sets the scheduling options for an Instance.", - "id": "Scheduling", - "properties": { - "automaticRestart": { - "description": "Specifies whether the instance should be automatically restarted if it is\nterminated by Compute Engine (not terminated by a user). You can only set\nthe automatic restart option for standard instances.Preemptible instances\ncannot be automatically restarted.\n\nBy default, this is set to true so an instance is\nautomatically restarted if it is terminated by Compute Engine.", - "type": "boolean" - }, - "availabilityDomain": { - "description": "Specifies the availability domain to place the instance in. The value\nmust be a number between 1 and the number of availability domains\nspecified in the spread placement policy attached to the instance.", - "format": "int32", - "type": "integer" - }, - "gracefulShutdown": { - "$ref": "SchedulingGracefulShutdown" - }, - "hostErrorTimeoutSeconds": { - "description": "Specify the time in seconds for host error detection, the value must be\nwithin the range of [90, 330] with the increment of 30, if unset, the\ndefault behavior of host error recovery will be used.", - "format": "int32", - "type": "integer" - }, - "instanceTerminationAction": { - "description": "Specifies the termination action for the instance.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, - "localSsdRecoveryTimeout": { - "$ref": "Duration", - "description": "Specifies the maximum amount of time a Local Ssd Vm should wait while\nrecovery of the Local Ssd state is attempted. Its value should be in\nbetween 0 and 168 hours with hour granularity and the default value being 1\nhour." - }, - "locationHint": { - "description": "An opaque location hint used to place the instance close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "maintenanceFreezeDurationHours": { - "description": "Specifies the number of hours after VM instance creation where the VM won't\nbe scheduled for maintenance.", - "format": "int32", - "type": "integer" - }, - "maintenanceInterval": { - "description": "Specifies the frequency of planned maintenance events. The accepted values\nare: `PERIODIC`.", - "enum": [ - "AS_NEEDED", - "PERIODIC", - "RECURRENT" - ], - "enumDescriptions": [ - "VMs are eligible to receive infrastructure and hypervisor updates as they\nbecome available. This may result in more maintenance operations (live\nmigrations or terminations) for the VM than the PERIODIC andRECURRENT options.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available.", - "VMs receive infrastructure and hypervisor updates on a periodic basis,\nminimizing the number of maintenance operations (live migrations or\nterminations) on an individual VM. This may mean a VM will take longer\nto receive an update than if it was configured forAS_NEEDED. Security updates will still be applied as soon\nas they are available. RECURRENT is used for GEN3 and Slice\nof Hardware VMs." - ], - "type": "string" - }, - "maxRunDuration": { - "$ref": "Duration", - "description": "Specifies the max run duration for the given instance. If specified,\nthe instance termination action will be performed at the end of the run\nduration." - }, - "minNodeCpus": { - "description": "The minimum number of virtual CPUs this instance will consume when running\non a sole-tenant node.", - "format": "int32", - "type": "integer" - }, - "nodeAffinities": { - "description": "A set of node affinity and anti-affinity configurations. Refer toConfiguring node\naffinity for more information.\nOverrides reservationAffinity.", - "items": { - "$ref": "SchedulingNodeAffinity" - }, - "type": "array" - }, - "onHostMaintenance": { - "description": "Defines the maintenance behavior for this instance. For standard instances,\nthe default behavior is MIGRATE. Forpreemptible instances,\nthe default and only possible behavior is TERMINATE. For more\ninformation, see\n Set\n VM host maintenance policy.", - "enum": [ - "MIGRATE", - "TERMINATE" - ], - "enumDescriptions": [ - "*[Default]* Allows Compute Engine to automatically migrate instances\nout of the way of maintenance events.", - "Tells Compute Engine to terminate and (optionally) restart the instance\naway from the maintenance activity. If you would like your instance to be\nrestarted, set the automaticRestart flag to true. Your\ninstance may be restarted more than once, and it may be restarted outside\nthe window of maintenance events." - ], - "type": "string" - }, - "onInstanceStopAction": { - "$ref": "SchedulingOnInstanceStopAction" - }, - "preemptible": { - "description": "Defines whether the instance is preemptible. This can only be set during\ninstance creation or while the instance isstopped and\ntherefore, in a `TERMINATED` state. SeeInstance Life\nCycle for more information on the possible instance states.", - "type": "boolean" - }, - "provisioningModel": { - "description": "Specifies the provisioning model of the instance.", - "enum": [ - "FLEX_START", - "RESERVATION_BOUND", - "SPOT", - "STANDARD" - ], - "enumDescriptions": [ - "Instance is provisioned using the Flex Start provisioning model and\nhas a limited runtime.", - "Bound to the lifecycle of the reservation in which it is provisioned.", - "Heavily discounted, no guaranteed runtime.", - "Standard provisioning with user controlled runtime, no discounts." - ], - "type": "string" - }, - "skipGuestOsShutdown": { - "description": "Default is false and there will be 120 seconds between GCE ACPI G2 Soft\nOff and ACPI G3 Mechanical\nOff for Standard VMs and 30 seconds for Spot VMs.", - "type": "boolean" - }, - "terminationTime": { - "description": "Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance\ntermination action will be performed at the termination time.", - "type": "string" - } - }, - "type": "object" - }, - "SchedulingGracefulShutdown": { - "description": "The configuration for gracefully shutting down the instance.", - "id": "SchedulingGracefulShutdown", - "properties": { - "enabled": { - "description": "Opts-in for graceful shutdown.", - "type": "boolean" - }, - "maxDuration": { - "$ref": "Duration", - "description": "The time allotted for the instance to gracefully shut down. If the\ngraceful shutdown isn't complete after this time, then the instance\ntransitions to the STOPPING state." - } - }, - "type": "object" - }, - "SchedulingNodeAffinity": { - "description": "Node Affinity: the configuration of desired nodes onto which this Instance\n could be scheduled.", - "id": "SchedulingNodeAffinity", - "properties": { - "key": { - "description": "Corresponds to the label key of Node resource.", - "type": "string" - }, - "operator": { - "description": "Defines the operation of node selection. Valid operators areIN for affinity and NOT_IN for anti-affinity.", - "enum": [ - "IN", - "NOT_IN", - "OPERATOR_UNSPECIFIED" - ], - "enumDescriptions": [ - "Requires Compute Engine to seek for matched nodes.", - "Requires Compute Engine to avoid certain nodes.", - "" - ], - "type": "string" - }, - "values": { - "description": "Corresponds to the label values of Node resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SchedulingOnInstanceStopAction": { - "description": "Defines the behaviour for instances with the instance_termination_actionSTOP.", - "id": "SchedulingOnInstanceStopAction", - "properties": { - "discardLocalSsd": { - "description": "If true, the contents of any attached Local SSD disks will be discarded\nelse, the Local SSD data will be preserved when the instance is stopped\nat the end of the run duration/termination time.", - "type": "boolean" - } - }, - "type": "object" - }, - "Screenshot": { - "description": "An instance's screenshot.", - "id": "Screenshot", - "properties": { - "contents": { - "description": "[Output Only] The Base64-encoded screenshot data.", - "type": "string" - }, - "kind": { - "default": "compute#screenshot", - "description": "[Output Only] Type of the resource. Always compute#screenshot\nfor the screenshots.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPoliciesAggregatedList": { - "id": "SecurityPoliciesAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SecurityPoliciesScopedList", - "description": "Name of the scope containing this set of security policies." - }, - "description": "A list of SecurityPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#securityPoliciesAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#securityPolicyAggregatedList for lists of Security\nPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPoliciesListPreconfiguredExpressionSetsResponse": { - "id": "SecurityPoliciesListPreconfiguredExpressionSetsResponse", - "properties": { - "preconfiguredExpressionSets": { - "$ref": "SecurityPoliciesWafConfig" - } - }, - "type": "object" - }, - "SecurityPoliciesScopedList": { - "id": "SecurityPoliciesScopedList", - "properties": { - "securityPolicies": { - "description": "A list of SecurityPolicies contained in this scope.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nsecurity policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPoliciesWafConfig": { - "id": "SecurityPoliciesWafConfig", - "properties": { - "wafRules": { - "$ref": "PreconfiguredWafSet" - } - }, - "type": "object" - }, - "SecurityPolicy": { - "description": "Represents a Google Cloud Armor security policy resource.\n\nOnly external backend services that use load balancers can\nreference a security policy. For more information, see\nGoogle Cloud Armor security policy overview.", - "id": "SecurityPolicy", - "properties": { - "adaptiveProtectionConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfig" - }, - "advancedOptionsConfig": { - "$ref": "SecurityPolicyAdvancedOptionsConfig" - }, - "associations": { - "description": "A list of associations that belong to this policy.", - "items": { - "$ref": "SecurityPolicyAssociation" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "ddosProtectionConfig": { - "$ref": "SecurityPolicyDdosProtectionConfig" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "User-provided name of the organization security policy. The name should be\nunique in the organization in which the security policy is created. This\nshould only be used when SecurityPolicyType is FIREWALL.\nThe name must be 1-63 characters long, and comply with\nhttps://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "fingerprint": { - "description": "Specifies a fingerprint for this resource, which is essentially a hash of\nthe metadata's contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update metadata. You must always provide an\nup-to-date fingerprint hash in order to update or change metadata,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make get() request to the\nsecurity policy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#securityPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this security policy, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels.\n\nTo see the latest fingerprint, make get() request to the\nsecurity policy.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "parent": { - "description": "[Output Only] The parent of the security policy.", - "type": "string" - }, - "recaptchaOptionsConfig": { - "$ref": "SecurityPolicyRecaptchaOptionsConfig" - }, - "region": { - "description": "[Output Only] URL of the region where the regional security policy\nresides. This field is not applicable to global security policies.", - "type": "string" - }, - "ruleTupleCount": { - "deprecated": true, - "description": "[Output Only] Total count of all security policy rule tuples. A security\npolicy can not exceed a set number of tuples.", - "format": "int32", - "type": "integer" - }, - "rules": { - "description": "A list of rules that belong to this policy.\nThere must always be a default rule which is a rule with priority\n2147483647 and match all condition (for the match condition this means\nmatch \"*\" for srcIpRanges and for the networkMatch condition every field\nmust be either match \"*\" or not set). If no rules are provided when\ncreating a security policy, a default rule with action \"allow\" will be\nadded.", - "items": { - "$ref": "SecurityPolicyRule" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "shortName": { - "description": "User-provided name of the organization security policy. The name should be\nunique in the organization in which the security policy is created. This\nshould only be used when SecurityPolicyType is CLOUD_ARMOR.\nThe name must be 1-63 characters long, and comply with\nhttps://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63\ncharacters long and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a\nlowercase letter, and all following characters must be a dash, lowercase\nletter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "type": { - "description": "The type indicates the intended use of the security policy.\n \n - CLOUD_ARMOR: Cloud Armor backend security policies can\n be configured to filter incoming HTTP requests targeting backend services.\n They filter requests before they hit the origin servers.\n - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can\n be configured to filter incoming HTTP requests targeting backend services\n (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).\n They filter requests before the request is served from Google's cache.\n - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor\n internal service policies can be configured to filter HTTP requests\n targeting services managed by Traffic Director in a service mesh. They\n filter requests before the request is served from the application.\n\n- CLOUD_ARMOR_NETWORK: Cloud Armor network policies\ncan be configured to filter packets targeting network load balancing\nresources such as backend services, target pools, target instances, and\ninstances with external IPs. They filter requests before the request is\nserved from the application.\n\n\nThis field can be set only at resource creation time.", - "enum": [ - "CLOUD_ARMOR", - "CLOUD_ARMOR_EDGE", - "CLOUD_ARMOR_INTERNAL_SERVICE", - "CLOUD_ARMOR_NETWORK", - "FIREWALL" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "userDefinedFields": { - "description": "Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A\nuser-defined field consists of up to 4 bytes extracted from a fixed offset\nin the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an\noptional mask to select certain bits. Rules may then specify matching\nvalues for these fields.\n\nExample:\n\n userDefinedFields:\n - name: \"ipv4_fragment_offset\"\n base: IPV4\n offset: 6\n size: 2\n mask: \"0x1fff\"", - "items": { - "$ref": "SecurityPolicyUserDefinedField" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfig": { - "description": "Configuration options for Cloud Armor Adaptive Protection (CAAP).", - "id": "SecurityPolicyAdaptiveProtectionConfig", - "properties": { - "autoDeployConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig" - }, - "layer7DdosDefenseConfig": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig", - "description": "If set to true, enables Cloud Armor Machine Learning." - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig": { - "description": "Configuration options for Adaptive Protection auto-deploy feature.", - "id": "SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig", - "properties": { - "confidenceThreshold": { - "format": "float", - "type": "number" - }, - "expirationSec": { - "format": "int32", - "type": "integer" - }, - "impactedBaselineThreshold": { - "format": "float", - "type": "number" - }, - "loadThreshold": { - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig": { - "description": "Configuration options for L7 DDoS detection.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig", - "properties": { - "enable": { - "description": "If set to true, enables CAAP for L7 DDoS detection.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "type": "boolean" - }, - "ruleVisibility": { - "description": "Rule visibility can be one of the following:\nSTANDARD - opaque rules. (default)\nPREMIUM - transparent rules.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "enum": [ - "PREMIUM", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "thresholdConfigs": { - "description": "Configuration options for layer7 adaptive protection for various\ncustomizable thresholds.", - "items": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig": { - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig", - "properties": { - "autoDeployConfidenceThreshold": { - "format": "float", - "type": "number" - }, - "autoDeployExpirationSec": { - "format": "int32", - "type": "integer" - }, - "autoDeployImpactedBaselineThreshold": { - "format": "float", - "type": "number" - }, - "autoDeployLoadThreshold": { - "format": "float", - "type": "number" - }, - "detectionAbsoluteQps": { - "format": "float", - "type": "number" - }, - "detectionLoadThreshold": { - "format": "float", - "type": "number" - }, - "detectionRelativeToBaselineQps": { - "format": "float", - "type": "number" - }, - "name": { - "description": "The name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the security policy.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "trafficGranularityConfigs": { - "description": "Configuration options for enabling Adaptive Protection to operate\non specified granular traffic units.", - "items": { - "$ref": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig": { - "description": "Configurations to specifc granular traffic units processed by\nAdaptive Protection.", - "id": "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig", - "properties": { - "enableEachUniqueValue": { - "description": "If enabled, traffic matching each unique value for the specified\ntype constitutes a separate traffic unit.\nIt can only be set to true if `value` is empty.", - "type": "boolean" - }, - "type": { - "description": "Type of this configuration.", - "enum": [ - "HTTP_HEADER_HOST", - "HTTP_PATH", - "UNSPECIFIED_TYPE" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "value": { - "description": "Requests that match this value constitute a granular traffic unit.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyAdvancedOptionsConfig": { - "id": "SecurityPolicyAdvancedOptionsConfig", - "properties": { - "jsonCustomConfig": { - "$ref": "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", - "description": "Custom configuration to apply the JSON parsing. Only applicable when\njson_parsing is set to STANDARD." - }, - "jsonParsing": { - "enum": [ - "DISABLED", - "STANDARD", - "STANDARD_WITH_GRAPHQL" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "logLevel": { - "enum": [ - "NORMAL", - "VERBOSE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "requestBodyInspectionSize": { - "description": "The maximum request size chosen by the customer with Waf enabled.\nValues supported are \"8KB\", \"16KB, \"32KB\", \"48KB\" and \"64KB\".\nValues are case insensitive.", - "type": "string" - }, - "userIpRequestHeaders": { - "description": "An optional list of case-insensitive request header names to use for\nresolving the callers client IP address.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig": { - "id": "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", - "properties": { - "contentTypes": { - "description": "A list of custom Content-Type header values to apply the JSON parsing.\n\nAs per RFC 1341, a Content-Type header value has the following format:\n\nContent-Type := type \"/\" subtype *[\";\" parameter]\n\nWhen configuring a custom Content-Type header value, only the\ntype/subtype needs to be specified, and the parameters should be\nexcluded.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyAssociation": { - "id": "SecurityPolicyAssociation", - "properties": { - "attachmentId": { - "description": "The resource that the security policy is attached to.", - "type": "string" - }, - "displayName": { - "deprecated": true, - "description": "[Output Only] The display name of the security policy of the association.", - "type": "string" - }, - "excludedFolders": { - "description": "A list of folders to exclude from the security policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedProjects": { - "description": "A list of projects to exclude from the security policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name for an association.", - "type": "string" - }, - "securityPolicyId": { - "description": "[Output Only] The security policy ID of the association.", - "type": "string" - }, - "shortName": { - "description": "[Output Only] The short name of the security policy of the association.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyDdosProtectionConfig": { - "id": "SecurityPolicyDdosProtectionConfig", - "properties": { - "ddosProtection": { - "enum": [ - "ADVANCED", - "ADVANCED_PREVIEW", - "STANDARD" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyList": { - "id": "SecurityPolicyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SecurityPolicy resources.", - "items": { - "$ref": "SecurityPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#securityPolicyList", - "description": "[Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SecurityPolicyRecaptchaOptionsConfig": { - "id": "SecurityPolicyRecaptchaOptionsConfig", - "properties": { - "redirectSiteKey": { - "description": "An optional field to supply a reCAPTCHA site key to be used for all the\nrules using the redirect action with the type of GOOGLE_RECAPTCHA under\nthe security policy. The specified site key needs to be created from the\nreCAPTCHA API. The user is responsible for the validity of the specified\nsite key. If not specified, a Google-managed site key is used.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyReference": { - "id": "SecurityPolicyReference", - "properties": { - "securityPolicy": { - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRule": { - "description": "Represents a rule that describes one or more match conditions along with\nthe action to be taken when traffic matches this condition (allow or deny).", - "id": "SecurityPolicyRule", - "properties": { - "action": { - "description": "The Action to perform when the rule is matched.\nThe following are the valid actions:\n \n - allow: allow access to target.\n - deny(STATUS): deny access to target, returns the\n HTTP response code specified. Valid values for `STATUS`\n are 403, 404, and 502.\n - rate_based_ban: limit client traffic to the configured\n threshold and ban the client if the traffic exceeds the threshold.\n Configure parameters for this action in RateLimitOptions. Requires\n rate_limit_options to be set.\n - redirect: redirect to a different target. This can\n either be an internal reCAPTCHA redirect, or an external URL-based\n redirect via a 302 response. Parameters for this action can be configured\n via redirectOptions. This action is only supported in Global Security\n Policies of type CLOUD_ARMOR.\n - throttle: limit\n client traffic to the configured threshold. Configure parameters for this\n action in rateLimitOptions. Requires rate_limit_options to be set for\n this.\n - fairshare (preview only): when traffic reaches the\n threshold limit, requests from the clients matching this rule begin to be\n rate-limited using the Fair Share algorithm. This action is only allowed\n in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "direction": { - "deprecated": true, - "description": "The direction in which this rule applies. This field may only be\nspecified when versioned_expr is set to FIREWALL.", - "enum": [ - "EGRESS", - "INGRESS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "enableLogging": { - "deprecated": true, - "description": "Denotes whether to enable logging for a particular rule. If logging is\nenabled, logs will be exported to the configured export destination in\nStackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you\ncannot enable logging on \"goto_next\" rules.\n\nThis field may only be specified when the versioned_expr is set to\nFIREWALL.", - "type": "boolean" - }, - "headerAction": { - "$ref": "SecurityPolicyRuleHttpHeaderAction", - "description": "Optional, additional actions that are performed on headers.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "kind": { - "default": "compute#securityPolicyRule", - "description": "[Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules", - "type": "string" - }, - "match": { - "$ref": "SecurityPolicyRuleMatcher", - "description": "A match condition that incoming traffic is evaluated against.\nIf it evaluates to true, the corresponding 'action' is enforced." - }, - "networkMatch": { - "$ref": "SecurityPolicyRuleNetworkMatcher", - "description": "A match condition that incoming packets are evaluated against for\nCLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding\n'action' is enforced.\n\nThe match criteria for a rule consists of built-in match fields (like\n'srcIpRanges') and potentially multiple user-defined match fields\n('userDefinedFields').\n\nField values may be extracted directly from the packet or derived from it\n(e.g. 'srcRegionCodes'). Some fields may not be present in every packet\n(e.g. 'srcPorts'). A user-defined field is only present if the base\nheader is found in the packet and the entire field is in bounds.\n\nEach match field may specify which values can match it, listing one or\nmore ranges, prefixes, or exact values that are considered a match for\nthe field. A field value must be present in order to match a specified\nmatch field. If no match values are specified for a match field, then any\nfield value is considered to match it, and it's not required to be\npresent. For strings specifying '*' is also equivalent to match all.\n\nFor a packet to match a rule, all specified match fields must match the\ncorresponding field values derived from the packet.\n\nExample:\n\nnetworkMatch:\n srcIpRanges:\n - \"192.0.2.0/24\"\n - \"198.51.100.0/24\"\n userDefinedFields:\n - name: \"ipv4_fragment_offset\"\n values:\n - \"1-0x1fff\"\n\nThe above match condition matches packets with a source IP in\n192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named\n\"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." - }, - "preconfiguredWafConfig": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfig", - "description": "Preconfigured WAF configuration to be applied for the rule. If the rule\ndoes not evaluate preconfigured WAF rules, i.e., if\nevaluatePreconfiguredWaf() is not used, this field will have no effect." - }, - "preview": { - "description": "If set to true, the specified action is not enforced.", - "type": "boolean" - }, - "priority": { - "description": "An integer indicating the priority of a rule in the list. The priority\nmust be a positive value between 0 and 2147483647.\nRules are evaluated from highest to lowest priority where 0 is the\nhighest priority and 2147483647 is the lowest priority.", - "format": "int32", - "type": "integer" - }, - "rateLimitOptions": { - "$ref": "SecurityPolicyRuleRateLimitOptions", - "description": "Must be specified if the action is \"rate_based_ban\" or \"throttle\" or\n\"fairshare\". Cannot be specified for any other actions." - }, - "redirectOptions": { - "$ref": "SecurityPolicyRuleRedirectOptions", - "description": "Parameters defining the redirect action. Cannot be specified for any\nother actions.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "ruleNumber": { - "description": "Identifier for the rule. This is only unique within the given security\npolicy. This can only be set during rule creation, if rule number is not\nspecified it will be generated by the server.", - "format": "int64", - "type": "string" - }, - "ruleTupleCount": { - "deprecated": true, - "description": "[Output Only] Calculation of the complexity of a single firewall security\npolicy rule.", - "format": "int32", - "type": "integer" - }, - "targetResources": { - "deprecated": true, - "description": "A list of network resource URLs to which this rule applies. This field\nallows you to control which network's VMs get this rule. If this field\nis left blank, all VMs within the organization will receive the rule.\n\nThis field may only be specified when versioned_expr is set to FIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetServiceAccounts": { - "deprecated": true, - "description": "A list of service accounts indicating the sets of instances that are\napplied with this rule.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleHttpHeaderAction": { - "id": "SecurityPolicyRuleHttpHeaderAction", - "properties": { - "requestHeadersToAdds": { - "description": "The list of request headers to add or overwrite if they're already\npresent.", - "items": { - "$ref": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption": { - "id": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption", - "properties": { - "headerName": { - "description": "The name of the header to set.", - "type": "string" - }, - "headerValue": { - "description": "The value to set the named header to.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcher": { - "description": "Represents a match condition that incoming traffic is evaluated against.\nExactly one field must be specified.", - "id": "SecurityPolicyRuleMatcher", - "properties": { - "config": { - "$ref": "SecurityPolicyRuleMatcherConfig", - "description": "The configuration options available when specifying versioned_expr.\nThis field must be specified if versioned_expr is specified and cannot\nbe specified if versioned_expr is not specified." - }, - "expr": { - "$ref": "Expr", - "description": "User defined CEVAL expression.\nA CEVAL expression is used to specify match criteria such as origin.ip,\nsource.region_code and contents in the request header.\nExpressions containing `evaluateThreatIntelligence` require a Cloud\nArmor Enterprise subscription and are not supported in Edge Policies\nnor in Regional Policies. Expressions containing\n`evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud Armor\nEnterprise subscription and are only supported in Global Security\nPolicies." - }, - "exprOptions": { - "$ref": "SecurityPolicyRuleMatcherExprOptions", - "description": "The configuration options available when specifying a user defined\nCEVAL expression (i.e., 'expr')." - }, - "versionedExpr": { - "description": "Preconfigured versioned expression.\nIf this field is specified, config must also be specified.\nAvailable preconfigured expressions along with their requirements are:\nSRC_IPS_V1 - must specify the corresponding src_ip_range field in\nconfig.", - "enum": [ - "FIREWALL", - "SRC_IPS_V1" - ], - "enumDescriptions": [ - "", - "Matches the source IP address of a request to the IP ranges supplied\nin config." - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherConfig": { - "id": "SecurityPolicyRuleMatcherConfig", - "properties": { - "destIpRanges": { - "deprecated": true, - "description": "CIDR IP address range.\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - }, - "layer4Configs": { - "deprecated": true, - "description": "Pairs of IP protocols and ports that the rule should match.\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "$ref": "SecurityPolicyRuleMatcherConfigLayer4Config" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "CIDR IP address range.\nMaximum number of src_ip_ranges allowed is 10.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherConfigLayer4Config": { - "id": "SecurityPolicyRuleMatcherConfigLayer4Config", - "properties": { - "ipProtocol": { - "deprecated": true, - "description": "The IP protocol to which this rule applies. The protocol type is\nrequired when creating a firewall rule. This value can either be\none of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP\nprotocol number.", - "type": "string" - }, - "ports": { - "deprecated": true, - "description": "An optional list of ports to which this rule applies. This field is\nonly applicable for UDP or TCP protocol. Each entry must be either\nan integer or a range. If not specified, this rule applies to\nconnections through any port.\n\nExample inputs include: [\"22\"],[\"80\",\"443\"], and [\"12345-12349\"].\n\nThis field may only be specified when versioned_expr is set to\nFIREWALL.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherExprOptions": { - "id": "SecurityPolicyRuleMatcherExprOptions", - "properties": { - "recaptchaOptions": { - "$ref": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", - "description": "reCAPTCHA configuration options to be applied for the rule. If the\nrule does not evaluate reCAPTCHA tokens, this field has no effect." - } - }, - "type": "object" - }, - "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions": { - "id": "SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions", - "properties": { - "actionTokenSiteKeys": { - "description": "A list of site keys to be used during the validation of reCAPTCHA\naction-tokens. The provided site keys need to be created from\nreCAPTCHA API under the same project where the security policy is\ncreated.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sessionTokenSiteKeys": { - "description": "A list of site keys to be used during the validation of reCAPTCHA\nsession-tokens. The provided site keys need to be created from\nreCAPTCHA API under the same project where the security policy is\ncreated.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleNetworkMatcher": { - "description": "Represents a match condition that incoming network traffic is evaluated\nagainst.", - "id": "SecurityPolicyRuleNetworkMatcher", - "properties": { - "destIpRanges": { - "description": "Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text\nformat.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destPorts": { - "description": "Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit\nunsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "ipProtocols": { - "description": "IPv4 protocol / IPv6 next header (after extension headers). Each\nelement can be an 8-bit unsigned decimal number (e.g. \"6\"), range (e.g.\n\"253-254\"), or one of the following protocol names: \"tcp\", \"udp\",\n\"icmp\", \"esp\", \"ah\", \"ipip\", or \"sctp\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcAsns": { - "description": "BGP Autonomous System Number associated with the source IP address.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" - }, - "srcIpRanges": { - "description": "Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcPorts": { - "description": "Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit\nunsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "srcRegionCodes": { - "description": "Two-letter ISO 3166-1 alpha-2 country code associated with the source\nIP address.", - "items": { - "type": "string" - }, - "type": "array" - }, - "userDefinedFields": { - "description": "User-defined fields. Each element names a defined field and lists the\nmatching values for that field.", - "items": { - "$ref": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch": { - "id": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch", - "properties": { - "name": { - "description": "Name of the user-defined field, as given in the definition.", - "type": "string" - }, - "values": { - "description": "Matching values of the field. Each element can be a 32-bit unsigned\ndecimal or hexadecimal (starting with \"0x\") number (e.g. \"64\") or\nrange (e.g. \"0x400-0x7ff\").", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfig": { - "id": "SecurityPolicyRulePreconfiguredWafConfig", - "properties": { - "exclusions": { - "description": "A list of exclusions to apply during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusion" - }, - "type": "array" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfigExclusion": { - "id": "SecurityPolicyRulePreconfiguredWafConfigExclusion", - "properties": { - "requestCookiesToExclude": { - "description": "A list of request cookie names whose value will be excluded from\ninspection during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestHeadersToExclude": { - "description": "A list of request header names whose value will be excluded from\ninspection during preconfigured WAF evaluation.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestQueryParamsToExclude": { - "description": "A list of request query parameter names whose value will be excluded\nfrom inspection during preconfigured WAF evaluation. Note that the\nparameter can be in the query string or in the POST body.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "requestUrisToExclude": { - "description": "A list of request URIs from the request line to be excluded from\ninspection during preconfigured WAF evaluation. When specifying this\nfield, the query or fragment part should be excluded.", - "items": { - "$ref": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams" - }, - "type": "array" - }, - "targetRuleIds": { - "description": "A list of target rule IDs under the WAF rule set to apply the\npreconfigured WAF exclusion. If omitted, it refers to all the rule\nIDs under the WAF rule set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "targetRuleSet": { - "description": "Target WAF rule set to apply the preconfigured WAF exclusion.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams": { - "id": "SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams", - "properties": { - "op": { - "description": "The match operator for the field.", - "enum": [ - "CONTAINS", - "ENDS_WITH", - "EQUALS", - "EQUALS_ANY", - "STARTS_WITH" - ], - "enumDescriptions": [ - "The operator matches if the field value contains the specified\nvalue.", - "The operator matches if the field value ends with the specified\nvalue.", - "The operator matches if the field value equals the specified\nvalue.", - "The operator matches if the field value is any value.", - "The operator matches if the field value starts with the specified\nvalue." - ], - "type": "string" - }, - "val": { - "description": "The value of the field.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptions": { - "id": "SecurityPolicyRuleRateLimitOptions", - "properties": { - "banDurationSec": { - "description": "Can only be specified if the action for the rule is\n\"rate_based_ban\". If specified, determines the time (in seconds)\nthe traffic will continue to be banned by the rate limit after the\nrate falls below the threshold.", - "format": "int32", - "type": "integer" - }, - "banThreshold": { - "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", - "description": "Can only be specified if the action for the rule is\n\"rate_based_ban\". If specified, the key will be banned for the\nconfigured 'ban_duration_sec' when the number of requests that exceed\nthe 'rate_limit_threshold' also exceed this 'ban_threshold'." - }, - "conformAction": { - "description": "Action to take for requests that are under the configured rate limit\nthreshold. Valid option is \"allow\" only.", - "type": "string" - }, - "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible\nvalues are:\n \n - ALL: A single rate limit threshold is applied to all\n the requests matching this rule. This is the default value if\n \"enforceOnKey\" is not configured.\n - IP: The source IP address of\n the request is the key. Each IP has this limit enforced\n separately.\n - HTTP_HEADER: The value of the HTTP\n header whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the header value. If no\n such header is present in the request, the key type defaults toALL.\n - XFF_IP: The first IP address (i.e. the\n originating client IP address) specified in the list of IPs under\n X-Forwarded-For HTTP header. If no such header is present or the value\n is not a valid IP, the key defaults to the source IP address of\n the request i.e. key type IP.\n - HTTP_COOKIE: The value of the HTTP\n cookie whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the cookie value. If no\n such cookie is present in the request, the key type defaults toALL.\n - HTTP_PATH: The URL path of the HTTP request. The key\n value is truncated to the first 128 bytes. \n - SNI: Server name indication in the TLS session of the\n HTTPS request. The key value is truncated to the first 128 bytes. The\n key type defaults to ALL on a HTTP session. \n - REGION_CODE: The country/region from which the request\n originates. \n - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the\n client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\n key type defaults to ALL. \n - USER_IP: The IP address of the originating client,\n which is resolved based on \"userIpRequestHeaders\" configured with the\n security policy. If there is no \"userIpRequestHeaders\" configuration or\n an IP address cannot be resolved from it, the key type defaults toIP. \n\n- TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the\nclient connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\nkey type defaults to ALL. \nFor \"fairshare\" action, this value is limited to ALL i.e. a single rate\nlimit threshold is enforced for all the requests matching the rule.", - "enum": [ - "ALL", - "ALL_IPS", - "HTTP_COOKIE", - "HTTP_HEADER", - "HTTP_PATH", - "IP", - "REGION_CODE", - "SNI", - "TLS_JA3_FINGERPRINT", - "TLS_JA4_FINGERPRINT", - "USER_IP", - "XFF_IP" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "enforceOnKeyConfigs": { - "description": "If specified, any combination of values of\nenforce_on_key_type/enforce_on_key_name is treated as the key on which\nratelimit threshold/action is enforced. You can specify up to 3\nenforce_on_key_configs. If enforce_on_key_configs is specified,\nenforce_on_key must not be specified.", - "items": { - "$ref": "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig" - }, - "type": "array" - }, - "enforceOnKeyName": { - "description": "Rate limit key name applicable only for the following key types:\nHTTP_HEADER -- Name of the HTTP header whose value is taken as the key\nvalue.\nHTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key\nvalue.", - "type": "string" - }, - "exceedAction": { - "description": "Action to take for requests that are above the configured rate limit\nthreshold, to either deny with a specified HTTP response code, or\nredirect to a different endpoint.\nValid options are `deny(STATUS)`, where valid values for\n`STATUS` are 403, 404, 429, and 502, and\n`redirect`, where the redirect parameters come from\n`exceedRedirectOptions` below.\nThe `redirect` action is only supported in Global Security Policies of\ntype CLOUD_ARMOR.", - "type": "string" - }, - "exceedRedirectOptions": { - "$ref": "SecurityPolicyRuleRedirectOptions", - "description": "Parameters defining the redirect action that is used as the exceed\naction. Cannot be specified if the exceed action is not redirect.\nThis field is only supported in Global Security Policies of type\nCLOUD_ARMOR." - }, - "rateLimitThreshold": { - "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", - "description": "Threshold at which to begin ratelimiting." - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig": { - "id": "SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig", - "properties": { - "enforceOnKeyName": { - "description": "Rate limit key name applicable only for the following key types:\nHTTP_HEADER -- Name of the HTTP header whose value is taken as the\nkey value. HTTP_COOKIE -- Name of the HTTP cookie whose value is\ntaken as the key value.", - "type": "string" - }, - "enforceOnKeyType": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible\nvalues are:\n \n - ALL: A single rate limit threshold is applied to all\n the requests matching this rule. This is the default value if\n \"enforceOnKeyConfigs\" is not configured.\n - IP: The source IP address of\n the request is the key. Each IP has this limit enforced\n separately.\n - HTTP_HEADER: The value of the HTTP\n header whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the header value. If no\n such header is present in the request, the key type defaults toALL.\n - XFF_IP: The first IP address (i.e. the\n originating client IP address) specified in the list of IPs under\n X-Forwarded-For HTTP header. If no such header is present or the\n value is not a valid IP, the key defaults to the source IP address of\n the request i.e. key type IP.\n - HTTP_COOKIE: The value of the HTTP\n cookie whose name is configured under \"enforceOnKeyName\". The key\n value is truncated to the first 128 bytes of the cookie value. If no\n such cookie is present in the request, the key type defaults toALL.\n - HTTP_PATH: The URL path of the HTTP request. The key\n value is truncated to the first 128 bytes. \n - SNI: Server name indication in the TLS session of\n the HTTPS request. The key value is truncated to the first 128 bytes.\n The key type defaults to ALL on a HTTP session. \n - REGION_CODE: The country/region from which the\n request originates. \n - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the\n client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\n key type defaults to ALL. \n - USER_IP: The IP address of the originating client,\n which is resolved based on \"userIpRequestHeaders\" configured with the\n security policy. If there is no \"userIpRequestHeaders\" configuration\n or an IP address cannot be resolved from it, the key type defaults toIP. \n\n- TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the\nclient connects using HTTPS, HTTP/2 or HTTP/3. If not available, the\nkey type defaults to ALL.", - "enum": [ - "ALL", - "ALL_IPS", - "HTTP_COOKIE", - "HTTP_HEADER", - "HTTP_PATH", - "IP", - "REGION_CODE", - "SNI", - "TLS_JA3_FINGERPRINT", - "TLS_JA4_FINGERPRINT", - "USER_IP", - "XFF_IP" - ], - "enumDeprecated": [ - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRateLimitOptionsThreshold": { - "id": "SecurityPolicyRuleRateLimitOptionsThreshold", - "properties": { - "count": { - "description": "Number of HTTP(S) requests for calculating the threshold.", - "format": "int32", - "type": "integer" - }, - "intervalSec": { - "description": "Interval over which the threshold is computed.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "SecurityPolicyRuleRedirectOptions": { - "id": "SecurityPolicyRuleRedirectOptions", - "properties": { - "target": { - "description": "Target for the redirect action. This is required if the type is\nEXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.", - "type": "string" - }, - "type": { - "description": "Type of the redirect action. Possible values are:\n \n - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual\n challenge assessment.\n - EXTERNAL_302: redirect to a different URL via a 302\n response.", - "enum": [ - "EXTERNAL_302", - "GOOGLE_RECAPTCHA" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SecurityPolicyUserDefinedField": { - "id": "SecurityPolicyUserDefinedField", - "properties": { - "base": { - "description": "The base relative to which 'offset' is measured. Possible values are:\n \n - IPV4: Points to the beginning of the IPv4 header.\n - IPV6: Points to the beginning of the IPv6 header.\n - TCP: Points to the beginning of the TCP header, skipping\n over any IPv4 options or IPv6 extension headers. Not present for\n non-first fragments.\n - UDP: Points to the beginning of the UDP header, skipping\n over any IPv4 options or IPv6 extension headers. Not present for\n non-first fragments.\n\n\nrequired", - "enum": [ - "IPV4", - "IPV6", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "mask": { - "description": "If specified, apply this mask (bitwise AND) to the field to ignore bits\nbefore matching. Encoded as a hexadecimal number (starting with \"0x\").\nThe last byte of the field (in network byte order) corresponds to the\nleast significant byte of the mask.", - "type": "string" - }, - "name": { - "description": "The name of this field. Must be unique within the policy.", - "type": "string" - }, - "offset": { - "description": "Offset of the first byte of the field (in network byte order) relative to\n'base'.", - "format": "int32", - "type": "integer" - }, - "size": { - "description": "Size of the field in bytes. Valid values: 1-4.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "SecuritySettings": { - "description": "The authentication and authorization settings for a BackendService.", - "id": "SecuritySettings", - "properties": { - "authentication": { - "deprecated": true, - "description": "[Deprecated] Use clientTlsPolicy instead.", - "type": "string" - }, - "awsV4Authentication": { - "$ref": "AWSV4Signature", - "description": "The configuration needed to generate a signature for access to private\nstorage buckets that support AWS's Signature Version 4 for authentication.\nAllowed only for INTERNET_IP_PORT and INTERNET_FQDN_PORT NEG backends." - }, - "clientTlsPolicy": { - "description": "Optional. A URL referring to a networksecurity.ClientTlsPolicy resource\nthat describes how clients should authenticate with this service's\nbackends.\n\n clientTlsPolicy only applies to a globalBackendService with the loadBalancingScheme set\nto INTERNAL_SELF_MANAGED.\n\n If left blank, communications are not encrypted.", - "type": "string" - }, - "subjectAltNames": { - "description": "Optional. A list of Subject Alternative Names (SANs) that the client\nverifies during a mutual TLS handshake with an server/endpoint for thisBackendService. When the server presents its X.509 certificate\nto the client, the client inspects the certificate'ssubjectAltName field. If the field contains one of the\nspecified values, the communication continues. Otherwise, it fails. This\nadditional check enables the client to verify that the server is authorized\nto run the requested service.\n\n Note that the contents of the server\ncertificate's subjectAltName field are configured by the\nPublic Key Infrastructure which provisions server identities.\n\n Only applies to a global BackendService withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nOnly applies when BackendService has an attachedclientTlsPolicy with clientCertificate (mTLS\nmode).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SerialPortOutput": { - "description": "An instance serial console output.", - "id": "SerialPortOutput", - "properties": { - "contents": { - "description": "[Output Only] The contents of the console output.", - "type": "string" - }, - "kind": { - "default": "compute#serialPortOutput", - "description": "[Output Only] Type of the resource. Alwayscompute#serialPortOutput for serial port output.", - "type": "string" - }, - "next": { - "description": "[Output Only] The position of the next byte of content, regardless of\nwhether the content exists, following the output returned in the `contents`\nproperty. Use this value in the next request as the start\nparameter.", - "format": "int64", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "start": { - "description": "The starting byte position of the output that was returned.\nThis should match the start parameter sent with the request.\nIf the serial console output exceeds the size of the buffer (1 MB), older\noutput is overwritten by newer content. The output start value will\nindicate the byte position of the output that was returned, which might be\ndifferent than the `start` value that was specified in the request.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "ServerBinding": { - "id": "ServerBinding", - "properties": { - "type": { - "enum": [ - "RESTART_NODE_ON_ANY_SERVER", - "RESTART_NODE_ON_MINIMAL_SERVERS", - "SERVER_BINDING_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Node may associate with any physical server over its lifetime.", - "Node may associate with minimal physical servers over its lifetime.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAccount": { - "description": "A service account.", - "id": "ServiceAccount", - "properties": { - "email": { - "description": "Email address of the service account.", - "type": "string" - }, - "scopes": { - "description": "The list of scopes to be made available for this service account.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ServiceAttachment": { - "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed.\nIt encapsulates the load balancer which fronts the service runs and\na list of NAT IP ranges that the producers uses to represent\nthe consumers connecting to the service.", - "id": "ServiceAttachment", - "properties": { - "connectedEndpoints": { - "description": "[Output Only] An array of connections for all the consumers connected to\nthis service attachment.", - "items": { - "$ref": "ServiceAttachmentConnectedEndpoint" - }, - "type": "array" - }, - "connectionPreference": { - "description": "The connection preference of service attachment. The value can be set\nto ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC\nservice attachment is one that always accepts the connection from consumer\nforwarding rules.", - "enum": [ - "ACCEPT_AUTOMATIC", - "ACCEPT_MANUAL", - "CONNECTION_PREFERENCE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "consumerAcceptLists": { - "description": "Specifies which consumer projects or networks are allowed to connect to the\nservice attachment. Each project or network has a connection limit. A given\nservice attachment can manage connections at either the project or network\nlevel. Therefore, both the accept and reject lists for a given service\nattachment must contain either only projects or only networks or only\nendpoints.", - "items": { - "$ref": "ServiceAttachmentConsumerProjectLimit" - }, - "type": "array" - }, - "consumerRejectLists": { - "description": "Specifies a list of projects or networks that are not allowed to connect to\nthis service attachment. The project can be specified using its project ID\nor project number and the network can be specified using its URL. A given\nservice attachment can manage connections at either the project or network\nlevel. Therefore, both the reject and accept lists for a given service\nattachment must contain either only projects or only networks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "domainNames": { - "description": "If specified, the domain name will be used during the integration between\nthe PSC connected endpoints and the Cloud DNS. For example, this is a valid\ndomain name: \"p.mycompany.com.\". Current max number of domain names\nsupported is 1.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enableProxyProtocol": { - "description": "If true, enable the proxy protocol which is for supplying client TCP/IP\naddress data in TCP connections that traverse proxies on their way to\ndestination servers.", - "type": "boolean" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a ServiceAttachment. An up-to-date fingerprint must\nbe provided in order to patch/update the ServiceAttachment; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nServiceAttachment.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#serviceAttachment", - "description": "[Output Only] Type of the resource. Alwayscompute#serviceAttachment for service attachments.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata of the service attachment.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.serviceAttachments.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "natSubnets": { - "description": "An array of URLs where each entry is the URL of a subnet provided\nby the service producer to use for NAT in this service attachment.", - "items": { - "type": "string" - }, - "type": "array" - }, - "producerForwardingRule": { - "deprecated": true, - "description": "The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is\nserving the endpoint identified by this service attachment.", - "type": "string" - }, - "propagatedConnectionLimit": { - "description": "The number of consumer spokes that connected Private Service Connect\nendpoints can be propagated to through Network Connectivity Center. This\nlimit lets the service producer limit how many propagated Private Service\nConnect connections can be established to this service attachment from a\nsingle consumer.\n\nIf the connection preference of the service attachment is ACCEPT_MANUAL,\nthe limit applies to each project or network that is listed in the consumer\naccept list. If the connection preference of the service attachment is\nACCEPT_AUTOMATIC, the limit applies to each project that contains a\nconnected endpoint.\n\nIf unspecified, the default propagated connection limit is 250.", - "format": "uint32", - "type": "integer" - }, - "pscServiceAttachmentId": { - "$ref": "Uint128", - "description": "[Output Only] An 128-bit global unique ID of the PSC service attachment." - }, - "reconcileConnections": { - "description": "This flag determines whether a consumer accept/reject list change can\nreconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.\n \n \n - If false, connection policy update will only affect existing PENDING\n PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched\n regardless how the connection policy is modified . \n - If true,\n update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For\n example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project\n is added to the reject list.\n\n\nFor newly created service attachment, this boolean defaults to false.", - "type": "boolean" - }, - "region": { - "description": "[Output Only] URL of the region where the service attachment resides.\nThis field applies only to the region resource. You must specify this\nfield as part of the HTTP request URL. It is not settable as a field in\nthe request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "targetService": { - "description": "The URL of a service serving the endpoint identified by this service\nattachment.", - "type": "string" - }, - "tunnelingConfig": { - "$ref": "ServiceAttachmentTunnelingConfig", - "description": "When a tunneling config is set on this service attachment it will\nencapsulate traffic between consumer and producer.\n\nWhen tunneling is enabled:\n \n \n - nat_subnets must be unset \n - enable_proxy_protocol must be false \n - producer_forwarding_rule must be a L4 ILB. \n -" - } - }, - "type": "object" - }, - "ServiceAttachmentAggregatedList": { - "description": "Contains a list of ServiceAttachmentsScopedList.", - "id": "ServiceAttachmentAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "ServiceAttachmentsScopedList", - "description": "Name of the scope containing this set of ServiceAttachments." - }, - "description": "A list of ServiceAttachmentsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#serviceAttachmentAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ServiceAttachmentConnectedEndpoint": { - "description": "[Output Only] A connection connected to this service attachment.", - "id": "ServiceAttachmentConnectedEndpoint", - "properties": { - "consumerNetwork": { - "description": "The url of the consumer network.", - "type": "string" - }, - "endpoint": { - "description": "The url of a connected endpoint.", - "type": "string" - }, - "endpointWithId": { - "description": "The url of a connected endpoint with resource id.", - "type": "string" - }, - "natIps": { - "description": "NAT IPs of the connected PSC endpoint and those of other endpoints\npropagated from it.", - "items": { - "type": "string" - }, - "type": "array" - }, - "propagatedConnectionCount": { - "description": "The number of consumer Network Connectivity Center spokes that the\nconnected Private Service Connect endpoint has propagated to.", - "format": "uint32", - "type": "integer" - }, - "pscConnectionId": { - "description": "The PSC connection id of the connected endpoint.", - "format": "uint64", - "type": "string" - }, - "status": { - "description": "The status of a connected endpoint to this service attachment.", - "enum": [ - "ACCEPTED", - "CLOSED", - "NEEDS_ATTENTION", - "PENDING", - "REJECTED", - "STATUS_UNSPECIFIED" - ], - "enumDescriptions": [ - "The connection has been accepted by the producer.", - "The connection has been closed by the producer.", - "The connection has been accepted by the producer, but the producer\nneeds to take further action before the forwarding rule can serve\ntraffic.", - "The connection is pending acceptance by the producer.", - "The consumer is still connected but not using the connection.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentConsumerProjectLimit": { - "id": "ServiceAttachmentConsumerProjectLimit", - "properties": { - "connectionLimit": { - "description": "The value of the limit to set. For endpoint_url, the limit should be no\nmore than 1.", - "format": "uint32", - "type": "integer" - }, - "endpointUrl": { - "description": "The URL for the PSC endpoint to accept", - "type": "string" - }, - "networkUrl": { - "description": "The network URL for the network to set the limit for.", - "type": "string" - }, - "projectIdOrNum": { - "description": "The project id or number for the project to set the limit for.", - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentList": { - "id": "ServiceAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of ServiceAttachment resources.", - "items": { - "$ref": "ServiceAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#serviceAttachmentList", - "description": "[Output Only] Type of the resource. Alwayscompute#serviceAttachment for service attachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ServiceAttachmentTunnelingConfig": { - "description": "Use to configure this PSC connection in tunneling mode. In tunneling mode\ntraffic from consumer to producer will be encapsulated as it crosses the\nVPC boundary and traffic from producer to consumer will be decapsulated in\nthe same manner.", - "id": "ServiceAttachmentTunnelingConfig", - "properties": { - "encapsulationProfile": { - "description": "Specify the encapsulation protocol and what metadata to include in\nincoming encapsulated packet headers.", - "enum": [ - "GENEVE_SECURITY_V1", - "UNSPECIFIED_ENCAPSULATION_PROFILE" - ], - "enumDescriptions": [ - "Use GENEVE encapsulation protocol and include the SECURITY_V1 set of\nGENEVE headers.", - "" - ], - "type": "string" - }, - "routingMode": { - "description": "How this Service Attachment will treat traffic sent to the tunnel_ip,\ndestined for the consumer network.", - "enum": [ - "PACKET_INJECTION", - "STANDARD_ROUTING", - "UNSPECIFIED_ROUTING_MODE" - ], - "enumDescriptions": [ - "Traffic sent to this service attachment will be reinjected into the\nconsumer network.", - "Response traffic, after de-encapsulation, will be returned to the\nclient.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ServiceAttachmentsScopedList": { - "id": "ServiceAttachmentsScopedList", - "properties": { - "serviceAttachments": { - "description": "A list of ServiceAttachments contained in this scope.", - "items": { - "$ref": "ServiceAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nservice attachments when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SetCommonInstanceMetadataOperationMetadata": { - "id": "SetCommonInstanceMetadataOperationMetadata", - "properties": { - "clientOperationId": { - "description": "[Output Only] The client operation id.", - "type": "string" - }, - "perLocationOperations": { - "additionalProperties": { - "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" - }, - "description": "[Output Only] Status information per location (location name is key).\nExample key: zones/us-central1-a", - "type": "object" - } - }, - "type": "object" - }, - "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": { - "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", - "properties": { - "error": { - "$ref": "Status", - "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is\npopulated." - }, - "state": { - "description": "[Output Only] Status of the action, which can be one of the following:\n`PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", - "enum": [ - "ABANDONED", - "DONE", - "FAILED", - "PROPAGATED", - "PROPAGATING", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Operation not tracked in this location e.g. zone is marked as DOWN.", - "Operation has completed successfully.", - "Operation is in an error state.", - "Operation is confirmed to be in the location.", - "Operation is not yet confirmed to have been created in the location.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ShareSettings": { - "description": "The share setting for reservations and sole tenancy node groups.", - "id": "ShareSettings", - "properties": { - "projectMap": { - "additionalProperties": { - "$ref": "ShareSettingsProjectConfig" - }, - "description": "A map of project id and project config. This is only valid when\nshare_type's value is SPECIFIC_PROJECTS.", - "type": "object" - }, - "projects": { - "description": "A List of Project names to specify consumer projects for this\nshared-reservation. This is only valid when share_type's value is\nSPECIFIC_PROJECTS.", - "items": { - "type": "string" - }, - "type": "array" - }, - "shareType": { - "description": "Type of sharing for this shared-reservation", - "enum": [ - "LOCAL", - "ORGANIZATION", - "SHARE_TYPE_UNSPECIFIED", - "SPECIFIC_PROJECTS" - ], - "enumDescriptions": [ - "Default value.", - "Shared-reservation is open to entire Organization", - "Default value. This value is unused.", - "Shared-reservation is open to specific projects" - ], - "type": "string" - } - }, - "type": "object" - }, - "ShareSettingsProjectConfig": { - "description": "Config for each project in the share settings.", - "id": "ShareSettingsProjectConfig", - "properties": { - "projectId": { - "description": "The project ID, should be same as the key of this project config in the\nparent map.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedInstanceConfig": { - "description": "A set of Shielded Instance options.", - "id": "ShieldedInstanceConfig", - "properties": { - "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled.Enabled by\ndefault.", - "type": "boolean" - }, - "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled.Disabled by\ndefault.", - "type": "boolean" - }, - "enableVtpm": { - "description": "Defines whether the instance has the vTPM enabled.Enabled by\ndefault.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedInstanceIdentity": { - "description": "A Shielded Instance Identity.", - "id": "ShieldedInstanceIdentity", - "properties": { - "eccP256EncryptionKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) made by the ECC P256 algorithm\nissued to the Shielded Instance's vTPM." - }, - "eccP256SigningKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) made by the ECC P256 algorithm\nissued to the Shielded Instance's vTPM." - }, - "encryptionKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) made by the RSA 2048 algorithm\nissued to the Shielded Instance's vTPM." - }, - "kind": { - "default": "compute#shieldedInstanceIdentity", - "description": "[Output Only] Type of the resource. Alwayscompute#shieldedInstanceIdentity for shielded Instance\nidentity entry.", - "type": "string" - }, - "signingKey": { - "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) made by the RSA 2048 algorithm\nissued to the Shielded Instance's vTPM." - } - }, - "type": "object" - }, - "ShieldedInstanceIdentityEntry": { - "description": "A Shielded Instance Identity Entry.", - "id": "ShieldedInstanceIdentityEntry", - "properties": { - "ekCert": { - "description": "A PEM-encoded X.509 certificate. This field can be empty.", - "type": "string" - }, - "ekPub": { - "description": "A PEM-encoded public key.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedInstanceIntegrityPolicy": { - "description": "The policy describes the baseline against which\nInstance boot integrity is measured.", - "id": "ShieldedInstanceIntegrityPolicy", - "properties": { - "updateAutoLearnPolicy": { - "description": "Updates the integrity policy baseline using the\nmeasurements from the VM instance's most recent boot.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedVmConfig": { - "description": "A set of Shielded VM options.", - "id": "ShieldedVmConfig", - "properties": { - "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled.", - "type": "boolean" - }, - "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled.", - "type": "boolean" - }, - "enableVtpm": { - "description": "Defines whether the instance has the vTPM enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedVmIdentity": { - "description": "A Shielded VM Identity.", - "id": "ShieldedVmIdentity", - "properties": { - "encryptionKey": { - "$ref": "ShieldedVmIdentityEntry", - "description": "An Endorsement Key (EK) issued to the Shielded VM's vTPM." - }, - "kind": { - "default": "compute#shieldedVmIdentity", - "description": "[Output Only] Type of the resource. Alwayscompute#shieldedVmIdentity for shielded VM identity entry.", - "type": "string" - }, - "signingKey": { - "$ref": "ShieldedVmIdentityEntry", - "description": "An Attestation Key (AK) issued to the Shielded VM's vTPM." - } - }, - "type": "object" - }, - "ShieldedVmIdentityEntry": { - "description": "A Shielded Instance Identity Entry.", - "id": "ShieldedVmIdentityEntry", - "properties": { - "ekCert": { - "description": "A PEM-encoded X.509 certificate. This field can be empty.", - "type": "string" - }, - "ekPub": { - "description": "A PEM-encoded public key.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedVmIntegrityPolicy": { - "description": "The policy describes the baseline against which\nVM instance boot integrity is measured.", - "id": "ShieldedVmIntegrityPolicy", - "properties": { - "updateAutoLearnPolicy": { - "description": "Updates the integrity policy baseline using the\nmeasurements from the VM instance's most recent boot.", - "type": "boolean" - } - }, - "type": "object" - }, - "SignedUrlKey": { - "description": "Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs", - "id": "SignedUrlKey", - "properties": { - "keyName": { - "description": "Name of the key. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "keyValue": { - "description": "128-bit key value used for signing the URL. The key value must be a validRFC\n4648 Section 5 base64url encoded string.", - "type": "string" - } - }, - "type": "object" - }, - "Snapshot": { - "description": "Represents a Persistent Disk Snapshot resource.\n\nYou can use snapshots to back up data on a regular interval. For more\ninformation, read Creating\npersistent disk snapshots.", - "id": "Snapshot", - "properties": { - "architecture": { - "description": "[Output Only] The architecture of the snapshot. Valid values are\nARM64 or X86_64.", - "enum": [ - "ARCHITECTURE_UNSPECIFIED", - "ARM64", - "X86_64" - ], - "enumDescriptions": [ - "Default value indicating Architecture is not set.", - "Machines with architecture ARM64", - "Machines with architecture X86_64" - ], - "type": "string" - }, - "autoCreated": { - "description": "[Output Only] Set to true if snapshots are automatically created by\napplying resource policy on the target disk.", - "type": "boolean" - }, - "chainName": { - "description": "Creates the new snapshot in the snapshot chain labeled with the\nspecified name. The chain name must be 1-63 characters long and comply\nwith RFC1035. This is an uncommon option only for advanced service\nowners who needs to create separate snapshot chains, for example,\nfor chargeback tracking. When you describe your snapshot resource, this\nfield is visible only if it has a non-empty value.", - "type": "string" - }, - "creationSizeBytes": { - "description": "[Output Only] Size in bytes of the snapshot at creation time.", - "format": "int64", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "diskSizeGb": { - "description": "[Output Only] Size of the source disk, specified in GB.", - "format": "int64", - "type": "string" - }, - "downloadBytes": { - "description": "[Output Only] Number of bytes downloaded to restore a snapshot to a disk.", - "format": "int64", - "type": "string" - }, - "enableConfidentialCompute": { - "description": "Whether this snapshot is created from a confidential compute mode disk.\n[Output Only]: This field is not set by user, but from source disk.", - "type": "boolean" - }, - "guestFlush": { - "description": "[Input Only] Whether to attempt an application consistent snapshot by\ninforming the OS to prepare for the snapshot process.", - "type": "boolean" - }, - "guestOsFeatures": { - "description": "[Output Only] A list of features to enable on the guest operating system.\nApplicable only for bootable images. Read \nEnabling guest operating system features to see a list of available\noptions.", - "items": { - "$ref": "GuestOsFeature" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#snapshot", - "description": "[Output Only] Type of the resource. Always compute#snapshot\nfor Snapshot resources.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this snapshot, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a snapshot.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this snapshot. These can be later modified by\nthe setLabels method.\nLabel values may be empty.", - "type": "object" - }, - "licenseCodes": { - "description": "[Output Only] Integer license codes indicating which licenses are attached\nto this snapshot.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "licenses": { - "description": "[Output Only] A list of public visible licenses that apply to this\nsnapshot. This can be because the original image had licenses attached\n(such as a Windows image).", - "items": { - "type": "string" - }, - "type": "array" - }, - "locationHint": { - "description": "An opaque location hint used to place the snapshot close to other\nresources.\nThis field is for use by internal tools that use the public API.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.disks.createSnapshot", - "compute.snapshots.insert" - ] - }, - "description": "Name of the resource; provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must be\na dash, lowercase letter, or digit, except the last character, which cannot\nbe a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "params": { - "$ref": "SnapshotParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "region": { - "description": "[Output Only] URL of the region where the snapshot resides. Only applicable\nfor regional snapshots.", - "type": "string" - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "snapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Encrypts the snapshot using acustomer-supplied\nencryption key.\n\nAfter you encrypt a snapshot using a customer-supplied key, you must\nprovide the same key if you use the snapshot later. For example, you must\nprovide the encryption key when you create a disk from the encrypted\nsnapshot in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata\nof the snapshot.\n\nIf you do not provide an encryption key when creating the snapshot, then\nthe snapshot will be encrypted using an automatically generated key and you\ndo not need to provide a key to use the snapshot later." - }, - "snapshotType": { - "description": "Indicates the type of the snapshot.", - "enum": [ - "ARCHIVE", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "sourceDisk": { - "description": "The source disk used to create this snapshot.", - "type": "string" - }, - "sourceDiskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "The customer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDiskForRecoveryCheckpoint": { - "description": "The source disk whose recovery checkpoint will be used to create this\nsnapshot.", - "type": "string" - }, - "sourceDiskId": { - "description": "[Output Only] The ID value of the disk used to create this snapshot. This\nvalue may be used to determine whether the snapshot was taken from the\ncurrent or a previous instance of a given disk name.", - "type": "string" - }, - "sourceInstantSnapshot": { - "description": "The source instant snapshot used to create this snapshot. You can provide\nthis as a partial or full URL to the resource. For example, the following\nare valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot\n - projects/project/zones/zone/instantSnapshots/instantSnapshot \n - zones/zone/instantSnapshots/instantSnapshot", - "type": "string" - }, - "sourceInstantSnapshotEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Customer provided encryption key when creating Snapshot from Instant\nSnapshot." - }, - "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this\nsnapshot. This value identifies the exact instant snapshot that was used to\ncreate this snapshot. For example, if you created the snapshot from an\ninstant snapshot that was later deleted and recreated under the same name,\nthe source instant snapshot ID would identify the exact instant snapshot\nthat was used.", - "type": "string" - }, - "sourceSnapshotSchedulePolicy": { - "description": "[Output Only] URL of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "sourceSnapshotSchedulePolicyId": { - "description": "[Output Only] ID of the resource policy which created this\nscheduled snapshot.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the snapshot. This can beCREATING, DELETING, FAILED,READY, or UPLOADING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "UPLOADING" - ], - "enumDescriptions": [ - "Snapshot creation is in progress.", - "Snapshot is currently being deleted.", - "Snapshot creation failed.", - "Snapshot has been created successfully.", - "Snapshot is being uploaded." - ], - "type": "string" - }, - "storageBytes": { - "description": "[Output Only] A size of the storage used by the snapshot. As snapshots\nshare storage, this number is expected to change with snapshot\ncreation/deletion.", - "format": "int64", - "type": "string" - }, - "storageBytesStatus": { - "description": "[Output Only] An indicator whether storageBytes is in a\nstable state or it is being adjusted as a result of shared storage\nreallocation. This status can either be UPDATING, meaning\nthe size of the snapshot is being updated, or UP_TO_DATE,\nmeaning the size of the snapshot is up-to-date.", - "enum": [ - "UPDATING", - "UP_TO_DATE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "storageLocations": { - "description": "Cloud Storage bucket storage location of the snapshot (regional or\nmulti-regional).", - "items": { - "type": "string" - }, - "type": "array" - }, - "userLicenses": { - "description": "[Output Only] A list of user provided licenses represented by a list of\nURLs to the license resource.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SnapshotAggregatedList": { - "id": "SnapshotAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SnapshotsScopedList", - "description": "[Output Only] Name of the scope containing this set of snapshots." - }, - "description": "A list of SnapshotsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#snapshotAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#snapshotAggregatedList for aggregated lists of\nsnapshots.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SnapshotList": { - "description": "Contains a list of Snapshot resources.", - "id": "SnapshotList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Snapshot resources.", - "items": { - "$ref": "Snapshot" - }, - "type": "array" - }, - "kind": { - "default": "compute#snapshotList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SnapshotParams": { - "description": "Additional snapshot params.", - "id": "SnapshotParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource manager tags to be bound to the snapshot. Tag keys and values have\nthe same definition as resource\nmanager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and\nvalues are in the format `tagValues/456`. The field is ignored (both PUT \u0026\nPATCH) when empty.", - "type": "object" - } - }, - "type": "object" - }, - "SnapshotSettings": { - "id": "SnapshotSettings", - "properties": { - "accessLocation": { - "$ref": "SnapshotSettingsAccessLocation", - "description": "(Regional snapshots use only)Policy of which location is allowed to access\nsnapshot." - }, - "storageLocation": { - "$ref": "SnapshotSettingsStorageLocationSettings", - "description": "Policy of which storage location is going to be resolved, and additional\ndata that particularizes how the policy is going to be carried out." - } - }, - "type": "object" - }, - "SnapshotSettingsAccessLocation": { - "id": "SnapshotSettingsAccessLocation", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "SnapshotSettingsAccessLocationAccessLocationPreference" - }, - "description": "List of regions that can restore a regional\n snapshot from the current region", - "type": "object" - }, - "policy": { - "description": "Policy of which location is allowed to access snapshot.", - "enum": [ - "ALL_REGIONS", - "POLICY_UNSPECIFIED", - "SPECIFIC_REGIONS" - ], - "enumDescriptions": [ - "Any regions will be able to access the source location.", - "", - "Only allowlisted regions will be able to restore region scoped\nsnapshots" - ], - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsAccessLocationAccessLocationPreference": { - "description": "A structure for specifying an allowed target region.", - "id": "SnapshotSettingsAccessLocationAccessLocationPreference", - "properties": { - "region": { - "description": "Accessible region name", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsStorageLocationSettings": { - "id": "SnapshotSettingsStorageLocationSettings", - "properties": { - "locations": { - "additionalProperties": { - "$ref": "SnapshotSettingsStorageLocationSettingsStorageLocationPreference" - }, - "description": "When the policy is SPECIFIC_LOCATIONS, snapshots will be stored\nin the locations listed in this field. Keys are Cloud Storage bucket\nlocations. Only one location can be specified.", - "type": "object" - }, - "policy": { - "description": "The chosen location policy.", - "enum": [ - "LOCAL_REGION", - "NEAREST_MULTI_REGION", - "SPECIFIC_LOCATIONS", - "STORAGE_LOCATION_POLICY_UNSPECIFIED" - ], - "enumDescriptions": [ - "Store snapshot in the same region as with the originating disk.\nNo additional parameters are needed.", - "Store snapshot in the nearest multi region Cloud Storage bucket,\nrelative to the originating disk. No additional parameters are needed.", - "Store snapshot in the specific locations, as specified by the user.\nThe list of regions to store must be defined under the `locations`\nfield.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SnapshotSettingsStorageLocationSettingsStorageLocationPreference": { - "description": "A structure for specifying storage locations.", - "id": "SnapshotSettingsStorageLocationSettingsStorageLocationPreference", - "properties": { - "name": { - "description": "Name of the location. It should be one of the Cloud Storage buckets.\nOnly one location can be specified.", - "type": "string" - } - }, - "type": "object" - }, - "SnapshotsScopedList": { - "id": "SnapshotsScopedList", - "properties": { - "snapshots": { - "description": "[Output Only] A list of snapshots contained in this scope.", - "items": { - "$ref": "Snapshot" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of snapshots\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SourceDiskEncryptionKey": { - "id": "SourceDiskEncryptionKey", - "properties": { - "diskEncryptionKey": { - "$ref": "CustomerEncryptionKey", - "description": "Thecustomer-supplied\nencryption key of the source disk. Required if the source disk is\nprotected by a customer-supplied encryption key." - }, - "sourceDisk": { - "description": "URL of the disk attached to the source instance. This can be a full or\nvalid partial URL. For example, the following are valid values:\n \n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n - projects/project/zones/zone/disks/disk \n - zones/zone/disks/disk", - "type": "string" - } - }, - "type": "object" - }, - "SourceInstanceParams": { - "description": "A specification of the parameters to use when creating the instance template\nfrom a source instance.", - "id": "SourceInstanceParams", - "properties": { - "diskConfigs": { - "description": "Attached disks configuration. If not provided, defaults are applied:\nFor boot disk and any other R/W disks, the source images for each disk\nwill be used. For read-only disks, they will be attached in read-only\nmode. Local SSD disks will be created as blank volumes.", - "items": { - "$ref": "DiskInstantiationConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "SourceInstanceProperties": { - "description": "DEPRECATED: Please use compute#instanceProperties instead.\nNew properties will not be added to this field.", - "id": "SourceInstanceProperties", - "properties": { - "canIpForward": { - "description": "Enables instances created based on this machine image to send packets with\nsource IP addresses other than their own and receive packets with\ndestination IP addresses other than their own. If these instances will be\nused as an IP gateway or it will be set as the next-hop in a Route\nresource, specify true. If unsure, leave this set tofalse. See theEnable IP forwarding\ndocumentation for more information.", - "type": "boolean" - }, - "deletionProtection": { - "description": "Whether the instance created from this machine image should be protected\nagainst deletion.", - "type": "boolean" - }, - "description": { - "description": "An optional text description for the instances that are created from this\nmachine image.", - "type": "string" - }, - "disks": { - "description": "An array of disks that are associated with the instances that are created\nfrom this machine image.", - "items": { - "$ref": "SavedAttachedDisk" - }, - "type": "array" - }, - "guestAccelerators": { - "description": "A list of guest accelerator cards' type and count to use for instances\ncreated from this machine image.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "keyRevocationActionType": { - "description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and\n\"NONE\". The default value is \"NONE\" if it is not specified.", - "enum": [ - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "NONE", - "STOP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Indicates user chose no operation.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to instances that are created from this machine image.", - "type": "object" - }, - "machineType": { - "description": "The machine type to use for instances that are created from this machine\nimage.", - "type": "string" - }, - "metadata": { - "$ref": "Metadata", - "description": "The metadata key/value pairs to assign to instances that are created from\nthis machine image. These pairs can consist of custom metadata or\npredefined keys. SeeProject and\ninstance metadata for more information." - }, - "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by instances created from this machine\nimage. The instance may be scheduled on the specified or newer\ncpu/platform. Applicable values are the friendly names of CPU platforms,\nsuch as minCpuPlatform: \"Intel Haswell\" orminCpuPlatform: \"Intel Sandy Bridge\". For more\ninformation, read Specifying a\nMinimum CPU Platform.", - "type": "string" - }, - "networkInterfaces": { - "description": "An array of network access configurations for this interface.", - "items": { - "$ref": "NetworkInterface" - }, - "type": "array" - }, - "postKeyRevocationActionType": { - "description": "PostKeyRevocationActionType of the instance.", - "enum": [ - "NOOP", - "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED", - "SHUTDOWN" - ], - "enumDescriptions": [ - "Indicates user chose no operation.", - "Default value. This value is unused.", - "Indicates user chose to opt for VM shutdown on key revocation." - ], - "type": "string" - }, - "scheduling": { - "$ref": "Scheduling", - "description": "Specifies the scheduling options for the instances that are created from\nthis machine image." - }, - "serviceAccounts": { - "description": "A list of service accounts with specified scopes. Access tokens for these\nservice accounts are available to the instances that are created from this\nmachine image. Use metadata queries to obtain the access tokens for these\ninstances.", - "items": { - "$ref": "ServiceAccount" - }, - "type": "array" - }, - "tags": { - "$ref": "Tags", - "description": "A list of tags to apply to the instances that are created from this machine\nimage. The tags identify valid sources or targets for network firewalls.\nThe setTags method can modify this list of tags. Each tag within the list\nmust comply withRFC1035." - } - }, - "type": "object" - }, - "SslCertificate": { - "description": "Represents an SSL certificate resource.\n\nGoogle Compute Engine has two SSL certificate resources:\n\n* [Global](/compute/docs/reference/rest/beta/sslCertificates)\n* [Regional](/compute/docs/reference/rest/beta/regionSslCertificates)\n\n\nThe global SSL certificates (sslCertificates) are used by:\n \n - Global external Application Load Balancers\n - Classic Application Load Balancers\n - Proxy Network Load Balancers (with target SSL proxies)\n\n\n\nThe regional SSL certificates (regionSslCertificates) are used\nby:\n \n - Regional external Application Load Balancers\n - Regional internal Application Load Balancers\n\n\n\nOptionally, certificate file contents that you upload can contain a set of up\nto five PEM-encoded certificates.\nThe API call creates an object (sslCertificate) that holds this data.\nYou can use SSL keys and certificates to secure connections to a load\nbalancer.\nFor more information, read \nCreating and using SSL certificates,SSL certificates\nquotas and limits, and\nTroubleshooting SSL certificates.", - "id": "SslCertificate", - "properties": { - "certificate": { - "description": "A value read into memory from a certificate file. The certificate file must\nbe in PEM format. The certificate chain must be no greater than 5 certs\nlong. The chain must include at least one intermediate cert.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "expireTime": { - "description": "[Output Only] Expire time of the certificate. RFC3339", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#sslCertificate", - "description": "[Output Only] Type of the resource. Alwayscompute#sslCertificate for SSL certificates.", - "type": "string" - }, - "managed": { - "$ref": "SslCertificateManagedSslCertificate", - "description": "Configuration and status of a managed SSL certificate." - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "privateKey": { - "description": "A value read into memory from a write-only private key file. The private\nkey file must be in PEM format. For security, only insert\nrequests include this field.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional SSL Certificate\nresides. This field is not applicable to global SSL Certificate.", - "type": "string" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "selfManaged": { - "$ref": "SslCertificateSelfManagedSslCertificate", - "description": "Configuration and status of a self-managed SSL certificate." - }, - "subjectAlternativeNames": { - "description": "[Output Only] Domains associated with the certificate via Subject\nAlternative Name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "description": "(Optional) Specifies the type of SSL certificate, either \"SELF_MANAGED\" or\n\"MANAGED\". If not specified, the certificate is self-managed and the fieldscertificate and private_key are used.", - "enum": [ - "MANAGED", - "SELF_MANAGED", - "TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "Google-managed SSLCertificate.", - "Certificate uploaded by user.", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "SslCertificateAggregatedList": { - "id": "SslCertificateAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SslCertificatesScopedList", - "description": "Name of the scope containing this set of SslCertificates." - }, - "description": "A list of SslCertificatesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#sslCertificateAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#sslCertificateAggregatedList for lists of SSL\nCertificates.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslCertificateList": { - "description": "Contains a list of SslCertificate resources.", - "id": "SslCertificateList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SslCertificate resources.", - "items": { - "$ref": "SslCertificate" - }, - "type": "array" - }, - "kind": { - "default": "compute#sslCertificateList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslCertificateManagedSslCertificate": { - "description": "Configuration and status of a managed SSL certificate.", - "id": "SslCertificateManagedSslCertificate", - "properties": { - "domainStatus": { - "additionalProperties": { - "enum": [ - "ACTIVE", - "DOMAIN_STATUS_UNSPECIFIED", - "FAILED_CAA_CHECKING", - "FAILED_CAA_FORBIDDEN", - "FAILED_NOT_VISIBLE", - "FAILED_RATE_LIMITED", - "PROVISIONING" - ], - "enumDescriptions": [ - "A managed certificate can be provisioned, no issues for this domain.", - "", - "Failed to check CAA records for the domain.", - "Certificate issuance forbidden by an explicit CAA record for the\ndomain.", - "There seems to be problem with the user's DNS or load balancer\nconfiguration for this domain.", - "Reached rate-limit for certificates per top-level private domain.", - "Certificate provisioning for this domain is under way. GCP will\nattempt to provision the first certificate." - ], - "type": "string" - }, - "description": "[Output only] Detailed statuses of the domains specified for managed\ncertificate resource.", - "type": "object" - }, - "domains": { - "description": "The domains for which a managed SSL certificate will be generated. Each\nGoogle-managed SSL certificate supports up to the [maximum number of\ndomains per Google-managed SSL\ncertificate](/load-balancing/docs/quotas#ssl_certificates).", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "[Output only] Status of the managed certificate resource.", - "enum": [ - "ACTIVE", - "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED", - "PROVISIONING", - "PROVISIONING_FAILED", - "PROVISIONING_FAILED_PERMANENTLY", - "RENEWAL_FAILED" - ], - "enumDescriptions": [ - "The certificate management is working, and a certificate has been\nprovisioned.", - "", - "The certificate management is working. GCP will attempt to provision\nthe first certificate.", - "Certificate provisioning failed due to an issue with the DNS\nor load balancing configuration.\nFor details of which domain failed, consult domain_status field.", - "Certificate provisioning failed due to an issue with the DNS\nor load balancing configuration. It won't be retried. To try again\ndelete and create a new managed SslCertificate resource.\nFor details of which domain failed, consult domain_status field.", - "Renewal of the certificate has failed due to an issue with the DNS\nor load balancing configuration. The existing cert is still serving;\nhowever, it will expire shortly. To provision a renewed certificate,\ndelete and create a new managed SslCertificate resource.\nFor details on which domain failed, consult domain_status field." - ], - "type": "string" - } - }, - "type": "object" - }, - "SslCertificateSelfManagedSslCertificate": { - "description": "Configuration and status of a self-managed SSL certificate.", - "id": "SslCertificateSelfManagedSslCertificate", - "properties": { - "certificate": { - "description": "A local certificate file. The certificate must be in\nPEM format. The certificate chain must be no greater than 5 certs\nlong. The chain must include at least one intermediate cert.", - "type": "string" - }, - "privateKey": { - "description": "A write-only private key in PEM format. Only insert\nrequests will include this field.", - "type": "string" - } - }, - "type": "object" - }, - "SslCertificatesScopedList": { - "id": "SslCertificatesScopedList", - "properties": { - "sslCertificates": { - "description": "List of SslCertificates contained in this scope.", - "items": { - "$ref": "SslCertificate" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesAggregatedList": { - "id": "SslPoliciesAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SslPoliciesScopedList", - "description": "Name of the scope containing this set of SSL policies." - }, - "description": "A list of SslPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#sslPoliciesAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#sslPolicyAggregatedList for lists of SSL Policies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesList": { - "id": "SslPoliciesList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of SslPolicy resources.", - "items": { - "$ref": "SslPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#sslPoliciesList", - "description": "[Output Only] Type of the resource. Alwayscompute#sslPoliciesList for lists of sslPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPoliciesListAvailableFeaturesResponse": { - "id": "SslPoliciesListAvailableFeaturesResponse", - "properties": { - "features": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SslPoliciesScopedList": { - "id": "SslPoliciesScopedList", - "properties": { - "sslPolicies": { - "description": "A list of SslPolicies contained in this scope.", - "items": { - "$ref": "SslPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nSSL policies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SslPolicy": { - "description": "Represents an SSL Policy resource.\n\nUse SSL policies to control SSL features, such as versions and cipher\nsuites, that are offered by Application Load Balancers and proxy Network Load\nBalancers. For more information, read \nSSL policies overview.", - "id": "SslPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "customFeatures": { - "description": "A list of features enabled when the selected profile is CUSTOM. The\n method returns the set of features that can be\nspecified in this list. This field must be empty if the profile is notCUSTOM.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "enabledFeatures": { - "description": "[Output Only] The list of features enabled in the SSL policy.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a SslPolicy. An up-to-date fingerprint must be\nprovided in order to update the SslPolicy, otherwise the\nrequest will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve an SslPolicy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#sslPolicy", - "description": "[Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL policies.", - "type": "string" - }, - "minTlsVersion": { - "description": "The minimum version of SSL protocol that can be used by the clients to\nestablish a connection with the load balancer. This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field\nmust be set to RESTRICTED.", - "enum": [ - "TLS_1_0", - "TLS_1_1", - "TLS_1_2", - "TLS_1_3" - ], - "enumDescriptions": [ - "TLS 1.0", - "TLS 1.1", - "TLS 1.2", - "TLS 1.3" - ], - "type": "string" - }, - "name": { - "description": "Name of the resource. The name must be 1-63 characters long, and comply\nwith RFC1035. Specifically, the name must be 1-63 characters\nlong and match the regular expression\n`[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character\nmust be a lowercase letter, and all following characters must be a dash,\nlowercase letter, or digit, except the last character, which cannot be a\ndash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "profile": { - "description": "Profile specifies the set of SSL features that can be used by the load\nbalancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features\nto enable must be specified in the customFeatures field.", - "enum": [ - "COMPATIBLE", - "CUSTOM", - "FIPS_202205", - "MODERN", - "RESTRICTED" - ], - "enumDescriptions": [ - "Compatible profile. Allows the broadset set of clients, even those which\nsupport only out-of-date SSL features to negotiate with the load\nbalancer.", - "Custom profile. Allow only the set of allowed SSL features specified in\nthe customFeatures field.", - "FIPS compatible profile. Supports a reduced set of SSL features,\nintended to meet FIPS 140-3 compliance requirements.", - "Modern profile. Supports a wide set of SSL features, allowing modern\nclients to negotiate SSL with the load balancer.", - "Restricted profile. Supports a reduced set of SSL features, intended to\nmeet stricter compliance requirements." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional SSL policy\nresides. This field is not applicable to global SSL policies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "warnings": { - "description": "[Output Only] If potential misconfigurations are detected for this\nSSL policy, this field will be populated with warning messages.", - "items": { - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "SslPolicyReference": { - "id": "SslPolicyReference", - "properties": { - "sslPolicy": { - "description": "URL of the SSL policy resource. Set this to empty string to clear any\nexisting SSL policy associated with the target proxy resource.", - "type": "string" - } - }, - "type": "object" - }, - "StatefulPolicy": { - "id": "StatefulPolicy", - "properties": { - "preservedState": { - "$ref": "StatefulPolicyPreservedState" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedState": { - "description": "Configuration of preserved resources.", - "id": "StatefulPolicyPreservedState", - "properties": { - "disks": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateDiskDevice" - }, - "description": "Disks created on the instances that will be preserved on instance\ndelete, update, etc. This map is keyed with the device names of\nthe disks.", - "type": "object" - }, - "externalIPs": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateNetworkIp" - }, - "description": "External network IPs assigned to the instances that will be preserved on\ninstance delete, update, etc. This map is keyed with the network\ninterface name.", - "type": "object" - }, - "internalIPs": { - "additionalProperties": { - "$ref": "StatefulPolicyPreservedStateNetworkIp" - }, - "description": "Internal network IPs assigned to the instances that will be preserved on\ninstance delete, update, etc. This map is keyed with the network\ninterface name.", - "type": "object" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedStateDiskDevice": { - "id": "StatefulPolicyPreservedStateDiskDevice", - "properties": { - "autoDelete": { - "description": "These stateful disks will never be deleted during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the disk should be deleted after it\nis no longer used by the group, e.g. when the given instance or\nthe whole group is deleted. Note: disks attached inREAD_ONLY mode cannot be auto-deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedStateNetworkIp": { - "id": "StatefulPolicyPreservedStateNetworkIp", - "properties": { - "autoDelete": { - "description": "These stateful IPs will never be released during autohealing,\nupdate or VM instance recreate operations.\nThis flag is used to configure if the IP reservation should be deleted\nafter it is no longer used by the group, e.g. when the given instance\nor the whole group is deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[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\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "format": "google.protobuf.Any", - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePool": { - "description": "Represents a zonal storage pool resource.", - "id": "StoragePool", - "properties": { - "capacityProvisioningType": { - "description": "Provisioning type of the byte capacity of the pool.", - "enum": [ - "ADVANCED", - "STANDARD", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Advanced provisioning \"thinly\" allocates the related resource.", - "Standard provisioning allocates the related resource for the pool\ndisks' exclusive use.", - "" - ], - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#storagePool", - "description": "[Output Only] Type of the resource. Always compute#storagePool\nfor storage pools.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this storage pool, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a storage pool.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels to apply to this storage pool. These can be later modified by\nthe setLabels method.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.storagePools.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "performanceProvisioningType": { - "description": "Provisioning type of the performance-related parameters of the pool,\nsuch as throughput and IOPS.", - "enum": [ - "ADVANCED", - "STANDARD", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "Advanced provisioning \"thinly\" allocates the related resource.", - "Standard provisioning allocates the related resource for the pool\ndisks' exclusive use.", - "" - ], - "type": "string" - }, - "poolProvisionedCapacityGb": { - "annotations": { - "required": [ - "compute.storagePools.insert" - ] - }, - "description": "Size of the storage pool in GiB. For more information about the size\nlimits, see https://cloud.google.com/compute/docs/disks/storage-pools.", - "format": "int64", - "type": "string" - }, - "poolProvisionedIops": { - "description": "Provisioned IOPS of the storage pool. Only relevant if the storage pool\ntype is hyperdisk-balanced.", - "format": "int64", - "type": "string" - }, - "poolProvisionedThroughput": { - "description": "Provisioned throughput of the storage pool in MiB/s. Only relevant if the\nstorage pool type is hyperdisk-balanced or hyperdisk-throughput.", - "format": "int64", - "type": "string" - }, - "resourceStatus": { - "$ref": "StoragePoolResourceStatus", - "description": "[Output Only] Status information for the storage pool resource." - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "state": { - "description": "[Output Only] The status of storage pool creation.\n \n \n - CREATING: Storage pool is provisioning.\n storagePool.\n - FAILED: Storage pool creation failed.\n - READY: Storage pool is ready for use.\n - DELETING: Storage pool is deleting.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "StoragePool is provisioning", - "StoragePool is deleting.", - "StoragePool creation failed.", - "StoragePool is ready for use." - ], - "type": "string" - }, - "status": { - "$ref": "StoragePoolResourceStatus", - "description": "[Output Only] Status information for the storage pool resource." - }, - "storagePoolType": { - "description": "Type of the storage pool.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the storage pool resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolAggregatedList": { - "id": "StoragePoolAggregatedList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "StoragePoolsScopedList", - "description": "[Output Only] Name of the scope containing this set of storage pool." - }, - "description": "A list of StoragePoolsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#storagePoolAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolAggregatedList for aggregated lists of\nstorage pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolDisk": { - "id": "StoragePoolDisk", - "properties": { - "attachedInstances": { - "description": "[Output Only] Instances this disk is attached to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "disk": { - "description": "[Output Only] The URL of the disk.", - "type": "string" - }, - "name": { - "description": "[Output Only] The name of the disk.", - "type": "string" - }, - "provisionedIops": { - "description": "[Output Only] The number of IOPS provisioned for the disk.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "[Output Only] The throughput provisioned for the disk.", - "format": "int64", - "type": "string" - }, - "resourcePolicies": { - "description": "[Output Only] Resource policies applied to disk for automatic snapshot\ncreations.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sizeGb": { - "description": "[Output Only] The disk size, in GB.", - "format": "int64", - "type": "string" - }, - "status": { - "description": "[Output Only] The disk status.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY", - "RESTORING", - "UNAVAILABLE" - ], - "enumDescriptions": [ - "Disk is provisioning", - "Disk is deleting.", - "Disk creation failed.", - "Disk is ready for use.", - "Source data is being copied into the disk.", - "Disk is currently unavailable and cannot be accessed, attached or\ndetached." - ], - "type": "string" - }, - "type": { - "description": "[Output Only] The disk type.", - "type": "string" - }, - "usedBytes": { - "description": "[Output Only] Amount of disk space used.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolList": { - "description": "A list of StoragePool resources.", - "id": "StoragePoolList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePool resources.", - "items": { - "$ref": "StoragePool" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolList", - "description": "[Output Only] Type of resource. Always compute#storagePoolList\nfor lists of storagePools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolListDisks": { - "id": "StoragePoolListDisks", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePoolDisk resources.", - "items": { - "$ref": "StoragePoolDisk" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolListDisks", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolListDisks for lists of disks in a\nstoragePool.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolResourceStatus": { - "description": "[Output Only] Contains output only fields.", - "id": "StoragePoolResourceStatus", - "properties": { - "diskCount": { - "description": "[Output Only] Number of disks used.", - "format": "int64", - "type": "string" - }, - "lastResizeTimestamp": { - "description": "[Output Only] Timestamp of the last successful resize inRFC3339 text format.", - "type": "string" - }, - "maxTotalProvisionedDiskCapacityGb": { - "description": "[Output Only] Maximum allowed aggregate disk size in GiB.", - "format": "int64", - "type": "string" - }, - "poolUsedCapacityBytes": { - "description": "[Output Only] Space used by data stored in disks within the storage pool\n(in bytes). This will reflect the total number of bytes written to the\ndisks in the pool, in contrast to the capacity of those disks.", - "format": "int64", - "type": "string" - }, - "poolUsedIops": { - "description": "[Output Only] Sum of all the disks' provisioned IOPS, minus some amount\nthat is allowed per disk that is not counted towards pool's IOPS\ncapacity. For more information, see\nhttps://cloud.google.com/compute/docs/disks/storage-pools.", - "format": "int64", - "type": "string" - }, - "poolUsedThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s.", - "format": "int64", - "type": "string" - }, - "poolUserWrittenBytes": { - "description": "[Output Only] Amount of data written into the pool, before it is\ncompacted.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskCapacityGb": { - "description": "[Output Only] Sum of all the disks' provisioned capacity (in GiB) in\nthis storage pool. A disk's provisioned capacity is the same as its total\ncapacity.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskIops": { - "description": "[Output Only] Sum of all the disks' provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "totalProvisionedDiskThroughput": { - "description": "[Output Only] Sum of all the disks' provisioned throughput in MiB/s,\nminus some amount that is allowed per disk that is not counted towards\npool's throughput capacity.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolType": { - "id": "StoragePoolType", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this storage pool\ntype." - }, - "description": { - "description": "[Output Only] An optional description of this resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#storagePoolType", - "description": "[Output Only] Type of the resource. Alwayscompute#storagePoolType for storage pool types.", - "type": "string" - }, - "maxPoolProvisionedCapacityGb": { - "description": "[Output Only] Maximum storage pool size in GB.", - "format": "int64", - "type": "string" - }, - "maxPoolProvisionedIops": { - "description": "[Output Only] Maximum provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "maxPoolProvisionedThroughput": { - "description": "[Output Only] Maximum provisioned throughput.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedCapacityGb": { - "description": "[Output Only] Minimum storage pool size in GB.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedIops": { - "description": "[Output Only] Minimum provisioned IOPS.", - "format": "int64", - "type": "string" - }, - "minPoolProvisionedThroughput": { - "description": "[Output Only] Minimum provisioned throughput.", - "format": "int64", - "type": "string" - }, - "minSizeGb": { - "description": "[Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb\ninstead.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", - "type": "string" - }, - "supportedDiskTypes": { - "description": "[Output Only] The list of disk types supported in this storage pool type.", - "items": { - "type": "string" - }, - "type": "array" - }, - "zone": { - "description": "[Output Only] URL of the zone where the storage pool type resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "StoragePoolTypeAggregatedList": { - "id": "StoragePoolTypeAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "StoragePoolTypesScopedList", - "description": "[Output Only] Name of the scope containing this set of storage pool types." - }, - "description": "A list of StoragePoolTypesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#storagePoolTypeAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolTypeAggregatedList.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolTypeList": { - "description": "Contains a list of storage pool types.", - "id": "StoragePoolTypeList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of StoragePoolType resources.", - "items": { - "$ref": "StoragePoolType" - }, - "type": "array" - }, - "kind": { - "default": "compute#storagePoolTypeList", - "description": "[Output Only] Type of resource. Alwayscompute#storagePoolTypeList for storage pool types.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolTypesScopedList": { - "id": "StoragePoolTypesScopedList", - "properties": { - "storagePoolTypes": { - "description": "[Output Only] A list of storage pool types contained in this scope.", - "items": { - "$ref": "StoragePoolType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of storage pool\ntypes when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StoragePoolsScopedList": { - "id": "StoragePoolsScopedList", - "properties": { - "storagePools": { - "description": "[Output Only] A list of storage pool contained in this scope.", - "items": { - "$ref": "StoragePool" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of storage pool\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "StructuredEntries": { - "id": "StructuredEntries", - "properties": { - "entries": { - "additionalProperties": { - "format": "google.protobuf.Value", - "type": "any" - }, - "description": "Map of a partner metadata that belong to the same subdomain.\nIt accepts any value including google.protobuf.Struct.", - "type": "object" - } - }, - "type": "object" - }, - "Subnetwork": { - "description": "Represents a Subnetwork resource.\n\nA subnetwork (also known as a subnet) is a logical partition of a Virtual\nPrivate Cloud network with one primary IP range and zero or more secondary\nIP ranges. For more information, read\nVirtual Private Cloud (VPC) Network.", - "id": "Subnetwork", - "properties": { - "allowSubnetCidrRoutesOverlap": { - "description": "Whether this subnetwork's ranges can conflict with existing static routes.\nSetting this to true allows this subnetwork's primary and secondary ranges\nto overlap with (and contain) static routes that have already been\nconfigured on the corresponding network.\n\nFor example if a static route has range 10.1.0.0/16, a subnet\nrange 10.0.0.0/8 could only be created if allow_conflicting_routes=true.\n\nOverlapping is only allowed on subnetwork operations; routes\nwhose ranges conflict with this subnetwork's ranges won't be allowed unless\nroute.allow_conflicting_subnetworks is set to true.\n\nTypically packets destined to IPs within the subnetwork (which may contain\nprivate/sensitive data) are prevented from leaving the virtual network.\nSetting this field to true will disable this feature.\n\nThe default value is false and applies to all existing subnetworks and\nautomatically created subnetworks.\n\nThis field cannot be set to true at resource creation time.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource. This field can be set only at resource creation time.", - "type": "string" - }, - "enableFlowLogs": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not\nexplicitly set, it will not appear in get listings. If not set\nthe default behavior is determined by the org policy, if there is no org\npolicy specified, then it will default to disabled. This field isn't\nsupported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY.", - "type": "boolean" - }, - "externalIpv6Prefix": { - "description": "The external IPv6 address range that is owned by this\nsubnetwork.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a Subnetwork. An up-to-date fingerprint must be\nprovided in order to update the Subnetwork, otherwise the\nrequest will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a Subnetwork.", - "format": "byte", - "type": "string" - }, - "gatewayAddress": { - "description": "[Output Only] The gateway address for default routes to reach destination\naddresses outside this subnetwork.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "internalIpv6Prefix": { - "description": "The internal IPv6 address range that is owned by this\nsubnetwork.", - "type": "string" - }, - "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork.\nProvide this property when you create the subnetwork. For example,10.0.0.0/8 or 100.64.0.0/10. Ranges must\nbe unique and non-overlapping within a network. Only IPv4 is supported.\nThis field is set at resource creation time. The range can be any range\nlisted in theValid\nranges list. The range can be expanded after creation usingexpandIpCidrRange.", - "type": "string" - }, - "ipCollection": { - "description": "Reference to the source of IP, like a PublicDelegatedPrefix\n(PDP) for BYOIP. The PDP must be a sub-PDP in\nEXTERNAL_IPV6_SUBNETWORK_CREATION or INTERNAL_IPV6_SUBNETWORK_CREATION\nmode.\n\nUse one of the following formats to specify a sub-PDP when creating a dual\nstack or IPv6-only subnetwork with external access using BYOIP:\n \n - \n Full resource URL, as inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - \n Partial URL, as in\n \n \n - projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name\n - regions/region/publicDelegatedPrefixes/sub-pdp-name", - "type": "string" - }, - "ipv6AccessType": { - "description": "The access type of IPv6 address this subnet holds. It's immutable and can\nonly be specified during creation or the first time the subnet is updated\ninto IPV4_IPV6 dual stack.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "VMs on this subnet will be assigned IPv6 addresses that are accessible\nvia the Internet, as well as the VPC network.", - "VMs on this subnet will be assigned IPv6 addresses that are only\naccessible over the VPC network." - ], - "type": "string" - }, - "ipv6CidrRange": { - "description": "[Output Only] This field is for internal use.", - "type": "string" - }, - "ipv6GceEndpoint": { - "description": "[Output Only] Possible endpoints of this subnetwork. It can be one of the\nfollowing:\n \n - VM_ONLY: The subnetwork can be used for creating instances and\n IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6\n ranges from a public delegated prefix and cannot be used to create NetLb.\n - VM_AND_FR: The subnetwork can be used for creating both VM\n instances and Forwarding Rules. It can also be used to reserve IPv6\n addresses with both VM and FR endpoint types. Such a subnetwork gets its\n IPv6 range from Google IP Pool directly.", - "enum": [ - "VM_AND_FR", - "VM_ONLY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "compute#subnetwork", - "description": "[Output Only] Type of the resource. Always compute#subnetwork\nfor Subnetwork resources.", - "type": "string" - }, - "logConfig": { - "$ref": "SubnetworkLogConfig", - "description": "This field denotes the VPC flow logging options for this subnetwork.\nIf logging is enabled, logs are exported to Cloud Logging." - }, - "name": { - "description": "The name of the resource, provided by the client when initially creating\nthe resource. The name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network to which this subnetwork belongs, provided by the\nclient when initially creating the subnetwork. This field can be set only\nat resource creation time.", - "type": "string" - }, - "params": { - "$ref": "SubnetworkParams", - "description": "Input only. [Input Only] Additional params passed with the request, but not persisted\nas part of resource payload." - }, - "privateIpGoogleAccess": { - "description": "Whether the VMs in this subnet can access Google services without assigned\nexternal IP addresses. This field can be both set at resource creation\ntime and updated using setPrivateIpGoogleAccess.", - "type": "boolean" - }, - "privateIpv6GoogleAccess": { - "description": "This field is for internal use.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "DISABLE_GOOGLE_ACCESS", - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - ], - "enumDescriptions": [ - "Disable private IPv6 access to/from Google services.", - "Bidirectional private IPv6 access to/from Google services.", - "Outbound private IPv6 access from VMs in this subnet to Google services." - ], - "type": "string" - }, - "purpose": { - "enum": [ - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "region": { - "description": "URL of the region where the Subnetwork resides. This\nfield can be set only at resource creation time.", - "type": "string" - }, - "reservedInternalRange": { - "description": "The URL of the reserved internal range.", - "type": "string" - }, - "resolveSubnetMask": { - "description": "Configures subnet mask resolution for this subnetwork.", - "enum": [ - "ARP_ALL_RANGES", - "ARP_PRIMARY_RANGE" - ], - "enumDescriptions": [ - "All ranges assigned to the VM NIC will respond to ARP.", - "Only the primary range of the VM NIC will respond to ARP." - ], - "type": "string" - }, - "role": { - "description": "The role of subnetwork. Currently, this field is only used when\npurpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE\nsubnetwork is one that is currently being used for Envoy-based load\nbalancers in a region. A BACKUP subnetwork is one that is\nready to be promoted to ACTIVE or is currently draining.\nThis field can be updated with a patch request.", - "enum": [ - "ACTIVE", - "BACKUP" - ], - "enumDescriptions": [ - "The ACTIVE subnet that is currently used.", - "The BACKUP subnet that could be promoted to ACTIVE." - ], - "type": "string" - }, - "secondaryIpRanges": { - "description": "An array of configurations for secondary IP ranges for VM instances\ncontained in this subnetwork. The primary IP of such VM must belong to the\nprimary ipCidrRange of the subnetwork. The alias IPs may belong to either\nprimary or secondary ranges. This field can be updated with apatch request.", - "items": { - "$ref": "SubnetworkSecondaryRange" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "stackType": { - "description": "The stack type for the subnet. If set to IPV4_ONLY, new VMs\nin the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and\nIPv6 addresses. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] The state of the subnetwork, which can be one of the\nfollowing values:READY: Subnetwork is created and ready to useDRAINING: only applicable to subnetworks that have the\npurpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that\nconnections to the load balancer are being drained. A subnetwork that is\ndraining cannot be used or modified until it reaches a status ofREADY", - "enum": [ - "DRAINING", - "READY" - ], - "enumDescriptions": [ - "Subnetwork is being drained.", - "Subnetwork is ready for use." - ], - "type": "string" - }, - "systemReservedExternalIpv6Ranges": { - "description": "Output only. [Output Only] The array of external IPv6 network ranges reserved from\nthe subnetwork's external IPv6 range for system use.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "systemReservedInternalIpv6Ranges": { - "description": "Output only. [Output Only] The array of internal IPv6 network ranges reserved from\nthe subnetwork's internal IPv6 range for system use.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "utilizationDetails": { - "$ref": "SubnetworkUtilizationDetails", - "description": "Output only. [Output Only] The current IP utilization of all subnetwork ranges. Contains\nthe total number of allocated and free IPs in each range.", - "readOnly": true - } - }, - "type": "object" - }, - "SubnetworkAggregatedList": { - "id": "SubnetworkAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "SubnetworksScopedList", - "description": "Name of the scope containing this set of Subnetworks." - }, - "description": "A list of SubnetworksScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#subnetworkAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#subnetworkAggregatedList for aggregated lists of\nsubnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkList": { - "description": "Contains a list of Subnetwork resources.", - "id": "SubnetworkList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Subnetwork resources.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#subnetworkList", - "description": "[Output Only] Type of resource. Always compute#subnetworkList\nfor lists of subnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkLogConfig": { - "description": "The available logging options for this subnetwork.", - "id": "SubnetworkLogConfig", - "properties": { - "aggregationInterval": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nToggles the aggregation interval for collecting flow logs. Increasing the\ninterval time will reduce the amount of generated flow logs for long\nlasting connections. Default is an interval of 5 seconds per connection.", - "enum": [ - "INTERVAL_10_MIN", - "INTERVAL_15_MIN", - "INTERVAL_1_MIN", - "INTERVAL_30_SEC", - "INTERVAL_5_MIN", - "INTERVAL_5_SEC" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "enable": { - "description": "Whether to enable flow logging for this subnetwork. If this field is not\nexplicitly set, it will not appear in get listings. If not\nset the default behavior is determined by the org policy, if there is no\norg policy specified, then it will default to disabled.\nFlow logging isn't supported if the subnet purpose field is\nset to REGIONAL_MANAGED_PROXY.", - "type": "boolean" - }, - "filterExpr": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled.\nThe filter expression is used to define which VPC flow logs should be\nexported to Cloud Logging.", - "type": "string" - }, - "flowSampling": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled.\nThe value of the field must be in [0, 1]. Set the sampling rate of VPC\nflow logs within the subnetwork where 1.0 means all collected logs are\nreported and 0.0 means no logs are reported. Default is 0.5 unless\notherwise specified by the org policy, which means half of all collected\nlogs are reported.", - "format": "float", - "type": "number" - }, - "metadata": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled.\nConfigures whether all, none or a subset of metadata fields should be\nadded to the reported VPC flow logs. Default isEXCLUDE_ALL_METADATA.", - "enum": [ - "CUSTOM_METADATA", - "EXCLUDE_ALL_METADATA", - "INCLUDE_ALL_METADATA" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - }, - "metadataFields": { - "description": "Can only be specified if VPC flow logs for this subnetwork is enabled and\n\"metadata\" was set to CUSTOM_METADATA.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "SubnetworkParams": { - "description": "Additional subnetwork parameters.", - "id": "SubnetworkParams", - "properties": { - "resourceManagerTags": { - "additionalProperties": { - "type": "string" - }, - "description": "Tag keys/values directly bound to this resource.\nTag keys and values have the same definition as resource\nmanager tags. The field is allowed for INSERT\nonly. The keys/values to set on the resource should be specified in\neither ID { : } or Namespaced format\n{ : }.\nFor example the following are valid inputs:\n* {\"tagKeys/333\" : \"tagValues/444\", \"tagKeys/123\" : \"tagValues/456\"}\n* {\"123/environment\" : \"production\", \"345/abc\" : \"xyz\"}\nNote:\n* Invalid combinations of ID \u0026 namespaced format is not supported. For\n instance: {\"123/environment\" : \"tagValues/444\"} is invalid.", - "type": "object" - } - }, - "type": "object" - }, - "SubnetworkSecondaryRange": { - "description": "Represents a secondary IP range of a subnetwork.", - "id": "SubnetworkSecondaryRange", - "properties": { - "ipCidrRange": { - "description": "The range of IP addresses belonging to this subnetwork secondary range.\nProvide this property when you create the subnetwork. Ranges must be\nunique and non-overlapping with all primary and secondary IP ranges\nwithin a network. Only IPv4 is supported. The range can be any range\nlisted in theValid\nranges list.", - "type": "string" - }, - "rangeName": { - "description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.\nThe name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the subnetwork.", - "type": "string" - }, - "reservedInternalRange": { - "description": "The URL of the reserved internal range.", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetails": { - "description": "The current IP utilization of all subnetwork ranges. Contains the total\nnumber of allocated and free IPs in each range.", - "id": "SubnetworkUtilizationDetails", - "properties": { - "externalIpv6InstanceUtilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of external IPV6 IP range." - }, - "externalIpv6LbUtilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of external IPV6 IP range for NetLB." - }, - "internalIpv6Utilization": { - "$ref": "SubnetworkUtilizationDetailsIPV6Utilization", - "description": "Utilizations of internal IPV6 IP range." - }, - "ipv4Utilizations": { - "description": "Utilizations of all IPV4 IP ranges. For primary ranges, the range name\nwill be empty.", - "items": { - "$ref": "SubnetworkUtilizationDetailsIPV4Utilization" - }, - "type": "array" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetailsIPV4Utilization": { - "description": "The IPV4 utilization of a single IP range.", - "id": "SubnetworkUtilizationDetailsIPV4Utilization", - "properties": { - "rangeName": { - "description": "Will be set for secondary range. Empty for primary IPv4 range.", - "type": "string" - }, - "totalAllocatedIp": { - "format": "int64", - "type": "string" - }, - "totalFreeIp": { - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworkUtilizationDetailsIPV6Utilization": { - "description": "The IPV6 utilization of a single IP range.", - "id": "SubnetworkUtilizationDetailsIPV6Utilization", - "properties": { - "totalAllocatedIp": { - "$ref": "Uint128" - }, - "totalFreeIp": { - "$ref": "Uint128" - } - }, - "type": "object" - }, - "SubnetworksExpandIpCidrRangeRequest": { - "id": "SubnetworksExpandIpCidrRangeRequest", - "properties": { - "ipCidrRange": { - "description": "The IP (in CIDR format or netmask) of internal addresses that are legal on\nthis Subnetwork. This range should be disjoint from other subnetworks\nwithin this network. This range can only be larger than (i.e. a superset\nof) the range previously defined before the update.", - "type": "string" - } - }, - "type": "object" - }, - "SubnetworksScopedList": { - "id": "SubnetworksScopedList", - "properties": { - "subnetworks": { - "description": "A list of subnetworks contained in this scope.", - "items": { - "$ref": "Subnetwork" - }, - "type": "array" - }, - "warning": { - "description": "An informational warning that appears when the list of addresses\nis empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworksScopedWarning": { - "id": "SubnetworksScopedWarning", - "properties": { - "scopeName": { - "description": "Name of the scope containing this set of Subnetworks.", - "type": "string" - }, - "warning": { - "description": "An informational warning about unreachable scope", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "SubnetworksSetPrivateIpGoogleAccessRequest": { - "id": "SubnetworksSetPrivateIpGoogleAccessRequest", - "properties": { - "privateIpGoogleAccess": { - "type": "boolean" - } - }, - "type": "object" - }, - "Subsetting": { - "description": "Subsetting configuration for this BackendService.\nCurrently this is applicable only for Internal TCP/UDP load balancing,\nInternal HTTP(S) load balancing and Traffic Director.", - "id": "Subsetting", - "properties": { - "policy": { - "enum": [ - "CONSISTENT_HASH_SUBSETTING", - "NONE" - ], - "enumDescriptions": [ - "Subsetting based on consistent hashing.\n\nFor Traffic Director, the number of backends per backend group\n(the subset size) is based on the `subset_size` parameter.\n\nFor Internal HTTP(S) load balancing, the number of backends per backend\ngroup (the subset size) is dynamically adjusted in two cases:\n- As the number of proxy instances participating in Internal HTTP(S) load\n balancing increases, the subset size decreases.\n- When the total number of backends in a network exceeds the capacity of\n a single proxy instance, subset sizes are reduced automatically for\n each service that has backend subsetting enabled.", - "No Subsetting.\n\nClients may open connections and send traffic to all backends of this\nbackend service. This can lead to performance issues if there is\nsubstantial imbalance in the count of clients and backends." - ], - "type": "string" - }, - "subsetSize": { - "description": "The number of backends per backend group assigned to each proxy instance or\neach service mesh client.\n\nAn input parameter to the `CONSISTENT_HASH_SUBSETTING` algorithm.\nCan only be set if `policy` is set to `CONSISTENT_HASH_SUBSETTING`.\nCan only be set if load balancing scheme is `INTERNAL_MANAGED` or\n`INTERNAL_SELF_MANAGED`.\n\n`subset_size` is optional for Internal HTTP(S) load balancing\nand required for Traffic Director.\n\nIf you do not provide this value, Cloud Load Balancing will calculate it\ndynamically to optimize the number of proxies/clients visible to each\nbackend and vice versa.\n\nMust be greater than 0. If `subset_size` is larger than the number of\nbackends/endpoints, then subsetting is disabled.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TCPHealthCheck": { - "id": "TCPHealthCheck", - "properties": { - "port": { - "description": "The TCP port number to which the health check prober sends packets. The\ndefault value is 80. Valid values are 1 through65535.", - "format": "int32", - "type": "integer" - }, - "portName": { - "description": "Not supported.", - "type": "string" - }, - "portSpecification": { - "description": "Specifies how a port is selected for health checking. Can be one of the\nfollowing values: \nUSE_FIXED_PORT: Specifies a port number explicitly using theport field in the health check. Supported by backend services\nfor passthrough load balancers and backend services for proxy load\nbalancers. Not supported by target pools. The health check supports all\nbackends supported by the backend service provided the backend can be\nhealth checked. For example, GCE_VM_IP network endpoint\ngroups, GCE_VM_IP_PORT network endpoint groups, and instance\ngroup backends. \nUSE_NAMED_PORT: Not supported. \nUSE_SERVING_PORT: Provides an indirect method of specifying\nthe health check port by referring to the backend service. Only supported\nby backend services for proxy load balancers. Not supported by target\npools. Not supported by backend services for passthrough load balancers.\nSupports all backends that can be health checked; for example,GCE_VM_IP_PORT network endpoint groups and instance group\nbackends.\n\nFor GCE_VM_IP_PORT network endpoint group backends, the health\ncheck uses the port number specified for each endpoint in the network\nendpoint group. For instance group backends, the health check uses the\nport number determined by looking up the backend service's named port in\nthe instance group's list of named ports.", - "enum": [ - "USE_FIXED_PORT", - "USE_NAMED_PORT", - "USE_SERVING_PORT" - ], - "enumDescriptions": [ - "The port number in the health check's port is used for health\nchecking. Applies to network endpoint group and instance group backends.", - "Not supported.", - "For network endpoint group backends, the health check uses the port number\nspecified on each endpoint in the network endpoint group. For instance\ngroup backends, the health check uses the port number specified for the\nbackend service's named port defined in the instance group's named ports." - ], - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "request": { - "description": "Instructs the health check prober to send this exact ASCII string, up to\n1024 bytes in length, after establishing the TCP connection.", - "type": "string" - }, - "response": { - "description": "Creates a content-based TCP health check. In addition to establishing a\nTCP connection, you can configure the health check to pass only when the\nbackend sends this exact response ASCII string, up to 1024 bytes in length.\nFor details, see:\nhttps://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp", - "type": "string" - } - }, - "type": "object" - }, - "Tags": { - "description": "A set of instance tags.", - "id": "Tags", - "properties": { - "fingerprint": { - "description": "Specifies a fingerprint for this request, which is essentially a hash of\nthe tags' contents and used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update tags. You must always provide an\nup-to-date fingerprint hash in order to update or change tags.\n\nTo see the latest fingerprint, make get() request to the\ninstance.", - "format": "byte", - "type": "string" - }, - "items": { - "description": "An array of tags. Each tag must be 1-63 characters long, and comply\nwith RFC1035.", - "items": { - "type": "string" - }, - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "array" - } - }, - "type": "object" - }, - "TargetGrpcProxy": { - "description": "Represents a Target gRPC Proxy resource.\n\nA target gRPC proxy is a component of load balancers intended for\nload balancing gRPC traffic. Only global forwarding rules with load balancing\nscheme INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The target\ngRPC Proxy references a URL map that specifies how traffic is routed to\ngRPC backend services.", - "id": "TargetGrpcProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetGrpcProxy. An up-to-date fingerprint must\nbe provided in order to patch/update the TargetGrpcProxy; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nTargetGrpcProxy.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetGrpcProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for target grpc proxies.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.targetGrpcProxies.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL with id for the resource.", - "type": "string" - }, - "urlMap": { - "description": "URL to the UrlMap resource that defines the mapping from URL to the\nBackendService. The protocol field in the BackendService must be set to\nGRPC.", - "type": "string" - }, - "validateForProxyless": { - "description": "If true, indicates that the BackendServices referenced by the urlMap may be\naccessed by gRPC applications without using a sidecar proxy. This will\nenable configuration checks on urlMap and its referenced BackendServices to\nnot allow unsupported features. A gRPC application must use\n\"xds:///\" scheme in the target URI of the service it is\nconnecting to.\nIf false, indicates that the BackendServices referenced by the urlMap will\nbe accessed by gRPC applications via a sidecar proxy. In this case, a gRPC\napplication must not use \"xds:///\" scheme in the target URI of\nthe service it is connecting to", - "type": "boolean" - } - }, - "type": "object" - }, - "TargetGrpcProxyList": { - "id": "TargetGrpcProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetGrpcProxy resources.", - "items": { - "$ref": "TargetGrpcProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetGrpcProxyList", - "description": "[Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for target grpc proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxiesScopedList": { - "id": "TargetHttpProxiesScopedList", - "properties": { - "targetHttpProxies": { - "description": "A list of TargetHttpProxies contained in this scope.", - "items": { - "$ref": "TargetHttpProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxy": { - "description": "Represents a Target HTTP Proxy resource.\n\nGoogle Compute Engine has two Target HTTP Proxy resources:\n\n* [Global](/compute/docs/reference/rest/beta/targetHttpProxies)\n* [Regional](/compute/docs/reference/rest/beta/regionTargetHttpProxies)\n\nA target HTTP proxy is a component of Google Cloud HTTP load balancers.\n\n* targetHttpProxies are used by global external Application Load Balancers,\n classic Application Load Balancers, cross-region internal Application Load\n Balancers, and Traffic Director.\n* regionTargetHttpProxies are used by regional internal Application Load\n Balancers and regional external Application Load Balancers.\n\nForwarding rules reference a target HTTP proxy, and the target proxy\nthen references a URL map. For more information, readUsing Target Proxies\nand \nForwarding rule concepts.", - "id": "TargetHttpProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetHttpProxy. An up-to-date fingerprint must\nbe provided in order to patch/update the TargetHttpProxy; otherwise, the\nrequest will fail with error 412 conditionNotMet. To see the\nlatest fingerprint, make a get() request to retrieve the\nTargetHttpProxy.", - "format": "byte", - "type": "string" - }, - "httpFilters": { - "description": "URLs to networkservices.HttpFilter resources\nenabled for xDS clients using this configuration. For example,https://networkservices.googleapis.com/v1alpha1/projects/project/locations/locationhttpFilters/httpFilter\nOnly filters that handle outbound connection and\nstream events may be specified. These filters work in conjunction with\na default set of HTTP filters that may already be configured by Traffic\nDirector. Traffic Director will determine the final location of these\nfilters within xDS configuration based on the name of the HTTP filter. If\nTraffic Director positions multiple filters at the same location, those\nfilters will be in the same order as specified in this list. \n\nhttpFilters only applies for loadbalancers withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nSee ForwardingRule for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response,\nwhile there is no matching traffic (in seconds). If an HTTP keep-alive is\nnot specified, a default value (610 seconds) will be used.\n\nFor global external Application Load Balancers, the minimum allowed value\nis 5 seconds and the maximum allowed value is 1200 seconds.\n\nFor classic Application Load Balancers, this option is not supported.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetHttpProxy", - "description": "[Output Only] Type of resource. Always compute#targetHttpProxy\nfor target HTTP proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "region": { - "description": "[Output Only] URL of the region where the regional Target HTTP Proxy\nresides. This field is not applicable to global Target HTTP Proxies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "urlMap": { - "description": "URL to the UrlMap resource that defines the mapping from URL to\nthe BackendService.", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpProxyAggregatedList": { - "id": "TargetHttpProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetHttpProxiesScopedList", - "description": "Name of the scope containing this set of TargetHttpProxies." - }, - "description": "A list of TargetHttpProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetHttpProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpProxyAggregatedList for lists of Target HTTP\nProxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpProxyList": { - "description": "A list of TargetHttpProxy resources.", - "id": "TargetHttpProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetHttpProxy resources.", - "items": { - "$ref": "TargetHttpProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetHttpProxyList", - "description": "Type of resource. Always compute#targetHttpProxyList for lists\nof target HTTP proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxiesScopedList": { - "id": "TargetHttpsProxiesScopedList", - "properties": { - "targetHttpsProxies": { - "description": "A list of TargetHttpsProxies contained in this scope.", - "items": { - "$ref": "TargetHttpsProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetCertificateMapRequest": { - "id": "TargetHttpsProxiesSetCertificateMapRequest", - "properties": { - "certificateMap": { - "description": "URL of the Certificate Map to associate with this TargetHttpsProxy.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetQuicOverrideRequest": { - "id": "TargetHttpsProxiesSetQuicOverrideRequest", - "properties": { - "quicOverride": { - "description": "QUIC policy for the TargetHttpsProxy resource.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "The load balancer will not attempt to negotiate QUIC with clients.", - "The load balancer will attempt to negotiate QUIC with clients.", - "No overrides to the default QUIC policy. This option is implicit if\nno QUIC override has been specified in the request." - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxiesSetSslCertificatesRequest": { - "id": "TargetHttpsProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of SslCertificate resources to associate\nwith this TargetHttpsProxy resource. At least one SSL\ncertificate must be specified. Currently, you may specify up to 15 SSL\ncertificates.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource.\n\nGoogle Compute Engine has two Target HTTPS Proxy resources:\n\n* [Global](/compute/docs/reference/rest/beta/targetHttpsProxies)\n* [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies)\n\nA target HTTPS proxy is a component of Google Cloud HTTPS load balancers.\n\n* targetHttpsProxies are used by global external Application Load Balancers,\n classic Application Load Balancers, cross-region internal Application Load\n Balancers, and Traffic Director.\n* regionTargetHttpsProxies are used by regional internal Application Load\n Balancers and regional external Application Load Balancers.\n\nForwarding rules reference a target HTTPS proxy, and the target proxy\nthen references a URL map. For more information, readUsing Target Proxies\nand \nForwarding rule concepts.", - "id": "TargetHttpsProxy", - "properties": { - "authentication": { - "deprecated": true, - "description": "[Deprecated] Use serverTlsPolicy instead.", - "type": "string" - }, - "authorization": { - "deprecated": true, - "description": "[Deprecated] Use authorizationPolicy instead.", - "type": "string" - }, - "authorizationPolicy": { - "description": "Optional. A URL referring to a networksecurity.AuthorizationPolicy resource\nthat describes how the proxy should authorize inbound traffic. If left\nblank, access will not be restricted by an authorization policy.\n\n Refer to the AuthorizationPolicy resource for additional\ndetails.\n\n authorizationPolicy only applies to a globalTargetHttpsProxy attached toglobalForwardingRules with theloadBalancingScheme set to INTERNAL_SELF_MANAGED.\n\n Note: This field currently has no impact.", - "type": "string" - }, - "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with\nthe given target proxy.\nThis field can only be set for Global external Application Load Balancer or\nClassic Application Load Balancer. For other products use Certificate\nManager Certificates instead.\n\nIf set, sslCertificates will be ignored.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field will be ignored when\ninserting a TargetHttpsProxy. An up-to-date fingerprint must\nbe provided in order to patch the TargetHttpsProxy; otherwise, the request\nwill fail with error 412 conditionNotMet. To see the latest\nfingerprint, make a get() request to retrieve the\nTargetHttpsProxy.", - "format": "byte", - "type": "string" - }, - "httpFilters": { - "description": "URLs to networkservices.HttpFilter resources\nenabled for xDS clients using this configuration. For example,https://networkservices.googleapis.com/beta/projects/project/locations/location/httpFilters/httpFilter\nOnly filters that handle outbound connection and\nstream events may be specified. These filters work in conjunction with\na default set of HTTP filters that may already be configured by Traffic\nDirector. Traffic Director will determine the final location of these\nfilters within xDS configuration based on the name of the HTTP filter. If\nTraffic Director positions multiple filters at the same location, those\nfilters will be in the same order as specified in this list. \n\nhttpFilters only applies for loadbalancers withloadBalancingScheme set to INTERNAL_SELF_MANAGED.\nSee ForwardingRule for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response,\nwhile there is no matching traffic (in seconds). If an HTTP keep-alive is\nnot specified, a default value (610 seconds) will be used.\n\nFor global external Application Load Balancers, the minimum allowed value\nis 5 seconds and the maximum allowed value is 1200 seconds.\n\nFor classic Application Load Balancers, this option is not supported.", - "format": "int32", - "type": "integer" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetHttpsProxy", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpsProxy for target HTTPS proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "quicOverride": { - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This\nsetting determines whether the load balancer attempts to negotiate QUIC\nwith clients.\nYou can specify NONE, ENABLE, orDISABLE.\n \n - When quic-override is set to NONE,\n Google manages whether QUIC is used.\n - When quic-override is set to ENABLE, the\n load balancer uses QUIC when possible.\n - When quic-override is set to DISABLE, the\n load balancer doesn't use QUIC.\n - If the quic-override flag is not specified,NONE is implied.", - "enum": [ - "DISABLE", - "ENABLE", - "NONE" - ], - "enumDescriptions": [ - "The load balancer will not attempt to negotiate QUIC with clients.", - "The load balancer will attempt to negotiate QUIC with clients.", - "No overrides to the default QUIC policy. This option is implicit if\nno QUIC override has been specified in the request." - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional TargetHttpsProxy\nresides. This field is not applicable to global TargetHttpsProxies.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A URL referring to a networksecurity.ServerTlsPolicy resource\nthat describes how the proxy should authenticate inbound traffic.\n\n serverTlsPolicy only applies to a globalTargetHttpsProxy attached toglobalForwardingRules with theloadBalancingScheme set to INTERNAL_SELF_MANAGED\nor EXTERNAL orEXTERNAL_MANAGED or INTERNAL_MANAGED.\nIt also applies to a regional TargetHttpsProxy attached to\nregional forwardingRules with theloadBalancingScheme set to EXTERNAL_MANAGED orINTERNAL_MANAGED. For details whichServerTlsPolicy resources are accepted withINTERNAL_SELF_MANAGED and which with EXTERNAL,INTERNAL_MANAGED, EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy\ndocumentation.\n\n If left blank, communications are not encrypted.", - "type": "string" - }, - "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to authenticate\nconnections between users and the load balancer. At least one SSL\ncertificate must be specified. SslCertificates do not apply when the load\nbalancing scheme is set to INTERNAL_SELF_MANAGED.\n\nThe URLs should refer to a SSL Certificate resource or Certificate Manager\nCertificate resource. Mixing Classic Certificates and Certificate Manager\nCertificates is not allowed. Certificate Manager Certificates must include\nthe certificatemanager API namespace. Using Certificate Manager\nCertificates in this field is not supported by Global external Application\nLoad Balancer or Classic Application Load Balancer, use certificate_map\ninstead.\n\nCurrently, you may specify up to 15 Classic SSL Certificates or up to 100\nCertificate Manager Certificates.\n\nCertificate Manager Certificates accepted formats are:\n \n - //certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificates/{resourceName}.\n - https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy\nresource. If not set, the TargetHttpsProxy resource has no\nSSL policy configured.", - "type": "string" - }, - "tlsEarlyData": { - "description": "Specifies whether TLS 1.3 0-RTT Data (\"Early Data\") should be accepted\nfor this service. Early Data allows a TLS resumption handshake to include\nthe initial application payload (a HTTP request) alongside the handshake,\nreducing the effective round trips to \"zero\". This applies to TLS 1.3\nconnections over TCP (HTTP/2) as well as over UDP (QUIC/h3).\n\n\nThis can improve application performance, especially on networks where\ninterruptions may be common, such as on mobile.\n\n\nRequests with Early Data will have the \"Early-Data\" HTTP header set on\nthe request, with a value of \"1\", to allow the backend to determine whether\nEarly Data was included.\n\n\nNote: TLS Early Data may allow requests to be replayed, as the data is\nsent to the backend before the handshake has fully completed. Applications\nthat allow idempotent HTTP methods to make non-idempotent changes, such as\na GET request updating a database, should not accept Early Data on those\nrequests, and reject requests with the \"Early-Data: 1\" HTTP header by\nreturning a HTTP 425 (Too Early) status code, in order to remain RFC\ncompliant.\n\n\nThe default value is DISABLED.", - "enum": [ - "DISABLED", - "PERMISSIVE", - "STRICT", - "UNRESTRICTED" - ], - "enumDescriptions": [ - "TLS 1.3 Early Data is not advertised, and any (invalid) attempts to send\nEarly Data will be rejected by closing the connection.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on\nrequests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode\ndoes not enforce any other limitations for requests with Early Data. The\napplication owner should validate that Early Data is acceptable for a\ngiven request path.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on\nrequests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query\nparameters. Requests that send Early Data with non-idempotent HTTP\nmethods or with query parameters will be rejected with a HTTP 425.", - "This enables TLS 1.3 Early Data for requests with any HTTP method\nincluding non-idempotent methods list POST. This mode does not enforce\nany other limitations. This may be valuable for gRPC use cases. However,\nwe do not recommend this method unless you have evaluated your security\nstance and mitigated the risk of replay attacks using other mechanisms." - ], - "type": "string" - }, - "urlMap": { - "description": "A fully-qualified or valid partial URL to the UrlMap resource that defines\nthe mapping from URL to the BackendService. For example, the following are\nall valid URLs for specifying a URL map:\n \n - https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n - projects/project/global/urlMaps/url-map \n - global/urlMaps/url-map", - "type": "string" - } - }, - "type": "object" - }, - "TargetHttpsProxyAggregatedList": { - "id": "TargetHttpsProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetHttpsProxiesScopedList", - "description": "Name of the scope containing this set of TargetHttpsProxies." - }, - "description": "A list of TargetHttpsProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetHttpsProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetHttpsProxyAggregatedList for lists of Target\nHTTP Proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetHttpsProxyList": { - "description": "Contains a list of TargetHttpsProxy resources.", - "id": "TargetHttpsProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetHttpsProxy resources.", - "items": { - "$ref": "TargetHttpsProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetHttpsProxyList", - "description": "Type of resource. Always compute#targetHttpsProxyList for\nlists of target HTTPS proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstance": { - "description": "Represents a Target Instance resource.\n\nYou can use a target instance to handle traffic for one or more forwarding\nrules, which is ideal for forwarding protocol traffic that is managed by a\nsingle source. For example, ESP, AH, TCP, or UDP.\nFor more information, readTarget\ninstances.", - "id": "TargetInstance", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instance": { - "description": "A URL to the virtual machine instance that handles traffic for this target\ninstance. When creating a target instance, you can provide the\nfully-qualified URL or a valid partial URL to the desired virtual machine.\nFor example, the following are all valid URLs:\n \n - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n - projects/project/zones/zone/instances/instance \n - zones/zone/instances/instance", - "type": "string" - }, - "kind": { - "default": "compute#targetInstance", - "description": "[Output Only] The type of the resource. Alwayscompute#targetInstance for target instances.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "natPolicy": { - "description": "Must have a value of NO_NAT.\nProtocol forwarding delivers packets while preserving the destination IP\naddress of the forwarding rule referencing the target instance.", - "enum": [ - "NO_NAT" - ], - "enumDescriptions": [ - "No NAT performed." - ], - "type": "string" - }, - "network": { - "description": "The URL of the network this target instance uses to forward traffic.\nIf not specified, the traffic will be forwarded to the network that\nthe default network interface belongs to.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\ntarget instance.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "zone": { - "description": "[Output Only] URL of the zone where the target instance resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - } - }, - "type": "object" - }, - "TargetInstanceAggregatedList": { - "id": "TargetInstanceAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetInstancesScopedList", - "description": "Name of the scope containing this set of target instances." - }, - "description": "A list of TargetInstance resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetInstanceAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstanceList": { - "description": "Contains a list of TargetInstance resources.", - "id": "TargetInstanceList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetInstance resources.", - "items": { - "$ref": "TargetInstance" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetInstanceList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetInstancesScopedList": { - "id": "TargetInstancesScopedList", - "properties": { - "targetInstances": { - "description": "A list of target instances contained in this scope.", - "items": { - "$ref": "TargetInstance" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPool": { - "description": "Represents a Target Pool resource.\n\nTarget pools are used with external passthrough Network Load Balancers.\nA target pool references member instances, an associated legacy\nHttpHealthCheck resource, and, optionally, a backup target pool.\nFor more information, readUsing target pools.", - "id": "TargetPool", - "properties": { - "backupPool": { - "description": "The server-defined URL for the resource. This field is applicable only when\nthe containing target pool is serving a forwarding rule as the primary\npool, and its failoverRatio field is properly set to a value\nbetween [0, 1].backupPool and failoverRatio together define\nthe fallback behavior of the primary target pool: if the ratio of the\nhealthy instances in the primary pool is at or belowfailoverRatio, traffic arriving at the load-balanced\nIP will be directed to the backup pool.\n\nIn case where failoverRatio and backupPool\nare not set, or all the instances in the backup pool are unhealthy,\nthe traffic will be directed back to the primary pool in the \"force\"\nmode, where traffic will be spread to the healthy instances with the\nbest effort, or to all instances when no instance is healthy.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "failoverRatio": { - "description": "This field is applicable only when the containing target pool is serving a\nforwarding rule as the primary pool (i.e., not as a backup pool to some\nother target pool). The value of the field must be in [0, 1].\n\nIf set, backupPool must also be set. They together define\nthe fallback behavior of the primary target pool: if the ratio of the\nhealthy instances in the primary pool is at or below this number,\ntraffic arriving at the load-balanced IP will be directed to the\nbackup pool.\n\nIn case where failoverRatio is not set or all the\ninstances in the backup pool are unhealthy, the traffic will be\ndirected back to the primary pool in the \"force\" mode, where traffic\nwill be spread to the healthy instances with the\nbest effort, or to all instances when no instance is healthy.", - "format": "float", - "type": "number" - }, - "healthChecks": { - "description": "The URL of the HttpHealthCheck resource. A member instance in this\npool is considered healthy if and only if the health checks pass.\nOnly legacy HttpHealthChecks are supported. Only one health check may be\nspecified.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instances": { - "description": "A list of resource URLs to the virtual machine instances serving this pool.\nThey must live in zones contained in the same region as this pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPool", - "description": "[Output Only] Type of the resource. Always compute#targetPool\nfor target pools.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the target pool resides.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this\ntarget pool.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sessionAffinity": { - "description": "Session affinity option, must be one of the following values: \nNONE: Connections from the same client IP may go to any\n instance in the pool. \nCLIENT_IP: Connections from the same client IP will go\n to the same instance in\n the pool while that instance remains healthy. \nCLIENT_IP_PROTO: Connections from the same client IP\n with the same IP protocol will go to the same instance in the\n pool while that instance remains healthy.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_NO_DESTINATION", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "HEADER_FIELD", - "HTTP_COOKIE", - "NONE", - "STRONG_COOKIE_AFFINITY" - ], - "enumDescriptions": [ - "2-tuple hash on packet's source and destination IP addresses. Connections\nfrom the same source IP address to the same destination IP address will be\nserved by the same backend VM while that VM remains healthy.", - "1-tuple hash only on packet's source IP address. Connections from the\nsame source IP address will be served by the same backend VM while that VM\nremains healthy. This option can only be used for Internal TCP/UDP\nLoad Balancing.", - "5-tuple hash on packet's source and destination IP addresses, IP protocol,\nand source and destination ports. Connections for the same IP protocol\nfrom the same source IP address and port to the same destination IP address\nand port will be served by the same backend VM while that VM remains\nhealthy. This option cannot be used for HTTP(S) load balancing.", - "3-tuple hash on packet's source and destination IP addresses, and IP\nprotocol. Connections for the same IP protocol from the same source IP\naddress to the same destination IP address will be served by the same\nbackend VM while that VM remains healthy. This option cannot be used for\nHTTP(S) load balancing.", - "Hash based on a cookie generated by the L7 loadbalancer.\nOnly valid for HTTP(S) load balancing.", - "The hash is based on a user specified header field.", - "The hash is based on a user provided cookie.", - "No session affinity. Connections from the same client IP may go\nto any instance in the pool.", - "Strong cookie-based affinity. Connections bearing the same cookie will be\nserved by the same backend VM while that VM remains healthy, as long as the\ncookie has not expired." - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetPoolAggregatedList": { - "id": "TargetPoolAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetPoolsScopedList", - "description": "Name of the scope containing this set of target pools." - }, - "description": "A list of TargetPool resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetPoolAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetPoolAggregatedList for aggregated lists of\ntarget pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPoolInstanceHealth": { - "id": "TargetPoolInstanceHealth", - "properties": { - "healthStatus": { - "items": { - "$ref": "HealthStatus" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPoolInstanceHealth", - "description": "[Output Only] Type of resource. Alwayscompute#targetPoolInstanceHealth when checking the health of\nan instance.", - "type": "string" - } - }, - "type": "object" - }, - "TargetPoolList": { - "description": "Contains a list of TargetPool resources.", - "id": "TargetPoolList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetPool resources.", - "items": { - "$ref": "TargetPool" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetPoolList", - "description": "[Output Only] Type of resource. Always compute#targetPoolList\nfor lists of target pools.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetPoolsAddHealthCheckRequest": { - "id": "TargetPoolsAddHealthCheckRequest", - "properties": { - "healthChecks": { - "description": "The HttpHealthCheck to add to the target pool.", - "items": { - "$ref": "HealthCheckReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsAddInstanceRequest": { - "id": "TargetPoolsAddInstanceRequest", - "properties": { - "instances": { - "description": "A full or partial URL to an instance to add to this target pool. This can\nbe a full or partial URL. For example, the following are valid URLs: \n \n - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name \n - projects/project-id/zones/zone/instances/instance-name \n - zones/zone/instances/instance-name", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsRemoveHealthCheckRequest": { - "id": "TargetPoolsRemoveHealthCheckRequest", - "properties": { - "healthChecks": { - "description": "Health check URL to be removed. This can be a full or valid partial URL.\nFor example, the following are valid URLs:\n \n - https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check \n - projects/project/global/httpHealthChecks/health-check\n - global/httpHealthChecks/health-check", - "items": { - "$ref": "HealthCheckReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsRemoveInstanceRequest": { - "id": "TargetPoolsRemoveInstanceRequest", - "properties": { - "instances": { - "description": "URLs of the instances to be removed from target pool.", - "items": { - "$ref": "InstanceReference" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetPoolsScopedList": { - "id": "TargetPoolsScopedList", - "properties": { - "targetPools": { - "description": "A list of target pools contained in this scope.", - "items": { - "$ref": "TargetPool" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetReference": { - "id": "TargetReference", - "properties": { - "target": { - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetBackendServiceRequest": { - "id": "TargetSslProxiesSetBackendServiceRequest", - "properties": { - "service": { - "description": "The URL of the new BackendService resource for the targetSslProxy.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetCertificateMapRequest": { - "id": "TargetSslProxiesSetCertificateMapRequest", - "properties": { - "certificateMap": { - "description": "URL of the Certificate Map to associate with this TargetSslProxy.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetProxyHeaderRequest": { - "id": "TargetSslProxiesSetProxyHeaderRequest", - "properties": { - "proxyHeader": { - "description": "The new type of proxy header to append before sending data to the\nbackend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxiesSetSslCertificatesRequest": { - "id": "TargetSslProxiesSetSslCertificatesRequest", - "properties": { - "sslCertificates": { - "description": "New set of URLs to SslCertificate resources to associate with this\nTargetSslProxy. At least one SSL certificate must be specified.\nCurrently, you may specify up to 15 SSL certificates.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetSslProxy": { - "description": "Represents a Target SSL Proxy resource.\n\nA target SSL proxy is a component of a Proxy Network Load Balancer.\nThe forwarding rule references the target SSL proxy, and the target proxy\nthen references a backend service. For more information, readProxy Network\nLoad Balancer overview.", - "id": "TargetSslProxy", - "properties": { - "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with\nthe given target proxy.\nThis field can only be set for global target proxies.\nIf set, sslCertificates will be ignored.\n\n Accepted format is//certificatemanager.googleapis.com/projects/{project}/locations/{location}/certificateMaps/{resourceName}.", - "type": "string" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetSslProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetSslProxy for target SSL proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "service": { - "description": "URL to the BackendService resource.", - "type": "string" - }, - "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to\nauthenticate connections to Backends. At least one SSL certificate\nmust be specified. Currently, you may specify up to 15 SSL certificates.\nsslCertificates do not apply when the load balancing scheme is set to\nINTERNAL_SELF_MANAGED.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetSslProxy\nresource. If not set, the TargetSslProxy resource will not have any\nSSL policy configured.", - "type": "string" - } - }, - "type": "object" - }, - "TargetSslProxyList": { - "description": "Contains a list of TargetSslProxy resources.", - "id": "TargetSslProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetSslProxy resources.", - "items": { - "$ref": "TargetSslProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetSslProxyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxiesScopedList": { - "id": "TargetTcpProxiesScopedList", - "properties": { - "targetTcpProxies": { - "description": "A list of TargetTcpProxies contained in this scope.", - "items": { - "$ref": "TargetTcpProxy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxiesSetBackendServiceRequest": { - "id": "TargetTcpProxiesSetBackendServiceRequest", - "properties": { - "service": { - "description": "The URL of the new BackendService resource for the targetTcpProxy.", - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxiesSetProxyHeaderRequest": { - "id": "TargetTcpProxiesSetProxyHeaderRequest", - "properties": { - "proxyHeader": { - "description": "The new type of proxy header to append before sending data to the\nbackend. NONE or PROXY_V1 are allowed.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxy": { - "description": "Represents a Target TCP Proxy resource.\n\nA target TCP proxy is a component of a Proxy Network Load Balancer.\nThe forwarding rule references the target TCP proxy, and the target proxy\nthen references a backend service. For more information, readProxy Network\nLoad Balancer overview.", - "id": "TargetTcpProxy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetTcpProxy", - "description": "[Output Only] Type of the resource. Alwayscompute#targetTcpProxy for target TCP proxies.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "proxyBind": { - "description": "This field only applies when the forwarding rule that references this\ntarget proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED.\n\nWhen this field is set to true, Envoy proxies set up inbound\ntraffic interception and bind to the IP address and port specified in the\nforwarding rule. This is generally useful when using Traffic Director to\nconfigure Envoy as a gateway or middle proxy (in other words, not a\nsidecar proxy). The Envoy proxy listens for inbound requests and handles\nrequests when it receives them.\n\nThe default is false.", - "type": "boolean" - }, - "proxyHeader": { - "description": "Specifies the type of proxy header to append before sending data to the\nbackend, either NONE or PROXY_V1. The default\nis NONE.", - "enum": [ - "NONE", - "PROXY_V1" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional TCP proxy resides.\nThis field is not applicable to global TCP proxy.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "service": { - "description": "URL to the BackendService resource.", - "type": "string" - } - }, - "type": "object" - }, - "TargetTcpProxyAggregatedList": { - "id": "TargetTcpProxyAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetTcpProxiesScopedList", - "description": "Name of the scope containing this set of TargetTcpProxies." - }, - "description": "A list of TargetTcpProxiesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetTcpProxyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetTcpProxyAggregatedList for lists of Target\nTCP Proxies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetTcpProxyList": { - "description": "Contains a list of TargetTcpProxy resources.", - "id": "TargetTcpProxyList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetTcpProxy resources.", - "items": { - "$ref": "TargetTcpProxy" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetTcpProxyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGateway": { - "description": "Represents a Target VPN Gateway resource.\n\nThe target VPN gateway resource represents a Classic Cloud VPN gateway.\nFor more information, read thethe\nCloud VPN Overview.", - "id": "TargetVpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "forwardingRules": { - "description": "[Output Only] A list of URLs to the ForwardingRule resources.\nForwardingRules are created usingcompute.forwardingRules.insert and associated with a VPN\ngateway.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#targetVpnGateway", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this TargetVpnGateway, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a TargetVpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.targetVpnGateways.insert" - ] - }, - "description": "URL of the network to which this VPN gateway is attached. Provided by the\nclient when the VPN gateway is created.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the target VPN gateway resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the VPN gateway,\nwhich can be one of the following: CREATING, READY, FAILED, or DELETING.", - "enum": [ - "CREATING", - "DELETING", - "FAILED", - "READY" - ], - "enumDescriptions": [ - "", - "", - "", - "" - ], - "type": "string" - }, - "tunnels": { - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are\ncreated using the compute.vpntunnels.insert method and\nassociated with a VPN gateway.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TargetVpnGatewayAggregatedList": { - "id": "TargetVpnGatewayAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target VPN gateways." - }, - "description": "A list of TargetVpnGateway resources.", - "type": "object" - }, - "kind": { - "default": "compute#targetVpnGatewayAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGatewayList": { - "description": "Contains a list of TargetVpnGateway resources.", - "id": "TargetVpnGatewayList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of TargetVpnGateway resources.", - "items": { - "$ref": "TargetVpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#targetVpnGatewayList", - "description": "[Output Only] Type of resource. Alwayscompute#targetVpnGateway for target VPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TargetVpnGatewaysScopedList": { - "id": "TargetVpnGatewaysScopedList", - "properties": { - "targetVpnGateways": { - "description": "[Output Only] A list of target VPN gateways contained in this scope.", - "items": { - "$ref": "TargetVpnGateway" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "TestFailure": { - "id": "TestFailure", - "properties": { - "actualOutputUrl": { - "description": "The actual output URL evaluated by a load balancer containing the scheme,\nhost, path and query parameters.", - "type": "string" - }, - "actualRedirectResponseCode": { - "description": "Actual HTTP status code for rule with `urlRedirect`\ncalculated by load balancer", - "format": "int32", - "type": "integer" - }, - "actualService": { - "description": "BackendService or BackendBucket returned by load\nbalancer.", - "type": "string" - }, - "expectedOutputUrl": { - "description": "The expected output URL evaluated by a load balancer containing the scheme,\nhost, path and query parameters.", - "type": "string" - }, - "expectedRedirectResponseCode": { - "description": "Expected HTTP status code for rule with `urlRedirect`\ncalculated by load balancer", - "format": "int32", - "type": "integer" - }, - "expectedService": { - "description": "Expected BackendService or BackendBucket resource\nthe given URL should be mapped to.", - "type": "string" - }, - "headers": { - "description": "HTTP headers of the request.", - "items": { - "$ref": "UrlMapTestHeader" - }, - "type": "array" - }, - "host": { - "description": "Host portion of the URL.", - "type": "string" - }, - "path": { - "description": "Path portion including query parameters in the URL.", - "type": "string" - } - }, - "type": "object" - }, - "TestPermissionsRequest": { - "id": "TestPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the 'resource'. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestPermissionsResponse": { - "id": "TestPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Uint128": { - "id": "Uint128", - "properties": { - "high": { - "format": "uint64", - "type": "string" - }, - "low": { - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "UpcomingMaintenance": { - "description": "Upcoming Maintenance notification information.", - "id": "UpcomingMaintenance", - "properties": { - "canReschedule": { - "description": "Indicates if the maintenance can be customer triggered.", - "type": "boolean" - }, - "latestWindowStartTime": { - "description": "The latest time for the planned maintenance window to start.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - }, - "maintenanceOnShutdown": { - "description": "Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.", - "type": "boolean" - }, - "maintenanceReasons": { - "description": "The reasons for the maintenance. Only valid for vms.", - "items": { - "enum": [ - "FAILURE_DISK", - "FAILURE_GPU", - "FAILURE_GPU_MULTIPLE_FAULTY_HOSTS_CUSTOMER_REPORTED", - "FAILURE_GPU_NVLINK_SWITCH_CUSTOMER_REPORTED", - "FAILURE_GPU_TEMPERATURE", - "FAILURE_GPU_XID", - "FAILURE_INFRA", - "FAILURE_INTERFACE", - "FAILURE_MEMORY", - "FAILURE_NETWORK", - "FAILURE_NVLINK", - "FAILURE_REDUNDANT_HARDWARE_FAULT", - "FAILURE_TPU", - "INFRASTRUCTURE_RELOCATION", - "MAINTENANCE_REASON_UNKNOWN", - "PLANNED_NETWORK_UPDATE", - "PLANNED_UPDATE" - ], - "enumDescriptions": [ - "Maintenance due to disk errors.", - "Maintenance due to GPU errors.", - "Maintenance due to customer reported multiple faulty hosts via R\u0026R\nSubblock API.", - "Maintenance due to customer reported NVLink switch failure via R\u0026R\nSubblock API.", - "Maintenance due to high GPU temperature.", - "Maintenance due to GPU xid failure.", - "Maintenance due to infrastructure errors.", - "Maintenance due to interface errors.", - "Maintenance due to memory errors.", - "Maintenance due to network errors.", - "Maintenance due to NVLink failure.", - "Maintenance due to redundant hardware fault.", - "Maintenance due to TPU errors.", - "Maintenance due to infrastructure relocation.", - "Unknown maintenance reason. Do not use this value.", - "Maintenance due to planned network update.", - "Maintenance due to planned update to the instance." - ], - "type": "string" - }, - "type": "array" - }, - "maintenanceStatus": { - "enum": [ - "ONGOING", - "PENDING", - "UNKNOWN" - ], - "enumDescriptions": [ - "There is ongoing maintenance on this VM.", - "There is pending maintenance.", - "Unknown maintenance status. Do not use this value." - ], - "type": "string" - }, - "type": { - "description": "Defines the type of maintenance.", - "enum": [ - "MULTIPLE", - "SCHEDULED", - "UNKNOWN_TYPE", - "UNSCHEDULED" - ], - "enumDescriptions": [ - "Multiple maintenance types in one window.\nThis is only intended to be used for groups.", - "Scheduled maintenance (e.g. maintenance after uptime guarantee is\ncomplete).", - "No type specified. Do not use this value.", - "Unscheduled maintenance (e.g. emergency maintenance during\nuptime guarantee)." - ], - "type": "string" - }, - "windowEndTime": { - "description": "The time by which the maintenance disruption will be completed.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - }, - "windowStartTime": { - "description": "The current start time of the maintenance window.\nThis timestamp value is in RFC3339 text format.", - "type": "string" - } - }, - "type": "object" - }, - "UrlMap": { - "description": "Represents a URL Map resource.\n\nCompute Engine has two URL Map resources:\n\n* [Global](/compute/docs/reference/rest/beta/urlMaps)\n* [Regional](/compute/docs/reference/rest/beta/regionUrlMaps)\n\nA URL map resource is a component of certain types of cloud load balancers\nand Traffic Director:\n\n* urlMaps are used by global external Application Load\nBalancers, classic Application Load Balancers, and cross-region internal\nApplication Load Balancers.\n* regionUrlMaps are used by internal Application Load Balancers,\nregional external Application Load Balancers and regional internal\nApplication Load Balancers.\n\nFor a list of supported URL map features by the load balancer type, see the\nLoad balancing features: Routing and traffic management table.\n\nFor a list of supported URL map features for Traffic Director, see the\nTraffic Director features: Routing and traffic management table.\n\nThis resource defines mappings from hostnames and URL paths to either a\nbackend service or a backend bucket.\n\nTo use the global urlMaps resource, the backend service must\nhave a loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or INTERNAL_SELF_MANAGED. To use\nthe regionUrlMaps resource, the backend service must have aloadBalancingScheme of INTERNAL_MANAGED. For more\ninformation, read URL\nMap Concepts.", - "id": "UrlMap", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "defaultCustomErrorResponsePolicy": { - "$ref": "CustomErrorResponsePolicy", - "description": "defaultCustomErrorResponsePolicy specifies how the Load\nBalancer returns error responses when BackendServiceorBackendBucket responds with an error. \n\nThis policy takes\neffect at the load balancer level and applies only when no policy has been\ndefined for the error code at lower levels like PathMatcher, RouteRule and\nPathRule within this UrlMap. \n\nFor example, consider a UrlMap with the\nfollowing configuration:\n \n \n - defaultCustomErrorResponsePolicy containing policies for\n responding to 5xx and 4xx errors\n - A PathMatcher configured for *.example.com has\n defaultCustomErrorResponsePolicy for 4xx.\n\nIf a request for http://www.example.com/ encounters a404, the policy inpathMatcher.defaultCustomErrorResponsePolicy will be enforced.\nWhen the request for http://www.example.com/ encounters a502, the policy inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When\na request that does not match any host in *.example.com such\nas http://www.myotherexample.com/, encounters a404, UrlMap.defaultCustomErrorResponsePolicy\ntakes effect. \n\nWhen used in conjunction withdefaultRouteAction.retryPolicy, retries take precedence. Only\nonce all retries are exhausted, thedefaultCustomErrorResponsePolicy is applied. While attempting\na retry, if load balancer is successful in reaching the\nservice, the defaultCustomErrorResponsePolicy is ignored and\nthe response from the service is returned to the client.\n\ndefaultCustomErrorResponsePolicy is supported only for\nglobal external Application Load Balancers." - }, - "defaultRouteAction": { - "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the \nhostRules match. The load balancer performs advanced routing\nactions, such as URL rewrites and header transformations, before forwarding\nthe request to the selected backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\n URL maps for classic Application Load Balancers only support\nthe urlRewrite action within defaultRouteAction.\n\n\ndefaultRouteAction has no effect when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true." - }, - "defaultService": { - "description": "The full or partial URL of the defaultService resource to\nwhich traffic is directed if none of the hostRules match.\nIf defaultRouteAction is also specified, advanced\nrouting actions, such as URL rewrites, take effect before sending the\nrequest to the backend.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\ndefaultService has no effect when the URL map is bound\nto a target gRPC proxy that has the validateForProxyless field\nset to true.", - "type": "string" - }, - "defaultUrlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When none of the specified hostRules match, the request\nis redirected to a URL specified by defaultUrlRedirect.\n\n\nOnly one of defaultUrlRedirect, defaultService\nor defaultRouteAction.weightedBackendService can be set.\n\n\nNot supported when the URL map is bound to a target gRPC proxy." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object.\nThis field is used in optimistic locking. This field is ignored when\ninserting a UrlMap. An up-to-date fingerprint must be provided\nin order to update the UrlMap, otherwise the request will\nfail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a UrlMap.", - "format": "byte", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect\nfor the selected backendService.\n\nThe headerAction specified here take effect afterheaderAction specified under pathMatcher.\n\nheaderAction is not supported for load balancers\nthat have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "hostRules": { - "description": "The list of host rules to use against the URL.", - "items": { - "$ref": "HostRule" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#urlMap", - "description": "[Output Only] Type of the resource. Always compute#urlMaps for\nurl maps.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "pathMatchers": { - "description": "The list of named PathMatchers to use against the URL.", - "items": { - "$ref": "PathMatcher" - }, - "type": "array" - }, - "region": { - "description": "[Output Only] URL of the region where the regional URL map resides.\nThis field is not applicable to global URL maps.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "tests": { - "description": "The list of expected URL mapping tests. Request to update theUrlMap succeeds only if all test cases pass. You can specify a\nmaximum of 100 tests per UrlMap.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true.", - "items": { - "$ref": "UrlMapTest" - }, - "type": "array" - } - }, - "type": "object" - }, - "UrlMapList": { - "description": "Contains a list of UrlMap resources.", - "id": "UrlMapList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of UrlMap resources.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "kind": { - "default": "compute#urlMapList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapReference": { - "id": "UrlMapReference", - "properties": { - "urlMap": { - "type": "string" - } - }, - "type": "object" - }, - "UrlMapTest": { - "description": "Message for the expected URL mappings.", - "id": "UrlMapTest", - "properties": { - "description": { - "description": "Description of this test case.", - "type": "string" - }, - "expectedOutputUrl": { - "description": "The expected output URL evaluated by the load balancer\ncontaining the scheme, host, path and query parameters.\n\nFor rules that forward requests to backends, the test passes only whenexpectedOutputUrl matches the request forwarded by\nthe load balancer to backends. For rules with urlRewrite,\nthe test verifies that the forwarded request matcheshostRewrite and pathPrefixRewrite in theurlRewrite action. When service is specified,expectedOutputUrl`s scheme is ignored.\n\nFor rules with urlRedirect, the test passes only ifexpectedOutputUrl matches the URL in the load balancer's\nredirect response. If urlRedirect specifieshttps_redirect, the test passes only if the scheme inexpectedOutputUrl is also set to HTTPS.\nIf urlRedirect specifies strip_query, the test\npasses only if expectedOutputUrl does not contain any query\nparameters. \n\nexpectedOutputUrl is optional whenservice is specified.", - "type": "string" - }, - "expectedRedirectResponseCode": { - "description": "For rules with urlRedirect, the test passes only ifexpectedRedirectResponseCode matches the HTTP status code in\nload balancer's redirect response.\n\nexpectedRedirectResponseCode cannot be set whenservice is set.", - "format": "int32", - "type": "integer" - }, - "headers": { - "description": "HTTP headers for this request. If headers contains\na host header, then host must also match the header value.", - "items": { - "$ref": "UrlMapTestHeader" - }, - "type": "array" - }, - "host": { - "description": "Host portion of the URL. If headers contains a host header,\nthen host must also match the header value.", - "type": "string" - }, - "path": { - "description": "Path portion of the URL.", - "type": "string" - }, - "service": { - "description": "Expected BackendService or BackendBucket resource\nthe given URL should be mapped to. \n\nThe service field cannot\nbe set if expectedRedirectResponseCode is set.", - "type": "string" - } - }, - "type": "object" - }, - "UrlMapTestHeader": { - "description": "HTTP headers used in UrlMapTests.", - "id": "UrlMapTestHeader", - "properties": { - "name": { - "description": "Header name.", - "type": "string" - }, - "value": { - "description": "Header value.", - "type": "string" - } - }, - "type": "object" - }, - "UrlMapValidationResult": { - "description": "Message representing the validation result for a UrlMap.", - "id": "UrlMapValidationResult", - "properties": { - "loadErrors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "loadSucceeded": { - "description": "Whether the given UrlMap can be successfully loaded.\nIf false, 'loadErrors' indicates the reasons.", - "type": "boolean" - }, - "testFailures": { - "items": { - "$ref": "TestFailure" - }, - "type": "array" - }, - "testPassed": { - "description": "If successfully loaded, this field indicates whether the test passed.\nIf false, 'testFailures's indicate the reason of failure.", - "type": "boolean" - } - }, - "type": "object" - }, - "UrlMapsAggregatedList": { - "id": "UrlMapsAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "UrlMapsScopedList", - "description": "Name of the scope containing this set of UrlMaps." - }, - "description": "A list of UrlMapsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#urlMapsAggregatedList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapsScopedList": { - "id": "UrlMapsScopedList", - "properties": { - "urlMaps": { - "description": "A list of UrlMaps contained in this scope.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UrlMapsValidateRequest": { - "id": "UrlMapsValidateRequest", - "properties": { - "loadBalancingSchemes": { - "description": "Specifies the load balancer type(s) this validation request is for. UseEXTERNAL_MANAGED for global external Application Load\nBalancers and regional external Application Load Balancers.\nUse EXTERNAL for classic Application Load Balancers.\n\nUse INTERNAL_MANAGED for internal Application Load Balancers. For more\ninformation, refer to Choosing\na load balancer.\n\nIf unspecified, the load balancing scheme will be inferred from the backend\nservice resources this URL map references. If that can not be inferred (for\nexample, this URL map only references backend buckets, or this Url map is\nfor rewrites and redirects only and doesn't reference any backends),EXTERNAL will be used as the default type.\n\nIf specified, the scheme(s) must not conflict with the load balancing\nscheme of the backend service resources this Url map references.", - "items": { - "enum": [ - "EXTERNAL", - "EXTERNAL_MANAGED", - "LOAD_BALANCING_SCHEME_UNSPECIFIED" - ], - "enumDescriptions": [ - "Signifies that this will be used for classic Application Load Balancers.", - "Signifies that this will be used for Envoy-based global external\nApplication Load Balancers.", - "If unspecified, the validation will try to infer the scheme from the\nbackend service resources this Url map references. If the inference is not\npossible, EXTERNAL will be used as the default type." - ], - "type": "string" - }, - "type": "array" - }, - "resource": { - "$ref": "UrlMap", - "description": "Content of the UrlMap to be validated." - } - }, - "type": "object" - }, - "UrlMapsValidateResponse": { - "id": "UrlMapsValidateResponse", - "properties": { - "result": { - "$ref": "UrlMapValidationResult" - } - }, - "type": "object" - }, - "UrlRewrite": { - "description": "The spec for modifying the path before sending the request to the matched\nbackend service.", - "id": "UrlRewrite", - "properties": { - "hostRewrite": { - "description": "Before forwarding the request to the selected service, the request's\nhost header is replaced with contents of hostRewrite.\n\nThe value must be from 1 to 255 characters.", - "type": "string" - }, - "pathPrefixRewrite": { - "description": "Before forwarding the request to the selected backend service, the\nmatching portion of the request's path is replaced bypathPrefixRewrite.\n\nThe value must be from 1 to 1024 characters.", - "type": "string" - }, - "pathTemplateRewrite": { - "description": "If specified, the pattern rewrites the URL path (based on the :path\nheader) using the HTTP template syntax. \n\nA corresponding\npath_template_match must be specified. Any template variables must exist in\nthe path_template_match field. \n \n \n - -At least one variable must be specified in the path_template_match\n field \n - You can omit variables from the rewritten URL\n - The * and ** operators cannot be matched\n unless they have a corresponding variable name - e.g.\n {format=*} or {var=**}.\n\nFor example, a path_template_match of /static/{format=**}\ncould be rewritten as /static/content/{format} to prefix/content to the URL. Variables can also be re-ordered in a\nrewrite, so that /{country}/{format}/{suffix=**} can be\nrewritten as /content/{format}/{country}/{suffix}. \n\nAt least\none non-empty routeRules[].matchRules[].path_template_match is\nrequired. \n\nOnly one of path_prefix_rewrite orpath_template_rewrite may be specified.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetwork": { - "description": "Subnetwork which the current user has compute.subnetworks.use permission on.", - "id": "UsableSubnetwork", - "properties": { - "externalIpv6Prefix": { - "description": "[Output Only] The external IPv6 address range that is assigned to this\nsubnetwork.", - "type": "string" - }, - "internalIpv6Prefix": { - "description": "[Output Only] The internal IPv6 address range that is assigned to this\nsubnetwork.", - "type": "string" - }, - "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork.", - "type": "string" - }, - "ipv6AccessType": { - "description": "The access type of IPv6 address this subnet holds. It's immutable and can\nonly be specified during creation or the first time the subnet is updated\ninto IPV4_IPV6 dual stack.", - "enum": [ - "EXTERNAL", - "INTERNAL" - ], - "enumDescriptions": [ - "VMs on this subnet will be assigned IPv6 addresses that are accessible\nvia the Internet, as well as the VPC network.", - "VMs on this subnet will be assigned IPv6 addresses that are only\naccessible over the VPC network." - ], - "type": "string" - }, - "network": { - "description": "Network URL.", - "type": "string" - }, - "purpose": { - "enum": [ - "GLOBAL_MANAGED_PROXY", - "INTERNAL_HTTPS_LOAD_BALANCER", - "PEER_MIGRATION", - "PRIVATE", - "PRIVATE_NAT", - "PRIVATE_RFC_1918", - "PRIVATE_SERVICE_CONNECT", - "REGIONAL_MANAGED_PROXY" - ], - "enumDescriptions": [ - "Subnet reserved for Global Envoy-based Load Balancing.", - "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy\npurpose, please use REGIONAL_MANAGED_PROXY instead.", - "Subnetwork will be used for Migration from one peered VPC to another.\n(a transient state of subnetwork\nwhile migrating resources from one project to another).", - "Regular user created or automatically created subnet.", - "Subnetwork used as source range for Private NAT Gateways.", - "Regular user created or automatically created subnet.", - "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Envoy-based Load Balancing." - ], - "type": "string" - }, - "role": { - "description": "The role of subnetwork. Currently, this field is only used when\npurpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value can be set toACTIVE or BACKUP. An ACTIVE\nsubnetwork is one that is currently being used for Envoy-based load\nbalancers in a region. A BACKUP subnetwork is one that is\nready to be promoted to ACTIVE or is currently draining.\nThis field can be updated with a patch request.", - "enum": [ - "ACTIVE", - "BACKUP" - ], - "enumDescriptions": [ - "The ACTIVE subnet that is currently used.", - "The BACKUP subnet that could be promoted to ACTIVE." - ], - "type": "string" - }, - "secondaryIpRanges": { - "description": "Secondary IP ranges.", - "items": { - "$ref": "UsableSubnetworkSecondaryRange" - }, - "type": "array" - }, - "stackType": { - "description": "The stack type for the subnet. If set to IPV4_ONLY, new VMs\nin the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and\nIPv6 addresses. If not specified, IPV4_ONLY is used.\n\nThis field can be both set at resource creation time and updated usingpatch.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "New VMs in this subnet can have both IPv4 and IPv6 addresses.", - "New VMs in this subnet will only be assigned IPv4 addresses.", - "New VMs in this subnet will only be assigned IPv6 addresses." - ], - "type": "string" - }, - "subnetwork": { - "description": "Subnetwork URL.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetworkSecondaryRange": { - "description": "Secondary IP range of a usable subnetwork.", - "id": "UsableSubnetworkSecondaryRange", - "properties": { - "ipCidrRange": { - "description": "The range of IP addresses belonging to this subnetwork secondary range.", - "type": "string" - }, - "rangeName": { - "description": "The name associated with this subnetwork secondary range, used when adding\nan alias IP range to a VM instance.\nThe name must be 1-63 characters long, and comply withRFC1035.\nThe name must be unique within the subnetwork.", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetworksAggregatedList": { - "id": "UsableSubnetworksAggregatedList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "items": { - "description": "[Output] A list of usable subnetwork URLs.", - "items": { - "$ref": "UsableSubnetwork" - }, - "type": "array" - }, - "kind": { - "default": "compute#usableSubnetworksAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#usableSubnetworksAggregatedList for aggregated lists\nof usable subnetworks.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.\nIn special cases listUsable may return 0 subnetworks andnextPageToken which still should be used to get the\nnext page of results.", - "type": "string" - }, - "scopedWarnings": { - "description": "[Output Only] Informational warning messages for failures encountered from\nscopes.", - "items": { - "$ref": "SubnetworksScopedWarning" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "UsageExportLocation": { - "description": "The location in Cloud Storage and naming method of the daily usage\nreport. Contains bucket_name and report_name prefix.", - "id": "UsageExportLocation", - "properties": { - "bucketName": { - "description": "The name of an existing bucket in Cloud Storage where the usage report\nobject is stored. The Google Service Account is granted write access to\nthis bucket. This can either be the bucket name by itself, such asexample-bucket, or the bucket name with gs://\nor https://storage.googleapis.com/ in front of it, such\nas gs://example-bucket.", - "type": "string" - }, - "reportNamePrefix": { - "description": "An optional prefix for the name of the usage report object stored inbucketName. If not supplied, defaults tousage_gce. The report is stored as a CSV file namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD is the day of the usage according to Pacific Time.\nIf you supply a prefix, it should conform to Cloud Storageobject naming\nconventions.", - "type": "string" - } - }, - "type": "object" - }, - "VmEndpointNatMappings": { - "description": "Contain information of Nat mapping for a VM endpoint (i.e., NIC).", - "id": "VmEndpointNatMappings", - "properties": { - "instanceName": { - "description": "Name of the VM instance which the endpoint belongs to", - "type": "string" - }, - "interfaceNatMappings": { - "items": { - "$ref": "VmEndpointNatMappingsInterfaceNatMappings" - }, - "type": "array" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsInterfaceNatMappings": { - "description": "Contain information of Nat mapping for an interface of this endpoint.", - "id": "VmEndpointNatMappingsInterfaceNatMappings", - "properties": { - "drainNatIpPortRanges": { - "description": "List of all drain IP:port-range mappings assigned to this interface.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "natIpPortRanges": { - "description": "A list of all IP:port-range mappings assigned to this interface.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "numTotalDrainNatPorts": { - "description": "Total number of drain ports across all NAT IPs allocated to this\ninterface. It equals to the aggregated port number in the field\ndrain_nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "numTotalNatPorts": { - "description": "Total number of ports across all NAT IPs allocated to this interface.\nIt equals to the aggregated port number in the field nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "ruleMappings": { - "description": "Information about mappings provided by rules in this NAT.", - "items": { - "$ref": "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings" - }, - "type": "array" - }, - "sourceAliasIpRange": { - "description": "Alias IP range for this interface endpoint.\nIt will be a private (RFC 1918) IP range.\nExamples: \"10.33.4.55/32\", or \"192.168.5.0/24\".", - "type": "string" - }, - "sourceVirtualIp": { - "description": "Primary IP of the VM for this NIC.", - "type": "string" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings": { - "description": "Contains information of NAT Mappings provided by a NAT Rule.", - "id": "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", - "properties": { - "drainNatIpPortRanges": { - "description": "List of all drain IP:port-range mappings assigned to this interface\nby this rule.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "natIpPortRanges": { - "description": "A list of all IP:port-range mappings assigned to this interface by this\nrule.\nThese ranges are inclusive, that is, both the first and the last\nports can be used for NAT. Example: [\"2.2.2.2:12345-12355\",\n\"1.1.1.1:2234-2234\"].", - "items": { - "type": "string" - }, - "type": "array" - }, - "numTotalDrainNatPorts": { - "description": "Total number of drain ports across all NAT IPs allocated to this\ninterface by this rule.\nIt equals the aggregated port number in the field\ndrain_nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "numTotalNatPorts": { - "description": "Total number of ports across all NAT IPs allocated to this interface\nby this rule.\nIt equals the aggregated port number in the field nat_ip_port_ranges.", - "format": "int32", - "type": "integer" - }, - "ruleNumber": { - "description": "Rule number of the NAT Rule.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "VmEndpointNatMappingsList": { - "description": "Contains a list of VmEndpointNatMappings.", - "id": "VmEndpointNatMappingsList", - "properties": { - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "type": "string" - }, - "kind": { - "default": "compute#vmEndpointNatMappingsList", - "description": "[Output Only] Type of resource. Alwayscompute#vmEndpointNatMappingsList for lists of Nat mappings of\nVM endpoints.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "result": { - "description": "[Output Only] A list of Nat mapping information of VM endpoints.", - "items": { - "$ref": "VmEndpointNatMappings" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPoliciesScopedList": { - "id": "VmExtensionPoliciesScopedList", - "properties": { - "vmExtensionPolicies": { - "description": "List of VmExtensionPolicy resources contained in this scope.", - "items": { - "$ref": "VmExtensionPolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of\nbackend services when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicy": { - "description": "Represents a VM extension policy.", - "id": "VmExtensionPolicy", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource.", - "type": "string" - }, - "extensionPolicies": { - "additionalProperties": { - "$ref": "VmExtensionPolicyExtensionPolicy" - }, - "description": "Required. A map of extension names (e.g., \"cloudops\") to their corresponding policy\nconfigurations.", - "type": "object" - }, - "globalResourceLink": { - "description": "Optional. [Output Only] Link to the global policy that manages this zone policy, if\napplicable.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "instanceSelectors": { - "description": "Optional. Selectors to target VMs for this policy. VMs are selected if they match\n*any* of the provided selectors (logical OR). If this list is empty, the\npolicy applies to all VMs.", - "items": { - "$ref": "VmExtensionPolicyInstanceSelector" - }, - "type": "array" - }, - "kind": { - "default": "compute#vmExtensionPolicy", - "description": "[Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.", - "type": "string" - }, - "managedByGlobal": { - "description": "Optional. [Output Only] Indicates if this policy is managed by a global policy.", - "type": "boolean" - }, - "name": { - "annotations": { - "required": [ - "compute.zoneVmExtensionPolicies.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?`\nwhich means the first character must be a lowercase letter, and all\nfollowing characters must be a dash, lowercase letter, or digit, except\nthe last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "priority": { - "description": "Optional. Priority of this policy. Used to resolve conflicts when multiple policies\napply to the same extension.\nThe policy priority is an integer from 0 to 65535, inclusive. Lower\nintegers indicate higher priorities. If you do not specify a priority when\ncreating a rule, it is assigned a priority of 1000. If priorities are\nequal, the policy with the more recent creation timestamp takes precedence.", - "format": "int32", - "type": "integer" - }, - "selfLink": { - "description": "[Output Only] Server-defined fully-qualified URL for this resource.", - "type": "string" - }, - "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource's resource id.", - "type": "string" - }, - "state": { - "description": "Optional. [Output Only] Current state of the policy: ACTIVE or DELETING.", - "enum": [ - "ACTIVE", - "DELETING", - "STATE_UNSPECIFIED" - ], - "enumDescriptions": [ - "The policy is active and applied to matching VMs.\nNewly created VMs that match the policy will also receive the\nextension policy.", - "The policy is in the process of being deleted. After the extension is\nremoved from all matching VMs, the policy will be deleted.", - "Default value. Do not use." - ], - "type": "string" - }, - "updateTimestamp": { - "description": "[Output Only] Update timestamp inRFC3339\ntext format.", - "type": "string" - } - }, - "type": "object" - }, - "VmExtensionPolicyAggregatedListResponse": { - "description": "Response for the aggregated list of VM extension policies.", - "id": "VmExtensionPolicyAggregatedListResponse", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VmExtensionPoliciesScopedList", - "description": "Name of the scope containing this set of VmExtensionPolicies." - }, - "description": "A list of VmExtensionPoliciesScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#VmExtensionPolicyAggregatedList", - "description": "[Output Only] Type of resource. Alwayscompute#VmExtensionPolicyAggregatedList for lists of\nVmExtensionPolicies.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicyExtensionPolicy": { - "description": "Configuration for a specific VM extension.", - "id": "VmExtensionPolicyExtensionPolicy", - "properties": { - "pinnedVersion": { - "description": "Optional. The specific version of the extension to install. If not set, the latest\nversion is used.", - "type": "string" - }, - "stringConfig": { - "description": "Optional. String-based configuration data for the extension.", - "type": "string" - } - }, - "type": "object" - }, - "VmExtensionPolicyInstanceSelector": { - "description": "Defines how to select VMs to apply a zone VM extension policy.", - "id": "VmExtensionPolicyInstanceSelector", - "properties": { - "labelSelector": { - "$ref": "VmExtensionPolicyLabelSelector", - "description": "Optional. LabelSelector selects VMs based on their labels." - } - }, - "type": "object" - }, - "VmExtensionPolicyLabelSelector": { - "description": "A LabelSelector is applied to a VM only if it matches all the specified\nlabels.", - "id": "VmExtensionPolicyLabelSelector", - "properties": { - "inclusionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A map of key-value pairs representing VM labels.\nVMs must have all of the labels specified in this map to be selected\n(logical AND).\n\ne.g. If the `inclusion_labels` are {(\"key1\", \"value1\"), (\"key2\",\n\"value2\")}, the VM labels must contain both (\"key1\", \"value1\") and\n(\"key2\", \"value2\") to be selected. If the VM labels are (\"key1\",\n\"value1\") and (\"something\", \"else\"), it will not be selected.\n\nIf the map is empty, it's considered a match.", - "type": "object" - } - }, - "type": "object" - }, - "VmExtensionPolicyList": { - "id": "VmExtensionPolicyList", - "properties": { - "etag": { - "description": "[Output Only] Fingerprint of this resource. A hash of the contents stored\nin this object. This field is used in optimistic locking. This field will\nbe ignored when inserting a VmExtensionPolicy. An up-to-date\nfingerprint must be provided in order to update the VmExtensionPolicy.\n\nTo see the latest value of the fingerprint, make a get() request to\nretrieve a VmExtensionPolicy.", - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of VM extension policy resources.", - "items": { - "$ref": "VmExtensionPolicy" - }, - "type": "array" - }, - "kind": { - "default": "compute#vmExtensionPolicyList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGateway": { - "description": "Represents a HA VPN gateway.\n\nHA VPN is a high-availability (HA) Cloud VPN solution that lets you securely\nconnect your on-premises network to your Google Cloud Virtual Private Cloud\nnetwork through an IPsec VPN connection in a single region.\nFor more information about Cloud HA VPN solutions, see\nCloud VPN topologies .", - "id": "VpnGateway", - "properties": { - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "gatewayIpVersion": { - "description": "The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not\nspecified, IPV4 will be used.", - "enum": [ - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "Every HA-VPN gateway interface is configured with an IPv4 address.", - "Every HA-VPN gateway interface is configured with an IPv6 address." - ], - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#vpnGateway", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this VpnGateway, which\nis essentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a VpnGateway.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "name": { - "annotations": { - "required": [ - "compute.vpnGateways.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "annotations": { - "required": [ - "compute.vpnGateways.insert" - ] - }, - "description": "URL of the network to which this VPN gateway is attached. Provided by the\nclient when the VPN gateway is created.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the VPN gateway resides.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "stackType": { - "description": "The stack type for this VPN gateway to identify the IP protocols that are\nenabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6.", - "enum": [ - "IPV4_IPV6", - "IPV4_ONLY", - "IPV6_ONLY" - ], - "enumDescriptions": [ - "Enable VPN gateway with both IPv4 and IPv6 protocols.", - "Enable VPN gateway with only IPv4 protocol.", - "Enable VPN gateway with only IPv6 protocol." - ], - "type": "string" - }, - "vpnInterfaces": { - "description": "The list of VPN interfaces associated with this VPN gateway.", - "items": { - "$ref": "VpnGatewayVpnGatewayInterface" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayAggregatedList": { - "id": "VpnGatewayAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of VPN gateways." - }, - "description": "A list of VpnGateway resources.", - "type": "object" - }, - "kind": { - "default": "compute#vpnGatewayAggregatedList", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGatewayList": { - "description": "Contains a list of VpnGateway resources.", - "id": "VpnGatewayList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of VpnGateway resources.", - "items": { - "$ref": "VpnGateway" - }, - "type": "array" - }, - "kind": { - "default": "compute#vpnGatewayList", - "description": "[Output Only] Type of resource. Always compute#vpnGateway for\nVPN gateways.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnGatewayStatus": { - "id": "VpnGatewayStatus", - "properties": { - "vpnConnections": { - "description": "List of VPN connection for this VpnGateway.", - "items": { - "$ref": "VpnGatewayStatusVpnConnection" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayStatusHighAvailabilityRequirementState": { - "description": "Describes the high availability requirement state for the VPN connection\nbetween this Cloud VPN gateway and a peer gateway.", - "id": "VpnGatewayStatusHighAvailabilityRequirementState", - "properties": { - "state": { - "description": "Indicates the high availability requirement state for the VPN connection.\nValid values are CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET.", - "enum": [ - "CONNECTION_REDUNDANCY_MET", - "CONNECTION_REDUNDANCY_NOT_MET" - ], - "enumDescriptions": [ - "VPN tunnels are configured with adequate redundancy from Cloud VPN\ngateway to the peer VPN gateway. For both GCP-to-non-GCP and GCP-to-GCP\nconnections, the adequate redundancy is a pre-requirement for users to\nget 99.99% availability on GCP side; please note that for any\nconnection, end-to-end 99.99% availability is subject to proper\nconfiguration on the peer VPN gateway.", - "VPN tunnels are not configured with adequate redundancy from the Cloud\nVPN gateway to the peer gateway" - ], - "type": "string" - }, - "unsatisfiedReason": { - "description": "Indicates the reason why the VPN connection does not meet the high\navailability redundancy criteria/requirement.\nValid values is INCOMPLETE_TUNNELS_COVERAGE.", - "enum": [ - "INCOMPLETE_TUNNELS_COVERAGE" - ], - "enumDescriptions": [ - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewayStatusTunnel": { - "description": "Contains some information about a VPN tunnel.", - "id": "VpnGatewayStatusTunnel", - "properties": { - "localGatewayInterface": { - "description": "The VPN gateway interface this VPN tunnel is associated with.", - "format": "uint32", - "type": "integer" - }, - "peerGatewayInterface": { - "description": "The peer gateway interface this VPN tunnel is connected to, the peer\ngateway could either be an external VPN gateway or a Google Cloud\nVPN gateway.", - "format": "uint32", - "type": "integer" - }, - "tunnelUrl": { - "description": "URL reference to the VPN tunnel.", - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewayStatusVpnConnection": { - "description": "A VPN connection contains all VPN tunnels connected from this VpnGateway\nto the same peer gateway. The peer gateway could either be an external VPN\ngateway or a Google Cloud VPN gateway.", - "id": "VpnGatewayStatusVpnConnection", - "properties": { - "peerExternalGateway": { - "description": "URL reference to the peer external VPN gateways to which the VPN tunnels\nin this VPN connection are connected.\nThis field is mutually exclusive with peer_gcp_gateway.", - "type": "string" - }, - "peerGcpGateway": { - "description": "URL reference to the peer side VPN gateways to which the VPN tunnels in\nthis VPN connection are connected.\nThis field is mutually exclusive with peer_gcp_gateway.", - "type": "string" - }, - "state": { - "$ref": "VpnGatewayStatusHighAvailabilityRequirementState", - "description": "HighAvailabilityRequirementState for the VPN connection." - }, - "tunnels": { - "description": "List of VPN tunnels that are in this VPN connection.", - "items": { - "$ref": "VpnGatewayStatusTunnel" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnGatewayVpnGatewayInterface": { - "description": "A VPN gateway interface.", - "id": "VpnGatewayVpnGatewayInterface", - "properties": { - "id": { - "description": "[Output Only] Numeric identifier for this VPN interface associated with\nthe VPN gateway.", - "format": "uint32", - "type": "integer" - }, - "interconnectAttachment": { - "description": "URL of the VLAN attachment (interconnectAttachment) resource for this\nVPN gateway interface. When the value of this field is present, the VPN\ngateway is used for HA VPN over Cloud Interconnect; all egress\nor ingress traffic for this VPN gateway interface goes through the\nspecified VLAN attachment resource.", - "type": "string" - }, - "ipAddress": { - "description": "[Output Only] IP address for this VPN interface associated with the VPN\ngateway.\nThe IP address could be either a regional external IP address or\na regional internal IP address. The two IP addresses for a VPN gateway\nmust be all regional external or regional internal IP addresses. There\ncannot be a mix of regional external IP addresses and regional internal\nIP addresses. For HA VPN over Cloud Interconnect, the IP addresses\nfor both interfaces could either be regional internal IP addresses or\nregional external IP addresses. For regular (non HA VPN over Cloud\nInterconnect) HA VPN tunnels, the IP address must be a regional external\nIP address.", - "type": "string" - }, - "ipv6Address": { - "description": "[Output Only] IPv6 address for this VPN interface associated with the VPN\ngateway.\nThe IPv6 address must be a regional external IPv6 address. The format is\nRFC 5952 format (e.g. 2001:db8::2d9:51:0:0).", - "type": "string" - } - }, - "type": "object" - }, - "VpnGatewaysGetStatusResponse": { - "id": "VpnGatewaysGetStatusResponse", - "properties": { - "result": { - "$ref": "VpnGatewayStatus" - } - }, - "type": "object" - }, - "VpnGatewaysScopedList": { - "id": "VpnGatewaysScopedList", - "properties": { - "vpnGateways": { - "description": "[Output Only] A list of VPN gateways contained in this scope.", - "items": { - "$ref": "VpnGateway" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning which replaces the list of addresses\nwhen the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnel": { - "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the\nthe Cloud VPN Overview.", - "id": "VpnTunnel", - "properties": { - "cipherSuite": { - "$ref": "VpnTunnelCipherSuite", - "description": "User specified list of ciphers to use for the phase 1 and phase 2 of the\nIKE protocol." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you\ncreate the resource.", - "type": "string" - }, - "detailedStatus": { - "description": "[Output Only] Detailed status message for the VPN tunnel.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "ikeVersion": { - "description": "IKE protocol version to use when establishing the VPN tunnel with the peer\nVPN gateway. Acceptable IKE versions are 1 or 2.\nThe default version is 2.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "compute#vpnTunnel", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "labelFingerprint": { - "description": "A fingerprint for the labels being applied to this VpnTunnel, which is\nessentially a hash of the labels set used for optimistic locking. The\nfingerprint is initially generated by Compute Engine and changes after\nevery request to modify or update labels. You must always provide an\nup-to-date fingerprint hash in order to update or change labels,\notherwise the request will fail with error412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to\nretrieve a VpnTunnel.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.\nLabel values may be empty.", - "type": "object" - }, - "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with the\npeer VPN gateway. The value should be a CIDR formatted string, for\nexample: 192.168.0.0/16. The ranges must be disjoint.\nOnly IPv4 is supported for Classic VPN tunnels. This field is output only\nfor HA VPN tunnels.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "annotations": { - "required": [ - "compute.vpnTunnels.insert" - ] - }, - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "peerExternalGateway": { - "description": "URL of the peer side external VPN gateway to which this VPN tunnel is\nconnected.\nProvided by the client when the VPN tunnel is created.\nThis field is exclusive with the field peerGcpGateway.", - "type": "string" - }, - "peerExternalGatewayInterface": { - "description": "The interface ID of the external VPN gateway to which this VPN tunnel is\nconnected. Provided by the client when the VPN tunnel is created.\nPossible values are: `0`, `1`, `2`, `3`. The number of IDs in use\ndepends on the external VPN gateway redundancy type.", - "format": "int32", - "type": "integer" - }, - "peerGcpGateway": { - "description": "URL of the peer side HA VPN gateway to which this VPN tunnel\nis connected. Provided by the client when the VPN tunnel is created.\nThis field can be used when creating highly available VPN from VPC network\nto VPC network, the field is exclusive with the field peerExternalGateway.\nIf provided, the VPN tunnel will automatically use the same\nvpnGatewayInterface ID in the peer Google Cloud VPN gateway.", - "type": "string" - }, - "peerIp": { - "description": "IP address of the peer VPN gateway. Only IPv4 is supported. This field can\nbe set only for Classic VPN tunnels.", - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the VPN tunnel resides.\nYou must specify this field as part of the HTTP request URL. It is\nnot settable as a field in the request body.", - "type": "string" - }, - "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with\nthe peer VPN gateway. The value should be a CIDR formatted string,\nfor example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is\nsupported for Classic VPN tunnels. This field is output only for HA VPN\ntunnels.", - "items": { - "type": "string" - }, - "type": "array" - }, - "router": { - "description": "URL of the router resource to be used for dynamic routing.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sharedSecret": { - "description": "Shared secret used to set the secure session between the Cloud VPN gateway\nand the peer VPN gateway.", - "type": "string" - }, - "sharedSecretHash": { - "description": "Hash of the shared secret.", - "type": "string" - }, - "status": { - "description": "[Output Only] The status of the VPN tunnel, which can be one of the\nfollowing:\n \n - PROVISIONING: Resource is being allocated for the VPN tunnel.\n - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs\n from\n the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route\n resources are needed to setup the VPN tunnel.\n - FIRST_HANDSHAKE: Successful first handshake with the peer VPN.\n - ESTABLISHED: Secure session is successfully established with the peer\n VPN. \n - NETWORK_ERROR: Deprecated, replaced by\n NO_INCOMING_PACKETS \n - AUTHORIZATION_ERROR: Auth error (for example,\n bad shared secret). \n - NEGOTIATION_FAILURE: Handshake failed.\n - DEPROVISIONING: Resources are being deallocated for the VPN\n tunnel. \n - FAILED: Tunnel creation has failed and the tunnel is not\n ready to be used. \n - NO_INCOMING_PACKETS: No incoming packets from\n peer. \n - REJECTED: Tunnel configuration was rejected, can be result\n of being denied access. \n - ALLOCATING_RESOURCES: Cloud VPN is in the\n process of allocating all required resources.\n - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted\n for Classic VPN tunnels or the project is in frozen state.\n - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP,\n probably behind NAT. \n - TS_NARROWING_NOT_ALLOWED: Traffic selector\n narrowing not allowed for an HA-VPN tunnel.", - "enum": [ - "ALLOCATING_RESOURCES", - "AUTHORIZATION_ERROR", - "DEPROVISIONING", - "ESTABLISHED", - "FAILED", - "FIRST_HANDSHAKE", - "NEGOTIATION_FAILURE", - "NETWORK_ERROR", - "NO_INCOMING_PACKETS", - "PROVISIONING", - "REJECTED", - "STOPPED", - "WAITING_FOR_FULL_CONFIG" - ], - "enumDescriptions": [ - "Cloud VPN is in the process of allocating all required resources\n(specifically, a borg task).", - "Auth error (e.g. bad shared secret).", - "Resources is being deallocated for the VPN tunnel.", - "Secure session is successfully established with peer VPN.", - "Tunnel creation has failed and the tunnel is not ready to be used.", - "Successful first handshake with peer VPN.", - "Handshake failed.", - "Deprecated, replaced by NO_INCOMING_PACKETS", - "No incoming packets from peer", - "Resource is being allocated for the VPN tunnel.", - "Tunnel configuration was rejected, can be result of being denylisted.", - "Tunnel is stopped due to its Forwarding Rules being deleted.", - "Waiting to receive all VPN-related configs from user. Network,\nTargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are\nneeded to setup VPN tunnel." - ], - "type": "string" - }, - "targetVpnGateway": { - "description": "URL of the Target VPN gateway with which this VPN tunnel is associated.\nProvided by the client when the VPN tunnel is created.\nThis field can be set only for Classic VPN tunnels.", - "type": "string" - }, - "vpnGateway": { - "description": "URL of the VPN gateway with which this VPN tunnel is associated.\nProvided by the client when the VPN tunnel is created. This must be\nused (instead of target_vpn_gateway) if a High Availability VPN gateway\nresource is created.", - "type": "string" - }, - "vpnGatewayInterface": { - "description": "The interface ID of the VPN gateway with which this VPN tunnel is\nassociated.\nPossible values are: `0`, `1`.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "VpnTunnelAggregatedList": { - "id": "VpnTunnelAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "VpnTunnelsScopedList", - "description": "Name of the scope containing this set of VPN tunnels." - }, - "description": "A list of VpnTunnelsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#vpnTunnelAggregatedList", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnelCipherSuite": { - "id": "VpnTunnelCipherSuite", - "properties": { - "phase1": { - "$ref": "VpnTunnelPhase1Algorithms" - }, - "phase2": { - "$ref": "VpnTunnelPhase2Algorithms" - } - }, - "type": "object" - }, - "VpnTunnelList": { - "description": "Contains a list of VpnTunnel resources.", - "id": "VpnTunnelList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of VpnTunnel resources.", - "items": { - "$ref": "VpnTunnel" - }, - "type": "array" - }, - "kind": { - "default": "compute#vpnTunnelList", - "description": "[Output Only] Type of resource. Always compute#vpnTunnel for\nVPN tunnels.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "VpnTunnelPhase1Algorithms": { - "id": "VpnTunnelPhase1Algorithms", - "properties": { - "dh": { - "items": { - "type": "string" - }, - "type": "array" - }, - "encryption": { - "items": { - "type": "string" - }, - "type": "array" - }, - "integrity": { - "items": { - "type": "string" - }, - "type": "array" - }, - "prf": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnTunnelPhase2Algorithms": { - "id": "VpnTunnelPhase2Algorithms", - "properties": { - "encryption": { - "items": { - "type": "string" - }, - "type": "array" - }, - "integrity": { - "items": { - "type": "string" - }, - "type": "array" - }, - "pfs": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "VpnTunnelsScopedList": { - "id": "VpnTunnelsScopedList", - "properties": { - "vpnTunnels": { - "description": "A list of VPN tunnels contained in this scope.", - "items": { - "$ref": "VpnTunnel" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of addresses when\nthe list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "WafExpressionSet": { - "id": "WafExpressionSet", - "properties": { - "aliases": { - "description": "A list of alternate IDs. The format should be:\n- E.g. XSS-stable\nGeneric suffix like \"stable\" is particularly useful if a policy\nlikes to avail newer set of expressions without having to change\nthe policy.\nA given alias name can't be used for more than one entity set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "expressions": { - "description": "List of available expressions.", - "items": { - "$ref": "WafExpressionSetExpression" - }, - "type": "array" - }, - "id": { - "description": "Google specified expression set ID. The format should be:\n- E.g. XSS-20170329\nrequired", - "type": "string" - } - }, - "type": "object" - }, - "WafExpressionSetExpression": { - "id": "WafExpressionSetExpression", - "properties": { - "id": { - "description": "Expression ID should uniquely identify the origin of the expression.\nE.g. owasp-crs-v020901-id973337 identifies Owasp core rule set\nversion 2.9.1 rule id 973337.\nThe ID could be used to determine the individual attack definition\nthat has been detected. It could also be used to exclude it from\nthe policy in case of false positive.\nrequired", - "type": "string" - }, - "sensitivity": { - "description": "The sensitivity value associated with the WAF rule ID. This corresponds\nto the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for\nopt-in only rules.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "WeightedBackendService": { - "description": "In contrast to a single BackendService in \nHttpRouteAction to which all matching traffic is directed to,WeightedBackendService allows traffic to be split across\nmultiple backend services. The volume of traffic for each\nbackend service is proportional to the weight specified\nin each WeightedBackendService", - "id": "WeightedBackendService", - "properties": { - "backendService": { - "description": "The full or partial URL to the default BackendService\nresource. Before\nforwarding the request to backendService, the load balancer\napplies any relevant headerActions specified as part of thisbackendServiceWeight.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take\neffect for the selected backendService.\n\nheaderAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap.\n\nheaderAction is not supported for load balancers that have\ntheir loadBalancingScheme set to EXTERNAL.\n\nNot supported when the URL map is bound to a target gRPC proxy that\nhas validateForProxyless field set to true." - }, - "weight": { - "description": "Specifies the fraction of traffic sent to a backend service,\ncomputed asweight / (sum of all weightedBackendService weights in routeAction).\n\nThe selection of a backend service is determined only for new traffic.\nOnce a user's request has been directed to a backend service,\nsubsequent requests are sent to the same backend service as\ndetermined by the backend service's session affinity policy.\nDon't configure session affinity if you're using weighted traffic\nsplitting. If you do, the weighted traffic splitting configuration takes\nprecedence.\n\nThe value must be from 0 to 1000.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "Wire": { - "description": "A pseudowire that connects two Interconnect connections.", - "id": "Wire", - "properties": { - "adminEnabled": { - "description": "[Output Only] Indicates whether the wire is enabled.\nWhen false, the wire is disabled. When true and when the wire group of\nthe wire is also enabled, the wire is enabled. Defaults to true.", - "type": "boolean" - }, - "endpoints": { - "description": "Wire endpoints are specific Interconnect connections.", - "items": { - "$ref": "WireEndpoint" - }, - "type": "array" - }, - "label": { - "description": "[Output Only] A label that identifies the wire. The format of this label\ncombines the existing labels of the wire group endpoints and Interconnect\nconnections used by this wire in alphabetical order as follows:\n`ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1`, where:\n \n - ENDPOINT_A and ENDPOINT_B: are the labels\n that you entered as map keys when you specified the wire group endpoint\n objects.\n - CONNECTION_A1 and CONNECTION_B1: are the\n labels that you entered as map keys when you specified the wire group\n Interconnect objects.", - "type": "string" - }, - "wireProperties": { - "$ref": "WireProperties", - "description": "[Output Only] Properties of the wire." - } - }, - "type": "object" - }, - "WireEndpoint": { - "description": "Wire endpoints are specific Interconnect connections.", - "id": "WireEndpoint", - "properties": { - "interconnect": { - "type": "string" - }, - "vlanTag": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "WireGroup": { - "description": "A resource that represents a group of redundant wires.", - "id": "WireGroup", - "properties": { - "adminEnabled": { - "description": "Indicates whether the wires in the wire group are enabled. When false, the\nwires in the wire group are disabled. When true and when\nthere is simultaneously no wire-specific override of `adminEnabled` to\nfalse, a given wire is enabled. Defaults to true.", - "type": "boolean" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "description": { - "description": "An optional description of the wire group.", - "type": "string" - }, - "endpoints": { - "additionalProperties": { - "$ref": "WireGroupEndpoint" - }, - "description": "A map that contains the logical endpoints of the wire group. Specify\nkey-value pairs for the map as follows:\n \n - Key: an RFC1035 user-specified label.\n - Value: an Endpoint object.", - "type": "object" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource type. The server\ngenerates this identifier.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#wireGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#wireGroups for wire groups.", - "type": "string" - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created.\nThe name must be 1-63 characters long, and comply withRFC1035.\nSpecifically, the name must be 1-63 characters long and match the regular\nexpression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first\ncharacter must be a lowercase letter, and all following characters must\nbe a dash, lowercase letter, or digit, except the last character, which\ncannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "reconciling": { - "description": "[Output Only] Indicates whether there are wire changes yet to be processed.", - "type": "boolean" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "topology": { - "$ref": "WireGroupTopology", - "description": "Topology details for the wire group configuration." - }, - "wireGroupProperties": { - "$ref": "WireGroupProperties", - "description": "Properties of the wire group." - }, - "wireProperties": { - "$ref": "WireProperties", - "description": "Properties for all wires in the wire group." - }, - "wires": { - "description": "The single/redundant wire(s) managed by the wire group.", - "items": { - "$ref": "Wire" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupEndpoint": { - "description": "A logical endpoint for the wire group. An endpoint represents a metro that\ncontains redundant Interconnect connections. A wire group is created\nbetween two endpoints.", - "id": "WireGroupEndpoint", - "properties": { - "interconnects": { - "additionalProperties": { - "$ref": "WireGroupEndpointInterconnect" - }, - "description": "A map that contains the redundant Interconnect connections. Specify\nkey-value pairs for the map as follows:\n \n - Key: an RFC1035 user-specified label.\n - Value: an Interconnect object.", - "type": "object" - } - }, - "type": "object" - }, - "WireGroupEndpointInterconnect": { - "description": "The redundant Interconnect connections for this endpoint.", - "id": "WireGroupEndpointInterconnect", - "properties": { - "interconnect": { - "description": "Required. An Interconnect connection. You can specify the connection as\na partial or full URL. If the connection is in a different project from\nthe cross-site network, use a format that specifies the project. See\nthe following examples of partial and full URLs:\n \n \n \n global/interconnects/NAME\n \n \n projects/PROJECT_ID/global/interconnects/NAME\n \n - \n https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME", - "type": "string" - }, - "vlanTags": { - "description": "Required. To configure the wire group for VLAN mode, enter a VLAN tag,\nwhich is a number from `2` to `4093`. You can autoallocate a tag by\nentering `0`. To configure the wire group for port mode, enter `-1`.\nReview the following guidelines:\n \n - A VLAN tag must be unique for an Interconnect connection across all\n attachments and wire groups.\n - Both endpoints of a wire must use the same VLAN tag value.\n - Single wire and redundant type wire groups must have only one\n VLAN tag.\n - Port mode pseudowires must have a single VLAN tag with a value of\n `-1` for both endpoints.\n - Box and cross type wire groups must have two VLAN tags. The first\n is for the same-zone pseudowire, and the second is for the cross-zone\n pseudowire.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupList": { - "description": "Response for the list request.", - "id": "WireGroupList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of wire group resources.", - "items": { - "$ref": "WireGroup" - }, - "type": "array" - }, - "kind": { - "default": "compute#wireGroup", - "description": "[Output Only] Type of the resource. Alwayscompute#wireGroups for wire groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.\nend_interface: MixerListResponseWithEtagBuilder", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "WireGroupProperties": { - "description": "The properties of a wire group. These properties\ndetermine how a group of redundant wires are created and managed.", - "id": "WireGroupProperties", - "properties": { - "type": { - "description": "The type of the wire group, one of the following:\n \n - WIRE: a single pseudowire over two Interconnect connections with no\n redundancy.\n - REDUNDANT: two pseudowires over four Interconnect connections, with\n two connections in one metro and two connections in another metro.\n Each redundant pair of Interconnect connections spans both edge\n availability domains of the metro. Each pseudowire connects Interconnect\n connections in matching edge availability domains of the two metros.\n - BOX_AND_CROSS: four pseudowires over four Interconnect connections,\n with two connections in one metro and two connections in another metro.\n Each redundant pair of Interconnect connections spans both edge\n availability domains of the metro. Two pseudowires connect Interconnect\n connections in matching edge availability domains of the two metros.\n Two additional pseudowires connect the non-matching edge availability\n domains of the two metros.", - "enum": [ - "BOX_AND_CROSS", - "REDUNDANT", - "WIRE" - ], - "enumDescriptions": [ - "Four pseudowires over four Interconnect connections,\nwith two connections in one metro and two connections in another metro.\nEach redundant pair of Interconnect connections spans both edge\navailability domains of the metro. Two pseudowires connect Interconnect\nconnections in matching edge availability domains of the two metros.\nTwo additional pseudowires connect the non-matching edge availability\ndomains of the two metros.", - "Two pseudowires over four Interconnect connections, with\ntwo connections in one metro and two connections in another metro.\nEach redundant pair of Interconnect connections spans both edge\navailability domains of the metro. Each pseudowire connects Interconnect\nconnections in matching edge availability domains of the two metros.", - "A single pseudowire over two Interconnect connections with no redundancy." - ], - "type": "string" - } - }, - "type": "object" - }, - "WireGroupTopology": { - "description": "Topology details for the wire group.", - "id": "WireGroupTopology", - "properties": { - "endpoints": { - "description": "Topology details for all endpoints in the wire group.", - "items": { - "$ref": "WireGroupTopologyEndpoint" - }, - "type": "array" - } - }, - "type": "object" - }, - "WireGroupTopologyEndpoint": { - "description": "Topology details for a single wire group endpoint.", - "id": "WireGroupTopologyEndpoint", - "properties": { - "city": { - "description": "The InterconnectLocation.city (metropolitan area designator) that all\ninterconnects are located in.", - "type": "string" - }, - "label": { - "description": "Endpoint label from the wire group.", - "type": "string" - } - }, - "type": "object" - }, - "WireProperties": { - "description": "The properties of a wire.", - "id": "WireProperties", - "properties": { - "bandwidthAllocation": { - "description": "The configuration of the bandwidth allocation, one of the following:\n \n - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation\n (and associated charges) for each wire in the group.\n - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures\n one unmetered bandwidth allocation for the wire group. The unmetered\n bandwidth is divided equally across each wire in the group, but dynamic\n throttling reallocates unused unmetered bandwidth from unused or underused\n wires to other wires in the group.", - "enum": [ - "ALLOCATE_PER_WIRE", - "SHARED_WITH_WIRE_GROUP" - ], - "enumDescriptions": [ - "Configures a separate unmetered bandwidth allocation (and associated\ncharges) for each wire in the group.", - "This is the default behavior. Configures one unmetered bandwidth\nallocation for the wire group. The unmetered bandwidth is divided equally\nacross each wire in the group, but dynamic throttling reallocates unused\nunmetered bandwidth from unused or underused wires to other wires in the\ngroup." - ], - "type": "string" - }, - "bandwidthUnmetered": { - "description": "The unmetered bandwidth in Gigabits per second, using decimal units. `10`\nis 10 Gbps, `100` is 100 Gbps. The bandwidth must be greater than 0.", - "format": "int64", - "type": "string" - }, - "faultResponse": { - "description": "Response when a fault is detected in a pseudowire:\n \n - NONE: default.\n - DISABLE_PORT: set the port line protocol down when inline probes\n detect a fault. This setting is only permitted on port mode\n pseudowires.", - "enum": [ - "DISABLE_PORT", - "NONE" - ], - "enumDescriptions": [ - "Set the port line protocol down when inline probes detect a fault. This\nsetting is only permitted on port mode pseudowires.", - "Default." - ], - "type": "string" - } - }, - "type": "object" - }, - "XpnHostList": { - "id": "XpnHostList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "[Output Only] A list of shared VPC host project URLs.", - "items": { - "$ref": "Project" - }, - "type": "array" - }, - "kind": { - "default": "compute#xpnHostList", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for\nlists of shared VPC hosts.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "XpnResourceId": { - "description": "Service resource (a.k.a service project) ID.", - "id": "XpnResourceId", - "properties": { - "id": { - "description": "The ID of the service resource. In the case of projects, this field\nsupports project id (e.g., my-project-123) and project number\n(e.g. 12345678).", - "type": "string" - }, - "type": { - "description": "The type of the service resource.", - "enum": [ - "PROJECT", - "XPN_RESOURCE_TYPE_UNSPECIFIED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Zone": { - "description": "Represents a Zone resource.\n\nA zone is a deployment area. These deployment areas are subsets of a region.\nFor example the zone us-east1-b is located in theus-east1 region. For more information, readRegions and\nZones.", - "id": "Zone", - "properties": { - "availableCpuPlatforms": { - "description": "[Output Only] Available cpu/platform selections for the zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp inRFC3339\ntext format.", - "type": "string" - }, - "deprecated": { - "$ref": "DeprecationStatus", - "description": "[Output Only] The deprecation status associated with this zone." - }, - "description": { - "description": "[Output Only] Textual description of the resource.", - "type": "string" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is\ndefined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#zone", - "description": "[Output Only] Type of the resource. Always compute#zone for\nzones.", - "type": "string" - }, - "name": { - "description": "[Output Only] Name of the resource.", - "type": "string" - }, - "region": { - "description": "[Output Only] Full URL reference to the region which hosts the zone.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "status": { - "description": "[Output Only] Status of the zone, either UP orDOWN.", - "enum": [ - "DOWN", - "UP" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "supportsPzs": { - "description": "[Output Only] Reserved for future use.", - "type": "boolean" - } - }, - "type": "object" - }, - "ZoneList": { - "description": "Contains a list of zone resources.", - "id": "ZoneList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of Zone resources.", - "items": { - "$ref": "Zone" - }, - "type": "array" - }, - "kind": { - "default": "compute#zoneList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for\nlist requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for\nthe query parameter pageToken in the next list request.\nSubsequent list requests will have their own nextPageToken to\ncontinue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute\nEngine returns NO_RESULTS_ON_PAGE if there\nare no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "QUOTA_INFO_UNAVAILABLE", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed\noperation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as\ndeprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as\nexperimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden.\nDeprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is\nnot of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed\nwhich captures the amount of resources filtered out by\nuser-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the\nnetwork.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an\nipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the\nsame network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite\nthe mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "Quota information is not available to client requests (e.g:\nregions.list).", - "The user attempted to use a resource that requires a TOS they have not\naccepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted\nbecause they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but\nits application does not make a lot of sense, because it allows only\nsingle instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key:\nvalue format. For example:\n\n\"data\": [\n {\n \"key\": \"scope\",\n \"value\": \"zones/us-east1-d\"\n }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being\nreturned. For example, for warnings where there are no results in a list\nrequest for a particular zone, this key might be scope and\nthe key value might be the zone name. Other examples might be a key\nindicating a deprecated resource and a suggested replacement, or a\nwarning about invalid network settings (for example, if an instance\nattempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ZoneSetLabelsRequest": { - "id": "ZoneSetLabelsRequest", - "properties": { - "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by Compute\nEngine and changes after every request to modify or update labels. You must\nalways provide an up-to-date fingerprint hash in order to update or change\nlabels. Make a get() request to the resource to get the latest\nfingerprint.", - "format": "byte", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for this resource.", - "type": "object" - } - }, - "type": "object" - }, - "ZoneSetNestedPolicyRequest": { - "id": "ZoneSetNestedPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backwacd compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - }, - "ZoneSetPolicyRequest": { - "id": "ZoneSetPolicyRequest", - "properties": { - "bindings": { - "description": "Flatten Policy to create a backwacd compatible wire-format.\nDeprecated. Use 'policy' to specify bindings.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "Flatten Policy to create a backward compatible wire-format.\nDeprecated. Use 'policy' to specify the etag.", - "format": "byte", - "type": "string" - }, - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the 'resource'. The size of\nthe policy is limited to a few 10s of KB. An empty policy is in general a\nvalid policy but certain services (like Projects) might reject them." - } - }, - "type": "object" - } - }, - "servicePath": "compute/beta/", - "title": "Compute Engine API", - "version": "beta" -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go deleted file mode 100644 index 3e92aae35225e..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ /dev/null @@ -1,84154 +0,0 @@ -// Copyright 2025 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 compute provides access to the Compute Engine API. -// -// For product documentation, see: https://cloud.google.com/compute/ -// -// # 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/compute/v0.beta" -// ... -// ctx := context.Background() -// computeService, err := compute.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 -// -// By default, all available scopes (see "Constants") are used to authenticate. -// To restrict scopes, use [google.golang.org/api/option.WithScopes]: -// -// computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// computeService, err := compute.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, ...) -// computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package compute // import "google.golang.org/api/compute/v0.beta" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "compute:beta" -const apiName = "compute" -const apiVersion = "beta" -const basePath = "https://compute.googleapis.com/compute/beta/" -const basePathTemplate = "https://compute.UNIVERSE_DOMAIN/compute/beta/" -const mtlsBasePath = "https://compute.mtls.googleapis.com/compute/beta/" - -// 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" - - // View and manage your Google Compute Engine resources - ComputeScope = "https://www.googleapis.com/auth/compute" - - // View your Google Compute Engine resources - ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" - - // Manage your data and permissions in Cloud Storage and see the email address - // for your Google Account - DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" - - // View your data in Google Cloud Storage - DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" - - // Manage your data in Cloud Storage and see the email address of your Google - // Account - DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" -) - -// 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", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_only", - "https://www.googleapis.com/auth/devstorage.read_write", - ) - // 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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.AcceleratorTypes = NewAcceleratorTypesService(s) - s.Addresses = NewAddressesService(s) - s.Advice = NewAdviceService(s) - s.Autoscalers = NewAutoscalersService(s) - s.BackendBuckets = NewBackendBucketsService(s) - s.BackendServices = NewBackendServicesService(s) - s.CrossSiteNetworks = NewCrossSiteNetworksService(s) - s.DiskSettings = NewDiskSettingsService(s) - s.DiskTypes = NewDiskTypesService(s) - s.Disks = NewDisksService(s) - s.ExternalVpnGateways = NewExternalVpnGatewaysService(s) - s.FirewallPolicies = NewFirewallPoliciesService(s) - s.Firewalls = NewFirewallsService(s) - s.ForwardingRules = NewForwardingRulesService(s) - s.FutureReservations = NewFutureReservationsService(s) - s.GlobalAddresses = NewGlobalAddressesService(s) - s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) - s.GlobalNetworkEndpointGroups = NewGlobalNetworkEndpointGroupsService(s) - s.GlobalOperations = NewGlobalOperationsService(s) - s.GlobalOrganizationOperations = NewGlobalOrganizationOperationsService(s) - s.GlobalPublicDelegatedPrefixes = NewGlobalPublicDelegatedPrefixesService(s) - s.GlobalVmExtensionPolicies = NewGlobalVmExtensionPoliciesService(s) - s.HealthChecks = NewHealthChecksService(s) - s.HttpHealthChecks = NewHttpHealthChecksService(s) - s.HttpsHealthChecks = NewHttpsHealthChecksService(s) - s.ImageFamilyViews = NewImageFamilyViewsService(s) - s.Images = NewImagesService(s) - s.InstanceGroupManagerResizeRequests = NewInstanceGroupManagerResizeRequestsService(s) - s.InstanceGroupManagers = NewInstanceGroupManagersService(s) - s.InstanceGroups = NewInstanceGroupsService(s) - s.InstanceSettings = NewInstanceSettingsService(s) - s.InstanceTemplates = NewInstanceTemplatesService(s) - s.Instances = NewInstancesService(s) - s.InstantSnapshots = NewInstantSnapshotsService(s) - s.InterconnectAttachmentGroups = NewInterconnectAttachmentGroupsService(s) - s.InterconnectAttachments = NewInterconnectAttachmentsService(s) - s.InterconnectGroups = NewInterconnectGroupsService(s) - s.InterconnectLocations = NewInterconnectLocationsService(s) - s.InterconnectRemoteLocations = NewInterconnectRemoteLocationsService(s) - s.Interconnects = NewInterconnectsService(s) - s.LicenseCodes = NewLicenseCodesService(s) - s.Licenses = NewLicensesService(s) - s.MachineImages = NewMachineImagesService(s) - s.MachineTypes = NewMachineTypesService(s) - s.NetworkAttachments = NewNetworkAttachmentsService(s) - s.NetworkEdgeSecurityServices = NewNetworkEdgeSecurityServicesService(s) - s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) - s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) - s.NetworkProfiles = NewNetworkProfilesService(s) - s.Networks = NewNetworksService(s) - s.NodeGroups = NewNodeGroupsService(s) - s.NodeTemplates = NewNodeTemplatesService(s) - s.NodeTypes = NewNodeTypesService(s) - s.OrganizationSecurityPolicies = NewOrganizationSecurityPoliciesService(s) - s.PacketMirrorings = NewPacketMirroringsService(s) - s.PreviewFeatures = NewPreviewFeaturesService(s) - s.Projects = NewProjectsService(s) - s.PublicAdvertisedPrefixes = NewPublicAdvertisedPrefixesService(s) - s.PublicDelegatedPrefixes = NewPublicDelegatedPrefixesService(s) - s.RegionAutoscalers = NewRegionAutoscalersService(s) - s.RegionBackendBuckets = NewRegionBackendBucketsService(s) - s.RegionBackendServices = NewRegionBackendServicesService(s) - s.RegionCommitments = NewRegionCommitmentsService(s) - s.RegionCompositeHealthChecks = NewRegionCompositeHealthChecksService(s) - s.RegionDiskSettings = NewRegionDiskSettingsService(s) - s.RegionDiskTypes = NewRegionDiskTypesService(s) - s.RegionDisks = NewRegionDisksService(s) - s.RegionHealthAggregationPolicies = NewRegionHealthAggregationPoliciesService(s) - s.RegionHealthCheckServices = NewRegionHealthCheckServicesService(s) - s.RegionHealthChecks = NewRegionHealthChecksService(s) - s.RegionHealthSources = NewRegionHealthSourcesService(s) - s.RegionInstanceGroupManagerResizeRequests = NewRegionInstanceGroupManagerResizeRequestsService(s) - s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) - s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) - s.RegionInstanceTemplates = NewRegionInstanceTemplatesService(s) - s.RegionInstances = NewRegionInstancesService(s) - s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) - s.RegionMultiMigs = NewRegionMultiMigsService(s) - s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) - s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) - s.RegionNetworkPolicies = NewRegionNetworkPoliciesService(s) - s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) - s.RegionOperations = NewRegionOperationsService(s) - s.RegionSecurityPolicies = NewRegionSecurityPoliciesService(s) - s.RegionSnapshotSettings = NewRegionSnapshotSettingsService(s) - s.RegionSnapshots = NewRegionSnapshotsService(s) - s.RegionSslCertificates = NewRegionSslCertificatesService(s) - s.RegionSslPolicies = NewRegionSslPoliciesService(s) - s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) - s.RegionTargetHttpsProxies = NewRegionTargetHttpsProxiesService(s) - s.RegionTargetTcpProxies = NewRegionTargetTcpProxiesService(s) - s.RegionUrlMaps = NewRegionUrlMapsService(s) - s.RegionZones = NewRegionZonesService(s) - s.Regions = NewRegionsService(s) - s.ReservationBlocks = NewReservationBlocksService(s) - s.ReservationSubBlocks = NewReservationSubBlocksService(s) - s.Reservations = NewReservationsService(s) - s.ResourcePolicies = NewResourcePoliciesService(s) - s.RolloutPlans = NewRolloutPlansService(s) - s.Rollouts = NewRolloutsService(s) - s.Routers = NewRoutersService(s) - s.Routes = NewRoutesService(s) - s.SecurityPolicies = NewSecurityPoliciesService(s) - s.ServiceAttachments = NewServiceAttachmentsService(s) - s.SnapshotSettings = NewSnapshotSettingsService(s) - s.Snapshots = NewSnapshotsService(s) - s.SslCertificates = NewSslCertificatesService(s) - s.SslPolicies = NewSslPoliciesService(s) - s.StoragePoolTypes = NewStoragePoolTypesService(s) - s.StoragePools = NewStoragePoolsService(s) - s.Subnetworks = NewSubnetworksService(s) - s.TargetGrpcProxies = NewTargetGrpcProxiesService(s) - s.TargetHttpProxies = NewTargetHttpProxiesService(s) - s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) - s.TargetInstances = NewTargetInstancesService(s) - s.TargetPools = NewTargetPoolsService(s) - s.TargetSslProxies = NewTargetSslProxiesService(s) - s.TargetTcpProxies = NewTargetTcpProxiesService(s) - s.TargetVpnGateways = NewTargetVpnGatewaysService(s) - s.UrlMaps = NewUrlMapsService(s) - s.VpnGateways = NewVpnGatewaysService(s) - s.VpnTunnels = NewVpnTunnelsService(s) - s.WireGroups = NewWireGroupsService(s) - s.ZoneOperations = NewZoneOperationsService(s) - s.ZoneVmExtensionPolicies = NewZoneVmExtensionPoliciesService(s) - s.Zones = NewZonesService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - AcceleratorTypes *AcceleratorTypesService - - Addresses *AddressesService - - Advice *AdviceService - - Autoscalers *AutoscalersService - - BackendBuckets *BackendBucketsService - - BackendServices *BackendServicesService - - CrossSiteNetworks *CrossSiteNetworksService - - DiskSettings *DiskSettingsService - - DiskTypes *DiskTypesService - - Disks *DisksService - - ExternalVpnGateways *ExternalVpnGatewaysService - - FirewallPolicies *FirewallPoliciesService - - Firewalls *FirewallsService - - ForwardingRules *ForwardingRulesService - - FutureReservations *FutureReservationsService - - GlobalAddresses *GlobalAddressesService - - GlobalForwardingRules *GlobalForwardingRulesService - - GlobalNetworkEndpointGroups *GlobalNetworkEndpointGroupsService - - GlobalOperations *GlobalOperationsService - - GlobalOrganizationOperations *GlobalOrganizationOperationsService - - GlobalPublicDelegatedPrefixes *GlobalPublicDelegatedPrefixesService - - GlobalVmExtensionPolicies *GlobalVmExtensionPoliciesService - - HealthChecks *HealthChecksService - - HttpHealthChecks *HttpHealthChecksService - - HttpsHealthChecks *HttpsHealthChecksService - - ImageFamilyViews *ImageFamilyViewsService - - Images *ImagesService - - InstanceGroupManagerResizeRequests *InstanceGroupManagerResizeRequestsService - - InstanceGroupManagers *InstanceGroupManagersService - - InstanceGroups *InstanceGroupsService - - InstanceSettings *InstanceSettingsService - - InstanceTemplates *InstanceTemplatesService - - Instances *InstancesService - - InstantSnapshots *InstantSnapshotsService - - InterconnectAttachmentGroups *InterconnectAttachmentGroupsService - - InterconnectAttachments *InterconnectAttachmentsService - - InterconnectGroups *InterconnectGroupsService - - InterconnectLocations *InterconnectLocationsService - - InterconnectRemoteLocations *InterconnectRemoteLocationsService - - Interconnects *InterconnectsService - - LicenseCodes *LicenseCodesService - - Licenses *LicensesService - - MachineImages *MachineImagesService - - MachineTypes *MachineTypesService - - NetworkAttachments *NetworkAttachmentsService - - NetworkEdgeSecurityServices *NetworkEdgeSecurityServicesService - - NetworkEndpointGroups *NetworkEndpointGroupsService - - NetworkFirewallPolicies *NetworkFirewallPoliciesService - - NetworkProfiles *NetworkProfilesService - - Networks *NetworksService - - NodeGroups *NodeGroupsService - - NodeTemplates *NodeTemplatesService - - NodeTypes *NodeTypesService - - OrganizationSecurityPolicies *OrganizationSecurityPoliciesService - - PacketMirrorings *PacketMirroringsService - - PreviewFeatures *PreviewFeaturesService - - Projects *ProjectsService - - PublicAdvertisedPrefixes *PublicAdvertisedPrefixesService - - PublicDelegatedPrefixes *PublicDelegatedPrefixesService - - RegionAutoscalers *RegionAutoscalersService - - RegionBackendBuckets *RegionBackendBucketsService - - RegionBackendServices *RegionBackendServicesService - - RegionCommitments *RegionCommitmentsService - - RegionCompositeHealthChecks *RegionCompositeHealthChecksService - - RegionDiskSettings *RegionDiskSettingsService - - RegionDiskTypes *RegionDiskTypesService - - RegionDisks *RegionDisksService - - RegionHealthAggregationPolicies *RegionHealthAggregationPoliciesService - - RegionHealthCheckServices *RegionHealthCheckServicesService - - RegionHealthChecks *RegionHealthChecksService - - RegionHealthSources *RegionHealthSourcesService - - RegionInstanceGroupManagerResizeRequests *RegionInstanceGroupManagerResizeRequestsService - - RegionInstanceGroupManagers *RegionInstanceGroupManagersService - - RegionInstanceGroups *RegionInstanceGroupsService - - RegionInstanceTemplates *RegionInstanceTemplatesService - - RegionInstances *RegionInstancesService - - RegionInstantSnapshots *RegionInstantSnapshotsService - - RegionMultiMigs *RegionMultiMigsService - - RegionNetworkEndpointGroups *RegionNetworkEndpointGroupsService - - RegionNetworkFirewallPolicies *RegionNetworkFirewallPoliciesService - - RegionNetworkPolicies *RegionNetworkPoliciesService - - RegionNotificationEndpoints *RegionNotificationEndpointsService - - RegionOperations *RegionOperationsService - - RegionSecurityPolicies *RegionSecurityPoliciesService - - RegionSnapshotSettings *RegionSnapshotSettingsService - - RegionSnapshots *RegionSnapshotsService - - RegionSslCertificates *RegionSslCertificatesService - - RegionSslPolicies *RegionSslPoliciesService - - RegionTargetHttpProxies *RegionTargetHttpProxiesService - - RegionTargetHttpsProxies *RegionTargetHttpsProxiesService - - RegionTargetTcpProxies *RegionTargetTcpProxiesService - - RegionUrlMaps *RegionUrlMapsService - - RegionZones *RegionZonesService - - Regions *RegionsService - - ReservationBlocks *ReservationBlocksService - - ReservationSubBlocks *ReservationSubBlocksService - - Reservations *ReservationsService - - ResourcePolicies *ResourcePoliciesService - - RolloutPlans *RolloutPlansService - - Rollouts *RolloutsService - - Routers *RoutersService - - Routes *RoutesService - - SecurityPolicies *SecurityPoliciesService - - ServiceAttachments *ServiceAttachmentsService - - SnapshotSettings *SnapshotSettingsService - - Snapshots *SnapshotsService - - SslCertificates *SslCertificatesService - - SslPolicies *SslPoliciesService - - StoragePoolTypes *StoragePoolTypesService - - StoragePools *StoragePoolsService - - Subnetworks *SubnetworksService - - TargetGrpcProxies *TargetGrpcProxiesService - - TargetHttpProxies *TargetHttpProxiesService - - TargetHttpsProxies *TargetHttpsProxiesService - - TargetInstances *TargetInstancesService - - TargetPools *TargetPoolsService - - TargetSslProxies *TargetSslProxiesService - - TargetTcpProxies *TargetTcpProxiesService - - TargetVpnGateways *TargetVpnGatewaysService - - UrlMaps *UrlMapsService - - VpnGateways *VpnGatewaysService - - VpnTunnels *VpnTunnelsService - - WireGroups *WireGroupsService - - ZoneOperations *ZoneOperationsService - - ZoneVmExtensionPolicies *ZoneVmExtensionPoliciesService - - Zones *ZonesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { - rs := &AcceleratorTypesService{s: s} - return rs -} - -type AcceleratorTypesService struct { - s *Service -} - -func NewAddressesService(s *Service) *AddressesService { - rs := &AddressesService{s: s} - return rs -} - -type AddressesService struct { - s *Service -} - -func NewAdviceService(s *Service) *AdviceService { - rs := &AdviceService{s: s} - return rs -} - -type AdviceService struct { - s *Service -} - -func NewAutoscalersService(s *Service) *AutoscalersService { - rs := &AutoscalersService{s: s} - return rs -} - -type AutoscalersService struct { - s *Service -} - -func NewBackendBucketsService(s *Service) *BackendBucketsService { - rs := &BackendBucketsService{s: s} - return rs -} - -type BackendBucketsService struct { - s *Service -} - -func NewBackendServicesService(s *Service) *BackendServicesService { - rs := &BackendServicesService{s: s} - return rs -} - -type BackendServicesService struct { - s *Service -} - -func NewCrossSiteNetworksService(s *Service) *CrossSiteNetworksService { - rs := &CrossSiteNetworksService{s: s} - return rs -} - -type CrossSiteNetworksService struct { - s *Service -} - -func NewDiskSettingsService(s *Service) *DiskSettingsService { - rs := &DiskSettingsService{s: s} - return rs -} - -type DiskSettingsService struct { - s *Service -} - -func NewDiskTypesService(s *Service) *DiskTypesService { - rs := &DiskTypesService{s: s} - return rs -} - -type DiskTypesService struct { - s *Service -} - -func NewDisksService(s *Service) *DisksService { - rs := &DisksService{s: s} - return rs -} - -type DisksService struct { - s *Service -} - -func NewExternalVpnGatewaysService(s *Service) *ExternalVpnGatewaysService { - rs := &ExternalVpnGatewaysService{s: s} - return rs -} - -type ExternalVpnGatewaysService struct { - s *Service -} - -func NewFirewallPoliciesService(s *Service) *FirewallPoliciesService { - rs := &FirewallPoliciesService{s: s} - return rs -} - -type FirewallPoliciesService struct { - s *Service -} - -func NewFirewallsService(s *Service) *FirewallsService { - rs := &FirewallsService{s: s} - return rs -} - -type FirewallsService struct { - s *Service -} - -func NewForwardingRulesService(s *Service) *ForwardingRulesService { - rs := &ForwardingRulesService{s: s} - return rs -} - -type ForwardingRulesService struct { - s *Service -} - -func NewFutureReservationsService(s *Service) *FutureReservationsService { - rs := &FutureReservationsService{s: s} - return rs -} - -type FutureReservationsService struct { - s *Service -} - -func NewGlobalAddressesService(s *Service) *GlobalAddressesService { - rs := &GlobalAddressesService{s: s} - return rs -} - -type GlobalAddressesService struct { - s *Service -} - -func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { - rs := &GlobalForwardingRulesService{s: s} - return rs -} - -type GlobalForwardingRulesService struct { - s *Service -} - -func NewGlobalNetworkEndpointGroupsService(s *Service) *GlobalNetworkEndpointGroupsService { - rs := &GlobalNetworkEndpointGroupsService{s: s} - return rs -} - -type GlobalNetworkEndpointGroupsService struct { - s *Service -} - -func NewGlobalOperationsService(s *Service) *GlobalOperationsService { - rs := &GlobalOperationsService{s: s} - return rs -} - -type GlobalOperationsService struct { - s *Service -} - -func NewGlobalOrganizationOperationsService(s *Service) *GlobalOrganizationOperationsService { - rs := &GlobalOrganizationOperationsService{s: s} - return rs -} - -type GlobalOrganizationOperationsService struct { - s *Service -} - -func NewGlobalPublicDelegatedPrefixesService(s *Service) *GlobalPublicDelegatedPrefixesService { - rs := &GlobalPublicDelegatedPrefixesService{s: s} - return rs -} - -type GlobalPublicDelegatedPrefixesService struct { - s *Service -} - -func NewGlobalVmExtensionPoliciesService(s *Service) *GlobalVmExtensionPoliciesService { - rs := &GlobalVmExtensionPoliciesService{s: s} - return rs -} - -type GlobalVmExtensionPoliciesService struct { - s *Service -} - -func NewHealthChecksService(s *Service) *HealthChecksService { - rs := &HealthChecksService{s: s} - return rs -} - -type HealthChecksService struct { - s *Service -} - -func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { - rs := &HttpHealthChecksService{s: s} - return rs -} - -type HttpHealthChecksService struct { - s *Service -} - -func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService { - rs := &HttpsHealthChecksService{s: s} - return rs -} - -type HttpsHealthChecksService struct { - s *Service -} - -func NewImageFamilyViewsService(s *Service) *ImageFamilyViewsService { - rs := &ImageFamilyViewsService{s: s} - return rs -} - -type ImageFamilyViewsService struct { - s *Service -} - -func NewImagesService(s *Service) *ImagesService { - rs := &ImagesService{s: s} - return rs -} - -type ImagesService struct { - s *Service -} - -func NewInstanceGroupManagerResizeRequestsService(s *Service) *InstanceGroupManagerResizeRequestsService { - rs := &InstanceGroupManagerResizeRequestsService{s: s} - return rs -} - -type InstanceGroupManagerResizeRequestsService struct { - s *Service -} - -func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService { - rs := &InstanceGroupManagersService{s: s} - return rs -} - -type InstanceGroupManagersService struct { - s *Service -} - -func NewInstanceGroupsService(s *Service) *InstanceGroupsService { - rs := &InstanceGroupsService{s: s} - return rs -} - -type InstanceGroupsService struct { - s *Service -} - -func NewInstanceSettingsService(s *Service) *InstanceSettingsService { - rs := &InstanceSettingsService{s: s} - return rs -} - -type InstanceSettingsService struct { - s *Service -} - -func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { - rs := &InstanceTemplatesService{s: s} - return rs -} - -type InstanceTemplatesService struct { - s *Service -} - -func NewInstancesService(s *Service) *InstancesService { - rs := &InstancesService{s: s} - return rs -} - -type InstancesService struct { - s *Service -} - -func NewInstantSnapshotsService(s *Service) *InstantSnapshotsService { - rs := &InstantSnapshotsService{s: s} - return rs -} - -type InstantSnapshotsService struct { - s *Service -} - -func NewInterconnectAttachmentGroupsService(s *Service) *InterconnectAttachmentGroupsService { - rs := &InterconnectAttachmentGroupsService{s: s} - return rs -} - -type InterconnectAttachmentGroupsService struct { - s *Service -} - -func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService { - rs := &InterconnectAttachmentsService{s: s} - return rs -} - -type InterconnectAttachmentsService struct { - s *Service -} - -func NewInterconnectGroupsService(s *Service) *InterconnectGroupsService { - rs := &InterconnectGroupsService{s: s} - return rs -} - -type InterconnectGroupsService struct { - s *Service -} - -func NewInterconnectLocationsService(s *Service) *InterconnectLocationsService { - rs := &InterconnectLocationsService{s: s} - return rs -} - -type InterconnectLocationsService struct { - s *Service -} - -func NewInterconnectRemoteLocationsService(s *Service) *InterconnectRemoteLocationsService { - rs := &InterconnectRemoteLocationsService{s: s} - return rs -} - -type InterconnectRemoteLocationsService struct { - s *Service -} - -func NewInterconnectsService(s *Service) *InterconnectsService { - rs := &InterconnectsService{s: s} - return rs -} - -type InterconnectsService struct { - s *Service -} - -func NewLicenseCodesService(s *Service) *LicenseCodesService { - rs := &LicenseCodesService{s: s} - return rs -} - -type LicenseCodesService struct { - s *Service -} - -func NewLicensesService(s *Service) *LicensesService { - rs := &LicensesService{s: s} - return rs -} - -type LicensesService struct { - s *Service -} - -func NewMachineImagesService(s *Service) *MachineImagesService { - rs := &MachineImagesService{s: s} - return rs -} - -type MachineImagesService struct { - s *Service -} - -func NewMachineTypesService(s *Service) *MachineTypesService { - rs := &MachineTypesService{s: s} - return rs -} - -type MachineTypesService struct { - s *Service -} - -func NewNetworkAttachmentsService(s *Service) *NetworkAttachmentsService { - rs := &NetworkAttachmentsService{s: s} - return rs -} - -type NetworkAttachmentsService struct { - s *Service -} - -func NewNetworkEdgeSecurityServicesService(s *Service) *NetworkEdgeSecurityServicesService { - rs := &NetworkEdgeSecurityServicesService{s: s} - return rs -} - -type NetworkEdgeSecurityServicesService struct { - s *Service -} - -func NewNetworkEndpointGroupsService(s *Service) *NetworkEndpointGroupsService { - rs := &NetworkEndpointGroupsService{s: s} - return rs -} - -type NetworkEndpointGroupsService struct { - s *Service -} - -func NewNetworkFirewallPoliciesService(s *Service) *NetworkFirewallPoliciesService { - rs := &NetworkFirewallPoliciesService{s: s} - return rs -} - -type NetworkFirewallPoliciesService struct { - s *Service -} - -func NewNetworkProfilesService(s *Service) *NetworkProfilesService { - rs := &NetworkProfilesService{s: s} - return rs -} - -type NetworkProfilesService struct { - s *Service -} - -func NewNetworksService(s *Service) *NetworksService { - rs := &NetworksService{s: s} - return rs -} - -type NetworksService struct { - s *Service -} - -func NewNodeGroupsService(s *Service) *NodeGroupsService { - rs := &NodeGroupsService{s: s} - return rs -} - -type NodeGroupsService struct { - s *Service -} - -func NewNodeTemplatesService(s *Service) *NodeTemplatesService { - rs := &NodeTemplatesService{s: s} - return rs -} - -type NodeTemplatesService struct { - s *Service -} - -func NewNodeTypesService(s *Service) *NodeTypesService { - rs := &NodeTypesService{s: s} - return rs -} - -type NodeTypesService struct { - s *Service -} - -func NewOrganizationSecurityPoliciesService(s *Service) *OrganizationSecurityPoliciesService { - rs := &OrganizationSecurityPoliciesService{s: s} - return rs -} - -type OrganizationSecurityPoliciesService struct { - s *Service -} - -func NewPacketMirroringsService(s *Service) *PacketMirroringsService { - rs := &PacketMirroringsService{s: s} - return rs -} - -type PacketMirroringsService struct { - s *Service -} - -func NewPreviewFeaturesService(s *Service) *PreviewFeaturesService { - rs := &PreviewFeaturesService{s: s} - return rs -} - -type PreviewFeaturesService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewPublicAdvertisedPrefixesService(s *Service) *PublicAdvertisedPrefixesService { - rs := &PublicAdvertisedPrefixesService{s: s} - return rs -} - -type PublicAdvertisedPrefixesService struct { - s *Service -} - -func NewPublicDelegatedPrefixesService(s *Service) *PublicDelegatedPrefixesService { - rs := &PublicDelegatedPrefixesService{s: s} - return rs -} - -type PublicDelegatedPrefixesService struct { - s *Service -} - -func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { - rs := &RegionAutoscalersService{s: s} - return rs -} - -type RegionAutoscalersService struct { - s *Service -} - -func NewRegionBackendBucketsService(s *Service) *RegionBackendBucketsService { - rs := &RegionBackendBucketsService{s: s} - return rs -} - -type RegionBackendBucketsService struct { - s *Service -} - -func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService { - rs := &RegionBackendServicesService{s: s} - return rs -} - -type RegionBackendServicesService struct { - s *Service -} - -func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { - rs := &RegionCommitmentsService{s: s} - return rs -} - -type RegionCommitmentsService struct { - s *Service -} - -func NewRegionCompositeHealthChecksService(s *Service) *RegionCompositeHealthChecksService { - rs := &RegionCompositeHealthChecksService{s: s} - return rs -} - -type RegionCompositeHealthChecksService struct { - s *Service -} - -func NewRegionDiskSettingsService(s *Service) *RegionDiskSettingsService { - rs := &RegionDiskSettingsService{s: s} - return rs -} - -type RegionDiskSettingsService struct { - s *Service -} - -func NewRegionDiskTypesService(s *Service) *RegionDiskTypesService { - rs := &RegionDiskTypesService{s: s} - return rs -} - -type RegionDiskTypesService struct { - s *Service -} - -func NewRegionDisksService(s *Service) *RegionDisksService { - rs := &RegionDisksService{s: s} - return rs -} - -type RegionDisksService struct { - s *Service -} - -func NewRegionHealthAggregationPoliciesService(s *Service) *RegionHealthAggregationPoliciesService { - rs := &RegionHealthAggregationPoliciesService{s: s} - return rs -} - -type RegionHealthAggregationPoliciesService struct { - s *Service -} - -func NewRegionHealthCheckServicesService(s *Service) *RegionHealthCheckServicesService { - rs := &RegionHealthCheckServicesService{s: s} - return rs -} - -type RegionHealthCheckServicesService struct { - s *Service -} - -func NewRegionHealthChecksService(s *Service) *RegionHealthChecksService { - rs := &RegionHealthChecksService{s: s} - return rs -} - -type RegionHealthChecksService struct { - s *Service -} - -func NewRegionHealthSourcesService(s *Service) *RegionHealthSourcesService { - rs := &RegionHealthSourcesService{s: s} - return rs -} - -type RegionHealthSourcesService struct { - s *Service -} - -func NewRegionInstanceGroupManagerResizeRequestsService(s *Service) *RegionInstanceGroupManagerResizeRequestsService { - rs := &RegionInstanceGroupManagerResizeRequestsService{s: s} - return rs -} - -type RegionInstanceGroupManagerResizeRequestsService struct { - s *Service -} - -func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { - rs := &RegionInstanceGroupManagersService{s: s} - return rs -} - -type RegionInstanceGroupManagersService struct { - s *Service -} - -func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService { - rs := &RegionInstanceGroupsService{s: s} - return rs -} - -type RegionInstanceGroupsService struct { - s *Service -} - -func NewRegionInstanceTemplatesService(s *Service) *RegionInstanceTemplatesService { - rs := &RegionInstanceTemplatesService{s: s} - return rs -} - -type RegionInstanceTemplatesService struct { - s *Service -} - -func NewRegionInstancesService(s *Service) *RegionInstancesService { - rs := &RegionInstancesService{s: s} - return rs -} - -type RegionInstancesService struct { - s *Service -} - -func NewRegionInstantSnapshotsService(s *Service) *RegionInstantSnapshotsService { - rs := &RegionInstantSnapshotsService{s: s} - return rs -} - -type RegionInstantSnapshotsService struct { - s *Service -} - -func NewRegionMultiMigsService(s *Service) *RegionMultiMigsService { - rs := &RegionMultiMigsService{s: s} - return rs -} - -type RegionMultiMigsService struct { - s *Service -} - -func NewRegionNetworkEndpointGroupsService(s *Service) *RegionNetworkEndpointGroupsService { - rs := &RegionNetworkEndpointGroupsService{s: s} - return rs -} - -type RegionNetworkEndpointGroupsService struct { - s *Service -} - -func NewRegionNetworkFirewallPoliciesService(s *Service) *RegionNetworkFirewallPoliciesService { - rs := &RegionNetworkFirewallPoliciesService{s: s} - return rs -} - -type RegionNetworkFirewallPoliciesService struct { - s *Service -} - -func NewRegionNetworkPoliciesService(s *Service) *RegionNetworkPoliciesService { - rs := &RegionNetworkPoliciesService{s: s} - return rs -} - -type RegionNetworkPoliciesService struct { - s *Service -} - -func NewRegionNotificationEndpointsService(s *Service) *RegionNotificationEndpointsService { - rs := &RegionNotificationEndpointsService{s: s} - return rs -} - -type RegionNotificationEndpointsService struct { - s *Service -} - -func NewRegionOperationsService(s *Service) *RegionOperationsService { - rs := &RegionOperationsService{s: s} - return rs -} - -type RegionOperationsService struct { - s *Service -} - -func NewRegionSecurityPoliciesService(s *Service) *RegionSecurityPoliciesService { - rs := &RegionSecurityPoliciesService{s: s} - return rs -} - -type RegionSecurityPoliciesService struct { - s *Service -} - -func NewRegionSnapshotSettingsService(s *Service) *RegionSnapshotSettingsService { - rs := &RegionSnapshotSettingsService{s: s} - return rs -} - -type RegionSnapshotSettingsService struct { - s *Service -} - -func NewRegionSnapshotsService(s *Service) *RegionSnapshotsService { - rs := &RegionSnapshotsService{s: s} - return rs -} - -type RegionSnapshotsService struct { - s *Service -} - -func NewRegionSslCertificatesService(s *Service) *RegionSslCertificatesService { - rs := &RegionSslCertificatesService{s: s} - return rs -} - -type RegionSslCertificatesService struct { - s *Service -} - -func NewRegionSslPoliciesService(s *Service) *RegionSslPoliciesService { - rs := &RegionSslPoliciesService{s: s} - return rs -} - -type RegionSslPoliciesService struct { - s *Service -} - -func NewRegionTargetHttpProxiesService(s *Service) *RegionTargetHttpProxiesService { - rs := &RegionTargetHttpProxiesService{s: s} - return rs -} - -type RegionTargetHttpProxiesService struct { - s *Service -} - -func NewRegionTargetHttpsProxiesService(s *Service) *RegionTargetHttpsProxiesService { - rs := &RegionTargetHttpsProxiesService{s: s} - return rs -} - -type RegionTargetHttpsProxiesService struct { - s *Service -} - -func NewRegionTargetTcpProxiesService(s *Service) *RegionTargetTcpProxiesService { - rs := &RegionTargetTcpProxiesService{s: s} - return rs -} - -type RegionTargetTcpProxiesService struct { - s *Service -} - -func NewRegionUrlMapsService(s *Service) *RegionUrlMapsService { - rs := &RegionUrlMapsService{s: s} - return rs -} - -type RegionUrlMapsService struct { - s *Service -} - -func NewRegionZonesService(s *Service) *RegionZonesService { - rs := &RegionZonesService{s: s} - return rs -} - -type RegionZonesService struct { - s *Service -} - -func NewRegionsService(s *Service) *RegionsService { - rs := &RegionsService{s: s} - return rs -} - -type RegionsService struct { - s *Service -} - -func NewReservationBlocksService(s *Service) *ReservationBlocksService { - rs := &ReservationBlocksService{s: s} - return rs -} - -type ReservationBlocksService struct { - s *Service -} - -func NewReservationSubBlocksService(s *Service) *ReservationSubBlocksService { - rs := &ReservationSubBlocksService{s: s} - return rs -} - -type ReservationSubBlocksService struct { - s *Service -} - -func NewReservationsService(s *Service) *ReservationsService { - rs := &ReservationsService{s: s} - return rs -} - -type ReservationsService struct { - s *Service -} - -func NewResourcePoliciesService(s *Service) *ResourcePoliciesService { - rs := &ResourcePoliciesService{s: s} - return rs -} - -type ResourcePoliciesService struct { - s *Service -} - -func NewRolloutPlansService(s *Service) *RolloutPlansService { - rs := &RolloutPlansService{s: s} - return rs -} - -type RolloutPlansService struct { - s *Service -} - -func NewRolloutsService(s *Service) *RolloutsService { - rs := &RolloutsService{s: s} - return rs -} - -type RolloutsService struct { - s *Service -} - -func NewRoutersService(s *Service) *RoutersService { - rs := &RoutersService{s: s} - return rs -} - -type RoutersService struct { - s *Service -} - -func NewRoutesService(s *Service) *RoutesService { - rs := &RoutesService{s: s} - return rs -} - -type RoutesService struct { - s *Service -} - -func NewSecurityPoliciesService(s *Service) *SecurityPoliciesService { - rs := &SecurityPoliciesService{s: s} - return rs -} - -type SecurityPoliciesService struct { - s *Service -} - -func NewServiceAttachmentsService(s *Service) *ServiceAttachmentsService { - rs := &ServiceAttachmentsService{s: s} - return rs -} - -type ServiceAttachmentsService struct { - s *Service -} - -func NewSnapshotSettingsService(s *Service) *SnapshotSettingsService { - rs := &SnapshotSettingsService{s: s} - return rs -} - -type SnapshotSettingsService struct { - s *Service -} - -func NewSnapshotsService(s *Service) *SnapshotsService { - rs := &SnapshotsService{s: s} - return rs -} - -type SnapshotsService struct { - s *Service -} - -func NewSslCertificatesService(s *Service) *SslCertificatesService { - rs := &SslCertificatesService{s: s} - return rs -} - -type SslCertificatesService struct { - s *Service -} - -func NewSslPoliciesService(s *Service) *SslPoliciesService { - rs := &SslPoliciesService{s: s} - return rs -} - -type SslPoliciesService struct { - s *Service -} - -func NewStoragePoolTypesService(s *Service) *StoragePoolTypesService { - rs := &StoragePoolTypesService{s: s} - return rs -} - -type StoragePoolTypesService struct { - s *Service -} - -func NewStoragePoolsService(s *Service) *StoragePoolsService { - rs := &StoragePoolsService{s: s} - return rs -} - -type StoragePoolsService struct { - s *Service -} - -func NewSubnetworksService(s *Service) *SubnetworksService { - rs := &SubnetworksService{s: s} - return rs -} - -type SubnetworksService struct { - s *Service -} - -func NewTargetGrpcProxiesService(s *Service) *TargetGrpcProxiesService { - rs := &TargetGrpcProxiesService{s: s} - return rs -} - -type TargetGrpcProxiesService struct { - s *Service -} - -func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { - rs := &TargetHttpProxiesService{s: s} - return rs -} - -type TargetHttpProxiesService struct { - s *Service -} - -func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService { - rs := &TargetHttpsProxiesService{s: s} - return rs -} - -type TargetHttpsProxiesService struct { - s *Service -} - -func NewTargetInstancesService(s *Service) *TargetInstancesService { - rs := &TargetInstancesService{s: s} - return rs -} - -type TargetInstancesService struct { - s *Service -} - -func NewTargetPoolsService(s *Service) *TargetPoolsService { - rs := &TargetPoolsService{s: s} - return rs -} - -type TargetPoolsService struct { - s *Service -} - -func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService { - rs := &TargetSslProxiesService{s: s} - return rs -} - -type TargetSslProxiesService struct { - s *Service -} - -func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService { - rs := &TargetTcpProxiesService{s: s} - return rs -} - -type TargetTcpProxiesService struct { - s *Service -} - -func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { - rs := &TargetVpnGatewaysService{s: s} - return rs -} - -type TargetVpnGatewaysService struct { - s *Service -} - -func NewUrlMapsService(s *Service) *UrlMapsService { - rs := &UrlMapsService{s: s} - return rs -} - -type UrlMapsService struct { - s *Service -} - -func NewVpnGatewaysService(s *Service) *VpnGatewaysService { - rs := &VpnGatewaysService{s: s} - return rs -} - -type VpnGatewaysService struct { - s *Service -} - -func NewVpnTunnelsService(s *Service) *VpnTunnelsService { - rs := &VpnTunnelsService{s: s} - return rs -} - -type VpnTunnelsService struct { - s *Service -} - -func NewWireGroupsService(s *Service) *WireGroupsService { - rs := &WireGroupsService{s: s} - return rs -} - -type WireGroupsService struct { - s *Service -} - -func NewZoneOperationsService(s *Service) *ZoneOperationsService { - rs := &ZoneOperationsService{s: s} - return rs -} - -type ZoneOperationsService struct { - s *Service -} - -func NewZoneVmExtensionPoliciesService(s *Service) *ZoneVmExtensionPoliciesService { - rs := &ZoneVmExtensionPoliciesService{s: s} - return rs -} - -type ZoneVmExtensionPoliciesService struct { - s *Service -} - -func NewZonesService(s *Service) *ZonesService { - rs := &ZonesService{s: s} - return rs -} - -type ZonesService struct { - s *Service -} - -// AWSV4Signature: Contains the configurations necessary to generate a -// signature for access to -// private storage buckets that support Signature Version 4 for -// authentication. -// The service name for generating the authentication header will always -// default -// to 's3'. -type AWSV4Signature struct { - // AccessKey: The access key used for s3 bucket authentication. Required for - // updating or - // creating a backend that uses AWS v4 signature authentication, but will - // not - // be returned as part of the configuration when queried with a REST API - // GET - // request. - // - // @InputOnly - AccessKey string `json:"accessKey,omitempty"` - // AccessKeyId: The identifier of an access key used for s3 bucket - // authentication. - AccessKeyId string `json:"accessKeyId,omitempty"` - // AccessKeyVersion: The optional version identifier for the access key. You - // can use this to - // keep track of different iterations of your access key. - AccessKeyVersion string `json:"accessKeyVersion,omitempty"` - // OriginRegion: The name of the cloud region of your origin. This is a - // free-form field with - // the name of the region your cloud uses to host your origin. For - // example, - // "us-east-1" for AWS or "us-ashburn-1" for OCI. - OriginRegion string `json:"originRegion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessKey") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AWSV4Signature) MarshalJSON() ([]byte, error) { - type NoMethod AWSV4Signature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorConfig: A specification of the type and number of accelerator -// cards attached to the -// instance. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the guest accelerator cards exposed to this - // instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - // AcceleratorType: Full or partial URL of the accelerator type resource to - // attach to this - // instance. For - // example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla - // -p100 - // If you are creating an instance template, specify only the - // accelerator name. - // See GPUs on Compute Engine - // for a full list of accelerator types. - AcceleratorType string `json:"acceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorConfig) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfo: Info for accelerator topologies within a densely -// packed reservation. -type AcceleratorTopologiesInfo struct { - // AcceleratorTopologyInfos: Info for each accelerator topology. - AcceleratorTopologyInfos []*AcceleratorTopologiesInfoAcceleratorTopologyInfo `json:"acceleratorTopologyInfos,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologyInfos") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologyInfos") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfo) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfoAcceleratorTopologyInfo: Info for a slice of a -// given topology. -type AcceleratorTopologiesInfoAcceleratorTopologyInfo struct { - // AcceleratorTopology: The accelerator topology. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // InfoPerTopologyStates: Info for each topology state. - InfoPerTopologyStates []*AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState `json:"infoPerTopologyStates,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfoAcceleratorTopologyInfo) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfoAcceleratorTopologyInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState: Info -// for each topology state. -type AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState struct { - // Count: The number of accelerator topologies in this state. - Count int64 `json:"count,omitempty"` - // State: The state of the accelerator topology. - // - // Possible values: - // "AVAILABLE" - The accelerator topology is available. - // "RUNNING" - The accelerator topology is running. - // "TOPOLOGY_STATE_UNSPECIFIED" - The state of the topology is unspecified. - // "UNHEALTHY" - The accelerator topology is unhealthy. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorType: Represents an Accelerator Type resource. -// -// Google Cloud Platform provides graphics processing units (accelerators) -// that -// you can add to VM instances to improve or accelerate performance when -// working -// with intensive workloads. For more information, readGPUs on Compute Engine. -type AcceleratorType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // accelerator type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#acceleratorType - // for accelerator types. - Kind string `json:"kind,omitempty"` - // MaximumCardsPerInstance: [Output Only] Maximum number of accelerator cards - // allowed per instance. - MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined, fully qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // Zone: [Output Only] The name of the zone where the accelerator type - // resides, - // such as us-central1-a. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorType) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AcceleratorTypesScopedList resources. - Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#acceleratorTypeAggregatedList for aggregated lists - // of - // accelerator types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AcceleratorTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type AcceleratorTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeList: Contains a list of accelerator types. -type AcceleratorTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AcceleratorType resources. - Items []*AcceleratorType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#acceleratorTypeList for - // lists of accelerator types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AcceleratorTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypeListWarning: [Output Only] Informational warning message. -type AcceleratorTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedList struct { - // AcceleratorTypes: [Output Only] A list of accelerator types contained in - // this scope. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // accelerator - // types list is empty. - Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AcceleratorTypesScopedListWarning: [Output Only] An informational warning -// that appears when the accelerator -// types list is empty. -type AcceleratorTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AcceleratorTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AccessConfig: An access configuration attached to an instance's network -// interface. -// Only one access config per instance is supported. -type AccessConfig struct { - // ExternalIpv6: Applies to ipv6AccessConfigs only. - // The first IPv6 address of the external IPv6 range associated - // with this instance, prefix length is stored inexternalIpv6PrefixLength in - // ipv6AccessConfig. To - // use a static external IP address, it must be unused and in the same - // region - // as the instance's zone. If not specified, Google Cloud will - // automatically - // assign an external IPv6 address from the instance's subnetwork. - ExternalIpv6 string `json:"externalIpv6,omitempty"` - // ExternalIpv6PrefixLength: Applies to ipv6AccessConfigs only. The prefix - // length of the - // external IPv6 range. - ExternalIpv6PrefixLength int64 `json:"externalIpv6PrefixLength,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#accessConfig for - // access configs. - Kind string `json:"kind,omitempty"` - // Name: The name of this access configuration. In accessConfigs - // (IPv4), the default and recommended name is External NAT, but - // you can use any arbitrary string, such as My external IP orNetwork Access. - // In ipv6AccessConfigs, the - // recommend name is External IPv6. - Name string `json:"name,omitempty"` - // NatIP: Applies to accessConfigs (IPv4) only. Anexternal IP - // address associated with this instance. Specify an unused static - // external IP address available to the project or leave this field - // undefined - // to use an IP from a shared ephemeral IP address pool. If you specify - // a - // static external IP address, it must live in the same region as the zone - // of - // the instance. - NatIP string `json:"natIP,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring this - // access - // configuration and can only take the following values: PREMIUM,STANDARD. - // - // If an AccessConfig is specified without a valid external IP address, - // an - // ephemeral IP will be created with this networkTier. - // - // If an AccessConfig with a valid external IP address is specified, it - // must - // match that of the networkTier associated with the Address resource - // owning - // that IP. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // PublicPtrDomainName: The DNS domain name for the public PTR record. - // - // You can set this field only if the `setPublicPtr` field is enabled - // inaccessConfig. If this field is unspecified inipv6AccessConfig, a default - // PTR record will be created for - // first IP in associated external IPv6 range. - PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` - // SecurityPolicy: The resource URL for the security policy associated with - // this access - // config. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be created - // to map the - // external IP address of the instance to a DNS domain name. - // - // This field is not used in ipv6AccessConfig. A default PTR - // record will be created if the VM has external IPv6 range associated. - SetPublicPtr bool `json:"setPublicPtr,omitempty"` - // Type: The type of configuration. In accessConfigs (IPv4), the - // default and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default - // and only option isDIRECT_IPV6. - // - // Possible values: - // "DIRECT_IPV6" - // "ONE_TO_ONE_NAT" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIpv6") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AccessConfig) MarshalJSON() ([]byte, error) { - type NoMethod AccessConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Address: Represents an IP Address resource. -// -// Google Compute Engine has two IP Address resources: -// -// * Global (external and -// internal) -// (https://cloud.google.com/compute/docs/reference/rest/beta/globalAddresses) -// * Regional (external and -// internal) -// (https://cloud.google.com/compute/docs/reference/rest/beta/addresses) -// -// For more information, see -// Reserving a static external IP address. -type Address struct { - // Address: The static IP address represented by this resource. - Address string `json:"address,omitempty"` - // AddressType: The type of address to reserve, either INTERNAL orEXTERNAL. If - // unspecified, defaults to EXTERNAL. - // - // Possible values: - // "EXTERNAL" - A publicly visible external IP address. - // "INTERNAL" - A private network IP address, for use with an Instance or - // Internal Load - // Balancer forwarding rule. - // "UNSPECIFIED_TYPE" - AddressType string `json:"addressType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpCollection: Reference to the source of external IPv4 addresses, - // like a PublicDelegatedPrefix (PDP) for BYOIP. - // The PDP must support enhanced IPv4 allocations. - // - // Use one of the following formats to specify a PDP when reserving an - // external IPv4 address using BYOIP. - // - // - - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/pub - // licDelegatedPrefixes/pdp-name - // - - // Partial URL, as in - // - // - // - - // projects/projectId/regions/region/publicDelegatedPrefixes/pdp-name - // - regions/region/publicDelegatedPrefixes/pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // IpVersion: The IP version that will be used by this address. Valid options - // areIPV4 or IPV6. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - // Ipv6EndpointType: The endpoint type of this address, which should be VM - // or NETLB. This is used for deciding which type of endpoint - // this address can be used after the external IPv6 address reservation. - // - // Possible values: - // "NETLB" - Reserved IPv6 address can be used on network load balancer. - // "VM" - Reserved IPv6 address can be used on VM. - Ipv6EndpointType string `json:"ipv6EndpointType,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#address - // for - // addresses. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // Address, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an Address. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character - // must be a lowercase letter, and all following characters (except for - // the - // last character) must be a dash, lowercase letter, or digit. The - // last - // character must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: The URL of the network in which to reserve the address. This field - // can - // only be used with INTERNAL type with theVPC_PEERING purpose. - Network string `json:"network,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring this - // address and - // can only take the following values: PREMIUM orSTANDARD. Internal IP - // addresses are always Premium Tier; - // global external IP addresses are always Premium Tier; regional external - // IP - // addresses can be either Standard or Premium Tier. - // - // If this field is not specified, it is assumed to be PREMIUM. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // PrefixLength: The prefix length if the resource represents an IP range. - PrefixLength int64 `json:"prefixLength,omitempty"` - // Purpose: The purpose of this resource, which can be one of the following - // values: - // - // - // - GCE_ENDPOINT for addresses that are used by VM - // instances, alias IP ranges, load balancers, and similar resources. - // - DNS_RESOLVER for a DNS resolver address in a subnetwork - // for a Cloud DNS inbound - // forwarder IP addresses (regional internal IP address in a subnet of - // a VPC network) - // - VPC_PEERING for global internal IP addresses used for - // - // private services access allocated ranges. - // - NAT_AUTO for the regional external IP addresses used by - // Cloud NAT when allocating addresses using - // - // automatic NAT IP address allocation. - // - IPSEC_INTERCONNECT for addresses created from a private - // IP range that are reserved for a VLAN attachment in an - // *HA VPN over Cloud Interconnect* configuration. These addresses - // are regional resources. - // - `SHARED_LOADBALANCER_VIP` for an internal IP address that is - // assigned - // to multiple internal forwarding rules. - // - `PRIVATE_SERVICE_CONNECT` for a private network address that is - // used to configure Private Service Connect. Only global internal - // addresses - // can use this purpose. - // - // Possible values: - // "DNS_RESOLVER" - DNS resolver address in the subnetwork. - // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. - // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for - // the VLAN attachment - // that is used in HA VPN over Cloud Interconnect. This regional - // internal IP address range must not overlap with any IP address range - // of subnet/route in the VPC network and its peering networks. After the - // VLAN attachment is created with the reserved IP address range, when - // creating a new VPN gateway, its interface IP address is allocated - // from the associated VLAN attachment’s IP address range. - // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. - // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used - // to configure Private - // Service Connect. This purpose can be specified only forGLOBAL addresses of - // Type INTERNAL - // "SERVERLESS" - A regional internal IP address range reserved for - // Serverless. - // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be - // shared by multiple Internal - // Load Balancer forwarding rules. - // "VPC_PEERING" - IP range for peer networks. - Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] The URL of the region where a regional address - // resides. - // For regional addresses, you must specify the region as a path parameter - // in - // the HTTP request URL. *This field is not applicable to global - // addresses.* - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the address, which can be one - // ofRESERVING, RESERVED, or IN_USE. - // An address that is RESERVING is currently in the process of - // being reserved. A RESERVED address is currently reserved and - // available to use. An IN_USE address is currently being used - // by another resource and is not available. - // - // Possible values: - // "IN_USE" - Address is being used by another resource and is not available. - // "RESERVED" - Address is reserved and available to use. - // "RESERVING" - Address is being reserved. - Status string `json:"status,omitempty"` - // Subnetwork: The URL of the subnetwork in which to reserve the address. If an - // IP address - // is specified, it must be within the subnetwork's IP range. This field - // can - // only be used with INTERNAL type with aGCE_ENDPOINT or DNS_RESOLVER purpose. - Subnetwork string `json:"subnetwork,omitempty"` - // Users: [Output Only] The URLs of the resources that are using this address. - Users []string `json:"users,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Address) MarshalJSON() ([]byte, error) { - type NoMethod Address - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AddressesScopedList resources. - Items map[string]AddressesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#addressAggregatedList - // for aggregated lists of - // addresses. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AddressAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressAggregatedListWarning: [Output Only] Informational warning message. -type AddressAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressList: Contains a list of addresses. -type AddressList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Address resources. - Items []*Address `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#addressList for - // lists of addresses. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AddressListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressList) MarshalJSON() ([]byte, error) { - type NoMethod AddressList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressListWarning: [Output Only] Informational warning message. -type AddressListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressesScopedList struct { - // Addresses: [Output Only] A list of addresses contained in this scope. - Addresses []*Address `json:"addresses,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *AddressesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Addresses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Addresses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddressesScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses -// when the list is empty. -type AddressesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AddressesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AddressesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AddressesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdvancedMachineFeatures: Specifies options for controlling advanced machine -// features. -// Options that would traditionally be configured in a BIOS belong -// here. Features that require operating system support may have -// corresponding entries in the GuestOsFeatures of anImage (e.g., whether or -// not the OS in theImage supports nested virtualization being enabled -// or -// disabled). -type AdvancedMachineFeatures struct { - // EnableNestedVirtualization: Whether to enable nested virtualization or not - // (default is false). - EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // EnableUefiNetworking: Whether to enable UEFI networking for instance - // creation. - EnableUefiNetworking bool `json:"enableUefiNetworking,omitempty"` - // PerformanceMonitoringUnit: Type of Performance Monitoring Unit requested on - // instance. - // - // Possible values: - // "ARCHITECTURAL" - Architecturally defined non-LLC events. - // "ENHANCED" - Most documented core/L2 and LLC events. - // "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" - // "STANDARD" - Most documented core/L2 events. - PerformanceMonitoringUnit string `json:"performanceMonitoringUnit,omitempty"` - // ThreadsPerCore: The number of threads per physical core. To disable - // simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number - // of threads supported per core by the underlying processor is - // assumed. - ThreadsPerCore int64 `json:"threadsPerCore,omitempty"` - // TurboMode: Turbo frequency mode to use for the instance. - // Supported modes include: - // * ALL_CORE_MAX - // - // Using empty string or not setting this field will use the - // platform-specific - // default turbo mode. - TurboMode string `json:"turboMode,omitempty"` - // VisibleCoreCount: The number of physical cores to expose to an instance. - // Multiply by - // the number of threads per core to compute the total number of virtual - // CPUs to expose to the instance. If unset, the number of cores is - // inferred from the instance's nominal CPU count and the underlying - // platform's SMT width. - VisibleCoreCount int64 `json:"visibleCoreCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableNestedVirtualization") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableNestedVirtualization") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdvancedMachineFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AdvancedMachineFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AliasIpRange: An alias IP range attached to an instance's network interface. -type AliasIpRange struct { - // IpCidrRange: The IP alias ranges to allocate for this interface. This IP - // CIDR range - // must belong to the specified subnetwork and cannot contain IP - // addresses - // reserved by system or used by other network interfaces. This range may be - // a single IP address (such as 10.2.3.4), a netmask (such as/24) or a - // CIDR-formatted string (such as10.1.2.0/24). - IpCidrRange string `json:"ipCidrRange,omitempty"` - // SubnetworkRangeName: The name of a subnetwork secondary IP range from which - // to allocate an IP - // alias range. If not specified, the primary range of the subnetwork is used. - SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AliasIpRange) MarshalJSON() ([]byte, error) { - type NoMethod AliasIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationAggregateReservation: This reservation type is specified by total -// resource amounts (e.g. total -// count of CPUs) and can account for multiple instance SKUs. In other -// words, -// one can create instances of varying shapes against this reservation. -type AllocationAggregateReservation struct { - // HostCount: Count of reserved hosts of specified VM family. The host has - // fixed number - // of accelerators based on the accelerator/vm-family selected. - HostCount int64 `json:"hostCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances - // running on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // InUseInstanceCount: Number of instances currently in use in this - // reservation. - InUseInstanceCount int64 `json:"inUseInstanceCount,omitempty"` - // InUseResources: [Output only] List of resources currently in use. - InUseResources []*AllocationAggregateReservationReservedResourceInfo `json:"inUseResources,omitempty"` - // ReservedResources: List of reserved resources (CPUs, memory, accelerators). - ReservedResources []*AllocationAggregateReservationReservedResourceInfo `json:"reservedResources,omitempty"` - // VmFamily: The VM family that all instances scheduled against this - // reservation must - // belong to. - // - // Possible values: - // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" - // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - VmFamily string `json:"vmFamily,omitempty"` - // WorkloadType: The workload type of the instances that will target this - // reservation. - // - // Possible values: - // "BATCH" - Reserved resources will be optimized for BATCH workloads, such - // as ML - // training. - // "SERVING" - Reserved resources will be optimized for SERVING workloads, - // such as ML - // inference. - // "UNSPECIFIED" - WorkloadType string `json:"workloadType,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationAggregateReservationReservedResourceInfo struct { - // Accelerator: Properties of accelerator resources in this reservation. - Accelerator *AllocationAggregateReservationReservedResourceInfoAccelerator `json:"accelerator,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerator") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerator") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservationReservedResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservationReservedResourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationAggregateReservationReservedResourceInfoAccelerator struct { - // AcceleratorCount: Number of accelerators of specified type. - AcceleratorCount int64 `json:"acceleratorCount,omitempty"` - // AcceleratorType: Full or partial URL to accelerator type. - // e.g. - // "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" - AcceleratorType string `json:"acceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationAggregateReservationReservedResourceInfoAccelerator) MarshalJSON() ([]byte, error) { - type NoMethod AllocationAggregateReservationReservedResourceInfoAccelerator - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationReservationSharingPolicy struct { - // ServiceShareType: Sharing config for all Google Cloud services. - // - // Possible values: - // "ALLOW_ALL" - Allow all Google Cloud managed services to share - // reservations. - // "DISALLOW_ALL" - [Default] Disallow sharing with all Google Cloud - // services. - // "SERVICE_SHARE_TYPE_UNSPECIFIED" - ServiceShareType string `json:"serviceShareType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceShareType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceShareType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationReservationSharingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AllocationReservationSharingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatus: [Output Only] Contains output only fields. -type AllocationResourceStatus struct { - // HealthInfo: [Output only] Health information for the reservation. - HealthInfo *AllocationResourceStatusHealthInfo `json:"healthInfo,omitempty"` - // ReservationBlockCount: The number of reservation blocks associated with this - // reservation. - ReservationBlockCount int64 `json:"reservationBlockCount,omitempty"` - // ReservationMaintenance: Maintenance information for this reservation - ReservationMaintenance *GroupMaintenanceInfo `json:"reservationMaintenance,omitempty"` - // SpecificSkuAllocation: Allocation Properties of this reservation. - SpecificSkuAllocation *AllocationResourceStatusSpecificSKUAllocation `json:"specificSkuAllocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatusHealthInfo: Health information for the reservation. -type AllocationResourceStatusHealthInfo struct { - // DegradedBlockCount: The number of reservation blocks that are degraded. - DegradedBlockCount int64 `json:"degradedBlockCount,omitempty"` - // HealthStatus: The health status of the reservation. - // - // Possible values: - // "DEGRADED" - The reservation is degraded. - // "HEALTHY" - The reservation is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation is - // unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthyBlockCount: The number of reservation blocks that are healthy. - HealthyBlockCount int64 `json:"healthyBlockCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedBlockCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedBlockCount") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatusHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatusHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationResourceStatusSpecificSKUAllocation: Contains Properties set for -// the reservation. -type AllocationResourceStatusSpecificSKUAllocation struct { - // SourceInstanceTemplateId: ID of the instance template used to populate - // reservation properties. - SourceInstanceTemplateId string `json:"sourceInstanceTemplateId,omitempty"` - // Utilizations: Per service utilization breakdown. The Key is the Google Cloud - // managed - // service name. - Utilizations map[string]string `json:"utilizations,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceInstanceTemplateId") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceInstanceTemplateId") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationResourceStatusSpecificSKUAllocation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationResourceStatusSpecificSKUAllocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk struct { - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. The default isSCSI. - // For performance characteristics of SCSI over NVMe, seeLocal SSD performance. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskSizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUAllocationReservedInstanceProperties: Properties of the -// SKU instances being reserved. -// Next ID: 9 -type AllocationSpecificSKUAllocationReservedInstanceProperties struct { - // GuestAccelerators: Specifies accelerator type and count. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // LocalSsds: Specifies amount of local ssd to reserve with each instance. The - // type - // of disk is local-ssd. - LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk `json:"localSsds,omitempty"` - // LocationHint: An opaque location hint used to place the allocation close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // MachineType: Specifies type of machine (name only) which has fixed number of - // vCPUs - // and fixed amount of memory. This also includes specifying custom - // machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. - MachineType string `json:"machineType,omitempty"` - // MaintenanceFreezeDurationHours: Specifies the number of hours after - // reservation creation where - // instances using the reservation won't be scheduled for maintenance. - MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted - // values are: `PERIODIC`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MinCpuPlatform: Minimum cpu platform the reservation. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAccelerators") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUAllocationReservedInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AllocationSpecificSKUReservation: This reservation type allows to pre -// allocate specific instance -// -// configuration. -type AllocationSpecificSKUReservation struct { - // AssuredCount: [Output Only] Indicates how many instances are actually usable - // currently. - AssuredCount int64 `json:"assuredCount,omitempty,string"` - // Count: Specifies the number of resources that are allocated. - Count int64 `json:"count,omitempty,string"` - // InUseCount: [Output Only] Indicates how many instances are in use. - InUseCount int64 `json:"inUseCount,omitempty,string"` - // InstanceProperties: The instance properties for the reservation. - InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // SourceInstanceTemplate: Specifies the instance template to create the - // reservation. If you use - // this field, you must exclude the instanceProperties field. - // - // This field is optional, and it can be a full or partial URL. For - // example, - // the following are all valid URLs to an instance template: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - // - projects/project/global/instanceTemplates/instanceTemplate - // - global/instanceTemplates/instanceTemplate - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssuredCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AssuredCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AllocationSpecificSKUReservation) MarshalJSON() ([]byte, error) { - type NoMethod AllocationSpecificSKUReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AttachedDisk: An instance-attached disk resource. -type AttachedDisk struct { - // Architecture: [Output Only] The architecture of the attached disk. Valid - // values are ARM64 - // or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // Boot: Indicates that this is a boot disk. The virtual machine will use the - // first - // partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - // DeviceName: Specifies a unique device name of your choice that is reflected - // into the/dev/disk/by-id/google-* tree of a Linux operating system - // running within the instance. This name can be used to reference the - // device - // for mounting, resizing, and so on, from within the instance. - // - // If not specified, the server chooses a default device name to apply to - // this - // disk, in the form persistent-disk-x, where x is a number - // assigned by Google Compute Engine. This field is only applicable - // for - // persistent disks. - DeviceName string `json:"deviceName,omitempty"` - // DiskEncryptionKey: Encrypts or decrypts a disk using - // acustomer-supplied - // encryption key. - // - // If you are creating a new disk, this field encrypts the new disk using - // an encryption key that you provide. If you are attaching an existing - // disk that is already encrypted, this field decrypts the disk using - // the customer-supplied encryption key. - // - // If you encrypt a disk using a customer-supplied key, you must provide - // the - // same key again when you attempt to use this resource at a later time. - // For - // example, you must provide the key when you create a snapshot or an - // image - // from the disk or when you attach the disk to a virtual machine instance. - // - // If you do not provide an encryption key, then the disk will be - // encrypted - // using an automatically generated key and you do not need to provide a key - // to use the disk later. - // - // Note: - // - // Instance templates do not storecustomer-supplied - // encryption keys, so you cannot use your own keys to encrypt disks in - // amanaged instance group. - // - // You cannot create VMs that have disks with customer-supplied keys using - // the bulk - // insert method. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // DiskSizeGb: The size of the disk in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // ForceAttach: [Input Only] Whether to force attach the regional disk even if - // it's - // currently attached to another instance. If you try to force attach a - // zonal - // disk to an instance, you will receive an error. - ForceAttach bool `json:"forceAttach,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Index: [Output Only] A zero-based index to this disk, where 0 is reserved - // for the - // boot disk. If you have many disks attached to an instance, each - // disk would have a unique index number. - Index int64 `json:"index,omitempty"` - // InitializeParams: [Input Only] Specifies the parameters for a new disk that - // will be created - // alongside the new instance. Use initialization parameters to create - // boot - // disks or local SSDs attached to the new instance. - // - // This property is mutually exclusive with the source property; - // you can only define one or the other, but not both. - InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. For most machine types, the - // default is SCSI. Local SSDs can use either NVME or SCSI. - // In certain configurations, persistent disks can use NVMe. For - // more - // information, seeAbout - // persistent disks. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#attachedDisk for - // attached disks. - Kind string `json:"kind,omitempty"` - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - // Locked: [Output Only] Whether to indicate the attached disk is locked. The - // locked - // disk is not allowed to be detached from the instance, or to be used as - // the - // source of the snapshot creation, and the image creation. The instance - // with - // at least one locked attached disk is not allow to be used as source - // of - // machine image creation, instant snapshot creation, and not allowed to - // be - // deleted with --keep-disk parameter set to true for locked disks. - Locked bool `json:"locked,omitempty"` - // Mode: The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. - // If not specified, the default is to attach the disk - // in READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple virtual - // machines can use - // a disk in read-only mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. Only - // one - // virtual machine at a time can be attached to a disk in read-write mode. - Mode string `json:"mode,omitempty"` - // SavedState: For LocalSSD disks on VM Instances in STOPPED or SUSPENDED - // state, this - // field is set to PRESERVED if the LocalSSD data has been saved - // to a persistent location by customer request. (see the - // discard_local_ssd option on Stop/Suspend). - // Read-only in the api. - // - // Possible values: - // "DISK_SAVED_STATE_UNSPECIFIED" - *[Default]* Disk state has not been - // preserved. - // "PRESERVED" - Disk state has been preserved. - SavedState string `json:"savedState,omitempty"` - // ShieldedInstanceInitialState: [Output Only] shielded vm initial state stored - // on disk - ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - // Source: Specifies a valid partial or full URL to an existing Persistent - // Disk - // resource. When creating a new instance boot disk, one - // ofinitializeParams.sourceImage orinitializeParams.sourceSnapshot or - // disks.source - // is required. - // - // If desired, you can also attach existing non-root persistent disks - // using - // this property. This field is only applicable for persistent disks. - // - // Note that for InstanceTemplate, specify the disk name for zonal disk, - // and the URL for regional disk. - Source string `json:"source,omitempty"` - // Type: Specifies the type of the disk, either SCRATCH orPERSISTENT. If not - // specified, the default isPERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - // UserLicenses: [Output Only] A list of user provided licenses. It represents - // a list of - // URLs to the license resource. Unlike regular licenses, user - // provided - // licenses can be modified after the disk is created. - UserLicenses []string `json:"userLicenses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AttachedDisk) MarshalJSON() ([]byte, error) { - type NoMethod AttachedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AttachedDiskInitializeParams: [Input Only] Specifies the parameters for a -// new disk that will be created -// alongside the new instance. Use initialization parameters to create -// boot -// disks or local SSDs attached to the new instance. -// -// This field is persisted and returned for instanceTemplate and not -// returned -// in the context of instance. -// -// This property is mutually exclusive with the source property; -// you can only define one or the other, but not both. -type AttachedDiskInitializeParams struct { - // Architecture: The architecture of the attached disk. Valid values are - // arm64 or x86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // Description: An optional description. Provide this property when creating - // the disk. - Description string `json:"description,omitempty"` - // DiskName: Specifies the disk name. If not specified, the default is to use - // the name - // of the instance. If a disk with the same name already exists in the - // given - // region, the existing disk is attached to the new instance and the - // new disk is not created. - DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. The size must be at - // least - // 10 GB. If you specify a sourceImage, which is required for - // boot disks, the default size is the size of the sourceImage. - // If you do not specify a sourceImage, the default disk size - // is 500 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: Specifies the disk type to use to create the instance. If not - // specified, - // the default is pd-standard, specified using the full URL. - // For - // example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard - // - // - // For a full list of acceptable values, seePersistent disk - // types. If you specify this field when creating a VM, you can provide - // either the full or partial URL. For example, the following values - // are - // valid: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType - // - // - projects/project/zones/zone/diskTypes/diskType - // - zones/zone/diskTypes/diskType - // - // - // If you specify this field when creating or updating an instance template - // or all-instances configuration, specify the type of the disk, not the - // URL. For example: pd-standard. - DiskType string `json:"diskType,omitempty"` - // EnableConfidentialCompute: Whether this disk is using confidential compute - // mode. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of - // available - // options. - // - // Guest OS features are applied by merginginitializeParams.guestOsFeatures - // anddisks.guestOsFeatures - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Labels: Labels to apply to this disk. These can be later modified by - // thedisks.setLabels method. This field is only applicable for - // persistent disks. - Labels map[string]string `json:"labels,omitempty"` - // Licenses: A list of publicly visible licenses. Reserved for Google's use. - Licenses []string `json:"licenses,omitempty"` - // MultiWriter: Indicates whether or not the disk can be read/write attached - // to - // more than one instance. - MultiWriter bool `json:"multiWriter,omitempty"` - // OnUpdateAction: Specifies which action to take on instance update with this - // disk. Default - // is to use the existing disk. - // - // Possible values: - // "RECREATE_DISK" - Always recreate the disk. - // "RECREATE_DISK_IF_SOURCE_CHANGED" - Recreate the disk if source (image, - // snapshot) of this disk is different - // from source of existing disk. - // "USE_EXISTING_DISK" - Use the existing disk, this is the default - // behaviour. - OnUpdateAction string `json:"onUpdateAction,omitempty"` - // ProvisionedIops: Indicates how many IOPS to provision for the disk. This - // sets the number - // of I/O operations per second that the disk can handle. Values must - // be - // between 10,000 and 120,000. For more details, see theExtreme persistent - // disk documentation. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: Indicates how much throughput to provision for the - // disk. This sets the - // number of throughput mb per second that the disk can handle. Values - // must - // greater than or equal to 1. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // ReplicaZones: Required for each regional disk associated with the instance. - // Specify - // the URLs of the zones where the disk should be replicated to. - // You must provide exactly two replica zones, and one zone must be the same - // as the instance zone. - ReplicaZones []string `json:"replicaZones,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the disk. Tag keys - // and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ResourcePolicies: Resource policies applied to this disk for automatic - // snapshot creations. - // Specified using the full or partial URL. For instance template, specify - // only the resource policy name. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // SourceImage: The source image to create this disk. When creating a new - // instance boot - // disk, one of initializeParams.sourceImage orinitializeParams.sourceSnapshot - // or disks.source - // is required. - // - // To create a disk with one of the public operating system - // images, specify the image by its family name. For example, - // specifyfamily/debian-9 to use the latest Debian 9 - // image: - // - // projects/debian-cloud/global/images/family/debian-9 - // - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - // - // - // To create a disk with a custom image that you created, specify the - // image name in the following format: - // - // global/images/my-custom-image - // - // - // You can also specify a custom image by its image family, which returns - // the latest version of the image in that family. Replace the image name - // with family/family-name: - // - // global/images/family/my-image-family - // - // - // If the source image is deleted later, this field will not be set. - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: Thecustomer-supplied - // encryption key of the source image. Required if the source image - // is - // protected by a customer-supplied encryption key. - // - // InstanceTemplate and InstancePropertiesPatch do not - // storecustomer-supplied - // encryption keys, so you cannot create disks for instances in a managed - // instance group if the - // source images are encrypted with your own keys. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceInstantSnapshot: The source instant-snapshot to create this disk. When - // creating a new - // instance boot disk, one of initializeParams.sourceSnapshot - // or initializeParams.sourceInstantSnapshotinitializeParams.sourceImage or - // disks.source - // is required. - // - // To create a disk with a snapshot that you created, specify the - // snapshot name in the following - // format: - // - // us-central1-a/instantSnapshots/my-backup - // - // - // If the source instant-snapshot is deleted later, this field will not be - // set. - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceSnapshot: The source snapshot to create this disk. When creating a new - // instance - // boot disk, one of initializeParams.sourceSnapshot - // orinitializeParams.sourceImage or disks.source - // is required. - // - // To create a disk with a snapshot that you created, specify the - // snapshot name in the following format: - // - // global/snapshots/my-backup - // - // - // If the source snapshot is deleted later, this field will not be set. - // - // Note: You cannot create VMs in bulk using a snapshot as the source. Use - // an image instead when you create VMs using - // the bulk - // insert method. - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: Thecustomer-supplied - // encryption key of the source snapshot. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // StoragePool: The storage pool in which the new disk is created. You can - // provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool - // - projects/project/zones/zone/storagePools/storagePool - // - zones/zone/storagePools/storagePool - StoragePool string `json:"storagePool,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { - type NoMethod AttachedDiskInitializeParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - return gensupport.MarshalJSON(NoMethod(s), 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: - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_READ" - Data reads. Example: CloudSQL Users list - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Autoscaler: Represents an Autoscaler resource. -// -// Google Compute Engine has two Autoscaler resources: -// -// * Zonal (/compute/docs/reference/rest/beta/autoscalers) -// * Regional (/compute/docs/reference/rest/beta/regionAutoscalers) -// -// Use autoscalers to automatically add or delete instances from a -// managed instance group according to your defined autoscaling policy. -// For more information, read Autoscaling Groups of Instances. -// -// For zonal managed instance groups resource, use the -// autoscaler -// resource. -// -// For regional managed instance groups, use theregionAutoscalers resource. -type Autoscaler struct { - // AutoscalingPolicy: The configuration parameters for the autoscaling - // algorithm. You can define - // one or more signals for an autoscaler: - // cpuUtilization,customMetricUtilizations, andloadBalancingUtilization. - // - // If none of these are specified, the default will be to autoscale based - // oncpuUtilization to 0.6 or 60%. - AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#autoscaler - // for autoscalers. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // RecommendedSize: [Output Only] Target recommended MIG size (number of - // instances) computed by - // autoscaler. Autoscaler calculates the recommended MIG size even when - // the - // autoscaling policy mode is different from ON. This field is empty - // when - // autoscaler is not connected to an existing managed instance group - // or - // autoscaler did not generate its prediction. - RecommendedSize int64 `json:"recommendedSize,omitempty"` - // Region: [Output Only] URL of theregion - // where the instance group resides (for autoscalers living in regional - // scope). - Region string `json:"region,omitempty"` - // ScalingScheduleStatus: [Output Only] Status information of existing scaling - // schedules. - ScalingScheduleStatus map[string]ScalingScheduleStatus `json:"scalingScheduleStatus,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the autoscaler configuration. Current - // set of - // possible values: - // - // - PENDING: - // Autoscaler backend hasn't read new/updated configuration. - // - DELETING: - // Configuration is being deleted. - // - ACTIVE: - // Configuration is acknowledged to be effective. Some warnings might - // be present in the statusDetails field. - // - ERROR: - // Configuration has errors. Actionable for users. Details are present in - // the statusDetails field. - // - // - // New values might be added in the future. - // - // Possible values: - // "ACTIVE" - Configuration is acknowledged to be effective - // "DELETING" - Configuration is being deleted - // "ERROR" - Configuration has errors. Actionable for users. - // "PENDING" - Autoscaler backend hasn't read new/updated configuration - Status string `json:"status,omitempty"` - // StatusDetails: [Output Only] Human-readable details about the current state - // of the - // autoscaler. Read the documentation forCommonly - // returned status messages for examples of status messages you - // might - // encounter. - StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` - // Target: URL of the managed instance group that this autoscaler will scale. - // This - // field is required when creating an autoscaler. - Target string `json:"target,omitempty"` - // Zone: [Output Only] URL of thezone - // where the instance group resides (for autoscalers living in zonal scope). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Autoscaler) MarshalJSON() ([]byte, error) { - type NoMethod Autoscaler - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of AutoscalersScopedList resources. - Items map[string]AutoscalersScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#autoscalerAggregatedList - // for aggregated lists of - // autoscalers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AutoscalerAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerAggregatedListWarning: [Output Only] Informational warning -// message. -type AutoscalerAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalerAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerList: Contains a list of Autoscaler resources. -type AutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#autoscalerList - // for lists of autoscalers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *AutoscalerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalerListWarning: [Output Only] Informational warning message. -type AutoscalerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalerStatusDetails struct { - // Message: The status message. - Message string `json:"message,omitempty"` - // Type: The type of error, warning, or notice returned. Current set of - // possible - // values: - // - // - ALL_INSTANCES_UNHEALTHY (WARNING): - // All instances in the instance group are unhealthy (not in RUNNING - // state). - // - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): - // There is no backend service attached to the instance group. - // - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): - // Autoscaler recommends a size greater than maxNumReplicas. - // - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): - // The custom metric samples are not exported often enough to be - // a credible base for autoscaling. - // - CUSTOM_METRIC_INVALID (ERROR): - // The custom metric that was specified does not exist or does not have - // the necessary labels. - // - MIN_EQUALS_MAX (WARNING): - // The minNumReplicas is equal to maxNumReplicas. This means the - // autoscaler cannot add or remove instances from the instance group. - // - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): - // The autoscaler did not receive any data from the custom metric - // configured for autoscaling. - // - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): - // The autoscaler is configured to scale based on a load balancing signal - // but the instance group has not received any requests from the load - // balancer. - // - MODE_OFF (WARNING): - // Autoscaling is turned off. The number of instances in the group won't - // change automatically. The autoscaling configuration is preserved. - // - MODE_ONLY_UP (WARNING): - // Autoscaling is in the "Autoscale only out" mode. The autoscaler can - // add - // instances but not remove any. - // - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): - // The instance group cannot be autoscaled because it has more than one - // backend service attached to it. - // - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): - // There is insufficient quota for the necessary resources, such as CPU - // or - // number of instances. - // - REGION_RESOURCE_STOCKOUT (ERROR): - // Shown only for regional autoscalers: there is a resource stockout in - // the chosen region. - // - SCALING_TARGET_DOES_NOT_EXIST (ERROR): - // The target to be scaled does not exist. - // - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION - // (ERROR): Autoscaling does not work with an HTTP/S load balancer that - // has been configured for maxRate. - // - ZONE_RESOURCE_STOCKOUT (ERROR): - // For zonal autoscalers: there is a resource stockout in the chosen - // zone. - // For regional autoscalers: in at least one of the zones you're using - // there is a resource stockout. - // - // - // New values might be added in the future. Some of the values might not - // be - // available in all API versions. - // - // Possible values: - // "ALL_INSTANCES_UNHEALTHY" - All instances in the instance group are - // unhealthy (not in RUNNING state). - // "BACKEND_SERVICE_DOES_NOT_EXIST" - There is no backend service attached to - // the instance group. - // "CAPPED_AT_MAX_NUM_REPLICAS" - Autoscaler recommends a size greater than - // maxNumReplicas. - // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" - The custom metric samples are not - // exported often enough to be a credible - // base for autoscaling. - // "CUSTOM_METRIC_INVALID" - The custom metric that was specified does not - // exist or does not have the - // necessary labels. - // "MIN_EQUALS_MAX" - The minNumReplicas is equal to maxNumReplicas. This - // means the autoscaler - // cannot add or remove instances from the instance group. - // "MISSING_CUSTOM_METRIC_DATA_POINTS" - The autoscaler did not receive any - // data from the custom metric configured - // for autoscaling. - // "MISSING_LOAD_BALANCING_DATA_POINTS" - The autoscaler is configured to - // scale based on a load balancing signal - // but the instance group has not received any requests from the load - // balancer. - // "MODE_OFF" - Autoscaling is turned off. The number of instances in the - // group won't - // change automatically. The autoscaling configuration is preserved. - // "MODE_ONLY_SCALE_OUT" - Autoscaling is in the "Autoscale only scale out" - // mode. - // Instances in the group will be only added. - // "MODE_ONLY_UP" - Autoscaling is in the "Autoscale only out" mode. - // Instances in the group - // will be only added. - // "MORE_THAN_ONE_BACKEND_SERVICE" - The instance group cannot be autoscaled - // because it has more than one - // backend service attached to it. - // "NOT_ENOUGH_QUOTA_AVAILABLE" - There is insufficient quota for the - // necessary resources, such as CPU or - // number of instances. - // "REGION_RESOURCE_STOCKOUT" - Showed only for regional autoscalers: there - // is a resource stockout in - // the chosen region. - // "SCALING_TARGET_DOES_NOT_EXIST" - The target to be scaled does not exist. - // "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX" - For some scaling - // schedules minRequiredReplicas is greater than - // maxNumReplicas. Autoscaler always recommends at most - // maxNumReplicas - // instances. - // "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN" - For some scaling - // schedules minRequiredReplicas is less than - // minNumReplicas. Autoscaler always recommends at least - // minNumReplicas - // instances. - // "UNKNOWN" - // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" - Autoscaling does not - // work with an HTTP/S load balancer that has been - // configured for maxRate. - // "ZONE_RESOURCE_STOCKOUT" - For zonal autoscalers: there is a resource - // stockout in the chosen zone. - // For regional autoscalers: in at least one of the zones you're using there - // is a resource stockout. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalerStatusDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedList struct { - // Autoscalers: [Output Only] A list of autoscalers contained in this scope. - Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // autoscalers - // when the list is empty. - Warning *AutoscalersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Autoscalers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Autoscalers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalersScopedListWarning: [Output Only] Informational warning which -// replaces the list of autoscalers -// when the list is empty. -type AutoscalersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*AutoscalersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AutoscalersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicy: Cloud Autoscaler policy. -type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that your application takes to - // initialize on a VM - // instance. This is referred to as the - // initialization period - // (/compute/docs/autoscaler#cool_down_period). - // Specifying an accurate initialization period improves - // autoscaler decisions. For example, when scaling out, the autoscaler - // ignores - // data from VMs that are still initializing because those VMs might not - // yet - // represent normal usage of your application. The default - // initialization - // period is 60 seconds. - // - // Initialization periods might vary because of numerous - // factors. We recommend that you test how long your application takes - // to - // initialize. To do this, create a VM and time your application's - // startup - // process. - CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - // CpuUtilization: Defines the CPU utilization policy that allows the - // autoscaler to scale - // based on the average CPU utilization of a managed instance group. - CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"` - // CustomMetricUtilizations: Configuration parameters of autoscaling based on a - // custom metric. - CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"` - // LoadBalancingUtilization: Configuration parameters of autoscaling based on - // load balancer. - LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"` - // MaxNumReplicas: The maximum number of instances that the autoscaler can - // scale out to. This - // is required when creating or updating an autoscaler. The maximum number - // of replicas must not be lower than minimal number of replicas. - MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - // MinNumReplicas: The minimum number of replicas that the autoscaler can scale - // in to. - // This cannot be less than 0. If not provided, autoscaler chooses a - // default value depending on maximum number of instances allowed. - MinNumReplicas int64 `json:"minNumReplicas,omitempty"` - // Mode: Defines the operating mode for this policy. - // The following modes are available: - // - // - OFF: Disables the autoscaler but maintains its - // configuration. - // - ONLY_SCALE_OUT: Restricts the autoscaler to add - // VM instances only. - // - ON: Enables all autoscaler activities according to its - // policy. - // - // - // For more information, see - // "Turning off or restricting an autoscaler" - // - // Possible values: - // "OFF" - Do not automatically scale the MIG in or out. - // The recommended_size field contains the size of MIG that would be set if - // the actuation mode was enabled. - // "ON" - Automatically scale the MIG in and out according to the policy. - // "ONLY_SCALE_OUT" - Automatically create VMs according to the policy, but - // do not scale - // the MIG in. - // "ONLY_UP" - Automatically create VMs according to the policy, but do not - // scale - // the MIG in. - Mode string `json:"mode,omitempty"` - ScaleDownControl *AutoscalingPolicyScaleDownControl `json:"scaleDownControl,omitempty"` - ScaleInControl *AutoscalingPolicyScaleInControl `json:"scaleInControl,omitempty"` - // ScalingSchedules: Scaling schedules defined for an autoscaler. Multiple - // schedules - // can be set on an autoscaler, and they can overlap. During - // overlapping - // periods the greatest min_required_replicas of all scaling schedules - // is - // applied. Up to 128 scaling schedules are allowed. - ScalingSchedules map[string]AutoscalingPolicyScalingSchedule `json:"scalingSchedules,omitempty"` - // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CoolDownPeriodSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyCpuUtilization: CPU utilization policy. -type AutoscalingPolicyCpuUtilization struct { - // PredictiveMethod: Indicates whether predictive autoscaling based on CPU - // metric is enabled. - // Valid values are: - // - // * NONE (default). No predictive method is used. The autoscaler scales - // the - // group to meet current demand based on real-time metrics. - // * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability - // by - // monitoring daily and weekly load patterns and scaling out ahead - // of - // anticipated demand. - // - // Possible values: - // "NONE" - No predictive method is used. The autoscaler scales the group to - // meet - // current demand based on real-time metrics - // "OPTIMIZE_AVAILABILITY" - Predictive autoscaling improves availability by - // monitoring daily and - // weekly load patterns and scaling out ahead of anticipated demand. - // "PREDICTIVE_METHOD_UNSPECIFIED" - PredictiveMethod string `json:"predictiveMethod,omitempty"` - // UtilizationTarget: The target CPU utilization that the autoscaler maintains. - // Must be - // a float value in the range (0, 1]. If not specified, the default is0.6. - // - // If the CPU level is below the target utilization, the autoscaler scales - // in the number of instances until it reaches the minimum number of - // instances you specified or until the average CPU of your instances - // reaches the target utilization. - // - // If the average CPU is above the target utilization, the autoscaler - // scales out until it reaches the maximum number of instances you - // specified or until the average utilization reaches the target - // utilization. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "PredictiveMethod") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PredictiveMethod") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyCpuUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyCpuUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric policy. -type AutoscalingPolicyCustomMetricUtilization struct { - // Filter: A filter string, compatible with a Stackdriver Monitoringfilter - // string forTimeSeries.list API call. This filter is - // used to select a specific TimeSeries for the purpose of autoscaling and - // to determine whether the metric is exporting per-instance or - // per-group data. - // - // For the filter to be valid for autoscaling purposes, the following - // rules - // apply: - // - // - // - You can only use the AND operator for joining - // selectors. - // - You can only use direct equality comparison operator - // (=) without any functions for each selector. - // - You can specify the metric in both the filter string and in the - // metric field. However, if specified in both places, the metric must - // be identical. - // - The monitored resource type - // determines what kind of values are expected for the metric. If it is - // a gce_instance, the autoscaler expects the metric to - // include a separate TimeSeries for each instance in a group. In such - // a - // case, you cannot filter on resource labels. - // - // - // If the resource type is any other value, the autoscaler expects - // this metric to contain values that apply to the entire autoscaled - // instance group and resource label filtering can be performed to - // point autoscaler at the correct TimeSeries to scale upon. This is - // called a *per-group metric* for the purpose of autoscaling. - // - // If not specified, the type defaults to - // gce_instance. - // - // - // - // Try to provide a filter that is selective enough to pick just one - // TimeSeries for the autoscaled group or for each of the instances (if you - // are using gce_instance resource type). If multiple - // TimeSeries are returned upon the query execution, the autoscaler will - // sum - // their respective values to obtain its scaling value. - Filter string `json:"filter,omitempty"` - // Metric: The identifier (type) of the Stackdriver Monitoring metric. The - // metric - // cannot have negative values. - // - // The metric must have a value type of INT64 orDOUBLE. - Metric string `json:"metric,omitempty"` - // SingleInstanceAssignment: If scaling is based on a per-group metric value - // that represents the - // total amount of work to be done or resource usage, set this value to - // an - // amount assigned for a single instance of the scaled group. Autoscaler - // keeps the number of instances proportional to the value of this - // metric. The metric itself does not change value due to group - // resizing. - // - // A good metric to use with the target is for - // examplepubsub.googleapis.com/subscription/num_undelivered_messages - // or a custom metric exporting the total number of requests coming to - // your instances. - // - // A bad example would be a metric exporting an average or median - // latency, - // since this value can't include a chunk assignable to a single instance, - // it could be better used with utilization_target instead. - SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` - // UtilizationTarget: The target value of the metric that autoscaler maintains. - // This - // must be a positive value. A utilization metric scales number of - // virtual machines handling requests to increase or decrease - // proportionally to the metric. - // - // For example, a good metric to use as a utilization_target - // ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count - // . - // The autoscaler works to keep this value constant for each of the - // instances. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // UtilizationTargetType: Defines how target utilization value is expressed for - // a Stackdriver - // Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE. - // - // Possible values: - // "DELTA_PER_MINUTE" - Sets the utilization target value for a cumulative or - // delta metric, - // expressed as the rate of growth per minute. - // "DELTA_PER_SECOND" - Sets the utilization target value for a cumulative or - // delta metric, - // expressed as the rate of growth per second. - // "GAUGE" - Sets the utilization target value for a gauge metric. The - // autoscaler - // will collect the average utilization of the virtual machines from the - // last couple of minutes, and compare the value to the utilization - // target value to perform autoscaling. - UtilizationTargetType string `json:"utilizationTargetType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyCustomMetricUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyCustomMetricUtilization - var s1 struct { - SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters of -// autoscaling based on load balancing. -type AutoscalingPolicyLoadBalancingUtilization struct { - // UtilizationTarget: Fraction of backend capacity utilization (set in HTTP(S) - // load balancing - // configuration) that the autoscaler maintains. Must be a positive - // float - // value. If not defined, the default is 0.8. - UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "UtilizationTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UtilizationTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyLoadBalancingUtilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error { - type NoMethod AutoscalingPolicyLoadBalancingUtilization - var s1 struct { - UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.UtilizationTarget = float64(s1.UtilizationTarget) - return nil -} - -// AutoscalingPolicyScaleDownControl: Configuration that allows for slower -// scale in so that even if Autoscaler -// recommends an abrupt scale in of a MIG, it will be throttled as specified -// by the parameters below. -type AutoscalingPolicyScaleDownControl struct { - // MaxScaledDownReplicas: Maximum allowed number (or %) of VMs that can be - // deducted from the peak - // recommendation during the window autoscaler looks at when - // computing - // recommendations. Possibly all these VMs can be deleted at once so - // user - // service needs to be prepared to lose that many VMs in one step. - MaxScaledDownReplicas *FixedOrPercent `json:"maxScaledDownReplicas,omitempty"` - // TimeWindowSec: How far back autoscaling looks when computing recommendations - // to - // include directives regarding slower scale in, as described above. - TimeWindowSec int64 `json:"timeWindowSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxScaledDownReplicas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxScaledDownReplicas") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScaleDownControl) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScaleDownControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyScaleInControl: Configuration that allows for slower scale -// in so that even if Autoscaler -// recommends an abrupt scale in of a MIG, it will be throttled as specified -// by the parameters below. -type AutoscalingPolicyScaleInControl struct { - // MaxScaledInReplicas: Maximum allowed number (or %) of VMs that can be - // deducted from the peak - // recommendation during the window autoscaler looks at when - // computing - // recommendations. Possibly all these VMs can be deleted at once so - // user - // service needs to be prepared to lose that many VMs in one step. - MaxScaledInReplicas *FixedOrPercent `json:"maxScaledInReplicas,omitempty"` - // TimeWindowSec: How far back autoscaling looks when computing recommendations - // to - // include directives regarding slower scale in, as described above. - TimeWindowSec int64 `json:"timeWindowSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxScaledInReplicas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxScaledInReplicas") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScaleInControl) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScaleInControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscalingPolicyScalingSchedule: Scaling based on user-defined schedule. -// The message describes a single -// scaling schedule. A scaling schedule changes the minimum number of -// VM -// instances an autoscaler can recommend, which can trigger scaling out. -type AutoscalingPolicyScalingSchedule struct { - // Description: A description of a scaling schedule. - Description string `json:"description,omitempty"` - // Disabled: A boolean value that specifies whether a scaling schedule can - // influence - // autoscaler recommendations. If set to true, then a scaling schedule has - // no effect. This field is optional, and its value is false by default. - Disabled bool `json:"disabled,omitempty"` - // DurationSec: The duration of time intervals, in seconds, for which - // this - // scaling schedule is to run. The minimum allowed value is 300. - // This field is required. - DurationSec int64 `json:"durationSec,omitempty"` - // MinRequiredReplicas: The minimum number of VM instances that the autoscaler - // will - // recommend in time intervals starting according to schedule. This field - // is - // required. - MinRequiredReplicas int64 `json:"minRequiredReplicas,omitempty"` - // Schedule: The start timestamps of time intervals when this scaling - // schedule is to provide a scaling signal. This field uses the extended - // cron format (with an optional year field). The expression can describe - // a - // single timestamp if the optional year is set, in which case the - // scaling - // schedule runs once. The schedule is interpreted with respect to - // time_zone. This field is required. Note: These timestamps only describe - // when autoscaler starts providing the scaling signal. The VMs - // need additional time to become serving. - Schedule string `json:"schedule,omitempty"` - // TimeZone: The time zone to use when interpreting the schedule. - // The value of this field must be a time zone name from the tz - // database: - // https://en.wikipedia.org/wiki/Tz_database. This field is assigned a - // default value of "UTC" if left empty. - TimeZone string `json:"timeZone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscalingPolicyScalingSchedule) MarshalJSON() ([]byte, error) { - type NoMethod AutoscalingPolicyScalingSchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Backend: Message containing information of one individual backend. -type Backend struct { - // BalancingMode: Specifies how to determine whether the backend of a load - // balancer can - // handle additional traffic or is fully loaded. For usage guidelines, - // see - // Connection balancing mode. - // - // Backends must use compatible balancing modes. For more information, - // see - // Supported balancing modes and target capacity settings and - // Restrictions and guidance for instance groups. - // - // Note: Currently, if you use the API to configure incompatible - // balancing - // modes, the configuration might be accepted even though it has no impact - // and is ignored. Specifically, Backend.maxUtilization is ignored - // when - // Backend.balancingMode is RATE. In the future, this incompatible - // combination - // will be rejected. - // - // Possible values: - // "CONNECTION" - Balance based on the number of simultaneous connections. - // "CUSTOM_METRICS" - Based on custom defined and reported metrics. - // "IN_FLIGHT" - Balance based on the number of in-flight requests. - // "RATE" - Balance based on requests per second (RPS). - // "UTILIZATION" - Balance based on the backend utilization. - BalancingMode string `json:"balancingMode,omitempty"` - // CapacityScaler: A multiplier applied to the backend's target capacity of its - // balancing - // mode. - // The default value is 1, which means the group serves up to - // 100% of its configured capacity (depending onbalancingMode). A setting of 0 - // means the group is - // completely drained, offering 0% of its available capacity. The valid - // ranges - // are 0.0 and [0.1,1.0]. - // You cannot configure a setting larger than 0 and smaller than0.1. - // You cannot configure a setting of 0 when there is only one - // backend attached to the backend service. - // - // Not available with backends that don't support using abalancingMode. This - // includes backends such as global - // internet NEGs, regional serverless NEGs, and PSC NEGs. - CapacityScaler float64 `json:"capacityScaler,omitempty"` - // CustomMetrics: List of custom metrics that are used for - // CUSTOM_METRICS - // BalancingMode. - CustomMetrics []*BackendCustomMetric `json:"customMetrics,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Failover: This field designates whether this is a failover backend. More - // than one - // failover backend can be configured for a given BackendService. - Failover bool `json:"failover,omitempty"` - // Group: The fully-qualified URL of aninstance - // group or network endpoint - // group (NEG) resource. To determine what types of backends a load - // balancer supports, see the Backend services - // overview - // (https://cloud.google.com/load-balancing/docs/backend-service#backends). - // - // You must use the *fully-qualified* URL (starting - // withhttps://www.googleapis.com/) to specify the instance group - // or NEG. Partial URLs are not supported. - // - // If haPolicy is specified, backends must refer to NEG resources of - // type - // GCE_VM_IP. - Group string `json:"group,omitempty"` - // MaxConnections: Defines a target maximum number of simultaneous connections. - // For usage - // guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. Not available if the backend'sbalancingMode is RATE. - MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxConnectionsPerEndpoint: Defines a target maximum number of simultaneous - // connections. For usage - // guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isRATE. - MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` - // MaxConnectionsPerInstance: Defines a target maximum number of simultaneous - // connections. - // For usage guidelines, seeConnection - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isRATE. - MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` - // MaxInFlightRequests: Defines a maximum number of in-flight requests for the - // whole NEG or - // instance group. Not available if backend's balancingMode isRATE or - // CONNECTION. - MaxInFlightRequests int64 `json:"maxInFlightRequests,omitempty"` - // MaxInFlightRequestsPerEndpoint: Defines a maximum number of in-flight - // requests for a single endpoint. - // Not available if backend's balancingMode is RATE - // or CONNECTION. - MaxInFlightRequestsPerEndpoint int64 `json:"maxInFlightRequestsPerEndpoint,omitempty"` - // MaxInFlightRequestsPerInstance: Defines a maximum number of in-flight - // requests for a single VM. - // Not available if backend's balancingMode is RATE - // or CONNECTION. - MaxInFlightRequestsPerInstance int64 `json:"maxInFlightRequestsPerInstance,omitempty"` - // MaxRate: Defines a maximum number of HTTP requests per second (RPS). - // For - // usage guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerEndpoint: Defines a maximum target for requests per second (RPS). - // For usage - // guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` - // MaxRatePerInstance: Defines a maximum target for requests per second (RPS). - // For usage - // guidelines, seeRate - // balancing mode and Utilization - // balancing mode. - // - // Not available if the backend's balancingMode isCONNECTION. - MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - // MaxUtilization: Optional parameter to define a target capacity for - // theUTILIZATION balancing mode. The valid range is[0.0, 1.0]. - // - // For usage guidelines, seeUtilization - // balancing mode. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - // Preference: This field indicates whether this backend should be fully - // utilized before - // sending traffic to backends with default preference. The possible - // values - // are: - // - // - PREFERRED: Backends with this preference level will be - // filled up to their capacity limits first, based on RTT. - // - DEFAULT: If preferred backends don't have enough - // capacity, backends in this layer would be used and traffic would be - // assigned based on the load balancing algorithm you use. This is the - // default - // - // Possible values: - // "DEFAULT" - No preference. - // "PREFERENCE_UNSPECIFIED" - If preference is unspecified, we set it to the - // DEFAULT value - // "PREFERRED" - Traffic will be sent to this backend first. - Preference string `json:"preference,omitempty"` - // Possible values: - // "LONG" - Most of the requests are expected to take more than multiple - // seconds to - // finish. - // "SHORT" - Most requests are expected to finish with a sub-second latency. - // "TRAFFIC_DURATION_UNSPECIFIED" - Traffic duration is unspecified. - TrafficDuration string `json:"trafficDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "BalancingMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BalancingMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Backend) MarshalJSON() ([]byte, error) { - type NoMethod Backend - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Backend) UnmarshalJSON(data []byte) error { - type NoMethod Backend - var s1 struct { - CapacityScaler gensupport.JSONFloat64 `json:"capacityScaler"` - MaxRatePerEndpoint gensupport.JSONFloat64 `json:"maxRatePerEndpoint"` - MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"` - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CapacityScaler = float64(s1.CapacityScaler) - s.MaxRatePerEndpoint = float64(s1.MaxRatePerEndpoint) - s.MaxRatePerInstance = float64(s1.MaxRatePerInstance) - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendBucket: Represents a Cloud Storage Bucket resource. -// -// This Cloud Storage bucket resource is referenced by a URL map of a -// load -// balancer. For more information, readBackend Buckets. -type BackendBucket struct { - // BucketName: Cloud Storage bucket name. - BucketName string `json:"bucketName,omitempty"` - // CdnPolicy: Cloud CDN configuration for this BackendBucket. - CdnPolicy *BackendBucketCdnPolicy `json:"cdnPolicy,omitempty"` - // CompressionMode: Compress text responses using Brotli or gzip compression, - // based on - // the client's Accept-Encoding header. - // - // Possible values: - // "AUTOMATIC" - Automatically uses the best compression based on the - // Accept-Encoding - // header sent by the client. - // "DISABLED" - Disables compression. Existing compressed responses cached - // by - // Cloud CDN will not be served to clients. - CompressionMode string `json:"compressionMode,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomResponseHeaders: Headers that the Application Load Balancer should add - // to proxied responses. - CustomResponseHeaders []string `json:"customResponseHeaders,omitempty"` - // Description: An optional textual description of the resource; provided by - // the client - // when the resource is created. - Description string `json:"description,omitempty"` - // EdgeSecurityPolicy: [Output Only] The resource URL for the edge security - // policy associated with - // this backend bucket. - EdgeSecurityPolicy string `json:"edgeSecurityPolicy,omitempty"` - // EnableCdn: If true, enable Cloud CDN for this BackendBucket. - EnableCdn bool `json:"enableCdn,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: The value can only be INTERNAL_MANAGED for cross-region - // internal layer 7 - // load balancer. - // - // If loadBalancingScheme is not specified, the backend bucket can be used - // by - // classic global external load balancers, or global application external - // load - // balancers, or both. - // - // Possible values: - // "EXTERNAL_MANAGED" - Signifies that this will be used for regional - // external Application Load - // Balancers. - // "INTERNAL_MANAGED" - Signifies that this will be used for internal - // Application Load Balancers. - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *BackendBucketParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the regional backend - // bucket - // resides. This field is not applicable to global backend buckets. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // UsedBy: [Output Only] List of resources referencing that backend bucket. - UsedBy []*BackendBucketUsedBy `json:"usedBy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucket) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucket - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucketsScopedList resources. - Items map[string]BackendBucketsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketAggregatedListWarning: [Output Only] Informational warning -// message. -type BackendBucketAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicy: Message containing Cloud CDN configuration for a -// backend bucket. -type BackendBucketCdnPolicy struct { - // BypassCacheOnRequestHeaders: Bypass the cache when the specified request - // headers are matched - e.g. - // Pragma or Authorization headers. Up to 5 headers can be specified. - // The cache is bypassed for all cdnPolicy.cacheMode settings. - BypassCacheOnRequestHeaders []*BackendBucketCdnPolicyBypassCacheOnRequestHeader `json:"bypassCacheOnRequestHeaders,omitempty"` - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *BackendBucketCdnPolicyCacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - // CacheMode: Specifies the cache setting for all responses from this - // backend. - // The possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid - // caching - // headers to cache content. Responses without these headers will not be - // cached at Google's edge, and will require a full trip to the origin on - // every request, potentially impacting performance and increasing load on - // the origin server.FORCE_CACHE_ALL Cache all content, ignoring any - // "private", - // "no-store" or "no-cache" directives in Cache-Control response - // headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache - // static content, - // including common image formats, media (video and audio), and web - // assets - // (JavaScript and CSS). Requests and responses that are marked as - // uncacheable, as well as dynamic content (including HTML), will not - // be - // cached. - // - // If no value is provided for cdnPolicy.cacheMode, it defaults - // to CACHE_ALL_STATIC. - // - // Possible values: - // "CACHE_ALL_STATIC" - Automatically cache static content, including common - // image formats, - // media (video and audio), and web assets (JavaScript and CSS). - // Requests and responses that are marked as uncacheable, as well as - // dynamic content (including HTML), will not be cached. - // "FORCE_CACHE_ALL" - Cache all content, ignoring any "private", "no-store" - // or "no-cache" - // directives in Cache-Control response headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content. - // "INVALID_CACHE_MODE" - // "USE_ORIGIN_HEADERS" - Requires the origin to set valid caching headers to - // cache content. - // Responses without these headers will not be cached at Google's edge, - // and will require a full trip to the origin on every request, - // potentially impacting performance and increasing load on the - // origin server. - CacheMode string `json:"cacheMode,omitempty"` - // ClientTtl: Specifies a separate client (e.g. browser client) maximum TTL. - // This is - // used to clamp the max-age (or Expires) value sent to the client. - // With - // FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for - // the - // response max-age directive, along with a "public" directive. For - // cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the - // max-age - // from the origin (if specified), or else sets the response max-age - // directive to the lesser of the client_ttl and default_ttl, and also - // ensures a "public" cache-control directive is present. - // If a client TTL is not specified, a default value (1 hour) will be used. - // The maximum allowed value is 31,622,400s (1 year). - ClientTtl int64 `json:"clientTtl,omitempty"` - // DefaultTtl: Specifies the default TTL for cached content served by this - // origin for - // responses that do not have an existing valid TTL (max-age or - // s-maxage). - // Setting a TTL of "0" means "always revalidate". - // The value of defaultTTL cannot be set to a value greater than that - // of - // maxTTL, but can be equal. - // When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL - // will overwrite the TTL set in all responses. The maximum allowed value - // is - // 31,622,400s (1 year), noting that infrequently accessed objects may - // be - // evicted from the cache before the defined TTL. - DefaultTtl int64 `json:"defaultTtl,omitempty"` - // MaxTtl: Specifies the maximum allowed TTL for cached content served by - // this - // origin. - // Cache directives that attempt to set a max-age or s-maxage higher than - // this, or an Expires header more than maxTTL seconds in the future will - // be capped at the value of maxTTL, as if it were the value of an - // s-maxage Cache-Control directive. - // Headers sent to the client will not be modified. - // Setting a TTL of "0" means "always revalidate". - // The maximum allowed value is 31,622,400s (1 year), noting that - // infrequently accessed objects may be evicted from the cache before - // the defined TTL. - MaxTtl int64 `json:"maxTtl,omitempty"` - // NegativeCaching: Negative caching allows per-status code TTLs to be set, in - // order - // to apply fine-grained caching for common errors or redirects. - // This can reduce the load on your origin and improve end-user - // experience by reducing response latency. - // When the cache mode is set to CACHE_ALL_STATIC or - // USE_ORIGIN_HEADERS, - // negative caching applies to responses with the specified response code - // that lack any Cache-Control, Expires, or Pragma: no-cache directives. - // When the cache mode is set to FORCE_CACHE_ALL, negative caching applies - // to all responses with the specified response code, and override any - // caching headers. - // By default, Cloud CDN will apply the following default TTLs to these - // status codes: - // HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m - // HTTP 404 (Not Found), 410 (Gone), - // 451 (Unavailable For Legal Reasons): 120s - // HTTP 405 (Method Not Found), 501 (Not Implemented): 60s. - // These defaults can be overridden in negative_caching_policy. - NegativeCaching bool `json:"negativeCaching,omitempty"` - // NegativeCachingPolicy: Sets a cache TTL for the specified HTTP status - // code. - // negative_caching must be enabled to configure - // negative_caching_policy. - // Omitting the policy and leaving negative_caching enabled will use - // Cloud CDN's default cache TTLs. - // Note that when specifying an explicit negative_caching_policy, you - // should take care to specify a cache TTL for all response codes - // that you wish to cache. Cloud CDN will not apply any default - // negative caching when a policy exists. - NegativeCachingPolicy []*BackendBucketCdnPolicyNegativeCachingPolicy `json:"negativeCachingPolicy,omitempty"` - // RequestCoalescing: If true then Cloud CDN will combine multiple concurrent - // cache fill - // requests into a small number of requests to the origin. - RequestCoalescing bool `json:"requestCoalescing,omitempty"` - // ServeWhileStale: Serve existing content from the cache (if available) when - // revalidating - // content with the origin, or when an error is encountered when refreshing - // the cache. - // This setting defines the default "max-stale" duration for any - // cached - // responses that do not specify a max-stale directive. Stale responses - // that - // exceed the TTL configured here will not be served. The default - // limit - // (max-stale) is 86400s (1 day), which will allow stale content to be - // served up to this limit beyond the max-age (or s-maxage) of a - // cached - // response. - // The maximum allowed value is 604800 (1 week). - // Set this to zero (0) to disable serve-while-stale. - ServeWhileStale int64 `json:"serveWhileStale,omitempty"` - // SignedUrlCacheMaxAgeSec: Maximum number of seconds the response to a signed - // URL request will be - // considered fresh. After this time period, the response will be - // revalidated before being served. Defaults to 1hr (3600s). When - // serving - // responses to signed URL requests, Cloud CDN will internally behave as - // though all responses from this backend had a "Cache-Control: - // public, max-age=[TTL]" header, regardless of any existing - // Cache-Control header. The actual headers served in responses will not - // be - // altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - // SignedUrlKeyNames: [Output Only] Names of the keys for signing request URLs. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BypassCacheOnRequestHeaders") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BypassCacheOnRequestHeaders") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyBypassCacheOnRequestHeader: Bypass the cache when the -// specified request headers are present, -// e.g. Pragma or Authorization headers. Values are case insensitive. -// The presence of such a header overrides the cache_mode setting. -type BackendBucketCdnPolicyBypassCacheOnRequestHeader struct { - // HeaderName: The header field name to match on when bypassing cache. - // Values are case-insensitive. - HeaderName string `json:"headerName,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyBypassCacheOnRequestHeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyBypassCacheOnRequestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyCacheKeyPolicy: Message containing what to include in -// the cache key for a request for -// Cloud CDN. -type BackendBucketCdnPolicyCacheKeyPolicy struct { - // IncludeHttpHeaders: Allows HTTP request headers (by name) to be used in the - // cache key. - IncludeHttpHeaders []string `json:"includeHttpHeaders,omitempty"` - // QueryStringWhitelist: Names of query string parameters to include in cache - // keys. Default - // parameters are always included. '&' and '=' will be percent encoded - // and not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludeHttpHeaders") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludeHttpHeaders") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyCacheKeyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyCacheKeyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketCdnPolicyNegativeCachingPolicy: Specify CDN TTLs for response -// error codes. -type BackendBucketCdnPolicyNegativeCachingPolicy struct { - // Code: The HTTP status code to define a TTL against. Only HTTP status - // codes - // 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be - // specified as values, and you cannot specify a status code more than - // once. - Code int64 `json:"code,omitempty"` - // Ttl: The TTL (in seconds) for which to cache responses with - // the - // corresponding status code. - // The maximum allowed value is 1800s (30 minutes), noting that - // infrequently accessed objects may be evicted from the cache before - // the - // defined TTL. - Ttl int64 `json:"ttl,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketCdnPolicyNegativeCachingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketCdnPolicyNegativeCachingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketList: Contains a list of BackendBucket resources. -type BackendBucketList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketListWarning: [Output Only] Informational warning message. -type BackendBucketListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListUsable struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendBucket resources. - Items []*BackendBucket `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#usableBackendBucketList - // for lists of usable backend - // buckets. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendBucketListUsableWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsable) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketListUsableWarning: [Output Only] Informational warning message. -type BackendBucketListUsableWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketListUsableWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsableWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsableWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketListUsableWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketListUsableWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketListUsableWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketParams: Additional Backend Bucket parameters. -type BackendBucketParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketParams) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketUsedBy struct { - // Reference: [Output Only] Server-defined URL for UrlMaps referencing - // that - // BackendBucket. - Reference string `json:"reference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketsScopedList struct { - // BackendBuckets: A list of BackendBuckets contained in this scope. - BackendBuckets []*BackendBucket `json:"backendBuckets,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *BackendBucketsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendBuckets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendBuckets") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendBucketsScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type BackendBucketsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendBucketsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendBucketsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendBucketsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendBucketsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendCustomMetric: Custom Metrics are used for CUSTOM_METRICS -// balancing_mode. -type BackendCustomMetric struct { - // DryRun: If true, the metric data is collected and reported to - // Cloud - // Monitoring, but is not used for load balancing. - DryRun bool `json:"dryRun,omitempty"` - // MaxUtilization: Optional parameter to define a target utilization for the - // Custom Metrics - // balancing mode. The valid range is [0.0, 1.0]. - MaxUtilization float64 `json:"maxUtilization,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-64 - // characters - // long and match the regular expression - // `[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the - // first character must be a lowercase letter, and all following - // characters must be a dash, period, underscore, lowercase letter, or - // digit, except the last character, which cannot be a dash, period, - // or - // underscore. For usage guidelines, see Custom Metrics balancing mode. - // This - // field can only be used for a global or regional backend service with - // the - // loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED - // INTERNAL_SELF_MANAGED. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DryRun") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendCustomMetric) MarshalJSON() ([]byte, error) { - type NoMethod BackendCustomMetric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendCustomMetric) UnmarshalJSON(data []byte) error { - type NoMethod BackendCustomMetric - var s1 struct { - MaxUtilization gensupport.JSONFloat64 `json:"maxUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MaxUtilization = float64(s1.MaxUtilization) - return nil -} - -// BackendService: Represents a Backend Service resource. -// -// A backend service defines how Google Cloud load balancers distribute -// traffic. -// The backend service configuration contains a set of values, such as -// the -// protocol used to connect to backends, various distribution and -// session -// settings, health checks, and timeouts. These settings provide -// fine-grained -// control over how your load balancer behaves. Most of the settings -// have -// default values that allow for easy configuration if you need to get -// started -// quickly. -// -// Backend services in Google Compute Engine can be either regionally -// or -// globally scoped. -// -// * Global -// (https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) -// * Regional -// (https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) -// -// For more information, seeBackend -// Services. -type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds. This setting is - // applicable to Application - // Load Balancers and Traffic Director and requires - // GENERATED_COOKIE or HTTP_COOKIE session affinity. - // - // If set to 0, the cookie is non-persistent and lasts only until - // the end of the browser session (or equivalent). The maximum allowed value - // is two weeks (1,209,600). - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - // Backends: The list of backends that serve this BackendService. - Backends []*Backend `json:"backends,omitempty"` - // CdnPolicy: Cloud CDN configuration for this BackendService. Only available - // for - // specified load balancer types. - CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` - CircuitBreakers *CircuitBreakers `json:"circuitBreakers,omitempty"` - // CompressionMode: Compress text responses using Brotli or gzip compression, - // based on - // the client's Accept-Encoding header. - // - // Possible values: - // "AUTOMATIC" - Automatically uses the best compression based on the - // Accept-Encoding - // header sent by the client. - // "DISABLED" - Disables compression. Existing compressed responses cached - // by - // Cloud CDN will not be served to clients. - CompressionMode string `json:"compressionMode,omitempty"` - // ConnectionDraining: connectionDraining cannot be specified with haPolicy. - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` - // ConnectionTrackingPolicy: Connection Tracking configuration for this - // BackendService. Connection - // tracking policy settings are only available for external passthrough - // Network Load Balancers and internal passthrough Network Load - // Balancers. - // - // connectionTrackingPolicy cannot be specified with haPolicy. - ConnectionTrackingPolicy *BackendServiceConnectionTrackingPolicy `json:"connectionTrackingPolicy,omitempty"` - // ConsistentHash: Consistent Hash-based load balancing can be used to provide - // soft session - // affinity based on HTTP headers, cookies or other properties. This - // load - // balancing policy is applicable only for HTTP connections. The affinity to - // a - // particular destination host will be lost when one or more hosts - // are - // added/removed from the destination service. This field specifies - // parameters - // that control consistent hashing. This field is only applicable - // whenlocalityLbPolicy is set to MAGLEV orRING_HASH. - // - // This field is applicable to either: - // - // - A regional backend service with the service_protocol set to HTTP, - // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - // INTERNAL_MANAGED. - // - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. - ConsistentHash *ConsistentHashLoadBalancerSettings `json:"consistentHash,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomMetrics: List of custom metrics that are used for - // theWEIGHTED_ROUND_ROBIN locality_lb_policy. - CustomMetrics []*BackendServiceCustomMetric `json:"customMetrics,omitempty"` - // CustomRequestHeaders: Headers that the load balancer adds to proxied - // requests. See Creating - // custom - // headers (https://cloud.google.com/load-balancing/docs/custom-headers). - CustomRequestHeaders []string `json:"customRequestHeaders,omitempty"` - // CustomResponseHeaders: Headers that the load balancer adds to proxied - // responses. See Creating - // custom - // headers (https://cloud.google.com/load-balancing/docs/custom-headers). - CustomResponseHeaders []string `json:"customResponseHeaders,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DynamicForwarding: Dynamic forwarding configuration. This field is used to - // configure the - // backend service with dynamic forwarding feature which together with - // Service - // Extension allows customized and complex routing logic. - DynamicForwarding *BackendServiceDynamicForwarding `json:"dynamicForwarding,omitempty"` - // EdgeSecurityPolicy: [Output Only] The resource URL for the edge security - // policy associated with - // this backend service. - EdgeSecurityPolicy string `json:"edgeSecurityPolicy,omitempty"` - // EnableCDN: If true, enables Cloud CDN for the backend service of a - // global external Application Load Balancer. - EnableCDN bool `json:"enableCDN,omitempty"` - // ExternalManagedMigrationState: Specifies the canary migration state. - // Possible values are PREPARE, - // TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. - // - // To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must - // be - // changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before - // the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate traffic by percentage - // using - // externalManagedMigrationTestingPercentage. - // - // Rolling back a migration requires the states to be set in reverse order. - // So - // changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state - // to - // be set to TEST_ALL_TRAFFIC at the same time. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate some traffic back - // to - // EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. - // - // Possible values: - // "PREPARE" - // "TEST_ALL_TRAFFIC" - // "TEST_BY_PERCENTAGE" - ExternalManagedMigrationState string `json:"externalManagedMigrationState,omitempty"` - // ExternalManagedMigrationTestingPercentage: Determines the fraction of - // requests that should be processed by the Global - // external Application Load Balancer. - // - // The value of this field must be in the range [0, 100]. - // - // Session affinity options will slightly affect this routing behavior, - // for - // more details, see:Session - // Affinity. - // - // This value can only be set if the loadBalancingScheme in the - // BackendService - // is set to EXTERNAL (when using the classic Application Load Balancer) - // and - // the migration state is TEST_BY_PERCENTAGE. - ExternalManagedMigrationTestingPercentage float64 `json:"externalManagedMigrationTestingPercentage,omitempty"` - // FailoverPolicy: Requires at least one backend instance group to be - // defined - // as a backup (failover) backend. - // For load balancers that have configurable failover: - // Internal passthrough Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external passthrough Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - // - // failoverPolicy cannot be specified with haPolicy. - FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a BackendService. An up-to-date fingerprint must be provided - // in - // order to update the BackendService, otherwise the request will - // fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a BackendService. - Fingerprint string `json:"fingerprint,omitempty"` - // HaPolicy: Configures self-managed High Availability (HA) for External and - // Internal - // Protocol Forwarding. - // - // The backends of this regional backend service must only specify - // zonal - // network endpoint groups (NEGs) of type GCE_VM_IP. - // - // When haPolicy is set for an Internal Passthrough Network Load Balancer, - // the - // regional backend service must set the network field. All zonal NEGs - // must - // belong to the same network. However, individual NEGs can - // belong to different subnetworks of that network. - // - // When haPolicy is specified, the set of attached network endpoints across - // all backends comprise an High Availability domain from which one endpoint - // is selected as the active endpoint (the leader) that receives - // all - // traffic. - // - // haPolicy can be added only at backend service creation time. Once set up, - // it cannot be deleted. - // - // Note that haPolicy is not for load balancing, and therefore cannot - // be - // specified with sessionAffinity, connectionTrackingPolicy, - // and - // failoverPolicy. - // - // haPolicy requires customers to be responsible for tracking backend - // endpoint health and electing a leader among the healthy - // endpoints. - // Therefore, haPolicy cannot be specified with healthChecks. - // - // haPolicy can only be specified for External Passthrough Network - // Load - // Balancers and Internal Passthrough Network Load Balancers. - HaPolicy *BackendServiceHAPolicy `json:"haPolicy,omitempty"` - // HealthChecks: The list of URLs to the healthChecks, httpHealthChecks - // (legacy), or - // httpsHealthChecks (legacy) resource for health checking this - // backend - // service. Not all backend services support legacy health checks. See - // Load balancer guide. Currently, at most one health check can be - // specified for each backend service. Backend services with - // instance group or zonal NEG backends must have a health check - // unless - // haPolicy is specified. Backend services with internet or serverless - // NEG - // backends must not have a health check. - // - // healthChecks[] cannot be specified with haPolicy. - HealthChecks []string `json:"healthChecks,omitempty"` - // Iap: The configurations for Identity-Aware Proxy on this resource. - // Not available for internal passthrough Network Load Balancers and - // external - // passthrough Network Load Balancers. - Iap *BackendServiceIAP `json:"iap,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpAddressSelectionPolicy: Specifies a preference for traffic sent from the - // proxy to the backend (or - // from the client to the backend for proxyless gRPC). - // The possible values are: - // - // - IPV4_ONLY: Only send IPv4 traffic to the backends of the - // backend service (Instance Group, Managed Instance Group, Network - // Endpoint - // Group), regardless of traffic from the client to the proxy. Only IPv4 - // health checks are used to check the health of the backends. This is the - // default setting. - // - PREFER_IPV6: Prioritize the connection to the endpoint's - // IPv6 address over its IPv4 address (provided there is a healthy IPv6 - // address). - // - IPV6_ONLY: Only send IPv6 traffic to the backends of the - // backend service (Instance Group, Managed Instance Group, Network - // Endpoint - // Group), regardless of traffic from the client to the proxy. Only IPv6 - // health checks are used to check the health of the backends. - // - // - // - // This field is applicable to either: - // - // - Advanced global external Application Load Balancer (load balancing - // scheme EXTERNAL_MANAGED), - // - Regional external Application Load - // Balancer, - // - Internal proxy Network Load Balancer (load balancing - // scheme INTERNAL_MANAGED), - // - Regional internal Application Load - // Balancer (load balancing scheme INTERNAL_MANAGED), - // - Traffic - // Director with Envoy proxies and proxyless gRPC (load balancing scheme - // INTERNAL_SELF_MANAGED). - // - // Possible values: - // "IPV4_ONLY" - Only send IPv4 traffic to the backends of the Backend - // Service - // (Instance Group, Managed Instance Group, Network Endpoint Group) - // regardless of traffic from the client to the proxy. - // Only IPv4 health-checks are used to check the health of the backends. - // This is the default setting. - // "IPV6_ONLY" - Only send IPv6 traffic to the backends of the Backend - // Service - // (Instance Group, Managed Instance Group, Network Endpoint Group) - // regardless of traffic from the client to the proxy. Only IPv6 - // health-checks are used to check the health of the backends. - // "IP_ADDRESS_SELECTION_POLICY_UNSPECIFIED" - Unspecified IP address - // selection policy. - // "PREFER_IPV6" - Prioritize the connection to the endpoints IPv6 - // address - // over its IPv4 address (provided there is a healthy IPv6 address). - IpAddressSelectionPolicy string `json:"ipAddressSelectionPolicy,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#backendService - // for backend services. - Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: Specifies the load balancer type. A backend - // service - // created for one type of load balancer cannot be used with another. - // For more information, refer toChoosing - // a load balancer. - // - // Possible values: - // "EXTERNAL" - Signifies that this will be used for classic Application Load - // Balancers, - // global external proxy Network Load Balancers, - // or external passthrough Network Load Balancers. - // "EXTERNAL_MANAGED" - Signifies that this will be used for global external - // Application Load - // Balancers, regional external Application Load Balancers, or - // regional - // external proxy Network Load Balancers. - // "INTERNAL" - Signifies that this will be used for internal passthrough - // Network Load - // Balancers. - // "INTERNAL_MANAGED" - Signifies that this will be used for internal - // Application Load Balancers. - // "INTERNAL_SELF_MANAGED" - Signifies that this will be used by Traffic - // Director. - // "INVALID_LOAD_BALANCING_SCHEME" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // LocalityLbPolicies: A list of locality load-balancing policies to be used in - // order of - // preference. When you use localityLbPolicies, you must set at least one - // value for either the localityLbPolicies[].policy or - // the - // localityLbPolicies[].customPolicy field. localityLbPolicies overrides - // any - // value set in the localityLbPolicy field. - // - // For an example of how to use this field, seeDefine - // a list of preferred policies. - // - // Caution: This field and its children are intended for use in a service - // mesh - // that includes gRPC clients only. Envoy proxies can't use backend - // services - // that have this configuration. - LocalityLbPolicies []*BackendServiceLocalityLoadBalancingPolicyConfig `json:"localityLbPolicies,omitempty"` - // LocalityLbPolicy: The load balancing algorithm used within the scope of the - // locality. The - // possible values are: - // - // - ROUND_ROBIN: This is a simple policy in which each healthy - // backend is selected in round robin order. This is the default. - // - LEAST_REQUEST: An O(1) algorithm which - // selects two random healthy hosts and picks the host which has fewer - // active - // requests. - // - RING_HASH: The ring/modulo hash load balancer implements - // consistent hashing to backends. The algorithm has the property that the - // addition/removal of a host from a set of N hosts only affects 1/N of the - // requests. - // - RANDOM: The load balancer selects a random healthy - // host. - // - ORIGINAL_DESTINATION: Backend host is selected - // based on the client connection metadata, i.e., connections are opened to - // the same address as the destination address of the incoming connection - // before the connection was redirected to the load balancer. - // - MAGLEV: used as a drop in replacement for the ring hash - // load balancer. Maglev is not as stable as ring hash but has faster table - // lookup build times and host selection times. For more information about - // Maglev, see Maglev: - // A Fast and Reliable Software Network Load Balancer. - // - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin - // Load Balancing using weights computed from Backend reported Custom - // Metrics. - // If set, the Backend Service responses are expected to contain - // non-standard - // HTTP response header field Endpoint-Load-Metrics. The reported - // metrics to use for computing the weights are specified via - // thecustomMetrics field. - // - // This field is applicable to either: - // - A regional backend service with the service_protocol set to HTTP, - // HTTPS, HTTP2 or H2C, and load_balancing_scheme set to - // INTERNAL_MANAGED. - // - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, - // or - // EXTERNAL_MANAGED. - // - // - // If sessionAffinity is not configured—that is, if session - // affinity remains at the default value of NONE—then the - // default value for localityLbPolicy - // is ROUND_ROBIN. If session affinity is set to a value other - // than NONE, - // then the default value for localityLbPolicy isMAGLEV. - // - // Only ROUND_ROBIN and RING_HASH are supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // localityLbPolicy cannot be specified with haPolicy. - // - // Possible values: - // "INVALID_LB_POLICY" - // "LEAST_REQUEST" - An O(1) algorithm which selects two random healthy hosts - // and - // picks the host which has fewer active requests. - // "MAGLEV" - This algorithm implements consistent hashing to backends. - // Maglev can be - // used as a drop in replacement for the ring hash load balancer. Maglev is - // not as stable as ring hash but has faster table lookup build times and - // host selection times. For more information about Maglev, seeMaglev: - // A Fast and Reliable Software Network Load Balancer. - // "ORIGINAL_DESTINATION" - Backend host is selected based on the client - // connection metadata, i.e., - // connections are opened to the same address as the destination address of - // the incoming connection before the connection was redirected to the - // load - // balancer. - // "RANDOM" - The load balancer selects a random healthy host. - // "RING_HASH" - The ring/modulo hash load balancer implements consistent - // hashing to - // backends. The algorithm has the property that the addition/removal - // of a host from a set of N hosts only affects 1/N of the requests. - // "ROUND_ROBIN" - This is a simple policy in which each healthy backend is - // selected - // in round robin order. This is the default. - // "WEIGHTED_GCP_RENDEZVOUS" - Per-instance weighted Load Balancing via - // health check reported weights. - // In internal passthrough network load balancing, it is weighted - // rendezvous hashing. - // This option is only supported in internal passthrough network - // load - // balancing. - // "WEIGHTED_MAGLEV" - Per-instance weighted Load Balancing via health check - // reported weights. - // If set, the Backend Service must configure a non legacy HTTP-based - // Health - // Check, and health check replies are expected to contain non-standard - // HTTP - // response header field X-Load-Balancing-Endpoint-Weight to specify - // the - // per-instance weights. - // If set, Load Balancing is weighted based on the - // per-instance weights reported in the last processed health check replies, - // as long as every instance either reported a valid weight or - // had - // UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. - // This option is only supported in Network Load Balancing. - // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing - // using weights computed - // from Backend reported Custom Metrics. If set, the Backend Service - // responses are expected to contain non-standard HTTP response header - // field - // Endpoint-Load-Metrics. The reported metrics - // to use for computing the weights are specified via the - // customMetrics fields. - LocalityLbPolicy string `json:"localityLbPolicy,omitempty"` - // LogConfig: This field denotes the logging options for the load balancer - // traffic served - // by this backend service. If logging is enabled, logs will be exported - // to - // Stackdriver. - LogConfig *BackendServiceLogConfig `json:"logConfig,omitempty"` - // MaxStreamDuration: Specifies the default maximum duration (timeout) for - // streams to this - // service. Duration is computed from the beginning of the stream until - // the - // response has been completely processed, including all retries. A stream - // that does not complete in this duration is closed. - // - // If not specified, there will be no timeout limit, i.e. the maximum - // duration is infinite. - // - // This value can be overridden in the PathMatcher configuration of the - // UrlMap that references this backend service. - // - // This field is only allowed when the loadBalancingScheme of - // the backend service is INTERNAL_SELF_MANAGED. - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` - // Metadatas: Deployment metadata associated with the resource to be set by a - // GKE hub - // controller and read by the backend RCTH - Metadatas map[string]string `json:"metadatas,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which this backend service belongs. - // - // This field must be set for Internal Passthrough Network Load Balancers - // when - // the haPolicy is enabled, and for External Passthrough Network Load - // Balancers when the haPolicy fastIpMove is enabled. - // - // This field can only be specified when the load balancing scheme is set - // toINTERNAL, or when the load balancing scheme is set toEXTERNAL and haPolicy - // fastIpMove is enabled. - Network string `json:"network,omitempty"` - // NetworkPassThroughLbTrafficPolicy: Configures traffic steering properties of - // internal passthrough Network - // Load Balancers. - // - // networkPassThroughLbTrafficPolicy cannot be specified with haPolicy. - NetworkPassThroughLbTrafficPolicy *BackendServiceNetworkPassThroughLbTrafficPolicy `json:"networkPassThroughLbTrafficPolicy,omitempty"` - // OutlierDetection: Settings controlling the ejection of unhealthy backend - // endpoints from the - // load balancing pool of each individual proxy instance that processes - // the - // traffic for the given backend service. If not set, this feature - // is - // considered disabled. - // - // Results of the outlier detection algorithm (ejection of endpoints from - // the - // load balancing pool and returning them back to the pool) are - // executed - // independently by each proxy instance of the load balancer. In most - // cases, - // more than one proxy instance handles the traffic received by a - // backend - // service. Thus, it is possible that an unhealthy endpoint is detected - // and - // ejected by only some of the proxies, and while this happens, other - // proxies - // may continue to send requests to the same unhealthy endpoint until - // they - // detect and eject the unhealthy endpoint. - // - // Applicable backend endpoints can be: - // - // - VM instances in an Instance Group - // - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - // - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - // - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud - // Functions Services - // - Private Service Connect NEGs, that resolve to - // Google-managed regional API endpoints or managed services published - // using - // Private Service Connect - // - // - // - // Applicable backend service types can be: - // - // - A global backend service with the loadBalancingScheme set to - // INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - // - A regional backend - // service with the serviceProtocol set to HTTP, HTTPS, HTTP2 or H2C, and - // loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not - // supported for Serverless NEGs. - // - // - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *BackendServiceParams `json:"params,omitempty"` - // Port: Deprecated in favor of portName. The TCP port to connect on - // the backend. The default value is 80. - // For internal passthrough Network Load Balancers and external - // passthrough - // Network Load Balancers, omit port. - Port int64 `json:"port,omitempty"` - // PortName: A named port on a backend instance group representing the port - // for - // communication to the backend VMs in that group. The - // named port must be defined on each backend instance - // group - // (https://cloud.google.com/load-balancing/docs/backend-service#named_ports). - // This parameter has no meaning if the backends are NEGs. For - // internal - // passthrough Network Load Balancers and external passthrough Network - // Load - // Balancers, omit port_name. - PortName string `json:"portName,omitempty"` - // Protocol: The protocol this BackendService uses to communicate - // with backends. - // - // Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP or - // GRPC. - // depending on the chosen load balancer or Traffic Director - // configuration. - // Refer to the documentation for the load balancers or for Traffic - // Director - // for more information. - // - // Must be set to GRPC when the backend service is referenced by a URL map - // that is bound to target gRPC proxy. - // - // Possible values: - // "GRPC" - gRPC (available for Traffic Director). - // "H2C" - HTTP2 over cleartext - // "HTTP" - // "HTTP2" - HTTP/2 with SSL. - // "HTTPS" - // "SSL" - TCP proxying with SSL. - // "TCP" - TCP proxying or TCP pass-through. - // "UDP" - UDP. - // "UNSPECIFIED" - If a Backend Service has UNSPECIFIED as its protocol, it - // can be used with - // any L3/L4 Forwarding Rules. - Protocol string `json:"protocol,omitempty"` - // Region: [Output Only] URL of the region where the regional backend - // service - // resides. This field is not applicable to global backend services. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // backend service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SecuritySettings: This field specifies the security settings that apply to - // this backend - // service. This field is applicable to a global backend service with - // the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. - SecuritySettings *SecuritySettings `json:"securitySettings,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ServiceBindings: URLs of networkservices.ServiceBinding resources. - // - // Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. - // If set, lists of backends and health checks must be both empty. - ServiceBindings []string `json:"serviceBindings,omitempty"` - // ServiceLbPolicy: URL to networkservices.ServiceLbPolicy resource. - // - // Can only be set if load balancing scheme is - // EXTERNAL_MANAGED, - // INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global. - ServiceLbPolicy string `json:"serviceLbPolicy,omitempty"` - // SessionAffinity: Type of session affinity to use. The default is NONE. - // - // Only NONE and HEADER_FIELD are supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // For more details, see: - // Session - // Affinity - // (https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). - // - // sessionAffinity cannot be specified with haPolicy. - // - // Possible values: - // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP - // addresses. Connections - // from the same source IP address to the same destination IP address will - // be - // served by the same backend VM while that VM remains healthy. - // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source IP - // address. Connections from the - // same source IP address will be served by the same backend VM while that - // VM - // remains healthy. This option can only be used for Internal TCP/UDP - // Load Balancing. - // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and destination - // IP addresses, IP protocol, - // and source and destination ports. Connections for the same IP protocol - // from the same source IP address and port to the same destination IP - // address - // and port will be served by the same backend VM while that VM - // remains - // healthy. This option cannot be used for HTTP(S) load balancing. - // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination IP - // addresses, and IP - // protocol. Connections for the same IP protocol from the same source - // IP - // address to the same destination IP address will be served by the - // same - // backend VM while that VM remains healthy. This option cannot be used - // for - // HTTP(S) load balancing. - // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 - // loadbalancer. - // Only valid for HTTP(S) load balancing. - // "HEADER_FIELD" - The hash is based on a user specified header field. - // "HTTP_COOKIE" - The hash is based on a user provided cookie. - // "NONE" - No session affinity. Connections from the same client IP may - // go - // to any instance in the pool. - // "STRONG_COOKIE_AFFINITY" - Strong cookie-based affinity. Connections - // bearing the same cookie will be - // served by the same backend VM while that VM remains healthy, as long as - // the - // cookie has not expired. - SessionAffinity string `json:"sessionAffinity,omitempty"` - // StrongSessionAffinityCookie: Describes the HTTP cookie used for stateful - // session affinity. This field is - // applicable and required if the sessionAffinity is set - // toSTRONG_COOKIE_AFFINITY. - StrongSessionAffinityCookie *BackendServiceHttpCookie `json:"strongSessionAffinityCookie,omitempty"` - // Subsetting: subsetting cannot be specified with haPolicy. - Subsetting *Subsetting `json:"subsetting,omitempty"` - // TimeoutSec: The backend service timeout has a different meaning depending on - // the - // type of load balancer. For more information see, - // Backend service settings. - // The default is 30 seconds. - // The full range of timeout values allowed goes from 1 - // through 2,147,483,647 seconds. - // - // This value can be overridden in the PathMatcher configuration of the - // UrlMap that references this backend service. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to - // true. - // Instead, use maxStreamDuration. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // TlsSettings: Configuration for Backend Authenticated TLS and mTLS. May only - // be specified - // when the backend protocol is SSL, HTTPS or HTTP2. - TlsSettings *BackendServiceTlsSettings `json:"tlsSettings,omitempty"` - // UsedBy: [Output Only] List of resources referencing given backend service. - UsedBy []*BackendServiceUsedBy `json:"usedBy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AffinityCookieTtlSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendService) MarshalJSON() ([]byte, error) { - type NoMethod BackendService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendService) UnmarshalJSON(data []byte) error { - type NoMethod BackendService - var s1 struct { - ExternalManagedMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedMigrationTestingPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExternalManagedMigrationTestingPercentage = float64(s1.ExternalManagedMigrationTestingPercentage) - return nil -} - -// BackendServiceAggregatedList: Contains a list of BackendServicesScopedList. -type BackendServiceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendServicesScopedList resources. - Items map[string]BackendServicesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceAggregatedListWarning: [Output Only] Informational warning -// message. -type BackendServiceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicy: Message containing Cloud CDN configuration for a -// backend service. -type BackendServiceCdnPolicy struct { - // BypassCacheOnRequestHeaders: Bypass the cache when the specified request - // headers are matched - e.g. - // Pragma or Authorization headers. Up to 5 headers can be specified. - // The cache is bypassed for all cdnPolicy.cacheMode settings. - BypassCacheOnRequestHeaders []*BackendServiceCdnPolicyBypassCacheOnRequestHeader `json:"bypassCacheOnRequestHeaders,omitempty"` - // CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy. - CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"` - // CacheMode: Specifies the cache setting for all responses from this - // backend. - // The possible values are:USE_ORIGIN_HEADERS Requires the origin to set valid - // caching - // headers to cache content. Responses without these headers will not be - // cached at Google's edge, and will require a full trip to the origin on - // every request, potentially impacting performance and increasing load on - // the origin server.FORCE_CACHE_ALL Cache all content, ignoring any - // "private", - // "no-store" or "no-cache" directives in Cache-Control response - // headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content.CACHE_ALL_STATIC Automatically cache - // static content, - // including common image formats, media (video and audio), and web - // assets - // (JavaScript and CSS). Requests and responses that are marked as - // uncacheable, as well as dynamic content (including HTML), will not - // be - // cached. - // - // If no value is provided for cdnPolicy.cacheMode, it defaults - // to CACHE_ALL_STATIC. - // - // Possible values: - // "CACHE_ALL_STATIC" - Automatically cache static content, including common - // image formats, - // media (video and audio), and web assets (JavaScript and CSS). - // Requests and responses that are marked as uncacheable, as well as - // dynamic content (including HTML), will not be cached. - // "FORCE_CACHE_ALL" - Cache all content, ignoring any "private", "no-store" - // or "no-cache" - // directives in Cache-Control response headers. - // Warning: this may result in Cloud CDN caching private, - // per-user (user identifiable) content. - // "INVALID_CACHE_MODE" - // "USE_ORIGIN_HEADERS" - Requires the origin to set valid caching headers to - // cache content. - // Responses without these headers will not be cached at Google's edge, - // and will require a full trip to the origin on every request, - // potentially impacting performance and increasing load on the - // origin server. - CacheMode string `json:"cacheMode,omitempty"` - // ClientTtl: Specifies a separate client (e.g. browser client) maximum TTL. - // This is - // used to clamp the max-age (or Expires) value sent to the client. - // With - // FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for - // the - // response max-age directive, along with a "public" directive. For - // cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the - // max-age - // from the origin (if specified), or else sets the response max-age - // directive to the lesser of the client_ttl and default_ttl, and also - // ensures a "public" cache-control directive is present. - // If a client TTL is not specified, a default value (1 hour) will be used. - // The maximum allowed value is 31,622,400s (1 year). - ClientTtl int64 `json:"clientTtl,omitempty"` - // DefaultTtl: Specifies the default TTL for cached content served by this - // origin for - // responses that do not have an existing valid TTL (max-age or - // s-maxage). - // Setting a TTL of "0" means "always revalidate". - // The value of defaultTTL cannot be set to a value greater than that - // of - // maxTTL, but can be equal. - // When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL - // will overwrite the TTL set in all responses. The maximum allowed value - // is - // 31,622,400s (1 year), noting that infrequently accessed objects may - // be - // evicted from the cache before the defined TTL. - DefaultTtl int64 `json:"defaultTtl,omitempty"` - // MaxTtl: Specifies the maximum allowed TTL for cached content served by - // this - // origin. - // Cache directives that attempt to set a max-age or s-maxage higher than - // this, or an Expires header more than maxTTL seconds in the future will - // be capped at the value of maxTTL, as if it were the value of an - // s-maxage Cache-Control directive. - // Headers sent to the client will not be modified. - // Setting a TTL of "0" means "always revalidate". - // The maximum allowed value is 31,622,400s (1 year), noting that - // infrequently accessed objects may be evicted from the cache before - // the defined TTL. - MaxTtl int64 `json:"maxTtl,omitempty"` - // NegativeCaching: Negative caching allows per-status code TTLs to be set, in - // order - // to apply fine-grained caching for common errors or redirects. - // This can reduce the load on your origin and improve end-user - // experience by reducing response latency. - // When the cache mode is set to CACHE_ALL_STATIC or - // USE_ORIGIN_HEADERS, - // negative caching applies to responses with the specified response code - // that lack any Cache-Control, Expires, or Pragma: no-cache directives. - // When the cache mode is set to FORCE_CACHE_ALL, negative caching applies - // to all responses with the specified response code, and override any - // caching headers. - // By default, Cloud CDN will apply the following default TTLs to these - // status codes: - // HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m - // HTTP 404 (Not Found), 410 (Gone), - // 451 (Unavailable For Legal Reasons): 120s - // HTTP 405 (Method Not Found), 501 (Not Implemented): 60s. - // These defaults can be overridden in negative_caching_policy. - NegativeCaching bool `json:"negativeCaching,omitempty"` - // NegativeCachingPolicy: Sets a cache TTL for the specified HTTP status - // code. - // negative_caching must be enabled to configure - // negative_caching_policy. - // Omitting the policy and leaving negative_caching enabled will use - // Cloud CDN's default cache TTLs. - // Note that when specifying an explicit negative_caching_policy, you - // should take care to specify a cache TTL for all response codes - // that you wish to cache. Cloud CDN will not apply any default - // negative caching when a policy exists. - NegativeCachingPolicy []*BackendServiceCdnPolicyNegativeCachingPolicy `json:"negativeCachingPolicy,omitempty"` - // RequestCoalescing: If true then Cloud CDN will combine multiple concurrent - // cache fill - // requests into a small number of requests to the origin. - RequestCoalescing bool `json:"requestCoalescing,omitempty"` - // ServeWhileStale: Serve existing content from the cache (if available) when - // revalidating - // content with the origin, or when an error is encountered when refreshing - // the cache. - // This setting defines the default "max-stale" duration for any - // cached - // responses that do not specify a max-stale directive. Stale responses - // that - // exceed the TTL configured here will not be served. The default - // limit - // (max-stale) is 86400s (1 day), which will allow stale content to be - // served up to this limit beyond the max-age (or s-maxage) of a - // cached - // response. - // The maximum allowed value is 604800 (1 week). - // Set this to zero (0) to disable serve-while-stale. - ServeWhileStale int64 `json:"serveWhileStale,omitempty"` - // SignedUrlCacheMaxAgeSec: Maximum number of seconds the response to a signed - // URL request will be - // considered fresh. After this time period, the response will be - // revalidated before being served. Defaults to 1hr (3600s). When - // serving - // responses to signed URL requests, Cloud CDN will internally behave as - // though all responses from this backend had a "Cache-Control: - // public, max-age=[TTL]" header, regardless of any existing - // Cache-Control header. The actual headers served in responses will not - // be - // altered. - SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"` - // SignedUrlKeyNames: [Output Only] Names of the keys for signing request URLs. - SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BypassCacheOnRequestHeaders") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BypassCacheOnRequestHeaders") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicyBypassCacheOnRequestHeader: Bypass the cache when the -// specified request headers are present, -// e.g. Pragma or Authorization headers. Values are case insensitive. -// The presence of such a header overrides the cache_mode setting. -type BackendServiceCdnPolicyBypassCacheOnRequestHeader struct { - // HeaderName: The header field name to match on when bypassing cache. - // Values are case-insensitive. - HeaderName string `json:"headerName,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicyBypassCacheOnRequestHeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicyBypassCacheOnRequestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCdnPolicyNegativeCachingPolicy: Specify CDN TTLs for response -// error codes. -type BackendServiceCdnPolicyNegativeCachingPolicy struct { - // Code: The HTTP status code to define a TTL against. Only HTTP status - // codes - // 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 can be - // specified as values, and you cannot specify a status code more than - // once. - Code int64 `json:"code,omitempty"` - // Ttl: The TTL (in seconds) for which to cache responses with - // the - // corresponding status code. - // The maximum allowed value is 1800s (30 minutes), noting that - // infrequently accessed objects may be evicted from the cache before - // the - // defined TTL. - Ttl int64 `json:"ttl,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCdnPolicyNegativeCachingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCdnPolicyNegativeCachingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceConnectionTrackingPolicy: Connection Tracking configuration -// for this BackendService. -type BackendServiceConnectionTrackingPolicy struct { - // ConnectionPersistenceOnUnhealthyBackends: Specifies connection persistence - // when backends are unhealthy. The default - // value is DEFAULT_FOR_PROTOCOL. - // - // If set to DEFAULT_FOR_PROTOCOL, the existing connections - // persist on unhealthy backends only for connection-oriented protocols - // (TCP and SCTP) and only if the Tracking Mode isPER_CONNECTION (default - // tracking mode) or the Session - // Affinity is configured for 5-tuple. They do not persist forUDP. - // - // If set to NEVER_PERSIST, after a backend becomes unhealthy, - // the existing connections on the unhealthy backend are never persisted on - // the unhealthy backend. They are always diverted to newly selected - // healthy - // backends (unless all backends are unhealthy). - // - // If set to ALWAYS_PERSIST, existing connections always - // persist on unhealthy backends regardless of protocol and session - // affinity. It is generally not recommended to use this mode overriding - // the - // default. - // - // For more details, see Connection Persistence for Network Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#connection-persistence) - // and Connection Persistence for Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal#connection-persistence). - // - // Possible values: - // "ALWAYS_PERSIST" - // "DEFAULT_FOR_PROTOCOL" - // "NEVER_PERSIST" - ConnectionPersistenceOnUnhealthyBackends string `json:"connectionPersistenceOnUnhealthyBackends,omitempty"` - // EnableStrongAffinity: Enable Strong Session Affinity for external - // passthrough Network Load - // Balancers. This option is not available publicly. - EnableStrongAffinity bool `json:"enableStrongAffinity,omitempty"` - // IdleTimeoutSec: Specifies how long to keep a Connection Tracking entry while - // there is no - // matching traffic (in seconds). - // - // For internal passthrough Network Load Balancers: - // - // - The minimum (default) is 10 minutes and the maximum is 16 hours. - // - It can be set only if Connection Tracking is less than 5-tuple - // (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION,CLIENT_IP or - // CLIENT_IP_PROTO, and Tracking - // Mode is PER_SESSION). - // - // - // - // For external passthrough Network Load Balancers the default is 60 - // seconds. This option is not available publicly. - IdleTimeoutSec int64 `json:"idleTimeoutSec,omitempty"` - // TrackingMode: Specifies the key used for connection tracking. There are - // two - // options: - // - // - PER_CONNECTION: This is the default mode. The Connection - // Tracking is performed as per the Connection Key (default Hash Method) - // for - // the specific protocol. - // - PER_SESSION: The Connection Tracking is performed as per - // the configured Session Affinity. It matches the configured Session - // Affinity. - // - // - // - // For more details, see Tracking Mode for Network Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-backend-service#tracking-mode) - // and Tracking Mode for Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal#tracking-mode). - // - // Possible values: - // "INVALID_TRACKING_MODE" - // "PER_CONNECTION" - // "PER_SESSION" - TrackingMode string `json:"trackingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ConnectionPersistenceOnUnhealthyBackends") to unconditionally include in - // API requests. By default, fields with empty or default values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ConnectionPersistenceOnUnhealthyBackends") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted from - // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields - // for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceConnectionTrackingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceConnectionTrackingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceCustomMetric: Custom Metrics are used for -// WEIGHTED_ROUND_ROBIN -// locality_lb_policy. -type BackendServiceCustomMetric struct { - // DryRun: If true, the metric data is not used for load balancing. - DryRun bool `json:"dryRun,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-64 - // characters - // long and match the regular expression - // `[a-z]([-_.a-z0-9]*[a-z0-9])?` which means that the - // first character must be a lowercase letter, and all following - // characters must be a dash, period, underscore, lowercase letter, or - // digit, except the last character, which cannot be a dash, period, - // or - // underscore. For usage guidelines, see Custom Metrics balancing mode. - // This - // field can only be used for a global or regional backend service with - // the - // loadBalancingScheme set to EXTERNAL_MANAGED,INTERNAL_MANAGED - // INTERNAL_SELF_MANAGED. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DryRun") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceCustomMetric) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCustomMetric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceDynamicForwarding: Defines a dynamic forwarding configuration -// for the backend service. -type BackendServiceDynamicForwarding struct { - // IpPortSelection: IP:PORT based dynamic forwarding configuration. - IpPortSelection *BackendServiceDynamicForwardingIpPortSelection `json:"ipPortSelection,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpPortSelection") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpPortSelection") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceDynamicForwarding) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceDynamicForwarding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceDynamicForwardingIpPortSelection: Defines a IP:PORT based -// dynamic forwarding configuration for the backend -// service. Some ranges are restricted: Restricted -// ranges. -type BackendServiceDynamicForwardingIpPortSelection struct { - // Enabled: A boolean flag enabling IP:PORT based dynamic forwarding. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceDynamicForwardingIpPortSelection) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceDynamicForwardingIpPortSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceFailoverPolicy: For load balancers that have -// configurable -// failover: -// Internal passthrough Network Load -// Balancers -// (https://cloud.google.com/load-balancing/docs/internal/failover-overview) -// and external passthrough -// Network Load -// Balancers -// (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). -// On failover or failback, this field indicates whether connection -// draining -// will be honored. Google Cloud has a fixed connection draining timeout of -// 10 minutes. A setting of true terminates existing TCP -// connections to the active pool during failover and failback, -// immediately -// draining traffic. A setting of false allows existing TCP -// connections to persist, even on VMs no longer in the active pool, for up -// to the duration of the connection draining timeout (10 minutes). -type BackendServiceFailoverPolicy struct { - // DisableConnectionDrainOnFailover: This can be set to true only if the - // protocol isTCP. - // - // The default is false. - DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"` - // DropTrafficIfUnhealthy: If set to true, connections to the - // load balancer are dropped when all primary and all backup backend VMs - // are - // unhealthy.If set to false, connections are distributed - // among all primary VMs when all primary and all backup backend VMs are - // unhealthy. - // For load balancers that have configurable - // failover: - // Internal passthrough - // Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external passthrough - // Network Load - // Balancers - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - // The default is false. - DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"` - // FailoverRatio: The value of the field must be in the range[0, 1]. If the - // value is 0, the load balancer performs a - // failover when the number of healthy primary VMs equals zero. - // For all other values, the load balancer performs a failover when the - // total number of healthy primary VMs is less than this ratio. - // For load balancers that have configurable - // failover: - // Internal TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/internal/failover-overview) - // and external TCP/UDP Load - // Balancing - // (https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview). - FailoverRatio float64 `json:"failoverRatio,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DisableConnectionDrainOnFailover") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DisableConnectionDrainOnFailover") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceFailoverPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceFailoverPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceFailoverPolicy) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceFailoverPolicy - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type BackendServiceGroupHealth struct { - // Annotations: Metadata defined as annotations on the network endpoint group. - Annotations map[string]string `json:"annotations,omitempty"` - // HealthStatus: Health state of the backend instances or endpoints in - // requested instance or - // network endpoint group, determined based on configured health checks. - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#backendServiceGroupHealth for the health of backend - // services. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceGroupHealth) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceGroupHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicy struct { - // FastIPMove: Specifies whether fast IP move is enabled, and if so, the - // mechanism to - // achieve it. - // - // Supported values are: - // - // - DISABLED: Fast IP Move is disabled. You can only use the - // haPolicy.leader API to update the leader. - // - >GARP_RA: Provides a method to very quickly define a new network - // endpoint as the leader. This method is faster than updating the leader - // using the haPolicy.leader API. Fast IP move works as follows: The VM - // hosting the network endpoint that should become the new leader sends - // either a Gratuitous ARP (GARP) packet (IPv4) or an ICMPv6 Router - // Advertisement(RA) packet (IPv6). Google Cloud immediately but - // temporarily associates the forwarding rule IP address with that VM, and - // both new and in-flight packets are quickly delivered to that VM. - // - // - // - // Note the important properties of the Fast IP Move functionality: - // - // - The GARP/RA-initiated re-routing stays active for approximately 20 - // minutes. After triggering fast failover, you must also - // appropriately set the haPolicy.leader. - // - The new leader instance should continue to send GARP/RA packets - // periodically every 10 seconds until at least 10 minutes after updating - // the haPolicy.leader (but stop immediately if it is no longer the - // leader). - // - After triggering a fast failover, we recommend that you wait at least - // 3 seconds before sending another GARP/RA packet from a different VM - // instance to avoid race conditions. - // - Don't send GARP/RA packets from different VM - // instances at the same time. If multiple instances continue to send - // GARP/RA packets, traffic might be routed to different destinations in an - // alternating order. This condition ceases when a single instance - // issues a GARP/RA packet. - // - The GARP/RA request always takes priority over the leader API. - // Using the haPolicy.leader API to change the leader to a different - // instance will have no effect until the GARP/RA request becomes - // inactive. - // - The GARP/RA packets should follow the GARP/RA - // Packet Specifications.. - // - When multiple forwarding rules refer to a regional backend service, - // you need only send a GARP or RA packet for a single forwarding rule - // virtual IP. The virtual IPs for all forwarding rules targeting the same - // backend service will also be moved to the sender of the GARP or RA - // packet. - // - // - // - // The following are the Fast IP Move limitations (that is, when fastIPMove - // is not DISABLED): - // - // - Multiple forwarding rules cannot use the same IP address if one of - // them refers to a regional backend service with fastIPMove. - // - The regional backend service must set the network field, and all - // NEGs must belong to that network. However, individual - // NEGs can belong to different subnetworks of that network. - // - The maximum number of network endpoints across all backends of a - // backend service with fastIPMove is 32. - // - The maximum number of backend services with fastIPMove that can have - // the same network endpoint attached to one of its backends is 64. - // - The maximum number of backend services with fastIPMove in a VPC in a - // region is 64. - // - The network endpoints that are attached to a backend of a backend - // service with fastIPMove cannot resolve to Gen3+ machines for IPv6. - // - Traffic directed to the leader by a static route next hop will not be - // redirected to a new leader by fast failover. Such traffic will only be - // redirected once an haPolicy.leader update has taken effect. Only traffic - // to the forwarding rule's virtual IP will be redirected to a new leader - // by - // fast failover. - // - // - // haPolicy.fastIPMove can be set only at backend service creation time. - // Once set, it cannot be updated. - // - // By default, fastIpMove is set to DISABLED. - // - // Possible values: - // "DISABLED" - // "GARP_RA" - FastIPMove string `json:"fastIPMove,omitempty"` - // Leader: Selects one of the network endpoints attached to the backend NEGs - // of - // this service as the active endpoint (the leader) that receives - // all - // traffic. - // - // When the leader changes, there is no connection draining to persist - // existing connections on the old leader. - // - // You are responsible for selecting a suitable endpoint as the - // leader. For example, preferring a healthy endpoint over unhealthy ones. - // Note that this service does not track backend endpoint health, and - // selects the configured leader unconditionally. - Leader *BackendServiceHAPolicyLeader `json:"leader,omitempty"` - // ForceSendFields is a list of field names (e.g. "FastIPMove") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FastIPMove") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicyLeader struct { - // BackendGroup: A fully-qualified URL (starting with - // https://www.googleapis.com/) - // of the zonal Network Endpoint Group (NEG) with `GCE_VM_IP` endpoints - // that the leader is attached to. - // - // The leader's backendGroup must already be specified as a backend of - // this backend service. Removing a backend that is designated as the - // leader's backendGroup is not permitted. - BackendGroup string `json:"backendGroup,omitempty"` - // NetworkEndpoint: The network endpoint within the leader.backendGroup that - // is - // designated as the leader. - // - // This network endpoint cannot be detached from the NEG specified in - // the haPolicy.leader.backendGroup until the leader is updated with - // another network endpoint, or the leader is removed from the haPolicy. - NetworkEndpoint *BackendServiceHAPolicyLeaderNetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendGroup") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendGroup") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicyLeader) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicyLeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceHAPolicyLeaderNetworkEndpoint struct { - // Instance: The name of the VM instance of the leader network endpoint. - // The - // instance must already be attached to the NEG specified in - // the - // haPolicy.leader.backendGroup. - // - // The name must be 1-63 characters long, and comply with - // RFC1035. - // Authorization requires the following IAM permission on the - // specified resource instance: compute.instances.use - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHAPolicyLeaderNetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHAPolicyLeaderNetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceHttpCookie: The HTTP cookie used for stateful session -// affinity. -type BackendServiceHttpCookie struct { - // Name: Name of the cookie. - Name string `json:"name,omitempty"` - // Path: Path to set for the cookie. - Path string `json:"path,omitempty"` - // Ttl: Lifetime of the cookie. - Ttl *Duration `json:"ttl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceHttpCookie) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceHttpCookie - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceIAP: Identity-Aware Proxy -type BackendServiceIAP struct { - // Enabled: Whether the serving infrastructure will authenticate and authorize - // all - // incoming requests. - Enabled bool `json:"enabled,omitempty"` - // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. - Oauth2ClientId string `json:"oauth2ClientId,omitempty"` - // Oauth2ClientSecret: OAuth2 client secret to use for the authentication - // flow. - // For security reasons, this value cannot be retrieved via the API. - // Instead, the SHA-256 hash of the value is returned in - // the - // oauth2ClientSecretSha256 field. - // - // @InputOnly - Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` - // Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the field - // oauth2_client_secret above. - Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceIAP) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceIAP - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceList: Contains a list of BackendService resources. -type BackendServiceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#backendServiceList for - // lists of backend services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListWarning: [Output Only] Informational warning message. -type BackendServiceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListUsable: Contains a list of usable BackendService -// resources. -type BackendServiceListUsable struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of BackendService resources. - Items []*BackendService `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#usableBackendServiceList - // for lists of usable backend - // services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *BackendServiceListUsableWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsable) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceListUsableWarning: [Output Only] Informational warning -// message. -type BackendServiceListUsableWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServiceListUsableWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsableWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsableWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceListUsableWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceListUsableWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceListUsableWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfig: Container for either a -// built-in LB policy supported by gRPC or Envoy or -// a custom one implemented by the end user. -type BackendServiceLocalityLoadBalancingPolicyConfig struct { - CustomPolicy *BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy `json:"customPolicy,omitempty"` - Policy *BackendServiceLocalityLoadBalancingPolicyConfigPolicy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfig) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy: The -// configuration for a custom policy implemented by the user and -// deployed with the client. -type BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy struct { - // Data: An optional, arbitrary JSON object with configuration data, - // understood - // by a locally installed custom policy implementation. - Data string `json:"data,omitempty"` - // Name: Identifies the custom policy. - // - // The value should match the name of a custom implementation registered - // on the gRPC clients. It should follow protocol buffer message - // naming - // conventions and include the full path (for example, - // myorg.CustomLbPolicy). The maximum length is 256 characters. - // - // Do not specify the same custom policy more than once for a - // backend. If you do, the configuration is rejected. - // - // For an example of how to use this field, seeUse - // a custom policy. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Data") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Data") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLocalityLoadBalancingPolicyConfigPolicy: The configuration for -// a built-in load balancing policy. -type BackendServiceLocalityLoadBalancingPolicyConfigPolicy struct { - // Name: The name of a locality load-balancing policy. Valid values - // include - // ROUND_ROBIN and, for Java clients, LEAST_REQUEST. For information - // about these values, see the description of localityLbPolicy. - // - // Do not specify the same policy more than once for a - // backend. If you do, the configuration is rejected. - // - // Possible values: - // "INVALID_LB_POLICY" - // "LEAST_REQUEST" - An O(1) algorithm which selects two random healthy hosts - // and - // picks the host which has fewer active requests. - // "MAGLEV" - This algorithm implements consistent hashing to backends. - // Maglev can be - // used as a drop in replacement for the ring hash load balancer. Maglev is - // not as stable as ring hash but has faster table lookup build times and - // host selection times. For more information about Maglev, seeMaglev: - // A Fast and Reliable Software Network Load Balancer. - // "ORIGINAL_DESTINATION" - Backend host is selected based on the client - // connection metadata, i.e., - // connections are opened to the same address as the destination address of - // the incoming connection before the connection was redirected to the - // load - // balancer. - // "RANDOM" - The load balancer selects a random healthy host. - // "RING_HASH" - The ring/modulo hash load balancer implements consistent - // hashing to - // backends. The algorithm has the property that the addition/removal - // of a host from a set of N hosts only affects 1/N of the requests. - // "ROUND_ROBIN" - This is a simple policy in which each healthy backend is - // selected - // in round robin order. This is the default. - // "WEIGHTED_GCP_RENDEZVOUS" - Per-instance weighted Load Balancing via - // health check reported weights. - // In internal passthrough network load balancing, it is weighted - // rendezvous hashing. - // This option is only supported in internal passthrough network - // load - // balancing. - // "WEIGHTED_MAGLEV" - Per-instance weighted Load Balancing via health check - // reported weights. - // If set, the Backend Service must configure a non legacy HTTP-based - // Health - // Check, and health check replies are expected to contain non-standard - // HTTP - // response header field X-Load-Balancing-Endpoint-Weight to specify - // the - // per-instance weights. - // If set, Load Balancing is weighted based on the - // per-instance weights reported in the last processed health check replies, - // as long as every instance either reported a valid weight or - // had - // UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. - // This option is only supported in Network Load Balancing. - // "WEIGHTED_ROUND_ROBIN" - Per-endpoint weighted round-robin Load Balancing - // using weights computed - // from Backend reported Custom Metrics. If set, the Backend Service - // responses are expected to contain non-standard HTTP response header - // field - // Endpoint-Load-Metrics. The reported metrics - // to use for computing the weights are specified via the - // customMetrics fields. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLocalityLoadBalancingPolicyConfigPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLocalityLoadBalancingPolicyConfigPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceLogConfig: The available logging options for the load balancer -// traffic served by this -// backend service. -type BackendServiceLogConfig struct { - // Enable: Denotes whether to enable logging for the load balancer - // traffic served by this backend service. The default value is false. - Enable bool `json:"enable,omitempty"` - // OptionalFields: This field can only be specified if logging is enabled for - // this backend - // service and "logConfig.optionalMode" was set to CUSTOM. Contains a list - // of optional fields you want to include in the logs. For - // example: - // serverInstance, serverGkeDetails.cluster, - // serverGkeDetails.pod.podNamespace - OptionalFields []string `json:"optionalFields,omitempty"` - // OptionalMode: This field can only be specified if logging is enabled for - // this backend - // service. Configures whether all, none or a subset of optional fields - // should be added to the reported logs. One of - // [INCLUDE_ALL_OPTIONAL, - // EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. - // - // Possible values: - // "CUSTOM" - A subset of optional fields. - // "EXCLUDE_ALL_OPTIONAL" - None optional fields. - // "INCLUDE_ALL_OPTIONAL" - All optional fields. - OptionalMode string `json:"optionalMode,omitempty"` - // SampleRate: This field can only be specified if logging is enabled for this - // backend - // service. The value of the field must be in [0, 1]. This configures - // the - // sampling rate of requests to the load balancer where 1.0 means all - // logged - // requests are reported and 0.0 means no logged requests are reported. - // The - // default value is 1.0. - SampleRate float64 `json:"sampleRate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceLogConfig - var s1 struct { - SampleRate gensupport.JSONFloat64 `json:"sampleRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SampleRate = float64(s1.SampleRate) - return nil -} - -type BackendServiceNetworkPassThroughLbTrafficPolicy struct { - // ZonalAffinity: When configured, new connections are load balanced across - // healthy backend - // endpoints in the local zone. - ZonalAffinity *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity `json:"zonalAffinity,omitempty"` - // ForceSendFields is a list of field names (e.g. "ZonalAffinity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ZonalAffinity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceNetworkPassThroughLbTrafficPolicy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity struct { - // Spillover: This field indicates whether zonal affinity is enabled or not. - // The - // possible values are: - // - // - ZONAL_AFFINITY_DISABLED: Default Value. Zonal Affinity - // is disabled. The load balancer distributes new connections to all - // healthy backend endpoints across all zones. - // - ZONAL_AFFINITY_STAY_WITHIN_ZONE: Zonal Affinity is - // enabled. The load balancer distributes new connections to all healthy - // backend endpoints in the local zone only. If there are no healthy - // backend endpoints in the local zone, the load balancer distributes - // new connections to all backend endpoints in the local zone. - // - ZONAL_AFFINITY_SPILL_CROSS_ZONE: Zonal Affinity is - // enabled. The load balancer distributes new connections to all healthy - // backend endpoints in the local zone only. If there aren't enough - // healthy backend endpoints in the local zone, the load balancer - // distributes new connections to all healthy backend endpoints across all - // zones. - // - // Possible values: - // "ZONAL_AFFINITY_DISABLED" - // "ZONAL_AFFINITY_SPILL_CROSS_ZONE" - // "ZONAL_AFFINITY_STAY_WITHIN_ZONE" - Spillover string `json:"spillover,omitempty"` - // SpilloverRatio: The value of the field must be in [0, 1]. When the ratio of - // the count - // of healthy backend endpoints in a zone to the count of backend - // endpoints in that same zone is equal to or above this threshold, the - // load balancer distributes new connections to all healthy endpoints in - // the local zone only. When the ratio of the count of healthy - // backend - // endpoints in a zone to the count of backend endpoints in that same - // zone is below this threshold, the load balancer distributes all - // new - // connections to all healthy endpoints across all zones. - SpilloverRatio float64 `json:"spilloverRatio,omitempty"` - // ForceSendFields is a list of field names (e.g. "Spillover") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Spillover") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity) UnmarshalJSON(data []byte) error { - type NoMethod BackendServiceNetworkPassThroughLbTrafficPolicyZonalAffinity - var s1 struct { - SpilloverRatio gensupport.JSONFloat64 `json:"spilloverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SpilloverRatio = float64(s1.SpilloverRatio) - return nil -} - -// BackendServiceParams: Additional Backend Service parameters. -type BackendServiceParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceParams) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceReference struct { - BackendService string `json:"backendService,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceTlsSettings struct { - // AuthenticationConfig: Reference to the BackendAuthenticationConfig resource - // from the - // networksecurity.googleapis.com namespace. Can be used in authenticating - // TLS connections to the backend, as specified by the - // authenticationMode - // field. Can only be specified if authenticationMode is not NONE. - AuthenticationConfig string `json:"authenticationConfig,omitempty"` - // Identity: Assigns the Managed Identity for the BackendService - // Workload. - // - // - // Use this property to configure the load balancer back-end to - // use - // certificates and roots of trust provisioned by the Managed Workload - // Identity system. - // - // The `identity` property is the - // fully-specified SPIFFE ID to use in the SVID presented by the Load - // Balancer Workload. - // - // The SPIFFE ID must be a resource starting with the - // `trustDomain` property value, followed by the path to the Managed - // Workload Identity. - // - // Supported SPIFFE ID format: - // - // - ///ns//sa/ - // - // - // The Trust Domain within the Managed Identity must refer to a valid - // Workload Identity Pool. The TrustConfig and CertificateIssuanceConfig - // will be inherited from the Workload Identity Pool. - // - // Restrictions: - // - // - If you set the `identity` property, you cannot manually set - // the following fields: - // - tlsSettings.sni - // - tlsSettings.subjectAltNames - // - tlsSettings.authenticationConfig - // - // - // When defining a `identity` for a RegionBackendServices, the - // corresponding Workload Identity Pool must have a ca_pool - // configured in the same region. - // - // The system will set up a read-onlytlsSettings.authenticationConfig for the - // Managed Identity. - Identity string `json:"identity,omitempty"` - // Sni: Server Name Indication - see RFC3546 section 3.1. If set, the - // load - // balancer sends this string as the SNI hostname in the TLS connection to - // the backend, and requires that this string match a Subject Alternative - // Name (SAN) in the backend's server certificate. With a Regional Internet - // NEG backend, if the SNI is specified here, the load balancer uses - // it - // regardless of whether the Regional Internet NEG is specified with FQDN or - // IP address and port. When both sni and subjectAltNames[] are specified, - // the load balancer matches the backend certificate's SAN only - // to - // subjectAltNames[]. - Sni string `json:"sni,omitempty"` - // SubjectAltNames: A list of Subject Alternative Names (SANs) that the Load - // Balancer - // verifies during a TLS handshake with the backend. When the server - // presents its X.509 certificate to the Load Balancer, the Load - // Balancer - // inspects the certificate's SAN field, and requires that at least one - // SAN - // match one of the subjectAltNames in the list. This field is limited to - // 5 - // entries. When both sni and subjectAltNames[] are specified, the - // load - // balancer matches the backend certificate's SAN only to subjectAltNames[]. - SubjectAltNames []*BackendServiceTlsSettingsSubjectAltName `json:"subjectAltNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthenticationConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthenticationConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceTlsSettings) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceTlsSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServiceTlsSettingsSubjectAltName: A Subject Alternative Name that the -// load balancer matches against the SAN -// field in the TLS certificate provided by the backend, specified as either -// a DNS name or a URI, in accordance with RFC 5280 4.2.1.6 -type BackendServiceTlsSettingsSubjectAltName struct { - // DnsName: The SAN specified as a DNS Name. - DnsName string `json:"dnsName,omitempty"` - // UniformResourceIdentifier: The SAN specified as a URI. - UniformResourceIdentifier string `json:"uniformResourceIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceTlsSettingsSubjectAltName) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceTlsSettingsSubjectAltName - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServiceUsedBy struct { - // Reference: [Output Only] Server-defined URL for resources referencing - // given - // BackendService like UrlMaps, TargetTcpProxies, TargetSslProxies - // and ForwardingRule. - Reference string `json:"reference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServiceUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesGetEffectiveSecurityPoliciesResponse struct { - // SecurityPolicies: Effective security policies for the backend service. - SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesGetEffectiveSecurityPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesGetEffectiveSecurityPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedList struct { - // BackendServices: A list of BackendServices contained in this scope. - BackendServices []*BackendService `json:"backendServices,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *BackendServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendServices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendServices") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BackendServicesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type BackendServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*BackendServicesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BackendServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod BackendServicesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BfdPacket struct { - // AuthenticationPresent: The Authentication Present bit of the BFD packet. - // This is specified in - // section 4.1 ofRFC5880 - AuthenticationPresent bool `json:"authenticationPresent,omitempty"` - // ControlPlaneIndependent: The Control Plane Independent bit of the BFD - // packet. This is specified in - // section 4.1 ofRFC5880 - ControlPlaneIndependent bool `json:"controlPlaneIndependent,omitempty"` - // Demand: The demand bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Demand bool `json:"demand,omitempty"` - // Diagnostic: The diagnostic code specifies the local system's reason for the - // last change - // in session state. This allows remote systems to determine the reason - // that - // the previous session failed, for example. These diagnostic codes - // are - // specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMINISTRATIVELY_DOWN" - // "CONCATENATED_PATH_DOWN" - // "CONTROL_DETECTION_TIME_EXPIRED" - // "DIAGNOSTIC_UNSPECIFIED" - // "ECHO_FUNCTION_FAILED" - // "FORWARDING_PLANE_RESET" - // "NEIGHBOR_SIGNALED_SESSION_DOWN" - // "NO_DIAGNOSTIC" - // "PATH_DOWN" - // "REVERSE_CONCATENATED_PATH_DOWN" - Diagnostic string `json:"diagnostic,omitempty"` - // Final: The Final bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Final bool `json:"final,omitempty"` - // Length: The length of the BFD Control packet in bytes. This is specified in - // section - // 4.1 ofRFC5880 - Length int64 `json:"length,omitempty"` - // MinEchoRxIntervalMs: The Required Min Echo RX Interval value in the BFD - // packet. This is - // specified in section 4.1 ofRFC5880 - MinEchoRxIntervalMs int64 `json:"minEchoRxIntervalMs,omitempty"` - // MinRxIntervalMs: The Required Min RX Interval value in the BFD packet. This - // is specified in - // section 4.1 ofRFC5880 - MinRxIntervalMs int64 `json:"minRxIntervalMs,omitempty"` - // MinTxIntervalMs: The Desired Min TX Interval value in the BFD packet. This - // is specified in - // section 4.1 ofRFC5880 - MinTxIntervalMs int64 `json:"minTxIntervalMs,omitempty"` - // Multiplier: The detection time multiplier of the BFD packet. This is - // specified in - // section 4.1 ofRFC5880 - Multiplier int64 `json:"multiplier,omitempty"` - // Multipoint: The multipoint bit of the BFD packet. This is specified in - // section 4.1 ofRFC5880 - Multipoint bool `json:"multipoint,omitempty"` - // MyDiscriminator: The My Discriminator value in the BFD packet. This is - // specified in section - // 4.1 ofRFC5880 - MyDiscriminator int64 `json:"myDiscriminator,omitempty"` - // Poll: The Poll bit of the BFD packet. This is specified in section 4.1 - // ofRFC5880 - Poll bool `json:"poll,omitempty"` - // State: The current BFD session state as seen by the transmitting system. - // These - // states are specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMIN_DOWN" - // "DOWN" - // "INIT" - // "STATE_UNSPECIFIED" - // "UP" - State string `json:"state,omitempty"` - // Version: The version number of the BFD protocol, as specified in section 4.1 - // ofRFC5880. - Version int64 `json:"version,omitempty"` - // YourDiscriminator: The Your Discriminator value in the BFD packet. This is - // specified in - // section 4.1 ofRFC5880 - YourDiscriminator int64 `json:"yourDiscriminator,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthenticationPresent") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthenticationPresent") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdPacket) MarshalJSON() ([]byte, error) { - type NoMethod BfdPacket - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BfdStatus: Next free: 15 -type BfdStatus struct { - // BfdSessionInitializationMode: The BFD session initialization mode for this - // BGP peer. - // If set to ACTIVE, the Cloud Router will initiate the BFD session for - // this BGP peer. If set to PASSIVE, the Cloud Router will wait for the - // peer router to initiate the BFD session for this BGP peer. If set - // to - // DISABLED, BFD is disabled for this BGP peer. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - BfdSessionInitializationMode string `json:"bfdSessionInitializationMode,omitempty"` - // ConfigUpdateTimestampMicros: Unix timestamp of the most recent config - // update. - ConfigUpdateTimestampMicros int64 `json:"configUpdateTimestampMicros,omitempty,string"` - // ControlPacketCounts: Control packet counts for the current BFD session. - ControlPacketCounts *BfdStatusPacketCounts `json:"controlPacketCounts,omitempty"` - // ControlPacketIntervals: Inter-packet time interval statistics for control - // packets. - ControlPacketIntervals []*PacketIntervals `json:"controlPacketIntervals,omitempty"` - // LocalDiagnostic: The diagnostic code specifies the local system's reason for - // the last change - // in session state. This allows remote systems to determine the reason - // that - // the previous session failed, for example. These diagnostic codes - // are - // specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMINISTRATIVELY_DOWN" - // "CONCATENATED_PATH_DOWN" - // "CONTROL_DETECTION_TIME_EXPIRED" - // "DIAGNOSTIC_UNSPECIFIED" - // "ECHO_FUNCTION_FAILED" - // "FORWARDING_PLANE_RESET" - // "NEIGHBOR_SIGNALED_SESSION_DOWN" - // "NO_DIAGNOSTIC" - // "PATH_DOWN" - // "REVERSE_CONCATENATED_PATH_DOWN" - LocalDiagnostic string `json:"localDiagnostic,omitempty"` - // LocalState: The current BFD session state as seen by the transmitting - // system. These - // states are specified in section 4.1 ofRFC5880 - // - // Possible values: - // "ADMIN_DOWN" - // "DOWN" - // "INIT" - // "STATE_UNSPECIFIED" - // "UP" - LocalState string `json:"localState,omitempty"` - // NegotiatedLocalControlTxIntervalMs: Negotiated transmit interval for control - // packets. - NegotiatedLocalControlTxIntervalMs int64 `json:"negotiatedLocalControlTxIntervalMs,omitempty"` - // RxPacket: The most recent Rx control packet for this BFD session. - RxPacket *BfdPacket `json:"rxPacket,omitempty"` - // TxPacket: The most recent Tx control packet for this BFD session. - TxPacket *BfdPacket `json:"txPacket,omitempty"` - // UptimeMs: Session uptime in milliseconds. Value will be 0 if session is not - // up. - UptimeMs int64 `json:"uptimeMs,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "BfdSessionInitializationMode") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BfdSessionInitializationMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdStatus) MarshalJSON() ([]byte, error) { - type NoMethod BfdStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BfdStatusPacketCounts struct { - // NumRx: Number of packets received since the beginning of the current - // BFD - // session. - NumRx int64 `json:"numRx,omitempty"` - // NumRxRejected: Number of packets received that were rejected because of - // errors since the - // beginning of the current BFD session. - NumRxRejected int64 `json:"numRxRejected,omitempty"` - // NumRxSuccessful: Number of packets received that were successfully processed - // since the - // beginning of the current BFD session. - NumRxSuccessful int64 `json:"numRxSuccessful,omitempty"` - // NumTx: Number of packets transmitted since the beginning of the current - // BFD - // session. - NumTx int64 `json:"numTx,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRx") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRx") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BfdStatusPacketCounts) MarshalJSON() ([]byte, error) { - type NoMethod BfdStatusPacketCounts - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BgpRoute struct { - // AsPaths: [Output only] AS-PATH for the route - AsPaths []*BgpRouteAsPath `json:"asPaths,omitempty"` - // Communities: [Output only] BGP communities in human-readable A:B format. - Communities []string `json:"communities,omitempty"` - // Destination: [Output only] Destination IP range for the route, in - // human-readable CIDR - // format - Destination *BgpRouteNetworkLayerReachabilityInformation `json:"destination,omitempty"` - // Med: [Output only] BGP multi-exit discriminator - Med int64 `json:"med,omitempty"` - // Origin: [Output only] BGP origin (EGP, IGP or INCOMPLETE) - // - // Possible values: - // "BGP_ORIGIN_EGP" - // "BGP_ORIGIN_IGP" - // "BGP_ORIGIN_INCOMPLETE" - Origin string `json:"origin,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsPaths") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsPaths") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRoute) MarshalJSON() ([]byte, error) { - type NoMethod BgpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BgpRouteAsPath struct { - // Asns: [Output only] ASNs in the path segment. When type is SEQUENCE, these - // are - // ordered. - Asns []int64 `json:"asns,omitempty"` - // Asns32: [Output only] ASNs in the path segment. This field is for - // better - // support of 32 bit ASNs as the other asns field suffers from overflow - // when - // the ASN is larger. When type is SEQUENCE, these are ordered. - Asns32 []int64 `json:"asns32,omitempty"` - // Type: [Output only] Type of AS-PATH segment (SEQUENCE or SET) - // - // Possible values: - // "AS_PATH_TYPE_SEQUENCE" - // "AS_PATH_TYPE_SET" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Asns") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Asns") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRouteAsPath) MarshalJSON() ([]byte, error) { - type NoMethod BgpRouteAsPath - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BgpRouteNetworkLayerReachabilityInformation: Network Layer Reachability -// Information (NLRI) for a route. -type BgpRouteNetworkLayerReachabilityInformation struct { - // PathId: If the BGP session supports multiple paths (RFC 7911), the - // path - // identifier for this route. - PathId int64 `json:"pathId,omitempty"` - // Prefix: Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16. - Prefix string `json:"prefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "PathId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PathId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BgpRouteNetworkLayerReachabilityInformation) MarshalJSON() ([]byte, error) { - type NoMethod BgpRouteNetworkLayerReachabilityInformation - return gensupport.MarshalJSON(NoMethod(s), 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`. - // - // - // - // - // * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: - // A single identity in a workforce identity pool. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: - // All workforce identities in a group. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: - // All workforce identities with a specific attribute value. - // - // * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: - // All identities in a workforce identity pool. - // - // * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: - // A single identity in a workload identity pool. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: - // A workload identity pool group. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: - // All identities in a workload identity pool with a certain attribute. - // - // * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: - // All identities in a workload identity pool. - // - // * `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. - // - // * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: - // Deleted single identity in a workforce identity pool. For example, - // - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - // - // For an overview of the IAM roles and permissions, see the - // IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For - // a list of the available pre-defined roles, see - // here (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertDiskResource: A transient resource used in -// compute.disks.bulkInsert and -// compute.regionDisks.bulkInsert. It is only used to process -// requests and is not persisted. -type BulkInsertDiskResource struct { - // SourceConsistencyGroupPolicy: The URL of the DiskConsistencyGroupPolicy for - // the group of disks to clone. - // This may be a full or partial URL, such as: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // regions/region/resourcePolicies/resourcePolicy - SourceConsistencyGroupPolicy string `json:"sourceConsistencyGroupPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SourceConsistencyGroupPolicy") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceConsistencyGroupPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertDiskResource) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertDiskResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertInstanceResource: A transient resource used in -// compute.instances.bulkInsert and -// compute.regionInstances.bulkInsert . This resource is not -// persisted -// anywhere, it is used only for processing the requests. -type BulkInsertInstanceResource struct { - // Count: The maximum number of instances to create. - Count int64 `json:"count,omitempty,string"` - // InstanceProperties: The instance properties defining the VM instances to be - // created. Required - // if sourceInstanceTemplate is not provided. - InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // LocationPolicy: Policy for choosing target zone. For more information, - // seeCreate VMs in - // bulk. - LocationPolicy *LocationPolicy `json:"locationPolicy,omitempty"` - // MinCount: The minimum number of instances to create. If no min_count - // is - // specified then count is used as the default value. Ifmin_count instances - // cannot be created, then no instances will - // be created and instances already created will be deleted. - MinCount int64 `json:"minCount,omitempty,string"` - // NamePattern: The string pattern used for the names of the VMs. - // Either name_pattern or per_instance_properties - // must be set. The pattern must contain one continuous sequence of - // placeholder hash characters (#) with each character corresponding to - // one - // digit of the generated instance name. Example: a name_pattern - // of inst-#### generates instance names such asinst-0001 and inst-0002. If - // existing instances - // in the same project and zone have names that match the name pattern - // then the generated instance numbers start after the biggest - // existing number. For example, if there exists an instance with - // nameinst-0050, then instance names generated using the patterninst-#### - // begin with inst-0051. The name pattern - // placeholder #...# can contain up to 18 characters. - NamePattern string `json:"namePattern,omitempty"` - // PerInstanceProperties: Per-instance properties to be set on individual - // instances. - // Keys of this map specify requested instance names. - // Can be empty if name_pattern is used. - PerInstanceProperties map[string]BulkInsertInstanceResourcePerInstanceProperties `json:"perInstanceProperties,omitempty"` - // SourceInstanceTemplate: Specifies the instance template from which to create - // instances. You may - // combine sourceInstanceTemplate withinstanceProperties to override specific - // values from an - // existing instance template. Bulk API follows the semantics of JSON - // Merge - // Patch described by RFC - // 7396. - // - // It can be a full or partial URL. For example, the following are - // all valid URLs to an instance template: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - // - projects/project/global/instanceTemplates/instanceTemplate - // - global/instanceTemplates/instanceTemplate - // - // - // - // This field is optional. - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertInstanceResource) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertInstanceResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BulkInsertInstanceResourcePerInstanceProperties: Per-instance properties to -// be set on individual instances. -// To be extended in the future. -type BulkInsertInstanceResourcePerInstanceProperties struct { - // Hostname: Specifies the hostname of the instance. More details - // in: - // https://cloud.google.com/compute/docs/instances/custom-hostname-vm#naming_convention - Hostname string `json:"hostname,omitempty"` - // Name: This field is only temporary. It will be removed. Do not use it. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hostname") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hostname") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertInstanceResourcePerInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertInstanceResourcePerInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkInsertOperationStatus struct { - // CreatedVmCount: [Output Only] Count of VMs successfully created so far. - CreatedVmCount int64 `json:"createdVmCount,omitempty"` - // DeletedVmCount: [Output Only] Count of VMs that got deleted during rollback. - DeletedVmCount int64 `json:"deletedVmCount,omitempty"` - // FailedToCreateVmCount: [Output Only] Count of VMs that started creating but - // encountered an - // error. - FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` - // Status: [Output Only] Creation status of BulkInsert operation - - // information - // if the flow is rolling forward or rolling back. - // - // Possible values: - // "CREATING" - Rolling forward - creating VMs. - // "DONE" - Done - // "ROLLING_BACK" - Rolling back - cleaning up after an error. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // TargetVmCount: [Output Only] Count of VMs originally planned to be created. - TargetVmCount int64 `json:"targetVmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreatedVmCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { - type NoMethod BulkInsertOperationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // may - // optionally provide an up-to-date fingerprint hash in order to update - // or - // change labels. Make a get() request to the resource to get the - // latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod BulkSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BulkZoneSetLabelsRequest struct { - Requests []*BulkSetLabelsRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "Requests") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BulkZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod BulkZoneSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type BundledLocalSsds struct { - // DefaultInterface: The default disk interface if the interface is not - // specified. - DefaultInterface string `json:"defaultInterface,omitempty"` - // PartitionCount: The number of partitions. - PartitionCount int64 `json:"partitionCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultInterface") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BundledLocalSsds) MarshalJSON() ([]byte, error) { - type NoMethod BundledLocalSsds - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CacheInvalidationRule struct { - // CacheTags: A list of cache tags used to identify cached objects. - // - // - // - Cache tags are specified when the response is first cached, by setting - // the `Cache-Tag` response header at the origin. - // - Multiple cache tags in the same invalidation request are treated as - // Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. - // - If other fields are also specified, these are treated as Boolean `AND` - // with any tags. - // - // - // Up to 10 tags can be specified in a single invalidation request. - CacheTags []string `json:"cacheTags,omitempty"` - // Host: If set, this invalidation rule will only apply to requests with a - // Host - // header matching host. - Host string `json:"host,omitempty"` - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "CacheTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CacheTags") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CacheInvalidationRule) MarshalJSON() ([]byte, error) { - type NoMethod CacheInvalidationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CacheKeyPolicy: Message containing what to include in the cache key for a -// request for Cloud -// CDN. -type CacheKeyPolicy struct { - // IncludeHost: If true, requests to different hosts will be cached separately. - IncludeHost bool `json:"includeHost,omitempty"` - // IncludeHttpHeaders: Allows HTTP request headers (by name) to be used in the - // cache key. - IncludeHttpHeaders []string `json:"includeHttpHeaders,omitempty"` - // IncludeNamedCookies: Allows HTTP cookies (by name) to be used in the cache - // key. - // The name=value pair will be used in the cache key Cloud CDN generates. - IncludeNamedCookies []string `json:"includeNamedCookies,omitempty"` - // IncludeProtocol: If true, http and https requests will be cached separately. - IncludeProtocol bool `json:"includeProtocol,omitempty"` - // IncludeQueryString: If true, include query string parameters in the cache - // key according to - // query_string_whitelist and query_string_blacklist. If neither is set, - // the - // entire query string will be included. If false, the query string will - // be - // excluded from the cache key entirely. - IncludeQueryString bool `json:"includeQueryString,omitempty"` - // QueryStringBlacklist: Names of query string parameters to exclude in cache - // keys. All other - // parameters will be included. Either specify query_string_whitelist - // or - // query_string_blacklist, not both. '&' and '=' will be percent encoded - // and - // not treated as delimiters. - QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"` - // QueryStringWhitelist: Names of query string parameters to include in cache - // keys. All other - // parameters will be excluded. Either specify query_string_whitelist - // or - // query_string_blacklist, not both. '&' and '=' will be percent encoded - // and - // not treated as delimiters. - QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludeHost") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludeHost") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CacheKeyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CacheKeyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeAdviceRequest: A request to recommend the best way to consume -// the specified resources in the -// future. -type CalendarModeAdviceRequest struct { - // FutureResourcesSpecs: Specification of resources to create in the - // future. - // The key of the map is an arbitrary string specified by the caller. - // Value of the map is a specification of required resources and - // their - // constraints. Currently only one value is allowed in this map. - FutureResourcesSpecs map[string]FutureResourcesSpec `json:"futureResourcesSpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "FutureResourcesSpecs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FutureResourcesSpecs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeAdviceRequest) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeAdviceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeAdviceResponse: A response containing the recommended way of -// creating the specified resources -// in the future. It contains (will contain) multiple recommendations that -// can -// be analyzed by the customer and the best one can be picked. -type CalendarModeAdviceResponse struct { - // Recommendations: Recommendations where, how and when to create the requested - // resources - // in order to maximize their obtainability and minimize cost. - Recommendations []*CalendarModeRecommendation `json:"recommendations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Recommendations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Recommendations") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeAdviceResponse) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeAdviceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CalendarModeRecommendation: A single recommendation to create requested -// resources. Contains detailed -// recommendations for every future resources specification specified -// in -// CalendarModeAdviceRequest. -type CalendarModeRecommendation struct { - // RecommendationsPerSpec: Recommendations for every future resource - // specification passed in - // CalendarModeAdviceRequest. Keys of the map correspond to keys - // specified in the request. - RecommendationsPerSpec map[string]FutureResourcesRecommendation `json:"recommendationsPerSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "RecommendationsPerSpec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RecommendationsPerSpec") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CalendarModeRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod CalendarModeRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CircuitBreakers: Settings controlling the volume of requests, connections -// and retries to this -// backend service. -type CircuitBreakers struct { - // ConnectTimeout: The timeout for new network connections to hosts. - ConnectTimeout *Duration `json:"connectTimeout,omitempty"` - // MaxConnections: The maximum number of connections to the backend service. If - // not specified, - // there is no limit. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxPendingRequests: The maximum number of pending requests allowed to the - // backend service. If - // not specified, there is no limit. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"` - // MaxRequests: The maximum number of parallel requests that allowed to the - // backend - // service. If not specified, there is no limit. - MaxRequests int64 `json:"maxRequests,omitempty"` - // MaxRequestsPerConnection: Maximum requests for a single connection to the - // backend service. - // This parameter is respected by both the HTTP/1.1 and HTTP/2 - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"` - // MaxRetries: The maximum number of parallel retries allowed to the backend - // cluster. If - // not specified, the default is 1. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - MaxRetries int64 `json:"maxRetries,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectTimeout") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectTimeout") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CircuitBreakers) MarshalJSON() ([]byte, error) { - type NoMethod CircuitBreakers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Commitment: Represents a regional resource-based commitment -// resource. -// -// Creating this commitment resource means that you are purchasing -// a -// resource-based committed use contract, with an explicit start and end -// time. -// You can purchase resource-based commitments for both hardware and -// software -// resources. For more information, read -// Resource-based committed use discounts -type Commitment struct { - // AutoRenew: Specifies whether to automatically renew the commitment at the - // end of its - // current term. The default value is false. If you set the field - // to true, each time your commitment reaches the end of its - // term, Compute Engine automatically renews it for another term. You - // can - // update this field anytime before the commitment expires. For example, if - // the commitment is set to expire at 12 AM UTC-8 on January 3, 2027, you - // can - // update this field until 11:59 PM UTC-8 on January 2, 2027. - AutoRenew bool `json:"autoRenew,omitempty"` - // Category: The category of the commitment; specifies whether the commitment - // is for - // hardware or software resources. Category MACHINE specifies - // that you are committing to hardware machine resources such asVCPU or MEMORY, - // listed in resources. - // Category LICENSE specifies that you are committing to software - // licenses, listed in licenseResources. - // Note that if you specify MACHINE commitments, then you must - // also specify a type to indicate the machine series of the - // hardware resource that you are committing to. - // - // Possible values: - // "CATEGORY_UNSPECIFIED" - // "LICENSE" - // "MACHINE" - Category string `json:"category,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomEndTimestamp: [Input Only] Optional, specifies the requested - // commitment end time inRFC3339 text format. Use this option when the - // desired - // commitment's end date is later than the start date + term duration. - CustomEndTimestamp string `json:"customEndTimestamp,omitempty"` - // Description: An optional description of the commitment. You can provide this - // property - // when you create the resource. - Description string `json:"description,omitempty"` - // EndTimestamp: [Output Only] Commitment end time inRFC3339 - // text format. - EndTimestamp string `json:"endTimestamp,omitempty"` - ExistingReservations []string `json:"existingReservations,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#commitment - // for commitments. - Kind string `json:"kind,omitempty"` - // LicenseResource: The license specification required as part of a license - // commitment. - LicenseResource *LicenseResourceCommitment `json:"licenseResource,omitempty"` - // MergeSourceCommitments: The list of source commitments that you are merging - // to create the new - // merged commitment. For more information, see - // Merging commitments. - MergeSourceCommitments []string `json:"mergeSourceCommitments,omitempty"` - // Name: Name of the commitment. You must specify a name when you purchase - // the - // commitment. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Plan: The minimum time duration that you commit to purchasing resources. - // The plan that you choose determines the preset term length of the - // commitment (which is 1 year or 3 years) and affects the discount rate - // that - // you receive for your resources. Committing to a longer time - // duration - // typically gives you a higher discount rate. The supported values for - // this - // field are TWELVE_MONTH (1 year), andTHIRTY_SIX_MONTH (3 years). - // - // Possible values: - // "INVALID" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - Plan string `json:"plan,omitempty"` - // Region: [Output Only] URL of the region where the commitment and - // committed - // resources are located. - Region string `json:"region,omitempty"` - // Reservations: The list of new reservations that you want to create and - // attach to this - // commitment. - // - // You must attach reservations to your commitment if your commitment - // specifies any GPUs or Local SSD disks. For more information, see - // Attach reservations to resource-based commitments. - // - // Specify this property only if you want to create new - // reservations to attach. To attach existing reservations, specify - // theexistingReservations property instead. - Reservations []*Reservation `json:"reservations,omitempty"` - // ResourceStatus: [Output Only] Status information for Commitment resource. - ResourceStatus *CommitmentResourceStatus `json:"resourceStatus,omitempty"` - // Resources: The list of all the hardware resources, with their types and - // amounts, that - // you want to commit to. Specify as a separate entry in the list for - // each - // individual resource type. - Resources []*ResourceCommitment `json:"resources,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SplitSourceCommitment: The source commitment from which you are transferring - // resources to create - // the new split commitment. For more information, see - // Split commitments. - SplitSourceCommitment string `json:"splitSourceCommitment,omitempty"` - // StartTimestamp: [Output Only] Commitment start time inRFC3339 - // text format. - StartTimestamp string `json:"startTimestamp,omitempty"` - // Status: [Output Only] Status of the commitment with regards to eventual - // expiration - // (each commitment has an end date defined). Status can be one of - // the - // following values: NOT_YET_ACTIVE, ACTIVE, orEXPIRED. - // - // Possible values: - // "ACTIVE" - // "CANCELLED" - Deprecate CANCELED status. Will use separate status to - // differentiate - // cancel by mergeCud or manual cancellation. - // "CREATING" - // "EXPIRED" - // "NOT_YET_ACTIVE" - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - // Type: The type of commitment; specifies the - // machine series for which you want to commit to purchasing resources. - // The choice of machine series affects the discount rate and the - // eligible - // resource types. - // - // The type must be one of the following:ACCELERATOR_OPTIMIZED, - // ACCELERATOR_OPTIMIZED_A3,ACCELERATOR_OPTIMIZED_A3_MEGA,COMPUTE_OPTIMIZED, - // COMPUTE_OPTIMIZED_C2D, - // COMPUTE_OPTIMIZED_C3, COMPUTE_OPTIMIZED_C3D,COMPUTE_OPTIMIZED_H3, - // GENERAL_PURPOSE,GENERAL_PURPOSE_C4, GENERAL_PURPOSE_E2,GENERAL_PURPOSE_N2, - // GENERAL_PURPOSE_N2D,GENERAL_PURPOSE_N4, - // GENERAL_PURPOSE_T2D,GRAPHICS_OPTIMIZED, - // MEMORY_OPTIMIZED,MEMORY_OPTIMIZED_M3, - // MEMORY_OPTIMIZED_X4,STORAGE_OPTIMIZED_Z3. - // For example, type MEMORY_OPTIMIZED specifies a commitment - // that applies only to eligible resources of memory optimized M1 and - // M2 - // machine series. Type GENERAL_PURPOSE specifies a commitment - // that applies only to eligible resources of general purpose N1 - // machine - // series. - // - // Possible values: - // "ACCELERATOR_OPTIMIZED" - // "ACCELERATOR_OPTIMIZED_A3" - // "ACCELERATOR_OPTIMIZED_A3_MEGA" - // "ACCELERATOR_OPTIMIZED_A3_ULTRA" - // "ACCELERATOR_OPTIMIZED_A4" - // "COMPUTE_OPTIMIZED" - // "COMPUTE_OPTIMIZED_C2D" - // "COMPUTE_OPTIMIZED_C3" - // "COMPUTE_OPTIMIZED_C3D" - // "COMPUTE_OPTIMIZED_H3" - // "COMPUTE_OPTIMIZED_H4D" - // "GENERAL_PURPOSE" - // "GENERAL_PURPOSE_C4" - // "GENERAL_PURPOSE_C4A" - // "GENERAL_PURPOSE_C4D" - // "GENERAL_PURPOSE_E2" - // "GENERAL_PURPOSE_N2" - // "GENERAL_PURPOSE_N2D" - // "GENERAL_PURPOSE_N4" - // "GENERAL_PURPOSE_N4D" - // "GENERAL_PURPOSE_T2D" - // "GRAPHICS_OPTIMIZED" - // "MEMORY_OPTIMIZED" - // "MEMORY_OPTIMIZED_M3" - // "MEMORY_OPTIMIZED_M4" - // "MEMORY_OPTIMIZED_M4_6TB" - // "MEMORY_OPTIMIZED_X4_16TB" - // "MEMORY_OPTIMIZED_X4_24TB" - // "MEMORY_OPTIMIZED_X4_32TB" - // "STORAGE_OPTIMIZED_Z3" - // "TYPE_UNSPECIFIED" - Note for internal users: When adding a new enum Type - // for v1, make sure - // to also add it in the comment for the `optional Type type` definition. - // This ensures that the public documentation displays the new enum Type. - 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. "AutoRenew") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoRenew") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Commitment) MarshalJSON() ([]byte, error) { - type NoMethod Commitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CommitmentsScopedList resources. - Items map[string]CommitmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#commitmentAggregatedList - // for aggregated lists of - // commitments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CommitmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentAggregatedListWarning: [Output Only] Informational warning -// message. -type CommitmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentList: Contains a list of Commitment resources. -type CommitmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Commitment resources. - Items []*Commitment `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#commitmentList - // for lists of commitments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CommitmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentListWarning: [Output Only] Informational warning message. -type CommitmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentResourceStatus: [Output Only] Contains output only fields. -type CommitmentResourceStatus struct { - // CustomTermEligibilityEndTimestamp: [Output Only] Indicates the end time of - // customer's eligibility to send - // custom term requests in RFC3339 text format. Term extension requests - // that - // (not the end time in the request) after this time will be rejected. - CustomTermEligibilityEndTimestamp string `json:"customTermEligibilityEndTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CustomTermEligibilityEndTimestamp") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CustomTermEligibilityEndTimestamp") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s CommitmentResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedList struct { - // Commitments: [Output Only] The list of commitments contained in this scope. - Commitments []*Commitment `json:"commitments,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // commitments - // when the list is empty. - Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Commitments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Commitments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CommitmentsScopedListWarning: [Output Only] Informational warning which -// replaces the list of commitments -// when the list is empty. -type CommitmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CommitmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CommitmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheck: Represents a composite health check. -// -// A composite health check resource specifies the health source resources -// and -// the health destination resource to which the aggregated health result -// from -// the health source resources is delivered. -type CompositeHealthCheck struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a CompositeHealthCheck. An up-to-date fingerprint - // must be provided in order to patch the CompositeHealthCheck; Otherwise, - // the request will fail with error 412 conditionNotMet. To see - // the latest fingerprint, make a get() request to retrieve - // the - // CompositeHealthCheck. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthDestination: URL to the destination resource. Must be set. Must be - // aForwardingRule. The ForwardingRule must have - // load balancing scheme INTERNAL orINTERNAL_MANAGED and must be regional and - // in the same region - // as the CompositeHealthCheck (cross-region deployment forINTERNAL_MANAGED is - // not supported). Can be mutated. - HealthDestination string `json:"healthDestination,omitempty"` - // HealthSources: URLs to the HealthSource resources whose results are - // AND'ed. - // I.e. he aggregated result is is HEALTHY only if all sources - // are HEALTHY. Must have at least 1. Must not have more than 10. - // Must be regional and in the same region as theCompositeHealthCheck. Can be - // mutated. - HealthSources []string `json:"healthSources,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#compositeHealthCheck - // for composite health checks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the composite health check - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckAggregatedList: Contains a list of -// CompositeHealthChecksScopedList. -type CompositeHealthCheckAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CompositeHealthChecksScopedList resources. - Items map[string]CompositeHealthChecksScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CompositeHealthCheckAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckAggregatedListWarning: [Output Only] Informational -// warning message. -type CompositeHealthCheckAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthCheckAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CompositeHealthCheck resources. - Items []*CompositeHealthCheck `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#compositeHealthCheck - // for composite health checks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CompositeHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthCheckListWarning: [Output Only] Informational warning -// message. -type CompositeHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthChecksScopedList struct { - // CompositeHealthChecks: A list of CompositeHealthChecks contained in this - // scope. - CompositeHealthChecks []*CompositeHealthCheck `json:"compositeHealthChecks,omitempty"` - // Warning: Informational warning which replaces the list of composite health - // checks - // when the list is empty. - Warning *CompositeHealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompositeHealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompositeHealthChecks") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompositeHealthChecksScopedListWarning: Informational warning which replaces -// the list of composite health checks -// when the list is empty. -type CompositeHealthChecksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CompositeHealthChecksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CompositeHealthChecksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompositeHealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CompositeHealthChecksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConfidentialInstanceConfig: A set of Confidential Instance options. -type ConfidentialInstanceConfig struct { - // ConfidentialInstanceType: Defines the type of technology used by the - // confidential instance. - // - // Possible values: - // "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do not use - // this value. - // "SEV" - AMD Secure Encrypted Virtualization. - // "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested Paging. - // "TDX" - Intel Trust Domain eXtension. - ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"` - // EnableConfidentialCompute: Defines whether the instance should have - // confidential compute enabled. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidentialInstanceType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidentialInstanceType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConfidentialInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConnectionDraining: Message containing connection draining configuration. -type ConnectionDraining struct { - // DrainingTimeoutSec: Configures a duration timeout for existing requests on a - // removed backend - // instance. For supported load balancers and protocols, as described - // inEnabling - // connection draining. - DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainingTimeoutSec") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConnectionDraining) MarshalJSON() ([]byte, error) { - type NoMethod ConnectionDraining - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsistentHashLoadBalancerSettings: This message defines settings for a -// consistent hash style load balancer. -type ConsistentHashLoadBalancerSettings struct { - // HttpCookie: Hash is based on HTTP Cookie. This field describes a HTTP cookie - // that will - // be used as the hash key for the consistent hash load balancer. If the - // cookie is not present, it will be generated. This field is applicable if - // the sessionAffinity is set to HTTP_COOKIE. - // - // Not supported when the backend service is referenced by a URL map that - // is - // bound to target gRPC proxy that has validateForProxyless field set to true. - HttpCookie *ConsistentHashLoadBalancerSettingsHttpCookie `json:"httpCookie,omitempty"` - // HttpHeaderName: The hash based on the value of the specified header field. - // This field is - // applicable if the sessionAffinity is set toHEADER_FIELD. - HttpHeaderName string `json:"httpHeaderName,omitempty"` - // MinimumRingSize: The minimum number of virtual nodes to use for the hash - // ring. Defaults to - // 1024. Larger ring sizes result in more granular load distributions. If - // the - // number of hosts in the load balancing pool is larger than the ring - // size, - // each host will be assigned a single virtual node. - MinimumRingSize int64 `json:"minimumRingSize,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "HttpCookie") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpCookie") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsistentHashLoadBalancerSettings) MarshalJSON() ([]byte, error) { - type NoMethod ConsistentHashLoadBalancerSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsistentHashLoadBalancerSettingsHttpCookie: The information about the HTTP -// Cookie on which the hash function is based -// for load balancing policies that use a consistent hash. -type ConsistentHashLoadBalancerSettingsHttpCookie struct { - // Name: Name of the cookie. - Name string `json:"name,omitempty"` - // Path: Path to set for the cookie. - Path string `json:"path,omitempty"` - // Ttl: Lifetime of the cookie. - Ttl *Duration `json:"ttl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsistentHashLoadBalancerSettingsHttpCookie) MarshalJSON() ([]byte, error) { - type NoMethod ConsistentHashLoadBalancerSettingsHttpCookie - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CorsPolicy: The specification for allowing client-side cross-origin -// requests. For more -// information about the W3C recommendation for cross-origin resource -// sharing -// (CORS), see Fetch API Living -// Standard. -type CorsPolicy struct { - // AllowCredentials: In response to a preflight request, setting this to - // true - // indicates that - // the actual request can include user credentials. This field translates - // to - // the Access-Control-Allow-Credentials header. - // - // Default is false. - AllowCredentials bool `json:"allowCredentials,omitempty"` - // AllowHeaders: Specifies the content for the - // Access-Control-Allow-Headers - // header. - AllowHeaders []string `json:"allowHeaders,omitempty"` - // AllowMethods: Specifies the content for the - // Access-Control-Allow-Methods - // header. - AllowMethods []string `json:"allowMethods,omitempty"` - // AllowOriginRegexes: Specifies a regular expression that matches allowed - // origins. For - // more information, see regular expression syntax. - // - // An origin is allowed if it matches either an item inallowOrigins or an item - // inallowOriginRegexes. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED. - AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` - // AllowOrigins: Specifies the list of origins that is allowed to do CORS - // requests. - // - // An origin is allowed if it matches either an item inallowOrigins or an item - // inallowOriginRegexes. - AllowOrigins []string `json:"allowOrigins,omitempty"` - // Disabled: If true, disables the CORS policy. - // The default value is false, which indicates that the CORS - // policy is in effect. - Disabled bool `json:"disabled,omitempty"` - // ExposeHeaders: Specifies the content for the - // Access-Control-Expose-Headers - // header. - ExposeHeaders []string `json:"exposeHeaders,omitempty"` - // MaxAge: Specifies how long results of a preflight request can be cached - // in - // seconds. This field translates to the Access-Control-Max-Age - // header. - MaxAge int64 `json:"maxAge,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCredentials") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CorsPolicy) MarshalJSON() ([]byte, error) { - type NoMethod CorsPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetwork: A resource that represents a cross-site network. -// -// You can use cross-site networks to connect your on-premises networks to -// each other through Interconnect connections. -type CrossSiteNetwork struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of the cross-site network. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for - // cross-site networks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetwork) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetworkList: Response to the list request that contains a list of -// cross-site networks. -type CrossSiteNetworkList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of CrossSiteNetwork resources. - Items []*CrossSiteNetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#crossSiteNetwork for - // cross-site networks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *CrossSiteNetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkList) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CrossSiteNetworkListWarning: [Output Only] Informational warning message. -type CrossSiteNetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*CrossSiteNetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CrossSiteNetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CrossSiteNetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod CrossSiteNetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomErrorResponsePolicy: Specifies the custom error response policy that -// must be applied when the -// backend service or backend bucket responds with an error. -type CustomErrorResponsePolicy struct { - // ErrorResponseRules: Specifies rules for returning error responses. - // - // In a given policy, if you specify rules for both a range of error codes - // as well as rules for specific error codes then rules with specific - // error - // codes have a higher priority. For example, assume that you configure a - // rule - // for 401 (Un-authorized) code, and another for all 4 series - // error codes (4XX). If the backend service returns a401, then the rule for - // 401 will be applied. - // However if the backend service returns a 403, the rule for4xx takes effect. - ErrorResponseRules []*CustomErrorResponsePolicyCustomErrorResponseRule `json:"errorResponseRules,omitempty"` - // ErrorService: The full or partial URL to the BackendBucket resource - // that - // contains the custom error content. Examples are: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - // - compute/v1/projects/project/global/backendBuckets/myBackendBucket - // - global/backendBuckets/myBackendBucket - // - // If errorService is not specified at lower levels likepathMatcher, pathRule - // and routeRule, - // an errorService specified at a higher level in theUrlMap will be used. - // IfUrlMap.defaultCustomErrorResponsePolicy contains one or - // moreerrorResponseRules[], it must specifyerrorService. - // - // If load balancer cannot reach - // the backendBucket, a simple Not Found Error will - // be returned, with the original response code (oroverrideResponseCode if - // configured). - // - // errorService is not supported for internal or regionalHTTP/HTTPS load - // balancers. - ErrorService string `json:"errorService,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorResponseRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorResponseRules") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomErrorResponsePolicy) MarshalJSON() ([]byte, error) { - type NoMethod CustomErrorResponsePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CustomErrorResponsePolicyCustomErrorResponseRule: Specifies the mapping -// between the response code that will be returned along -// with the custom error content and the response code returned by the -// backend -// service. -type CustomErrorResponsePolicyCustomErrorResponseRule struct { - // MatchResponseCodes: Valid values include: - // - // - // - A number between 400 and 599: For example - // 401 or 503, in which case the load balancer - // applies the policy if the error code exactly matches this value. - // - 5xx: Load Balancer will apply the policy if the - // backend service responds with any response code in the range of - // 500 to 599. - // - 4xx: Load - // Balancer will apply the policy if the backend service responds with - // any - // response code in the range of 400 to - // 499. - // - // Values must be unique within matchResponseCodes and across - // allerrorResponseRules ofCustomErrorResponsePolicy. - MatchResponseCodes []string `json:"matchResponseCodes,omitempty"` - // OverrideResponseCode: The HTTP status code returned with the response - // containing the custom - // error content. If overrideResponseCode is not supplied, the - // same response code returned by the original backend bucket or - // backend - // service is returned to the client. - OverrideResponseCode int64 `json:"overrideResponseCode,omitempty"` - // Path: The full path to a file within backendBucket . For - // example:/errors/defaultError.html - // - // path must start - // with a leading slash. path cannot have trailing slashes. - // - // If the file is not available in backendBucket or the - // load balancer cannot reach the BackendBucket, a simpleNot Found Error is - // returned to the client. - // - // The value must - // be from 1 to 1024 characters - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "MatchResponseCodes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MatchResponseCodes") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomErrorResponsePolicyCustomErrorResponseRule) MarshalJSON() ([]byte, error) { - type NoMethod CustomErrorResponsePolicyCustomErrorResponseRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKey struct { - // KmsKeyName: The name of the encryption key that is stored in Google Cloud - // KMS. - // For example: - // - // "kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // - // The fully-qualifed key name may be returned for resource GET requests. For - // - // example: - // - // "kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // /cryptoKeyVersions/1 - KmsKeyName string `json:"kmsKeyName,omitempty"` - // KmsKeyServiceAccount: The service account being used for the encryption - // request for the given KMS - // key. If absent, the Compute Engine default service account is used. - // For example: - // - // "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ - KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` - // RawKey: Specifies a 256-bit customer-supplied - // encryption key, encoded in RFC - // 4648 base64 to either encrypt or decrypt this resource. You can - // provide either the rawKey or thersaEncryptedKey. - // For example: - // - // "rawKey": - // "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" - RawKey string `json:"rawKey,omitempty"` - // RsaEncryptedKey: Specifies an RFC 4648 base64 encoded, RSA-wrapped - // 2048-bit - // customer-supplied encryption key to either encrypt or decrypt this - // resource. You can provide either the rawKey or thersaEncryptedKey. - // For - // example: - // - // "rsaEncryptedKey": - // "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH - // z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD - // D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" - // - // The key must meet the following requirements before you can provide it to - // - // Compute Engine: - // - // 1. The key is wrapped using a RSA public key certificate provided by - // Google. - // 2. After being wrapped, the key must be encoded in RFC 4648 base64 - // encoding. - // - // Gets the RSA public key certificate provided by Google at: - // - // - // - // https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem - RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"` - // Sha256: [Output only] TheRFC - // 4648 base64 encoded SHA-256 hash of the customer-supplied - // encryption key that protects this resource. - Sha256 string `json:"sha256,omitempty"` - // ForceSendFields is a list of field names (e.g. "KmsKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsKeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomerEncryptionKey) MarshalJSON() ([]byte, error) { - type NoMethod CustomerEncryptionKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CustomerEncryptionKeyProtectedDisk struct { - // DiskEncryptionKey: Decrypts data associated with the disk with - // acustomer-supplied - // encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // Source: Specifies a valid partial or full URL to an existing Persistent - // Disk - // resource. This field is only applicable for persistent disks. - // For example: - // - // "source": "/compute/v1/projects/project_id/zones/zone/disks/ - // disk_name - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) { - type NoMethod CustomerEncryptionKeyProtectedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Date: Represents a whole or partial calendar date, such as a birthday. The -// time of -// day and time zone are either specified elsewhere or are insignificant. -// The -// date is relative to the Gregorian Calendar. This can represent one of -// the -// following: -// -// - A full date, with non-zero year, month, and day values. -// - A month and day, with a zero year (for example, an anniversary). -// - A year on its own, with a zero month and a zero day. -// - A year and month, with a zero day (for example, a credit card expiration -// date). -// -// Related types: -// -// * google.type.TimeOfDay -// * google.type.DateTime -// * google.protobuf.Timestamp -type Date struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, - // or 0 - // to specify a year by itself or a year and month where the day - // isn't - // significant. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a - // month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without - // a year. - Year int64 `json:"year,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Date) MarshalJSON() ([]byte, error) { - type NoMethod Date - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DeprecationStatus: Deprecation status for a public resource. -type DeprecationStatus struct { - // Deleted: An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to DELETED. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Deleted string `json:"deleted,omitempty"` - // Deprecated -- An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to DEPRECATED. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Deprecated string `json:"deprecated,omitempty"` - // Obsolete: An optional RFC3339 timestamp on or after which the state of - // this - // resource is intended to change to OBSOLETE. This is only - // informational and the status will not change unless the client - // explicitly - // changes it. - Obsolete string `json:"obsolete,omitempty"` - // Replacement: The URL of the suggested replacement for a deprecated - // resource. - // The suggested replacement resource must be the same kind of resource as - // the - // deprecated resource. - Replacement string `json:"replacement,omitempty"` - // State: The deprecation state of this resource. This can be - // ACTIVE,DEPRECATED, OBSOLETE, or DELETED. - // Operations which communicate the end of life date for an image, can - // useACTIVE. Operations which create a new resource using aDEPRECATED resource - // will return successfully, but with a - // warning indicating the deprecated resource and recommending its - // replacement. Operations which use OBSOLETE orDELETED resources will be - // rejected and result in an error. - // - // Possible values: - // "ACTIVE" - // "DELETED" - // "DEPRECATED" - // "OBSOLETE" - State string `json:"state,omitempty"` - // StateOverride: The rollout policy for this deprecation. This policy is only - // enforced by - // image family views. The rollout policy restricts the zones where - // the - // associated resource is considered in a deprecated state. When the - // rollout - // policy does not include the user specified zone, or if the zone is - // rolled - // out, the associated resource is considered in a deprecated state. - // - // The rollout policy for this deprecation is read-only, except for - // allowlisted users. This field might not be configured. To view the - // latest - // non-deprecated image in a specific zone, use theimageFamilyViews.get method. - StateOverride *RolloutPolicy `json:"stateOverride,omitempty"` - // ForceSendFields is a list of field names (e.g. "Deleted") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Deleted") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DeprecationStatus) MarshalJSON() ([]byte, error) { - type NoMethod DeprecationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Disk: Represents a Persistent Disk resource. -// -// Google Compute Engine has two Disk resources: -// -// * Zonal (/compute/docs/reference/rest/beta/disks) -// * Regional (/compute/docs/reference/rest/beta/regionDisks) -// -// Persistent disks are required for running your VM instances. -// Create both boot and non-boot (data) persistent disks. For more -// information, -// read Persistent Disks. For more -// storage options, read Storage options. -// -// The disks resource represents a zonal persistent disk. -// For more information, readZonal persistent disks. -// -// The regionDisks resource represents a -// regional persistent disk. For more information, read -// Regional resources. -type Disk struct { - // AccessMode: The access mode of the disk. - // - // - // - READ_WRITE_SINGLE: The default AccessMode, means the - // disk can be attached to single instance in RW mode. - // - READ_WRITE_MANY: The AccessMode means the disk can be - // attached to multiple instances in RW mode. - // - READ_ONLY_MANY: The AccessMode means the disk can be - // attached to multiple instances in RO mode. - // - // - // The AccessMode is only valid for Hyperdisk disk types. - // - // Possible values: - // "READ_ONLY_MANY" - The AccessMode means the disk can be attached to - // multiple instances in RO - // mode. - // "READ_WRITE_MANY" - The AccessMode means the disk can be attached to - // multiple instances in RW - // mode. - // "READ_WRITE_SINGLE" - The default AccessMode, means the disk can be - // attached to single instance - // in RW mode. - AccessMode string `json:"accessMode,omitempty"` - // Architecture: The architecture of the disk. Valid values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AsyncPrimaryDisk: Disk asynchronously replicated into this disk. - AsyncPrimaryDisk *DiskAsyncReplication `json:"asyncPrimaryDisk,omitempty"` - // AsyncSecondaryDisks: [Output Only] A list of disks this disk is - // asynchronously replicated to. - AsyncSecondaryDisks map[string]DiskAsyncReplicationList `json:"asyncSecondaryDisks,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskEncryptionKey: Encrypts the disk using a - // customer-supplied encryption key or a - // customer-managed encryption key. - // - // Encryption keys do not protect access to metadata of the disk. - // - // After you encrypt a disk with a customer-supplied key, you must provide - // the - // same key if you use the disk later. For example, to create a disk - // snapshot, - // to create a disk image, to create a machine image, or to attach the disk - // to - // a virtual machine. - // - // After you encrypt a disk with a customer-managed key, - // thediskEncryptionKey.kmsKeyName is set to a key *version* - // name once the disk is created. The disk is encrypted with this version - // of - // the key. In the response, diskEncryptionKey.kmsKeyName appears - // in the following - // format: - // - // "diskEncryptionKey.kmsKeyName": - // "projects/kms_project_id/locations/region/keyRings/ - // key_region/cryptoKeys/key - // /cryptoKeysVersions/version - // - // If you do not provide an encryption key when creating the disk, then the - // - // disk is encrypted using an automatically generated key and you don't need - // - // to provide a key to use the disk later. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // EnableConfidentialCompute: Whether this disk is using confidential compute - // mode. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // EraseWindowsVssSignature: Specifies whether the disk restored from a source - // snapshot should erase - // Windows specific VSS signature. - EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interface: [Deprecated] Specifies the disk interface to use for attaching - // this disk, - // which is either SCSI or NVME. The default isSCSI. - // - // Possible values: - // "NVME" - // "SCSI" - // "UNSPECIFIED" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#disk for - // disks. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this disk, - // which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a disk. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this disk. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LastAttachTimestamp: [Output Only] Last attach timestamp inRFC3339 - // text format. - LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` - // LastDetachTimestamp: [Output Only] Last detach timestamp inRFC3339 - // text format. - LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are attached - // to this disk. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: A list of publicly visible licenses. Reserved for Google's use. - Licenses []string `json:"licenses,omitempty"` - // LocationHint: An opaque location hint used to place the disk close to other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // Locked: [Output Only] The field indicates if the disk is created from a - // locked - // source image. Attachment of a disk created from a locked source image - // will - // cause the following operations to become irreversibly prohibited: - // - // - R/W or R/O disk attachment to any other instance - // - Disk detachment. And the disk can only be deleted when the instance - // is deleted - // - Creation of images or snapshots - // - Disk cloning - // - // - // - // Furthermore, the instance with at least one disk with locked flag set - // to - // true will be prohibited from performing the operations below: - // - // - Further attachment of secondary disks. - // - Detachment of any disks - // - Create machine images - // - Create instance template - // - Delete the instance with --keep-disk parameter set to true for locked - // disks - // - Attach a locked disk with --auto-delete parameter set to false - Locked bool `json:"locked,omitempty"` - // MultiWriter: Indicates whether or not the disk can be read/write attached - // to - // more than one instance. - MultiWriter bool `json:"multiWriter,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Options: Internal use only. - Options string `json:"options,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *DiskParams `json:"params,omitempty"` - // PhysicalBlockSizeBytes: Physical block size of the persistent disk, in - // bytes. - // If not present in a request, a default value is used. - // The currently supported size is 4096, other sizes may be added in - // the future. - // If an unsupported value is requested, the error message will list - // the supported values for the caller's project. - PhysicalBlockSizeBytes int64 `json:"physicalBlockSizeBytes,omitempty,string"` - // ProvisionedIops: Indicates how many IOPS to provision for the disk. This - // sets the number - // of I/O operations per second that the disk can handle. Values must - // be - // between 10,000 and 120,000. For more details, see theExtreme persistent - // disk documentation. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: Indicates how much throughput to provision for the - // disk. This sets the - // number of throughput mb per second that the disk can handle. Values must - // be - // greater than or equal to 1. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // Region: [Output Only] URL of the region where the disk resides. Only - // applicable for - // regional resources. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // ReplicaZones: URLs of the zones where the disk should be replicated to. Only - // applicable - // for regional resources. - ReplicaZones []string `json:"replicaZones,omitempty"` - // ResourcePolicies: Resource policies applied to this disk for automatic - // snapshot creations. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Status information for the disk resource. - ResourceStatus *DiskResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SizeGb: Size, in GB, of the persistent disk. You can specify - // this field when creating a persistent disk using thesourceImage, - // sourceSnapshot, orsourceDisk parameter, or specify it alone to create an - // empty - // persistent disk. - // - // If you specify this field along with a source, the value ofsizeGb must not - // be less than the size of the - // source. - // Acceptable values are greater than 0. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // SourceConsistencyGroupPolicy: [Output Only] URL of the - // DiskConsistencyGroupPolicy for a secondary disk - // that was created using a consistency group. - SourceConsistencyGroupPolicy string `json:"sourceConsistencyGroupPolicy,omitempty"` - // SourceConsistencyGroupPolicyId: [Output Only] ID of the - // DiskConsistencyGroupPolicy for a secondary disk - // that was created using a consistency group. - SourceConsistencyGroupPolicyId string `json:"sourceConsistencyGroupPolicyId,omitempty"` - // SourceDisk: The source disk used to create this disk. You can provide this - // as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskId: [Output Only] The unique ID of the disk used to create this - // disk. This - // value identifies the exact disk that was used to create this - // persistent - // disk. For example, if you created the persistent disk from a disk that - // was later deleted and recreated under the same name, the source disk - // ID - // would identify the exact version of the disk that was used. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceImage: The source image used to create this disk. If the source image - // is - // deleted, this field will not be set. - // - // To create a disk with one of the public operating system images, specify - // the image by its family name. For example, specifyfamily/debian-9 to use the - // latest Debian 9 - // image: - // - // projects/debian-cloud/global/images/family/debian-9 - // - // - // Alternatively, use a specific version of a public operating system - // image: - // - // projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD - // - // - // To create a disk with a custom image that you created, specify the - // image name in the following format: - // - // global/images/my-custom-image - // - // - // You can also specify a custom image by its image family, which returns - // the latest version of the image in that family. Replace the image name - // with family/family-name: - // - // global/images/family/my-image-family - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: Thecustomer-supplied - // encryption key of the source image. Required if the source image - // is - // protected by a customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceImageId: [Output Only] The ID value of the image used to create this - // disk. This - // value identifies the exact image that was used to create this - // persistent - // disk. For example, if you created the persistent disk from an image that - // was later deleted and recreated under the same name, the source image - // ID - // would identify the exact version of the image that was used. - SourceImageId string `json:"sourceImageId,omitempty"` - // SourceInstantSnapshot: The source instant snapshot used to create this disk. - // You can provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot - // - projects/project/zones/zone/instantSnapshots/instantSnapshot - // - zones/zone/instantSnapshots/instantSnapshot - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot - // used to create this - // disk. This value identifies the exact instant snapshot that was used - // to - // create this persistent disk. For example, if you created the persistent - // disk from an instant snapshot that was later deleted and recreated under - // the same name, the source instant snapshot ID would identify the - // exact - // version of the instant snapshot that was used. - SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` - // SourceSnapshot: The source snapshot used to create this disk. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot - // - // - projects/project/global/snapshots/snapshot - // - global/snapshots/snapshot - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: Thecustomer-supplied - // encryption key of the source snapshot. Required if the source snapshot - // is protected by a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to create - // this disk. This - // value identifies the exact snapshot that was used to create this - // persistent - // disk. For example, if you created the persistent disk from a snapshot - // that - // was later deleted and recreated under the same name, the source snapshot - // ID - // would identify the exact version of the snapshot that was used. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // SourceStorageObject: The full Google Cloud Storage URI where the disk image - // is stored. This file - // must be a gzip-compressed tarball whose name ends in .tar.gz or - // virtual - // machine disk whose name ends in vmdk. Valid URIs may start with gs:// - // or - // https://storage.googleapis.com/. This flag is not optimized for - // creating - // multiple disks from a source storage object. To create many disks from - // a - // source storage object, use gcloud compute images - // import instead. - SourceStorageObject string `json:"sourceStorageObject,omitempty"` - // Status: [Output Only] The status of disk creation. - // - // - // - CREATING: Disk is provisioning. - // - RESTORING: Source data is being copied into the - // disk. - // - FAILED: Disk creation failed. - // - READY: Disk is ready for use. - // - DELETING: Disk is deleting. - // - // Possible values: - // "CREATING" - Disk is provisioning - // "DELETING" - Disk is deleting. - // "FAILED" - Disk creation failed. - // "READY" - Disk is ready for use. - // "RESTORING" - Source data is being copied into the disk. - // "UNAVAILABLE" - Disk is currently unavailable and cannot be accessed, - // attached or - // detached. - Status string `json:"status,omitempty"` - // StoragePool: The storage pool in which the new disk is created. You can - // provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/storagePools/storagePool - // - projects/project/zones/zone/storagePools/storagePool - // - zones/zone/storagePools/storagePool - StoragePool string `json:"storagePool,omitempty"` - // StorageType: [Deprecated] Storage type of the persistent disk. - // - // Possible values: - // "HDD" - // "SSD" - StorageType string `json:"storageType,omitempty"` - // Type: URL of the disk type resource describing which disk type to use to - // create - // the disk. Provide this when creating the disk. For - // example:projects/project/zones/zone/diskTypes/pd-ssd. See Persistent - // disk - // types. - Type string `json:"type,omitempty"` - // UserLicenses: A list of publicly visible user-licenses. Unlike regular - // licenses, user - // provided licenses can be modified after the disk is created. This includes - // a list of URLs to the license resource. For example, to provide a - // debian - // license: - // - // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - UserLicenses []string `json:"userLicenses,omitempty"` - // Users: [Output Only] Links to the users of the disk (attached instances) - // in form:projects/project/zones/zone/instances/instance - Users []string `json:"users,omitempty"` - // Zone: [Output Only] URL of the zone where the disk resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Disk) MarshalJSON() ([]byte, error) { - type NoMethod Disk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DisksScopedList resources. - Items map[string]DisksScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#diskAggregatedList for - // aggregated lists of persistent - // disks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskAggregatedListWarning: [Output Only] Informational warning message. -type DiskAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAsyncReplication struct { - // ConsistencyGroupPolicy: [Output Only] URL of the DiskConsistencyGroupPolicy - // if replication was - // started on the disk as a member of a group. - ConsistencyGroupPolicy string `json:"consistencyGroupPolicy,omitempty"` - // ConsistencyGroupPolicyId: [Output Only] ID of the DiskConsistencyGroupPolicy - // if replication was - // started on the disk as a member of a group. - ConsistencyGroupPolicyId string `json:"consistencyGroupPolicyId,omitempty"` - // Disk: The other disk asynchronously replicated to or from the current - // disk. - // You can provide this as a partial or full URL to the resource. - // For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - Disk string `json:"disk,omitempty"` - // DiskId: [Output Only] The unique ID of the other disk asynchronously - // replicated - // to or from the current disk. This value identifies the exact disk that - // was used to create this replication. For example, if you started - // replicating the persistent disk from a disk that was later deleted - // and - // recreated under the same name, the disk ID would identify the exact - // version of the disk that was used. - DiskId string `json:"diskId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsistencyGroupPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsistencyGroupPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAsyncReplication) MarshalJSON() ([]byte, error) { - type NoMethod DiskAsyncReplication - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskAsyncReplicationList struct { - AsyncReplicationDisk *DiskAsyncReplication `json:"asyncReplicationDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncReplicationDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncReplicationDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskAsyncReplicationList) MarshalJSON() ([]byte, error) { - type NoMethod DiskAsyncReplicationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskInstantiationConfig: A specification of the desired way to instantiate a -// disk in the instance -// template when its created from a source instance. -type DiskInstantiationConfig struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // CustomImage: The custom source image to be used to restore this disk when - // instantiating - // this instance template. - CustomImage string `json:"customImage,omitempty"` - // DeviceName: Specifies the device name of the disk to which the - // configurations apply to. - DeviceName string `json:"deviceName,omitempty"` - // InstantiateFrom: Specifies whether to include the disk and what image to - // use. Possible - // values are: - // - // - // - source-image: to use the same image that was used to - // create the source instance's corresponding disk. Applicable to the - // boot - // disk and additional read-write disks. - // - source-image-family: to use the same image family that - // was used to create the source instance's corresponding disk. - // Applicable - // to the boot disk and additional read-write disks. - // - custom-image: to use a user-provided image url for disk - // creation. Applicable to the boot disk and additional read-write - // disks. - // - attach-read-only: to attach a read-only - // disk. Applicable to read-only disks. - // - do-not-include: to exclude a disk from the template. - // Applicable to additional read-write disks, local SSDs, and read-only - // disks. - // - // Possible values: - // "ATTACH_READ_ONLY" - Attach the existing disk in read-only mode. The - // request will fail if the - // disk was attached in read-write mode on the source instance. Applicable - // to: read-only disks. - // "BLANK" - Create a blank disk. The disk will be created unformatted. - // Applicable to: - // additional read-write disks, local SSDs. - // "CUSTOM_IMAGE" - Use the custom image specified in the custom_image field. - // Applicable to: - // boot disk, additional read-write disks. - // "DEFAULT" - Use the default instantiation option for the corresponding - // type of disk. - // For boot disk and any other R/W disks, new custom images will be - // created - // from each disk. For read-only disks, they will be attached in - // read-only - // mode. Local SSD disks will be created as blank volumes. - // "DO_NOT_INCLUDE" - Do not include the disk in the instance template. - // Applicable to: - // additional read-write disks, local SSDs, read-only disks. - // "SOURCE_IMAGE" - Use the same source image used for creation of the source - // instance's - // corresponding disk. The request will fail if the source VM's disk - // was - // created from a snapshot. Applicable to: boot disk, additional - // read-write - // disks. - // "SOURCE_IMAGE_FAMILY" - Use the same source image family used for creation - // of the source - // instance's corresponding disk. The request will fail if the source image - // of the source disk does not belong to any image family. Applicable to: - // boot disk, additional read-write disks. - InstantiateFrom string `json:"instantiateFrom,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskInstantiationConfig) MarshalJSON() ([]byte, error) { - type NoMethod DiskInstantiationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskList: A list of Disk resources. -type DiskList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Disk resources. - Items []*Disk `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#diskList for - // lists of disks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskList) MarshalJSON() ([]byte, error) { - type NoMethod DiskList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskListWarning: [Output Only] Informational warning message. -type DiskListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a zone: - // - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - // TargetDisk: The URL of the target disk to move. This can be a full or - // partial URL. - // For example, the following are all valid URLs to a disk: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - TargetDisk string `json:"targetDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestinationZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod DiskMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskParams: Additional disk params. -type DiskParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the disk. Tag keys - // and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskParams) MarshalJSON() ([]byte, error) { - type NoMethod DiskParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskResourceStatus struct { - AsyncPrimaryDisk *DiskResourceStatusAsyncReplicationStatus `json:"asyncPrimaryDisk,omitempty"` - // AsyncSecondaryDisks: Key: disk, value: AsyncReplicationStatus message - AsyncSecondaryDisks map[string]DiskResourceStatusAsyncReplicationStatus `json:"asyncSecondaryDisks,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncPrimaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncPrimaryDisk") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod DiskResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskResourceStatusAsyncReplicationStatus struct { - // Possible values: - // "ACTIVE" - Replication is active. - // "CREATED" - Secondary disk is created and is waiting for replication to - // start. - // "STARTING" - Replication is starting. - // "STATE_UNSPECIFIED" - // "STOPPED" - Replication is stopped. - // "STOPPING" - Replication is stopping. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskResourceStatusAsyncReplicationStatus) MarshalJSON() ([]byte, error) { - type NoMethod DiskResourceStatusAsyncReplicationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskSettings struct { - // AccessLocation: Policy of which locations are allowed to create - // regional - // snapshots. - AccessLocation *DiskSettingsAccessLocation `json:"accessLocation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettings) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskSettingsAccessLocation: AccessLocation is only used for regional -// snapshot. It contains which -// regions are allowed to create a regional snapshot from disks located in -// the -// given region/zone. -// It includes key-value pairs designed to store the following structure. -// The -// keys should match their corresponding values, which must be -// provided: -// -// access_location: { -// locations { -// us-central1 { -// region: "us-central1" -// }, -// asia-west2 { -// region: "asia-west2" -// } -// } -// } -type DiskSettingsAccessLocation struct { - // Locations: List of regions that can create a regional - // snapshot from the current region - Locations map[string]DiskSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` - // Policy: Policy of which location is allowed to access snapshot. - // - // Possible values: - // "ALL_REGIONS" - Any regions will be able to access the source location. - // "POLICY_UNSPECIFIED" - // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to create - // region scoped - // snapshots - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettingsAccessLocation) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettingsAccessLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskSettingsAccessLocationAccessLocationPreference: A structure for -// specifying an allowed target region to create snapshot. -type DiskSettingsAccessLocationAccessLocationPreference struct { - // Region: Accessible region name - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Region") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Region") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskSettingsAccessLocationAccessLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod DiskSettingsAccessLocationAccessLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskType: Represents a Disk Type resource. -// -// Google Compute Engine has two Disk Type resources: -// -// * Regional (/compute/docs/reference/rest/beta/regionDiskTypes) -// * Zonal (/compute/docs/reference/rest/beta/diskTypes) -// -// You can choose from a variety of disk types based on your needs. -// For more information, readStorage options. -// -// The diskTypes resource represents disk types for a zonal -// persistent disk. -// For more information, readZonal persistent disks. -// -// The regionDiskTypes resource represents disk types for a -// regional persistent disk. For more information, read Regional persistent -// disks. -type DiskType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultDiskSizeGb: [Output Only] Server-defined default disk size in GB. - DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - // Deprecated -- [Output Only] The deprecation status associated with this disk - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#diskType - // for disk types. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the disk type resides. - // Only - // applicable for regional resources. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ValidDiskSize: [Output Only] An optional textual description of the valid - // disk size, - // such as "10GB-10TB". - ValidDiskSize string `json:"validDiskSize,omitempty"` - // Zone: [Output Only] URL of the zone where the disk type resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskType) MarshalJSON() ([]byte, error) { - type NoMethod DiskType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskTypesScopedList resources. - Items map[string]DiskTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#diskTypeAggregatedList. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeAggregatedListWarning: [Output Only] Informational warning message. -type DiskTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeList: Contains a list of disk types. -type DiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#diskTypeList - // for disk types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *DiskTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypeListWarning: [Output Only] Informational warning message. -type DiskTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedList struct { - // DiskTypes: [Output Only] A list of disk types contained in this scope. - DiskTypes []*DiskType `json:"diskTypes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of disk - // types - // when the list is empty. - Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DiskTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of disk types -// when the list is empty. -type DiskTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DiskTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DiskTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksAddResourcePoliciesRequest struct { - // ResourcePolicies: Full or relative path to the resource policy to be added - // to this disk. You - // can only specify one resource policy. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksResizeRequest struct { - // SizeGb: The new size of the persistent disk, which is specified in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SizeGb") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksScopedList struct { - // Disks: [Output Only] A list of disks contained in this scope. - Disks []*Disk `json:"disks,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // disks when - // the list is empty. - Warning *DisksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisksScopedListWarning: [Output Only] Informational warning which replaces -// the list of disks when -// the list is empty. -type DisksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*DisksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod DisksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DisksStartAsyncReplicationRequest struct { - // AsyncSecondaryDisk: The secondary disk to start asynchronous replication - // to. - // You can provide this as a partial or full URL to the resource. For - // example, - // the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncSecondaryDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { - type NoMethod DisksStartAsyncReplicationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisksStopGroupAsyncReplicationResource: A transient resource used in -// compute.disks.stopGroupAsyncReplication -// and -// compute.regionDisks.stopGroupAsyncReplication. It is only used to -// process -// requests and is not persisted. -type DisksStopGroupAsyncReplicationResource struct { - // ResourcePolicy: The URL of the DiskConsistencyGroupPolicy for the group of - // disks to stop. - // This may be a full or partial URL, such as: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // projects/project/regions/region/resourcePolicies/resourcePolicy - // - // - - // regions/region/resourcePolicies/resourcePolicy - ResourcePolicy string `json:"resourcePolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisksStopGroupAsyncReplicationResource) MarshalJSON() ([]byte, error) { - type NoMethod DisksStopGroupAsyncReplicationResource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DisplayDevice: A set of Display Device options -type DisplayDevice struct { - // EnableDisplay: Defines whether the instance has Display enabled. - EnableDisplay bool `json:"enableDisplay,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableDisplay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableDisplay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DisplayDevice) MarshalJSON() ([]byte, error) { - type NoMethod DisplayDevice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DistributionPolicy struct { - // TargetShape: The distribution shape to which the group converges either - // proactively or - // on resize events (depending on the value set - // inupdatePolicy.instanceRedistributionType). - // - // Possible values: - // "ANY" - The group picks zones for creating VM instances to fulfill the - // requested - // number of VMs within present resource constraints and to - // maximize - // utilization of unused zonal reservations. Recommended for batch - // workloads - // that do not require high availability. - // "ANY_SINGLE_ZONE" - The group creates all VM instances within a single - // zone. The zone is - // selected based on the present resource constraints and to - // maximize - // utilization of unused zonal reservations. - // Recommended for batch workloads with heavy interprocess communication. - // "BALANCED" - The group prioritizes acquisition of resources, scheduling - // VMs in zones - // where resources are available while distributing VMs as evenly as - // possible across selected zones to minimize the impact of zonal - // failure. - // Recommended for highly available serving workloads. - // "EVEN" - The group schedules VM instance creation and deletion to achieve - // and - // maintain an even number of managed instances across the selected zones. - // The distribution is even when the number of managed instances does - // not - // differ by more than 1 between any two zones. Recommended for - // highly - // available serving workloads. - TargetShape string `json:"targetShape,omitempty"` - // Zones: Zones where the regional managed instance group will create and - // manage - // its instances. - Zones []*DistributionPolicyZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetShape") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod DistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DistributionPolicyZoneConfiguration struct { - // Zone: The URL of thezone. - // The zone must exist in the region where the managed instance group - // is - // located. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zone") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DistributionPolicyZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod DistributionPolicyZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Duration: A Duration represents a fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". Range is approximately 10,000 years. -type Duration struct { - // Nanos: Span of time that's a fraction of a second at nanosecond - // resolution. - // Durations less than one second are represented with a 0 - // `seconds` field and a positive `nanos` field. Must be from 0 - // to 999,999,999 inclusive. - Nanos int64 `json:"nanos,omitempty"` - // Seconds: Span of time at a resolution of a second. Must be from 0 - // to 315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - Seconds int64 `json:"seconds,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Nanos") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nanos") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Duration) MarshalJSON() ([]byte, error) { - type NoMethod Duration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ErrorInfo: Describes the cause of the error with structured -// details. -// -// Example of an error when contacting the "pubsub.googleapis.com" API when -// it -// is not enabled: -// -// { "reason": "API_DISABLED" -// "domain": "googleapis.com" -// "metadata": { -// "resource": "projects/123", -// "service": "pubsub.googleapis.com" -// } -// } -// -// This response indicates that the pubsub.googleapis.com API is not -// enabled. -// -// Example of an error that is returned when attempting to create a -// Spanner -// instance in a region that is out of stock: -// -// { "reason": "STOCKOUT" -// "domain": "spanner.googleapis.com", -// "metadata": { -// "availableRegions": "us-central1,us-east2" -// } -// } -type ErrorInfo struct { - // Domain: The logical grouping to which the "reason" belongs. The error - // domain - // is typically the registered service name of the tool or product - // that - // generates the error. Example: "pubsub.googleapis.com". If the error - // is - // generated by some common infrastructure, the error domain must be a - // globally unique value that identifies the infrastructure. For Google - // API - // infrastructure, the error domain is "googleapis.com". - Domain string `json:"domain,omitempty"` - // Metadatas: Additional structured details about this error. - // - // Keys must match a regular expression of `a-z+` but should - // ideally be lowerCamelCase. Also, they must be limited to 64 characters - // in - // length. When identifying the current value of an exceeded limit, the - // units - // should be contained in the key, not the value. For example, rather - // than - // `{"instanceLimit": "100/request"}`, should be returned - // as, - // `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number - // of - // instances that can be created in a single (batch) request. - Metadatas map[string]string `json:"metadatas,omitempty"` - // Reason: The reason of the error. This is a constant value that identifies - // the - // proximate cause of the error. Error reasons are unique within a - // particular - // domain of errors. This should be at most 63 characters and match a - // regular expression of `A-Z+[A-Z0-9]`, which represents - // UPPER_SNAKE_CASE. - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Domain") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ErrorInfo) MarshalJSON() ([]byte, error) { - type NoMethod ErrorInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoute struct { - // DestRange: The destination range of the route. - DestRange string `json:"destRange,omitempty"` - // Imported: True if the peering route has been imported from a peer. The - // actual import - // happens if the field networkPeering.importCustomRoutes is true - // for this network, and networkPeering.exportCustomRoutes is - // true for the peer network, and the import does not result in a - // route - // conflict. - Imported bool `json:"imported,omitempty"` - // NextHopRegion: The region of peering route next hop, only applies to dynamic - // routes. - NextHopRegion string `json:"nextHopRegion,omitempty"` - // Priority: The priority of the peering route. - Priority int64 `json:"priority,omitempty"` - // Type: The type of the peering route. - // - // Possible values: - // "DYNAMIC_PEERING_ROUTE" - For routes exported from local network. - // "STATIC_PEERING_ROUTE" - The peering route. - // "SUBNET_PEERING_ROUTE" - The peering route corresponding to subnetwork - // range. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoute) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoutesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ExchangedPeeringRoute resources. - Items []*ExchangedPeeringRoute `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#exchangedPeeringRoutesList for exchanged peering - // routes lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ExchangedPeeringRoutesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesList) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExchangedPeeringRoutesListWarning: [Output Only] Informational warning -// message. -type ExchangedPeeringRoutesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ExchangedPeeringRoutesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExchangedPeeringRoutesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExchangedPeeringRoutesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ExchangedPeeringRoutesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGateway: Represents an external VPN gateway. -// -// External VPN gateway is the on-premises VPN gateway(s) or another -// cloud -// provider's VPN gateway that connects to your Google Cloud VPN gateway. -// -// To create a highly available VPN from Google Cloud Platform to your -// VPN gateway or another cloud provider's VPN gateway, you must create -// a -// external VPN gateway resource with information about the other gateway. -// -// For more information about using external VPN gateways, see -// Creating an HA VPN gateway and tunnel pair to a peer VPN. -type ExternalVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id *uint64 `json:"id,omitempty,string"` - // Interfaces: A list of interfaces for this external VPN gateway. - // - // If your peer-side gateway is an on-premises gateway and non-AWS - // cloud - // providers' gateway, at most two interfaces can be provided for an - // external - // VPN gateway. If your peer side is an AWS virtual private gateway, - // four - // interfaces should be provided for an external VPN gateway. - Interfaces []*ExternalVpnGatewayInterface `json:"interfaces,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#externalVpnGateway - // for externalVpnGateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // ExternalVpnGateway, - // which is essentially a hash of the labels set used for optimistic - // locking. - // The fingerprint is initially generated by Compute Engine and changes - // after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an ExternalVpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // RedundancyType: Indicates the user-supplied redundancy type of this external - // VPN gateway. - // - // Possible values: - // "FOUR_IPS_REDUNDANCY" - The external VPN gateway has four public IP - // addresses; at the time of - // writing this API, the AWS virtual private gateway is an example which - // has - // four public IP addresses for high availability connections; there should - // be two VPN connections in the AWS virtual private gateway , each AWS - // VPN - // connection has two public IP addresses; please make sure to put two - // public IP addresses from one AWS VPN connection into interfaces 0 and 1 - // of this external VPN gateway, and put the other two public IP addresses - // from another AWS VPN connection into interfaces 2 and 3 of this external - // VPN gateway. When displaying highly available configuration status - // for the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN - // gateway, Google will always detect whether interfaces 0 and 1 are - // connected on one interface of HA Cloud VPN gateway, and detect - // whether - // interfaces 2 and 3 are connected to another interface of the HA Cloud - // VPN - // gateway. - // "SINGLE_IP_INTERNALLY_REDUNDANT" - The external VPN gateway has only one - // public IP address which internally - // provide redundancy or failover. - // "TWO_IPS_REDUNDANCY" - The external VPN gateway has two public IP - // addresses which are redundant - // with each other, the following two types of setup on your on-premises - // side would have this type of redundancy: - // (1) Two separate on-premises gateways, each with one public IP address, - // the two on-premises gateways are redundant with each other. - // (2) A single on-premise gateway with two public IP addresses that are - // redundant with eatch other. - RedundancyType string `json:"redundancyType,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayInterface: The interface for the external VPN gateway. -type ExternalVpnGatewayInterface struct { - // Id: The numeric ID of this interface. - // The allowed input values for this id for different redundancy types - // of - // external VPN gateway: - // - // - SINGLE_IP_INTERNALLY_REDUNDANT - 0 - // - TWO_IPS_REDUNDANCY - 0, 1 - // - FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 - Id int64 `json:"id,omitempty"` - // IpAddress: IP address of the interface in the external VPN gateway. Only - // IPv4 is - // supported. This IP address can be either from your on-premise gateway - // or - // another Cloud provider's VPN gateway, it cannot be an IP address from - // Google Compute Engine. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: IPv6 address of the interface in the external VPN gateway. This - // IPv6 - // address can be either from your on-premise gateway or another - // Cloud - // provider's VPN gateway, it cannot be an IP address from Google - // Compute - // Engine. Must specify an IPv6 address (not IPV4-mapped) using any - // format - // described in RFC 4291 (e.g. 2001:db8:0:0:2d9:51:0:0). The output format - // is RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). - Ipv6Address string `json:"ipv6Address,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayInterface) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayList: Response to the list request, and contains a list of -// externalVpnGateways. -type ExternalVpnGatewayList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ExternalVpnGateway resources. - Items []*ExternalVpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#externalVpnGatewayList - // for lists of externalVpnGateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ExternalVpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExternalVpnGatewayListWarning: [Output Only] Informational warning message. -type ExternalVpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ExternalVpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ExternalVpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExternalVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ExternalVpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FileContentBuffer struct { - // Content: The raw content in the secure keys file. - Content string `json:"content,omitempty"` - // FileType: The file type of source file. - // - // Possible values: - // "BIN" - // "UNDEFINED" - // "X509" - FileType string `json:"fileType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FileContentBuffer) MarshalJSON() ([]byte, error) { - type NoMethod FileContentBuffer - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Firewall: Represents a Firewall Rule resource. -// -// Firewall rules allow or deny ingress traffic to, and egress traffic from -// your -// instances. For more information, readFirewall rules. -type Firewall struct { - // Allowed: The list of ALLOW rules specified by this firewall. Each rule - // specifies a - // protocol and port-range tuple that describes a permitted connection. - Allowed []*FirewallAllowed `json:"allowed,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Denied: The list of DENY rules specified by this firewall. Each rule - // specifies a - // protocol and port-range tuple that describes a denied connection. - Denied []*FirewallDenied `json:"denied,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DestinationRanges: If destination ranges are specified, the firewall rule - // applies only to - // traffic that has destination IP address in these ranges. These ranges - // must - // be expressed inCIDR format. Both IPv4 and IPv6 are supported. - DestinationRanges []string `json:"destinationRanges,omitempty"` - // Direction: Direction of traffic to which this firewall applies, either - // `INGRESS` or - // `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot - // specify the sourceTags fields. - // - // Possible values: - // "EGRESS" - Indicates that firewall should apply to outgoing traffic. - // "INGRESS" - Indicates that firewall should apply to incoming traffic. - Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall rule is disabled. When set to true, - // the - // firewall rule is not enforced and the network behaves as if it did - // not - // exist. If this is unspecified, the firewall rule will be enabled. - Disabled bool `json:"disabled,omitempty"` - // EnableLogging: Deprecated in favor of enable in LogConfig. - // This field denotes whether to enable logging for a particular - // firewall rule. If logging is enabled, logs will be exported t - // Cloud Logging. - EnableLogging bool `json:"enableLogging,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#firewall - // for firewall rules. - Kind string `json:"kind,omitempty"` - // LogConfig: This field denotes the logging options for a particular firewall - // rule. If - // logging is enabled, logs will be exported to Cloud Logging. - LogConfig *FirewallLogConfig `json:"logConfig,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character - // must be a lowercase letter, and all following characters (except for - // the - // last character) must be a dash, lowercase letter, or digit. The - // last - // character must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: URL of the network resource for this firewall rule. If - // not - // specified when creating a firewall rule, the default network - // is used: - // - // global/networks/default - // - // If you choose to specify this field, you can specify the network as a full - // - // or partial URL. For example, the following are all valid URLs: - // - // - - // - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - // - // - projects/myproject/global/networks/my-network - // - global/networks/default - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *FirewallParams `json:"params,omitempty"` - // Priority: Priority for this rule. - // This is an integer between `0` and `65535`, both inclusive. - // The default value is `1000`. - // Relative priorities determine which rule takes effect if multiple - // rules - // apply. Lower values indicate higher priority. For example, a rule - // with - // priority `0` has higher precedence than a rule with priority `1`. - // DENY rules take precedence over ALLOW rules if they have equal - // priority. - // Note that VPC networks have implied - // rules with a priority of `65535`. To avoid conflicts with the implied - // rules, use a priority number less than `65535`. - Priority int64 `json:"priority,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SourceRanges: If source ranges are specified, the firewall rule applies only - // to traffic - // that has a source IP address in these ranges. These ranges must be - // expressed inCIDR format. One or both of sourceRanges - // and sourceTags may be set. - // If both fields are set, the rule applies to traffic that has a - // source IP address within sourceRanges OR a source IP - // from a resource with a matching tag listed in thesourceTags field. The - // connection does not need to match - // both fields for the rule to - // apply. Both IPv4 and IPv6 are supported. - SourceRanges []string `json:"sourceRanges,omitempty"` - // SourceServiceAccounts: If source service accounts are specified, the - // firewall rules apply only to - // traffic originating from an instance with a service account in this - // list. - // Source service accounts cannot be used to control traffic to an - // instance's - // external IP address because service accounts are associated with - // an - // instance, not an IP address.sourceRanges can be set at the same time - // assourceServiceAccounts. - // If both are set, the firewall applies to traffic that - // has a source IP address within the sourceRanges OR a source - // IP that belongs to an instance with service account listed - // insourceServiceAccount. The connection does not need to match - // both fields for the firewall to apply.sourceServiceAccounts cannot be used - // at the same time assourceTags or targetTags. - SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` - // SourceTags: If source tags are specified, the firewall rule applies only to - // traffic - // with source IPs that match the primary network interfaces of VM - // instances - // that have the tag and are in the same VPC network. - // Source tags cannot be used to control traffic to an instance's external - // IP - // address, it only applies to traffic between instances in the same - // virtual - // network. Because tags are associated with instances, not IP addresses. - // One or both of sourceRanges and sourceTags may be - // set. If both fields are set, the firewall applies to traffic that has - // a - // source IP address within sourceRanges OR a source IP from a - // resource with a matching tag listed in the sourceTags - // field. The connection does not need to match both fields for the - // firewall to apply. - SourceTags []string `json:"sourceTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating sets of - // instances located in the - // network that may make network connections as specified - // inallowed[].targetServiceAccounts cannot be used at the same time - // astargetTags or sourceTags. - // If neither targetServiceAccounts nor targetTags - // are specified, the firewall rule applies to all instances on the - // specified - // network. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - // TargetTags: A list of tags that controls which instances the firewall - // rule - // applies to. If targetTags are specified, then the firewall - // rule applies only to instances in the VPC network that have one of - // those - // tags. If no targetTags are specified, the firewall rule - // applies to all instances on the specified network. - TargetTags []string `json:"targetTags,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Allowed") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Allowed") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Firewall) MarshalJSON() ([]byte, error) { - type NoMethod Firewall - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallAllowed struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be one of - // the - // following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or - // the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. - // This field is only applicable for the UDP or TCP protocol. - // Each entry must be either an integer or a range. - // If not specified, this rule applies to connections through any - // port. - // - // Example inputs include: ["22"], ["80","443"], - // and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallAllowed) MarshalJSON() ([]byte, error) { - type NoMethod FirewallAllowed - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallDenied struct { - // IPProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be one of - // the - // following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or - // the IP protocol number. - IPProtocol string `json:"IPProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. - // This field is only applicable for the UDP or TCP protocol. - // Each entry must be either an integer or a range. - // If not specified, this rule applies to connections through any - // port. - // - // Example inputs include: ["22"], ["80","443"], - // and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallDenied) MarshalJSON() ([]byte, error) { - type NoMethod FirewallDenied - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallList: Contains a list of firewalls. -type FirewallList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Firewall resources. - Items []*Firewall `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#firewallList - // for lists of firewalls. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FirewallListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallListWarning: [Output Only] Informational warning message. -type FirewallListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallLogConfig: The available logging options for a firewall rule. -type FirewallLogConfig struct { - // Enable: This field denotes whether to enable logging for a particular - // firewall - // rule. - Enable bool `json:"enable,omitempty"` - // Metadata: This field can only be specified for a particular firewall rule - // if - // logging is enabled for that rule. This field denotes whether to include - // or exclude metadata for firewall logs. - // - // Possible values: - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod FirewallLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallParams: Additional firewall parameters. -type FirewallParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallParams) MarshalJSON() ([]byte, error) { - type NoMethod FirewallParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesListAssociationsResponse struct { - // Associations: A list of associations. - Associations []*FirewallPolicyAssociation `json:"associations,omitempty"` - // Kind: [Output Only] Type of firewallPolicy associations. - // Alwayscompute#FirewallPoliciesListAssociations for lists of - // firewallPolicy associations. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesListAssociationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesScopedList struct { - // FirewallPolicies: A list of firewall policies contained in this scope. - FirewallPolicies []*FirewallPolicy `json:"firewallPolicies,omitempty"` - // Warning: Informational warning which replaces the list of firewall policies - // when - // the list is empty. - Warning *FirewallPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPoliciesScopedListWarning: Informational warning which replaces the -// list of firewall policies when -// the list is empty. -type FirewallPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicy: Represents a Firewall Policy resource. -type FirewallPolicy struct { - // Associations: A list of associations that belong to this firewall policy. - Associations []*FirewallPolicyAssociation `json:"associations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DisplayName: Deprecated, please use short name instead. User-provided name - // of the - // Organization firewall policy. The name should be unique in the - // organization - // in which the firewall policy is created. - // This field is not applicable to network firewall policies. - // This name must be set on creation and cannot be changed. - // The name must be 1-63 characters long, and comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which - // means the first character must be a lowercase letter, and all - // following - // characters must be a dash, lowercase letter, or digit, except the - // last - // character, which cannot be a dash. - DisplayName string `json:"displayName,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make get() request to the - // firewall policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#firewallPolicyfor - // firewall policies - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. For Organization Firewall Policies it's - // a - // [Output Only] numeric ID allocated by Google Cloud which uniquely - // identifies the Organization Firewall Policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: A list of packet mirroring rules that belong to this - // policy. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Parent: [Output Only] The parent of the firewall policy. - // This field is not applicable to network firewall policies. - Parent string `json:"parent,omitempty"` - // PolicySource: [Output Only] Source of this Firewall Policy. USER_DEFINED - // if - // created by a Cloud user, or SYSTEM if created by managed - // services like GKE. - // - // Possible values: - // "SYSTEM" - // "USER_DEFINED" - PolicySource string `json:"policySource,omitempty"` - // PolicyType: The type of the firewall policy. This field can be - // eitherVPC_POLICY or RDMA_ROCE_POLICY. - // - // Note: if not specified then VPC_POLICY will be used. - // - // Possible values: - // "RDMA_ROCE_POLICY" - // "VPC_POLICY" - PolicyType string `json:"policyType,omitempty"` - // Region: [Output Only] URL of the region where the regional firewall policy - // resides. - // This field is not applicable to global firewall policies. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all firewall policy rule - // tuples. A firewall - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // Rules: A list of rules that belong to this policy. - // There must always be a default rule (rule with priority 2147483647 and - // match "*"). If no rules are provided when creating a firewall policy, - // a - // default rule with action "allow" will be added. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShortName: User-provided name of the Organization firewall policy. The name - // should be - // unique in the organization in which the firewall policy is created. - // This field is not applicable to network firewall policies. - // This name must be set on creation and cannot be changed. The name must - // be - // 1-63 characters long, and comply with RFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - ShortName string `json:"shortName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyAssociation struct { - // AttachmentTarget: The target that the firewall policy is attached to. - AttachmentTarget string `json:"attachmentTarget,omitempty"` - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy of the association. - DisplayName string `json:"displayName,omitempty"` - // FirewallPolicyId: [Output Only] The firewall policy ID of the association. - FirewallPolicyId string `json:"firewallPolicyId,omitempty"` - // Name: The name for an association. - Name string `json:"name,omitempty"` - // Priority: An integer indicating the priority of an association. The - // priority - // must be a positive value between 1 and 2147483647. - // Firewall Policies are evaluated from highest to lowest priority where 1 - // is the highest priority and 2147483647 is the lowest priority. - // The default value is `1000`. If two associations have the same priority - // then lexicographical order on association names is applied. - Priority int64 `json:"priority,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy of the - // association. - ShortName string `json:"shortName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttachmentTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of FirewallPolicy resources. - Items []*FirewallPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#firewallPolicyList for - // listsof FirewallPolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FirewallPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyListWarning: [Output Only] Informational warning message. -type FirewallPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FirewallPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyRule: Represents a rule that describes one or more match -// conditions along with -// the action to be taken when traffic matches this condition (allow or deny). -type FirewallPolicyRule struct { - // Action: The Action to perform when the client connection triggers the - // rule. - // Valid actions for firewall rules are: "allow", - // "deny", - // "apply_security_profile_group" and "goto_next". - // Valid actions for packet mirroring rules are: "mirror", "do_not_mirror" - // and "goto_next". - Action string `json:"action,omitempty"` - // Description: An optional description for this resource. - Description string `json:"description,omitempty"` - // Direction: The direction in which this rule applies. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall policy rule is disabled. When set to - // true, - // the firewall policy rule is not enforced and traffic behaves as if it - // did - // not exist. If this is unspecified, the firewall policy rule will be - // enabled. - Disabled bool `json:"disabled,omitempty"` - // EnableLogging: Denotes whether to enable logging for a particular rule. If - // logging is - // enabled, logs will be exported to the configured export destination - // in - // Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you - // cannot enable logging on "goto_next" rules. - EnableLogging bool `json:"enableLogging,omitempty"` - // Kind: [Output only] Type of the resource. Returnscompute#firewallPolicyRule - // for firewall rules andcompute#packetMirroringRule for packet mirroring - // rules. - Kind string `json:"kind,omitempty"` - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *FirewallPolicyRuleMatcher `json:"match,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 0 and 2147483647. - // Rules are evaluated from highest to lowest priority where 0 is the - // highest priority and 2147483647 is the lowest priority. - Priority int64 `json:"priority,omitempty"` - // RuleName: An optional name for the rule. This field is not a unique - // identifier - // and can be updated. - RuleName string `json:"ruleName,omitempty"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // firewall policy - // rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // SecurityProfileGroup: A fully-qualified URL of a SecurityProfile resource - // instance. - // Example: - // https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group - // Must be specified if action is one of 'apply_security_profile_group' - // or - // 'mirror'. Cannot be specified for other actions. - SecurityProfileGroup string `json:"securityProfileGroup,omitempty"` - // TargetForwardingRules: A list of forwarding rules to which this rule - // applies. - // This field allows you to control which load balancers get this rule. - // For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/forwardingRules/forwardingRule - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - projects/project/global/ - // forwardingRules/forwardingRule - // - projects/project/regions/region/forwardingRules/ - // forwardingRule - TargetForwardingRules []string `json:"targetForwardingRules,omitempty"` - // TargetResources: A list of network resource URLs to which this rule applies. - // This field - // allows you to control which network's VMs get this rule. If this field - // is left blank, all VMs within the organization will receive the rule. - TargetResources []string `json:"targetResources,omitempty"` - // TargetSecureTags: A list of secure tags that controls which instances the - // firewall rule - // applies to. If targetSecureTag are specified, then the - // firewall rule applies only to instances in the VPC network that have one - // of those EFFECTIVE secure tags, if all the target_secure_tag are - // in - // INEFFECTIVE state, then this rule will be ignored.targetSecureTag may not be - // set at the same time astargetServiceAccounts. - // If neither targetServiceAccounts nortargetSecureTag are specified, the - // firewall rule applies - // to all instances on the specified network. - // Maximum number of target label tags allowed is 256. - TargetSecureTags []*FirewallPolicyRuleSecureTag `json:"targetSecureTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - // TargetType: Target types of the firewall policy rule. - // Default value is INSTANCES. - // - // Possible values: - // "INSTANCES" - // "INTERNAL_MANAGED_LB" - TargetType string `json:"targetType,omitempty"` - // TlsInspect: Boolean flag indicating if the traffic should be TLS - // decrypted. - // Can be set only if action = 'apply_security_profile_group' and cannot - // be set for other actions. - TlsInspect bool `json:"tlsInspect,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FirewallPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. -// Exactly one field must be specified. -type FirewallPolicyRuleMatcher struct { - // DestAddressGroups: Address groups which should be matched against the - // traffic destination. - // Maximum number of destination address groups is 10. - DestAddressGroups []string `json:"destAddressGroups,omitempty"` - // DestFqdns: Fully Qualified Domain Name (FQDN) which should be matched - // against - // traffic destination. - // Maximum number of destination fqdn allowed is 100. - DestFqdns []string `json:"destFqdns,omitempty"` - // DestIpRanges: CIDR IP address range. - // Maximum number of destination CIDR IP ranges allowed is 5000. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // DestNetworkScope: Network scope of the traffic destination. - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - DestNetworkScope string `json:"destNetworkScope,omitempty"` - // DestNetworkType: Network type of the traffic destination. Allowed values - // are: - // - // - // - UNSPECIFIED - // - INTERNET - // - NON_INTERNET - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - DestNetworkType string `json:"destNetworkType,omitempty"` - // DestRegionCodes: Region codes whose IP addresses will be used to match for - // destination - // of traffic. Should be specified as 2 letter country code defined as per - // ISO 3166 alpha-2 country codes. ex."US" - // Maximum number of dest region codes allowed is 5000. - DestRegionCodes []string `json:"destRegionCodes,omitempty"` - // DestThreatIntelligences: Names of Network Threat Intelligence lists. - // The IPs in these lists will be matched against traffic destination. - DestThreatIntelligences []string `json:"destThreatIntelligences,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should match. - Layer4Configs []*FirewallPolicyRuleMatcherLayer4Config `json:"layer4Configs,omitempty"` - // SrcAddressGroups: Address groups which should be matched against the traffic - // source. - // Maximum number of source address groups is 10. - SrcAddressGroups []string `json:"srcAddressGroups,omitempty"` - // SrcFqdns: Fully Qualified Domain Name (FQDN) which should be matched - // against - // traffic source. - // Maximum number of source fqdn allowed is 100. - SrcFqdns []string `json:"srcFqdns,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of source CIDR IP ranges allowed is 5000. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // SrcNetworkScope: Network scope of the traffic source. - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - SrcNetworkScope string `json:"srcNetworkScope,omitempty"` - // SrcNetworkType: Network type of the traffic source. Allowed values are: - // - // - // - UNSPECIFIED - // - INTERNET - // - INTRA_VPC - // - NON_INTERNET - // - VPC_NETWORKS - // - // Possible values: - // "INTERNET" - // "INTRA_VPC" - // "NON_INTERNET" - // "UNSPECIFIED" - // "VPC_NETWORKS" - SrcNetworkType string `json:"srcNetworkType,omitempty"` - // SrcNetworks: Networks of the traffic source. It can be either a full or - // partial url. - SrcNetworks []string `json:"srcNetworks,omitempty"` - // SrcRegionCodes: Region codes whose IP addresses will be used to match for - // source - // of traffic. Should be specified as 2 letter country code defined as per - // ISO 3166 alpha-2 country codes. ex."US" - // Maximum number of source region codes allowed is 5000. - SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` - // SrcSecureTags: List of secure tag values, which should be matched at the - // source - // of the traffic. - // For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, - // and there is no srcIpRange, this rule will be ignored. - // Maximum number of source tag values allowed is 256. - SrcSecureTags []*FirewallPolicyRuleSecureTag `json:"srcSecureTags,omitempty"` - // SrcThreatIntelligences: Names of Network Threat Intelligence lists. - // The IPs in these lists will be matched against traffic source. - SrcThreatIntelligences []string `json:"srcThreatIntelligences,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestAddressGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestAddressGroups") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyRuleMatcherLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp,udp, icmp, esp,ah, - // ipip, sctp), or the IP - // protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP or TCP protocol. Each entry must be either - // an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleMatcherLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleMatcherLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FirewallPolicyRuleSecureTag struct { - // Name: Name of the secure tag, created with TagManager's TagValue API. - Name string `json:"name,omitempty"` - // State: [Output Only] State of the secure tag, either `EFFECTIVE` - // or - // `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted - // or its network is deleted. - // - // Possible values: - // "EFFECTIVE" - // "INEFFECTIVE" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FirewallPolicyRuleSecureTag) MarshalJSON() ([]byte, error) { - type NoMethod FirewallPolicyRuleSecureTag - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FixedOrPercent: Encapsulates numeric value that can be either absolute or -// relative. -type FixedOrPercent struct { - // Calculated: [Output Only] Absolute value of VM instances calculated based on - // the - // specific mode. - // - // - // - // - If the value is fixed, then the calculated - // value is equal to the fixed value. - // - If the value is a percent, then the - // calculated - // value is percent/100 * targetSize. For example, - // the calculated value of a 80% of a managed instance group - // with 150 instances would be (80/100 * 150) = 120 VM instances. If - // there - // is a remainder, the number is rounded. - Calculated int64 `json:"calculated,omitempty"` - // Fixed: Specifies a fixed number of VM instances. This must be a positive - // integer. - Fixed int64 `json:"fixed,omitempty"` - // Percent: Specifies a percentage of instances between 0 to 100%, inclusive. - // For - // example, specify 80 for 80%. - Percent int64 `json:"percent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Calculated") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Calculated") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FixedOrPercent) MarshalJSON() ([]byte, error) { - type NoMethod FixedOrPercent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FlexibleTimeRange: A flexible specification of a time range that has 3 -// points of -// flexibility: (1) a flexible start time, (2) a flexible end time, (3) -// a -// flexible duration. -// -// It is possible to specify a contradictory time range that cannot be -// matched -// by any Interval. This causes a validation error. -type FlexibleTimeRange struct { - EndTimeNotEarlierThan string `json:"endTimeNotEarlierThan,omitempty"` - EndTimeNotLaterThan string `json:"endTimeNotLaterThan,omitempty"` - MaxDuration string `json:"maxDuration,omitempty"` - MinDuration string `json:"minDuration,omitempty"` - StartTimeNotEarlierThan string `json:"startTimeNotEarlierThan,omitempty"` - StartTimeNotLaterThan string `json:"startTimeNotLaterThan,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTimeNotEarlierThan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTimeNotEarlierThan") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FlexibleTimeRange) MarshalJSON() ([]byte, error) { - type NoMethod FlexibleTimeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRule: Represents a Forwarding Rule resource. -// -// Forwarding rule resources in Google Cloud can be either regional or global -// in -// scope: -// -// * Global -// (https://cloud.google.com/compute/docs/reference/rest/beta/globalForwardingRules) -// * Regional -// (https://cloud.google.com/compute/docs/reference/rest/beta/forwardingRules) -// -// A forwarding rule and its corresponding IP address represent the -// frontend -// configuration of a Google Cloud load balancer. -// Forwarding rules can also reference target instances and Cloud VPN -// Classic -// gateways (targetVpnGateway). -// -// For more information, read -// Forwarding rule concepts and -// Using protocol forwarding. -type ForwardingRule struct { - // IPAddress: IP address for which this forwarding rule accepts traffic. When a - // client - // sends traffic to this IP address, the forwarding rule directs the traffic - // to the referenced target or backendService. - // While creating a forwarding rule, specifying an IPAddress is - // required under the following circumstances: - // - // - // - When the target is set to targetGrpcProxy andvalidateForProxyless is - // set to true, theIPAddress should be set to 0.0.0.0. - // - When the target is a Private Service Connect Google APIs - // bundle, you must specify an IPAddress. - // - // - // Otherwise, you can optionally specify an IP address that references - // an - // existing static (reserved) IP address resource. When omitted, Google - // Cloud - // assigns an ephemeral IP address. - // - // Use one of the following formats to specify an IP address while creating - // a - // forwarding rule: - // - // * IP address number, as in `100.1.2.3` - // * IPv6 address range, as in `2600:1234::/96` - // * Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/ad - // dresses/address-name - // * Partial URL or by name, as in: - // - // - projects/project_id/regions/region/addresses/address-name - // - regions/region/addresses/address-name - // - global/addresses/address-name - // - address-name - // - // - // - // The forwarding rule's target or backendService, - // and in most cases, also the loadBalancingScheme, determine the - // type of IP address that you can use. For detailed information, see - // IP address - // specifications - // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // - // When reading an IPAddress, the API always returns the IP - // address number. - IPAddress string `json:"IPAddress,omitempty"` - // IPProtocol: The IP protocol to which this rule applies. - // - // For protocol forwarding, valid - // options are TCP, UDP, ESP,AH, SCTP, ICMP andL3_DEFAULT. - // - // The valid IP protocols are different for different load balancing - // products - // as described in Load balancing - // features - // (https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends). - // - // Possible values: - // "AH" - // "ESP" - // "ICMP" - // "L3_DEFAULT" - // "SCTP" - // "TCP" - // "UDP" - IPProtocol string `json:"IPProtocol,omitempty"` - // AllPorts: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The allPorts field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, SCTP, or L3_DEFAULT. - // - It's applicable only to the following products: internal passthrough - // Network Load Balancers, backend service-based external passthrough - // Network - // Load Balancers, and internal and external protocol forwarding. - // - Set this field to true to allow packets addressed to any port or - // packets lacking destination port information (for example, UDP fragments - // after the first fragment) to be forwarded to the backends configured - // with - // this forwarding rule. The L3_DEFAULT protocol requiresallPorts be set to - // true. - AllPorts bool `json:"allPorts,omitempty"` - // AllowGlobalAccess: If set to true, clients can access the internal - // passthrough Network Load - // Balancers, the regional internal Application Load Balancer, and the - // regional internal proxy Network Load Balancer from all regions. - // If false, only allows access from the local region the load balancer - // is - // located at. Note that for INTERNAL_MANAGED forwarding rules, this - // field - // cannot be changed after the forwarding rule is created. - AllowGlobalAccess bool `json:"allowGlobalAccess,omitempty"` - // AllowPscGlobalAccess: This is used in PSC consumer ForwardingRule to control - // whether the PSC - // endpoint can be accessed from another region. - AllowPscGlobalAccess bool `json:"allowPscGlobalAccess,omitempty"` - // AllowPscPacketInjection: This is used in PSC consumer ForwardingRule to - // control whether the producer - // is allowed to inject packets into the consumer's network. If set to - // true, - // the target service attachment must have tunneling enabled - // and - // TunnelingConfig.RoutingMode set to PACKET_INJECTION - // Non-PSC forwarding rules should not use this field. - // - // This field was never released to any customers and is deprecated and - // will be removed in the future. - AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` - // BackendService: Identifies the backend service to which the forwarding rule - // sends traffic. - // Required for internal and external passthrough Network Load Balancers; - // must be omitted for all other load balancer types. - BackendService string `json:"backendService,omitempty"` - // BaseForwardingRule: [Output Only] The URL for the corresponding base - // forwarding rule. By base - // forwarding rule, we mean the forwarding rule that has the same IP - // address, - // protocol, and port settings with the current forwarding rule, but - // without - // sourceIPRanges specified. - // Always empty if the current forwarding rule does not have - // sourceIPRanges - // specified. - BaseForwardingRule string `json:"baseForwardingRule,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExternalManagedBackendBucketMigrationState: Specifies the canary migration - // state for the backend buckets attached to - // this forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, - // and - // TEST_ALL_TRAFFIC. - // - // To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must - // be - // changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before - // the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate traffic to backend - // buckets - // attached to this forwarding rule by percentage - // using - // externalManagedBackendBucketMigrationTestingPercentage. - // - // Rolling back a migration requires the states to be set in reverse order. - // So - // changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state - // to - // be set to TEST_ALL_TRAFFIC at the same time. Optionally, - // the - // TEST_BY_PERCENTAGE state can be used to migrate some traffic back - // to - // EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. - // - // Possible values: - // "PREPARE" - // "TEST_ALL_TRAFFIC" - // "TEST_BY_PERCENTAGE" - ExternalManagedBackendBucketMigrationState string `json:"externalManagedBackendBucketMigrationState,omitempty"` - // ExternalManagedBackendBucketMigrationTestingPercentage: Determines the - // fraction of requests to backend buckets that should be - // processed by the global external Application Load Balancer. - // - // The value of this field must be in the range [0, 100]. - // - // This value can only be set if the loadBalancingScheme in the - // BackendService - // is set to EXTERNAL (when using the classic Application Load Balancer) - // and - // the migration state is TEST_BY_PERCENTAGE. - ExternalManagedBackendBucketMigrationTestingPercentage float64 `json:"externalManagedBackendBucketMigrationTestingPercentage,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a ForwardingRule. Include the fingerprint in patch request - // to - // ensure that you do not overwrite changes that were applied from - // another - // concurrent request. - // - // To see the latest fingerprint, make a get() request to - // retrieve a ForwardingRule. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IpCollection: Resource reference of a PublicDelegatedPrefix. The PDP must - // be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. - // - // Use one of the following formats to specify a sub-PDP when creating an - // IPv6 - // NetLB forwarding rule using BYOIP: - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/project_id/regions/region/pu - // blicDelegatedPrefixes/sub-pdp-name - // Partial URL, as in: - // - // - - // projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - // - regions/region/publicDelegatedPrefixes/sub-pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // IpVersion: The IP Version that will be used by this forwarding rule. Valid - // options - // are IPV4 or IPV6. - // - // Possible values: - // "IPV4" - // "IPV6" - // "UNSPECIFIED_VERSION" - IpVersion string `json:"ipVersion,omitempty"` - // IsMirroringCollector: Indicates whether or not this load balancer can be - // used as a collector for - // packet mirroring. To prevent mirroring loops, instances behind this - // load balancer will not have their traffic mirrored even if aPacketMirroring - // rule applies to them. - // This can only be set to true for load balancers that have - // theirloadBalancingScheme set to INTERNAL. - IsMirroringCollector bool `json:"isMirroringCollector,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#forwardingRule for - // forwarding rule resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // resource, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a ForwardingRule. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: Specifies the forwarding rule type. - // - // For more information about forwarding rules, refer to - // Forwarding rule concepts. - // - // Possible values: - // "EXTERNAL" - // "EXTERNAL_MANAGED" - // "INTERNAL" - // "INTERNAL_MANAGED" - // "INTERNAL_SELF_MANAGED" - // "INVALID" - LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` - // MetadataFilters: Opaque filter criteria used by load balancer to restrict - // routing - // configuration to a limited set of xDS - // compliant clients. In their xDS requests to load balancer, xDS - // clients - // present node - // metadata. When there is a match, the relevant configuration - // is made available to those proxies. Otherwise, all the resources - // (e.g.TargetHttpProxy, UrlMap) - // referenced by the ForwardingRule are not visible to - // those proxies. - // - // For each metadataFilter in this list, if itsfilterMatchCriteria is set to - // MATCH_ANY, at least one of thefilterLabels must match the corresponding - // label provided in - // the metadata. If its filterMatchCriteria is set to - // MATCH_ALL, then all of its filterLabels must match with - // corresponding labels provided in the metadata. If multiplemetadataFilters - // are specified, all of them need to be satisfied - // in order to be considered a match. - // - // metadataFilters specified here will be applifed before - // those specified in the UrlMap that thisForwardingRule - // references. - // - // metadataFilters only applies to Loadbalancers that have - // their loadBalancingScheme set toINTERNAL_SELF_MANAGED. - MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - // - // For Private Service Connect forwarding rules that forward traffic to - // Google - // APIs, the forwarding rule name must be a 1-20 characters string - // with - // lowercase letters and numbers and must start with a letter. - Name string `json:"name,omitempty"` - // Network: This field is not used for global external load balancing. - // - // For internal passthrough Network Load Balancers, this field identifies - // the - // network that the load balanced IP should belong to for this - // forwarding - // rule. - // If the subnetwork is specified, the network of the subnetwork will be - // used. - // If neither subnetwork nor this field is specified, the default network - // will - // be used. - // - // For Private Service Connect forwarding rules that forward traffic to - // Google - // APIs, a network must be provided. - Network string `json:"network,omitempty"` - // NetworkTier: This signifies the networking tier used for configuring - // this load balancer and can only take the following values:PREMIUM, - // STANDARD. - // - // For regional ForwardingRule, the valid values are PREMIUM andSTANDARD. For - // GlobalForwardingRule, the valid value isPREMIUM. - // - // If this field is not specified, it is assumed to be PREMIUM. - // If IPAddress is specified, this value must be equal to the - // networkTier of the Address. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // NoAutomateDnsZone: This is used in PSC consumer ForwardingRule to control - // whether it should - // try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not - // use - // this field. Once set, this field is not mutable. - NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` - // PortRange: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The portRange field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, or SCTP, and - // - It's applicable only to the following products: external passthrough - // Network Load Balancers, internal and external proxy Network Load - // Balancers, - // internal and external Application Load Balancers, external protocol - // forwarding, and Classic VPN. - // - Some products have restrictions on what ports can be used. See - // port specifications for details. - // - // - // - // For external forwarding rules, two or more forwarding rules cannot use - // the - // same [IPAddress, IPProtocol] pair, and cannot have - // overlappingportRanges. - // - // For internal forwarding rules within the same VPC network, two or - // more - // forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot have overlapping portRanges. - // - // @pattern: \\d+(?:-\\d+)? - PortRange string `json:"portRange,omitempty"` - // Ports: The ports, portRange, and allPorts - // fields are mutually exclusive. Only packets addressed to ports in - // the - // specified range will be forwarded to the backends configured with - // this - // forwarding rule. - // - // The ports field has the following limitations: - // - // - It requires that the forwarding rule IPProtocol be TCP, - // UDP, or SCTP, and - // - It's applicable only to the following products: internal passthrough - // Network Load Balancers, backend service-based external passthrough - // Network - // Load Balancers, and internal protocol forwarding. - // - You can specify a list of up to five ports by number, separated by - // commas. The ports can be contiguous or discontiguous. - // - // - // - // For external forwarding rules, two or more forwarding rules cannot use - // the - // same [IPAddress, IPProtocol] pair if they share at least one - // port number. - // - // For internal forwarding rules within the same VPC network, two or - // more - // forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair if they share at least one port number. - // - // @pattern: \\d+(?:-\\d+)? - Ports []string `json:"ports,omitempty"` - // PscConnectionId: [Output Only] The PSC connection id of the PSC forwarding - // rule. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer and will not - // serve traffic - // going forward. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer needs - // to take further action before the forwarding rule can serve traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The connection has been rejected by the producer. - // "STATUS_UNSPECIFIED" - PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` - // Region: [Output Only] URL of the region where the regional forwarding rule - // resides. - // This field is not applicable to global forwarding rules. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServiceDirectoryRegistrations: Service Directory resources to register this - // forwarding rule with. - // Currently, only supports a single Service Directory resource. - ServiceDirectoryRegistrations []*ForwardingRuleServiceDirectoryRegistration `json:"serviceDirectoryRegistrations,omitempty"` - // ServiceLabel: An optional prefix to the service name for this forwarding - // rule. - // If specified, the prefix is the first label of the fully qualified - // service - // name. - // - // The label must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the label must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - // - // This field is only used for internal load balancing. - ServiceLabel string `json:"serviceLabel,omitempty"` - // ServiceName: [Output Only] - // The internal fully qualified service name for this forwarding rule. - // - // This field is only used for internal load balancing. - ServiceName string `json:"serviceName,omitempty"` - // SourceIpRanges: If not empty, this forwarding rule will only forward the - // traffic when the - // source IP address matches one of the IP addresses or CIDR ranges set - // here. - // Note that a forwarding rule can only have up to 64 source IP ranges, - // and - // this field can only be used with a regional forwarding rule whose scheme - // isEXTERNAL. - // Each source_ip_range entry should be either an IP address (for - // example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24). - SourceIpRanges []string `json:"sourceIpRanges,omitempty"` - // Subnetwork: This field identifies the subnetwork that the load balanced IP - // should - // belong to for this forwarding rule, used with internal load balancers - // and - // external passthrough Network Load Balancers with IPv6. - // - // If the network specified is in auto subnet mode, this field is - // optional. - // However, a subnetwork must be specified if the network is in custom - // subnet - // mode or when creating external forwarding rule with IPv6. - Subnetwork string `json:"subnetwork,omitempty"` - // Target: The URL of the target resource to receive the matched traffic. - // For - // regional forwarding rules, this target must be in the same region as - // the - // forwarding rule. For global forwarding rules, this target must be a - // global - // load balancing resource. - // - // The forwarded traffic must be of a type appropriate to the target object. - // - // - // - For load balancers, see the "Target" column in Port specifications - // (https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications). - // - For Private Service Connect forwarding rules that forward traffic to - // Google APIs, provide the name of a supported Google API bundle: - // - // - // - vpc-sc - APIs that support VPC Service Controls. - // - all-apis - All supported Google APIs. - // - // - // - For Private Service Connect forwarding rules that forward traffic to - // managed services, the target must be a service attachment. The target is not - // mutable once set as a service attachment. - Target string `json:"target,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "IPAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRule) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ForwardingRule) UnmarshalJSON(data []byte) error { - type NoMethod ForwardingRule - var s1 struct { - ExternalManagedBackendBucketMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedBackendBucketMigrationTestingPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExternalManagedBackendBucketMigrationTestingPercentage = float64(s1.ExternalManagedBackendBucketMigrationTestingPercentage) - return nil -} - -type ForwardingRuleAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ForwardingRulesScopedList resources. - Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#forwardingRuleAggregatedList for lists of forwarding rules. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ForwardingRuleAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleAggregatedListWarning: [Output Only] Informational warning -// message. -type ForwardingRuleAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRuleAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleList: Contains a list of ForwardingRule resources. -type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ForwardingRule resources. - Items []*ForwardingRule `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ForwardingRuleListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleListWarning: [Output Only] Informational warning message. -type ForwardingRuleListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRuleListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRuleReference struct { - ForwardingRule string `json:"forwardingRule,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForwardingRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForwardingRule") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleReference) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRuleServiceDirectoryRegistration: Describes the auto-registration -// of the forwarding rule to Service Directory. -// The region and project of the Service Directory resource generated from -// this registration will be the same as this forwarding rule. -type ForwardingRuleServiceDirectoryRegistration struct { - // Namespace: Service Directory namespace to register the forwarding rule - // under. - Namespace string `json:"namespace,omitempty"` - // Service: Service Directory service to register the forwarding rule under. - Service string `json:"service,omitempty"` - // ServiceDirectoryRegion: [Optional] Service Directory region to register this - // global forwarding - // rule under. Default to "us-central1". Only used for PSC for Google APIs. - // All PSC for Google APIs forwarding rules on the same network should use - // the same Service Directory region. - ServiceDirectoryRegion string `json:"serviceDirectoryRegion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Namespace") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Namespace") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRuleServiceDirectoryRegistration) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRuleServiceDirectoryRegistration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedList struct { - // ForwardingRules: A list of forwarding rules contained in this scope. - ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` - // Warning: Informational warning which replaces the list of forwarding rules - // when - // the list is empty. - Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForwardingRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForwardingRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ForwardingRulesScopedListWarning: Informational warning which replaces the -// list of forwarding rules when -// the list is empty. -type ForwardingRulesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ForwardingRulesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ForwardingRulesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservation struct { - // AggregateReservation: Aggregate reservation details for the future - // reservation. - AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` - // AutoCreatedReservationsDeleteTime: Future timestamp when the FR auto-created - // reservations will be deleted by - // Compute Engine. Format of this field must be a - // valid - // href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value. - AutoCreatedReservationsDeleteTime string `json:"autoCreatedReservationsDeleteTime,omitempty"` - // AutoCreatedReservationsDuration: Specifies the duration of auto-created - // reservations. - // It represents relative time to future reservation start_time - // when - // auto-created reservations will be automatically deleted by Compute - // Engine. Duration time unit is represented as a count of seconds - // and fractions of seconds at nanosecond resolution. - AutoCreatedReservationsDuration *Duration `json:"autoCreatedReservationsDuration,omitempty"` - // AutoDeleteAutoCreatedReservations: Setting for enabling or disabling - // automatic deletion for auto-created - // reservation. If set to true, auto-created reservations will be - // deleted at Future Reservation's end time (default) or at user's - // defined - // timestamp if any of the - // [auto_created_reservations_delete_time, - // auto_created_reservations_duration] - // values is specified. - // For keeping auto-created reservation indefinitely, this value should be - // set - // to false. - AutoDeleteAutoCreatedReservations bool `json:"autoDeleteAutoCreatedReservations,omitempty"` - // CommitmentInfo: If not present, then FR will not deliver a new commitment or - // update an - // existing commitment. - CommitmentInfo *FutureReservationCommitmentInfo `json:"commitmentInfo,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this future - // reservation inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeploymentType: Type of the deployment requested as part of future - // reservation. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the future reservation. - Description string `json:"description,omitempty"` - // EnableEmergentMaintenance: Indicates if this group of VMs have emergent - // maintenance enabled. - EnableEmergentMaintenance bool `json:"enableEmergentMaintenance,omitempty"` - // Id: [Output Only] A unique identifier for this future reservation. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#futureReservation - // for future reservations. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NamePrefix: Name prefix for the reservations to be created at the time - // of - // delivery. The name prefix must comply with RFC1035. - // Maximum allowed length for name prefix is 20. Automatically - // created - // reservations name format will be -date-####. - NamePrefix string `json:"namePrefix,omitempty"` - // PlanningStatus: Planning state before being submitted for evaluation - // - // Possible values: - // "DRAFT" - Future Reservation is being drafted. - // "PLANNING_STATUS_UNSPECIFIED" - // "SUBMITTED" - Future Reservation has been submitted for evaluation by GCP. - PlanningStatus string `json:"planningStatus,omitempty"` - // ProtectionTier: Protection tier for the workload. - // - // Possible values: - // "CAPACITY_OPTIMIZED" - CAPACITY_OPTIMIZED capacity leverages redundancies - // (e.g. power, cooling) - // at the data center during normal operating conditions. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload may be disrupted. As a consequence, it has a - // weaker availability SLO than STANDARD. - // "PROTECTION_TIER_UNSPECIFIED" - Unspecified protection tier. - // "STANDARD" - STANDARD protection for workload that should be protected by - // redundancies - // (e.g. power, cooling) at the data center level. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload is expected to continue as normal using - // the - // redundancies. - ProtectionTier string `json:"protectionTier,omitempty"` - // ReservationMode: The reservation mode which determines - // reservation-termination behavior and - // expected pricing. - // - // Possible values: - // "CALENDAR" - The delivered reservations will delivered at specified start - // time and - // terminated at specified end time along with terminating the VMs running - // on it. - // "DEFAULT" - The delivered reservations do not terminate VMs at the end - // of - // reservations. This is default mode. - // "RESERVATION_MODE_UNSPECIFIED" - ReservationMode string `json:"reservationMode,omitempty"` - // ReservationName: Name of reservations where the capacity is provisioned at - // the time of - // delivery of future reservations. If the reservation with the given - // name - // does not exist already, it is created automatically at the time of - // Approval - // with INACTIVE state till specified start-time. Either provide - // the - // reservation_name or a name_prefix. - ReservationName string `json:"reservationName,omitempty"` - // SchedulingType: Maintenance information for this reservation - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShareSettings: List of Projects/Folders to share with. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservationRequired: Indicates whether the auto-created reservation - // can be consumed by VMs with - // affinity for "any" reservation. If the field is set, then only VMs - // that - // target the reservation by name can consume from the delivered reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // SpecificSkuProperties: Future Reservation configuration to indicate instance - // properties and - // total count. - SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // Status: [Output only] Status of the Future Reservation - Status *FutureReservationStatus `json:"status,omitempty"` - // TimeWindow: Time window for this Future Reservation. - TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` - // Zone: [Output Only] URL of the Zone where this future reservation resides. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AggregateReservation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateReservation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservation) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationCommitmentInfo struct { - // CommitmentName: name of the commitment where capacity is being delivered to. - CommitmentName string `json:"commitmentName,omitempty"` - // CommitmentPlan: Indicates if a Commitment needs to be created as part of FR - // delivery. If - // this field is not present, then no - // commitment needs to be created. - // - // Possible values: - // "INVALID" - // "THIRTY_SIX_MONTH" - // "TWELVE_MONTH" - CommitmentPlan string `json:"commitmentPlan,omitempty"` - // PreviousCommitmentTerms: Only applicable if FR is delivering to the same - // reservation. If set, all - // parent commitments will be extended to match the end date of the plan - // for - // this commitment. - // - // Possible values: - // "EXTEND" - All associated parent Committed Used Discount(s) end-date/term - // will be - // extended to the end-time of this future reservation. Default is to - // extend previous commitment(s) time to the end_time of the reservation. - // "PREVIOUSCOMMITMENTTERM_UNSPECIFIED" - No changes to associated parents - // Committed Used Discount(s) terms. - PreviousCommitmentTerms string `json:"previousCommitmentTerms,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommitmentName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CommitmentName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationCommitmentInfo) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationCommitmentInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationSpecificSKUProperties struct { - // InstanceProperties: Properties of the SKU instances being reserved. - InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // SourceInstanceTemplate: The instance template that will be used to populate - // the - // ReservedInstanceProperties of the future reservation - SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` - // TotalCount: Total number of instances for which capacity assurance is - // requested at a - // future time period. - TotalCount int64 `json:"totalCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InstanceProperties") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceProperties") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationSpecificSKUProperties) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationSpecificSKUProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatus: [Output only] Represents status related to the -// future reservation. -type FutureReservationStatus struct { - // AmendmentStatus: [Output Only] The current status of the requested - // amendment. - // - // Possible values: - // "AMENDMENT_APPROVED" - The requested amendment to the Future Resevation - // has been approved and - // applied by GCP. - // "AMENDMENT_DECLINED" - The requested amendment to the Future Reservation - // has been declined by - // GCP and the original state was restored. - // "AMENDMENT_IN_REVIEW" - The requested amendment to the Future Reservation - // is currently being - // reviewd by GCP. - // "AMENDMENT_STATUS_UNSPECIFIED" - AmendmentStatus string `json:"amendmentStatus,omitempty"` - // AutoCreatedReservations: Fully qualified urls of the automatically created - // reservations at - // start_time. - AutoCreatedReservations []string `json:"autoCreatedReservations,omitempty"` - // ExistingMatchingUsageInfo: [Output Only] Represents the existing matching - // usage for the future - // reservation. - ExistingMatchingUsageInfo *FutureReservationStatusExistingMatchingUsageInfo `json:"existingMatchingUsageInfo,omitempty"` - // FulfilledCount: This count indicates the fulfilled capacity so far. This is - // set during - // "PROVISIONING" state. This count also includes capacity delivered as part - // of existing matching reservations. - FulfilledCount int64 `json:"fulfilledCount,omitempty,string"` - // LastKnownGoodState: [Output Only] This field represents the future - // reservation before an - // amendment was requested. If the amendment is declined, the - // Future - // Reservation will be reverted to the last known good state. The last - // known - // good state is not set when updating a future reservation whose - // Procurement Status is DRAFTING. - LastKnownGoodState *FutureReservationStatusLastKnownGoodState `json:"lastKnownGoodState,omitempty"` - // LockTime: Time when Future Reservation would become LOCKED, after which - // no - // modifications to Future Reservation will be allowed. Applicable only - // after the Future Reservation is in the APPROVED state. The lock_time is - // an RFC3339 string. The procurement_status will transition to PROCURING - // state at this time. - LockTime string `json:"lockTime,omitempty"` - // ProcurementStatus: Current state of this Future Reservation - // - // Possible values: - // "APPROVED" - Future reservation is approved by GCP. - // "CANCELLED" - Future reservation is cancelled by the customer. - // "COMMITTED" - Future reservation is committed by the customer. - // "DECLINED" - Future reservation is rejected by GCP. - // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions - // to - // PENDING_APPROVAL upon user submitting FR. - // "FAILED" - Future reservation failed. No additional reservations were - // provided. - // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially fulfilled. - // Additional reservations were - // provided but did not reach total_count reserved instance slots. - // "FULFILLED" - Future reservation is fulfilled completely. - // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future Reservation has - // been requested. If the - // Amendment is declined, the Future Reservation will be restored to the - // last known good state. - // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. - // "PROCUREMENT_STATUS_UNSPECIFIED" - // "PROCURING" - Future reservation is being procured by GCP. Beyond this - // point, Future - // reservation is locked and no further modifications are allowed. - // "PROVISIONING" - Future reservation capacity is being provisioned. This - // state will be - // entered after start_time, while reservations are being created to - // provide total_count reserved instance slots. This state will not - // persist past start_time + 24h. - ProcurementStatus string `json:"procurementStatus,omitempty"` - SpecificSkuProperties *FutureReservationStatusSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "AmendmentStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AmendmentStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatus) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusExistingMatchingUsageInfo: [Output Only] Represents -// the existing matching usage for the future -// reservation. -type FutureReservationStatusExistingMatchingUsageInfo struct { - // Count: Count to represent min(FR - // total_count, - // matching_reserved_capacity+matching_unreserved_instances) - Count int64 `json:"count,omitempty,string"` - // Timestamp: Timestamp when the matching usage was calculated - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusExistingMatchingUsageInfo) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusExistingMatchingUsageInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusLastKnownGoodState: The state that the future -// reservation will be reverted to should the -// amendment be declined. -type FutureReservationStatusLastKnownGoodState struct { - // Description: [Output Only] The description of the FutureReservation before - // an - // amendment was requested. - Description string `json:"description,omitempty"` - // ExistingMatchingUsageInfo: [Output Only] Represents the matching usage for - // the future - // reservation before an amendment was requested. - ExistingMatchingUsageInfo *FutureReservationStatusExistingMatchingUsageInfo `json:"existingMatchingUsageInfo,omitempty"` - FutureReservationSpecs *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs `json:"futureReservationSpecs,omitempty"` - // LockTime: [Output Only] The lock time of the FutureReservation before - // an - // amendment was requested. - LockTime string `json:"lockTime,omitempty"` - // NamePrefix: [Output Only] The name prefix of the Future Reservation before - // an - // amendment was requested. - NamePrefix string `json:"namePrefix,omitempty"` - // ProcurementStatus: [Output Only] The status of the last known good state for - // the Future - // Reservation. - // - // Possible values: - // "APPROVED" - Future reservation is approved by GCP. - // "CANCELLED" - Future reservation is cancelled by the customer. - // "COMMITTED" - Future reservation is committed by the customer. - // "DECLINED" - Future reservation is rejected by GCP. - // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions - // to - // PENDING_APPROVAL upon user submitting FR. - // "FAILED" - Future reservation failed. No additional reservations were - // provided. - // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially fulfilled. - // Additional reservations were - // provided but did not reach total_count reserved instance slots. - // "FULFILLED" - Future reservation is fulfilled completely. - // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future Reservation has - // been requested. If the - // Amendment is declined, the Future Reservation will be restored to the - // last known good state. - // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. - // "PROCUREMENT_STATUS_UNSPECIFIED" - // "PROCURING" - Future reservation is being procured by GCP. Beyond this - // point, Future - // reservation is locked and no further modifications are allowed. - // "PROVISIONING" - Future reservation capacity is being provisioned. This - // state will be - // entered after start_time, while reservations are being created to - // provide total_count reserved instance slots. This state will not - // persist past start_time + 24h. - ProcurementStatus string `json:"procurementStatus,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusLastKnownGoodState) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusLastKnownGoodState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusLastKnownGoodStateFutureReservationSpecs: The -// properties of the last known good state for the Future Reservation. -type FutureReservationStatusLastKnownGoodStateFutureReservationSpecs struct { - // ShareSettings: [Output Only] The previous share settings of the Future - // Reservation. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificSkuProperties: [Output Only] The previous instance related - // properties of the - // Future Reservation. - SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // TimeWindow: [Output Only] The previous time window of the Future - // Reservation. - TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "ShareSettings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShareSettings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusLastKnownGoodStateFutureReservationSpecs) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusLastKnownGoodStateFutureReservationSpecs - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationStatusSpecificSKUProperties: Properties to be set for the -// Future Reservation. -type FutureReservationStatusSpecificSKUProperties struct { - // SourceInstanceTemplateId: ID of the instance template used to populate the - // Future Reservation - // properties. - SourceInstanceTemplateId string `json:"sourceInstanceTemplateId,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceInstanceTemplateId") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceInstanceTemplateId") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationStatusSpecificSKUProperties) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationStatusSpecificSKUProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationTimeWindow struct { - Duration *Duration `json:"duration,omitempty"` - EndTime string `json:"endTime,omitempty"` - // StartTime: Start time of the Future Reservation. The start_time is an - // RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationTimeWindow) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationTimeWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsAggregatedListResponse: Contains a list of future -// reservations. -type FutureReservationsAggregatedListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Future reservation resources. - Items map[string]FutureReservationsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#futureReservationsAggregatedListResponse for future - // resevation aggregated list response. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FutureReservationsAggregatedListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsAggregatedListResponseWarning: [Output Only] Informational -// warning message. -type FutureReservationsAggregatedListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsAggregatedListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsAggregatedListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsAggregatedListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsAggregatedListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of future reservation resources. - Items []*FutureReservation `json:"items,omitempty"` - // Kind: [Output Only] Type of - // resource.Alwayscompute#FutureReservationsListResponse for lists - // of - // reservations - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *FutureReservationsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsListResponseWarning: [Output Only] Informational warning -// message. -type FutureReservationsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsScopedList struct { - // FutureReservations: A list of future reservations contained in this scope. - FutureReservations []*FutureReservation `json:"futureReservations,omitempty"` - // Warning: Informational warning which replaces the list of future - // reservations when - // the list is empty. - Warning *FutureReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "FutureReservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FutureReservations") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureReservationsScopedListWarning: Informational warning which replaces -// the list of future reservations when -// the list is empty. -type FutureReservationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*FutureReservationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureReservationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod FutureReservationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesRecommendation: Recommendation for single resources -// specification, to be created in the -// future. -type FutureResourcesRecommendation struct { - EndTime string `json:"endTime,omitempty"` - // Location: The advised location for resource usage. When a zone, in - // format - // 'zones/'. - // If not set, it means that no location is recommended - see - // other_locations for details. - Location string `json:"location,omitempty"` - // OtherLocations: List of locations in the request scope that were - // not - // recommended. Keys of the map are zones, in format 'zones/'. - // The values are status information indicating the recommendation status. - OtherLocations map[string]FutureResourcesRecommendationOtherLocation `json:"otherLocations,omitempty"` - // RecommendationId: Unique id of the recommendation, a UUID string generated - // by the API. - RecommendationId string `json:"recommendationId,omitempty"` - // RecommendationType: Type of recommendation. Currently only - // FUTURE_RESERVATION is supported. - // - // Possible values: - // "FUTURE_RESERVATION" - A Future Reservation is recommended. - // "RECOMMENDATION_TYPE_UNSPECIFIED" - Default value, unused. - RecommendationType string `json:"recommendationType,omitempty"` - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesRecommendation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesRecommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesRecommendationOtherLocation: Information about recommendation -// status for locations -// that were allowed but not used by the response. -type FutureResourcesRecommendationOtherLocation struct { - // Details: Details (human readable) describing the situation. - // For example, if status is CONDITION_NOT_MET, then - // details contain information about the parameters of the time window - // that did not meet the required conditions. - Details string `json:"details,omitempty"` - // Status: Status of recommendation in this location. - // - // Possible values: - // "CONDITIONS_NOT_MET" - The requested resources are offered in this - // location - // but the requested time window is does not meet the required conditions. - // "NOT_SUPPORTED" - The requested resources are not offered in this - // location. - // Retrying the request will not change this status. - // "NO_CAPACITY" - The requested resources are offered in this location - // and the requested time window is accepted - // but there is no capacity within the requested time window. - // "OTHER_LOCATION_STATUS_UNDEFINED" - Default value, unused. - // "RECOMMENDED" - The requested resources are offered in this location - // and it is possible to request them. However, another location - // was better and was recommended. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Details") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Details") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesRecommendationOtherLocation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesRecommendationOtherLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpec: Specification of resources to be created at some time -// in the future within an -// optionally specified set of locations, and within the specified time range. -type FutureResourcesSpec struct { - // DeploymentType: Indicates if the reservation allocation strategy is static - // (DENSE) or - // dynamic (STANDARD). Defaults to DENSE. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // LocationPolicy: Optional location policy allowing to exclude some zone(s) in - // which - // the resources must not be created. - LocationPolicy *FutureResourcesSpecLocationPolicy `json:"locationPolicy,omitempty"` - // TargetResources: Specification of the reserved resources. - TargetResources *FutureResourcesSpecTargetResources `json:"targetResources,omitempty"` - // TimeRangeSpec: Specification of a time range in which the resources may be - // created. - // The time range specifies start of resource use and planned end of - // resource - // use. - TimeRangeSpec *FlexibleTimeRange `json:"timeRangeSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeploymentType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeploymentType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpec) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecAggregateResources struct { - // AcceleratorCount: Size of the request, in accelerator (chip) count. - AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` - // VmFamily: The VM family that all instances scheduled against this - // reservation - // must belong to. Use for TPU reservations. - // - // Possible values: - // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" - // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" - // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" - // "VM_FAMILY_CLOUD_TPU_POD_SLICE_TPU7X" - VmFamily string `json:"vmFamily,omitempty"` - // WorkloadType: Workload type. Use for TPU reservations. - // - // Possible values: - // "BATCH" - Reserved resources will be optimized for BATCH workloads, such - // as ML - // training. - // "SERVING" - Reserved resources will be optimized for SERVING workloads, - // such as ML - // inference. - // "UNSPECIFIED" - WorkloadType string `json:"workloadType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecAggregateResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecAggregateResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecLocalSsdPartition struct { - // DiskInterface: Disk interface. Defaults to SCSI. - // - // Possible values: - // "NVME" - // "SCSI" - DiskInterface string `json:"diskInterface,omitempty"` - // DiskSizeGb: The size of the disk in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DiskInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskInterface") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocalSsdPartition) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocalSsdPartition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecLocationPolicy: Specification of locations to create -// resources in. -type FutureResourcesSpecLocationPolicy struct { - // Locations: Preferences for specified locations. - // Keys of the map are locations - zones, in format of 'zones/'. - // Values are preferences for the zones. - // If a zone is not specified in this map, it is ALLOWed. - Locations map[string]FutureResourcesSpecLocationPolicyLocation `json:"locations,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecLocationPolicyLocation: Preference for a single specified -// location. -type FutureResourcesSpecLocationPolicyLocation struct { - // Preference: Preference for this location. - // - // Possible values: - // "ALLOW" - Location is allowed for use. - // "DENY" - Location is prohibited. - // "PREFERENCE_UNSPECIFIED" - Default value, unused. - Preference string `json:"preference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preference") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preference") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecLocationPolicyLocation) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecLocationPolicyLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type FutureResourcesSpecSpecificSKUResources struct { - // InstanceCount: Size of the request, in instance count. - InstanceCount int64 `json:"instanceCount,omitempty,string"` - // LocalSsdPartitions: Local SSD partitions. You do not have to include SSD - // partitions that - // are built in the machine type. - LocalSsdPartitions []*FutureResourcesSpecLocalSsdPartition `json:"localSsdPartitions,omitempty"` - // MachineType: The machine type to use for instances that will use the - // reservation. - // This field only accepts machine type names. e.g. n2-standard-4 - // and does not accept machine type full or partial url. - // e.g. - // projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4. - // Use for GPU reservations. - MachineType string `json:"machineType,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecSpecificSKUResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecSpecificSKUResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FutureResourcesSpecTargetResources: Specification of reserved resources. -type FutureResourcesSpecTargetResources struct { - AggregateResources *FutureResourcesSpecAggregateResources `json:"aggregateResources,omitempty"` - SpecificSkuResources *FutureResourcesSpecSpecificSKUResources `json:"specificSkuResources,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregateResources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregateResources") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FutureResourcesSpecTargetResources) MarshalJSON() ([]byte, error) { - type NoMethod FutureResourcesSpecTargetResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GRPCHealthCheck struct { - // GrpcServiceName: The gRPC service name for the health check. This field is - // optional. The - // value of grpc_service_name has the following meanings by convention: - // - // - Empty service_name means the overall status of all services at - // the - // backend. - // - // - Non-empty service_name means the health of that gRPC service, as - // defined - // by the owner of the service. - // - // The grpc_service_name can only be ASCII. - GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // Valid - // values are 1 through 65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcServiceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GRPCHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod GRPCHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GRPCTLSHealthCheck struct { - // GrpcServiceName: The gRPC service name for the health check. This field is - // optional. The - // value of grpc_service_name has the following meanings by convention: - // - // - Empty service_name means the overall status of all services at - // the - // backend. - // - // - Non-empty service_name means the health of that gRPC service, as - // defined - // by the owner of the service. - // - // The grpc_service_name can only be ASCII. - GrpcServiceName string `json:"grpcServiceName,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // Valid - // values are 1 through 65535. - Port int64 `json:"port,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcServiceName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GRPCTLSHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod GRPCTLSHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalAddressesMoveRequest struct { - // Description: An optional destination address description if intended to be - // different - // from the source. - Description string `json:"description,omitempty"` - // DestinationAddress: The URL of the destination address to move to. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a address: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/addresses/address - // - // - projects/project/global/addresses/address - // - // - // Note that destination project must be different from the source project. - // So/global/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalAddressesMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalOrganizationSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalOrganizationSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalOrganizationSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash when updating or - // changing - // labels, otherwise the request will fail with error412 conditionNotMet. Make - // a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: A list of labels to apply for this resource. Each label must comply - // with - // the - // requirements for labels. For example,"webserver-frontend": "images". A label - // value can also be - // empty (e.g. "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicy: Message describing GlobalVmExtensionPolicy object. -type GlobalVmExtensionPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExtensionPolicies: Required. Map from extension (eg: "cloudops") to its - // policy configuration. - // The key is the name of the extension. - ExtensionPolicies map[string]GlobalVmExtensionPolicyExtensionPolicy `json:"extensionPolicies,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSelectors: Optional. Selector to target VMs for a policy. - // There is a logical "AND" between instance_selectors. - InstanceSelectors []*GlobalVmExtensionPolicyInstanceSelector `json:"instanceSelectors,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#globalVmExtensionPolicy for globalVmExtensionPolicies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Priority: Optional. Used to resolve conflicts when multiple policies are - // active for the same - // extension. Defaults to 0. - // - // Larger the number, higher the priority. When the priority is the same, - // the policy with the newer create time has higher priority. - Priority int64 `json:"priority,omitempty"` - // RolloutOperation: Required. The rollout strategy and status. - RolloutOperation *GlobalVmExtensionPolicyRolloutOperation `json:"rolloutOperation,omitempty"` - // ScopedResourceStatus: [Output Only] The scoped resource status. It's only - // for tracking the - // purging status of the policy. - // - // Possible values: - // "SCOPED_RESOURCE_STATUS_DELETING" - The zonal policies are being deleted. - // "SCOPED_RESOURCE_STATUS_UNSPECIFIED" - Default value. This value is - // unused. - ScopedResourceStatus string `json:"scopedResourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UpdateTimestamp: [Output Only] Update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyExtensionPolicy: Policy for a single extension. -type GlobalVmExtensionPolicyExtensionPolicy struct { - // PinnedVersion: Optional. The version pinning for the extension. - // If empty, the extension will be installed with the latest version - // released by the extension producer. - PinnedVersion string `json:"pinnedVersion,omitempty"` - // StringConfig: Optional. String configuration. Any string payload that the - // extension - // understands. - StringConfig string `json:"stringConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PinnedVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PinnedVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyInstanceSelector: Selector to target VMs for a zone -// VM extension policy. -type GlobalVmExtensionPolicyInstanceSelector struct { - // LabelSelector: Optional. Labels within the LabelSelector are OR'd. - LabelSelector *GlobalVmExtensionPolicyLabelSelector `json:"labelSelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelSelector") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyInstanceSelector) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyInstanceSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyLabelSelector: A LabelSelector is applicable for a VM -// only if it matches all labels in -// the LabelSelector. -type GlobalVmExtensionPolicyLabelSelector struct { - // InclusionLabels: Optional. Labels as key value pairs. - // A VM should contain all the pairs specified in this map to be - // selected; - // Labels within the LabelSelector are OR'ed. - InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "InclusionLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InclusionLabels") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyLabelSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyList: Response to list global VM extension policy -// resources. -type GlobalVmExtensionPolicyList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of GlobalVmExtensionPolicy resources. - Items []*GlobalVmExtensionPolicy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *GlobalVmExtensionPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyListWarning: [Output Only] Informational warning -// message. -type GlobalVmExtensionPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*GlobalVmExtensionPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GlobalVmExtensionPolicyRolloutOperation: Represents the rollout operation -type GlobalVmExtensionPolicyRolloutOperation struct { - // RolloutInput: Required. The rollout input which defines the rollout plan. - RolloutInput *GlobalVmExtensionPolicyRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - // RolloutStatus: [Output Only] The rollout status of the policy. - RolloutStatus *GlobalVmExtensionPolicyRolloutOperationRolloutStatus `json:"rolloutStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "RolloutInput") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RolloutInput") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperation) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutInput struct { - // ConflictBehavior: Optional. [Optional] Specifies the behavior of the Rollout - // if a conflict is - // detected in a project during a Rollout. It can be one of the - // following - // values: - // 1) empty : don't overwrite the local value if conflict happens. This is - // the default behavior. - // 2) "overwrite" : Overwrite the local value with the rollout value. - // The concept of "conflict" applies to: - // 1) Insert action. If the zonal policy already exists when Insert - // happens, it's a conflict. - // 2) Update action. If the zonal policy was updated out of band by a - // zonal API, it's a conflict. - ConflictBehavior string `json:"conflictBehavior,omitempty"` - // Name: Optional. The name of the rollout - // plan. - // Ex. - // projects//locations/global/rolloutPlans/. - Name string `json:"name,omitempty"` - // PredefinedRolloutPlan: Optional. Predefined rollout plan. - // - // Possible values: - // "FAST_ROLLOUT" - // "ROLLOUT_PLAN_UNSPECIFIED" - // "SLOW_ROLLOUT" - PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // RetryUuid: Optional. The UUID of the retry action. Only set it if this is a - // retry - // for an existing resource. This is for the user re-populate the - // resource - // without changes. An error will be returned if the retry_uuid is set but - // the resource get modified. - RetryUuid string `json:"retryUuid,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConflictBehavior") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutInput) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutStatus struct { - // CurrentRollouts: [Output Only] The current rollouts for the latest version - // of the - // resource. There should be only one current rollout, but for - // scalability, we make it repeated. - CurrentRollouts []*GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata `json:"currentRollouts,omitempty"` - // PreviousRollout: [Output Only] The last completed rollout resource. This - // field will not - // be populated until the first rollout is completed. - PreviousRollout *GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata `json:"previousRollout,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentRollouts") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentRollouts") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutStatus) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata struct { - // Rollout: [Output Only] The name of the rollout. - // Ex. projects//locations/global/rollouts/. - Rollout string `json:"rollout,omitempty"` - // RolloutPlan: [Output Only] The name of the rollout - // plan. - // Ex. - // projects//locations/global/rolloutPlans/. - RolloutPlan string `json:"rolloutPlan,omitempty"` - // State: [Output Only] The overall state of the rollout. - // - // Possible values: - // "STATE_CANCELLED" - Iteration was explicitly cancelled. - // "STATE_COMPLETED" - Iteration completed, with all actions being - // successful. - // "STATE_FAILED" - Iteration completed, with failures. - // "STATE_PAUSED" - The rollout is paused. - // "STATE_PROCESSING" - Iteration is in progress. - // "STATE_UNKNOWN" - Impossible to determine current state of the iteration. - // "STATE_UNSPECIFIED" - Default value. This value is unused. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Rollout") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Rollout") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GlobalVmExtensionPolicyRolloutOperationRolloutStatusRolloutMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GroupMaintenanceInfo: Maintenance Info for ReservationBlocks. -type GroupMaintenanceInfo struct { - // InstanceMaintenanceOngoingCount: Describes number of instances that have - // ongoing maintenance. - InstanceMaintenanceOngoingCount int64 `json:"instanceMaintenanceOngoingCount,omitempty"` - // InstanceMaintenancePendingCount: Describes number of instances that have - // pending maintenance. - InstanceMaintenancePendingCount int64 `json:"instanceMaintenancePendingCount,omitempty"` - // MaintenanceOngoingCount: Progress for ongoing maintenance for this group of - // VMs/hosts. - // Describes number of hosts in the block that have ongoing maintenance. - MaintenanceOngoingCount int64 `json:"maintenanceOngoingCount,omitempty"` - // MaintenancePendingCount: Progress for ongoing maintenance for this group of - // VMs/hosts. - // Describes number of hosts in the block that have pending maintenance. - MaintenancePendingCount int64 `json:"maintenancePendingCount,omitempty"` - // SchedulingType: The type of maintenance for the reservation. - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SubblockInfraMaintenanceOngoingCount: Describes number of subblock - // Infrastructure that has ongoing maintenance. - // Here, Subblock Infrastructure Maintenance pertains to upstream - // hardware - // contained in the Subblock that is necessary for a VM Family(e.g. - // NVLink - // Domains). Not all VM Families will support this field. - SubblockInfraMaintenanceOngoingCount int64 `json:"subblockInfraMaintenanceOngoingCount,omitempty"` - // SubblockInfraMaintenancePendingCount: Describes number of subblock - // Infrastructure that has pending maintenance. - // Here, Subblock Infrastructure Maintenance pertains to upstream hardware - // contained in the Subblock that is necessary for a VM Family (e.g. NVLink - // Domains). Not all VM Families will support this field. - SubblockInfraMaintenancePendingCount int64 `json:"subblockInfraMaintenancePendingCount,omitempty"` - // UpcomingGroupMaintenance: Maintenance information on this group of VMs. - UpcomingGroupMaintenance *UpcomingMaintenance `json:"upcomingGroupMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "InstanceMaintenanceOngoingCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceMaintenanceOngoingCount") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GroupMaintenanceInfo) MarshalJSON() ([]byte, error) { - type NoMethod GroupMaintenanceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributes: A guest attributes entry. -type GuestAttributes struct { - // Kind: [Output Only] Type of the resource. Alwayscompute#guestAttributes for - // guest attributes entry. - Kind string `json:"kind,omitempty"` - // QueryPath: The path to be queried. This can be the default namespace ('') or - // a - // nested namespace ('\/') or a specified key - // ('\/\'). - QueryPath string `json:"queryPath,omitempty"` - // QueryValue: [Output Only] The value of the requested queried path. - QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // VariableKey: The key to search for. - VariableKey string `json:"variableKey,omitempty"` - // VariableValue: [Output Only] The value found for the requested key. - VariableValue string `json:"variableValue,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributesEntry: A guest attributes namespace/key/value entry. -type GuestAttributesEntry struct { - // Key: Key for the guest attribute entry. - Key string `json:"key,omitempty"` - // Namespace: Namespace for the guest attribute entry. - Namespace string `json:"namespace,omitempty"` - // Value: Value for the guest attribute entry. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributesEntry) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestAttributesValue: Array of guest attribute namespace/key/value tuples. -type GuestAttributesValue struct { - Items []*GuestAttributesEntry `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestAttributesValue) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The ID of a supported feature. To add multiple values, use commas - // to - // separate values. Set to one or more of the following values: - // - // - VIRTIO_SCSI_MULTIQUEUE - // - WINDOWS - // - MULTI_IP_SUBNET - // - UEFI_COMPATIBLE - // - GVNIC - // - SEV_CAPABLE - // - SUSPEND_RESUME_COMPATIBLE - // - SEV_LIVE_MIGRATABLE_V2 - // - SEV_SNP_CAPABLE - // - TDX_CAPABLE - // - IDPF - // - SNP_SVSM_CAPABLE - // - // - // For more information, see - // Enabling guest operating system features. - // - // Possible values: - // "BARE_METAL_LINUX_COMPATIBLE" - // "FEATURE_TYPE_UNSPECIFIED" - // "GVNIC" - // "IDPF" - // "MULTI_IP_SUBNET" - // "SECURE_BOOT" - // "SEV_CAPABLE" - // "SEV_LIVE_MIGRATABLE" - // "SEV_LIVE_MIGRATABLE_V2" - // "SEV_SNP_CAPABLE" - // "SNP_SVSM_CAPABLE" - // "TDX_CAPABLE" - // "UEFI_COMPATIBLE" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GuestOsFeature) MarshalJSON() ([]byte, error) { - type NoMethod GuestOsFeature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTP2HealthCheck struct { - // Host: The value of the host header in the HTTP/2 health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTP/2 health check request. The - // default value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTP/2 health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTP2HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTP2HealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 80. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Also supported in legacy HTTP health checks for target pools. - // The health check supports all backends supported by the backend - // service - // provided the backend can be health checked. For example,GCE_VM_IP network - // endpoint groups, GCE_VM_IP_PORT - // network endpoint groups, and instance group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for pass-through load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTP health check request. The default - // value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTP health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. If - // left - // empty (default value), the host header is set to the destination IP - // address - // to which health check packets are sent. The destination IP address - // depends - // on the type of load balancer. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // RequestPath: The request path of the HTTPS health check request. The default - // value is/. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // Response: Creates a content-based HTTPS health check. In addition to the - // required - // HTTP 200 (OK) status code, you can configure the health check to pass - // only - // when the backend sends this specific ASCII response string within the - // first - // 1024 bytes of the HTTP response body. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPSHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPoliciesScopedList struct { - // HealthAggregationPolicies: A list of HealthAggregationPolicys contained in - // this scope. - HealthAggregationPolicies []*HealthAggregationPolicy `json:"healthAggregationPolicies,omitempty"` - // Warning: Informational warning which replaces the list of health - // aggregation - // policies when the list is empty. - Warning *HealthAggregationPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthAggregationPolicies") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthAggregationPolicies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPoliciesScopedListWarning: Informational warning which -// replaces the list of health aggregation -// policies when the list is empty. -type HealthAggregationPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicy: Represents a health aggregation policy. -// -// A health aggregation policy resource defines a policy to aggregate -// health. -// -// For more information, see -// Health checks overview. -type HealthAggregationPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthAggregationPolicy. An up-to-date fingerprint - // must be provided in order to patch the HealthAggregationPolicy; - // Otherwise, - // the request will fail with error 412 conditionNotMet. To see - // the latest fingerprint, make a get() request to retrieve - // the - // HealthAggregationPolicy. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthyPercentThreshold: Can only be set if the policyType field - // isBACKEND_SERVICE_POLICY. Specifies the threshold (as a - // percentage) of healthy endpoints required in order to consider - // the - // aggregated health result HEALTHY. Defaults to 60. Must be in - // range [0, 100]. Not applicable if the policyType field - // isDNB_PUBLIC_IP_POLICY. Can be mutated. This field is optional, - // and will be set to the default if unspecified. Note that both this - // threshold and minHealthyThreshold must be satisfied in order - // for HEALTHY to be the aggregated result. "Endpoints" refers to - // network - // endpoints within a Network Endpoint Group or instances within an - // Instance - // Group. - HealthyPercentThreshold int64 `json:"healthyPercentThreshold,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthAggregationPolicy for health aggregation - // policies. - Kind string `json:"kind,omitempty"` - // MinHealthyThreshold: Can only be set if the policyType field - // isBACKEND_SERVICE_POLICY. Specifies the minimum number of - // healthy endpoints required in order to consider the aggregated health - // result HEALTHY. Defaults to 1. Must be positive. Not - // applicable if the policyType field isDNB_PUBLIC_IP_POLICY. Can be mutated. - // This field is optional, - // and will be set to the default if unspecified. Note that both this - // threshold and healthyPercentThreshold must be satisfied in - // order for HEALTHY to be the aggregated result. "Endpoints" refers to - // network endpoints within a Network Endpoint Group or instances within - // an - // Instance Group. - MinHealthyThreshold int64 `json:"minHealthyThreshold,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PolicyType: Specifies the type of the healthAggregationPolicy. The only - // allowed value - // for global resources is DNS_PUBLIC_IP_POLICY. The only allowed - // value for regional resources is BACKEND_SERVICE_POLICY. Must - // be specified when the healthAggregationPolicy is created, and cannot - // be - // mutated. - // - // Possible values: - // "BACKEND_SERVICE_POLICY" - // "DNS_PUBLIC_IP_POLICY" - PolicyType string `json:"policyType,omitempty"` - // Region: [Output Only] URL of the region where the health aggregation - // policy - // resides. This field applies only to the regional resource. You must - // specify - // this field as part of the HTTP request URL. It is not settable as a field - // in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyAggregatedList: Contains a list of -// HealthAggregationPoliciesScopedList. -type HealthAggregationPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthAggregationPoliciesScopedList resources. - Items map[string]HealthAggregationPoliciesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthAggregationPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyAggregatedListWarning: [Output Only] Informational -// warning message. -type HealthAggregationPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthAggregationPolicy resources. - Items []*HealthAggregationPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthAggregationPolicy for health aggregation - // policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthAggregationPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthAggregationPolicyListWarning: [Output Only] Informational warning -// message. -type HealthAggregationPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthAggregationPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthAggregationPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthAggregationPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthAggregationPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheck: Represents a health check resource. -// -// Google Compute Engine has two health check resources: -// -// * Regional (/compute/docs/reference/rest/beta/regionHealthChecks) -// * Global (/compute/docs/reference/rest/beta/healthChecks) -// -// These health check resources can be used for load balancing and -// for -// autohealing VMs in a managed instance group (MIG). -// -// **Load balancing** -// -// Health check requirements vary depending on the type of load balancer. -// For -// details about the type of health check supported for -// each load balancer and corresponding backend type, -// see Health -// checks overview: Load balancer guide. -// -// **Autohealing in MIGs** -// -// The health checks that you use for autohealing VMs in a MIG can be -// either -// regional or global. For more information, see Set up an -// application health check and autohealing. -// -// For more information, seeHealth checks -// overview. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is 5 - // seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp in3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - GrpcHealthCheck *GRPCHealthCheck `json:"grpcHealthCheck,omitempty"` - GrpcTlsHealthCheck *GRPCTLSHealthCheck `json:"grpcTlsHealthCheck,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // LogConfig: Configure logging on this health check. - LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // For example, a name that is 1-63 characters long, matches the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise complies - // with - // RFC1035. This regular expression describes a name where the first - // character is a lowercase letter, and all following characters are a - // dash, - // lowercase letter, or digit, except the last character, which isn't a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] Region where the health check resides. Not applicable - // to - // global health checks. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SourceRegions: The list of cloud regions from which health checks are - // performed. If any - // regions are specified, then exactly 3 regions should be specified. - // The - // region names must be valid names of Google Cloud regions. - // This can only be set for global health check. - // If this list is non-empty, then there are restrictions - // on what other health check fields are supported and what other resources - // can use this health check: - // - // - SSL, HTTP2, and GRPC protocols are not supported. - // - The TCP request field is not supported. - // - The proxyHeader field for HTTP, HTTPS, and TCP is not - // supported. - // - The checkIntervalSec field must be at least 30. - // - The health check cannot be used with BackendService nor with managed - // instance group auto-healing. - SourceRegions []string `json:"sourceRegions,omitempty"` - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is - // 5 seconds. It is invalid for timeoutSec to have greater - // value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // Type: Specifies the type of the healthCheck, either TCP,SSL, HTTP, - // HTTPS,HTTP2 or GRPC. Exactly one of the - // protocol-specific health check fields must be specified, which must - // matchtype field. - // - // Possible values: - // "GRPC" - // "GRPC_WITH_TLS" - // "HTTP" - // "HTTP2" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - Type string `json:"type,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this many - // consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckListWarning: [Output Only] Informational warning message. -type HealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckLogConfig: Configuration of logging on a health check. If logging -// is enabled, logs -// will be exported to Stackdriver. -type HealthCheckLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by default, - // which - // means no health check logging will be done. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckReference: A full or valid partial URL to a health check. For -// example, the following are -// valid URLs: -// -// - -// -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check -// - global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheck") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckService: Represents a Health-Check as a Service resource. -type HealthCheckService struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthCheckService. An up-to-date fingerprint must - // be provided in order to patch/update the HealthCheckService; Otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // HealthCheckService. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthChecks: A list of URLs to the HealthCheck resources. Must have - // at least one HealthCheck, and not more than 10 for - // regionalHealthCheckService, and not more than 1 for - // globalHealthCheckService.HealthCheck resources must - // haveportSpecification=USE_SERVING_PORT orportSpecification=USE_FIXED_PORT. - // For - // regional HealthCheckService, theHealthCheck must be regional and in the - // same - // region. For global HealthCheckService,HealthCheck must be global. Mix of - // regional and globalHealthChecks is not supported. Multiple - // regionalHealthChecks must belong to the same region. RegionalHealthChecks - // must belong to the same region as zones ofNetworkEndpointGroups. For - // globalHealthCheckService using globalINTERNET_IP_PORT NetworkEndpointGroups, - // the - // global HealthChecks must specify sourceRegions, - // and HealthChecks that specify sourceRegions can - // only be used with global INTERNET_IP_PORTNetworkEndpointGroups. - HealthChecks []string `json:"healthChecks,omitempty"` - // HealthStatusAggregationPolicy: Optional. Policy for how the results from - // multiple health checks - // for the same endpoint are aggregated. Defaults to NO_AGGREGATION - // if unspecified. - // - // - NO_AGGREGATION. An EndpointHealth message is - // returned for each pair in the health check - // service. - // - AND. If any health check of an endpoint reportsUNHEALTHY, then - // UNHEALTHY is theHealthState of the endpoint. If all health checks - // reportHEALTHY, the HealthState of the endpoint isHEALTHY. - // - // . - // This is only allowed with regional HealthCheckService. - // - // Possible values: - // "AND" - If any backend's health check reports UNHEALTHY, - // then UNHEALTHY is the HealthState of - // the entire health check service. If all backend's are healthy, - // the HealthState of the health check service isHEALTHY. - // "NO_AGGREGATION" - An EndpointHealth message is returned for each - // backend in the health check service. - HealthStatusAggregationPolicy string `json:"healthStatusAggregationPolicy,omitempty"` - // HealthStatusAggregationStrategy: This field is deprecated. Use - // health_status_aggregation_policy - // instead. - // - // Policy for how the results from multiple health checks for the - // same endpoint are aggregated. - // - // - NO_AGGREGATION. An EndpointHealth - // message is returned for each backend in the health check - // service. - // - AND. If any backend's health check reportsUNHEALTHY, then UNHEALTHY is - // theHealthState of the entire health check service. If - // all backend's are healthy, the HealthState of the - // health check service is HEALTHY. - // - // . - // - // Possible values: - // "AND" - This is deprecated. Use health_status_aggregation_policy - // instead. - // If any backend's health check reports UNHEALTHY, - // then UNHEALTHY is the HealthState of - // the entire health check service. If all backend's are healthy, - // the HealthState of the health check service isHEALTHY. - // "NO_AGGREGATION" - This is deprecated. Use - // health_status_aggregation_policy instead. - // An EndpointHealth message is returned for each - // backend in the health check service. - HealthStatusAggregationStrategy string `json:"healthStatusAggregationStrategy,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#healthCheckServicefor health check services. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long, and - // comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // NetworkEndpointGroups: A list of URLs to the NetworkEndpointGroup - // resources. Must not have more than 100. For regionalHealthCheckService, - // NEGs must be in - // zones in the region of the HealthCheckService. For - // globalHealthCheckServices, the NetworkEndpointGroups - // must be global INTERNET_IP_PORT. - NetworkEndpointGroups []string `json:"networkEndpointGroups,omitempty"` - // NotificationEndpoints: A list of URLs to the NotificationEndpoint - // resources. Must not have more than 10. A list of endpoints for - // receiving notifications of change in health status. For - // regionalHealthCheckService,NotificationEndpoint must be regional and in - // the - // same region. For global HealthCheckService,NotificationEndpoint must be - // global. - NotificationEndpoints []string `json:"notificationEndpoints,omitempty"` - // Region: [Output Only] URL of the region where the health check - // service - // resides. This field is not applicable to global health check services. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckService) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServiceReference: A full or valid partial URL to a health check -// service. For example, the -// following are valid URLs: -// -// - -// -// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// -// - -// -// projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// -// - regions/us-west1/healthCheckServices/health-check-service -type HealthCheckServiceReference struct { - HealthCheckService string `json:"healthCheckService,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheckService") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthCheckService resources. - Items []*HealthCheckService `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#healthCheckServicesList for lists of - // HealthCheckServices. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServicesListWarning: [Output Only] Informational warning message. -type HealthCheckServicesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthChecksScopedList resources. - Items map[string]HealthChecksScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthChecksAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthChecksAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksScopedList struct { - // HealthChecks: A list of HealthChecks contained in this scope. - HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthChecksScopedListWarning: Informational warning which replaces the list -// of -// backend services when the list is empty. -type HealthChecksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthChecksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSource: Represents a health source. -// -// A health source resource specifies the source resources and the -// health -// aggregation policy applied to the source resources to determine -// the -// aggregated health status. -type HealthSource struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a HealthSource. An up-to-date fingerprint - // must be provided in order to patch the HealthSource; Otherwise, the - // request - // will fail with error 412 conditionNotMet. To see the latest - // fingerprint, make a get() request to retrieve the - // HealthSource. - Fingerprint string `json:"fingerprint,omitempty"` - // HealthAggregationPolicy: URL to the HealthAggregationPolicy resource. Must - // be set. Must - // be regional and in the same region as the HealthSource. Can be - // mutated. - HealthAggregationPolicy string `json:"healthAggregationPolicy,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#healthSource for - // health sources. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the health source - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceType: Specifies the type of the HealthSource. The only allowed - // value - // is BACKEND_SERVICE. Must be specified when theHealthSource is created, and - // cannot be mutated. - // - // Possible values: - // "BACKEND_SERVICE" - SourceType string `json:"sourceType,omitempty"` - // Sources: URLs to the source resources. Must be size 1. Must be - // aBackendService if - // the sourceType is BACKEND_SERVICE. TheBackendService must have load - // balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional - // and in the same region as the HealthSource (cross-region - // deployment for INTERNAL_MANAGED is not supported). TheBackendService may use - // only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. - // TheBackendService may not use haPolicy. Can be - // mutated. - Sources []string `json:"sources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSource) MarshalJSON() ([]byte, error) { - type NoMethod HealthSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceAggregatedList: Contains a list of HealthSourcesScopedList. -type HealthSourceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthSourcesScopedList resources. - Items map[string]HealthSourcesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthSourceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthSourceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HealthSource resources. - Items []*HealthSource `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#healthSource for - // health sources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthSourceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourceListWarning: [Output Only] Informational warning message. -type HealthSourceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourcesScopedList struct { - // HealthSources: A list of HealthSources contained in this scope. - HealthSources []*HealthSource `json:"healthSources,omitempty"` - // Warning: Informational warning which replaces the list of - // health sources when the list is empty. - Warning *HealthSourcesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthSources") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthSources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthSourcesScopedListWarning: Informational warning which replaces the -// list of -// health sources when the list is empty. -type HealthSourcesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HealthSourcesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthSourcesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthSourcesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthSourcesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthStatus struct { - // Annotations: Metadata defined as annotations for network endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - // ForwardingRule: URL of the forwarding rule associated with the health status - // of the - // instance. - ForwardingRule string `json:"forwardingRule,omitempty"` - // ForwardingRuleIp: A forwarding rule IP address assigned to this instance. - ForwardingRuleIp string `json:"forwardingRuleIp,omitempty"` - // HealthState: Health state of the IPv4 address of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` - // IpAddress: For target pool based Network Load Balancing, it indicates the - // forwarding - // rule's IP address assigned to this instance. For other types of - // load - // balancing, the field indicates VM internal ip. - IpAddress string `json:"ipAddress,omitempty"` - Ipv6Address string `json:"ipv6Address,omitempty"` - // Ipv6HealthState: Health state of the IPv6 address of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - Ipv6HealthState string `json:"ipv6HealthState,omitempty"` - // Port: The named port of the instance group, not necessarily the port that - // is - // health-checked. - Port int64 `json:"port,omitempty"` - Weight string `json:"weight,omitempty"` - // Possible values: - // "INVALID_WEIGHT" - The response to a Health Check probe had the HTTP - // response header field - // X-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not - // a non-negative single-precision floating-point number in decimal - // string - // representation). - // "MISSING_WEIGHT" - The response to a Health Check probe did not have the - // HTTP response - // header field X-Load-Balancing-Endpoint-Weight. - // "UNAVAILABLE_WEIGHT" - This is the value when the accompanied health - // status is either TIMEOUT - // (i.e.,the Health Check probe was not able to get a response in time) - // or - // UNKNOWN. For the latter, it should be typically because there has not - // been sufficient time to parse and report the weight for a new backend - // (which is with 0.0.0.0 ip address). However, it can be also due to an - // outage case for which the health status is explicitly reset to UNKNOWN. - // "WEIGHT_NONE" - This is the default value when WeightReportMode is - // DISABLE, - // and is also the initial value when WeightReportMode has just updated - // to - // ENABLE or DRY_RUN and there has not been - // sufficient time to parse and report the backend weight. - WeightError string `json:"weightError,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthStatusForNetworkEndpoint struct { - // BackendService: URL of the backend service associated with the health state - // of the network - // endpoint. - BackendService *BackendServiceReference `json:"backendService,omitempty"` - // ForwardingRule: URL of the forwarding rule associated with the health state - // of the network - // endpoint. - ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` - // HealthCheck: URL of the health check associated with the health state of the - // network - // endpoint. - HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` - // HealthCheckService: URL of the health check service associated with the - // health state of the - // network endpoint. - HealthCheckService *HealthCheckServiceReference `json:"healthCheckService,omitempty"` - // HealthState: Health state of the network endpoint determined based on the - // health checks - // configured. - // - // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - HealthState string `json:"healthState,omitempty"` - // Ipv6HealthState: Health state of the ipv6 network endpoint determined based - // on the health - // checks configured. - // - // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - Ipv6HealthState string `json:"ipv6HealthState,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatusForNetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Help: Provides links to documentation or for performing an out of band -// action. -// -// For example, if a quota check failed with an error indicating the -// calling -// project hasn't enabled the accessed service, this can contain a URL -// pointing -// directly to the right place in the developer console to flip the bit. -type Help struct { - // Links: URL(s) pointing to additional information on handling the current - // error. - Links []*HelpLink `json:"links,omitempty"` - // ForceSendFields is a list of field names (e.g. "Links") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Links") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Help) MarshalJSON() ([]byte, error) { - type NoMethod Help - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HelpLink: Describes a URL link. -type HelpLink struct { - // Description: Describes what the link offers. - Description string `json:"description,omitempty"` - // Url: The URL of the link. - Url string `json:"url,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HelpLink) MarshalJSON() ([]byte, error) { - type NoMethod HelpLink - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HostRule: UrlMaps -// A host-matching rule for a URL. If matched, will use the namedPathMatcher to -// select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Hosts: The list of host patterns to match. They must be valid hostnames - // with - // optional port numbers in the format host:port.* matches any string of - // ([a-z0-9-.]*). In - // that case, * must be the first character, and if followed by - // anything, the immediate following character must be either - - // or .. - // - // * based matching is not supported when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - Hosts []string `json:"hosts,omitempty"` - // PathMatcher: The name of the PathMatcher to use to match the path portion - // of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HostRule) MarshalJSON() ([]byte, error) { - type NoMethod HostRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpFaultAbort: Specification for how requests are aborted as part of fault -// injection. -type HttpFaultAbort struct { - // HttpStatus: The HTTP status code used to abort the request. - // - // The value must be from 200 to 599 inclusive. - // - // For gRPC protocol, the gRPC status code is mapped to HTTP status - // code - // according to this - // mapping table. HTTP status 200 is mapped to gRPC status - // UNKNOWN. Injecting an OK status is currently not supported by - // Traffic Director. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests - // that is aborted as part of fault injection. - // - // The value must be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultAbort) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpFaultAbort) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultAbort - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultDelay: Specifies the delay introduced by the load balancer before -// forwarding the -// request to the backend service as part of fault injection. -type HttpFaultDelay struct { - // FixedDelay: Specifies the value of the fixed delay interval. - FixedDelay *Duration `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests for - // which a delay is introduced as part of fault injection. - // - // The value must be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultDelay) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpFaultDelay) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultDelay - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultInjection: The specification for fault injection introduced into -// traffic to test -// the resiliency of clients to backend service failure. As part of -// fault -// injection, when clients send requests to a backend service, delays can -// be -// introduced by the load balancer on a percentage of requests before -// sending -// those request to the backend service. Similarly requests from clients can -// be -// aborted by the load balancer for a percentage of requests. -type HttpFaultInjection struct { - // Abort: The specification for how client requests are aborted as part of - // fault - // injection. - Abort *HttpFaultAbort `json:"abort,omitempty"` - // Delay: The specification for how client requests are delayed as part of - // fault - // injection, before being sent to a backend service. - Delay *HttpFaultDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFaultInjection) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultInjection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpFilterConfig: HttpFilterConfiguration supplies additional contextual -// settings -// for networkservices.HttpFilter resources enabled by Traffic -// Director. -type HttpFilterConfig struct { - // Config: The configuration needed to enable thenetworkservices.HttpFilter - // resource. The configuration must be - // YAML formatted and only contain fields defined in the protobuf identified - // in configTypeUrl - Config string `json:"config,omitempty"` - // ConfigTypeUrl: The fully qualified versioned proto3 type url of the protobuf - // that the - // filter expects for its contextual settings, for - // example:type.googleapis.com/google.protobuf.Struct - ConfigTypeUrl string `json:"configTypeUrl,omitempty"` - // FilterName: Name of the networkservices.HttpFilter resource - // this - // configuration belongs to. This name must be known to the xDS - // client. - // Example: envoy.wasm - FilterName string `json:"filterName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpFilterConfig) MarshalJSON() ([]byte, error) { - type NoMethod HttpFilterConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderAction: The request and response header transformations that take -// effect before -// the request is passed along to the selected backendService. -type HttpHeaderAction struct { - // RequestHeadersToAdd: Headers to add to a matching request before forwarding - // the request to thebackendService. - RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"` - // RequestHeadersToRemove: A list of header names for headers that need to be - // removed from the - // request before forwarding the request to the backendService. - RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"` - // ResponseHeadersToAdd: Headers to add the response before sending the - // response back to the - // client. - ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"` - // ResponseHeadersToRemove: A list of header names for headers that need to be - // removed from the - // response before sending the response back to the client. - ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeadersToAdd") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderMatch: matchRule criteria for request header matches. -type HttpHeaderMatch struct { - // ExactMatch: The value should exactly match contents of exactMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` - // HeaderName: The name of the HTTP header to match. - // - // For matching against the HTTP request's authority, use a headerMatch - // with the header name ":authority". - // - // For matching a request's method, use the headerName ":method". - // - // When the URL map is bound to a target gRPC proxy that has - // the validateForProxyless field set to true, only - // non-binary - // user-specified custom metadata and the `content-type` header are - // supported. - // The following transport-level headers cannot be used in header - // matching - // rules: - // `:authority`, `:method`, `:path`, `:scheme`, - // `user-agent`, - // `accept-encoding`, `content-encoding`, - // `grpc-accept-encoding`, - // `grpc-encoding`, `grpc-previous-rpc-attempts`, - // `grpc-tags-bin`, - // `grpc-timeout` and `grpc-trace-bin`. - HeaderName string `json:"headerName,omitempty"` - // InvertMatch: If set to false, the headerMatch is considered a - // match if the preceding match criteria are met. If set to true, - // the headerMatch is considered a match if the preceding - // match criteria are NOT met. - // - // The default setting is false. - InvertMatch bool `json:"invertMatch,omitempty"` - // PrefixMatch: The value of the header must start with the contents - // ofprefixMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - PrefixMatch string `json:"prefixMatch,omitempty"` - // PresentMatch: A header with the contents of headerName must exist. The - // match takes place whether or not the request's header has a value. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // RangeMatch: The header value must be an integer and its value must be in the - // range - // specified in rangeMatch. If the header does not contain an - // integer, number or is empty, the match fails. - // - // For example for a range [-5, 0] - // - // - // - -3 will match. - // - 0 will not match. - // - 0.25 will not match. - // - -3someString will not match. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - // - // rangeMatch is not supported for load balancers - // that have loadBalancingScheme set to EXTERNAL. - RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"` - // RegexMatch: The value of the header must match the regular expression - // specified inregexMatch. - // For more information about regular expression syntax, see Syntax. - // - // For matching against a port specified in the HTTP request, use a - // headerMatch with headerName set to PORT and a regular expression - // that - // satisfies the RFC2616 Host header's port specifier. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // SuffixMatch: The value of the header must end with the contents - // ofsuffixMatch. - // - // Only one of exactMatch, prefixMatch,suffixMatch, regexMatch,presentMatch or - // rangeMatch must be set. - SuffixMatch string `json:"suffixMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHeaderOption: Specification determining how headers are added to -// requests or responses. -type HttpHeaderOption struct { - // HeaderName: The name of the header. - HeaderName string `json:"headerName,omitempty"` - // HeaderValue: The value of the header to add. - HeaderValue string `json:"headerValue,omitempty"` - // Replace: If false, headerValue is appended to any values - // that already - // exist for the header. If true, headerValue is set for the - // header, discarding any values that were set for that header. - // - // The default value is true, - // unless a variable is present in headerValue, - // in which case the default value is false. - // . - Replace bool `json:"replace,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: Represents a legacy HTTP Health Check resource. -// -// Legacy HTTP health checks are now only required by target pool-based -// network -// load balancers. For all other load balancers, including backend -// service-based -// network load balancers, and for managed instance group auto-healing, you -// must -// use modern (non-legacy) health checks. -// -// For more information, seeHealth checks -// overview. -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - // Host: The value of the host header in the HTTP health check request. If - // left - // empty (default value), the public IP on behalf of which this health check - // is performed will be used. - Host string `json:"host,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#httpHealthCheck for - // HTTP health checks. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Port: The TCP port number for the HTTP health check request. The default - // value is80. - Port int64 `json:"port,omitempty"` - // RequestPath: The request path of the HTTP health check request. The default - // value is/. This field does not support query - // parameters. Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this - // many consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HttpHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheckListWarning: [Output Only] Informational warning message. -type HttpHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HttpHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpQueryParameterMatch: HttpRouteRuleMatch criteria for a request's query -// parameter. -type HttpQueryParameterMatch struct { - // ExactMatch: The queryParameterMatch matches if the value of the - // parameter exactly matches the contents of exactMatch. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` - // Name: The name of the query parameter to match. The query parameter must - // exist in - // the request, in the absence of which the request match fails. - Name string `json:"name,omitempty"` - // PresentMatch: Specifies that the queryParameterMatch matches if the - // request contains the query parameter, irrespective of whether the - // parameter has a value or not. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // RegexMatch: The queryParameterMatch matches if the value of the - // parameter matches the regular expression specified byregexMatch. For - // more information about regular expression syntax, see Syntax. - // - // Only one of presentMatch, exactMatch, orregexMatch must be set. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpQueryParameterMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpQueryParameterMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRedirectAction: Specifies settings for an HTTP redirect. -type HttpRedirectAction struct { - // HostRedirect: The host that is used in the redirect response instead of the - // one that - // was supplied in the request. - // - // The value must be from 1 to 255 - // characters. - HostRedirect string `json:"hostRedirect,omitempty"` - // HttpsRedirect: If set to true, the URL scheme in the redirected request - // is - // set to HTTPS. - // If set to false, the URL scheme of the redirected request - // remains the same as that of the request. - // - // This must only be set for URL maps used inTargetHttpProxys. Setting this - // true forTargetHttpsProxy is not permitted. - // - // The default is set to false. - HttpsRedirect bool `json:"httpsRedirect,omitempty"` - // PathRedirect: The path that is used in the redirect response instead of the - // one - // that was supplied in the request. - // - // pathRedirect cannot be supplied together withprefixRedirect. Supply one - // alone or neither. If neither is - // supplied, the path of the original request is used for the redirect. - // - // The value must be from 1 to 1024 characters. - PathRedirect string `json:"pathRedirect,omitempty"` - // PrefixRedirect: The prefix that replaces the prefixMatch specified in - // the HttpRouteRuleMatch, retaining the remaining portion - // of the URL before redirecting the request. - // - // prefixRedirect cannot be supplied together withpathRedirect. Supply one - // alone or neither. If neither is - // supplied, the path of the original request is used for the redirect. - // - // The value must be from 1 to 1024 characters. - PrefixRedirect string `json:"prefixRedirect,omitempty"` - // RedirectResponseCode: The HTTP Status code to use for this - // RedirectAction. - // - // Supported values are: - // - // - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds - // to 301. - // - FOUND, which corresponds to 302. - // - SEE_OTHER which corresponds to 303. - // - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the - // request - // method is retained. - // - PERMANENT_REDIRECT, which corresponds to 308. In this case, the - // request - // method is retained. - // - // Possible values: - // "FOUND" - Http Status Code 302 - Found. - // "MOVED_PERMANENTLY_DEFAULT" - Http Status Code 301 - Moved Permanently. - // "PERMANENT_REDIRECT" - Http Status Code 308 - Permanent Redirect - // maintaining HTTP method. - // "SEE_OTHER" - Http Status Code 303 - See Other. - // "TEMPORARY_REDIRECT" - Http Status Code 307 - Temporary Redirect - // maintaining HTTP method. - RedirectResponseCode string `json:"redirectResponseCode,omitempty"` - // StripQuery: If set to true, any accompanying query portion of the - // original - // URL is - // removed before redirecting the request. If set to false, the - // query portion of the original URL is retained. - // - // The default is set to false. - StripQuery bool `json:"stripQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRedirect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRedirect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRedirectAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRedirectAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRetryPolicy: The retry policy associates with HttpRouteRule -type HttpRetryPolicy struct { - // NumRetries: Specifies the allowed number retries. This number must be > - // 0. - // If not specified, defaults to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // PerTryTimeout: Specifies a non-zero timeout per retry attempt. - // - // If not specified, will use the timeout set in theHttpRouteAction field. - // If timeout in the HttpRouteAction field is not set, this field - // uses the largest timeout - // among all backend services associated with the route. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` - // RetryConditions: Specifies one or more conditions when this retry policy - // applies. Valid - // values are: - // - // - 5xx: retry is attempted if the instance or endpoint - // responds with any 5xx response code, or if the instance or - // endpoint does not respond at all. For example, disconnects, reset, read - // timeout, connection failure, and refused streams. - // - gateway-error: Similar to 5xx, but only - // applies to response codes 502, 503 or504. - // - connect-failure: a retry is attempted on failures - // connecting to the instance or endpoint. For example, connection - // timeouts. - // - retriable-4xx: a retry is attempted if the instance - // or endpoint responds with a 4xx response code. - // The only error that you can retry is error code 409. - // - refused-stream: a retry is attempted if the instance - // or endpoint resets the stream with a REFUSED_STREAM error - // code. This reset type indicates that it is safe to retry. - // - cancelled: a retry is attempted if the gRPC status - // code in the response header is set to cancelled. - // - deadline-exceeded: a retry is attempted if the gRPC - // status code in the response header is set todeadline-exceeded. - // - internal: a retry is attempted if the gRPC - // status code in the response header is set tointernal. - // - resource-exhausted: a retry is attempted if the gRPC - // status code in the response header is set toresource-exhausted. - // - unavailable: a retry is attempted if the gRPC - // status code in the response header is set tounavailable. - // - // Only the following codes are supported when the URL map is bound to - // target gRPC proxy that has validateForProxyless field set to true. - // - // - cancelled - // - deadline-exceeded - // - internal - // - resource-exhausted - // - unavailable - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpRouteAction struct { - // CorsPolicy: The specification for allowing client-side cross-origin - // requests. For more - // information about the W3C recommendation for cross-origin resource - // sharing - // (CORS), see Fetch API Living - // Standard. - // - // Not supported when the URL map is bound to a target gRPC proxy. - CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"` - // FaultInjectionPolicy: The specification for fault injection introduced into - // traffic to test - // the resiliency of clients to backend service failure. As part of - // fault - // injection, when clients send requests to a backend service, delays can - // be - // introduced by a load balancer on a percentage of requests before - // sending - // those requests to the backend service. Similarly requests from clients - // can - // be aborted by the load balancer for a percentage of requests.timeout and - // retry_policy is ignored by clients - // that are configured with a fault_injection_policy if: - // 1. The traffic is generated by fault injection AND - // 2. The fault injection is not a delay fault injection. - // Fault injection is not supported with the classic Application Load - // Balancer - // . To see which load balancers support fault injection, - // see Load - // balancing: Routing and traffic management features. - FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` - // MaxStreamDuration: Specifies the maximum duration (timeout) for streams on - // the selected route. - // Unlike the timeout field where the timeout duration starts - // from the time the request has been fully processed (known - // as*end-of-stream*), - // the duration in this field is computed from the beginning of the - // stream - // until the response has been processed, including all retries. A - // stream that does not complete in this duration is closed. - // - // If not specified, this field uses the maximummaxStreamDuration value among - // all backend services associated - // with the route. - // - // This field is only allowed if the Url map is used with backend services - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` - // RequestMirrorPolicy: Specifies the policy on how requests intended for the - // route's backends - // are shadowed to a separate mirrored backend service. The load balancer - // does - // not wait for responses from the shadow service. Before sending traffic - // to the shadow service, the host / authority header is suffixed - // with-shadow. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` - // RetryPolicy: Specifies the retry policy associated with this route. - RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` - // Timeout: Specifies the timeout for the selected route. Timeout is computed - // from the - // time the request has been fully processed (known as *end-of-stream*) - // up until the response has been processed. Timeout includes - // all retries. - // - // If not specified, this field uses the largest timeout among all - // backend - // services associated with the route. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - Timeout *Duration `json:"timeout,omitempty"` - // UrlRewrite: The spec to modify the URL of the request, before forwarding the - // request - // to the matched service. - // - // urlRewrite is the only action supported in UrlMaps - // for classic Application Load Balancers. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` - // WeightedBackendServices: A list of weighted backend services to send traffic - // to when a route match - // occurs. The weights determine the fraction of traffic that flows to - // their corresponding backend service. If all traffic needs to - // go to a single backend service, there must be oneweightedBackendService with - // weight set to a non-zero number. - // - // After a backend service is identified and before forwarding - // the request to - // the backend service, advanced routing actions such as URL rewrites - // and - // header transformations are applied depending on additional - // settings - // specified in this HttpRouteAction. - WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRule: The HttpRouteRule setting specifies how to match an HTTP -// request -// and the corresponding routing action that load balancing proxies perform. -type HttpRouteRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how the - // Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // If a policy for an - // error code is not configured for the RouteRule, a policy for - // the error code configured inpathMatcher.defaultCustomErrorResponsePolicy is - // applied. If - // one is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the - // policy - // configured in UrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // For example, consider a UrlMap with the following configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy are configured - // with policies for 5xx and 4xx errors - // - A RouteRule for /coming_soon/ is configured for the - // error code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in RouteRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // When - // used in conjunction withrouteRules.routeAction.retryPolicy, retries - // take - // precedence. Only once all retries are exhausted, - // thecustomErrorResponsePolicy is applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the customErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // customErrorResponsePolicy is supported only for - // global external Application Load Balancers. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - // Description: The short description conveying the intent of this - // routeRule. - // - // - // The description can have a maximum length of 1024 characters. - Description string `json:"description,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backendService. - // - // The headerAction value specified here is applied before the - // matching pathMatchers[].headerAction and - // afterpathMatchers[].routeRules[].routeAction.weightedBackendService.backendSe - // rviceWeightAction[].headerAction - // - // HeaderAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // HttpFilterConfigs: Outbound route specific configuration - // fornetworkservices.HttpFilter resources enabled by Traffic - // Director. httpFilterConfigs only applies for load balancers - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule - // for - // more details. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HttpFilterConfigs []*HttpFilterConfig `json:"httpFilterConfigs,omitempty"` - // HttpFilterMetadata: Outbound route specific metadata supplied - // tonetworkservices.HttpFilter resources enabled by Traffic - // Director. httpFilterMetadata only applies for load balancers - // with loadBalancingScheme set toINTERNAL_SELF_MANAGED. See ForwardingRule - // for - // more details. - // - // The only configTypeUrl supported - // istype.googleapis.com/google.protobuf.Struct - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HttpFilterMetadata []*HttpFilterConfig `json:"httpFilterMetadata,omitempty"` - // MatchRules: The list of criteria for matching attributes of a request to - // thisrouteRule. This list has OR semantics: the request matches - // this routeRule when any of thematchRules are satisfied. However predicates - // within - // a given matchRule have AND semantics. All predicates - // within a matchRule must match for the request to - // match the rule. - MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` - // Priority: For routeRules within a given pathMatcher, - // priority determines the order in which a load balancer interpretsrouteRules. - // RouteRules are evaluated in order - // of priority, from the lowest to highest number. The priority of a - // rule decreases as its number increases (1, 2, 3, N+1). The first rule - // that matches the request is applied. - // - // - // You cannot configure two or more routeRules with the same priority. - // Priority for each rule must be set to a number from 0 to - // 2147483647 - // inclusive. - // - // - // Priority numbers can have gaps, which enable you to add or remove rules - // in the future without affecting the rest of the rules. For example, 1, 2, - // 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you - // could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the - // future - // without any impact on existing rules. - Priority int64 `json:"priority,omitempty"` - // RouteAction: In response to a matching matchRule, the load balancer - // performs advanced routing actions, such as URL rewrites and - // header - // transformations, before forwarding the request to the selected - // backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a route rule'srouteAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` - // Service: The full or partial URL of the backend service resource to which - // traffic - // is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, - // take effect before sending the request to the backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - Service string `json:"service,omitempty"` - // UrlRedirect: When this rule is matched, the request is redirected to a - // URL - // specified by urlRedirect. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomErrorResponsePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRuleMatch: HttpRouteRuleMatch specifies a set of criteria for -// matching -// requests to an HttpRouteRule. All specified criteria must -// be satisfied for a match to occur. -type HttpRouteRuleMatch struct { - // FullPathMatch: For satisfying the matchRule condition, the path of - // the - // request must exactly match the value specified infullPathMatch after - // removing any query parameters and anchor - // that may be part of the original URL. - // - // fullPathMatch must be from 1 to 1024 characters. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - FullPathMatch string `json:"fullPathMatch,omitempty"` - // HeaderMatches: Specifies a list of header match criteria, all of which must - // match - // corresponding headers in the request. - HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"` - // IgnoreCase: Specifies that prefixMatch and fullPathMatch - // matches are case sensitive. - // - // The default value is false. - // - // ignoreCase must not be used with regexMatch. - // - // Not supported when the URL map is bound to a target gRPC proxy. - IgnoreCase bool `json:"ignoreCase,omitempty"` - // MetadataFilters: Opaque filter criteria used by the load balancer to - // restrict routing - // configuration to a limited set of xDS - // compliant clients. In their xDS requests to the load balancer, xDS - // clients - // present node - // metadata. When there is a match, the relevant routing configuration - // is made available to those proxies. - // - // For each metadataFilter in this list, if itsfilterMatchCriteria is set to - // MATCH_ANY, at least one of thefilterLabels must match the corresponding - // label provided in - // the metadata. If its filterMatchCriteria is set to - // MATCH_ALL, then all of its filterLabels must match with - // corresponding labels provided in the metadata. If multiple - // metadata filters are specified, all of them need to be - // satisfied in order to be considered a match. - // - // metadataFilters specified here is applied after those - // specified in ForwardingRule that refers to theUrlMap this HttpRouteRuleMatch - // belongs to. - // - // metadataFilters only applies to load balancers that haveloadBalancingScheme - // set toINTERNAL_SELF_MANAGED. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` - // PathTemplateMatch: If specified, the route is a pattern match expression - // that must match the - // :path header once the query string is removed. - // - // A pattern match allows you to match - // - // - // - The value must be between 1 and 1024 characters - // - The pattern must start with a leading slash ("/") - // - There may be no more than 5 operators in pattern - // - // Precisely one ofprefix_match, full_path_match,regex_match or - // path_template_match must be set. - PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` - // PrefixMatch: For satisfying the matchRule condition, the request's - // path must begin with the specified prefixMatch.prefixMatch must begin with a - // /. - // - // The value must be from 1 to 1024 characters. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - // specified. - PrefixMatch string `json:"prefixMatch,omitempty"` - // QueryParameterMatches: Specifies a list of query parameter match criteria, - // all of which must - // match corresponding query parameters in the request. - // - // Not supported when the URL map is bound to a target gRPC proxy. - QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"` - // RegexMatch: For satisfying the matchRule condition, the path of the - // request must satisfy the regular expression specified inregexMatch after - // removing any query parameters and anchor - // supplied with the original URL. For - // more information about regular expression syntax, see Syntax. - // - // Only one of prefixMatch, fullPathMatch,regexMatch or path_template_match - // must be - // specified. - // - // Regular expressions can only be used when the loadBalancingScheme is - // set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED orINTERNAL_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullPathMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullPathMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRuleMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheck: Represents a legacy HTTPS Health Check resource. -// -// Legacy HTTPS health checks have been deprecated. If you are using a -// target -// pool-based network load balancer, you must use a legacy HTTP (not -// HTTPS) -// health check. For all other load balancers, including backend -// service-based -// network load balancers, and for managed instance group auto-healing, you -// must -// use modern (non-legacy) health checks. -// -// For more information, seeHealth checks -// overview. -type HttpsHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The default - // value is 5 - // seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HealthyThreshold: A so-far unhealthy instance will be marked healthy after - // this - // many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - // Host: The value of the host header in the HTTPS health check request. If - // left - // empty (default value), the public IP on behalf of which this health check - // is performed will be used. - Host string `json:"host,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Port: The TCP port number for the HTTPS health check request. The default - // value - // is 443. - Port int64 `json:"port,omitempty"` - // RequestPath: The request path of the HTTPS health check request. The default - // value is - // "/". Must comply withRFC3986. - RequestPath string `json:"requestPath,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // TimeoutSec: How long (in seconds) to wait before claiming failure. The - // default value is - // 5 seconds. It is invalid for timeoutSec to have a greater value - // than - // checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - // UnhealthyThreshold: A so-far healthy instance will be marked unhealthy after - // this - // many consecutive failures. The default value is 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HttpsHealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpsHealthCheckListWarning: [Output Only] Informational warning message. -type HttpsHealthCheckListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*HttpsHealthCheckListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HttpsHealthCheckListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Image: Represents an Image resource. -// -// You can use images to create boot disks for your VM instances. -// For more information, read Images. -type Image struct { - // Architecture: The architecture of the image. Valid values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud - // Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: Size of the image when restored onto a persistent disk (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // EnableConfidentialCompute: Whether this image is created from a confidential - // compute mode disk. - // [Output Only]: This field is not set by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // Family: The name of the image family to which this image belongs. The - // image - // family name can be from a publicly managed image family provided by - // Compute Engine, or from a custom image family you create. For - // example,centos-stream-9 is a publicly available image family. - // For more information, see Image - // family best practices. - // - // When creating disks, you can specify an image family instead of a - // specific - // image name. The image family always returns its latest image that is - // not - // deprecated. The name of the image family must comply with RFC1035. - Family string `json:"family,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable - // only for bootable images. To see a list of available options, see - // theguestOSfeatures[].type parameter. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // ImageEncryptionKey: Encrypts the image using acustomer-supplied - // encryption key. - // - // After you encrypt an image with a customer-supplied key, you must - // provide - // the same key if you use the image later (e.g. to create a disk from - // the image). - // - // Customer-supplied encryption keys do not protect access to metadata - // of the disk. - // - // If you do not provide an encryption key when creating the image, then - // the - // disk will be encrypted using an automatically generated key and you do - // not - // need to provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this image, - // which is - // essentially a hash of the labels used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are attached - // to this image. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - // Locked: A flag for marketplace VM disk created from the image, which is - // designed - // for marketplace VM disk to prevent the proprietary data on the disk - // from - // being accessed unwantedly. The flag will be inherited by the disk - // created - // from the image. - // - // The disk with locked flag set to true will be prohibited from performing - // the operations below: - // - // - R/W or R/O disk attach - // - Disk detach, if disk is created via create-on-create - // - Create images - // - Create snapshots - // - Create disk clone (create disk from the current disk) - // - // - // - // The image with the locked field set to true will be prohibited - // from - // performing the operations below: - // - // - Create images from the current image - // - Update the locked field for the current image - // - // - // - // The instance with at least one disk with locked flag set to true will - // be - // prohibited from performing the operations below: - // - // - Secondary disk attach - // - Create instant snapshot - // - Create machine images - // - Create instance template - // - Delete the instance with --keep-disk parameter set to true - Locked bool `json:"locked,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *ImageParams `json:"params,omitempty"` - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - // RolloutOverride: A rollout policy to apply to this image. When specified, - // the rollout policy - // overrides per-zone references to the image via the associated image - // family. - // The rollout policy restricts the zones where this image is accessible - // when - // using a zonal image family reference. When the rollout policy does - // not - // include the user specified zone, or if the zone is rolled out, this image - // is accessible. - // - // The rollout policy for this image is read-only, except for - // allowlisted - // users. This field might not be configured. To view the latest - // non-deprecated image in a specific zone, use theimageFamilyViews.get method. - RolloutOverride *RolloutPolicy `json:"rolloutOverride,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ShieldedInstanceInitialState: Set the secure boot keys of shielded instance. - ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - // SourceDisk: URL of the source disk used to create this image. - // For example, the following are valid values: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskEncryptionKey: Thecustomer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // SourceDiskId: [Output Only] - // The ID value of the disk used to create this image. This value may be - // used - // to determine whether the image was taken from the current or a - // previous - // instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceImage: URL of the source image used to create this image. - // The following are valid formats for the URL: - // - // - https://www.googleapis.com/compute/v1/projects/project_id/global/ - // images/image_name - // - projects/project_id/global/images/image_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceImage string `json:"sourceImage,omitempty"` - // SourceImageEncryptionKey: The customer-supplied encryption key of the source - // image. Required if the - // source image is protected by a customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // SourceImageId: [Output Only] - // The ID value of the image used to create this image. This value may be - // used - // to determine whether the image was taken from the current or a - // previous - // instance of a given image name. - SourceImageId string `json:"sourceImageId,omitempty"` - // SourceSnapshot: URL of the source snapshot used to create this image. - // The following are valid formats for the URL: - // - // - https://www.googleapis.com/compute/v1/projects/project_id/global/ - // snapshots/snapshot_name - // - projects/project_id/global/snapshots/snapshot_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of the - // source snapshot. Required if - // the source snapshot is protected by a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - // SourceSnapshotId: [Output Only] - // The ID value of the snapshot used to create this image. This value may - // be - // used to determine whether the snapshot was taken from the current or - // a - // previous instance of a given snapshot name. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // SourceType: The type of the image used to create this disk. The - // default and only valid value is RAW. - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - // Status: [Output Only] The status of the image. An image can be used to - // create other - // resources, such as instances, only after the image has been - // successfully - // created and the status is set to READY. Possible - // values are FAILED, PENDING, orREADY. - // - // Possible values: - // "DELETING" - Image is deleting. - // "FAILED" - Image creation failed due to an error. - // "PENDING" - Image hasn't been created as yet. - // "READY" - Image has been successfully created. - Status string `json:"status,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the image - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // UserLicenses: A list of publicly visible user-licenses. Unlike regular - // licenses, user - // provided licenses can be modified after the disk is created. This includes - // a list of URLs to the license resource. For example, to provide a - // debian - // license: - // - // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - UserLicenses []string `json:"userLicenses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Image) MarshalJSON() ([]byte, error) { - type NoMethod Image - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block device, - // which should beTAR. This is just a container and transmission format and - // not - // a runtime format. Provided by the client when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` - // Sha1Checksum: [Deprecated] This field is deprecated. - // An optional SHA1 checksum of the disk image before unpackaging provided - // by the client when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` - // Source: The full Google Cloud Storage URL where the raw disk image archive - // is - // stored. - // The following are valid formats for the URL: - // - // - https://storage.googleapis.com/bucket_name/image_archive_name - // - - // https://storage.googleapis.com/bucket_name/folder_name/image_archive_name - // - // - // - // In order to create an image, you must provide the full or partial URL of - // one of the following: - // - // - The rawDisk.source URL - // - The sourceDisk URL - // - The sourceImage URL - // - The sourceSnapshot URL - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageRawDisk) MarshalJSON() ([]byte, error) { - type NoMethod ImageRawDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ImageFamilyView struct { - // Image: The latest image that is part of the specified image family in - // the - // requested location, and that is not deprecated. - Image *Image `json:"image,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Image") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Image") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageFamilyView) MarshalJSON() ([]byte, error) { - type NoMethod ImageFamilyView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ImageListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageList) MarshalJSON() ([]byte, error) { - type NoMethod ImageList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageListWarning: [Output Only] Informational warning message. -type ImageListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ImageListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ImageListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ImageParams: Additional image params. -type ImageParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the image. Tag - // keys and values have - // the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ImageParams) MarshalJSON() ([]byte, error) { - type NoMethod ImageParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InitialStateConfig: Initial State for shielded instance, -// these are public keys which are safe to store in public -type InitialStateConfig struct { - // Dbs: The Key Database (db). - Dbs []*FileContentBuffer `json:"dbs,omitempty"` - // Dbxs: The forbidden key database (dbx). - Dbxs []*FileContentBuffer `json:"dbxs,omitempty"` - // Keks: The Key Exchange Key (KEK). - Keks []*FileContentBuffer `json:"keks,omitempty"` - // Pk: The Platform Key (PK). - Pk *FileContentBuffer `json:"pk,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dbs") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dbs") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InitialStateConfig) MarshalJSON() ([]byte, error) { - type NoMethod InitialStateConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Instance: Represents an Instance resource. -// -// An instance is a virtual machine that is hosted on Google Cloud -// Platform. -// For more information, readVirtual Machine Instances. -type Instance struct { - // AdvancedMachineFeatures: Controls for advanced machine-related behavior - // features. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // CanIpForward: Allows this instance to send and receive packets with - // non-matching - // destination or source IPs. This is required if you plan to use this - // instance to forward routes. For more information, seeEnabling IP Forwarding. - CanIpForward bool `json:"canIpForward,omitempty"` - ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeletionProtection: Whether the resource should be protected against - // deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Disks: Array of disks associated with this instance. Persistent disks must - // be - // created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - // DisplayDevice: Enables display device for the instance. - DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - // EraseWindowsVssSignature: Specifies whether the disks restored from source - // snapshots or source - // machine image should erase Windows specific VSS signature. - EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the instance's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update the instance. You must always provide - // an - // up-to-date fingerprint hash in order to update the instance. - // - // To see the latest fingerprint, make get() request to the - // instance. - Fingerprint string `json:"fingerprint,omitempty"` - // GuestAccelerators: A list of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // Hostname: Specifies the hostname of the instance. The specified hostname - // must be - // RFC1035 compliant. If hostname is not specified, the default hostname - // is - // [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, - // and - // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. - Hostname string `json:"hostname,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceEncryptionKey: Encrypts suspended data for an instance with - // acustomer-managed - // encryption key. - // - // If you are creating a new instance, this field will encrypt the local - // SSD - // and in-memory contents of the instance during the suspend operation. - // - // If you do not provide an encryption key when creating the instance, then - // the local SSD and in-memory contents will be encrypted using - // an automatically generated key during the suspend operation. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#instance - // for instances. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for this request, which is essentially a - // hash of - // the label's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // instance. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this instance. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // LastStartTimestamp: [Output Only] Last start timestamp inRFC3339 text - // format. - LastStartTimestamp string `json:"lastStartTimestamp,omitempty"` - // LastStopTimestamp: [Output Only] Last stop timestamp inRFC3339 text format. - LastStopTimestamp string `json:"lastStopTimestamp,omitempty"` - // LastSuspendedTimestamp: [Output Only] Last suspended timestamp inRFC3339 - // text format. - LastSuspendedTimestamp string `json:"lastSuspendedTimestamp,omitempty"` - // MachineType: Full or partial URL of the machine type resource to use for - // this instance, - // in the format:zones/zone/machineTypes/machine-type. This is provided by the - // client - // when the instance is created. For example, the following is a valid - // partial - // url to a predefined - // machine type: - // - // zones/us-central1-f/machineTypes/n1-standard-1 - // - // - // To create acustom - // machine type, provide a URL to a machine type in the following format, - // where CPUS is 1 or an even number up to 32 (2, - // 4, 6, ... 24, etc), and MEMORY is the total - // memory for this instance. Memory must be a multiple of 256 MB and must - // be supplied in MB (e.g. 5 GB of memory is 5120 - // MB): - // - // zones/zone/machineTypes/custom-CPUS-MEMORY - // - // - // For example: zones/us-central1-f/machineTypes/custom-4-5120 - // For a full list of restrictions, read theSpecifications - // for custom machine types. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs assigned - // to this instance. This includes metadata keys that were explicitly - // defined - // for the instance. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Specifies aminimum CPU - // platform for the VM instance. Applicable values are the friendly names - // of CPU platforms, such as minCpuPlatform: "Intel - // Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of network configurations for this instance. - // These specify how - // interfaces are configured to interact with other network services, such - // as - // connecting to the internet. Multiple interfaces are supported - // per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InstanceParams `json:"params,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance. A map from a - // subdomain - // (namespace) to entries map. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for the VM. - // If not specified, use INHERIT_FROM_SUBNETWORK as default. - // - // Possible values: - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits - // PrivateIpv6GoogleAccess from its - // subnetwork. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // ReservationAffinity: Specifies the reservations that this instance can - // consume from. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` - // ResourcePolicies: Resource policies applied to this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Specifies values set for instance attributes - // as - // compared to the values requested by user in the corresponding input - // only - // field. - ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: [Output Only] Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // ServiceAccounts: A list of service accounts, with their specified scopes, - // authorized for - // this instance. Only one service account per VM instance is - // supported. - // - // Service accounts generate access tokens that can be accessed - // through the metadata server and used to authenticate applications on - // the - // instance. SeeService Accounts - // for more information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` - // ShieldedVmConfig: Deprecating, please use shielded_instance_config. - ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` - // ShieldedVmIntegrityPolicy: Deprecating, please use - // shielded_instance_integrity_policy. - ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` - // SourceMachineImage: Source machine image - SourceMachineImage string `json:"sourceMachineImage,omitempty"` - // SourceMachineImageEncryptionKey: Source machine image encryption key when - // creating an instance from a - // machine image. - SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` - // StartRestricted: [Output Only] Whether a VM has been restricted for start - // because Compute - // Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING,RUNNING, STOPPING, - // SUSPENDING,SUSPENDED, REPAIRING, andTERMINATED. For more information about - // the status of the - // instance, see - // Instance life cycle. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - // Tags: Tags to apply to this instance. Tags are used to identify - // valid - // sources or targets for network firewalls and are specified by the - // client - // during instance creation. The tags can be later modified by the - // setTags - // method. Each tag within the list must comply withRFC1035. - // Multiple tags can be specified via the 'tags.items' field. - Tags *Tags `json:"tags,omitempty"` - // Zone: [Output Only] URL of the zone where the instance resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Instance) MarshalJSON() ([]byte, error) { - type NoMethod Instance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: An object that contains a list of instances scoped by zone. - Items map[string]InstancesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#instanceAggregatedList - // for aggregated lists of - // Instance resources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceAggregatedListWarning: [Output Only] Informational warning message. -type InstanceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceConsumptionData struct { - // ConsumptionInfo: Resources consumed by the instance. - ConsumptionInfo *InstanceConsumptionInfo `json:"consumptionInfo,omitempty"` - // Instance: Server-defined URL for the instance. - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumptionInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumptionInfo") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceConsumptionData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceConsumptionInfo struct { - // GuestCpus: The number of virtual CPUs that are available to the instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - // LocalSsdGb: The amount of local SSD storage available to the - // instance, - // defined in GiB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - // MemoryMb: The amount of physical memory available to the instance, - // defined in MiB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // MinNodeCpus: The minimal guaranteed number of virtual CPUs that are - // reserved. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestCpus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestCpus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceConsumptionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroup: Represents an Instance Group resource. -// -// Instance Groups can be used to configure a target -// forload -// balancing. -// -// Instance groups can either be managed or unmanaged. -// -// To create -// managed instance groups, use the instanceGroupManager -// orregionInstanceGroupManager resource instead. -// -// Use zonal unmanaged instance groups if you need to applyload -// balancing to groups of heterogeneous instances or if you need to manage -// the instances yourself. You cannot create regional unmanaged instance -// groups. -// -// For more information, readInstance -// groups. -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this instance - // group inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system - // uses this fingerprint to detect conflicts when multiple users change - // the - // named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] A unique identifier for this instance group, generated - // by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The resource type, which is alwayscompute#instanceGroup - // for instance groups. - Kind string `json:"kind,omitempty"` - // Name: The name of the instance group. The name must be 1-63 characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // NamedPorts: Optional. Assigns a name to a port number. For example:{name: - // "http", port: 80} - // - // This - // allows the system to reference ports by the assigned name instead of a - // port number. Named ports can also contain multiple ports. For - // example:[{name: "app1", port: 8080}, {name: - // "app1", port: 8081}, {name: "app2", port: - // 8082}] - // - // Named ports apply to all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Network: [Output Only] The URL of the network to which all instances in - // the - // instance group belong. If your instance has multiple network - // interfaces, - // then the network and subnetwork fields only refer to the - // network and subnet used by your primary interface (nic0). - Network string `json:"network,omitempty"` - // Region: [Output Only] The URL of theregion - // where the instance group is located (for regional resources). - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] The URL for this instance group. The server - // generates - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // Size: [Output Only] The total number of instances in the instance group. - Size int64 `json:"size,omitempty"` - // Subnetwork: [Output Only] The URL of the subnetwork to which all instances - // in the - // instance group belong. If your instance has multiple network - // interfaces, - // then the network and subnetwork fields only refer to the - // network and subnet used by your primary interface (nic0). - Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the instance group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroup) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupAggregatedList for aggregated lists of - // instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupAggregatedListWarning: [Output Only] Informational warning -// message. -type InstanceGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupList for instance group lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupListWarning: [Output Only] Informational warning message. -type InstanceGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManager: Represents a Managed Instance Group resource. -// -// An instance group is a collection of VM instances that you can manage as -// a -// single entity. For more information, readInstance groups. -// -// For zonal Managed Instance Group, use the -// instanceGroupManagers -// resource. -// -// For regional Managed Instance Group, use theregionInstanceGroupManagers -// resource. -type InstanceGroupManager struct { - // AllInstancesConfig: Specifies configuration that overrides the instance - // template configuration - // for the group. - AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // AutoHealingPolicies: The autohealing policy for this managed instance group. - // You can specify - // only one value. - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // BaseInstanceName: The base instance name is a prefix that you want to attach - // to the names of - // all VMs in a MIG. The maximum character length is 58 and the name - // must - // comply with RFC1035 format. - // - // When a VM is created in the group, the MIG appends a hyphen and a - // random - // four-character string to the base instance name. If you want the MIG - // to - // assign sequential numbers instead of a random string, then end the - // base - // instance name with a hyphen followed by one or more hash symbols. The - // hash - // symbols indicate the number of digits. For example, a base instance name - // of - // "vm-###" results in "vm-001" as a VM name. - // @pattern - // a-z (([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?)) - BaseInstanceName string `json:"baseInstanceName,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this managed - // instance group inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CurrentActions: [Output Only] The list of instance actions and the number of - // instances - // in this managed instance group that are scheduled for each of those - // actions. - CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // DistributionPolicy: Policy specifying the intended distribution of managed - // instances across - // zones in a regional managed instance group. - DistributionPolicy *DistributionPolicy `json:"distributionPolicy,omitempty"` - // FailoverAction: The action to perform in case of zone failure. Only one - // value is supported,NO_FAILOVER. The default is NO_FAILOVER. - // - // Possible values: - // "NO_FAILOVER" - // "UNKNOWN" - FailoverAction string `json:"failoverAction,omitempty"` - // Fingerprint: Fingerprint of this resource. This field may be used in - // optimistic locking. - // It will be ignored when inserting an InstanceGroupManager. An - // up-to-date - // fingerprint must be provided in order to update the - // InstanceGroupManager, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an InstanceGroupManager. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // InstanceFlexibilityPolicy: Instance flexibility allowing MIG to create VMs - // from multiple - // types of machines. - // Instance flexibility configuration on MIG overrides instance - // template configuration. - InstanceFlexibilityPolicy *InstanceGroupManagerInstanceFlexibilityPolicy `json:"instanceFlexibilityPolicy,omitempty"` - // InstanceGroup: [Output Only] The URL of the Instance Group resource. - InstanceGroup string `json:"instanceGroup,omitempty"` - // InstanceLifecyclePolicy: The repair policy for this managed instance group. - InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `json:"instanceLifecyclePolicy,omitempty"` - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create all new instances - // in the managed instance group. The templates for existing instances in - // the - // group do not change unless you run recreateInstances, - // runapplyUpdatesToInstances, or set the group'supdatePolicy.type to - // PROACTIVE. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManager for managed instance groups. - Kind string `json:"kind,omitempty"` - // ListManagedInstancesResults: Pagination behavior of the listManagedInstances - // API method for - // this managed instance group. - // - // Possible values: - // "PAGELESS" - (Default) Pagination is disabled for the - // group'slistManagedInstances API method. maxResults - // and pageToken query parameters are ignored and all - // instances are returned in a single response. - // "PAGINATED" - Pagination is enabled for the group's - // listManagedInstances - // API method. maxResults and pageToken query - // parameters are respected. - ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` - // MultiMig: URL to the multi-MIG that this Managed Instance Group belongs to. - MultiMig string `json:"multiMig,omitempty"` - // Name: The name of the managed instance group. The name must be 1-63 - // characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // NamedPorts: [Output Only] Named ports configured on the Instance Groups - // complementary - // to this Instance Group Manager. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Params: Input only. Additional params passed with the request, but not - // persisted - // as part of resource payload. - Params *InstanceGroupManagerParams `json:"params,omitempty"` - // Region: [Output Only] The URL of theregion - // where the managed instance group resides (for regional resources). - Region string `json:"region,omitempty"` - // ResourcePolicies: Resource policies for this managed instance group. - ResourcePolicies *InstanceGroupManagerResourcePolicies `json:"resourcePolicies,omitempty"` - // SatisfiesPzi: [Output Only] Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] The URL for this managed instance group. The server - // defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // ServiceAccount: The service account to be used as credentials for all - // operations performed - // by the managed instance group on instances. The service accounts needs - // all - // permissions required to create and delete instances. - // By default, the service - // account - // {projectNumber}@cloudservices.gserviceaccount.com is used. - ServiceAccount string `json:"serviceAccount,omitempty"` - // StandbyPolicy: Standby policy for stopped and suspended instances. - StandbyPolicy *InstanceGroupManagerStandbyPolicy `json:"standbyPolicy,omitempty"` - // StatefulPolicy: Stateful configuration for this Instanced Group Manager - StatefulPolicy *StatefulPolicy `json:"statefulPolicy,omitempty"` - // Status: [Output Only] The status of this managed instance group. - Status *InstanceGroupManagerStatus `json:"status,omitempty"` - // TargetPools: The URLs for all TargetPool resources to which instances in - // theinstanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - // TargetSize: The target number of running instances for this managed instance - // group. - // You can reduce this number by using the instanceGroupManager - // deleteInstances or abandonInstances methods. Resizing the group also - // changes this number. - TargetSize int64 `json:"targetSize,omitempty"` - // TargetSizePolicy: The policy that specifies how the MIG creates its VMs to - // achieve the target - // size. - TargetSizePolicy *InstanceGroupManagerTargetSizePolicy `json:"targetSizePolicy,omitempty"` - // TargetStoppedSize: The target number of stopped instances for this managed - // instance group. - // This number changes when you: - // - // - Stop instance using the stopInstances - // method or start instances using the startInstances - // method. - // - Manually change the targetStoppedSize using the update - // method. - TargetStoppedSize int64 `json:"targetStoppedSize,omitempty"` - // TargetSuspendedSize: The target number of suspended instances for this - // managed instance group. - // This number changes when you: - // - // - Suspend instance using the suspendInstances - // method or resume instances using the resumeInstances - // method. - // - Manually change the targetSuspendedSize using the update - // method. - TargetSuspendedSize int64 `json:"targetSuspendedSize,omitempty"` - // UpdatePolicy: The update policy for this managed instance group. - UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` - // Versions: Specifies the instance templates used by this managed instance - // group to - // create instances. - // - // Each version is defined by an instanceTemplate and aname. Every version can - // appear at most once per instance - // group. This field overrides the top-level instanceTemplate - // field. Read more about therelationships - // between these fields. Exactly one version must leave thetargetSize field - // unset. That version will be applied to all - // remaining instances. For more information, read aboutcanary - // updates. - Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"` - // Zone: [Output Only] The URL of azone - // where the managed instance group is located (for zonal resources). - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManager) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManager - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerActionsSummary struct { - // Abandoning: [Output Only] The total number of instances in the managed - // instance group - // that are scheduled to be abandoned. Abandoning an instance removes it - // from the managed instance group without deleting it. - Abandoning int64 `json:"abandoning,omitempty"` - // Creating: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be created or are currently being created. If the - // group - // fails to create any of these instances, it tries again until it creates - // the instance successfully. - // - // If you have disabled creation retries, this field will not be - // populated; - // instead, the creatingWithoutRetries field will be populated. - Creating int64 `json:"creating,omitempty"` - // CreatingWithoutRetries: [Output Only] The number of instances that the - // managed instance group - // will attempt to create. The group attempts to create each instance - // only once. If the group fails to create any of these instances, it - // decreases the group's targetSize value accordingly. - CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"` - // Deleting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be deleted or are currently being deleted. - Deleting int64 `json:"deleting,omitempty"` - // None: [Output Only] The number of instances in the managed instance group - // that - // are running and have no scheduled actions. - None int64 `json:"none,omitempty"` - // Recreating: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be recreated or are currently being being - // recreated. - // Recreating an instance deletes the existing root persistent disk - // and creates a new disk from the image that is defined in the - // instance template. - Recreating int64 `json:"recreating,omitempty"` - // Refreshing: [Output Only] The number of instances in the managed instance - // group that - // are being reconfigured with properties that do not require a restart - // or a recreate action. For example, setting or removing target - // pools for the instance. - Refreshing int64 `json:"refreshing,omitempty"` - // Restarting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be restarted or are currently being restarted. - Restarting int64 `json:"restarting,omitempty"` - // Resuming: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be resumed or are currently being resumed. - Resuming int64 `json:"resuming,omitempty"` - // Starting: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be started or are currently being started. - Starting int64 `json:"starting,omitempty"` - // Stopping: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be stopped or are currently being stopped. - Stopping int64 `json:"stopping,omitempty"` - // Suspending: [Output Only] The number of instances in the managed instance - // group that - // are scheduled to be suspended or are currently being suspended. - Suspending int64 `json:"suspending,omitempty"` - // Verifying: [Output Only] The number of instances in the managed instance - // group that - // are being verified. See the managedInstances[].currentAction - // property in the listManagedInstances method documentation. - Verifying int64 `json:"verifying,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abandoning") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abandoning") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerActionsSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManagersScopedList resources. - Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManagerAggregatedList for an aggregated - // list of managed instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerAggregatedListWarning: [Output Only] Informational -// warning message. -type InstanceGroupManagerAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAllInstancesConfig struct { - // Properties: Properties to set on all instances in the group. - // - // You can add or modify properties using theinstanceGroupManagers.patch - // orregionInstanceGroupManagers.patch. After settingallInstancesConfig on the - // group, you must update the group's - // instances to apply the configuration. To apply the configuration, set - // the - // group's updatePolicy.type field to use proactive updates or - // use the applyUpdatesToInstances method. - Properties *InstancePropertiesPatch `json:"properties,omitempty"` - // ForceSendFields is a list of field names (e.g. "Properties") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Properties") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerAutoHealingPolicy struct { - // HealthCheck: The URL for the health check that signals autohealing. - HealthCheck string `json:"healthCheck,omitempty"` - // InitialDelaySec: The initial delay is the number of seconds that a new VM - // takes to - // initialize and run its startup script. During a VM's initial delay - // period, the MIG ignores unsuccessful health checks because the VM might - // be in the startup process. This prevents the MIG from prematurely - // recreating a VM. If the health check receives a healthy response during - // the initial delay, it indicates that the startup process is complete and - // the VM is ready. The value of initial delay must be between 0 and - // 3600 - // seconds. The default value is 0. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheck") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheck") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerAutoHealingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicy struct { - // InstanceSelections: Named instance selections configuring properties that - // the group will use - // when creating new VMs. - InstanceSelections map[string]InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection `json:"instanceSelections,omitempty"` - // ProvisioningModelMix: Provisioning model configuration used by this managed - // instance group to - // create instances. - ProvisioningModelMix *InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix `json:"provisioningModelMix,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSelections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSelections") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection struct { - // Disks: List of disks to be attached to the instances created from - // this - // selection. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineTypes: Full machine-type names, e.g. "n1-standard-16". - MachineTypes []string `json:"machineTypes,omitempty"` - // MinCpuPlatform: Name of the minimum CPU platform to be used by this instance - // selection. - // e.g. 'Intel Ice Lake'. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // Rank: Preference of this instance selection. Lower number means - // higher - // preference. MIG will first try to create a VM based on the machine-type - // with lowest rank and fallback to next rank based on availability. - // Machine types and instance selections with the same rank have the - // same - // preference. - Rank int64 `json:"rank,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicyInstanceSelection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix struct { - // StandardCapacityBase: The base capacity that will always use Standard VMs to - // avoid risk of - // more preemption than the minimum capacity user needs. MIG will create - // only Standard VMs until it reaches standard_capacity_base and only - // then will start using standard_capacity_percent_above_base to mix Spot - // with Standard VMs. - StandardCapacityBase int64 `json:"standardCapacityBase,omitempty"` - // StandardCapacityPercentAboveBase: The percentage of target capacity that - // should use Standard VM. The - // remaining percentage will use Spot VMs. The percentage applies only to - // the capacity above standard_capacity_base. - StandardCapacityPercentAboveBase int64 `json:"standardCapacityPercentAboveBase,omitempty"` - // ForceSendFields is a list of field names (e.g. "StandardCapacityBase") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StandardCapacityBase") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerInstanceLifecyclePolicy struct { - // DefaultActionOnFailure: The action that a MIG performs on a failed VM. If - // the value of the onFailedHealthCheck field - // is `DEFAULT_ACTION`, then the same action also applies to the VMs on which - // your application - // fails a health check. Valid values are - REPAIR (default): MIG automatically - // repairs a failed - // VM by recreating it. For more information, seeAbout repairing - // VMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM. - // - // Possible values: - // "DELETE" - MIG deletes a failed or an unhealthy VM. Deleting the VM - // decreases - // the target size of the MIG. - // "DO_NOTHING" - MIG does not repair a failed VM. - // "REPAIR" - (default): MIG automatically repairs a failed VM by recreating - // it. For more information, seeAbout repairing - // VMs in a MIG. - DefaultActionOnFailure string `json:"defaultActionOnFailure,omitempty"` - // ForceUpdateOnRepair: A bit indicating whether to forcefully apply the - // group's latest - // configuration when repairing a VM. Valid options are: - // - // - // - // - NO (default): If configuration updates are available, they are not - // forcefully applied during repair. Instead, configuration updates are - // applied according to the group's update policy. - // - // - YES: If configuration updates are available, they are applied - // during repair. - // - // Possible values: - // "NO" - // "YES" - ForceUpdateOnRepair string `json:"forceUpdateOnRepair,omitempty"` - // OnFailedHealthCheck: The action that a MIG performs on an unhealthy VM. A VM - // is marked as - // unhealthy when the application running on that VM fails a health - // check. - // Valid values are: - // - // - DEFAULT_ACTION (default): MIG uses the same action - // configured for instanceLifecyclePolicy.defaultActionOnFailure field. - // - REPAIR: MIG automatically repairs an unhealthy VM by - // recreating it. - // - DO_NOTHING: MIG doesn't repair an unhealthy VM. - // For more information, see - // About repairing VMs in a MIG. - // - // Possible values: - // "DEFAULT_ACTION" - (Default) MIG uses the same action configured - // for - // instanceLifecyclePolicy.defaultActionOnFailure field. - // "DO_NOTHING" - MIG doesn't repair an unhealthy VM. - // "REPAIR" - MIG automatically repairs an unhealthy VM by recreating it. - OnFailedHealthCheck string `json:"onFailedHealthCheck,omitempty"` - // OnRepair: Configuration for VM repairs in the MIG. - OnRepair *InstanceGroupManagerInstanceLifecyclePolicyOnRepair `json:"onRepair,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultActionOnFailure") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultActionOnFailure") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceLifecyclePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceLifecyclePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerInstanceLifecyclePolicyOnRepair: Configuration for VM -// repairs in the MIG. -type InstanceGroupManagerInstanceLifecyclePolicyOnRepair struct { - // AllowChangingZone: Specifies whether the MIG can change a VM's zone during a - // repair. - // Valid values are: - // - // - NO (default): MIG cannot change a VM's zone during a - // repair. - // - YES: MIG can select a different zone for the VM during - // a repair. - // - // Possible values: - // "NO" - [Default] MIG cannot change a VM's zone during a repair. - // "YES" - MIG can select a different zone for the VM during a repair. - AllowChangingZone string `json:"allowChangingZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowChangingZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowChangingZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerInstanceLifecyclePolicyOnRepair) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerInstanceLifecyclePolicyOnRepair - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerList: [Output Only] A list of managed instance groups. -type InstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // always - // compute#instanceGroupManagerList for a list of managed instance groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerListWarning: [Output Only] Informational warning -// message. -type InstanceGroupManagerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerParams: Input only additional params for instance group -// manager creation. -type InstanceGroupManagerParams struct { - // ResourceManagerTags: Resource manager tags to bind to the managed instance - // group. The tags are - // key-value pairs. Keys must be in the format tagKeys/123 and values in - // the - // format tagValues/456. For more information, seeManage tags - // for resources. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerParams) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequest: InstanceGroupManagerResizeRequest -// represents a request to create -// a number of VMs: either immediately or by queuing the request for -// the -// specified time. This resize request is nested under InstanceGroupManager -// and the VMs created by this request are added to the -// owning -// InstanceGroupManager. -type InstanceGroupManagerResizeRequest struct { - // Count: This field is deprecated, please use resize_by instead. - // The count of instances to create as part of this resize request. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] The creation timestamp for this resize - // request inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Instances: The names of instances to be created by this resize request. The - // number of - // names specified determines the number of instances to create. The - // group's - // target size will be increased by this number. This field cannot be - // used - // together with 'resize_by'. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupManagerResizeRequest for - // resize requests. - Kind string `json:"kind,omitempty"` - // Name: The name of this resize request. The name must be 1-63 - // characters - // long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // Region: [Output Only] The URL of aregion - // where the resize request is located. Populated only for regional - // resize - // requests. - Region string `json:"region,omitempty"` - // RequestedRunDuration: Requested run duration for instances that will be - // created by this request. - // At the end of the run duration instance will be deleted. - RequestedRunDuration *Duration `json:"requestedRunDuration,omitempty"` - // ResizeBy: The number of instances to be created by this resize request. The - // group's - // target size will be increased by this number. This field cannot be - // used - // together with 'instances'. - ResizeBy int64 `json:"resizeBy,omitempty"` - // SelfLink: [Output Only] The URL for this resize request. The server - // defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output only] Current state of the request. - // - // Possible values: - // "ACCEPTED" - The request was created successfully and was accepted for - // provisioning - // when the capacity becomes available. - // "CANCELLED" - The request is cancelled. - // "CREATING" - Resize request is being created and may still fail creation. - // "FAILED" - The request failed before or during provisioning. If the - // request fails - // during provisioning, any VMs that were created during provisioning - // are - // rolled back and removed from the MIG. - // "PROVISIONING" - The value is deprecated. ResizeRequests would stay in the - // ACCEPTED state - // during provisioning attempts. - // The target resource(s) are being provisioned. - // "STATE_UNSPECIFIED" - Default value. This value should never be returned. - // "SUCCEEDED" - The request succeeded. - State string `json:"state,omitempty"` - // Status: [Output only] Status of the request. - Status *InstanceGroupManagerResizeRequestStatus `json:"status,omitempty"` - // Zone: [Output Only] The URL of azone - // where the resize request is located. Populated only for zonal - // resize - // requests. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatus struct { - // Error: [Output only] Fatal errors encountered during the queueing - // or - // provisioning phases of the ResizeRequest that caused the transition to - // the FAILED state. Contrary to the last_attempt errors, this field is - // final and errors are never removed from here, as the ResizeRequest is - // not - // going to retry. - Error *InstanceGroupManagerResizeRequestStatusError `json:"error,omitempty"` - // LastAttempt: [Output only] Information about the last attempt to fulfill the - // request. - // The value is temporary since the ResizeRequest can retry, as long as - // it's - // still active and the last attempt value can either be cleared or - // replaced - // with a different error. Since ResizeRequest retries infrequently, the - // value may be stale and no longer show an active problem. The value - // is - // cleared when ResizeRequest transitions to the final state - // (becomes - // inactive). If the final state is FAILED the error describing it will - // be - // storred in the "error" field only. - LastAttempt *InstanceGroupManagerResizeRequestStatusLastAttempt `json:"lastAttempt,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestStatusError: [Output only] Fatal errors -// encountered during the queueing or -// provisioning phases of the ResizeRequest that caused the transition to -// the FAILED state. Contrary to the last_attempt errors, this field is -// final and errors are never removed from here, as the ResizeRequest is -// not -// going to retry. -type InstanceGroupManagerResizeRequestStatusError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerResizeRequestStatusErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttempt struct { - // Error: Errors that prevented the ResizeRequest to be fulfilled. - Error *InstanceGroupManagerResizeRequestStatusLastAttemptError `json:"error,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttempt) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttempt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestStatusLastAttemptError: Errors that -// prevented the ResizeRequest to be fulfilled. -type InstanceGroupManagerResizeRequestStatusLastAttemptError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestStatusLastAttemptErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestsListResponse: [Output Only] A list of -// resize requests. -type InstanceGroupManagerResizeRequestsListResponse struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of resize request resources. - Items []*InstanceGroupManagerResizeRequest `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#instanceGroupManagerResizeRequestList for - // a list of resize requests. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagerResizeRequestsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerResizeRequestsListResponseWarning: [Output Only] -// Informational warning message. -type InstanceGroupManagerResizeRequestsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagerResizeRequestsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResizeRequestsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResizeRequestsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerResourcePolicies struct { - // WorkloadPolicy: The URL of the workload policy that is specified for this - // managed - // instance group. - // It can be a full or partial URL. For example, the following are - // all valid URLs to a workload policy: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - projects/project/regions/region/resourcePolicies/resourcePolicy - // - regions/region/resourcePolicies/resourcePolicy - WorkloadPolicy string `json:"workloadPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkloadPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerResourcePolicies) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerResourcePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStandbyPolicy struct { - // InitialDelaySec: Specifies the number of seconds that the MIG should wait to - // suspend or - // stop a VM after that VM was created. The initial delay gives - // the - // initialization script the time to prepare your VM for a quick scale out. - // The value of initial delay must be between 0 and 3600 seconds. The - // default value is 0. - InitialDelaySec int64 `json:"initialDelaySec,omitempty"` - // Mode: Defines how a MIG resumes or starts VMs from a standby pool when - // the - // group scales out. The default mode is `MANUAL`. - // - // Possible values: - // "MANUAL" - MIG does not automatically resume or start VMs in the standby - // pool when - // the group scales out. - // "SCALE_OUT_POOL" - MIG automatically resumes or starts VMs in the standby - // pool when the - // group scales out, and replenishes the standby pool afterwards. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "InitialDelaySec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InitialDelaySec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStandbyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStandbyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatus struct { - // AllInstancesConfig: [Output only] Status of all-instances configuration on - // the group. - AllInstancesConfig *InstanceGroupManagerStatusAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // Autoscaler: [Output Only] The URL of theAutoscaler - // that targets this instance group manager. - Autoscaler string `json:"autoscaler,omitempty"` - // BulkInstanceOperation: [Output Only] The status of bulk instance operation. - BulkInstanceOperation *InstanceGroupManagerStatusBulkInstanceOperation `json:"bulkInstanceOperation,omitempty"` - // IsStable: [Output Only] A bit indicating whether the managed instance group - // is in a - // stable state. A stable state means that: none of the instances in - // the - // managed instance group is currently undergoing any type of change - // (for - // example, creation, restart, or deletion); no future changes are - // scheduled - // for instances in the managed instance group; and the managed instance - // group itself is not being modified. - IsStable bool `json:"isStable,omitempty"` - // Stateful: [Output Only] Stateful status of the given Instance Group Manager. - Stateful *InstanceGroupManagerStatusStateful `json:"stateful,omitempty"` - // VersionTarget: [Output Only] A status of consistency of Instances' versions - // with their - // target version specified by version field on Instance Group - // Manager. - VersionTarget *InstanceGroupManagerStatusVersionTarget `json:"versionTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusAllInstancesConfig struct { - // CurrentRevision: [Output Only] Current all-instances configuration - // revision. - // This value is in RFC3339 text format. - CurrentRevision string `json:"currentRevision,omitempty"` - // Effective: [Output Only] A bit indicating whether this configuration - // has - // been applied to all managed instances in the group. - Effective bool `json:"effective,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentRevision") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentRevision") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerStatusBulkInstanceOperation: Bulk instance operation is -// the creation of VMs in a MIG when the -// targetSizePolicy.mode is set to BULK. -type InstanceGroupManagerStatusBulkInstanceOperation struct { - // InProgress: [Output Only] Informs whether bulk instance operation is in - // progress. - InProgress bool `json:"inProgress,omitempty"` - // LastProgressCheck: [Output Only] Information from the last progress check of - // bulk instance - // operation. - LastProgressCheck *InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck `json:"lastProgressCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "InProgress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InProgress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperation) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck struct { - // Error: [Output Only] Errors encountered during bulk instance operation. - Error *InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError `json:"error,omitempty"` - // Timestamp: [Output Only] Timestamp of the last progress check of bulk - // instance - // operation. Timestamp is in RFC3339 text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError: -// [Output Only] Errors encountered during bulk instance operation. -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusBulkInstanceOperationLastProgressCheckErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusStateful struct { - // HasStatefulConfig: [Output Only] A bit indicating whether the managed - // instance group - // has stateful configuration, that is, if you have configured any items - // in a stateful policy or in per-instance configs. - // The group might report that it has no stateful configuration even when - // there is still some preserved state on a managed instance, for example, - // if you have deleted all PICs but not yet applied those deletions. - HasStatefulConfig bool `json:"hasStatefulConfig,omitempty"` - // IsStateful: [Output Only] A bit indicating whether the managed instance - // group - // has stateful configuration, that is, if you have configured any items - // in a stateful policy or in per-instance configs. - // The group might report that it has no stateful configuration even when - // there is still some preserved state on a managed instance, for example, - // if you have deleted all PICs but not yet applied those deletions. This - // field is deprecated in favor of has_stateful_config. - IsStateful bool `json:"isStateful,omitempty"` - // PerInstanceConfigs: [Output Only] Status of per-instance configurations on - // the instances. - PerInstanceConfigs *InstanceGroupManagerStatusStatefulPerInstanceConfigs `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "HasStatefulConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HasStatefulConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusStateful) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusStateful - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusStatefulPerInstanceConfigs struct { - // AllEffective: A bit indicating if all of the group's per-instance - // configurations - // (listed in the output of a listPerInstanceConfigs API call) have - // status EFFECTIVE or there are no per-instance-configs. - AllEffective bool `json:"allEffective,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllEffective") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllEffective") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusStatefulPerInstanceConfigs) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusStatefulPerInstanceConfigs - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerStatusVersionTarget struct { - // IsReached: [Output Only] A bit indicating whether version target has been - // reached - // in this managed instance group, i.e. all instances are in their - // target - // version. Instances' target version are specified byversion field on Instance - // Group Manager. - IsReached bool `json:"isReached,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsReached") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsReached") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerStatusVersionTarget) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerStatusVersionTarget - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerTargetSizePolicy struct { - // Mode: The mode of target size policy based on which the MIG creates its - // VMs - // individually or all at once. - // - // Possible values: - // "BULK" - The mode in which the MIG creates VMs all at once. In this mode, - // if the - // MIG is unable to create even one VM, the MIG waits until all VMs can - // be - // created at the same time. - // "INDIVIDUAL" - The mode in which the MIG creates VMs individually. In this - // mode, if - // the MIG is unable to create a VM, the MIG will continue to create the - // other VMs in the group. This is the default mode. - // "UNSPECIFIED_MODE" - If mode is unspecified, MIG will behave as in the - // default `INDIVIDUAL` - // mode. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerTargetSizePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerTargetSizePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerUpdatePolicy struct { - // InstanceRedistributionType: The - // instance redistribution policy for regional managed instance groups. - // Valid values are: - // - // - PROACTIVE (default): The group attempts to maintain an - // even distribution of VM instances across zones in the region. - // - NONE: For non-autoscaled groups, proactive - // redistribution is disabled. - // - // Possible values: - // "NONE" - No action is being proactively performed in order to bring this - // IGM - // to its target instance distribution. - // "PROACTIVE" - This IGM will actively converge to its target instance - // distribution. - InstanceRedistributionType string `json:"instanceRedistributionType,omitempty"` - // MaxSurge: The maximum number of instances that can be created above the - // specifiedtargetSize during the update process. This value can be - // either a fixed number or, if the group has 10 or more instances, - // a - // percentage. If you set a percentage, the number of instances is rounded - // if necessary. The default value for maxSurge is a fixed - // value equal to the number of zones in which the managed instance - // group - // operates. - // - // At least one of either maxSurge ormaxUnavailable must be greater than 0. - // Learn more about maxSurge. - MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"` - // MaxUnavailable: The maximum number of instances that can be unavailable - // during the update - // process. An instance is considered available if all of the - // following - // conditions are satisfied: - // - // - // - // - The instance's status is - // RUNNING. - // - If there is a health - // check on the instance group, the instance's health check status - // must be HEALTHY at least once. If there is no health check - // on the group, then the instance only needs to have a status of - // RUNNING to be considered available. - // - // - // This value can be either a fixed number or, if the group has 10 or - // more - // instances, a percentage. If you set a percentage, the number of instances - // is rounded if necessary. The default value formaxUnavailable is a fixed - // value equal to the number of zones - // in which the managed instance group operates. - // - // At least one of either maxSurge ormaxUnavailable must be greater than 0. - // Learn more about maxUnavailable. - MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"` - // MinReadySec: Minimum number of seconds to wait for after a newly created - // instance - // becomes available. This value must be from range [0, 3600]. - MinReadySec int64 `json:"minReadySec,omitempty"` - // MinimalAction: Minimal action to be taken on an instance. Use this option to - // minimize - // disruption as much as possible or to apply a more disruptive action than - // is necessary. - // - // - To limit disruption as much as possible, set the minimal action - // toREFRESH. If your update requires a more disruptive action, - // Compute Engine performs the necessary action to execute the update. - // - To apply a more disruptive action than is strictly necessary, set the - // minimal action to RESTART or REPLACE. For - // example, Compute Engine does not need to restart a VM to change its - // metadata. But if your application reads instance metadata only when a VM - // is restarted, you can set the minimal action to RESTART in - // order to pick up metadata changes. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: Most disruptive action that is allowed to be - // taken on an instance. - // You can specify either NONE to forbid any actions,REFRESH to avoid - // restarting the VM and to limit disruption - // as much as possible. RESTART to allow actions that can be - // applied without instance replacing or REPLACE to allow all - // possible actions. If the Updater determines that the minimal update - // action needed is more disruptive than most disruptive allowed action - // you - // specify it will not perform the update at all. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ReplacementMethod: What action should be used to replace instances. - // See minimal_action.REPLACE - // - // Possible values: - // "RECREATE" - Instances will be recreated (with the same name) - // "SUBSTITUTE" - Default option: instances will be deleted and created (with - // a new name) - ReplacementMethod string `json:"replacementMethod,omitempty"` - // Type: The type - // of update process. You can specify either PROACTIVE so - // that the MIG automatically updates VMs to the latest configurations - // orOPPORTUNISTIC so that you can select the VMs that you want - // to update. - // - // Possible values: - // "OPPORTUNISTIC" - MIG will apply new configurations - // to existing VMs only when you selectively target specific or all VMs to - // be updated. - // "PROACTIVE" - MIG will automatically apply new configurations - // to all or a subset of existing VMs and also to new VMs that are added - // to the group. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceRedistributionType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceRedistributionType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerUpdatePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagerVersion struct { - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create new instances in - // the managed instance group until the `targetSize` for this version - // is - // reached. The templates for existing instances in the group do not - // change - // unless you run recreateInstances, runapplyUpdatesToInstances, or set the - // group'supdatePolicy.type to PROACTIVE; in those cases, - // existing instances are updated until the `targetSize` for this version - // is - // reached. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Name: Name of the version. Unique among all versions in the scope of - // this - // managed instance group. - Name string `json:"name,omitempty"` - // TargetSize: Specifies the intended number of instances to be created from - // theinstanceTemplate. The final number of instances created - // from the template will be equal to: - // - // - // - If expressed as a fixed number, the minimum of either - // targetSize.fixed or - // instanceGroupManager.targetSize is used. - // - if expressed as a percent, the targetSize - // would be (targetSize.percent/100 * - // InstanceGroupManager.targetSize) If there is a remainder, the - // number is rounded. - // - // If unset, this version will update any remaining instances not - // updated by another version. ReadStarting - // a canary update for more information. - TargetSize *FixedOrPercent `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagerVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersAbandonInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersApplyUpdatesRequest: -// InstanceGroupManagers.applyUpdatesToInstances -type InstanceGroupManagersApplyUpdatesRequest struct { - // AllInstances: Flag to update all instances instead of specified list of - // “instances”. - // If the flag is set to true then the instances may not be specified - // in the request. - AllInstances bool `json:"allInstances,omitempty"` - // Instances: The list of URLs of one or more instances for which you want to - // apply - // updates. Each URL can be a full URL or a partial URL, such - // aszones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // MinimalAction: The minimal action that you want to perform on each instance - // during the - // update: - // - // - // - REPLACE: At minimum, delete the instance and create it - // again. - // - RESTART: Stop the instance and start it - // again. - // - REFRESH: Do not stop the instance and limit - // disruption as much as possible. - // - NONE: Do not - // disrupt the instance at all. - // - // - // By default, the minimum action is NONE. If your update - // requires a more disruptive action than you set with this flag, the - // necessary action is performed to execute the update. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that you want to - // perform on each instance during - // the update: - // - // - // - REPLACE: Delete the instance and create it again. - // - RESTART: Stop the instance and start it again. - // - REFRESH: Do not stop the instance and limit disruption - // as much as possible. - // - NONE: Do not disrupt the - // instance at all. - // - // - // By default, the most disruptive allowed action is REPLACE. If - // your update requires a more disruptive action than you set with this - // flag, - // the update request will fail. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersApplyUpdatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersCreateInstancesRequest: -// InstanceGroupManagers.createInstances -type InstanceGroupManagersCreateInstancesRequest struct { - // Instances: [Required] List of specifications of per-instance configs. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersCreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - // Queued instances do not have URL and can be deleted only by name. - // One cannot specify both URLs and names in a single request. - Instances []string `json:"instances,omitempty"` - // SkipInstancesOnValidationError: Specifies whether the request should proceed - // despite the inclusion of - // instances that are not members of the group or that are already in - // the - // process of being deleted or abandoned. If this field is set to `false` - // and - // such an instance is specified in the request, the operation fails. - // The - // operation always fails if the request contains a malformed instance URL or - // a reference to an instance that exists in a zone or region other than - // the - // group's zone or region. - SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersDeleteInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersDeletePerInstanceConfigsReq: -// InstanceGroupManagers.deletePerInstanceConfigs -type InstanceGroupManagersDeletePerInstanceConfigsReq struct { - // Names: The list of instance names for which we want to delete per-instance - // configs - // on this managed instance group. - Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Names") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Names") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersDeletePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersDeletePerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse struct { - // AcceleratorTopologiesInfo: The accelerator topology information returned per - // id of the topology - // location. - AcceleratorTopologiesInfo map[string]InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo `json:"acceleratorTopologiesInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologiesInfo") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologiesInfo") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo struct { - // AcceleratorTopology: Topology in the format of: "16x16", "4x4x4", etc. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // Possible values: - // "DEGRADED" - All VM are in RUNNING state, but there is an issue with - // the inter-chip connectivity that makes this part - // of the infrastructure ready to use as a working - // inter-chip connected group only in a degraded mode. - // This is allowed only for Instances configured with ICI - // resiliency - // "HEALTHY" - All VM are in RUNNING state, there are no issues with - // the - // inter-chip connectivity. - // "UNHEALTHY" - Some VMs may not be in RUNNING state, or there is an - // issue with the inter-chip connectivity that makes this - // part of the infrastructure unsuitable for forming a - // working inter-chip connected group. - AcceleratorTopologyHealth string `json:"acceleratorTopologyHealth,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersGetAvailableAcceleratorTopologiesResponseAcceleratorTopologyInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListErrorsResponse struct { - // Items: [Output Only] The list of errors of the managed instance group. - Items []*InstanceManagedByIgmError `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListErrorsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListManagedInstancesResponse struct { - // ManagedInstances: [Output Only] The list of instances in the managed - // instance group. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListManagedInstancesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListPerInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupManagersListPerInstanceConfigsRespWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsResp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersListPerInstanceConfigsRespWarning: [Output Only] -// Informational warning message. -type InstanceGroupManagersListPerInstanceConfigsRespWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagersListPerInstanceConfigsRespWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsRespWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersListPerInstanceConfigsRespWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersListPerInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersListPerInstanceConfigsRespWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersPatchPerInstanceConfigsReq: -// InstanceGroupManagers.patchPerInstanceConfigs -type InstanceGroupManagersPatchPerInstanceConfigsReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersPatchPerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersPatchPerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersRecreateInstancesRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersRecreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group attempts - // to create all - // instances initiated by this resize request only once. If there is an - // error - // during creation, the managed instance group does not retry create - // this - // instance, and we will decrease the targetSize of the request - // instead. If the flag is false, the group attempts to recreate each - // instance - // continuously until it succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. - // After an instance is successfully created while this flag is enabled, - // the - // instance behaves the same way as all the other instances created with - // a - // regular resize request. In particular, if a running instance - // dies - // unexpectedly at a later time and needs to be recreated, this mode does - // not - // affect the recreation behavior in that scenario. - // - // This flag is applicable only to the current resize request. It does - // not - // influence other resize requests in any way. - // - // You can see which instances is being creating in which mode by calling - // the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - // TargetSize: The number of running instances that the managed instance group - // should - // maintain at any given time. The group automatically adds or - // removes - // instances to maintain the number of instances specified by this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NoCreationRetries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersResizeAdvancedRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersResumeInstancesRequest struct { - // Instances: The URLs of one or more instances to resume. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersResumeInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedList struct { - // InstanceGroupManagers: [Output Only] The list of managed instance groups - // that are contained in - // the specified project and zone. - InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"` - // Warning: [Output Only] The warning that replaces the list of managed - // instance - // groups when the list is empty. - Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroupManagers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroupManagers") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersScopedListWarning: [Output Only] The warning that -// replaces the list of managed instance -// groups when the list is empty. -type InstanceGroupManagersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetAutoHealingRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetInstanceTemplateRequest struct { - // InstanceTemplate: The URL of the instance template that is specified for - // this managed - // instance group. The group uses this template to create all new instances - // in the managed instance group. The templates for existing instances in - // the - // group do not change unless you run recreateInstances, - // runapplyUpdatesToInstances, or set the group'supdatePolicy.type to - // PROACTIVE. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetInstanceTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: The fingerprint of the target pools information. Use this - // optional - // property to prevent conflicts when multiple users change the target - // pools - // settings concurrently. Obtain the fingerprint with - // theinstanceGroupManagers.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another - // concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - // TargetPools: The list of target pool URLs that instances in this managed - // instance group - // belong to. The managed instance group applies these target pools to all - // of the instances in the group. Existing instances and new instances in - // the - // group all receive these target pool settings. - TargetPools []string `json:"targetPools,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSetTargetPoolsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersStartInstancesRequest struct { - // Instances: The URLs of one or more instances to start. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersStartInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersStopInstancesRequest struct { - // ForceStop: If this flag is set to true, the Instance Group Manager will - // proceed to - // stop the instances, skipping initialization on them. - ForceStop bool `json:"forceStop,omitempty"` - // Instances: The URLs of one or more instances to stop. This can be a full URL - // or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceStop") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceStop") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersStopInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupManagersSuspendInstancesRequest struct { - // ForceSuspend: If this flag is set to true, the Instance Group Manager will - // proceed to - // suspend the instances, skipping initialization on them. - ForceSuspend bool `json:"forceSuspend,omitempty"` - // Instances: The URLs of one or more instances to suspend. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceSuspend") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceSuspend") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersSuspendInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupManagersUpdatePerInstanceConfigsReq: -// InstanceGroupManagers.updatePerInstanceConfigs -type InstanceGroupManagersUpdatePerInstanceConfigsReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupManagersUpdatePerInstanceConfigsReq) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupManagersUpdatePerInstanceConfigsReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsAddInstancesRequest struct { - // Instances: The list of instances to add to the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsAddInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceGroupsListInstances for the list of instances - // in the specified instance group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupsListInstancesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstances - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsListInstancesWarning: [Output Only] Informational warning -// message. -type InstanceGroupsListInstancesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupsListInstancesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsListInstancesRequest struct { - // InstanceState: A filter for the state of the instances in the instance - // group. Valid - // options are ALL or RUNNING. If you do not specify - // this parameter the list includes all instances regardless of their state. - // - // Possible values: - // "ALL" - Includes all instances in the generated list regardless of their - // state. - // "RUNNING" - Includes instances in the generated list only if they have a - // RUNNING - // state. - InstanceState string `json:"instanceState,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsListInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsRemoveInstancesRequest struct { - // Instances: The list of instances to remove from the instance group. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsRemoveInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedList struct { - // InstanceGroups: [Output Only] The list ofinstance - // groups that are contained in this scope. - InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list - // of - // instance groups when the list is empty. - Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroups") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceGroupsScopedListWarning: [Output Only] An informational warning that -// replaces the list of -// instance groups when the list is empty. -type InstanceGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. - // Use this optional property to prevent conflicts when multiple users - // change - // the named ports settings concurrently. Obtain the fingerprint with - // theinstanceGroups.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another concurrent - // request. - // A request with an incorrect fingerprint will fail with error412 - // conditionNotMet. - Fingerprint string `json:"fingerprint,omitempty"` - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupsSetNamedPortsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceList: Contains a list of instances. -type InstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Instance resources. - Items []*Instance `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#instanceList - // for lists of Instance resources. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListWarning: [Output Only] Informational warning message. -type InstanceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrers: Contains a list of instance referrers. -type InstanceListReferrers struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Reference resources. - Items []*Reference `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#instanceListReferrers - // for lists of Instance referrers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceListReferrersWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrers) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceListReferrersWarning: [Output Only] Informational warning message. -type InstanceListReferrersWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceListReferrersWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrersWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrersWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceListReferrersWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceListReferrersWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceListReferrersWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmError struct { - // Error: [Output Only] Contents of the error. - Error *InstanceManagedByIgmErrorManagedInstanceError `json:"error,omitempty"` - // InstanceActionDetails: [Output Only] Details of the instance action that - // triggered this error. - // May be null, if the error was not caused by an action on an instance. - // This field is optional. - InstanceActionDetails *InstanceManagedByIgmErrorInstanceActionDetails `json:"instanceActionDetails,omitempty"` - // Timestamp: [Output Only] The time that this error occurred. - // This value is in RFC3339 text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmErrorInstanceActionDetails struct { - // Action: [Output Only] Action that managed instance group was executing - // on - // the instance when the error occurred. Possible values: - // - // Possible values: - // "ABANDONING" - The managed instance group is abandoning this instance. The - // instance - // will be removed from the instance group and from any target pools that - // are associated with this group. - // "CREATING" - The managed instance group is creating this instance. If the - // group - // fails to create this instance, it will try again until it is - // successful. - // "CREATING_WITHOUT_RETRIES" - The managed instance group is attempting to - // create this instance - // only once. If the group fails to create this instance, it does - // not try again and the group's targetSize value is - // decreased. - // "DELETING" - The managed instance group is permanently deleting this - // instance. - // "NONE" - The managed instance group has not scheduled any actions for - // this - // instance. - // "RECREATING" - The managed instance group is recreating this instance. - // "REFRESHING" - The managed instance group is applying configuration - // changes to the - // instance without stopping it. For example, the group can update the - // target pool list for an instance without stopping that instance. - // "RESTARTING" - The managed instance group is restarting this instance. - // "RESUMING" - The managed instance group is resuming this instance. - // "STARTING" - The managed instance group is starting this instance. - // "STOPPING" - The managed instance group is stopping this instance. - // "SUSPENDING" - The managed instance group is suspending this instance. - // "VERIFYING" - The managed instance group is verifying this already created - // instance. - // Verification happens every time the instance is (re)created or restarted - // and consists of: - // 1. Waiting until health check specified as part of this managed instance - // group's autohealing policy reports HEALTHY. - // Note: Applies only if autohealing policy has a health check specified - // 2. Waiting for addition verification steps performed as post-instance - // creation (subject to future extensions). - Action string `json:"action,omitempty"` - // Instance: [Output Only] The URL of the instance. - // The URL can be set even if the instance has not yet been created. - Instance string `json:"instance,omitempty"` - // Version: [Output Only] Version this instance was created from, or was - // being - // created from, but the creation failed. Corresponds to one of the - // versions - // that were set on the Instance Group Manager resource at the time - // this - // instance was being created. - Version *ManagedInstanceVersion `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmErrorInstanceActionDetails) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmErrorInstanceActionDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceManagedByIgmErrorManagedInstanceError struct { - // Code: [Output Only] Error code. - Code string `json:"code,omitempty"` - // Message: [Output Only] Error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceManagedByIgmErrorManagedInstanceError) MarshalJSON() ([]byte, error) { - type NoMethod InstanceManagedByIgmErrorManagedInstanceError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the instance. This - // can be a full or - // partial URL. For example, the following are all valid URLs to a zone: - // - // - https://www.googleapis.com/compute/v1/projects/project/zones/zone - // - projects/project/zones/zone - // - zones/zone - DestinationZone string `json:"destinationZone,omitempty"` - // TargetInstance: The URL of the target instance to move. This can be a full - // or partial URL. - // For example, the following are all valid URLs to an instance: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - TargetInstance string `json:"targetInstance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestinationZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestinationZone") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstanceMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceParams: Additional instance params. -type InstanceParams struct { - // RequestValidForDuration: Relative deadline for waiting for capacity. - // Relevant only for - // Instances.Insert API. - RequestValidForDuration *Duration `json:"requestValidForDuration,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the instance. Tag - // keys and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestValidForDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestValidForDuration") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceParams) MarshalJSON() ([]byte, error) { - type NoMethod InstanceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceProperties struct { - // AdvancedMachineFeatures: Controls for advanced machine-related behavior - // features. - // Note that for MachineImage, this is not supported yet. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // CanIpForward: Enables instances created based on these properties to send - // packets with - // source IP addresses other than their own and receive packets - // with - // destination IP addresses other than their own. If these instances will - // be - // used as an IP gateway or it will be set as the next-hop in a Route - // resource, specify true. If unsure, leave this set tofalse. See theEnable IP - // forwarding - // documentation for more information. - CanIpForward bool `json:"canIpForward,omitempty"` - // ConfidentialInstanceConfig: Specifies the Confidential Instance - // options. - // Note that for MachineImage, this is not supported yet. - ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // Description: An optional text description for the instances that are created - // from these - // properties. - Description string `json:"description,omitempty"` - // Disks: An array of disks that are associated with the instances that are - // created - // from these properties. - Disks []*AttachedDisk `json:"disks,omitempty"` - // DisplayDevice: Display Device properties to enable support - // for remote display products like: Teradici, - // VNC and TeamViewer - // Note that for MachineImage, this is not supported yet. - DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - // GuestAccelerators: A list of guest accelerator cards' type and count to use - // for instances - // created from these properties. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Labels: Labels to apply to instances that are created from these properties. - Labels map[string]string `json:"labels,omitempty"` - // MachineType: The machine type to use for instances that are created from - // these - // properties. - // This field only accepts a machine type name, for example `n2-standard-4`. - // If you use the machine type full or partial URL, for - // example - // `projects/my-l7ilb-project/zones/us-central1-a/machineTypes/n2-standard-4`, - // the request will result in an `INTERNAL_ERROR`. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs to assign to instances that are - // created from - // these properties. These pairs can consist of custom metadata or - // predefined - // keys. SeeProject and - // instance metadata for more information. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by instances. The instance - // may be - // scheduled on the specified or newer cpu/platform. Applicable values are - // the - // friendly names of CPU platforms, such asminCpuPlatform: "Intel Haswell" - // orminCpuPlatform: "Intel Sandy Bridge". For more - // information, read Specifying a - // Minimum CPU Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // NetworkPerformanceConfig: Note that for MachineImage, this is not supported - // yet. - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance properties. A map - // from a - // subdomain (namespace) to entries map. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for VMs. - // If not specified, use INHERIT_FROM_SUBNETWORK as default. - // Note that for MachineImage, this is not supported yet. - // - // Possible values: - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. If - // specified, the subnetwork who is attached to the instance's default - // network - // interface will be assigned an internal IPv6 prefix if it doesn't - // have - // before. - // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits - // PrivateIpv6GoogleAccess from its - // subnetwork. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // ReservationAffinity: Specifies the reservations that instances can consume - // from. - // Note that for MachineImage, this is not supported yet. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` - // ResourceManagerTags: Resource manager tags to be bound to the instance. Tag - // keys and values - // have the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ResourcePolicies: Resource policies (names, not URLs) applied to instances - // created from - // these properties. - // Note that for MachineImage, this is not supported yet. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // Scheduling: Specifies the scheduling options for the instances that are - // created from - // these properties. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // ServiceAccounts: A list of service accounts with specified scopes. Access - // tokens for these - // service accounts are available to the instances that are created from - // these properties. Use metadata queries to obtain the access tokens for - // these instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // ShieldedInstanceConfig: Note that for MachineImage, this is not supported - // yet. - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - // ShieldedVmConfig: Specifies the Shielded VM options for the instances that - // are created from - // these properties. - ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` - // Tags: A list of tags to apply to the instances that are created from - // these - // properties. The tags identify valid sources or targets for - // network - // firewalls. The setTags method can modify this list of tags. Each tag - // within - // the list must comply with RFC1035. - Tags *Tags `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod InstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancePropertiesPatch: Represents the change that you want to make to the -// instance properties. -type InstancePropertiesPatch struct { - // Labels: The label key-value pairs that you want to patch onto the instance. - Labels map[string]string `json:"labels,omitempty"` - // Metadata: The metadata key-value pairs that you want to patch onto the - // instance. For - // more information, see Project and - // instance metadata. - Metadata map[string]string `json:"metadata,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancePropertiesPatch) MarshalJSON() ([]byte, error) { - type NoMethod InstancePropertiesPatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceReference struct { - // Instance: The URL for a specific instance. - // @required compute.instancegroups.addInstances/removeInstances - Instance string `json:"instance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceReference) MarshalJSON() ([]byte, error) { - type NoMethod InstanceReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceSettings: Represents a Instance Settings resource. You can use -// instance settings to -// configure default settings for Compute Engine VM instances. For example, -// you -// can use it to configure default machine type of Compute Engine VM instances. -type InstanceSettings struct { - // Fingerprint: Specifies a fingerprint for instance settings, which is - // essentially a hash - // of the instance settings resource's contents and used for - // optimistic - // locking. The fingerprint is initially generated by Compute Engine - // and - // changes after every request to modify or update the instance - // settings - // resource. You must always provide an up-to-date fingerprint hash in order - // to update or change the resource, otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve the resource. - Fingerprint string `json:"fingerprint,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#instance_settings - // for instance settings. - Kind string `json:"kind,omitempty"` - // Metadata: The metadata key/value pairs assigned to all the instances in - // the - // corresponding scope. - Metadata *InstanceSettingsMetadata `json:"metadata,omitempty"` - // Zone: [Output Only] URL of the zone where the resource resides - // You must specify this field as part of the HTTP request URL. It is - // not - // settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceSettings) MarshalJSON() ([]byte, error) { - type NoMethod InstanceSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceSettingsMetadata struct { - // Items: A metadata key/value items map. - // The total size of all keys and values must be less than 512KB. - Items map[string]string `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#metadata - // for metadata. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceSettingsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InstanceSettingsMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplate: Represents an Instance Template resource. -// -// Google Compute Engine has two Instance Template resources: -// -// * Global (/compute/docs/reference/rest/beta/instanceTemplates) -// * Regional (/compute/docs/reference/rest/beta/regionInstanceTemplates) -// -// You can reuse a global instance template in -// different regions whereas you can use a regional instance template in -// a -// specified region only. If you want to reduce cross-region dependency -// or -// achieve data residency, use a regional instance template. -// -// To create VMs, managed instance groups, and reservations, you can use -// either -// global or regional instance templates. -// -// For more information, readInstance Templates. -type InstanceTemplate struct { - // CreationTimestamp: [Output Only] The creation timestamp for this instance - // template inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] A unique identifier for this instance template. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceTemplate for instance templates. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Properties: The instance properties for this instance template. - Properties *InstanceProperties `json:"properties,omitempty"` - // Region: [Output Only] URL of the region where the instance template resides. - // Only - // applicable for regional resources. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] The URL for this instance template. The server - // defines this - // URL. - SelfLink string `json:"selfLink,omitempty"` - // SourceInstance: The source instance used to create the template. You can - // provide this as a - // partial or full URL to the resource. For example, the following are - // valid - // values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - // SourceInstanceParams: The source instance params to use to create this - // instance template. - SourceInstanceParams *SourceInstanceParams `json:"sourceInstanceParams,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplate) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateAggregatedList: Contains a list of -// InstanceTemplatesScopedList. -type InstanceTemplateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceTemplatesScopedList resources. - Items map[string]InstanceTemplatesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceTemplateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateAggregatedListWarning: [Output Only] Informational warning -// message. -type InstanceTemplateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateList: A list of instance templates. -type InstanceTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceTemplate resources. - Items []*InstanceTemplate `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#instanceTemplatesListResponse for instance template - // lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceTemplateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplateListWarning: [Output Only] Informational warning message. -type InstanceTemplateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplatesScopedList struct { - // InstanceTemplates: [Output Only] A list of instance templates that are - // contained within - // the specified project and zone. - InstanceTemplates []*InstanceTemplate `json:"instanceTemplates,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list of - // instance - // templates when the list is empty. - Warning *InstanceTemplatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstanceTemplatesScopedListWarning: [Output Only] An informational warning -// that replaces the list of instance -// templates when the list is empty. -type InstanceTemplatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstanceTemplatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceTemplatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceTemplatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstanceWithNamedPorts struct { - // Instance: [Output Only] The URL of the instance. - Instance string `json:"instance,omitempty"` - // NamedPorts: [Output Only] The named ports that belong to this instance - // group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // Status: [Output Only] The status of the instance. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instance") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstanceWithNamedPorts) MarshalJSON() ([]byte, error) { - type NoMethod InstanceWithNamedPorts - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesAddResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be added to this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesBulkInsertOperationMetadata struct { - // PerLocationStatus: Status information per location (location name is - // key). - // Example key: zones/us-central1-a - PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerLocationStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerLocationStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InstancesBulkInsertOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output Only] Effective firewalls from firewall policies. - FirewallPolicys []*InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the instance. - Firewalls []*Firewall `json:"firewalls,omitempty"` - // OrganizationFirewalls: Effective firewalls from organization policies. - OrganizationFirewalls []*InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to - // the instance. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output Only] The rules that apply to the instance. Only rules - // that - // target the specific VM instance are returned if target service accounts - // or target secure tags are specified in the rules. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy. - ShortName string `json:"shortName,omitempty"` - // Type: [Output Only] The type of the firewall policy. Can be one of - // HIERARCHY, - // NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "NETWORK_REGIONAL" - // "SYSTEM_GLOBAL" - // "SYSTEM_REGIONAL" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A pruned -// SecurityPolicy containing ID and any applicable firewall rules. -type InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { - // Id: The unique identifier for the security policy. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Rules: The rules that apply to the network. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod InstancesGetEffectiveFirewallsResponseOrganizationFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesReportHostAsFaultyRequest struct { - // DisruptionSchedule: The disruption schedule for the VM. Required field, only - // allows IMMEDIATE. - // - // Possible values: - // "DISRUPTION_SCHEDULE_UNSPECIFIED" - Not used. Required as per aip/126. - // "FUTURE" - Delay disruption for caller control. Will be default soon. - // "IMMEDIATE" - Default value. Disrupt the VM immediately. - DisruptionSchedule string `json:"disruptionSchedule,omitempty"` - FaultReasons []*InstancesReportHostAsFaultyRequestFaultReason `json:"faultReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisruptionSchedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisruptionSchedule") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesReportHostAsFaultyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesReportHostAsFaultyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesReportHostAsFaultyRequestFaultReason struct { - // Possible values: - // "BEHAVIOR_UNSPECIFIED" - Public reportable behaviors - // "PERFORMANCE" - // "SILENT_DATA_CORRUPTION" - // "UNRECOVERABLE_GPU_ERROR" - Behavior string `json:"behavior,omitempty"` - Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "Behavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Behavior") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesReportHostAsFaultyRequestFaultReason) MarshalJSON() ([]byte, error) { - type NoMethod InstancesReportHostAsFaultyRequestFaultReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesResumeRequest struct { - // Disks: Array of disks associated with this instance that are protected with - // acustomer-supplied - // encryption key. - // - // In order to resume the instance, the disk url and its corresponding key - // must be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it - // should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - // InstanceEncryptionKey: Decrypts data associated with an instance that is - // protected with acustomer-supplied - // encryption key. - // - // If the instance you are starting is protected with a - // customer-supplied - // encryption key, the correct key must be provided otherwise the - // instance resume will not succeed. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesResumeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesResumeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesScopedList struct { - // Instances: [Output Only] A list of instances contained in this scope. - Instances []*Instance `json:"instances,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // instances - // when the list is empty. - Warning *InstancesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstancesScopedListWarning: [Output Only] Informational warning which -// replaces the list of instances -// when the list is empty. -type InstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstancesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstancesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetLabelsRequest struct { - // LabelFingerprint: Fingerprint of the previous set of labels for this - // resource, - // used to prevent conflicts. Provide the latest fingerprint value when - // making - // a request to add or change labels. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineResourcesRequest struct { - // GuestAccelerators: A list of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAccelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAccelerators") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMachineResourcesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMachineTypeRequest struct { - // MachineType: Full or partial URL of the machine type resource. See Machine - // Types for a full list of - // machine types. For example:zones/us-central1-f/machineTypes/n1-standard-1 - MachineType string `json:"machineType,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMachineTypeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetMinCpuPlatformRequest struct { - // MinCpuPlatform: Minimum cpu/platform this instance should be started at. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinCpuPlatform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinCpuPlatform") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetMinCpuPlatformRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetNameRequest struct { - // CurrentName: The current name of this resource, used to prevent conflicts. - // Provide the - // latest name when making a request to change name. - CurrentName string `json:"currentName,omitempty"` - // Name: The name to be applied to the instance. Needs to be RFC 1035 - // compliant. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetNameRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetNameRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetSecurityPolicyRequest struct { - // NetworkInterfaces: The network interfaces that the security policy will be - // applied to. Network - // interfaces use the nicN naming format. You can only set a - // security policy for network interfaces with an access config. - NetworkInterfaces []string `json:"networkInterfaces,omitempty"` - // SecurityPolicy: A full or partial URL to a security policy to add to this - // instance. - // If this field is set to an empty string it will remove the - // associated - // security policy. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkInterfaces") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkInterfaces") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetSecurityPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetSecurityPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesSetServiceAccountRequest struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // Scopes: The list of scopes to be made available for this service account. - Scopes []string `json:"scopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesSetServiceAccountRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstancesStartWithEncryptionKeyRequest struct { - // Disks: Array of disks associated with this instance that are protected with - // acustomer-supplied - // encryption key. - // - // In order to start the instance, the disk url and its corresponding key - // must - // be provided. - // - // If the disk is not protected with a customer-supplied encryption key - // it - // should not be specified. - Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod InstancesStartWithEncryptionKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshot: Represents a InstantSnapshot resource. -// -// You can use instant snapshots to create disk rollback points quickly.. -type InstantSnapshot struct { - // Architecture: [Output Only] The architecture of the instant snapshot. Valid - // values are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#instantSnapshot for - // InstantSnapshot resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // InstantSnapshot, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a InstantSnapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this InstantSnapshot. These can be later modified - // by - // the setLabels method. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the instant snapshot - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // ResourceStatus: [Output Only] Status information for the instant snapshot - // resource. - ResourceStatus *InstantSnapshotResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceDisk: URL of the source disk used to create this instant - // snapshot. - // Note that the source disk must be in the same zone/region as the - // instant snapshot to be created. This can be a full or valid partial URL. - // For example, the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskId: [Output Only] The ID value of the disk used to create this - // InstantSnapshot. - // This value may be used to determine whether the InstantSnapshot - // was taken from the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // Status: [Output Only] The status of the instantSnapshot. This can - // beCREATING, DELETING, FAILED, orREADY. - // - // Possible values: - // "CREATING" - InstantSnapshot creation is in progress. - // "DELETING" - InstantSnapshot is currently being deleted. - // "FAILED" - InstantSnapshot creation failed. - // "READY" - InstantSnapshot has been created successfully. - // "UNAVAILABLE" - InstantSnapshot is currently unavailable and cannot be - // used for - // Disk restoration - Status string `json:"status,omitempty"` - // Zone: [Output Only] URL of the zone where the instant snapshot resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshot) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstantSnapshotsScopedList resources. - Items map[string]InstantSnapshotsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#instantSnapshotAggregatedList for aggregated lists - // of - // instantSnapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstantSnapshotAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotAggregatedListWarning: [Output Only] Informational warning -// message. -type InstantSnapshotAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotList: Contains a list of InstantSnapshot resources. -type InstantSnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstantSnapshot resources. - Items []*InstantSnapshot `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstantSnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotListWarning: [Output Only] Informational warning message. -type InstantSnapshotListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotResourceStatus struct { - // StorageSizeBytes: [Output Only] The storage size of this instant snapshot. - StorageSizeBytes int64 `json:"storageSizeBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "StorageSizeBytes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StorageSizeBytes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotsScopedList struct { - // InstantSnapshots: [Output Only] A list of instantSnapshots contained in this - // scope. - InstantSnapshots []*InstantSnapshot `json:"instantSnapshots,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of - // instantSnapshots when the list is empty. - Warning *InstantSnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstantSnapshots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstantSnapshots") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InstantSnapshotsScopedListWarning: [Output Only] Informational warning which -// replaces the list of -// instantSnapshots when the list is empty. -type InstantSnapshotsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InstantSnapshotsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InstantSnapshotsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InstantSnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstantSnapshotsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Int64RangeMatch: HttpRouteRuleMatch criteria for field values that must -// stay -// within the specified integer range. -type Int64RangeMatch struct { - // RangeEnd: The end of the range (exclusive) in signed long integer format. - RangeEnd int64 `json:"rangeEnd,omitempty,string"` - // RangeStart: The start of the range (inclusive) in signed long integer - // format. - RangeStart int64 `json:"rangeStart,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RangeEnd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Int64RangeMatch) MarshalJSON() ([]byte, error) { - type NoMethod Int64RangeMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Interconnect: Represents an Interconnect resource. -// -// An Interconnect resource is a dedicated connection between the Google -// Cloud network and your on-premises network. For more information, read -// the -// Dedicated Interconnect Overview. -type Interconnect struct { - // AaiEnabled: Enable or disable the application awareness feature on this - // Cloud - // Interconnect. - AaiEnabled bool `json:"aaiEnabled,omitempty"` - // AdminEnabled: Administrative status of the interconnect. When this is set to - // true, the - // Interconnect is functional and can carry traffic. - // When set to false, no packets can be carried over the interconnect and - // no BGP routes are exchanged over it. By default, the status is set to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // ApplicationAwareInterconnect: Configuration information for application - // awareness on this Cloud - // Interconnect. - ApplicationAwareInterconnect *InterconnectApplicationAwareInterconnect `json:"applicationAwareInterconnect,omitempty"` - // AvailableFeatures: [Output only] List of features available for this - // Interconnect connection, - // which can take one of the following values: - // - // - IF_MACSEC: If present, then the Interconnect connection is - // provisioned on MACsec capable hardware ports. If not present, then the - // Interconnect connection is provisioned on non-MACsec capable ports. Any - // attempt to enable MACsec will fail. - // - IF_CROSS_SITE_NETWORK: If present, then the Interconnect connection is - // provisioned exclusively for Cross-Site Networking. Any attempt to - // configure - // VLAN attachments will fail. If not present, then the Interconnect - // connection is not provisioned for Cross-Site Networking. Any attempt to - // use - // it for Cross-Site Networking will fail. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - AvailableFeatures []string `json:"availableFeatures,omitempty"` - // CircuitInfos: [Output Only] A list of CircuitInfo objects, that describe the - // individual - // circuits in this LAG. - CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomerName: Customer name, to put in the Letter of Authorization as the - // party - // authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExpectedOutages: [Output Only] A list of outages expected for this - // Interconnect. - ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"` - // GoogleIpAddress: [Output Only] IP address configured on the Google side of - // the Interconnect - // link. This can be used only for ping tests. - GoogleIpAddress string `json:"googleIpAddress,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID to be used when raising - // support tickets - // with Google or otherwise to debug backend connectivity issues. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InterconnectAttachments: [Output Only] A list of the URLs of all - // InterconnectAttachments configured - // to use this Interconnect. - InterconnectAttachments []string `json:"interconnectAttachments,omitempty"` - // InterconnectGroups: [Output Only] URLs of InterconnectGroups that include - // this Interconnect. - // Order is arbitrary and items are unique. - InterconnectGroups []string `json:"interconnectGroups,omitempty"` - // InterconnectType: Type of interconnect, which can take one of the following - // values: - // - // - PARTNER: A partner-managed interconnection shared between customers - // though a partner. - // - DEDICATED: A dedicated physical interconnection with the - // customer. - // - // - // Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED. - // - // Possible values: - // "DEDICATED" - A dedicated physical interconnection with the customer. - // "IT_PRIVATE" - [Deprecated] A private, physical interconnection with the - // customer. - // "PARTNER" - A partner-managed interconnection shared between customers via - // partner. - InterconnectType string `json:"interconnectType,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#interconnect for - // interconnects. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // Interconnect, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an Interconnect. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LinkType: Type of link requested, which can take one of the following - // values: - // - // - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - // - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - // - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 optics. - // - // - // Note that this field indicates the speed of each of - // the links in the bundle, not the speed of the entire bundle. - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - LinkType string `json:"linkType,omitempty"` - // Location: URL of the InterconnectLocation object that represents where - // this - // connection is to be provisioned. - Location string `json:"location,omitempty"` - // Macsec: Configuration that enables Media Access Control security (MACsec) on - // the - // Cloud Interconnect connection between Google and your on-premises router. - Macsec *InterconnectMacsec `json:"macsec,omitempty"` - // MacsecEnabled: Enable or disable MACsec on this Interconnect connection. - // MACsec enablement - // fails if the MACsec object is not specified. - MacsecEnabled bool `json:"macsecEnabled,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NocContactEmail: Email address to contact the customer NOC for operations - // and maintenance - // notifications regarding this Interconnect. If specified, this will be - // used - // for notifications in addition to all other forms described, such as - // Cloud Monitoring logs alerting and Cloud Notifications. This field - // is - // required for users who sign up for Cloud Interconnect using - // workforce identity federation. - NocContactEmail string `json:"nocContactEmail,omitempty"` - // OperationalStatus: [Output Only] The current status of this Interconnect's - // functionality, - // which can take one of the following values: - // - // - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to - // use. Attachments may be provisioned on this Interconnect. - // - // - OS_UNPROVISIONED: An Interconnect that has not completed turnup. - // No - // attachments may be provisioned on this Interconnect. - // - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing - // internal - // maintenance. No attachments may be provisioned or updated on - // this - // Interconnect. - // - // Possible values: - // "OS_ACTIVE" - The interconnect is valid, turned up, and ready to use. - // Attachments may - // be provisioned on this interconnect. - // "OS_UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be - // provisioned on this interconnect. - OperationalStatus string `json:"operationalStatus,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InterconnectParams `json:"params,omitempty"` - // PeerIpAddress: [Output Only] IP address configured on the customer side of - // the - // Interconnect link. The customer should configure this IP address - // during - // turnup when prompted by Google NOC. This can be used only for ping tests. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // ProvisionedLinkCount: [Output Only] Number of links actually provisioned in - // this interconnect. - ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"` - // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. This - // field specifies the - // location outside of Google's network that the interconnect is connected to. - RemoteLocation string `json:"remoteLocation,omitempty"` - // RequestedFeatures: Optional. This parameter can be provided only with - // Interconnect INSERT. It - // isn't valid for Interconnect PATCH. List of features requested for - // this - // Interconnect connection, which can take one of the following values: - // - // - IF_MACSEC: If specified, then the connection is created on MACsec - // capable hardware ports. If not specified, non-MACsec capable ports will - // also be considered. - // - IF_CROSS_SITE_NETWORK: If specified, then the connection is created - // exclusively for Cross-Site Networking. The connection can not be used - // for - // Cross-Site Networking unless this feature is specified. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - RequestedFeatures []string `json:"requestedFeatures,omitempty"` - // RequestedLinkCount: Target number of physical links in the link bundle, as - // requested by the - // customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // State: [Output Only] The current state of Interconnect functionality, which - // can - // take one of the following values: - // - // - ACTIVE: The Interconnect is valid, turned up and ready to use. - // Attachments may be provisioned on this Interconnect. - // - UNPROVISIONED: The Interconnect has not completed turnup. No - // attachments may be provisioned on this Interconnect. - // - UNDER_MAINTENANCE: The Interconnect is undergoing internal - // maintenance. - // No attachments may be provisioned or updated on this - // Interconnect. - // - // Possible values: - // "ACTIVE" - The interconnect is valid, turned up, and ready to use. - // Attachments may - // be provisioned on this interconnect. - // "UNPROVISIONED" - The interconnect has not completed turnup. No - // attachments may be - // provisioned on this interconnect. - State string `json:"state,omitempty"` - // Subzone: Specific subzone in the InterconnectLocation that represents - // where - // this connection is to be provisioned. - // - // Possible values: - // "SUBZONE_A" - Subzone A. - // "SUBZONE_B" - Subzone B. - Subzone string `json:"subzone,omitempty"` - // WireGroups: [Output Only] A list of the URLs of all CrossSiteNetwork - // WireGroups - // configured to use this Interconnect. The Interconnect cannot be deleted - // if - // this list is non-empty. - WireGroups []string `json:"wireGroups,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AaiEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AaiEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Interconnect) MarshalJSON() ([]byte, error) { - type NoMethod Interconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnect: Configuration information for -// application awareness on this Cloud -// Interconnect. -type InterconnectApplicationAwareInterconnect struct { - BandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"bandwidthPercentagePolicy,omitempty"` - // ProfileDescription: Description for the application awareness profile on - // this Cloud - // Interconnect. - ProfileDescription string `json:"profileDescription,omitempty"` - // ShapeAveragePercentages: Optional field to specify a list of shape average - // percentages to be - // applied in conjunction with StrictPriorityPolicy - // or - // BandwidthPercentagePolicy. - ShapeAveragePercentages []*InterconnectApplicationAwareInterconnectBandwidthPercentage `json:"shapeAveragePercentages,omitempty"` - StrictPriorityPolicy *InterconnectApplicationAwareInterconnectStrictPriorityPolicy `json:"strictPriorityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthPercentagePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthPercentagePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnectBandwidthPercentage: Specify -// bandwidth percentages [1-100] for various traffic classes -// in -// BandwidthPercentagePolicy. The sum of all percentages must equal 100. -// All traffic classes must have a percentage value specified. -type InterconnectApplicationAwareInterconnectBandwidthPercentage struct { - // Percentage: Bandwidth percentage for a specific traffic class. - Percentage int64 `json:"percentage,omitempty"` - // TrafficClass: TrafficClass whose bandwidth percentage is being specified. - // - // Possible values: - // "TC1" - Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. - // "TC2" - Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx. - // "TC3" - Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx. - // "TC4" - Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx. - // "TC5" - Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx. - // "TC6" - Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx. - TrafficClass string `json:"trafficClass,omitempty"` - // ForceSendFields is a list of field names (e.g. "Percentage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Percentage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnectBandwidthPercentage) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy struct { - // BandwidthPercentages: Specify bandwidth percentages for various traffic - // classes for queuing - // type Bandwidth Percent. - BandwidthPercentages []*InterconnectApplicationAwareInterconnectBandwidthPercentage `json:"bandwidthPercentages,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthPercentages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthPercentages") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectApplicationAwareInterconnectStrictPriorityPolicy: Specify -// configuration for StrictPriorityPolicy. -type InterconnectApplicationAwareInterconnectStrictPriorityPolicy struct { -} - -// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) -// resource. -// -// You can use Interconnect attachments (VLANS) to connect your Virtual -// Private -// Cloud networks to your on-premises networks through an Interconnect. -// For more information, read -// Creating VLAN Attachments. -type InterconnectAttachment struct { - // AdminEnabled: Determines whether this Attachment will carry packets. - // Not present for PARTNER_PROVIDER. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // AttachmentGroup: [Output Only] URL of the AttachmentGroup that includes this - // Attachment. - AttachmentGroup string `json:"attachmentGroup,omitempty"` - // Bandwidth: Provisioned bandwidth capacity for the interconnect attachment. - // For - // attachments of type DEDICATED, the user can set the bandwidth. - // For attachments of type PARTNER, the Google Partner that is operating - // the interconnect must set the bandwidth. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER and - // DEDICATED, - // and can take one of the following values: - // - // - BPS_50M: 50 Mbit/s - // - BPS_100M: 100 Mbit/s - // - BPS_200M: 200 Mbit/s - // - BPS_300M: 300 Mbit/s - // - BPS_400M: 400 Mbit/s - // - BPS_500M: 500 Mbit/s - // - BPS_1G: 1 Gbit/s - // - BPS_2G: 2 Gbit/s - // - BPS_5G: 5 Gbit/s - // - BPS_10G: 10 Gbit/s - // - BPS_20G: 20 Gbit/s - // - BPS_50G: 50 Gbit/s - // - BPS_100G: 100 Gbit/s - // - // Possible values: - // "BPS_100G" - 100 Gbit/s - // "BPS_100M" - 100 Mbit/s - // "BPS_10G" - 10 Gbit/s - // "BPS_1G" - 1 Gbit/s - // "BPS_200M" - 200 Mbit/s - // "BPS_20G" - 20 Gbit/s - // "BPS_2G" - 2 Gbit/s - // "BPS_300M" - 300 Mbit/s - // "BPS_400M" - 400 Mbit/s - // "BPS_500M" - 500 Mbit/s - // "BPS_50G" - 50 Gbit/s - // "BPS_50M" - 50 Mbit/s - // "BPS_5G" - 5 Gbit/s - Bandwidth string `json:"bandwidth,omitempty"` - // CandidateCloudRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address fields must be set or both must be - // unset. - // - Prefix length of both candidate_cloud_router_ip_address and - // candidate_customer_router_ip_address must be the same. - // - Max prefix length is 31. - CandidateCloudRouterIpAddress string `json:"candidateCloudRouterIpAddress,omitempty"` - // CandidateCloudRouterIpv6Address: Single IPv6 address + prefix length to be - // configured on the cloud router - // interface for this interconnect attachment. - // - // - Both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address fields must be set or both must - // be - // unset. - // - Prefix length of both candidate_cloud_router_ipv6_address and - // candidate_customer_router_ipv6_address must be the same. - // - Max prefix length is 126. - CandidateCloudRouterIpv6Address string `json:"candidateCloudRouterIpv6Address,omitempty"` - // CandidateCustomerRouterIpAddress: Single IPv4 address + prefix length to be - // configured on the customer router - // interface for this interconnect attachment. - CandidateCustomerRouterIpAddress string `json:"candidateCustomerRouterIpAddress,omitempty"` - // CandidateCustomerRouterIpv6Address: Single IPv6 address + prefix length to - // be configured on the customer router - // interface for this interconnect attachment. - CandidateCustomerRouterIpv6Address string `json:"candidateCustomerRouterIpv6Address,omitempty"` - // CandidateIpv6Subnets: This field is not available. - CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` - // CandidateSubnets: Input only. Up to 16 candidate prefixes that can be used - // to restrict the allocation - // of cloudRouterIpAddress and customerRouterIpAddress for this attachment. - // All prefixes must be within link-local address space (169.254.0.0/16) - // and - // must be /29 or shorter (/28, /27, etc). Google will attempt to select - // an - // unused /29 from the supplied candidate prefix(es). The request will fail - // if - // all possible /29s are in use on Google's edge. If not supplied, Google - // will - // randomly select an unused /29 from all of link-local space. - CandidateSubnets []string `json:"candidateSubnets,omitempty"` - // CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to be - // configured on Cloud Router - // Interface for this interconnect attachment. - CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"` - // CloudRouterIpv6Address: [Output Only] IPv6 address + prefix length to be - // configured on Cloud - // Router Interface for this interconnect attachment. - CloudRouterIpv6Address string `json:"cloudRouterIpv6Address,omitempty"` - // CloudRouterIpv6InterfaceId: This field is not available. - CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` - // ConfigurationConstraints: [Output Only] Constraints for this attachment, if - // any. The attachment does - // not work if these constraints are not met. - ConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"configurationConstraints,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length to be - // configured on the customer - // router subinterface for this interconnect attachment. - CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"` - // CustomerRouterIpv6Address: [Output Only] IPv6 address + prefix length to be - // configured on the - // customer router subinterface for this interconnect attachment. - CustomerRouterIpv6Address string `json:"customerRouterIpv6Address,omitempty"` - // CustomerRouterIpv6InterfaceId: This field is not available. - CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` - // DataplaneVersion: [Output Only] Dataplane version for this - // InterconnectAttachment. This - // field is only present for Dataplane version 2 and higher. Absence of - // this - // field in the API output indicates that the Dataplane is version 1. - DataplaneVersion int64 `json:"dataplaneVersion,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // EdgeAvailabilityDomain: Input only. Desired availability domain for the - // attachment. Only available for type - // PARTNER, at creation time, and can take one of the following values: - // - // - AVAILABILITY_DOMAIN_ANY - // - AVAILABILITY_DOMAIN_1 - // - AVAILABILITY_DOMAIN_2 - // - // - // For improved reliability, customers should configure a pair of - // attachments, - // one per availability domain. The selected availability domain will - // be - // provided to the Partner via the pairing key, so that the provisioned - // circuit will lie in the specified domain. If not specified, the value - // will - // default to AVAILABILITY_DOMAIN_ANY. - // - // Possible values: - // "AVAILABILITY_DOMAIN_1" - // "AVAILABILITY_DOMAIN_2" - // "AVAILABILITY_DOMAIN_ANY" - EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` - // Encryption: Indicates the user-supplied encryption option of this VLAN - // attachment - // (interconnectAttachment). Can only be specified at attachment creation - // for PARTNER or DEDICATED attachments. - // Possible values are: - // - // - NONE - This is the default value, which means that the - // VLAN attachment carries unencrypted traffic. VMs are able to send - // traffic to, or receive traffic from, such a VLAN attachment. - // - IPSEC - The VLAN attachment carries only encrypted - // traffic that is encrypted by an IPsec device, such as an HA VPN gateway - // or - // third-party IPsec VPN. VMs cannot directly send traffic to, or receive - // traffic from, such a VLAN attachment. To use *HA VPN over Cloud - // Interconnect*, the VLAN attachment must be created with this - // option. - // - // Possible values: - // "IPSEC" - The interconnect attachment will carry only encrypted traffic - // that is - // encrypted by an IPsec device such as HA VPN gateway; - // VMs cannot directly send traffic to or receive traffic from such - // an - // interconnect attachment. To use HA VPN over Cloud Interconnect, - // the interconnect attachment must be created with this option. - // "NONE" - This is the default value, which means the Interconnect - // Attachment will - // carry unencrypted traffic. VMs will be able to send traffic to or - // receive - // traffic from such interconnect attachment. - Encryption string `json:"encryption,omitempty"` - // GoogleReferenceId: [Output Only] Google reference ID, to be used when - // raising support tickets - // with Google or otherwise to debug backend connectivity issues. - // [Deprecated] This field is not used. - GoogleReferenceId string `json:"googleReferenceId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interconnect: URL of the underlying Interconnect object that this - // attachment's traffic - // will traverse through. - Interconnect string `json:"interconnect,omitempty"` - // IpsecInternalAddresses: A list of URLs of addresses that have been reserved - // for the VLAN - // attachment. Used only for the VLAN attachment that has the encryption - // option as IPSEC. The addresses must be regional internal IP address - // ranges. - // When creating an HA VPN gateway over the VLAN attachment, if the - // attachment - // is configured to use a regional internal IP address, then the VPN - // gateway's - // IP address is allocated from the IP address range specified here. - // For - // example, if the HA VPN gateway's interface 0 is paired to this - // VLAN - // attachment, then a regional internal IP address for the VPN - // gateway - // interface 0 will be allocated from the IP address specified for this - // VLAN attachment. - // If this field is not specified when creating the VLAN attachment, then - // later on when creating an HA VPN gateway on this VLAN attachment, the HA - // VPN gateway's IP address is allocated from the regional external IP - // address - // pool. - IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#interconnectAttachment for interconnect attachments. - Kind string `json:"kind,omitempty"` - // L2Forwarding: L2 Interconnect Attachment related config. This field is - // required if the - // type is L2_DEDICATED. - // - // The configuration specifies how VLAN tags (like dot1q, qinq, or - // dot1ad) - // within L2 packets are mapped to the destination appliances IP addresses. - // The packet is then encapsulated with the appliance IP address and sent - // to - // the edge appliance. - L2Forwarding *InterconnectAttachmentL2Forwarding `json:"l2Forwarding,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // InterconnectAttachment, - // which is essentially a hash of the labels set used for optimistic - // locking. - // The fingerprint is initially generated by Compute Engine and changes - // after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an InterconnectAttachment. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing through - // this - // interconnect attachment. - // Valid values are 1440, 1460, 1500, and 8896. If not specified, - // the value will default to 1440. - Mtu int64 `json:"mtu,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // OperationalStatus: [Output Only] The current status of whether or not this - // interconnect - // attachment is functional, which can take one of the following values: - // - // - OS_ACTIVE: The attachment has been turned up and is ready to - // use. - // - OS_UNPROVISIONED: The attachment is not ready to use yet, - // because turnup is not complete. - // - // Possible values: - // "OS_ACTIVE" - Indicates that attachment has been turned up and is ready - // to - // use. - // "OS_UNPROVISIONED" - Indicates that attachment is not ready to use yet, - // because - // turnup is not complete. - OperationalStatus string `json:"operationalStatus,omitempty"` - // PairingKey: [Output only for type PARTNER. Input only for PARTNER_PROVIDER. - // Not - // present for DEDICATED]. - // The opaque identifier of a PARTNER attachment used to initiate - // provisioning with a selected partner. - // Of the form "XXXXX/region/domain" - PairingKey string `json:"pairingKey,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *InterconnectAttachmentParams `json:"params,omitempty"` - // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 Partner if - // they - // configured BGP on behalf of the customer. - // Output only for PARTNER type, input only for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerAsn int64 `json:"partnerAsn,omitempty,string"` - // PartnerMetadata: Informational metadata about Partner attachments from - // Partners to display - // to customers. - // Output only for PARTNER type, mutable for PARTNER_PROVIDER, not - // available for DEDICATED. - PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` - // PrivateInterconnectInfo: [Output Only] Information specific to an - // InterconnectAttachment. - // This property is populated if the interconnect that - // this is attached to is of type DEDICATED. - PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"` - // Region: [Output Only] URL of the region where the regional interconnect - // attachment - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RemoteService: [Output Only] - // If the attachment is on a Cross-Cloud Interconnect connection, this - // field - // contains the interconnect's remote location service provider. - // Example - // values: "Amazon Web Services" "Microsoft Azure". - // - // The field is set only for attachments on Cross-Cloud - // Interconnect - // connections. Its value is copied from the - // InterconnectRemoteLocation - // remoteService field. - RemoteService string `json:"remoteService,omitempty"` - // Router: URL of the Cloud Router to be used for dynamic routing. This router - // must be - // in the same region as this InterconnectAttachment. - // The - // InterconnectAttachment will automatically connect the Interconnect to - // the - // network & region within which the Cloud Router is configured. - Router string `json:"router,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this interconnect attachment to identify - // whether the - // IPv6 feature is enabled or not. If not specified, IPV4_ONLY - // will be used. - // - // This field can be both set at interconnect attachments creation and - // update interconnect attachment operations. - // - // Possible values: - // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - The interconnect attachment will only be assigned IPv4 - // addresses. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] The current state of this attachment's - // functionality. - // Enum values ACTIVE and UNPROVISIONED are shared by - // DEDICATED/PRIVATE, - // PARTNER, and PARTNER_PROVIDER interconnect attachments, while enum - // values - // PENDING_PARTNER, PARTNER_REQUEST_RECEIVED, and PENDING_CUSTOMER are used - // for only PARTNER and PARTNER_PROVIDER interconnect attachments. - // This state can take one of the following values: - // - // - ACTIVE: The attachment has been turned up and is ready to use. - // - UNPROVISIONED: The attachment is not ready to use yet, because turnup - // is not complete. - // - PENDING_PARTNER: A newly-created PARTNER attachment that has not yet - // been configured on the Partner side. - // - PARTNER_REQUEST_RECEIVED: A PARTNER attachment is in the process of - // provisioning after a PARTNER_PROVIDER attachment was created that - // references it. - // - PENDING_CUSTOMER: A PARTNER or PARTNER_PROVIDER - // attachment that is waiting for a customer to activate it. - // - DEFUNCT: - // The attachment was deleted externally and is no longer functional. This - // could be because the associated Interconnect was removed, or because the - // other side of a Partner attachment was deleted. - // - // Possible values: - // "ACTIVE" - Indicates that attachment has been turned up and is ready to - // use. - // "DEFUNCT" - The attachment was deleted externally and is no longer - // functional. - // This could be because the associated Interconnect was wiped out, - // or because the other side of a Partner attachment was deleted. - // "PARTNER_REQUEST_RECEIVED" - A PARTNER attachment is in the process of - // provisioning after a - // PARTNER_PROVIDER attachment was created that references it. - // "PENDING_CUSTOMER" - PARTNER or PARTNER_PROVIDER attachment that is - // waiting for the customer - // to activate. - // "PENDING_PARTNER" - A newly created PARTNER attachment that has not yet - // been configured on - // the Partner side. - // "STATE_UNSPECIFIED" - // "UNPROVISIONED" - Indicates that attachment is not ready to use yet, - // because turnup is not - // complete. - State string `json:"state,omitempty"` - // SubnetLength: Input only. Length of the IPv4 subnet mask. - // Allowed values: - // - // - // - 29 (default) - // - 30 - // - // The default value is 29, except for Cross-Cloud Interconnect - // connections that use an InterconnectRemoteLocation with - // a - // constraints.subnetLengthRange.min equal to 30. For example, - // connections that use an Azure remote location fall into this - // category. In these cases, the default value is 30, and requesting - // 29 returns an error. - // - // Where both 29 and 30 are allowed, 29 is preferred, because it gives - // Google Cloud Support more debugging visibility. - SubnetLength int64 `json:"subnetLength,omitempty"` - // Type: The type of interconnect attachment this is, which can take one of - // the - // following values: - // - // - DEDICATED: an attachment to a Dedicated Interconnect. - // - PARTNER: an attachment to a Partner Interconnect, created by the - // customer. - // - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by - // the partner. - // - // - L2_DEDICATED: a L2 attachment to a Dedicated Interconnect. - // - // Possible values: - // "DEDICATED" - Attachment to a dedicated interconnect. - // "L2_DEDICATED" - Attachment to a dedicated interconnect, forwarding L2 - // packets. - // "PARTNER" - Attachment to a partner interconnect, created by the customer. - // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created by the - // partner. - Type string `json:"type,omitempty"` - // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the range - // 2-4093. - // Only specified at creation time. - VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachment) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachmentsScopedList resources. - Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectAttachmentAggregatedList for aggregated - // lists of interconnect attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentAggregatedListWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentConfigurationConstraints struct { - // BgpMd5: [Output Only] Whether the attachment's BGP - // session - // requires/allows/disallows BGP MD5 authentication. This can take one of - // the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. - // - // For example, a Cross-Cloud Interconnect connection to a remote - // cloud - // provider that requires BGP MD5 authentication has - // the - // interconnectRemoteLocation - // attachment_configuration_constraints.bgp_md5 - // field set to MD5_REQUIRED, and that property is propagated to - // the - // attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is - // returned if MD5 is requested. - // - // Possible values: - // "MD5_OPTIONAL" - MD5_OPTIONAL: BGP MD5 authentication is supported and can - // optionally be - // configured. - // "MD5_REQUIRED" - MD5_REQUIRED: BGP MD5 authentication must be configured. - // "MD5_UNSUPPORTED" - MD5_UNSUPPORTED: BGP MD5 authentication must not be - // configured - BgpMd5 string `json:"bgpMd5,omitempty"` - // BgpPeerAsnRanges: [Output Only] List of ASN ranges that the remote location - // is known to - // support. Formatted as an array of inclusive ranges {min: min-value, - // max: - // max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: - // 65534}] - // allows the peer ASN to be 123 or anything in the range 64512-65534. - // - // This field is only advisory. Although the API accepts other ranges, - // these - // are the ranges that we recommend. - BgpPeerAsnRanges []*InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange `json:"bgpPeerAsnRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "BgpMd5") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BgpMd5") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentConfigurationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentConfigurationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange struct { - Max int64 `json:"max,omitempty"` - Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Max") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Max") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroup: An interconnect attachment group resource -// allows customers to create, -// analyze, and expand highly available deployments. -type InterconnectAttachmentGroup struct { - // Attachments: Attachments in the AttachmentGroup. Keys are arbitrary - // user-specified - // strings. Users are encouraged, but not required, to use their - // preferred - // format for resource links as keys. - // Note that there are add-members and remove-members methods in gcloud. - // The size of this map is limited by an "Attachments per group" quota. - Attachments map[string]InterconnectAttachmentGroupAttachment `json:"attachments,omitempty"` - Configured *InterconnectAttachmentGroupConfigured `json:"configured,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Opaque system-generated token that uniquely identifies the - // configuration. - // If provided when patching a configuration in update mode, the provided - // token must match the current token or the update is rejected. This - // provides - // a reliable means of doing read-modify-write (optimistic locking) - // as - // described byAIP 154. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - Intent *InterconnectAttachmentGroupIntent `json:"intent,omitempty"` - // InterconnectGroup: The URL of an InterconnectGroup that groups these - // Attachments' - // Interconnects. Customers do not need to set this unless directed by - // Google Support. - InterconnectGroup string `json:"interconnectGroup,omitempty"` - // Kind: [Output Only] Type of the resource. - // Always - // compute#interconnectAttachmentGroup. - Kind string `json:"kind,omitempty"` - LogicalStructure *InterconnectAttachmentGroupLogicalStructure `json:"logicalStructure,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroup) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupAttachment: An Attachment in this -// AttachmentGroup. -type InterconnectAttachmentGroupAttachment struct { - Attachment string `json:"attachment,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachment") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachment") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupAttachment) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfigured: [Output Only] The redundancy this -// group is configured to support. The way a -// user queries what SLA their Attachment gets is by looking at this field -// of -// the Attachment's AttachmentGroup. -type InterconnectAttachmentGroupConfigured struct { - AvailabilitySla *InterconnectAttachmentGroupConfiguredAvailabilitySLA `json:"availabilitySla,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilitySla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilitySla") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfigured) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfigured - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfiguredAvailabilitySLA: [Output Only] Which -// SLA this group is configured to support, and why this -// group does or does not meet that SLA's requirements. -type InterconnectAttachmentGroupConfiguredAvailabilitySLA struct { - // Possible values: - // "EFFECTIVE_SLA_UNSPECIFIED" - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - EffectiveSla string `json:"effectiveSla,omitempty"` - IntendedSlaBlockers []*InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers `json:"intendedSlaBlockers,omitempty"` - // ForceSendFields is a list of field names (e.g. "EffectiveSla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EffectiveSla") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfiguredAvailabilitySLA) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfiguredAvailabilitySLA - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers: -// [Output Only] Reasons why configuration.availabilitySLA.sla differs -// from -// intent.availabilitySLA. This list is empty if and only if those are -// the -// same. -type InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers struct { - // Attachments: [Output Only] URLs of any particular Attachments to explain - // this - // blocker in more detail. - Attachments []string `json:"attachments,omitempty"` - // Possible values: - // "BLOCKER_TYPE_UNSPECIFIED" - // "INCOMPATIBLE_METROS" - // "INCOMPATIBLE_REGIONS" - // "MISSING_GLOBAL_ROUTING" - // "NO_ATTACHMENTS" - // "NO_ATTACHMENTS_IN_METRO_AND_ZONE" - // "OTHER" - BlockerType string `json:"blockerType,omitempty"` - // DocumentationLink: [Output Only] The url of Google Cloud public - // documentation explaining - // this requirement. This is set for every type of requirement. - DocumentationLink string `json:"documentationLink,omitempty"` - // Explanation: [Output Only] A human-readable explanation of this requirement - // and - // why it's not met. This is set for every type of requirement. - Explanation string `json:"explanation,omitempty"` - // Metros: [Output Only] Metros used to explain this blocker in more - // detail. - // These are three-letter lowercase strings like "iad". This will be set - // for some blockers (like NO_ATTACHMENTS_IN_METRO_AND_ZONE) but does - // not apply to others. - Metros []string `json:"metros,omitempty"` - // Regions: [Output Only] Regions used to explain this blocker in more - // detail. These are region names formatted like "us-central1". This - // will be set for some blockers (like INCOMPATIBLE_REGIONS) but does - // not apply to others. - Regions []string `json:"regions,omitempty"` - // Zones: [Output Only] Zones used to explain this blocker in more - // detail. - // Format is "zone1" and/or "zone2". This will be set for some blockers - // (like MISSING_ZONE) but does not apply to others. - Zones []string `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupConfiguredAvailabilitySLAIntendedSlaBlockers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupIntent: The user's intent for this -// AttachmentGroup. This is the only required field -// besides the name that must be specified on group creation. -type InterconnectAttachmentGroupIntent struct { - // Possible values: - // "AVAILABILITY_SLA_UNSPECIFIED" - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - AvailabilitySla string `json:"availabilitySla,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilitySla") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilitySla") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupIntent) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupIntent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructure: [Output Only] An analysis of -// the logical layout of Attachments in this -// group. Every Attachment in the group is shown once in this structure. -type InterconnectAttachmentGroupLogicalStructure struct { - Regions []*InterconnectAttachmentGroupLogicalStructureRegion `json:"regions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Regions") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Regions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructure) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegion: [Output Only] The regions -// Attachments in this group are in. -type InterconnectAttachmentGroupLogicalStructureRegion struct { - Metros []*InterconnectAttachmentGroupLogicalStructureRegionMetro `json:"metros,omitempty"` - // Region: [Output Only] The name of a region, like "us-central1". - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metros") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metros") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegion) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetro: [Output Only] The -// metros of Attachments in this group in this region. -type InterconnectAttachmentGroupLogicalStructureRegionMetro struct { - Facilities []*InterconnectAttachmentGroupLogicalStructureRegionMetroFacility `json:"facilities,omitempty"` - // Metro: [Output Only] The name of the metro, as a three-letter - // lowercase - // string like "iad". This is the first component of the location of - // an - // Interconnect. - Metro string `json:"metro,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facilities") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facilities") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetro) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetro - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetroFacility: [Output -// Only] The facilities used for this group's Attachments' -// Interconnects. -type InterconnectAttachmentGroupLogicalStructureRegionMetroFacility struct { - // Facility: [Output Only] The name of a facility, like "iad-1234". - Facility string `json:"facility,omitempty"` - Zones []*InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facility") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facility") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetroFacility) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetroFacility - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone: [Output -// Only] The zones that Attachments in this group are present -// in, in the given facilities. This is inherited from their -// Interconnects. -type InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone struct { - // Attachments: [Output Only] URLs of Attachments in the given zone, to the - // given - // region, on Interconnects in the given facility and metro. Every - // Attachment in the AG has such an entry. - Attachments []string `json:"attachments,omitempty"` - // Zone: [Output Only] The name of a zone, either "zone1" or "zone2". - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attachments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsGetOperationalStatusResponse: Response for the -// InterconnectAttachmentGroupsGetOperationalStatusResponse. -type InterconnectAttachmentGroupsGetOperationalStatusResponse struct { - Etag string `json:"etag,omitempty"` - Result *InterconnectAttachmentGroupsOperationalStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsGetOperationalStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsGetOperationalStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachmentGroup resources. - Items []*InterconnectAttachmentGroup `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable - // resources. - // end_interface: - // MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentGroupsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsListResponseWarning: [Output Only] Informational -// warning message. -type InterconnectAttachmentGroupsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentGroupsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentGroupsOperationalStatus struct { - AttachmentStatuses []*InterconnectAttachmentGroupsOperationalStatusAttachmentStatus `json:"attachmentStatuses,omitempty"` - Configured *InterconnectAttachmentGroupConfigured `json:"configured,omitempty"` - // GroupStatus: Summarizes the status of the group. - // - // Possible values: - // "DEGRADED" - // "FULLY_DOWN" - // "FULLY_UP" - // "UNSPECIFIED" - GroupStatus string `json:"groupStatus,omitempty"` - Intent *InterconnectAttachmentGroupIntent `json:"intent,omitempty"` - // Operational: The operational state of the group, including only active - // Attachments. - Operational *InterconnectAttachmentGroupConfigured `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttachmentStatuses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentStatuses") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsOperationalStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsOperationalStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentGroupsOperationalStatusAttachmentStatus: The status of -// one Attachment in the group. List order is arbitrary. -type InterconnectAttachmentGroupsOperationalStatusAttachmentStatus struct { - // AdminEnabled: Whether this Attachment is enabled. This becomes false when - // the customer - // drains their Attachment. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Attachment: The URL of the Attachment being described. - Attachment string `json:"attachment,omitempty"` - // IsActive: Whether this Attachment is participating in the redundant - // configuration. - // This will be ACTIVE if and only if the status below is CONNECTION_UP. - // Any INACTIVE Attachments are excluded from the analysis that - // generates - // operational.availabilitySLA. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - // "UNSPECIFIED" - IsActive string `json:"isActive,omitempty"` - // Status: Whether this Attachment is active, and if so, whether BGP is up. - // - // Possible values: - // "ATTACHMENT_STATUS_UNKNOWN" - // "CONNECTION_DISABLED" - // "CONNECTION_DOWN" - // "CONNECTION_UP" - // "DEFUNCT" - // "IPSEC_CONFIGURATION_NEEDED_STATUS" - // "IPSEC_READY_TO_RESUME_FLOW_STATUS" - // "IPV4_DOWN_IPV6_UP" - // "IPV4_UP_IPV6_DOWN" - // "PARTNER_REQUEST_RECEIVED" - // "PENDING_CUSTOMER" - // "PENDING_PARTNER" - // "PROVISIONED" - // "ROUTER_CONFIGURATION_BROKEN" - // "UNPROVISIONED" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentGroupsOperationalStatusAttachmentStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentGroupsOperationalStatusAttachmentStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2Forwarding: L2 Interconnect Attachment related -// configuration. -type InterconnectAttachmentL2Forwarding struct { - // ApplianceMappings: Optional. A map of VLAN tags to appliances and optional - // inner mapping - // rules. If VLANs are not explicitly mapped to any appliance, - // the - // defaultApplianceIpAddress is used. - // - // Each VLAN tag can be a single number or a range of numbers in the range - // of 1 to 4094, e.g., "1" or "4001-4094". Non-empty and non-overlapping - // VLAN tag ranges are enforced, and violating operations will be - // rejected. - // - // The VLAN tags in the Ethernet header must use an ethertype value of - // 0x88A8 or 0x8100. - ApplianceMappings map[string]InterconnectAttachmentL2ForwardingApplianceMapping `json:"applianceMappings,omitempty"` - // DefaultApplianceIpAddress: Optional. A single IPv4 or IPv6 address used as - // the default destination - // IP when there is no VLAN mapping result found. - // - // Unset field (null-value) indicates the unmatched packet should be - // dropped. - DefaultApplianceIpAddress string `json:"defaultApplianceIpAddress,omitempty"` - // GeneveHeader: Optional. It represents the structure of a Geneve (Generic - // Network - // Virtualization Encapsulation) header, as defined in RFC8926. It encapsulates - // packets from various - // protocols (e.g., Ethernet, IPv4, IPv6) for use in network - // virtualization - // environments. - GeneveHeader *InterconnectAttachmentL2ForwardingGeneveHeader `json:"geneveHeader,omitempty"` - // Network: Required. Resource URL of the network to which this attachment - // belongs. - Network string `json:"network,omitempty"` - // TunnelEndpointIpAddress: Required. A single IPv4 or IPv6 address. This - // address will be used as the - // source IP address for packets sent to the appliances, and must be used - // as - // the destination IP address for packets that should be sent out through - // this attachment. - TunnelEndpointIpAddress string `json:"tunnelEndpointIpAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplianceMappings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplianceMappings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2Forwarding) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2Forwarding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingApplianceMapping: Two-level -// VLAN-to-Appliance mapping rule. -type InterconnectAttachmentL2ForwardingApplianceMapping struct { - // ApplianceIpAddress: Optional. A single IPv4 or IPv6 address used as the - // destination IP - // address for ingress packets that match on a VLAN tag, but do not match - // a more specific inner VLAN tag. - // - // Unset field (null-value) indicates both VLAN tags are required to be - // mapped. Otherwise, defaultApplianceIpAddress is used. - ApplianceIpAddress string `json:"applianceIpAddress,omitempty"` - // InnerVlanToApplianceMappings: Optional. Used to match against the inner VLAN - // when the packet - // contains two VLAN tags. - // - // A list of mapping rules from inner VLAN tags to IP addresses. If the - // inner VLAN is not explicitly mapped to an IP address range, - // the - // applianceIpAddress is used. - InnerVlanToApplianceMappings []*InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping `json:"innerVlanToApplianceMappings,omitempty"` - // Name: Optional. The name of this appliance mapping rule. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplianceIpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplianceIpAddress") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingApplianceMapping) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingApplianceMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping -// : The inner VLAN-to-Appliance mapping. -type InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping struct { - // InnerApplianceIpAddress: Required in this object. A single IPv4 or IPv6 - // address used as the - // destination IP address for ingress packets that match on both VLAN - // tags. - InnerApplianceIpAddress string `json:"innerApplianceIpAddress,omitempty"` - // InnerVlanTags: Required in this object. Used to match the inner VLAN tag on - // the - // packet. Each entry can be a single number or a range of numbers in - // the range of 1 to 4094, e.g., ["1", "4001-4094"] is valid. Non-empty - // and Non-overlapping VLAN tag ranges are enforced, and violating - // operations will be rejected. - // - // The inner VLAN tags must have an ethertype value of 0x8100. - InnerVlanTags []string `json:"innerVlanTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "InnerApplianceIpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InnerApplianceIpAddress") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingApplianceMappingInnerVlanToApplianceMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentL2ForwardingGeneveHeader: GeneveHeader related -// configurations. -type InterconnectAttachmentL2ForwardingGeneveHeader struct { - // Vni: Optional. VNI is a 24-bit unique virtual network identifier, from 0 - // to - // 16,777,215. - Vni int64 `json:"vni,omitempty"` - // ForceSendFields is a list of field names (e.g. "Vni") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Vni") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentL2ForwardingGeneveHeader) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentL2ForwardingGeneveHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentList: Response to the list request, and contains a -// list of interconnect -// attachments. -type InterconnectAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectAttachment resources. - Items []*InterconnectAttachment `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectAttachmentList for lists of - // interconnect - // attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentListWarning: [Output Only] Informational warning -// message. -type InterconnectAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentParams: Additional interconnect attachment parameters. -type InterconnectAttachmentParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentParams) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentPartnerMetadata: Informational metadata about Partner -// attachments from Partners to display -// to customers. These fields are propagated from PARTNER_PROVIDER -// attachments to their corresponding PARTNER attachments. -type InterconnectAttachmentPartnerMetadata struct { - // InterconnectName: Plain text name of the Interconnect this attachment is - // connected to, as - // displayed in the Partner's portal. For instance "Chicago 1". - // This value may be validated to match approved Partner values. - InterconnectName string `json:"interconnectName,omitempty"` - // PartnerName: Plain text name of the Partner providing this attachment. - // This value may be validated to match approved Partner values. - PartnerName string `json:"partnerName,omitempty"` - // PortalUrl: URL of the Partner's portal for this Attachment. Partners may - // customise - // this to be a deep link to the specific resource on the Partner portal. - // This value may be validated to match approved Partner values. - PortalUrl string `json:"portalUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentPartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPartnerMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentPrivateInfo: Information for an interconnect -// attachment when this belongs to an -// interconnect of type DEDICATED. -type InterconnectAttachmentPrivateInfo struct { - // Tag8021q: [Output Only] 802.1q encapsulation tag to be used for traffic - // between - // Google and the customer, going to and from this network and region. - Tag8021q int64 `json:"tag8021q,omitempty"` - // ForceSendFields is a list of field names (e.g. "Tag8021q") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tag8021q") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentPrivateInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedList struct { - // InterconnectAttachments: A list of interconnect attachments contained in - // this scope. - InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectAttachments") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectAttachmentsScopedListWarning: Informational warning which -// replaces the list of addresses when -// the list is empty. -type InterconnectAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectCircuitInfo: Describes a single physical circuit between the -// Customer and Google. -// CircuitInfo objects are created by Google, so all fields are output only. -type InterconnectCircuitInfo struct { - // CustomerDemarcId: Customer-side demarc ID for this circuit. - CustomerDemarcId string `json:"customerDemarcId,omitempty"` - // GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned at - // circuit turn-up. - GoogleCircuitId string `json:"googleCircuitId,omitempty"` - // GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at circuit - // turn-up and - // provided by Google to the customer in the LOA. - GoogleDemarcId string `json:"googleDemarcId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerDemarcId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomerDemarcId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectCircuitInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectCircuitInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnostics: Diagnostics information about the Interconnect -// connection, which contains -// detailed and current technical information about Google's side of -// the -// connection. -type InterconnectDiagnostics struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing individual neighbors currently seen by the Google router in - // the ARP cache for the Interconnect. - // This will be empty when the Interconnect is not bundled. - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - // BundleAggregationType: The aggregation type of the bundle interface. - // - // Possible values: - // "BUNDLE_AGGREGATION_TYPE_LACP" - LACP is enabled. - // "BUNDLE_AGGREGATION_TYPE_STATIC" - LACP is disabled. - BundleAggregationType string `json:"bundleAggregationType,omitempty"` - // BundleOperationalStatus: The operational status of the bundle interface. - // - // Possible values: - // "BUNDLE_OPERATIONAL_STATUS_DOWN" - If bundleAggregationType is LACP: LACP - // is not established and/or all - // links in the bundle have DOWN operational status. If - // bundleAggregationType is STATIC: one or more links in the bundle has - // DOWN operational status. - // "BUNDLE_OPERATIONAL_STATUS_UP" - If bundleAggregationType is LACP: LACP is - // established and at least one - // link in the bundle has UP operational status. If bundleAggregationType - // is STATIC: all links in the bundle (typically just one) have UP - // operational status. - BundleOperationalStatus string `json:"bundleOperationalStatus,omitempty"` - // Links: A list of InterconnectDiagnostics.LinkStatus objects, - // describing the status for each link on the Interconnect. - Links []*InterconnectDiagnosticsLinkStatus `json:"links,omitempty"` - // MacAddress: The MAC address of the Interconnect's bundle interface. - MacAddress string `json:"macAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnostics) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnostics - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnosticsARPEntry: Describing the ARP neighbor entries seen on -// this link -type InterconnectDiagnosticsARPEntry struct { - // IpAddress: The IP address of this ARP neighbor. - IpAddress string `json:"ipAddress,omitempty"` - // MacAddress: The MAC address of this ARP neighbor. - MacAddress string `json:"macAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsARPEntry) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsARPEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkLACPStatus struct { - // GoogleSystemId: System ID of the port on Google's side of the LACP exchange. - GoogleSystemId string `json:"googleSystemId,omitempty"` - // NeighborSystemId: System ID of the port on the neighbor's side of the LACP - // exchange. - NeighborSystemId string `json:"neighborSystemId,omitempty"` - // State: The state of a LACP link, which can take one of the following - // values: - // - // - ACTIVE: The link is configured and active within the bundle. - // - DETACHED: The link is not configured within the bundle. This means - // that the rest of the object should be empty. - // - // Possible values: - // "ACTIVE" - The link is configured and active within the bundle. - // "DETACHED" - The link is not configured within the bundle, this means the - // rest of - // the object should be empty. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "GoogleSystemId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GoogleSystemId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkLACPStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkLACPStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectDiagnosticsLinkOpticalPower struct { - // State: The status of the current value when compared to the warning and - // alarm - // levels for the receiving or transmitting transceiver. Possible - // states - // include: - // - // - // - OK: The value has not crossed a warning threshold. - // - LOW_WARNING: The value has crossed below the low - // warning threshold. - // - HIGH_WARNING: The value has - // crossed above the high warning threshold. - // - LOW_ALARM: The value has crossed below the low alarm - // threshold. - // - HIGH_ALARM: The value has crossed above the high alarm - // threshold. - // - // Possible values: - // "HIGH_ALARM" - The value has crossed above the high alarm threshold. - // "HIGH_WARNING" - The value of the current optical power has crossed above - // the high - // warning threshold. - // "LOW_ALARM" - The value of the current optical power has crossed below the - // low alarm - // threshold. - // "LOW_WARNING" - The value of the current optical power has crossed below - // the low - // warning threshold. - // "OK" - The value of the current optical power has not crossed a - // warning - // threshold. - State string `json:"state,omitempty"` - // Value: Value of the current receiving or transmitting optical power, read - // in - // dBm. Take a known good optical value, give it a 10% margin and - // trigger - // warnings relative to that value. In general, a -7dBm warning and a - // -11dBm - // alarm are good optical value estimates for most links. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkOpticalPower) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *InterconnectDiagnosticsLinkOpticalPower) UnmarshalJSON(data []byte) error { - type NoMethod InterconnectDiagnosticsLinkOpticalPower - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type InterconnectDiagnosticsLinkStatus struct { - // ArpCaches: A list of InterconnectDiagnostics.ARPEntry objects, - // describing the ARP neighbor entries seen on this link. - // This will be empty if the link is bundled - ArpCaches []*InterconnectDiagnosticsARPEntry `json:"arpCaches,omitempty"` - // CircuitId: The unique ID for this link assigned during turn up by Google. - CircuitId string `json:"circuitId,omitempty"` - // GoogleDemarc: The Demarc address assigned by Google and provided in the LoA. - GoogleDemarc string `json:"googleDemarc,omitempty"` - LacpStatus *InterconnectDiagnosticsLinkLACPStatus `json:"lacpStatus,omitempty"` - // Macsec: Describes the status of MACsec encryption on this link. - Macsec *InterconnectDiagnosticsMacsecStatus `json:"macsec,omitempty"` - // OperationalStatus: The operational status of the link. - // - // Possible values: - // "LINK_OPERATIONAL_STATUS_DOWN" - The interface is unable to communicate - // with the remote end. - // "LINK_OPERATIONAL_STATUS_UP" - The interface has low level communication - // with the remote end. - OperationalStatus string `json:"operationalStatus,omitempty"` - // ReceivingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, - // describing the current value and status of the received light level. - ReceivingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"receivingOpticalPower,omitempty"` - // TransmittingOpticalPower: An InterconnectDiagnostics.LinkOpticalPower - // object, - // describing the current value and status of the transmitted light level. - TransmittingOpticalPower *InterconnectDiagnosticsLinkOpticalPower `json:"transmittingOpticalPower,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArpCaches") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArpCaches") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsLinkStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsLinkStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectDiagnosticsMacsecStatus: Describes the status of MACsec -// encryption on the link. -type InterconnectDiagnosticsMacsecStatus struct { - // Ckn: Indicates the Connectivity Association Key Name (CKN) - // currently being used if MACsec is operational. - Ckn string `json:"ckn,omitempty"` - // Operational: Indicates whether or not MACsec is operational on this link. - Operational bool `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ckn") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ckn") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectDiagnosticsMacsecStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectDiagnosticsMacsecStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroup: An interconnect group resource allows customers to -// create, analyze, and -// expand their redundant connections. -type InterconnectGroup struct { - Configured *InterconnectGroupConfigured `json:"configured,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Opaque system-generated token that uniquely identifies the - // configuration. - // If provided when patching a configuration in update mode, the provided - // token must match the current token or the update is rejected. This - // provides - // a reliable means of doing read-modify-write (optimistic locking) - // as - // described by AIP 154. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - Intent *InterconnectGroupIntent `json:"intent,omitempty"` - // Interconnects: Interconnects in the InterconnectGroup. Keys are arbitrary - // user-specified - // strings. Users are encouraged, but not required, to use their - // preferred - // format for resource links as keys. - // Note that there are add-members and remove-members methods in gcloud. - // The size of this map is limited by an "Interconnects per group" quota. - Interconnects map[string]InterconnectGroupInterconnect `json:"interconnects,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#InterconnectGroup - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - PhysicalStructure *InterconnectGroupPhysicalStructure `json:"physicalStructure,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Configured") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Configured") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroup) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfigured: [Output Only] The status of the group as -// configured. This has the same -// structure as the operational field reported by the OperationalStatus -// method, but does not take into account the operational status of -// each -// resource. -type InterconnectGroupConfigured struct { - TopologyCapability *InterconnectGroupConfiguredTopologyCapability `json:"topologyCapability,omitempty"` - // ForceSendFields is a list of field names (e.g. "TopologyCapability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TopologyCapability") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfigured) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfigured - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfiguredTopologyCapability: [Output Only] How reliable -// this topology is configured to be, and why -// this group does or does not meet the requirements for the -// intended -// capability. -type InterconnectGroupConfiguredTopologyCapability struct { - IntendedCapabilityBlockers []*InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers `json:"intendedCapabilityBlockers,omitempty"` - // Possible values: - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - // "UNSPECIFIED" - SupportedSla string `json:"supportedSla,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntendedCapabilityBlockers") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntendedCapabilityBlockers") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfiguredTopologyCapability) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfiguredTopologyCapability - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers: -// [Output Only] Reasons why configuration.topologyCapability.sla differs -// from intent.topologyCapability. This list is empty if and only if those -// are the same. -type InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers struct { - // Possible values: - // "INCOMPATIBLE_METROS" - // "NOT_AVAILABLE" - // "NO_INTERCONNECTS" - // "NO_INTERCONNECTS_IN_METRO_AND_ZONE" - // "OTHER" - // "UNSPECIFIED" - BlockerType string `json:"blockerType,omitempty"` - // DocumentationLink: [Output Only] The url of Google Cloud public - // documentation explaining - // this requirement. This is set for every type of requirement. - DocumentationLink string `json:"documentationLink,omitempty"` - // Explanation: [Output Only] A human-readable explanation of this requirement - // and - // why it's not met. This is set for every type of requirement. - Explanation string `json:"explanation,omitempty"` - // Facilities: [Output Only] Facilities used to explain this blocker in more - // detail. - // Like physicalStructure.metros.facilities.facility, this is a numeric - // string like "5467". - Facilities []string `json:"facilities,omitempty"` - // Interconnects: [Output Only] Interconnects used to explain this blocker in - // more - // detail. - Interconnects []string `json:"interconnects,omitempty"` - // Metros: [Output Only] Metros used to explain this blocker in more - // detail. - // These are three-letter lowercase strings like "iad". A blocker - // like - // INCOMPATIBLE_METROS will specify the problematic metros in this - // field. - Metros []string `json:"metros,omitempty"` - // Zones: [Output Only] Zones used to explain this blocker in more detail. - // Zone names are "zone1" and/or "zone2". - Zones []string `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockerType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockerType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupConfiguredTopologyCapabilityIntendedCapabilityBlockers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupIntent: The user's intent for this group. This is the only -// required field besides -// the name that must be specified on group creation. -type InterconnectGroupIntent struct { - // Possible values: - // "NO_SLA" - // "PRODUCTION_CRITICAL" - // "PRODUCTION_NON_CRITICAL" - // "UNSPECIFIED" - TopologyCapability string `json:"topologyCapability,omitempty"` - // ForceSendFields is a list of field names (e.g. "TopologyCapability") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TopologyCapability") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupIntent) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupIntent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupInterconnect: An Interconnect in this InterconnectGroup. -type InterconnectGroupInterconnect struct { - // Interconnect: The URL of an Interconnect in this group. All Interconnects in - // the group - // are unique. - Interconnect string `json:"interconnect,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructure: [Output Only] An analysis of the -// physical layout of Interconnects in this -// group. Every Interconnect in the group is shown once in this structure. -type InterconnectGroupPhysicalStructure struct { - Metros []*InterconnectGroupPhysicalStructureMetros `json:"metros,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metros") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metros") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructure) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetros: [Output Only] The metros -// Interconnects in this group are in. -type InterconnectGroupPhysicalStructureMetros struct { - Facilities []*InterconnectGroupPhysicalStructureMetrosFacilities `json:"facilities,omitempty"` - // Metro: [Output Only] The name of the metro, as a three-letter lowercase - // string - // like "iad". This is the first component of the location of - // Interconnects underneath this. - Metro string `json:"metro,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facilities") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facilities") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetros) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetros - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetrosFacilities: [Output Only] The -// facilities Interconnects in this metro are present -// in. -type InterconnectGroupPhysicalStructureMetrosFacilities struct { - // Facility: [Output Only] The ID of this facility, as a numeric string - // like - // "5467". This is the third component of the location of Interconnects - // in this facility. - Facility string `json:"facility,omitempty"` - Zones []*InterconnectGroupPhysicalStructureMetrosFacilitiesZones `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Facility") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Facility") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetrosFacilities) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetrosFacilities - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupPhysicalStructureMetrosFacilitiesZones: [Output Only] The -// zones that Interconnects in this facility are -// present in. -type InterconnectGroupPhysicalStructureMetrosFacilitiesZones struct { - // Interconnects: [Output Only] URLs of Interconnects in this redundancy group - // in the - // given metro, facility, and zone. - Interconnects []string `json:"interconnects,omitempty"` - // Zone: [Output Only] The name of the zone, either "zone1" or "zone2". - // This is the second component of the location of Interconnects in - // this facility. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnects") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupPhysicalStructureMetrosFacilitiesZones) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupPhysicalStructureMetrosFacilitiesZones - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsCreateMembers struct { - // IntentMismatchBehavior: How to behave when - // configured.topologyCapability.supportedSLA would not - // equal intent.topologyCapability after this call. - // - // Possible values: - // "CREATE" - // "REJECT" - // "UNSPECIFIED" - IntentMismatchBehavior string `json:"intentMismatchBehavior,omitempty"` - Interconnects []*InterconnectGroupsCreateMembersInterconnectInput `json:"interconnects,omitempty"` - // TemplateInterconnect: Parameters for the Interconnects to create. - TemplateInterconnect *InterconnectGroupsCreateMembersInterconnectInput `json:"templateInterconnect,omitempty"` - // ForceSendFields is a list of field names (e.g. "IntentMismatchBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IntentMismatchBehavior") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembers) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsCreateMembersInterconnectInput: LINT.IfChange -type InterconnectGroupsCreateMembersInterconnectInput struct { - // AdminEnabled: Administrative status of the interconnect. When this is set to - // true, the - // Interconnect is functional and can carry traffic. - // When set to false, no packets can be carried over the interconnect and - // no BGP routes are exchanged over it. By default, the status is set to - // true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // CustomerName: Customer name, to put in the Letter of Authorization as the - // party - // authorized to request a crossconnect. - CustomerName string `json:"customerName,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Facility: A zone-free location to use for all Interconnects created in this - // call, - // like "iad-1234". - Facility string `json:"facility,omitempty"` - // InterconnectType: Type of interconnect, which can take one of the following - // values: - // - // - PARTNER: A partner-managed interconnection shared between - // customers though a partner. - // - DEDICATED: A dedicated physical - // interconnection with the customer. - // - // Note that a value IT_PRIVATE - // has been deprecated in favor of DEDICATED. - // - // Possible values: - // "DEDICATED" - A dedicated physical interconnection with the customer. - // "IT_PRIVATE" - [Deprecated] A private, physical interconnection with the - // customer. - // "PARTNER" - A partner-managed interconnection shared between customers via - // partner. - InterconnectType string `json:"interconnectType,omitempty"` - // LinkType: Type of link requested, which can take one of the following - // values: - // - // - LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics - // - LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. - // - LINK_TYPE_ETHERNET_400G_LR4: A 400G Ethernet with LR4 - // optics. - // - // Note that this field indicates the speed of each of the - // links in the bundle, not the speed of the entire bundle. - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - LinkType string `json:"linkType,omitempty"` - // Name: Name of the Interconnects to be created. This must be specified on - // the - // template and/or on each individual interconnect. The name, if not - // empty, - // must be 1-63 characters long, and comply with RFC1035. - // Specifically, any nonempty name must be 1-63 characters long and match - // the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the - // first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NocContactEmail: Email address to contact the customer NOC for operations - // and maintenance - // notifications regarding this Interconnect. If specified, this will be - // used for notifications in addition to all other forms described, such - // as - // Cloud Monitoring logs alerting and Cloud Notifications. This field - // is - // required for users who sign up for Cloud Interconnect using - // workforce identity federation. - NocContactEmail string `json:"nocContactEmail,omitempty"` - // RemoteLocation: Indicates that this is a Cross-Cloud Interconnect. This - // field specifies - // the location outside of Google's network that the interconnect is - // connected to. - RemoteLocation string `json:"remoteLocation,omitempty"` - // RequestedFeatures: Optional. List of features requested for this - // Interconnect connection, - // which can take one of the following values: - // - // - IF_MACSEC: If specified, then the connection is created on MACsec - // capable hardware ports. If not specified, non-MACsec capable ports will - // also be considered. - // - IF_CROSS_SITE_NETWORK: If specified, then the connection is created - // exclusively for Cross-Site Networking. The connection can not be used - // for - // Cross-Site Networking unless this feature is specified. - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - RequestedFeatures []string `json:"requestedFeatures,omitempty"` - // RequestedLinkCount: Target number of physical links in the link bundle, as - // requested by the - // customer. - RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembersInterconnectInput) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembersInterconnectInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsCreateMembersRequest struct { - Request *InterconnectGroupsCreateMembers `json:"request,omitempty"` - // ForceSendFields is a list of field names (e.g. "Request") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Request") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsCreateMembersRequest) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembersRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsGetOperationalStatusResponse: Response for the -// InterconnectGroupsGetOperationalStatusResponse. -type InterconnectGroupsGetOperationalStatusResponse struct { - Etag string `json:"etag,omitempty"` - Result *InterconnectGroupsOperationalStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsGetOperationalStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsGetOperationalStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectGroup resources. - Items []*InterconnectGroup `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectGroupsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsListResponseWarning: [Output Only] Informational warning -// message. -type InterconnectGroupsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectGroupsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectGroupsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsOperationalStatus: Request to get the status of the -// interconnect group with extra detail. -type InterconnectGroupsOperationalStatus struct { - // Configured: The configuration analysis, as returned by Get. - Configured *InterconnectGroupConfigured `json:"configured,omitempty"` - // GroupStatus: Summarizes the status of the group. - // - // Possible values: - // "DEGRADED" - // "FULLY_DOWN" - // "FULLY_UP" - // "GROUPS_STATUS_UNSPECIFIED" - GroupStatus string `json:"groupStatus,omitempty"` - // Intent: The intent of the resource, as returned by Get. - Intent *InterconnectGroupIntent `json:"intent,omitempty"` - InterconnectStatuses []*InterconnectGroupsOperationalStatusInterconnectStatus `json:"interconnectStatuses,omitempty"` - // Operational: The operational state of the group, including only active - // Interconnects. - Operational *InterconnectGroupConfigured `json:"operational,omitempty"` - // ForceSendFields is a list of field names (e.g. "Configured") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Configured") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsOperationalStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsOperationalStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectGroupsOperationalStatusInterconnectStatus: The status of one -// Interconnect in the group. The order is arbitrary. -type InterconnectGroupsOperationalStatusInterconnectStatus struct { - // AdminEnabled: Whether the Interconnect is enabled. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Diagnostics: The diagnostics of the Interconnect, as returned by the - // existing - // get-diagnostics method. - Diagnostics *InterconnectDiagnostics `json:"diagnostics,omitempty"` - // Interconnect: The URL of the Interconnect being described. - Interconnect string `json:"interconnect,omitempty"` - // IsActive: Whether this interconnect is participating in the - // redundant - // configuration. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - // "IS_ACTIVE_UNSPECIFIED" - IsActive string `json:"isActive,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectGroupsOperationalStatusInterconnectStatus) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsOperationalStatusInterconnectStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectList: Response to the list request, and contains a list of -// interconnects. -type InterconnectList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Interconnect resources. - Items []*Interconnect `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#interconnectList for - // lists of interconnects. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectListWarning: [Output Only] Informational warning message. -type InterconnectListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocation: Represents an Interconnect Attachment (VLAN) Location -// resource. -// -// You can use this resource to find location details about an -// Interconnect -// attachment (VLAN). For more information about interconnect attachments, -// read -// Creating VLAN Attachments. -type InterconnectLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, each - // line in - // the address is separated by a newline character. - Address string `json:"address,omitempty"` - // AvailabilityZone: [Output Only] Availability zone for this - // InterconnectLocation. Within a - // metropolitan area (metro), maintenance will not be simultaneously - // scheduled - // in more than one availability zone. Example: "zone1" or "zone2". - AvailabilityZone string `json:"availabilityZone,omitempty"` - // AvailableFeatures: [Output only] List of features available at this - // InterconnectLocation, - // which can take one of the following values: - // - // - IF_MACSEC - // - IF_CROSS_SITE_NETWORK - // - // Possible values: - // "IF_CROSS_SITE_NETWORK" - Cross-Site Networking - // "IF_L2_FORWARDING" - L2 Interconnect Attachment Forwarding - // "IF_MACSEC" - Media Access Control security (MACsec) - AvailableFeatures []string `json:"availableFeatures,omitempty"` - // AvailableLinkTypes: [Output only] List of link types available at this - // InterconnectLocation, - // which can take one of the following values: - // - // - LINK_TYPE_ETHERNET_10G_LR - // - LINK_TYPE_ETHERNET_100G_LR - // - LINK_TYPE_ETHERNET_400G_LR4 - // - // Possible values: - // "LINK_TYPE_ETHERNET_100G_LR" - 100G Ethernet, LR Optics. - // "LINK_TYPE_ETHERNET_10G_LR" - 10G Ethernet, LR Optics. - // [(rate_bps) = 10000000000]; - // "LINK_TYPE_ETHERNET_400G_LR4" - 400G Ethernet, LR4 Optics. - AvailableLinkTypes []string `json:"availableLinkTypes,omitempty"` - // City: [Output Only] Metropolitan area designator that indicates which city - // an - // interconnect is located. - // For example: "Chicago, IL", "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - // Continent: [Output Only] Continent for this location, which can take one of - // the - // following values: - // - // - AFRICA - // - ASIA_PAC - // - EUROPE - // - NORTH_AMERICA - // - SOUTH_AMERICA - // - // Possible values: - // "AFRICA" - // "ASIA_PAC" - // "C_AFRICA" - // "C_ASIA_PAC" - // "C_EUROPE" - // "C_NORTH_AMERICA" - // "C_SOUTH_AMERICA" - // "EUROPE" - // "NORTH_AMERICA" - // "SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CrossSiteInterconnectInfos: [Output Only] A list of - // InterconnectLocation.CrossSiteInterconnectInfo - // objects, that describe where Cross-Site Interconnect wires may connect - // to - // from this location and associated connection parameters. - // Cross-Site - // Interconnect isn't allowed to locations which are not listed. - CrossSiteInterconnectInfos []*InterconnectLocationCrossSiteInterconnectInfo `json:"crossSiteInterconnectInfos,omitempty"` - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - // FacilityProvider: [Output Only] The name of the provider for this facility - // (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - // FacilityProviderFacilityId: [Output Only] A provider-assigned Identifier for - // this facility (e.g., - // Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#interconnectLocation - // for interconnect locations. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding - // with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - // RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo - // objects, that - // describe parameters pertaining to the relation between - // this - // InterconnectLocation and various Google Cloud regions. - RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SingleRegionProductionCriticalPeerLocations: [Output Only] URLs of the other - // locations that can pair up with this - // location to support Single-Region 99.99% SLA. E.g. iad-zone1-1 - // and - // iad-zone2-5467 are Single-Region 99.99% peer locations of each other. - SingleRegionProductionCriticalPeerLocations []string `json:"singleRegionProductionCriticalPeerLocations,omitempty"` - // Status: [Output Only] The status of this InterconnectLocation, which can - // take one - // of the following values: - // - // - CLOSED: The InterconnectLocation is closed and is unavailable for - // provisioning new Interconnects. - // - AVAILABLE: The InterconnectLocation is available for provisioning new - // Interconnects. - // - // Possible values: - // "AVAILABLE" - The InterconnectLocation is available for provisioning new - // Interconnects. - // "CLOSED" - The InterconnectLocation is closed for provisioning new - // Interconnects. - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocation) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationCrossSiteInterconnectInfo: Information about Cross-Site -// Interconnect wires which may be created -// between the containing location and another remote location. -type InterconnectLocationCrossSiteInterconnectInfo struct { - // City: The remote location for Cross-Site Interconnect wires. This specifies - // an - // InterconnectLocation city (metropolitan area designator), which itself - // may match multiple InterconnectLocations. - City string `json:"city,omitempty"` - // ForceSendFields is a list of field names (e.g. "City") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "City") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationCrossSiteInterconnectInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationCrossSiteInterconnectInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationList: Response to the list request, and contains a list -// of interconnect locations. -type InterconnectLocationList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectLocation resources. - Items []*InterconnectLocation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#interconnectLocationList - // for lists of interconnect - // locations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectLocationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationListWarning: [Output Only] Informational warning -// message. -type InterconnectLocationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectLocationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectLocationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectLocationRegionInfo: Information about any potential -// InterconnectAttachments between an -// Interconnect at a specific InterconnectLocation, and a specific -// Cloud -// Region. -type InterconnectLocationRegionInfo struct { - // ExpectedRttMs: Expected round-trip time in milliseconds, from this - // InterconnectLocation - // to a VM in this region. - ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"` - // L2ForwardingEnabled: Identifies whether L2 Interconnect Attachments can be - // created in this - // region for interconnects that are in this location. - L2ForwardingEnabled bool `json:"l2ForwardingEnabled,omitempty"` - // LocationPresence: Identifies the network presence of this location. - // - // Possible values: - // "GLOBAL" - This region is not in any common network presence with - // this - // InterconnectLocation. - // "LOCAL_REGION" - This region shares the same regional network presence as - // this - // InterconnectLocation. - // "LP_GLOBAL" - [Deprecated] This region is not in any common network - // presence with - // this InterconnectLocation. - // "LP_LOCAL_REGION" - [Deprecated] This region shares the same regional - // network presence as - // this InterconnectLocation. - LocationPresence string `json:"locationPresence,omitempty"` - // Region: URL for the region of this location. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpectedRttMs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpectedRttMs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectLocationRegionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsec: Configuration information for enabling Media Access -// Control security -// (MACsec) on this Cloud Interconnect connection between Google and -// your -// on-premises router. -type InterconnectMacsec struct { - // FailOpen: If set to true, the Interconnect connection is configured with - // ashould-secure MACsec security policy, that allows the Google - // router to fallback to cleartext traffic if the MKA session cannot - // be - // established. By default, the Interconnect connection is configured with - // amust-secure security policy that drops all traffic if the - // MKA session cannot be established with your router. - FailOpen bool `json:"failOpen,omitempty"` - // PreSharedKeys: Required. A keychain placeholder describing a set of named - // key objects - // along with their start times. A MACsec CKN/CAK is generated for each - // key in the key chain. Google router automatically picks the key with - // the most recent startTime when establishing or re-establishing a - // MACsec - // secure link. - PreSharedKeys []*InterconnectMacsecPreSharedKey `json:"preSharedKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailOpen") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailOpen") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsec) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecConfig: MACsec configuration information for the -// Interconnect connection. Contains -// the generated Connectivity Association Key Name (CKN) and the key (CAK) -// for -// this Interconnect connection. -type InterconnectMacsecConfig struct { - // PreSharedKeys: A keychain placeholder describing a set of named key - // objects - // along with their start times. A MACsec CKN/CAK is generated for each key - // in - // the key chain. Google router automatically picks the key with the - // most - // recent startTime when establishing or re-establishing a MACsec secure link. - PreSharedKeys []*InterconnectMacsecConfigPreSharedKey `json:"preSharedKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreSharedKeys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreSharedKeys") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecConfig) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecConfigPreSharedKey: Describes a pre-shared key used to -// setup MACsec in static connectivity -// association key (CAK) mode. -type InterconnectMacsecConfigPreSharedKey struct { - // Cak: An auto-generated Connectivity Association Key (CAK) for this key. - Cak string `json:"cak,omitempty"` - // Ckn: An auto-generated Connectivity Association Key Name (CKN) for this key. - Ckn string `json:"ckn,omitempty"` - // Name: User provided name for this pre-shared key. - Name string `json:"name,omitempty"` - // StartTime: User provided timestamp on or after which this key is valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cak") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cak") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecConfigPreSharedKey) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecConfigPreSharedKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectMacsecPreSharedKey: Describes a pre-shared key used to setup -// MACsec in static connectivity -// association key (CAK) mode. -type InterconnectMacsecPreSharedKey struct { - // Name: Required. A name for this pre-shared key. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot be - // a dash. - Name string `json:"name,omitempty"` - // StartTime: A RFC3339 timestamp on or after which the key is - // valid. startTime can be in the future. If the keychain has a single - // key, startTime can be omitted. If the keychain has multiple keys, - // startTime is mandatory for each key. The start times of keys must be - // in - // increasing order. The start times of two consecutive keys must be - // at least 6 hours apart. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectMacsecPreSharedKey) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectMacsecPreSharedKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectOutageNotification: Description of a planned outage on this -// Interconnect. -type InterconnectOutageNotification struct { - // AffectedCircuits: If issue_type is IT_PARTIAL_OUTAGE, a list of the - // Google-side circuit - // IDs that will be affected. - AffectedCircuits []string `json:"affectedCircuits,omitempty"` - // Description: A description about the purpose of the outage. - Description string `json:"description,omitempty"` - // EndTime: Scheduled end time for the outage (milliseconds since Unix - // epoch). - EndTime int64 `json:"endTime,omitempty,string"` - // IssueType: Form this outage is expected to take, which can take one of the - // following - // values: - // - // - OUTAGE: The Interconnect may be completely out of service for - // some or all of the specified window. - // - PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole - // should remain up, but with reduced bandwidth. - // - // - // Note that the versions of this enum prefixed with "IT_" have been - // deprecated in favor of the unprefixed values. - // - // Possible values: - // "IT_OUTAGE" - [Deprecated] The Interconnect may be completely out of - // service for some - // or all of the specified window. - // "IT_PARTIAL_OUTAGE" - [Deprecated] Some circuits comprising the - // Interconnect will be out of - // service during the expected window. The interconnect as a whole - // should - // remain up, albeit with reduced bandwidth. - // "OUTAGE" - The Interconnect may be completely out of service for some or - // all of - // the specified window. - // "PARTIAL_OUTAGE" - Some circuits comprising the Interconnect will be out - // of service during - // the expected window. The interconnect as a whole should remain - // up, albeit with reduced bandwidth. - IssueType string `json:"issueType,omitempty"` - // Name: Unique identifier for this outage notification. - Name string `json:"name,omitempty"` - // Source: The party that generated this notification, which can take the - // following - // value: - // - // - GOOGLE: this notification as generated by Google. - // - // - // Note that the value of NSRC_GOOGLE has been deprecated in favor of - // GOOGLE. - // - // Possible values: - // "GOOGLE" - This notification was generated by Google. - // "NSRC_GOOGLE" - [Deprecated] This notification was generated by Google. - Source string `json:"source,omitempty"` - // StartTime: Scheduled start time for the outage (milliseconds since - // Unix - // epoch). - StartTime int64 `json:"startTime,omitempty,string"` - // State: State of this notification, which can take one of the following - // values: - // - // - ACTIVE: This outage notification is active. The event could be in - // the past, present, or future. See start_time and end_time for - // scheduling. - // - CANCELLED: The outage associated with this notification was cancelled - // before the outage was due to start. - // - COMPLETED: The outage associated with this notification is - // complete. - // - // - // Note that the versions of this enum prefixed with "NS_" have been - // deprecated in favor of the unprefixed values. - // - // Possible values: - // "ACTIVE" - This outage notification is active. The event could be in the - // future, - // present, or past. See start_time and end_time for scheduling. - // "CANCELLED" - The outage associated with this notification was cancelled - // before the - // outage was due to start. - // "COMPLETED" - The outage associated with this notification is complete. - // "NS_ACTIVE" - [Deprecated] This outage notification is active. The event - // could be in - // the future, present, or past. See start_time and end_time for - // scheduling. - // "NS_CANCELED" - [Deprecated] The outage associated with this notification - // was canceled - // before the outage was due to start. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "AffectedCircuits") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffectedCircuits") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectOutageNotification) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectOutageNotification - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectParams: Additional interconnect parameters. -type InterconnectParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectParams) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocation: Represents a Cross-Cloud Interconnect Remote -// Location resource. -// -// You can use this resource to find remote location details about -// an -// Interconnect attachment (VLAN). -type InterconnectRemoteLocation struct { - // Address: [Output Only] The postal address of the Point of Presence, each - // line in - // the address is separated by a newline character. - Address string `json:"address,omitempty"` - // AttachmentConfigurationConstraints: [Output Only] Subset of fields from - // InterconnectAttachment's - // |configurationConstraints| field that apply to all attachments for - // this - // remote location. - AttachmentConfigurationConstraints *InterconnectAttachmentConfigurationConstraints `json:"attachmentConfigurationConstraints,omitempty"` - // City: [Output Only] Metropolitan area designator that indicates which city - // an - // interconnect is located. - // For example: "Chicago, IL", "Amsterdam, Netherlands". - City string `json:"city,omitempty"` - // Constraints: [Output Only] Constraints on the parameters for creating - // Cross-Cloud - // Interconnect and associated InterconnectAttachments. - Constraints *InterconnectRemoteLocationConstraints `json:"constraints,omitempty"` - // Continent: [Output Only] Continent for this location, which can take one of - // the - // following values: - // - // - AFRICA - // - ASIA_PAC - // - EUROPE - // - NORTH_AMERICA - // - SOUTH_AMERICA - // - // Possible values: - // "AFRICA" - // "ASIA_PAC" - // "EUROPE" - // "NORTH_AMERICA" - // "SOUTH_AMERICA" - Continent string `json:"continent,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] An optional description of the resource. - Description string `json:"description,omitempty"` - // FacilityProvider: [Output Only] The name of the provider for this facility - // (e.g., EQUINIX). - FacilityProvider string `json:"facilityProvider,omitempty"` - // FacilityProviderFacilityId: [Output Only] A provider-assigned Identifier for - // this facility (e.g., - // Ashburn-DC1). - FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#interconnectRemoteLocation for interconnect remote - // locations. - Kind string `json:"kind,omitempty"` - // Lacp: [Output Only] Link Aggregation Control Protocol (LACP) constraints, - // which - // can take one of the following values: LACP_SUPPORTED, LACP_UNSUPPORTED - // - // Possible values: - // "LACP_SUPPORTED" - LACP_SUPPORTED: LACP is supported, and enabled by - // default on - // the Cross-Cloud Interconnect. - // "LACP_UNSUPPORTED" - LACP_UNSUPPORTED: LACP is not supported and is not be - // enabled on this - // port. GetDiagnostics shows bundleAggregationType as "static". GCP does - // not support LAGs without LACP, so requestedLinkCount must be 1. - Lacp string `json:"lacp,omitempty"` - // MaxLagSize100Gbps: [Output Only] - // The maximum number of 100 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 100 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_100_gbps. - MaxLagSize100Gbps int64 `json:"maxLagSize100Gbps,omitempty"` - // MaxLagSize10Gbps: [Output Only] - // The maximum number of 10 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 10 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_10_gbps. - MaxLagSize10Gbps int64 `json:"maxLagSize10Gbps,omitempty"` - // MaxLagSize400Gbps: [Output Only] - // The maximum number of 400 Gbps ports supported in a link aggregation - // group - // (LAG). When linkType is 400 Gbps, requestedLinkCount cannot - // exceed - // max_lag_size_400_gbps. - MaxLagSize400Gbps int64 `json:"maxLagSize400Gbps,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // PeeringdbFacilityId: [Output Only] The peeringdb identifier for this - // facility (corresponding - // with a netfac type in peeringdb). - PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"` - // PermittedConnections: [Output Only] Permitted connections. - PermittedConnections []*InterconnectRemoteLocationPermittedConnections `json:"permittedConnections,omitempty"` - // RemoteService: [Output Only] Indicates the service provider present at the - // remote - // location. Example values: "Amazon Web Services", "Microsoft Azure". - RemoteService string `json:"remoteService,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of this InterconnectRemoteLocation, which - // can take - // one of the following values: - // - // - CLOSED: The InterconnectRemoteLocation is closed and is unavailable - // for provisioning new Cross-Cloud Interconnects. - // - AVAILABLE: The - // InterconnectRemoteLocation is available for provisioning new - // Cross-Cloud Interconnects. - // - // Possible values: - // "AVAILABLE" - The InterconnectRemoteLocation is available for provisioning - // new - // Cross-Cloud Interconnects. - // "CLOSED" - The InterconnectRemoteLocation is closed for provisioning - // new - // Cross-Cloud Interconnects. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocation) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationConstraints struct { - // PortPairRemoteLocation: [Output Only] Port pair remote location constraints, - // which can take one - // of the following values: - // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, - // PORT_PAIR_MATCHING_REMOTE_LOCATION. - // - // Google Cloud API refers only to individual ports, but the UI uses this - // field when ordering a pair of ports, to prevent users from - // accidentally - // ordering something that is incompatible with their cloud - // provider. - // Specifically, when ordering a redundant pair of Cross-Cloud - // Interconnect - // ports, and one of them uses a remote location - // with - // portPairMatchingRemoteLocation set to matching, the UI requires that - // both ports use the same remote location. - // - // Possible values: - // "PORT_PAIR_MATCHING_REMOTE_LOCATION" - If - // PORT_PAIR_MATCHING_REMOTE_LOCATION, the remote cloud provider - // allocates ports in pairs, and the user should choose the same - // remote - // location for both ports. - // "PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION" - If - // PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, a user may opt to provision - // a redundant pair of Cross-Cloud Interconnects using two different - // remote locations in the same city. - PortPairRemoteLocation string `json:"portPairRemoteLocation,omitempty"` - // PortPairVlan: [Output Only] Port pair VLAN constraints, which can take one - // of the - // following values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN - // - // Possible values: - // "PORT_PAIR_MATCHING_VLAN" - If PORT_PAIR_MATCHING_VLAN, the Interconnect - // for this attachment is - // part of a pair of ports that should have matching VLAN allocations. - // This occurs with Cross-Cloud Interconnect to Azure remote locations. - // While GCP's API does not explicitly group pairs of ports, the UI uses - // this field to ensure matching VLAN ids when configuring a redundant - // VLAN pair. - // "PORT_PAIR_UNCONSTRAINED_VLAN" - PORT_PAIR_UNCONSTRAINED_VLAN means there - // is no constraint. - PortPairVlan string `json:"portPairVlan,omitempty"` - // SubnetLengthRange: [Output Only] - // - // [min-length, max-length] - // - // The minimum and maximum value (inclusive) for the IPv4 subnet - // length. - // - // For example, an interconnectRemoteLocation for Azure has {min: - // 30, - // max: - // 30} because Azure requires /30 subnets. - // - // This range specifies the values supported by both cloud - // providers. - // Interconnect currently supports /29 and /30 IPv4 subnet lengths. If a - // remote cloud has no constraint on IPv4 subnet length, the range would - // thus be {min: 29, max: 30}. - SubnetLengthRange *InterconnectRemoteLocationConstraintsSubnetLengthRange `json:"subnetLengthRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "PortPairRemoteLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PortPairRemoteLocation") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationConstraintsSubnetLengthRange struct { - Max int64 `json:"max,omitempty"` - Min int64 `json:"min,omitempty"` - // ForceSendFields is a list of field names (e.g. "Max") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Max") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationConstraintsSubnetLengthRange) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationConstraintsSubnetLengthRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocationList: Response to the list request, and contains a -// list of interconnect remote -// locations. -type InterconnectRemoteLocationList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InterconnectRemoteLocation resources. - Items []*InterconnectRemoteLocation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#interconnectRemoteLocationList for lists of - // interconnect remote locations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token lets you get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InterconnectRemoteLocationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationList) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectRemoteLocationListWarning: [Output Only] Informational warning -// message. -type InterconnectRemoteLocationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*InterconnectRemoteLocationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InterconnectRemoteLocationPermittedConnections struct { - // InterconnectLocation: [Output Only] URL of an Interconnect location that is - // permitted to - // connect to this Interconnect remote location. - InterconnectLocation string `json:"interconnectLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "InterconnectLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InterconnectLocation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectRemoteLocationPermittedConnections) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectRemoteLocationPermittedConnections - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectsGetDiagnosticsResponse: Response for the -// InterconnectsGetDiagnosticsRequest. -type InterconnectsGetDiagnosticsResponse struct { - Result *InterconnectDiagnostics `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectsGetDiagnosticsResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetDiagnosticsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// InterconnectsGetMacsecConfigResponse: Response for the -// InterconnectsGetMacsecConfigRequest. -type InterconnectsGetMacsecConfigResponse struct { - // Etag: end_interface: MixerGetResponseWithEtagBuilder - Etag string `json:"etag,omitempty"` - Result *InterconnectMacsecConfig `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s InterconnectsGetMacsecConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectsGetMacsecConfigResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// License: Represents a License resource. -// -// A License represents billing and aggregate usage data forpublic -// andmarketplace images. -// -// *Caution* This resource is intended for -// -// use only by third-party partners who are creatingCloud Marketplace -// images. -type License struct { - // AllowedReplacementLicenses: Specifies licenseCodes of licenses that can - // replace this license. Note: - // such replacements are allowed even if removable_from_disk is false. - AllowedReplacementLicenses []string `json:"allowedReplacementLicenses,omitempty"` - // AppendableToDisk: If true, this license can be appended to an existing - // disk's set of - // licenses. - AppendableToDisk bool `json:"appendableToDisk,omitempty"` - // ChargesUseFee: [Output Only] Deprecated. This field no longer reflects - // whether a license - // charges a usage fee. - ChargesUseFee bool `json:"chargesUseFee,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional textual description of the resource; provided by - // the client - // when the resource is created. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IncompatibleLicenses: Specifies licenseCodes of licenses that are - // incompatible with this license. - // If a license is incompatible with this license, it cannot be attached to - // the same disk or image. - IncompatibleLicenses []string `json:"incompatibleLicenses,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#license for - // licenses. - Kind string `json:"kind,omitempty"` - // LicenseCode: [Output Only] The unique code used to attach this license to - // images, - // snapshots, and disks. - LicenseCode uint64 `json:"licenseCode,omitempty,string"` - // MinimumRetention: If set, this license will be unable to be removed or - // replaced once attached - // to a disk until the minimum_retention period has passed. - MinimumRetention *Duration `json:"minimumRetention,omitempty"` - // MultiTenantOnly: If true, this license can only be used on VMs on multi - // tenant nodes. - MultiTenantOnly bool `json:"multiTenantOnly,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long and - // comply withRFC1035. - Name string `json:"name,omitempty"` - // OsLicense: If true, indicates this is an OS license. Only one OS license can - // be - // attached to a disk or image at a time. - OsLicense bool `json:"osLicense,omitempty"` - // RemovableFromDisk: If true, this license can be removed from a disk's set of - // licenses, with no - // replacement license needed. - RemovableFromDisk bool `json:"removableFromDisk,omitempty"` - // RequiredCoattachedLicenses: Specifies the set of permissible coattached - // licenseCodes of licenses that - // satisfy the coattachment requirement of this license. At least one - // license - // from the set must be attached to the same disk or image as this license. - RequiredCoattachedLicenses []string `json:"requiredCoattachedLicenses,omitempty"` - // ResourceRequirements: [Input Only] Deprecated. - ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SoleTenantOnly: If true, this license can only be used on VMs on sole tenant - // nodes. - SoleTenantOnly bool `json:"soleTenantOnly,omitempty"` - // Transferable: If false, licenses will not be copied from the source resource - // when - // creating an image from a disk, disk from snapshot, or snapshot from disk. - Transferable bool `json:"transferable,omitempty"` - // UpdateTimestamp: [Output Only] Last update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllowedReplacementLicenses") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedReplacementLicenses") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s License) MarshalJSON() ([]byte, error) { - type NoMethod License - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicenseCode: Represents a License Code resource. -// -// A License Code is a unique identifier used to represent alicense -// resource. -// -// *Caution* This resource is intended for -// -// use only by third-party partners who are creatingCloud Marketplace -// images. -type LicenseCode struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#licenseCode - // for - // licenses. - Kind string `json:"kind,omitempty"` - // LicenseAlias: [Output Only] URL and description aliases of Licenses with the - // same - // License Code. - LicenseAlias []*LicenseCodeLicenseAlias `json:"licenseAlias,omitempty"` - // Name: [Output Only] Name of the resource. The name is 1-20 characters long - // and - // must be a valid 64 bit integer. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // State: [Output Only] Current state of this License Code. - // - // Possible values: - // "DISABLED" - Machines are not allowed to attach boot disks with this - // License Code. - // Requests to create new resources with this license will be rejected. - // "ENABLED" - Use is allowed for anyone with USE_READ_ONLY access to this - // License Code. - // "RESTRICTED" - Use of this license is limited to a project whitelist. - // "STATE_UNSPECIFIED" - // "TERMINATED" - Reserved state. - State string `json:"state,omitempty"` - // Transferable: [Output Only] If true, the license will remain attached when - // creating - // images or snapshots from disks. Otherwise, the license is not transferred. - Transferable bool `json:"transferable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseCode) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicenseCodeLicenseAlias struct { - // Description: [Output Only] Description of this License Code. - Description string `json:"description,omitempty"` - // SelfLink: [Output Only] URL of license corresponding to this License Code. - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { - type NoMethod LicenseCodeLicenseAlias - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicenseResourceCommitment: Commitment for a particular license resource. -type LicenseResourceCommitment struct { - // Amount: The number of licenses you plan to purchase. - Amount int64 `json:"amount,omitempty,string"` - // CoresPerLicense: The number of cores per license. - CoresPerLicense string `json:"coresPerLicense,omitempty"` - // License: The applicable license URI. - License string `json:"license,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Amount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceCommitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicenseResourceRequirements struct { - // MinGuestCpuCount: [Input Only] Deprecated. This field no longer reflects the - // minimum number - // of guest cpus required to use the Instance. - MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // MinMemoryMb: [Input Only] Deprecated. This field no longer reflects the - // minimum memory - // required to use the Instance. - MinMemoryMb int64 `json:"minMemoryMb,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinGuestCpuCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicenseResourceRequirements) MarshalJSON() ([]byte, error) { - type NoMethod LicenseResourceRequirements - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicensesListResponse struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of License resources. - Items []*License `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *LicensesListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LicensesListResponseWarning: [Output Only] Informational warning message. -type LicensesListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*LicensesListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LicensesListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod LicensesListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocalDisk struct { - // DiskCount: Specifies the number of such disks. - DiskCount int64 `json:"diskCount,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // DiskType: Specifies the desired disk type on the node. This disk type must - // be a - // local storage type (e.g.: local-ssd). - // Note that for nodeTemplates, this should be the name of the disk type - // and - // not its URL. - DiskType string `json:"diskType,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocalDisk) MarshalJSON() ([]byte, error) { - type NoMethod LocalDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocalizedMessage: Provides a localized error message that is safe to return -// to the user -// which can be attached to an RPC error. -type LocalizedMessage struct { - // Locale: The locale used following the specification defined - // at - // https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - Locale string `json:"locale,omitempty"` - // Message: The localized error message in the above locale. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locale") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locale") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocalizedMessage) MarshalJSON() ([]byte, error) { - type NoMethod LocalizedMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocationPolicy: Configuration for location policy among multiple possible -// locations -// (e.g. preferences for zone selection among zones in a single region). -type LocationPolicy struct { - // Locations: Location configurations mapped by location name. - // Currently only zone names are supported and must be represented as - // valid - // internal URLs, such as zones/us-central1-a. - Locations map[string]LocationPolicyLocation `json:"locations,omitempty"` - // TargetShape: Strategy for distributing VMs across zones in a region. - // - // Possible values: - // "ANY" - GCE picks zones for creating VM instances to fulfill the - // requested - // number of VMs within present resource constraints and to - // maximize - // utilization of unused zonal reservations. Recommended for batch - // workloads - // that do not require high availability. - // "ANY_SINGLE_ZONE" - GCE always selects a single zone for all the VMs, - // optimizing for resource - // quotas, available reservations and general capacity. Recommended for - // batch workloads that cannot tollerate distribution over multiple zones. - // This the default shape in Bulk Insert and Capacity Advisor APIs. - // "BALANCED" - GCE prioritizes acquisition of resources, scheduling VMs in - // zones - // where resources are available while distributing VMs as evenly as - // possible across allowed zones to minimize the impact of zonal - // failure. - // Recommended for highly available serving workloads. - TargetShape string `json:"targetShape,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocationPolicyLocation struct { - // Constraints: Constraints that the caller requires on the result - // distribution - // in this zone. - Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - // Preference: Preference for a given location. Set to either ALLOW orDENY. - // - // Possible values: - // "ALLOW" - Location is allowed for use. - // "DENY" - Location is prohibited. - // "PREFERENCE_UNSPECIFIED" - Default value, unused. - Preference string `json:"preference,omitempty"` - // ForceSendFields is a list of field names (e.g. "Constraints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Constraints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicyLocation) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocationPolicyLocationConstraints: Per-zone constraints on location policy -// for this zone. -type LocationPolicyLocationConstraints struct { - // MaxCount: Maximum number of items that are allowed to be placed in this - // zone. - // The value must be non-negative. - MaxCount int64 `json:"maxCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationPolicyLocationConstraints) MarshalJSON() ([]byte, error) { - type NoMethod LocationPolicyLocationConstraints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImage: Represents a machine image resource. -// -// A machine image is a Compute Engine resource that stores all -// the -// configuration, metadata, permissions, and data from one or more -// disks -// required to create a Virtual machine (VM) instance. For more information, -// seeMachine images. -type MachineImage struct { - // CreationTimestamp: [Output Only] The creation timestamp for this machine - // image inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GuestFlush: [Input Only] Whether to attempt an application consistent - // machine image by - // informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - // Id: [Output Only] A unique identifier for this machine image. The - // server - // defines this identifier. - Id uint64 `json:"id,omitempty,string"` - // InstanceProperties: [Output Only] Properties of source instance - InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // Kind: [Output Only] The resource type, which is alwayscompute#machineImage - // for machine image. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this machine - // image, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // machine image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this machine image. These can be later modified - // by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // MachineImageEncryptionKey: Encrypts the machine image using - // acustomer-supplied - // encryption key. - // - // After you encrypt a machine image using a customer-supplied key, you - // must - // provide the same key if you use the machine image later. For example, - // you - // must provide the encryption key when you create an instance from - // the - // encrypted machine image in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata of - // the - // machine image. - // - // If you do not provide an encryption key when creating the machine - // image, - // then the machine image will be encrypted using an automatically - // generated - // key and you do not need to provide a key to use the machine image later. - MachineImageEncryptionKey *CustomerEncryptionKey `json:"machineImageEncryptionKey,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SavedDisks: An array of Machine Image specific properties for disks attached - // to the - // source instance - SavedDisks []*SavedDisk `json:"savedDisks,omitempty"` - // SelfLink: [Output Only] The URL for this machine image. The server defines - // this URL. - SelfLink string `json:"selfLink,omitempty"` - // SourceDiskEncryptionKeys: [Input Only] Thecustomer-supplied - // encryption key of the disks attached to the source instance. Required - // if the source disk is protected by a customer-supplied encryption key. - SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` - // SourceInstance: The source instance used to create the machine image. You - // can provide this - // as a partial or full URL to the resource. For example, the following - // are - // valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - SourceInstance string `json:"sourceInstance,omitempty"` - // SourceInstanceProperties: [Output Only] DEPRECATED: Please use - // instance_properties - // instead for source instance related properties. New properties will not - // be - // added to this field. - SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"` - // Status: [Output Only] The status of the machine image. One of the following - // values:INVALID, CREATING, READY,DELETING, and UPLOADING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "UPLOADING" - Status string `json:"status,omitempty"` - // StorageLocations: The regional or multi-regional Cloud Storage bucket - // location where themachine image is - // stored. - StorageLocations []string `json:"storageLocations,omitempty"` - // TotalStorageBytes: [Output Only] Total size of the storage used by the - // machine image. - TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImage) MarshalJSON() ([]byte, error) { - type NoMethod MachineImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImageList: A list of machine images. -type MachineImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineImage resources. - Items []*MachineImage `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#machineImagesListResponse for machine image lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineImageListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageList) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineImageListWarning: [Output Only] Informational warning message. -type MachineImageListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineImageListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineImageListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineImageListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineType: Represents a Machine Type resource. -// -// You can use specific machine types for your VM instances based on -// performance -// and pricing requirements. For more information, readMachine Types. -type MachineType struct { - // Accelerators: [Output Only] A list of accelerator configurations assigned to - // this - // machine type. - Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` - // Architecture: [Output Only] The architecture of the machine type. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // BundledLocalSsds: [Output Only] The configuration of bundled local SSD for - // the machine type. - BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // machine type. - // Only applicable if the machine type is unavailable. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // GuestCpus: [Output Only] The number of virtual CPUs that are available to - // the - // instance. - GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IsSharedCpu: [Output Only] Whether this machine type has a shared CPU. - // SeeShared-core machine - // types for more information. - IsSharedCpu bool `json:"isSharedCpu,omitempty"` - // Kind: [Output Only] The type of the resource. Alwayscompute#machineType for - // machine types. - Kind string `json:"kind,omitempty"` - // MaximumPersistentDisks: [Output Only] Maximum persistent disks allowed. - MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent disks - // size (GB) allowed. - MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - // MemoryMb: [Output Only] The amount of physical memory available to the - // instance, - // defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Zone: [Output Only] The name of the zone where the machine type - // resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineType) MarshalJSON() ([]byte, error) { - type NoMethod MachineType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAccelerators struct { - // GuestAcceleratorCount: Number of accelerator cards exposed to the guest. - GuestAcceleratorCount int64 `json:"guestAcceleratorCount,omitempty"` - // GuestAcceleratorType: The accelerator type resource name, not a full URL, - // e.g.nvidia-tesla-t4. - GuestAcceleratorType string `json:"guestAcceleratorType,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestAcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestAcceleratorCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAccelerators) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAccelerators - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineTypesScopedList resources. - Items map[string]MachineTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#machineTypeAggregatedList for aggregated lists of - // machine types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type MachineTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeList: Contains a list of machine types. -type MachineTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MachineType resources. - Items []*MachineType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#machineTypeList - // for lists of machine types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *MachineTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypeListWarning: [Output Only] Informational warning message. -type MachineTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedList struct { - // MachineTypes: [Output Only] A list of machine types contained in this scope. - MachineTypes []*MachineType `json:"machineTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // machine types - // list is empty. - Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MachineTypesScopedListWarning: [Output Only] An informational warning that -// appears when the machine types -// list is empty. -type MachineTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MachineTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MachineTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedInstance: A Managed Instance resource. -type ManagedInstance struct { - // AllInstancesConfig: [Output Only] Current all-instances configuration - // revision applied to this - // instance. - AllInstancesConfig *ManagedInstanceAllInstancesConfig `json:"allInstancesConfig,omitempty"` - // CurrentAction: [Output Only] The current action that the managed instance - // group has - // scheduled for the instance. Possible values: - // - // - NONE The instance is running, and the managed - // instance group does not have any scheduled actions for this instance. - // - CREATING The managed instance group is creating this - // instance. If the group fails to create this instance, it will try again - // until it is successful. - // - CREATING_WITHOUT_RETRIES The managed instance group - // is attempting to create this instance only once. If the group fails - // to create this instance, it does not try again and the group'stargetSize - // value is decreased instead. - // - RECREATING The managed instance group is recreating - // this instance. - // - DELETING The managed instance group is permanently - // deleting this instance. - // - ABANDONING The managed instance group is abandoning - // this instance. The instance will be removed from the instance group - // and from any target pools that are associated with this group. - // - RESTARTING The managed instance group is restarting - // the instance. - // - REFRESHING The managed instance group is applying - // configuration changes to the instance without stopping it. For example, - // the group can update the target pool list for an instance without - // stopping that instance. - // - VERIFYING The managed instance group has created the - // instance and it is in the process of being verified. - // - // Possible values: - // "ABANDONING" - The managed instance group is abandoning this instance. The - // instance - // will be removed from the instance group and from any target pools that - // are associated with this group. - // "CREATING" - The managed instance group is creating this instance. If the - // group - // fails to create this instance, it will try again until it is - // successful. - // "CREATING_WITHOUT_RETRIES" - The managed instance group is attempting to - // create this instance - // only once. If the group fails to create this instance, it does - // not try again and the group's targetSize value is - // decreased. - // "DELETING" - The managed instance group is permanently deleting this - // instance. - // "NONE" - The managed instance group has not scheduled any actions for - // this - // instance. - // "RECREATING" - The managed instance group is recreating this instance. - // "REFRESHING" - The managed instance group is applying configuration - // changes to the - // instance without stopping it. For example, the group can update the - // target pool list for an instance without stopping that instance. - // "RESTARTING" - The managed instance group is restarting this instance. - // "RESUMING" - The managed instance group is resuming this instance. - // "STARTING" - The managed instance group is starting this instance. - // "STOPPING" - The managed instance group is stopping this instance. - // "SUSPENDING" - The managed instance group is suspending this instance. - // "VERIFYING" - The managed instance group is verifying this already created - // instance. - // Verification happens every time the instance is (re)created or restarted - // and consists of: - // 1. Waiting until health check specified as part of this managed instance - // group's autohealing policy reports HEALTHY. - // Note: Applies only if autohealing policy has a health check specified - // 2. Waiting for addition verification steps performed as post-instance - // creation (subject to future extensions). - CurrentAction string `json:"currentAction,omitempty"` - // Id: [Output only] The unique identifier for this resource. This field is - // empty - // when instance does not exist. - Id uint64 `json:"id,omitempty,string"` - // Instance: [Output Only] The URL of the instance. The URL can exist even if - // the - // instance has not yet been created. - Instance string `json:"instance,omitempty"` - // InstanceHealth: [Output Only] Health state of the instance per health-check. - InstanceHealth []*ManagedInstanceInstanceHealth `json:"instanceHealth,omitempty"` - // InstanceStatus: [Output Only] The status of the instance. This field is - // empty when - // the instance does not exist. - // - // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing tear down - // tasks like network - // deprogramming, releasing quota, IP, tearing down disks etc. - // "PENDING" - For Flex Start provisioning instance is waiting for available - // capacity - // from Dynamic Workload Scheduler (DWS). - // "PENDING_STOP" - The instance is gracefully shutting down. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the instance - // is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being deleted or - // killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action or - // underlying - // failure). - InstanceStatus string `json:"instanceStatus,omitempty"` - // LastAttempt: [Output Only] Information about the last attempt to create or - // delete - // the instance. - LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - // Name: [Output Only] The name of the instance. The name always exists even if - // the - // instance has not yet been created. - Name string `json:"name,omitempty"` - // PreservedStateFromConfig: [Output Only] Preserved state applied from - // per-instance config - // for this instance. - PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"` - // PreservedStateFromPolicy: [Output Only] Preserved state generated based on - // stateful policy - // for this instance. - PreservedStateFromPolicy *PreservedState `json:"preservedStateFromPolicy,omitempty"` - // PropertiesFromFlexibilityPolicy: [Output Only] Instance properties selected - // for this instance resulting from - // InstanceFlexibilityPolicy. - PropertiesFromFlexibilityPolicy *ManagedInstancePropertiesFromFlexibilityPolicy `json:"propertiesFromFlexibilityPolicy,omitempty"` - // Scheduling: [Output Only] Information about the termination timestamp of the - // instance, - // if applicable. - Scheduling *ManagedInstanceScheduling `json:"scheduling,omitempty"` - // TargetStatus: [Output Only] The eventual status of the instance. The - // instance group - // manager will not be identified as stable till each managed instance - // reaches - // its targetStatus. - // - // Possible values: - // "ABANDONED" - The managed instance will eventually be ABANDONED, i.e. - // dissociated - // from the managed instance group. - // "DELETED" - The managed instance will eventually be DELETED. - // "RUNNING" - The managed instance will eventually reach status RUNNING. - // "STOPPED" - The managed instance will eventually reach status TERMINATED. - // "SUSPENDED" - The managed instance will eventually reach status SUSPENDED. - TargetStatus string `json:"targetStatus,omitempty"` - // Version: [Output Only] Intended version of this instance. - Version *ManagedInstanceVersion `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstancesConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstance) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceAllInstancesConfig struct { - // Revision: [Output Only] Current all-instances configuration revision. - // This value is in RFC3339 text format. - Revision string `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Revision") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Revision") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceAllInstancesConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceAllInstancesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceInstanceHealth struct { - // DetailedHealthState: [Output Only] The current detailed instance health - // state. - // - // Possible values: - // "DRAINING" - The instance is being drained. The existing connections to - // the instance - // have time to complete, but the new ones are being refused. - // "HEALTHY" - The instance is reachable i.e. a connection to the application - // health - // checking endpoint can be established, and conforms to the - // requirements - // defined by the health check. - // "TIMEOUT" - The instance is unreachable i.e. a connection to the - // application health - // checking endpoint cannot be established, or the server does not - // respond - // within the specified timeout. - // "UNHEALTHY" - The instance is reachable, but does not conform to the - // requirements - // defined by the health check. - // "UNKNOWN" - The health checking system is aware of the instance but its - // health is - // not known at the moment. - DetailedHealthState string `json:"detailedHealthState,omitempty"` - // HealthCheck: [Output Only] The URL for the health check that verifies - // whether the - // instance is healthy. - HealthCheck string `json:"healthCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetailedHealthState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetailedHealthState") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceInstanceHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttempt struct { - // Errors: [Output Only] Encountered errors during the last attempt to create - // or - // delete the instance. - Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttempt - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors during -// the last attempt to create or -// delete the instance. -type ManagedInstanceLastAttemptErrors struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*ManagedInstanceLastAttemptErrorsErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceLastAttemptErrorsErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceLastAttemptErrorsErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstancePropertiesFromFlexibilityPolicy struct { - // Disks: List of disks to be attached to the instance. - Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineType: The machine type to be used for this instance. - MachineType string `json:"machineType,omitempty"` - // MinCpuPlatform: Name of the minimum CPU platform to be used by this - // instance. - // e.g. 'Intel Ice Lake'. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // ProvisioningModel: The provisioning model to be used for this instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstancePropertiesFromFlexibilityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstancePropertiesFromFlexibilityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceScheduling struct { - // TerminationTimestamp: [Output Only] The timestamp at which the managed - // instance will be - // terminated. This is in RFC3339 text format. - TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "TerminationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TerminationTimestamp") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceScheduling) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceScheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceVersion struct { - // InstanceTemplate: [Output Only] The intended template of the instance. This - // field is empty - // when current_action is one of { DELETING, ABANDONING }. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // Name: [Output Only] Name of the version. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedInstanceVersion) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Metadata: A metadata key/value entry. -type Metadata struct { - // Fingerprint: Specifies a fingerprint for this request, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve the resource. - Fingerprint string `json:"fingerprint,omitempty"` - // Items: Array of key/value pairs. The total size of all keys and values must - // be - // less than 512 KB. - Items []*MetadataItems `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#metadata - // for metadata. - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Metadata) MarshalJSON() ([]byte, error) { - type NoMethod Metadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataItems: Metadata -type MetadataItems struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. - // This is reflected as part of a URL in the metadata server. Additionally, - // to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - // Value: Value for the metadata entry. These are free-form strings, and - // only - // have meaning as interpreted by the image running in the instance. The - // only restriction placed on values is that their size must be less than - // or equal to 262144 bytes (256 KiB). - Value *string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataItems) MarshalJSON() ([]byte, error) { - type NoMethod MetadataItems - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataFilter: Opaque filter criteria used by load balancers to restrict -// routing -// configuration to a limited set of load balancing proxies. Proxies -// and -// sidecars involved in load balancing would typically present metadata to -// the -// load balancers that need to match criteria specified here. If a match -// takes -// place, the relevant configuration is made available to those -// proxies. -// -// For each metadataFilter in this list, if itsfilterMatchCriteria is set to -// MATCH_ANY, at least -// one of thefilterLabels must match the corresponding label provided in -// the metadata. If its filterMatchCriteria is set to -// MATCH_ALL, then all of its filterLabels must match with -// corresponding labels provided in the metadata. -// -// An example for using metadataFilters would be: if -// load balancing involves -// Envoys, they receive routing configuration when values inmetadataFilters -// match values supplied in of their XDS requests to loadbalancers. -type MetadataFilter struct { - // FilterLabels: The list of label value pairs that must match labels in the - // provided - // metadata based on filterMatchCriteria - // - // This list must not be empty and can have at the most 64 entries. - FilterLabels []*MetadataFilterLabelMatch `json:"filterLabels,omitempty"` - // FilterMatchCriteria: Specifies how individual filter label matches - // within the list of filterLabels and contributes toward the - // overall metadataFilter match. - // - // Supported values are: - // - // - MATCH_ANY: at least one of the filterLabels - // must have a matching label in the provided metadata. - // - MATCH_ALL: all filterLabels must have - // matching labels in the provided metadata. - // - // Possible values: - // "MATCH_ALL" - Specifies that all filterLabels must match for - // themetadataFilter to be considered a match. - // "MATCH_ANY" - Specifies that any filterLabel must match for - // themetadataFilter to be considered a match. - // "NOT_SET" - Indicates that the match criteria was not set. AmetadataFilter - // must never be created with this value. - FilterMatchCriteria string `json:"filterMatchCriteria,omitempty"` - // ForceSendFields is a list of field names (e.g. "FilterLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FilterLabels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataFilter) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataFilterLabelMatch: MetadataFilter label name value pairs that are -// expected -// to match corresponding labels presented as metadata to the load balancer. -type MetadataFilterLabelMatch struct { - // Name: Name of metadata label. - // - // The name can have a maximum length of 1024 characters and must be at - // least 1 character long. - Name string `json:"name,omitempty"` - // Value: The value of the label must match the specified value. - // - // value can have a maximum length of 1024 characters. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataFilterLabelMatch) MarshalJSON() ([]byte, error) { - type NoMethod MetadataFilterLabelMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMig: Multi-MIG represents a group of managed instance groups. -type MultiMig struct { - // CreationTimestamp: [Output only] The creation timestamp of this multi-MIG in - // RFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output only] The unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#multiMig for - // multi-MIGs. - Kind string `json:"kind,omitempty"` - // Name: The name of the multi-MIG. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Region: [Output only] The URL of the region where the resource resides. You - // must - // specify this field as part of the HTTP request URL. You cannot set - // the - // region as a field in the request body. - Region string `json:"region,omitempty"` - // ResourcePolicies: Resource policies for this multi-MIG. - ResourcePolicies *MultiMigResourcePolicies `json:"resourcePolicies,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - Status *MultiMigStatus `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMig) MarshalJSON() ([]byte, error) { - type NoMethod MultiMig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigResourcePolicies: Resource policies message for a multi-MIG. -// Specifies the workload policy -// configuration of the multi-MIG. -type MultiMigResourcePolicies struct { - // WorkloadPolicy: The URL of the workload policy for this multi-MIG. - // It can be a full or partial URL. For example, the following are - // all valid URLs to a workload policy: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/resourcePolicies/resourcePolicy - // - projects/project/regions/region/resourcePolicies/resourcePolicy - // - regions/region/resourcePolicies/resourcePolicy - WorkloadPolicy string `json:"workloadPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkloadPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigResourcePolicies) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigResourcePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatus struct { - // AppliedAcceleratorTopologies: [Output Only] The accelerator topology applied - // to this multi-MIG. - // Currently only one accelerator topology is supported. - AppliedAcceleratorTopologies []*MultiMigStatusAcceleratorTopology `json:"appliedAcceleratorTopologies,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AppliedAcceleratorTopologies") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppliedAcceleratorTopologies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatus) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopology struct { - // AcceleratorTopology: [Output Only] Topology in the format of: "16x16", - // "4x4x4", etc. - // The value is the same as configured in the WorkloadPolicy. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // AcceleratorTopologyState: [Output Only] The state of the accelerator - // topology. - // - // Possible values: - // "ACTIVATING" - The accelerator topology is being activated. - // "ACTIVE" - The accelerator topology is active. - // "ACTIVE_DEGRADED" - The accelerator topology is active but operating in - // degraded mode. - // "DEACTIVATING" - The accelerator topology is being deactivated. - // "FAILED" - The accelerator topology failed. - // "INCOMPLETE" - The configuration is incomplete and the accelerator - // topology cannot - // be activated due to insufficient number of running VMs. - AcceleratorTopologyState string `json:"acceleratorTopologyState,omitempty"` - // AcceleratorTopologyStateLastCheck: [Output Only] The result of the latest - // accelerator topology state - // check. - AcceleratorTopologyStateLastCheck *MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck `json:"acceleratorTopologyStateLastCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopology) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck struct { - // Error: [Output Only] Encountered errors on the last state check. - Error *MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError `json:"error,omitempty"` - // Timestamp: [Output Only] Timestamp is shown only if there is an error. The - // field - // has // RFC3339 // - // text format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError: -// [Output Only] Encountered errors on the last state check. -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheckErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsList struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of multi-MIGs in the specified project and region. - Items []*MultiMig `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // formaxResults, use the nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *MultiMigsListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsList) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigsListWarning: Informational warning message. -type MultiMigsListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*MultiMigsListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NamedPort: The named port. For example: <"http", 80>. -type NamedPort struct { - // Name: The name for this named port. - // The name must be 1-63 characters long, and comply withRFC1035. - Name string `json:"name,omitempty"` - // Port: The port number, which can be a value between 1 and 65535. - Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NamedPort) MarshalJSON() ([]byte, error) { - type NoMethod NamedPort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NatIpInfo: Contains NAT IP information of a NAT config (i.e. usage status, -// mode). -type NatIpInfo struct { - // NatIpInfoMappings: A list of all NAT IPs assigned to this NAT config. - NatIpInfoMappings []*NatIpInfoNatIpInfoMapping `json:"natIpInfoMappings,omitempty"` - // NatName: Name of the NAT config which the NAT IP belongs to. - NatName string `json:"natName,omitempty"` - // ForceSendFields is a list of field names (e.g. "NatIpInfoMappings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NatIpInfoMappings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfo) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NatIpInfoNatIpInfoMapping: Contains information of a NAT IP. -type NatIpInfoNatIpInfoMapping struct { - // Mode: Specifies whether NAT IP is auto or manual. - // - // Possible values: - // "AUTO" - // "MANUAL" - Mode string `json:"mode,omitempty"` - // NatIp: NAT IP address. For example: 203.0.113.11. - NatIp string `json:"natIp,omitempty"` - // Usage: Specifies whether NAT IP is currently serving at least one endpoint - // or - // not. - // - // Possible values: - // "IN_USE" - // "UNUSED" - Usage string `json:"usage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfoNatIpInfoMapping) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfoNatIpInfoMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NatIpInfoResponse struct { - // Result: [Output Only] A list of NAT IP information. - Result []*NatIpInfo `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NatIpInfoResponse) MarshalJSON() ([]byte, error) { - type NoMethod NatIpInfoResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Network: Represents a VPC Network resource. -// -// Networks connect resources to each other and to the internet. For -// more -// information, readVirtual Private Cloud (VPC) Network. -type Network struct { - // IPv4Range: Deprecated in favor of subnet mode networks. - // The range of internal addresses that are legal on this network. This - // range is aCIDR specification, for example:192.168.0.0/16. Provided by the - // client when the network is - // created. - IPv4Range string `json:"IPv4Range,omitempty"` - // AutoCreateSubnetworks: Must be set to create a VPC network. If not set, a - // legacy network is - // created. - // - // When set to true, the VPC network is created in auto mode. - // When set to false, the VPC network is created in custom mode. - // - // An auto mode VPC network starts with one subnet per region. Each subnet - // has a predetermined range as described inAuto mode VPC network IP - // ranges. - // - // For custom mode VPC networks, you can add subnets using the - // subnetworksinsert - // method. - AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableUlaInternalIpv6: Enable ULA internal ipv6 on this network. Enabling - // this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // . - EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` - // FirewallPolicy: [Output Only] URL of the firewall policy the network is - // associated with. - FirewallPolicy string `json:"firewallPolicy,omitempty"` - // GatewayIPv4: [Output Only] The gateway address for default routing out of - // the network, - // selected by Google Cloud. - GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Range: When enabling ula internal ipv6, caller optionally can - // specify the /48 - // range they want from the google defined ULA prefix fd20::/20. The input - // must be a valid /48 ULA IPv6 address and must be within the - // fd20::/20. - // Operation will fail if the speficied /48 is already in used by - // another - // resource. If the field is not speficied, then a /48 range will be - // randomly - // allocated from fd20::/20 and returned via this field. - // . - InternalIpv6Range string `json:"internalIpv6Range,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#network - // for - // networks. - Kind string `json:"kind,omitempty"` - // Mtu: Maximum Transmission Unit in bytes. - // The minimum value for this field is 1300 and the maximum value is 8896. - // The suggested value is 1500, which is the default MTU used on the - // Internet, or 8896 if you want to use Jumbo frames. If unspecified, the - // value defaults to 1460. - Mtu int64 `json:"mtu,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all following characters (except for the - // last - // character) must be a dash, lowercase letter, or digit. The last - // character - // must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // NetworkFirewallPolicyEnforcementOrder: The network firewall policy - // enforcement order. Can be either - // AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults - // to - // AFTER_CLASSIC_FIREWALL if the field is not specified. - // - // Possible values: - // "AFTER_CLASSIC_FIREWALL" - // "BEFORE_CLASSIC_FIREWALL" - NetworkFirewallPolicyEnforcementOrder string `json:"networkFirewallPolicyEnforcementOrder,omitempty"` - // NetworkProfile: A full or partial URL of the network profile to apply to - // this network. - // This field can be set only at resource creation time. For example, - // the - // following are valid URLs: - // - // - - // https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - // - projects/{project_id}/global/networkProfiles/{network_profile_name} - NetworkProfile string `json:"networkProfile,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *NetworkParams `json:"params,omitempty"` - // Peerings: [Output Only] A list of network peerings for the resource. - Peerings []*NetworkPeering `json:"peerings,omitempty"` - // RoutingConfig: The network-level routing configuration for this network. - // Used by Cloud - // Router to determine what type of network-wide routing behavior to enforce. - RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Subnetworks: [Output Only] Server-defined fully-qualified URLs for all - // subnetworks - // in this VPC network. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "IPv4Range") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPv4Range") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Network) MarshalJSON() ([]byte, error) { - type NoMethod Network - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachment: NetworkAttachments -// A network attachment resource ... -type NetworkAttachment struct { - // ConnectionEndpoints: [Output Only] An array of connections for all the - // producers connected - // to this network attachment. - ConnectionEndpoints []*NetworkAttachmentConnectedEndpoint `json:"connectionEndpoints,omitempty"` - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "INVALID" - ConnectionPreference string `json:"connectionPreference,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored - // in this object. This field is used in optimistic locking. An - // up-to-date - // fingerprint must be provided in order to patch. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: [Output Only] The URL of the network which the Network - // Attachment - // belongs to. Practically it is inferred by fetching the network of the - // first - // subnetwork associated. Because it is required that all the subnetworks - // must - // be from the same network, it is assured that the Network Attachment - // belongs - // to the same network as all the subnetworks. - Network string `json:"network,omitempty"` - // ProducerAcceptLists: Projects that are allowed to connect to this network - // attachment. - // The project can be specified using its id or number. - ProducerAcceptLists []string `json:"producerAcceptLists,omitempty"` - // ProducerRejectLists: Projects that are not allowed to connect to this - // network attachment. - // The project can be specified using its id or number. - ProducerRejectLists []string `json:"producerRejectLists,omitempty"` - // Region: [Output Only] URL of the region where the network attachment - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Subnetworks: An array of URLs where each entry is the URL of a - // subnet - // provided by the service consumer to use for - // endpoints in the producers that connect to this network attachment. - Subnetworks []string `json:"subnetworks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectionEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionEndpoints") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentAggregatedList: Contains a list of -// NetworkAttachmentsScopedList. -type NetworkAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachmentsScopedList resources. - Items map[string]NetworkAttachmentsScopedList `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentAggregatedListWarning: [Output Only] Informational warning -// message. -type NetworkAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentConnectedEndpoint: [Output Only] A connection connected to -// this network attachment. -type NetworkAttachmentConnectedEndpoint struct { - // IpAddress: The IPv4 address assigned to the producer instance network - // interface. - // This value will be a range in case of Serverless. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: The IPv6 address assigned to the producer instance network - // interface. - // This is only assigned when the stack types of both the instance - // network - // interface and the consumer subnet are IPv4_IPv6. - Ipv6Address string `json:"ipv6Address,omitempty"` - // ProjectIdOrNum: The project id or number of the interface to which the IP - // was assigned. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` - // SecondaryIpCidrRanges: Alias IP ranges from the same subnetwork. - SecondaryIpCidrRanges []string `json:"secondaryIpCidrRanges,omitempty"` - // Status: The status of a connected endpoint to this network attachment. - // - // Possible values: - // "ACCEPTED" - The consumer allows traffic from the producer to reach its - // VPC. - // "CLOSED" - The consumer network attachment no longer exists. - // "NEEDS_ATTENTION" - The consumer needs to take further action before - // traffic can be served. - // "PENDING" - The consumer neither allows nor prohibits traffic - // from the producer to reach its VPC. - // "REJECTED" - The consumer prohibits traffic from the producer to reach its - // VPC. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // Subnetwork: The subnetwork used to assign the IP to the producer - // instance network interface. - Subnetwork string `json:"subnetwork,omitempty"` - // SubnetworkCidrRange: [Output Only] The CIDR range of the subnet from which - // the IPv4 internal - // IP was allocated from. - SubnetworkCidrRange string `json:"subnetworkCidrRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentConnectedEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkAttachment resources. - Items []*NetworkAttachment `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentListWarning: [Output Only] Informational warning message. -type NetworkAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentsScopedList struct { - // NetworkAttachments: A list of NetworkAttachments contained in this scope. - NetworkAttachments []*NetworkAttachment `json:"networkAttachments,omitempty"` - // Warning: Informational warning which replaces the list of - // network attachments when the list is empty. - Warning *NetworkAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkAttachments") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkAttachmentsScopedListWarning: Informational warning which replaces -// the list of -// network attachments when the list is empty. -type NetworkAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityService: Represents a Google Cloud Armor network edge -// security service resource. -type NetworkEdgeSecurityService struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a NetworkEdgeSecurityService. An up-to-date fingerprint must - // be - // provided in order to update the NetworkEdgeSecurityService, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a NetworkEdgeSecurityService. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#networkEdgeSecurityService for - // NetworkEdgeSecurityServices - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the resource resides. You - // must - // specify this field as part of the HTTP request URL. It is not settable as - // a - // field in the request body. - Region string `json:"region,omitempty"` - // SecurityPolicy: The resource URL for the network edge security service - // associated with this - // network edge security service. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityService) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServiceAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEdgeSecurityServicesScopedList resources. - Items map[string]NetworkEdgeSecurityServicesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkEdgeSecurityServiceAggregatedList for lists of - // Network Edge Security Services. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEdgeSecurityServiceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityServiceAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkEdgeSecurityServiceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEdgeSecurityServiceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServiceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServiceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServicesScopedList struct { - // NetworkEdgeSecurityServices: A list of NetworkEdgeSecurityServices contained - // in this scope. - NetworkEdgeSecurityServices []*NetworkEdgeSecurityService `json:"networkEdgeSecurityServices,omitempty"` - // Warning: Informational warning which replaces the list of - // security policies when the list is empty. - Warning *NetworkEdgeSecurityServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "NetworkEdgeSecurityServices") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEdgeSecurityServices") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEdgeSecurityServicesScopedListWarning: Informational warning which -// replaces the list of -// security policies when the list is empty. -type NetworkEdgeSecurityServicesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEdgeSecurityServicesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEdgeSecurityServicesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEdgeSecurityServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEdgeSecurityServicesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpoint: The network endpoint. -type NetworkEndpoint struct { - // Annotations: Optional metadata defined as annotations on the network - // endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - // ClientDestinationPort: Represents the port number to which PSC consumer - // sends packets. - // - // Optional. Only valid for network endpoint groups created - // withGCE_VM_IP_PORTMAP endpoint type. - ClientDestinationPort int64 `json:"clientDestinationPort,omitempty"` - // Fqdn: Optional fully qualified domain name of network endpoint. This can - // only be - // specified when NetworkEndpointGroup.network_endpoint_type - // isNON_GCP_FQDN_PORT. - Fqdn string `json:"fqdn,omitempty"` - // Instance: The name or a URL of VM instance of this network - // endpoint. - // Optional, the field presence depends on the network endpoint type. The - // field is required for network endpoints of type GCE_VM_IP - // andGCE_VM_IP_PORT. - // - // The instance must be in the same zone of network endpoint group (for - // zonal - // NEGs) or in the zone within the region of the NEG (for regional NEGs). - // If the ipAddress is specified, it must belongs to the VM - // instance. - // - // The name must be 1-63 characters long, and comply withRFC1035 - // or be a valid URL pointing to an existing instance. - Instance string `json:"instance,omitempty"` - // IpAddress: Optional IPv4 address of network endpoint. The IP address must - // belong to a - // VM in Compute Engine (either the primary IP or as part of an aliased - // IP - // range). If the IP address is not specified, then the primary IP address - // for - // the VM instance in the network that the network endpoint group belongs - // to - // will be used. - // - // This field is redundant and need not be set for network endpoints of - // typeGCE_VM_IP. If set, it must be set to the primary internal IP - // address of the attached VM instance that matches the subnetwork of the - // NEG. - // The primary internal IP address from any NIC of a multi-NIC VM instance - // can - // be added to a NEG as long as it matches the NEG subnetwork. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: Optional IPv6 address of network endpoint. - Ipv6Address string `json:"ipv6Address,omitempty"` - // Port: Optional port number of network endpoint. If not specified, - // the - // defaultPort for the network endpoint group will be used. - // - // This field can not be set for network endpoints of typeGCE_VM_IP. - Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroup: Represents a collection of network endpoints. -// -// A network endpoint group (NEG) defines how a set of endpoints should -// be -// reached, whether they are reachable, and where they are located. -// For more information about using NEGs for different use cases, seeNetwork -// endpoint groups overview. -type NetworkEndpointGroup struct { - // Annotations: Optional. Metadata defined as annotations on the network - // endpoint group. - Annotations map[string]string `json:"annotations,omitempty"` - // AppEngine: Optional. Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine or cloudFunction may be set. - AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - // CloudFunction: Optional. Only valid when networkEndpointType isSERVERLESS. - // Only one of cloudRun,appEngine or cloudFunction may be set. - CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - // CloudRun: Optional. Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine or cloudFunction may be set. - CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultPort: The default port used if the port number is not specified in - // the network - // endpoint. - // - // Optional. If the network endpoint type is either GCE_VM_IP,SERVERLESS or - // PRIVATE_SERVICE_CONNECT, this - // field must not be specified. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkEndpointGroup - // for network endpoint group. - Kind string `json:"kind,omitempty"` - // LoadBalancer: This field is only valid when the network endpoint group is - // used for load - // balancing. - // [Deprecated] This field is deprecated. - LoadBalancer *NetworkEndpointGroupLbNetworkEndpointGroup `json:"loadBalancer,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which all network endpoints in the NEG - // belong. - // Uses default project network if unspecified. - Network string `json:"network,omitempty"` - // NetworkEndpointType: Type of network endpoints in this network endpoint - // group. Can be one ofGCE_VM_IP, GCE_VM_IP_PORT,NON_GCP_PRIVATE_IP_PORT, - // INTERNET_FQDN_PORT,INTERNET_IP_PORT, SERVERLESS,PRIVATE_SERVICE_CONNECT, - // GCE_VM_IP_PORTMAP. - // - // Possible values: - // "GCE_VM_IP" - The network endpoint is represented by an IP address. - // "GCE_VM_IP_PORT" - The network endpoint is represented by IP address and - // port pair. - // "GCE_VM_IP_PORTMAP" - The network endpoint is represented by an IP, Port - // and Client Destination - // Port. - // "INTERNET_FQDN_PORT" - The network endpoint is represented by fully - // qualified domain name and - // port. - // "INTERNET_IP_PORT" - The network endpoint is represented by an internet IP - // address and port. - // "NON_GCP_PRIVATE_IP_PORT" - The network endpoint is represented by an IP - // address and port. The - // endpoint belongs to a VM or pod running in a customer's on-premises. - // "PRIVATE_SERVICE_CONNECT" - The network endpoint is either public Google - // APIs or - // services exposed by other GCP Project with a Service Attachment. - // The connection is set up by private service connect - // "SERVERLESS" - The network endpoint is handled by specified serverless - // infrastructure. - NetworkEndpointType string `json:"networkEndpointType,omitempty"` - // PscData: Optional. Only valid when networkEndpointType - // isPRIVATE_SERVICE_CONNECT. - PscData *NetworkEndpointGroupPscData `json:"pscData,omitempty"` - // PscTargetService: The target service url used to set up private service - // connection to - // a Google API or a PSC Producer Service Attachment. - // An example value is: asia-northeast3-cloudkms.googleapis.com. - // - // Optional. Only valid when networkEndpointType isPRIVATE_SERVICE_CONNECT. - PscTargetService string `json:"pscTargetService,omitempty"` - // Region: [Output Only] The URL of theregion - // where the network endpoint group is located. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ServerlessDeployment: Only valid when networkEndpointType isSERVERLESS. Only - // one of cloudRun,appEngine, cloudFunction orserverlessDeployment may be set. - ServerlessDeployment *NetworkEndpointGroupServerlessDeployment `json:"serverlessDeployment,omitempty"` - // Size: [Output only] Number of network endpoints in the network endpoint - // group. - Size int64 `json:"size,omitempty"` - // Subnetwork: Optional URL of the subnetwork to which all network endpoints in - // the NEG - // belong. - Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the network endpoint group is located. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Annotations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroupsScopedList resources. - Items map[string]NetworkEndpointGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupAggregatedList for aggregated - // lists of network endpoint groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkEndpointGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupAppEngine: Configuration for an App Engine network -// endpoint group (NEG). -// The service is optional, may be provided explicitly or in the -// URL mask. The version is optional and can only be provided -// explicitly or in the URL mask when service is present. -// -// Note: App Engine service must be in the same project and located in the -// same region as the Serverless NEG. -type NetworkEndpointGroupAppEngine struct { - // Service: Optional serving service. - // - // The service name is case-sensitive and must be 1-63 - // characters long. - // - // Example value: default, my-service. - Service string `json:"service,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse service and version fields - // from a request URL. URL mask allows for routing to multiple App - // Engine - // services without having to create multiple Network Endpoint Groups - // and - // backend services. - // - // For example, the request URLsfoo1-dot-appname.appspot.com/v1 - // andfoo1-dot-appname.appspot.com/v2 can be backed by the same - // Serverless NEG with URL mask-dot-appname.appspot.com/. - // The URL mask will parse them to { service = "foo1", version = "v1" - // } and { service = "foo1", version = "v2" } - // respectively. - UrlMask string `json:"urlMask,omitempty"` - // Version: Optional serving version. - // - // The version name is case-sensitive and must be 1-100 - // characters long. - // - // Example value: v1, v2. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupAppEngine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupCloudFunction: Configuration for a Cloud Function -// network endpoint group (NEG). -// The function must be provided explicitly or in the URL mask. -// -// Note: Cloud Function must be in the same project and located in the -// same -// region as the Serverless NEG. -type NetworkEndpointGroupCloudFunction struct { - // Function: A user-defined name of the Cloud Function. - // - // The function name is case-sensitive and must be 1-63 - // characters long. - // - // Example value: func1. - Function string `json:"function,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse function field from a request URL. URL - // mask allows for routing to multiple Cloud Functions without having to - // create multiple Network Endpoint Groups and backend services. - // - // For example, request URLs mydomain.com/function1 andmydomain.com/function2 - // can be backed by the same - // Serverless NEG with URL mask /. The URL - // mask will parse them to { function = "function1" } and{ function = - // "function2" } respectively. - UrlMask string `json:"urlMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Function") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Function") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupCloudFunction) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudFunction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupCloudRun: Configuration for a Cloud Run network endpoint -// group (NEG). -// The service must be provided explicitly or in the URL mask. -// The tag is optional, may be provided explicitly or in the URL -// mask. -// -// Note: Cloud Run service must be in the same project and located in the -// same -// region as the Serverless NEG. -type NetworkEndpointGroupCloudRun struct { - // Service: Cloud Run service is the main resource of Cloud Run. - // - // The service must be 1-63 characters long, and comply withRFC1035. - // - // Example value: "run-service". - Service string `json:"service,omitempty"` - // Tag: Optional Cloud Run tag represents the "named-revision" to provide - // additional - // fine-grained traffic routing information. - // - // The tag must be 1-63 characters long, and comply withRFC1035. - // - // Example value: "revision-0010". - Tag string `json:"tag,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse and fields from a request URL. URL mask - // allows for - // routing to multiple Run services without having to create multiple - // network endpoint groups and backend services. - // - // For example, request URLs foo1.domain.com/bar1 andfoo1.domain.com/bar2 can - // be backed by the same Serverless - // Network Endpoint Group (NEG) with URL mask.domain.com/. The - // URL mask will - // parse them to { service="bar1", tag="foo1" } and { - // service="bar2", tag="foo2" } respectively. - UrlMask string `json:"urlMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupCloudRun - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific fields -// for network endpoint group. -type NetworkEndpointGroupLbNetworkEndpointGroup struct { - // DefaultPort: The default port used if the port number is not specified in - // the network - // endpoint. - // - // If the network endpoint type is either GCE_VM_IP,SERVERLESS or - // PRIVATE_SERVICE_CONNECT, this - // field must not be specified. - // [Deprecated] This field is deprecated. - DefaultPort int64 `json:"defaultPort,omitempty"` - // Network: The URL of the network to which all network endpoints in the NEG - // belong. - // Uses default project network if unspecified. - // [Deprecated] This field is deprecated. - Network string `json:"network,omitempty"` - // Subnetwork: Optional URL of the subnetwork to which all network endpoints in - // the NEG - // belong. - // [Deprecated] This field is deprecated. - Subnetwork string `json:"subnetwork,omitempty"` - // Zone: [Output Only] The URL of thezone - // where the network endpoint group is located. - // [Deprecated] This field is deprecated. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultPort") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultPort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupLbNetworkEndpointGroup) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupLbNetworkEndpointGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointGroup resources. - Items []*NetworkEndpointGroup `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupList for network endpoint group - // lists. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupListWarning: [Output Only] Informational warning -// message. -type NetworkEndpointGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupPscData: All data that is specifically relevant to only -// network endpoint groups of -// type PRIVATE_SERVICE_CONNECT. -type NetworkEndpointGroupPscData struct { - // ConsumerPscAddress: [Output Only] Address allocated from given subnetwork - // for PSC. This IP - // address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in - // L7 PSC-XLB. - ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` - // ProducerPort: The psc producer port is used to connect PSC NEG with specific - // port on - // the PSC Producer side; should only be used for the - // PRIVATE_SERVICE_CONNECT NEG type - ProducerPort int64 `json:"producerPort,omitempty"` - // PscConnectionId: [Output Only] The PSC connection id of the PSC Network - // Endpoint Group - // Consumer. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // PscConnectionStatus: [Output Only] The connection status of the PSC - // Forwarding Rule. - // - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer and will not - // serve - // traffic going forward. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer - // needs to take further action before the forwarding rule can serve - // traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The connection has been rejected by the producer. - // "STATUS_UNSPECIFIED" - PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerPscAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerPscAddress") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupPscData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupPscData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupServerlessDeployment: Configuration for a serverless -// network endpoint group (NEG). Theplatform must be provided. -// -// Note: The target backend service must be in the same project and located -// in -// the same region as the Serverless NEG. -type NetworkEndpointGroupServerlessDeployment struct { - // Platform: The platform of the backend target(s) of this NEG. - // The only supported value is - // API Gateway: apigateway.googleapis.com. - Platform string `json:"platform,omitempty"` - // Resource: The user-defined name of the workload/instance. This value must - // be - // provided explicitly or in the urlMask. The resource - // identified by this value is platform-specific and is as follows: - // - // - // - // 1. API Gateway: The gateway ID - // 2. App Engine: The service name - // 3. Cloud Functions: The function name - // 4. Cloud Run: The service name - Resource string `json:"resource,omitempty"` - // UrlMask: An URL - // mask is one of the main components of the Cloud Function. - // - // A template to parse platform-specific fields from a request URL. URL - // mask - // allows for routing to multiple resources on the same serverless - // platform - // without having to create multiple Network Endpoint Groups and - // backend - // resources. The fields parsed by this template are platform-specific and - // are as follows: - // - // - // - // 1. API Gateway: The gateway ID - // 2. App Engine: The service and version - // 3. Cloud Functions: The function name - // 4. Cloud Run: The service and tag - UrlMask string `json:"urlMask,omitempty"` - // Version: The optional resource version. The version identified by this value - // is - // platform-specific and is follows: - // - // - // - // 1. API Gateway: Unused - // 2. App Engine: The service version - // 3. Cloud Functions: Unused - // 4. Cloud Run: The service tag - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Platform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Platform") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupServerlessDeployment) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupServerlessDeployment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequest struct { - // EndpointFilters: Optional list of endpoints to query. - // This is a more efficient but also limited version of filter - // parameter. - // Endpoints in the filter must have ip_address and port fields - // populated, - // other fields are not supported. - EndpointFilters []*NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter `json:"endpointFilters,omitempty"` - // HealthStatus: Optional query parameter for showing the health status of each - // network - // endpoint. Valid options are SKIP or SHOW. If you - // don't specify this parameter, the health status of network endpoints - // will - // not be provided. - // - // Possible values: - // "SHOW" - Show the health status for each network endpoint. Impacts latency - // of the - // call. - // "SKIP" - Health status for network endpoints will not be provided. - HealthStatus string `json:"healthStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndpointFilters") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointFilters") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter struct { - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListEndpointsRequestNetworkEndpointFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListNetworkEndpoints struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkEndpointWithHealthStatus resources. - Items []*NetworkEndpointWithHealthStatus `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute#networkEndpointGroupsListNetworkEndpoints for the list - // of network endpoints in the specified network endpoint group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkEndpointGroupsListNetworkEndpointsWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpoints) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpoints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupsListNetworkEndpointsWarning: [Output Only] -// Informational warning message. -type NetworkEndpointGroupsListNetworkEndpointsWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupsListNetworkEndpointsWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpointsWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsListNetworkEndpointsWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsListNetworkEndpointsWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsListNetworkEndpointsWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsScopedList struct { - // NetworkEndpointGroups: [Output Only] The list ofnetwork - // endpoint groups that are contained in this scope. - NetworkEndpointGroups []*NetworkEndpointGroup `json:"networkEndpointGroups,omitempty"` - // Warning: [Output Only] An informational warning that replaces the list of - // network - // endpoint groups when the list is empty. - Warning *NetworkEndpointGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpointGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpointGroups") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpointGroupsScopedListWarning: [Output Only] An informational -// warning that replaces the list of network -// endpoint groups when the list is empty. -type NetworkEndpointGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkEndpointGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkEndpointWithHealthStatus struct { - // Healths: [Output only] The health status of network endpoint. - // - // Optional. Displayed only if the network endpoint has centralized - // health - // checking configured. - Healths []*HealthStatusForNetworkEndpoint `json:"healths,omitempty"` - // NetworkEndpoint: [Output only] The network endpoint. - NetworkEndpoint *NetworkEndpoint `json:"networkEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Healths") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Healths") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpointWithHealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpointWithHealthStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkFirewallPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of FirewallPoliciesScopedList resources. - Items map[string]FirewallPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkFirewallPoliciesAggregatedList for lists of - // network firewall policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkFirewallPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkFirewallPolicyAggregatedListWarning: [Output Only] Informational -// warning message. -type NetworkFirewallPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkFirewallPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkFirewallPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkFirewallPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkFirewallPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkInterface: A network interface resource attached to an instance. -type NetworkInterface struct { - // AccessConfigs: An array of configurations for this interface. Currently, - // only one access - // config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs - // specified, then this instance will have - // no external internet access. - AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` - // AliasIpRanges: An array of alias IP ranges for this network interface. - // You can only specify this field for network interfaces in VPC networks. - AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` - // Fingerprint: Fingerprint hash of contents stored in this network - // interface. - // This field will be ignored when inserting an Instance or - // adding a NetworkInterface. An up-to-date - // fingerprint must be provided in order to update theNetworkInterface. The - // request will fail with error400 Bad Request if the fingerprint is not - // provided, or412 Precondition Failed if the fingerprint is out of date. - Fingerprint string `json:"fingerprint,omitempty"` - // IgmpQuery: Indicate whether igmp query is enabled on the network - // interface - // or not. If enabled, also indicates the version of IGMP supported. - // - // Possible values: - // "IGMP_QUERY_DISABLED" - The network interface has disabled IGMP query. - // "IGMP_QUERY_V2" - The network interface has enabled IGMP query - v2. - IgmpQuery string `json:"igmpQuery,omitempty"` - // InternalIpv6PrefixLength: The prefix length of the primary internal IPv6 - // range. - InternalIpv6PrefixLength int64 `json:"internalIpv6PrefixLength,omitempty"` - // Ipv6AccessConfigs: An array of IPv6 access configurations for this - // interface. Currently, only - // one IPv6 access config, DIRECT_IPV6, is supported. If there - // is no ipv6AccessConfig specified, then this instance will - // have no external IPv6 Internet access. - Ipv6AccessConfigs []*AccessConfig `json:"ipv6AccessConfigs,omitempty"` - // Ipv6AccessType: [Output Only] One of EXTERNAL, INTERNAL to indicate whether - // the IP can be - // accessed from the Internet. This field is always inherited from - // its - // subnetwork. - // - // Valid only if stackType is IPV4_IPV6. - // - // Possible values: - // "EXTERNAL" - This network interface can have external IPv6. - // "INTERNAL" - This network interface can have internal IPv6. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Ipv6Address: An IPv6 internal network address for this network interface. - // To - // use a static internal IP address, it must be unused and in the same - // region - // as the instance's zone. If not specified, Google Cloud will - // automatically - // assign an internal IPv6 address from the instance's subnetwork. - Ipv6Address string `json:"ipv6Address,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkInterface for - // network interfaces. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of the network interface, which is generated by - // the - // server. For a VM, the network interface uses the nicN naming - // format. Where N is a value between 0 and7. The default interface value is - // nic0. - Name string `json:"name,omitempty"` - // Network: URL of the VPC network resource for this instance. When creating - // an - // instance, if neither the network nor the subnetwork is specified, - // the - // default network global/networks/default is used. If the - // selected project doesn't have the default network, you must specify - // a - // network or subnet. If the network is not specified but the subnetwork - // is - // specified, the network is inferred. - // - // If you specify this property, you can specify the network as - // a full or partial URL. For example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // - projects/project/global/networks/network - // - global/networks/default - Network string `json:"network,omitempty"` - // NetworkAttachment: The URL of the network attachment that this interface - // should connect - // to in the following - // format: - // projects/{project_number}/regions/{region_name}/networkAttachments/{network_a - // ttachment_name}. - NetworkAttachment string `json:"networkAttachment,omitempty"` - // NetworkIP: An IPv4 internal IP address to assign to the instance for this - // network - // interface. If not specified by the user, an unused internal IP is - // assigned by the system. - NetworkIP string `json:"networkIP,omitempty"` - // NicType: The type of vNIC to be used on this interface. This may be gVNIC - // or - // VirtioNet. - // - // Possible values: - // "GVNIC" - GVNIC - // "IDPF" - IDPF - // "IRDMA" - IRDMA - // "MRDMA" - MRDMA - // "UNSPECIFIED_NIC_TYPE" - No type specified. - // "VIRTIO_NET" - VIRTIO - NicType string `json:"nicType,omitempty"` - // ParentNicName: Name of the parent network interface of a dynamic network - // interface. - ParentNicName string `json:"parentNicName,omitempty"` - // QueueCount: The networking queue count that's specified by users for the - // network - // interface. Both Rx and Tx queues will be set to this number. It'll be - // empty - // if not specified by the users. - QueueCount int64 `json:"queueCount,omitempty"` - // StackType: The stack type for this network interface. To assign only IPv4 - // addresses, - // use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_IPV6. If not - // specified, IPV4_ONLY is used. - // - // This field can be both set at instance creation and update network - // interface operations. - // - // Possible values: - // "IPV4_IPV6" - The network interface can have both IPv4 and IPv6 addresses. - // "IPV4_ONLY" - The network interface will only be assigned IPv4 addresses. - // "IPV6_ONLY" - The network interface will only be assigned IPv6 addresses. - StackType string `json:"stackType,omitempty"` - // Subnetwork: The URL of the Subnetwork resource for this instance. If the - // network - // resource is inlegacy - // mode, do not specify this field. If the network is in auto subnet - // mode, specifying the subnetwork is optional. If the network is in - // custom - // subnet mode, specifying the subnetwork is required. If you specify - // this - // field, you can specify the subnetwork as a full or partial URL. For - // example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // - // - regions/region/subnetworks/subnetwork - Subnetwork string `json:"subnetwork,omitempty"` - // Vlan: VLAN tag of a dynamic network interface, must be an integer in the - // range - // from 2 to 255 inclusively. - Vlan int64 `json:"vlan,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccessConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkInterface) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkList: Contains a list of networks. -type NetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Network resources. - Items []*Network `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#networkList for - // lists of networks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkListWarning: [Output Only] Informational warning message. -type NetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkParams: Additional network parameters. -type NetworkParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkParams) MarshalJSON() ([]byte, error) { - type NoMethod NetworkParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeering: A network peering attached to a network resource. The -// message includes the -// peering name, peer network, peering state, and a flag indicating -// whether -// Google Compute Engine should automatically create routes for the peering. -type NetworkPeering struct { - // AutoCreateRoutes: This field will be deprecated soon. Use - // theexchange_subnet_routes field instead. - // Indicates whether full mesh connectivity is created and - // managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ConnectionStatus: [Output Only] The effective state of the peering - // connection - // as a whole. - ConnectionStatus *NetworkPeeringConnectionStatus `json:"connectionStatus,omitempty"` - // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is created - // and managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` - // ExportCustomRoutes: Whether to export the custom routes to peer network. The - // default value is - // false. - ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` - // ExportSubnetRoutesWithPublicIp: Whether subnet routes with public IP range - // are exported. The default value - // is true, all subnet routes are exported.IPv4 - // special-use ranges are always - // exported to peers and are not controlled by this field. - ExportSubnetRoutesWithPublicIp bool `json:"exportSubnetRoutesWithPublicIp,omitempty"` - // ImportCustomRoutes: Whether to import the custom routes from peer network. - // The default value is - // false. - ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` - // ImportSubnetRoutesWithPublicIp: Whether subnet routes with public IP range - // are imported. The default value - // is false.IPv4 - // special-use ranges are always - // imported from peers and are not controlled by this field. - ImportSubnetRoutesWithPublicIp bool `json:"importSubnetRoutesWithPublicIp,omitempty"` - // Name: Name of this peering. Provided by the client when the peering is - // created. - // The name must comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Network: The URL of the peer network. It can be either full URL or partial - // URL. The - // peer network may belong to a different project. If the partial URL does - // not - // contain project, it is assumed that the peer network is in the same - // project - // as the current network. - Network string `json:"network,omitempty"` - // PeerMtu: [Output Only] Maximum Transmission Unit in bytes of the peer - // network. - PeerMtu int64 `json:"peerMtu,omitempty"` - // StackType: Which IP version(s) of traffic and routes are allowed to be - // imported or - // exported between peer networks. The default value is IPV4_ONLY. - // - // Possible values: - // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to - // be - // exchanged. Additionally if the matching peering is - // IPV4_IPV6, IPv6 traffic and routes will be exchanged as - // well. - // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes to - // be - // exchanged, even if the matching peering is IPV4_IPV6. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. - // The - // peering is `ACTIVE` when there's a matching configuration in the - // peer - // network. - // - // Possible values: - // "ACTIVE" - Matching configuration exists on the peer. - // "INACTIVE" - There is no matching configuration on the peer, including the - // case when - // peer does not exist. - State string `json:"state,omitempty"` - // StateDetails: [Output Only] Details about the current state of the peering. - StateDetails string `json:"stateDetails,omitempty"` - // UpdateStrategy: The update strategy determines the semantics for updates and - // deletes to the - // peering connection configuration. - // - // Possible values: - // "CONSENSUS" - Updates are reflected in the local peering but aren't - // applied to the - // peering connection until a complementary change is made to the - // matching peering. - // To delete a peering with the consensus update strategy, both the - // peerings - // must request the deletion of the peering before the peering can be - // deleted. - // "INDEPENDENT" - In this mode, changes to the peering configuration can - // be unilaterally altered by changing either side of the peering. - // This is the default value if the field is unspecified. - // "UNSPECIFIED" - Peerings with update strategy UNSPECIFIED are created - // with - // update strategy INDEPENDENT. - UpdateStrategy string `json:"updateStrategy,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeering) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeering - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeeringConnectionStatus: [Output Only] Describes the state of a -// peering connection, not just the -// local peering. This field provides information about the effective -// settings -// for the connection as a whole, including pending delete/update requests -// for -// CONSENSUS peerings. -type NetworkPeeringConnectionStatus struct { - // ConsensusState: The consensus state contains information about the status of - // update - // and delete for a consensus peering connection. - ConsensusState *NetworkPeeringConnectionStatusConsensusState `json:"consensusState,omitempty"` - // TrafficConfiguration: The active connectivity settings for the peering - // connection based on the - // settings of the network peerings. - TrafficConfiguration *NetworkPeeringConnectionStatusTrafficConfiguration `json:"trafficConfiguration,omitempty"` - // UpdateStrategy: The update strategy determines the update/delete semantics - // for this - // peering connection. - // - // Possible values: - // "CONSENSUS" - Updates are reflected in the local peering but aren't - // applied to the - // peering connection until a complementary change is made to the - // matching peering. - // To delete a peering with the consensus update strategy, both the - // peerings - // must request the deletion of the peering before the peering can be - // deleted. - // "INDEPENDENT" - In this mode, changes to the peering configuration can - // be unilaterally altered by changing either side of the peering. - // This is the default value if the field is unspecified. - // "UNSPECIFIED" - Peerings with update strategy UNSPECIFIED are created - // with - // update strategy INDEPENDENT. - UpdateStrategy string `json:"updateStrategy,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsensusState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsensusState") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatus) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPeeringConnectionStatusConsensusState: The status of update/delete -// for a consensus peering connection. Only set -// when connection_status.update_strategy isCONSENSUS or a network peering is -// proposing to update the -// strategy to CONSENSUS. -type NetworkPeeringConnectionStatusConsensusState struct { - // DeleteStatus: The status of the delete request. - // - // Possible values: - // "DELETE_ACKNOWLEDGED" - Both network admins have agreed this consensus - // peering connection can - // be deleted. - // "DELETE_STATUS_UNSPECIFIED" - // "LOCAL_DELETE_REQUESTED" - Network admin has requested deletion of this - // peering connection. - // "PEER_DELETE_REQUESTED" - The peer network admin has requested deletion of - // this peering - // connection. - DeleteStatus string `json:"deleteStatus,omitempty"` - // UpdateStatus: The status of the update request. - // - // Possible values: - // "IN_SYNC" - No pending configuration update proposals to the peering - // connection. - // "PENDING_LOCAL_ACKNOWLEDMENT" - The peer network admin has made an - // updatePeering call. The change is - // awaiting acknowledgment from this peering's network admin. - // "PENDING_PEER_ACKNOWLEDGEMENT" - The local network admin has made an - // updatePeering call. The change - // is awaiting acknowledgment from the peer network admin. - // "UPDATE_STATUS_UNSPECIFIED" - UpdateStatus string `json:"updateStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeleteStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeleteStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatusConsensusState) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatusConsensusState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPeeringConnectionStatusTrafficConfiguration struct { - // ExportCustomRoutesToPeer: Whether custom routes are being exported to the - // peer network. - ExportCustomRoutesToPeer bool `json:"exportCustomRoutesToPeer,omitempty"` - // ExportSubnetRoutesWithPublicIpToPeer: Whether subnet routes with public IP - // ranges are being exported to the - // peer network. - ExportSubnetRoutesWithPublicIpToPeer bool `json:"exportSubnetRoutesWithPublicIpToPeer,omitempty"` - // ImportCustomRoutesFromPeer: Whether custom routes are being imported from - // the peer network. - ImportCustomRoutesFromPeer bool `json:"importCustomRoutesFromPeer,omitempty"` - // ImportSubnetRoutesWithPublicIpFromPeer: Whether subnet routes with public IP - // ranges are being imported - // from the peer network. - ImportSubnetRoutesWithPublicIpFromPeer bool `json:"importSubnetRoutesWithPublicIpFromPeer,omitempty"` - // StackType: Which IP version(s) of traffic and routes are being imported - // or - // exported between peer networks. - // - // Possible values: - // "IPV4_IPV6" - This Peering will allow IPv4 traffic and routes to - // be - // exchanged. Additionally if the matching peering is - // IPV4_IPV6, IPv6 traffic and routes will be exchanged as - // well. - // "IPV4_ONLY" - This Peering will only allow IPv4 traffic and routes to - // be - // exchanged, even if the matching peering is IPV4_IPV6. - StackType string `json:"stackType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExportCustomRoutesToPeer") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExportCustomRoutesToPeer") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPeeringConnectionStatusTrafficConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPeeringConnectionStatusTrafficConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPerformanceConfig struct { - // Possible values: - // "DEFAULT" - // "TIER_1" - TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalEgressBandwidthTier") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalEgressBandwidthTier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPerformanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPoliciesScopedList struct { - // NetworkPolicies: A list of network policies contained in this scope. - NetworkPolicies []*NetworkPolicy `json:"networkPolicies,omitempty"` - // Warning: Informational warning which replaces the list of network policies - // when - // the list is empty. - Warning *NetworkPoliciesScopedListWarning `json:"warning,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPoliciesScopedListWarning: Informational warning which replaces the -// list of network policies when -// the list is empty. -type NetworkPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicy: Represents a Network Policy resource. -type NetworkPolicy struct { - // Associations: [Output Only] A list of associations that belong to this - // network policy. - Associations []*NetworkPolicyAssociation `json:"associations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#networkPolicy for - // network policies - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the regional network policy - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all network policy rule tuples. - // A network - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // TrafficClassificationRules: [Output Only] A list of traffic classification - // rules that belong to this - // policy. - TrafficClassificationRules []*NetworkPolicyTrafficClassificationRule `json:"trafficClassificationRules,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkPoliciesScopedList resources. - Items map[string]NetworkPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#networkPolicyAggregatedList for lists of - // network policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkPolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyAggregatedListWarning: [Output Only] Informational warning -// message. -type NetworkPolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyAssociation struct { - // AttachmentTarget: The target that the network policy is attached to. - AttachmentTarget string `json:"attachmentTarget,omitempty"` - // Name: The name for an association. - 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. "AttachmentTarget") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentTarget") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkPolicy resources. - Items []*NetworkPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#networkPolicyList for - // lists of network policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyListWarning: [Output Only] Informational warning message. -type NetworkPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyTrafficClassificationRule: Represents a traffic classification -// rule that describes one or more match -// conditions along with the action to be taken when traffic matches -// this -// condition. -type NetworkPolicyTrafficClassificationRule struct { - // Action: The Action to perform when the client connection triggers the rule. - Action *NetworkPolicyTrafficClassificationRuleAction `json:"action,omitempty"` - // Description: An optional description for this resource. - Description string `json:"description,omitempty"` - // Disabled: Denotes whether the network policy rule is disabled. When set to - // true, - // the network policy rule is not enforced and traffic behaves as if it did - // not exist. If this is unspecified, the network policy rule will be - // enabled. - Disabled bool `json:"disabled,omitempty"` - // Kind: [Output only] Type of the resource. - // Alwayscompute#networkPolicyTrafficClassificationRule for network - // policy traffic classification rules - Kind string `json:"kind,omitempty"` - // Match: A match condition that outgoing traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *NetworkPolicyTrafficClassificationRuleMatcher `json:"match,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 1 and 2147482647. - // The priority values from 2147482648 to 2147483647 (1000) are reserved - // for - // system default network policy rules. Rules are evaluated from highest - // to - // lowest priority where 1 is the highest priority and 2147483647 is the - // lowest priority. - Priority int64 `json:"priority,omitempty"` - // RuleName: An optional name for the rule. This field is not a unique - // identifier - // and can be updated. - RuleName string `json:"ruleName,omitempty"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // network policy - // rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // TargetSecureTags: A list of secure tags that controls which instances the - // traffic - // classification rule applies to. If targetSecureTag are - // specified, then the traffic classification rule applies only to instances - // in the VPC network that have one of those EFFECTIVE secure tags, if all - // the targetSecureTag are in INEFFECTIVE state, then this rule - // will be ignored. targetSecureTag may not be set at the same - // time as targetServiceAccounts. If neithertargetServiceAccounts nor - // targetSecureTag are - // specified, the traffic classification rule applies to all instances on - // the specified network. Maximum number of target label tags allowed is - // 256. - TargetSecureTags []*NetworkPolicyTrafficClassificationRuleSecureTag `json:"targetSecureTags,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRule) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleAction struct { - // DscpMode: DSCP mode. When set to AUTO, the DSCP value will be - // picked - // automatically based on selected trafficClass. Otherwise,dscpValue needs to - // be explicitly specified. - // - // Possible values: - // "AUTO" - DSCP value will be automatically picked up based on - // configured - // traffic_class. - // "CUSTOM" - Allows to specify custom DSCP value from selected - // traffic_class - // range. - DscpMode string `json:"dscpMode,omitempty"` - // DscpValue: Custom DSCP value from 0-63 range. - DscpValue int64 `json:"dscpValue,omitempty"` - // TrafficClass: The traffic class that should be applied to the matching - // packet. - // - // Possible values: - // "TC1" - Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. - // "TC2" - Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx. - // "TC3" - Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx. - // "TC4" - Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx. - // "TC5" - Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx. - // "TC6" - Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx. - TrafficClass string `json:"trafficClass,omitempty"` - // Type: Always "apply_traffic_classification" for traffic classification - // rules. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DscpMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DscpMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleAction) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyTrafficClassificationRuleMatcher: Represents a match condition -// that incoming traffic is evaluated against. -// Exactly one field must be specified. -type NetworkPolicyTrafficClassificationRuleMatcher struct { - // DestIpRanges: CIDR IP address range. - // Maximum number of destination CIDR IP ranges allowed is 5000. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should match. - Layer4Configs []*NetworkPolicyTrafficClassificationRuleMatcherLayer4Config `json:"layer4Configs,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of source CIDR IP ranges allowed is 5000. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleMatcherLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a traffic classification rule. This value can - // either be one of the following well known protocol strings - // (tcp, udp, icmp,esp, ah, ipip,sctp), or the IP protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP, TCP or SCTP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies - // to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleMatcherLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleMatcherLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkPolicyTrafficClassificationRuleSecureTag struct { - // Name: Name of the secure tag, created with TagManager's TagValue API. - Name string `json:"name,omitempty"` - // State: [Output Only] State of the secure tag, either `EFFECTIVE` - // or - // `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted - // or its network is deleted. - // - // Possible values: - // "EFFECTIVE" - // "INEFFECTIVE" - // "STATE_UNSPECIFIED" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyTrafficClassificationRuleSecureTag) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyTrafficClassificationRuleSecureTag - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfile: NetworkProfile represents a Google managed network profile -// resource. -type NetworkProfile struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Features: [Output Only] Features supported by the network. - Features *NetworkProfileNetworkFeatures `json:"features,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#networkProfile for - // network profiles. - Kind string `json:"kind,omitempty"` - // Location: [Output Only] Location to which the network is restricted. - Location *NetworkProfileLocation `json:"location,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // ProfileType: [Output Only] Type of the network profile. - ProfileType *NetworkProfileProfileType `json:"profileType,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfile) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfile - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileLocation struct { - Name string `json:"name,omitempty"` - // Possible values: - // "REGION" - // "ZONE" - Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileLocation) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileNetworkFeatures struct { - // AddressPurposes: Specifies what address purposes are supported. If empty, - // all address - // purposes are supported. - // - // Possible values: - // "DNS_RESOLVER" - DNS resolver address in the subnetwork. - // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. - // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for - // the VLAN attachment - // that is used in HA VPN over Cloud Interconnect. This regional - // internal IP address range must not overlap with any IP address range - // of subnet/route in the VPC network and its peering networks. After the - // VLAN attachment is created with the reserved IP address range, when - // creating a new VPN gateway, its interface IP address is allocated - // from the associated VLAN attachment’s IP address range. - // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. - // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used - // to configure Private - // Service Connect. This purpose can be specified only forGLOBAL addresses of - // Type INTERNAL - // "SERVERLESS" - A regional internal IP address range reserved for - // Serverless. - // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be - // shared by multiple Internal - // Load Balancer forwarding rules. - // "VPC_PEERING" - IP range for peer networks. - AddressPurposes []string `json:"addressPurposes,omitempty"` - // AllowAliasIpRanges: Specifies whether alias IP ranges (and secondary address - // ranges) are - // allowed. - // - // Possible values: - // "ALIAS_IP_RANGES_ALLOWED" - // "ALIAS_IP_RANGES_BLOCKED" - AllowAliasIpRanges string `json:"allowAliasIpRanges,omitempty"` - // AllowAutoModeSubnet: Specifies whether auto mode subnet creation is allowed. - // - // Possible values: - // "AUTO_MODE_SUBNET_ALLOWED" - // "AUTO_MODE_SUBNET_BLOCKED" - AllowAutoModeSubnet string `json:"allowAutoModeSubnet,omitempty"` - // AllowClassDFirewalls: Specifies whether firewalls for Class D address ranges - // are supported. - // - // Possible values: - // "CLASS_D_FIREWALLS_ALLOWED" - // "CLASS_D_FIREWALLS_BLOCKED" - AllowClassDFirewalls string `json:"allowClassDFirewalls,omitempty"` - // AllowCloudNat: Specifies whether cloud NAT creation is allowed. - // - // Possible values: - // "CLOUD_NAT_ALLOWED" - // "CLOUD_NAT_BLOCKED" - AllowCloudNat string `json:"allowCloudNat,omitempty"` - // AllowCloudRouter: Specifies whether cloud router creation is allowed. - // - // Possible values: - // "CLOUD_ROUTER_ALLOWED" - // "CLOUD_ROUTER_BLOCKED" - AllowCloudRouter string `json:"allowCloudRouter,omitempty"` - // AllowDefaultNicAttachment: Specifies whether default NIC attachment is - // allowed. - // - // Possible values: - // "DEFAULT_NIC_ATTACHMENT_ALLOWED" - // "DEFAULT_NIC_ATTACHMENT_BLOCKED" - AllowDefaultNicAttachment string `json:"allowDefaultNicAttachment,omitempty"` - // AllowExternalIpAccess: Specifies whether VMs are allowed to have external IP - // access on network - // interfaces connected to this VPC. - // - // Possible values: - // "EXTERNAL_IP_ACCESS_ALLOWED" - // "EXTERNAL_IP_ACCESS_BLOCKED" - AllowExternalIpAccess string `json:"allowExternalIpAccess,omitempty"` - // AllowFirewallPolicy: Specifies whether firewall policy can be attached to - // the network. - // - // Possible values: - // "FIREWALL_POLICY_ALLOWED" - // "FIREWALL_POLICY_BLOCKED" - AllowFirewallPolicy string `json:"allowFirewallPolicy,omitempty"` - // AllowInterconnect: Specifies whether Cloud Interconnect creation is allowed. - // - // Possible values: - // "INTERCONNECT_ALLOWED" - // "INTERCONNECT_BLOCKED" - AllowInterconnect string `json:"allowInterconnect,omitempty"` - // AllowIpForwarding: Specifies whether IP forwarding is allowed. - // - // Possible values: - // "IP_FORWARDING_ALLOWED" - // "IP_FORWARDING_BLOCKED" - AllowIpForwarding string `json:"allowIpForwarding,omitempty"` - // AllowLoadBalancing: Specifies whether cloud load balancing is allowed. - // - // Possible values: - // "LOAD_BALANCING_ALLOWED" - // "LOAD_BALANCING_BLOCKED" - AllowLoadBalancing string `json:"allowLoadBalancing,omitempty"` - // AllowMultiNicInSameNetwork: Specifies whether multi-nic in the same network - // is allowed. - // - // Possible values: - // "MULTI_NIC_IN_SAME_NETWORK_ALLOWED" - // "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" - AllowMultiNicInSameNetwork string `json:"allowMultiNicInSameNetwork,omitempty"` - // AllowMulticast: Specifies whether multicast is allowed. - // - // Possible values: - // "MULTICAST_ALLOWED" - // "MULTICAST_BLOCKED" - AllowMulticast string `json:"allowMulticast,omitempty"` - // AllowNcc: Specifies whether NCC is allowed. - // - // Possible values: - // "NCC_ALLOWED" - // "NCC_BLOCKED" - AllowNcc string `json:"allowNcc,omitempty"` - // AllowNetworkMigration: Specifies whether VM network migration is allowed. - // - // Possible values: - // "NETWORK_MIGRATION_ALLOWED" - // "NETWORK_MIGRATION_BLOCKED" - AllowNetworkMigration string `json:"allowNetworkMigration,omitempty"` - // AllowPacketMirroring: Specifies whether Packet Mirroring 1.0 is supported. - // - // Possible values: - // "PACKET_MIRRORING_ALLOWED" - // "PACKET_MIRRORING_BLOCKED" - AllowPacketMirroring string `json:"allowPacketMirroring,omitempty"` - // AllowPrivateGoogleAccess: Specifies whether private Google access is - // allowed. - // - // Possible values: - // "PRIVATE_GOOGLE_ACCESS_ALLOWED" - // "PRIVATE_GOOGLE_ACCESS_BLOCKED" - AllowPrivateGoogleAccess string `json:"allowPrivateGoogleAccess,omitempty"` - // AllowPsc: Specifies whether PSC creation is allowed. - // - // Possible values: - // "PSC_ALLOWED" - // "PSC_BLOCKED" - AllowPsc string `json:"allowPsc,omitempty"` - // AllowSameNetworkUnicast: Specifies whether unicast within the same network - // is allowed. - // - // Possible values: - // "SAME_NETWORK_UNICAST_ALLOWED" - // "SAME_NETWORK_UNICAST_BLOCKED" - AllowSameNetworkUnicast string `json:"allowSameNetworkUnicast,omitempty"` - // AllowStaticRoutes: Specifies whether static route creation is allowed. - // - // Possible values: - // "STATIC_ROUTES_ALLOWED" - // "STATIC_ROUTES_BLOCKED" - AllowStaticRoutes string `json:"allowStaticRoutes,omitempty"` - // AllowSubInterfaces: Specifies whether sub interfaces are allowed. - // - // Possible values: - // "SUBINTERFACES_ALLOWED" - // "SUBINTERFACES_BLOCKED" - AllowSubInterfaces string `json:"allowSubInterfaces,omitempty"` - // AllowVpcPeering: Specifies whether VPC peering is allowed. - // - // Possible values: - // "VPC_PEERING_ALLOWED" - // "VPC_PEERING_BLOCKED" - AllowVpcPeering string `json:"allowVpcPeering,omitempty"` - // AllowVpn: Specifies whether VPN creation is allowed. - // - // Possible values: - // "VPN_ALLOWED" - // "VPN_BLOCKED" - AllowVpn string `json:"allowVpn,omitempty"` - // Possible values: - // "RDMA_ROCE_POLICY" - // "VPC_POLICY" - FirewallPolicyTypes []string `json:"firewallPolicyTypes,omitempty"` - // InterfaceTypes: If set, limits the interface types that the network - // supports. If - // empty, all interface types are supported. - // - // Possible values: - // "GVNIC" - GVNIC - // "IDPF" - IDPF - // "IRDMA" - IRDMA - // "MRDMA" - MRDMA - // "UNSPECIFIED_NIC_TYPE" - No type specified. - // "VIRTIO_NET" - VIRTIO - InterfaceTypes []string `json:"interfaceTypes,omitempty"` - // Multicast: Specifies which type of multicast is supported. - // - // Possible values: - // "MULTICAST_SDN" - // "MULTICAST_ULL" - Multicast string `json:"multicast,omitempty"` - // SubnetPurposes: Specifies which subnetwork purposes are supported. - // - // Possible values: - // "SUBNET_PURPOSE_CUSTOM_HARDWARE" - // "SUBNET_PURPOSE_PRIVATE" - SubnetPurposes []string `json:"subnetPurposes,omitempty"` - // SubnetStackTypes: Specifies which subnetwork stack types are supported. - // - // Possible values: - // "SUBNET_STACK_TYPE_IPV4_IPV6" - // "SUBNET_STACK_TYPE_IPV4_ONLY" - // "SUBNET_STACK_TYPE_IPV6_ONLY" - SubnetStackTypes []string `json:"subnetStackTypes,omitempty"` - // SubnetworkPurposes: Specifies which subnetwork purposes are supported. - // - // Possible values: - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - SubnetworkPurposes []string `json:"subnetworkPurposes,omitempty"` - // SubnetworkStackTypes: Specifies which subnetwork stack types are supported. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 - // addresses. - SubnetworkStackTypes []string `json:"subnetworkStackTypes,omitempty"` - // Unicast: Specifies which type of unicast is supported. - // - // Possible values: - // "UNICAST_SDN" - // "UNICAST_ULL" - Unicast string `json:"unicast,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressPurposes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressPurposes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileNetworkFeatures) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileNetworkFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfileProfileType struct { - // Possible values: - // "RDMA" - RDMA network. - // "ULL" - ULL network. - // "VPC" - VPC network. - NetworkType string `json:"networkType,omitempty"` - // Possible values: - // "FALCON" - RDMA over Falcon. - // "ROCE" - RDMA over Converged Ethernet (RoCE). - RdmaSubtype string `json:"rdmaSubtype,omitempty"` - // Possible values: - // "OPERATOR" - Exchange operator. - // "PARTICIPANT" - Exchange participant. - UllSubtype string `json:"ullSubtype,omitempty"` - // Possible values: - // "REGIONAL" - Regionally bound VPC network. - VpcSubtype string `json:"vpcSubtype,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfileProfileType) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfileProfileType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfilesListResponse: Contains a list of network profiles. -type NetworkProfilesListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NetworkProfile resources. - Items []*NetworkProfile `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#networkProfileList for - // network profiles. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value - // for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken - // to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NetworkProfilesListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkProfilesListResponseWarning: [Output Only] Informational warning -// message. -type NetworkProfilesListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NetworkProfilesListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworkProfilesListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkProfilesListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NetworkProfilesListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkRoutingConfig: A routing configuration attached to a network -// resource. The message -// includes the list of routers associated with the network, and a -// flag -// indicating the type of routing behavior to enforce network-wide. -type NetworkRoutingConfig struct { - // BgpAlwaysCompareMed: Enable comparison of Multi-Exit Discriminators (MED) - // across routes with - // different neighbor ASNs when using the STANDARD BGP best path - // selection - // algorithm. - BgpAlwaysCompareMed bool `json:"bgpAlwaysCompareMed,omitempty"` - // BgpBestPathSelectionMode: The BGP best path selection algorithm to be - // employed within this network - // for dynamic routes learned by Cloud Routers. Can be LEGACY - // (default) or STANDARD. - // - // Possible values: - // "LEGACY" - // "STANDARD" - BgpBestPathSelectionMode string `json:"bgpBestPathSelectionMode,omitempty"` - // BgpInterRegionCost: Allows to define a preferred approach for handling - // inter-region cost in - // the selection process when using the STANDARD BGP best path - // selection algorithm. Can be DEFAULT orADD_COST_TO_MED. - // - // Possible values: - // "ADD_COST_TO_MED" - // "DEFAULT" - BgpInterRegionCost string `json:"bgpInterRegionCost,omitempty"` - // EffectiveBgpAlwaysCompareMed: [Output Only] Effective value of the - // bgp_always_compare_med - // field. - EffectiveBgpAlwaysCompareMed bool `json:"effectiveBgpAlwaysCompareMed,omitempty"` - // EffectiveBgpInterRegionCost: [Output Only] Effective value of the - // bgp_inter_region_cost - // field. - // - // Possible values: - // "ADD_COST_TO_MED" - // "DEFAULT" - EffectiveBgpInterRegionCost string `json:"effectiveBgpInterRegionCost,omitempty"` - // RoutingMode: The network-wide routing mode to use. If set to REGIONAL, - // this network's Cloud Routers will only advertise routes with subnets - // of this network in the same region as the router. If set toGLOBAL, this - // network's Cloud Routers will advertise - // routes with all subnets of this network, across regions. - // - // Possible values: - // "GLOBAL" - // "REGIONAL" - RoutingMode string `json:"routingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BgpAlwaysCompareMed") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BgpAlwaysCompareMed") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkRoutingConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkRoutingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: This field will be deprecated soon. - // Useexchange_subnet_routes in network_peering - // instead. - // Indicates whether full mesh connectivity is created and - // managed - // automatically between peered networks. Currently this field should always - // be true since Google Compute Engine will automatically create and - // manage - // subnetwork routes between two networks when peering state isACTIVE. - AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // NetworkPeering: Network peering parameters. - // In order to specify route policies for peering using import and - // export - // custom routes, you must specify all peering related parameters - // (name, peer network,exchange_subnet_routes) in the - // network_peering - // field. - // The corresponding fields in NetworksAddPeeringRequest will be - // deprecated soon. - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` - // PeerNetwork: URL of the peer network. It can be either full URL or partial - // URL. The - // peer network may belong to a different project. If the partial URL does - // not - // contain project, it is assumed that the peer network is in the same - // project - // as the current network. - PeerNetwork string `json:"peerNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCreateRoutes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksAddPeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output Only] Effective firewalls from firewall policy. It - // returns Global - // Network Firewall Policies and Hierarchical Firewall Policies. - // UseregionNetworkFirewallPolicies.getEffectiveFirewalls to get - // Regional Network Firewall Policies as well. - FirewallPolicys []*NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - // OrganizationFirewalls: Effective firewalls from organization policies. - OrganizationFirewalls []*NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy `json:"organizationFirewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] Deprecated, please use short name instead. The - // display name - // of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to - // the network. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output Only] The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // ShortName: [Output Only] The short name of the firewall policy. - ShortName string `json:"shortName,omitempty"` - // Type: [Output Only] The type of the firewall policy. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "SYSTEM" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy: A pruned -// SecurityPolicy containing ID and any applicable firewall rules. -type NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy struct { - // Id: [Output Only] The unique identifier for the security policy. - // This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Rules: The rules that apply to the network. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworksGetEffectiveFirewallsResponseOrganizationFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksRemovePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksRequestRemovePeeringRequest struct { - // Name: Name of the peering, which should conform to RFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksRequestRemovePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksRequestRemovePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NetworksUpdatePeeringRequest struct { - NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkPeering") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkPeering") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { - type NoMethod NetworksUpdatePeeringRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroup: Represents a sole-tenant Node Group resource. -// -// A sole-tenant node is a physical server that is dedicated to -// hosting VM instances only for your specific project. Use sole-tenant nodes -// to -// keep your instances physically separated from instances in other projects, -// or -// to group your instances together on the same host hardware. For -// more -// information, readSole-tenant nodes. -type NodeGroup struct { - // AutoscalingPolicy: Specifies how autoscaling should behave. - AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeGroup for - // node group. - Kind string `json:"kind,omitempty"` - // LocationHint: An opaque location hint used to place the Node close to - // other - // resources. - // This field is for use by internal tools that use the public API. - // The location hint here on the NodeGroup overrides any location_hint - // present in the NodeTemplate. - LocationHint string `json:"locationHint,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted values - // are: `AS_NEEDED` and `RECURRENT`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MaintenancePolicy: Specifies how to handle instances when a node in the - // group undergoes - // maintenance. Set to one of: DEFAULT,RESTART_IN_PLACE, or - // MIGRATE_WITHIN_NODE_GROUP. - // The default value is DEFAULT. For more information, see - // Maintenance policies. - // - // Possible values: - // "DEFAULT" - Allow the node and corresponding instances to retain - // default - // maintenance behavior. - // "MAINTENANCE_POLICY_UNSPECIFIED" - // "MIGRATE_WITHIN_NODE_GROUP" - When maintenance must be done on a node, the - // instances on that node will - // be moved to other nodes in the group. - // Instances with onHostMaintenance = MIGRATE will live migrate to - // their - // destinations while instances with onHostMaintenance = TERMINATE - // will - // terminate and then restart on their destination nodes if - // automaticRestart = true. - // "RESTART_IN_PLACE" - Instances in this group will restart on the same node - // when maintenance - // has completed. Instances must have onHostMaintenance = TERMINATE, and - // they will only restart if automaticRestart = true. - MaintenancePolicy string `json:"maintenancePolicy,omitempty"` - MaintenanceWindow *NodeGroupMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // NodeTemplate: URL of the node template to create the node group from. - NodeTemplate string `json:"nodeTemplate,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ShareSettings: Share-settings for the node group - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // Size: [Output Only] The total number of nodes in the node group. - Size int64 `json:"size,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - Status string `json:"status,omitempty"` - // Zone: [Output Only] The name of the zone where the node group resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoscalingPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoscalingPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroup) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeGroupsScopedList resources. - Items map[string]NodeGroupsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#nodeGroupAggregatedList - // for aggregated lists of node - // groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupAggregatedListWarning: [Output Only] Informational warning message. -type NodeGroupAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupAutoscalingPolicy struct { - // MaxNodes: The maximum number of nodes that the group should have. Must be - // set if - // autoscaling is enabled. Maximum value allowed is 100. - MaxNodes int64 `json:"maxNodes,omitempty"` - // MinNodes: The minimum number of nodes that the group should have. - MinNodes int64 `json:"minNodes,omitempty"` - // Mode: The autoscaling mode. Set to one of: ON, OFF, - // or ONLY_SCALE_OUT. For more information, see - // Autoscaler modes. - // - // Possible values: - // "MODE_UNSPECIFIED" - // "OFF" - Autoscaling is disabled. - // "ON" - Autocaling is fully enabled. - // "ONLY_SCALE_OUT" - Autoscaling will only scale out and will not remove - // nodes. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxNodes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxNodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupAutoscalingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupAutoscalingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupList: Contains a list of nodeGroups. -type NodeGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeGroup resources. - Items []*NodeGroup `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeGroupList - // for lists of node groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupListWarning: [Output Only] Informational warning message. -type NodeGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupMaintenanceWindow: Time window specified for daily maintenance -// operations. GCE's internal -// maintenance will be performed within this window. -type NodeGroupMaintenanceWindow struct { - // MaintenanceDuration: [Output only] A predetermined duration for the window, - // automatically - // chosen to be the smallest possible in the given scenario. - MaintenanceDuration *Duration `json:"maintenanceDuration,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one - // of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceDuration") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupMaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupMaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupNode struct { - // Accelerators: Accelerators for this node. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // ConsumedResources: Node resources that are reserved by all instances. - ConsumedResources *InstanceConsumptionInfo `json:"consumedResources,omitempty"` - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - // Disks: Local disk configurations. - Disks []*LocalDisk `json:"disks,omitempty"` - // InstanceConsumptionData: Instance data that shows consumed resources on the - // node. - InstanceConsumptionData []*InstanceConsumptionData `json:"instanceConsumptionData,omitempty"` - // Instances: Instances scheduled on this node. - Instances []string `json:"instances,omitempty"` - // Name: The name of the node. - Name string `json:"name,omitempty"` - // NodeType: The type of this node. - NodeType string `json:"nodeType,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServerBinding: Binding properties for the physical server. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` - // ServerId: Server ID associated with this node. - ServerId string `json:"serverId,omitempty"` - // Possible values: - // "CREATING" - // "DELETING" - // "INVALID" - // "READY" - // "REPAIRING" - Status string `json:"status,omitempty"` - // TotalResources: Total amount of available resources on the node. - TotalResources *InstanceConsumptionInfo `json:"totalResources,omitempty"` - // UpcomingMaintenance: [Output Only] The information about an upcoming - // maintenance event. - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupNode) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupNode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsAddNodesRequest struct { - // AdditionalNodeCount: Count of additional nodes to be added to the node - // group. - AdditionalNodeCount int64 `json:"additionalNodeCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalNodeCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalNodeCount") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsAddNodesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsDeleteNodesRequest struct { - // Nodes: Names of the nodes to delete. - Nodes []string `json:"nodes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsDeleteNodesRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsDeleteNodesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsListNodes struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Node resources. - Items []*NodeGroupNode `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // alwayscompute.nodeGroupsListNodes for the list of nodes in the - // specified node group. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeGroupsListNodesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodes) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupsListNodesWarning: [Output Only] Informational warning message. -type NodeGroupsListNodesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupsListNodesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodesWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsListNodesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsListNodesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsListNodesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsPerformMaintenanceRequest struct { - // Nodes: [Required] List of nodes affected by the call. - Nodes []string `json:"nodes,omitempty"` - // StartTime: The start time of the schedule. The timestamp is an RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsScopedList struct { - // NodeGroups: [Output Only] A list of node groups contained in this scope. - NodeGroups []*NodeGroup `json:"nodeGroups,omitempty"` - // Warning: [Output Only] An informational warning that appears when the - // nodeGroup - // list is empty. - Warning *NodeGroupsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeGroups") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeGroups") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeGroupsScopedListWarning: [Output Only] An informational warning that -// appears when the nodeGroup -// list is empty. -type NodeGroupsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeGroupsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsSetNodeTemplateRequest struct { - // NodeTemplate: Full or partial URL of the node template resource to be - // updated for this - // node group. - NodeTemplate string `json:"nodeTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTemplate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSetNodeTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeGroupsSimulateMaintenanceEventRequest struct { - // Nodes: Names of the nodes to go under maintenance simulation. - Nodes []string `json:"nodes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Nodes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeGroupsSimulateMaintenanceEventRequest) MarshalJSON() ([]byte, error) { - type NoMethod NodeGroupsSimulateMaintenanceEventRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplate: Represent a sole-tenant Node Template resource. -// -// You can use a template to define properties for nodes in a node group. -// For -// more information, readCreating node groups -// and instances. -type NodeTemplate struct { - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // CpuOvercommitType: CPU overcommit. - // - // Possible values: - // "CPU_OVERCOMMIT_TYPE_UNSPECIFIED" - // "ENABLED" - // "NONE" - CpuOvercommitType string `json:"cpuOvercommitType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - Disks []*LocalDisk `json:"disks,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeTemplate for - // node templates. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NodeAffinityLabels: Labels to use for node affinity, which will be used in - // instance scheduling. - NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` - // NodeType: The node type to use for nodes group that are created from this - // template. - NodeType string `json:"nodeType,omitempty"` - // NodeTypeFlexibility: Do not use. Instead, use the node_type property. - NodeTypeFlexibility *NodeTemplateNodeTypeFlexibility `json:"nodeTypeFlexibility,omitempty"` - // Region: [Output Only] The name of the region where the node template - // resides, - // such as us-central1. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ServerBinding: Sets the binding properties for the physical server. Valid - // values include: - // - // - *[Default]* RESTART_NODE_ON_ANY_SERVER: - // Restarts VMs on any available - // physical server - // - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same - // physical server whenever possible - // - // - // - // See Sole-tenant - // node options for more information. - ServerBinding *ServerBinding `json:"serverBinding,omitempty"` - // Status: [Output Only] The status of the node template. One of the following - // values:CREATING, READY, and DELETING. - // - // Possible values: - // "CREATING" - Resources are being allocated. - // "DELETING" - The node template is currently being deleted. - // "INVALID" - Invalid status. - // "READY" - The node template is ready. - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation of the - // status. - StatusMessage string `json:"statusMessage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplate) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTemplatesScopedList resources. - Items map[string]NodeTemplatesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of - // resource.Alwayscompute#nodeTemplateAggregatedList for aggregated lists - // of - // node templates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateAggregatedListWarning: [Output Only] Informational warning -// message. -type NodeTemplateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateList: Contains a list of node templates. -type NodeTemplateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTemplate resources. - Items []*NodeTemplate `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTemplateList - // for lists of node templates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTemplateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplateListWarning: [Output Only] Informational warning message. -type NodeTemplateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplateNodeTypeFlexibility struct { - Cpus string `json:"cpus,omitempty"` - LocalSsd string `json:"localSsd,omitempty"` - Memory string `json:"memory,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cpus") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cpus") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplateNodeTypeFlexibility) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplateNodeTypeFlexibility - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplatesScopedList struct { - // NodeTemplates: [Output Only] A list of node templates contained in this - // scope. - NodeTemplates []*NodeTemplate `json:"nodeTemplates,omitempty"` - // Warning: [Output Only] An informational warning that appears when the node - // templates - // list is empty. - Warning *NodeTemplatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTemplates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTemplates") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTemplatesScopedListWarning: [Output Only] An informational warning that -// appears when the node templates -// list is empty. -type NodeTemplatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTemplatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTemplatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTemplatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeType: Represent a sole-tenant Node Type resource. -// -// Each node within a node group must have a node type. A node type -// specifies -// the total amount of cores and memory for that node. Currently, the -// only -// available node type is n1-node-96-624 node type that has 96 -// vCPUs and 624 GB of memory, available in multiple zones. For more -// information -// readNode types. -type NodeType struct { - // CpuPlatform: [Output Only] The CPU platform used by this node type. - CpuPlatform string `json:"cpuPlatform,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this node - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional textual description of the resource. - Description string `json:"description,omitempty"` - // GuestCpus: [Output Only] The number of virtual CPUs that are available to - // the node - // type. - GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] The type of the resource. Alwayscompute#nodeType for - // node types. - Kind string `json:"kind,omitempty"` - // LocalSsdGb: [Output Only] Local SSD available to the node type, defined in - // GB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` - // MaxVms: [Output Only] Maximum number of VMs that can be created for this - // node type. - MaxVms int64 `json:"maxVms,omitempty"` - // MemoryMb: [Output Only] The amount of physical memory available to the node - // type, - // defined in MB. - MemoryMb int64 `json:"memoryMb,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Zone: [Output Only] The name of the zone where the node type resides, - // such as us-central1-a. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CpuPlatform") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpuPlatform") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeType) MarshalJSON() ([]byte, error) { - type NoMethod NodeType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeTypesScopedList resources. - Items map[string]NodeTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#nodeTypeAggregatedList - // for aggregated lists of node - // types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeAggregatedListWarning: [Output Only] Informational warning message. -type NodeTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeList: Contains a list of node types. -type NodeTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NodeType resources. - Items []*NodeType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#nodeTypeList for - // lists of node types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NodeTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypeListWarning: [Output Only] Informational warning message. -type NodeTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypesScopedList struct { - // NodeTypes: [Output Only] A list of node types contained in this scope. - NodeTypes []*NodeType `json:"nodeTypes,omitempty"` - // Warning: [Output Only] An informational warning that appears when the node - // types - // list is empty. - Warning *NodeTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTypesScopedListWarning: [Output Only] An informational warning that -// appears when the node types -// list is empty. -type NodeTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NodeTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NodeTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpoint: Represents a notification endpoint. -// -// A notification endpoint resource defines an endpoint to receive -// notifications -// when there are status changes detected by the associated health -// check -// service. -// -// For more information, see -// Health checks overview. -type NotificationEndpoint struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GrpcSettings: Settings of the gRPC notification endpoint including the - // endpoint URL and - // the retry duration. - GrpcSettings *NotificationEndpointGrpcSettings `json:"grpcSettings,omitempty"` - // Id: [Output Only] A unique identifier for this resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#notificationEndpoint - // for notification endpoints. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the notification endpoint - // resides. - // This field applies only to the regional resource. You must specify - // this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointGrpcSettings: Represents a gRPC setting that describes -// one gRPC notification endpoint and -// the retry duration attempting to send notification to this endpoint. -type NotificationEndpointGrpcSettings struct { - // Authority: Optional. If specified, this field is used to set the authority - // header by - // the sender of notifications. - // See - // https://tools.ietf.org/html/rfc7540#section-8.1.2.3 - Authority string `json:"authority,omitempty"` - // Endpoint: Endpoint to which gRPC notifications are sent. This must be a - // valid - // gRPCLB DNS name. - Endpoint string `json:"endpoint,omitempty"` - // PayloadName: Optional. If specified, this field is used to populate the - // "name" field - // in gRPC requests. - PayloadName string `json:"payloadName,omitempty"` - // ResendInterval: Optional. This field is used to configure how often to send - // a full update - // of all non-healthy backends. If unspecified, full updates are not sent. - // If specified, must be in the range between 600 seconds to 3600 - // seconds. - // Nanos are disallowed. Can only be set for regional notification - // endpoints. - ResendInterval *Duration `json:"resendInterval,omitempty"` - // RetryDurationSec: How much time (in seconds) is spent attempting - // notification retries - // until a successful response is received. Default is 30s. Limit is - // 20m - // (1200s). Must be a positive number. - RetryDurationSec int64 `json:"retryDurationSec,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointGrpcSettings) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointGrpcSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of NotificationEndpoint resources. - Items []*NotificationEndpoint `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#notificationEndpoint - // for notification endpoints. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *NotificationEndpointListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointList) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationEndpointListWarning: [Output Only] Informational warning -// message. -type NotificationEndpointListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*NotificationEndpointListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointListWarning) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type NotificationEndpointListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod NotificationEndpointListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: Represents an Operation resource. -// -// Google Compute Engine has three Operation resources: -// -// * Global (/compute/docs/reference/rest/beta/globalOperations) -// * Regional (/compute/docs/reference/rest/beta/regionOperations) -// * Zonal (/compute/docs/reference/rest/beta/zoneOperations) -// -// You can use an operation resource to manage asynchronous API requests. -// For more information, readHandling -// API responses. -// -// Operations can be global, regional or zonal. -// -// - For global operations, use the `globalOperations` -// resource. -// - For regional operations, use the -// `regionOperations` resource. -// - For zonal operations, use -// the `zoneOperations` resource. -// -// For more information, read -// Global, Regional, and Zonal Resources. -// -// Note that completed Operation resources have a limited -// retention period. -type Operation struct { - // ClientOperationId: [Output Only] The value of `requestId` if you provided it - // in the request. - // Not present otherwise. - ClientOperationId string `json:"clientOperationId,omitempty"` - // CreationTimestamp: [Deprecated] This field is deprecated. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] A textual description of the operation, which - // is - // set when the operation is created. - Description string `json:"description,omitempty"` - // EndTime: [Output Only] The time that this operation was completed. This - // value is inRFC3339 - // text format. - EndTime string `json:"endTime,omitempty"` - // Error: [Output Only] If errors are generated during processing of the - // operation, - // this field will be populated. - Error *OperationError `json:"error,omitempty"` - // HttpErrorMessage: [Output Only] If the operation fails, this field contains - // the HTTP error - // message that was returned, such as `NOT FOUND`. - HttpErrorMessage string `json:"httpErrorMessage,omitempty"` - // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error - // status code that was returned. For example, a `404` means the - // resource was not found. - HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - // Id: [Output Only] The unique identifier for the operation. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InsertTime: [Output Only] The time that this operation was requested. - // This value is inRFC3339 - // text format. - InsertTime string `json:"insertTime,omitempty"` - InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` - // Kind: [Output Only] Type of the resource. Always `compute#operation` - // for - // Operation resources. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the operation. - Name string `json:"name,omitempty"` - // OperationGroupId: [Output Only] An ID that represents a group of operations, - // such as when a - // group of operations results from a `bulkInsert` API request. - OperationGroupId string `json:"operationGroupId,omitempty"` - // OperationType: [Output Only] The type of operation, such as - // `insert`, - // `update`, or `delete`, and so on. - OperationType string `json:"operationType,omitempty"` - // Progress: [Output Only] An optional progress indicator that ranges from 0 to - // 100. - // There is no requirement that this be linear or support any granularity - // of - // operations. This should not be used to guess when the operation will - // be - // complete. This number should monotonically increase as the - // operation - // progresses. - Progress int64 `json:"progress,omitempty"` - // Region: [Output Only] The URL of the region where the operation resides. - // Only - // applicable when performing regional operations. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the operation - // is for projects.setCommonInstanceMetadata, - // this field will contain information on all underlying zonal actions - // and - // their state. - SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` - // StartTime: [Output Only] The time that this operation was started by the - // server. - // This value is inRFC3339 - // text format. - StartTime string `json:"startTime,omitempty"` - // Status: [Output Only] The status of the operation, which can be one of - // the - // following: - // `PENDING`, `RUNNING`, or `DONE`. - // - // Possible values: - // "DONE" - // "PENDING" - // "RUNNING" - Status string `json:"status,omitempty"` - // StatusMessage: [Output Only] An optional textual description of the current - // status of the - // operation. - StatusMessage string `json:"statusMessage,omitempty"` - // TargetId: [Output Only] The unique target ID, which identifies a specific - // incarnation - // of the target resource. - TargetId uint64 `json:"targetId,omitempty,string"` - // TargetLink: [Output Only] The URL of the resource that the operation - // modifies. For - // operations related to creating a snapshot, this points to the disk - // that the snapshot was created from. - TargetLink string `json:"targetLink,omitempty"` - // User: [Output Only] User who requested the operation, for - // example: - // `user@example.com` or - // `alice_smith_identifier (global/workforcePools/example-com-us-employees)`. - User string `json:"user,omitempty"` - // Warnings: [Output Only] If warning messages are generated during processing - // of the - // operation, this field will be populated. - Warnings []*OperationWarnings `json:"warnings,omitempty"` - // Zone: [Output Only] The URL of the zone where the operation resides. - // Only - // applicable when performing per-zone operations. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientOperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientOperationId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationError: [Output Only] If errors are generated during processing of -// the operation, -// this field will be populated. -type OperationError struct { - // Errors: [Output Only] The array of errors encountered while processing - // this - // operation. - Errors []*OperationErrorErrors `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Errors") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Errors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrors struct { - // Code: [Output Only] The error type identifier for this error. - Code string `json:"code,omitempty"` - // ErrorDetails: [Output Only] An optional list of messages that contain the - // error - // details. There is a set of defined message types to use for - // providing - // details.The syntax depends on the error code. For example, - // QuotaExceededInfo will have details when the error code is - // QUOTA_EXCEEDED. - ErrorDetails []*OperationErrorErrorsErrorDetails `json:"errorDetails,omitempty"` - // Location: [Output Only] Indicates the field in the request that caused the - // error. - // This property is optional. - Location string `json:"location,omitempty"` - // Message: [Output Only] An optional, human-readable error message. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationErrorErrors) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrors - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationErrorErrorsErrorDetails struct { - ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` - Help *Help `json:"help,omitempty"` - LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` - QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { - type NoMethod OperationErrorErrorsErrorDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationWarnings) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod OperationWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped operation lists. - Items map[string]OperationsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // `compute#operationAggregatedList` - // for aggregated lists of operations. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger than - // `maxResults`, use the `nextPageToken` as a value for - // the query parameter `pageToken` in the next list request. - // Subsequent list requests will have their own `nextPageToken` to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *OperationAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationAggregatedListWarning: [Output Only] Informational warning message. -type OperationAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationList: Contains a list of Operation resources. -type OperationList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Operation resources. - Items []*Operation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always `compute#operations` for - // Operations - // resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger than - // `maxResults`, use the `nextPageToken` as a value for - // the query parameter `pageToken` in the next list request. - // Subsequent list requests will have their own `nextPageToken` to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *OperationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationList) MarshalJSON() ([]byte, error) { - type NoMethod OperationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationListWarning: [Output Only] Informational warning message. -type OperationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationsScopedList struct { - // Operations: [Output Only] A list of operations contained in this scope. - Operations []*Operation `json:"operations,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // operations - // when the list is empty. - Warning *OperationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Operations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Operations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationsScopedListWarning: [Output Only] Informational warning which -// replaces the list of operations -// when the list is empty. -type OperationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*OperationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod OperationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrganizationSecurityPoliciesListAssociationsResponse struct { - // Associations: A list of associations. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - // Kind: [Output Only] Type of securityPolicy associations. - // Alwayscompute#organizationSecurityPoliciesListAssociations for lists - // of securityPolicy associations. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Associations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Associations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OrganizationSecurityPoliciesListAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrganizationSecurityPoliciesListAssociationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OutlierDetection: Settings controlling the eviction of unhealthy hosts from -// the load balancing -// pool for the backend service. -type OutlierDetection struct { - // BaseEjectionTime: The base time that a backend endpoint is ejected for. - // Defaults to 30000ms - // or 30s. - // - // After a backend endpoint is returned back to the load balancing pool, it - // can be ejected again in another ejection analysis. Thus, the total - // ejection - // time is equal to the base ejection time multiplied by the number of - // times - // the backend endpoint has been ejected. Defaults to 30000ms or 30s. - BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` - // ConsecutiveErrors: Number of consecutive errors before a backend endpoint is - // ejected from the - // load balancing pool. When the backend endpoint is accessed over HTTP, a - // 5xx - // return code qualifies as an error. Defaults to 5. - ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` - // ConsecutiveGatewayFailure: The number of consecutive gateway failures (502, - // 503, 504 status or - // connection errors that are mapped to one of those status codes) before - // a - // consecutive gateway failure ejection occurs. Defaults to 3. - ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` - // EnforcingConsecutiveErrors: The percentage chance that a backend endpoint - // will be ejected when an - // outlier status is detected through consecutive 5xx. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` - // EnforcingConsecutiveGatewayFailure: The percentage chance that a backend - // endpoint will be ejected when an - // outlier status is detected through consecutive gateway failures. - // This - // setting can be used to disable ejection or to ramp it up slowly. Defaults - // to 100. - EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` - // EnforcingSuccessRate: The percentage chance that a backend endpoint will be - // ejected when an - // outlier status is detected through success rate statistics. This setting - // can be used to disable ejection or to ramp it up slowly. Defaults to - // 100. - // - // Not supported when the backend service uses Serverless NEG. - EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - // Interval: Time interval between ejection analysis sweeps. This can result in - // both new - // ejections and backend endpoints being returned to service. The interval - // is - // equal to the number of seconds as defined - // in - // outlierDetection.interval.seconds plus the number of nanoseconds as - // defined - // in outlierDetection.interval.nanos. Defaults to 1 second. - Interval *Duration `json:"interval,omitempty"` - // MaxEjectionPercent: Maximum percentage of backend endpoints in the load - // balancing pool for the - // backend service that can be ejected if the ejection conditions are - // met. - // Defaults to 50%. - MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` - // SuccessRateMinimumHosts: The number of backend endpoints in the load - // balancing pool that must have - // enough request volume to detect success rate outliers. If the number - // of - // backend endpoints is fewer than this setting, outlier detection via - // success - // rate statistics is not performed for any backend endpoint in the - // load - // balancing pool. Defaults to 5. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateMinimumHosts int64 `json:"successRateMinimumHosts,omitempty"` - // SuccessRateRequestVolume: The minimum number of total requests that must be - // collected in one interval - // (as defined by the interval duration above) to include this backend - // endpoint in success rate based outlier detection. If the volume is - // lower - // than this setting, outlier detection via success rate statistics is - // not - // performed for that backend endpoint. Defaults to 100. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateRequestVolume int64 `json:"successRateRequestVolume,omitempty"` - // SuccessRateStdevFactor: This factor is used to determine the ejection - // threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean - // success rate, and the product of this factor and the standard deviation - // of - // the mean success rate: mean - (stdev * successRateStdevFactor). This - // factor - // is divided by a thousand to get a double. That is, if the desired factor - // is 1.9, the runtime value should be 1900. Defaults to 1900. - // - // Not supported when the backend service uses Serverless NEG. - SuccessRateStdevFactor int64 `json:"successRateStdevFactor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BaseEjectionTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseEjectionTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OutlierDetection) MarshalJSON() ([]byte, error) { - type NoMethod OutlierDetection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketIntervals: Next free: 7 -type PacketIntervals struct { - // AvgMs: Average observed inter-packet interval in milliseconds. - AvgMs int64 `json:"avgMs,omitempty,string"` - // Duration: From how long ago in the past these intervals were observed. - // - // Possible values: - // "DURATION_UNSPECIFIED" - // "HOUR" - // "MAX" - From BfdSession object creation time. - // "MINUTE" - Duration string `json:"duration,omitempty"` - // MaxMs: Maximum observed inter-packet interval in milliseconds. - MaxMs int64 `json:"maxMs,omitempty,string"` - // MinMs: Minimum observed inter-packet interval in milliseconds. - MinMs int64 `json:"minMs,omitempty,string"` - // NumIntervals: Number of inter-packet intervals from which these statistics - // were derived. - NumIntervals int64 `json:"numIntervals,omitempty,string"` - // Type: The type of packets for which inter-packet intervals were computed. - // - // Possible values: - // "LOOPBACK" - Only applies to Echo packets. This shows the intervals - // between sending - // and receiving the same packet. - // "RECEIVE" - Intervals between received packets. - // "TRANSMIT" - Intervals between transmitted packets. - // "TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvgMs") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvgMs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketIntervals) MarshalJSON() ([]byte, error) { - type NoMethod PacketIntervals - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroring: Represents a Packet Mirroring resource. -// -// Packet Mirroring clones the traffic of specified instances in your -// Virtual -// Private Cloud (VPC) network and forwards it to a collector destination, -// such as an instance group of an internal TCP/UDP load balancer, for -// analysis -// or examination. -// For more information about setting up Packet Mirroring, seeUsing Packet -// Mirroring. -type PacketMirroring struct { - // CollectorIlb: The Forwarding Rule resource of - // typeloadBalancingScheme=INTERNAL that will be used as collector - // for mirrored traffic. - // The specified forwarding rule must have isMirroringCollector - // set to true. - CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Enable: Indicates whether or not this packet mirroring takes effect. - // If set to FALSE, this packet mirroring policy will not be enforced on - // the - // network. - // - // The default is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - // Filter: Filter for mirrored traffic. If unspecified, all IPv4 traffic is - // mirrored. - Filter *PacketMirroringFilter `json:"filter,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#packetMirroring for - // packet mirrorings. - Kind string `json:"kind,omitempty"` - // MirroredResources: PacketMirroring - // mirroredResourceInfos. - // MirroredResourceInfo specifies a set of mirrored VM instances, - // subnetworks - // and/or tags for which traffic from/to all VM instances will be mirrored. - MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Network: Specifies the mirrored VPC network. Only packets in this network - // will be - // mirrored. All mirrored VMs should have a NIC in the given network. - // All mirrored subnetworks should belong to the given network. - Network *PacketMirroringNetworkInfo `json:"network,omitempty"` - // Priority: The priority of applying this configuration. Priority is used to - // break ties - // in cases where there is more than one matching rule. In the case of - // two - // rules that apply for a given Instance, the one with the - // lowest-numbered - // priority value wins. - // - // Default value is 1000. Valid range is 0 through 65535. - Priority int64 `json:"priority,omitempty"` - // Region: [Output Only] URI of the region where the packetMirroring resides. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CollectorIlb") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CollectorIlb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroring) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroring - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringAggregatedList: Contains a list of packetMirrorings. -type PacketMirroringAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PacketMirroring resources. - Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringAggregatedListWarning: [Output Only] Informational warning -// message. -type PacketMirroringAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringFilter struct { - // IPProtocols: Protocols that apply as filter on mirrored traffic. - // If no protocols are specified, all traffic that matches the specified - // CIDR ranges is mirrored. - // If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic - // is - // mirrored. - IPProtocols []string `json:"IPProtocols,omitempty"` - // CidrRanges: One or more IPv4 or IPv6 CIDR ranges that apply as filters on - // the source - // (ingress) or destination (egress) IP in the IP header. If no ranges - // are - // specified, all IPv4 traffic that matches the specified IPProtocols - // is - // mirrored. If neither cidrRanges nor IPProtocols is specified, all - // IPv4 - // traffic is mirrored. To mirror all IPv4 and IPv6 traffic, - // use - // "0.0.0.0/0,::/0". - CidrRanges []string `json:"cidrRanges,omitempty"` - // Direction: Direction of traffic to mirror, either INGRESS, EGRESS, or - // BOTH. - // The default is BOTH. - // - // Possible values: - // "BOTH" - Default, both directions are mirrored. - // "EGRESS" - Only egress traffic is mirrored. - // "INGRESS" - Only ingress traffic is mirrored. - Direction string `json:"direction,omitempty"` - // ForceSendFields is a list of field names (e.g. "IPProtocols") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IPProtocols") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringFilter) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringForwardingRuleInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the forwarding rule; - // defined by the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the forwarding rule representing the ILB - // configured as destination of the mirrored traffic. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringForwardingRuleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringList: Contains a list of PacketMirroring resources. -type PacketMirroringList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PacketMirroring resources. - Items []*PacketMirroring `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#packetMirroring - // for packetMirrorings. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PacketMirroringListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringListWarning: [Output Only] Informational warning message. -type PacketMirroringListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfo struct { - // Instances: A set of virtual machine instances that are being mirrored. - // They must live in zones contained in the same region as - // this - // packetMirroring. - // - // Note that this config will apply only to those network interfaces of - // the - // Instances that belong to the network specified in this packetMirroring. - // - // You may specify a maximum of 50 Instances. - Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` - // Subnetworks: A set of subnetworks for which traffic from/to all VM instances - // will be - // mirrored. They must live in the same region as this packetMirroring. - // - // You may specify a maximum of 5 subnetworks. - Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` - // Tags: A set of mirrored tags. Traffic from/to all VM instances that have one - // or - // more of these tags will be mirrored. - Tags []string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfoInstanceInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the instance; defined by - // the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the virtual machine instance which is being mirrored. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringMirroredResourceInfoSubnetInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; defined by - // the - // server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: Resource URL to the subnetwork for which - // traffic from/to all VM instances will be mirrored. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringNetworkInfo struct { - // CanonicalUrl: [Output Only] Unique identifier for the network; defined by - // the server. - CanonicalUrl string `json:"canonicalUrl,omitempty"` - // Url: URL of the network resource. - Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalUrl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringNetworkInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringsScopedList struct { - // PacketMirrorings: A list of packetMirrorings contained in this scope. - PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` - // Warning: Informational warning which replaces the list of packetMirrorings - // when the - // list is empty. - Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "PacketMirrorings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PacketMirrorings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PacketMirroringsScopedListWarning: Informational warning which replaces the -// list of packetMirrorings when the -// list is empty. -type PacketMirroringsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PacketMirroringsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PacketMirroringsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PartnerMetadata: Model definition of partner_metadata field. -// To be used in dedicated Partner Metadata methods and to be inlined in -// the Instance and InstanceTemplate resources. -type PartnerMetadata struct { - // Fingerprint: Instance-level hash to be used for optimistic - // locking. - Fingerprint string `json:"fingerprint,omitempty"` - // PartnerMetadata: Partner Metadata assigned to the instance. A map from a - // subdomain to - // entries map. Subdomain name must be compliant withRFC1035 - // definition. The total size of all keys and values must be less than - // 2MB. - // Subdomain 'metadata.compute.googleapis.com' is reserverd for - // instance's - // metadata. - PartnerMetadata map[string]StructuredEntries `json:"partnerMetadata,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PartnerMetadata) MarshalJSON() ([]byte, error) { - type NoMethod PartnerMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PathMatcher: A matcher for the path portion of the URL. The -// BackendService -// from the longest-matched rule will serve the URL. If no rule was matched, -// the -// default service is used. -type PathMatcher struct { - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy specifies - // how the Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // This policy takes - // effect at the PathMatcher level and applies only when no - // policy has been defined for the error code at lower levels likeRouteRule and - // PathRule within thisPathMatcher. If an error code does not have a policy - // defined - // in defaultCustomErrorResponsePolicy, then a policy defined for - // the error code in UrlMap.defaultCustomErrorResponsePolicy - // takes effect. - // - // For example, consider a UrlMap with the following - // configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy is configured - // with policies for 5xx and 4xx errors - // - A RouteRule for /coming_soon/ is configured for the - // error code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in RouteRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // When - // used in conjunction withpathMatcher.defaultRouteAction.retryPolicy, retries - // take - // precedence. Only once all retries are exhausted, - // thedefaultCustomErrorResponsePolicy is applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the defaultCustomErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // defaultCustomErrorResponsePolicy is supported only for - // global external Application Load Balancers. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // - // pathRules or routeRules match. The load balancer - // performs advanced routing actions, such as URL rewrites and - // header transformations, before forwarding the request to the - // selected backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a path matcher'sdefaultRouteAction. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - // DefaultService: The full or partial URL to the BackendService resource. - // This - // URL is used if none of the pathRules orrouteRules defined by this - // PathMatcher are - // matched. For example, the - // following are all valid URLs to a BackendService resource: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService - // - compute/v1/projects/project/global/backendServices/backendService - // - global/backendServices/backendService - // - // - // If defaultRouteAction is also specified, advanced - // routing actions, such as URL rewrites, take effect before sending - // the - // request to the backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Authorization requires one or more of the following Google IAM permissions - // on the - // specified resource default_service: - // - // - // - compute.backendBuckets.use - // - compute.backendServices.use - DefaultService string `json:"defaultService,omitempty"` - // DefaultUrlRedirect: When none of the specified pathRules orrouteRules match, - // the request is redirected to a URL specified - // by defaultUrlRedirect. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backend service. - // - // HeaderAction specified here are applied after the matchingHttpRouteRule - // HeaderAction and before theHeaderAction in the UrlMap - // - // HeaderAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // Name: The name to which this PathMatcher is referred by theHostRule. - Name string `json:"name,omitempty"` - // PathRules: The list of path rules. Use this list instead of routeRules - // when routing based on simple path matching is all that's required. The - // order by which path rules are specified does not matter. Matches are - // always - // done on the longest-path-first basis. - // - // For example: a pathRule with a path /a/b/c/* will match - // before /a/b/* irrespective of the order in which those paths appear in - // this - // list. - // - // Within a given pathMatcher, only one ofpathRules or routeRules must be set. - PathRules []*PathRule `json:"pathRules,omitempty"` - // RouteRules: The list of HTTP route rules. Use this list instead ofpathRules - // when advanced route matching and routing actions are - // desired. routeRules are evaluated in order of priority, from - // the lowest to highest number. - // - // Within a given pathMatcher, you can set only one ofpathRules or routeRules. - RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "DefaultCustomErrorResponsePolicy") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s PathMatcher) MarshalJSON() ([]byte, error) { - type NoMethod PathMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PathRule: A path-matching rule for a URL. If matched, will use the -// specifiedBackendService to handle the traffic arriving at this URL. -type PathRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how the - // Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // If a policy for an - // error code is not configured for the PathRule, a policy for - // the error code configured inpathMatcher.defaultCustomErrorResponsePolicy is - // applied. If - // one is not specified inpathMatcher.defaultCustomErrorResponsePolicy, the - // policy - // configured in UrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // For example, consider a UrlMap with the following configuration: - // - // - // - UrlMap.defaultCustomErrorResponsePolicy are configured - // with policies for 5xx and 4xx errors - // - A PathRule for /coming_soon/ is configured for the error - // code 404. - // - // If the request is for www.myotherdomain.com and a404 is encountered, the - // policy underUrlMap.defaultCustomErrorResponsePolicy takes effect. If a404 - // response is encountered for the requestwww.example.com/current_events/, the - // pathMatcher's policy - // takes effect. If however, the request forwww.example.com/coming_soon/ - // encounters a 404, - // the policy in PathRule.customErrorResponsePolicy takes - // effect. If any of the requests in this example encounter a 500 - // error code, the policy atUrlMap.defaultCustomErrorResponsePolicy takes - // effect. - // - // customErrorResponsePolicy is supported only for - // global external Application Load Balancers. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - // Paths: The list of path patterns to match. Each must start with / - // and the only place a * is allowed is at the end following - // a /. The string fed to the path matcher does not include - // any text after the first ? or #, and - // those chars are not allowed here. - Paths []string `json:"paths,omitempty"` - // RouteAction: In response to a matching path, the load balancer - // performs advanced routing actions, such as URL rewrites and - // header - // transformations, before forwarding the request to the - // selected - // backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within a path rule'srouteAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` - // Service: The full or partial URL of the backend service resource to which - // traffic - // is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, - // take effect before sending the request to the backend. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - Service string `json:"service,omitempty"` - // UrlRedirect: When a path pattern is matched, the request is redirected to a - // URL - // specified by urlRedirect. - // - // - // Only one of urlRedirect, service orrouteAction.weightedBackendService can be - // set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomErrorResponsePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PathRule) MarshalJSON() ([]byte, error) { - type NoMethod PathRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PerInstanceConfig struct { - // Fingerprint: Fingerprint of this per-instance config. This field can be used - // in - // optimistic locking. It is ignored when inserting a per-instance - // config. An up-to-date fingerprint must be provided in order to update - // an - // existing per-instance configuration or the field needs to be unset. - Fingerprint string `json:"fingerprint,omitempty"` - // Name: The name of a per-instance configuration and its corresponding - // instance. - // Serves as a merge key during UpdatePerInstanceConfigs - // operations, that is, if a per-instance configuration with the same - // name - // exists then it will be updated, otherwise a new one will be created for - // the - // VM instance with the same name. An attempt to create a - // per-instance - // configuration for a VM instance that either doesn't exist or is not part - // of the group will result in an error. - Name string `json:"name,omitempty"` - // PreservedState: The intended preserved state for the given instance. Does - // not contain - // preserved state generated from a stateful policy. - PreservedState *PreservedState `json:"preservedState,omitempty"` - // Status: The status of applying this per-instance configuration on the - // corresponding - // managed instance. - // - // Possible values: - // "APPLYING" - The per-instance configuration is being applied to the - // instance, but is - // not yet effective, possibly waiting for the instance to, for - // example,REFRESH. - // "DELETING" - The per-instance configuration deletion is being applied on - // the instance, - // possibly waiting for the instance to, for example, REFRESH. - // "EFFECTIVE" - The per-instance configuration is effective on the instance, - // meaning that - // all disks, ips and metadata specified in this configuration are attached - // or set on the instance. - // "NONE" - *[Default]* The default status, when no per-instance - // configuration - // exists. - // "UNAPPLIED" - The per-instance configuration is set on an instance but not - // been applied - // yet. - // "UNAPPLIED_DELETION" - The per-instance configuration has been deleted, - // but the deletion is not - // yet applied. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PerInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod PerInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Policy: An Identity and Access Management (IAM) policy, which specifies -// access -// controls for Google Cloud resources. -// -// A `Policy` is a collection of `bindings`. A `binding` binds one or -// more -// `members`, or principals, to a 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreconfiguredWafSet struct { - // ExpressionSets: List of entities that are currently supported for WAF rules. - ExpressionSets []*WafExpressionSet `json:"expressionSets,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpressionSets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpressionSets") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreconfiguredWafSet) MarshalJSON() ([]byte, error) { - type NoMethod PreconfiguredWafSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreservedState: Preserved state for a given instance. -type PreservedState struct { - // Disks: Preserved disks defined for this instance. - // This map is keyed with the device names of the disks. - Disks map[string]PreservedStatePreservedDisk `json:"disks,omitempty"` - // ExternalIPs: Preserved external IPs defined for this instance. - // This map is keyed with the name of the network interface. - ExternalIPs map[string]PreservedStatePreservedNetworkIp `json:"externalIPs,omitempty"` - // InternalIPs: Preserved internal IPs defined for this instance. - // This map is keyed with the name of the network interface. - InternalIPs map[string]PreservedStatePreservedNetworkIp `json:"internalIPs,omitempty"` - // Metadata: Preserved metadata defined for this instance. - Metadata map[string]string `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedState) MarshalJSON() ([]byte, error) { - type NoMethod PreservedState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedDisk struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, - // update, instance recreate operations. This flag is used to configure - // if the disk should be deleted after it is no longer used by the group, - // e.g. when the given instance or the whole MIG is deleted. - // Note: disks attached in READ_ONLY mode cannot be - // auto-deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // Mode: The mode in which to attach this disk, either READ_WRITE orREAD_ONLY. - // If not specified, the default is to attach the - // disk in READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple VM instances - // can use - // a disk in READ_ONLY mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in READ_WRITE mode. Only - // one VM instance at a time can be attached to a disk inREAD_WRITE mode. - Mode string `json:"mode,omitempty"` - // Source: The URL of the disk resource that is stateful and should be - // attached - // to the VM instance. - Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the IP reservation should be deleted - // after it is no longer used by the group, e.g. when the given instance - // or the whole group is deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // IpAddress: Ip address representation - IpAddress *PreservedStatePreservedNetworkIpIpAddress `json:"ipAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreservedStatePreservedNetworkIpIpAddress struct { - // Address: The URL of the reservation for this IP address. - Address string `json:"address,omitempty"` - // Literal: An IPv4 internal network address to assign to the instance for - // this - // network interface. - Literal string `json:"literal,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreservedStatePreservedNetworkIpIpAddress) MarshalJSON() ([]byte, error) { - type NoMethod PreservedStatePreservedNetworkIpIpAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeature: Represents a single Google Compute Engine preview feature. -type PreviewFeature struct { - // ActivationStatus: Specifies whether the feature is enabled or disabled. - // - // Possible values: - // "ACTIVATION_STATE_UNSPECIFIED" - // "DISABLED" - // "ENABLED" - ActivationStatus string `json:"activationStatus,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: [Output Only] Description of the feature. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] The type of the feature. Always "compute#previewFeature" - // for - // preview features. - Kind string `json:"kind,omitempty"` - // Name: Name of the feature. - Name string `json:"name,omitempty"` - // RolloutOperation: Rollout operation of the feature. - RolloutOperation *PreviewFeatureRolloutOperation `json:"rolloutOperation,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output only] Status of the feature. - Status *PreviewFeatureStatus `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ActivationStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActivationStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeature) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeature - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PreviewFeature resources. - Items []*PreviewFeature `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PreviewFeatureListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureList) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureListWarning: [Output Only] Informational warning message. -type PreviewFeatureListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PreviewFeatureListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PreviewFeatureListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureRolloutOperation: Represents the rollout operation -type PreviewFeatureRolloutOperation struct { - // RolloutInput: Input only. The input for the rollout operation. - RolloutInput *PreviewFeatureRolloutOperationRolloutInput `json:"rolloutInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "RolloutInput") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RolloutInput") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureRolloutOperation) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureRolloutOperationRolloutInput: Represents the input for the -// rollout operation. -type PreviewFeatureRolloutOperationRolloutInput struct { - // Name: The name of the rollout - // plan - // Ex. - // organizations//locations/global/rolloutPlans/ - // Ex. - // folders//locations/global/rolloutPlans/ - // Ex. - // projects//locations/global/rolloutPlans/. - Name string `json:"name,omitempty"` - // PredefinedRolloutPlan: Predefined rollout plan. - // - // Possible values: - // "ROLLOUT_PLAN_FAST_ROLLOUT" - // "ROLLOUT_PLAN_TWO_DAY_ROLLOUT" - // "ROLLOUT_PLAN_UNSPECIFIED" - PredefinedRolloutPlan string `json:"predefinedRolloutPlan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureRolloutOperationRolloutInput) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureRolloutOperationRolloutInput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureStatus: [Output Only] The status of the feature. -type PreviewFeatureStatus struct { - // Description: [Output Only] The description of the feature. - Description string `json:"description,omitempty"` - // HelpLink: [Output Only] Link to the public documentation for the feature. - HelpLink string `json:"helpLink,omitempty"` - ReleaseStatus *PreviewFeatureStatusReleaseStatus `json:"releaseStatus,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PreviewFeatureStatusReleaseStatus: [Output Only] The release status of the -// feature. -type PreviewFeatureStatusReleaseStatus struct { - // Stage: [Output Only] The stage of the feature. - // - // Possible values: - // "DEPRECATED" - // "GA" - // "PREVIEW" - // "STAGE_UNSPECIFIED" - Stage string `json:"stage,omitempty"` - // UpdateDate: Output only. The last date when a feature transitioned between - // ReleaseStatuses. - UpdateDate *Date `json:"updateDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Stage") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Stage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PreviewFeatureStatusReleaseStatus) MarshalJSON() ([]byte, error) { - type NoMethod PreviewFeatureStatusReleaseStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Project: Represents a Project resource. -// -// A project is used to organize resources in a Google Cloud -// Platform -// environment. For more information, read about the -// Resource Hierarchy. -type Project struct { - // CloudArmorTier: [Output Only] The Cloud Armor tier for this project. It can - // be one of the - // following values: CA_STANDARD,CA_ENTERPRISE_PAYGO. - // - // If this field is not specified, it is assumed to beCA_STANDARD. - // - // Possible values: - // "CA_ENTERPRISE_ANNUAL" - Enterprise tier protection billed annually. - // "CA_ENTERPRISE_PAYGO" - Enterprise tier protection billed monthly. - // "CA_STANDARD" - Standard protection. - CloudArmorTier string `json:"cloudArmorTier,omitempty"` - // CommonInstanceMetadata: Metadata key/value pairs available to all instances - // contained in this - // project. See Custom - // metadata for more information. - CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultNetworkTier: This signifies the default network tier used for - // configuring resources of - // the project and can only take the following values:PREMIUM, STANDARD. - // Initially the default network - // tier is PREMIUM. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - DefaultNetworkTier string `json:"defaultNetworkTier,omitempty"` - // DefaultServiceAccount: [Output Only] Default service account used by VMs - // running in this project. - DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` - // Description: An optional textual description of the resource. - Description string `json:"description,omitempty"` - // EnabledFeatures: An optional list of restricted features enabled for use on - // this project. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. This is *not* the project ID, and is - // just a unique ID used by Compute Engine to identify resources. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#project - // for - // projects. - Kind string `json:"kind,omitempty"` - // ManagedProtectionTier: [Output Only] The Cloud Armor Managed Protection - // (CAMP) tier for - // this project. It can be one of the following values:CA_STANDARD, - // CAMP_PLUS_PAYGO. - // - // If this field is not specified, it is assumed to beCA_STANDARD. - // - // Possible values: - // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. - // "CAMP_PLUS_PAYGO" - Plus tier protection monthly. - // "CA_STANDARD" - Standard protection. - ManagedProtectionTier string `json:"managedProtectionTier,omitempty"` - // Name: The project ID. For example: my-example-project. Use the - // project ID to make requests to Compute Engine. - Name string `json:"name,omitempty"` - // Quotas: [Output Only] Quotas assigned to this project. - Quotas []*Quota `json:"quotas,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: An optional naming prefix for daily usage reports and - // the Google Cloud - // Storage bucket where they are stored. - UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs running - // in - // this project. - // - // Possible values: - // "GLOBAL_DEFAULT" - // "UNSPECIFIED_VM_DNS_SETTING" - // "ZONAL_DEFAULT" - // "ZONAL_ONLY" - VmDnsSetting string `json:"vmDnsSetting,omitempty"` - // XpnProjectStatus: [Output Only] The role this project has in a shared VPC - // configuration. - // Currently, only projects with the host role, which is specified by the - // value HOST, are differentiated. - // - // Possible values: - // "HOST" - // "UNSPECIFIED_XPN_PROJECT_STATUS" - XpnProjectStatus string `json:"xpnProjectStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudArmorTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudArmorTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Project) MarshalJSON() ([]byte, error) { - type NoMethod Project - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsDisableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "XpnResource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsDisableXpnResourceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsEnableXpnResourceRequest struct { - // XpnResource: Service resource (a.k.a service project) ID. - XpnResource *XpnResourceId `json:"xpnResource,omitempty"` - // ForceSendFields is a list of field names (e.g. "XpnResource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "XpnResource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsEnableXpnResourceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsGetXpnResources struct { - // Kind: [Output Only] Type of resource. Alwayscompute#projectsGetXpnResources - // for lists of service resources - // (a.k.a service projects) - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: Service resources (a.k.a service projects) attached to this - // project as - // their shared VPC host. - Resources []*XpnResourceId `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsGetXpnResources - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsListXpnHostsRequest struct { - // Organization: Optional organization ID managed by Cloud Resource Manager, - // for which to - // list shared VPC host projects. If not specified, the organization will - // be - // inferred from the project. - Organization string `json:"organization,omitempty"` - // ForceSendFields is a list of field names (e.g. "Organization") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Organization") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsListXpnHostsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetCloudArmorTierRequest struct { - // CloudArmorTier: Managed protection tier to be set. - // - // Possible values: - // "CA_ENTERPRISE_ANNUAL" - Enterprise tier protection billed annually. - // "CA_ENTERPRISE_PAYGO" - Enterprise tier protection billed monthly. - // "CA_STANDARD" - Standard protection. - CloudArmorTier string `json:"cloudArmorTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloudArmorTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudArmorTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetCloudArmorTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetCloudArmorTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetDefaultNetworkTierRequest struct { - // NetworkTier: Default network tier to be set. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - NetworkTier string `json:"networkTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetDefaultNetworkTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetDefaultNetworkTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsSetManagedProtectionTierRequest struct { - // ManagedProtectionTier: Managed protection tier to be set. - // - // Possible values: - // "CAMP_PLUS_ANNUAL" - Plus tier protection annual. - // "CAMP_PLUS_PAYGO" - Plus tier protection monthly. - // "CA_STANDARD" - Standard protection. - ManagedProtectionTier string `json:"managedProtectionTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "ManagedProtectionTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedProtectionTier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ProjectsSetManagedProtectionTierRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProjectsSetManagedProtectionTierRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefix: A public advertised prefix represents an aggregated -// IP prefix or netblock -// which customers bring to cloud. The IP prefix is a single unit of -// route -// advertisement and is announced globally to the internet. -type PublicAdvertisedPrefix struct { - // ByoipApiVersion: [Output Only] The version of BYOIP API. - // - // Possible values: - // "V1" - This public advertised prefix can be used to create both regional - // and - // global public delegated prefixes. It usually takes 4 weeks to create - // or - // delete a public delegated prefix. The BGP status cannot be changed. - // "V2" - This public advertised prefix can only be used to create regional - // public - // delegated prefixes. Public delegated prefix creation and deletion - // takes - // minutes and the BGP status can be modified. - ByoipApiVersion string `json:"byoipApiVersion,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DnsVerificationIp: The address to be used for reverse DNS verification. - DnsVerificationIp string `json:"dnsVerificationIp,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a new PublicAdvertisedPrefix. An up-to-date - // fingerprint must be provided in order to update thePublicAdvertisedPrefix, - // otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a PublicAdvertisedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // IpCidrRange: The address range, in CIDR format, represented by this public - // advertised - // prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: The internet access type for IPv6 Public Advertised - // Prefixes. - // - // Possible values: - // "EXTERNAL" - Default IPv6 access type. The prefix will be announced to the - // internet. - // All children Public Delegated Prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The prefix will not be announced to the internet. Prefix will - // be used - // privately within Cloud. All children Public Delegated Prefixes - // will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PdpScope: Specifies how child public delegated prefix will be scoped. It - // could - // be one of following values: - // - // - // - `REGIONAL`: The public delegated prefix is regional only. The - // provisioning will take a few minutes. - // - `GLOBAL`: The public delegated prefix is global only. The - // provisioning will take ~4 weeks. - // - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes - // is - // BYOIP V1 legacy prefix. This is output only value and no longer - // supported in BYOIP V2. - // - // Possible values: - // "GLOBAL" - The public delegated prefix is global only. The provisioning - // will take ~4 - // weeks. - // "GLOBAL_AND_REGIONAL" - The public delegated prefixes is BYOIP V1 legacy - // prefix. This is output - // only value and no longer supported in BYOIP V2. - // "REGIONAL" - The public delegated prefix is regional only. The - // provisioning will take - // a few minutes. - PdpScope string `json:"pdpScope,omitempty"` - // PublicDelegatedPrefixs: [Output Only] The list of public delegated prefixes - // that exist for this - // public advertised prefix. - PublicDelegatedPrefixs []*PublicAdvertisedPrefixPublicDelegatedPrefix `json:"publicDelegatedPrefixs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SharedSecret: [Output Only] The shared secret to be used for reverse DNS - // verification. - SharedSecret string `json:"sharedSecret,omitempty"` - // Status: The status of the public advertised prefix. Possible values - // include: - // - // - // - `INITIAL`: RPKI validation is complete. - // - `PTR_CONFIGURED`: User has configured the PTR. - // - `VALIDATED`: Reverse DNS lookup is successful. - // - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed. - // - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being - // configured. - // - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured. - // - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed. - // - // Possible values: - // "ANNOUNCED_TO_INTERNET" - The prefix is announced to Internet. - // "INITIAL" - RPKI validation is complete. - // "PREFIX_CONFIGURATION_COMPLETE" - The prefix is fully configured. - // "PREFIX_CONFIGURATION_IN_PROGRESS" - The prefix is being configured. - // "PREFIX_REMOVAL_IN_PROGRESS" - The prefix is being removed. - // "PTR_CONFIGURED" - User has configured the PTR. - // "READY_TO_ANNOUNCE" - The prefix is currently withdrawn but ready to be - // announced. - // "REVERSE_DNS_LOOKUP_FAILED" - Reverse DNS lookup failed. - // "VALIDATED" - Reverse DNS lookup is successful. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ByoipApiVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ByoipApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicAdvertisedPrefixList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicAdvertisedPrefix resources. - Items []*PublicAdvertisedPrefix `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicAdvertisedPrefix for public advertised prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicAdvertisedPrefixListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefixListWarning: [Output Only] Informational warning -// message. -type PublicAdvertisedPrefixListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicAdvertisedPrefixListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicAdvertisedPrefixListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicAdvertisedPrefixPublicDelegatedPrefix: Represents a CIDR range which -// can be used to assign addresses. -type PublicAdvertisedPrefixPublicDelegatedPrefix struct { - // IpRange: The IP address range of the public delegated prefix - IpRange string `json:"ipRange,omitempty"` - // Name: The name of the public delegated prefix - Name string `json:"name,omitempty"` - // Project: The project number of the public delegated prefix - Project string `json:"project,omitempty"` - // Region: The region of the public delegated prefix if it is regional. If - // absent, - // the prefix is global. - Region string `json:"region,omitempty"` - // Status: The status of the public delegated prefix. Possible values are: - // INITIALIZING: The public delegated prefix is being initialized and - // addresses cannot be created yet. - // ANNOUNCED: The public delegated prefix is active. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicAdvertisedPrefixPublicDelegatedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefix: A PublicDelegatedPrefix resource represents an IP -// block within a -// PublicAdvertisedPrefix that is configured within a single cloud -// scope -// (global or region). IPs in the block can be allocated to resources -// within -// that scope. Public delegated prefixes may be further broken up into -// smaller IP blocks in the same scope as the parent block. -type PublicDelegatedPrefix struct { - // AllocatablePrefixLength: The allocatable prefix length supported by this - // public delegated prefix. - // This field is optional and cannot be set for prefixes in DELEGATION mode. - // It cannot be set for IPv4 prefixes either, and it always defaults to 32. - AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` - // ByoipApiVersion: [Output Only] The version of BYOIP API. - // - // Possible values: - // "V1" - This public delegated prefix usually takes 4 weeks to delete, and - // the BGP - // status cannot be changed. Announce and Withdraw APIs can not be used on - // this prefix. - // "V2" - This public delegated prefix takes minutes to delete. Announce - // and - // Withdraw APIs can be used on this prefix to change the BGP status. - ByoipApiVersion string `json:"byoipApiVersion,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEnhancedIpv4Allocation: [Output Only] Whether this PDP supports - // enhanced IPv4 allocations. - // Applicable for IPv4 PDPs only. - EnableEnhancedIpv4Allocation bool `json:"enableEnhancedIpv4Allocation,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a new PublicDelegatedPrefix. An up-to-date - // fingerprint must be provided in order to update thePublicDelegatedPrefix, - // otherwise the request will fail with - // error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a PublicDelegatedPrefix. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // IpCidrRange: The IP address range, in CIDR format, represented by this - // public - // delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: [Output Only] The internet access type for IPv6 Public - // Delegated Prefixes. - // Inherited from parent prefix. - // - // Possible values: - // "EXTERNAL" - The parent public advertised prefix will be announced to the - // internet. - // All children public delegated prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The parent public advertised prefix will not be announced to - // the - // internet. Prefix will be used privately within Cloud. All children - // public delegated prefixes will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // IsLiveMigration: If true, the prefix will be live migrated. - IsLiveMigration bool `json:"isLiveMigration,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefix for public delegated prefixes. - Kind string `json:"kind,omitempty"` - // Mode: The public delegated prefix mode for IPv6 only. - // - // Possible values: - // "DELEGATION" - The public delegated prefix is used for further - // sub-delegation only. Such - // prefixes cannot set allocatablePrefixLength. - // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. - // Such prefixes cannot set publicDelegatedSubPrefixes. Parent public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual-mode subnetworks - // only. Such prefixes cannot set publicDelegatedSubPrefixes. Parent - // public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "INTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual stack or IPv6-only - // subnetwork with internal access only. Such prefixes cannot - // set - // publicDelegatedSubPrefixes and allocatablePrefixLength. Parent - // public - // delegated prefix must have IPv6 access type as INTERNAL. - Mode string `json:"mode,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ParentPrefix: The URL of parent prefix. Either PublicAdvertisedPrefix - // or - // PublicDelegatedPrefix. - ParentPrefix string `json:"parentPrefix,omitempty"` - // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes that - // exist for this public - // delegated prefix. - PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` - // Region: [Output Only] URL of the region where the public delegated prefix - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the public delegated prefix, which can - // be one - // of following values: - // - // - // - `INITIALIZING` The public delegated prefix is being initialized and - // addresses cannot be created yet. - // - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration - // prefix and is active. - // - `ANNOUNCED` The public delegated prefix is announced and ready to - // use. - // - `DELETING` The public delegated prefix is being deprovsioned. - // - `ACTIVE` The public delegated prefix is ready to use. - // - // Possible values: - // "ACTIVE" - The public delegated prefix is ready to use. - // "ANNOUNCED" - The public delegated prefix is announced and ready to use. - // "ANNOUNCED_TO_GOOGLE" - The prefix is announced within Google network. - // "ANNOUNCED_TO_INTERNET" - The prefix is announced to Internet and within - // Google. - // "DELETING" - The public delegated prefix is being deprovsioned. - // "INITIALIZING" - The public delegated prefix is being initialized and - // addresses cannot be - // created yet. - // "READY_TO_ANNOUNCE" - The public delegated prefix is currently withdrawn - // but ready to be - // announced. - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllocatablePrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatablePrefixLength") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicDelegatedPrefixesScopedList resources. - Items map[string]PublicDelegatedPrefixesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefixAggregatedList for aggregated - // lists of public delegated prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixAggregatedListWarning: [Output Only] Informational -// warning message. -type PublicDelegatedPrefixAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of PublicDelegatedPrefix resources. - Items []*PublicDelegatedPrefix `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#publicDelegatedPrefixList for public delegated - // prefixes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *PublicDelegatedPrefixListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixListWarning: [Output Only] Informational warning -// message. -type PublicDelegatedPrefixListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub -// PublicDelegatedPrefix. -type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { - // AllocatablePrefixLength: The allocatable prefix length supported by this - // PublicDelegatedSubPrefix. - AllocatablePrefixLength int64 `json:"allocatablePrefixLength,omitempty"` - // DelegateeProject: Name of the project scoping this PublicDelegatedSubPrefix. - DelegateeProject string `json:"delegateeProject,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEnhancedIpv4Allocation: [Output Only] Whether this PDP supports - // enhanced IPv4 allocations. - // Applicable for IPv4 PDPs only. - EnableEnhancedIpv4Allocation bool `json:"enableEnhancedIpv4Allocation,omitempty"` - // IpCidrRange: The IP address range, in CIDR format, represented by this sub - // public - // delegated prefix. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: [Output Only] The internet access type for IPv6 Public - // Delegated Sub - // Prefixes. Inherited from parent prefix. - // - // Possible values: - // "EXTERNAL" - The parent public advertised prefix will be announced to the - // internet. - // All children public delegated prefixes will have IPv6 access type - // as - // EXTERNAL. - // "INTERNAL" - The parent public advertised prefix will not be announced to - // the - // internet. Prefix will be used privately within Cloud. All children - // public delegated prefixes will have IPv6 access type as INTERNAL. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // IsAddress: Whether the sub prefix is delegated to create Address resources - // in the - // delegatee project. - IsAddress bool `json:"isAddress,omitempty"` - // Mode: The PublicDelegatedSubPrefix mode for IPv6 only. - // - // Possible values: - // "DELEGATION" - The public delegated prefix is used for further - // sub-delegation only. Such - // prefixes cannot set allocatablePrefixLength. - // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. - // Such prefixes cannot set publicDelegatedSubPrefixes. Parent public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual-mode subnetworks - // only. Such prefixes cannot set publicDelegatedSubPrefixes. Parent - // public - // delegated prefix must have IPv6 access type as EXTERNAL. - // "INTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used - // for creating dual stack or IPv6-only - // subnetwork with internal access only. Such prefixes cannot - // set - // publicDelegatedSubPrefixes and allocatablePrefixLength. Parent - // public - // delegated prefix must have IPv6 access type as INTERNAL. - Mode string `json:"mode,omitempty"` - // Name: The name of the sub public delegated prefix. - Name string `json:"name,omitempty"` - // Region: [Output Only] The region of the sub public delegated prefix if it - // is - // regional. If absent, the sub prefix is global. - Region string `json:"region,omitempty"` - // Status: [Output Only] The status of the sub public delegated prefix. - // - // Possible values: - // "ACTIVE" - // "INACTIVE" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllocatablePrefixLength") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllocatablePrefixLength") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixPublicDelegatedSubPrefix) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixPublicDelegatedSubPrefix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixesScopedList struct { - // PublicDelegatedPrefixes: [Output Only] A list of PublicDelegatedPrefixes - // contained in this scope. - PublicDelegatedPrefixes []*PublicDelegatedPrefix `json:"publicDelegatedPrefixes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list - // of - // public delegated prefixes when the list is empty. - Warning *PublicDelegatedPrefixesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicDelegatedPrefixes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicDelegatedPrefixes") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PublicDelegatedPrefixesScopedListWarning: [Output Only] Informational -// warning which replaces the list of -// public delegated prefixes when the list is empty. -type PublicDelegatedPrefixesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*PublicDelegatedPrefixesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PublicDelegatedPrefixesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod PublicDelegatedPrefixesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Quota: A quotas entry. -type Quota struct { - // Limit: [Output Only] Quota limit for this metric. - Limit float64 `json:"limit,omitempty"` - // Metric: [Output Only] Name of the quota metric. - // - // Possible values: - // "A2_CPUS" - // "AFFINITY_GROUPS" - // "AUTOSCALERS" - // "BACKEND_BUCKETS" - // "BACKEND_SERVICES" - // "C2D_CPUS" - // "C2_CPUS" - // "C3_CPUS" - // "COMMITMENTS" - // "COMMITTED_A2_CPUS" - // "COMMITTED_C2D_CPUS" - // "COMMITTED_C2_CPUS" - // "COMMITTED_C3_CPUS" - // "COMMITTED_CPUS" - // "COMMITTED_E2_CPUS" - // "COMMITTED_LICENSES" - // "COMMITTED_LOCAL_SSD_TOTAL_GB" - // "COMMITTED_M3_CPUS" - // "COMMITTED_MEMORY_OPTIMIZED_CPUS" - // "COMMITTED_N2A_CPUS" - // "COMMITTED_N2D_CPUS" - // "COMMITTED_N2_CPUS" - // "COMMITTED_NVIDIA_A100_80GB_GPUS" - // "COMMITTED_NVIDIA_A100_GPUS" - // "COMMITTED_NVIDIA_H100_GPUS" - // "COMMITTED_NVIDIA_K80_GPUS" - // "COMMITTED_NVIDIA_L4_GPUS" - // "COMMITTED_NVIDIA_P100_GPUS" - // "COMMITTED_NVIDIA_P4_GPUS" - // "COMMITTED_NVIDIA_T4_GPUS" - // "COMMITTED_NVIDIA_V100_GPUS" - // "COMMITTED_T2A_CPUS" - // "COMMITTED_T2D_CPUS" - // "COMMITTED_Z3_CPUS" - // "CPUS" - Guest CPUs - // "CPUS_ALL_REGIONS" - // "DISKS_TOTAL_GB" - // "E2_CPUS" - // "EXTERNAL_MANAGED_FORWARDING_RULES" - // "EXTERNAL_NETWORK_LB_FORWARDING_RULES" - // "EXTERNAL_PROTOCOL_FORWARDING_RULES" - // "EXTERNAL_VPN_GATEWAYS" - // "FIREWALLS" - // "FORWARDING_RULES" - // "GLOBAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_EXTERNAL_MANAGED_FORWARDING_RULES" - // "GLOBAL_EXTERNAL_PROXY_LB_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_ADDRESSES" - // "GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" - // "GPUS_ALL_REGIONS" - // "HDB_TOTAL_GB" - // "HDB_TOTAL_IOPS" - // "HDB_TOTAL_THROUGHPUT" - // "HEALTH_CHECKS" - // "IMAGES" - // "INSTANCES" - // "INSTANCE_GROUPS" - // "INSTANCE_GROUP_MANAGERS" - // "INSTANCE_TEMPLATES" - // "INTERCONNECTS" - // "INTERCONNECT_ATTACHMENTS_PER_REGION" - // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" - // "INTERCONNECT_TOTAL_GBPS" - // "INTERNAL_ADDRESSES" - // "INTERNAL_TRAFFIC_DIRECTOR_FORWARDING_RULES" - // "IN_PLACE_SNAPSHOTS" - // "IN_USE_ADDRESSES" - // "IN_USE_BACKUP_SCHEDULES" - // "IN_USE_SNAPSHOT_SCHEDULES" - // "LOCAL_SSD_TOTAL_GB" - // "M1_CPUS" - // "M2_CPUS" - // "M3_CPUS" - // "MACHINE_IMAGES" - // "N2A_CPUS" - // "N2D_CPUS" - // "N2_CPUS" - // "NETWORKS" - // "NETWORK_ATTACHMENTS" - // "NETWORK_ENDPOINT_GROUPS" - // "NETWORK_FIREWALL_POLICIES" - // "NET_LB_SECURITY_POLICIES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULES_PER_REGION" - // "NET_LB_SECURITY_POLICY_RULE_ATTRIBUTES_PER_REGION" - // "NODE_GROUPS" - // "NODE_TEMPLATES" - // "NVIDIA_A100_80GB_GPUS" - // "NVIDIA_A100_GPUS" - // "NVIDIA_K80_GPUS" - // "NVIDIA_L4_GPUS" - // "NVIDIA_P100_GPUS" - // "NVIDIA_P100_VWS_GPUS" - // "NVIDIA_P4_GPUS" - // "NVIDIA_P4_VWS_GPUS" - // "NVIDIA_T4_GPUS" - // "NVIDIA_T4_VWS_GPUS" - // "NVIDIA_V100_GPUS" - // "PACKET_MIRRORINGS" - // "PD_EXTREME_TOTAL_PROVISIONED_IOPS" - // "PREEMPTIBLE_CPUS" - // "PREEMPTIBLE_LOCAL_SSD_GB" - // "PREEMPTIBLE_NVIDIA_A100_80GB_GPUS" - // "PREEMPTIBLE_NVIDIA_A100_GPUS" - // "PREEMPTIBLE_NVIDIA_H100_GPUS" - // "PREEMPTIBLE_NVIDIA_K80_GPUS" - // "PREEMPTIBLE_NVIDIA_L4_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_GPUS" - // "PREEMPTIBLE_NVIDIA_P100_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_GPUS" - // "PREEMPTIBLE_NVIDIA_P4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_GPUS" - // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" - // "PREEMPTIBLE_NVIDIA_V100_GPUS" - // "PREEMPTIBLE_TPU_LITE_DEVICE_V5" - // "PREEMPTIBLE_TPU_LITE_PODSLICE_V5" - // "PREEMPTIBLE_TPU_PODSLICE_V4" - // "PRIVATE_V6_ACCESS_SUBNETWORKS" - // "PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK" - // "PSC_INTERNAL_LB_FORWARDING_RULES" - // "PUBLIC_ADVERTISED_PREFIXES" - // "PUBLIC_DELEGATED_PREFIXES" - // "REGIONAL_AUTOSCALERS" - // "REGIONAL_EXTERNAL_MANAGED_BACKEND_SERVICES" - // "REGIONAL_EXTERNAL_NETWORK_LB_BACKEND_SERVICES" - // "REGIONAL_INSTANCE_GROUP_MANAGERS" - // "REGIONAL_INTERNAL_LB_BACKEND_SERVICES" - // "REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES" - // "REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES" - // "RESERVATIONS" - // "RESOURCE_POLICIES" - // "ROUTERS" - // "ROUTES" - // "SECURITY_POLICIES" - // "SECURITY_POLICIES_PER_REGION" - // "SECURITY_POLICY_ADVANCED_RULES_PER_REGION" - // "SECURITY_POLICY_CEVAL_RULES" - // "SECURITY_POLICY_RULES" - // "SECURITY_POLICY_RULES_PER_REGION" - // "SERVICE_ATTACHMENTS" - // "SNAPSHOTS" - The total number of snapshots allowed for a single project. - // "SSD_TOTAL_GB" - // "SSL_CERTIFICATES" - // "SSL_POLICIES" - // "STATIC_ADDRESSES" - // "STATIC_BYOIP_ADDRESSES" - // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" - // "SUBNETWORKS" - // "T2A_CPUS" - // "T2D_CPUS" - // "TARGET_HTTPS_PROXIES" - // "TARGET_HTTP_PROXIES" - // "TARGET_INSTANCES" - // "TARGET_POOLS" - // "TARGET_SSL_PROXIES" - // "TARGET_TCP_PROXIES" - // "TARGET_VPN_GATEWAYS" - // "TPU_LITE_DEVICE_V5" - // "TPU_LITE_PODSLICE_V5" - // "TPU_PODSLICE_V4" - // "URL_MAPS" - // "VARIABLE_IPV6_PUBLIC_DELEGATED_PREFIXES" - // "VPN_GATEWAYS" - // "VPN_TUNNELS" - // "XPN_SERVICE_PROJECTS" - Metric string `json:"metric,omitempty"` - // Owner: [Output Only] Owning resource. This is the resource on which this - // quota - // is applied. - Owner string `json:"owner,omitempty"` - // Usage: [Output Only] Current usage of this metric. - Usage float64 `json:"usage,omitempty"` - // ForceSendFields is a list of field names (e.g. "Limit") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Limit") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Quota) MarshalJSON() ([]byte, error) { - type NoMethod Quota - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Quota) UnmarshalJSON(data []byte) error { - type NoMethod Quota - var s1 struct { - Limit gensupport.JSONFloat64 `json:"limit"` - Usage gensupport.JSONFloat64 `json:"usage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Limit = float64(s1.Limit) - s.Usage = float64(s1.Usage) - return nil -} - -// QuotaExceededInfo: Additional details for quota exceeded error for resource -// quota. -type QuotaExceededInfo struct { - // Dimensions: The map holding related quota dimensions. - Dimensions map[string]string `json:"dimensions,omitempty"` - // FutureLimit: Future quota limit being rolled out. The limit's unit depends - // on the quota - // type or metric. - FutureLimit float64 `json:"futureLimit,omitempty"` - // Limit: Current effective quota limit. The limit's unit depends on the quota - // type - // or metric. - Limit float64 `json:"limit,omitempty"` - // LimitName: The name of the quota limit. - LimitName string `json:"limitName,omitempty"` - // MetricName: The Compute Engine quota metric name. - MetricName string `json:"metricName,omitempty"` - // RolloutStatus: Rollout status of the future quota limit. - // - // Possible values: - // "IN_PROGRESS" - IN_PROGRESS - A rollout is in process which will change - // the limit value - // to future limit. - // "ROLLOUT_STATUS_UNSPECIFIED" - ROLLOUT_STATUS_UNSPECIFIED - Rollout status - // is not specified. The default - // value. - RolloutStatus string `json:"rolloutStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dimensions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QuotaExceededInfo) MarshalJSON() ([]byte, error) { - type NoMethod QuotaExceededInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { - type NoMethod QuotaExceededInfo - var s1 struct { - FutureLimit gensupport.JSONFloat64 `json:"futureLimit"` - Limit gensupport.JSONFloat64 `json:"limit"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FutureLimit = float64(s1.FutureLimit) - s.Limit = float64(s1.Limit) - return nil -} - -// Reference: Represents a reference to a resource. -type Reference struct { - // Kind: [Output Only] Type of the resource. Always compute#reference - // for references. - Kind string `json:"kind,omitempty"` - // ReferenceType: A description of the reference type with no implied - // semantics. Possible - // values include: - // - // - // 1. MEMBER_OF - ReferenceType string `json:"referenceType,omitempty"` - // Referrer: URL of the resource which refers to the target. - Referrer string `json:"referrer,omitempty"` - // Target: URL of the resource to which this reference points. - Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Reference) MarshalJSON() ([]byte, error) { - type NoMethod Reference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Region: Represents a Region resource. -// -// A region is a geographical area where a resource is located. For -// more -// information, readRegions -// and Zones. -type Region struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // region. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#region for - // regions. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // QuotaStatusWarning: [Output Only] Warning of fetching the `quotas` field for - // this region. This - // field is populated only if fetching of the `quotas` field fails. - QuotaStatusWarning *RegionQuotaStatusWarning `json:"quotaStatusWarning,omitempty"` - // Quotas: [Output Only] Quotas assigned to this region. - Quotas []*Quota `json:"quotas,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] Status of the region, either UP orDOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - // Zones: [Output Only] A list of zones available in this region, in the form - // of - // resource URLs. - Zones []string `json:"zones,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Region) MarshalJSON() ([]byte, error) { - type NoMethod Region - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionQuotaStatusWarning: [Output Only] Warning of fetching the `quotas` -// field for this region. This -// field is populated only if fetching of the `quotas` field fails. -type RegionQuotaStatusWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionQuotaStatusWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionQuotaStatusWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionQuotaStatusWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionQuotaStatusWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionQuotaStatusWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionQuotaStatusWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionAddressesMoveRequest struct { - // Description: An optional destination address description if intended to be - // different - // from the source. - Description string `json:"description,omitempty"` - // DestinationAddress: The URL of the destination address to move to. This can - // be a full or - // partial URL. For example, the following are all valid URLs to a address: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address - // - // - projects/project/regions/region/addresses/address - // - // - // Note that destination project must be different from the source project. - // So/regions/region/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionAddressesMoveRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerList: Contains a list of autoscalers. -type RegionAutoscalerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Autoscaler resources. - Items []*Autoscaler `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionAutoscalerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionAutoscalerListWarning: [Output Only] Informational warning message. -type RegionAutoscalerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionAutoscalerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionAutoscalerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionAutoscalerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionCommitmentsUpdateReservationsRequest struct { - // Reservations: A list of two reservations to transfer GPUs and Local SSD - // disks between. - Reservations []*Reservation `json:"reservations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reservations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionCommitmentsUpdateReservationsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionCommitmentsUpdateReservationsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDiskTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of DiskType resources. - Items []*DiskType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#regionDiskTypeList for - // region disk types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionDiskTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeList) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionDiskTypeListWarning: [Output Only] Informational warning message. -type RegionDiskTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionDiskTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDiskTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDiskTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionDiskTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksAddResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be added to this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksAddResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksRemoveResourcePoliciesRequest struct { - // ResourcePolicies: Resource policies to be removed from this disk. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksRemoveResourcePoliciesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksResizeRequest struct { - // SizeGb: The new size of the regional persistent disk, which is specified in - // GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SizeGb") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SizeGb") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionDisksStartAsyncReplicationRequest struct { - // AsyncSecondaryDisk: The secondary disk to start asynchronous replication - // to. - // You can provide this as a partial or full URL to the resource. For - // example, - // the following are valid values: - // - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - - // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk - // - // - - // projects/project/zones/zone/disks/disk - // - // - - // projects/project/regions/region/disks/disk - // - // - - // zones/zone/disks/disk - // - // - - // regions/region/disks/disk - AsyncSecondaryDisk string `json:"asyncSecondaryDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsyncSecondaryDisk") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsyncSecondaryDisk") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionDisksStartAsyncReplicationRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionDisksStartAsyncReplicationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupList: Contains a list of InstanceGroup resources. -type RegionInstanceGroupList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupListWarning: [Output Only] Informational warning message. -type RegionInstanceGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerDeleteInstanceConfigReq: -// RegionInstanceGroupManagers.deletePerInstanceConfigs -type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { - // Names: The list of instance names for which we want to delete per-instance - // configs - // on this managed instance group. - Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Names") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Names") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerDeleteInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerDeleteInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerList: Contains a list of managed instance groups. -type RegionInstanceGroupManagerList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupManager resources. - Items []*InstanceGroupManager `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is - // always - // compute#instanceGroupManagerList for a list of managed instance groups - // that - // exist in th regional scope. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagerListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerListWarning: [Output Only] Informational warning -// message. -type RegionInstanceGroupManagerListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagerListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerPatchInstanceConfigReq: -// RegionInstanceGroupManagers.patchPerInstanceConfigs -type RegionInstanceGroupManagerPatchInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerPatchInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerPatchInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerResizeRequestsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Resize Request resources. - Items []*InstanceGroupManagerResizeRequest `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#regionInstanceGroupManagerResizeRequestList for - // a list of Resize Requests. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagerResizeRequestsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerResizeRequestsListResponseWarning: [Output Only] -// Informational warning message. -type RegionInstanceGroupManagerResizeRequestsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagerResizeRequestsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagerResizeRequestsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerResizeRequestsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagerUpdateInstanceConfigReq: -// RegionInstanceGroupManagers.updatePerInstanceConfigs -type RegionInstanceGroupManagerUpdateInstanceConfigReq struct { - // PerInstanceConfigs: The list of per-instance configurations to insert or - // patch on this managed - // instance group. - PerInstanceConfigs []*PerInstanceConfig `json:"perInstanceConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PerInstanceConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PerInstanceConfigs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagerUpdateInstanceConfigReq) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagerUpdateInstanceConfigReq - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersAbandonInstancesRequest struct { - // Instances: The URLs of one or more instances to abandon. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersAbandonInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersApplyUpdatesRequest: -// RegionInstanceGroupManagers.applyUpdatesToInstances -type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // AllInstances: Flag to update all instances instead of specified list of - // “instances”. - // If the flag is set to true then the instances may not be specified - // in the request. - AllInstances bool `json:"allInstances,omitempty"` - // Instances: The list of URLs of one or more instances for which you want to - // apply - // updates. Each URL can be a full URL or a partial URL, such - // aszones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // MinimalAction: The minimal action that you want to perform on each instance - // during the - // update: - // - // - // - REPLACE: At minimum, delete the instance and create it - // again. - // - RESTART: Stop the instance and start it - // again. - // - REFRESH: Do not stop the instance and limit - // disruption as much as possible. - // - NONE: Do not - // disrupt the instance at all. - // - // - // By default, the minimum action is NONE. If your update - // requires a more disruptive action than you set with this flag, the - // necessary action is performed to execute the update. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that you want to - // perform on each instance during - // the update: - // - // - // - REPLACE: Delete the instance and create it again. - // - RESTART: Stop the instance and start it again. - // - REFRESH: Do not stop the instance and limit disruption - // as much as possible. - // - NONE: Do not disrupt the - // instance at all. - // - // - // By default, the most disruptive allowed action is REPLACE. If - // your update requires a more disruptive action than you set with this - // flag, - // the update request will fail. - // - // Possible values: - // "NONE" - Do not perform any action. - // "REFRESH" - Do not stop the instance. - // "REPLACE" - (Default.) Replace the instance according to the replacement - // method - // option. - // "RESTART" - Stop the instance and start it again. - MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInstances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersApplyUpdatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersCreateInstancesRequest: -// RegionInstanceGroupManagers.createInstances -type RegionInstanceGroupManagersCreateInstancesRequest struct { - // Instances: [Required] List of specifications of per-instance configs. - Instances []*PerInstanceConfig `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersCreateInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersDeleteInstancesRequest struct { - // Instances: The URLs of one or more instances to delete. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // SkipInstancesOnValidationError: Specifies whether the request should proceed - // despite the inclusion of - // instances that are not members of the group or that are already in - // the - // process of being deleted or abandoned. If this field is set to `false` - // and - // such an instance is specified in the request, the operation fails. - // The - // operation always fails if the request contains a malformed instance URL or - // a reference to an instance that exists in a zone or region other than - // the - // group's zone or region. - SkipInstancesOnValidationError bool `json:"skipInstancesOnValidationError,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersDeleteInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListErrorsResponse struct { - // Items: [Output Only] The list of errors of the managed instance group. - Items []*InstanceManagedByIgmError `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListErrorsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstanceConfigsResp struct { - // Items: [Output Only] The list of PerInstanceConfig. - Items []*PerInstanceConfig `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupManagersListInstanceConfigsRespWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsResp) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsResp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupManagersListInstanceConfigsRespWarning: [Output Only] -// Informational warning message. -type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupManagersListInstanceConfigsRespWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsRespWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstanceConfigsRespWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstanceConfigsRespWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstanceConfigsRespWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersListInstancesResponse struct { - // ManagedInstances: A list of managed instances. - ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - 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. "ManagedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ManagedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersListInstancesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersRecreateRequest struct { - // Instances: The URLs of one or more instances to recreate. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersRecreateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersResizeAdvancedRequest struct { - // NoCreationRetries: If this flag is true, the managed instance group attempts - // to create all - // instances initiated by this resize request only once. If there is an - // error - // during creation, the managed instance group does not retry create - // this - // instance, and we will decrease the targetSize of the request - // instead. If the flag is false, the group attempts to recreate each - // instance - // continuously until it succeeds. - // - // This flag matters only in the first attempt of creation of an - // instance. - // After an instance is successfully created while this flag is enabled, - // the - // instance behaves the same way as all the other instances created with - // a - // regular resize request. In particular, if a running instance - // dies - // unexpectedly at a later time and needs to be recreated, this mode does - // not - // affect the recreation behavior in that scenario. - // - // This flag is applicable only to the current resize request. It does - // not - // influence other resize requests in any way. - // - // You can see which instances ar being created in which mode by calling - // the get or listManagedInstances API. - NoCreationRetries bool `json:"noCreationRetries,omitempty"` - // TargetSize: The number of running instances that the managed instance group - // should - // maintain at any given time. The group automatically adds or - // removes - // instances to maintain the number of instances specified by this parameter. - TargetSize int64 `json:"targetSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "NoCreationRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NoCreationRetries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersResizeAdvancedRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersResumeInstancesRequest struct { - // Instances: The URLs of one or more instances to resume. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersResumeInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetAutoHealingRequest struct { - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetAutoHealingRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTargetPoolsRequest struct { - // Fingerprint: Fingerprint of the target pools information, which is a hash of - // the - // contents. This field is used for optimistic locking when you update - // the - // target pool entries. This field is optional. - Fingerprint string `json:"fingerprint,omitempty"` - // TargetPools: The URL of all TargetPool resources to which instances in - // theinstanceGroup field are added. The target pools automatically - // apply to all of the instances in the managed instance group. - TargetPools []string `json:"targetPools,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTargetPoolsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSetTemplateRequest struct { - // InstanceTemplate: URL of the InstanceTemplate resource from which all new - // instances will be - // created. - InstanceTemplate string `json:"instanceTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceTemplate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceTemplate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSetTemplateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersStartInstancesRequest struct { - // Instances: The URLs of one or more instances to start. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersStartInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersStopInstancesRequest struct { - // ForceStop: If this flag is set to true, the Instance Group Manager will - // proceed to - // stop the instances, skipping initialization on them. - ForceStop bool `json:"forceStop,omitempty"` - // Instances: The URLs of one or more instances to stop. This can be a full URL - // or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceStop") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceStop") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersStopInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupManagersSuspendInstancesRequest struct { - // ForceSuspend: If this flag is set to true, the Instance Group Manager will - // proceed to - // suspend the instances, skipping initialization on them. - ForceSuspend bool `json:"forceSuspend,omitempty"` - // Instances: The URLs of one or more instances to suspend. This can be a full - // URL or - // a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. - Instances []string `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForceSuspend") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForceSuspend") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupManagersSuspendInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of InstanceWithNamedPorts resources. - Items []*InstanceWithNamedPorts `json:"items,omitempty"` - // Kind: The resource type. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionInstanceGroupsListInstancesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstances - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionInstanceGroupsListInstancesWarning: [Output Only] Informational -// warning message. -type RegionInstanceGroupsListInstancesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionInstanceGroupsListInstancesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsListInstancesRequest struct { - // InstanceState: Instances in which state should be returned. Valid options - // are: - // 'ALL', 'RUNNING'. By default, it lists all instances. - // - // Possible values: - // "ALL" - Matches any status of the instances, running, non-running and - // others. - // "RUNNING" - Instance is in RUNNING state if it is running. - InstanceState string `json:"instanceState,omitempty"` - // PortName: Name of port user is interested in. It is optional. If it is set, - // only - // information about this ports will be returned. If it is not set, all - // the - // named ports will be returned. - // Always lists all instances. - PortName string `json:"portName,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsListInstancesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionInstanceGroupsSetNamedPortsRequest struct { - // Fingerprint: The fingerprint of the named ports information for this - // instance group. - // Use this optional property to prevent conflicts when multiple users - // change - // the named ports settings concurrently. Obtain the fingerprint with - // theinstanceGroups.get - // method. Then, include the fingerprint in your request to ensure that you - // do not overwrite changes that were applied from another - // concurrent request. - Fingerprint string `json:"fingerprint,omitempty"` - // NamedPorts: The list of named ports to set for this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionInstanceGroupsSetNamedPortsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionList: Contains a list of region resources. -type RegionList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Region resources. - Items []*Region `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#regionList for - // lists of regions. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RegionListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionList) MarshalJSON() ([]byte, error) { - type NoMethod RegionList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionListWarning: [Output Only] Informational warning message. -type RegionListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RegionListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RegionListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkEndpointGroupsAttachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkEndpointGroupsDetachEndpointsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse struct { - // FirewallPolicys: [Output only] Effective firewalls from firewall policy. It - // applies to - // Regional Network Firewall Policies in the specified region, Global - // Network - // Firewall Policies and Hierachial Firewall Policies which are associated - // with the network. - FirewallPolicys []*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` - // Firewalls: Effective firewalls on the network. - Firewalls []*Firewall `json:"firewalls,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicys") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { - // DisplayName: [Output Only] The display name of the firewall policy. - DisplayName string `json:"displayName,omitempty"` - // Name: [Output Only] The name of the firewall policy. - Name string `json:"name,omitempty"` - // PacketMirroringRules: [Output only] The packet mirroring rules that apply to - // the network. - PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` - // Priority: [Output only] Priority of firewall policy association. Not - // applicable for - // type=HIERARCHY. - Priority int64 `json:"priority,omitempty"` - // Rules: [Output only] The rules that apply to the network. - Rules []*FirewallPolicyRule `json:"rules,omitempty"` - // Type: [Output Only] The type of the firewall policy. Can be one of - // HIERARCHY, - // NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. - // - // Possible values: - // "HIERARCHY" - // "NETWORK" - // "NETWORK_REGIONAL" - // "SYSTEM_GLOBAL" - // "SYSTEM_REGIONAL" - // "UNSPECIFIED" - Type string `json:"type,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash in order to update or - // change - // labels. Make a get() request to the resource to get the latest - // fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionTargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionTargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionTargetHttpsProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionUrlMapsValidateRequest struct { - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionUrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionUrlMapsValidateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestMirrorPolicy: A policy that specifies how requests intended for the -// route's backends -// are shadowed to a separate mirrored backend service. The load -// balancer -// doesn't wait for responses from the shadow service. Before sending -// traffic -// to the shadow service, the host or authority header is suffixed with-shadow. -type RequestMirrorPolicy struct { - // BackendService: The full or partial URL to the BackendService resource - // being - // mirrored to. - // - // The backend service configured for a mirroring - // policy must reference backends that are of the same type as the - // original - // backend service matched in the URL map. - // - // Serverless NEG backends are not currently supported as a mirrored - // backend service. - BackendService string `json:"backendService,omitempty"` - // MirrorPercent: The percentage of requests to be mirrored to - // `backend_service`. - MirrorPercent float64 `json:"mirrorPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RequestMirrorPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RequestMirrorPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *RequestMirrorPolicy) UnmarshalJSON(data []byte) error { - type NoMethod RequestMirrorPolicy - var s1 struct { - MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MirrorPercent = float64(s1.MirrorPercent) - return nil -} - -// Reservation: Represents a reservation resource. A reservation ensures that -// capacity is -// held in a specific zone even if the reserved VMs are not running. For -// more -// information, read Reserving zonal -// resources. -type Reservation struct { - // AdvancedDeploymentControl: Advanced control for cluster management, - // applicable only to DENSE - // deployment type reservations. - AdvancedDeploymentControl *ReservationAdvancedDeploymentControl `json:"advancedDeploymentControl,omitempty"` - // AggregateReservation: Reservation for aggregated resources, providing shape - // flexibility. - AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` - // Commitment: [Output Only] Full or partial URL to a parent commitment. This - // field - // displays for reservations that are tied to a commitment. - Commitment string `json:"commitment,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeleteAfterDuration: Duration time relative to reservation creation when - // Compute Engine will - // automatically delete this resource. - DeleteAfterDuration *Duration `json:"deleteAfterDuration,omitempty"` - // DeleteAtTime: Absolute time in future when the reservation will be - // auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text - // format. - DeleteAtTime string `json:"deleteAtTime,omitempty"` - // DeploymentType: Specifies the deployment strategy for this reservation. - // - // Possible values: - // "DENSE" - The reserved capacity is made up of densely deployed reservation - // blocks. - // "DEPLOYMENT_TYPE_UNSPECIFIED" - // "FLEXIBLE" - The reserved capacity is made up of highly flexible, logical - // reservation - // blocks. - DeploymentType string `json:"deploymentType,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnableEmergentMaintenance: Indicates whether Compute Engine allows unplanned - // maintenance for your VMs; - // for example, to fix hardware errors. - EnableEmergentMaintenance bool `json:"enableEmergentMaintenance,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservations for - // reservations. - Kind string `json:"kind,omitempty"` - // LinkedCommitments: [Output Only] Full or partial URL to parent commitments. - // This field - // displays for reservations that are tied to multiple commitments. - LinkedCommitments []string `json:"linkedCommitments,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // ProtectionTier: Protection tier for the workload which specifies the - // workload expectations - // in the event of infrastructure failures at data center (e.g. power - // and/or cooling failures). - // - // Possible values: - // "CAPACITY_OPTIMIZED" - CAPACITY_OPTIMIZED capacity leverages redundancies - // (e.g. power, cooling) - // at the data center during normal operating conditions. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload may be disrupted. As a consequence, it has a - // weaker availability SLO than STANDARD. - // "PROTECTION_TIER_UNSPECIFIED" - Unspecified protection tier. - // "STANDARD" - STANDARD protection for workload that should be protected by - // redundancies - // (e.g. power, cooling) at the data center level. In the event - // of - // infrastructure failures at data center (e.g. power and/or cooling - // failures), this workload is expected to continue as normal using - // the - // redundancies. - ProtectionTier string `json:"protectionTier,omitempty"` - // ReservationMode: [Output only] Indicates the reservation mode of the - // reservation. - // - // Possible values: - // "CALENDAR" - The delivered reservations terminate at specified endtime - // along with - // terminating VMs running on it. The price for this reservation is - // different from on-demand. Currently offered for A3+ GPUs and TPUs only. - // "DEFAULT" - The delivered reservations do not terminate VMs at the end - // of - // reservations. On-demand pricing and available for all VM families. - // This is default mode. - // "RESERVATION_MODE_UNSPECIFIED" - ReservationMode string `json:"reservationMode,omitempty"` - // ReservationSharingPolicy: Specify the reservation sharing policy. If - // unspecified, the reservation - // will not be shared with Google Cloud managed services. - ReservationSharingPolicy *AllocationReservationSharingPolicy `json:"reservationSharingPolicy,omitempty"` - // ResourcePolicies: Resource policies to be added to this reservation. The key - // is defined by - // user, and the value is resource policy url. This is to define - // placement - // policy with reservation. - ResourcePolicies map[string]string `json:"resourcePolicies,omitempty"` - // ResourceStatus: [Output Only] Status information for Reservation resource. - ResourceStatus *AllocationResourceStatus `json:"resourceStatus,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SchedulingType: The type of maintenance for the reservation. - // - // Possible values: - // "GROUPED" - Maintenance on all reserved instances in the reservation is - // synchronized. - // "GROUP_MAINTENANCE_TYPE_UNSPECIFIED" - Unknown maintenance type. - // "INDEPENDENT" - Maintenance is not synchronized for this reservation. - // Instead, each - // instance has its own maintenance window. - SchedulingType string `json:"schedulingType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // ShareSettings: Specify share-settings to create a shared reservation. This - // property is - // optional. For more information about the syntax and options for this - // field and its subfields, see the guide for creating - // a shared reservation. - ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservation: Reservation for instances with specific machine shapes. - SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` - // SpecificReservationRequired: Indicates whether the reservation can be - // consumed by VMs with affinity - // for "any" reservation. If the field is set, then only VMs that target - // the reservation by name can consume from this reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // Status: [Output Only] The status of the reservation. - // - // - // - CREATING: Reservation resources are being - // allocated. - // - READY: Reservation resources have been allocated, - // and the reservation is ready for use. - // - DELETING: Reservation deletion is in progress. - // - UPDATING: Reservation update is in progress. - // - // Possible values: - // "CREATING" - Reservation resources are being allocated. - // "DELETING" - Reservation deletion is in progress. - // "INVALID" - // "READY" - Reservation resources have been allocated, and the reservation - // is ready - // for use. - // "UPDATING" - Reservation update is in progress. - Status string `json:"status,omitempty"` - // Zone: Zone in which the reservation resides. A zone must be provided if - // the - // reservation is created within a commitment. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdvancedDeploymentControl") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedDeploymentControl") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Reservation) MarshalJSON() ([]byte, error) { - type NoMethod Reservation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAdvancedDeploymentControl: Advance control for cluster -// management, applicable only to DENSE deployment -// type reservations. -type ReservationAdvancedDeploymentControl struct { - // ReservationOperationalMode: Indicates chosen reservation operational mode - // for the reservation. - // - // Possible values: - // "ALL_CAPACITY" - Google Cloud does not manage the failure of machines, but - // provides - // additional capacity, which is not guaranteed to be available. - // "HIGHLY_AVAILABLE_CAPACITY" - Google Cloud manages the failure of machines - // to provide high - // availability. - // "RESERVATION_OPERATIONAL_MODE_UNSPECIFIED" - ReservationOperationalMode string `json:"reservationOperationalMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReservationOperationalMode") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReservationOperationalMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAdvancedDeploymentControl) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAdvancedDeploymentControl - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAffinity: Specifies the reservations that this instance can -// consume from. -type ReservationAffinity struct { - // ConsumeReservationType: Specifies the type of reservation from which this - // instance can consume - // resources: ANY_RESERVATION (default),SPECIFIC_RESERVATION, or - // NO_RESERVATION. See - // Consuming reserved instances for examples. - // - // Possible values: - // "ANY_RESERVATION" - Consume any allocation available. - // "NO_RESERVATION" - Do not consume from any allocated capacity. - // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. Must - // specify key value fields - // for specifying the reservations. - // "SPECIFIC_THEN_ANY_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume any - // reservation available if the specified reservation is not available - // or - // exhausted. Must specify key value fields for specifying the reservations. - // "SPECIFIC_THEN_NO_RESERVATION" - Prefer to consume from a specific - // reservation, but still consume - // from the on-demand pool if the specified reservation is exhausted. - // Must - // specify key value fields for specifying the reservations. - // "UNSPECIFIED" - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of a reservation resource. To target - // aSPECIFIC_RESERVATION by name, specifygoogleapis.com/reservation-name as the - // key and specify - // the name of your reservation as its value. - Key string `json:"key,omitempty"` - // Values: Corresponds to the label values of a reservation resource. This can - // be - // either a name to a reservation in the same project - // or - // "projects/different-project/reservations/some-reservation-name" to target - // a - // shared reservation in the same zone but in a different project. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumeReservationType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAggregatedList: Contains a list of reservations. -type ReservationAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Allocation resources. - Items map[string]ReservationsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReservationAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAggregatedListWarning: [Output Only] Informational warning -// message. -type ReservationAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlock: Represents a reservation block resource. -type ReservationBlock struct { - // Count: [Output Only] The number of resources that are allocated in - // this - // reservation block. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // HealthInfo: [Output Only] Health information for the reservation block. - HealthInfo *ReservationBlockHealthInfo `json:"healthInfo,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InUseCount: [Output Only] The number of instances that are currently in use - // on this - // reservation block. - InUseCount int64 `json:"inUseCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances running - // on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservationBlock for - // reservation blocks. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of this reservation block generated by - // Google - // Compute Engine. The name must be 1-63 characters long, and comply - // with - // RFC1035 @pattern a-z (?:[-a-z0-9]{0,61}[a-z0-9])? - Name string `json:"name,omitempty"` - // PhysicalTopology: [Output Only] The physical topology of the reservation - // block. - PhysicalTopology *ReservationBlockPhysicalTopology `json:"physicalTopology,omitempty"` - // ReservationMaintenance: [Output Only] Maintenance information for this - // reservation block. - ReservationMaintenance *GroupMaintenanceInfo `json:"reservationMaintenance,omitempty"` - // ReservationSubBlockCount: [Output Only] The number of reservation subBlocks - // associated with this - // reservation block. - ReservationSubBlockCount int64 `json:"reservationSubBlockCount,omitempty"` - // ReservationSubBlockInUseCount: [Output Only] The number of in-use - // reservation subBlocks associated with - // this reservation block. If at least one VM is running on a subBlock, it - // is - // considered in-use. - ReservationSubBlockInUseCount int64 `json:"reservationSubBlockInUseCount,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the reservation block. - // - // Possible values: - // "CREATING" - Resources are being allocated for the reservation block. - // "DELETING" - Reservation block is currently being deleted. - // "INVALID" - // "READY" - Reservation block has allocated all its resources. - Status string `json:"status,omitempty"` - // Zone: [Output Only] Zone in which the reservation block resides. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlock) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockHealthInfo: Health information for the reservation block. -type ReservationBlockHealthInfo struct { - // DegradedSubBlockCount: The number of subBlocks that are degraded. - DegradedSubBlockCount int64 `json:"degradedSubBlockCount,omitempty"` - // HealthStatus: The health status of the reservation block. - // - // Possible values: - // "DEGRADED" - The reservation block is degraded. - // "HEALTHY" - The reservation block is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation block - // is unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthySubBlockCount: The number of subBlocks that are healthy. - HealthySubBlockCount int64 `json:"healthySubBlockCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedSubBlockCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedSubBlockCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlockPhysicalTopology struct { - // Block: The hash of the capacity block within the cluster. - Block string `json:"block,omitempty"` - // Cluster: The cluster name of the reservation block. - Cluster string `json:"cluster,omitempty"` - // Instances: The detailed instances information for a given Block - Instances []*ReservationBlockPhysicalTopologyInstance `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockPhysicalTopologyInstance: The instances information for a -// given Block -type ReservationBlockPhysicalTopologyInstance struct { - // InstanceId: The InstanceId of the instance - InstanceId uint64 `json:"instanceId,omitempty,string"` - // PhysicalHostTopology: The PhysicalHostTopology of instances within a Block - // resource. - PhysicalHostTopology *ReservationBlockPhysicalTopologyInstancePhysicalHostTopology `json:"physicalHostTopology,omitempty"` - // ProjectId: Project where the instance lives - ProjectId uint64 `json:"projectId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InstanceId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopologyInstance) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopologyInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlockPhysicalTopologyInstancePhysicalHostTopology: The -// PhysicalHostTopology of the instance within a Block resource. -type ReservationBlockPhysicalTopologyInstancePhysicalHostTopology struct { - // Host: Host hash for a given instance - Host string `json:"host,omitempty"` - // SubBlock: Sub block hash for a given instance - SubBlock string `json:"subBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlockPhysicalTopologyInstancePhysicalHostTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlockPhysicalTopologyInstancePhysicalHostTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlocksGetResponse struct { - Resource *ReservationBlock `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksGetResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksGetResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlocksListResponse: A list of reservation blocks under a single -// reservation. -type ReservationBlocksListResponse struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of reservation block resources. - Items []*ReservationBlock `json:"items,omitempty"` - // Kind: Type of the resource. Alwayscompute#reservationBlock for a list of - // reservation blocks. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *ReservationBlocksListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationBlocksListResponseWarning: Informational warning message. -type ReservationBlocksListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationBlocksListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationBlocksListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationBlocksListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationBlocksListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Allocation resources. - Items []*Reservation `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Always compute#reservationsList - // for listsof reservations - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ReservationListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationListWarning: [Output Only] Informational warning message. -type ReservationListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlock: Represents a reservation subBlock resource. -type ReservationSubBlock struct { - // AcceleratorTopologiesInfo: [Output Only] Slice info for the reservation - // subBlock. - AcceleratorTopologiesInfo *AcceleratorTopologiesInfo `json:"acceleratorTopologiesInfo,omitempty"` - // Count: [Output Only] The number of hosts that are allocated in - // this - // reservation subBlock. - Count int64 `json:"count,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // HealthInfo: [Output Only] Health information for the reservation subBlock. - HealthInfo *ReservationSubBlockHealthInfo `json:"healthInfo,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InUseCount: [Output Only] The number of instances that are currently in use - // on this - // reservation subBlock. - InUseCount int64 `json:"inUseCount,omitempty"` - // InUseHostCount: Number of hosts currently in use. If there is one or more - // Instances running - // on the host, it is considered in use. - InUseHostCount int64 `json:"inUseHostCount,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#reservationSubBlock - // for reservation subBlocks. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of this reservation subBlock generated by - // Google - // Compute Engine. The name must be 1-63 characters long, and comply - // with - // RFC1035 @pattern a-z (?:[-a-z0-9]{0,61}[a-z0-9])? - Name string `json:"name,omitempty"` - // PhysicalTopology: [Output Only] The physical topology of the reservation - // subBlock. - PhysicalTopology *ReservationSubBlockPhysicalTopology `json:"physicalTopology,omitempty"` - // ReservationSubBlockMaintenance: Maintenance information for this reservation - // subBlock. - ReservationSubBlockMaintenance *GroupMaintenanceInfo `json:"reservationSubBlockMaintenance,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Status: [Output Only] Status of the reservation subBlock. - // - // Possible values: - // "CREATING" - Resources are being allocated for the reservation subBlock. - // "DELETING" - Reservation subBlock is currently being deleted. - // "INVALID" - // "READY" - Reservation subBlock has allocated all its resources. - Status string `json:"status,omitempty"` - // Zone: [Output Only] Zone in which the reservation subBlock resides. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologiesInfo") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologiesInfo") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlock) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlockHealthInfo: Health information for the reservation -// subBlock. -type ReservationSubBlockHealthInfo struct { - // DegradedHostCount: The number of degraded hosts in the reservation subBlock. - DegradedHostCount int64 `json:"degradedHostCount,omitempty"` - // DegradedInfraCount: The number of degraded infrastructure (e.g NV link - // domain) in the - // reservation subblock. - DegradedInfraCount int64 `json:"degradedInfraCount,omitempty"` - // HealthStatus: The health status of the reservation subBlock. - // - // Possible values: - // "DEGRADED" - The reservation subBlock is degraded. - // "HEALTHY" - The reservation subBlock is healthy. - // "HEALTH_STATUS_UNSPECIFIED" - The health status of the reservation - // subBlock is unspecified. - HealthStatus string `json:"healthStatus,omitempty"` - // HealthyHostCount: The number of healthy hosts in the reservation subBlock. - HealthyHostCount int64 `json:"healthyHostCount,omitempty"` - // HealthyInfraCount: The number of healthy infrastructure (e.g NV link domain) - // in the - // reservation subblock. - HealthyInfraCount int64 `json:"healthyInfraCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DegradedHostCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DegradedHostCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlockHealthInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlockHealthInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlockPhysicalTopology struct { - // Block: The hash of the capacity block within the cluster. - Block string `json:"block,omitempty"` - // Cluster: The cluster name of the reservation subBlock. - Cluster string `json:"cluster,omitempty"` - // SubBlock: The hash of the capacity sub-block within the capacity block. - SubBlock string `json:"subBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlockPhysicalTopology) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlockPhysicalTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksGetResponse struct { - Resource *ReservationSubBlock `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksGetResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksGetResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksListResponse: A list of reservation subBlocks under a -// single reservation. -type ReservationSubBlocksListResponse struct { - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of reservation subBlock resources. - Items []*ReservationSubBlock `json:"items,omitempty"` - // Kind: Type of the resource. Alwayscompute#reservationSubBlock for a list of - // reservation - // subBlocks. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: Informational warning message. - Warning *ReservationSubBlocksListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksListResponseWarning: Informational warning message. -type ReservationSubBlocksListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationSubBlocksListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationSubBlocksReportFaultyRequest struct { - // DisruptionSchedule: The disruption schedule for the subBlock. - // - // Possible values: - // "DISRUPTION_SCHEDULE_UNSPECIFIED" - // "IMMEDIATE" - All VMs will be disrupted immediately. - DisruptionSchedule string `json:"disruptionSchedule,omitempty"` - // FailureComponent: The component that experienced the fault. - // - // Possible values: - // "FAILURE_COMPONENT_UNSPECIFIED" - // "MULTIPLE_FAULTY_HOSTS" - Multiple hosts experienced the fault. - // "NVLINK_SWITCH" - The NVLink switch experienced the fault. - FailureComponent string `json:"failureComponent,omitempty"` - // FaultReasons: The reasons for the fault experienced with the subBlock. - FaultReasons []*ReservationSubBlocksReportFaultyRequestFaultReason `json:"faultReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisruptionSchedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisruptionSchedule") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksReportFaultyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksReportFaultyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationSubBlocksReportFaultyRequestFaultReason: The reason for the fault -// experienced with the subBlock. -type ReservationSubBlocksReportFaultyRequestFaultReason struct { - // Behavior: The behavior of the fault experienced with the subBlock. - // - // Possible values: - // "FAULT_BEHAVIOR_UNSPECIFIED" - // "GPU_ERROR" - The subBlock experienced a GPU error. - // "PERFORMANCE" - The subBlock experienced performance issues. - // "SILENT_DATA_CORRUPTION" - The subBlock experienced silent data - // corruption. - // "SWITCH_FAILURE" - The subBlock experienced a switch failure. - Behavior string `json:"behavior,omitempty"` - // Description: The description of the fault experienced with the subBlock. - Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "Behavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Behavior") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationSubBlocksReportFaultyRequestFaultReason) MarshalJSON() ([]byte, error) { - type NoMethod ReservationSubBlocksReportFaultyRequestFaultReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsBlocksPerformMaintenanceRequest struct { - // MaintenanceScope: Specifies if all, running or unused hosts are in scope for - // this request. - // - // Possible values: - // "ALL" - Trigger maintenance for all hosts belonging to this - // reservation - // irrespective of whether VMs are running on them or not. - // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only - // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this - // reservation which - // have VMs running on them. - // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to - // this reservation which - // do not have any VMs running on them. This is not allowed for Standard ExR - MaintenanceScope string `json:"maintenanceScope,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceScope") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsBlocksPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsBlocksPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsPerformMaintenanceRequest struct { - // MaintenanceScope: Specifies if all, running or unused hosts are in scope for - // this request. - // - // Possible values: - // "ALL" - Trigger maintenance for all hosts belonging to this - // reservation - // irrespective of whether VMs are running on them or not. - // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only - // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this - // reservation which - // have VMs running on them. - // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to - // this reservation which - // do not have any VMs running on them. This is not allowed for Standard ExR - MaintenanceScope string `json:"maintenanceScope,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceScope") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsPerformMaintenanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsResizeRequest struct { - // SpecificSkuCount: Number of allocated resources can be resized with minimum - // = 1 and - // maximum = 1000. - SpecificSkuCount int64 `json:"specificSkuCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "SpecificSkuCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SpecificSkuCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsResizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsResizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsScopedList struct { - // Reservations: A list of reservations contained in this scope. - Reservations []*Reservation `json:"reservations,omitempty"` - // Warning: Informational warning which replaces the list of reservations - // when - // the list is empty. - Warning *ReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reservations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Reservations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationsScopedListWarning: Informational warning which replaces the list -// of reservations when -// the list is empty. -type ReservationsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ReservationsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReservationsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ReservationsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceCommitment: Commitment for a particular hardware resource (a -// commitment is composed of -// one or more of these). -type ResourceCommitment struct { - // AcceleratorType: Name of the accelerator type or GPU resource. Specify this - // field only when - // the type of hardware resource is ACCELERATOR. - AcceleratorType string `json:"acceleratorType,omitempty"` - // Amount: The quantity of the hardware resource that you want to commit to - // purchasing - // (in a type-dependent unit). - // - // - For vCPUs, you must specify an integer value. - // - For memory, you specify the amount of MB that you want. The value you - // specify must be a multiple of 256 MB, with up to 6.5 GB of - // memory per every vCPU. - // - For GPUs, you must specify an integer value. - // - For Local SSD disks, you must specify the amount in GB. The size of a - // single Local SSD disk is 375 GB. - Amount int64 `json:"amount,omitempty,string"` - // Type: The type of hardware resource that you want to specify. - // You can specify any of the following values: - // - // - VCPU - // - MEMORY - // - LOCAL_SSD - // - ACCELERATOR - // - // - // - // Specify as a separate entry in the list for each - // individual resource type. - // - // Possible values: - // "ACCELERATOR" - // "LOCAL_SSD" - // "MEMORY" - // "UNSPECIFIED" - // "VCPU" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceCommitment) MarshalJSON() ([]byte, error) { - type NoMethod ResourceCommitment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceGroupReference struct { - // Group: A URI referencing one of the instance groups or network endpoint - // groups - // listed in the backend service. - Group string `json:"group,omitempty"` - // ForceSendFields is a list of field names (e.g. "Group") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Group") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceGroupReference) MarshalJSON() ([]byte, error) { - type NoMethod ResourceGroupReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePoliciesScopedList struct { - // ResourcePolicies: A list of resourcePolicies contained in this scope. - ResourcePolicies []*ResourcePolicy `json:"resourcePolicies,omitempty"` - // Warning: Informational warning which replaces the list of resourcePolicies - // when - // the list is empty. - Warning *ResourcePoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourcePolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePoliciesScopedListWarning: Informational warning which replaces the -// list of resourcePolicies when -// the list is empty. -type ResourcePoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicy: Represents a Resource Policy resource. You can use resource -// policies to -// schedule actions for some Compute Engine resources. For example, you can -// use them toschedule persistent disk -// snapshots. -type ResourcePolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - Description string `json:"description,omitempty"` - // DiskConsistencyGroupPolicy: Resource policy for disk consistency groups. - DiskConsistencyGroupPolicy *ResourcePolicyDiskConsistencyGroupPolicy `json:"diskConsistencyGroupPolicy,omitempty"` - // GroupPlacementPolicy: Resource policy for instances for placement - // configuration. - GroupPlacementPolicy *ResourcePolicyGroupPlacementPolicy `json:"groupPlacementPolicy,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSchedulePolicy: Resource policy for scheduling instance operations. - InstanceSchedulePolicy *ResourcePolicyInstanceSchedulePolicy `json:"instanceSchedulePolicy,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#resource_policies - // for resource policies. - Kind string `json:"kind,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The resource name must be 1-63 characters long, and - // comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - Region string `json:"region,omitempty"` - // ResourceStatus: [Output Only] The system status of the resource policy. - ResourceStatus *ResourcePolicyResourceStatus `json:"resourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SnapshotSchedulePolicy: Resource policy for persistent disks for creating - // snapshots. - SnapshotSchedulePolicy *ResourcePolicySnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` - // Status: [Output Only] The status of resource policy creation. - // - // Possible values: - // "CREATING" - Resource policy is being created. - // "DELETING" - Resource policy is being deleted. - // "EXPIRED" - Resource policy is expired and will not run again. - // "INVALID" - // "READY" - Resource policy is ready to be used. - Status string `json:"status,omitempty"` - // WorkloadPolicy: Resource policy for defining instance placement for MIGs. - WorkloadPolicy *ResourcePolicyWorkloadPolicy `json:"workloadPolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyAggregatedList: Contains a list of resourcePolicies. -type ResourcePolicyAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ResourcePolicy resources. - Items map[string]ResourcePoliciesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyAggregatedListWarning: [Output Only] Informational warning -// message. -type ResourcePolicyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePolicyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyDailyCycle: Time window specified for daily operations. -type ResourcePolicyDailyCycle struct { - // DaysInCycle: Defines a schedule with units measured in days. The value - // determines - // how many days pass between the start of each cycle. - DaysInCycle int64 `json:"daysInCycle,omitempty"` - // Duration: [Output only] A predetermined duration for the window, - // automatically - // chosen to be the smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // StartTime: Start time of the window. This must be in UTC format that - // resolves to one - // of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For - // example, both 13:00-5 and 08:00 are valid. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "DaysInCycle") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DaysInCycle") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyDailyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyDailyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyDiskConsistencyGroupPolicy: Resource policy for disk -// consistency groups. -type ResourcePolicyDiskConsistencyGroupPolicy struct { -} - -// ResourcePolicyGroupPlacementPolicy: A GroupPlacementPolicy specifies -// resource placement configuration. -// It specifies the failure bucket separation -type ResourcePolicyGroupPlacementPolicy struct { - // AcceleratorTopologyMode: Specifies the connection mode for the accelerator - // topology. If not - // specified, the default is AUTO_CONNECT. - // - // Possible values: - // "AUTO_CONNECT" - The interconnected chips are pre-configured at the time - // of VM creation. - // "PROVISION_ONLY" - The interconnected chips are connected on demand. At - // the time of VM - // creation, the chips are not connected. - AcceleratorTopologyMode string `json:"acceleratorTopologyMode,omitempty"` - // AvailabilityDomainCount: The number of availability domains to spread - // instances across. If two - // instances are in different availability domain, they are not in the same - // low latency network. - AvailabilityDomainCount int64 `json:"availabilityDomainCount,omitempty"` - // Collocation: Specifies network collocation - // - // Possible values: - // "COLLOCATED" - // "UNSPECIFIED_COLLOCATION" - Collocation string `json:"collocation,omitempty"` - // GpuTopology: Specifies the shape of the GPU slice, in slice based GPU - // families eg. - // A4X. - GpuTopology string `json:"gpuTopology,omitempty"` - // MaxDistance: Specifies the number of max logical switches. - MaxDistance int64 `json:"maxDistance,omitempty"` - // SliceCount: Specifies the number of slices in a multislice workload. - SliceCount int64 `json:"sliceCount,omitempty"` - // TpuTopology: Specifies the shape of the TPU slice - TpuTopology string `json:"tpuTopology,omitempty"` - // VmCount: Number of VMs in this placement group. Google does not recommend - // that you - // use this field unless you use a compact policy and you want your policy - // to work only if it contains this exact number of VMs. - VmCount int64 `json:"vmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopologyMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopologyMode") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyGroupPlacementPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyGroupPlacementPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyHourlyCycle: Time window specified for hourly operations. -type ResourcePolicyHourlyCycle struct { - // Duration: [Output only] Duration of the time window, automatically chosen to - // be - // smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // HoursInCycle: Defines a schedule with units measured in hours. The value - // determines - // how many hours pass between the start of each cycle. - HoursInCycle int64 `json:"hoursInCycle,omitempty"` - // StartTime: Time within the window to start the operations. - // It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyHourlyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyHourlyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyInstanceSchedulePolicy: An InstanceSchedulePolicy specifies -// when and how frequent certain -// operations are performed on the instance. -type ResourcePolicyInstanceSchedulePolicy struct { - // ExpirationTime: The expiration time of the schedule. The timestamp is an - // RFC3339 string. - ExpirationTime string `json:"expirationTime,omitempty"` - // StartTime: The start time of the schedule. The timestamp is an RFC3339 - // string. - StartTime string `json:"startTime,omitempty"` - // TimeZone: Specifies the time zone to be used in interpreting - // Schedule.schedule. - // The value of this field must be a time zone name from the tz - // database: - // https://wikipedia.org/wiki/Tz_database. - TimeZone string `json:"timeZone,omitempty"` - // VmStartSchedule: Specifies the schedule for starting instances. - VmStartSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStartSchedule,omitempty"` - // VmStopSchedule: Specifies the schedule for stopping instances. - VmStopSchedule *ResourcePolicyInstanceSchedulePolicySchedule `json:"vmStopSchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpirationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpirationTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyInstanceSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyInstanceSchedulePolicySchedule: Schedule for an instance -// operation. -type ResourcePolicyInstanceSchedulePolicySchedule struct { - // Schedule: Specifies the frequency for the operation, using the unix-cron - // format. - Schedule string `json:"schedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "Schedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Schedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyInstanceSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyInstanceSchedulePolicySchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of ResourcePolicy resources. - Items []*ResourcePolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource.Alwayscompute#resourcePoliciesList for - // listsof resourcePolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ResourcePolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyList) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyListWarning: [Output Only] Informational warning message. -type ResourcePolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ResourcePolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyResourceStatus: Contains output only fields. -// Use this sub-message for all output fields set on ResourcePolicy. -// The internal structure of this "status" field should mimic the structure -// of ResourcePolicy proto specification. -type ResourcePolicyResourceStatus struct { - // InstanceSchedulePolicy: [Output Only] Specifies a set of output values - // reffering to - // the instance_schedule_policy system status. - // This field should have the same name as corresponding policy field. - InstanceSchedulePolicy *ResourcePolicyResourceStatusInstanceSchedulePolicyStatus `json:"instanceSchedulePolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSchedulePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSchedulePolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyResourceStatusInstanceSchedulePolicyStatus struct { - // LastRunStartTime: [Output Only] The last time the schedule successfully - // ran. - // The timestamp is an RFC3339 string. - LastRunStartTime string `json:"lastRunStartTime,omitempty"` - // NextRunStartTime: [Output Only] The next time the schedule is planned to - // run. - // The actual time might be slightly different. - // The timestamp is an RFC3339 string. - NextRunStartTime string `json:"nextRunStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastRunStartTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastRunStartTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyResourceStatusInstanceSchedulePolicyStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicy: A snapshot schedule policy specifies -// when and how frequently snapshots are -// to be created for the target disk. Also specifies how many and how -// long -// these scheduled snapshots should be retained. -type ResourcePolicySnapshotSchedulePolicy struct { - // RetentionPolicy: Retention policy applied to snapshots created by this - // resource policy. - RetentionPolicy *ResourcePolicySnapshotSchedulePolicyRetentionPolicy `json:"retentionPolicy,omitempty"` - // Schedule: A Vm Maintenance Policy specifies what kind of - // infrastructure - // maintenance we are allowed to perform on this VM and when. Schedule - // that is applied to disks covered by this policy. - Schedule *ResourcePolicySnapshotSchedulePolicySchedule `json:"schedule,omitempty"` - // SnapshotProperties: Properties with which snapshots are created such as - // labels, encryption - // keys. - SnapshotProperties *ResourcePolicySnapshotSchedulePolicySnapshotProperties `json:"snapshotProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetentionPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RetentionPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicyRetentionPolicy: Policy for retention of -// scheduled snapshots. -type ResourcePolicySnapshotSchedulePolicyRetentionPolicy struct { - // MaxRetentionDays: Maximum age of the snapshot that is allowed to be kept. - MaxRetentionDays int64 `json:"maxRetentionDays,omitempty"` - // OnSourceDiskDelete: Specifies the behavior to apply to scheduled snapshots - // when - // the source disk is deleted. - // - // Possible values: - // "APPLY_RETENTION_POLICY" - // "KEEP_AUTO_SNAPSHOTS" - // "UNSPECIFIED_ON_SOURCE_DISK_DELETE" - OnSourceDiskDelete string `json:"onSourceDiskDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxRetentionDays") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxRetentionDays") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicyRetentionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicyRetentionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicySchedule: A schedule for disks where the -// schedueled operations are performed. -type ResourcePolicySnapshotSchedulePolicySchedule struct { - DailySchedule *ResourcePolicyDailyCycle `json:"dailySchedule,omitempty"` - HourlySchedule *ResourcePolicyHourlyCycle `json:"hourlySchedule,omitempty"` - WeeklySchedule *ResourcePolicyWeeklyCycle `json:"weeklySchedule,omitempty"` - // ForceSendFields is a list of field names (e.g. "DailySchedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DailySchedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicySchedule) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySchedule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicySnapshotSchedulePolicySnapshotProperties: Specified snapshot -// properties for scheduled snapshots created by this -// policy. -type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { - // ChainName: Chain name that the snapshot is created in. - ChainName string `json:"chainName,omitempty"` - // GuestFlush: Indication to perform a 'guest aware' snapshot. - GuestFlush bool `json:"guestFlush,omitempty"` - // Labels: Labels to apply to scheduled snapshots. These can be later - // modified - // by the setLabels method. Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Region: Region where the snapshot is scoped to. - Region string `json:"region,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the auto snapshot - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChainName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChainName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicySnapshotSchedulePolicySnapshotProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyWeeklyCycle: Time window specified for weekly operations. -type ResourcePolicyWeeklyCycle struct { - // DayOfWeeks: Up to 7 intervals/windows, one for each day of the week. - DayOfWeeks []*ResourcePolicyWeeklyCycleDayOfWeek `json:"dayOfWeeks,omitempty"` - // ForceSendFields is a list of field names (e.g. "DayOfWeeks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DayOfWeeks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWeeklyCycle) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourcePolicyWeeklyCycleDayOfWeek struct { - // Day: Defines a schedule that runs on specific days of the week. Specify - // one or more days. The following options are available: - // MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY. - // - // Possible values: - // "FRIDAY" - // "INVALID" - // "MONDAY" - // "SATURDAY" - // "SUNDAY" - // "THURSDAY" - // "TUESDAY" - // "WEDNESDAY" - Day string `json:"day,omitempty"` - // Duration: [Output only] Duration of the time window, automatically chosen to - // be - // smallest possible in the given scenario. - Duration string `json:"duration,omitempty"` - // StartTime: Time within the window to start the operations. - // It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWeeklyCycleDayOfWeek - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourcePolicyWorkloadPolicy: Represents the workload policy. -type ResourcePolicyWorkloadPolicy struct { - // AcceleratorTopology: Specifies the topology required to create a partition - // for VMs that have - // interconnected GPUs. - AcceleratorTopology string `json:"acceleratorTopology,omitempty"` - // AcceleratorTopologyMode: Specifies the connection mode for the accelerator - // topology. If not - // specified, the default is AUTO_CONNECT. - // - // Possible values: - // "AUTO_CONNECT" - The interconnected chips are pre-configured at the time - // of VM creation. - // "PROVISION_ONLY" - The interconnected chips are connected on demand. At - // the time of VM - // creation, the chips are not connected. - AcceleratorTopologyMode string `json:"acceleratorTopologyMode,omitempty"` - // MaxTopologyDistance: Specifies the maximum distance between instances. - // - // Possible values: - // "BLOCK" - VMs must be provisioned in the same block. - // "CLUSTER" - VMs must be provisioned in the same cluster. - // "SUBBLOCK" - VMs must be provisioned in the same subblock. - MaxTopologyDistance string `json:"maxTopologyDistance,omitempty"` - // Type: Specifies the intent of the instance placement in the MIG. - // - // Possible values: - // "HIGH_AVAILABILITY" - MIG spreads out the instances as much as possible - // for high availability. - // "HIGH_THROUGHPUT" - MIG provisions instances as close to each other as - // possible for high - // throughput. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorTopology") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTopology") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourcePolicyWorkloadPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyWorkloadPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatus: Contains output only fields. -// Use this sub-message for actual values set on Instance attributes as -// compared -// to the value requested by the user (intent) in their instance CRUD calls. -type ResourceStatus struct { - // EffectiveInstanceMetadata: [Output Only] Effective metadata is a field that - // consolidates project, - // zonal instance settings, and instance-level predefined metadata keys - // to - // provide the overridden value for those metadata keys at the instance level. - EffectiveInstanceMetadata *ResourceStatusEffectiveInstanceMetadata `json:"effectiveInstanceMetadata,omitempty"` - // PhysicalHost: [Output Only] The precise location of your instance within the - // zone's data - // center, including the block, sub-block, and host. The field is formatted - // as - // follows: blockId/subBlockId/hostId. - PhysicalHost string `json:"physicalHost,omitempty"` - // PhysicalHostTopology: [Output Only] A series of fields containing the global - // name of the Compute - // Engine cluster, as well as the ID of the block, sub-block, and host on - // which the running instance is located. - PhysicalHostTopology *ResourceStatusPhysicalHostTopology `json:"physicalHostTopology,omitempty"` - // ReservationConsumptionInfo: [Output Only] Reservation information that the - // instance is consuming from. - ReservationConsumptionInfo *ResourceStatusReservationConsumptionInfo `json:"reservationConsumptionInfo,omitempty"` - Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` - // ShutdownDetails: [Output Only] Details about the instance stopping state. - ShutdownDetails *ResourceStatusShutdownDetails `json:"shutdownDetails,omitempty"` - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "EffectiveInstanceMetadata") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EffectiveInstanceMetadata") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusEffectiveInstanceMetadata: Effective values of predefined -// metadata keys for an instance. -type ResourceStatusEffectiveInstanceMetadata struct { - // BlockProjectSshKeysMetadataValue: Effective block-project-ssh-keys value at - // Instance level. - BlockProjectSshKeysMetadataValue bool `json:"blockProjectSshKeysMetadataValue,omitempty"` - // EnableGuestAttributesMetadataValue: Effective enable-guest-attributes value - // at Instance level. - EnableGuestAttributesMetadataValue bool `json:"enableGuestAttributesMetadataValue,omitempty"` - // EnableOsInventoryMetadataValue: Effective enable-os-inventory value at - // Instance level. - EnableOsInventoryMetadataValue bool `json:"enableOsInventoryMetadataValue,omitempty"` - // EnableOsconfigMetadataValue: Effective enable-osconfig value at Instance - // level. - EnableOsconfigMetadataValue bool `json:"enableOsconfigMetadataValue,omitempty"` - // EnableOsloginMetadataValue: Effective enable-oslogin value at Instance - // level. - EnableOsloginMetadataValue bool `json:"enableOsloginMetadataValue,omitempty"` - // SerialPortEnableMetadataValue: Effective serial-port-enable value at - // Instance level. - SerialPortEnableMetadataValue bool `json:"serialPortEnableMetadataValue,omitempty"` - // SerialPortLoggingEnableMetadataValue: Effective serial-port-logging-enable - // value at Instance level. - SerialPortLoggingEnableMetadataValue bool `json:"serialPortLoggingEnableMetadataValue,omitempty"` - // VmDnsSettingMetadataValue: Effective VM DNS setting at Instance level. - VmDnsSettingMetadataValue string `json:"vmDnsSettingMetadataValue,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "BlockProjectSshKeysMetadataValue") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "BlockProjectSshKeysMetadataValue") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusEffectiveInstanceMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusEffectiveInstanceMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusPhysicalHostTopology: Represents the physical host topology of -// the host on which the VM is -// running. -type ResourceStatusPhysicalHostTopology struct { - // Block: [Output Only] The ID of the block in which the running instance - // is - // located. Instances within the same block experience low network latency. - Block string `json:"block,omitempty"` - // Cluster: [Output Only] The global name of the Compute Engine cluster where - // the - // running instance is located. - Cluster string `json:"cluster,omitempty"` - // Host: [Output Only] The ID of the host on which the running instance is - // located. - // Instances on the same host experience the lowest possible network - // latency. - Host string `json:"host,omitempty"` - // Subblock: [Output Only] The ID of the sub-block in which the running - // instance is - // located. Instances in the same sub-block experience lower network - // latency - // than instances in the same block. - Subblock string `json:"subblock,omitempty"` - // ForceSendFields is a list of field names (e.g. "Block") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Block") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusPhysicalHostTopology) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusPhysicalHostTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusReservationConsumptionInfo: Reservation consumption -// information that the instance is consuming from. -type ResourceStatusReservationConsumptionInfo struct { - // ConsumedReservation: [Output Only] The full resource name of the reservation - // that this - // instance is consuming from. - ConsumedReservation string `json:"consumedReservation,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumedReservation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumedReservation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusReservationConsumptionInfo) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusReservationConsumptionInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceStatusScheduling struct { - // AvailabilityDomain: Specifies the availability domain to place the instance - // in. The value - // must be a number between 1 and the number of availability domains - // specified in the spread placement policy attached to the instance. - AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` - // TerminationTimestamp: Time in future when the instance will be terminated - // inRFC3339 text format. - TerminationTimestamp string `json:"terminationTimestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityDomain") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailabilityDomain") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusScheduling) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusScheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceStatusShutdownDetails: Specifies if the instance is in -// `PENDING_STOP` state or there is a -// programmed stop scheduled. -type ResourceStatusShutdownDetails struct { - // MaxDuration: The duration for graceful shutdown. Only applicable - // when - // `stop_state=PENDING_STOP`. - MaxDuration *Duration `json:"maxDuration,omitempty"` - // RequestTimestamp: Past timestamp indicating the beginning of current - // `stopState` in RFC3339 text format. - RequestTimestamp string `json:"requestTimestamp,omitempty"` - // StopState: Current stopping state of the instance. - // - // Possible values: - // "PENDING_STOP" - The instance is gracefully shutting down. - // "STOPPING" - The instance is stopping. - StopState string `json:"stopState,omitempty"` - // TargetState: Target instance state. - // - // Possible values: - // "DELETED" - The instance will be deleted. - // "STOPPED" - The instance will be stopped. - TargetState string `json:"targetState,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxDuration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceStatusShutdownDetails) MarshalJSON() ([]byte, error) { - type NoMethod ResourceStatusShutdownDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Rollout: Represent a Rollout resource. -type Rollout struct { - // CancellationTime: Output only. The timestamp at which the Rollout was - // cancelled. - CancellationTime string `json:"cancellationTime,omitempty"` - // CompletionTime: Output only. The timestamp at which the Rollout was - // completed. - CompletionTime string `json:"completionTime,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CurrentWaveNumber: Output only. The number of the currently running - // wave. - // Ex. 1 - CurrentWaveNumber int64 `json:"currentWaveNumber,omitempty,string"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Etag: Output only. etag of the Rollout - // Ex. abc1234 - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#rollout - // for rollouts. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // RolloutEntity: Required. The resource being rolled out. - RolloutEntity *RolloutRolloutEntity `json:"rolloutEntity,omitempty"` - // RolloutPlan: Required. Rollout Plan used to model the Rollout. - // Ex. compute.googleapis.com/v1/projects/1234/rolloutPlans/rp1 - RolloutPlan string `json:"rolloutPlan,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: Output only. The current state of the Rollout. - // - // Possible values: - // "CANCELLED" - The rollout is in a failure terminal state. - // "CANCELLING" - The rollout is being cancelled. - // "CANCEL_FAILED" - An attempted cancel operation was unsuccessful. - // "COMPLETED" - The rollout is in a successful terminal state. - // "COMPLETE_FAILED" - An attempted complete operation was unsuccessful. - // "COMPLETING" - The rollout is being marked as completed. - // "FAILED" - The rollout completed with failures. - // "PAUSED" - The rollout is paused. - // "PAUSE_FAILED" - An attempted pause operation was unsuccessful. - // "PAUSING" - The rollout is being paused. - // "PROCESSING" - A wave is being processed by the product. - // "READY" - The rollout has been successfully initialized and is ready to - // start. - // "RESUMING" - The rollout is being resumed after being paused. - // "ROLLBACK_WAVE_FAILED" - An attempted rollback operation failed to - // complete successfully. - // "ROLLING_BACK" - A wave rollback is in progress for this rollout. - // "STATE_UNSPECIFIED" - Undefined default state. Should never be exposed to - // users. - // "UNINITIALIZED" - The rollout has been created but is not yet ready to be - // started. - // "WAVE_FAILED" - The product failed to process the wave. - State string `json:"state,omitempty"` - // WaveDetails: Output only. Details about each wave of the rollout. - WaveDetails []*RolloutWaveDetails `json:"waveDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CancellationTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CancellationTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Rollout) MarshalJSON() ([]byte, error) { - type NoMethod Rollout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlan: Message describing RolloutPlan object -type RolloutPlan struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#rolloutPlan - // for rolloutPlans. - Kind string `json:"kind,omitempty"` - // LocationScope: The location scope of the rollout plan. If not specified, the - // location - // scope is considered as ZONAL. - // - // Possible values: - // "LOCATION_SCOPE_UNSPECIFIED" - Unspecified value. Considered as ZONAL. - // "REGIONAL" - Regional scope. - // "ZONAL" - Zonal scope. - LocationScope string `json:"locationScope,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // Waves: Required. The waves included in this rollout plan. - Waves []*RolloutPlanWave `json:"waves,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlan) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWave: A single wave in a rollout plan. -type RolloutPlanWave struct { - // DisplayName: Optional. The display name of this wave of the rollout plan. - DisplayName string `json:"displayName,omitempty"` - // Number: Output only. The wave number. - Number int64 `json:"number,omitempty,string"` - // OrchestrationOptions: Optional. The orchestration options for this wave. - OrchestrationOptions *RolloutPlanWaveOrchestrationOptions `json:"orchestrationOptions,omitempty"` - // Selectors: Required. The selectors for this wave. There is a logical AND - // between each selector - // defined in a wave, so a resource must satisfy the criteria of *all* - // the - // specified selectors to be in scope for the wave. - Selectors []*RolloutPlanWaveSelector `json:"selectors,omitempty"` - // Validation: Required. The validation to be performed at the end of this - // wave. - Validation *RolloutPlanWaveValidation `json:"validation,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWave) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWave - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveOrchestrationOptions: Options to control the pace of -// orchestration of a wave. These options are -// required only if the resource being rolled out follows the -// Orchestrated -// pattern. -type RolloutPlanWaveOrchestrationOptions struct { - // Delays: Optional. Delays, if any, to be added between batches of projects. - // We allow - // multiple Delays to be specified, letting users set separate delays - // between batches of projects corresponding to different locations and - // batches of projects corresponding to the same location. - Delays []*RolloutPlanWaveOrchestrationOptionsDelay `json:"delays,omitempty"` - // MaxConcurrentLocations: Optional. Maximum number of locations to be - // orchestrated in parallel. - MaxConcurrentLocations int64 `json:"maxConcurrentLocations,omitempty,string"` - // MaxConcurrentResourcesPerLocation: Optional. Maximum number of resources to - // be orchestrated per location in - // parallel. - MaxConcurrentResourcesPerLocation int64 `json:"maxConcurrentResourcesPerLocation,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Delays") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Delays") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveOrchestrationOptions) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveOrchestrationOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveOrchestrationOptionsDelay: Options to control the delay, if -// any, between batches of projects. -type RolloutPlanWaveOrchestrationOptionsDelay struct { - // Delimiter: Optional. Controls whether the delay should only be added between - // batches of - // projects corresponding to different locations, or also between - // batches of projects corresponding to the same location. - // - // Must be set to DELIMITER_UNSPECIFIED if no delay is to be added. - // - // Possible values: - // "DELIMITER_BATCH" - The delay will also be added between batches of - // projects - // corresponding to the same location. - // "DELIMITER_LOCATION" - The delay will only be added between batches of - // projects - // corresponding to different locations. - // "DELIMITER_UNSPECIFIED" - No delay will be added between batches of - // projects. Processing will - // continue with the next batch as soon as the previous batch of LROs - // is done. - Delimiter string `json:"delimiter,omitempty"` - // Duration: Optional. The duration of the delay, if any, to be added between - // batches of - // projects. A zero duration corresponds to no delay. - Duration string `json:"duration,omitempty"` - // Type: Optional. Controls whether the specified duration is to be added at - // the end of - // each batch, or if the total processing time for each batch will be - // padded if needed to meet the specified duration. - // - // Must be set to TYPE_UNSPECIFIED if no delay is to be added. - // - // Possible values: - // "TYPE_MINIMUM" - The total processing time for each batch of projects will - // be padded - // if needed to meet the specified delay duration. - // "TYPE_OFFSET" - The specified delay will directly be added after each - // batch of - // projects as specified by the delimiter. - // "TYPE_UNSPECIFIED" - No delay will be added between batches of projects. - // Processing will - // continue with the next batch as soon as the previous batch of LROs - // is done. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Delimiter") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Delimiter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveOrchestrationOptionsDelay) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveOrchestrationOptionsDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelector: A selector which specifies what resource(s) are -// included in a given wave. -type RolloutPlanWaveSelector struct { - // LocationSelector: Optional. Roll out to resources by Cloud locations. - LocationSelector *RolloutPlanWaveSelectorLocationSelector `json:"locationSelector,omitempty"` - // ResourceHierarchySelector: Optional. Roll out to resources by Cloud Resource - // Manager resource hierarchy. - ResourceHierarchySelector *RolloutPlanWaveSelectorResourceHierarchySelector `json:"resourceHierarchySelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocationSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocationSelector") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelectorLocationSelector: Roll out to resources by location. -type RolloutPlanWaveSelectorLocationSelector struct { - // IncludedLocations: Optional. Example: "us-central1-a" - IncludedLocations []string `json:"includedLocations,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludedLocations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludedLocations") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelectorLocationSelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelectorLocationSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveSelectorResourceHierarchySelector: Roll out to resources by -// Cloud Resource Manager resource hierarchy -// nodes such as projects, folders, orgs. -type RolloutPlanWaveSelectorResourceHierarchySelector struct { - // IncludedFolders: Optional. Format: "folders/{folder_id}" - IncludedFolders []string `json:"includedFolders,omitempty"` - // IncludedOrganizations: Optional. Format: "organizations/{organization_id}" - IncludedOrganizations []string `json:"includedOrganizations,omitempty"` - // IncludedProjects: Optional. Format: "projects/{project_id}" - IncludedProjects []string `json:"includedProjects,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludedFolders") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IncludedFolders") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveSelectorResourceHierarchySelector) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveSelectorResourceHierarchySelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveValidation: The validation to be performed before progressing -// to the next wave. -type RolloutPlanWaveValidation struct { - // TimeBasedValidationMetadata: Optional. Metadata required if type = "time". - TimeBasedValidationMetadata *RolloutPlanWaveValidationTimeBasedValidationMetadata `json:"timeBasedValidationMetadata,omitempty"` - // Type: Required. The type of the validation. If a type of validation is - // associated with - // a metadata object, the appropriate metadata field mapping to the - // validation type must be provided in the validation message. Possible - // values are in quotes below alongside an explanation: - // "manual": The system waits for an end-user approval API before - // progressing to the next wave. - // "time": The system waits for a user specified duration before - // progressing to the next wave. TimeBasedValidation must be provided. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "TimeBasedValidationMetadata") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TimeBasedValidationMetadata") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveValidation) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveValidation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlanWaveValidationTimeBasedValidationMetadata: Metadata required if -// type = "time". -type RolloutPlanWaveValidationTimeBasedValidationMetadata struct { - // WaitDuration: Optional. The duration that the system waits in between waves. - // This wait starts - // after all changes in the wave are rolled out. - WaitDuration string `json:"waitDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "WaitDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WaitDuration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlanWaveValidationTimeBasedValidationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlanWaveValidationTimeBasedValidationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlansListResponse: Contains a list of RolloutPlan resources. -type RolloutPlansListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of RolloutPlan resources. - Items []*RolloutPlan `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RolloutPlansListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPlansListResponseWarning: [Output Only] Informational warning -// message. -type RolloutPlansListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RolloutPlansListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutPlansListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPlansListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPlansListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutPolicy: A rollout policy configuration. -type RolloutPolicy struct { - // DefaultRolloutTime: An optional RFC3339 timestamp on or after which the - // update is - // considered rolled out to any zone that is not explicitly stated. - DefaultRolloutTime string `json:"defaultRolloutTime,omitempty"` - // LocationRolloutPolicies: Location based rollout policies to apply to the - // resource. - // - // Currently only zone names are supported and must be represented - // as valid URLs, like: zones/us-central1-a. - // - // The value expects an RFC3339 timestamp on or after which the update - // is - // considered rolled out to the specified location. - LocationRolloutPolicies map[string]string `json:"locationRolloutPolicies,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultRolloutTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultRolloutTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RolloutPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutRolloutEntity: Specifications of the resource to roll out. -type RolloutRolloutEntity struct { - // OrchestratedEntity: Optional. Entity details for products using the - // Orchestrated Integration model. - OrchestratedEntity *RolloutRolloutEntityOrchestratedEntity `json:"orchestratedEntity,omitempty"` - // ForceSendFields is a list of field names (e.g. "OrchestratedEntity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OrchestratedEntity") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutRolloutEntity) MarshalJSON() ([]byte, error) { - type NoMethod RolloutRolloutEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutRolloutEntityOrchestratedEntity: This message is used if the resource -// type follows the Orchestrated -// integration model with ProgressiveRollout. -type RolloutRolloutEntityOrchestratedEntity struct { - // ConflictBehavior: Required. Specifies the behavior of the Rollout if an out - // of band update is - // detected in a project during a Rollout. It can be one of the - // following - // values: - // 1) overwrite : Overwrite the local value with the rollout value. - // 2) no_overwrite : Do not overwrite the local value with the rollout - // value. - ConflictBehavior string `json:"conflictBehavior,omitempty"` - // OrchestrationAction: Required. Orchestration action during the Rollout. It - // can be one of the following - // values: - // 1) "update": Resources will be updated by the rollout. - // 2) "delete": Resources will be deleted by the rollout. - OrchestrationAction string `json:"orchestrationAction,omitempty"` - // OrchestrationSource: Required. Fully qualified resource name of the resource - // which contains the source - // of truth of the configuration being rolled out across - // locations/projects. For example, in the case of a global Rollout which - // is applied across regions, this contains the name of the global - // resource created by the user which contains a payload for a resource - // that is orchestrated across regions. This follows the following - // format: - // //.googleapis.com/projects//locations/global// - // e.g. - // //osconfig.googleapis.com/projects/1/locations/global/policyOrchestrators/po1 - OrchestrationSource string `json:"orchestrationSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConflictBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConflictBehavior") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutRolloutEntityOrchestratedEntity) MarshalJSON() ([]byte, error) { - type NoMethod RolloutRolloutEntityOrchestratedEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutWaveDetails: Additional metadata about the status of each wave -// provided by the server. -type RolloutWaveDetails struct { - // OrchestratedWaveDetails: Output only. Additional details of the wave for - // products using the Orchestrated - // Integration model. - OrchestratedWaveDetails *RolloutWaveDetailsOrchestratedWaveDetails `json:"orchestratedWaveDetails,omitempty"` - // WaveDisplayName: Output only. Wave name. - // Ex. wave1 - WaveDisplayName string `json:"waveDisplayName,omitempty"` - // WaveNumber: Output only. System generated number for the wave. - WaveNumber int64 `json:"waveNumber,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "OrchestratedWaveDetails") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OrchestratedWaveDetails") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutWaveDetails) MarshalJSON() ([]byte, error) { - type NoMethod RolloutWaveDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutWaveDetailsOrchestratedWaveDetails: Details of the wave for products -// using the Orchestrated integration -// model. -type RolloutWaveDetailsOrchestratedWaveDetails struct { - // CompletedResourcesCount: Output only. Resource completed so far. - CompletedResourcesCount int64 `json:"completedResourcesCount,omitempty,string"` - // EstimatedTotalResourcesCount: Output only. Estimated total count of - // resources. - EstimatedTotalResourcesCount int64 `json:"estimatedTotalResourcesCount,omitempty,string"` - // FailedLocations: Output only. Locations that failed during orchestration, - // and ProgressiveRollout - // stopped retrying. There may be some successful resources rolled out in - // the wave as the location may have failed later in the Rollout. - FailedLocations []string `json:"failedLocations,omitempty"` - // FailedResourcesCount: Output only. Resources failed. - FailedResourcesCount int64 `json:"failedResourcesCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CompletedResourcesCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletedResourcesCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutWaveDetailsOrchestratedWaveDetails) MarshalJSON() ([]byte, error) { - type NoMethod RolloutWaveDetailsOrchestratedWaveDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutsListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Rollout resources. - Items []*Rollout `json:"items,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RolloutsListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RolloutsListResponseWarning: [Output Only] Informational warning message. -type RolloutsListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RolloutsListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RolloutsListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RolloutsListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RolloutsListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Route: Represents a Route resource. -// -// A route defines a path from VM instances in the VPC network to a -// specific -// destination. This destination can be inside or outside the VPC network. -// For more information, read theRoutes overview. -type Route struct { - // AsPaths: [Output Only] AS path. - AsPaths []*RouteAsPath `json:"asPaths,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this field - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DestRange: The destination range of outgoing packets that this route applies - // to. Both - // IPv4 and IPv6 are supported. - // Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC - // 4291 - // format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC - // 5952 - // compressed format. - DestRange string `json:"destRange,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of this resource. Always compute#routes for - // Route resources. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be - // a - // lowercase letter, and all following characters (except for the - // last - // character) must be a dash, lowercase letter, or digit. The last - // character - // must be a lowercase letter or digit. - Name string `json:"name,omitempty"` - // Network: Fully-qualified URL of the network that this route applies to. - Network string `json:"network,omitempty"` - // NextHopGateway: The URL to a gateway that should handle matching - // packets. - // You can only specify the internet gateway using a full or - // partial valid URL: projects/project/global/gateways/default-internet-gateway - NextHopGateway string `json:"nextHopGateway,omitempty"` - // NextHopHub: [Output Only] The full resource name of the Network Connectivity - // Center hub - // that will handle matching packets. - NextHopHub string `json:"nextHopHub,omitempty"` - // NextHopIlb: The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL - // that should handle matching - // packets or the IP address of the forwarding Rule. - // For example, the following are all valid URLs: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - // - regions/region/forwardingRules/forwardingRule - // - // - // If an IP address is provided, must specify an IPv4 address in - // dot-decimal - // notation or an IPv6 address in RFC 4291 format. For example, the - // following - // are all valid IP addresses: - // - // - // - 10.128.0.56 - // - 2001:db8::2d9:51:0:0 - // - 2001:db8:0:0:2d9:51:0:0 - // - // - // IPv6 addresses will be displayed using RFC 5952 compressed format - // (e.g. - // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. - NextHopIlb string `json:"nextHopIlb,omitempty"` - // NextHopInstance: The URL to an instance that should handle matching packets. - // You can specify - // this as a full or partial URL. - // For example: - // - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ - NextHopInstance string `json:"nextHopInstance,omitempty"` - // NextHopInterRegionCost: [Output only] Internal fixed region-to-region cost - // that Google Cloud - // calculates based on factors such as network performance, distance, - // and - // available bandwidth between regions. - NextHopInterRegionCost int64 `json:"nextHopInterRegionCost,omitempty"` - // NextHopInterconnectAttachment: [Output Only] The URL to an - // InterconnectAttachment which is the next hop - // for the route. - // This field will only be populated for dynamic routes generated by - // Cloud Router with a linked interconnectAttachment or the static - // route - // generated by each L2 Interconnect Attachment. - NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` - // NextHopIp: The network IP address of an instance that should handle matching - // packets. - // Both IPv6 address and IPv4 addresses are supported. - // Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or - // an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 - // or - // 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC - // 5952 - // compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be - // an - // IPv4-mapped IPv6 address. - NextHopIp string `json:"nextHopIp,omitempty"` - // NextHopMed: [Output Only] Multi-Exit Discriminator, a BGP route metric that - // indicates - // the desirability of a particular route in a network. - NextHopMed int64 `json:"nextHopMed,omitempty"` - // NextHopNetwork: The URL of the local network if it should handle matching - // packets. - NextHopNetwork string `json:"nextHopNetwork,omitempty"` - // NextHopOrigin: [Output Only] Indicates the origin of the route. Can be - // IGP - // (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), - // or INCOMPLETE. - // - // Possible values: - // "EGP" - // "IGP" - // "INCOMPLETE" - NextHopOrigin string `json:"nextHopOrigin,omitempty"` - // NextHopPeering: [Output Only] The network peering name that should handle - // matching packets, - // which should conform to RFC1035. - NextHopPeering string `json:"nextHopPeering,omitempty"` - // NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching - // packets. - NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *RouteParams `json:"params,omitempty"` - // Priority: The priority of this route. Priority is used to break ties in - // cases - // where there is more than one matching route of equal prefix length. In - // cases where multiple routes have equal prefix length, the one with - // the - // lowest-numbered priority value wins. The default value is `1000`. - // The - // priority value must be from `0` to `65535`, inclusive. - Priority int64 `json:"priority,omitempty"` - // RouteStatus: [Output only] The status of the route. This status only applies - // to - // dynamic routes learned by Cloud Routers. This status is not applicable - // to static routes. - // - // Possible values: - // "ACTIVE" - This route is processed and active. - // "DROPPED" - The route is dropped due to the VPC exceeding the dynamic - // route limit. - // For dynamic route limit, please refer to the - // Learned route example - // "INACTIVE" - This route is processed but inactive due to failure from the - // backend. The - // backend may have rejected the route - // "PENDING" - This route is being processed internally. The status will - // change once - // processed. - RouteStatus string `json:"routeStatus,omitempty"` - // RouteType: [Output Only] The type of this route, which can be one of the - // following - // values: - // - 'TRANSIT' for a transit route that this router learned from - // another Cloud Router and will readvertise to one of its BGP peers - // - 'SUBNET' for a route from a subnet of the VPC - // - 'BGP' for a route learned from a BGP peer of this router - // - 'STATIC' for a static route - // - // Possible values: - // "BGP" - // "STATIC" - // "SUBNET" - // "TRANSIT" - RouteType string `json:"routeType,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // Tags: A list of instance tags to which this route applies. - Tags []string `json:"tags,omitempty"` - // Warnings: [Output Only] If potential misconfigurations are detected for - // this - // route, this field will be populated with warning messages. - Warnings []*RouteWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AsPaths") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsPaths") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Route) MarshalJSON() ([]byte, error) { - type NoMethod Route - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouteWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteWarnings) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod RouteWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteAsPath struct { - // AsLists: [Output Only] The AS numbers of the AS Path. - AsLists []int64 `json:"asLists,omitempty"` - // PathSegmentType: [Output Only] The type of the AS Path, which can be one of - // the following - // values: - // - 'AS_SET': unordered set of autonomous systems that the route - // in has traversed - // - 'AS_SEQUENCE': ordered set of autonomous - // systems that the route has traversed - // - 'AS_CONFED_SEQUENCE': - // ordered set of Member Autonomous Systems in the local confederation that - // the route has traversed - // - 'AS_CONFED_SET': unordered set of - // Member Autonomous Systems in the local confederation that the route - // has - // traversed - // - // Possible values: - // "AS_CONFED_SEQUENCE" - // "AS_CONFED_SET" - // "AS_SEQUENCE" - // "AS_SET" - PathSegmentType string `json:"pathSegmentType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AsLists") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AsLists") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteAsPath) MarshalJSON() ([]byte, error) { - type NoMethod RouteAsPath - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteList: Contains a list of Route resources. -type RouteList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Route resources. - Items []*Route `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouteListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteList) MarshalJSON() ([]byte, error) { - type NoMethod RouteList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteListWarning: [Output Only] Informational warning message. -type RouteListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouteListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouteListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouteListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouteParams: Additional route parameters. -type RouteParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouteParams) MarshalJSON() ([]byte, error) { - type NoMethod RouteParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutePolicy struct { - // Description: An optional description of route policy. - Description string `json:"description,omitempty"` - // Fingerprint: A fingerprint for the Route Policy being applied to this - // Router, which is - // essentially a hash of the Route Policy used for optimistic locking. - // The fingerprint is initially generated by Compute Engine and changes - // after every request to modify or update Route Policy. You must - // always - // provide an up-to-date fingerprint hash in order to update or - // change - // labels. - // - // To see the latest fingerprint, make a getRoutePolicy() request - // to retrieve a Route Policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Name: Route Policy name, which must be a resource ID segment and - // unique - // within all the router's Route Policies. Name should conform to RFC1035. - Name string `json:"name,omitempty"` - // Terms: List of terms (the order in the list is not important, they are - // evaluated - // in order of priority). Order of policies is not retained and might - // change - // when getting policy later. - Terms []*RoutePolicyPolicyTerm `json:"terms,omitempty"` - // Possible values: - // "ROUTE_POLICY_TYPE_EXPORT" - The Route Policy is an Export Policy. - // "ROUTE_POLICY_TYPE_IMPORT" - The Route Policy is an Import Policy. - Type string `json:"type,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutePolicy) MarshalJSON() ([]byte, error) { - type NoMethod RoutePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutePolicyPolicyTerm struct { - // Actions: CEL expressions to evaluate to modify a route when this term - // matches. - Actions []*Expr `json:"actions,omitempty"` - // Match: CEL expression evaluated against a route to determine if this - // term - // applies. When not set, the term applies to all - // routes. - Match *Expr `json:"match,omitempty"` - // Priority: The evaluation priority for this term, which must be between - // 0 - // (inclusive) and 2^31 (exclusive), and unique within the list. - Priority int64 `json:"priority,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutePolicyPolicyTerm) MarshalJSON() ([]byte, error) { - type NoMethod RoutePolicyPolicyTerm - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Router: Represents a Cloud Router resource. -// -// For more information about Cloud Router, read theCloud -// Router overview. -type Router struct { - // Bgp: BGP information specific to this router. - Bgp *RouterBgp `json:"bgp,omitempty"` - // BgpPeers: BGP information that must be configured into the routing stack - // to - // establish BGP peering. This information must specify the peer ASN and - // either the interface name, IP address, or peer IP address. Please refer - // toRFC4273. - BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EncryptedInterconnectRouter: Indicates if a router is dedicated for use with - // encrypted VLAN - // attachments (interconnectAttachments). - EncryptedInterconnectRouter bool `json:"encryptedInterconnectRouter,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Interfaces: Router interfaces. - // To create a BGP peer that uses a router interface, - // the interface must have one of the following fields specified: - // - // - linkedVpnTunnel - // - linkedInterconnectAttachment - // - subnetwork - // - // - // You can create a router interface without any of these fields - // specified. - // However, you cannot create a BGP peer that uses that interface. - Interfaces []*RouterInterface `json:"interfaces,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - // Md5AuthenticationKeys: Keys used for MD5 authentication. - Md5AuthenticationKeys []*RouterMd5AuthenticationKey `json:"md5AuthenticationKeys,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Nats: A list of NAT services created in this router. - Nats []*RouterNat `json:"nats,omitempty"` - // NccGateway: URI of the ncc_gateway to which this router associated. - NccGateway string `json:"nccGateway,omitempty"` - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *RouterParams `json:"params,omitempty"` - // Region: [Output Only] URI of the region where the router resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Bgp") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bgp") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Router) MarshalJSON() ([]byte, error) { - type NoMethod Router - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAdvertisedIpRange: Description-tagged IP ranges for the router to -// advertise. -type RouterAdvertisedIpRange struct { - // Description: User-specified description for the IP range. - Description string `json:"description,omitempty"` - // Range: The IP range to advertise. The value must be a CIDR-formatted string. - Range string `json:"range,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAdvertisedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterAdvertisedIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedList: Contains a list of routers. -type RouterAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Router resources. - Items map[string]RoutersScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouterAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterAggregatedListWarning: [Output Only] Informational warning message. -type RouterAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouterAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgp struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // The options are DEFAULT or CUSTOM. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - // AdvertisedGroups: User-specified list of prefix groups to advertise in - // custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // is advertised to all peers of the router. - // These groups will be advertised in addition to any specified prefixes. - // Leave this field blank to advertise no custom groups. - // - // Possible values: - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - // AdvertisedIpRanges: User-specified list of individual IP ranges to advertise - // in custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // is advertised to all peers of the router. - // These IP ranges will be advertised in addition to any specified - // groups. - // Leave this field blank to advertise no custom IP ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - // Asn: Local BGP Autonomous System Number (ASN). - // Must be anRFC6996 private ASN, either 16-bit or 32-bit. The - // value will be fixed for this router resource. All VPN tunnels that link - // to this router will have the same local ASN. - Asn int64 `json:"asn,omitempty"` - // IdentifierRange: Explicitly specifies a range of valid BGP Identifiers for - // this Router. It - // is provided as a link-local IPv4 range (from 169.254.0.0/16), of size - // at - // least /30, even if the BGP sessions are over IPv6. It must not overlap - // with any IPv4 BGP session ranges. - // - // - // Other vendors commonly call this "router ID". - IdentifierRange string `json:"identifierRange,omitempty"` - // KeepaliveInterval: The interval in seconds between BGP keepalive messages - // that are - // sent to the peer. - // - // - // Hold time is three times the interval at which keepalive messages are - // sent, and the hold time is the maximum number of seconds allowed to - // elapse between successive keepalive messages that BGP receives from - // a - // peer. - // - // - // BGP will use the smaller of either the local hold time value or the - // peer's hold time value as the hold time for the BGP connection between - // the two peers. - // - // - // If set, this value must be between 20 and 60. The default is 20. - KeepaliveInterval int64 `json:"keepaliveInterval,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgp) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgp - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeer struct { - // AdvertiseMode: User-specified flag to indicate which mode to use for - // advertisement. - // - // Possible values: - // "CUSTOM" - // "DEFAULT" - AdvertiseMode string `json:"advertiseMode,omitempty"` - // AdvertisedGroups: User-specified list of prefix groups to advertise in - // custom mode, - // which currently supports the following option: - // - // - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This - // excludes any routes learned for subnets that use - // VPC Network Peering. - // - // - // Note that this field can only be populated if advertise_mode is CUSTOM - // and overrides the list defined for the router (in the "bgp" message). - // These groups are advertised in addition to any specified prefixes. - // Leave this field blank to advertise no custom groups. - // - // Possible values: - // "ALL_SUBNETS" - Advertise all available subnets (including peer VPC - // subnets). - AdvertisedGroups []string `json:"advertisedGroups,omitempty"` - // AdvertisedIpRanges: User-specified list of individual IP ranges to advertise - // in custom mode. - // This field can only be populated if advertise_mode is CUSTOM and - // overrides the list defined for the router (in the "bgp" message). - // These IP ranges are advertised in addition to any specified groups. - // Leave this field blank to advertise no custom IP ranges. - AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"` - // AdvertisedRoutePriority: The priority of routes advertised to this BGP peer. - // Where there is more - // than one matching route of maximum length, the routes with the - // lowest - // priority value win. - AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` - // Bfd: BFD configuration for the BGP peering. - Bfd *RouterBgpPeerBfd `json:"bfd,omitempty"` - // CustomLearnedIpRanges: A list of user-defined custom learned route IP - // address ranges for a BGP - // session. - CustomLearnedIpRanges []*RouterBgpPeerCustomLearnedIpRange `json:"customLearnedIpRanges,omitempty"` - // CustomLearnedRoutePriority: The user-defined custom learned route priority - // for a BGP session. This - // value is applied to all custom learned route ranges for the session. - // You can choose a value from `0` to `65335`. If you don't provide a - // value, Google Cloud assigns a priority of `100` to the ranges. - CustomLearnedRoutePriority int64 `json:"customLearnedRoutePriority,omitempty"` - // Enable: The status of the BGP peer connection. - // - // - // If set to FALSE, any active session with the peer is terminated and - // all associated routing information is removed. If set to TRUE, the - // peer connection can be established with routing information. The default - // is TRUE. - // - // Possible values: - // "FALSE" - // "TRUE" - Enable string `json:"enable,omitempty"` - // EnableIpv4: Enable IPv4 traffic over BGP Peer. It is enabled by default - // if - // the peerIpAddress is version 4. - EnableIpv4 bool `json:"enableIpv4,omitempty"` - // EnableIpv6: Enable IPv6 traffic over BGP Peer. It is enabled by default if - // the - // peerIpAddress is version 6. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - // ExportPolicies: List of export policies applied to this peer, in the order - // they must be - // evaluated. The name must correspond to an existing policy that - // has - // ROUTE_POLICY_TYPE_EXPORT type. - ExportPolicies []string `json:"exportPolicies,omitempty"` - // ImportPolicies: List of import policies applied to this peer, in the order - // they must be - // evaluated. The name must correspond to an existing policy that - // has - // ROUTE_POLICY_TYPE_IMPORT type. - ImportPolicies []string `json:"importPolicies,omitempty"` - // InterfaceName: Name of the interface the BGP peer is associated with. - InterfaceName string `json:"interfaceName,omitempty"` - // IpAddress: IP address of the interface inside Google Cloud Platform. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv4NexthopAddress: IPv4 address of the interface inside Google Cloud - // Platform. - Ipv4NexthopAddress string `json:"ipv4NexthopAddress,omitempty"` - // Ipv6NexthopAddress: IPv6 address of the interface inside Google Cloud - // Platform. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - // ManagementType: [Output Only] The resource that configures and manages this - // BGP peer. - // - // - MANAGED_BY_USER is the default value and can be managed by you - // or other users - // - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed - // by Cloud Interconnect, specifically by an InterconnectAttachment of type - // PARTNER. Google automatically creates, updates, and deletes this type of - // BGP peer when the PARTNER InterconnectAttachment is created, updated, - // or deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The BGP peer is automatically created for - // PARTNER type - // InterconnectAttachment; Google will automatically create/delete - // this BGP peer when the PARTNER InterconnectAttachment is - // created/deleted, and Google will update the ipAddress and - // peerIpAddress when the PARTNER InterconnectAttachment is provisioned. - // This type of BGP peer cannot be created or deleted, but can be - // modified for all fields except for name, ipAddress and peerIpAddress. - // "MANAGED_BY_USER" - Default value, the BGP peer is manually created and - // managed by user. - ManagementType string `json:"managementType,omitempty"` - // Md5AuthenticationKeyName: Present if MD5 authentication is enabled for the - // peering. Must be the - // name of one of the entries in the Router.md5_authentication_keys. The - // field must comply with RFC1035. - Md5AuthenticationKeyName string `json:"md5AuthenticationKeyName,omitempty"` - // Name: Name of this BGP peer. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface may - // use - // a different value. - PeerAsn int64 `json:"peerAsn,omitempty"` - // PeerIpAddress: IP address of the BGP interface outside Google Cloud - // Platform. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // PeerIpv4NexthopAddress: IPv4 address of the BGP interface outside Google - // Cloud Platform. - PeerIpv4NexthopAddress string `json:"peerIpv4NexthopAddress,omitempty"` - // PeerIpv6NexthopAddress: IPv6 address of the BGP interface outside Google - // Cloud Platform. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - // RouterApplianceInstance: URI of the VM instance that is used as third-party - // router - // appliances such as Next Gen Firewalls, Virtual Routers, or - // Router - // Appliances. The VM instance must be located in zones contained in the - // same region as this Cloud Router. - // The VM instance is the peer side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertiseMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeer) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeer - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeerBfd struct { - // MinReceiveInterval: The minimum interval, in milliseconds, between BFD - // control packets - // received from the peer router. The actual value is negotiated between - // the two routers and is equal to the greater of this value and the - // transmit interval of the other router. - // - // - // If set, this value must be between 1000 and 30000. - // - // - // The default is 1000. - MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` - // MinTransmitInterval: The minimum interval, in milliseconds, between BFD - // control packets - // transmitted to the peer router. The actual value is negotiated between - // the two routers and is equal to the greater of this value and - // the - // corresponding receive interval of the other router. - // - // - // If set, this value must be between 1000 and 30000. - // - // - // The default is 1000. - MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` - // Multiplier: The number of consecutive BFD packets that must be missed - // before BFD declares that a peer is unavailable. - // - // - // If set, the value must be a value between 5 and 16. - // - // - // The default is 5. - Multiplier int64 `json:"multiplier,omitempty"` - // SessionInitializationMode: The BFD session initialization mode for this BGP - // peer. - // - // - // If set to ACTIVE, the Cloud Router will initiate the BFD session for - // this BGP peer. If set to PASSIVE, the Cloud Router will wait for the - // peer router to initiate the BFD session for this BGP peer. If set - // to - // DISABLED, BFD is disabled for this BGP peer. The default is DISABLED. - // - // Possible values: - // "ACTIVE" - // "DISABLED" - // "PASSIVE" - SessionInitializationMode string `json:"sessionInitializationMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinReceiveInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinReceiveInterval") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeerBfd) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerBfd - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterBgpPeerCustomLearnedIpRange struct { - // Range: The custom learned route IP address range. Must be a - // valid - // CIDR-formatted prefix. If an IP address is provided without a subnet - // mask, it is interpreted as, for IPv4, a `/32` singular IP address - // range, and, for IPv6, `/128`. - Range string `json:"range,omitempty"` - // ForceSendFields is a list of field names (e.g. "Range") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Range") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterBgpPeerCustomLearnedIpRange) MarshalJSON() ([]byte, error) { - type NoMethod RouterBgpPeerCustomLearnedIpRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterInterface struct { - // IpRange: IP address and range of the interface. - // - // - For Internet Protocol version 4 (IPv4), the IP range must be in - // theRFC3927 link-local IP address space. The value must - // be a CIDR-formatted string, for example, 169.254.0.1/30. - // Note: Do not truncate the IP address, as it represents the IP address of - // the interface. - // - For Internet Protocol version 6 (IPv6), the value - // must be a unique local address (ULA) range from fdff:1::/64 - // with a mask length of 126 or less. This value should be a CIDR-formatted - // string, for example, fdff:1::1/112. Within the router's - // VPC, this IPv6 prefix will be reserved exclusively for this connection - // and cannot be used for any other purpose. - IpRange string `json:"ipRange,omitempty"` - // IpVersion: IP version of this interface. - // - // Possible values: - // "IPV4" - // "IPV6" - IpVersion string `json:"ipVersion,omitempty"` - // LinkedInterconnectAttachment: URI of the linked Interconnect attachment. It - // must be in the same region - // as the router. Each interface can have one linked resource, which can be - // a VPN tunnel, an Interconnect attachment, or a subnetwork. - LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` - // LinkedVpnTunnel: URI of the linked VPN tunnel, which must be in the same - // region as the - // router. Each interface can have one linked resource, which can be - // a VPN tunnel, an Interconnect attachment, or a subnetwork. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - // ManagementType: [Output Only] The resource that configures and manages this - // interface. - // - // - MANAGED_BY_USER is the default value and can be managed directly - // by users. - // - MANAGED_BY_ATTACHMENT is an interface that is configured and - // managed by Cloud Interconnect, specifically, by an - // InterconnectAttachment - // of type PARTNER. Google automatically creates, updates, and deletes - // this type of interface when the PARTNER InterconnectAttachment is - // created, updated, or deleted. - // - // Possible values: - // "MANAGED_BY_ATTACHMENT" - The interface is automatically created for - // PARTNER type - // InterconnectAttachment, Google will automatically create/update/delete - // this interface when the PARTNER InterconnectAttachment - // is - // created/provisioned/deleted. - // This type of interface cannot be manually managed by user. - // "MANAGED_BY_USER" - Default value, the interface is manually created and - // managed by user. - ManagementType string `json:"managementType,omitempty"` - // Name: Name of this interface entry. - // The name must be 1-63 characters long, and comply withRFC1035. Specifically, - // the name must be 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PrivateIpAddress: The regional private internal IP address that is used to - // establish - // BGP sessions to a VM instance acting as a third-party - // Router Appliance, such as a Next Gen Firewall, a Virtual Router, or - // an SD-WAN VM. - PrivateIpAddress string `json:"privateIpAddress,omitempty"` - // RedundantInterface: Name of the interface that will be redundant with the - // current interface - // you are creating. The redundantInterface must belong to the same - // Cloud - // Router as the interface here. To establish the BGP session to a - // Router - // Appliance VM, you must create two BGP peers. The two BGP peers must - // be - // attached to two separate interfaces that are redundant with each other. - // The redundant_interface must be 1-63 characters long, and comply - // withRFC1035. Specifically, the redundant_interface must - // be 1-63 characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - RedundantInterface string `json:"redundantInterface,omitempty"` - // Subnetwork: The URI of the subnetwork resource that this interface belongs - // to, which - // must be in the same region as the Cloud Router. - // When you establish a BGP session to a VM instance using this interface, - // the VM instance must belong to the same subnetwork as the - // subnetwork - // specified here. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpRange") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterInterface) MarshalJSON() ([]byte, error) { - type NoMethod RouterInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterList: Contains a list of Router resources. -type RouterList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Router resources. - Items []*Router `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#router for - // routers. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RouterListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterList) MarshalJSON() ([]byte, error) { - type NoMethod RouterList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterListWarning: [Output Only] Informational warning message. -type RouterListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RouterListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RouterListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterMd5AuthenticationKey struct { - // Key: [Input only] Value of the key. - // - // For patch and update calls, it can be skipped to - // copy the value from the previous configuration. This is allowed if the - // key with the same name existed before the operation. Maximum length is - // 80 - // characters. Can only contain printable ASCII characters. - Key string `json:"key,omitempty"` - // Name: Name used to identify the key. - // - // Must be unique within a router. Must be referenced by exactly - // one bgpPeer. Must comply withRFC1035. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { - type NoMethod RouterMd5AuthenticationKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNat: Represents a Nat resource. It enables the VMs within the -// specified -// subnetworks to access Internet without external IP addresses. It specifies -// a list of subnetworks (and the ranges within) that want to use -// NAT. -// Customers can also provide the external IPs that would be used for NAT. -// GCP -// would auto-allocate ephemeral IPs if no external IPs are provided. -type RouterNat struct { - // AutoNetworkTier: The network tier to use when automatically reserving NAT IP - // addresses. - // Must be one of: PREMIUM, STANDARD. - // If not specified, then the current - // project-level default tier is used. - // - // Possible values: - // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. - // "PREMIUM" - High quality, Google-grade network tier, support for all - // networking - // products. - // "STANDARD" - Public internet quality, only limited support for other - // networking - // products. - // "STANDARD_OVERRIDES_FIXED_STANDARD" - (Output only) Temporary tier for - // FIXED_STANDARD when fixed standard tier - // is expired or not configured. - AutoNetworkTier string `json:"autoNetworkTier,omitempty"` - // DrainNatIps: A list of URLs of the IP resources to be drained. These - // IPs - // must be valid static external IPs that have been assigned to the NAT. - // These IPs should be used for updating/patching a NAT only. - DrainNatIps []string `json:"drainNatIps,omitempty"` - // EnableDynamicPortAllocation: Enable Dynamic Port Allocation. - // - // - // If not specified, it is disabled by default. - // - // - // If set to true, - // - // - Dynamic Port Allocation will be enabled on this NAT - // config. - // - enableEndpointIndependentMapping cannot be set to true. - // - If minPorts is set, minPortsPerVm must be set to a - // power of two greater than or equal to 32. If minPortsPerVm is not set, a - // minimum of 32 ports will be allocated to a VM from this NAT - // config. - EnableDynamicPortAllocation bool `json:"enableDynamicPortAllocation,omitempty"` - EnableEndpointIndependentMapping bool `json:"enableEndpointIndependentMapping,omitempty"` - // EndpointTypes: List of NAT-ted endpoint types supported by the Nat Gateway. - // If the list - // is empty, then it will be equivalent to include ENDPOINT_TYPE_VM - // - // Possible values: - // "ENDPOINT_TYPE_MANAGED_PROXY_LB" - This is used for regional Application - // Load Balancers (internal and - // external) and regional proxy Network Load Balancers (internal and - // external) endpoints. - // "ENDPOINT_TYPE_SWG" - This is used for Secure Web Gateway endpoints. - // "ENDPOINT_TYPE_VM" - This is the default. - EndpointTypes []string `json:"endpointTypes,omitempty"` - // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. Defaults to - // 30s if not set. - IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` - // LogConfig: Configure logging on this NAT. - LogConfig *RouterNatLogConfig `json:"logConfig,omitempty"` - // MaxPortsPerVm: Maximum number of ports allocated to a VM from this NAT - // config when - // Dynamic Port Allocation is enabled. - // - // - // If Dynamic Port Allocation is not enabled, this field has no effect. - // - // - // If Dynamic Port Allocation is enabled, and this field is set, it must be - // set to a power of two greater than minPortsPerVm, or 64 if minPortsPerVm - // is not set. - // - // - // If Dynamic Port Allocation is enabled and this field is not set, - // a maximum of 65536 ports will be allocated to a VM from this NAT - // config. - MaxPortsPerVm int64 `json:"maxPortsPerVm,omitempty"` - // MinPortsPerVm: Minimum number of ports allocated to a VM from this NAT - // config. If not - // set, a default number of ports is allocated to a VM. This is rounded - // up to the nearest power of 2. For example, if the value of this field is - // 50, at least 64 ports are allocated to a VM. - MinPortsPerVm int64 `json:"minPortsPerVm,omitempty"` - // Name: Unique name of this Nat service. - // The name must be 1-63 characters long and comply withRFC1035. - Name string `json:"name,omitempty"` - // Nat64Subnetworks: List of Subnetwork resources whose traffic should be - // translated by NAT64 - // Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is - // selected for the SubnetworkIpRangeToNat64Option above. - Nat64Subnetworks []*RouterNatSubnetworkToNat64 `json:"nat64Subnetworks,omitempty"` - // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take one of - // the following - // values: - // - // - MANUAL_ONLY: Uses only Nat IP addresses provided by - // customers. When there are not enough specified Nat IPs, the Nat service - // fails for new VMs. - // - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers - // can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should - // be empty. - // - // Possible values: - // "AUTO_ONLY" - Nat IPs are allocated by GCP; customers can not specify any - // Nat IPs. - // "MANUAL_ONLY" - Only use Nat IPs provided by customers. When specified Nat - // IPs are not - // enough then the Nat service fails for new VMs. - NatIpAllocateOption string `json:"natIpAllocateOption,omitempty"` - // NatIps: A list of URLs of the IP resources used for this Nat service. These - // IP - // addresses must be valid static external IP addresses assigned to - // the - // project. - NatIps []string `json:"natIps,omitempty"` - // Rules: A list of rules associated with this NAT. - Rules []*RouterNatRule `json:"rules,omitempty"` - // SourceSubnetworkIpRangesToNat: Specify the Nat option, which can take one of - // the following values: - // - // - ALL_SUBNETWORKS_ALL_IP_RANGES: All of the IP ranges in every - // Subnetwork are allowed to Nat. - // - ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES: All of the primary IP ranges - // in every Subnetwork are allowed to Nat. - // - LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat - // (specified in the field subnetwork below) - // - // - // The default is SUBNETWORK_IP_RANGE_TO_NAT_OPTION_UNSPECIFIED. - // Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES then - // there - // should not be any other Router.Nat section in any Router for this network - // in this region. - // - // Possible values: - // "ALL_SUBNETWORKS_ALL_IP_RANGES" - All the IP ranges in every Subnetwork - // are allowed to Nat. - // "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES" - All the primary IP ranges in - // every Subnetwork are allowed to Nat. - // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat - // (specified in the field - // subnetwork below) - SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` - // SourceSubnetworkIpRangesToNat64: Specify the Nat option for NAT64, which can - // take one of the following - // values: - // - // - ALL_IPV6_SUBNETWORKS: All of the IP ranges in - // every Subnetwork are allowed to Nat. - // - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat - // (specified in the field nat64_subnetwork below) - // - // - // The default is NAT64_OPTION_UNSPECIFIED. - // Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no - // other - // Router.Nat section in this region can also enable NAT64 for any - // Subnetworks in this network. Other Router.Nat sections can still be - // present to enable NAT44 only. - // - // Possible values: - // "ALL_IPV6_SUBNETWORKS" - NAT64 is enabled for all the IPv6 subnet - // ranges. - // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. - // "LIST_OF_IPV6_SUBNETWORKS" - NAT64 is enabled for a list of IPv6 subnet - // ranges. - // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. - // If this option is used, the nat64_subnetworks field must be specified. - SourceSubnetworkIpRangesToNat64 string `json:"sourceSubnetworkIpRangesToNat64,omitempty"` - // Subnetworks: A list of Subnetwork resources whose traffic should be - // translated by NAT - // Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for - // the - // SubnetworkIpRangeToNatOption above. - Subnetworks []*RouterNatSubnetworkToNat `json:"subnetworks,omitempty"` - // TcpEstablishedIdleTimeoutSec: Timeout (in seconds) for TCP established - // connections. Defaults to 1200s - // if not set. - TcpEstablishedIdleTimeoutSec int64 `json:"tcpEstablishedIdleTimeoutSec,omitempty"` - // TcpTimeWaitTimeoutSec: Timeout (in seconds) for TCP connections that are in - // TIME_WAIT state. - // Defaults to 120s if not set. - TcpTimeWaitTimeoutSec int64 `json:"tcpTimeWaitTimeoutSec,omitempty"` - // TcpTransitoryIdleTimeoutSec: Timeout (in seconds) for TCP transitory - // connections. Defaults to 30s if - // not set. - TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` - // Type: Indicates whether this NAT is used for public or private - // IP - // translation. If unspecified, it defaults to PUBLIC. - // - // Possible values: - // "PRIVATE" - NAT used for private IP translation. - // "PUBLIC" - NAT used for public IP translation. - // This is the default. - Type string `json:"type,omitempty"` - // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults to 30s - // if not set. - UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoNetworkTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoNetworkTier") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNat - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatLogConfig: Configuration of logging on a NAT. -type RouterNatLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by default. - Enable bool `json:"enable,omitempty"` - // Filter: Specify the desired filtering of logs on this NAT. If - // unspecified, - // logs are exported for all connections handled by this NAT. - // This option can take one of the following values: - // - // - ERRORS_ONLY: Export logs only for connection failures. - // - TRANSLATIONS_ONLY: Export logs only for successful - // connections. - // - ALL: Export logs for all connections, successful and - // unsuccessful. - // - // Possible values: - // "ALL" - Export logs for all (successful and unsuccessful) connections. - // "ERRORS_ONLY" - Export logs for connection failures only. - // "TRANSLATIONS_ONLY" - Export logs for successful connections only. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterNatRule struct { - // Action: The action to be enforced for traffic that matches this rule. - Action *RouterNatRuleAction `json:"action,omitempty"` - // Description: An optional description of this rule. - Description string `json:"description,omitempty"` - // Match: CEL expression that specifies the match condition that egress - // traffic - // from a VM is evaluated against. If it evaluates to true, the - // corresponding `action` is enforced. - // - // The following examples are valid match expressions for public - // NAT: - // - // `inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, - // '2.2.0.0/16')` - // - // `destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'` - // - // The following example is a valid match expression for private - // NAT: - // - // `nexthop.hub - // == - // '//networkconnectivity.googleapis.com/projects/my-project/locations/global/hu - // bs/hub-1'` - Match string `json:"match,omitempty"` - // RuleNumber: An integer uniquely identifying a rule in the list. The rule - // number - // must be a positive value between 0 and 65000, and - // must be unique among rules within a NAT. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatRule) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterNatRuleAction struct { - // SourceNatActiveIps: A list of URLs of the IP resources used for this NAT - // rule. These IP - // addresses must be valid static external IP addresses assigned to - // the - // project. - // This field is used for public NAT. - SourceNatActiveIps []string `json:"sourceNatActiveIps,omitempty"` - // SourceNatActiveRanges: A list of URLs of the subnetworks used as source - // ranges for this - // NAT Rule. These subnetworks must have purpose set to PRIVATE_NAT. - // This field is used for private NAT. - SourceNatActiveRanges []string `json:"sourceNatActiveRanges,omitempty"` - // SourceNatDrainIps: A list of URLs of the IP resources to be drained. These - // IPs - // must be valid static external IPs that have been assigned to the NAT. - // These IPs should be used for updating/patching a NAT rule only. - // This field is used for public NAT. - SourceNatDrainIps []string `json:"sourceNatDrainIps,omitempty"` - // SourceNatDrainRanges: A list of URLs of subnetworks representing source - // ranges to be - // drained. This is only supported on patch/update, and these - // subnetworks must have previously been used as active ranges in this - // NAT Rule. - // This field is used for private NAT. - SourceNatDrainRanges []string `json:"sourceNatDrainRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceNatActiveIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SourceNatActiveIps") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatRuleAction) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatRuleAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat: Defines the IP ranges that want to use NAT for a -// subnetwork. -type RouterNatSubnetworkToNat struct { - // Name: URL for the subnetwork resource that will use NAT. - Name string `json:"name,omitempty"` - // SecondaryIpRangeNames: A list of the secondary ranges of the Subnetwork that - // are allowed to - // use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" - // is one of the values in source_ip_ranges_to_nat. - SecondaryIpRangeNames []string `json:"secondaryIpRangeNames,omitempty"` - // SourceIpRangesToNat: Specify the options for NAT ranges in the Subnetwork. - // All - // options of a single value are valid - // except - // NAT_IP_RANGE_OPTION_UNSPECIFIED. - // The only valid option with multiple values is: - // ["PRIMARY_IP_RANGE", - // "LIST_OF_SECONDARY_IP_RANGES"] - // Default: [ALL_IP_RANGES] - // - // Possible values: - // "ALL_IP_RANGES" - The primary and all the secondary ranges are allowed to - // Nat. - // "LIST_OF_SECONDARY_IP_RANGES" - A list of secondary ranges are allowed to - // Nat. - // "PRIMARY_IP_RANGE" - The primary range is allowed to Nat. - SourceIpRangesToNat []string `json:"sourceIpRangesToNat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterNatSubnetworkToNat64: Specifies a subnetwork to enable NAT64. -type RouterNatSubnetworkToNat64 struct { - // Name: URL for the subnetwork resource that will use NAT64. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterNatSubnetworkToNat64) MarshalJSON() ([]byte, error) { - type NoMethod RouterNatSubnetworkToNat64 - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterParams: Additional router parameters. -type RouterParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - // * Inconsistent format is not supported. For instance: - // {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterParams) MarshalJSON() ([]byte, error) { - type NoMethod RouterParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatus struct { - // BestRoutes: A list of the best dynamic routes for this Cloud Router's - // Virtual Private - // Cloud (VPC) network in the same region as this Cloud Router. - // - // Lists all of the best routes per prefix that are programmed into - // this - // region's VPC data plane. - // - // When global dynamic routing mode is turned on in the VPC network, this - // list - // can include cross-region dynamic routes from Cloud Routers in other - // regions. - BestRoutes []*Route `json:"bestRoutes,omitempty"` - // BestRoutesForRouter: A list of the best BGP routes learned by this Cloud - // Router. - // - // It is possible that routes listed might not be programmed into the - // data - // plane, if the Google Cloud control plane finds a more optimal route for - // a - // prefix than a route learned by this Cloud Router. - BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` - BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` - NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` - // NccGateway: URI of the ncc_gateway to which this router associated. - NccGateway string `json:"nccGateway,omitempty"` - // Network: URI of the network to which this router belongs. - Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "BestRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BestRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatusBgpPeerStatus struct { - // AdvertisedRoutes: Routes that were advertised to the remote BGP peer - AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` - BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` - // EnableIpv4: Enable IPv4 traffic over BGP Peer. - // It is enabled by default if the peerIpAddress is version 4. - EnableIpv4 bool `json:"enableIpv4,omitempty"` - // EnableIpv6: Enable IPv6 traffic over BGP Peer. - // It is enabled by default if the peerIpAddress is version 6. - EnableIpv6 bool `json:"enableIpv6,omitempty"` - // IpAddress: IP address of the local BGP interface. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv4NexthopAddress: IPv4 address of the local BGP interface. - Ipv4NexthopAddress string `json:"ipv4NexthopAddress,omitempty"` - // Ipv6NexthopAddress: IPv6 address of the local BGP interface. - Ipv6NexthopAddress string `json:"ipv6NexthopAddress,omitempty"` - // LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls. - LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` - // Md5AuthEnabled: Informs whether MD5 authentication is enabled on this BGP - // peer. - Md5AuthEnabled bool `json:"md5AuthEnabled,omitempty"` - // Name: Name of this BGP peer. Unique within the Routers resource. - Name string `json:"name,omitempty"` - // NumLearnedRoutes: Number of routes learned from the remote BGP Peer. - NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"` - // PeerIpAddress: IP address of the remote BGP interface. - PeerIpAddress string `json:"peerIpAddress,omitempty"` - // PeerIpv4NexthopAddress: IPv4 address of the remote BGP interface. - PeerIpv4NexthopAddress string `json:"peerIpv4NexthopAddress,omitempty"` - // PeerIpv6NexthopAddress: IPv6 address of the remote BGP interface. - PeerIpv6NexthopAddress string `json:"peerIpv6NexthopAddress,omitempty"` - // RouterApplianceInstance: [Output only] URI of the VM instance that is used - // as third-party router - // appliances such as Next Gen Firewalls, Virtual Routers, or - // Router - // Appliances. - // The VM instance is the peer side of the BGP session. - RouterApplianceInstance string `json:"routerApplianceInstance,omitempty"` - // State: The state of the BGP session. For a list of possible values for - // this - // field, seeBGP session states. - State string `json:"state,omitempty"` - // Status: Status of the BGP peer: {UP, DOWN} - // - // Possible values: - // "DOWN" - // "UNKNOWN" - // "UP" - Status string `json:"status,omitempty"` - // StatusReason: Indicates why particular status was returned. - // - // Possible values: - // "IPV4_PEER_ON_IPV6_ONLY_CONNECTION" - BGP peer disabled because it - // requires IPv4 but the underlying - // connection is IPv6-only. - // "IPV6_PEER_ON_IPV4_ONLY_CONNECTION" - BGP peer disabled because it - // requires IPv6 but the underlying - // connection is IPv4-only. - // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with - // configuration of MD5 authentication. - // This particular reason can only be returned when md5AuthEnabled is true - // and status is DOWN. - // "STATUS_REASON_UNSPECIFIED" - StatusReason string `json:"statusReason,omitempty"` - // Uptime: Time this session has been up. - // Format: - // 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds - Uptime string `json:"uptime,omitempty"` - // UptimeSeconds: Time this session has been up, in seconds. - // Format: - // 145 - UptimeSeconds string `json:"uptimeSeconds,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvertisedRoutes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusBgpPeerStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterStatusNatStatus: Status of a NAT contained in this router. -type RouterStatusNatStatus struct { - // AutoAllocatedNatIps: A list of IPs auto-allocated for NAT. Example: - // ["1.1.1.1", "129.2.16.89"] - AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` - // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that are in - // drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` - // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that are in - // drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` - // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will be - // greater than 0 only if - // user-specified IPs are NOT enough to allow all configured VMs to use - // NAT. - // This value is meaningful only when auto-allocation of NAT IPs is *not* - // used. - MinExtraNatIpsNeeded int64 `json:"minExtraNatIpsNeeded,omitempty"` - // Name: Unique name of this NAT. - Name string `json:"name,omitempty"` - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., Nics) that can - // use NAT. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // RuleStatus: Status of rules in this NAT. - RuleStatus []*RouterStatusNatStatusNatRuleStatus `json:"ruleStatus,omitempty"` - // UserAllocatedNatIpResources: A list of fully qualified URLs of reserved IP - // address resources. - UserAllocatedNatIpResources []string `json:"userAllocatedNatIpResources,omitempty"` - // UserAllocatedNatIps: A list of IPs user-allocated for NAT. - // They will be raw IP strings like "179.12.26.133". - UserAllocatedNatIps []string `json:"userAllocatedNatIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoAllocatedNatIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoAllocatedNatIps") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusNatStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RouterStatusNatStatusNatRuleStatus: Status of a NAT Rule contained in this -// NAT. -type RouterStatusNatStatusNatRuleStatus struct { - // ActiveNatIps: A list of active IPs for NAT. - // Example: ["1.1.1.1", "179.12.26.133"]. - ActiveNatIps []string `json:"activeNatIps,omitempty"` - // DrainNatIps: A list of IPs for NAT that are in drain mode. - // Example: ["1.1.1.1", "179.12.26.133"]. - DrainNatIps []string `json:"drainNatIps,omitempty"` - // MinExtraIpsNeeded: The number of extra IPs to allocate. This will be greater - // than 0 only - // if the existing IPs in this NAT Rule are NOT enough to allow all - // configured VMs to use NAT. - MinExtraIpsNeeded int64 `json:"minExtraIpsNeeded,omitempty"` - // NumVmEndpointsWithNatMappings: Number of VM endpoints (i.e., NICs) that have - // NAT Mappings from this - // NAT Rule. - NumVmEndpointsWithNatMappings int64 `json:"numVmEndpointsWithNatMappings,omitempty"` - // RuleNumber: Rule number of the rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveNatIps") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveNatIps") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusNatStatusNatRuleStatus) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusNatStatusNatRuleStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RouterStatusResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - Result *RouterStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RouterStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod RouterStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersGetRoutePolicyResponse struct { - Resource *RoutePolicy `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersGetRoutePolicyResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersGetRoutePolicyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListBgpRoutes struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#routersListBgpRoutes for - // lists of bgp routes. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of bgp routes. - Result []*BgpRoute `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RoutersListBgpRoutesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutes) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersListBgpRoutesWarning: [Output Only] Informational warning message. -type RoutersListBgpRoutesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersListBgpRoutesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListBgpRoutesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListBgpRoutesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListBgpRoutesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListRoutePolicies struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#routersListRoutePolicies - // for lists of route policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of route policies. - Result []*RoutePolicy `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *RoutersListRoutePoliciesWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePolicies) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePolicies - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersListRoutePoliciesWarning: [Output Only] Informational warning -// message. -type RoutersListRoutePoliciesWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersListRoutePoliciesWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePoliciesWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePoliciesWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersListRoutePoliciesWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersListRoutePoliciesWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersListRoutePoliciesWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersPreviewResponse struct { - // Resource: Preview of given router. - Resource *Router `json:"resource,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Resource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Resource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersPreviewResponse) MarshalJSON() ([]byte, error) { - type NoMethod RoutersPreviewResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersScopedList struct { - // Routers: A list of routers contained in this scope. - Routers []*Router `json:"routers,omitempty"` - // Warning: Informational warning which replaces the list of routers when - // the list is empty. - Warning *RoutersScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Routers") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Routers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedList) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RoutersScopedListWarning: Informational warning which replaces the list of -// routers when -// the list is empty. -type RoutersScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*RoutersScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RoutersScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RoutersScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod RoutersScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SSLHealthCheck struct { - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 443. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: Instructs the health check prober to send this exact ASCII string, - // up to - // 1024 bytes in length, after establishing the TCP connection and - // SSL - // handshake. - Request string `json:"request,omitempty"` - // Response: Creates a content-based SSL health check. In addition to - // establishing a - // TCP connection and the TLS handshake, you can configure the health check - // to - // pass only when the backend sends this exact response ASCII string, up - // to - // 1024 bytes in length. For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SSLHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod SSLHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SavedAttachedDisk: DEPRECATED: Please use compute#savedDisk instead. -// An instance-attached disk resource. -type SavedAttachedDisk struct { - // AutoDelete: Specifies whether the disk will be auto-deleted when the - // instance is - // deleted (but not when the disk is detached from the instance). - AutoDelete bool `json:"autoDelete,omitempty"` - // Boot: Indicates that this is a boot disk. The virtual machine will use the - // first - // partition of the disk for its root filesystem. - Boot bool `json:"boot,omitempty"` - // DeviceName: Specifies the name of the disk attached to the source instance. - DeviceName string `json:"deviceName,omitempty"` - // DiskEncryptionKey: The encryption key for the disk. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // DiskSizeGb: The size of the disk in base-2 GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: [Output Only] URL of the disk type resource. For - // example:projects/project/zones/zone/diskTypes/pd-standard or - // pd-ssd - DiskType string `json:"diskType,omitempty"` - // GuestOsFeatures: A list of features to enable on the guest operating system. - // Applicable only - // for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Index: Specifies zero-based index of the disk that is attached to the - // source - // instance. - Index int64 `json:"index,omitempty"` - // Interface: Specifies the disk interface to use for attaching this disk, - // which is - // either SCSI or NVME. - // - // Possible values: - // "NVME" - // "SCSI" - Interface string `json:"interface,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#attachedDisk for - // attached disks. - Kind string `json:"kind,omitempty"` - // Licenses: [Output Only] Any valid publicly visible licenses. - Licenses []string `json:"licenses,omitempty"` - // Mode: The mode in which this disk is attached to the source instance, - // eitherREAD_WRITE or READ_ONLY. - // - // Possible values: - // "READ_ONLY" - Attaches this disk in read-only mode. Multiple virtual - // machines can use - // a disk in read-only mode at a time. - // "READ_WRITE" - *[Default]* Attaches this disk in read-write mode. Only - // one - // virtual machine at a time can be attached to a disk in read-write mode. - Mode string `json:"mode,omitempty"` - // Source: Specifies a URL of the disk attached to the source instance. - Source string `json:"source,omitempty"` - // StorageBytes: [Output Only] A size of the storage used by the disk's - // snapshot by this - // machine image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // Type: Specifies the type of the attached disk, either SCRATCH orPERSISTENT. - // - // Possible values: - // "PERSISTENT" - // "SCRATCH" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SavedAttachedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedAttachedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SavedDisk: An instance-attached disk resource. -type SavedDisk struct { - // Architecture: [Output Only] The architecture of the attached disk. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#savedDisk - // for attached disks. - Kind string `json:"kind,omitempty"` - // SourceDisk: Specifies a URL of the disk attached to the source instance. - SourceDisk string `json:"sourceDisk,omitempty"` - // StorageBytes: [Output Only] Size of the individual disk snapshot used by - // this machine - // image. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SavedDisk) MarshalJSON() ([]byte, error) { - type NoMethod SavedDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ScalingScheduleStatus struct { - // LastStartTime: [Output Only] The last time the scaling schedule became - // active. - // Note: this is a timestamp when a schedule actually became active, not - // when - // it was planned to do so. - // The timestamp is in RFC3339 - // text format. - LastStartTime string `json:"lastStartTime,omitempty"` - // NextStartTime: [Output Only] The next time the scaling schedule is to become - // active. - // Note: this is a timestamp when a schedule is planned to run, but the - // actual - // time might be slightly different. - // The timestamp is in RFC3339 - // text format. - NextStartTime string `json:"nextStartTime,omitempty"` - // State: [Output Only] The current state of a scaling schedule. - // - // Possible values: - // "ACTIVE" - The current autoscaling recommendation is influenced by this - // scaling - // schedule. - // "DISABLED" - This scaling schedule has been disabled by the user. - // "OBSOLETE" - This scaling schedule will never become active again. - // "READY" - The current autoscaling recommendation is not influenced by this - // scaling - // schedule. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastStartTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LastStartTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ScalingScheduleStatus) MarshalJSON() ([]byte, error) { - type NoMethod ScalingScheduleStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Scheduling: Sets the scheduling options for an Instance. -type Scheduling struct { - // AutomaticRestart: Specifies whether the instance should be automatically - // restarted if it is - // terminated by Compute Engine (not terminated by a user). You can only - // set - // the automatic restart option for standard instances.Preemptible - // instances - // cannot be automatically restarted. - // - // By default, this is set to true so an instance is - // automatically restarted if it is terminated by Compute Engine. - AutomaticRestart *bool `json:"automaticRestart,omitempty"` - // AvailabilityDomain: Specifies the availability domain to place the instance - // in. The value - // must be a number between 1 and the number of availability domains - // specified in the spread placement policy attached to the instance. - AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` - GracefulShutdown *SchedulingGracefulShutdown `json:"gracefulShutdown,omitempty"` - // HostErrorTimeoutSeconds: Specify the time in seconds for host error - // detection, the value must be - // within the range of [90, 330] with the increment of 30, if unset, - // the - // default behavior of host error recovery will be used. - HostErrorTimeoutSeconds int64 `json:"hostErrorTimeoutSeconds,omitempty"` - // InstanceTerminationAction: Specifies the termination action for the - // instance. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` - // LocalSsdRecoveryTimeout: Specifies the maximum amount of time a Local Ssd Vm - // should wait while - // recovery of the Local Ssd state is attempted. Its value should be in - // between 0 and 168 hours with hour granularity and the default value being - // 1 - // hour. - LocalSsdRecoveryTimeout *Duration `json:"localSsdRecoveryTimeout,omitempty"` - // LocationHint: An opaque location hint used to place the instance close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // MaintenanceFreezeDurationHours: Specifies the number of hours after VM - // instance creation where the VM won't - // be scheduled for maintenance. - MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: Specifies the frequency of planned maintenance events. - // The accepted values - // are: `PERIODIC`. - // - // Possible values: - // "AS_NEEDED" - VMs are eligible to receive infrastructure and hypervisor - // updates as they - // become available. This may result in more maintenance operations - // (live - // migrations or terminations) for the VM than the PERIODIC andRECURRENT - // options. - // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. - // "RECURRENT" - VMs receive infrastructure and hypervisor updates on a - // periodic basis, - // minimizing the number of maintenance operations (live migrations - // or - // terminations) on an individual VM. This may mean a VM will take longer - // to receive an update than if it was configured forAS_NEEDED. Security - // updates will still be applied as soon - // as they are available. RECURRENT is used for GEN3 and Slice - // of Hardware VMs. - MaintenanceInterval string `json:"maintenanceInterval,omitempty"` - // MaxRunDuration: Specifies the max run duration for the given instance. If - // specified, - // the instance termination action will be performed at the end of the - // run - // duration. - MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` - // MinNodeCpus: The minimum number of virtual CPUs this instance will consume - // when running - // on a sole-tenant node. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // NodeAffinities: A set of node affinity and anti-affinity configurations. - // Refer toConfiguring node - // affinity for more information. - // Overrides reservationAffinity. - NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` - // OnHostMaintenance: Defines the maintenance behavior for this instance. For - // standard instances, - // the default behavior is MIGRATE. Forpreemptible instances, - // the default and only possible behavior is TERMINATE. For more - // information, see - // Set - // VM host maintenance policy. - // - // Possible values: - // "MIGRATE" - *[Default]* Allows Compute Engine to automatically migrate - // instances - // out of the way of maintenance events. - // "TERMINATE" - Tells Compute Engine to terminate and (optionally) restart - // the instance - // away from the maintenance activity. If you would like your instance to - // be - // restarted, set the automaticRestart flag to true. Your - // instance may be restarted more than once, and it may be restarted - // outside - // the window of maintenance events. - OnHostMaintenance string `json:"onHostMaintenance,omitempty"` - OnInstanceStopAction *SchedulingOnInstanceStopAction `json:"onInstanceStopAction,omitempty"` - // Preemptible: Defines whether the instance is preemptible. This can only be - // set during - // instance creation or while the instance isstopped and - // therefore, in a `TERMINATED` state. SeeInstance Life - // Cycle for more information on the possible instance states. - Preemptible bool `json:"preemptible,omitempty"` - // ProvisioningModel: Specifies the provisioning model of the instance. - // - // Possible values: - // "FLEX_START" - Instance is provisioned using the Flex Start provisioning - // model and - // has a limited runtime. - // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which - // it is provisioned. - // "SPOT" - Heavily discounted, no guaranteed runtime. - // "STANDARD" - Standard provisioning with user controlled runtime, no - // discounts. - ProvisioningModel string `json:"provisioningModel,omitempty"` - // SkipGuestOsShutdown: Default is false and there will be 120 seconds between - // GCE ACPI G2 Soft - // Off and ACPI G3 Mechanical - // Off for Standard VMs and 30 seconds for Spot VMs. - SkipGuestOsShutdown bool `json:"skipGuestOsShutdown,omitempty"` - // TerminationTime: Specifies the timestamp, when the instance will be - // terminated, inRFC3339 text format. If specified, the instance - // termination action will be performed at the termination time. - TerminationTime string `json:"terminationTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutomaticRestart") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Scheduling) MarshalJSON() ([]byte, error) { - type NoMethod Scheduling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingGracefulShutdown: The configuration for gracefully shutting down -// the instance. -type SchedulingGracefulShutdown struct { - // Enabled: Opts-in for graceful shutdown. - Enabled bool `json:"enabled,omitempty"` - // MaxDuration: The time allotted for the instance to gracefully shut down. If - // the - // graceful shutdown isn't complete after this time, then the - // instance - // transitions to the STOPPING state. - MaxDuration *Duration `json:"maxDuration,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingGracefulShutdown) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingGracefulShutdown - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingNodeAffinity: Node Affinity: the configuration of desired nodes -// onto which this Instance -// -// could be scheduled. -type SchedulingNodeAffinity struct { - // Key: Corresponds to the label key of Node resource. - Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. Valid operators areIN for - // affinity and NOT_IN for anti-affinity. - // - // Possible values: - // "IN" - Requires Compute Engine to seek for matched nodes. - // "NOT_IN" - Requires Compute Engine to avoid certain nodes. - // "OPERATOR_UNSPECIFIED" - Operator string `json:"operator,omitempty"` - // Values: Corresponds to the label values of Node resource. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingNodeAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingOnInstanceStopAction: Defines the behaviour for instances with the -// instance_termination_actionSTOP. -type SchedulingOnInstanceStopAction struct { - // DiscardLocalSsd: If true, the contents of any attached Local SSD disks will - // be discarded - // else, the Local SSD data will be preserved when the instance is stopped - // at the end of the run duration/termination time. - DiscardLocalSsd bool `json:"discardLocalSsd,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiscardLocalSsd") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiscardLocalSsd") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingOnInstanceStopAction) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingOnInstanceStopAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Screenshot: An instance's screenshot. -type Screenshot struct { - // Contents: [Output Only] The Base64-encoded screenshot data. - Contents string `json:"contents,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#screenshot - // for the screenshots. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Screenshot) MarshalJSON() ([]byte, error) { - type NoMethod Screenshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SecurityPoliciesScopedList resources. - Items map[string]SecurityPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#securityPolicyAggregatedList for lists of Security - // Policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SecurityPoliciesAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPoliciesAggregatedListWarning: [Output Only] Informational warning -// message. -type SecurityPoliciesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPoliciesAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesListPreconfiguredExpressionSetsResponse struct { - PreconfiguredExpressionSets *SecurityPoliciesWafConfig `json:"preconfiguredExpressionSets,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "PreconfiguredExpressionSets") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreconfiguredExpressionSets") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesListPreconfiguredExpressionSetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesListPreconfiguredExpressionSetsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesScopedList struct { - // SecurityPolicies: A list of SecurityPolicies contained in this scope. - SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // security policies when the list is empty. - Warning *SecurityPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPoliciesScopedListWarning: Informational warning which replaces the -// list of -// security policies when the list is empty. -type SecurityPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPoliciesWafConfig struct { - WafRules *PreconfiguredWafSet `json:"wafRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "WafRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WafRules") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPoliciesWafConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicy: Represents a Google Cloud Armor security policy -// resource. -// -// Only external backend services that use load balancers can -// reference a security policy. For more information, see -// Google Cloud Armor security policy overview. -type SecurityPolicy struct { - AdaptiveProtectionConfig *SecurityPolicyAdaptiveProtectionConfig `json:"adaptiveProtectionConfig,omitempty"` - AdvancedOptionsConfig *SecurityPolicyAdvancedOptionsConfig `json:"advancedOptionsConfig,omitempty"` - // Associations: A list of associations that belong to this policy. - Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - DdosProtectionConfig *SecurityPolicyDdosProtectionConfig `json:"ddosProtectionConfig,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DisplayName: User-provided name of the organization security policy. The - // name should be - // unique in the organization in which the security policy is created. - // This - // should only be used when SecurityPolicyType is FIREWALL. - // The name must be 1-63 characters long, and comply - // with - // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be - // 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - DisplayName string `json:"displayName,omitempty"` - // Fingerprint: Specifies a fingerprint for this resource, which is essentially - // a hash of - // the metadata's contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update metadata. You must always provide - // an - // up-to-date fingerprint hash in order to update or change metadata, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make get() request to the - // security policy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#securityPolicyfor - // security policies - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // security policy, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels. - // - // To see the latest fingerprint, make get() request to the - // security policy. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Parent: [Output Only] The parent of the security policy. - Parent string `json:"parent,omitempty"` - RecaptchaOptionsConfig *SecurityPolicyRecaptchaOptionsConfig `json:"recaptchaOptionsConfig,omitempty"` - // Region: [Output Only] URL of the region where the regional security - // policy - // resides. This field is not applicable to global security policies. - Region string `json:"region,omitempty"` - // RuleTupleCount: [Output Only] Total count of all security policy rule - // tuples. A security - // policy can not exceed a set number of tuples. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // Rules: A list of rules that belong to this policy. - // There must always be a default rule which is a rule with priority - // 2147483647 and match all condition (for the match condition this means - // match "*" for srcIpRanges and for the networkMatch condition every - // field - // must be either match "*" or not set). If no rules are provided when - // creating a security policy, a default rule with action "allow" will - // be - // added. - Rules []*SecurityPolicyRule `json:"rules,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ShortName: User-provided name of the organization security policy. The name - // should be - // unique in the organization in which the security policy is created. - // This - // should only be used when SecurityPolicyType is CLOUD_ARMOR. - // The name must be 1-63 characters long, and comply - // with - // https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be - // 1-63 - // characters long and match the regular - // expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a - // lowercase letter, and all following characters must be a dash, - // lowercase - // letter, or digit, except the last character, which cannot be a dash. - ShortName string `json:"shortName,omitempty"` - // Type: The type indicates the intended use of the security policy. - // - // - CLOUD_ARMOR: Cloud Armor backend security policies can - // be configured to filter incoming HTTP requests targeting backend - // services. - // They filter requests before they hit the origin servers. - // - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can - // be configured to filter incoming HTTP requests targeting backend - // services - // (including Cloud CDN-enabled) as well as backend buckets (Cloud - // Storage). - // They filter requests before the request is served from Google's cache. - // - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor - // internal service policies can be configured to filter HTTP requests - // targeting services managed by Traffic Director in a service mesh. They - // filter requests before the request is served from the application. - // - // - CLOUD_ARMOR_NETWORK: Cloud Armor network policies - // can be configured to filter packets targeting network load - // balancing - // resources such as backend services, target pools, target instances, - // and - // instances with external IPs. They filter requests before the request - // is - // served from the application. - // - // - // This field can be set only at resource creation time. - // - // Possible values: - // "CLOUD_ARMOR" - // "CLOUD_ARMOR_EDGE" - // "CLOUD_ARMOR_INTERNAL_SERVICE" - // "CLOUD_ARMOR_NETWORK" - // "FIREWALL" - Type string `json:"type,omitempty"` - // UserDefinedFields: Definitions of user-defined fields for - // CLOUD_ARMOR_NETWORK policies. A - // user-defined field consists of up to 4 bytes extracted from a fixed - // offset - // in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with - // an - // optional mask to select certain bits. Rules may then specify matching - // values for these fields. - // - // Example: - // - // userDefinedFields: - // - name: "ipv4_fragment_offset" - // base: IPV4 - // offset: 6 - // size: 2 - // mask: "0x1fff" - UserDefinedFields []*SecurityPolicyUserDefinedField `json:"userDefinedFields,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdaptiveProtectionConfig") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdaptiveProtectionConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfig: Configuration options for Cloud -// Armor Adaptive Protection (CAAP). -type SecurityPolicyAdaptiveProtectionConfig struct { - AutoDeployConfig *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig `json:"autoDeployConfig,omitempty"` - // Layer7DdosDefenseConfig: If set to true, enables Cloud Armor Machine - // Learning. - Layer7DdosDefenseConfig *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig `json:"layer7DdosDefenseConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDeployConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDeployConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig: Configuration -// options for Adaptive Protection auto-deploy feature. -type SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig struct { - ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` - ExpirationSec int64 `json:"expirationSec,omitempty"` - ImpactedBaselineThreshold float64 `json:"impactedBaselineThreshold,omitempty"` - LoadThreshold float64 `json:"loadThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceThreshold") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyAdaptiveProtectionConfigAutoDeployConfig - var s1 struct { - ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` - ImpactedBaselineThreshold gensupport.JSONFloat64 `json:"impactedBaselineThreshold"` - LoadThreshold gensupport.JSONFloat64 `json:"loadThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) - s.ImpactedBaselineThreshold = float64(s1.ImpactedBaselineThreshold) - s.LoadThreshold = float64(s1.LoadThreshold) - return nil -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig: Configuration -// options for L7 DDoS detection. -// This field is only supported in Global Security Policies of -// type -// CLOUD_ARMOR. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig struct { - // Enable: If set to true, enables CAAP for L7 DDoS detection. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - Enable bool `json:"enable,omitempty"` - // RuleVisibility: Rule visibility can be one of the following: - // STANDARD - opaque rules. (default) - // PREMIUM - transparent rules. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - // - // Possible values: - // "PREMIUM" - // "STANDARD" - RuleVisibility string `json:"ruleVisibility,omitempty"` - // ThresholdConfigs: Configuration options for layer7 adaptive protection for - // various - // customizable thresholds. - ThresholdConfigs []*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig `json:"thresholdConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig struct { - AutoDeployConfidenceThreshold float64 `json:"autoDeployConfidenceThreshold,omitempty"` - AutoDeployExpirationSec int64 `json:"autoDeployExpirationSec,omitempty"` - AutoDeployImpactedBaselineThreshold float64 `json:"autoDeployImpactedBaselineThreshold,omitempty"` - AutoDeployLoadThreshold float64 `json:"autoDeployLoadThreshold,omitempty"` - DetectionAbsoluteQps float64 `json:"detectionAbsoluteQps,omitempty"` - DetectionLoadThreshold float64 `json:"detectionLoadThreshold,omitempty"` - DetectionRelativeToBaselineQps float64 `json:"detectionRelativeToBaselineQps,omitempty"` - // Name: The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the security policy. - Name string `json:"name,omitempty"` - // TrafficGranularityConfigs: Configuration options for enabling Adaptive - // Protection to operate - // on specified granular traffic units. - TrafficGranularityConfigs []*SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig `json:"trafficGranularityConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AutoDeployConfidenceThreshold") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDeployConfidenceThreshold") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig) UnmarshalJSON(data []byte) error { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig - var s1 struct { - AutoDeployConfidenceThreshold gensupport.JSONFloat64 `json:"autoDeployConfidenceThreshold"` - AutoDeployImpactedBaselineThreshold gensupport.JSONFloat64 `json:"autoDeployImpactedBaselineThreshold"` - AutoDeployLoadThreshold gensupport.JSONFloat64 `json:"autoDeployLoadThreshold"` - DetectionAbsoluteQps gensupport.JSONFloat64 `json:"detectionAbsoluteQps"` - DetectionLoadThreshold gensupport.JSONFloat64 `json:"detectionLoadThreshold"` - DetectionRelativeToBaselineQps gensupport.JSONFloat64 `json:"detectionRelativeToBaselineQps"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.AutoDeployConfidenceThreshold = float64(s1.AutoDeployConfidenceThreshold) - s.AutoDeployImpactedBaselineThreshold = float64(s1.AutoDeployImpactedBaselineThreshold) - s.AutoDeployLoadThreshold = float64(s1.AutoDeployLoadThreshold) - s.DetectionAbsoluteQps = float64(s1.DetectionAbsoluteQps) - s.DetectionLoadThreshold = float64(s1.DetectionLoadThreshold) - s.DetectionRelativeToBaselineQps = float64(s1.DetectionRelativeToBaselineQps) - return nil -} - -// SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigT -// rafficGranularityConfig: Configurations to specifc granular traffic units -// processed by -// Adaptive Protection. -type SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig struct { - // EnableEachUniqueValue: If enabled, traffic matching each unique value for - // the specified - // type constitutes a separate traffic unit. - // It can only be set to true if `value` is empty. - EnableEachUniqueValue bool `json:"enableEachUniqueValue,omitempty"` - // Type: Type of this configuration. - // - // Possible values: - // "HTTP_HEADER_HOST" - // "HTTP_PATH" - // "UNSPECIFIED_TYPE" - Type string `json:"type,omitempty"` - // Value: Requests that match this value constitute a granular traffic unit. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableEachUniqueValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableEachUniqueValue") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdvancedOptionsConfig struct { - // JsonCustomConfig: Custom configuration to apply the JSON parsing. Only - // applicable when - // json_parsing is set to STANDARD. - JsonCustomConfig *SecurityPolicyAdvancedOptionsConfigJsonCustomConfig `json:"jsonCustomConfig,omitempty"` - // Possible values: - // "DISABLED" - // "STANDARD" - // "STANDARD_WITH_GRAPHQL" - JsonParsing string `json:"jsonParsing,omitempty"` - // Possible values: - // "NORMAL" - // "VERBOSE" - LogLevel string `json:"logLevel,omitempty"` - // RequestBodyInspectionSize: The maximum request size chosen by the customer - // with Waf enabled. - // Values supported are "8KB", "16KB, "32KB", "48KB" and "64KB". - // Values are case insensitive. - RequestBodyInspectionSize string `json:"requestBodyInspectionSize,omitempty"` - // UserIpRequestHeaders: An optional list of case-insensitive request header - // names to use for - // resolving the callers client IP address. - UserIpRequestHeaders []string `json:"userIpRequestHeaders,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonCustomConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonCustomConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdvancedOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAdvancedOptionsConfigJsonCustomConfig struct { - // ContentTypes: A list of custom Content-Type header values to apply the JSON - // parsing. - // - // As per RFC 1341, a Content-Type header value has the following - // format: - // - // Content-Type := type "/" subtype *[";" parameter] - // - // When configuring a custom Content-Type header value, only the - // type/subtype needs to be specified, and the parameters should be - // excluded. - ContentTypes []string `json:"contentTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentTypes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAdvancedOptionsConfigJsonCustomConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyAssociation struct { - // AttachmentId: The resource that the security policy is attached to. - AttachmentId string `json:"attachmentId,omitempty"` - // DisplayName: [Output Only] The display name of the security policy of the - // association. - DisplayName string `json:"displayName,omitempty"` - // ExcludedFolders: A list of folders to exclude from the security policy. - ExcludedFolders []string `json:"excludedFolders,omitempty"` - // ExcludedProjects: A list of projects to exclude from the security policy. - ExcludedProjects []string `json:"excludedProjects,omitempty"` - // Name: The name for an association. - Name string `json:"name,omitempty"` - // SecurityPolicyId: [Output Only] The security policy ID of the association. - SecurityPolicyId string `json:"securityPolicyId,omitempty"` - // ShortName: [Output Only] The short name of the security policy of the - // association. - ShortName string `json:"shortName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttachmentId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachmentId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyAssociation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyDdosProtectionConfig struct { - // Possible values: - // "ADVANCED" - // "ADVANCED_PREVIEW" - // "STANDARD" - DdosProtection string `json:"ddosProtection,omitempty"` - // ForceSendFields is a list of field names (e.g. "DdosProtection") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DdosProtection") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyDdosProtectionConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyDdosProtectionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SecurityPolicy resources. - Items []*SecurityPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#securityPolicyList for - // listsof securityPolicies - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SecurityPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyListWarning: [Output Only] Informational warning message. -type SecurityPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SecurityPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRecaptchaOptionsConfig struct { - // RedirectSiteKey: An optional field to supply a reCAPTCHA site key to be used - // for all the - // rules using the redirect action with the type of GOOGLE_RECAPTCHA under - // the security policy. The specified site key needs to be created from - // the - // reCAPTCHA API. The user is responsible for the validity of the - // specified - // site key. If not specified, a Google-managed site key is used. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - RedirectSiteKey string `json:"redirectSiteKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "RedirectSiteKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RedirectSiteKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRecaptchaOptionsConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRecaptchaOptionsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyReference struct { - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecurityPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecurityPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRule: Represents a rule that describes one or more match -// conditions along with -// the action to be taken when traffic matches this condition (allow or deny). -type SecurityPolicyRule struct { - // Action: The Action to perform when the rule is matched. - // The following are the valid actions: - // - // - allow: allow access to target. - // - deny(STATUS): deny access to target, returns the - // HTTP response code specified. Valid values for `STATUS` - // are 403, 404, and 502. - // - rate_based_ban: limit client traffic to the configured - // threshold and ban the client if the traffic exceeds the threshold. - // Configure parameters for this action in RateLimitOptions. Requires - // rate_limit_options to be set. - // - redirect: redirect to a different target. This can - // either be an internal reCAPTCHA redirect, or an external URL-based - // redirect via a 302 response. Parameters for this action can be - // configured - // via redirectOptions. This action is only supported in Global Security - // Policies of type CLOUD_ARMOR. - // - throttle: limit - // client traffic to the configured threshold. Configure parameters for - // this - // action in rateLimitOptions. Requires rate_limit_options to be set for - // this. - // - fairshare (preview only): when traffic reaches the - // threshold limit, requests from the clients matching this rule begin to - // be - // rate-limited using the Fair Share algorithm. This action is only allowed - // in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`. - Action string `json:"action,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Direction: The direction in which this rule applies. This field may only - // be - // specified when versioned_expr is set to FIREWALL. - // - // Possible values: - // "EGRESS" - // "INGRESS" - Direction string `json:"direction,omitempty"` - // EnableLogging: Denotes whether to enable logging for a particular rule. If - // logging is - // enabled, logs will be exported to the configured export destination - // in - // Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you - // cannot enable logging on "goto_next" rules. - // - // This field may only be specified when the versioned_expr is set to - // FIREWALL. - EnableLogging bool `json:"enableLogging,omitempty"` - // HeaderAction: Optional, additional actions that are performed on - // headers. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - HeaderAction *SecurityPolicyRuleHttpHeaderAction `json:"headerAction,omitempty"` - // Kind: [Output only] Type of the resource. Alwayscompute#securityPolicyRule - // for security policy rules - Kind string `json:"kind,omitempty"` - // Match: A match condition that incoming traffic is evaluated against. - // If it evaluates to true, the corresponding 'action' is enforced. - Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` - // NetworkMatch: A match condition that incoming packets are evaluated against - // for - // CLOUD_ARMOR_NETWORK security policies. If it matches, the - // corresponding - // 'action' is enforced. - // - // The match criteria for a rule consists of built-in match fields - // (like - // 'srcIpRanges') and potentially multiple user-defined match - // fields - // ('userDefinedFields'). - // - // Field values may be extracted directly from the packet or derived from - // it - // (e.g. 'srcRegionCodes'). Some fields may not be present in every - // packet - // (e.g. 'srcPorts'). A user-defined field is only present if the base - // header is found in the packet and the entire field is in bounds. - // - // Each match field may specify which values can match it, listing one or - // more ranges, prefixes, or exact values that are considered a match for - // the field. A field value must be present in order to match a specified - // match field. If no match values are specified for a match field, then - // any - // field value is considered to match it, and it's not required to be - // present. For strings specifying '*' is also equivalent to match all. - // - // For a packet to match a rule, all specified match fields must match - // the - // corresponding field values derived from the - // packet. - // - // Example: - // - // networkMatch: - // srcIpRanges: - // - "192.0.2.0/24" - // - "198.51.100.0/24" - // userDefinedFields: - // - name: "ipv4_fragment_offset" - // values: - // - "1-0x1fff" - // - // The above match condition matches packets with a source IP in - // 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field - // named - // "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive. - NetworkMatch *SecurityPolicyRuleNetworkMatcher `json:"networkMatch,omitempty"` - // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied for - // the rule. If the rule - // does not evaluate preconfigured WAF rules, i.e., - // if - // evaluatePreconfiguredWaf() is not used, this field will have no effect. - PreconfiguredWafConfig *SecurityPolicyRulePreconfiguredWafConfig `json:"preconfiguredWafConfig,omitempty"` - // Preview: If set to true, the specified action is not enforced. - Preview bool `json:"preview,omitempty"` - // Priority: An integer indicating the priority of a rule in the list. The - // priority - // must be a positive value between 0 and 2147483647. - // Rules are evaluated from highest to lowest priority where 0 is the - // highest priority and 2147483647 is the lowest priority. - Priority int64 `json:"priority,omitempty"` - // RateLimitOptions: Must be specified if the action is "rate_based_ban" or - // "throttle" or - // "fairshare". Cannot be specified for any other actions. - RateLimitOptions *SecurityPolicyRuleRateLimitOptions `json:"rateLimitOptions,omitempty"` - // RedirectOptions: Parameters defining the redirect action. Cannot be - // specified for any - // other actions. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - RedirectOptions *SecurityPolicyRuleRedirectOptions `json:"redirectOptions,omitempty"` - // RuleNumber: Identifier for the rule. This is only unique within the given - // security - // policy. This can only be set during rule creation, if rule number is - // not - // specified it will be generated by the server. - RuleNumber int64 `json:"ruleNumber,omitempty,string"` - // RuleTupleCount: [Output Only] Calculation of the complexity of a single - // firewall security - // policy rule. - RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` - // TargetResources: A list of network resource URLs to which this rule applies. - // This field - // allows you to control which network's VMs get this rule. If this field - // is left blank, all VMs within the organization will receive the rule. - // - // This field may only be specified when versioned_expr is set to FIREWALL. - TargetResources []string `json:"targetResources,omitempty"` - // TargetServiceAccounts: A list of service accounts indicating the sets of - // instances that are - // applied with this rule. - TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleHttpHeaderAction struct { - // RequestHeadersToAdds: The list of request headers to add or overwrite if - // they're already - // present. - RequestHeadersToAdds []*SecurityPolicyRuleHttpHeaderActionHttpHeaderOption `json:"requestHeadersToAdds,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdds") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeadersToAdds") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleHttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleHttpHeaderActionHttpHeaderOption struct { - // HeaderName: The name of the header to set. - HeaderName string `json:"headerName,omitempty"` - // HeaderValue: The value to set the named header to. - HeaderValue string `json:"headerValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleHttpHeaderActionHttpHeaderOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleMatcher: Represents a match condition that incoming -// traffic is evaluated against. -// Exactly one field must be specified. -type SecurityPolicyRuleMatcher struct { - // Config: The configuration options available when specifying - // versioned_expr. - // This field must be specified if versioned_expr is specified and cannot - // be specified if versioned_expr is not specified. - Config *SecurityPolicyRuleMatcherConfig `json:"config,omitempty"` - // Expr: User defined CEVAL expression. - // A CEVAL expression is used to specify match criteria such as - // origin.ip, - // source.region_code and contents in the request header. - // Expressions containing `evaluateThreatIntelligence` require a Cloud - // Armor Enterprise subscription and are not supported in Edge Policies - // nor in Regional Policies. Expressions - // containing - // `evaluatePreconfiguredExpr('sourceiplist-*')` require a Cloud - // Armor - // Enterprise subscription and are only supported in Global Security - // Policies. - Expr *Expr `json:"expr,omitempty"` - // ExprOptions: The configuration options available when specifying a user - // defined - // CEVAL expression (i.e., 'expr'). - ExprOptions *SecurityPolicyRuleMatcherExprOptions `json:"exprOptions,omitempty"` - // VersionedExpr: Preconfigured versioned expression. - // If this field is specified, config must also be specified. - // Available preconfigured expressions along with their requirements - // are: - // SRC_IPS_V1 - must specify the corresponding src_ip_range field in - // config. - // - // Possible values: - // "FIREWALL" - // "SRC_IPS_V1" - Matches the source IP address of a request to the IP ranges - // supplied - // in config. - VersionedExpr string `json:"versionedExpr,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherConfig struct { - // DestIpRanges: CIDR IP address range. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // Layer4Configs: Pairs of IP protocols and ports that the rule should - // match. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - Layer4Configs []*SecurityPolicyRuleMatcherConfigLayer4Config `json:"layer4Configs,omitempty"` - // SrcIpRanges: CIDR IP address range. - // Maximum number of src_ip_ranges allowed is 10. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherConfigLayer4Config struct { - // IpProtocol: The IP protocol to which this rule applies. The protocol type - // is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp,udp, icmp, esp,ah, - // ipip, sctp), or the IP - // protocol number. - IpProtocol string `json:"ipProtocol,omitempty"` - // Ports: An optional list of ports to which this rule applies. This field - // is - // only applicable for UDP or TCP protocol. Each entry must be either - // an integer or a range. If not specified, this rule applies to - // connections through any port. - // - // Example inputs include: ["22"],["80","443"], and ["12345-12349"]. - // - // This field may only be specified when versioned_expr is set to - // FIREWALL. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpProtocol") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpProtocol") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherConfigLayer4Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherExprOptions struct { - // RecaptchaOptions: reCAPTCHA configuration options to be applied for the - // rule. If the - // rule does not evaluate reCAPTCHA tokens, this field has no effect. - RecaptchaOptions *SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions `json:"recaptchaOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "RecaptchaOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RecaptchaOptions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherExprOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherExprOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions struct { - // ActionTokenSiteKeys: A list of site keys to be used during the validation of - // reCAPTCHA - // action-tokens. The provided site keys need to be created from - // reCAPTCHA API under the same project where the security policy is - // created. - ActionTokenSiteKeys []string `json:"actionTokenSiteKeys,omitempty"` - // SessionTokenSiteKeys: A list of site keys to be used during the validation - // of reCAPTCHA - // session-tokens. The provided site keys need to be created from - // reCAPTCHA API under the same project where the security policy is - // created. - SessionTokenSiteKeys []string `json:"sessionTokenSiteKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionTokenSiteKeys") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionTokenSiteKeys") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleMatcherExprOptionsRecaptchaOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPolicyRuleNetworkMatcher: Represents a match condition that incoming -// network traffic is evaluated -// against. -type SecurityPolicyRuleNetworkMatcher struct { - // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in standard - // text - // format. - DestIpRanges []string `json:"destIpRanges,omitempty"` - // DestPorts: Destination port numbers for TCP/UDP/SCTP. Each element can be a - // 16-bit - // unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). - DestPorts []string `json:"destPorts,omitempty"` - // IpProtocols: IPv4 protocol / IPv6 next header (after extension headers). - // Each - // element can be an 8-bit unsigned decimal number (e.g. "6"), range - // (e.g. - // "253-254"), or one of the following protocol names: "tcp", "udp", - // "icmp", "esp", "ah", "ipip", or "sctp". - IpProtocols []string `json:"ipProtocols,omitempty"` - // SrcAsns: BGP Autonomous System Number associated with the source IP address. - SrcAsns []int64 `json:"srcAsns,omitempty"` - // SrcIpRanges: Source IPv4/IPv6 addresses or CIDR prefixes, in standard text - // format. - SrcIpRanges []string `json:"srcIpRanges,omitempty"` - // SrcPorts: Source port numbers for TCP/UDP/SCTP. Each element can be a - // 16-bit - // unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). - SrcPorts []string `json:"srcPorts,omitempty"` - // SrcRegionCodes: Two-letter ISO 3166-1 alpha-2 country code associated with - // the source - // IP address. - SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` - // UserDefinedFields: User-defined fields. Each element names a defined field - // and lists the - // matching values for that field. - UserDefinedFields []*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch `json:"userDefinedFields,omitempty"` - // ForceSendFields is a list of field names (e.g. "DestIpRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestIpRanges") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleNetworkMatcher) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleNetworkMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { - // Name: Name of the user-defined field, as given in the definition. - Name string `json:"name,omitempty"` - // Values: Matching values of the field. Each element can be a 32-bit - // unsigned - // decimal or hexadecimal (starting with "0x") number (e.g. "64") or - // range (e.g. "0x400-0x7ff"). - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfig struct { - // Exclusions: A list of exclusions to apply during preconfigured WAF - // evaluation. - Exclusions []*SecurityPolicyRulePreconfiguredWafConfigExclusion `json:"exclusions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Exclusions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Exclusions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfigExclusion struct { - // RequestCookiesToExclude: A list of request cookie names whose value will be - // excluded from - // inspection during preconfigured WAF evaluation. - RequestCookiesToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestCookiesToExclude,omitempty"` - // RequestHeadersToExclude: A list of request header names whose value will be - // excluded from - // inspection during preconfigured WAF evaluation. - RequestHeadersToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestHeadersToExclude,omitempty"` - // RequestQueryParamsToExclude: A list of request query parameter names whose - // value will be excluded - // from inspection during preconfigured WAF evaluation. Note that the - // parameter can be in the query string or in the POST body. - RequestQueryParamsToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestQueryParamsToExclude,omitempty"` - // RequestUrisToExclude: A list of request URIs from the request line to be - // excluded from - // inspection during preconfigured WAF evaluation. When specifying this - // field, the query or fragment part should be excluded. - RequestUrisToExclude []*SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams `json:"requestUrisToExclude,omitempty"` - // TargetRuleIds: A list of target rule IDs under the WAF rule set to apply - // the - // preconfigured WAF exclusion. If omitted, it refers to all the rule - // IDs under the WAF rule set. - TargetRuleIds []string `json:"targetRuleIds,omitempty"` - // TargetRuleSet: Target WAF rule set to apply the preconfigured WAF exclusion. - TargetRuleSet string `json:"targetRuleSet,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestCookiesToExclude") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestCookiesToExclude") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfigExclusion) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams struct { - // Op: The match operator for the field. - // - // Possible values: - // "CONTAINS" - The operator matches if the field value contains the - // specified - // value. - // "ENDS_WITH" - The operator matches if the field value ends with the - // specified - // value. - // "EQUALS" - The operator matches if the field value equals the - // specified - // value. - // "EQUALS_ANY" - The operator matches if the field value is any value. - // "STARTS_WITH" - The operator matches if the field value starts with the - // specified - // value. - Op string `json:"op,omitempty"` - // Val: The value of the field. - Val string `json:"val,omitempty"` - // ForceSendFields is a list of field names (e.g. "Op") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Op") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRulePreconfiguredWafConfigExclusionFieldParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptions struct { - // BanDurationSec: Can only be specified if the action for the rule - // is - // "rate_based_ban". If specified, determines the time (in seconds) - // the traffic will continue to be banned by the rate limit after the - // rate falls below the threshold. - BanDurationSec int64 `json:"banDurationSec,omitempty"` - // BanThreshold: Can only be specified if the action for the rule - // is - // "rate_based_ban". If specified, the key will be banned for the - // configured 'ban_duration_sec' when the number of requests that exceed - // the 'rate_limit_threshold' also exceed this 'ban_threshold'. - BanThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"banThreshold,omitempty"` - // ConformAction: Action to take for requests that are under the configured - // rate limit - // threshold. Valid option is "allow" only. - ConformAction string `json:"conformAction,omitempty"` - // EnforceOnKey: Determines the key to enforce the rate_limit_threshold on. - // Possible - // values are: - // - // - ALL: A single rate limit threshold is applied to all - // the requests matching this rule. This is the default value if - // "enforceOnKey" is not configured. - // - IP: The source IP address of - // the request is the key. Each IP has this limit enforced - // separately. - // - HTTP_HEADER: The value of the HTTP - // header whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the header value. If no - // such header is present in the request, the key type defaults toALL. - // - XFF_IP: The first IP address (i.e. the - // originating client IP address) specified in the list of IPs under - // X-Forwarded-For HTTP header. If no such header is present or the value - // is not a valid IP, the key defaults to the source IP address of - // the request i.e. key type IP. - // - HTTP_COOKIE: The value of the HTTP - // cookie whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the cookie value. If no - // such cookie is present in the request, the key type defaults toALL. - // - HTTP_PATH: The URL path of the HTTP request. The key - // value is truncated to the first 128 bytes. - // - SNI: Server name indication in the TLS session of the - // HTTPS request. The key value is truncated to the first 128 bytes. The - // key type defaults to ALL on a HTTP session. - // - REGION_CODE: The country/region from which the request - // originates. - // - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - USER_IP: The IP address of the originating client, - // which is resolved based on "userIpRequestHeaders" configured with the - // security policy. If there is no "userIpRequestHeaders" configuration or - // an IP address cannot be resolved from it, the key type defaults toIP. - // - // - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // For "fairshare" action, this value is limited to ALL i.e. a single - // rate - // limit threshold is enforced for all the requests matching the rule. - // - // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "TLS_JA3_FINGERPRINT" - // "TLS_JA4_FINGERPRINT" - // "USER_IP" - // "XFF_IP" - EnforceOnKey string `json:"enforceOnKey,omitempty"` - // EnforceOnKeyConfigs: If specified, any combination of values - // of - // enforce_on_key_type/enforce_on_key_name is treated as the key on - // which - // ratelimit threshold/action is enforced. You can specify up to - // 3 - // enforce_on_key_configs. If enforce_on_key_configs is - // specified, - // enforce_on_key must not be specified. - EnforceOnKeyConfigs []*SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig `json:"enforceOnKeyConfigs,omitempty"` - // EnforceOnKeyName: Rate limit key name applicable only for the following key - // types: - // HTTP_HEADER -- Name of the HTTP header whose value is taken as the - // key - // value. - // HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the - // key - // value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - // ExceedAction: Action to take for requests that are above the configured rate - // limit - // threshold, to either deny with a specified HTTP response code, or - // redirect to a different endpoint. - // Valid options are `deny(STATUS)`, where valid values for - // `STATUS` are 403, 404, 429, and 502, and - // `redirect`, where the redirect parameters come from - // `exceedRedirectOptions` below. - // The `redirect` action is only supported in Global Security Policies of - // type CLOUD_ARMOR. - ExceedAction string `json:"exceedAction,omitempty"` - // ExceedRedirectOptions: Parameters defining the redirect action that is used - // as the exceed - // action. Cannot be specified if the exceed action is not redirect. - // This field is only supported in Global Security Policies of - // type - // CLOUD_ARMOR. - ExceedRedirectOptions *SecurityPolicyRuleRedirectOptions `json:"exceedRedirectOptions,omitempty"` - // RateLimitThreshold: Threshold at which to begin ratelimiting. - RateLimitThreshold *SecurityPolicyRuleRateLimitOptionsThreshold `json:"rateLimitThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "BanDurationSec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BanDurationSec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { - // EnforceOnKeyName: Rate limit key name applicable only for the following key - // types: - // HTTP_HEADER -- Name of the HTTP header whose value is taken as the - // key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is - // taken as the key value. - EnforceOnKeyName string `json:"enforceOnKeyName,omitempty"` - // EnforceOnKeyType: Determines the key to enforce the rate_limit_threshold on. - // Possible - // values are: - // - // - ALL: A single rate limit threshold is applied to all - // the requests matching this rule. This is the default value if - // "enforceOnKeyConfigs" is not configured. - // - IP: The source IP address of - // the request is the key. Each IP has this limit enforced - // separately. - // - HTTP_HEADER: The value of the HTTP - // header whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the header value. If no - // such header is present in the request, the key type defaults toALL. - // - XFF_IP: The first IP address (i.e. the - // originating client IP address) specified in the list of IPs under - // X-Forwarded-For HTTP header. If no such header is present or the - // value is not a valid IP, the key defaults to the source IP address of - // the request i.e. key type IP. - // - HTTP_COOKIE: The value of the HTTP - // cookie whose name is configured under "enforceOnKeyName". The key - // value is truncated to the first 128 bytes of the cookie value. If no - // such cookie is present in the request, the key type defaults toALL. - // - HTTP_PATH: The URL path of the HTTP request. The key - // value is truncated to the first 128 bytes. - // - SNI: Server name indication in the TLS session of - // the HTTPS request. The key value is truncated to the first 128 bytes. - // The key type defaults to ALL on a HTTP session. - // - REGION_CODE: The country/region from which the - // request originates. - // - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - USER_IP: The IP address of the originating client, - // which is resolved based on "userIpRequestHeaders" configured with the - // security policy. If there is no "userIpRequestHeaders" configuration - // or an IP address cannot be resolved from it, the key type defaults toIP. - // - // - // - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the - // client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the - // key type defaults to ALL. - // - // Possible values: - // "ALL" - // "ALL_IPS" - // "HTTP_COOKIE" - // "HTTP_HEADER" - // "HTTP_PATH" - // "IP" - // "REGION_CODE" - // "SNI" - // "TLS_JA3_FINGERPRINT" - // "TLS_JA4_FINGERPRINT" - // "USER_IP" - // "XFF_IP" - EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnforceOnKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnforceOnKeyName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRateLimitOptionsThreshold struct { - // Count: Number of HTTP(S) requests for calculating the threshold. - Count int64 `json:"count,omitempty"` - // IntervalSec: Interval over which the threshold is computed. - IntervalSec int64 `json:"intervalSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRateLimitOptionsThreshold) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRateLimitOptionsThreshold - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyRuleRedirectOptions struct { - // Target: Target for the redirect action. This is required if the type - // is - // EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. - Target string `json:"target,omitempty"` - // Type: Type of the redirect action. Possible values are: - // - // - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual - // challenge assessment. - // - EXTERNAL_302: redirect to a different URL via a 302 - // response. - // - // Possible values: - // "EXTERNAL_302" - // "GOOGLE_RECAPTCHA" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyRuleRedirectOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SecurityPolicyUserDefinedField struct { - // Base: The base relative to which 'offset' is measured. Possible values are: - // - // - IPV4: Points to the beginning of the IPv4 header. - // - IPV6: Points to the beginning of the IPv6 header. - // - TCP: Points to the beginning of the TCP header, skipping - // over any IPv4 options or IPv6 extension headers. Not present for - // non-first fragments. - // - UDP: Points to the beginning of the UDP header, skipping - // over any IPv4 options or IPv6 extension headers. Not present for - // non-first fragments. - // - // - // required - // - // Possible values: - // "IPV4" - // "IPV6" - // "TCP" - // "UDP" - Base string `json:"base,omitempty"` - // Mask: If specified, apply this mask (bitwise AND) to the field to ignore - // bits - // before matching. Encoded as a hexadecimal number (starting with "0x"). - // The last byte of the field (in network byte order) corresponds to the - // least significant byte of the mask. - Mask string `json:"mask,omitempty"` - // Name: The name of this field. Must be unique within the policy. - Name string `json:"name,omitempty"` - // Offset: Offset of the first byte of the field (in network byte order) - // relative to - // 'base'. - Offset int64 `json:"offset,omitempty"` - // Size: Size of the field in bytes. Valid values: 1-4. - Size int64 `json:"size,omitempty"` - // ForceSendFields is a list of field names (e.g. "Base") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Base") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPolicyUserDefinedField) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPolicyUserDefinedField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecuritySettings: The authentication and authorization settings for a -// BackendService. -type SecuritySettings struct { - // Authentication: [Deprecated] Use clientTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` - // AwsV4Authentication: The configuration needed to generate a signature for - // access to private - // storage buckets that support AWS's Signature Version 4 for - // authentication. - // Allowed only for INTERNET_IP_PORT and INTERNET_FQDN_PORT NEG backends. - AwsV4Authentication *AWSV4Signature `json:"awsV4Authentication,omitempty"` - // ClientTlsPolicy: Optional. A URL referring to a - // networksecurity.ClientTlsPolicy resource - // that describes how clients should authenticate with this - // service's - // backends. - // - // clientTlsPolicy only applies to a globalBackendService with the - // loadBalancingScheme set - // to INTERNAL_SELF_MANAGED. - // - // If left blank, communications are not encrypted. - ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` - // SubjectAltNames: Optional. A list of Subject Alternative Names (SANs) that - // the client - // verifies during a mutual TLS handshake with an server/endpoint for - // thisBackendService. When the server presents its X.509 certificate - // to the client, the client inspects the certificate'ssubjectAltName field. If - // the field contains one of the - // specified values, the communication continues. Otherwise, it fails. - // This - // additional check enables the client to verify that the server is - // authorized - // to run the requested service. - // - // Note that the contents of the server - // certificate's subjectAltName field are configured by the - // Public Key Infrastructure which provisions server identities. - // - // Only applies to a global BackendService withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // Only applies when BackendService has an attachedclientTlsPolicy with - // clientCertificate (mTLS - // mode). - SubjectAltNames []string `json:"subjectAltNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "Authentication") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authentication") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecuritySettings) MarshalJSON() ([]byte, error) { - type NoMethod SecuritySettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SerialPortOutput: An instance serial console output. -type SerialPortOutput struct { - // Contents: [Output Only] The contents of the console output. - Contents string `json:"contents,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serialPortOutput for - // serial port output. - Kind string `json:"kind,omitempty"` - // Next: [Output Only] The position of the next byte of content, regardless - // of - // whether the content exists, following the output returned in the - // `contents` - // property. Use this value in the next request as the start - // parameter. - Next int64 `json:"next,omitempty,string"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Start: The starting byte position of the output that was returned. - // This should match the start parameter sent with the request. - // If the serial console output exceeds the size of the buffer (1 MB), - // older - // output is overwritten by newer content. The output start value will - // indicate the byte position of the output that was returned, which might - // be - // different than the `start` value that was specified in the request. - Start int64 `json:"start,omitempty,string"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SerialPortOutput) MarshalJSON() ([]byte, error) { - type NoMethod SerialPortOutput - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServerBinding struct { - // Possible values: - // "RESTART_NODE_ON_ANY_SERVER" - Node may associate with any physical server - // over its lifetime. - // "RESTART_NODE_ON_MINIMAL_SERVERS" - Node may associate with minimal - // physical servers over its lifetime. - // "SERVER_BINDING_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServerBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServerBinding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAccount: A service account. -type ServiceAccount struct { - // Email: Email address of the service account. - Email string `json:"email,omitempty"` - // Scopes: The list of scopes to be made available for this service account. - Scopes []string `json:"scopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Email") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Email") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAccount) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachment: Represents a ServiceAttachment resource. -// -// A service attachment represents a service that a producer has exposed. -// It encapsulates the load balancer which fronts the service runs and -// a list of NAT IP ranges that the producers uses to represent -// the consumers connecting to the service. -type ServiceAttachment struct { - // ConnectedEndpoints: [Output Only] An array of connections for all the - // consumers connected to - // this service attachment. - ConnectedEndpoints []*ServiceAttachmentConnectedEndpoint `json:"connectedEndpoints,omitempty"` - // ConnectionPreference: The connection preference of service attachment. The - // value can be set - // to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC - // service attachment is one that always accepts the connection from - // consumer - // forwarding rules. - // - // Possible values: - // "ACCEPT_AUTOMATIC" - // "ACCEPT_MANUAL" - // "CONNECTION_PREFERENCE_UNSPECIFIED" - ConnectionPreference string `json:"connectionPreference,omitempty"` - // ConsumerAcceptLists: Specifies which consumer projects or networks are - // allowed to connect to the - // service attachment. Each project or network has a connection limit. A - // given - // service attachment can manage connections at either the project or - // network - // level. Therefore, both the accept and reject lists for a given - // service - // attachment must contain either only projects or only networks or - // only - // endpoints. - ConsumerAcceptLists []*ServiceAttachmentConsumerProjectLimit `json:"consumerAcceptLists,omitempty"` - // ConsumerRejectLists: Specifies a list of projects or networks that are not - // allowed to connect to - // this service attachment. The project can be specified using its project - // ID - // or project number and the network can be specified using its URL. A - // given - // service attachment can manage connections at either the project or - // network - // level. Therefore, both the reject and accept lists for a given - // service - // attachment must contain either only projects or only networks. - ConsumerRejectLists []string `json:"consumerRejectLists,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DomainNames: If specified, the domain name will be used during the - // integration between - // the PSC connected endpoints and the Cloud DNS. For example, this is a - // valid - // domain name: "p.mycompany.com.". Current max number of domain - // names - // supported is 1. - DomainNames []string `json:"domainNames,omitempty"` - // EnableProxyProtocol: If true, enable the proxy protocol which is for - // supplying client TCP/IP - // address data in TCP connections that traverse proxies on their way - // to - // destination servers. - EnableProxyProtocol bool `json:"enableProxyProtocol,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a ServiceAttachment. An up-to-date fingerprint must - // be provided in order to patch/update the ServiceAttachment; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // ServiceAttachment. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serviceAttachment - // for service attachments. - Kind string `json:"kind,omitempty"` - // Metadata: Metadata of the service attachment. - Metadata map[string]string `json:"metadata,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NatSubnets: An array of URLs where each entry is the URL of a subnet - // provided - // by the service producer to use for NAT in this service attachment. - NatSubnets []string `json:"natSubnets,omitempty"` - // ProducerForwardingRule: The URL of a forwarding rule with - // loadBalancingScheme INTERNAL* that is - // serving the endpoint identified by this service attachment. - ProducerForwardingRule string `json:"producerForwardingRule,omitempty"` - // PropagatedConnectionLimit: The number of consumer spokes that connected - // Private Service Connect - // endpoints can be propagated to through Network Connectivity Center. - // This - // limit lets the service producer limit how many propagated Private - // Service - // Connect connections can be established to this service attachment from - // a - // single consumer. - // - // If the connection preference of the service attachment is ACCEPT_MANUAL, - // the limit applies to each project or network that is listed in the - // consumer - // accept list. If the connection preference of the service attachment - // is - // ACCEPT_AUTOMATIC, the limit applies to each project that contains - // a - // connected endpoint. - // - // If unspecified, the default propagated connection limit is 250. - PropagatedConnectionLimit int64 `json:"propagatedConnectionLimit,omitempty"` - // PscServiceAttachmentId: [Output Only] An 128-bit global unique ID of the PSC - // service attachment. - PscServiceAttachmentId *Uint128 `json:"pscServiceAttachmentId,omitempty"` - // ReconcileConnections: This flag determines whether a consumer accept/reject - // list change can - // reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. - // - // - // - If false, connection policy update will only affect existing PENDING - // PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain - // untouched - // regardless how the connection policy is modified . - // - If true, - // update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. - // For - // example, an ACCEPTED PSC endpoint will be moved to REJECTED if its - // project - // is added to the reject list. - // - // - // For newly created service attachment, this boolean defaults to false. - ReconcileConnections bool `json:"reconcileConnections,omitempty"` - // Region: [Output Only] URL of the region where the service attachment - // resides. - // This field applies only to the region resource. You must specify this - // field as part of the HTTP request URL. It is not settable as a field in - // the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // TargetService: The URL of a service serving the endpoint identified by this - // service - // attachment. - TargetService string `json:"targetService,omitempty"` - // TunnelingConfig: When a tunneling config is set on this service attachment - // it will - // encapsulate traffic between consumer and producer. - // - // When tunneling is enabled: - // - // - // - nat_subnets must be unset - // - enable_proxy_protocol must be false - // - producer_forwarding_rule must be a L4 ILB. - // - - TunnelingConfig *ServiceAttachmentTunnelingConfig `json:"tunnelingConfig,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ConnectedEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectedEndpoints") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachment) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentAggregatedList: Contains a list of -// ServiceAttachmentsScopedList. -type ServiceAttachmentAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ServiceAttachmentsScopedList resources. - Items map[string]ServiceAttachmentsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentAggregatedListWarning: [Output Only] Informational warning -// message. -type ServiceAttachmentAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentConnectedEndpoint: [Output Only] A connection connected to -// this service attachment. -type ServiceAttachmentConnectedEndpoint struct { - // ConsumerNetwork: The url of the consumer network. - ConsumerNetwork string `json:"consumerNetwork,omitempty"` - // Endpoint: The url of a connected endpoint. - Endpoint string `json:"endpoint,omitempty"` - // EndpointWithId: The url of a connected endpoint with resource id. - EndpointWithId string `json:"endpointWithId,omitempty"` - // NatIps: NAT IPs of the connected PSC endpoint and those of other - // endpoints - // propagated from it. - NatIps []string `json:"natIps,omitempty"` - // PropagatedConnectionCount: The number of consumer Network Connectivity - // Center spokes that the - // connected Private Service Connect endpoint has propagated to. - PropagatedConnectionCount int64 `json:"propagatedConnectionCount,omitempty"` - // PscConnectionId: The PSC connection id of the connected endpoint. - PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` - // Status: The status of a connected endpoint to this service attachment. - // - // Possible values: - // "ACCEPTED" - The connection has been accepted by the producer. - // "CLOSED" - The connection has been closed by the producer. - // "NEEDS_ATTENTION" - The connection has been accepted by the producer, but - // the producer - // needs to take further action before the forwarding rule can serve - // traffic. - // "PENDING" - The connection is pending acceptance by the producer. - // "REJECTED" - The consumer is still connected but not using the connection. - // "STATUS_UNSPECIFIED" - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumerNetwork") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumerNetwork") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentConnectedEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConnectedEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentConsumerProjectLimit struct { - // ConnectionLimit: The value of the limit to set. For endpoint_url, the limit - // should be no - // more than 1. - ConnectionLimit int64 `json:"connectionLimit,omitempty"` - // EndpointUrl: The URL for the PSC endpoint to accept - EndpointUrl string `json:"endpointUrl,omitempty"` - // NetworkUrl: The network URL for the network to set the limit for. - NetworkUrl string `json:"networkUrl,omitempty"` - // ProjectIdOrNum: The project id or number for the project to set the limit - // for. - ProjectIdOrNum string `json:"projectIdOrNum,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConnectionLimit") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConnectionLimit") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentConsumerProjectLimit) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentConsumerProjectLimit - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of ServiceAttachment resources. - Items []*ServiceAttachment `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#serviceAttachment - // for service attachments. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ServiceAttachmentListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentListWarning: [Output Only] Informational warning message. -type ServiceAttachmentListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentTunnelingConfig: Use to configure this PSC connection in -// tunneling mode. In tunneling mode -// traffic from consumer to producer will be encapsulated as it crosses the -// VPC boundary and traffic from producer to consumer will be decapsulated -// in -// the same manner. -type ServiceAttachmentTunnelingConfig struct { - // EncapsulationProfile: Specify the encapsulation protocol and what metadata - // to include in - // incoming encapsulated packet headers. - // - // Possible values: - // "GENEVE_SECURITY_V1" - Use GENEVE encapsulation protocol and include the - // SECURITY_V1 set of - // GENEVE headers. - // "UNSPECIFIED_ENCAPSULATION_PROFILE" - EncapsulationProfile string `json:"encapsulationProfile,omitempty"` - // RoutingMode: How this Service Attachment will treat traffic sent to the - // tunnel_ip, - // destined for the consumer network. - // - // Possible values: - // "PACKET_INJECTION" - Traffic sent to this service attachment will be - // reinjected into the - // consumer network. - // "STANDARD_ROUTING" - Response traffic, after de-encapsulation, will be - // returned to the - // client. - // "UNSPECIFIED_ROUTING_MODE" - RoutingMode string `json:"routingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "EncapsulationProfile") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncapsulationProfile") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentTunnelingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentTunnelingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentsScopedList struct { - // ServiceAttachments: A list of ServiceAttachments contained in this scope. - ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` - // Warning: Informational warning which replaces the list of - // service attachments when the list is empty. - Warning *ServiceAttachmentsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAttachments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceAttachments") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceAttachmentsScopedListWarning: Informational warning which replaces -// the list of -// service attachments when the list is empty. -type ServiceAttachmentsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ServiceAttachmentsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ServiceAttachmentsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAttachmentsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SetCommonInstanceMetadataOperationMetadata struct { - // ClientOperationId: [Output Only] The client operation id. - ClientOperationId string `json:"clientOperationId,omitempty"` - // PerLocationOperations: [Output Only] Status information per location - // (location name is key). - // Example key: zones/us-central1-a - PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientOperationId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientOperationId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod SetCommonInstanceMetadataOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { - // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field - // is - // populated. - Error *Status `json:"error,omitempty"` - // State: [Output Only] Status of the action, which can be one of the - // following: - // `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`. - // - // Possible values: - // "ABANDONED" - Operation not tracked in this location e.g. zone is marked - // as DOWN. - // "DONE" - Operation has completed successfully. - // "FAILED" - Operation is in an error state. - // "PROPAGATED" - Operation is confirmed to be in the location. - // "PROPAGATING" - Operation is not yet confirmed to have been created in the - // location. - // "UNSPECIFIED" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { - type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShareSettings: The share setting for reservations and sole tenancy node -// groups. -type ShareSettings struct { - // ProjectMap: A map of project id and project config. This is only valid - // when - // share_type's value is SPECIFIC_PROJECTS. - ProjectMap map[string]ShareSettingsProjectConfig `json:"projectMap,omitempty"` - // Projects: A List of Project names to specify consumer projects for - // this - // shared-reservation. This is only valid when share_type's value - // is - // SPECIFIC_PROJECTS. - Projects []string `json:"projects,omitempty"` - // ShareType: Type of sharing for this shared-reservation - // - // Possible values: - // "LOCAL" - Default value. - // "ORGANIZATION" - Shared-reservation is open to entire Organization - // "SHARE_TYPE_UNSPECIFIED" - Default value. This value is unused. - // "SPECIFIC_PROJECTS" - Shared-reservation is open to specific projects - ShareType string `json:"shareType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectMap") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShareSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShareSettingsProjectConfig: Config for each project in the share settings. -type ShareSettingsProjectConfig struct { - // ProjectId: The project ID, should be same as the key of this project config - // in the - // parent map. - ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShareSettingsProjectConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShareSettingsProjectConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceConfig: A set of Shielded Instance options. -type ShieldedInstanceConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled.Enabled by - // default. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Defines whether the instance has Secure Boot - // enabled.Disabled by - // default. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // EnableVtpm: Defines whether the instance has the vTPM enabled.Enabled - // by - // default. - EnableVtpm bool `json:"enableVtpm,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIdentity: A Shielded Instance Identity. -type ShieldedInstanceIdentity struct { - // EccP256EncryptionKey: An Endorsement Key (EK) made by the ECC P256 - // algorithm - // issued to the Shielded Instance's vTPM. - EccP256EncryptionKey *ShieldedInstanceIdentityEntry `json:"eccP256EncryptionKey,omitempty"` - // EccP256SigningKey: An Attestation Key (AK) made by the ECC P256 - // algorithm - // issued to the Shielded Instance's vTPM. - EccP256SigningKey *ShieldedInstanceIdentityEntry `json:"eccP256SigningKey,omitempty"` - // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. - // Alwayscompute#shieldedInstanceIdentity for shielded Instance - // identity entry. - Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm - // issued to the Shielded Instance's vTPM. - SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EccP256EncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EccP256EncryptionKey") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedInstanceIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` - // ForceSendFields is a list of field names (e.g. "EkCert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIdentityEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceIntegrityPolicy: The policy describes the baseline against -// which -// Instance boot integrity is measured. -type ShieldedInstanceIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the - // measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceIntegrityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmConfig: A set of Shielded VM options. -type ShieldedVmConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Defines whether the instance has Secure Boot enabled. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // EnableVtpm: Defines whether the instance has the vTPM enabled. - EnableVtpm bool `json:"enableVtpm,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentity: A Shielded VM Identity. -type ShieldedVmIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded VM's vTPM. - EncryptionKey *ShieldedVmIdentityEntry `json:"encryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#shieldedVmIdentity - // for shielded VM identity entry. - Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) issued to the Shielded VM's vTPM. - SigningKey *ShieldedVmIdentityEntry `json:"signingKey,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncryptionKey") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIdentity) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIdentityEntry: A Shielded Instance Identity Entry. -type ShieldedVmIdentityEntry struct { - // EkCert: A PEM-encoded X.509 certificate. This field can be empty. - EkCert string `json:"ekCert,omitempty"` - // EkPub: A PEM-encoded public key. - EkPub string `json:"ekPub,omitempty"` - // ForceSendFields is a list of field names (e.g. "EkCert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EkCert") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIdentityEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIdentityEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedVmIntegrityPolicy: The policy describes the baseline against -// which -// VM instance boot integrity is measured. -type ShieldedVmIntegrityPolicy struct { - // UpdateAutoLearnPolicy: Updates the integrity policy baseline using - // the - // measurements from the VM instance's most recent boot. - UpdateAutoLearnPolicy bool `json:"updateAutoLearnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UpdateAutoLearnPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedVmIntegrityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedVmIntegrityPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SignedUrlKey: Represents a customer-supplied Signing Key used by Cloud CDN -// Signed URLs -type SignedUrlKey struct { - // KeyName: Name of the key. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - KeyName string `json:"keyName,omitempty"` - // KeyValue: 128-bit key value used for signing the URL. The key value must be - // a validRFC - // 4648 Section 5 base64url encoded string. - KeyValue string `json:"keyValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "KeyName") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SignedUrlKey) MarshalJSON() ([]byte, error) { - type NoMethod SignedUrlKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Snapshot: Represents a Persistent Disk Snapshot resource. -// -// You can use snapshots to back up data on a regular interval. For -// more -// information, read Creating -// persistent disk snapshots. -type Snapshot struct { - // Architecture: [Output Only] The architecture of the snapshot. Valid values - // are - // ARM64 or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not - // set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - // AutoCreated: [Output Only] Set to true if snapshots are automatically - // created by - // applying resource policy on the target disk. - AutoCreated bool `json:"autoCreated,omitempty"` - // ChainName: Creates the new snapshot in the snapshot chain labeled with - // the - // specified name. The chain name must be 1-63 characters long and comply - // with RFC1035. This is an uncommon option only for advanced service - // owners who needs to create separate snapshot chains, for example, - // for chargeback tracking. When you describe your snapshot resource, - // this - // field is visible only if it has a non-empty value. - ChainName string `json:"chainName,omitempty"` - // CreationSizeBytes: [Output Only] Size in bytes of the snapshot at creation - // time. - CreationSizeBytes int64 `json:"creationSizeBytes,omitempty,string"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DownloadBytes: [Output Only] Number of bytes downloaded to restore a - // snapshot to a disk. - DownloadBytes int64 `json:"downloadBytes,omitempty,string"` - // EnableConfidentialCompute: Whether this snapshot is created from a - // confidential compute mode disk. - // [Output Only]: This field is not set by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // GuestFlush: [Input Only] Whether to attempt an application consistent - // snapshot by - // informing the OS to prepare for the snapshot process. - GuestFlush bool `json:"guestFlush,omitempty"` - // GuestOsFeatures: [Output Only] A list of features to enable on the guest - // operating system. - // Applicable only for bootable images. Read - // Enabling guest operating system features to see a list of available - // options. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#snapshot - // for Snapshot resources. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // snapshot, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a snapshot. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this snapshot. These can be later modified by - // the setLabels method. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LicenseCodes: [Output Only] Integer license codes indicating which licenses - // are attached - // to this snapshot. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Licenses: [Output Only] A list of public visible licenses that apply to - // this - // snapshot. This can be because the original image had licenses attached - // (such as a Windows image). - Licenses []string `json:"licenses,omitempty"` - // LocationHint: An opaque location hint used to place the snapshot close to - // other - // resources. - // This field is for use by internal tools that use the public API. - LocationHint string `json:"locationHint,omitempty"` - // Name: Name of the resource; provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must be - // a dash, lowercase letter, or digit, except the last character, which - // cannot - // be a dash. - Name string `json:"name,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *SnapshotParams `json:"params,omitempty"` - // Region: [Output Only] URL of the region where the snapshot resides. Only - // applicable - // for regional snapshots. - Region string `json:"region,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SnapshotEncryptionKey: Encrypts the snapshot using - // acustomer-supplied - // encryption key. - // - // After you encrypt a snapshot using a customer-supplied key, you must - // provide the same key if you use the snapshot later. For example, you - // must - // provide the encryption key when you create a disk from the - // encrypted - // snapshot in a future request. - // - // Customer-supplied encryption keys do not protect access to metadata - // of the snapshot. - // - // If you do not provide an encryption key when creating the snapshot, then - // the snapshot will be encrypted using an automatically generated key and - // you - // do not need to provide a key to use the snapshot later. - SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"` - // SnapshotType: Indicates the type of the snapshot. - // - // Possible values: - // "ARCHIVE" - // "STANDARD" - SnapshotType string `json:"snapshotType,omitempty"` - // SourceDisk: The source disk used to create this snapshot. - SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskEncryptionKey: The customer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // SourceDiskForRecoveryCheckpoint: The source disk whose recovery checkpoint - // will be used to create this - // snapshot. - SourceDiskForRecoveryCheckpoint string `json:"sourceDiskForRecoveryCheckpoint,omitempty"` - // SourceDiskId: [Output Only] The ID value of the disk used to create this - // snapshot. This - // value may be used to determine whether the snapshot was taken from - // the - // current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceInstantSnapshot: The source instant snapshot used to create this - // snapshot. You can provide - // this as a partial or full URL to the resource. For example, the - // following - // are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot - // - projects/project/zones/zone/instantSnapshots/instantSnapshot - // - zones/zone/instantSnapshots/instantSnapshot - SourceInstantSnapshot string `json:"sourceInstantSnapshot,omitempty"` - // SourceInstantSnapshotEncryptionKey: Customer provided encryption key when - // creating Snapshot from Instant - // Snapshot. - SourceInstantSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceInstantSnapshotEncryptionKey,omitempty"` - // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot - // used to create this - // snapshot. This value identifies the exact instant snapshot that was used - // to - // create this snapshot. For example, if you created the snapshot from - // an - // instant snapshot that was later deleted and recreated under the same - // name, - // the source instant snapshot ID would identify the exact instant - // snapshot - // that was used. - SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` - // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource policy which - // created this - // scheduled snapshot. - SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` - // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource policy - // which created this - // scheduled snapshot. - SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` - // Status: [Output Only] The status of the snapshot. This can beCREATING, - // DELETING, FAILED,READY, or UPLOADING. - // - // Possible values: - // "CREATING" - Snapshot creation is in progress. - // "DELETING" - Snapshot is currently being deleted. - // "FAILED" - Snapshot creation failed. - // "READY" - Snapshot has been created successfully. - // "UPLOADING" - Snapshot is being uploaded. - Status string `json:"status,omitempty"` - // StorageBytes: [Output Only] A size of the storage used by the snapshot. As - // snapshots - // share storage, this number is expected to change with - // snapshot - // creation/deletion. - StorageBytes int64 `json:"storageBytes,omitempty,string"` - // StorageBytesStatus: [Output Only] An indicator whether storageBytes is in - // a - // stable state or it is being adjusted as a result of shared - // storage - // reallocation. This status can either be UPDATING, meaning - // the size of the snapshot is being updated, or UP_TO_DATE, - // meaning the size of the snapshot is up-to-date. - // - // Possible values: - // "UPDATING" - // "UP_TO_DATE" - StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: Cloud Storage bucket storage location of the snapshot - // (regional or - // multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - // UserLicenses: [Output Only] A list of user provided licenses represented by - // a list of - // URLs to the license resource. - UserLicenses []string `json:"userLicenses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Architecture") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Snapshot) MarshalJSON() ([]byte, error) { - type NoMethod Snapshot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SnapshotsScopedList resources. - Items map[string]SnapshotsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#snapshotAggregatedList - // for aggregated lists of - // snapshots. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SnapshotAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotAggregatedListWarning: [Output Only] Informational warning message. -type SnapshotAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotList: Contains a list of Snapshot resources. -type SnapshotList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Snapshot resources. - Items []*Snapshot `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SnapshotListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotListWarning: [Output Only] Informational warning message. -type SnapshotListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotParams: Additional snapshot params. -type SnapshotParams struct { - // ResourceManagerTags: Resource manager tags to be bound to the snapshot. Tag - // keys and values have - // the same definition as resource - // manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and - // values are in the format `tagValues/456`. The field is ignored (both PUT - // & - // PATCH) when empty. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotParams) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettings struct { - // AccessLocation: (Regional snapshots use only)Policy of which location is - // allowed to access - // snapshot. - AccessLocation *SnapshotSettingsAccessLocation `json:"accessLocation,omitempty"` - // StorageLocation: Policy of which storage location is going to be resolved, - // and additional - // data that particularizes how the policy is going to be carried out. - StorageLocation *SnapshotSettingsStorageLocationSettings `json:"storageLocation,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccessLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettings) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettingsAccessLocation struct { - // Locations: List of regions that can restore a regional - // snapshot from the current region - Locations map[string]SnapshotSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` - // Policy: Policy of which location is allowed to access snapshot. - // - // Possible values: - // "ALL_REGIONS" - Any regions will be able to access the source location. - // "POLICY_UNSPECIFIED" - // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to restore - // region scoped - // snapshots - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsAccessLocation) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsAccessLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotSettingsAccessLocationAccessLocationPreference: A structure for -// specifying an allowed target region. -type SnapshotSettingsAccessLocationAccessLocationPreference struct { - // Region: Accessible region name - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Region") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Region") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsAccessLocationAccessLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsAccessLocationAccessLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotSettingsStorageLocationSettings struct { - // Locations: When the policy is SPECIFIC_LOCATIONS, snapshots will be - // stored - // in the locations listed in this field. Keys are Cloud Storage - // bucket - // locations. Only one location can be specified. - Locations map[string]SnapshotSettingsStorageLocationSettingsStorageLocationPreference `json:"locations,omitempty"` - // Policy: The chosen location policy. - // - // Possible values: - // "LOCAL_REGION" - Store snapshot in the same region as with the originating - // disk. - // No additional parameters are needed. - // "NEAREST_MULTI_REGION" - Store snapshot in the nearest multi region Cloud - // Storage bucket, - // relative to the originating disk. No additional parameters are needed. - // "SPECIFIC_LOCATIONS" - Store snapshot in the specific locations, as - // specified by the user. - // The list of regions to store must be defined under the `locations` - // field. - // "STORAGE_LOCATION_POLICY_UNSPECIFIED" - Policy string `json:"policy,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsStorageLocationSettings) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsStorageLocationSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotSettingsStorageLocationSettingsStorageLocationPreference: A -// structure for specifying storage locations. -type SnapshotSettingsStorageLocationSettingsStorageLocationPreference struct { - // Name: Name of the location. It should be one of the Cloud Storage - // buckets. - // Only one location can be specified. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotSettingsStorageLocationSettingsStorageLocationPreference) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotSettingsStorageLocationSettingsStorageLocationPreference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotsScopedList struct { - // Snapshots: [Output Only] A list of snapshots contained in this scope. - Snapshots []*Snapshot `json:"snapshots,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // snapshots - // when the list is empty. - Warning *SnapshotsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Snapshots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Snapshots") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SnapshotsScopedListWarning: [Output Only] Informational warning which -// replaces the list of snapshots -// when the list is empty. -type SnapshotsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SnapshotsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SnapshotsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SnapshotsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SnapshotsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SourceDiskEncryptionKey struct { - // DiskEncryptionKey: Thecustomer-supplied - // encryption key of the source disk. Required if the source disk is - // protected by a customer-supplied encryption key. - DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` - // SourceDisk: URL of the disk attached to the source instance. This can be a - // full or - // valid partial URL. For example, the following are valid values: - // - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk - // - // - projects/project/zones/zone/disks/disk - // - zones/zone/disks/disk - SourceDisk string `json:"sourceDisk,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskEncryptionKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { - type NoMethod SourceDiskEncryptionKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceInstanceParams: A specification of the parameters to use when creating -// the instance template -// from a source instance. -type SourceInstanceParams struct { - // DiskConfigs: Attached disks configuration. If not provided, defaults are - // applied: - // For boot disk and any other R/W disks, the source images for each disk - // will be used. For read-only disks, they will be attached in read-only - // mode. Local SSD disks will be created as blank volumes. - DiskConfigs []*DiskInstantiationConfig `json:"diskConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceInstanceParams) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SourceInstanceProperties: DEPRECATED: Please use compute#instanceProperties -// instead. -// New properties will not be added to this field. -type SourceInstanceProperties struct { - // CanIpForward: Enables instances created based on this machine image to send - // packets with - // source IP addresses other than their own and receive packets - // with - // destination IP addresses other than their own. If these instances will - // be - // used as an IP gateway or it will be set as the next-hop in a Route - // resource, specify true. If unsure, leave this set tofalse. See theEnable IP - // forwarding - // documentation for more information. - CanIpForward bool `json:"canIpForward,omitempty"` - // DeletionProtection: Whether the instance created from this machine image - // should be protected - // against deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` - // Description: An optional text description for the instances that are created - // from this - // machine image. - Description string `json:"description,omitempty"` - // Disks: An array of disks that are associated with the instances that are - // created - // from this machine image. - Disks []*SavedAttachedDisk `json:"disks,omitempty"` - // GuestAccelerators: A list of guest accelerator cards' type and count to use - // for instances - // created from this machine image. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // KeyRevocationActionType: KeyRevocationActionType of the instance. Supported - // options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value is - // unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` - // Labels: Labels to apply to instances that are created from this machine - // image. - Labels map[string]string `json:"labels,omitempty"` - // MachineType: The machine type to use for instances that are created from - // this machine - // image. - MachineType string `json:"machineType,omitempty"` - // Metadata: The metadata key/value pairs to assign to instances that are - // created from - // this machine image. These pairs can consist of custom metadata or - // predefined keys. SeeProject and - // instance metadata for more information. - Metadata *Metadata `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by instances created from - // this machine - // image. The instance may be scheduled on the specified or newer - // cpu/platform. Applicable values are the friendly names of CPU - // platforms, - // such as minCpuPlatform: "Intel Haswell" orminCpuPlatform: "Intel Sandy - // Bridge". For more - // information, read Specifying a - // Minimum CPU Platform. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // NetworkInterfaces: An array of network access configurations for this - // interface. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This value - // is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` - // Scheduling: Specifies the scheduling options for the instances that are - // created from - // this machine image. - Scheduling *Scheduling `json:"scheduling,omitempty"` - // ServiceAccounts: A list of service accounts with specified scopes. Access - // tokens for these - // service accounts are available to the instances that are created from - // this - // machine image. Use metadata queries to obtain the access tokens for - // these - // instances. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // Tags: A list of tags to apply to the instances that are created from this - // machine - // image. The tags identify valid sources or targets for network firewalls. - // The setTags method can modify this list of tags. Each tag within the - // list - // must comply withRFC1035. - Tags *Tags `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanIpForward") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanIpForward") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SourceInstanceProperties) MarshalJSON() ([]byte, error) { - type NoMethod SourceInstanceProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificate: Represents an SSL certificate resource. -// -// Google Compute Engine has two SSL certificate resources: -// -// * Global (/compute/docs/reference/rest/beta/sslCertificates) -// * Regional (/compute/docs/reference/rest/beta/regionSslCertificates) -// -// The global SSL certificates (sslCertificates) are used by: -// -// - Global external Application Load Balancers -// - Classic Application Load Balancers -// - Proxy Network Load Balancers (with target SSL proxies) -// -// The regional SSL certificates (regionSslCertificates) are used -// by: -// -// - Regional external Application Load Balancers -// - Regional internal Application Load Balancers -// -// Optionally, certificate file contents that you upload can contain a set of -// up -// to five PEM-encoded certificates. -// The API call creates an object (sslCertificate) that holds this data. -// You can use SSL keys and certificates to secure connections to a -// load -// balancer. -// For more information, read -// Creating and using SSL certificates,SSL certificates -// quotas and limits, and -// Troubleshooting SSL certificates. -type SslCertificate struct { - // Certificate: A value read into memory from a certificate file. The - // certificate file must - // be in PEM format. The certificate chain must be no greater than 5 - // certs - // long. The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ExpireTime: [Output Only] Expire time of the certificate. RFC3339 - ExpireTime string `json:"expireTime,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#sslCertificate for - // SSL certificates. - Kind string `json:"kind,omitempty"` - // Managed: Configuration and status of a managed SSL certificate. - Managed *SslCertificateManagedSslCertificate `json:"managed,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PrivateKey: A value read into memory from a write-only private key file. The - // private - // key file must be in PEM format. For security, only insert - // requests include this field. - PrivateKey string `json:"privateKey,omitempty"` - // Region: [Output Only] URL of the region where the regional SSL - // Certificate - // resides. This field is not applicable to global SSL Certificate. - Region string `json:"region,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfManaged: Configuration and status of a self-managed SSL certificate. - SelfManaged *SslCertificateSelfManagedSslCertificate `json:"selfManaged,omitempty"` - // SubjectAlternativeNames: [Output Only] Domains associated with the - // certificate via Subject - // Alternative Name. - SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty"` - // Type: (Optional) Specifies the type of SSL certificate, either - // "SELF_MANAGED" or - // "MANAGED". If not specified, the certificate is self-managed and the - // fieldscertificate and private_key are used. - // - // Possible values: - // "MANAGED" - Google-managed SSLCertificate. - // "SELF_MANAGED" - Certificate uploaded by user. - // "TYPE_UNSPECIFIED" - 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. "Certificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslCertificatesScopedList resources. - Items map[string]SslCertificatesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#sslCertificateAggregatedList for lists of SSL - // Certificates. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateAggregatedListWarning: [Output Only] Informational warning -// message. -type SslCertificateAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificateAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateList: Contains a list of SslCertificate resources. -type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslCertificate resources. - Items []*SslCertificate `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslCertificateListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateListWarning: [Output Only] Informational warning message. -type SslCertificateListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificateListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificateListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateManagedSslCertificate: Configuration and status of a managed -// SSL certificate. -type SslCertificateManagedSslCertificate struct { - // DomainStatus: [Output only] Detailed statuses of the domains specified for - // managed - // certificate resource. - DomainStatus map[string]string `json:"domainStatus,omitempty"` - // Domains: The domains for which a managed SSL certificate will be generated. - // Each - // Google-managed SSL certificate supports up to the maximum number of - // domains per Google-managed SSL - // certificate (/load-balancing/docs/quotas#ssl_certificates). - Domains []string `json:"domains,omitempty"` - // Status: [Output only] Status of the managed certificate resource. - // - // Possible values: - // "ACTIVE" - The certificate management is working, and a certificate has - // been - // provisioned. - // "MANAGED_CERTIFICATE_STATUS_UNSPECIFIED" - // "PROVISIONING" - The certificate management is working. GCP will attempt - // to provision - // the first certificate. - // "PROVISIONING_FAILED" - Certificate provisioning failed due to an issue - // with the DNS - // or load balancing configuration. - // For details of which domain failed, consult domain_status field. - // "PROVISIONING_FAILED_PERMANENTLY" - Certificate provisioning failed due to - // an issue with the DNS - // or load balancing configuration. It won't be retried. To try again - // delete and create a new managed SslCertificate resource. - // For details of which domain failed, consult domain_status field. - // "RENEWAL_FAILED" - Renewal of the certificate has failed due to an issue - // with the DNS - // or load balancing configuration. The existing cert is still - // serving; - // however, it will expire shortly. To provision a renewed certificate, - // delete and create a new managed SslCertificate resource. - // For details on which domain failed, consult domain_status field. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "DomainStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DomainStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateManagedSslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificateSelfManagedSslCertificate: Configuration and status of a -// self-managed SSL certificate. -type SslCertificateSelfManagedSslCertificate struct { - // Certificate: A local certificate file. The certificate must be in - // PEM format. The certificate chain must be no greater than 5 certs - // long. The chain must include at least one intermediate cert. - Certificate string `json:"certificate,omitempty"` - // PrivateKey: A write-only private key in PEM format. Only insert - // requests will include this field. - PrivateKey string `json:"privateKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "Certificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Certificate") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificateSelfManagedSslCertificate) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificateSelfManagedSslCertificate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificatesScopedList struct { - // SslCertificates: List of SslCertificates contained in this scope. - SslCertificates []*SslCertificate `json:"sslCertificates,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *SslCertificatesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslCertificatesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type SslCertificatesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslCertificatesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslCertificatesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslCertificatesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslCertificatesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslPoliciesScopedList resources. - Items map[string]SslPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#sslPolicyAggregatedList - // for lists of SSL Policies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesAggregatedListWarning: [Output Only] Informational warning -// message. -type SslPoliciesAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SslPolicy resources. - Items []*SslPolicy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#sslPoliciesList for - // lists of sslPolicies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SslPoliciesListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesListWarning: [Output Only] Informational warning message. -type SslPoliciesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesListAvailableFeaturesResponse struct { - Features []string `json:"features,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Features") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Features") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesListAvailableFeaturesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesScopedList struct { - // SslPolicies: A list of SslPolicies contained in this scope. - SslPolicies []*SslPolicy `json:"sslPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // SSL policies when the list is empty. - Warning *SslPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslPolicies") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPoliciesScopedListWarning: Informational warning which replaces the list -// of -// SSL policies when the list is empty. -type SslPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SslPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SslPolicy: Represents an SSL Policy resource. -// -// Use SSL policies to control SSL features, such as versions and -// cipher -// suites, that are offered by Application Load Balancers and proxy Network -// Load -// Balancers. For more information, read -// SSL policies overview. -type SslPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // CustomFeatures: A list of features enabled when the selected profile is - // CUSTOM. The - // method returns the set of features that can be - // specified in this list. This field must be empty if the profile is - // notCUSTOM. - CustomFeatures []string `json:"customFeatures,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // EnabledFeatures: [Output Only] The list of features enabled in the SSL - // policy. - EnabledFeatures []string `json:"enabledFeatures,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a SslPolicy. An up-to-date fingerprint must be - // provided in order to update the SslPolicy, otherwise the - // request will fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve an SslPolicy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL - // policies. - Kind string `json:"kind,omitempty"` - // MinTlsVersion: The minimum version of SSL protocol that can be used by the - // clients to - // establish a connection with the load balancer. This can be one ofTLS_1_0, - // TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field - // must be set to RESTRICTED. - // - // Possible values: - // "TLS_1_0" - TLS 1.0 - // "TLS_1_1" - TLS 1.1 - // "TLS_1_2" - TLS 1.2 - // "TLS_1_3" - TLS 1.3 - MinTlsVersion string `json:"minTlsVersion,omitempty"` - // Name: Name of the resource. The name must be 1-63 characters long, and - // comply - // with RFC1035. Specifically, the name must be 1-63 characters - // long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character - // must be a lowercase letter, and all following characters must be a - // dash, - // lowercase letter, or digit, except the last character, which cannot be - // a - // dash. - Name string `json:"name,omitempty"` - // Profile: Profile specifies the set of SSL features that can be used by the - // load - // balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, - // MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features - // to enable must be specified in the customFeatures field. - // - // Possible values: - // "COMPATIBLE" - Compatible profile. Allows the broadset set of clients, - // even those which - // support only out-of-date SSL features to negotiate with the load - // balancer. - // "CUSTOM" - Custom profile. Allow only the set of allowed SSL features - // specified in - // the customFeatures field. - // "FIPS_202205" - FIPS compatible profile. Supports a reduced set of SSL - // features, - // intended to meet FIPS 140-3 compliance requirements. - // "MODERN" - Modern profile. Supports a wide set of SSL features, allowing - // modern - // clients to negotiate SSL with the load balancer. - // "RESTRICTED" - Restricted profile. Supports a reduced set of SSL features, - // intended to - // meet stricter compliance requirements. - Profile string `json:"profile,omitempty"` - // Region: [Output Only] URL of the region where the regional SSL - // policy - // resides. This field is not applicable to global SSL policies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Warnings: [Output Only] If potential misconfigurations are detected for - // this - // SSL policy, this field will be populated with warning messages. - Warnings []*SslPolicyWarnings `json:"warnings,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicy) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyWarnings struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SslPolicyWarningsData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyWarnings) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarnings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyWarningsData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyWarningsData) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyWarningsData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SslPolicyReference struct { - // SslPolicy: URL of the SSL policy resource. Set this to empty string to clear - // any - // existing SSL policy associated with the target proxy resource. - SslPolicy string `json:"sslPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SslPolicyReference) MarshalJSON() ([]byte, error) { - type NoMethod SslPolicyReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicy struct { - PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreservedState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreservedState") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicy) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StatefulPolicyPreservedState: Configuration of preserved resources. -type StatefulPolicyPreservedState struct { - // Disks: Disks created on the instances that will be preserved on - // instance - // delete, update, etc. This map is keyed with the device names of - // the disks. - Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"` - // ExternalIPs: External network IPs assigned to the instances that will be - // preserved on - // instance delete, update, etc. This map is keyed with the network - // interface name. - ExternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"externalIPs,omitempty"` - // InternalIPs: Internal network IPs assigned to the instances that will be - // preserved on - // instance delete, update, etc. This map is keyed with the network - // interface name. - InternalIPs map[string]StatefulPolicyPreservedStateNetworkIp `json:"internalIPs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedState) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicyPreservedStateDiskDevice struct { - // AutoDelete: These stateful disks will never be deleted during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the disk should be deleted after it - // is no longer used by the group, e.g. when the given instance or - // the whole group is deleted. Note: disks attached inREAD_ONLY mode cannot be - // auto-deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateDiskDevice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StatefulPolicyPreservedStateNetworkIp struct { - // AutoDelete: These stateful IPs will never be released during - // autohealing, - // update or VM instance recreate operations. - // This flag is used to configure if the IP reservation should be deleted - // after it is no longer used by the group, e.g. when the given instance - // or the whole group is deleted. - // - // Possible values: - // "NEVER" - // "ON_PERMANENT_INSTANCE_DELETION" - AutoDelete string `json:"autoDelete,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoDelete") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoDelete") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulPolicyPreservedStateNetworkIp) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedStateNetworkIp - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePool: Represents a zonal storage pool resource. -type StoragePool struct { - // CapacityProvisioningType: Provisioning type of the byte capacity of the - // pool. - // - // Possible values: - // "ADVANCED" - Advanced provisioning "thinly" allocates the related - // resource. - // "STANDARD" - Standard provisioning allocates the related resource for the - // pool - // disks' exclusive use. - // "UNSPECIFIED" - CapacityProvisioningType string `json:"capacityProvisioningType,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#storagePool - // for storage pools. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this storage - // pool, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a storage pool. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this storage pool. These can be later modified - // by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // PerformanceProvisioningType: Provisioning type of the performance-related - // parameters of the pool, - // such as throughput and IOPS. - // - // Possible values: - // "ADVANCED" - Advanced provisioning "thinly" allocates the related - // resource. - // "STANDARD" - Standard provisioning allocates the related resource for the - // pool - // disks' exclusive use. - // "UNSPECIFIED" - PerformanceProvisioningType string `json:"performanceProvisioningType,omitempty"` - // PoolProvisionedCapacityGb: Size of the storage pool in GiB. For more - // information about the size - // limits, see https://cloud.google.com/compute/docs/disks/storage-pools. - PoolProvisionedCapacityGb int64 `json:"poolProvisionedCapacityGb,omitempty,string"` - // PoolProvisionedIops: Provisioned IOPS of the storage pool. Only relevant if - // the storage pool - // type is hyperdisk-balanced. - PoolProvisionedIops int64 `json:"poolProvisionedIops,omitempty,string"` - // PoolProvisionedThroughput: Provisioned throughput of the storage pool in - // MiB/s. Only relevant if the - // storage pool type is hyperdisk-balanced or hyperdisk-throughput. - PoolProvisionedThroughput int64 `json:"poolProvisionedThroughput,omitempty,string"` - // ResourceStatus: [Output Only] Status information for the storage pool - // resource. - ResourceStatus *StoragePoolResourceStatus `json:"resourceStatus,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: [Output Only] The status of storage pool creation. - // - // - // - CREATING: Storage pool is provisioning. - // storagePool. - // - FAILED: Storage pool creation failed. - // - READY: Storage pool is ready for use. - // - DELETING: Storage pool is deleting. - // - // Possible values: - // "CREATING" - StoragePool is provisioning - // "DELETING" - StoragePool is deleting. - // "FAILED" - StoragePool creation failed. - // "READY" - StoragePool is ready for use. - State string `json:"state,omitempty"` - // Status: [Output Only] Status information for the storage pool resource. - Status *StoragePoolResourceStatus `json:"status,omitempty"` - // StoragePoolType: Type of the storage pool. - StoragePoolType string `json:"storagePoolType,omitempty"` - // Zone: [Output Only] URL of the zone where the storage pool resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CapacityProvisioningType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CapacityProvisioningType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePool) MarshalJSON() ([]byte, error) { - type NoMethod StoragePool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolAggregatedList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolsScopedList resources. - Items map[string]StoragePoolsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#storagePoolAggregatedList for aggregated lists of - // storage pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolAggregatedListWarning: [Output Only] Informational warning -// message. -type StoragePoolAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolDisk struct { - // AttachedInstances: [Output Only] Instances this disk is attached to. - AttachedInstances []string `json:"attachedInstances,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Disk: [Output Only] The URL of the disk. - Disk string `json:"disk,omitempty"` - // Name: [Output Only] The name of the disk. - Name string `json:"name,omitempty"` - // ProvisionedIops: [Output Only] The number of IOPS provisioned for the disk. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: [Output Only] The throughput provisioned for the - // disk. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // ResourcePolicies: [Output Only] Resource policies applied to disk for - // automatic snapshot - // creations. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` - // SizeGb: [Output Only] The disk size, in GB. - SizeGb int64 `json:"sizeGb,omitempty,string"` - // Status: [Output Only] The disk status. - // - // Possible values: - // "CREATING" - Disk is provisioning - // "DELETING" - Disk is deleting. - // "FAILED" - Disk creation failed. - // "READY" - Disk is ready for use. - // "RESTORING" - Source data is being copied into the disk. - // "UNAVAILABLE" - Disk is currently unavailable and cannot be accessed, - // attached or - // detached. - Status string `json:"status,omitempty"` - // Type: [Output Only] The disk type. - Type string `json:"type,omitempty"` - // UsedBytes: [Output Only] Amount of disk space used. - UsedBytes int64 `json:"usedBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "AttachedInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttachedInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolDisk) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolList: A list of StoragePool resources. -type StoragePoolList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePool resources. - Items []*StoragePool `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#storagePoolList - // for lists of storagePools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolListWarning: [Output Only] Informational warning message. -type StoragePoolListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListDisks struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolDisk resources. - Items []*StoragePoolDisk `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#storagePoolListDisks for - // lists of disks in a - // storagePool. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolListDisksWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisks) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisks - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolListDisksWarning: [Output Only] Informational warning message. -type StoragePoolListDisksWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolListDisksWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisksWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisksWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolListDisksWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolListDisksWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolListDisksWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolResourceStatus: [Output Only] Contains output only fields. -type StoragePoolResourceStatus struct { - // DiskCount: [Output Only] Number of disks used. - DiskCount int64 `json:"diskCount,omitempty,string"` - // LastResizeTimestamp: [Output Only] Timestamp of the last successful resize - // inRFC3339 text format. - LastResizeTimestamp string `json:"lastResizeTimestamp,omitempty"` - // MaxTotalProvisionedDiskCapacityGb: [Output Only] Maximum allowed aggregate - // disk size in GiB. - MaxTotalProvisionedDiskCapacityGb int64 `json:"maxTotalProvisionedDiskCapacityGb,omitempty,string"` - // PoolUsedCapacityBytes: [Output Only] Space used by data stored in disks - // within the storage pool - // (in bytes). This will reflect the total number of bytes written to the - // disks in the pool, in contrast to the capacity of those disks. - PoolUsedCapacityBytes int64 `json:"poolUsedCapacityBytes,omitempty,string"` - // PoolUsedIops: [Output Only] Sum of all the disks' provisioned IOPS, minus - // some amount - // that is allowed per disk that is not counted towards pool's IOPS - // capacity. For more information, - // see - // https://cloud.google.com/compute/docs/disks/storage-pools. - PoolUsedIops int64 `json:"poolUsedIops,omitempty,string"` - // PoolUsedThroughput: [Output Only] Sum of all the disks' provisioned - // throughput in MiB/s. - PoolUsedThroughput int64 `json:"poolUsedThroughput,omitempty,string"` - // PoolUserWrittenBytes: [Output Only] Amount of data written into the pool, - // before it is - // compacted. - PoolUserWrittenBytes int64 `json:"poolUserWrittenBytes,omitempty,string"` - // TotalProvisionedDiskCapacityGb: [Output Only] Sum of all the disks' - // provisioned capacity (in GiB) in - // this storage pool. A disk's provisioned capacity is the same as its - // total - // capacity. - TotalProvisionedDiskCapacityGb int64 `json:"totalProvisionedDiskCapacityGb,omitempty,string"` - // TotalProvisionedDiskIops: [Output Only] Sum of all the disks' provisioned - // IOPS. - TotalProvisionedDiskIops int64 `json:"totalProvisionedDiskIops,omitempty,string"` - // TotalProvisionedDiskThroughput: [Output Only] Sum of all the disks' - // provisioned throughput in MiB/s, - // minus some amount that is allowed per disk that is not counted - // towards - // pool's throughput capacity. - TotalProvisionedDiskThroughput int64 `json:"totalProvisionedDiskThroughput,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DiskCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolResourceStatus) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolResourceStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolType struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // storage pool - // type. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] An optional description of this resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#storagePoolType for - // storage pool types. - Kind string `json:"kind,omitempty"` - // MaxPoolProvisionedCapacityGb: [Output Only] Maximum storage pool size in GB. - MaxPoolProvisionedCapacityGb int64 `json:"maxPoolProvisionedCapacityGb,omitempty,string"` - // MaxPoolProvisionedIops: [Output Only] Maximum provisioned IOPS. - MaxPoolProvisionedIops int64 `json:"maxPoolProvisionedIops,omitempty,string"` - // MaxPoolProvisionedThroughput: [Output Only] Maximum provisioned throughput. - MaxPoolProvisionedThroughput int64 `json:"maxPoolProvisionedThroughput,omitempty,string"` - // MinPoolProvisionedCapacityGb: [Output Only] Minimum storage pool size in GB. - MinPoolProvisionedCapacityGb int64 `json:"minPoolProvisionedCapacityGb,omitempty,string"` - // MinPoolProvisionedIops: [Output Only] Minimum provisioned IOPS. - MinPoolProvisionedIops int64 `json:"minPoolProvisionedIops,omitempty,string"` - // MinPoolProvisionedThroughput: [Output Only] Minimum provisioned throughput. - MinPoolProvisionedThroughput int64 `json:"minPoolProvisionedThroughput,omitempty,string"` - // MinSizeGb: [Deprecated] This field is deprecated. Use - // minPoolProvisionedCapacityGb - // instead. - MinSizeGb int64 `json:"minSizeGb,omitempty,string"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SupportedDiskTypes: [Output Only] The list of disk types supported in this - // storage pool type. - SupportedDiskTypes []string `json:"supportedDiskTypes,omitempty"` - // Zone: [Output Only] URL of the zone where the storage pool type resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolType) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolTypesScopedList resources. - Items map[string]StoragePoolTypesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#storagePoolTypeAggregatedList. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolTypeAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeAggregatedListWarning: [Output Only] Informational warning -// message. -type StoragePoolTypeAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypeAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeList: Contains a list of storage pool types. -type StoragePoolTypeList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of StoragePoolType resources. - Items []*StoragePoolType `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#storagePoolTypeList for - // storage pool types. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *StoragePoolTypeListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypeListWarning: [Output Only] Informational warning message. -type StoragePoolTypeListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypeListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypeListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypeListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypeListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypesScopedList struct { - // StoragePoolTypes: [Output Only] A list of storage pool types contained in - // this scope. - StoragePoolTypes []*StoragePoolType `json:"storagePoolTypes,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // storage pool - // types when the list is empty. - Warning *StoragePoolTypesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "StoragePoolTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StoragePoolTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolTypesScopedListWarning: [Output Only] Informational warning which -// replaces the list of storage pool -// types when the list is empty. -type StoragePoolTypesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolTypesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolTypesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolTypesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolTypesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolsScopedList struct { - // StoragePools: [Output Only] A list of storage pool contained in this scope. - StoragePools []*StoragePool `json:"storagePools,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // storage pool - // when the list is empty. - Warning *StoragePoolsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "StoragePools") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StoragePools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StoragePoolsScopedListWarning: [Output Only] Informational warning which -// replaces the list of storage pool -// when the list is empty. -type StoragePoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*StoragePoolsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StoragePoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StoragePoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod StoragePoolsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type StructuredEntries struct { - // Entries: Map of a partner metadata that belong to the same subdomain. - // It accepts any value including google.protobuf.Struct. - Entries googleapi.RawMessage `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StructuredEntries) MarshalJSON() ([]byte, error) { - type NoMethod StructuredEntries - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Subnetwork: Represents a Subnetwork resource. -// -// A subnetwork (also known as a subnet) is a logical partition of a -// Virtual -// Private Cloud network with one primary IP range and zero or more -// secondary -// IP ranges. For more information, read -// Virtual Private Cloud (VPC) Network. -type Subnetwork struct { - // AllowSubnetCidrRoutesOverlap: Whether this subnetwork's ranges can conflict - // with existing static routes. - // Setting this to true allows this subnetwork's primary and secondary - // ranges - // to overlap with (and contain) static routes that have already - // been - // configured on the corresponding network. - // - // For example if a static route has range 10.1.0.0/16, a subnet - // range 10.0.0.0/8 could only be created if - // allow_conflicting_routes=true. - // - // Overlapping is only allowed on subnetwork operations; routes - // whose ranges conflict with this subnetwork's ranges won't be allowed - // unless - // route.allow_conflicting_subnetworks is set to true. - // - // Typically packets destined to IPs within the subnetwork (which may - // contain - // private/sensitive data) are prevented from leaving the virtual - // network. - // Setting this field to true will disable this feature. - // - // The default value is false and applies to all existing subnetworks - // and - // automatically created subnetworks. - // - // This field cannot be set to true at resource creation time. - AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. This field can be set only at resource creation time. - Description string `json:"description,omitempty"` - // EnableFlowLogs: Whether to enable flow logging for this subnetwork. If this - // field is not - // explicitly set, it will not appear in get listings. If not set - // the default behavior is determined by the org policy, if there is no - // org - // policy specified, then it will default to disabled. This field - // isn't - // supported if the subnet purpose field is set toREGIONAL_MANAGED_PROXY. - EnableFlowLogs bool `json:"enableFlowLogs,omitempty"` - // ExternalIpv6Prefix: The external IPv6 address range that is owned by - // this - // subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a Subnetwork. An up-to-date fingerprint must be - // provided in order to update the Subnetwork, otherwise the - // request will fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a Subnetwork. - Fingerprint string `json:"fingerprint,omitempty"` - // GatewayAddress: [Output Only] The gateway address for default routes to - // reach destination - // addresses outside this subnetwork. - GatewayAddress string `json:"gatewayAddress,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: The internal IPv6 address range that is owned by - // this - // subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - // Provide this property when you create the subnetwork. For example,10.0.0.0/8 - // or 100.64.0.0/10. Ranges must - // be unique and non-overlapping within a network. Only IPv4 is supported. - // This field is set at resource creation time. The range can be any - // range - // listed in theValid - // ranges list. The range can be expanded after creation - // usingexpandIpCidrRange. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // IpCollection: Reference to the source of IP, like a - // PublicDelegatedPrefix - // (PDP) for BYOIP. The PDP must be a sub-PDP - // in - // EXTERNAL_IPV6_SUBNETWORK_CREATION or - // INTERNAL_IPV6_SUBNETWORK_CREATION - // mode. - // - // Use one of the following formats to specify a sub-PDP when creating a - // dual - // stack or IPv6-only subnetwork with external access using BYOIP: - // - // - - // Full resource URL, as - // inhttps://www.googleapis.com/compute/v1/projects/projectId/regions/region/pub - // licDelegatedPrefixes/sub-pdp-name - // - - // Partial URL, as in - // - // - // - - // projects/projectId/regions/region/publicDelegatedPrefixes/sub-pdp-name - // - regions/region/publicDelegatedPrefixes/sub-pdp-name - IpCollection string `json:"ipCollection,omitempty"` - // Ipv6AccessType: The access type of IPv6 address this subnet holds. It's - // immutable and can - // only be specified during creation or the first time the subnet is - // updated - // into IPV4_IPV6 dual stack. - // - // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // accessible - // via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // only - // accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Ipv6CidrRange: [Output Only] This field is for internal use. - Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` - // Ipv6GceEndpoint: [Output Only] Possible endpoints of this subnetwork. It can - // be one of the - // following: - // - // - VM_ONLY: The subnetwork can be used for creating instances and - // IPv6 addresses with VM endpoint type. Such a subnetwork gets external - // IPv6 - // ranges from a public delegated prefix and cannot be used to create - // NetLb. - // - VM_AND_FR: The subnetwork can be used for creating both VM - // instances and Forwarding Rules. It can also be used to reserve IPv6 - // addresses with both VM and FR endpoint types. Such a subnetwork gets its - // IPv6 range from Google IP Pool directly. - // - // Possible values: - // "VM_AND_FR" - // "VM_ONLY" - Ipv6GceEndpoint string `json:"ipv6GceEndpoint,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#subnetwork - // for Subnetwork resources. - Kind string `json:"kind,omitempty"` - // LogConfig: This field denotes the VPC flow logging options for this - // subnetwork. - // If logging is enabled, logs are exported to Cloud Logging. - LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating - // the resource. The name must be 1-63 characters long, and comply - // withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: The URL of the network to which this subnetwork belongs, provided - // by the - // client when initially creating the subnetwork. This field can be set only - // at resource creation time. - Network string `json:"network,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the request, - // but not persisted - // as part of resource payload. - Params *SubnetworkParams `json:"params,omitempty"` - // PrivateIpGoogleAccess: Whether the VMs in this subnet can access Google - // services without assigned - // external IP addresses. This field can be both set at resource creation - // time and updated using setPrivateIpGoogleAccess. - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // PrivateIpv6GoogleAccess: This field is for internal use. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "DISABLE_GOOGLE_ACCESS" - Disable private IPv6 access to/from Google - // services. - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private IPv6 - // access to/from Google services. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 access from - // VMs in this subnet to Google services. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // Possible values: - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - Purpose string `json:"purpose,omitempty"` - // Region: URL of the region where the Subnetwork resides. This - // field can be set only at resource creation time. - Region string `json:"region,omitempty"` - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - // ResolveSubnetMask: Configures subnet mask resolution for this subnetwork. - // - // Possible values: - // "ARP_ALL_RANGES" - All ranges assigned to the VM NIC will respond to ARP. - // "ARP_PRIMARY_RANGE" - Only the primary range of the VM NIC will respond to - // ARP. - ResolveSubnetMask string `json:"resolveSubnetMask,omitempty"` - // Role: The role of subnetwork. Currently, this field is only used - // when - // purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value - // can be set toACTIVE or BACKUP. An ACTIVE - // subnetwork is one that is currently being used for Envoy-based - // load - // balancers in a region. A BACKUP subnetwork is one that is - // ready to be promoted to ACTIVE or is currently draining. - // This field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` - // SecondaryIpRanges: An array of configurations for secondary IP ranges for VM - // instances - // contained in this subnetwork. The primary IP of such VM must belong to - // the - // primary ipCidrRange of the subnetwork. The alias IPs may belong to - // either - // primary or secondary ranges. This field can be updated with apatch request. - SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs - // in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs - // in the subnet can be assigned both IPv4 and - // IPv6 addresses. If not specified, IPV4_ONLY is used. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 - // addresses. - StackType string `json:"stackType,omitempty"` - // State: [Output Only] The state of the subnetwork, which can be one of - // the - // following values:READY: Subnetwork is created and ready to useDRAINING: only - // applicable to subnetworks that have the - // purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that - // connections to the load balancer are being drained. A subnetwork that - // is - // draining cannot be used or modified until it reaches a status ofREADY - // - // Possible values: - // "DRAINING" - Subnetwork is being drained. - // "READY" - Subnetwork is ready for use. - State string `json:"state,omitempty"` - // SystemReservedExternalIpv6Ranges: Output only. [Output Only] The array of - // external IPv6 network ranges reserved from - // the subnetwork's external IPv6 range for system use. - SystemReservedExternalIpv6Ranges []string `json:"systemReservedExternalIpv6Ranges,omitempty"` - // SystemReservedInternalIpv6Ranges: Output only. [Output Only] The array of - // internal IPv6 network ranges reserved from - // the subnetwork's internal IPv6 range for system use. - SystemReservedInternalIpv6Ranges []string `json:"systemReservedInternalIpv6Ranges,omitempty"` - // UtilizationDetails: Output only. [Output Only] The current IP utilization of - // all subnetwork ranges. Contains - // the total number of allocated and free IPs in each range. - UtilizationDetails *SubnetworkUtilizationDetails `json:"utilizationDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowSubnetCidrRoutesOverlap") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Subnetwork) MarshalJSON() ([]byte, error) { - type NoMethod Subnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of SubnetworksScopedList resources. - Items map[string]SubnetworksScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#subnetworkAggregatedList - // for aggregated lists of - // subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SubnetworkAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkAggregatedListWarning: [Output Only] Informational warning -// message. -type SubnetworkAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworkAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworkAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkList: Contains a list of Subnetwork resources. -type SubnetworkList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Subnetwork resources. - Items []*Subnetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#subnetworkList - // for lists of subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *SubnetworkListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkListWarning: [Output Only] Informational warning message. -type SubnetworkListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworkListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworkListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkLogConfig: The available logging options for this subnetwork. -type SubnetworkLogConfig struct { - // AggregationInterval: Can only be specified if VPC flow logging for this - // subnetwork is enabled. - // Toggles the aggregation interval for collecting flow logs. Increasing - // the - // interval time will reduce the amount of generated flow logs for long - // lasting connections. Default is an interval of 5 seconds per connection. - // - // Possible values: - // "INTERVAL_10_MIN" - // "INTERVAL_15_MIN" - // "INTERVAL_1_MIN" - // "INTERVAL_30_SEC" - // "INTERVAL_5_MIN" - // "INTERVAL_5_SEC" - AggregationInterval string `json:"aggregationInterval,omitempty"` - // Enable: Whether to enable flow logging for this subnetwork. If this field is - // not - // explicitly set, it will not appear in get listings. If not - // set the default behavior is determined by the org policy, if there is no - // org policy specified, then it will default to disabled. - // Flow logging isn't supported if the subnet purpose field is - // set to REGIONAL_MANAGED_PROXY. - Enable bool `json:"enable,omitempty"` - // FilterExpr: Can only be specified if VPC flow logs for this subnetwork is - // enabled. - // The filter expression is used to define which VPC flow logs should - // be - // exported to Cloud Logging. - FilterExpr string `json:"filterExpr,omitempty"` - // FlowSampling: Can only be specified if VPC flow logging for this subnetwork - // is enabled. - // The value of the field must be in [0, 1]. Set the sampling rate of VPC - // flow logs within the subnetwork where 1.0 means all collected logs - // are - // reported and 0.0 means no logs are reported. Default is 0.5 unless - // otherwise specified by the org policy, which means half of all - // collected - // logs are reported. - FlowSampling float64 `json:"flowSampling,omitempty"` - // Metadata: Can only be specified if VPC flow logs for this subnetwork is - // enabled. - // Configures whether all, none or a subset of metadata fields should be - // added to the reported VPC flow logs. Default isEXCLUDE_ALL_METADATA. - // - // Possible values: - // "CUSTOM_METADATA" - // "EXCLUDE_ALL_METADATA" - // "INCLUDE_ALL_METADATA" - Metadata string `json:"metadata,omitempty"` - // MetadataFields: Can only be specified if VPC flow logs for this subnetwork - // is enabled and - // "metadata" was set to CUSTOM_METADATA. - MetadataFields []string `json:"metadataFields,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregationInterval") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregationInterval") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod SubnetworkLogConfig - var s1 struct { - FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FlowSampling = float64(s1.FlowSampling) - return nil -} - -// SubnetworkParams: Additional subnetwork parameters. -type SubnetworkParams struct { - // ResourceManagerTags: Tag keys/values directly bound to this resource. - // Tag keys and values have the same definition as resource - // manager tags. The field is allowed for INSERT - // only. The keys/values to set on the resource should be specified in - // either ID { : } or Namespaced format - // { : }. - // For example the following are valid inputs: - // * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} - // * {"123/environment" : "production", "345/abc" : "xyz"} - // Note: - // * Invalid combinations of ID & namespaced format is not supported. For - // instance: {"123/environment" : "tagValues/444"} is invalid. - ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceManagerTags") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkParams) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkParams - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkSecondaryRange: Represents a secondary IP range of a subnetwork. -type SubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - // Provide this property when you create the subnetwork. Ranges must be - // unique and non-overlapping with all primary and secondary IP ranges - // within a network. Only IPv4 is supported. The range can be any range - // listed in theValid - // ranges list. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, used - // when adding - // an alias IP range to a VM instance. - // The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - // ReservedInternalRange: The URL of the reserved internal range. - ReservedInternalRange string `json:"reservedInternalRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkSecondaryRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetails: The current IP utilization of all subnetwork -// ranges. Contains the total -// number of allocated and free IPs in each range. -type SubnetworkUtilizationDetails struct { - // ExternalIpv6InstanceUtilization: Utilizations of external IPV6 IP range. - ExternalIpv6InstanceUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6InstanceUtilization,omitempty"` - // ExternalIpv6LbUtilization: Utilizations of external IPV6 IP range for NetLB. - ExternalIpv6LbUtilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"externalIpv6LbUtilization,omitempty"` - // InternalIpv6Utilization: Utilizations of internal IPV6 IP range. - InternalIpv6Utilization *SubnetworkUtilizationDetailsIPV6Utilization `json:"internalIpv6Utilization,omitempty"` - // Ipv4Utilizations: Utilizations of all IPV4 IP ranges. For primary ranges, - // the range name - // will be empty. - Ipv4Utilizations []*SubnetworkUtilizationDetailsIPV4Utilization `json:"ipv4Utilizations,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExternalIpv6InstanceUtilization") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6InstanceUtilization") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetails) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetailsIPV4Utilization: The IPV4 utilization of a -// single IP range. -type SubnetworkUtilizationDetailsIPV4Utilization struct { - // RangeName: Will be set for secondary range. Empty for primary IPv4 range. - RangeName string `json:"rangeName,omitempty"` - TotalAllocatedIp int64 `json:"totalAllocatedIp,omitempty,string"` - TotalFreeIp int64 `json:"totalFreeIp,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RangeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetailsIPV4Utilization) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetailsIPV4Utilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworkUtilizationDetailsIPV6Utilization: The IPV6 utilization of a -// single IP range. -type SubnetworkUtilizationDetailsIPV6Utilization struct { - TotalAllocatedIp *Uint128 `json:"totalAllocatedIp,omitempty"` - TotalFreeIp *Uint128 `json:"totalFreeIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalAllocatedIp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalAllocatedIp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworkUtilizationDetailsIPV6Utilization) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworkUtilizationDetailsIPV6Utilization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksExpandIpCidrRangeRequest struct { - // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses that - // are legal on - // this Subnetwork. This range should be disjoint from other subnetworks - // within this network. This range can only be larger than (i.e. a superset - // of) the range previously defined before the update. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksExpandIpCidrRangeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedList struct { - // Subnetworks: A list of subnetworks contained in this scope. - Subnetworks []*Subnetwork `json:"subnetworks,omitempty"` - // Warning: An informational warning that appears when the list of addresses - // is empty. - Warning *SubnetworksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Subnetworks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Subnetworks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedListWarning: An informational warning that appears when the -// list of addresses -// is empty. -type SubnetworksScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworksScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedWarning struct { - // ScopeName: Name of the scope containing this set of Subnetworks. - ScopeName string `json:"scopeName,omitempty"` - // Warning: An informational warning about unreachable scope - Warning *SubnetworksScopedWarningWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "ScopeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ScopeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SubnetworksScopedWarningWarning: An informational warning about unreachable -// scope -type SubnetworksScopedWarningWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*SubnetworksScopedWarningWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarningWarning) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarningWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksScopedWarningWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksScopedWarningWarningData) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksScopedWarningWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SubnetworksSetPrivateIpGoogleAccessRequest struct { - PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) { - type NoMethod SubnetworksSetPrivateIpGoogleAccessRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Subsetting: Subsetting configuration for this BackendService. -// Currently this is applicable only for Internal TCP/UDP load -// balancing, -// Internal HTTP(S) load balancing and Traffic Director. -type Subsetting struct { - // Possible values: - // "CONSISTENT_HASH_SUBSETTING" - Subsetting based on consistent - // hashing. - // - // For Traffic Director, the number of backends per backend group - // (the subset size) is based on the `subset_size` parameter. - // - // For Internal HTTP(S) load balancing, the number of backends per - // backend - // group (the subset size) is dynamically adjusted in two cases: - // - As the number of proxy instances participating in Internal HTTP(S) load - // balancing increases, the subset size decreases. - // - When the total number of backends in a network exceeds the capacity of - // a single proxy instance, subset sizes are reduced automatically for - // each service that has backend subsetting enabled. - // "NONE" - No Subsetting. - // - // Clients may open connections and send traffic to all backends of - // this - // backend service. This can lead to performance issues if there is - // substantial imbalance in the count of clients and backends. - Policy string `json:"policy,omitempty"` - // SubsetSize: The number of backends per backend group assigned to each proxy - // instance or - // each service mesh client. - // - // An input parameter to the `CONSISTENT_HASH_SUBSETTING` algorithm. - // Can only be set if `policy` is set to `CONSISTENT_HASH_SUBSETTING`. - // Can only be set if load balancing scheme is `INTERNAL_MANAGED` - // or - // `INTERNAL_SELF_MANAGED`. - // - // `subset_size` is optional for Internal HTTP(S) load balancing - // and required for Traffic Director. - // - // If you do not provide this value, Cloud Load Balancing will calculate - // it - // dynamically to optimize the number of proxies/clients visible to - // each - // backend and vice versa. - // - // Must be greater than 0. If `subset_size` is larger than the number - // of - // backends/endpoints, then subsetting is disabled. - SubsetSize int64 `json:"subsetSize,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Subsetting) MarshalJSON() ([]byte, error) { - type NoMethod Subsetting - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TCPHealthCheck struct { - // Port: The TCP port number to which the health check prober sends packets. - // The - // default value is 80. Valid values are 1 through65535. - Port int64 `json:"port,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - // PortSpecification: Specifies how a port is selected for health checking. Can - // be one of the - // following values: - // USE_FIXED_PORT: Specifies a port number explicitly using theport field in - // the health check. Supported by backend services - // for passthrough load balancers and backend services for proxy - // load - // balancers. Not supported by target pools. The health check supports - // all - // backends supported by the backend service provided the backend can be - // health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance - // group backends. - // USE_NAMED_PORT: Not supported. - // USE_SERVING_PORT: Provides an indirect method of specifying - // the health check port by referring to the backend service. Only supported - // by backend services for proxy load balancers. Not supported by target - // pools. Not supported by backend services for passthrough load - // balancers. - // Supports all backends that can be health checked; for example,GCE_VM_IP_PORT - // network endpoint groups and instance group - // backends. - // - // For GCE_VM_IP_PORT network endpoint group backends, the health - // check uses the port number specified for each endpoint in the - // network - // endpoint group. For instance group backends, the health check uses the - // port number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is used for - // health - // checking. Applies to network endpoint group and instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the health check - // uses the port number - // specified on each endpoint in the network endpoint group. For instance - // group backends, the health check uses the port number specified for - // the - // backend service's named port defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Request: Instructs the health check prober to send this exact ASCII string, - // up to - // 1024 bytes in length, after establishing the TCP connection. - Request string `json:"request,omitempty"` - // Response: Creates a content-based TCP health check. In addition to - // establishing a - // TCP connection, you can configure the health check to pass only when - // the - // backend sends this exact response ASCII string, up to 1024 bytes in - // length. - // For details, - // see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp - Response string `json:"response,omitempty"` - // ForceSendFields is a list of field names (e.g. "Port") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Port") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TCPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod TCPHealthCheck - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Tags: A set of instance tags. -type Tags struct { - // Fingerprint: Specifies a fingerprint for this request, which is essentially - // a hash of - // the tags' contents and used for optimistic locking. The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update tags. You must always provide - // an - // up-to-date fingerprint hash in order to update or change tags. - // - // To see the latest fingerprint, make get() request to the - // instance. - Fingerprint string `json:"fingerprint,omitempty"` - // Items: An array of tags. Each tag must be 1-63 characters long, and - // comply - // with RFC1035. - Items []string `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Tags) MarshalJSON() ([]byte, error) { - type NoMethod Tags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetGrpcProxy: Represents a Target gRPC Proxy resource. -// -// A target gRPC proxy is a component of load balancers intended for -// load balancing gRPC traffic. Only global forwarding rules with load -// balancing -// scheme INTERNAL_SELF_MANAGED can reference a target gRPC proxy. The -// target -// gRPC Proxy references a URL map that specifies how traffic is routed to -// gRPC backend services. -type TargetGrpcProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetGrpcProxy. An up-to-date fingerprint must - // be provided in order to patch/update the TargetGrpcProxy; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // TargetGrpcProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for - // target grpc proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL to - // the - // BackendService. The protocol field in the BackendService must be set - // to - // GRPC. - UrlMap string `json:"urlMap,omitempty"` - // ValidateForProxyless: If true, indicates that the BackendServices referenced - // by the urlMap may be - // accessed by gRPC applications without using a sidecar proxy. This - // will - // enable configuration checks on urlMap and its referenced BackendServices - // to - // not allow unsupported features. A gRPC application must use - // "xds:///" scheme in the target URI of the service it is - // connecting to. - // If false, indicates that the BackendServices referenced by the urlMap - // will - // be accessed by gRPC applications via a sidecar proxy. In this case, a - // gRPC - // application must not use "xds:///" scheme in the target URI of - // the service it is connecting to - ValidateForProxyless bool `json:"validateForProxyless,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetGrpcProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetGrpcProxy resources. - Items []*TargetGrpcProxy `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetGrpcProxy for - // target grpc proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetGrpcProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetGrpcProxyListWarning: [Output Only] Informational warning message. -type TargetGrpcProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetGrpcProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetGrpcProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetGrpcProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetGrpcProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxiesScopedList struct { - // TargetHttpProxies: A list of TargetHttpProxies contained in this scope. - TargetHttpProxies []*TargetHttpProxy `json:"targetHttpProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetHttpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetHttpProxies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxiesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type TargetHttpProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxy: Represents a Target HTTP Proxy resource. -// -// Google Compute Engine has two Target HTTP Proxy resources: -// -// * Global (/compute/docs/reference/rest/beta/targetHttpProxies) -// * Regional (/compute/docs/reference/rest/beta/regionTargetHttpProxies) -// -// A target HTTP proxy is a component of Google Cloud HTTP load balancers. -// -// - targetHttpProxies are used by global external Application Load Balancers, -// classic Application Load Balancers, cross-region internal Application -// -// Load -// -// Balancers, and Traffic Director. -// - regionTargetHttpProxies are used by regional internal Application Load -// Balancers and regional external Application Load Balancers. -// -// Forwarding rules reference a target HTTP proxy, and the target proxy -// then references a URL map. For more information, readUsing Target -// Proxies -// and -// Forwarding rule concepts. -type TargetHttpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetHttpProxy. An up-to-date fingerprint must - // be provided in order to patch/update the TargetHttpProxy; otherwise, - // the - // request will fail with error 412 conditionNotMet. To see the - // latest fingerprint, make a get() request to retrieve the - // TargetHttpProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // HttpFilters: URLs to networkservices.HttpFilter resources - // enabled for xDS clients using this configuration. For - // example,https://networkservices.googleapis.com/v1alpha1/projects/project/loca - // tions/locationhttpFilters/httpFilter - // Only filters that handle outbound connection and - // stream events may be specified. These filters work in conjunction with - // a default set of HTTP filters that may already be configured by - // Traffic - // Director. Traffic Director will determine the final location of - // these - // filters within xDS configuration based on the name of the HTTP filter. - // If - // Traffic Director positions multiple filters at the same location, - // those - // filters will be in the same order as specified in this list. - // - // httpFilters only applies for loadbalancers withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // See ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` - // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection open, after - // completing a response, - // while there is no matching traffic (in seconds). If an HTTP keep-alive - // is - // not specified, a default value (610 seconds) will be used. - // - // For global external Application Load Balancers, the minimum allowed value - // is 5 seconds and the maximum allowed value is 1200 seconds. - // - // For classic Application Load Balancers, this option is not supported. - HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#targetHttpProxy - // for target HTTP proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // Region: [Output Only] URL of the region where the regional Target HTTP - // Proxy - // resides. This field is not applicable to global Target HTTP Proxies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL to - // the BackendService. - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxiesScopedList resources. - Items map[string]TargetHttpProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetHttpProxyAggregatedList for lists of Target - // HTTP - // Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetHttpProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyList: A list of TargetHttpProxy resources. -type TargetHttpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpProxy resources. - Items []*TargetHttpProxy `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of target HTTP proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpProxyListWarning: [Output Only] Informational warning message. -type TargetHttpProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesScopedList struct { - // TargetHttpsProxies: A list of TargetHttpsProxies contained in this scope. - TargetHttpsProxies []*TargetHttpsProxy `json:"targetHttpsProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetHttpsProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetHttpsProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetHttpsProxies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxiesScopedListWarning: Informational warning which replaces -// the list of -// backend services when the list is empty. -type TargetHttpsProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetHttpsProxy. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetCertificateMapRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetQuicOverrideRequest struct { - // QuicOverride: QUIC policy for the TargetHttpsProxy resource. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC with - // clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with clients. - // "NONE" - No overrides to the default QUIC policy. This option is implicit - // if - // no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuicOverride") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuicOverride") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetQuicOverrideRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetQuicOverrideRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of SslCertificate resources to associate - // with this TargetHttpsProxy resource. At least one SSL - // certificate must be specified. Currently, you may specify up to 15 - // SSL - // certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. -// -// Google Compute Engine has two Target HTTPS Proxy resources: -// -// * Global (/compute/docs/reference/rest/beta/targetHttpsProxies) -// * Regional (/compute/docs/reference/rest/beta/regionTargetHttpsProxies) -// -// A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. -// -// * targetHttpsProxies are used by global external Application Load -// Balancers, -// -// classic Application Load Balancers, cross-region internal Application -// -// Load -// -// Balancers, and Traffic Director. -// - regionTargetHttpsProxies are used by regional internal Application Load -// Balancers and regional external Application Load Balancers. -// -// Forwarding rules reference a target HTTPS proxy, and the target proxy -// then references a URL map. For more information, readUsing Target -// Proxies -// and -// Forwarding rule concepts. -type TargetHttpsProxy struct { - // Authentication: [Deprecated] Use serverTlsPolicy instead. - Authentication string `json:"authentication,omitempty"` - // Authorization: [Deprecated] Use authorizationPolicy instead. - Authorization string `json:"authorization,omitempty"` - // AuthorizationPolicy: Optional. A URL referring to a - // networksecurity.AuthorizationPolicy resource - // that describes how the proxy should authorize inbound traffic. If - // left - // blank, access will not be restricted by an authorization policy. - // - // Refer to the AuthorizationPolicy resource for additional - // details. - // - // authorizationPolicy only applies to a globalTargetHttpsProxy attached - // toglobalForwardingRules with theloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // - // Note: This field currently has no impact. - AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` - // CertificateMap: URL of a certificate map that identifies a certificate map - // associated with - // the given target proxy. - // This field can only be set for Global external Application Load Balancer - // or - // Classic Application Load Balancer. For other products use - // Certificate - // Manager Certificates instead. - // - // If set, sslCertificates will be ignored. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field will be ignored - // when - // inserting a TargetHttpsProxy. An up-to-date fingerprint must - // be provided in order to patch the TargetHttpsProxy; otherwise, the - // request - // will fail with error 412 conditionNotMet. To see the latest - // fingerprint, make a get() request to retrieve the - // TargetHttpsProxy. - Fingerprint string `json:"fingerprint,omitempty"` - // HttpFilters: URLs to networkservices.HttpFilter resources - // enabled for xDS clients using this configuration. For - // example,https://networkservices.googleapis.com/beta/projects/project/location - // s/location/httpFilters/httpFilter - // Only filters that handle outbound connection and - // stream events may be specified. These filters work in conjunction with - // a default set of HTTP filters that may already be configured by - // Traffic - // Director. Traffic Director will determine the final location of - // these - // filters within xDS configuration based on the name of the HTTP filter. - // If - // Traffic Director positions multiple filters at the same location, - // those - // filters will be in the same order as specified in this list. - // - // httpFilters only applies for loadbalancers withloadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - // See ForwardingRule for more details. - HttpFilters []string `json:"httpFilters,omitempty"` - // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection open, after - // completing a response, - // while there is no matching traffic (in seconds). If an HTTP keep-alive - // is - // not specified, a default value (610 seconds) will be used. - // - // For global external Application Load Balancers, the minimum allowed value - // is 5 seconds and the maximum allowed value is 1200 seconds. - // - // For classic Application Load Balancers, this option is not supported. - HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetHttpsProxy for - // target HTTPS proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // QuicOverride: Specifies the QUIC override policy for this TargetHttpsProxy - // resource. This - // setting determines whether the load balancer attempts to negotiate QUIC - // with clients. - // You can specify NONE, ENABLE, orDISABLE. - // - // - When quic-override is set to NONE, - // Google manages whether QUIC is used. - // - When quic-override is set to ENABLE, the - // load balancer uses QUIC when possible. - // - When quic-override is set to DISABLE, the - // load balancer doesn't use QUIC. - // - If the quic-override flag is not specified,NONE is implied. - // - // Possible values: - // "DISABLE" - The load balancer will not attempt to negotiate QUIC with - // clients. - // "ENABLE" - The load balancer will attempt to negotiate QUIC with clients. - // "NONE" - No overrides to the default QUIC policy. This option is implicit - // if - // no QUIC override has been specified in the request. - QuicOverride string `json:"quicOverride,omitempty"` - // Region: [Output Only] URL of the region where the regional - // TargetHttpsProxy - // resides. This field is not applicable to global TargetHttpsProxies. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ServerTlsPolicy: Optional. A URL referring to a - // networksecurity.ServerTlsPolicy resource - // that describes how the proxy should authenticate inbound traffic. - // - // serverTlsPolicy only applies to a globalTargetHttpsProxy attached - // toglobalForwardingRules with theloadBalancingScheme set to - // INTERNAL_SELF_MANAGED - // or EXTERNAL orEXTERNAL_MANAGED or INTERNAL_MANAGED. - // It also applies to a regional TargetHttpsProxy attached to - // regional forwardingRules with theloadBalancingScheme set to EXTERNAL_MANAGED - // orINTERNAL_MANAGED. For details whichServerTlsPolicy resources are accepted - // withINTERNAL_SELF_MANAGED and which with EXTERNAL,INTERNAL_MANAGED, - // EXTERNAL_MANAGEDloadBalancingScheme consult ServerTlsPolicy - // documentation. - // - // If left blank, communications are not encrypted. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate - // connections between users and the load balancer. At least one - // SSL - // certificate must be specified. SslCertificates do not apply when the - // load - // balancing scheme is set to INTERNAL_SELF_MANAGED. - // - // The URLs should refer to a SSL Certificate resource or Certificate - // Manager - // Certificate resource. Mixing Classic Certificates and Certificate - // Manager - // Certificates is not allowed. Certificate Manager Certificates must - // include - // the certificatemanager API namespace. Using Certificate Manager - // Certificates in this field is not supported by Global external - // Application - // Load Balancer or Classic Application Load Balancer, use - // certificate_map - // instead. - // - // Currently, you may specify up to 15 Classic SSL Certificates or up to - // 100 - // Certificate Manager Certificates. - // - // Certificate Manager Certificates accepted formats are: - // - // - - // //certificatemanager.googleapis.com/projects/{project}/locations/{location}/c - // ertificates/{resourceName}. - // - - // https://certificatemanager.googleapis.com/v1alpha1/projects/{project}/locations/{location}/certificates/{resourceName}. - SslCertificates []string `json:"sslCertificates,omitempty"` - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetHttpsProxy - // resource. If not set, the TargetHttpsProxy resource has no - // SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` - // TlsEarlyData: Specifies whether TLS 1.3 0-RTT Data ("Early Data") should be - // accepted - // for this service. Early Data allows a TLS resumption handshake to - // include - // the initial application payload (a HTTP request) alongside the - // handshake, - // reducing the effective round trips to "zero". This applies to TLS - // 1.3 - // connections over TCP (HTTP/2) as well as over UDP (QUIC/h3). - // - // - // This can improve application performance, especially on networks - // where - // interruptions may be common, such as on mobile. - // - // - // Requests with Early Data will have the "Early-Data" HTTP header set on - // the request, with a value of "1", to allow the backend to determine - // whether - // Early Data was included. - // - // - // Note: TLS Early Data may allow requests to be replayed, as the data is - // sent to the backend before the handshake has fully completed. - // Applications - // that allow idempotent HTTP methods to make non-idempotent changes, such as - // a GET request updating a database, should not accept Early Data on - // those - // requests, and reject requests with the "Early-Data: 1" HTTP header - // by - // returning a HTTP 425 (Too Early) status code, in order to remain - // RFC - // compliant. - // - // - // The default value is DISABLED. - // - // Possible values: - // "DISABLED" - TLS 1.3 Early Data is not advertised, and any (invalid) - // attempts to send - // Early Data will be rejected by closing the connection. - // "PERMISSIVE" - This enables TLS 1.3 0-RTT, and only allows Early Data to - // be included on - // requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode - // does not enforce any other limitations for requests with Early Data. - // The - // application owner should validate that Early Data is acceptable for a - // given request path. - // "STRICT" - This enables TLS 1.3 0-RTT, and only allows Early Data to be - // included on - // requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without - // query - // parameters. Requests that send Early Data with non-idempotent HTTP - // methods or with query parameters will be rejected with a HTTP 425. - // "UNRESTRICTED" - This enables TLS 1.3 Early Data for requests with any - // HTTP method - // including non-idempotent methods list POST. This mode does not enforce - // any other limitations. This may be valuable for gRPC use cases. However, - // we do not recommend this method unless you have evaluated your - // security - // stance and mitigated the risk of replay attacks using other mechanisms. - TlsEarlyData string `json:"tlsEarlyData,omitempty"` - // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource that - // defines - // the mapping from URL to the BackendService. For example, the following - // are - // all valid URLs for specifying a URL map: - // - // - - // https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map - // - projects/project/global/urlMaps/url-map - // - global/urlMaps/url-map - UrlMap string `json:"urlMap,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Authentication") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authentication") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxiesScopedList resources. - Items map[string]TargetHttpsProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetHttpsProxyAggregatedList for lists of Target - // HTTP Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetHttpsProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. -type TargetHttpsProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetHttpsProxy resources. - Items []*TargetHttpsProxy `json:"items,omitempty"` - // Kind: Type of resource. Always compute#targetHttpsProxyList for - // lists of target HTTPS proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetHttpsProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetHttpsProxyListWarning: [Output Only] Informational warning message. -type TargetHttpsProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetHttpsProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetHttpsProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetHttpsProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstance: Represents a Target Instance resource. -// -// You can use a target instance to handle traffic for one or more -// forwarding -// rules, which is ideal for forwarding protocol traffic that is managed by -// a -// single source. For example, ESP, AH, TCP, or UDP. -// For more information, readTarget -// instances. -type TargetInstance struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Instance: A URL to the virtual machine instance that handles traffic for - // this target - // instance. When creating a target instance, you can provide - // the - // fully-qualified URL or a valid partial URL to the desired virtual - // machine. - // For example, the following are all valid URLs: - // - // - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // - // - projects/project/zones/zone/instances/instance - // - zones/zone/instances/instance - Instance string `json:"instance,omitempty"` - // Kind: [Output Only] The type of the resource. Alwayscompute#targetInstance - // for target instances. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // NatPolicy: Must have a value of NO_NAT. - // Protocol forwarding delivers packets while preserving the destination - // IP - // address of the forwarding rule referencing the target instance. - // - // Possible values: - // "NO_NAT" - No NAT performed. - NatPolicy string `json:"natPolicy,omitempty"` - // Network: The URL of the network this target instance uses to forward - // traffic. - // If not specified, the traffic will be forwarded to the network that - // the default network interface belongs to. - Network string `json:"network,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // target instance. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Zone: [Output Only] URL of the zone where the target instance resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstance) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetInstance resources. - Items map[string]TargetInstancesScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetInstanceAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstanceAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceList: Contains a list of TargetInstance resources. -type TargetInstanceList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetInstance resources. - Items []*TargetInstance `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetInstanceListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstanceListWarning: [Output Only] Informational warning message. -type TargetInstanceListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstanceListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstanceListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstanceListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstanceListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedList struct { - // TargetInstances: A list of target instances contained in this scope. - TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetInstances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetInstances") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetInstancesScopedListWarning: Informational warning which replaces the -// list of addresses when -// the list is empty. -type TargetInstancesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetInstancesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetInstancesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPool: Represents a Target Pool resource. -// -// Target pools are used with external passthrough Network Load Balancers. -// A target pool references member instances, an associated -// legacy -// HttpHealthCheck resource, and, optionally, a backup target pool. -// For more information, readUsing target pools. -type TargetPool struct { - // BackupPool: The server-defined URL for the resource. This field is - // applicable only when - // the containing target pool is serving a forwarding rule as the primary - // pool, and its failoverRatio field is properly set to a value - // between [0, 1].backupPool and failoverRatio together define - // the fallback behavior of the primary target pool: if the ratio of - // the - // healthy instances in the primary pool is at or belowfailoverRatio, traffic - // arriving at the load-balanced - // IP will be directed to the backup pool. - // - // In case where failoverRatio and backupPool - // are not set, or all the instances in the backup pool are unhealthy, - // the traffic will be directed back to the primary pool in the "force" - // mode, where traffic will be spread to the healthy instances with the - // best effort, or to all instances when no instance is healthy. - BackupPool string `json:"backupPool,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // FailoverRatio: This field is applicable only when the containing target pool - // is serving a - // forwarding rule as the primary pool (i.e., not as a backup pool to - // some - // other target pool). The value of the field must be in [0, 1]. - // - // If set, backupPool must also be set. They together define - // the fallback behavior of the primary target pool: if the ratio of - // the - // healthy instances in the primary pool is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // backup pool. - // - // In case where failoverRatio is not set or all the - // instances in the backup pool are unhealthy, the traffic will be - // directed back to the primary pool in the "force" mode, where traffic - // will be spread to the healthy instances with the - // best effort, or to all instances when no instance is healthy. - FailoverRatio float64 `json:"failoverRatio,omitempty"` - // HealthChecks: The URL of the HttpHealthCheck resource. A member instance in - // this - // pool is considered healthy if and only if the health checks pass. - // Only legacy HttpHealthChecks are supported. Only one health check may - // be - // specified. - HealthChecks []string `json:"healthChecks,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Instances: A list of resource URLs to the virtual machine instances serving - // this pool. - // They must live in zones contained in the same region as this pool. - Instances []string `json:"instances,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#targetPool - // for target pools. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Region: [Output Only] URL of the region where the target pool resides. - Region string `json:"region,omitempty"` - // SecurityPolicy: [Output Only] The resource URL for the security policy - // associated with this - // target pool. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SessionAffinity: Session affinity option, must be one of the following - // values: - // NONE: Connections from the same client IP may go to any - // instance in the pool. - // CLIENT_IP: Connections from the same client IP will go - // to the same instance in - // the pool while that instance remains healthy. - // CLIENT_IP_PROTO: Connections from the same client IP - // with the same IP protocol will go to the same instance in the - // pool while that instance remains healthy. - // - // Possible values: - // "CLIENT_IP" - 2-tuple hash on packet's source and destination IP - // addresses. Connections - // from the same source IP address to the same destination IP address will - // be - // served by the same backend VM while that VM remains healthy. - // "CLIENT_IP_NO_DESTINATION" - 1-tuple hash only on packet's source IP - // address. Connections from the - // same source IP address will be served by the same backend VM while that - // VM - // remains healthy. This option can only be used for Internal TCP/UDP - // Load Balancing. - // "CLIENT_IP_PORT_PROTO" - 5-tuple hash on packet's source and destination - // IP addresses, IP protocol, - // and source and destination ports. Connections for the same IP protocol - // from the same source IP address and port to the same destination IP - // address - // and port will be served by the same backend VM while that VM - // remains - // healthy. This option cannot be used for HTTP(S) load balancing. - // "CLIENT_IP_PROTO" - 3-tuple hash on packet's source and destination IP - // addresses, and IP - // protocol. Connections for the same IP protocol from the same source - // IP - // address to the same destination IP address will be served by the - // same - // backend VM while that VM remains healthy. This option cannot be used - // for - // HTTP(S) load balancing. - // "GENERATED_COOKIE" - Hash based on a cookie generated by the L7 - // loadbalancer. - // Only valid for HTTP(S) load balancing. - // "HEADER_FIELD" - The hash is based on a user specified header field. - // "HTTP_COOKIE" - The hash is based on a user provided cookie. - // "NONE" - No session affinity. Connections from the same client IP may - // go - // to any instance in the pool. - // "STRONG_COOKIE_AFFINITY" - Strong cookie-based affinity. Connections - // bearing the same cookie will be - // served by the same backend VM while that VM remains healthy, as long as - // the - // cookie has not expired. - SessionAffinity string `json:"sessionAffinity,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BackupPool") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupPool") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPool) MarshalJSON() ([]byte, error) { - type NoMethod TargetPool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TargetPool) UnmarshalJSON(data []byte) error { - type NoMethod TargetPool - var s1 struct { - FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FailoverRatio = float64(s1.FailoverRatio) - return nil -} - -type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetPool resources. - Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetPoolAggregatedList - // for aggregated lists of - // target pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetPoolAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetPoolAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolInstanceHealth struct { - HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetPoolInstanceHealth - // when checking the health of - // an instance. - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "HealthStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolInstanceHealth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolList: Contains a list of TargetPool resources. -type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetPool resources. - Items []*TargetPool `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#targetPoolList - // for lists of target pools. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetPoolListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolListWarning: [Output Only] Informational warning message. -type TargetPoolListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: The HttpHealthCheck to add to the target pool. - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddHealthCheckRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsAddInstanceRequest struct { - // Instances: A full or partial URL to an instance to add to this target pool. - // This can - // be a full or partial URL. For example, the following are valid URLs: - // - // - - // https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name - // - // - projects/project-id/zones/zone/instances/instance-name - // - zones/zone/instances/instance-name - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsAddInstanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URL to be removed. This can be a full or valid - // partial URL. - // For example, the following are valid URLs: - // - // - - // https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check - // - // - projects/project/global/httpHealthChecks/health-check - // - global/httpHealthChecks/health-check - HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveHealthCheckRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from target pool. - Instances []*InstanceReference `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsRemoveInstanceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedList struct { - // TargetPools: A list of target pools contained in this scope. - TargetPools []*TargetPool `json:"targetPools,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetPools") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetPools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetPoolsScopedListWarning: Informational warning which replaces the list -// of addresses when -// the list is empty. -type TargetPoolsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetPoolsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetPoolsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetReference struct { - Target string `json:"target,omitempty"` - // ForceSendFields is a list of field names (e.g. "Target") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Target") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetReference) MarshalJSON() ([]byte, error) { - type NoMethod TargetReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the targetSslProxy. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetBackendServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetCertificateMapRequest struct { - // CertificateMap: URL of the Certificate Map to associate with this - // TargetSslProxy. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetCertificateMapRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetCertificateMapRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending data to - // the - // backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetProxyHeaderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to associate - // with this - // TargetSslProxy. At least one SSL certificate must be specified. - // Currently, you may specify up to 15 SSL certificates. - SslCertificates []string `json:"sslCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "SslCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SslCertificates") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxiesSetSslCertificatesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxy: Represents a Target SSL Proxy resource. -// -// A target SSL proxy is a component of a Proxy Network Load Balancer. -// The forwarding rule references the target SSL proxy, and the target -// proxy -// then references a backend service. For more information, readProxy -// Network -// Load Balancer overview. -type TargetSslProxy struct { - // CertificateMap: URL of a certificate map that identifies a certificate map - // associated with - // the given target proxy. - // This field can only be set for global target proxies. - // If set, sslCertificates will be ignored. - // - // Accepted format - // is//certificatemanager.googleapis.com/projects/{project}/locations/{location} - // /certificateMaps/{resourceName}. - CertificateMap string `json:"certificateMap,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetSslProxy for - // target SSL proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - // SslCertificates: URLs to SslCertificate resources that are used - // to - // authenticate connections to Backends. At least one SSL certificate - // must be specified. Currently, you may specify up to 15 SSL - // certificates. - // sslCertificates do not apply when the load balancing scheme is set - // to - // INTERNAL_SELF_MANAGED. - SslCertificates []string `json:"sslCertificates,omitempty"` - // SslPolicy: URL of SslPolicy resource that will be associated with the - // TargetSslProxy - // resource. If not set, the TargetSslProxy resource will not have any - // SSL policy configured. - SslPolicy string `json:"sslPolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CertificateMap") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CertificateMap") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyList: Contains a list of TargetSslProxy resources. -type TargetSslProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetSslProxy resources. - Items []*TargetSslProxy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetSslProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetSslProxyListWarning: [Output Only] Informational warning message. -type TargetSslProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetSslProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetSslProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetSslProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetSslProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesScopedList struct { - // TargetTcpProxies: A list of TargetTcpProxies contained in this scope. - TargetTcpProxies []*TargetTcpProxy `json:"targetTcpProxies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *TargetTcpProxiesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetTcpProxies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetTcpProxies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxiesScopedListWarning: Informational warning which replaces the -// list of -// backend services when the list is empty. -type TargetTcpProxiesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxiesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetBackendServiceRequest struct { - // Service: The URL of the new BackendService resource for the targetTcpProxy. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Service") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Service") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetBackendServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxiesSetProxyHeaderRequest struct { - // ProxyHeader: The new type of proxy header to append before sending data to - // the - // backend. NONE or PROXY_V1 are allowed. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProxyHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProxyHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxiesSetProxyHeaderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxy: Represents a Target TCP Proxy resource. -// -// A target TCP proxy is a component of a Proxy Network Load Balancer. -// The forwarding rule references the target TCP proxy, and the target -// proxy -// then references a backend service. For more information, readProxy -// Network -// Load Balancer overview. -type TargetTcpProxy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#targetTcpProxy for - // target TCP proxies. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // ProxyBind: This field only applies when the forwarding rule that references - // this - // target proxy has a loadBalancingScheme set toINTERNAL_SELF_MANAGED. - // - // When this field is set to true, Envoy proxies set up inbound - // traffic interception and bind to the IP address and port specified in - // the - // forwarding rule. This is generally useful when using Traffic Director - // to - // configure Envoy as a gateway or middle proxy (in other words, not a - // sidecar proxy). The Envoy proxy listens for inbound requests and - // handles - // requests when it receives them. - // - // The default is false. - ProxyBind bool `json:"proxyBind,omitempty"` - // ProxyHeader: Specifies the type of proxy header to append before sending - // data to the - // backend, either NONE or PROXY_V1. The default - // is NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - // Region: [Output Only] URL of the region where the regional TCP proxy - // resides. - // This field is not applicable to global TCP proxy. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Service: URL to the BackendService resource. - Service string `json:"service,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxy) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxiesScopedList resources. - Items map[string]TargetTcpProxiesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#targetTcpProxyAggregatedList for lists of Target - // TCP Proxies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetTcpProxyAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxyAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyList: Contains a list of TargetTcpProxy resources. -type TargetTcpProxyList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetTcpProxy resources. - Items []*TargetTcpProxy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetTcpProxyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyList) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetTcpProxyListWarning: [Output Only] Informational warning message. -type TargetTcpProxyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetTcpProxyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetTcpProxyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetTcpProxyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGateway: Represents a Target VPN Gateway resource. -// -// The target VPN gateway resource represents a Classic Cloud VPN gateway. -// For more information, read thethe -// Cloud VPN Overview. -type TargetVpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // ForwardingRules: [Output Only] A list of URLs to the ForwardingRule - // resources. - // ForwardingRules are created usingcompute.forwardingRules.insert and - // associated with a VPN - // gateway. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // TargetVpnGateway, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a TargetVpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: URL of the network to which this VPN gateway is attached. Provided - // by the - // client when the VPN gateway is created. - Network string `json:"network,omitempty"` - // Region: [Output Only] URL of the region where the target VPN gateway - // resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] The status of the VPN gateway, - // which can be one of the following: CREATING, READY, FAILED, or DELETING. - // - // Possible values: - // "CREATING" - // "DELETING" - // "FAILED" - // "READY" - Status string `json:"status,omitempty"` - // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels - // are - // created using the compute.vpntunnels.insert method and - // associated with a VPN gateway. - Tunnels []string `json:"tunnels,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetVpnGateway resources. - Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayAggregatedListWarning: [Output Only] Informational warning -// message. -type TargetVpnGatewayAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewayAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. -type TargetVpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of TargetVpnGateway resources. - Items []*TargetVpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Alwayscompute#targetVpnGateway for - // target VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *TargetVpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewayListWarning: [Output Only] Informational warning message. -type TargetVpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedList struct { - // TargetVpnGateways: [Output Only] A list of target VPN gateways contained in - // this scope. - TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetVpnGateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetVpnGateways") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TargetVpnGatewaysScopedListWarning: [Output Only] Informational warning -// which replaces the list of addresses -// when the list is empty. -type TargetVpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TargetVpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod TargetVpnGatewaysScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestFailure struct { - // ActualOutputUrl: The actual output URL evaluated by a load balancer - // containing the scheme, - // host, path and query parameters. - ActualOutputUrl string `json:"actualOutputUrl,omitempty"` - // ActualRedirectResponseCode: Actual HTTP status code for rule with - // `urlRedirect` - // calculated by load balancer - ActualRedirectResponseCode int64 `json:"actualRedirectResponseCode,omitempty"` - // ActualService: BackendService or BackendBucket returned by load - // balancer. - ActualService string `json:"actualService,omitempty"` - // ExpectedOutputUrl: The expected output URL evaluated by a load balancer - // containing the scheme, - // host, path and query parameters. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - // ExpectedRedirectResponseCode: Expected HTTP status code for rule with - // `urlRedirect` - // calculated by load balancer - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - // ExpectedService: Expected BackendService or BackendBucket resource - // the given URL should be mapped to. - ExpectedService string `json:"expectedService,omitempty"` - // Headers: HTTP headers of the request. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - // Host: Host portion of the URL. - Host string `json:"host,omitempty"` - // Path: Path portion including query parameters in the URL. - Path string `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActualOutputUrl") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActualOutputUrl") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestFailure) MarshalJSON() ([]byte, error) { - type NoMethod TestFailure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestPermissionsRequest struct { - // Permissions: The set of permissions to check for the 'resource'. Permissions - // with - // wildcards (such as '*' or 'storage.*') are not allowed. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestPermissionsResponse 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestPermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Uint128 struct { - High uint64 `json:"high,omitempty,string"` - Low uint64 `json:"low,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "High") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "High") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Uint128) MarshalJSON() ([]byte, error) { - type NoMethod Uint128 - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpcomingMaintenance: Upcoming Maintenance notification information. -type UpcomingMaintenance struct { - // CanReschedule: Indicates if the maintenance can be customer triggered. - CanReschedule bool `json:"canReschedule,omitempty"` - // LatestWindowStartTime: The latest time for the planned maintenance window to - // start. - // This timestamp value is in RFC3339 text format. - LatestWindowStartTime string `json:"latestWindowStartTime,omitempty"` - // MaintenanceOnShutdown: Indicates whether the UpcomingMaintenance will be - // triggered on VM shutdown. - MaintenanceOnShutdown bool `json:"maintenanceOnShutdown,omitempty"` - // MaintenanceReasons: The reasons for the maintenance. Only valid for vms. - // - // Possible values: - // "FAILURE_DISK" - Maintenance due to disk errors. - // "FAILURE_GPU" - Maintenance due to GPU errors. - // "FAILURE_GPU_MULTIPLE_FAULTY_HOSTS_CUSTOMER_REPORTED" - Maintenance due to - // customer reported multiple faulty hosts via R&R - // Subblock API. - // "FAILURE_GPU_NVLINK_SWITCH_CUSTOMER_REPORTED" - Maintenance due to - // customer reported NVLink switch failure via R&R - // Subblock API. - // "FAILURE_GPU_TEMPERATURE" - Maintenance due to high GPU temperature. - // "FAILURE_GPU_XID" - Maintenance due to GPU xid failure. - // "FAILURE_INFRA" - Maintenance due to infrastructure errors. - // "FAILURE_INTERFACE" - Maintenance due to interface errors. - // "FAILURE_MEMORY" - Maintenance due to memory errors. - // "FAILURE_NETWORK" - Maintenance due to network errors. - // "FAILURE_NVLINK" - Maintenance due to NVLink failure. - // "FAILURE_REDUNDANT_HARDWARE_FAULT" - Maintenance due to redundant hardware - // fault. - // "FAILURE_TPU" - Maintenance due to TPU errors. - // "INFRASTRUCTURE_RELOCATION" - Maintenance due to infrastructure - // relocation. - // "MAINTENANCE_REASON_UNKNOWN" - Unknown maintenance reason. Do not use this - // value. - // "PLANNED_NETWORK_UPDATE" - Maintenance due to planned network update. - // "PLANNED_UPDATE" - Maintenance due to planned update to the instance. - MaintenanceReasons []string `json:"maintenanceReasons,omitempty"` - // Possible values: - // "ONGOING" - There is ongoing maintenance on this VM. - // "PENDING" - There is pending maintenance. - // "UNKNOWN" - Unknown maintenance status. Do not use this value. - MaintenanceStatus string `json:"maintenanceStatus,omitempty"` - // Type: Defines the type of maintenance. - // - // Possible values: - // "MULTIPLE" - Multiple maintenance types in one window. - // This is only intended to be used for groups. - // "SCHEDULED" - Scheduled maintenance (e.g. maintenance after uptime - // guarantee is - // complete). - // "UNKNOWN_TYPE" - No type specified. Do not use this value. - // "UNSCHEDULED" - Unscheduled maintenance (e.g. emergency maintenance - // during - // uptime guarantee). - Type string `json:"type,omitempty"` - // WindowEndTime: The time by which the maintenance disruption will be - // completed. - // This timestamp value is in RFC3339 text format. - WindowEndTime string `json:"windowEndTime,omitempty"` - // WindowStartTime: The current start time of the maintenance window. - // This timestamp value is in RFC3339 text format. - WindowStartTime string `json:"windowStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanReschedule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanReschedule") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpcomingMaintenance) MarshalJSON() ([]byte, error) { - type NoMethod UpcomingMaintenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMap: Represents a URL Map resource. -// -// Compute Engine has two URL Map resources: -// -// * Global (/compute/docs/reference/rest/beta/urlMaps) -// * Regional (/compute/docs/reference/rest/beta/regionUrlMaps) -// -// A URL map resource is a component of certain types of cloud load -// balancers -// and Traffic Director: -// -// * urlMaps are used by global external Application Load -// Balancers, classic Application Load Balancers, and cross-region -// internal -// Application Load Balancers. -// * regionUrlMaps are used by internal Application Load Balancers, -// regional external Application Load Balancers and regional -// internal -// Application Load Balancers. -// -// For a list of supported URL map features by the load balancer type, see -// the -// Load balancing features: Routing and traffic management table. -// -// For a list of supported URL map features for Traffic Director, see -// the -// Traffic Director features: Routing and traffic management table. -// -// This resource defines mappings from hostnames and URL paths to either -// a -// backend service or a backend bucket. -// -// To use the global urlMaps resource, the backend service must -// have a loadBalancingScheme of either EXTERNAL,EXTERNAL_MANAGED, or -// INTERNAL_SELF_MANAGED. To use -// the regionUrlMaps resource, the backend service must have -// aloadBalancingScheme of INTERNAL_MANAGED. For more -// information, read URL -// Map Concepts. -type UrlMap struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy specifies - // how the Load - // Balancer returns error responses when BackendServiceorBackendBucket responds - // with an error. - // - // This policy takes - // effect at the load balancer level and applies only when no policy has - // been - // defined for the error code at lower levels like PathMatcher, RouteRule - // and - // PathRule within this UrlMap. - // - // For example, consider a UrlMap with the - // following configuration: - // - // - // - defaultCustomErrorResponsePolicy containing policies for - // responding to 5xx and 4xx errors - // - A PathMatcher configured for *.example.com has - // defaultCustomErrorResponsePolicy for 4xx. - // - // If a request for http://www.example.com/ encounters a404, the policy - // inpathMatcher.defaultCustomErrorResponsePolicy will be enforced. - // When the request for http://www.example.com/ encounters a502, the policy - // inUrlMap.defaultCustomErrorResponsePolicy will be enforced. When - // a request that does not match any host in *.example.com such - // as http://www.myotherexample.com/, encounters a404, - // UrlMap.defaultCustomErrorResponsePolicy - // takes effect. - // - // When used in conjunction withdefaultRouteAction.retryPolicy, retries take - // precedence. Only - // once all retries are exhausted, thedefaultCustomErrorResponsePolicy is - // applied. While attempting - // a retry, if load balancer is successful in reaching the - // service, the defaultCustomErrorResponsePolicy is ignored and - // the response from the service is returned to the - // client. - // - // defaultCustomErrorResponsePolicy is supported only for - // global external Application Load Balancers. - DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` - // DefaultRouteAction: defaultRouteAction takes effect when none of the - // - // hostRules match. The load balancer performs advanced routing - // actions, such as URL rewrites and header transformations, before - // forwarding - // the request to the selected backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // URL maps for classic Application Load Balancers only support - // the urlRewrite action within defaultRouteAction. - // - // - // defaultRouteAction has no effect when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` - // DefaultService: The full or partial URL of the defaultService resource - // to - // which traffic is directed if none of the hostRules match. - // If defaultRouteAction is also specified, advanced - // routing actions, such as URL rewrites, take effect before sending - // the - // request to the backend. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // defaultService has no effect when the URL map is bound - // to a target gRPC proxy that has the validateForProxyless field - // set to true. - DefaultService string `json:"defaultService,omitempty"` - // DefaultUrlRedirect: When none of the specified hostRules match, the - // request - // is redirected to a URL specified by defaultUrlRedirect. - // - // - // Only one of defaultUrlRedirect, defaultService - // or defaultRouteAction.weightedBackendService can be set. - // - // - // Not supported when the URL map is bound to a target gRPC proxy. - DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // Fingerprint: Fingerprint of this resource. A hash of the contents stored in - // this object. - // This field is used in optimistic locking. This field is ignored - // when - // inserting a UrlMap. An up-to-date fingerprint must be provided - // in order to update the UrlMap, otherwise the request will - // fail with error 412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a UrlMap. - Fingerprint string `json:"fingerprint,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take effect - // for the selected backendService. - // - // The headerAction specified here take effect afterheaderAction specified - // under pathMatcher. - // - // headerAction is not supported for load balancers - // that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // HostRules: The list of host rules to use against the URL. - HostRules []*HostRule `json:"hostRules,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#urlMaps for - // url maps. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PathMatchers: The list of named PathMatchers to use against the URL. - PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` - // Region: [Output Only] URL of the region where the regional URL map - // resides. - // This field is not applicable to global URL maps. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Tests: The list of expected URL mapping tests. Request to update theUrlMap - // succeeds only if all test cases pass. You can specify a - // maximum of 100 tests per UrlMap. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - Tests []*UrlMapTest `json:"tests,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMap) MarshalJSON() ([]byte, error) { - type NoMethod UrlMap - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapList: Contains a list of UrlMap resources. -type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of UrlMap resources. - Items []*UrlMap `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UrlMapListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapListWarning: [Output Only] Informational warning message. -type UrlMapListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapReference struct { - UrlMap string `json:"urlMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "UrlMap") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UrlMap") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapReference) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapReference - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapTest: Message for the expected URL mappings. -type UrlMapTest struct { - // Description: Description of this test case. - Description string `json:"description,omitempty"` - // ExpectedOutputUrl: The expected output URL evaluated by the load - // balancer - // containing the scheme, host, path and query parameters. - // - // For rules that forward requests to backends, the test passes only - // whenexpectedOutputUrl matches the request forwarded by - // the load balancer to backends. For rules with urlRewrite, - // the test verifies that the forwarded request matcheshostRewrite and - // pathPrefixRewrite in theurlRewrite action. When service is - // specified,expectedOutputUrl`s scheme is ignored. - // - // For rules with urlRedirect, the test passes only ifexpectedOutputUrl matches - // the URL in the load balancer's - // redirect response. If urlRedirect specifieshttps_redirect, the test passes - // only if the scheme inexpectedOutputUrl is also set to HTTPS. - // If urlRedirect specifies strip_query, the test - // passes only if expectedOutputUrl does not contain any query - // parameters. - // - // expectedOutputUrl is optional whenservice is specified. - ExpectedOutputUrl string `json:"expectedOutputUrl,omitempty"` - // ExpectedRedirectResponseCode: For rules with urlRedirect, the test passes - // only ifexpectedRedirectResponseCode matches the HTTP status code in - // load balancer's redirect response. - // - // expectedRedirectResponseCode cannot be set whenservice is set. - ExpectedRedirectResponseCode int64 `json:"expectedRedirectResponseCode,omitempty"` - // Headers: HTTP headers for this request. If headers contains - // a host header, then host must also match the header value. - Headers []*UrlMapTestHeader `json:"headers,omitempty"` - // Host: Host portion of the URL. If headers contains a host header, - // then host must also match the header value. - Host string `json:"host,omitempty"` - // Path: Path portion of the URL. - Path string `json:"path,omitempty"` - // Service: Expected BackendService or BackendBucket resource - // the given URL should be mapped to. - // - // The service field cannot - // be set if expectedRedirectResponseCode is set. - Service string `json:"service,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapTest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapTestHeader: HTTP headers used in UrlMapTests. -type UrlMapTestHeader struct { - // Name: Header name. - Name string `json:"name,omitempty"` - // Value: Header value. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapTestHeader) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapTestHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapValidationResult: Message representing the validation result for a -// UrlMap. -type UrlMapValidationResult struct { - LoadErrors []string `json:"loadErrors,omitempty"` - // LoadSucceeded: Whether the given UrlMap can be successfully loaded. - // If false, 'loadErrors' indicates the reasons. - LoadSucceeded bool `json:"loadSucceeded,omitempty"` - TestFailures []*TestFailure `json:"testFailures,omitempty"` - // TestPassed: If successfully loaded, this field indicates whether the test - // passed. - // If false, 'testFailures's indicate the reason of failure. - TestPassed bool `json:"testPassed,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoadErrors") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LoadErrors") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapValidationResult) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapValidationResult - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of UrlMapsScopedList resources. - Items map[string]UrlMapsScopedList `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UrlMapsAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapsAggregatedListWarning: [Output Only] Informational warning message. -type UrlMapsAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapsAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsScopedList struct { - // UrlMaps: A list of UrlMaps contained in this scope. - UrlMaps []*UrlMap `json:"urlMaps,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *UrlMapsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "UrlMaps") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UrlMaps") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlMapsScopedListWarning: Informational warning which replaces the list -// of -// backend services when the list is empty. -type UrlMapsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UrlMapsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateRequest struct { - // LoadBalancingSchemes: Specifies the load balancer type(s) this validation - // request is for. UseEXTERNAL_MANAGED for global external Application - // Load - // Balancers and regional external Application Load Balancers. - // Use EXTERNAL for classic Application Load Balancers. - // - // Use INTERNAL_MANAGED for internal Application Load Balancers. For - // more - // information, refer to Choosing - // a load balancer. - // - // If unspecified, the load balancing scheme will be inferred from the - // backend - // service resources this URL map references. If that can not be inferred - // (for - // example, this URL map only references backend buckets, or this Url map - // is - // for rewrites and redirects only and doesn't reference any backends),EXTERNAL - // will be used as the default type. - // - // If specified, the scheme(s) must not conflict with the load balancing - // scheme of the backend service resources this Url map references. - // - // Possible values: - // "EXTERNAL" - Signifies that this will be used for classic Application Load - // Balancers. - // "EXTERNAL_MANAGED" - Signifies that this will be used for Envoy-based - // global external - // Application Load Balancers. - // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - If unspecified, the validation will - // try to infer the scheme from the - // backend service resources this Url map references. If the inference is - // not - // possible, EXTERNAL will be used as the default type. - LoadBalancingSchemes []string `json:"loadBalancingSchemes,omitempty"` - // Resource: Content of the UrlMap to be validated. - Resource *UrlMap `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoadBalancingSchemes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LoadBalancingSchemes") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsValidateRequest) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UrlMapsValidateResponse struct { - Result *UrlMapValidationResult `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { - type NoMethod UrlMapsValidateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlRewrite: The spec for modifying the path before sending the request to -// the matched -// backend service. -type UrlRewrite struct { - // HostRewrite: Before forwarding the request to the selected service, the - // request's - // host header is replaced with contents of hostRewrite. - // - // The value must be from 1 to 255 characters. - HostRewrite string `json:"hostRewrite,omitempty"` - // PathPrefixRewrite: Before forwarding the request to the selected backend - // service, the - // matching portion of the request's path is replaced bypathPrefixRewrite. - // - // The value must be from 1 to 1024 characters. - PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` - // PathTemplateRewrite: If specified, the pattern rewrites the URL path (based - // on the :path - // header) using the HTTP template syntax. - // - // A corresponding - // path_template_match must be specified. Any template variables must exist - // in - // the path_template_match field. - // - // - // - -At least one variable must be specified in the path_template_match - // field - // - You can omit variables from the rewritten URL - // - The * and ** operators cannot be matched - // unless they have a corresponding variable name - e.g. - // {format=*} or {var=**}. - // - // For example, a path_template_match of /static/{format=**} - // could be rewritten as /static/content/{format} to prefix/content to the URL. - // Variables can also be re-ordered in a - // rewrite, so that /{country}/{format}/{suffix=**} can be - // rewritten as /content/{format}/{country}/{suffix}. - // - // At least - // one non-empty routeRules[].matchRules[].path_template_match is - // required. - // - // Only one of path_prefix_rewrite orpath_template_rewrite may be specified. - PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRewrite") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRewrite") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UrlRewrite) MarshalJSON() ([]byte, error) { - type NoMethod UrlRewrite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetwork: Subnetwork which the current user has -// compute.subnetworks.use permission on. -type UsableSubnetwork struct { - // ExternalIpv6Prefix: [Output Only] The external IPv6 address range that is - // assigned to this - // subnetwork. - ExternalIpv6Prefix string `json:"externalIpv6Prefix,omitempty"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range that is - // assigned to this - // subnetwork. - InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Ipv6AccessType: The access type of IPv6 address this subnet holds. It's - // immutable and can - // only be specified during creation or the first time the subnet is - // updated - // into IPV4_IPV6 dual stack. - // - // Possible values: - // "EXTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // accessible - // via the Internet, as well as the VPC network. - // "INTERNAL" - VMs on this subnet will be assigned IPv6 addresses that are - // only - // accessible over the VPC network. - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // Network: Network URL. - Network string `json:"network,omitempty"` - // Possible values: - // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based Load - // Balancing. - // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load - // Balancing. This is a legacy - // purpose, please use REGIONAL_MANAGED_PROXY instead. - // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered - // VPC to another. - // (a transient state of subnetwork - // while migrating resources from one project to another). - // "PRIVATE" - Regular user created or automatically created subnet. - // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT Gateways. - // "PRIVATE_RFC_1918" - Regular user created or automatically created subnet. - // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service - // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based Load - // Balancing. - Purpose string `json:"purpose,omitempty"` - // Role: The role of subnetwork. Currently, this field is only used - // when - // purpose is set to GLOBAL_MANAGED_PROXY orREGIONAL_MANAGED_PROXY. The value - // can be set toACTIVE or BACKUP. An ACTIVE - // subnetwork is one that is currently being used for Envoy-based - // load - // balancers in a region. A BACKUP subnetwork is one that is - // ready to be promoted to ACTIVE or is currently draining. - // This field can be updated with a patch request. - // - // Possible values: - // "ACTIVE" - The ACTIVE subnet that is currently used. - // "BACKUP" - The BACKUP subnet that could be promoted to ACTIVE. - Role string `json:"role,omitempty"` - // SecondaryIpRanges: Secondary IP ranges. - SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs - // in the subnet are assigned IPv4 addresses only. If set toIPV4_IPV6, new VMs - // in the subnet can be assigned both IPv4 and - // IPv6 addresses. If not specified, IPV4_ONLY is used. - // - // This field can be both set at resource creation time and updated usingpatch. - // - // Possible values: - // "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6 - // addresses. - // "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses. - // "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses. - StackType string `json:"stackType,omitempty"` - // Subnetwork: Subnetwork URL. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIpv6Prefix") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIpv6Prefix") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetwork) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetworkSecondaryRange: Secondary IP range of a usable subnetwork. -type UsableSubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, used - // when adding - // an alias IP range to a VM instance. - // The name must be 1-63 characters long, and comply withRFC1035. - // The name must be unique within the subnetwork. - RangeName string `json:"rangeName,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworkSecondaryRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UsableSubnetworksAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output] A list of usable subnetwork URLs. - Items []*UsableSubnetwork `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#usableSubnetworksAggregatedList for aggregated lists - // of usable subnetworks. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - // In special cases listUsable may return 0 subnetworks andnextPageToken which - // still should be used to get the - // next page of results. - NextPageToken string `json:"nextPageToken,omitempty"` - // ScopedWarnings: [Output Only] Informational warning messages for failures - // encountered from - // scopes. - ScopedWarnings []*SubnetworksScopedWarning `json:"scopedWarnings,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *UsableSubnetworksAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetworksAggregatedListWarning: [Output Only] Informational warning -// message. -type UsableSubnetworksAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*UsableSubnetworksAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UsableSubnetworksAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworksAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsageExportLocation: The location in Cloud Storage and naming method of the -// daily usage -// report. Contains bucket_name and report_name prefix. -type UsageExportLocation struct { - // BucketName: The name of an existing bucket in Cloud Storage where the usage - // report - // object is stored. The Google Service Account is granted write access to - // this bucket. This can either be the bucket name by itself, such - // asexample-bucket, or the bucket name with gs:// - // or https://storage.googleapis.com/ in front of it, such - // as gs://example-bucket. - BucketName string `json:"bucketName,omitempty"` - // ReportNamePrefix: An optional prefix for the name of the usage report object - // stored inbucketName. If not supplied, defaults tousage_gce. The report is - // stored as a CSV file namedreport_name_prefix_gce_YYYYMMDD.csv whereYYYYMMDD - // is the day of the usage according to Pacific Time. - // If you supply a prefix, it should conform to Cloud Storageobject - // naming - // conventions. - ReportNamePrefix string `json:"reportNamePrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsageExportLocation) MarshalJSON() ([]byte, error) { - type NoMethod UsageExportLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappings: Contain information of Nat mapping for a VM endpoint -// (i.e., NIC). -type VmEndpointNatMappings struct { - // InstanceName: Name of the VM instance which the endpoint belongs to - InstanceName string `json:"instanceName,omitempty"` - InterfaceNatMappings []*VmEndpointNatMappingsInterfaceNatMappings `json:"interfaceNatMappings,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat -// mapping for an interface of this endpoint. -type VmEndpointNatMappingsInterfaceNatMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings assigned to - // this interface. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - // NatIpPortRanges: A list of all IP:port-range mappings assigned to this - // interface. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this - // interface. It equals to the aggregated port number in the - // field - // drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated to this - // interface. - // It equals to the aggregated port number in the field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - // RuleMappings: Information about mappings provided by rules in this NAT. - RuleMappings []*VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings `json:"ruleMappings,omitempty"` - // SourceAliasIpRange: Alias IP range for this interface endpoint. - // It will be a private (RFC 1918) IP range. - // Examples: "10.33.4.55/32", or "192.168.5.0/24". - SourceAliasIpRange string `json:"sourceAliasIpRange,omitempty"` - // SourceVirtualIp: Primary IP of the VM for this NIC. - SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainNatIpPortRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsInterfaceNatMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings: Contains -// information of NAT Mappings provided by a NAT Rule. -type VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings struct { - // DrainNatIpPortRanges: List of all drain IP:port-range mappings assigned to - // this interface - // by this rule. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` - // NatIpPortRanges: A list of all IP:port-range mappings assigned to this - // interface by this - // rule. - // These ranges are inclusive, that is, both the first and the last - // ports can be used for NAT. Example: - // ["2.2.2.2:12345-12355", - // "1.1.1.1:2234-2234"]. - NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` - // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs - // allocated to this - // interface by this rule. - // It equals the aggregated port number in the field - // drain_nat_ip_port_ranges. - NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` - // NumTotalNatPorts: Total number of ports across all NAT IPs allocated to this - // interface - // by this rule. - // It equals the aggregated port number in the field nat_ip_port_ranges. - NumTotalNatPorts int64 `json:"numTotalNatPorts,omitempty"` - // RuleNumber: Rule number of the NAT Rule. - RuleNumber int64 `json:"ruleNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "DrainNatIpPortRanges") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsList: Contains a list of VmEndpointNatMappings. -type VmEndpointNatMappingsList struct { - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id string `json:"id,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#vmEndpointNatMappingsList for lists of Nat mappings of - // VM endpoints. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // Result: [Output Only] A list of Nat mapping information of VM endpoints. - Result []*VmEndpointNatMappings `json:"result,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmEndpointNatMappingsListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsList) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmEndpointNatMappingsListWarning: [Output Only] Informational warning -// message. -type VmEndpointNatMappingsListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmEndpointNatMappingsListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmEndpointNatMappingsListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmEndpointNatMappingsListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPoliciesScopedList struct { - // VmExtensionPolicies: List of VmExtensionPolicy resources contained in this - // scope. - VmExtensionPolicies []*VmExtensionPolicy `json:"vmExtensionPolicies,omitempty"` - // Warning: Informational warning which replaces the list of - // backend services when the list is empty. - Warning *VmExtensionPoliciesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VmExtensionPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VmExtensionPolicies") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPoliciesScopedListWarning: Informational warning which replaces -// the list of -// backend services when the list is empty. -type VmExtensionPoliciesScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPoliciesScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPoliciesScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPoliciesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPoliciesScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicy: Represents a VM extension policy. -type VmExtensionPolicy struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. - Description string `json:"description,omitempty"` - // ExtensionPolicies: Required. A map of extension names (e.g., "cloudops") to - // their corresponding policy - // configurations. - ExtensionPolicies map[string]VmExtensionPolicyExtensionPolicy `json:"extensionPolicies,omitempty"` - // GlobalResourceLink: Optional. [Output Only] Link to the global policy that - // manages this zone policy, if - // applicable. - GlobalResourceLink string `json:"globalResourceLink,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // InstanceSelectors: Optional. Selectors to target VMs for this policy. VMs - // are selected if they match - // *any* of the provided selectors (logical OR). If this list is empty, - // the - // policy applies to all VMs. - InstanceSelectors []*VmExtensionPolicyInstanceSelector `json:"instanceSelectors,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy. - Kind string `json:"kind,omitempty"` - // ManagedByGlobal: Optional. [Output Only] Indicates if this policy is managed - // by a global policy. - ManagedByGlobal bool `json:"managedByGlobal,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` - // which means the first character must be a lowercase letter, and - // all - // following characters must be a dash, lowercase letter, or digit, except - // the last character, which cannot be a dash. - Name string `json:"name,omitempty"` - // Priority: Optional. Priority of this policy. Used to resolve conflicts when - // multiple policies - // apply to the same extension. - // The policy priority is an integer from 0 to 65535, inclusive. Lower - // integers indicate higher priorities. If you do not specify a priority - // when - // creating a rule, it is assigned a priority of 1000. If priorities are - // equal, the policy with the more recent creation timestamp takes precedence. - Priority int64 `json:"priority,omitempty"` - // SelfLink: [Output Only] Server-defined fully-qualified URL for this - // resource. - SelfLink string `json:"selfLink,omitempty"` - // SelfLinkWithId: [Output Only] Server-defined URL for this resource's - // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // State: Optional. [Output Only] Current state of the policy: ACTIVE or - // DELETING. - // - // Possible values: - // "ACTIVE" - The policy is active and applied to matching VMs. - // Newly created VMs that match the policy will also receive the - // extension policy. - // "DELETING" - The policy is in the process of being deleted. After the - // extension is - // removed from all matching VMs, the policy will be deleted. - // "STATE_UNSPECIFIED" - Default value. Do not use. - State string `json:"state,omitempty"` - // UpdateTimestamp: [Output Only] Update timestamp inRFC3339 - // text format. - UpdateTimestamp string `json:"updateTimestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyAggregatedListResponse: Response for the aggregated list of -// VM extension policies. -type VmExtensionPolicyAggregatedListResponse struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VmExtensionPoliciesScopedList resources. - Items map[string]VmExtensionPoliciesScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. - // Alwayscompute#VmExtensionPolicyAggregatedList for lists - // of - // VmExtensionPolicies. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmExtensionPolicyAggregatedListResponseWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponse) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyAggregatedListResponseWarning: [Output Only] Informational -// warning message. -type VmExtensionPolicyAggregatedListResponseWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPolicyAggregatedListResponseWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponseWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponseWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyAggregatedListResponseWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyAggregatedListResponseWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyAggregatedListResponseWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyExtensionPolicy: Configuration for a specific VM extension. -type VmExtensionPolicyExtensionPolicy struct { - // PinnedVersion: Optional. The specific version of the extension to install. - // If not set, the latest - // version is used. - PinnedVersion string `json:"pinnedVersion,omitempty"` - // StringConfig: Optional. String-based configuration data for the extension. - StringConfig string `json:"stringConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PinnedVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PinnedVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyExtensionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyExtensionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyInstanceSelector: Defines how to select VMs to apply a zone -// VM extension policy. -type VmExtensionPolicyInstanceSelector struct { - // LabelSelector: Optional. LabelSelector selects VMs based on their labels. - LabelSelector *VmExtensionPolicyLabelSelector `json:"labelSelector,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelSelector") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelSelector") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyInstanceSelector) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyInstanceSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyLabelSelector: A LabelSelector is applied to a VM only if -// it matches all the specified -// labels. -type VmExtensionPolicyLabelSelector struct { - // InclusionLabels: Optional. A map of key-value pairs representing VM - // labels. - // VMs must have all of the labels specified in this map to be - // selected - // (logical AND). - // - // e.g. If the `inclusion_labels` are {("key1", "value1"), ("key2", - // "value2")}, the VM labels must contain both ("key1", "value1") and - // ("key2", "value2") to be selected. If the VM labels are ("key1", - // "value1") and ("something", "else"), it will not be selected. - // - // If the map is empty, it's considered a match. - InclusionLabels map[string]string `json:"inclusionLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "InclusionLabels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InclusionLabels") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyLabelSelector) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyLabelSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyList struct { - // Etag: [Output Only] Fingerprint of this resource. A hash of the contents - // stored - // in this object. This field is used in optimistic locking. This field will - // be ignored when inserting a VmExtensionPolicy. An up-to-date - // fingerprint must be provided in order to update the VmExtensionPolicy. - // - // To see the latest value of the fingerprint, make a get() request to - // retrieve a VmExtensionPolicy. - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of VM extension policy resources. - Items []*VmExtensionPolicy `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VmExtensionPolicyListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyList) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VmExtensionPolicyListWarning: [Output Only] Informational warning message. -type VmExtensionPolicyListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VmExtensionPolicyListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VmExtensionPolicyListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VmExtensionPolicyListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VmExtensionPolicyListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGateway: Represents a HA VPN gateway. -// -// HA VPN is a high-availability (HA) Cloud VPN solution that lets you -// securely -// connect your on-premises network to your Google Cloud Virtual Private -// Cloud -// network through an IPsec VPN connection in a single region. -// For more information about Cloud HA VPN solutions, see -// Cloud VPN topologies . -type VpnGateway struct { - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // GatewayIpVersion: The IP family of the gateway IPs for the HA-VPN gateway - // interfaces. If not - // specified, IPV4 will be used. - // - // Possible values: - // "IPV4" - Every HA-VPN gateway interface is configured with an IPv4 - // address. - // "IPV6" - Every HA-VPN gateway interface is configured with an IPv6 - // address. - GatewayIpVersion string `json:"gatewayIpVersion,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnGateway, which - // is essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a VpnGateway. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Network: URL of the network to which this VPN gateway is attached. Provided - // by the - // client when the VPN gateway is created. - Network string `json:"network,omitempty"` - // Region: [Output Only] URL of the region where the VPN gateway resides. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // StackType: The stack type for this VPN gateway to identify the IP protocols - // that are - // enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not - // specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 - // if the gateway IP version isIPV6. - // - // Possible values: - // "IPV4_IPV6" - Enable VPN gateway with both IPv4 and IPv6 protocols. - // "IPV4_ONLY" - Enable VPN gateway with only IPv4 protocol. - // "IPV6_ONLY" - Enable VPN gateway with only IPv6 protocol. - StackType string `json:"stackType,omitempty"` - // VpnInterfaces: The list of VPN interfaces associated with this VPN gateway. - VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGateway) MarshalJSON() ([]byte, error) { - type NoMethod VpnGateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnGateway resources. - Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayAggregatedListWarning: [Output Only] Informational warning -// message. -type VpnGatewayAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayList: Contains a list of VpnGateway resources. -type VpnGatewayList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnGateway resources. - Items []*VpnGateway `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnGateway for - // VPN gateways. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnGatewayListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayListWarning: [Output Only] Informational warning message. -type VpnGatewayListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewayListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewayStatus struct { - // VpnConnections: List of VPN connection for this VpnGateway. - VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnConnections") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnConnections") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatus) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high -// availability requirement state for the VPN connection -// between this Cloud VPN gateway and a peer gateway. -type VpnGatewayStatusHighAvailabilityRequirementState struct { - // State: Indicates the high availability requirement state for the VPN - // connection. - // Valid values are CONNECTION_REDUNDANCY_MET,CONNECTION_REDUNDANCY_NOT_MET. - // - // Possible values: - // "CONNECTION_REDUNDANCY_MET" - VPN tunnels are configured with adequate - // redundancy from Cloud VPN - // gateway to the peer VPN gateway. For both GCP-to-non-GCP and - // GCP-to-GCP - // connections, the adequate redundancy is a pre-requirement for users to - // get 99.99% availability on GCP side; please note that for any - // connection, end-to-end 99.99% availability is subject to - // proper - // configuration on the peer VPN gateway. - // "CONNECTION_REDUNDANCY_NOT_MET" - VPN tunnels are not configured with - // adequate redundancy from the Cloud - // VPN gateway to the peer gateway - State string `json:"state,omitempty"` - // UnsatisfiedReason: Indicates the reason why the VPN connection does not meet - // the high - // availability redundancy criteria/requirement. - // Valid values is INCOMPLETE_TUNNELS_COVERAGE. - // - // Possible values: - // "INCOMPLETE_TUNNELS_COVERAGE" - UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusHighAvailabilityRequirementState - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. -type VpnGatewayStatusTunnel struct { - // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is - // associated with. - LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` - // PeerGatewayInterface: The peer gateway interface this VPN tunnel is - // connected to, the peer - // gateway could either be an external VPN gateway or a Google Cloud - // VPN gateway. - PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` - // TunnelUrl: URL reference to the VPN tunnel. - TunnelUrl string `json:"tunnelUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocalGatewayInterface") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalGatewayInterface") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusTunnel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN tunnels -// connected from this VpnGateway -// to the same peer gateway. The peer gateway could either be an external -// VPN -// gateway or a Google Cloud VPN gateway. -type VpnGatewayStatusVpnConnection struct { - // PeerExternalGateway: URL reference to the peer external VPN gateways to - // which the VPN tunnels - // in this VPN connection are connected. - // This field is mutually exclusive with peer_gcp_gateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` - // PeerGcpGateway: URL reference to the peer side VPN gateways to which the VPN - // tunnels in - // this VPN connection are connected. - // This field is mutually exclusive with peer_gcp_gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // State: HighAvailabilityRequirementState for the VPN connection. - State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` - // Tunnels: List of VPN tunnels that are in this VPN connection. - Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` - // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PeerExternalGateway") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayStatusVpnConnection - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewayVpnGatewayInterface: A VPN gateway interface. -type VpnGatewayVpnGatewayInterface struct { - // Id: [Output Only] Numeric identifier for this VPN interface associated - // with - // the VPN gateway. - Id int64 `json:"id,omitempty"` - // InterconnectAttachment: URL of the VLAN attachment (interconnectAttachment) - // resource for this - // VPN gateway interface. When the value of this field is present, the - // VPN - // gateway is used for HA VPN over Cloud Interconnect; all egress - // or ingress traffic for this VPN gateway interface goes through the - // specified VLAN attachment resource. - InterconnectAttachment string `json:"interconnectAttachment,omitempty"` - // IpAddress: [Output Only] IP address for this VPN interface associated with - // the VPN - // gateway. - // The IP address could be either a regional external IP address or - // a regional internal IP address. The two IP addresses for a VPN gateway - // must be all regional external or regional internal IP addresses. - // There - // cannot be a mix of regional external IP addresses and regional internal - // IP addresses. For HA VPN over Cloud Interconnect, the IP addresses - // for both interfaces could either be regional internal IP addresses - // or - // regional external IP addresses. For regular (non HA VPN over - // Cloud - // Interconnect) HA VPN tunnels, the IP address must be a regional external - // IP address. - IpAddress string `json:"ipAddress,omitempty"` - // Ipv6Address: [Output Only] IPv6 address for this VPN interface associated - // with the VPN - // gateway. - // The IPv6 address must be a regional external IPv6 address. The format is - // RFC 5952 format (e.g. 2001:db8::2d9:51:0:0). - Ipv6Address string `json:"ipv6Address,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewayVpnGatewayInterface - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysGetStatusResponse struct { - Result *VpnGatewayStatus `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Result") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysGetStatusResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysScopedList struct { - // VpnGateways: [Output Only] A list of VPN gateways contained in this scope. - VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` - // Warning: [Output Only] Informational warning which replaces the list of - // addresses - // when the list is empty. - Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnGateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnGateways") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnGatewaysScopedListWarning: [Output Only] Informational warning which -// replaces the list of addresses -// when the list is empty. -type VpnGatewaysScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnGatewaysScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnGatewaysScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnel: Represents a Cloud VPN Tunnel resource. -// -// For more information about VPN, read the -// the Cloud VPN Overview. -type VpnTunnel struct { - // CipherSuite: User specified list of ciphers to use for the phase 1 and phase - // 2 of the - // IKE protocol. - CipherSuite *VpnTunnelCipherSuite `json:"cipherSuite,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of this resource. Provide this property - // when you - // create the resource. - Description string `json:"description,omitempty"` - // DetailedStatus: [Output Only] Detailed status message for the VPN tunnel. - DetailedStatus string `json:"detailedStatus,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // IkeVersion: IKE protocol version to use when establishing the VPN tunnel - // with the peer - // VPN gateway. Acceptable IKE versions are 1 or 2. - // The default version is 2. - IkeVersion int64 `json:"ikeVersion,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // VpnTunnel, which is - // essentially a hash of the labels set used for optimistic locking. - // The - // fingerprint is initially generated by Compute Engine and changes after - // every request to modify or update labels. You must always provide - // an - // up-to-date fingerprint hash in order to update or change labels, - // otherwise the request will fail with error412 conditionNotMet. - // - // To see the latest fingerprint, make a get() request to - // retrieve a VpnTunnel. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels for this resource. These can only be added or modified by - // thesetLabels method. Each label key/value pair must comply - // withRFC1035. - // Label values may be empty. - Labels map[string]string `json:"labels,omitempty"` - // LocalTrafficSelector: Local traffic selector to use when establishing the - // VPN tunnel with the - // peer VPN gateway. The value should be a CIDR formatted string, for - // example: 192.168.0.0/16. The ranges must be disjoint. - // Only IPv4 is supported for Classic VPN tunnels. This field is output - // only - // for HA VPN tunnels. - LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // PeerExternalGateway: URL of the peer side external VPN gateway to which this - // VPN tunnel is - // connected. - // Provided by the client when the VPN tunnel is created. - // This field is exclusive with the field peerGcpGateway. - PeerExternalGateway string `json:"peerExternalGateway,omitempty"` - // PeerExternalGatewayInterface: The interface ID of the external VPN gateway - // to which this VPN tunnel is - // connected. Provided by the client when the VPN tunnel is created. - // Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use - // depends on the external VPN gateway redundancy type. - PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - // PeerGcpGateway: URL of the peer side HA VPN gateway to which this VPN - // tunnel - // is connected. Provided by the client when the VPN tunnel is created. - // This field can be used when creating highly available VPN from VPC - // network - // to VPC network, the field is exclusive with the field - // peerExternalGateway. - // If provided, the VPN tunnel will automatically use the - // same - // vpnGatewayInterface ID in the peer Google Cloud VPN gateway. - PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. This - // field can - // be set only for Classic VPN tunnels. - PeerIp string `json:"peerIp,omitempty"` - // Region: [Output Only] URL of the region where the VPN tunnel resides. - // You must specify this field as part of the HTTP request URL. It is - // not settable as a field in the request body. - Region string `json:"region,omitempty"` - // RemoteTrafficSelector: Remote traffic selectors to use when establishing the - // VPN tunnel with - // the peer VPN gateway. The value should be a CIDR formatted string, - // for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 - // is - // supported for Classic VPN tunnels. This field is output only for HA - // VPN - // tunnels. - RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` - // Router: URL of the router resource to be used for dynamic routing. - Router string `json:"router,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // SharedSecret: Shared secret used to set the secure session between the Cloud - // VPN gateway - // and the peer VPN gateway. - SharedSecret string `json:"sharedSecret,omitempty"` - // SharedSecretHash: Hash of the shared secret. - SharedSecretHash string `json:"sharedSecretHash,omitempty"` - // Status: [Output Only] The status of the VPN tunnel, which can be one of - // the - // following: - // - // - PROVISIONING: Resource is being allocated for the VPN tunnel. - // - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs - // from - // the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and - // Route - // resources are needed to setup the VPN tunnel. - // - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - // - ESTABLISHED: Secure session is successfully established with the peer - // VPN. - // - NETWORK_ERROR: Deprecated, replaced by - // NO_INCOMING_PACKETS - // - AUTHORIZATION_ERROR: Auth error (for example, - // bad shared secret). - // - NEGOTIATION_FAILURE: Handshake failed. - // - DEPROVISIONING: Resources are being deallocated for the VPN - // tunnel. - // - FAILED: Tunnel creation has failed and the tunnel is not - // ready to be used. - // - NO_INCOMING_PACKETS: No incoming packets from - // peer. - // - REJECTED: Tunnel configuration was rejected, can be result - // of being denied access. - // - ALLOCATING_RESOURCES: Cloud VPN is in the - // process of allocating all required resources. - // - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted - // for Classic VPN tunnels or the project is in frozen state. - // - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, - // probably behind NAT. - // - TS_NARROWING_NOT_ALLOWED: Traffic selector - // narrowing not allowed for an HA-VPN tunnel. - // - // Possible values: - // "ALLOCATING_RESOURCES" - Cloud VPN is in the process of allocating all - // required resources - // (specifically, a borg task). - // "AUTHORIZATION_ERROR" - Auth error (e.g. bad shared secret). - // "DEPROVISIONING" - Resources is being deallocated for the VPN tunnel. - // "ESTABLISHED" - Secure session is successfully established with peer VPN. - // "FAILED" - Tunnel creation has failed and the tunnel is not ready to be - // used. - // "FIRST_HANDSHAKE" - Successful first handshake with peer VPN. - // "NEGOTIATION_FAILURE" - Handshake failed. - // "NETWORK_ERROR" - Deprecated, replaced by NO_INCOMING_PACKETS - // "NO_INCOMING_PACKETS" - No incoming packets from peer - // "PROVISIONING" - Resource is being allocated for the VPN tunnel. - // "REJECTED" - Tunnel configuration was rejected, can be result of being - // denylisted. - // "STOPPED" - Tunnel is stopped due to its Forwarding Rules being deleted. - // "WAITING_FOR_FULL_CONFIG" - Waiting to receive all VPN-related configs - // from user. Network, - // TargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are - // needed to setup VPN tunnel. - Status string `json:"status,omitempty"` - // TargetVpnGateway: URL of the Target VPN gateway with which this VPN tunnel - // is associated. - // Provided by the client when the VPN tunnel is created. - // This field can be set only for Classic VPN tunnels. - TargetVpnGateway string `json:"targetVpnGateway,omitempty"` - // VpnGateway: URL of the VPN gateway with which this VPN tunnel is - // associated. - // Provided by the client when the VPN tunnel is created. This must be - // used (instead of target_vpn_gateway) if a High Availability VPN - // gateway - // resource is created. - VpnGateway string `json:"vpnGateway,omitempty"` - // VpnGatewayInterface: The interface ID of the VPN gateway with which this VPN - // tunnel is - // associated. - // Possible values are: `0`, `1`. - VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CipherSuite") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CipherSuite") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnel) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnTunnelsScopedList resources. - Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelAggregatedListWarning: [Output Only] Informational warning message. -type VpnTunnelAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelAggregatedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelAggregatedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelCipherSuite struct { - Phase1 *VpnTunnelPhase1Algorithms `json:"phase1,omitempty"` - Phase2 *VpnTunnelPhase2Algorithms `json:"phase2,omitempty"` - // ForceSendFields is a list of field names (e.g. "Phase1") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Phase1") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelCipherSuite) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelCipherSuite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelList: Contains a list of VpnTunnel resources. -type VpnTunnelList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of VpnTunnel resources. - Items []*VpnTunnel `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for - // VPN tunnels. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *VpnTunnelListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelListWarning: [Output Only] Informational warning message. -type VpnTunnelListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelPhase1Algorithms struct { - Dh []string `json:"dh,omitempty"` - Encryption []string `json:"encryption,omitempty"` - Integrity []string `json:"integrity,omitempty"` - Prf []string `json:"prf,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dh") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dh") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelPhase1Algorithms) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelPhase1Algorithms - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelPhase2Algorithms struct { - Encryption []string `json:"encryption,omitempty"` - Integrity []string `json:"integrity,omitempty"` - Pfs []string `json:"pfs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Encryption") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Encryption") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelPhase2Algorithms) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelPhase2Algorithms - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedList struct { - // VpnTunnels: A list of VPN tunnels contained in this scope. - VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"` - // Warning: Informational warning which replaces the list of addresses when - // the list is empty. - Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "VpnTunnels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VpnTunnels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedList) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VpnTunnelsScopedListWarning: Informational warning which replaces the list -// of addresses when -// the list is empty. -type VpnTunnelsScopedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type VpnTunnelsScopedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod VpnTunnelsScopedListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WafExpressionSet struct { - // Aliases: A list of alternate IDs. The format should be: - // - E.g. XSS-stable - // Generic suffix like "stable" is particularly useful if a policy - // likes to avail newer set of expressions without having to change - // the policy. - // A given alias name can't be used for more than one entity set. - Aliases []string `json:"aliases,omitempty"` - // Expressions: List of available expressions. - Expressions []*WafExpressionSetExpression `json:"expressions,omitempty"` - // Id: Google specified expression set ID. The format should be: - // - E.g. XSS-20170329 - // required - Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Aliases") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Aliases") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WafExpressionSet) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WafExpressionSetExpression struct { - // Id: Expression ID should uniquely identify the origin of the - // expression. - // E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set - // version 2.9.1 rule id 973337. - // The ID could be used to determine the individual attack definition - // that has been detected. It could also be used to exclude it from - // the policy in case of false positive. - // required - Id string `json:"id,omitempty"` - // Sensitivity: The sensitivity value associated with the WAF rule ID. This - // corresponds - // to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved - // for - // opt-in only rules. - Sensitivity int64 `json:"sensitivity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WafExpressionSetExpression) MarshalJSON() ([]byte, error) { - type NoMethod WafExpressionSetExpression - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WeightedBackendService: In contrast to a single BackendService in -// -// HttpRouteAction to which all matching traffic is directed -// to,WeightedBackendService allows traffic to be split across -// multiple backend services. The volume of traffic for each -// backend service is proportional to the weight specified -// in each WeightedBackendService -type WeightedBackendService struct { - // BackendService: The full or partial URL to the default - // BackendService - // resource. Before - // forwarding the request to backendService, the load balancer - // applies any relevant headerActions specified as part of - // thisbackendServiceWeight. - BackendService string `json:"backendService,omitempty"` - // HeaderAction: Specifies changes to request and response headers that need to - // take - // effect for the selected backendService. - // - // headerAction specified here take effect beforeheaderAction in the enclosing - // HttpRouteRule,PathMatcher and UrlMap. - // - // headerAction is not supported for load balancers that have - // their loadBalancingScheme set to EXTERNAL. - // - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // Weight: Specifies the fraction of traffic sent to a backend - // service, - // computed asweight / (sum of all weightedBackendService weights in - // routeAction). - // - // The selection of a backend service is determined only for new traffic. - // Once a user's request has been directed to a backend service, - // subsequent requests are sent to the same backend service as - // determined by the backend service's session affinity policy. - // Don't configure session affinity if you're using weighted traffic - // splitting. If you do, the weighted traffic splitting configuration - // takes - // precedence. - // - // The value must be from 0 to 1000. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WeightedBackendService) MarshalJSON() ([]byte, error) { - type NoMethod WeightedBackendService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Wire: A pseudowire that connects two Interconnect connections. -type Wire struct { - // AdminEnabled: [Output Only] Indicates whether the wire is enabled. - // When false, the wire is disabled. When true and when the wire group of - // the wire is also enabled, the wire is enabled. Defaults to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // Endpoints: Wire endpoints are specific Interconnect connections. - Endpoints []*WireEndpoint `json:"endpoints,omitempty"` - // Label: [Output Only] A label that identifies the wire. The format of this - // label - // combines the existing labels of the wire group endpoints and - // Interconnect - // connections used by this wire in alphabetical order as - // follows: - // `ENDPOINT_A+CONNECTION_A1,ENDPOINT_B+CONNECTION_B1`, where: - // - // - ENDPOINT_A and ENDPOINT_B: are the labels - // that you entered as map keys when you specified the wire group endpoint - // objects. - // - CONNECTION_A1 and CONNECTION_B1: are the - // labels that you entered as map keys when you specified the wire group - // Interconnect objects. - Label string `json:"label,omitempty"` - // WireProperties: [Output Only] Properties of the wire. - WireProperties *WireProperties `json:"wireProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Wire) MarshalJSON() ([]byte, error) { - type NoMethod Wire - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireEndpoint: Wire endpoints are specific Interconnect connections. -type WireEndpoint struct { - Interconnect string `json:"interconnect,omitempty"` - VlanTag int64 `json:"vlanTag,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroup: A resource that represents a group of redundant wires. -type WireGroup struct { - // AdminEnabled: Indicates whether the wires in the wire group are enabled. - // When false, the - // wires in the wire group are disabled. When true and when - // there is simultaneously no wire-specific override of `adminEnabled` - // to - // false, a given wire is enabled. Defaults to true. - AdminEnabled bool `json:"adminEnabled,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional description of the wire group. - Description string `json:"description,omitempty"` - // Endpoints: A map that contains the logical endpoints of the wire group. - // Specify - // key-value pairs for the map as follows: - // - // - Key: an RFC1035 user-specified label. - // - Value: an Endpoint object. - Endpoints map[string]WireGroupEndpoint `json:"endpoints,omitempty"` - // Id: [Output Only] The unique identifier for the resource type. The - // server - // generates this identifier. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Alwayscompute#wireGroups for wire - // groups. - Kind string `json:"kind,omitempty"` - // Name: Name of the resource. Provided by the client when the resource is - // created. - // The name must be 1-63 characters long, and comply withRFC1035. - // Specifically, the name must be 1-63 characters long and match the - // regular - // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first - // character must be a lowercase letter, and all following characters must - // be a dash, lowercase letter, or digit, except the last character, - // which - // cannot be a dash. - Name string `json:"name,omitempty"` - // Reconciling: [Output Only] Indicates whether there are wire changes yet to - // be processed. - Reconciling bool `json:"reconciling,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Topology: Topology details for the wire group configuration. - Topology *WireGroupTopology `json:"topology,omitempty"` - // WireGroupProperties: Properties of the wire group. - WireGroupProperties *WireGroupProperties `json:"wireGroupProperties,omitempty"` - // WireProperties: Properties for all wires in the wire group. - WireProperties *WireProperties `json:"wireProperties,omitempty"` - // Wires: The single/redundant wire(s) managed by the wire group. - Wires []*Wire `json:"wires,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdminEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdminEnabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroup) MarshalJSON() ([]byte, error) { - type NoMethod WireGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupEndpoint: A logical endpoint for the wire group. An endpoint -// represents a metro that -// contains redundant Interconnect connections. A wire group is created -// between two endpoints. -type WireGroupEndpoint struct { - // Interconnects: A map that contains the redundant Interconnect connections. - // Specify - // key-value pairs for the map as follows: - // - // - Key: an RFC1035 user-specified label. - // - Value: an Interconnect object. - Interconnects map[string]WireGroupEndpointInterconnect `json:"interconnects,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnects") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupEndpointInterconnect: The redundant Interconnect connections for -// this endpoint. -type WireGroupEndpointInterconnect struct { - // Interconnect: Required. An Interconnect connection. You can specify the - // connection as - // a partial or full URL. If the connection is in a different project from - // the cross-site network, use a format that specifies the project. See - // the following examples of partial and full URLs: - // - // - // - // global/interconnects/NAME - // - // - // projects/PROJECT_ID/global/interconnects/NAME - // - // - - // - // https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME - Interconnect string `json:"interconnect,omitempty"` - // VlanTags: Required. To configure the wire group for VLAN mode, enter a VLAN - // tag, - // which is a number from `2` to `4093`. You can autoallocate a tag by - // entering `0`. To configure the wire group for port mode, enter `-1`. - // Review the following guidelines: - // - // - A VLAN tag must be unique for an Interconnect connection across all - // attachments and wire groups. - // - Both endpoints of a wire must use the same VLAN tag value. - // - Single wire and redundant type wire groups must have only one - // VLAN tag. - // - Port mode pseudowires must have a single VLAN tag with a value of - // `-1` for both endpoints. - // - Box and cross type wire groups must have two VLAN tags. The first - // is for the same-zone pseudowire, and the second is for the cross-zone - // pseudowire. - VlanTags []int64 `json:"vlanTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Interconnect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Interconnect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupEndpointInterconnect) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupEndpointInterconnect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupList: Response for the list request. -type WireGroupList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of wire group resources. - Items []*WireGroup `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Alwayscompute#wireGroups for wire - // groups. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - // end_interface: MixerListResponseWithEtagBuilder - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *WireGroupListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupList) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupListWarning: [Output Only] Informational warning message. -type WireGroupListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*WireGroupListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WireGroupListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupProperties: The properties of a wire group. These -// properties -// determine how a group of redundant wires are created and managed. -type WireGroupProperties struct { - // Type: The type of the wire group, one of the following: - // - // - WIRE: a single pseudowire over two Interconnect connections with no - // redundancy. - // - REDUNDANT: two pseudowires over four Interconnect connections, with - // two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Each pseudowire connects Interconnect - // connections in matching edge availability domains of the two metros. - // - BOX_AND_CROSS: four pseudowires over four Interconnect connections, - // with two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Two pseudowires connect Interconnect - // connections in matching edge availability domains of the two metros. - // Two additional pseudowires connect the non-matching edge availability - // domains of the two metros. - // - // Possible values: - // "BOX_AND_CROSS" - Four pseudowires over four Interconnect - // connections, - // with two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Two pseudowires connect - // Interconnect - // connections in matching edge availability domains of the two metros. - // Two additional pseudowires connect the non-matching edge - // availability - // domains of the two metros. - // "REDUNDANT" - Two pseudowires over four Interconnect connections, with - // two connections in one metro and two connections in another metro. - // Each redundant pair of Interconnect connections spans both edge - // availability domains of the metro. Each pseudowire connects - // Interconnect - // connections in matching edge availability domains of the two metros. - // "WIRE" - A single pseudowire over two Interconnect connections with no - // redundancy. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupProperties) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupTopology: Topology details for the wire group. -type WireGroupTopology struct { - // Endpoints: Topology details for all endpoints in the wire group. - Endpoints []*WireGroupTopologyEndpoint `json:"endpoints,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupTopology) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupTopology - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireGroupTopologyEndpoint: Topology details for a single wire group -// endpoint. -type WireGroupTopologyEndpoint struct { - // City: The InterconnectLocation.city (metropolitan area designator) that - // all - // interconnects are located in. - City string `json:"city,omitempty"` - // Label: Endpoint label from the wire group. - Label string `json:"label,omitempty"` - // ForceSendFields is a list of field names (e.g. "City") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "City") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireGroupTopologyEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod WireGroupTopologyEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WireProperties: The properties of a wire. -type WireProperties struct { - // BandwidthAllocation: The configuration of the bandwidth allocation, one of - // the following: - // - // - ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth - // allocation - // (and associated charges) for each wire in the group. - // - SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures - // one unmetered bandwidth allocation for the wire group. The unmetered - // bandwidth is divided equally across each wire in the group, but dynamic - // throttling reallocates unused unmetered bandwidth from unused or - // underused - // wires to other wires in the group. - // - // Possible values: - // "ALLOCATE_PER_WIRE" - Configures a separate unmetered bandwidth allocation - // (and associated - // charges) for each wire in the group. - // "SHARED_WITH_WIRE_GROUP" - This is the default behavior. Configures one - // unmetered bandwidth - // allocation for the wire group. The unmetered bandwidth is divided - // equally - // across each wire in the group, but dynamic throttling reallocates - // unused - // unmetered bandwidth from unused or underused wires to other wires in - // the - // group. - BandwidthAllocation string `json:"bandwidthAllocation,omitempty"` - // BandwidthUnmetered: The unmetered bandwidth in Gigabits per second, using - // decimal units. `10` - // is 10 Gbps, `100` is 100 Gbps. The bandwidth must be greater than 0. - BandwidthUnmetered int64 `json:"bandwidthUnmetered,omitempty,string"` - // FaultResponse: Response when a fault is detected in a pseudowire: - // - // - NONE: default. - // - DISABLE_PORT: set the port line protocol down when inline probes - // detect a fault. This setting is only permitted on port mode - // pseudowires. - // - // Possible values: - // "DISABLE_PORT" - Set the port line protocol down when inline probes detect - // a fault. This - // setting is only permitted on port mode pseudowires. - // "NONE" - Default. - FaultResponse string `json:"faultResponse,omitempty"` - // ForceSendFields is a list of field names (e.g. "BandwidthAllocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BandwidthAllocation") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WireProperties) MarshalJSON() ([]byte, error) { - type NoMethod WireProperties - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type XpnHostList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: [Output Only] A list of shared VPC host project URLs. - Items []*Project `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of shared VPC hosts. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *XpnHostListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostList) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// XpnHostListWarning: [Output Only] Informational warning message. -type XpnHostListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*XpnHostListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostListWarning) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type XpnHostListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnHostListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod XpnHostListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// XpnResourceId: Service resource (a.k.a service project) ID. -type XpnResourceId struct { - // Id: The ID of the service resource. In the case of projects, this - // field - // supports project id (e.g., my-project-123) and project number - // (e.g. 12345678). - Id string `json:"id,omitempty"` - // Type: The type of the service resource. - // - // Possible values: - // "PROJECT" - // "XPN_RESOURCE_TYPE_UNSPECIFIED" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s XpnResourceId) MarshalJSON() ([]byte, error) { - type NoMethod XpnResourceId - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Zone: Represents a Zone resource. -// -// A zone is a deployment area. These deployment areas are subsets of a -// region. -// For example the zone us-east1-b is located in theus-east1 region. For more -// information, readRegions and -// Zones. -type Zone struct { - // AvailableCpuPlatforms: [Output Only] Available cpu/platform selections for - // the zone. - AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"` - // CreationTimestamp: [Output Only] Creation timestamp inRFC3339 - // text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated -- [Output Only] The deprecation status associated with this - // zone. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: [Output Only] Textual description of the resource. - Description string `json:"description,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This identifier - // is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#zone for - // zones. - Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. - Name string `json:"name,omitempty"` - // Region: [Output Only] Full URL reference to the region which hosts the zone. - Region string `json:"region,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: [Output Only] Status of the zone, either UP orDOWN. - // - // Possible values: - // "DOWN" - // "UP" - Status string `json:"status,omitempty"` - // SupportsPzs: [Output Only] Reserved for future use. - SupportsPzs bool `json:"supportsPzs,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AvailableCpuPlatforms") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Zone) MarshalJSON() ([]byte, error) { - type NoMethod Zone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ZoneList: Contains a list of zone resources. -type ZoneList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of Zone resources. - Items []*Zone `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next page of - // results for - // list requests. If the number of results is larger thanmaxResults, use the - // nextPageToken as a value for - // the query parameter pageToken in the next list request. - // Subsequent list requests will have their own nextPageToken to - // continue paging through the results. - NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ZoneListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneList) MarshalJSON() ([]byte, error) { - type NoMethod ZoneList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ZoneListWarning: [Output Only] Informational warning message. -type ZoneListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute - // Engine returns NO_RESULTS_ON_PAGE if there - // are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed - // operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as - // deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as - // experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. - // Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is - // not of type HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed - // which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the - // network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an - // ipv6 interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the - // same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite - // the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: - // regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not - // accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted - // because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but - // its application does not make a lot of sense, because it allows only - // single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: - // value format. For example: - // - // "data": [ - // { - // "key": "scope", - // "value": "zones/us-east1-d" - // } - Data []*ZoneListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being - // returned. For example, for warnings where there are no results in a - // list - // request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a - // key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for this - // resource, - // used to detect conflicts. The fingerprint is initially generated by - // Compute - // Engine and changes after every request to modify or update labels. You - // must - // always provide an up-to-date fingerprint hash in order to update or - // change - // labels. Make a get() request to the resource to get the latest - // fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneSetNestedPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneSetNestedPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetNestedPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ZoneSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible - // wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` - // Etag: Flatten Policy to create a backward compatible - // wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` - // 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 in general - // a - // valid policy but certain services (like Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute2-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute2-gen.go deleted file mode 100644 index e2580135dceff..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute2-gen.go +++ /dev/null @@ -1,85862 +0,0 @@ -// Copyright 2025 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 compute - -import ( - "context" - "fmt" - "net/http" - - internallog "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - gensupport "google.golang.org/api/internal/gensupport" -) - -type AcceleratorTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of accelerator types. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AcceleratorTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeAggregatedList.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 *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, 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 := &AcceleratorTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified accelerator type. -// -// - acceleratorType: Name of the accelerator type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.acceleratorType = acceleratorType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorType.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 *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, 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 := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of accelerator types that are available to the -// specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.acceleratorTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.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 *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, 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 := &AcceleratorTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.acceleratorTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of addresses. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AddressesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AddressesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.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 *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, 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 := &AddressAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// -// - address: Name of the address resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { - 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 -// details. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// -// - address: Name of the address resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Address.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 *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, 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 := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project by using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { - 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 -// details. -func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.address) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of addresses contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressList.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 *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, 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 := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AddressesMoveCall struct { - s *Service - project string - region string - address string - regionaddressesmoverequest *RegionAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified address resource. -// -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -// - region: Name of the region for this request. -func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { - c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.address = address - c.regionaddressesmoverequest = regionaddressesmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { - 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 -// details. -func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionaddressesmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") - 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{ - "project": c.project, - "region": c.region, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.move", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Address. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { - 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 -// details. -func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AddressesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.addresses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.addresses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.addresses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AdviceCalendarModeCall struct { - s *Service - project string - region string - calendarmodeadvicerequest *CalendarModeAdviceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CalendarMode: Advise how, where and when to create the requested amount of -// instances -// with specified accelerators, within the specified time and location -// limits. -// The method recommends creating future reservations for the -// requested -// resources. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AdviceService) CalendarMode(project string, region string, calendarmodeadvicerequest *CalendarModeAdviceRequest) *AdviceCalendarModeCall { - c := &AdviceCalendarModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.calendarmodeadvicerequest = calendarmodeadvicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AdviceCalendarModeCall) Fields(s ...googleapi.Field) *AdviceCalendarModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AdviceCalendarModeCall) Context(ctx context.Context) *AdviceCalendarModeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AdviceCalendarModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AdviceCalendarModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.calendarmodeadvicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/advice/calendarMode") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.advice.calendarMode", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.advice.calendarMode" call. -// Any non-2xx status code is an error. Response headers are in either -// *CalendarModeAdviceResponse.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 *AdviceCalendarModeCall) Do(opts ...googleapi.CallOption) (*CalendarModeAdviceResponse, 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 := &CalendarModeAdviceResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.advice.calendarMode", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of autoscalers. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *AutoscalersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *AutoscalersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.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 *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, 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 := &AutoscalerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AutoscalersDeleteCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { - 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 -// details. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler resource. -// -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.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 *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, 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 := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersInsertCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { - 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 -// details. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerList.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 *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, 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 := &AutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { - 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 -// details. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - 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 -// details. -func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.autoscalers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.autoscalers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *AutoscalersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.autoscalers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsAddSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds a key for validating requests with signed URLs for -// this backend -// bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the Signed URL -// Key should be -// -// added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { - c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.signedurlkey = signedurlkey - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { - 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 -// details. -func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signedurlkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.addSignedUrlKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.addSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsAddSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.addSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendBucket resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *BackendBucketsService) AggregatedList(project string) *BackendBucketsAggregatedListCall { - c := &BackendBucketsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsAggregatedListCall) Filter(filter string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *BackendBucketsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsAggregatedListCall) MaxResults(maxResults int64) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsAggregatedListCall) OrderBy(orderBy string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsAggregatedListCall) PageToken(pageToken string) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *BackendBucketsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsAggregatedListCall) Fields(s ...googleapi.Field) *BackendBucketsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsAggregatedListCall) IfNoneMatch(entityTag string) *BackendBucketsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsAggregatedListCall) Context(ctx context.Context) *BackendBucketsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketAggregatedList.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 *BackendBucketsAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendBucketAggregatedList, 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 := &BackendBucketAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsAggregatedListCall) Pages(ctx context.Context, f func(*BackendBucketAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsDeleteCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { - 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 -// details. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsDeleteSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes a key for validating requests with signed URLs -// for this backend -// bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the Signed URL -// Key should be -// -// added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { - c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.urlParams_.Set("keyName", keyName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { - 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 -// details. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.deleteSignedUrlKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.deleteSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsDeleteSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.deleteSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsGetCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to return. -// - project: Project ID for this request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucket.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 *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, 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 := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { - c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.getIamPolicy" call. -// 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 *BackendBucketsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendBucket resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { - 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 -// details. -func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketList.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 *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, 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 := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend buckets in the specified -// project. -// -// - project: Project ID for this request. -func (r *BackendBucketsService) ListUsable(project string) *BackendBucketsListUsableCall { - c := &BackendBucketsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendBucketsListUsableCall) Filter(filter string) *BackendBucketsListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendBucketsListUsableCall) MaxResults(maxResults int64) *BackendBucketsListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendBucketsListUsableCall) OrderBy(orderBy string) *BackendBucketsListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendBucketsListUsableCall) PageToken(pageToken string) *BackendBucketsListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendBucketsListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsListUsableCall) Fields(s ...googleapi.Field) *BackendBucketsListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendBucketsListUsableCall) IfNoneMatch(entityTag string) *BackendBucketsListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsListUsableCall) Context(ctx context.Context) *BackendBucketsListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketListUsable.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 *BackendBucketsListUsableCall) Do(opts ...googleapi.CallOption) (*BackendBucketListUsable, 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 := &BackendBucketListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendBucketsListUsableCall) Pages(ctx context.Context, f func(*BackendBucketListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendBucketsPatchCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - backendBucket: Name of the BackendBucket resource to patch. -// - project: Project ID for this request. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { - 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 -// details. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendBucket string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetEdgeSecurityPolicy: Sets the edge security policy for the specified -// backend bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { - c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { - 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 -// details. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") - 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{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.setEdgeSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.setEdgeSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { - c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.setIamPolicy" call. -// 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 *BackendBucketsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { - c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendBucket resource with the data included -// in the -// request. -// -// - backendBucket: Name of the BackendBucket resource to update. -// - project: Project ID for this request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { - 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 -// details. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendBucketsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendBuckets.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendBuckets.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendBucketsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendBuckets.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesAddSignedUrlKeyCall struct { - s *Service - project string - backendService string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddSignedUrlKey: Adds a key for validating requests with signed URLs for -// this backend -// service. -// -// - backendService: Name of the BackendService resource to which the Signed -// URL Key should be -// -// added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { - c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.signedurlkey = signedurlkey - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { - 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 -// details. -func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.signedurlkey) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.addSignedUrlKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.addSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesAddSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.addSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *BackendServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceAggregatedList.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 *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, 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 := &BackendServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified BackendService resource. -// -// - backendService: Name of the BackendService resource to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { - 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 -// details. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesDeleteSignedUrlKeyCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteSignedUrlKey: Deletes a key for validating requests with signed URLs -// for this backend -// service. -// -// - backendService: Name of the BackendService resource to which the Signed -// URL Key should be -// -// added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { - c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.urlParams_.Set("keyName", keyName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { - 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 -// details. -func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.deleteSignedUrlKey", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.deleteSignedUrlKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesDeleteSignedUrlKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.deleteSignedUrlKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified BackendService resource. -// -// - backendService: Name of the BackendService resource to return. -// - project: Project ID for this request. -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendService.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 *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetEffectiveSecurityPoliciesCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveSecurityPolicies: Returns effective security policies applied to -// this backend service. -// -// - backendService: Name of the Backend Service for this request. -// - project: Project ID for this request. -func (r *BackendServicesService) GetEffectiveSecurityPolicies(project string, backendService string) *BackendServicesGetEffectiveSecurityPoliciesCall { - c := &BackendServicesGetEffectiveSecurityPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Fields(s ...googleapi.Field) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) IfNoneMatch(entityTag string) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Context(ctx context.Context) *BackendServicesGetEffectiveSecurityPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetEffectiveSecurityPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getEffectiveSecurityPolicies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getEffectiveSecurityPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServicesGetEffectiveSecurityPoliciesResponse.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 *BackendServicesGetEffectiveSecurityPoliciesCall) Do(opts ...googleapi.CallOption) (*BackendServicesGetEffectiveSecurityPoliciesResponse, 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 := &BackendServicesGetEffectiveSecurityPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getEffectiveSecurityPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for -// this -// BackendService. -// -// Example request body: -// -// { -// "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" -// } -// -// - backendService: Name of the BackendService resource to which the queried -// instance belongs. -// - project: . -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getHealth") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { - c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.getIamPolicy" call. -// 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 *BackendServicesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a BackendService resource in the specified project using -// the data included in the request. For more information, see -// Backend services overview. -// -// - project: Project ID for this request. -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { - 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 -// details. -func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend services in the specified -// project. -// -// - project: Project ID for this request. -func (r *BackendServicesService) ListUsable(project string) *BackendServicesListUsableCall { - c := &BackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *BackendServicesListUsableCall) Filter(filter string) *BackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *BackendServicesListUsableCall) MaxResults(maxResults int64) *BackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *BackendServicesListUsableCall) OrderBy(orderBy string) *BackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *BackendServicesListUsableCall) PageToken(pageToken string) *BackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *BackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesListUsableCall) Fields(s ...googleapi.Field) *BackendServicesListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *BackendServicesListUsableCall) IfNoneMatch(entityTag string) *BackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesListUsableCall) Context(ctx context.Context) *BackendServicesListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.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 *BackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *BackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified BackendService resource with the data included -// in the -// request. For more information, see -// Backend services overview. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { - 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 -// details. -func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetEdgeSecurityPolicy: Sets the edge security policy for the specified -// backend service. -// -// - backendService: Name of the BackendService resource to which the edge -// security policy -// -// should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { - c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { - 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 -// details. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setEdgeSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setEdgeSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesSetEdgeSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setEdgeSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { - c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setIamPolicy" call. -// 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 *BackendServicesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesSetSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend -// service. For more information, seeGoogle -// Cloud Armor Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { - c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { - 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 -// details. -func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified BackendService resource with the data included -// in the -// request. For more information, seeBackend -// services overview. -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { - 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 -// details. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.backendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *BackendServicesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.backendServices.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksDeleteCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified cross-site network in the given scope. -// -// - crossSiteNetwork: Name of the cross-site network to delete. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Delete(project string, crossSiteNetwork string) *CrossSiteNetworksDeleteCall { - c := &CrossSiteNetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksDeleteCall) RequestId(requestId string) *CrossSiteNetworksDeleteCall { - 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 -// details. -func (c *CrossSiteNetworksDeleteCall) Fields(s ...googleapi.Field) *CrossSiteNetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksDeleteCall) Context(ctx context.Context) *CrossSiteNetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksGetCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified cross-site network in the given scope. -// -// - crossSiteNetwork: Name of the cross-site network to return. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Get(project string, crossSiteNetwork string) *CrossSiteNetworksGetCall { - c := &CrossSiteNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CrossSiteNetworksGetCall) Fields(s ...googleapi.Field) *CrossSiteNetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *CrossSiteNetworksGetCall) IfNoneMatch(entityTag string) *CrossSiteNetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksGetCall) Context(ctx context.Context) *CrossSiteNetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *CrossSiteNetwork.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 *CrossSiteNetworksGetCall) Do(opts ...googleapi.CallOption) (*CrossSiteNetwork, 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 := &CrossSiteNetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksInsertCall struct { - s *Service - project string - crosssitenetwork *CrossSiteNetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a cross-site network in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Insert(project string, crosssitenetwork *CrossSiteNetwork) *CrossSiteNetworksInsertCall { - c := &CrossSiteNetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crosssitenetwork = crosssitenetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksInsertCall) RequestId(requestId string) *CrossSiteNetworksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. -func (c *CrossSiteNetworksInsertCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksInsertCall { - 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 -// details. -func (c *CrossSiteNetworksInsertCall) Fields(s ...googleapi.Field) *CrossSiteNetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksInsertCall) Context(ctx context.Context) *CrossSiteNetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.crosssitenetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type CrossSiteNetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the cross-site networks for a project in the given scope. -// -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) List(project string) *CrossSiteNetworksListCall { - c := &CrossSiteNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *CrossSiteNetworksListCall) Filter(filter string) *CrossSiteNetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *CrossSiteNetworksListCall) MaxResults(maxResults int64) *CrossSiteNetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *CrossSiteNetworksListCall) OrderBy(orderBy string) *CrossSiteNetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *CrossSiteNetworksListCall) PageToken(pageToken string) *CrossSiteNetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *CrossSiteNetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *CrossSiteNetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CrossSiteNetworksListCall) Fields(s ...googleapi.Field) *CrossSiteNetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *CrossSiteNetworksListCall) IfNoneMatch(entityTag string) *CrossSiteNetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksListCall) Context(ctx context.Context) *CrossSiteNetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CrossSiteNetworkList.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 *CrossSiteNetworksListCall) Do(opts ...googleapi.CallOption) (*CrossSiteNetworkList, 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 := &CrossSiteNetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *CrossSiteNetworksListCall) Pages(ctx context.Context, f func(*CrossSiteNetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type CrossSiteNetworksPatchCall struct { - s *Service - project string - crossSiteNetwork string - crosssitenetwork *CrossSiteNetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified cross-site network with the data included -// in -// the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - crossSiteNetwork: Name of the cross-site network to update. -// - project: Project ID for this request. -func (r *CrossSiteNetworksService) Patch(project string, crossSiteNetwork string, crosssitenetwork *CrossSiteNetwork) *CrossSiteNetworksPatchCall { - c := &CrossSiteNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.crosssitenetwork = crosssitenetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *CrossSiteNetworksPatchCall) RequestId(requestId string) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *CrossSiteNetworksPatchCall) UpdateMask(updateMask string) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. -func (c *CrossSiteNetworksPatchCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksPatchCall { - 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 -// details. -func (c *CrossSiteNetworksPatchCall) Fields(s ...googleapi.Field) *CrossSiteNetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *CrossSiteNetworksPatchCall) Context(ctx context.Context) *CrossSiteNetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CrossSiteNetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *CrossSiteNetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.crosssitenetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.crossSiteNetworks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *CrossSiteNetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.crossSiteNetworks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskSettingsGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Zonal Disk Settings. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *DiskSettingsService) Get(project string, zone string) *DiskSettingsGetCall { - c := &DiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskSettingsGetCall) Fields(s ...googleapi.Field) *DiskSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskSettingsGetCall) IfNoneMatch(entityTag string) *DiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskSettingsGetCall) Context(ctx context.Context) *DiskSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.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 *DiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, 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 := &DiskSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskSettingsPatchCall struct { - s *Service - project string - zone string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Zonal Disk Settings -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskSettingsService) Patch(project string, zone string, disksettings *DiskSettings) *DiskSettingsPatchCall { - c := &DiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disksettings = disksettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DiskSettingsPatchCall) RequestId(requestId string) *DiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *DiskSettingsPatchCall) UpdateMask(updateMask string) *DiskSettingsPatchCall { - 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 -// details. -func (c *DiskSettingsPatchCall) Fields(s ...googleapi.Field) *DiskSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskSettingsPatchCall) Context(ctx context.Context) *DiskSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskSettings") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DiskSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of disk types. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *DiskTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *DiskTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.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 *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, 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 := &DiskTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified disk type. -// -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskType.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 *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, 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 := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of disk types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.diskTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.diskTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskTypeList.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 *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, 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 := &DiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.diskTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksAddResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to a disk. You can only -// add one -// policy which will be applied to this disk for scheduling snapshot -// creation. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { - c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { - 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 -// details. -func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of persistent disks. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *DisksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *DisksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.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 *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, 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 := &DiskAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Bulk create a set of disks. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { - c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkinsertdiskresource = bulkinsertdiskresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { - 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 -// details. -func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksBulkSetLabelsCall struct { - s *Service - project string - zone string - bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkSetLabels: Sets the labels on many disks at once. To learn more about -// labels, read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) BulkSetLabels(project string, zone string, bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest) *DisksBulkSetLabelsCall { - c := &DisksBulkSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkzonesetlabelsrequest = bulkzonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksBulkSetLabelsCall) RequestId(requestId string) *DisksBulkSetLabelsCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Resource sets the optional parameter "resource": Name or id of the resource -// for this request. -func (c *DisksBulkSetLabelsCall) Resource(resource string) *DisksBulkSetLabelsCall { - c.urlParams_.Set("resource", resource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksBulkSetLabelsCall) Fields(s ...googleapi.Field) *DisksBulkSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksBulkSetLabelsCall) Context(ctx context.Context) *DisksBulkSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksBulkSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksBulkSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkzonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkSetLabels") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.bulkSetLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.bulkSetLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksBulkSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.bulkSetLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksCreateSnapshotCall struct { - s *Service - project string - zone string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot -// creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots -// in a project different from the source disk project. -// -// - disk: Name of the persistent disk to snapshot. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] Whether to -// attempt an application consistent snapshot by -// informing the OS to prepare for the snapshot process. -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { - 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 -// details. -func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.createSnapshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksCreateSnapshotCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.createSnapshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified persistent disk. Deleting a disk removes its -// data -// permanently and is irreversible. However, deleting a disk does not -// delete any snapshots -// previously made from the disk. You must separatelydelete -// snapshots. -// -// - disk: Name of the persistent disk to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { - 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 -// details. -func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified persistent disk. -// -// - disk: Name of the persistent disk to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Disk.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 *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, 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 := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { - c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.getIamPolicy" call. -// 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 *DisksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent disk in the specified project using the data -// in the request. You can create a disk from a source -// (sourceImage, sourceSnapshot, orsourceDisk) or create an empty 500 GB data -// disk by -// omitting all properties. You can also create a disk that is larger than -// the default size by specifying the sizeGb property. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of persistent disks contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskList.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 *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, 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 := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type DisksRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from a disk. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { - c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { - 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 -// details. -func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified persistent disk. -// You can only increase the size of the disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksresizerequest = disksresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { - 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 -// details. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { - c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setIamPolicy" call. -// 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 *DisksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a disk. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - 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 -// details. -func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStartAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartAsyncReplication: Starts asynchronous replication. -// Must be invoked on the primary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { - c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { - 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 -// details. -func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStartAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstartasyncreplicationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.startAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStartAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStopAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopAsyncReplication: Stops asynchronous replication. -// Can be invoked either on the primary or on the secondary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { - c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { - 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 -// details. -func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.stopAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStopAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksStopGroupAsyncReplicationCall struct { - s *Service - project string - zone string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. -// Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. This must be the zone of the -// primary -// -// or secondary disks in the consistency group. -func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { - c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { - 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 -// details. -func (c *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksStopGroupAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.stopGroupAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksStopGroupAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DisksUpdateCall struct { - s *Service - project string - zone string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified disk with the data included in the -// request. -// The update is performed only on selected fields included as part -// of update-mask. Only the following fields can be modified: user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { - c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk - c.disk2 = disk2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { - 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 -// details. -func (c *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DisksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") - 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{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DisksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.disks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysDeleteCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified externalVpnGateway. -// -// - externalVpnGateway: Name of the externalVpnGateways to delete. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { - c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { - 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 -// details. -func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysGetCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified externalVpnGateway. Get a list of -// available -// externalVpnGateways by making a list() request. -// -// - externalVpnGateway: Name of the externalVpnGateway to return. -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { - c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalVpnGateway = externalVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExternalVpnGateway.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 *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, 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 := &ExternalVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysInsertCall struct { - s *Service - project string - externalvpngateway *ExternalVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { - c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalvpngateway = externalvpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { - 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 -// details. -func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.externalvpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of ExternalVpnGateway available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { - c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExternalVpnGatewayList.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 *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, 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 := &ExternalVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ExternalVpnGatewaysSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { - c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ExternalVpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ExternalVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { - c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.externalVpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.externalVpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddAssociationCall struct { - s *Service - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { - c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPacketMirroringRule: Inserts a packet mirroring rule into a firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddPacketMirroringRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddPacketMirroringRuleCall { - c := &FirewallPoliciesAddPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddPacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesAddPacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesAddPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesAddRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { - c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { - 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 -// details. -func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesCloneRulesCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { - c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesDeleteCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { - c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { - 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 -// details. -func (c *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { - c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { - c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetIamPolicyCall 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. May be empty if -// no such -// policy or resource exists. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { - c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getIamPolicy" call. -// 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 *FirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPacketMirroringRule: Gets a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetPacketMirroringRule(firewallPolicy string) *FirewallPoliciesGetPacketMirroringRuleCall { - c := &FirewallPoliciesGetPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetPacketMirroringRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesGetPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getPacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *FirewallPoliciesGetPacketMirroringRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesGetRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { - c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesInsertCall struct { - s *Service - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { - c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallpolicy = firewallpolicy - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { - 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 -// details. -func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the -// specified -// folder or organization. -func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { - c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FirewallPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { - c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// IncludeInheritedPolicies sets the optional parameter -// "includeInheritedPolicies": If set to "true", the response will contain a -// list of all associations for -// the containing folders and the containing organization of the target. -// The -// parameter has no effect if the target is an organization. -func (c *FirewallPoliciesListAssociationsCall) IncludeInheritedPolicies(includeInheritedPolicies bool) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("includeInheritedPolicies", fmt.Sprint(includeInheritedPolicies)) - return c -} - -// TargetResource sets the optional parameter "targetResource": The target -// resource to list associations. It is an organization, or a -// folder. -func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesListAssociationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/listAssociations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.listAssociations", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.listAssociations" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPoliciesListAssociationsResponse.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 *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, 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 := &FirewallPoliciesListAssociationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.listAssociations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesMoveCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { - c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// ParentId sets the optional parameter "parentId": The new parent of the -// firewall policy. The ID can be either be -// "folders/[FOLDER_ID]" if the parent is a folder -// or -// "organizations/[ORGANIZATION_ID]" if the parent is an organization. -func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { - 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 -// details. -func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/move") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.move", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchCall struct { - s *Service - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { - c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { - 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 -// details. -func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchPacketMirroringRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPacketMirroringRule: Patches a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchPacketMirroringRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchPacketMirroringRuleCall { - c := &FirewallPoliciesPatchPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchPacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesPatchPacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patchPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesPatchRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { - c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemoveAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { - c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemovePacketMirroringRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePacketMirroringRule: Deletes a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemovePacketMirroringRule(firewallPolicy string) *FirewallPoliciesRemovePacketMirroringRuleCall { - c := &FirewallPoliciesRemovePacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Priority(priority int64) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemovePacketMirroringRuleCall) RequestId(requestId string) *FirewallPoliciesRemovePacketMirroringRuleCall { - 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 -// details. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Context(ctx context.Context) *FirewallPoliciesRemovePacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removePacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removePacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemovePacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removePacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesRemoveRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { - c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesSetIamPolicyCall struct { - s *Service - resource string - globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { - c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalorganizationsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.setIamPolicy" call. -// 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 *FirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { - c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsDeleteCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified firewall. -// -// - firewall: Name of the firewall rule to delete. -// - project: Project ID for this request. -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { - 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 -// details. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified firewall. -// -// - firewall: Name of the firewall rule to return. -// - project: Project ID for this request. -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Firewall.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 *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, 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 := &Firewall{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsInsertCall struct { - s *Service - project string - firewall *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a firewall rule in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { - 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 -// details. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of firewall rules available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallList.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 *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, 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 := &FirewallList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified firewall rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - firewall: Name of the firewall rule to patch. -// - project: Project ID for this request. -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { - 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 -// details. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - 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{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified firewall rule with the data included in -// the -// request. -// Note that all fields will be updated if using PUT, even fields that are -// not -// specified. To update individual fields, please use PATCH instead. -// -// - firewall: Name of the firewall rule to update. -// - project: Project ID for this request. -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewall = firewall - c.firewall2 = firewall2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { - 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 -// details. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FirewallsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewall2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.firewalls.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.firewalls.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FirewallsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.firewalls.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of forwarding rules. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ForwardingRulesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleAggregatedList.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 *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, 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 := &ForwardingRuleAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ForwardingRulesDeleteCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { - 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 -// details. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRule.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 *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, 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 := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ForwardingRule resource in the specified project and -// region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { - 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 -// details. -func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of ForwardingRule resources available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.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 *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, 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 := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ForwardingRulesPatchCall struct { - s *Service - project string - region string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. Currently, you can only -// patch the network_tier field. -// -// - forwardingRule: Name of the ForwardingRule resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { - c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { - 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 -// details. -func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") - 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{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more about -// labels, -// read the -// Labeling Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { - 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 -// details. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for forwarding rule. The new target should be -// of the -// same type as the old target. -// -// - forwardingRule: Name of the ForwardingRule resource in which target is to -// be set. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { - 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 -// details. -func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") - 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{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.setTarget", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.setTarget" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ForwardingRulesSetTargetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.setTarget", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.forwardingRules.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.forwardingRules.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of future reservations. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *FutureReservationsService) AggregatedList(project string) *FutureReservationsAggregatedListCall { - c := &FutureReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FutureReservationsAggregatedListCall) Filter(filter string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *FutureReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FutureReservationsAggregatedListCall) MaxResults(maxResults int64) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FutureReservationsAggregatedListCall) OrderBy(orderBy string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FutureReservationsAggregatedListCall) PageToken(pageToken string) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FutureReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *FutureReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsAggregatedListCall) Fields(s ...googleapi.Field) *FutureReservationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsAggregatedListCall) IfNoneMatch(entityTag string) *FutureReservationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsAggregatedListCall) Context(ctx context.Context) *FutureReservationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/futureReservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservationsAggregatedListResponse.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 *FutureReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsAggregatedListResponse, 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 := &FutureReservationsAggregatedListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FutureReservationsAggregatedListCall) Pages(ctx context.Context, f func(*FutureReservationsAggregatedListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FutureReservationsCancelCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancel the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Cancel(project string, zone string, futureReservation string) *FutureReservationsCancelCall { - c := &FutureReservationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsCancelCall) RequestId(requestId string) *FutureReservationsCancelCall { - 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 -// details. -func (c *FutureReservationsCancelCall) Fields(s ...googleapi.Field) *FutureReservationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsCancelCall) Context(ctx context.Context) *FutureReservationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsDeleteCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Delete(project string, zone string, futureReservation string) *FutureReservationsDeleteCall { - c := &FutureReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsDeleteCall) RequestId(requestId string) *FutureReservationsDeleteCall { - 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 -// details. -func (c *FutureReservationsDeleteCall) Fields(s ...googleapi.Field) *FutureReservationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsDeleteCall) Context(ctx context.Context) *FutureReservationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsGetCall struct { - s *Service - project string - zone string - futureReservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified future reservation. -// -// - futureReservation: Name of the future reservation to retrieve. Name should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Get(project string, zone string, futureReservation string) *FutureReservationsGetCall { - c := &FutureReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsGetCall) Fields(s ...googleapi.Field) *FutureReservationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsGetCall) IfNoneMatch(entityTag string) *FutureReservationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsGetCall) Context(ctx context.Context) *FutureReservationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservation.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 *FutureReservationsGetCall) Do(opts ...googleapi.CallOption) (*FutureReservation, 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 := &FutureReservation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsInsertCall struct { - s *Service - project string - zone string - futurereservation *FutureReservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Future Reservation. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Insert(project string, zone string, futurereservation *FutureReservation) *FutureReservationsInsertCall { - c := &FutureReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futurereservation = futurereservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsInsertCall) RequestId(requestId string) *FutureReservationsInsertCall { - 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 -// details. -func (c *FutureReservationsInsertCall) Fields(s ...googleapi.Field) *FutureReservationsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsInsertCall) Context(ctx context.Context) *FutureReservationsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.futurereservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type FutureReservationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list of all the future reservations that have been configured for -// the -// specified project in specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) List(project string, zone string) *FutureReservationsListCall { - c := &FutureReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *FutureReservationsListCall) Filter(filter string) *FutureReservationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *FutureReservationsListCall) MaxResults(maxResults int64) *FutureReservationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *FutureReservationsListCall) OrderBy(orderBy string) *FutureReservationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *FutureReservationsListCall) PageToken(pageToken string) *FutureReservationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *FutureReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FutureReservationsListCall) Fields(s ...googleapi.Field) *FutureReservationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *FutureReservationsListCall) IfNoneMatch(entityTag string) *FutureReservationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsListCall) Context(ctx context.Context) *FutureReservationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FutureReservationsListResponse.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 *FutureReservationsListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsListResponse, 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 := &FutureReservationsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *FutureReservationsListCall) Pages(ctx context.Context, f func(*FutureReservationsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type FutureReservationsUpdateCall struct { - s *Service - project string - zone string - futureReservation string - futurereservation *FutureReservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified future reservation. -// -// - futureReservation: Name of the reservation to update. Name should conform -// to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Name should conform to RFC1035. -func (r *FutureReservationsService) Update(project string, zone string, futureReservation string, futurereservation *FutureReservation) *FutureReservationsUpdateCall { - c := &FutureReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.futureReservation = futureReservation - c.futurereservation = futurereservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *FutureReservationsUpdateCall) RequestId(requestId string) *FutureReservationsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *FutureReservationsUpdateCall) UpdateMask(updateMask string) *FutureReservationsUpdateCall { - 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 -// details. -func (c *FutureReservationsUpdateCall) Fields(s ...googleapi.Field) *FutureReservationsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FutureReservationsUpdateCall) Context(ctx context.Context) *FutureReservationsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FutureReservationsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FutureReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.futurereservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") - 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{ - "project": c.project, - "zone": c.zone, - "futureReservation": c.futureReservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.futureReservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.futureReservations.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *FutureReservationsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.futureReservations.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesDeleteCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified address resource. -// -// - address: Name of the address resource to delete. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { - c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall { - 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 -// details. -func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesGetCall struct { - s *Service - project string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified address resource. -// -// - address: Name of the address resource to return. -// - project: Project ID for this request. -func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { - c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Address.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 *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, 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 := &Address{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesInsertCall struct { - s *Service - project string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an address resource in the specified project by using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { - c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall { - 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 -// details. -func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.address) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of global addresses. -// -// - project: Project ID for this request. -func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { - c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalAddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalAddressesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AddressList.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 *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, 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 := &AddressList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalAddressesMoveCall struct { - s *Service - project string - address string - globaladdressesmoverequest *GlobalAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified address resource from one project to another -// project. -// -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -func (r *GlobalAddressesService) Move(project string, address string, globaladdressesmoverequest *GlobalAddressesMoveRequest) *GlobalAddressesMoveCall { - c := &GlobalAddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.address = address - c.globaladdressesmoverequest = globaladdressesmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalAddressesMoveCall) RequestId(requestId string) *GlobalAddressesMoveCall { - 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 -// details. -func (c *GlobalAddressesMoveCall) Fields(s ...googleapi.Field) *GlobalAddressesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesMoveCall) Context(ctx context.Context) *GlobalAddressesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globaladdressesmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{address}/move") - 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{ - "project": c.project, - "address": c.address, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.move", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a GlobalAddress. To learn more about labels, -// read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { - c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalAddressesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalAddressesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { - c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/addresses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalAddresses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalAddresses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalAddresses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesDeleteCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified GlobalForwardingRule resource. -// -// - forwardingRule: Name of the ForwardingRule resource to delete. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { - c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall { - 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 -// details. -func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesGetCall struct { - s *Service - project string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of -// available forwarding rules by making a list() request. -// -// - forwardingRule: Name of the ForwardingRule resource to return. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { - c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRule.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 *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, 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 := &ForwardingRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesInsertCall struct { - s *Service - project string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a GlobalForwardingRule resource in the specified project -// using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { - c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall { - 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 -// details. -func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of GlobalForwardingRule resources available to -// the -// specified project. -// -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { - c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalForwardingRulesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.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 *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, 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 := &ForwardingRuleList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalForwardingRulesPatchCall struct { - s *Service - project string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified forwarding rule with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. Currently, you can only -// patch the network_tier field. -// -// - forwardingRule: Name of the ForwardingRule resource to patch. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { - c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesPatchCall) RequestId(requestId string) *GlobalForwardingRulesPatchCall { - 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 -// details. -func (c *GlobalForwardingRulesPatchCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesPatchCall) Context(ctx context.Context) *GlobalForwardingRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.forwardingrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}") - 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the specified resource. To learn more about -// labels, -// read the -// Labeling resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { - c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesSetTargetCall struct { - s *Service - project string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTarget: Changes target URL for the GlobalForwardingRule resource. The new -// target -// should be of the same type as the old target. -// -// - forwardingRule: Name of the ForwardingRule resource in which target is to -// be set. -// - project: Project ID for this request. -func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { - c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.forwardingRule = forwardingRule - c.targetreference = targetreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall { - 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 -// details. -func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{forwardingRule}/setTarget") - 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{ - "project": c.project, - "forwardingRule": c.forwardingRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setTarget", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.setTarget" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalForwardingRulesSetTargetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.setTarget", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { - c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/forwardingRules/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalForwardingRules.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalForwardingRules.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a network endpoint to the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsattachendpointsrequest = globalnetworkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalnetworkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsDeleteCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group.Note that the NEG -// cannot be -// deleted if there are backend services referencing it. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Delete(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsDeleteCall { - c := &GlobalNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach the network endpoint from the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// removing network -// -// endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - c.globalnetworkendpointgroupsdetachendpointsrequest = globalnetworkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalnetworkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsGetCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Get(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsGetCall { - c := &GlobalNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsGetCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsInsertCall struct { - s *Service - project string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpointgroup *NetworkEndpointGroup) *GlobalNetworkEndpointGroupsInsertCall { - c := &GlobalNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalNetworkEndpointGroupsInsertCall) RequestId(requestId string) *GlobalNetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *GlobalNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalNetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalNetworkEndpointGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of network endpoint groups that are located in -// the -// specified project. -// -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) List(project string) *GlobalNetworkEndpointGroupsListCall { - c := &GlobalNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalNetworkEndpointGroupsListCall) Filter(filter string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalNetworkEndpointGroupsListCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *GlobalNetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsListCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalNetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -func (r *GlobalNetworkEndpointGroupsService) ListNetworkEndpoints(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c := &GlobalNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalNetworkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalNetworkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all operations. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { - c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *GlobalOperationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOperationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *GlobalOperationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationAggregatedList.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 *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, 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 := &OperationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsDeleteCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Delete(project string, operationid string) *GlobalOperationsDeleteCall { - c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type GlobalOperationsGetCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Get(project string, operationid string) *GlobalOperationsGetCall { - c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOperationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// project. -// -// - project: Project ID for this request. -func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { - c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalOperationsWaitCall struct { - s *Service - project string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method differs from the -// `GET` method in that it waits for no more than the default -// deadline (2 minutes) and then returns the current state of the -// operation, -// which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Wait(project string, operationid string) *GlobalOperationsWaitCall { - c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOperationsWaitCall) Fields(s ...googleapi.Field) *GlobalOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOperationsWaitCall) Context(ctx context.Context) *GlobalOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOrganizationOperationsDeleteCall struct { - s *Service - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -func (r *GlobalOrganizationOperationsService) Delete(operationid string) *GlobalOrganizationOperationsDeleteCall { - c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operationid = operationid - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *GlobalOrganizationOperationsDeleteCall) ParentId(parentId string) *GlobalOrganizationOperationsDeleteCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsDeleteCall) Context(ctx context.Context) *GlobalOrganizationOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.delete" call. -func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type GlobalOrganizationOperationsGetCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified Operations resource. Gets a list of -// operations -// by making a `list()` request. -// -// - operation: Name of the Operations resource to return. Parent is derived -// from this -// -// field. -func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { - c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// Not used. Parent is derived from resource_id. -func (c *GlobalOrganizationOperationsGetCall) ParentId(parentId string) *GlobalOrganizationOperationsGetCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOrganizationOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsGetCall) Context(ctx context.Context) *GlobalOrganizationOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalOrganizationOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalOrganizationOperationsListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within the -// specified -// organization. -func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperationsListCall { - c := &GlobalOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalOrganizationOperationsListCall) Filter(filter string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalOrganizationOperationsListCall) MaxResults(maxResults int64) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalOrganizationOperationsListCall) OrderBy(orderBy string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalOrganizationOperationsListCall) PageToken(pageToken string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *GlobalOrganizationOperationsListCall) ParentId(parentId string) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalOrganizationOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalOrganizationOperationsListCall) Fields(s ...googleapi.Field) *GlobalOrganizationOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalOrganizationOperationsListCall) IfNoneMatch(entityTag string) *GlobalOrganizationOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalOrganizationOperationsListCall) Context(ctx context.Context) *GlobalOrganizationOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalOrganizationOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalOrganizationOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalOrganizationOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalOrganizationOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalPublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified global PublicDelegatedPrefix. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesDeleteCall { - c := &GlobalPublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesDeleteCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesGetCall struct { - s *Service - project string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified global PublicDelegatedPrefix resource. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -func (r *GlobalPublicDelegatedPrefixesService) Get(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesGetCall { - c := &GlobalPublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalPublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalPublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesGetCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.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 *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, 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 := &PublicDelegatedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesInsertCall struct { - s *Service - project string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a global PublicDelegatedPrefix in the specified project -// using the -// parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesInsertCall { - c := &GlobalPublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesInsertCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalPublicDelegatedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the global PublicDelegatedPrefixes for a project. -// -// - project: Project ID for this request. -func (r *GlobalPublicDelegatedPrefixesService) List(project string) *GlobalPublicDelegatedPrefixesListCall { - c := &GlobalPublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalPublicDelegatedPrefixesListCall) Filter(filter string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalPublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalPublicDelegatedPrefixesListCall) OrderBy(orderBy string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalPublicDelegatedPrefixesListCall) PageToken(pageToken string) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalPublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesListCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.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 *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, 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 := &PublicDelegatedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalPublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalPublicDelegatedPrefixesPatchCall struct { - s *Service - project string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified global PublicDelegatedPrefix resource with the -// data -// included in the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesPatchCall { - c := &GlobalPublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesPatchCall { - 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 -// details. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalPublicDelegatedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") - 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{ - "project": c.project, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalPublicDelegatedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalPublicDelegatedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalPublicDelegatedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all VM Extension Policy -// resources -// available to the specified project. -// -// To prevent failure, it's recommended that you set the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *GlobalVmExtensionPoliciesService) AggregatedList(project string) *GlobalVmExtensionPoliciesAggregatedListCall { - c := &GlobalVmExtensionPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Filter(filter string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalVmExtensionPoliciesAggregatedListCall) MaxResults(maxResults int64) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) OrderBy(orderBy string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) PageToken(pageToken string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicyAggregatedListResponse.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 *GlobalVmExtensionPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicyAggregatedListResponse, 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 := &VmExtensionPolicyAggregatedListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalVmExtensionPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*VmExtensionPolicyAggregatedListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalVmExtensionPoliciesDeleteCall struct { - s *Service - project string - globalVmExtensionPolicy string - globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Purge scoped resources (zonal policies) from a global VM -// extension -// policy, and then delete the global VM extension policy. Purge of the -// scoped -// resources is a pre-condition of the global VM extension policy deletion. -// The deletion of the global VM extension policy happens after the -// purge -// rollout is done, so it's not a part of the LRO. It's an automatic -// process -// that triggers in the backend. -// -// - globalVmExtensionPolicy: Name of the global VM extension policy to purge -// scoped resources for. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Delete(project string, globalVmExtensionPolicy string, globalvmextensionpolicyrolloutoperationrolloutinput *GlobalVmExtensionPolicyRolloutOperationRolloutInput) *GlobalVmExtensionPoliciesDeleteCall { - c := &GlobalVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - c.globalvmextensionpolicyrolloutoperationrolloutinput = globalvmextensionpolicyrolloutoperationrolloutinput - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesDeleteCall) RequestId(requestId string) *GlobalVmExtensionPoliciesDeleteCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicyrolloutoperationrolloutinput) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}/delete") - 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{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesGetCall struct { - s *Service - project string - globalVmExtensionPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a global VM extension policy. -// -// - globalVmExtensionPolicy: Name of the GlobalVmExtensionPolicy resource to -// return. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Get(project string, globalVmExtensionPolicy string) *GlobalVmExtensionPoliciesGetCall { - c := &GlobalVmExtensionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesGetCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesGetCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesGetCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GlobalVmExtensionPolicy.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 *GlobalVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GlobalVmExtensionPolicy, 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 := &GlobalVmExtensionPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesInsertCall struct { - s *Service - project string - globalvmextensionpolicy *GlobalVmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new project level GlobalVmExtensionPolicy. -// -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Insert(project string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesInsertCall { - c := &GlobalVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalvmextensionpolicy = globalvmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesInsertCall) RequestId(requestId string) *GlobalVmExtensionPoliciesInsertCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesInsertCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type GlobalVmExtensionPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists global VM extension policies. -// -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) List(project string) *GlobalVmExtensionPoliciesListCall { - c := &GlobalVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *GlobalVmExtensionPoliciesListCall) Filter(filter string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *GlobalVmExtensionPoliciesListCall) MaxResults(maxResults int64) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *GlobalVmExtensionPoliciesListCall) OrderBy(orderBy string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *GlobalVmExtensionPoliciesListCall) PageToken(pageToken string) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *GlobalVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *GlobalVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *GlobalVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *GlobalVmExtensionPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesListCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *GlobalVmExtensionPolicyList.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 *GlobalVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*GlobalVmExtensionPolicyList, 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 := &GlobalVmExtensionPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *GlobalVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*GlobalVmExtensionPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type GlobalVmExtensionPoliciesUpdateCall struct { - s *Service - project string - globalVmExtensionPolicy string - globalvmextensionpolicy *GlobalVmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a global VM extension policy. -// -// - globalVmExtensionPolicy: Name of the global VM extension policy to update. -// - project: Project ID for this request. -func (r *GlobalVmExtensionPoliciesService) Update(project string, globalVmExtensionPolicy string, globalvmextensionpolicy *GlobalVmExtensionPolicy) *GlobalVmExtensionPoliciesUpdateCall { - c := &GlobalVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.globalVmExtensionPolicy = globalVmExtensionPolicy - c.globalvmextensionpolicy = globalvmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *GlobalVmExtensionPoliciesUpdateCall) RequestId(requestId string) *GlobalVmExtensionPoliciesUpdateCall { - 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 -// details. -func (c *GlobalVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *GlobalVmExtensionPoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *GlobalVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *GlobalVmExtensionPoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *GlobalVmExtensionPoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *GlobalVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalvmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/vmExtensionPolicies/{globalVmExtensionPolicy}") - 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{ - "project": c.project, - "globalVmExtensionPolicy": c.globalVmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.globalVmExtensionPolicies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *GlobalVmExtensionPoliciesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.globalVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthCheck resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { - c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *HealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *HealthChecksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *HealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *HealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthChecksAggregatedList.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 *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, 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 := &HealthChecksAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HealthChecksDeleteCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { - c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall { - 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 -// details. -func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksGetCall struct { - s *Service - project string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { - c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.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 *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, 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 := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksInsertCall struct { - s *Service - project string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { - c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall { - 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 -// details. -func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HealthChecksService) List(project string) *HealthChecksListCall { - c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.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 *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, 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 := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HealthChecksPatchCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { - c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall { - 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 -// details. -func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - 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{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { - c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HealthChecksUpdateCall struct { - s *Service - project string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - healthCheck: Name of the HealthCheck resource to update. -// - project: Project ID for this request. -func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { - c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall { - 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 -// details. -func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.healthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.healthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.healthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksDeleteCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpHealthCheck resource. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { - c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall { - 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 -// details. -func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksGetCall struct { - s *Service - project string - httpHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpHealthCheck resource. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to return. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { - c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpHealthCheck.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 *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, 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 := &HttpHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksInsertCall struct { - s *Service - project string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { - c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall { - 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 -// details. -func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpHealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { - c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HttpHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpHealthCheckList.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 *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, 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 := &HttpHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HttpHealthChecksPatchCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpHealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { - c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall { - 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 -// details. -func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - 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{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { - c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpHealthChecksUpdateCall struct { - s *Service - project string - httpHealthCheck string - httphealthcheck *HttpHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - httpHealthCheck: Name of the HttpHealthCheck resource to update. -// - project: Project ID for this request. -func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { - c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpHealthCheck = httpHealthCheck - c.httphealthcheck = httphealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall { - 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 -// details. -func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httphealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpHealthChecks/{httpHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpHealthCheck": c.httpHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksDeleteCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HttpsHealthCheck resource. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to delete. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { - c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall { - 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 -// details. -func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksGetCall struct { - s *Service - project string - httpsHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HttpsHealthCheck resource. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to return. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { - c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheck.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 *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, 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 := &HttpsHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksInsertCall struct { - s *Service - project string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { - c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall { - 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 -// details. -func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HttpsHealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { - c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *HttpsHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *HttpsHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpsHealthCheckList.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 *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, 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 := &HttpsHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type HttpsHealthChecksPatchCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to patch. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { - c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall { - 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 -// details. -func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - 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{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { - c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type HttpsHealthChecksUpdateCall struct { - s *Service - project string - httpsHealthCheck string - httpshealthcheck *HttpsHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HttpsHealthCheck resource in the specified project using -// the data -// included in the request. -// -// - httpsHealthCheck: Name of the HttpsHealthCheck resource to update. -// - project: Project ID for this request. -func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { - c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.httpsHealthCheck = httpsHealthCheck - c.httpshealthcheck = httpshealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall { - 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 -// details. -func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *HttpsHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httpshealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "httpsHealthCheck": c.httpsHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.httpsHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *HttpsHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.httpsHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImageFamilyViewsGetCall struct { - s *Service - project string - zone string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the latest image that is part of an image family, is -// not -// deprecated and is rolled out in the specified zone. -// -// - family: Name of the image family to search for. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *ImageFamilyViewsService) Get(project string, zone string, family string) *ImageFamilyViewsGetCall { - c := &ImageFamilyViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImageFamilyViewsGetCall) Fields(s ...googleapi.Field) *ImageFamilyViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImageFamilyViewsGetCall) IfNoneMatch(entityTag string) *ImageFamilyViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImageFamilyViewsGetCall) Context(ctx context.Context) *ImageFamilyViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImageFamilyViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImageFamilyViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/imageFamilyViews/{family}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "family": c.family, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.imageFamilyViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.imageFamilyViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ImageFamilyView.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 *ImageFamilyViewsGetCall) Do(opts ...googleapi.CallOption) (*ImageFamilyView, 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 := &ImageFamilyView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.imageFamilyViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesDeleteCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified image. -// -// - image: Name of the image resource to delete. -// - project: Project ID for this request. -func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { - c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall { - 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 -// details. -func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesDeprecateCall struct { - s *Service - project string - image string - deprecationstatus *DeprecationStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Deprecate: Sets the deprecation status of an image. -// -// If an empty request body is given, clears the deprecation status instead. -// -// - image: Image name. -// - project: Project ID for this request. -func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { - c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.deprecationstatus = deprecationstatus - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall { - 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 -// details. -func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesDeprecateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.deprecationstatus) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}/deprecate") - 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{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.deprecate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.deprecate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesDeprecateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.deprecate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetCall struct { - s *Service - project string - image string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified image. -// -// - image: Name of the image resource to return. -// - project: Project ID for this request. -func (r *ImagesService) Get(project string, image string) *ImagesGetCall { - c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Image.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 *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, 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 := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetFromFamilyCall struct { - s *Service - project string - family string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetFromFamily: Returns the latest image that is part of an image family and -// is not -// deprecated. For more information on image families, seePublic -// image families documentation. -// -// - family: Name of the image family to search for. -// - project: The image project that the image belongs to. For example, to get -// a CentOS -// -// image, specify centos-cloud as the image project. -func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { - c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.family = family - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetFromFamilyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/family/{family}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "family": c.family, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.getFromFamily", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getFromFamily" call. -// Any non-2xx status code is an error. Response headers are in either -// *Image.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 *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, 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 := &Image{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.getFromFamily", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { - c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *ImagesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesGetIamPolicyCall) Context(ctx context.Context) *ImagesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.getIamPolicy" call. -// 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 *ImagesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesInsertCall struct { - s *Service - project string - image *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an image in the specified project using the data included -// in the request. -// -// - project: Project ID for this request. -func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { - c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - return c -} - -// ForceCreate sets the optional parameter "forceCreate": Force image creation -// if true. -func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { - c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall { - 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 -// details. -func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.image) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of custom images -// available to the specified project. Custom images are images you -// create that belong to your project. This method does not -// get any images that belong to other projects, including -// publicly-available -// images, like Debian 8. If you want to get a list of -// publicly-available -// images, use this method to make a request to the respective image -// project, -// such as debian-cloud or windows-cloud. -// -// - project: Project ID for this request. -func (r *ImagesService) List(project string) *ImagesListCall { - c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ImagesListCall) Filter(filter string) *ImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ImagesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Zone sets the optional parameter "zone": The zone query parameter. -func (c *ImagesListCall) Zone(zone string) *ImagesListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ImageList.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 *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, 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 := &ImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ImagesPatchCall struct { - s *Service - project string - image string - image2 *Image - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified image with the data included in the -// request. -// Only the following fields can be modified: family, description, -// deprecation status. -// -// - image: Name of the image resource to patch. -// - project: Project ID for this request. -func (r *ImagesService) Patch(project string, image string, image2 *Image) *ImagesPatchCall { - c := &ImagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.image = image - c.image2 = image2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ImagesPatchCall) RequestId(requestId string) *ImagesPatchCall { - 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 -// details. -func (c *ImagesPatchCall) Fields(s ...googleapi.Field) *ImagesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesPatchCall) Context(ctx context.Context) *ImagesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.image2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{image}") - 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{ - "project": c.project, - "image": c.image, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { - c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *ImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesSetIamPolicyCall) Context(ctx context.Context) *ImagesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setIamPolicy" call. -// 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 *ImagesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an image. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { - c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ImagesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { - c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/images/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.images.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.images.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.images.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsCancelCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified resize request and removes it from the -// queue. -// Cancelled resize request does no longer wait for the resources to -// be -// provisioned. Cancel is only possible for requests that are accepted in -// the -// queue. -// -// - instanceGroupManager: The name of the managed instance group. -// The name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request to cancel. -// The name should conform to RFC1035 or be a resource ID. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Cancel(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsCancelCall { - c := &InstanceGroupManagerResizeRequestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsCancelCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsCancelCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified, inactive resize request. Requests that are -// still -// active cannot be deleted. Deleting request does not delete instances -// that -// were provisioned previously. -// -// - instanceGroupManager: The name of the managed instance group. -// The name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request to delete. -// The name should conform to RFC1035 or be a resource ID. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Delete(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsDeleteCall { - c := &InstanceGroupManagerResizeRequestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsDeleteCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsDeleteCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified resize request. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - resizeRequest: The name of the resize request. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the -// href="/compute/docs/regions-zones/#available">zone -// scoping this request. Name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Get(project string, zone string, instanceGroupManager string, resizeRequest string) *InstanceGroupManagerResizeRequestsGetCall { - c := &InstanceGroupManagerResizeRequestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagerResizeRequestsGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagerResizeRequestsGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagerResizeRequestsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsGetCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequest.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 *InstanceGroupManagerResizeRequestsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequest, 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 := &InstanceGroupManagerResizeRequest{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsInsertCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new resize request that starts provisioning VMs -// immediately -// or queues VM creation. -// -// - instanceGroupManager: The name of the managed instance group to which the -// resize request will -// be added. -// -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located and where the resize request will be -// created. -// -// Name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) Insert(project string, zone string, instanceGroupManager string, instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest) *InstanceGroupManagerResizeRequestsInsertCall { - c := &InstanceGroupManagerResizeRequestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerresizerequest = instancegroupmanagerresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagerResizeRequestsInsertCall) RequestId(requestId string) *InstanceGroupManagerResizeRequestsInsertCall { - 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 -// details. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagerResizeRequestsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagerResizeRequestsListCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of resize requests that are contained in the -// managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. The name -// should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. The name should conform to RFC1035. -func (r *InstanceGroupManagerResizeRequestsService) List(project string, zone string, instanceGroupManager string) *InstanceGroupManagerResizeRequestsListCall { - c := &InstanceGroupManagerResizeRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagerResizeRequestsListCall) Filter(filter string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagerResizeRequestsListCall) MaxResults(maxResults int64) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagerResizeRequestsListCall) OrderBy(orderBy string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagerResizeRequestsListCall) PageToken(pageToken string) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagerResizeRequestsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagerResizeRequestsListCall) Fields(s ...googleapi.Field) *InstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagerResizeRequestsListCall) IfNoneMatch(entityTag string) *InstanceGroupManagerResizeRequestsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagerResizeRequestsListCall) Context(ctx context.Context) *InstanceGroupManagerResizeRequestsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagerResizeRequestsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagerResizeRequestsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagerResizeRequests.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequestsListResponse.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 *InstanceGroupManagerResizeRequestsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequestsListResponse, 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 := &InstanceGroupManagerResizeRequestsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagerResizeRequests.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagerResizeRequestsListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerResizeRequestsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Flags the specified instances to be removed from -// the -// managed instance group. Abandoning an instance does not delete the -// instance, but it does remove the instance from any target pools that -// are -// applied by the managed instance group. This method reduces thetargetSize of -// the managed instance group by the -// number of instances that you abandon. This operation is marked asDONE when -// the action is scheduled even if the instances have -// not yet been removed from the group. You must separately verify the -// status of the abandoning action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { - c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.abandonInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.abandonInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersAbandonInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.abandonInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of managed instance groups and groups -// them by zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { - c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceGroupManagersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceGroupManagersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerAggregatedList.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 *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, 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 := &InstanceGroupManagerAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Applies changes to selected instances on the -// managed instance group. -// This method can be used to apply new overrides and/or new versions. -// -// - instanceGroupManager: The name of the managed instance group, should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. Should conform to RFC1035. -func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersapplyupdatesrequest = instancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *InstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.applyUpdatesToInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.applyUpdatesToInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.applyUpdatesToInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateInstances: Creates instances with per-instance configurations in this -// managed instance -// group. Instances are created using the current instance template. Thecreate -// instances operation is marked DONE if thecreateInstances request is -// successful. The underlying actions -// take additional time. You must separately verify the status of thecreating -// or actions with the listmanagedinstances -// method. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { - c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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. -// -// The request ID must be -// a valid UUID with the exception that zero UUID is not -// supported -// (00000000-0000-0000-0000-000000000000). -func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.createInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.createInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersCreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.createInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeleteCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances -// in that group. Note that the instance group must not belong to a -// backend service. Read -// Deleting an instance group for more information. -// -// - instanceGroupManager: The name of the managed instance group to delete. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { - c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall { - 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 -// details. -func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Flags the specified instances in the managed instance group -// for immediate -// deletion. The instances are also removed from any target -// pools of which they were a member. This method reduces thetargetSize of the -// managed instance group by the number of -// instances that you delete. This operation is marked as DONE -// when the action is scheduled even if the instances are still being -// deleted. -// You must separately verify the status of the deleting action -// with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { - c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deleteInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deleteInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeleteInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deleteInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Deletes selected per-instance configurations for -// the managed instance -// group. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance -// -// group is located. -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersdeleteperinstanceconfigsreq = instancegroupmanagersdeleteperinstanceconfigsreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersdeleteperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deletePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.deletePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.deletePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersGetCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { - c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.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 *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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 := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersGetAvailableAcceleratorTopologiesCall struct { - s *Service - project string - zone string - resourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAvailableAcceleratorTopologies: Returns information about available -// accelerator topologies for a given MIG. -// -// - project: Project ID for this request. -// - resourceId: The name of the managed instance group. -// It should conform to RFC1035. -// - zone: The name of thezone where the managed -// instance group is located. -// -// Name should conform to RFC1035. -func (r *InstanceGroupManagersService) GetAvailableAcceleratorTopologies(project string, zone string, resourceId string) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c := &InstanceGroupManagersGetAvailableAcceleratorTopologiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resourceId = resourceId - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Context(ctx context.Context) *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{resourceId}/getAvailableAcceleratorTopologies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resourceId": c.resourceId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.getAvailableAcceleratorTopologies" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse.ServerRespons -// e.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 *InstanceGroupManagersGetAvailableAcceleratorTopologiesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse, 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 := &InstanceGroupManagersGetAvailableAcceleratorTopologiesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.getAvailableAcceleratorTopologies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersInsertCall struct { - s *Service - project string - zone string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that you -// specify -// in the request. After the group is created, instances in the group -// are -// created using the specified instance template. -// This operation is marked as DONE when the group is created -// even if the instances in the group have not yet been created. You -// must separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// A managed instance group can have up to 1000 VM instances per group. -// Please -// contact Cloud Support if you need an increase in -// this limit. -// -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the managed instance group. -func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { - c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall { - 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 -// details. -func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of managed instance groups that are contained within -// the -// specified project and zone. -// -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { - c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerList.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 *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, 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 := &InstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListErrorsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListErrors: Lists all errors thrown by actions on instances for a given -// managed -// instance group. The filter and orderBy query -// parameters are not supported. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035, or an -// unsigned long integer: must match regexp pattern: -// (?:a-z (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListErrors(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListErrorsCall { - c := &InstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListErrorsCall) Filter(filter string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListErrorsCall) PageToken(pageToken string) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListErrorsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListErrorsCall) Context(ctx context.Context) *InstanceGroupManagersListErrorsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListErrorsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listErrors", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listErrors" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListErrorsResponse.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 *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListErrorsResponse, 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 := &InstanceGroupManagersListErrorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listErrors", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListErrorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists all of the instances in the managed instance -// group. Each instance -// in the list has a currentAction, which indicates the action -// that the managed instance group is performing on the instance. For -// example, -// if the group is still creating an instance, the currentAction -// is CREATING. If a previous action failed, the -// list displays the errors for that failed action. The orderBy -// query parameter is not supported. The `pageToken` query parameter -// is -// supported only if the group's `listManagedInstancesResults` field is set -// to `PAGINATED`. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { - c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listManagedInstances", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listManagedInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListManagedInstancesResponse.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 *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, 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 := &InstanceGroupManagersListManagedInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listManagedInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configurations defined -// for the managed -// instance group. The orderBy query parameter is not supported. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { - c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listPerInstanceConfigs", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.listPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagersListPerInstanceConfigsResp.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 *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListPerInstanceConfigsResp, 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 := &InstanceGroupManagersListPerInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.listPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListPerInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupManagersPatchCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is patched -// even if the instances in the group are still in the process of -// being -// patched. You must separately verify the status of the individual -// instances -// with thelistManagedInstances -// method. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone where -// you want to create the managed instance group. -func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { - c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall { - 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 -// details. -func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) PatchPerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c := &InstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerspatchperinstanceconfigsreq = instancegroupmanagerspatchperinstanceconfigsreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersPatchPerInstanceConfigsCall { - 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 -// details. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersPatchPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerspatchperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patchPerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.patchPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.patchPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Flags the specified VM instances in the managed instance -// group to be -// immediately recreated. Each instance is recreated using the group's -// current -// configuration. This operation is marked as DONE when the flag -// is set even if the instances have not yet been recreated. You -// must -// separately verify the status of each instance by checking itscurrentAction -// field; for more information, see Checking -// the status of managed instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { - c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersrecreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.recreateInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.recreateInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersRecreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.recreateInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResizeCall struct { - s *Service - project string - zone string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the managed instance group. If you increase the size, the -// group -// creates new instances using the current instance template. If you -// decrease -// the size, the group deletes instances. The resize operation is markedDONE -// when the resize actions are scheduled even if the group -// has not yet added or deleted any instances. You must separately -// verify the status of the creating or deleting -// actions with thelistmanagedinstances -// method. -// -// When resizing down, the instance group arbitrarily chooses the order -// in -// which VMs are deleted. The group takes into account some VM attributes -// when -// making the selection including: -// -// + The status of the VM instance. -// + The health of the VM instance. -// + The instance template version the VM is based on. -// + For regional managed instance groups, the location of the VM -// instance. -// -// This list is subject to change. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - size: The number of running instances that the managed instance group -// should -// maintain at any given time. The group automatically adds or -// removes -// instances to maintain the number of instances specified by this parameter. -// - zone: The name of thezone where the managed -// -// instance group is located. -func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { - c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall { - 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 -// details. -func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resize", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the managed instance group with advanced -// configuration options like -// disabling creation retries. This is an extended version of theresize -// method. -// -// If you increase the size of the instance group, the group creates -// new -// instances using the current instance template. If you decrease the size, -// the group deletes instances. The resize operation is markedDONE when the -// resize actions are scheduled even if the group -// has not yet added or deleted any instances. You must separately -// verify the status of the creating,creatingWithoutRetries, or deleting -// actions with -// the get -// orlistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { - c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall { - 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 -// details. -func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resizeAdvanced", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResizeAdvancedCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resizeAdvanced", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersResumeInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResumeInstances: Flags the specified instances in the managed instance group -// to be -// resumed. This method increases thetargetSize and decreases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// resume. -// The resumeInstances operation is marked DONE if -// the resumeInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theRESUMING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are suspended. -// For -// example, if an instance was previously suspended using the -// suspendInstances -// method, it can be resumed using the resumeInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are resumed. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) ResumeInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest) *InstanceGroupManagersResumeInstancesCall { - c := &InstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersresumeinstancesrequest = instancegroupmanagersresumeinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *InstanceGroupManagersResumeInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResumeInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *InstanceGroupManagersResumeInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersResumeInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersresumeinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resumeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.resumeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersResumeInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.resumeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Motifies the autohealing policy for the instances in -// this managed -// instance group. -// [Deprecated] This method is deprecated. UseinstanceGroupManagers.patch -// instead. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall { - 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 -// details. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setAutoHealingPolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setAutoHealingPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Specifies the instance template to use when creating -// new instances in this -// group. The templates for existing instances in the group do not -// change -// unless you run recreateInstances, runapplyUpdatesToInstances, or set the -// group'supdatePolicy.type to PROACTIVE. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { - c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall { - 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 -// details. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssetinstancetemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setInstanceTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetInstanceTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setInstanceTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all instances in this -// managed instance -// group are assigned. The target pools automatically apply to all of -// the -// instances in the managed instance group. This operation is markedDONE when -// you make the request even if the instances have not -// yet been added to their target pools. The change might take some time -// to -// apply to all of the instances in the group depending on the size of -// the -// group. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { - c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall { - 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 -// details. -func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setTargetPools", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.setTargetPools" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSetTargetPoolsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.setTargetPools", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersStartInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartInstances: Flags the specified instances in the managed instance group -// to be -// started. This method increases thetargetSize and decreases the -// targetStoppedSize -// of the managed instance group by the number of instances that you start. -// The startInstances operation is marked DONE if -// the startInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTARTING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are stopped. -// For -// example, if an instance was previously stopped using the -// stopInstances -// method, it can be started using the startInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are started. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) StartInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest) *InstanceGroupManagersStartInstancesCall { - c := &InstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersstartinstancesrequest = instancegroupmanagersstartinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersStartInstancesCall) RequestId(requestId string) *InstanceGroupManagersStartInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStartInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStartInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersStartInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersstartinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.startInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.startInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersStartInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.startInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersStopInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopInstances: Flags the specified instances in the managed instance group -// to be -// immediately stopped. You can only specify instances that are running in -// this request. This method reduces thetargetSize and increases the -// targetStoppedSize -// of the managed instance group by the number of instances that you stop. -// The stopInstances operation is marked DONE if -// the stopInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTOPPING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays stopping the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is stopped. -// -// Stopped instances can be started using the startInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) StopInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest) *InstanceGroupManagersStopInstancesCall { - c := &InstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersstopinstancesrequest = instancegroupmanagersstopinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersStopInstancesCall) RequestId(requestId string) *InstanceGroupManagersStopInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStopInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStopInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersStopInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersstopinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.stopInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.stopInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersStopInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.stopInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersSuspendInstancesCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SuspendInstances: Flags the specified instances in the managed instance -// group to be -// immediately suspended. You can only specify instances that are running -// in -// this request. This method reduces thetargetSize and increases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// suspend. -// The suspendInstances operation is marked DONE if -// the suspendInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSUSPENDING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays suspension of the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is -// suspended. -// -// Suspended instances can be resumed using the resumeInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - zone: The name of thezone where the managed -// instance group is located. -func (r *InstanceGroupManagersService) SuspendInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest) *InstanceGroupManagersSuspendInstancesCall { - c := &InstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerssuspendinstancesrequest = instancegroupmanagerssuspendinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *InstanceGroupManagersSuspendInstancesCall { - 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 -// details. -func (c *InstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSuspendInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *InstanceGroupManagersSuspendInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersSuspendInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerssuspendinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.suspendInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.suspendInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersSuspendInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.suspendInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { - c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersUpdateCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is updated -// even if the instances in the group have not yet been updated. You -// must -// separately verify the status of the individual instances with -// thelistManagedInstances -// method. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the managed instance group. -func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { - c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall { - 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 -// details. -func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of thezone -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - 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 -// details. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagersupdateperinstanceconfigsreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.updatePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroupManagers.updatePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstances: Adds a list of instances to the specified instance group. All -// of the -// instances in the instance group must be in the same network/subnetwork. -// Read -// Adding instances for more information. -// -// - instanceGroup: The name of the instance group where you are adding -// instances. -// - project: Project ID for this request. -// - zone: The name of the zone -// -// where the instance group is located. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { - 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 -// details. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupsaddinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.addInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.addInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.addInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of instance groups and sorts them by -// zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.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 *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, 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 := &InstanceGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance group. The instances in the group are -// not -// deleted. Note that instance group must not belong to a backend -// service. -// Read -// Deleting an instance group for more information. -// -// - instanceGroup: The name of the instance group to delete. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { - 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 -// details. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified zonal instance group. Get a list of available -// zonal -// instance groups by making a list() request. -// -// For managed instance groups, use theinstanceGroupManagers -// or regionInstanceGroupManagers -// methods instead. -// -// - instanceGroup: The name of the instance group. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroup.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 *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, 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 := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone -// where you want to create the instance group. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { - 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 -// details. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of zonal instance group resources contained within -// the -// specified zone. -// -// For managed instance groups, use theinstanceGroupManagers -// or regionInstanceGroupManagers -// methods instead. -// -// - project: Project ID for this request. -// - zone: The name of thezone -// where the instance group is located. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.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 *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, 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 := &InstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group. -// The orderBy query parameter is not supported. -// The filter query parameter is supported, but only for -// expressions that use `eq` (equal) or `ne` (not equal) operators. -// -// - instanceGroup: The name of the instance group from which you want to -// generate a list -// -// of included instances. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.listInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.listInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.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 *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, 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 := &InstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.listInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstances: Removes one or more instances from the specified instance -// group, but does -// not delete those instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration before the VM instance is removed or deleted. -// -// - instanceGroup: The name of the instance group where the specified -// instances will be -// -// removed. -// - project: Project ID for this request. -// - zone: The name of the zone -// where the instance group is located. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { - 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 -// details. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.removeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.removeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.removeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified instance group. -// -// - instanceGroup: The name of the instance group where the named ports are -// updated. -// - project: Project ID for this request. -// - zone: The name of the zone -// -// where the instance group is located. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { - 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 -// details. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") - 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.setNamedPorts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.setNamedPorts" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.setNamedPorts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { - c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceSettingsGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Instance settings. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstanceSettingsService) Get(project string, zone string) *InstanceSettingsGetCall { - c := &InstanceSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceSettingsGetCall) IfNoneMatch(entityTag string) *InstanceSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsGetCall) Context(ctx context.Context) *InstanceSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceSettings.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 *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSettings, 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 := &InstanceSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceSettingsPatchCall struct { - s *Service - project string - zone string - instancesettings *InstanceSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Instance settings -// -// - project: Project ID for this request. -// - zone: The zone scoping this request. It should conform to RFC1035. -func (r *InstanceSettingsService) Patch(project string, zone string, instancesettings *InstanceSettings) *InstanceSettingsPatchCall { - c := &InstanceSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancesettings = instancesettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceSettingsPatchCall) RequestId(requestId string) *InstanceSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *InstanceSettingsPatchCall) UpdateMask(updateMask string) *InstanceSettingsPatchCall { - 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 -// details. -func (c *InstanceSettingsPatchCall) Fields(s ...googleapi.Field) *InstanceSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsPatchCall) Context(ctx context.Context) *InstanceSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all InstanceTemplates resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { - c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstanceTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateAggregatedList.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 *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, 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 := &InstanceTemplateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. Deleting an instance -// template is -// permanent and cannot be undone. It is not possible to delete templates -// that are already in use by a managed instance group. -// -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { - 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 -// details. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. -// -// - instanceTemplate: The name of the instance template. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instanceTemplate = instanceTemplate - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstanceTemplatesGetCall) View(view string) *InstanceTemplatesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.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 *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, 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 := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { - c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.getIamPolicy" call. -// 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 *InstanceTemplatesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesInsertCall struct { - s *Service - project string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project using the -// data that is included in the request. If you are creating a new template -// to -// update an existing instance group, your new instance template must use -// the -// same network or, if applicable, the same subnetwork as the -// original -// template. -// -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancetemplate = instancetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { - 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 -// details. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstanceTemplatesListCall) View(view string) *InstanceTemplatesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.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 *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, 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 := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstanceTemplatesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { - c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.setIamPolicy" call. -// 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 *InstanceTemplatesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instanceTemplates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceTemplates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instanceTemplates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAccessConfig: Adds an access config to an instance's network interface. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to add to this -// instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - 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 -// details. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accessconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addAccessConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddNetworkInterface: Adds one dynamic network interface to an active -// instance. -// -// - instance: The instance name for this request stored as resource_id. -// Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddNetworkInterface(project string, zone string, instance string, networkinterface *NetworkInterface) *InstancesAddNetworkInterfaceCall { - c := &InstancesAddNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.networkinterface = networkinterface - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddNetworkInterfaceCall) RequestId(requestId string) *InstancesAddNetworkInterfaceCall { - 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 -// details. -func (c *InstancesAddNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesAddNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddNetworkInterfaceCall) Context(ctx context.Context) *InstancesAddNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkinterface) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addNetworkInterface", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAddResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to an instance. You can -// only add one -// policy right now which will be applied to this instance for scheduling -// live -// migrations. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { - c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { - 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 -// details. -func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the instances in your -// project -// across all regions and zones. -// -// The performance of this method degrades when a filter is specified on -// a -// project that has a very large number of instances. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstancesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.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 *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, 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 := &InstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachDisk: Attaches an existing Disk resource to an instance. You must -// first -// create the disk before you can attach it. It is not possible to create -// and attach a disk at the same time. For more information, readAdding -// a -// persistent disk to your instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// ForceAttach sets the optional parameter "forceAttach": Whether to force -// attach the regional disk even if it's currently attached -// to another instance. If you try to force attach a zonal disk to an -// instance, you will receive an error. -func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { - c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - 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 -// details. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.attacheddisk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.attachDisk", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.attachDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAttachDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.attachDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Creates multiple instances. Count specifies the number of -// instances to -// create. For more information, seeAbout bulk -// creation of VMs. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { - c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.bulkinsertinstanceresource = bulkinsertinstanceresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { - 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 -// details. -func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertinstanceresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Instance resource. For more information, -// seeDeleting -// an instance. -// -// - instance: Name of the instance resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set -// to true, Graceful Shutdown is skipped. -func (c *InstancesDeleteCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesDeleteCall { - c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { - 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 -// details. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteAccessConfig: Deletes an access config from an instance's network -// interface. -// -// - accessConfig: The name of the access config to delete. -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { - 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 -// details. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.deleteAccessConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.deleteAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDeleteNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteNetworkInterface: Deletes one dynamic network interface from an active -// instance. -// InstancesDeleteNetworkInterfaceRequest indicates: -// - instance from which to delete, using project+zone+resource_id fields; -// - dynamic network interface to be deleted, using -// network_interface_name -// field; -// -// - instance: The instance name for this request stored as resource_id. -// Name should conform to RFC1035 or be an unsigned long integer. -// - networkInterfaceName: The name of the dynamic network interface to be -// deleted from the instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DeleteNetworkInterface(project string, zone string, instance string, networkInterfaceName string) *InstancesDeleteNetworkInterfaceCall { - c := &InstancesDeleteNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterfaceName", networkInterfaceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDeleteNetworkInterfaceCall) RequestId(requestId string) *InstancesDeleteNetworkInterfaceCall { - 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 -// details. -func (c *InstancesDeleteNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesDeleteNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteNetworkInterfaceCall) Context(ctx context.Context) *InstancesDeleteNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDeleteNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDeleteNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.deleteNetworkInterface", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.deleteNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.deleteNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachDisk: Detaches a disk from an instance. -// -// - deviceName: The device name of the disk to detach. Make a get() request -// on -// -// the instance to view currently attached disks and device names. -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { - 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 -// details. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.detachDisk", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.detachDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.detachDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Instance resource. -// -// - instance: Name of the instance resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// View sets the optional parameter "view": View of the instance. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstancesGetCall) View(view string) *InstancesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Instance.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 *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, 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 := &Instance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetEffectiveFirewallsCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns effective firewalls applied to an interface -// of the instance. -// -// - instance: Name of the instance scoping this request. -// - networkInterface: The name of the network interface to get the effective -// firewalls. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { - c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstancesGetEffectiveFirewallsResponse.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 *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, 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 := &InstancesGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetGuestAttributes: Returns the specified guest attributes entry. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// QueryPath sets the optional parameter "queryPath": Specifies the guest -// attributes path to be queried. -func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("queryPath", queryPath) - return c -} - -// VariableKey sets the optional parameter "variableKey": Specifies the key for -// the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetGuestAttributesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getGuestAttributes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getGuestAttributes" call. -// Any non-2xx status code is an error. Response headers are in either -// *GuestAttributes.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 *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, 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 := &GuestAttributes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getGuestAttributes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { - c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getIamPolicy" call. -// 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 *InstancesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetPartnerMetadataCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPartnerMetadata: Gets partner metadata of the specified instance and -// namespaces. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetPartnerMetadata(project string, zone string, instance string) *InstancesGetPartnerMetadataCall { - c := &InstancesGetPartnerMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Namespaces sets the optional parameter "namespaces": Comma separated partner -// metadata namespaces. -func (c *InstancesGetPartnerMetadataCall) Namespaces(namespaces string) *InstancesGetPartnerMetadataCall { - c.urlParams_.Set("namespaces", namespaces) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetPartnerMetadataCall) Fields(s ...googleapi.Field) *InstancesGetPartnerMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetPartnerMetadataCall) IfNoneMatch(entityTag string) *InstancesGetPartnerMetadataCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetPartnerMetadataCall) Context(ctx context.Context) *InstancesGetPartnerMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetPartnerMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetPartnerMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getPartnerMetadata") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getPartnerMetadata", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getPartnerMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *PartnerMetadata.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 *InstancesGetPartnerMetadataCall) Do(opts ...googleapi.CallOption) (*PartnerMetadata, 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 := &PartnerMetadata{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getPartnerMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetScreenshotCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetScreenshot: Returns the screenshot from the specified instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { - c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetScreenshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getScreenshot", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getScreenshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Screenshot.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 *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, 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 := &Screenshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getScreenshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the last 1 MB of serial port output from the -// specified instance. -// -// - instance: Name of the instance for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Port sets the optional parameter "port": Specifies which COM or serial port -// to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Specifies the starting byte -// position of the output to return. To start with -// the first byte of output to the specified port, omit this field or set it -// to `0`. -// -// If the output for that byte position is available, this field matches -// the -// `start` parameter sent with the request. If the amount of serial -// console -// output exceeds the size of the buffer (1 MB), the oldest output is -// discarded and is no longer available. If the requested start position -// refers to discarded output, the start position is adjusted to the -// oldest -// output still available, and the adjusted start position is returned as -// the -// `start` property value. -// -// You can also provide a negative start position, which translates to the -// most recent number of bytes written to the serial port. For example, -3 -// is -// interpreted as the most recent 3 bytes written to the serial console. -// Note -// that the negative start is bounded by the retained buffer size, and -// the -// returned serial console output will not exceed the max buffer size. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getSerialPortOutput", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getSerialPortOutput" call. -// Any non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.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 *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, 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 := &SerialPortOutput{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getSerialPortOutput", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetShieldedInstanceIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity of an -// instance -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { - c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getShieldedInstanceIdentity", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getShieldedInstanceIdentity" call. -// Any non-2xx status code is an error. Response headers are in either -// *ShieldedInstanceIdentity.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 *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, 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 := &ShieldedInstanceIdentity{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getShieldedInstanceIdentity", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesGetShieldedVmIdentityCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetShieldedVmIdentity: Returns the Shielded VM Identity of an instance -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { - c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesGetShieldedVmIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedVmIdentityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesGetShieldedVmIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedVmIdentityCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesGetShieldedVmIdentityCall) Context(ctx context.Context) *InstancesGetShieldedVmIdentityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.getShieldedVmIdentity", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.getShieldedVmIdentity" call. -// Any non-2xx status code is an error. Response headers are in either -// *ShieldedVmIdentity.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 *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedVmIdentity, 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 := &ShieldedVmIdentity{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.getShieldedVmIdentity", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstanceTemplate sets the optional parameter "sourceInstanceTemplate": -// Specifies instance template to create the instance. -// -// This field is optional. It can be a full or partial URL. For example, -// the -// following are all valid URLs to an instance template: -// -// - -// -// https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate -// - projects/project/global/instanceTemplates/instanceTemplate -// - global/instanceTemplates/instanceTemplate -func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { - c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) - return c -} - -// SourceMachineImage sets the optional parameter "sourceMachineImage": -// Specifies the machine image to use to create the instance. -// -// This field is optional. It can be a full or partial URL. For example, -// the -// following are all valid URLs to a machine image: -// -// - -// -// https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage -// - projects/project/global/global/machineImages/machineImage -// - global/machineImages/machineImage -func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { - c.urlParams_.Set("sourceMachineImage", sourceMachineImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instances contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *InstancesListCall) View(view string) *InstancesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceList.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 *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, 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 := &InstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesListReferrersCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListReferrers: Retrieves a list of resources that refer to the VM instance -// specified in -// the request. For example, if the VM instance is part of a managed -// or -// unmanaged instance group, the referrers list includes the instance -// group. -// For more information, readViewing -// referrers to VM instances. -// -// - instance: Name of the target instance scoping this request, or '-' if -// the -// -// request should span over all instances in the container. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.listReferrers", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.listReferrers" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.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 *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, 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 := &InstanceListReferrers{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.listReferrers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstancesPatchPartnerMetadataCall struct { - s *Service - project string - zone string - instance string - partnermetadata *PartnerMetadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPartnerMetadata: Patches partner metadata of the specified instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) PatchPartnerMetadata(project string, zone string, instance string, partnermetadata *PartnerMetadata) *InstancesPatchPartnerMetadataCall { - c := &InstancesPatchPartnerMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.partnermetadata = partnermetadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesPatchPartnerMetadataCall) RequestId(requestId string) *InstancesPatchPartnerMetadataCall { - 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 -// details. -func (c *InstancesPatchPartnerMetadataCall) Fields(s ...googleapi.Field) *InstancesPatchPartnerMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPatchPartnerMetadataCall) Context(ctx context.Context) *InstancesPatchPartnerMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPatchPartnerMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPatchPartnerMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.partnermetadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/patchPartnerMetadata") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.patchPartnerMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.patchPartnerMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPatchPartnerMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.patchPartnerMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesPerformMaintenanceCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform a manual maintenance on the instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) PerformMaintenance(project string, zone string, instance string) *InstancesPerformMaintenanceCall { - c := &InstancesPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesPerformMaintenanceCall) RequestId(requestId string) *InstancesPerformMaintenanceCall { - 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 -// details. -func (c *InstancesPerformMaintenanceCall) Fields(s ...googleapi.Field) *InstancesPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesPerformMaintenanceCall) Context(ctx context.Context) *InstancesPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.performMaintenance", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from an instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { - c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { - 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 -// details. -func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesReportHostAsFaultyCall struct { - s *Service - project string - zone string - instance string - instancesreporthostasfaultyrequest *InstancesReportHostAsFaultyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ReportHostAsFaulty: Mark the host as faulty and try to restart the instance -// on a new host. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ReportHostAsFaulty(project string, zone string, instance string, instancesreporthostasfaultyrequest *InstancesReportHostAsFaultyRequest) *InstancesReportHostAsFaultyCall { - c := &InstancesReportHostAsFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesreporthostasfaultyrequest = instancesreporthostasfaultyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesReportHostAsFaultyCall) RequestId(requestId string) *InstancesReportHostAsFaultyCall { - 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 -// details. -func (c *InstancesReportHostAsFaultyCall) Fields(s ...googleapi.Field) *InstancesReportHostAsFaultyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesReportHostAsFaultyCall) Context(ctx context.Context) *InstancesReportHostAsFaultyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesReportHostAsFaultyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesReportHostAsFaultyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesreporthostasfaultyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reportHostAsFaulty") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.reportHostAsFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reportHostAsFaulty" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesReportHostAsFaultyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.reportHostAsFaulty", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reset: Performs a reset on the instance. This is a hard reset. The VM -// does not do a graceful shutdown. For more information, seeResetting -// an instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { - 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 -// details. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesResetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.reset", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.reset" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.reset", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesResumeCall struct { - s *Service - project string - zone string - instance string - instancesresumerequest *InstancesResumeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resume: Resumes an instance that was suspended using -// theinstances().suspend -// method. -// -// - instance: Name of the instance resource to resume. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { - c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesresumerequest = instancesresumerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { - 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 -// details. -func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesResumeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesresumerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.resume", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.resume" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResumeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.resume", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSendDiagnosticInterruptCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { - c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.sendDiagnosticInterrupt", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.sendDiagnosticInterrupt" call. -func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.sendDiagnosticInterrupt", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type InstancesSetDeletionProtectionCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDeletionProtection: Sets deletion protection on the instance. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { - c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// DeletionProtection sets the optional parameter "deletionProtection": Whether -// the resource should be protected against deletion. -func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { - 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 -// details. -func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetDeletionProtectionCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setDeletionProtection", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDeletionProtection" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDeletionProtectionCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setDeletionProtection", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetDiskAutoDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to an -// instance. -// -// - autoDelete: Whether to auto-delete the disk when the instance is deleted. -// - deviceName: The device name of the disk to modify. Make a get() request -// on the instance to view currently attached disks and device names. -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { - 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 -// details. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setDiskAutoDelete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setDiskAutoDelete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setDiskAutoDelete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { - c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setIamPolicy" call. -// 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 *InstancesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets labels on an instance. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { - 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 -// details. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineResources: Changes the number and/or type of accelerator for a -// stopped instance to the -// values specified in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { - 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 -// details. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMachineResources", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineResources" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMachineResources", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMachineType: Changes the machine type for a stopped instance to the -// machine -// type specified in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { - 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 -// details. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMachineType", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMachineType" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMachineType", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMetadataCall struct { - s *Service - project string - zone string - instance string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMetadata: Sets metadata for the specified instance to the data -// included -// in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.metadata = metadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { - 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 -// details. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMinCpuPlatform: Changes the minimum CPU platform that this instance -// should use. -// This method can only -// be called on a stopped instance. For more information, readSpecifying -// a -// Minimum CPU Platform. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { - 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 -// details. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setMinCpuPlatform", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setMinCpuPlatform" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setMinCpuPlatform", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetNameCall struct { - s *Service - project string - zone string - instance string - instancessetnamerequest *InstancesSetNameRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetName: Sets name of an instance. -// -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { - c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetnamerequest = instancessetnamerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { - 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 -// details. -func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetNameCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetnamerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setName", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setName" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetNameCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setName", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetScheduling: Sets an instance's scheduling options. You can only call this -// method on astopped instance, -// that is, a VM instance that is in a `TERMINATED` state. SeeInstance -// Life -// Cycle for more information on the possible instance states. -// For more information about setting scheduling options for a VM, seeSet -// VM host maintenance policy. -// -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.scheduling = scheduling - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { - 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 -// details. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.scheduling) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setScheduling", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setScheduling" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setScheduling", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetSecurityPolicyCall struct { - s *Service - project string - zone string - instance string - instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified instance. -// For more information, seeGoogle -// Cloud Armor Overview -// -// - instance: Name of the Instance resource to which the security policy -// should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { - c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { - 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 -// details. -func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetsecuritypolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetServiceAccount: Sets the service account on the instance. For more -// information, -// readChanging -// the service account and access scopes for an instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { - 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 -// details. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancessetserviceaccountrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setServiceAccount", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setServiceAccount" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setServiceAccount", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetShieldedInstanceIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance integrity -// policy for an instance. You can -// only use this method on a running instance. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { - 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 -// details. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedinstanceintegritypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setShieldedInstanceIntegrityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setShieldedInstanceIntegrityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetShieldedVmIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy for a VM -// instance. You can -// only use this method on a running VM instance. This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { - c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedvmintegritypolicy = shieldedvmintegritypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetShieldedVmIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedVmIntegrityPolicyCall { - 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 -// details. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedVmIntegrityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedVmIntegrityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedvmintegritypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedVmIntegrityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setShieldedVmIntegrityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setShieldedVmIntegrityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetShieldedVmIntegrityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setShieldedVmIntegrityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTags: Sets network tags -// for the specified instance to the data included in the request. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.tags = tags - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { - 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 -// details. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tags) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.setTags", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.setTags" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.setTags", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. For -// more information, see -// Simulate a host maintenance event. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// WithExtendedNotifications sets the optional parameter -// "withExtendedNotifications": Determines whether the customers receive -// notifications before migration. -// Only applicable to SF vms. -func (c *InstancesSimulateMaintenanceEventCall) WithExtendedNotifications(withExtendedNotifications bool) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("withExtendedNotifications", fmt.Sprint(withExtendedNotifications)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.simulateMaintenanceEvent", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.simulateMaintenanceEvent" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.simulateMaintenanceEvent", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStartCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts an instance that was stopped using theinstances().stop -// method. For more information, seeRestart an -// instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { - 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 -// details. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.start", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.start" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.start", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartWithEncryptionKey: Starts an instance that was stopped using -// theinstances().stop -// method. For more information, seeRestart an -// instance. -// -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { - 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 -// details. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.startWithEncryptionKey", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.startWithEncryptionKey" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.startWithEncryptionKey", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur -// VM usage charges while they are stopped. However, resources that the VM -// is -// using, such as persistent disks and static IP addresses, will continue to -// be charged until they are deleted. For more information, seeStopping -// an instance. -// -// - instance: Name of the instance resource to stop. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. -// If false, Local SSD data will be preserved when the instance is -// suspended. -// If true, the contents of any attached Local SSD disks will be discarded. -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - return c -} - -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set -// to true, Graceful Shutdown is skipped. -func (c *InstancesStopCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesStopCall { - c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { - 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 -// details. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.stop", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.stop" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStopCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.stop", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesSuspendCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Suspend: This method suspends a running instance, saving its state to -// persistent -// storage, and allows you to resume the instance at a later time. -// Suspended -// instances have no compute costs (cores or RAM), and incur only -// storage -// charges for the saved VM memory and localSSD data. Any charged resources -// the virtual machine was using, such as persistent disks and static -// IP -// addresses, will continue to be charged while the instance is suspended. -// For more information, see -// Suspending and resuming an instance. -// -// - instance: Name of the instance resource to suspend. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { - c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. -// If false, Local SSD data will be preserved when the instance is -// suspended. -// If true, the contents of any attached Local SSD disks will be discarded. -func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { - 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 -// details. -func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesSuspendCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.suspend", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.suspend" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSuspendCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.suspend", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateCall struct { - s *Service - project string - zone string - instance string - instance2 *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an instance only if the necessary resources are available. -// This -// method can update only a specific set of instance properties. See -// Updating a running instance for a list of updatable instance -// properties. -// -// - instance: Name of the instance resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.instance2 = instance2 - return c -} - -// MinimalAction sets the optional parameter "minimalAction": Specifies the -// action to take when updating an instance even if the -// updated properties do not require it. If not specified, then -// Compute Engine acts based on the minimum action that the updated -// properties require. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { - c.urlParams_.Set("minimalAction", minimalAction) - return c -} - -// MostDisruptiveAllowedAction sets the optional parameter -// "mostDisruptiveAllowedAction": Specifies the most disruptive action that can -// be taken on the instance -// as part of the update. Compute Engine returns an error if the -// instance properties require a more disruptive action as part of the -// instance update. Valid options from lowest to highest are -// NO_EFFECT, REFRESH, and RESTART. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { - c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { - 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 -// details. -func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instance2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateAccessConfig: Updates the specified access config from an instance's -// network interface -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface where the access -// config is attached. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { - c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { - 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 -// details. -func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateAccessConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.accessconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateAccessConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateAccessConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateAccessConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateAccessConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateDisplayDeviceCall struct { - s *Service - project string - zone string - instance string - displaydevice *DisplayDevice - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateDisplayDevice: Updates the Display config for a VM instance. You -// can -// only use this method on a stopped VM instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { - c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.displaydevice = displaydevice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { - 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 -// details. -func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.displaydevice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateDisplayDevice", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateDisplayDevice" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateDisplayDeviceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateDisplayDevice", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateNetworkInterface: Updates an instance's network interface. This method -// can only update an -// interface's alias IP range and attached network. See Modifying -// alias IP ranges for an existing instance for instructions on -// changing alias IP ranges. See Migrating -// a VM between networks for instructions on migrating an interface. -// This method follows PATCH semantics. -// -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { - c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.networkinterface = networkinterface - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { - 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 -// details. -func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkinterface) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateNetworkInterface", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateNetworkInterface" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateNetworkInterfaceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateNetworkInterface", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateShieldedInstanceConfigCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceconfig *ShieldedInstanceConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateShieldedInstanceConfig: Updates the Shielded Instance config for an -// instance. You can -// only use this method on a stopped instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name or id of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { - c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedinstanceconfig = shieldedinstanceconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { - 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 -// details. -func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedinstanceconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedInstanceConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateShieldedInstanceConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedInstanceConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedInstanceConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstancesUpdateShieldedVmConfigCall struct { - s *Service - project string - zone string - instance string - shieldedvmconfig *ShieldedVmConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateShieldedVmConfig: Updates the Shielded VM config for a VM instance. -// You can -// only use this method on a stopped VM instance. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { - c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance - c.shieldedvmconfig = shieldedvmconfig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstancesUpdateShieldedVmConfigCall) RequestId(requestId string) *InstancesUpdateShieldedVmConfigCall { - 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 -// details. -func (c *InstancesUpdateShieldedVmConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedVmConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateShieldedVmConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedVmConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.shieldedvmconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedVmConfig") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedVmConfig", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instances.updateShieldedVmConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedVmConfigCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instances.updateShieldedVmConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of instantSnapshots. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InstantSnapshotsService) AggregatedList(project string) *InstantSnapshotsAggregatedListCall { - c := &InstantSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstantSnapshotsAggregatedListCall) Filter(filter string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InstantSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsAggregatedListCall) MaxResults(maxResults int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstantSnapshotsAggregatedListCall) OrderBy(orderBy string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstantSnapshotsAggregatedListCall) PageToken(pageToken string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstantSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InstantSnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *InstantSnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsAggregatedListCall) Context(ctx context.Context) *InstantSnapshotsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotAggregatedList.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 *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotAggregatedList, 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 := &InstantSnapshotAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstantSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*InstantSnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstantSnapshotsDeleteCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that -// deleting -// a single instantSnapshot might not necessarily delete all the data on -// that -// instantSnapshot. If any data on the instantSnapshot that is marked -// for -// deletion is needed for subsequent instantSnapshots, the data will be -// moved -// to the next corresponding instantSnapshot. -// -// For more information, seeDeleting -// instantSnapshots. -// -// - instantSnapshot: Name of the InstantSnapshot resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Delete(project string, zone string, instantSnapshot string) *InstantSnapshotsDeleteCall { - c := &InstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshot = instantSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapshotsDeleteCall { - 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 -// details. -func (c *InstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsDeleteCall) Context(ctx context.Context) *InstantSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsGetCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InstantSnapshot resource in the specified zone. -// -// - instantSnapshot: Name of the InstantSnapshot resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Get(project string, zone string, instantSnapshot string) *InstantSnapshotsGetCall { - c := &InstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantSnapshot = instantSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetCall) Context(ctx context.Context) *InstantSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshot.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 *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, 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 := &InstantSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotsGetIamPolicyCall { - c := &InstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.getIamPolicy" call. -// 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 *InstantSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsInsertCall struct { - s *Service - project string - zone string - instantsnapshot *InstantSnapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instant snapshot in the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstantSnapshotsService) Insert(project string, zone string, instantsnapshot *InstantSnapshot) *InstantSnapshotsInsertCall { - c := &InstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instantsnapshot = instantsnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapshotsInsertCall { - 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 -// details. -func (c *InstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsInsertCall) Context(ctx context.Context) *InstantSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of InstantSnapshot resources contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnapshotsListCall { - c := &InstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InstantSnapshotsListCall) Filter(filter string) *InstantSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InstantSnapshotsListCall) IfNoneMatch(entityTag string) *InstantSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsListCall) Context(ctx context.Context) *InstantSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotList.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 *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, 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 := &InstantSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InstantSnapshotsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotsSetIamPolicyCall { - c := &InstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.setIamPolicy" call. -// 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 *InstantSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a instantSnapshot in the given zone. To learn -// more about -// labels, read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *InstantSnapshotsSetLabelsCall { - c := &InstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InstantSnapshotsSetLabelsCall) RequestId(requestId string) *InstantSnapshotsSetLabelsCall { - 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 -// details. -func (c *InstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetLabelsCall) Context(ctx context.Context) *InstantSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels") - 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotsTestIamPermissionsCall { - c := &InstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstantSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.instantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instantSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.instantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsDeleteCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InterconnectAttachmentGroup in the given scope -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to delete. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Delete(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsDeleteCall { - c := &InterconnectAttachmentGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsDeleteCall) RequestId(requestId string) *InterconnectAttachmentGroupsDeleteCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InterconnectAttachmentGroup resource in the -// given -// scope. -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to return. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Get(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsGetCall { - c := &InterconnectAttachmentGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroup.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 *InterconnectAttachmentGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroup, 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 := &InterconnectAttachmentGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) GetIamPolicy(project string, resource string) *InterconnectAttachmentGroupsGetIamPolicyCall { - c := &InterconnectAttachmentGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.getIamPolicy" call. -// 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 *InterconnectAttachmentGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsGetOperationalStatusCall struct { - s *Service - project string - interconnectAttachmentGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOperationalStatus: Returns the InterconnectAttachmentStatuses for the -// specified -// InterconnectAttachmentGroup resource. -// -// - interconnectAttachmentGroup: Name of the interconnectAttachmentGroup -// resource to query. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) GetOperationalStatus(project string, interconnectAttachmentGroup string) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c := &InterconnectAttachmentGroupsGetOperationalStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Context(ctx context.Context) *InterconnectAttachmentGroupsGetOperationalStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsGetOperationalStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/getOperationalStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getOperationalStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.getOperationalStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroupsGetOperationalStatusResponse.ServerResponse.Head -// er 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 *InterconnectAttachmentGroupsGetOperationalStatusCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroupsGetOperationalStatusResponse, 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 := &InterconnectAttachmentGroupsGetOperationalStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.getOperationalStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsInsertCall struct { - s *Service - project string - interconnectattachmentgroup *InterconnectAttachmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a InterconnectAttachmentGroup in the specified project in -// the given -// scope using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Insert(project string, interconnectattachmentgroup *InterconnectAttachmentGroup) *InterconnectAttachmentGroupsInsertCall { - c := &InterconnectAttachmentGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectattachmentgroup = interconnectattachmentgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsInsertCall) RequestId(requestId string) *InterconnectAttachmentGroupsInsertCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsInsertCall) Context(ctx context.Context) *InterconnectAttachmentGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the InterconnectAttachmentGroups for a project in the given -// scope. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) List(project string) *InterconnectAttachmentGroupsListCall { - c := &InterconnectAttachmentGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentGroupsListCall) Filter(filter string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentGroupsListCall) MaxResults(maxResults int64) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentGroupsListCall) OrderBy(orderBy string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentGroupsListCall) PageToken(pageToken string) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentGroupsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsListCall) Context(ctx context.Context) *InterconnectAttachmentGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentGroupsListResponse.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 *InterconnectAttachmentGroupsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentGroupsListResponse, 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 := &InterconnectAttachmentGroupsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentGroupsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentGroupsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentGroupsPatchCall struct { - s *Service - project string - interconnectAttachmentGroup string - interconnectattachmentgroup *InterconnectAttachmentGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified InterconnectAttachmentGroup resource with the -// data -// included in the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - interconnectAttachmentGroup: Name of the InterconnectAttachmentGroup -// resource to patch. -// - project: Project ID for this request. -func (r *InterconnectAttachmentGroupsService) Patch(project string, interconnectAttachmentGroup string, interconnectattachmentgroup *InterconnectAttachmentGroup) *InterconnectAttachmentGroupsPatchCall { - c := &InterconnectAttachmentGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectAttachmentGroup = interconnectAttachmentGroup - c.interconnectattachmentgroup = interconnectattachmentgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectAttachmentGroupsPatchCall) RequestId(requestId string) *InterconnectAttachmentGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. -func (c *InterconnectAttachmentGroupsPatchCall) UpdateMask(updateMask string) *InterconnectAttachmentGroupsPatchCall { - 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 -// details. -func (c *InterconnectAttachmentGroupsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsPatchCall) Context(ctx context.Context) *InterconnectAttachmentGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}") - 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{ - "project": c.project, - "interconnectAttachmentGroup": c.interconnectAttachmentGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectAttachmentGroupsSetIamPolicyCall { - c := &InterconnectAttachmentGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Context(ctx context.Context) *InterconnectAttachmentGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.setIamPolicy" call. -// 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 *InterconnectAttachmentGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentGroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentGroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c := &InterconnectAttachmentGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachmentGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectAttachmentGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of interconnect -// attachments. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { - c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *InterconnectAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *InterconnectAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentAggregatedList.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 *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, 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 := &InterconnectAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentsDeleteCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified interconnect attachment. -// -// - interconnectAttachment: Name of the interconnect attachment to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { - c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { - 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 -// details. -func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsGetCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified interconnect attachment. -// -// - interconnectAttachment: Name of the interconnect attachment to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { - c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachment.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 *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, 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 := &InterconnectAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsInsertCall struct { - s *Service - project string - region string - interconnectattachment *InterconnectAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an InterconnectAttachment in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { - c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectattachment = interconnectattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *InterconnectAttachmentsInsertCall) ValidateOnly(validateOnly bool) *InterconnectAttachmentsInsertCall { - 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 -// details. -func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect attachments contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { - c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentList.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 *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, 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 := &InterconnectAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectAttachmentsPatchCall struct { - s *Service - project string - region string - interconnectAttachment string - interconnectattachment *InterconnectAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified interconnect attachment with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - interconnectAttachment: Name of the interconnect attachment to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { - c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - c.interconnectattachment = interconnectattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsPatchCall) RequestId(requestId string) *InterconnectAttachmentsPatchCall { - 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 -// details. -func (c *InterconnectAttachmentsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsPatchCall) Context(ctx context.Context) *InterconnectAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") - 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{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an InterconnectAttachment. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { - c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectAttachmentsSetLabelsCall) RequestId(requestId string) *InterconnectAttachmentsSetLabelsCall { - 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 -// details. -func (c *InterconnectAttachmentsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsSetLabelsCall) Context(ctx context.Context) *InterconnectAttachmentsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { - c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsCreateMembersCall struct { - s *Service - project string - interconnectGroup string - interconnectgroupscreatemembersrequest *InterconnectGroupsCreateMembersRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateMembers: Create Interconnects with redundancy by creating them in a -// specified -// interconnect group. -// -// - interconnectGroup: Name of the group resource to create members for. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) CreateMembers(project string, interconnectGroup string, interconnectgroupscreatemembersrequest *InterconnectGroupsCreateMembersRequest) *InterconnectGroupsCreateMembersCall { - c := &InterconnectGroupsCreateMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - c.interconnectgroupscreatemembersrequest = interconnectgroupscreatemembersrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsCreateMembersCall) Fields(s ...googleapi.Field) *InterconnectGroupsCreateMembersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsCreateMembersCall) Context(ctx context.Context) *InterconnectGroupsCreateMembersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsCreateMembersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsCreateMembersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroupscreatemembersrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}/createMembers") - 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{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.createMembers", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.createMembers" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsCreateMembersCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.createMembers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsDeleteCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InterconnectGroup in the given scope -// -// - interconnectGroup: Name of the InterconnectGroup resource to delete. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Delete(project string, interconnectGroup string) *InterconnectGroupsDeleteCall { - c := &InterconnectGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsDeleteCall) RequestId(requestId string) *InterconnectGroupsDeleteCall { - 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 -// details. -func (c *InterconnectGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsDeleteCall) Context(ctx context.Context) *InterconnectGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InterconnectGroup resource in the given scope. -// -// - interconnectGroup: Name of the InterconnectGroup resource to return. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Get(project string, interconnectGroup string) *InterconnectGroupsGetCall { - c := &InterconnectGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsGetCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetCall) Context(ctx context.Context) *InterconnectGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroup.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 *InterconnectGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectGroup, 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 := &InterconnectGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) GetIamPolicy(project string, resource string) *InterconnectGroupsGetIamPolicyCall { - c := &InterconnectGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InterconnectGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *InterconnectGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetIamPolicyCall) Context(ctx context.Context) *InterconnectGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.getIamPolicy" call. -// 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 *InterconnectGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsGetOperationalStatusCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOperationalStatus: Returns the interconnectStatuses for the -// specified -// InterconnectGroup. -// -// - interconnectGroup: Name of the interconnectGroup resource to query. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) GetOperationalStatus(project string, interconnectGroup string) *InterconnectGroupsGetOperationalStatusCall { - c := &InterconnectGroupsGetOperationalStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsGetOperationalStatusCall) Fields(s ...googleapi.Field) *InterconnectGroupsGetOperationalStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsGetOperationalStatusCall) IfNoneMatch(entityTag string) *InterconnectGroupsGetOperationalStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsGetOperationalStatusCall) Context(ctx context.Context) *InterconnectGroupsGetOperationalStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsGetOperationalStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsGetOperationalStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}/getOperationalStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getOperationalStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.getOperationalStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroupsGetOperationalStatusResponse.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 *InterconnectGroupsGetOperationalStatusCall) Do(opts ...googleapi.CallOption) (*InterconnectGroupsGetOperationalStatusResponse, 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 := &InterconnectGroupsGetOperationalStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.getOperationalStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsInsertCall struct { - s *Service - project string - interconnectgroup *InterconnectGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a InterconnectGroup in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Insert(project string, interconnectgroup *InterconnectGroup) *InterconnectGroupsInsertCall { - c := &InterconnectGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectgroup = interconnectgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsInsertCall) RequestId(requestId string) *InterconnectGroupsInsertCall { - 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 -// details. -func (c *InterconnectGroupsInsertCall) Fields(s ...googleapi.Field) *InterconnectGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsInsertCall) Context(ctx context.Context) *InterconnectGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the InterconnectGroups for a project in the given scope. -// -// - project: Project ID for this request. -func (r *InterconnectGroupsService) List(project string) *InterconnectGroupsListCall { - c := &InterconnectGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectGroupsListCall) Filter(filter string) *InterconnectGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectGroupsListCall) MaxResults(maxResults int64) *InterconnectGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectGroupsListCall) OrderBy(orderBy string) *InterconnectGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectGroupsListCall) PageToken(pageToken string) *InterconnectGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsListCall) Fields(s ...googleapi.Field) *InterconnectGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectGroupsListCall) IfNoneMatch(entityTag string) *InterconnectGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsListCall) Context(ctx context.Context) *InterconnectGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroupsListResponse.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 *InterconnectGroupsListCall) Do(opts ...googleapi.CallOption) (*InterconnectGroupsListResponse, 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 := &InterconnectGroupsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectGroupsListCall) Pages(ctx context.Context, f func(*InterconnectGroupsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectGroupsPatchCall struct { - s *Service - project string - interconnectGroup string - interconnectgroup *InterconnectGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified InterconnectGroup resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - interconnectGroup: Name of the InterconnectGroup resource to patch. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Patch(project string, interconnectGroup string, interconnectgroup *InterconnectGroup) *InterconnectGroupsPatchCall { - c := &InterconnectGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - c.interconnectgroup = interconnectgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *InterconnectGroupsPatchCall) RequestId(requestId string) *InterconnectGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. -func (c *InterconnectGroupsPatchCall) UpdateMask(updateMask string) *InterconnectGroupsPatchCall { - 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 -// details. -func (c *InterconnectGroupsPatchCall) Fields(s ...googleapi.Field) *InterconnectGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsPatchCall) Context(ctx context.Context) *InterconnectGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - 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{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectGroupsSetIamPolicyCall { - c := &InterconnectGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InterconnectGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsSetIamPolicyCall) Context(ctx context.Context) *InterconnectGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.setIamPolicy" call. -// 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 *InterconnectGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectGroupsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectGroupsTestIamPermissionsCall { - c := &InterconnectGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectGroups/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectLocationsGetCall struct { - s *Service - project string - interconnectLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details for the specified interconnect location. Gets a -// list of -// available interconnect locations by making a list() request. -// -// - interconnectLocation: Name of the interconnect location to return. -// - project: Project ID for this request. -func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { - c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectLocation = interconnectLocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations/{interconnectLocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectLocation": c.interconnectLocation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectLocations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocation.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 *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, 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 := &InterconnectLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectLocations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect locations available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { - c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectLocationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectLocations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectLocations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocationList.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 *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, 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 := &InterconnectLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectLocations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectRemoteLocationsGetCall struct { - s *Service - project string - interconnectRemoteLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details for the specified interconnect remote location. -// Gets a -// list of available interconnect remote locations by making alist() request. -// -// - interconnectRemoteLocation: Name of the interconnect remote location to -// return. -// - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { - c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectRemoteLocation = interconnectRemoteLocation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnectRemoteLocation": c.interconnectRemoteLocation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectRemoteLocations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocation.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 *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, 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 := &InterconnectRemoteLocation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectRemoteLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of interconnect remote locations available to -// the -// specified project. -// -// - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { - c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectRemoteLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectRemoteLocations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocationList.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 *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, 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 := &InterconnectRemoteLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnectRemoteLocations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectsDeleteCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Interconnect. -// -// - interconnect: Name of the interconnect to delete. -// - project: Project ID for this request. -func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { - c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { - 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 -// details. -func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Interconnect. Get a list of available -// Interconnects -// by making a list() request. -// -// - interconnect: Name of the interconnect to return. -// - project: Project ID for this request. -func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { - c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Interconnect.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 *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, 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 := &Interconnect{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetDiagnosticsCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetDiagnostics: Returns the interconnectDiagnostics for the -// specified -// Interconnect. -// -// In the event of a -// global outage, do not use this API to make decisions about where to -// redirect your network traffic. -// -// Unlike a VLAN attachment, which is regional, a Cloud Interconnect -// connection is a global resource. A global outage can prevent this -// API from functioning properly. -// -// - interconnect: Name of the interconnect resource to query. -// - project: Project ID for this request. -func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { - c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *InterconnectsGetDiagnosticsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetDiagnosticsCall) IfNoneMatch(entityTag string) *InterconnectsGetDiagnosticsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetDiagnosticsCall) Context(ctx context.Context) *InterconnectsGetDiagnosticsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getDiagnostics") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.getDiagnostics", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getDiagnostics" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetDiagnosticsResponse.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 *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetDiagnosticsResponse, 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 := &InterconnectsGetDiagnosticsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.getDiagnostics", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsGetMacsecConfigCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetMacsecConfig: Returns the interconnectMacsecConfig for the -// specified -// Interconnect. -// -// - interconnect: Name of the interconnect resource to query. -// - project: Project ID for this request. -func (r *InterconnectsService) GetMacsecConfig(project string, interconnect string) *InterconnectsGetMacsecConfigCall { - c := &InterconnectsGetMacsecConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsGetMacsecConfigCall) Fields(s ...googleapi.Field) *InterconnectsGetMacsecConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsGetMacsecConfigCall) IfNoneMatch(entityTag string) *InterconnectsGetMacsecConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetMacsecConfigCall) Context(ctx context.Context) *InterconnectsGetMacsecConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsGetMacsecConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.getMacsecConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.getMacsecConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetMacsecConfigResponse.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 *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetMacsecConfigResponse, 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 := &InterconnectsGetMacsecConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.getMacsecConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsInsertCall struct { - s *Service - project string - interconnect *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an Interconnect in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { - c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { - 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 -// details. -func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnect) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Interconnects available to the specified -// project. -// -// - project: Project ID for this request. -func (r *InterconnectsService) List(project string) *InterconnectsListCall { - c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *InterconnectsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectList.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 *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, 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 := &InterconnectList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type InterconnectsPatchCall struct { - s *Service - project string - interconnect string - interconnect2 *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified Interconnect with the data included in the -// request. -// This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - interconnect: Name of the interconnect to update. -// - project: Project ID for this request. -func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { - c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - c.interconnect2 = interconnect2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { - 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 -// details. -func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnect2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") - 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{ - "project": c.project, - "interconnect": c.interconnect, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on an Interconnect. To learn more about -// labels, -// read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { - c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsSetLabelsCall) Context(ctx context.Context) *InterconnectsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { - c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnects.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.interconnects.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesGetCall struct { - s *Service - project string - licenseCode string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Return a specified license code. License codes are mirrored across -// all projects that have permissions to read the License Code. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - licenseCode: Number corresponding to the License code resource to return. -// - project: Project ID for this request. -func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { - c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.licenseCode = licenseCode - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicenseCodesGetCall) IfNoneMatch(entityTag string) *LicenseCodesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesGetCall) Context(ctx context.Context) *LicenseCodesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{licenseCode}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "licenseCode": c.licenseCode, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LicenseCode.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 *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, 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 := &LicenseCode{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicenseCodesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { - c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicenseCodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicenseCodesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicenseCodesTestIamPermissionsCall) Context(ctx context.Context) *LicenseCodesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenseCodes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenseCodes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenseCodes.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesDeleteCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified license. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: Name of the license resource to delete. -// - project: Project ID for this request. -func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { - c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { - 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 -// details. -func (c *LicensesDeleteCall) Fields(s ...googleapi.Field) *LicensesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesDeleteCall) Context(ctx context.Context) *LicensesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesGetCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified License resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: Name of the License resource to return. -// - project: Project ID for this request. -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *License.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 *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, 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 := &License{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { - c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.getIamPolicy" call. -// 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 *LicensesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesInsertCall struct { - s *Service - project string - license *License - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a License resource in the specified project. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { - c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { - 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 -// details. -func (c *LicensesInsertCall) Fields(s ...googleapi.Field) *LicensesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesInsertCall) Context(ctx context.Context) *LicensesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.license) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of licenses -// available in the specified project. This method does not -// get any licenses that belong to other projects, including licenses -// attached -// to publicly-available images, like Debian 9. If you want to get a list -// of -// publicly-available licenses, use this method to make a request to -// the -// respective image project, such as debian-cloud orwindows-cloud. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -func (r *LicensesService) List(project string) *LicensesListCall { - c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *LicensesListCall) Filter(filter string) *LicensesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *LicensesListCall) MaxResults(maxResults int64) *LicensesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *LicensesListCall) OrderBy(orderBy string) *LicensesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *LicensesListCall) PageToken(pageToken string) *LicensesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *LicensesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *LicensesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesListCall) Fields(s ...googleapi.Field) *LicensesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *LicensesListCall) IfNoneMatch(entityTag string) *LicensesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesListCall) Context(ctx context.Context) *LicensesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *LicensesListResponse.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 *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListResponse, 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 := &LicensesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *LicensesListCall) Pages(ctx context.Context, f func(*LicensesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type LicensesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { - c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.setIamPolicy" call. -// 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 *LicensesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { - c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicensesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesTestIamPermissionsCall) Context(ctx context.Context) *LicensesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type LicensesUpdateCall struct { - s *Service - project string - license string - license2 *License - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a License resource in the specified project. -// -// *Caution* This resource is intended -// -// for use only by third-party partners who are creatingCloud -// Marketplace -// images. -// -// - license: The license name for this request. -// - project: Project ID for this request. -func (r *LicensesService) Update(project string, license string, license2 *License) *LicensesUpdateCall { - c := &LicensesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.license = license - c.license2 = license2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *LicensesUpdateCall) RequestId(requestId string) *LicensesUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *LicensesUpdateCall) UpdateMask(updateMask string) *LicensesUpdateCall { - 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 -// details. -func (c *LicensesUpdateCall) Fields(s ...googleapi.Field) *LicensesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesUpdateCall) Context(ctx context.Context) *LicensesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.license2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - 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{ - "project": c.project, - "license": c.license, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.licenses.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.licenses.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.licenses.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesDeleteCall struct { - s *Service - project string - machineImage string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified machine image. Deleting a machine image is -// permanent -// and cannot be undone. -// -// - machineImage: The name of the machine image to delete. -// - project: Project ID for this request. -func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { - c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineImage = machineImage - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDeleteCall { - 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 -// details. -func (c *MachineImagesDeleteCall) Fields(s ...googleapi.Field) *MachineImagesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesDeleteCall) Context(ctx context.Context) *MachineImagesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesGetCall struct { - s *Service - project string - machineImage string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine image. -// -// - machineImage: The name of the machine image. -// - project: Project ID for this request. -func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { - c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineImage = machineImage - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesGetCall) IfNoneMatch(entityTag string) *MachineImagesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetCall) Context(ctx context.Context) *MachineImagesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineImage.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 *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, 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 := &MachineImage{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { - c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *MachineImagesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetIamPolicyCall) Context(ctx context.Context) *MachineImagesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.getIamPolicy" call. -// 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 *MachineImagesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesInsertCall struct { - s *Service - project string - machineimage *MachineImage - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a machine image in the specified project using the -// data that is included in the request. If you are creating a new -// machine -// image to update an existing instance, your new machine image should use -// the -// same network or, if applicable, the same subnetwork as the -// original -// instance. -// -// - project: Project ID for this request. -func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { - c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.machineimage = machineimage - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *MachineImagesInsertCall) RequestId(requestId string) *MachineImagesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstance sets the optional parameter "sourceInstance": Required. -// Source instance that is used to create the machine image from. -func (c *MachineImagesInsertCall) SourceInstance(sourceInstance string) *MachineImagesInsertCall { - c.urlParams_.Set("sourceInstance", sourceInstance) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesInsertCall) Fields(s ...googleapi.Field) *MachineImagesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesInsertCall) Context(ctx context.Context) *MachineImagesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.machineimage) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine images that are contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *MachineImagesService) List(project string) *MachineImagesListCall { - c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineImagesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineImagesListCall) IfNoneMatch(entityTag string) *MachineImagesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesListCall) Context(ctx context.Context) *MachineImagesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineImageList.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 *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageList, 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 := &MachineImageList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type MachineImagesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { - c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesSetIamPolicyCall) Context(ctx context.Context) *MachineImagesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.setIamPolicy" call. -// 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 *MachineImagesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a machine image. To learn more about labels, -// read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *MachineImagesSetLabelsCall { - c := &MachineImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesSetLabelsCall) Fields(s ...googleapi.Field) *MachineImagesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesSetLabelsCall) Context(ctx context.Context) *MachineImagesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineImagesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { - c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *MachineImagesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineImagesTestIamPermissionsCall) Context(ctx context.Context) *MachineImagesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineImages.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineImages.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineImages.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of machine types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *MachineTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *MachineTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.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 *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, 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 := &MachineTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type MachineTypesGetCall struct { - s *Service - project string - zone string - machineType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified machine type. -// -// - machineType: Name of the machine type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.machineType = machineType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes/{machineType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineType.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 *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, 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 := &MachineType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type MachineTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of machine types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *MachineTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *MachineTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.machineTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.machineTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MachineTypeList.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 *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, 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 := &MachineTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.machineTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all NetworkAttachment -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkAttachmentsService) AggregatedList(project string) *NetworkAttachmentsAggregatedListCall { - c := &NetworkAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkAttachmentsAggregatedListCall) Filter(filter string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsAggregatedListCall) MaxResults(maxResults int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsAggregatedListCall) OrderBy(orderBy string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkAttachmentsAggregatedListCall) PageToken(pageToken string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsAggregatedListCall) Context(ctx context.Context) *NetworkAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentAggregatedList.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 *NetworkAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentAggregatedList, 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 := &NetworkAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsDeleteCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NetworkAttachment in the given scope -// -// - networkAttachment: Name of the NetworkAttachment resource to delete. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Delete(project string, region string, networkAttachment string) *NetworkAttachmentsDeleteCall { - c := &NetworkAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsDeleteCall) RequestId(requestId string) *NetworkAttachmentsDeleteCall { - 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 -// details. -func (c *NetworkAttachmentsDeleteCall) Fields(s ...googleapi.Field) *NetworkAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsDeleteCall) Context(ctx context.Context) *NetworkAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsGetCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NetworkAttachment resource in the given scope. -// -// - networkAttachment: Name of the NetworkAttachment resource to return. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Get(project string, region string, networkAttachment string) *NetworkAttachmentsGetCall { - c := &NetworkAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsGetCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsGetCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetCall) Context(ctx context.Context) *NetworkAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachment.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 *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAttachment, 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 := &NetworkAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) GetIamPolicy(project string, region string, resource string) *NetworkAttachmentsGetIamPolicyCall { - c := &NetworkAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NetworkAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.getIamPolicy" call. -// 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 *NetworkAttachmentsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsInsertCall struct { - s *Service - project string - region string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NetworkAttachment in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Insert(project string, region string, networkattachment *NetworkAttachment) *NetworkAttachmentsInsertCall { - c := &NetworkAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkattachment = networkattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsInsertCall) RequestId(requestId string) *NetworkAttachmentsInsertCall { - 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 -// details. -func (c *NetworkAttachmentsInsertCall) Fields(s ...googleapi.Field) *NetworkAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsInsertCall) Context(ctx context.Context) *NetworkAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the NetworkAttachments for a project in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) List(project string, region string) *NetworkAttachmentsListCall { - c := &NetworkAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkAttachmentsListCall) Filter(filter string) *NetworkAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsListCall) MaxResults(maxResults int64) *NetworkAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsListCall) OrderBy(orderBy string) *NetworkAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkAttachmentsListCall) PageToken(pageToken string) *NetworkAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkAttachmentsListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsListCall) Context(ctx context.Context) *NetworkAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentList.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 *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentList, 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 := &NetworkAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkAttachmentsListCall) Pages(ctx context.Context, f func(*NetworkAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkAttachmentsPatchCall struct { - s *Service - project string - region string - networkAttachment string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified NetworkAttachment resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - networkAttachment: Name of the NetworkAttachment resource to patch. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *NetworkAttachmentsService) Patch(project string, region string, networkAttachment string, networkattachment *NetworkAttachment) *NetworkAttachmentsPatchCall { - c := &NetworkAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkAttachment = networkAttachment - c.networkattachment = networkattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *NetworkAttachmentsPatchCall) RequestId(requestId string) *NetworkAttachmentsPatchCall { - 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 -// details. -func (c *NetworkAttachmentsPatchCall) Fields(s ...googleapi.Field) *NetworkAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsPatchCall) Context(ctx context.Context) *NetworkAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") - 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{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NetworkAttachmentsSetIamPolicyCall { - c := &NetworkAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsSetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.setIamPolicy" call. -// 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 *NetworkAttachmentsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkAttachmentsTestIamPermissionsCall { - c := &NetworkAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *NetworkAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService -// resources available to -// the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { - c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityServiceAggregatedList.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 *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, 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 := &NetworkEdgeSecurityServiceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEdgeSecurityServicesDeleteCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified service. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { - c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesGetCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a specified NetworkEdgeSecurityService. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// get. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { - c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityService.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 *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, 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 := &NetworkEdgeSecurityService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesInsertCall struct { - s *Service - project string - region string - networkedgesecurityservice *NetworkEdgeSecurityService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new service in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { - c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkedgesecurityservice = networkedgesecurityservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkedgesecurityservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEdgeSecurityServicesPatchCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - networkedgesecurityservice *NetworkEdgeSecurityService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - networkEdgeSecurityService: Name of the network edge security service to -// update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { - c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - c.networkedgesecurityservice = networkedgesecurityservice - return c -} - -// Paths sets the optional parameter "paths": -func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// updated as part of this request. -func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { - 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 -// details. -func (c *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEdgeSecurityServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkedgesecurityservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") - 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{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEdgeSecurityServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEdgeSecurityServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of network endpoint groups and sorts them -// by zone. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { - c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkEndpointGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupAggregatedList.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 *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, 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 := &NetworkEndpointGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsDeleteCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group. The network endpoints -// in the -// NEG and the VM instances they belong to are not terminated when the NEG -// is -// deleted. Note that the NEG cannot be deleted if there are backend -// services -// referencing it. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { - c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint -// group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// removing network -// -// endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsGetCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { - c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsInsertCall struct { - s *Service - project string - zone string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { - c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkEndpointGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of network endpoint groups that are located in -// the -// specified project and zone. -// -// - project: Project ID for this request. -// - zone: The name of thezone -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { - c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where -// the network endpoint group is located. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { - c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroupslistendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkEndpointGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { - c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkEndpointGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddAssociationCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesAddAssociationCall { - c := &NetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *NetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPacketMirroringRule: Inserts a packet mirroring rule into a firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddPacketMirroringRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesAddPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddPacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addPacketMirroringRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAddRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddRuleCall { - c := &NetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of network firewall policies, -// listing network -// firewall policies from all applicable scopes (global and regional) -// and -// grouping the results per scope. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AggregatedList(project string) *NetworkFirewallPoliciesAggregatedListCall { - c := &NetworkFirewallPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkFirewallPoliciesAggregatedListCall) Filter(filter string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NetworkFirewallPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkFirewallPoliciesAggregatedListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkFirewallPoliciesAggregatedListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkFirewallPoliciesAggregatedListCall) PageToken(pageToken string) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkFirewallPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NetworkFirewallPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAggregatedListCall) Context(ctx context.Context) *NetworkFirewallPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkFirewallPolicyAggregatedList.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 *NetworkFirewallPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkFirewallPolicyAggregatedList, 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 := &NetworkFirewallPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkFirewallPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkFirewallPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkFirewallPoliciesCloneRulesCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) CloneRules(project string, firewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c := &NetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *NetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *NetworkFirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesDeleteCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Delete(project string, firewallPolicy string) *NetworkFirewallPoliciesDeleteCall { - c := &NetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *NetworkFirewallPoliciesDeleteCall { - 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 -// details. -func (c *NetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *NetworkFirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Get(project string, firewallPolicy string) *NetworkFirewallPoliciesGetCall { - c := &NetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetAssociationCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried -// association belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesGetAssociationCall { - c := &NetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *NetworkFirewallPoliciesGetAssociationCall) Name(name string) *NetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) GetIamPolicy(project string, resource string) *NetworkFirewallPoliciesGetIamPolicyCall { - c := &NetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getIamPolicy" call. -// 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 *NetworkFirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetPacketMirroringRule: Gets a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetPacketMirroringRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesGetPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getPacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getPacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *NetworkFirewallPoliciesGetPacketMirroringRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesGetRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetRuleCall { - c := &NetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *NetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesInsertCall struct { - s *Service - project string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Insert(project string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesInsertCall { - c := &NetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesInsertCall) RequestId(requestId string) *NetworkFirewallPoliciesInsertCall { - 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 -// details. -func (c *NetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *NetworkFirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the specified -// project. -// -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) List(project string) *NetworkFirewallPoliciesListCall { - c := &NetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkFirewallPoliciesListCall) Filter(filter string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkFirewallPoliciesListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkFirewallPoliciesListCall) PageToken(pageToken string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesListCall) Context(ctx context.Context) *NetworkFirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworkFirewallPoliciesPatchCall struct { - s *Service - project string - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Patch(project string, firewallPolicy string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesPatchCall { - c := &NetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesPatchPacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPacketMirroringRule: Patches a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchPacketMirroringRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c := &NetworkFirewallPoliciesPatchPacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchPacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchPacketMirroringRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchPacketMirroringRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patchPacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchPacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchPacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesPatchRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchRuleCall { - c := &NetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *NetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemoveAssociationCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveAssociationCall { - c := &NetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemovePacketMirroringRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePacketMirroringRule: Deletes a packet mirroring rule of the specified -// priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemovePacketMirroringRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c := &NetworkFirewallPoliciesRemovePacketMirroringRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemovePacketMirroringRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removePacketMirroringRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removePacketMirroringRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removePacketMirroringRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemovePacketMirroringRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removePacketMirroringRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesRemoveRuleCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveRuleCall { - c := &NetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *NetworkFirewallPoliciesSetIamPolicyCall { - c := &NetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.setIamPolicy" call. -// 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 *NetworkFirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkFirewallPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkFirewallPoliciesTestIamPermissionsCall { - c := &NetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *NetworkFirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkFirewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkFirewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkProfilesGetCall struct { - s *Service - project string - networkProfile string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network profile. -// -// - networkProfile: Name of the network profile to return. -// - project: Project ID for this request. -func (r *NetworkProfilesService) Get(project string, networkProfile string) *NetworkProfilesGetCall { - c := &NetworkProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.networkProfile = networkProfile - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkProfilesGetCall) Fields(s ...googleapi.Field) *NetworkProfilesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkProfilesGetCall) IfNoneMatch(entityTag string) *NetworkProfilesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkProfilesGetCall) Context(ctx context.Context) *NetworkProfilesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkProfilesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkProfilesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles/{networkProfile}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "networkProfile": c.networkProfile, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkProfiles.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkProfiles.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkProfile.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 *NetworkProfilesGetCall) Do(opts ...googleapi.CallOption) (*NetworkProfile, 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 := &NetworkProfile{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkProfiles.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworkProfilesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of network profiles available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *NetworkProfilesService) List(project string) *NetworkProfilesListCall { - c := &NetworkProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworkProfilesListCall) Filter(filter string) *NetworkProfilesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkProfilesListCall) MaxResults(maxResults int64) *NetworkProfilesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworkProfilesListCall) OrderBy(orderBy string) *NetworkProfilesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworkProfilesListCall) PageToken(pageToken string) *NetworkProfilesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworkProfilesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkProfilesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkProfilesListCall) Fields(s ...googleapi.Field) *NetworkProfilesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworkProfilesListCall) IfNoneMatch(entityTag string) *NetworkProfilesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkProfilesListCall) Context(ctx context.Context) *NetworkProfilesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkProfilesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkProfilesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networkProfiles.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkProfiles.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkProfilesListResponse.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 *NetworkProfilesListCall) Do(opts ...googleapi.CallOption) (*NetworkProfilesListResponse, 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 := &NetworkProfilesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networkProfiles.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworkProfilesListCall) Pages(ctx context.Context, f func(*NetworkProfilesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddPeering: Adds a peering to the specified network. -// -// - network: Name of the network resource to add peering to. -// - project: Project ID for this request. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { - 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 -// details. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksaddpeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.addPeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.addPeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.addPeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network. -// -// - network: Name of the network to delete. -// - project: Project ID for this request. -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { - 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 -// details. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network. -// -// - network: Name of the network to return. -// - project: Project ID for this request. -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Network.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 *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, 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 := &Network{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksGetEffectiveFirewallsCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns the effective firewalls on a given network. -// -// - network: Name of the network for this request. -// - project: Project ID for this request. -func (r *NetworksService) GetEffectiveFirewalls(project string, network string) *NetworksGetEffectiveFirewallsCall { - c := &NetworksGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *NetworksGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *NetworksGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksGetEffectiveFirewallsCall) Context(ctx context.Context) *NetworksGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworksGetEffectiveFirewallsResponse.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 *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*NetworksGetEffectiveFirewallsResponse, 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 := &NetworksGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network in the specified project using the data -// included -// in the request. -// -// - project: Project ID for this request. -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { - 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 -// details. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.network) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of networks available to the specified project. -// -// - project: Project ID for this request. -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkList.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 *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, 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 := &NetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksListPeeringRoutesCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPeeringRoutes: Lists the peering routes exchanged over peering -// connection. -// -// - network: Name of the network for this request. -// - project: Project ID for this request. -func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { - c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - return c -} - -// Direction sets the optional parameter "direction": The direction of the -// exchanged routes. -// -// Possible values: -// -// "INCOMING" - For routes exported from peer network. -// "OUTGOING" - For routes exported from local network. -func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("direction", direction) - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NetworksListPeeringRoutesCall) OrderBy(orderBy string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NetworksListPeeringRoutesCall) PageToken(pageToken string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// PeeringName sets the optional parameter "peeringName": The response will -// show routes exchanged over the given peering connection. -func (c *NetworksListPeeringRoutesCall) PeeringName(peeringName string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("peeringName", peeringName) - return c -} - -// Region sets the optional parameter "region": The region of the request. The -// response will include all subnet routes, -// static routes and dynamic routes in the region. -func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("region", region) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NetworksListPeeringRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NetworksListPeeringRoutesCall) IfNoneMatch(entityTag string) *NetworksListPeeringRoutesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksListPeeringRoutesCall) Context(ctx context.Context) *NetworksListPeeringRoutesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksListPeeringRoutesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listPeeringRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.listPeeringRoutes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.listPeeringRoutes" call. -// Any non-2xx status code is an error. Response headers are in either -// *ExchangedPeeringRoutesList.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 *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*ExchangedPeeringRoutesList, 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 := &ExchangedPeeringRoutesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.listPeeringRoutes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*ExchangedPeeringRoutesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NetworksPatchCall struct { - s *Service - project string - network string - network2 *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified network with the data included in the -// request. -// Only routingConfig can be modified. -// -// - network: Name of the network to update. -// - project: Project ID for this request. -func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { - c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.network2 = network2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { - 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 -// details. -func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.network2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemovePeering: Removes a peering from the specified network. -// -// - network: Name of the network resource to remove peering from. -// - project: Project ID for this request. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { - 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 -// details. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksremovepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/removePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.removePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.removePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.removePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksRequestRemovePeeringCall struct { - s *Service - project string - network string - networksrequestremovepeeringrequest *NetworksRequestRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RequestRemovePeering: Requests to remove a peering from the specified -// network. Applicable only -// for PeeringConnection with update_strategy=CONSENSUS. -// -// - network: Name of the network resource to remove peering from. -// - project: Project ID for this request. -func (r *NetworksService) RequestRemovePeering(project string, network string, networksrequestremovepeeringrequest *NetworksRequestRemovePeeringRequest) *NetworksRequestRemovePeeringCall { - c := &NetworksRequestRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksrequestremovepeeringrequest = networksrequestremovepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksRequestRemovePeeringCall) RequestId(requestId string) *NetworksRequestRemovePeeringCall { - 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 -// details. -func (c *NetworksRequestRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRequestRemovePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksRequestRemovePeeringCall) Context(ctx context.Context) *NetworksRequestRemovePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksRequestRemovePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksRequestRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksrequestremovepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/requestRemovePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.requestRemovePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.requestRemovePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksRequestRemovePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.requestRemovePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksSwitchToCustomModeCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SwitchToCustomMode: Switches the network mode from auto subnet mode to -// custom subnet mode. -// -// - network: Name of the network to be updated. -// - project: Project ID for this request. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { - 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 -// details. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/switchToCustomMode") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.switchToCustomMode", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.switchToCustomMode" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.switchToCustomMode", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { - c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NetworksUpdatePeeringCall struct { - s *Service - project string - network string - networksupdatepeeringrequest *NetworksUpdatePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePeering: Updates the specified network peering with the data included -// in the -// request. You can only modify the NetworkPeering.export_custom_routes -// field -// and the NetworkPeering.import_custom_routes field. -// -// - network: Name of the network resource which the updated peering is -// belonging to. -// - project: Project ID for this request. -func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { - c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.network = network - c.networksupdatepeeringrequest = networksupdatepeeringrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall { - 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 -// details. -func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksUpdatePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networksupdatepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/updatePeering") - 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{ - "project": c.project, - "network": c.network, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.networks.updatePeering", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networks.updatePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksUpdatePeeringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.networks.updatePeering", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsAddNodesCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddNodes: Adds specified number of nodes to the node group. -// -// - nodeGroup: Name of the NodeGroup resource. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { - c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsaddnodesrequest = nodegroupsaddnodesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsAddNodesCall) RequestId(requestId string) *NodeGroupsAddNodesCall { - 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 -// details. -func (c *NodeGroupsAddNodesCall) Fields(s ...googleapi.Field) *NodeGroupsAddNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAddNodesCall) Context(ctx context.Context) *NodeGroupsAddNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsAddNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsaddnodesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.addNodes", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.addNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsAddNodesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.addNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node groups. -// Note: use nodeGroups.listNodes for more details about each group. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { - c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsAggregatedListCall) Filter(filter string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsAggregatedListCall) MaxResults(maxResults int64) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsAggregatedListCall) OrderBy(orderBy string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsAggregatedListCall) PageToken(pageToken string) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NodeGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAggregatedListCall) Context(ctx context.Context) *NodeGroupsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupAggregatedList.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 *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGroupAggregatedList, 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 := &NodeGroupAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NodeGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsDeleteCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NodeGroup resource. -// -// - nodeGroup: Name of the NodeGroup resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { - c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsDeleteCall) RequestId(requestId string) *NodeGroupsDeleteCall { - 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 -// details. -func (c *NodeGroupsDeleteCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteCall) Context(ctx context.Context) *NodeGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsDeleteNodesCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteNodes: Deletes specified nodes from the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes will be deleted. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { - c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsdeletenodesrequest = nodegroupsdeletenodesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsDeleteNodesCall) RequestId(requestId string) *NodeGroupsDeleteNodesCall { - 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 -// details. -func (c *NodeGroupsDeleteNodesCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteNodesCall) Context(ctx context.Context) *NodeGroupsDeleteNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsDeleteNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsdeletenodesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.deleteNodes", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.deleteNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteNodesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.deleteNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsGetCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NodeGroup. Get a list of available NodeGroups -// by making a list() request. -// Note: the "nodes" field should not be used. Use -// nodeGroups.listNodes -// instead. -// -// - nodeGroup: Name of the node group to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { - c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsGetCall) Fields(s ...googleapi.Field) *NodeGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsGetCall) IfNoneMatch(entityTag string) *NodeGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetCall) Context(ctx context.Context) *NodeGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroup.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 *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, 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 := &NodeGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { - c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NodeGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetIamPolicyCall) Context(ctx context.Context) *NodeGroupsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.getIamPolicy" call. -// 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 *NodeGroupsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsInsertCall struct { - s *Service - project string - zone string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NodeGroup resource in the specified project using the -// data -// included in the request. -// -// - initialNodeCount: Initial count of nodes in the node group. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { - c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.urlParams_.Set("initialNodeCount", fmt.Sprint(initialNodeCount)) - c.nodegroup = nodegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsInsertCall) RequestId(requestId string) *NodeGroupsInsertCall { - 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 -// details. -func (c *NodeGroupsInsertCall) Fields(s ...googleapi.Field) *NodeGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsInsertCall) Context(ctx context.Context) *NodeGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node groups available to the specified -// project. -// Note: use nodeGroups.listNodes for more details about each group. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { - c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsListCall) Filter(filter string) *NodeGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListCall) MaxResults(maxResults int64) *NodeGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsListCall) OrderBy(orderBy string) *NodeGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsListCall) PageToken(pageToken string) *NodeGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsListCall) Fields(s ...googleapi.Field) *NodeGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeGroupsListCall) IfNoneMatch(entityTag string) *NodeGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListCall) Context(ctx context.Context) *NodeGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupList.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 *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, 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 := &NodeGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsListCall) Pages(ctx context.Context, f func(*NodeGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsListNodesCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNodes: Lists nodes in the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes you want to list. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { - c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeGroupsListNodesCall) Filter(filter string) *NodeGroupsListNodesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListNodesCall) MaxResults(maxResults int64) *NodeGroupsListNodesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeGroupsListNodesCall) OrderBy(orderBy string) *NodeGroupsListNodesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeGroupsListNodesCall) PageToken(pageToken string) *NodeGroupsListNodesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeGroupsListNodesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListNodesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsListNodesCall) Fields(s ...googleapi.Field) *NodeGroupsListNodesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListNodesCall) Context(ctx context.Context) *NodeGroupsListNodesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsListNodesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.listNodes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.listNodes" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeGroupsListNodes.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 *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsListNodes, 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 := &NodeGroupsListNodes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.listNodes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeGroupsListNodesCall) Pages(ctx context.Context, f func(*NodeGroupsListNodes) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeGroupsPatchCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified node group. -// -// - nodeGroup: Name of the NodeGroup resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, nodegroup *NodeGroup) *NodeGroupsPatchCall { - c := &NodeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroup = nodegroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { - 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 -// details. -func (c *NodeGroupsPatchCall) Fields(s ...googleapi.Field) *NodeGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPatchCall) Context(ctx context.Context) *NodeGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsPerformMaintenanceCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform maintenance on a subset of nodes in the node -// group. -// -// - nodeGroup: Name of the node group scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) PerformMaintenance(project string, zone string, nodeGroup string, nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest) *NodeGroupsPerformMaintenanceCall { - c := &NodeGroupsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsperformmaintenancerequest = nodegroupsperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsPerformMaintenanceCall) RequestId(requestId string) *NodeGroupsPerformMaintenanceCall { - 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 -// details. -func (c *NodeGroupsPerformMaintenanceCall) Fields(s ...googleapi.Field) *NodeGroupsPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPerformMaintenanceCall) Context(ctx context.Context) *NodeGroupsPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupsperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { - c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetIamPolicyCall) Context(ctx context.Context) *NodeGroupsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.setIamPolicy" call. -// 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 *NodeGroupsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSetNodeTemplateCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNodeTemplate: Updates the node template of the node group. -// -// - nodeGroup: Name of the NodeGroup resource to update. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { - c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupssetnodetemplaterequest = nodegroupssetnodetemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsSetNodeTemplateCall) RequestId(requestId string) *NodeGroupsSetNodeTemplateCall { - 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 -// details. -func (c *NodeGroupsSetNodeTemplateCall) Fields(s ...googleapi.Field) *NodeGroupsSetNodeTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetNodeTemplateCall) Context(ctx context.Context) *NodeGroupsSetNodeTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupssetnodetemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.setNodeTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.setNodeTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSetNodeTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.setNodeTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SimulateMaintenanceEvent: Simulates maintenance event on specified nodes -// from the node group. -// -// - nodeGroup: Name of the NodeGroup resource whose nodes will go under -// maintenance -// -// simulation. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SimulateMaintenanceEvent(project string, zone string, nodeGroup string, nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest) *NodeGroupsSimulateMaintenanceEventCall { - c := &NodeGroupsSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupssimulatemaintenanceeventrequest = nodegroupssimulatemaintenanceeventrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeGroupsSimulateMaintenanceEventCall) RequestId(requestId string) *NodeGroupsSimulateMaintenanceEventCall { - 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 -// details. -func (c *NodeGroupsSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *NodeGroupsSimulateMaintenanceEventCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSimulateMaintenanceEventCall) Context(ctx context.Context) *NodeGroupsSimulateMaintenanceEventCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsSimulateMaintenanceEventCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodegroupssimulatemaintenanceeventrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent") - 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.simulateMaintenanceEvent", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.simulateMaintenanceEvent" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSimulateMaintenanceEventCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.simulateMaintenanceEvent", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { - c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeGroupsTestIamPermissionsCall) Context(ctx context.Context) *NodeGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node templates. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { - c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTemplatesAggregatedListCall) Filter(filter string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesAggregatedListCall) MaxResults(maxResults int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTemplatesAggregatedListCall) OrderBy(orderBy string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTemplatesAggregatedListCall) PageToken(pageToken string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesAggregatedListCall) Context(ctx context.Context) *NodeTemplatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateAggregatedList.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 *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateAggregatedList, 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 := &NodeTemplateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTemplateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTemplatesDeleteCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NodeTemplate resource. -// -// - nodeTemplate: Name of the NodeTemplate resource to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { - c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodeTemplate = nodeTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeTemplatesDeleteCall) RequestId(requestId string) *NodeTemplatesDeleteCall { - 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 -// details. -func (c *NodeTemplatesDeleteCall) Fields(s ...googleapi.Field) *NodeTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesDeleteCall) Context(ctx context.Context) *NodeTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesGetCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified node template. -// -// - nodeTemplate: Name of the node template to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { - c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodeTemplate = nodeTemplate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesGetCall) Fields(s ...googleapi.Field) *NodeTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesGetCall) IfNoneMatch(entityTag string) *NodeTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetCall) Context(ctx context.Context) *NodeTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplate.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 *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, 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 := &NodeTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { - c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *NodeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeTemplatesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.getIamPolicy" call. -// 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 *NodeTemplatesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesInsertCall struct { - s *Service - project string - region string - nodetemplate *NodeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NodeTemplate resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { - c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.nodetemplate = nodetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *NodeTemplatesInsertCall) RequestId(requestId string) *NodeTemplatesInsertCall { - 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 -// details. -func (c *NodeTemplatesInsertCall) Fields(s ...googleapi.Field) *NodeTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesInsertCall) Context(ctx context.Context) *NodeTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.nodetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node templates available to the specified -// project. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { - c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTemplatesListCall) Filter(filter string) *NodeTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesListCall) MaxResults(maxResults int64) *NodeTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTemplatesListCall) OrderBy(orderBy string) *NodeTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTemplatesListCall) PageToken(pageToken string) *NodeTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesListCall) Fields(s ...googleapi.Field) *NodeTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTemplatesListCall) IfNoneMatch(entityTag string) *NodeTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesListCall) Context(ctx context.Context) *NodeTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateList.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 *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateList, 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 := &NodeTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTemplatesListCall) Pages(ctx context.Context, f func(*NodeTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTemplatesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { - c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesSetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.setIamPolicy" call. -// 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 *NodeTemplatesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTemplatesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { - c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeTemplatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *NodeTemplatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTemplates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTemplates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { - c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTypesAggregatedListCall) Filter(filter string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *NodeTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesAggregatedListCall) MaxResults(maxResults int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTypesAggregatedListCall) OrderBy(orderBy string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTypesAggregatedListCall) PageToken(pageToken string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *NodeTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesAggregatedListCall) Context(ctx context.Context) *NodeTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTypeAggregatedList.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 *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTypeAggregatedList, 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 := &NodeTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTypesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type NodeTypesGetCall struct { - s *Service - project string - zone string - nodeType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified node type. -// -// - nodeType: Name of the node type to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { - c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeType = nodeType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesGetCall) Fields(s ...googleapi.Field) *NodeTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesGetCall) IfNoneMatch(entityTag string) *NodeTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesGetCall) Context(ctx context.Context) *NodeTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes/{nodeType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeType": c.nodeType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.get" call. -// 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 *NodeTypesGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type NodeTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of node types available to the specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { - c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *NodeTypesListCall) Filter(filter string) *NodeTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesListCall) MaxResults(maxResults int64) *NodeTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *NodeTypesListCall) OrderBy(orderBy string) *NodeTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *NodeTypesListCall) PageToken(pageToken string) *NodeTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *NodeTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesListCall) Fields(s ...googleapi.Field) *NodeTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *NodeTypesListCall) IfNoneMatch(entityTag string) *NodeTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTypesListCall) Context(ctx context.Context) *NodeTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.nodeTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTypeList.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 *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, 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 := &NodeTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.nodeTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *NodeTypesListCall) Pages(ctx context.Context, f func(*NodeTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type OrganizationSecurityPoliciesAddAssociationCall struct { - s *Service - securityPolicy string - securitypolicyassociation *SecurityPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified security -// policy. -// -// This has billing implications. Projects in the hierarchy with -// effective -// hierarchical security policies will be automatically enrolled into -// Cloud -// Armor Enterprise if not already enrolled. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.addAssociation -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall { - c := &OrganizationSecurityPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyassociation = securitypolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment -// already exists. This is false by default, in which case an error will -// be -// returned if an association already exists. -func (c *OrganizationSecurityPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *OrganizationSecurityPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesAddAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddAssociationCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addAssociation") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesAddRuleCall struct { - s *Service - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.addRule instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall { - c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesAddRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesAddRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesAddRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/addRule") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesCopyRulesCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CopyRules: Copies rules to the specified security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.cloneRules -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) CopyRules(securityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { - c := &OrganizationSecurityPoliciesCopyRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesCopyRulesCall) RequestId(requestId string) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceSecurityPolicy sets the optional parameter "sourceSecurityPolicy": The -// security policy from which to copy rules. -func (c *OrganizationSecurityPoliciesCopyRulesCall) SourceSecurityPolicy(sourceSecurityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("sourceSecurityPolicy", sourceSecurityPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesCopyRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Context(ctx context.Context) *OrganizationSecurityPoliciesCopyRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesCopyRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesCopyRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/copyRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.copyRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.copyRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesCopyRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.copyRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesDeleteCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// Use this API to remove Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to remove firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.delete instead. -// -// - securityPolicy: Name of the security policy to delete. -func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall { - c := &OrganizationSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesDeleteCall) RequestId(requestId string) *OrganizationSecurityPoliciesDeleteCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesDeleteCall) Context(ctx context.Context) *OrganizationSecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified -// policy. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.get instead. -// -// - securityPolicy: Name of the security policy to get. -func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall { - c := &OrganizationSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *OrganizationSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetAssociationCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now disabled for most organizations. Use -// firewallPolicies.getAssociation -// instead. -// -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *OrganizationSecurityPoliciesService) GetAssociation(securityPolicy string) *OrganizationSecurityPoliciesGetAssociationCall { - c := &OrganizationSecurityPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the security policy. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Name(name string) *OrganizationSecurityPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyAssociation.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 *OrganizationSecurityPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyAssociation, 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 := &SecurityPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesGetRuleCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.getRule instead. -// -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *OrganizationSecurityPoliciesService) GetRule(securityPolicy string) *OrganizationSecurityPoliciesGetRuleCall { - c := &OrganizationSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *OrganizationSecurityPoliciesGetRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesGetRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *OrganizationSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesInsertCall struct { - s *Service - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified organization using the data -// included -// in the request. -// -// Use this API to add Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to add firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.insert instead. -func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall { - c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securitypolicy = securitypolicy - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -// The ID can be either be "folders/[FOLDER_ID]" -// if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *OrganizationSecurityPoliciesInsertCall) ParentId(parentId string) *OrganizationSecurityPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesInsertCall) RequestId(requestId string) *OrganizationSecurityPoliciesInsertCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesInsertCall) Context(ctx context.Context) *OrganizationSecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the -// specified -// organization. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now -// disabled for most organizations. Use firewallPolicies.list instead. -func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall { - c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *OrganizationSecurityPoliciesListCall) Filter(filter string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *OrganizationSecurityPoliciesListCall) MaxResults(maxResults int64) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *OrganizationSecurityPoliciesListCall) OrderBy(orderBy string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *OrganizationSecurityPoliciesListCall) PageToken(pageToken string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *OrganizationSecurityPoliciesListCall) ParentId(parentId string) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *OrganizationSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *OrganizationSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *OrganizationSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type OrganizationSecurityPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -// -// Use this API to read Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to read firewall policies. This usage is -// now disabled for most organizations. Use -// firewallPolicies.listAssociations -// instead. -func (r *OrganizationSecurityPoliciesService) ListAssociations() *OrganizationSecurityPoliciesListAssociationsCall { - c := &OrganizationSecurityPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// TargetResource sets the optional parameter "targetResource": The target -// resource to list associations. It is an organization, or a -// folder. -func (c *OrganizationSecurityPoliciesListAssociationsCall) TargetResource(targetResource string) *OrganizationSecurityPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListAssociationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListAssociationsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListAssociationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListAssociationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/listAssociations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listAssociations", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.listAssociations" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrganizationSecurityPoliciesListAssociationsResponse.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 *OrganizationSecurityPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*OrganizationSecurityPoliciesListAssociationsResponse, 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 := &OrganizationSecurityPoliciesListAssociationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listAssociations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPreconfiguredExpressionSets: Gets the current list of preconfigured Web -// Application Firewall (WAF) -// expressions. -func (r *OrganizationSecurityPoliciesService) ListPreconfiguredExpressionSets() *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c := &OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Filter(filter string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) MaxResults(maxResults int64) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) OrderBy(orderBy string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) PageToken(pageToken string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ParentId sets the optional parameter "parentId": Parent ID for this request. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) ParentId(parentId string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("parentId", parentId) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) ReturnPartialSuccess(returnPartialSuccess bool) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) IfNoneMatch(entityTag string) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Context(ctx context.Context) *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/listPreconfiguredExpressionSets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesListPreconfiguredExpressionSetsResponse.ServerResponse.Heade -// r 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 *OrganizationSecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesListPreconfiguredExpressionSetsResponse, 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 := &SecurityPoliciesListPreconfiguredExpressionSetsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.listPreconfiguredExpressionSets", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesMoveCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Move: Moves the specified security policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.move instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) Move(securityPolicy string) *OrganizationSecurityPoliciesMoveCall { - c := &OrganizationSecurityPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// ParentId sets the optional parameter "parentId": The new parent of the -// security policy. -func (c *OrganizationSecurityPoliciesMoveCall) ParentId(parentId string) *OrganizationSecurityPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesMoveCall) RequestId(requestId string) *OrganizationSecurityPoliciesMoveCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesMoveCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesMoveCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesMoveCall) Context(ctx context.Context) *OrganizationSecurityPoliciesMoveCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesMoveCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/move") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.move", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.move" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesMoveCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.move", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesPatchCall struct { - s *Service - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the -// request. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.patch instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) Patch(securityPolicy string, securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesPatchCall { - c := &OrganizationSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesPatchCall) RequestId(requestId string) *OrganizationSecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *OrganizationSecurityPoliciesPatchCall) UpdateMask(updateMask string) *OrganizationSecurityPoliciesPatchCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesPatchCall) Context(ctx context.Context) *OrganizationSecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesPatchRuleCall struct { - s *Service - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use firewallPolicies.patchRule -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall { - c := &OrganizationSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesPatchRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *OrganizationSecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *OrganizationSecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/patchRule") - 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{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesRemoveAssociationCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified security -// policy. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.removeAssociation -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall { - c := &OrganizationSecurityPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Name(name string) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesRemoveAssociationCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveAssociationCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type OrganizationSecurityPoliciesRemoveRuleCall struct { - s *Service - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// Use this API to modify Cloud Armor policies. Previously, alpha and -// beta -// versions of this API were used to modify firewall policies. This usage -// is -// now disabled for most organizations. Use -// firewallPolicies.removeRule -// instead. -// -// - securityPolicy: Name of the security policy to update. -func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall { - c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Priority(priority int64) *OrganizationSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *OrganizationSecurityPoliciesRemoveRuleCall) RequestId(requestId string) *OrganizationSecurityPoliciesRemoveRuleCall { - 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 -// details. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *OrganizationSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *OrganizationSecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.organizationSecurityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *OrganizationSecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.organizationSecurityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of packetMirrorings. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { - c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *PacketMirroringsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PacketMirroringsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *PacketMirroringsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/packetMirrorings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringAggregatedList.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 *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, 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 := &PacketMirroringAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PacketMirroringsDeleteCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PacketMirroring resource. -// -// - packetMirroring: Name of the PacketMirroring resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { - c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { - 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 -// details. -func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsGetCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PacketMirroring resource. -// -// - packetMirroring: Name of the PacketMirroring resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { - c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroring.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 *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, 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 := &PacketMirroring{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsInsertCall struct { - s *Service - project string - region string - packetmirroring *PacketMirroring - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PacketMirroring resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { - c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetmirroring = packetmirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { - 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 -// details. -func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.packetmirroring) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of PacketMirroring resources available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { - c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PacketMirroringsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringList.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 *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, 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 := &PacketMirroringList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PacketMirroringsPatchCall struct { - s *Service - project string - region string - packetMirroring string - packetmirroring *PacketMirroring - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PacketMirroring resource with the data included -// in -// the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - packetMirroring: Name of the PacketMirroring resource to patch. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { - c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - c.packetmirroring = packetmirroring - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { - 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 -// details. -func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.packetmirroring) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") - 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{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PacketMirroringsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { - c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.packetMirrorings.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.packetMirrorings.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PreviewFeaturesGetCall struct { - s *Service - project string - previewFeature string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the details of the given PreviewFeature. -// -// - previewFeature: Name of the PreviewFeature for this request. -// - project: Project ID for this request. -func (r *PreviewFeaturesService) Get(project string, previewFeature string) *PreviewFeaturesGetCall { - c := &PreviewFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.previewFeature = previewFeature - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PreviewFeaturesGetCall) Fields(s ...googleapi.Field) *PreviewFeaturesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PreviewFeaturesGetCall) IfNoneMatch(entityTag string) *PreviewFeaturesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesGetCall) Context(ctx context.Context) *PreviewFeaturesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures/{previewFeature}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "previewFeature": c.previewFeature, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewFeature.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 *PreviewFeaturesGetCall) Do(opts ...googleapi.CallOption) (*PreviewFeature, 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 := &PreviewFeature{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PreviewFeaturesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns the details of the given PreviewFeature. -// -// - project: Project ID for this request. -func (r *PreviewFeaturesService) List(project string) *PreviewFeaturesListCall { - c := &PreviewFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PreviewFeaturesListCall) Filter(filter string) *PreviewFeaturesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PreviewFeaturesListCall) MaxResults(maxResults int64) *PreviewFeaturesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PreviewFeaturesListCall) OrderBy(orderBy string) *PreviewFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PreviewFeaturesListCall) PageToken(pageToken string) *PreviewFeaturesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PreviewFeaturesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PreviewFeaturesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PreviewFeaturesListCall) Fields(s ...googleapi.Field) *PreviewFeaturesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PreviewFeaturesListCall) IfNoneMatch(entityTag string) *PreviewFeaturesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesListCall) Context(ctx context.Context) *PreviewFeaturesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PreviewFeatureList.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 *PreviewFeaturesListCall) Do(opts ...googleapi.CallOption) (*PreviewFeatureList, 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 := &PreviewFeatureList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PreviewFeaturesListCall) Pages(ctx context.Context, f func(*PreviewFeatureList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PreviewFeaturesUpdateCall struct { - s *Service - project string - previewFeature string - previewfeature *PreviewFeature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Patches the given PreviewFeature. This method is used to enable or -// disable -// a PreviewFeature. -// -// - previewFeature: Name of the PreviewFeature for this request. -// - project: Project ID for this request. -func (r *PreviewFeaturesService) Update(project string, previewFeature string, previewfeature *PreviewFeature) *PreviewFeaturesUpdateCall { - c := &PreviewFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.previewFeature = previewFeature - c.previewfeature = previewfeature - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PreviewFeaturesUpdateCall) RequestId(requestId string) *PreviewFeaturesUpdateCall { - 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 -// details. -func (c *PreviewFeaturesUpdateCall) Fields(s ...googleapi.Field) *PreviewFeaturesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PreviewFeaturesUpdateCall) Context(ctx context.Context) *PreviewFeaturesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PreviewFeaturesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PreviewFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.previewfeature) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/previewFeatures/{previewFeature}") - 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{ - "project": c.project, - "previewFeature": c.previewFeature, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.previewFeatures.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.previewFeatures.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PreviewFeaturesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.previewFeatures.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsDisableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnHost: Disable this project as a shared VPC host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { - 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 -// details. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.disableXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.disableXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DisableXpnResource: Disable a service resource (also known as service -// project) associated with -// this host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { - 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 -// details. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnResource") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.disableXpnResource", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.disableXpnResource" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.disableXpnResource", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnHost: Enable this project as a shared VPC host project. -// -// - project: Project ID for this request. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { - 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 -// details. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.enableXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.enableXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// EnableXpnResource: Enable service resource (a.k.a service project) for a -// host project, so that -// subnets in the host project can be used by instances in the service -// project. -// -// - project: Project ID for this request. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { - 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 -// details. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnResource") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.enableXpnResource", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.enableXpnResource" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.enableXpnResource", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Project resource. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information (the `quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// - project: Project ID for this request. -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Project.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 *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, 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 := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnHost: Gets the shared VPC host project that this project links to. May -// be empty -// if no link exists. -// -// - project: Project ID for this request. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnHost") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.getXpnHost", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnHost" call. -// Any non-2xx status code is an error. Response headers are in either -// *Project.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 *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, 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 := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.getXpnHost", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetXpnResources: Gets service resources (a.k.a service project) associated -// with this host -// project. -// -// - project: Project ID for this request. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ProjectsGetXpnResourcesCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnResources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.getXpnResources", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.getXpnResources" call. -// Any non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.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 *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, 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 := &ProjectsGetXpnResources{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.getXpnResources", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: Lists all shared VPC host projects visible to the user in an -// organization. -// -// - project: Project ID for this request. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ProjectsListXpnHostsCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsListXpnHostsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectslistxpnhostsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/listXpnHosts") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.listXpnHosts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.listXpnHosts" call. -// Any non-2xx status code is an error. Response headers are in either -// *XpnHostList.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 *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, 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 := &XpnHostList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.listXpnHosts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveDisk: Moves a persistent disk from one zone to another. -// *Note*: The moveDisk API will be deprecated on September 29, 2026. -// -// Starting September 29, 2025, you can't use the moveDisk API on new -// projects. To move a disk to a different region or zone, follow the steps -// in -// Change the location of a -// disk -// (https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd). -// -// Projects that already use the moveDisk API can continue usage -// until -// September 29, 2026. -// -// Starting November 1, 2025, API responses will include a warning message -// in -// the response body about the upcoming deprecation. You can skip the -// message -// to continue using the service without interruption. -// -// - project: Project ID for this request. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.diskmoverequest = diskmoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { - 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 -// details. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.diskmoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveDisk") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.moveDisk", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.moveDisk", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// MoveInstance: Moves an instance and its attached persistent disks from one -// zone to -// another. -// *Note*: Moving VMs or disks by using this method might -// -// cause unexpected behavior. For more information, see the known -// issue -// -// (/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_mov -// einstance_api_or_the_causes_unexpected_behavior). -// [Deprecated] This method is deprecated. See moving instance across -// zones (/compute/docs/instances/moving-instance-across-zones) instead. -// -// - project: Project ID for this request. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.instancemoverequest = instancemoverequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { - 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 -// details. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancemoverequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveInstance") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.moveInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.moveInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.moveInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetCloudArmorTierCall struct { - s *Service - project string - projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCloudArmorTier: Sets the Cloud Armor tier of the project. To set -// ENTERPRISE or above the -// billing account of the project must be subscribed to Cloud Armor -// Enterprise. See Subscribing -// to Cloud Armor Enterprise for more information. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetCloudArmorTier(project string, projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest) *ProjectsSetCloudArmorTierCall { - c := &ProjectsSetCloudArmorTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetcloudarmortierrequest = projectssetcloudarmortierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetCloudArmorTierCall) RequestId(requestId string) *ProjectsSetCloudArmorTierCall { - 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 -// details. -func (c *ProjectsSetCloudArmorTierCall) Fields(s ...googleapi.Field) *ProjectsSetCloudArmorTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCloudArmorTierCall) Context(ctx context.Context) *ProjectsSetCloudArmorTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetCloudArmorTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCloudArmorTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetcloudarmortierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCloudArmorTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setCloudArmorTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCloudArmorTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCloudArmorTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setCloudArmorTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCommonInstanceMetadata: Sets metadata common to all instances within the -// specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.metadata = metadata - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { - 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 -// details. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadata) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCommonInstanceMetadata") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setCommonInstanceMetadata", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setCommonInstanceMetadata" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setCommonInstanceMetadata", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetDefaultNetworkTierCall struct { - s *Service - project string - projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetDefaultNetworkTier: Sets the default network tier of the project. The -// default network tier is -// used when an address/forwardingRule/instance is created without -// specifying -// the network tier field. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { - c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetdefaultnetworktierrequest = projectssetdefaultnetworktierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetDefaultNetworkTierCall) RequestId(requestId string) *ProjectsSetDefaultNetworkTierCall { - 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 -// details. -func (c *ProjectsSetDefaultNetworkTierCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultNetworkTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetDefaultNetworkTierCall) Context(ctx context.Context) *ProjectsSetDefaultNetworkTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetdefaultnetworktierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setDefaultNetworkTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setDefaultNetworkTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setDefaultNetworkTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetDefaultNetworkTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setDefaultNetworkTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetManagedProtectionTierCall struct { - s *Service - project string - projectssetmanagedprotectiontierrequest *ProjectsSetManagedProtectionTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetManagedProtectionTier: Sets the Cloud Armor Managed Protection (CAMP) -// tier of the project. To set -// PLUS or above the billing account of the project must be subscribed -// to -// Managed Protection Plus. See Subscribing -// to Managed Protection Plus for more information. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetManagedProtectionTier(project string, projectssetmanagedprotectiontierrequest *ProjectsSetManagedProtectionTierRequest) *ProjectsSetManagedProtectionTierCall { - c := &ProjectsSetManagedProtectionTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectssetmanagedprotectiontierrequest = projectssetmanagedprotectiontierrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetManagedProtectionTierCall) RequestId(requestId string) *ProjectsSetManagedProtectionTierCall { - 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 -// details. -func (c *ProjectsSetManagedProtectionTierCall) Fields(s ...googleapi.Field) *ProjectsSetManagedProtectionTierCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetManagedProtectionTierCall) Context(ctx context.Context) *ProjectsSetManagedProtectionTierCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetManagedProtectionTierCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetManagedProtectionTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.projectssetmanagedprotectiontierrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setManagedProtectionTier") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setManagedProtectionTier", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setManagedProtectionTier" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetManagedProtectionTierCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setManagedProtectionTier", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUsageExportBucket: Enables the usage export feature and sets theusage -// export bucket -// where reports are stored. If you provide an empty request body using -// this -// method, the usage export feature will be disabled. -// -// - project: Project ID for this request. -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.usageexportlocation = usageexportlocation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { - 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 -// details. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.usageexportlocation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setUsageExportBucket") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.projects.setUsageExportBucket", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.projects.setUsageExportBucket" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.projects.setUsageExportBucket", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesAnnounceCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Announce: Announces the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesAnnounceCall { - c := &PublicAdvertisedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *PublicAdvertisedPrefixesAnnounceCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesAnnounceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesAnnounceCall) Context(ctx context.Context) *PublicAdvertisedPrefixesAnnounceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesAnnounceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.announce", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.announce" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesAnnounceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.announce", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesDeleteCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// delete. -func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesDeleteCall { - c := &PublicAdvertisedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *PublicAdvertisedPrefixesDeleteCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesDeleteCall) Context(ctx context.Context) *PublicAdvertisedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesGetCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PublicAdvertisedPrefix resource. -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// return. -func (r *PublicAdvertisedPrefixesService) Get(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesGetCall { - c := &PublicAdvertisedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicAdvertisedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicAdvertisedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesGetCall) Context(ctx context.Context) *PublicAdvertisedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefix.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 *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefix, 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 := &PublicAdvertisedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesInsertCall struct { - s *Service - project string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PublicAdvertisedPrefix in the specified project -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesInsertCall { - c := &PublicAdvertisedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicadvertisedprefix = publicadvertisedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *PublicAdvertisedPrefixesInsertCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesInsertCall) Context(ctx context.Context) *PublicAdvertisedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicadvertisedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the PublicAdvertisedPrefixes for a project. -// -// - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) List(project string) *PublicAdvertisedPrefixesListCall { - c := &PublicAdvertisedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicAdvertisedPrefixesListCall) Filter(filter string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicAdvertisedPrefixesListCall) MaxResults(maxResults int64) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicAdvertisedPrefixesListCall) OrderBy(orderBy string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicAdvertisedPrefixesListCall) PageToken(pageToken string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicAdvertisedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicAdvertisedPrefixesListCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicAdvertisedPrefixesListCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesListCall) Context(ctx context.Context) *PublicAdvertisedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefixList.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 *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefixList, 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 := &PublicAdvertisedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicAdvertisedPrefixesListCall) Pages(ctx context.Context, f func(*PublicAdvertisedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicAdvertisedPrefixesPatchCall struct { - s *Service - project string - publicAdvertisedPrefix string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// patch. -func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertisedPrefix string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesPatchCall { - c := &PublicAdvertisedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - c.publicadvertisedprefix = publicadvertisedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicAdvertisedPrefixesPatchCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *PublicAdvertisedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicadvertisedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") - 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicAdvertisedPrefixesWithdrawCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Withdraw: Withdraws the specified PublicAdvertisedPrefix -// -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { - c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { - 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 -// details. -func (c *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.withdraw", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicAdvertisedPrefixes.withdraw" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesWithdrawCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicAdvertisedPrefixes.withdraw", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the -// specific project -// across all scopes. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { - c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixAggregatedList.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 *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, 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 := &PublicDelegatedPrefixAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicDelegatedPrefixesAnnounceCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Announce: Announces the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of theregion where -// the public delegated prefix is located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { - c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { - 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 -// details. -func (c *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.announce", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.announce" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesAnnounceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.announce", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { - c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { - 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 -// details. -func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesGetCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified PublicDelegatedPrefix resource in the given -// region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { - c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.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 *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, 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 := &PublicDelegatedPrefix{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesInsertCall struct { - s *Service - project string - region string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a PublicDelegatedPrefix in the specified project in the -// given -// region using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { - c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { - 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 -// details. -func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the PublicDelegatedPrefixes for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { - c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.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 *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, 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 := &PublicDelegatedPrefixList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type PublicDelegatedPrefixesPatchCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PublicDelegatedPrefix resource with the data -// included -// in the request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -// - region: Name of the region for this request. -func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { - c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { - 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 -// details. -func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - 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{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PublicDelegatedPrefixesWithdrawCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of theregion where -// the public delegated prefix is located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { - c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { - 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 -// details. -func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.withdraw", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.withdraw" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesWithdrawCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.publicDelegatedPrefixes.withdraw", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { - 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 -// details. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified autoscaler. -// -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.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 *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, 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 := &Autoscaler{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an autoscaler in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { - 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 -// details. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of autoscalers contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.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 *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, 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 := &RegionAutoscalerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates an autoscaler in the specified project using -// the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { - 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 -// details. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { - c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an autoscaler in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { - 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 -// details. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.autoscaler) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionAutoscalers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsDeleteCall struct { - s *Service - project string - region string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Delete(project string, region string, backendBucket string) *RegionBackendBucketsDeleteCall { - c := &RegionBackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - return c -} - -// ForceDelete sets the optional parameter "forceDelete": Force delete the -// backend bucket even if it is still in use by other -// resources. It's intended to be used internally only for requests -// from -// wipeout. -func (c *RegionBackendBucketsDeleteCall) ForceDelete(forceDelete bool) *RegionBackendBucketsDeleteCall { - c.urlParams_.Set("forceDelete", fmt.Sprint(forceDelete)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionBackendBucketsDeleteCall) RequestId(requestId string) *RegionBackendBucketsDeleteCall { - 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 -// details. -func (c *RegionBackendBucketsDeleteCall) Fields(s ...googleapi.Field) *RegionBackendBucketsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsDeleteCall) Context(ctx context.Context) *RegionBackendBucketsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsGetCall struct { - s *Service - project string - region string - backendBucket string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendBucket resource. -// -// - backendBucket: Name of the BackendBucket resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Get(project string, region string, backendBucket string) *RegionBackendBucketsGetCall { - c := &RegionBackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsGetCall) Fields(s ...googleapi.Field) *RegionBackendBucketsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsGetCall) IfNoneMatch(entityTag string) *RegionBackendBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsGetCall) Context(ctx context.Context) *RegionBackendBucketsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucket.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 *RegionBackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, 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 := &BackendBucket{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) GetIamPolicy(project string, region string, resource string) *RegionBackendBucketsGetIamPolicyCall { - c := &RegionBackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionBackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendBucketsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendBucketsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsGetIamPolicyCall) Context(ctx context.Context) *RegionBackendBucketsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.getIamPolicy" call. -// 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 *RegionBackendBucketsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsInsertCall struct { - s *Service - project string - region string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a RegionBackendBucket in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionBackendBucketsService) Insert(project string, region string, backendbucket *BackendBucket) *RegionBackendBucketsInsertCall { - c := &RegionBackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendBucketsInsertCall) RequestId(requestId string) *RegionBackendBucketsInsertCall { - 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 -// details. -func (c *RegionBackendBucketsInsertCall) Fields(s ...googleapi.Field) *RegionBackendBucketsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsInsertCall) Context(ctx context.Context) *RegionBackendBucketsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendBucket resources available to the -// specified -// project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionBackendBucketsService) List(project string, region string) *RegionBackendBucketsListCall { - c := &RegionBackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendBucketsListCall) Filter(filter string) *RegionBackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendBucketsListCall) MaxResults(maxResults int64) *RegionBackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendBucketsListCall) OrderBy(orderBy string) *RegionBackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendBucketsListCall) PageToken(pageToken string) *RegionBackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsListCall) Fields(s ...googleapi.Field) *RegionBackendBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsListCall) IfNoneMatch(entityTag string) *RegionBackendBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsListCall) Context(ctx context.Context) *RegionBackendBucketsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketList.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 *RegionBackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, 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 := &BackendBucketList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendBucketsListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend buckets in the specified -// project in -// the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionBackendBucketsService) ListUsable(project string, region string) *RegionBackendBucketsListUsableCall { - c := &RegionBackendBucketsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendBucketsListUsableCall) Filter(filter string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendBucketsListUsableCall) MaxResults(maxResults int64) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendBucketsListUsableCall) OrderBy(orderBy string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendBucketsListUsableCall) PageToken(pageToken string) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendBucketsListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsListUsableCall) Fields(s ...googleapi.Field) *RegionBackendBucketsListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendBucketsListUsableCall) IfNoneMatch(entityTag string) *RegionBackendBucketsListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsListUsableCall) Context(ctx context.Context) *RegionBackendBucketsListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendBucketListUsable.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 *RegionBackendBucketsListUsableCall) Do(opts ...googleapi.CallOption) (*BackendBucketListUsable, 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 := &BackendBucketListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendBucketsListUsableCall) Pages(ctx context.Context, f func(*BackendBucketListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendBucketsPatchCall struct { - s *Service - project string - region string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified BackendBucket resource with the data included -// in the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - backendBucket: Name of the BackendBucket resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendBucketsService) Patch(project string, region string, backendBucket string, backendbucket *BackendBucket) *RegionBackendBucketsPatchCall { - c := &RegionBackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendBucket = backendBucket - c.backendbucket = backendbucket - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionBackendBucketsPatchCall) RequestId(requestId string) *RegionBackendBucketsPatchCall { - 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 -// details. -func (c *RegionBackendBucketsPatchCall) Fields(s ...googleapi.Field) *RegionBackendBucketsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsPatchCall) Context(ctx context.Context) *RegionBackendBucketsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendbucket) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{backendBucket}") - 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{ - "project": c.project, - "region": c.region, - "backendBucket": c.backendBucket, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendBucketsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendBucketsSetIamPolicyCall { - c := &RegionBackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendBucketsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsSetIamPolicyCall) Context(ctx context.Context) *RegionBackendBucketsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.setIamPolicy" call. -// 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 *RegionBackendBucketsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendBucketsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendBucketsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendBucketsTestIamPermissionsCall { - c := &RegionBackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendBucketsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendBucketsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendBucketsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendBuckets/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendBuckets.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionBackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendBuckets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - 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 -// details. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional BackendService resource. -// -// - backendService: Name of the BackendService resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendService.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 *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for this -// regional BackendService. -// -// - backendService: Name of the BackendService resource for which to get -// health. -// - project: . -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { - c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.getIamPolicy" call. -// 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 *RegionBackendServicesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified project -// using -// the data included in the request. For more information, see -// Backend services overview. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { - 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 -// details. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional BackendService resources available to -// the -// specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendServicesListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves a list of all usable backend services in the specified -// project in -// the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.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 *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, see -// Understanding backend services This method -// supports PATCH semantics and uses the JSON merge -// patch format and processing rules. -// -// - backendService: Name of the BackendService resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - 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 -// details. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setIamPolicy" call. -// 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 *RegionBackendServicesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend -// service. For more information, seeGoogle -// Cloud Armor Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { - 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 -// details. -func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with the -// data -// included in the request. For more information, -// see -// Backend services overview. -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - 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 -// details. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments by region. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.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 *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, 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 := &CommitmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCommitmentsGetCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified commitment resource. -// -// - commitment: Name of the commitment to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Commitment.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 *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, 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 := &Commitment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a commitment in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { - 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 -// details. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of commitments contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentList.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 *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, 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 := &CommitmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCommitmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { - c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsUpdateCall struct { - s *Service - project string - region string - commitment string - commitment2 *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified commitment with the data included in the -// request. -// Update is performed only on selected fields included as part of -// update-mask. Only the following fields can be updated: auto_renew and plan. -// -// - commitment: Name of the commitment that you want to update. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { - c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - c.commitment2 = commitment2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { - 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 -// details. -func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") - 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsUpdateReservationsCall struct { - s *Service - project string - region string - commitment string - regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateReservations: Transfers GPUs or Local SSD disks between reservations -// that are attached -// to the same commitment. -// -// - commitment: Name of the commitment for which the reservations are being -// updated. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { - c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.commitment = commitment - c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { - 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 -// details. -func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") - 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.updateReservations" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateReservationsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute3-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute3-gen.go deleted file mode 100644 index ae08237348f40..0000000000000 --- a/vendor/google.golang.org/api/compute/v0.beta/compute3-gen.go +++ /dev/null @@ -1,72989 +0,0 @@ -// Copyright 2025 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 compute - -import ( - "context" - "fmt" - "net/http" - - internallog "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - gensupport "google.golang.org/api/internal/gensupport" -) - -type RegionCompositeHealthChecksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all CompositeHealthCheck resources -// (all -// regional) available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionCompositeHealthChecksService) AggregatedList(project string) *RegionCompositeHealthChecksAggregatedListCall { - c := &RegionCompositeHealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCompositeHealthChecksAggregatedListCall) Filter(filter string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionCompositeHealthChecksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCompositeHealthChecksAggregatedListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksAggregatedListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCompositeHealthChecksAggregatedListCall) PageToken(pageToken string) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCompositeHealthChecksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionCompositeHealthChecksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksAggregatedListCall) Context(ctx context.Context) *RegionCompositeHealthChecksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/compositeHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckAggregatedList.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 *RegionCompositeHealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckAggregatedList, 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 := &CompositeHealthCheckAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCompositeHealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCompositeHealthChecksDeleteCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified CompositeHealthCheck in the given region -// -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Delete(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksDeleteCall { - c := &RegionCompositeHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksDeleteCall) RequestId(requestId string) *RegionCompositeHealthChecksDeleteCall { - 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 -// details. -func (c *RegionCompositeHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksDeleteCall) Context(ctx context.Context) *RegionCompositeHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksGetCall struct { - s *Service - project string - region string - compositeHealthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified CompositeHealthCheck resource in the given -// region. -// -// - compositeHealthCheck: Name of the CompositeHealthCheck resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Get(project string, region string, compositeHealthCheck string) *RegionCompositeHealthChecksGetCall { - c := &RegionCompositeHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksGetCall) Context(ctx context.Context) *RegionCompositeHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheck.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 *RegionCompositeHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheck, 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 := &CompositeHealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksInsertCall struct { - s *Service - project string - region string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a CompositeHealthCheck in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Insert(project string, region string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksInsertCall { - c := &RegionCompositeHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositehealthcheck = compositehealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksInsertCall) RequestId(requestId string) *RegionCompositeHealthChecksInsertCall { - 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 -// details. -func (c *RegionCompositeHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksInsertCall) Context(ctx context.Context) *RegionCompositeHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the CompositeHealthChecks for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) List(project string, region string) *RegionCompositeHealthChecksListCall { - c := &RegionCompositeHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionCompositeHealthChecksListCall) Filter(filter string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCompositeHealthChecksListCall) MaxResults(maxResults int64) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionCompositeHealthChecksListCall) OrderBy(orderBy string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionCompositeHealthChecksListCall) PageToken(pageToken string) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionCompositeHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksListCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionCompositeHealthChecksListCall) IfNoneMatch(entityTag string) *RegionCompositeHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksListCall) Context(ctx context.Context) *RegionCompositeHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *CompositeHealthCheckList.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 *RegionCompositeHealthChecksListCall) Do(opts ...googleapi.CallOption) (*CompositeHealthCheckList, 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 := &CompositeHealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionCompositeHealthChecksListCall) Pages(ctx context.Context, f func(*CompositeHealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionCompositeHealthChecksPatchCall struct { - s *Service - project string - region string - compositeHealthCheck string - compositehealthcheck *CompositeHealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional CompositeHealthCheck resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - compositeHealthCheck: Name of the CompositeHealthCheck to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionCompositeHealthChecksService) Patch(project string, region string, compositeHealthCheck string, compositehealthcheck *CompositeHealthCheck) *RegionCompositeHealthChecksPatchCall { - c := &RegionCompositeHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.compositeHealthCheck = compositeHealthCheck - c.compositehealthcheck = compositehealthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionCompositeHealthChecksPatchCall) RequestId(requestId string) *RegionCompositeHealthChecksPatchCall { - 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 -// details. -func (c *RegionCompositeHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksPatchCall) Context(ctx context.Context) *RegionCompositeHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.compositehealthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{compositeHealthCheck}") - 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{ - "project": c.project, - "region": c.region, - "compositeHealthCheck": c.compositeHealthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCompositeHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCompositeHealthChecksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCompositeHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCompositeHealthChecksTestIamPermissionsCall { - c := &RegionCompositeHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionCompositeHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCompositeHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/compositeHealthChecks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCompositeHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionCompositeHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCompositeHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get Regional Disk Settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { - c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.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 *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, 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 := &DiskSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskSettingsPatchCall struct { - s *Service - project string - region string - disksettings *DiskSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch Regional Disk Settings -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { - c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksettings = disksettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { - 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 -// details. -func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDiskSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskTypesGetCall struct { - s *Service - project string - region string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional disk type. -// -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.diskType = diskType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskType.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 *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, 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 := &DiskType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDiskTypesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of regional disk types available to the specified -// project. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDiskTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDiskTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.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 *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, 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 := &RegionDiskTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionDisksAddResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddResourcePolicies: Adds existing resource policies to a regional disk. You -// can only add one -// policy which will be applied to this disk for scheduling snapshot -// creation. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { - c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { - 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 -// details. -func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.addResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksAddResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksBulkInsertCall struct { - s *Service - project string - region string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Bulk create a set of disks. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { - c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.bulkinsertdiskresource = bulkinsertdiskresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { - 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 -// details. -func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot -// creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots -// in a project different from the source disk project. -// -// - disk: Name of the regional persistent disk to snapshot. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { - 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 -// details. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.createSnapshot" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksCreateSnapshotCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional persistent disk. Deleting a regional -// disk -// removes all the replicas of its data permanently and is -// irreversible. -// However, deleting a disk does not delete anysnapshots -// previously made from the disk. You must separatelydelete -// snapshots. -// -// - disk: Name of the regional persistent disk to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { - 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 -// details. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksGetCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified regional persistent disk. -// -// - disk: Name of the regional persistent disk to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Disk.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 *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, 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 := &Disk{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { - c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.getIamPolicy" call. -// 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 *RegionDisksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksInsertCall struct { - s *Service - project string - region string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a persistent regional disk in the specified project using -// the data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of persistent disks contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DiskList.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 *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, 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 := &DiskList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionDisksRemoveResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveResourcePolicies: Removes resource policies from a regional disk. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { - c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { - 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 -// details. -func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.removeResourcePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksRemoveResourcePoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the specified regional persistent disk. -// -// - disk: Name of the regional persistent disk. -// - project: The project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { - 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 -// details. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { - c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setIamPolicy" call. -// 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 *RegionDisksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on the target regional disk. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { - 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 -// details. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStartAsyncReplicationCall struct { - s *Service - project string - region string - disk string - regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartAsyncReplication: Starts asynchronous replication. -// Must be invoked on the primary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { - c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.startAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStartAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopAsyncReplicationCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopAsyncReplication: Stops asynchronous replication. -// Can be invoked either on the primary or on the secondary disk. -// -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { - c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksStopGroupAsyncReplicationCall struct { - s *Service - project string - region string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. -// Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. This must be the region -// of the -// -// primary or secondary disks in the consistency group. -func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { - c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { - 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 -// details. -func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopGroupAsyncReplicationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionDisksUpdateCall struct { - s *Service - project string - region string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update the specified disk with the data included in the request. -// Update is -// performed only on selected fields included as part of update-mask. Only -// the -// following fields can be modified: user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { - c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.disk2 = disk2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { - 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 -// details. -func (c *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") - 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionDisks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthAggregationPolicy -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionHealthAggregationPoliciesService) AggregatedList(project string) *RegionHealthAggregationPoliciesAggregatedListCall { - c := &RegionHealthAggregationPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Filter(filter string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthAggregationPoliciesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) OrderBy(orderBy string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) PageToken(pageToken string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthAggregationPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicyAggregatedList.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 *RegionHealthAggregationPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicyAggregatedList, 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 := &HealthAggregationPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthAggregationPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*HealthAggregationPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthAggregationPoliciesDeleteCall struct { - s *Service - project string - region string - healthAggregationPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthAggregationPolicy in the given region. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy resource to -// delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Delete(project string, region string, healthAggregationPolicy string) *RegionHealthAggregationPoliciesDeleteCall { - c := &RegionHealthAggregationPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesDeleteCall) RequestId(requestId string) *RegionHealthAggregationPoliciesDeleteCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesDeleteCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesGetCall struct { - s *Service - project string - region string - healthAggregationPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthAggregationPolicy resource in the given -// region. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy resource to -// return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Get(project string, region string, healthAggregationPolicy string) *RegionHealthAggregationPoliciesGetCall { - c := &RegionHealthAggregationPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesGetCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesGetCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesGetCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicy.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 *RegionHealthAggregationPoliciesGetCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicy, 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 := &HealthAggregationPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesInsertCall struct { - s *Service - project string - region string - healthaggregationpolicy *HealthAggregationPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a HealthAggregationPolicy in the specified project in the -// given -// region using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Insert(project string, region string, healthaggregationpolicy *HealthAggregationPolicy) *RegionHealthAggregationPoliciesInsertCall { - c := &RegionHealthAggregationPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthaggregationpolicy = healthaggregationpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesInsertCall) RequestId(requestId string) *RegionHealthAggregationPoliciesInsertCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesInsertCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthaggregationpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the HealthAggregationPolicies for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) List(project string, region string) *RegionHealthAggregationPoliciesListCall { - c := &RegionHealthAggregationPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthAggregationPoliciesListCall) Filter(filter string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthAggregationPoliciesListCall) MaxResults(maxResults int64) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthAggregationPoliciesListCall) OrderBy(orderBy string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthAggregationPoliciesListCall) PageToken(pageToken string) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthAggregationPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesListCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthAggregationPoliciesListCall) IfNoneMatch(entityTag string) *RegionHealthAggregationPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesListCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthAggregationPolicyList.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 *RegionHealthAggregationPoliciesListCall) Do(opts ...googleapi.CallOption) (*HealthAggregationPolicyList, 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 := &HealthAggregationPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthAggregationPoliciesListCall) Pages(ctx context.Context, f func(*HealthAggregationPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthAggregationPoliciesPatchCall struct { - s *Service - project string - region string - healthAggregationPolicy string - healthaggregationpolicy *HealthAggregationPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthAggregationPolicy -// resource with the data included in the request. This method -// supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthAggregationPolicy: Name of the HealthAggregationPolicy to update. -// The name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthAggregationPoliciesService) Patch(project string, region string, healthAggregationPolicy string, healthaggregationpolicy *HealthAggregationPolicy) *RegionHealthAggregationPoliciesPatchCall { - c := &RegionHealthAggregationPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthAggregationPolicy = healthAggregationPolicy - c.healthaggregationpolicy = healthaggregationpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthAggregationPoliciesPatchCall) RequestId(requestId string) *RegionHealthAggregationPoliciesPatchCall { - 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 -// details. -func (c *RegionHealthAggregationPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesPatchCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthaggregationpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{healthAggregationPolicy}") - 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{ - "project": c.project, - "region": c.region, - "healthAggregationPolicy": c.healthAggregationPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthAggregationPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthAggregationPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthAggregationPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c := &RegionHealthAggregationPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthAggregationPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthAggregationPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthAggregationPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthAggregationPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthAggregationPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthAggregationPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesDeleteCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified regional HealthCheckService. -// -// - healthCheckService: Name of the HealthCheckService to delete. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { - c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { - 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 -// details. -func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesGetCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified regional HealthCheckService resource. -// -// - healthCheckService: Name of the HealthCheckService to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { - c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckService.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 *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, 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 := &HealthCheckService{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesInsertCall struct { - s *Service - project string - region string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional HealthCheckService resource in the -// specified project and region using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { - c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthcheckservice = healthcheckservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { - 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 -// details. -func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the HealthCheckService resources that have been -// configured for the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { - c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServicesList.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 *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, 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 := &HealthCheckServicesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthCheckServicesPatchCall struct { - s *Service - project string - region string - healthCheckService string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthCheckService resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheckService: Name of the HealthCheckService to update. The -// name -// -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { - c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheckService = healthCheckService - c.healthcheckservice = healthcheckservice - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { - 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 -// details. -func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") - 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{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthCheckServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthCheckServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthCheckServicesTestIamPermissionsCall { - c := &RegionHealthCheckServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthCheckServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthCheckServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthCheckServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksDeleteCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { - c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { - 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 -// details. -func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksGetCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthCheck resource. -// -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { - c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.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 *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, 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 := &HealthCheck{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksInsertCall struct { - s *Service - project string - region string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { - c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { - 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 -// details. -func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of HealthCheck resources available to the -// specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { - c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.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 *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, 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 := &HealthCheckList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthChecksPatchCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { - c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { - 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 -// details. -func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - 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{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthChecksTestIamPermissionsCall { - c := &RegionHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthChecksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthChecksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksUpdateCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using the -// data -// included in the request. -// -// - healthCheck: Name of the HealthCheck resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { - c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { - 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 -// details. -func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all HealthSource resources -// (all -// regional) available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *RegionHealthSourcesService) AggregatedList(project string) *RegionHealthSourcesAggregatedListCall { - c := &RegionHealthSourcesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthSourcesAggregatedListCall) Filter(filter string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionHealthSourcesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthSourcesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthSourcesAggregatedListCall) OrderBy(orderBy string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthSourcesAggregatedListCall) PageToken(pageToken string) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthSourcesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionHealthSourcesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesAggregatedListCall) Context(ctx context.Context) *RegionHealthSourcesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthSources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSourceAggregatedList.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 *RegionHealthSourcesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthSourceAggregatedList, 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 := &HealthSourceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthSourcesAggregatedListCall) Pages(ctx context.Context, f func(*HealthSourceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthSourcesDeleteCall struct { - s *Service - project string - region string - healthSource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified HealthSource in the given region -// -// - healthSource: Name of the HealthSource resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Delete(project string, region string, healthSource string) *RegionHealthSourcesDeleteCall { - c := &RegionHealthSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesDeleteCall) RequestId(requestId string) *RegionHealthSourcesDeleteCall { - 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 -// details. -func (c *RegionHealthSourcesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthSourcesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesDeleteCall) Context(ctx context.Context) *RegionHealthSourcesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesGetCall struct { - s *Service - project string - region string - healthSource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified HealthSource resource in the given region. -// -// - healthSource: Name of the HealthSource resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Get(project string, region string, healthSource string) *RegionHealthSourcesGetCall { - c := &RegionHealthSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesGetCall) Fields(s ...googleapi.Field) *RegionHealthSourcesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesGetCall) IfNoneMatch(entityTag string) *RegionHealthSourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesGetCall) Context(ctx context.Context) *RegionHealthSourcesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSource.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 *RegionHealthSourcesGetCall) Do(opts ...googleapi.CallOption) (*HealthSource, 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 := &HealthSource{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesInsertCall struct { - s *Service - project string - region string - healthsource *HealthSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a HealthSource in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Insert(project string, region string, healthsource *HealthSource) *RegionHealthSourcesInsertCall { - c := &RegionHealthSourcesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthsource = healthsource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesInsertCall) RequestId(requestId string) *RegionHealthSourcesInsertCall { - 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 -// details. -func (c *RegionHealthSourcesInsertCall) Fields(s ...googleapi.Field) *RegionHealthSourcesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesInsertCall) Context(ctx context.Context) *RegionHealthSourcesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the HealthSources for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) List(project string, region string) *RegionHealthSourcesListCall { - c := &RegionHealthSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionHealthSourcesListCall) Filter(filter string) *RegionHealthSourcesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthSourcesListCall) MaxResults(maxResults int64) *RegionHealthSourcesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionHealthSourcesListCall) OrderBy(orderBy string) *RegionHealthSourcesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionHealthSourcesListCall) PageToken(pageToken string) *RegionHealthSourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionHealthSourcesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionHealthSourcesListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesListCall) Context(ctx context.Context) *RegionHealthSourcesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *HealthSourceList.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 *RegionHealthSourcesListCall) Do(opts ...googleapi.CallOption) (*HealthSourceList, 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 := &HealthSourceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionHealthSourcesListCall) Pages(ctx context.Context, f func(*HealthSourceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionHealthSourcesPatchCall struct { - s *Service - project string - region string - healthSource string - healthsource *HealthSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified regional HealthSource resource -// with the data included in the request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - healthSource: Name of the HealthSource to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthSourcesService) Patch(project string, region string, healthSource string, healthsource *HealthSource) *RegionHealthSourcesPatchCall { - c := &RegionHealthSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthSource = healthSource - c.healthsource = healthsource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionHealthSourcesPatchCall) RequestId(requestId string) *RegionHealthSourcesPatchCall { - 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 -// details. -func (c *RegionHealthSourcesPatchCall) Fields(s ...googleapi.Field) *RegionHealthSourcesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesPatchCall) Context(ctx context.Context) *RegionHealthSourcesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") - 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{ - "project": c.project, - "region": c.region, - "healthSource": c.healthSource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthSourcesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthSourcesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthSourcesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthSourcesTestIamPermissionsCall { - c := &RegionHealthSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionHealthSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthSourcesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthSourcesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthSourcesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionHealthSourcesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthSources.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsCancelCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified resize request. -// Cancelled resize request no longer waits for the resources to -// be -// provisioned. Cancel is only possible for requests that are in -// accepted -// state. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request to cancel. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Cancel(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c := &RegionInstanceGroupManagerResizeRequestsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsCancelCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsCancelCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified, inactive resize request. Requests that are -// still -// active cannot be deleted. Deleting request does not delete instances -// that -// were provisioned previously. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request to delete. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Delete(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c := &RegionInstanceGroupManagerResizeRequestsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsGetCall struct { - s *Service - project string - region string - instanceGroupManager string - resizeRequest string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified resize request. -// -// - instanceGroupManager: The name of the managed instance group. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: The name of the region -// scoping this request. Name should conform to RFC1035. -// - resizeRequest: The name of the resize request. -// Name should conform to RFC1035 or be a resource ID. -func (r *RegionInstanceGroupManagerResizeRequestsService) Get(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsGetCall { - c := &RegionInstanceGroupManagerResizeRequestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.resizeRequest = resizeRequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - "resizeRequest": c.resizeRequest, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManagerResizeRequest.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 *RegionInstanceGroupManagerResizeRequestsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequest, 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 := &InstanceGroupManagerResizeRequest{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsInsertCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new Resize Request that starts provisioning VMs -// immediately -// or queues VM creation. -// -// - instanceGroupManager: Name of the managed instance group to which the -// resize request is scoped. -// Name should conform to RFC1035 or be a resource ID. -// - project: Project ID for this request. -// - region: Name of the region -// scoping this request. Name should conform to RFC1035. -func (r *RegionInstanceGroupManagerResizeRequestsService) Insert(project string, region string, instanceGroupManager string, instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c := &RegionInstanceGroupManagerResizeRequestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagerresizerequest = instancegroupmanagerresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagerResizeRequestsInsertCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsInsertCall { - 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 -// details. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanagerresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagerResizeRequestsListCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Resize Requests that are contained in the -// managed instance group. -// -// - instanceGroupManager: The name of the managed instance group. The name -// should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region -// scoping this request. Name should conform to RFC1035. -func (r *RegionInstanceGroupManagerResizeRequestsService) List(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagerResizeRequestsListCall { - c := &RegionInstanceGroupManagerResizeRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Filter(filter string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagerResizeRequestsListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) OrderBy(orderBy string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) PageToken(pageToken string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagerResizeRequestsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagerResizeRequestsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagerResizeRequestsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagerResizeRequests.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagerResizeRequestsListResponse.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 *RegionInstanceGroupManagerResizeRequestsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerResizeRequestsListResponse, 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 := &RegionInstanceGroupManagerResizeRequestsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagerResizeRequests.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagerResizeRequestsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerResizeRequestsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AbandonInstances: Flags the specified instances to be immediately removed -// from the managed -// instance group. Abandoning an instance does not delete the -// instance, but it does remove the instance from any target pools that -// are -// applied by the managed instance group. This method reduces thetargetSize of -// the managed instance group by the -// number of instances that you abandon. This operation is marked asDONE when -// the action is scheduled even if the instances have -// not yet been removed from the group. You must separately verify the -// status of the abandoning action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.abandonInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.abandonInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ApplyUpdatesToInstances: Apply updates to selected instances the managed -// instance group. -// -// - instanceGroupManager: The name of the managed instance group, should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersapplyupdatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateInstances: Creates instances with per-instance configurations in this -// regional managed -// instance group. Instances are created using the current instance -// template. -// The create instances operation is marked DONE if -// the createInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// thecreating or actions with the listmanagedinstances -// method. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: The name of theregion -// where the managed instance group is located. -// -// It should conform to RFC1035. -func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { - c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerscreateinstancesrequest = regioninstancegroupmanagerscreateinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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. -// -// The request ID must be -// a valid UUID with the exception that zero UUID is not -// supported -// (00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersCreateInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersCreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersCreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.createInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.createInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersCreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.createInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified managed instance group and all of the -// instances -// in that group. -// -// - instanceGroupManager: Name of the managed instance group to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { - 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 -// details. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteInstances: Flags the specified instances in the managed instance group -// to be -// immediately deleted. The instances are also removed from any target -// pools of which they were a member. This method reduces thetargetSize of the -// managed instance group by the number of -// instances that you delete. -// The deleteInstances operation is marked DONE if -// the deleteInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// thedeleting action with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersdeleteinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deleteInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deleteInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeletePerInstanceConfigs: Deletes selected per-instance configurations for -// the managed instance -// group. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerdeleteinstanceconfigreq = regioninstancegroupmanagerdeleteinstanceconfigreq - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerdeleteinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.deletePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all of the details about the specified managed instance group. -// -// - instanceGroupManager: Name of the managed instance group to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.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 *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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 := &InstanceGroupManager{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a managed instance group using the information that you -// specify -// in the request. After the group is created, instances in the group -// are -// created using the specified instance template. -// This operation is marked as DONE when the group is created -// even if the instances in the group have not yet been created. You -// must -// separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// A regional managed instance group can contain up to 2000 instances. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { - 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 -// details. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of managed instance groups that are -// contained -// within the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagerList.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 *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, 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 := &RegionInstanceGroupManagerList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListErrorsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListErrors: Lists all errors thrown by actions on instances for a given -// regional -// managed instance group. The filter andorderBy query parameters are not -// supported. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035, or an -// unsigned long integer: must match regexp pattern: -// (?:a-z (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// This should conform to RFC1035. -func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { - c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListErrorsCall) Filter(filter string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListErrorsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListErrorsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListErrorsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listErrors", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listErrors" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListErrorsResponse.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 *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListErrorsResponse, 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 := &RegionInstanceGroupManagersListErrorsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listErrors", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListErrorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListManagedInstances: Lists the instances in the managed instance group and -// instances that are -// scheduled to be created. The list includes any current actions -// that the group has scheduled for its instances. The orderBy -// query parameter is not supported. The `pageToken` query parameter -// is -// supported only if the group's `listManagedInstancesResults` field is set -// to `PAGINATED`. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listManagedInstances", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.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 *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, 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 := &RegionInstanceGroupManagersListInstancesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listManagedInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListPerInstanceConfigs: Lists all of the per-instance configurations defined -// for the managed -// instance group. The orderBy query parameter is not supported. -// -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listPerInstanceConfigs", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstanceConfigsResp.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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, 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 := &RegionInstanceGroupManagersListInstanceConfigsResp{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.listPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is patched -// even if the instances in the group are still in the process of -// being -// patched. You must separately verify the status of the individual -// instances -// with the listmanagedinstances -// method. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { - 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 -// details. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerpatchinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RecreateInstances: Flags the specified VM instances in the managed instance -// group to be -// immediately recreated. Each instance is recreated using the group's -// current -// configuration. This operation is marked as DONE when the flag -// is set even if the instances have not yet been recreated. You -// must -// separately verify the status of each instance by checking itscurrentAction -// field; for more information, see Checking -// the status of managed instances. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or -// deleted. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersrecreaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.recreateInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.recreateInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Changes the intended size of the managed instance group. If you -// increase -// the size, the group creates new instances using the current -// instance -// template. If you decrease the size, the group deletes one or -// more -// instances. -// -// The resize operation is marked DONE if theresize request is successful. The -// underlying actions take -// additional time. You must separately verify the status of thecreating or -// deleting actions with thelistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - size: Number of instances that should exist in this instance -// group -// -// manager. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resize", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResizeAdvancedCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResizeAdvanced: Resizes the regional managed instance group with advanced -// configuration -// options like disabling creation retries. This is an extended version of -// theresize method. -// -// If you increase the size, the group creates new instances using the -// current -// instance template. If you decrease the size, the group deletes one or -// more -// instances. -// -// The resize operation is marked DONE if theresize request is successful. The -// underlying actions take -// additional time. You must separately verify the status of thecreating or -// deleting actions with the get -// orlistmanagedinstances -// method. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is removed or deleted. -// -// - instanceGroupManager: The name of the managed instance group. -// It must be a string that meets the requirements in RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// It must be a string that meets the requirements in RFC1035. -func (r *RegionInstanceGroupManagersService) ResizeAdvanced(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresizeadvancedrequest *RegionInstanceGroupManagersResizeAdvancedRequest) *RegionInstanceGroupManagersResizeAdvancedCall { - c := &RegionInstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersresizeadvancedrequest = regioninstancegroupmanagersresizeadvancedrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeAdvancedCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeAdvancedCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeAdvancedCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersresizeadvancedrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resizeAdvanced", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resizeAdvanced" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeAdvancedCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resizeAdvanced", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersResumeInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResumeInstances: Flags the specified instances in the managed instance group -// to be -// resumed. This method increases thetargetSize and decreases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// resume. -// The resumeInstances operation is marked DONE if -// the resumeInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theRESUMING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are suspended. -// For -// example, if an instance was previously suspended using the -// suspendInstances -// method, it can be resumed using the resumeInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are resumed. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) ResumeInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest) *RegionInstanceGroupManagersResumeInstancesCall { - c := &RegionInstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersresumeinstancesrequest = regioninstancegroupmanagersresumeinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersResumeInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResumeInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersResumeInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersResumeInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersresumeinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resumeInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.resumeInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResumeInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.resumeInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoHealingPolicies: Modifies the autohealing policy for the instances in -// this managed -// instance group. -// [Deprecated] This method is deprecated. UseregionInstanceGroupManagers.patch -// instead. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssetautohealingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetInstanceTemplate: Sets the instance template to use when creating new -// instances or recreating -// instances in this group. Existing instances are not affected. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssettemplaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setInstanceTemplate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setInstanceTemplate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetTargetPools: Modifies the target pools to which all new instances in this -// group are -// assigned. Existing instances in the group are not affected. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssettargetpoolsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setTargetPools", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.setTargetPools", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersStartInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartInstances: Flags the specified instances in the managed instance group -// to be -// started. This method increases thetargetSize and decreases the -// targetStoppedSize -// of the managed instance group by the number of instances that you start. -// The startInstances operation is marked DONE if -// the startInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTARTING action with thelistmanagedinstances -// method. -// -// In this request, you can only specify instances that are stopped. -// For -// example, if an instance was previously stopped using the -// stopInstances -// method, it can be started using the startInstances method. -// -// If a health check is attached to the managed instance group, the -// specified -// instances will be verified as healthy after they are started. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) StartInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest) *RegionInstanceGroupManagersStartInstancesCall { - c := &RegionInstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersstartinstancesrequest = regioninstancegroupmanagersstartinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersStartInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStartInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStartInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStartInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersStartInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersstartinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.startInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.startInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersStartInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.startInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersStopInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StopInstances: Flags the specified instances in the managed instance group -// to be -// immediately stopped. You can only specify instances that are running in -// this request. This method reduces thetargetSize and increases the -// targetStoppedSize -// of the managed instance group by the number of instances that you stop. -// The stopInstances operation is marked DONE if -// the stopInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSTOPPING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays stopping the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is stopped. -// -// Stopped instances can be started using the startInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) StopInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest) *RegionInstanceGroupManagersStopInstancesCall { - c := &RegionInstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersstopinstancesrequest = regioninstancegroupmanagersstopinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersStopInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStopInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStopInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStopInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersStopInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagersstopinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.stopInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.stopInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersStopInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.stopInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersSuspendInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SuspendInstances: Flags the specified instances in the managed instance -// group to be -// immediately suspended. You can only specify instances that are running -// in -// this request. This method reduces thetargetSize and increases the -// targetSuspendedSize -// of the managed instance group by the number of instances that you -// suspend. -// The suspendInstances operation is marked DONE if -// the suspendInstances request is successful. The underlying -// actions take additional time. You must separately verify the status of -// theSUSPENDING action with thelistmanagedinstances -// method. -// -// If the standbyPolicy.initialDelaySec field is set, the group -// delays suspension of the instances until initialDelaySec have -// passed from instance.creationTimestamp (that is, when the -// instance was created). This delay gives your application time to -// set itself up and initialize on the instance. If more thaninitialDelaySec -// seconds have passed sinceinstance.creationTimestamp when this method is -// called, there -// will be zero delay. -// -// If the group is part of a backend -// service that has enabled -// connection draining, it can take up to 60 seconds after the -// connection -// draining duration has elapsed before the VM instance is -// suspended. -// -// Suspended instances can be resumed using the resumeInstances -// method. -// -// You can specify a maximum of 1000 instances with this method per request. -// -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SuspendInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest) *RegionInstanceGroupManagersSuspendInstancesCall { - c := &RegionInstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssuspendinstancesrequest = regioninstancegroupmanagerssuspendinstancesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersSuspendInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSuspendInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSuspendInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerssuspendinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.suspendInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.suspendInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSuspendInstancesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.suspendInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { - c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersUpdateCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a managed instance group using the information that you -// specify -// in the request. -// This operation is marked as DONE when the group is updated -// even if the instances in the group have not yet been updated. You -// must -// separately verify the status of the individual instances with -// thelistmanagedinstances -// method. -// -// If you update your group to specify a new template or -// instance -// configuration, it's possible that your intended specification for each VM -// in the group is different from the current state of that VM. To learn how -// to apply an updated configuration to the VMs in a MIG, seeUpdating instances -// in -// a MIG. -// -// - instanceGroupManager: The name of the instance group manager. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { - c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall { - 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 -// details. -func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancegroupmanager) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for -// the managed instance -// group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. -// -// - instanceGroupManager: The name of the managed instance group. -// It should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerupdateinstanceconfigreq = regioninstancegroupmanagerupdateinstanceconfigreq - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - 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 -// details. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupmanagerupdateinstanceconfigreq) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") - 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroupManagers.updatePerInstanceConfigs" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsGetCall struct { - s *Service - project string - region string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance group resource. -// -// - instanceGroup: Name of the instance group resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { - c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroup.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 *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, 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 := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of instance group resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { - c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupList.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 *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, 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 := &RegionInstanceGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupsListInstancesCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListInstances: Lists the instances in the specified instance group and -// displays -// information about the named ports. Depending on the specified options, -// this -// method can list all instances or only the instances that are running. -// The orderBy query parameter is not supported. -// -// - instanceGroup: Name of the regional instance group for which we want to -// list the -// -// instances. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { - c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupslistinstancesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances") - 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{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.listInstances", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.listInstances" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupsListInstances.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 *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, 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 := &RegionInstanceGroupsListInstances{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.listInstances", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstanceGroupsSetNamedPortsCall struct { - s *Service - project string - region string - instanceGroup string - regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNamedPorts: Sets the named ports for the specified regional instance -// group. -// -// - instanceGroup: The name of the regional instance group where the named -// ports are updated. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { - c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceGroup = instanceGroup - c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall { - 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 -// details. -func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioninstancegroupssetnamedportsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts") - 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{ - "project": c.project, - "region": c.region, - "instanceGroup": c.instanceGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.setNamedPorts", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.setNamedPorts" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupsSetNamedPortsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.setNamedPorts", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceGroupsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { - c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroups/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceGroups.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceGroups.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesDeleteCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified instance template. Deleting an instance -// template is -// permanent and cannot be undone. -// -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Delete(project string, region string, instanceTemplate string) *RegionInstanceTemplatesDeleteCall { - c := &RegionInstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceTemplate = instanceTemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceTemplatesDeleteCall) RequestId(requestId string) *RegionInstanceTemplatesDeleteCall { - 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 -// details. -func (c *RegionInstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesDeleteCall) Context(ctx context.Context) *RegionInstanceTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesGetCall struct { - s *Service - project string - region string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified instance template. -// -// - instanceTemplate: The name of the instance template. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Get(project string, region string, instanceTemplate string) *RegionInstanceTemplatesGetCall { - c := &RegionInstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instanceTemplate = instanceTemplate - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *RegionInstanceTemplatesGetCall) View(view string) *RegionInstanceTemplatesGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceTemplatesGetCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceTemplatesGetCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesGetCall) Context(ctx context.Context) *RegionInstanceTemplatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates/{instanceTemplate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceTemplate": c.instanceTemplate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.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 *RegionInstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, 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 := &InstanceTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesInsertCall struct { - s *Service - project string - region string - instancetemplate *InstanceTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance template in the specified project and region -// using the -// global instance template whose URL is included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstanceTemplatesService) Insert(project string, region string, instancetemplate *InstanceTemplate) *RegionInstanceTemplatesInsertCall { - c := &RegionInstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instancetemplate = instancetemplate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstanceTemplatesInsertCall) RequestId(requestId string) *RegionInstanceTemplatesInsertCall { - 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 -// details. -func (c *RegionInstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesInsertCall) Context(ctx context.Context) *RegionInstanceTemplatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancetemplate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceTemplatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstanceTemplatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of instance templates that are contained within -// the -// specified project and region. -// -// - project: Project ID for this request. -// - region: The name of the regions for this request. -func (r *RegionInstanceTemplatesService) List(project string, region string) *RegionInstanceTemplatesListCall { - c := &RegionInstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstanceTemplatesListCall) Filter(filter string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceTemplatesListCall) MaxResults(maxResults int64) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstanceTemplatesListCall) OrderBy(orderBy string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstanceTemplatesListCall) PageToken(pageToken string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// View sets the optional parameter "view": View of the instance template. -// -// Possible values: -// -// "BASIC" - Include everything except Partner Metadata. -// "FULL" - Include everything. -// "INSTANCE_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *RegionInstanceTemplatesListCall) View(view string) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstanceTemplatesListCall) Fields(s ...googleapi.Field) *RegionInstanceTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstanceTemplatesListCall) IfNoneMatch(entityTag string) *RegionInstanceTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceTemplatesListCall) Context(ctx context.Context) *RegionInstanceTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstanceTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.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 *RegionInstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, 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 := &InstanceTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstanceTemplates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstancesBulkInsertCall struct { - s *Service - project string - region string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BulkInsert: Creates multiple instances in a given region. Count specifies -// the number of -// instances to create. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstancesService) BulkInsert(project string, region string, bulkinsertinstanceresource *BulkInsertInstanceResource) *RegionInstancesBulkInsertCall { - c := &RegionInstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.bulkinsertinstanceresource = bulkinsertinstanceresource - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstancesBulkInsertCall) RequestId(requestId string) *RegionInstancesBulkInsertCall { - 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 -// details. -func (c *RegionInstancesBulkInsertCall) Fields(s ...googleapi.Field) *RegionInstancesBulkInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstancesBulkInsertCall) Context(ctx context.Context) *RegionInstancesBulkInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstancesBulkInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertinstanceresource) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instances/bulkInsert") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstances.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstances.bulkInsert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstancesBulkInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstances.bulkInsert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsDeleteCall struct { - s *Service - project string - region string - instantSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that -// deleting -// a single instantSnapshot might not necessarily delete all the data on -// that -// instantSnapshot. If any data on the instantSnapshot that is marked -// for -// deletion is needed for subsequent instantSnapshots, the data will be -// moved -// to the next corresponding instantSnapshot. -// -// For more information, seeDeleting -// instantSnapshots. -// -// - instantSnapshot: Name of the InstantSnapshot resource to delete. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) Delete(project string, region string, instantSnapshot string) *RegionInstantSnapshotsDeleteCall { - c := &RegionInstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshot = instantSnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsDeleteCall) RequestId(requestId string) *RegionInstantSnapshotsDeleteCall { - 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 -// details. -func (c *RegionInstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsDeleteCall) Context(ctx context.Context) *RegionInstantSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsGetCall struct { - s *Service - project string - region string - instantSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified InstantSnapshot resource in the specified region. -// -// - instantSnapshot: Name of the InstantSnapshot resource to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) Get(project string, region string, instantSnapshot string) *RegionInstantSnapshotsGetCall { - c := &RegionInstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantSnapshot = instantSnapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsGetCall) Context(ctx context.Context) *RegionInstantSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instantSnapshot": c.instantSnapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshot.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 *RegionInstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, 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 := &InstantSnapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionInstantSnapshotsGetIamPolicyCall { - c := &RegionInstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionInstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionInstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.getIamPolicy" call. -// 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 *RegionInstantSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsInsertCall struct { - s *Service - project string - region string - instantsnapshot *InstantSnapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instant snapshot in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionInstantSnapshotsService) Insert(project string, region string, instantsnapshot *InstantSnapshot) *RegionInstantSnapshotsInsertCall { - c := &RegionInstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.instantsnapshot = instantsnapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsInsertCall) RequestId(requestId string) *RegionInstantSnapshotsInsertCall { - 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 -// details. -func (c *RegionInstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsInsertCall) Context(ctx context.Context) *RegionInstantSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instantsnapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of InstantSnapshot resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionInstantSnapshotsService) List(project string, region string) *RegionInstantSnapshotsListCall { - c := &RegionInstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionInstantSnapshotsListCall) Filter(filter string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstantSnapshotsListCall) MaxResults(maxResults int64) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionInstantSnapshotsListCall) OrderBy(orderBy string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionInstantSnapshotsListCall) PageToken(pageToken string) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionInstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsListCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionInstantSnapshotsListCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsListCall) Context(ctx context.Context) *RegionInstantSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotList.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 *RegionInstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, 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 := &InstantSnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionInstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionInstantSnapshotsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionInstantSnapshotsSetIamPolicyCall { - c := &RegionInstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.setIamPolicy" call. -// 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 *RegionInstantSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a instantSnapshot in the given region. To -// learn more -// about labels, read the Labeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionInstantSnapshotsSetLabelsCall { - c := &RegionInstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionInstantSnapshotsSetLabelsCall) RequestId(requestId string) *RegionInstantSnapshotsSetLabelsCall { - 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 -// details. -func (c *RegionInstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionInstantSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstantSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionInstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotsTestIamPermissionsCall { - c := &RegionInstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionInstantSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsDeleteCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a multi-MIG in the specified project. -// -// - multiMig: Name of the multi-MIG to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Delete(project string, region string, multiMig string) *RegionMultiMigsDeleteCall { - c := &RegionMultiMigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionMultiMigsDeleteCall) RequestId(requestId string) *RegionMultiMigsDeleteCall { - 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 -// details. -func (c *RegionMultiMigsDeleteCall) Fields(s ...googleapi.Field) *RegionMultiMigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsDeleteCall) Context(ctx context.Context) *RegionMultiMigsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionMultiMigsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsGetCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns all the details of a specific multi-MIG. -// -// - multiMig: Name of the multi-MIG resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Get(project string, region string, multiMig string) *RegionMultiMigsGetCall { - c := &RegionMultiMigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigsGetCall) Fields(s ...googleapi.Field) *RegionMultiMigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigsGetCall) IfNoneMatch(entityTag string) *RegionMultiMigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsGetCall) Context(ctx context.Context) *RegionMultiMigsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMig.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 *RegionMultiMigsGetCall) Do(opts ...googleapi.CallOption) (*MultiMig, 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 := &MultiMig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsInsertCall struct { - s *Service - project string - region string - multimig *MultiMig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a multi-MIG in the specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Insert(project string, region string, multimig *MultiMig) *RegionMultiMigsInsertCall { - c := &RegionMultiMigsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multimig = multimig - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 you 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 *RegionMultiMigsInsertCall) RequestId(requestId string) *RegionMultiMigsInsertCall { - 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 -// details. -func (c *RegionMultiMigsInsertCall) Fields(s ...googleapi.Field) *RegionMultiMigsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsInsertCall) Context(ctx context.Context) *RegionMultiMigsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.multimig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionMultiMigsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionMultiMigsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of multi-MIGs in a project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) List(project string, region string) *RegionMultiMigsListCall { - c := &RegionMultiMigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionMultiMigsListCall) Filter(filter string) *RegionMultiMigsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionMultiMigsListCall) MaxResults(maxResults int64) *RegionMultiMigsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionMultiMigsListCall) OrderBy(orderBy string) *RegionMultiMigsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionMultiMigsListCall) PageToken(pageToken string) *RegionMultiMigsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionMultiMigsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionMultiMigsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionMultiMigsListCall) Fields(s ...googleapi.Field) *RegionMultiMigsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionMultiMigsListCall) IfNoneMatch(entityTag string) *RegionMultiMigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsListCall) Context(ctx context.Context) *RegionMultiMigsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionMultiMigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMigsList.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 *RegionMultiMigsListCall) Do(opts ...googleapi.CallOption) (*MultiMigsList, 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 := &MultiMigsList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigs.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionMultiMigsListCall) Pages(ctx context.Context, f func(*MultiMigsList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - regionnetworkendpointgroupsattachendpointsrequest *RegionNetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AttachNetworkEndpoints: Attach a list of network endpoints to the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network -// -// endpoints to. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, region string, networkEndpointGroup string, regionnetworkendpointgroupsattachendpointsrequest *RegionNetworkEndpointGroupsAttachEndpointsRequest) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - c.regionnetworkendpointgroupsattachendpointsrequest = regionnetworkendpointgroupsattachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionnetworkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") - 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{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.attachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsAttachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.attachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsDeleteCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network endpoint group. Note that the NEG -// cannot be -// deleted if it is configured as a backend of a backend service. -// -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with -// -// RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with RFC1035. -func (r *RegionNetworkEndpointGroupsService) Delete(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsDeleteCall { - c := &RegionNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsDeleteCall) RequestId(requestId string) *RegionNetworkEndpointGroupsDeleteCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - regionnetworkendpointgroupsdetachendpointsrequest *RegionNetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DetachNetworkEndpoints: Detach the network endpoint from the specified -// network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group you are -// detaching network -// -// endpoints from. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, region string, networkEndpointGroup string, regionnetworkendpointgroupsdetachendpointsrequest *RegionNetworkEndpointGroupsDetachEndpointsRequest) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - c.regionnetworkendpointgroupsdetachendpointsrequest = regionnetworkendpointgroupsdetachendpointsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionnetworkendpointgroupsdetachendpointsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") - 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{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.detachNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsDetachNetworkEndpointsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.detachNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsGetCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where -// the network endpoint group is located. It should comply with RFC1035. -func (r *RegionNetworkEndpointGroupsService) Get(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsGetCall { - c := &RegionNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *RegionNetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsGetCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.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 *RegionNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsInsertCall struct { - s *Service - project string - region string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using -// the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: The name of the region where -// you want to create the network endpoint group. It should comply -// with -// -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) Insert(project string, region string, networkendpointgroup *NetworkEndpointGroup) *RegionNetworkEndpointGroupsInsertCall { - c := &RegionNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkendpointgroup = networkendpointgroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkEndpointGroupsInsertCall) RequestId(requestId string) *RegionNetworkEndpointGroupsInsertCall { - 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 -// details. -func (c *RegionNetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsInsertCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkendpointgroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkEndpointGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkEndpointGroupsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of regional network endpoint groups available to -// the -// specified project in the given region. -// -// - project: Project ID for this request. -// - region: The name of theregion -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) List(project string, region string) *RegionNetworkEndpointGroupsListCall { - c := &RegionNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkEndpointGroupsListCall) Filter(filter string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkEndpointGroupsListCall) MaxResults(maxResults int64) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkEndpointGroupsListCall) OrderBy(orderBy string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkEndpointGroupsListCall) PageToken(pageToken string) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *RegionNetworkEndpointGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsListCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.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 *RegionNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, 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 := &NetworkEndpointGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - region string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. -// -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a -// list of included network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - region: The name of theregion -// where the network endpoint group is located. It should comply with -// RFC1035. -func (r *RegionNetworkEndpointGroupsService) ListNetworkEndpoints(project string, region string, networkEndpointGroup string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c := &RegionNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *RegionNetworkEndpointGroupsListNetworkEndpointsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEndpointGroup": c.networkEndpointGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.listNetworkEndpoints", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkEndpointGroups.listNetworkEndpoints" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.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 *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkEndpointGroups.listNetworkEndpoints", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkFirewallPoliciesAddAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) AddAssociation(project string, region string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *RegionNetworkFirewallPoliciesAddAssociationCall { - c := &RegionNetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// AssociatedPolicyToBeReplaced sets the optional parameter -// "associatedPolicyToBeReplaced": Name of the firewall policy associated with -// the target network to swap -// association with. This field is mutually exclusive -// with -// 'replace_existing_association'. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) AssociatedPolicyToBeReplaced(associatedPolicyToBeReplaced string) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("associatedPolicyToBeReplaced", associatedPolicyToBeReplaced) - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association already exists. -// This is false by default, in which case an error will be returned if -// an -// association already exists. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesAddAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesAddRuleCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) AddRule(project string, region string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *RegionNetworkFirewallPoliciesAddRuleCall { - c := &RegionNetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority betweenminPriority and -// maxPriority>. -// This field is exclusive with rule.priority. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesAddRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesCloneRulesCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CloneRules: Copies rules to the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) CloneRules(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c := &RegionNetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesCloneRulesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.cloneRules", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.cloneRules" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesCloneRulesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.cloneRules", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesDeleteCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Delete(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesDeleteCall { - c := &RegionNetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesDeleteCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Get(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetCall { - c := &RegionNetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.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 *RegionNetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, 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 := &FirewallPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried -// association belongs. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetAssociation(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c := &RegionNetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Name(name string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.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 *RegionNetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, 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 := &FirewallPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetEffectiveFirewalls: Returns the effective firewalls on a given network. -// -// - network: Network reference. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetEffectiveFirewalls(project string, region string, network string) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c := &RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlParams_.Set("network", network) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.ServerResponse.He -// ader 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 *RegionNetworkFirewallPoliciesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse, 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 := &RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getEffectiveFirewalls", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) GetIamPolicy(project string, region string, resource string) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c := &RegionNetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getIamPolicy" call. -// 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 *RegionNetworkFirewallPoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesGetRuleCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) GetRule(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesGetRuleCall { - c := &RegionNetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *RegionNetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, 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 := &FirewallPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesInsertCall struct { - s *Service - project string - region string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new network firewall policy in the specified project and -// region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Insert(project string, region string, firewallpolicy *FirewallPolicy) *RegionNetworkFirewallPoliciesInsertCall { - c := &RegionNetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesInsertCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesInsertCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the network firewall policies that have been configured -// for the specified project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) List(project string, region string) *RegionNetworkFirewallPoliciesListCall { - c := &RegionNetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkFirewallPoliciesListCall) Filter(filter string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkFirewallPoliciesListCall) OrderBy(orderBy string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkFirewallPoliciesListCall) PageToken(pageToken string) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *RegionNetworkFirewallPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesListCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *RegionNetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, 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 := &FirewallPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkFirewallPoliciesPatchCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified network firewall policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) Patch(project string, region string, firewallPolicy string, firewallpolicy *FirewallPolicy) *RegionNetworkFirewallPoliciesPatchCall { - c := &RegionNetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesPatchAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchAssociation: Updates an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) PatchAssociation(project string, region string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c := &RegionNetworkFirewallPoliciesPatchAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchAssociation") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patchAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesPatchRuleCall struct { - s *Service - project string - region string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) PatchRule(project string, region string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *RegionNetworkFirewallPoliciesPatchRuleCall { - c := &RegionNetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesPatchRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.firewallpolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule") - 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{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesRemoveAssociationCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified network firewall -// policy. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) RemoveAssociation(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c := &RegionNetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the association that will -// be removed. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesRemoveRuleCall struct { - s *Service - project string - region string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule of the specified priority. -// -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNetworkFirewallPoliciesService) RemoveRule(project string, region string, firewallPolicy string) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c := &RegionNetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *RegionNetworkFirewallPoliciesRemoveRuleCall { - 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 -// details. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "firewallPolicy": c.firewallPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkFirewallPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c := &RegionNetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.setIamPolicy" call. -// 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 *RegionNetworkFirewallPoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkFirewallPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNetworkFirewallPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c := &RegionNetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionNetworkFirewallPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/firewallPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkFirewallPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionNetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkFirewallPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAddAssociationCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicyassociation *NetworkPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddAssociation: Inserts an association for the specified network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) AddAssociation(project string, region string, networkPolicy string, networkpolicyassociation *NetworkPolicyAssociation) *RegionNetworkPoliciesAddAssociationCall { - c := &RegionNetworkPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicyassociation = networkpolicyassociation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesAddAssociationCall) RequestId(requestId string) *RegionNetworkPoliciesAddAssociationCall { - 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 -// details. -func (c *RegionNetworkPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAddAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAddAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesAddAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAddAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicyassociation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addAssociation") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addAssociation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.addAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesAddAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAddTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddTrafficClassificationRule: Inserts a rule into a network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) AddTrafficClassificationRule(project string, region string, networkPolicy string, networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesAddTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicytrafficclassificationrule = networkpolicytrafficclassificationrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesAddTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesAddTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicytrafficclassificationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/addTrafficClassificationRule") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addTrafficClassificationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.addTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesAddTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.addTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of network policies. -// -// To prevent failure, it's recommended that you set the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RegionNetworkPoliciesService) AggregatedList(project string) *RegionNetworkPoliciesAggregatedListCall { - c := &RegionNetworkPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkPoliciesAggregatedListCall) Filter(filter string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RegionNetworkPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkPoliciesAggregatedListCall) MaxResults(maxResults int64) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkPoliciesAggregatedListCall) OrderBy(orderBy string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkPoliciesAggregatedListCall) PageToken(pageToken string) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RegionNetworkPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesAggregatedListCall) Context(ctx context.Context) *RegionNetworkPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyAggregatedList.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 *RegionNetworkPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyAggregatedList, 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 := &NetworkPolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkPolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkPoliciesDeleteCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - networkPolicy: Name of the network policy resource to delete. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Delete(project string, region string, networkPolicy string) *RegionNetworkPoliciesDeleteCall { - c := &RegionNetworkPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesDeleteCall) RequestId(requestId string) *RegionNetworkPoliciesDeleteCall { - 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 -// details. -func (c *RegionNetworkPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesDeleteCall) Context(ctx context.Context) *RegionNetworkPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified network policy. -// -// - networkPolicy: Name of the network policy resource to return. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Get(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetCall { - c := &RegionNetworkPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetCall) Context(ctx context.Context) *RegionNetworkPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.get" call. -// 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 *RegionNetworkPoliciesGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetAssociationCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetAssociation: Gets an association with the specified name. -// -// - networkPolicy: Name of the network policy to which the queried association -// belongs. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) GetAssociation(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetAssociationCall { - c := &RegionNetworkPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Name sets the optional parameter "name": The name of the association to get -// from the network policy. -func (c *RegionNetworkPoliciesGetAssociationCall) Name(name string) *RegionNetworkPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesGetAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.getAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyAssociation.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 *RegionNetworkPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyAssociation, 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 := &NetworkPolicyAssociation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesGetTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetTrafficClassificationRule: Gets a rule of the specified priority. -// -// - networkPolicy: Name of the network policy to which the queried rule -// belongs. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) GetTrafficClassificationRule(project string, region string, networkPolicy string) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesGetTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the network policy. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesGetTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesGetTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/getTrafficClassificationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getTrafficClassificationRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.getTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyTrafficClassificationRule.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 *RegionNetworkPoliciesGetTrafficClassificationRuleCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyTrafficClassificationRule, 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 := &NetworkPolicyTrafficClassificationRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.getTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesInsertCall struct { - s *Service - project string - region string - networkpolicy *NetworkPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Insert(project string, region string, networkpolicy *NetworkPolicy) *RegionNetworkPoliciesInsertCall { - c := &RegionNetworkPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkpolicy = networkpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesInsertCall) RequestId(requestId string) *RegionNetworkPoliciesInsertCall { - 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 -// details. -func (c *RegionNetworkPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesInsertCall) Context(ctx context.Context) *RegionNetworkPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the specified -// project -// in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) List(project string, region string) *RegionNetworkPoliciesListCall { - c := &RegionNetworkPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNetworkPoliciesListCall) Filter(filter string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNetworkPoliciesListCall) MaxResults(maxResults int64) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNetworkPoliciesListCall) OrderBy(orderBy string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNetworkPoliciesListCall) PageToken(pageToken string) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNetworkPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNetworkPoliciesListCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNetworkPoliciesListCall) IfNoneMatch(entityTag string) *RegionNetworkPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesListCall) Context(ctx context.Context) *RegionNetworkPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkPolicyList.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 *RegionNetworkPoliciesListCall) Do(opts ...googleapi.CallOption) (*NetworkPolicyList, 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 := &NetworkPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNetworkPoliciesListCall) Pages(ctx context.Context, f func(*NetworkPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNetworkPoliciesPatchCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicy *NetworkPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the -// request. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) Patch(project string, region string, networkPolicy string, networkpolicy *NetworkPolicy) *RegionNetworkPoliciesPatchCall { - c := &RegionNetworkPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicy = networkpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesPatchCall) RequestId(requestId string) *RegionNetworkPoliciesPatchCall { - 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 -// details. -func (c *RegionNetworkPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesPatchCall) Context(ctx context.Context) *RegionNetworkPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesPatchTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchTrafficClassificationRule: Patches a rule of the specified priority. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) PatchTrafficClassificationRule(project string, region string, networkPolicy string, networkpolicytrafficclassificationrule *NetworkPolicyTrafficClassificationRule) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesPatchTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - c.networkpolicytrafficclassificationrule = networkpolicytrafficclassificationrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the traffic -// classification rule to patch. Only rules with -// a priority value between 1 and 2147482647 (inclusive) can be patched. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesPatchTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.networkpolicytrafficclassificationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/patchTrafficClassificationRule") - 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{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patchTrafficClassificationRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.patchTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesPatchTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.patchTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesRemoveAssociationCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveAssociation: Removes an association for the specified network policy. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) RemoveAssociation(project string, region string, networkPolicy string) *RegionNetworkPoliciesRemoveAssociationCall { - c := &RegionNetworkPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Name sets the optional parameter "name": Name for the association that will -// be removed. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Name(name string) *RegionNetworkPoliciesRemoveAssociationCall { - c.urlParams_.Set("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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesRemoveAssociationCall) RequestId(requestId string) *RegionNetworkPoliciesRemoveAssociationCall { - 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 -// details. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesRemoveAssociationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Context(ctx context.Context) *RegionNetworkPoliciesRemoveAssociationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesRemoveAssociationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeAssociation") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeAssociation", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.removeAssociation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesRemoveAssociationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeAssociation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNetworkPoliciesRemoveTrafficClassificationRuleCall struct { - s *Service - project string - region string - networkPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveTrafficClassificationRule: Deletes a rule of the specified priority. -// -// - networkPolicy: Name of the network policy resource to update. -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *RegionNetworkPoliciesService) RemoveTrafficClassificationRule(project string, region string, networkPolicy string) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c := &RegionNetworkPoliciesRemoveTrafficClassificationRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkPolicy = networkPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the network policy. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Priority(priority int64) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) RequestId(requestId string) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - 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 -// details. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Fields(s ...googleapi.Field) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Context(ctx context.Context) *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkPolicies/{networkPolicy}/removeTrafficClassificationRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkPolicy": c.networkPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeTrafficClassificationRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNetworkPolicies.removeTrafficClassificationRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNetworkPoliciesRemoveTrafficClassificationRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNetworkPolicies.removeTrafficClassificationRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsDeleteCall struct { - s *Service - project string - region string - notificationEndpoint string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified NotificationEndpoint in the given region -// -// - notificationEndpoint: Name of the NotificationEndpoint resource to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Delete(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsDeleteCall { - c := &RegionNotificationEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationEndpoint = notificationEndpoint - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNotificationEndpointsDeleteCall) RequestId(requestId string) *RegionNotificationEndpointsDeleteCall { - 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 -// details. -func (c *RegionNotificationEndpointsDeleteCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsDeleteCall) Context(ctx context.Context) *RegionNotificationEndpointsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "notificationEndpoint": c.notificationEndpoint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNotificationEndpointsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsGetCall struct { - s *Service - project string - region string - notificationEndpoint string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified NotificationEndpoint resource in the given -// region. -// -// - notificationEndpoint: Name of the NotificationEndpoint resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Get(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsGetCall { - c := &RegionNotificationEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationEndpoint = notificationEndpoint - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsGetCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNotificationEndpointsGetCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsGetCall) Context(ctx context.Context) *RegionNotificationEndpointsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{notificationEndpoint}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "notificationEndpoint": c.notificationEndpoint, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NotificationEndpoint.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 *RegionNotificationEndpointsGetCall) Do(opts ...googleapi.CallOption) (*NotificationEndpoint, 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 := &NotificationEndpoint{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsInsertCall struct { - s *Service - project string - region string - notificationendpoint *NotificationEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Create a NotificationEndpoint in the specified project in the given -// region -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) Insert(project string, region string, notificationendpoint *NotificationEndpoint) *RegionNotificationEndpointsInsertCall { - c := &RegionNotificationEndpointsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.notificationendpoint = notificationendpoint - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionNotificationEndpointsInsertCall) RequestId(requestId string) *RegionNotificationEndpointsInsertCall { - 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 -// details. -func (c *RegionNotificationEndpointsInsertCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsInsertCall) Context(ctx context.Context) *RegionNotificationEndpointsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.notificationendpoint) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionNotificationEndpointsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionNotificationEndpointsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the NotificationEndpoints for a project in the given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionNotificationEndpointsService) List(project string, region string) *RegionNotificationEndpointsListCall { - c := &RegionNotificationEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionNotificationEndpointsListCall) Filter(filter string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionNotificationEndpointsListCall) MaxResults(maxResults int64) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionNotificationEndpointsListCall) OrderBy(orderBy string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionNotificationEndpointsListCall) PageToken(pageToken string) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionNotificationEndpointsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsListCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionNotificationEndpointsListCall) IfNoneMatch(entityTag string) *RegionNotificationEndpointsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsListCall) Context(ctx context.Context) *RegionNotificationEndpointsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NotificationEndpointList.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 *RegionNotificationEndpointsListCall) Do(opts ...googleapi.CallOption) (*NotificationEndpointList, 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 := &NotificationEndpointList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionNotificationEndpointsListCall) Pages(ctx context.Context, f func(*NotificationEndpointList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionNotificationEndpointsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionNotificationEndpointsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionNotificationEndpointsTestIamPermissionsCall { - c := &RegionNotificationEndpointsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionNotificationEndpointsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Context(ctx context.Context) *RegionNotificationEndpointsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionNotificationEndpointsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionNotificationEndpointsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/notificationEndpoints/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionNotificationEndpoints.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionNotificationEndpointsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionNotificationEndpoints.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified region-specific Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Delete(project string, region string, operationid string) *RegionOperationsDeleteCall { - c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type RegionOperationsGetCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified region-specific Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Get(project string, region string, operationid string) *RegionOperationsGetCall { - c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionOperationsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { - c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionOperationsWaitCall struct { - s *Service - project string - region string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method differs from the -// `GET` method in that it waits for no more than the default -// deadline (2 minutes) and then returns the current state of the -// operation, -// which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Wait(project string, region string, operationid string) *RegionOperationsWaitCall { - c := &RegionOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionOperationsWaitCall) Fields(s ...googleapi.Field) *RegionOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionOperationsWaitCall) Context(ctx context.Context) *RegionOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesAddRuleCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) AddRule(project string, region string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *RegionSecurityPoliciesAddRuleCall { - c := &RegionSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesAddRuleCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesAddRuleCall { - 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 -// details. -func (c *RegionSecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesAddRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/addRule") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesDeleteCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to delete. -func (r *RegionSecurityPoliciesService) Delete(project string, region string, securityPolicy string) *RegionSecurityPoliciesDeleteCall { - c := &RegionSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesDeleteCall) RequestId(requestId string) *RegionSecurityPoliciesDeleteCall { - 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 -// details. -func (c *RegionSecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesDeleteCall) Context(ctx context.Context) *RegionSecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesGetCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to get. -func (r *RegionSecurityPoliciesService) Get(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetCall { - c := &RegionSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesGetCall) Context(ctx context.Context) *RegionSecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *RegionSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesGetRuleCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *RegionSecurityPoliciesService) GetRule(project string, region string, securityPolicy string) *RegionSecurityPoliciesGetRuleCall { - c := &RegionSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *RegionSecurityPoliciesGetRuleCall) Priority(priority int64) *RegionSecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesGetRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *RegionSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesInsertCall struct { - s *Service - project string - region string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSecurityPoliciesService) Insert(project string, region string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesInsertCall { - c := &RegionSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesInsertCall) RequestId(requestId string) *RegionSecurityPoliciesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesInsertCall { - 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 -// details. -func (c *RegionSecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesInsertCall) Context(ctx context.Context) *RegionSecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the specified -// project -// and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSecurityPoliciesService) List(project string, region string) *RegionSecurityPoliciesListCall { - c := &RegionSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSecurityPoliciesListCall) Filter(filter string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSecurityPoliciesListCall) MaxResults(maxResults int64) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSecurityPoliciesListCall) OrderBy(orderBy string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSecurityPoliciesListCall) PageToken(pageToken string) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesListCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSecurityPoliciesListCall) IfNoneMatch(entityTag string) *RegionSecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesListCall) Context(ctx context.Context) *RegionSecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *RegionSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSecurityPoliciesPatchCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// To -// clear fields in the policy, leave the fields empty and specify them in -// the -// updateMask. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule -// instead. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) Patch(project string, region string, securityPolicy string, securitypolicy *SecurityPolicy) *RegionSecurityPoliciesPatchCall { - c := &RegionSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesPatchCall) RequestId(requestId string) *RegionSecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *RegionSecurityPoliciesPatchCall) UpdateMask(updateMask string) *RegionSecurityPoliciesPatchCall { - 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 -// details. -func (c *RegionSecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesPatchCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesPatchRuleCall struct { - s *Service - project string - region string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. To clear fields in the -// rule, -// leave the fields empty and specify them in the updateMask. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) PatchRule(project string, region string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *RegionSecurityPoliciesPatchRuleCall { - c := &RegionSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *RegionSecurityPoliciesPatchRuleCall) Priority(priority int64) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *RegionSecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *RegionSecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *RegionSecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesPatchRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule") - 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{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesRemoveRuleCall struct { - s *Service - project string - region string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - securityPolicy: Name of the security policy to update. -func (r *RegionSecurityPoliciesService) RemoveRule(project string, region string, securityPolicy string) *RegionSecurityPoliciesRemoveRuleCall { - c := &RegionSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *RegionSecurityPoliciesRemoveRuleCall) Priority(priority int64) *RegionSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *RegionSecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSecurityPoliciesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a security policy. To learn more about -// labels, -// read the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSecurityPoliciesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSecurityPoliciesSetLabelsCall { - c := &RegionSecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSecurityPoliciesSetLabelsCall) RequestId(requestId string) *RegionSecurityPoliciesSetLabelsCall { - 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 -// details. -func (c *RegionSecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSecurityPoliciesSetLabelsCall) Context(ctx context.Context) *RegionSecurityPoliciesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSecurityPoliciesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSecurityPolicies.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSecurityPoliciesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSecurityPolicies.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get region snapshot settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotSettingsService) Get(project string, region string) *RegionSnapshotSettingsGetCall { - c := &RegionSnapshotSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotSettingsGetCall) Fields(s ...googleapi.Field) *RegionSnapshotSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotSettingsGetCall) IfNoneMatch(entityTag string) *RegionSnapshotSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotSettingsGetCall) Context(ctx context.Context) *RegionSnapshotSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshotSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshotSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotSettings.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 *RegionSnapshotSettingsGetCall) Do(opts ...googleapi.CallOption) (*SnapshotSettings, 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 := &SnapshotSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotSettingsPatchCall struct { - s *Service - project string - region string - snapshotsettings *SnapshotSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch region snapshot settings. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotSettingsService) Patch(project string, region string, snapshotsettings *SnapshotSettings) *RegionSnapshotSettingsPatchCall { - c := &RegionSnapshotSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshotsettings = snapshotsettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotSettingsPatchCall) RequestId(requestId string) *RegionSnapshotSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionSnapshotSettingsPatchCall) UpdateMask(updateMask string) *RegionSnapshotSettingsPatchCall { - 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 -// details. -func (c *RegionSnapshotSettingsPatchCall) Fields(s ...googleapi.Field) *RegionSnapshotSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotSettingsPatchCall) Context(ctx context.Context) *RegionSnapshotSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshotsettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshotSettings") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshotSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshotSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsDeleteCall struct { - s *Service - project string - region string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting -// a single snapshot might not necessarily delete all the data on -// that -// snapshot. If any data on the snapshot that is marked for deletion is -// needed for subsequent snapshots, the data will be moved to the -// next -// corresponding snapshot. -// -// For more information, seeDeleting -// snapshots. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - snapshot: Name of the snapshot resource to delete. -func (r *RegionSnapshotsService) Delete(project string, region string, snapshot string) *RegionSnapshotsDeleteCall { - c := &RegionSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsDeleteCall) RequestId(requestId string) *RegionSnapshotsDeleteCall { - 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 -// details. -func (c *RegionSnapshotsDeleteCall) Fields(s ...googleapi.Field) *RegionSnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsDeleteCall) Context(ctx context.Context) *RegionSnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsGetCall struct { - s *Service - project string - region string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - snapshot: Name of the Snapshot resource to return. -func (r *RegionSnapshotsService) Get(project string, region string, snapshot string) *RegionSnapshotsGetCall { - c := &RegionSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsGetCall) Fields(s ...googleapi.Field) *RegionSnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsGetCall) IfNoneMatch(entityTag string) *RegionSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsGetCall) Context(ctx context.Context) *RegionSnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Snapshot.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 *RegionSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) GetIamPolicy(project string, region string, resource string) *RegionSnapshotsGetIamPolicyCall { - c := &RegionSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *RegionSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionSnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsGetIamPolicyCall) Context(ctx context.Context) *RegionSnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.getIamPolicy" call. -// 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 *RegionSnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsInsertCall struct { - s *Service - project string - region string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a snapshot in the specified region using the data -// included -// in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotsService) Insert(project string, region string, snapshot *Snapshot) *RegionSnapshotsInsertCall { - c := &RegionSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsInsertCall) RequestId(requestId string) *RegionSnapshotsInsertCall { - 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 -// details. -func (c *RegionSnapshotsInsertCall) Fields(s ...googleapi.Field) *RegionSnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsInsertCall) Context(ctx context.Context) *RegionSnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within -// the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionSnapshotsService) List(project string, region string) *RegionSnapshotsListCall { - c := &RegionSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSnapshotsListCall) Filter(filter string) *RegionSnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSnapshotsListCall) MaxResults(maxResults int64) *RegionSnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSnapshotsListCall) OrderBy(orderBy string) *RegionSnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSnapshotsListCall) PageToken(pageToken string) *RegionSnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsListCall) Fields(s ...googleapi.Field) *RegionSnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSnapshotsListCall) IfNoneMatch(entityTag string) *RegionSnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsListCall) Context(ctx context.Context) *RegionSnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotList.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 *RegionSnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, 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 := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSnapshotsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionSnapshotsSetIamPolicyCall { - c := &RegionSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionSnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsSetIamPolicyCall) Context(ctx context.Context) *RegionSnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.setIamPolicy" call. -// 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 *RegionSnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a regional snapshot. To learn more about -// labels, read -// the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSnapshotsSetLabelsCall { - c := &RegionSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSnapshotsSetLabelsCall) RequestId(requestId string) *RegionSnapshotsSetLabelsCall { - 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 -// details. -func (c *RegionSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionSnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionSnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSnapshotsTestIamPermissionsCall { - c := &RegionSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/snapshots/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSnapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesDeleteCall struct { - s *Service - project string - region string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource in the region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslCertificate: Name of the SslCertificate resource to delete. -func (r *RegionSslCertificatesService) Delete(project string, region string, sslCertificate string) *RegionSslCertificatesDeleteCall { - c := &RegionSslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslCertificate = sslCertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslCertificatesDeleteCall) RequestId(requestId string) *RegionSslCertificatesDeleteCall { - 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 -// details. -func (c *RegionSslCertificatesDeleteCall) Fields(s ...googleapi.Field) *RegionSslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesDeleteCall) Context(ctx context.Context) *RegionSslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslCertificatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesGetCall struct { - s *Service - project string - region string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource in the specified region. -// Get -// a list of available SSL certificates by making a list() -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslCertificate: Name of the SslCertificate resource to return. -func (r *RegionSslCertificatesService) Get(project string, region string, sslCertificate string) *RegionSslCertificatesGetCall { - c := &RegionSslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesGetCall) Fields(s ...googleapi.Field) *RegionSslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslCertificatesGetCall) IfNoneMatch(entityTag string) *RegionSslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesGetCall) Context(ctx context.Context) *RegionSslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificate.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 *RegionSslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, 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 := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesInsertCall struct { - s *Service - project string - region string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project and -// region using -// the data included in the request -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslCertificatesService) Insert(project string, region string, sslcertificate *SslCertificate) *RegionSslCertificatesInsertCall { - c := &RegionSslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslcertificate = sslcertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslCertificatesInsertCall) RequestId(requestId string) *RegionSslCertificatesInsertCall { - 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 -// details. -func (c *RegionSslCertificatesInsertCall) Fields(s ...googleapi.Field) *RegionSslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesInsertCall) Context(ctx context.Context) *RegionSslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertificate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslCertificatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslCertificatesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified -// project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslCertificatesService) List(project string, region string) *RegionSslCertificatesListCall { - c := &RegionSslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslCertificatesListCall) Filter(filter string) *RegionSslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslCertificatesListCall) MaxResults(maxResults int64) *RegionSslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslCertificatesListCall) OrderBy(orderBy string) *RegionSslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslCertificatesListCall) PageToken(pageToken string) *RegionSslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslCertificatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslCertificatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesListCall) Fields(s ...googleapi.Field) *RegionSslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslCertificatesListCall) IfNoneMatch(entityTag string) *RegionSslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesListCall) Context(ctx context.Context) *RegionSslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateList.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 *RegionSslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, 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 := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSslCertificatesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource and region. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSslCertificatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSslCertificatesTestIamPermissionsCall { - c := &RegionSslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *RegionSslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslCertificates/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslCertificates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslCertificates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesDeleteCall struct { - s *Service - project string - region string - sslPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SSL policy. The SSL policy resource can be -// deleted -// only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy -// resources. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to delete. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Delete(project string, region string, sslPolicy string) *RegionSslPoliciesDeleteCall { - c := &RegionSslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesDeleteCall) RequestId(requestId string) *RegionSslPoliciesDeleteCall { - 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 -// details. -func (c *RegionSslPoliciesDeleteCall) Fields(s ...googleapi.Field) *RegionSslPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesDeleteCall) Context(ctx context.Context) *RegionSslPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesGetCall struct { - s *Service - project string - region string - sslPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Lists all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Get(project string, region string, sslPolicy string) *RegionSslPoliciesGetCall { - c := &RegionSslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesGetCall) Fields(s ...googleapi.Field) *RegionSslPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesGetCall) IfNoneMatch(entityTag string) *RegionSslPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesGetCall) Context(ctx context.Context) *RegionSslPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPolicy.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 *RegionSslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, 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 := &SslPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesInsertCall struct { - s *Service - project string - region string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project and region using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) Insert(project string, region string, sslpolicy *SslPolicy) *RegionSslPoliciesInsertCall { - c := &RegionSslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesInsertCall) RequestId(requestId string) *RegionSslPoliciesInsertCall { - 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 -// details. -func (c *RegionSslPoliciesInsertCall) Fields(s ...googleapi.Field) *RegionSslPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesInsertCall) Context(ctx context.Context) *RegionSslPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the SSL policies that have been configured for the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) List(project string, region string) *RegionSslPoliciesListCall { - c := &RegionSslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslPoliciesListCall) Filter(filter string) *RegionSslPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslPoliciesListCall) MaxResults(maxResults int64) *RegionSslPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslPoliciesListCall) OrderBy(orderBy string) *RegionSslPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslPoliciesListCall) PageToken(pageToken string) *RegionSslPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesListCall) Fields(s ...googleapi.Field) *RegionSslPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesListCall) IfNoneMatch(entityTag string) *RegionSslPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesListCall) Context(ctx context.Context) *RegionSslPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesList.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 *RegionSslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList, 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 := &SslPoliciesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionSslPoliciesListCall) Pages(ctx context.Context, f func(*SslPoliciesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionSslPoliciesListAvailableFeaturesCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAvailableFeatures: Lists all features that can be specified in the SSL -// policy when using -// custom profile. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionSslPoliciesService) ListAvailableFeatures(project string, region string) *RegionSslPoliciesListAvailableFeaturesCall { - c := &RegionSslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Filter(filter string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionSslPoliciesListAvailableFeaturesCall) MaxResults(maxResults int64) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionSslPoliciesListAvailableFeaturesCall) OrderBy(orderBy string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionSslPoliciesListAvailableFeaturesCall) PageToken(pageToken string) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionSslPoliciesListAvailableFeaturesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Fields(s ...googleapi.Field) *RegionSslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionSslPoliciesListAvailableFeaturesCall) IfNoneMatch(entityTag string) *RegionSslPoliciesListAvailableFeaturesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Context(ctx context.Context) *RegionSslPoliciesListAvailableFeaturesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesListAvailableFeaturesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/listAvailableFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.listAvailableFeatures", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.listAvailableFeatures" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesListAvailableFeaturesResponse.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 *RegionSslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) (*SslPoliciesListAvailableFeaturesResponse, 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 := &SslPoliciesListAvailableFeaturesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.listAvailableFeatures", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesPatchCall struct { - s *Service - project string - region string - sslPolicy string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified SSL policy with the data included in the -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *RegionSslPoliciesService) Patch(project string, region string, sslPolicy string, sslpolicy *SslPolicy) *RegionSslPoliciesPatchCall { - c := &RegionSslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.sslPolicy = sslPolicy - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionSslPoliciesPatchCall) RequestId(requestId string) *RegionSslPoliciesPatchCall { - 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 -// details. -func (c *RegionSslPoliciesPatchCall) Fields(s ...googleapi.Field) *RegionSslPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesPatchCall) Context(ctx context.Context) *RegionSslPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{sslPolicy}") - 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{ - "project": c.project, - "region": c.region, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionSslPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionSslPoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionSslPoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSslPoliciesTestIamPermissionsCall { - c := &RegionSslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionSslPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionSslPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionSslPoliciesTestIamPermissionsCall) Context(ctx context.Context) *RegionSslPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionSslPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionSslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/sslPolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionSslPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionSslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionSslPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesDeleteCall struct { - s *Service - project string - region string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to delete. -func (r *RegionTargetHttpProxiesService) Delete(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesDeleteCall { - c := &RegionTargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesGetCall struct { - s *Service - project string - region string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to return. -func (r *RegionTargetHttpProxiesService) Get(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesGetCall { - c := &RegionTargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxy.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 *RegionTargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, 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 := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesInsertCall struct { - s *Service - project string - region string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpProxiesService) Insert(project string, region string, targethttpproxy *TargetHttpProxy) *RegionTargetHttpProxiesInsertCall { - c := &RegionTargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpProxiesInsertCall { - 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 -// details. -func (c *RegionTargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available -// to the specified project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpProxiesService) List(project string, region string) *RegionTargetHttpProxiesListCall { - c := &RegionTargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetHttpProxiesListCall) Filter(filter string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetHttpProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetHttpProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetHttpProxiesListCall) PageToken(pageToken string) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetHttpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesListCall) Context(ctx context.Context) *RegionTargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.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 *RegionTargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, 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 := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - region string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpProxy: Name of the TargetHttpProxy to set a URL map for. -func (r *RegionTargetHttpProxiesService) SetUrlMap(project string, region string, targetHttpProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpProxiesSetUrlMapCall { - c := &RegionTargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpProxiesSetUrlMapCall { - 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 -// details. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - 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{ - "project": c.project, - "region": c.region, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetHttpProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpProxiesTestIamPermissionsCall { - c := &RegionTargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesDeleteCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to delete. -func (r *RegionTargetHttpsProxiesService) Delete(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesDeleteCall { - c := &RegionTargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpsProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesGetCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource in the specified -// region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to return. -func (r *RegionTargetHttpsProxiesService) Get(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesGetCall { - c := &RegionTargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.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 *RegionTargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, 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 := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesInsertCall struct { - s *Service - project string - region string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified project and -// region -// using the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpsProxiesService) Insert(project string, region string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesInsertCall { - c := &RegionTargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpsProxiesInsertCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources available -// to the specified project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetHttpsProxiesService) List(project string, region string) *RegionTargetHttpsProxiesListCall { - c := &RegionTargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetHttpsProxiesListCall) Filter(filter string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetHttpsProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetHttpsProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetHttpsProxiesListCall) PageToken(pageToken string) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetHttpsProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesListCall) Context(ctx context.Context) *RegionTargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.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 *RegionTargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, 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 := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetHttpsProxiesPatchCall struct { - s *Service - project string - region string - targetHttpsProxy string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified regional TargetHttpsProxy resource with the -// data -// included in the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to patch. -func (r *RegionTargetHttpsProxiesService) Patch(project string, region string, targetHttpsProxy string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesPatchCall { - c := &RegionTargetHttpsProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesPatchCall) RequestId(requestId string) *RegionTargetHttpsProxiesPatchCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesPatchCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesPatchCall) Context(ctx context.Context) *RegionTargetHttpsProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - region string - targetHttpsProxy string - regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set -// an -// -// SslCertificates resource for. -func (r *RegionTargetHttpsProxiesService) SetSslCertificates(project string, region string, targetHttpsProxy string, regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c := &RegionTargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.regiontargethttpsproxiessetsslcertificatesrequest = regiontargethttpsproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetSslCertificatesCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiontargethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - region string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy to set a URL map for. -func (r *RegionTargetHttpsProxiesService) SetUrlMap(project string, region string, targetHttpsProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpsProxiesSetUrlMapCall { - c := &RegionTargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetUrlMapCall { - 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 -// details. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - 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{ - "project": c.project, - "region": c.region, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetHttpsProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetHttpsProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c := &RegionTargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetHttpsProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetHttpsProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetHttpsProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesDeleteCall struct { - s *Service - project string - region string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to delete. -func (r *RegionTargetTcpProxiesService) Delete(project string, region string, targetTcpProxy string) *RegionTargetTcpProxiesDeleteCall { - c := &RegionTargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetTcpProxy = targetTcpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetTcpProxiesDeleteCall) RequestId(requestId string) *RegionTargetTcpProxiesDeleteCall { - 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 -// details. -func (c *RegionTargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesDeleteCall) Context(ctx context.Context) *RegionTargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetTcpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesGetCall struct { - s *Service - project string - region string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to return. -func (r *RegionTargetTcpProxiesService) Get(project string, region string, targetTcpProxy string) *RegionTargetTcpProxiesGetCall { - c := &RegionTargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesGetCall) Context(ctx context.Context) *RegionTargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxy.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 *RegionTargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, 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 := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesInsertCall struct { - s *Service - project string - region string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project and -// region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetTcpProxiesService) Insert(project string, region string, targettcpproxy *TargetTcpProxy) *RegionTargetTcpProxiesInsertCall { - c := &RegionTargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targettcpproxy = targettcpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RegionTargetTcpProxiesInsertCall) RequestId(requestId string) *RegionTargetTcpProxiesInsertCall { - 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 -// details. -func (c *RegionTargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesInsertCall) Context(ctx context.Context) *RegionTargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionTargetTcpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionTargetTcpProxiesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetTcpProxy resources -// available to the specified project in a given region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionTargetTcpProxiesService) List(project string, region string) *RegionTargetTcpProxiesListCall { - c := &RegionTargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionTargetTcpProxiesListCall) Filter(filter string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionTargetTcpProxiesListCall) MaxResults(maxResults int64) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionTargetTcpProxiesListCall) OrderBy(orderBy string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionTargetTcpProxiesListCall) PageToken(pageToken string) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionTargetTcpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionTargetTcpProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesListCall) Context(ctx context.Context) *RegionTargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.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 *RegionTargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, 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 := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionTargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionTargetTcpProxiesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionTargetTcpProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetTcpProxiesTestIamPermissionsCall { - c := &RegionTargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionTargetTcpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Context(ctx context.Context) *RegionTargetTcpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionTargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetTcpProxies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionTargetTcpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionTargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionTargetTcpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsDeleteCall struct { - s *Service - project string - region string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to delete. -func (r *RegionUrlMapsService) Delete(project string, region string, urlMap string) *RegionUrlMapsDeleteCall { - c := &RegionUrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsDeleteCall) RequestId(requestId string) *RegionUrlMapsDeleteCall { - 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 -// details. -func (c *RegionUrlMapsDeleteCall) Fields(s ...googleapi.Field) *RegionUrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsDeleteCall) Context(ctx context.Context) *RegionUrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsGetCall struct { - s *Service - project string - region string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to return. -func (r *RegionUrlMapsService) Get(project string, region string, urlMap string) *RegionUrlMapsGetCall { - c := &RegionUrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsGetCall) Fields(s ...googleapi.Field) *RegionUrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionUrlMapsGetCall) IfNoneMatch(entityTag string) *RegionUrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsGetCall) Context(ctx context.Context) *RegionUrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMap.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 *RegionUrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, 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 := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsInsertCall struct { - s *Service - project string - region string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionUrlMapsService) Insert(project string, region string, urlmap *UrlMap) *RegionUrlMapsInsertCall { - c := &RegionUrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsInsertCall) RequestId(requestId string) *RegionUrlMapsInsertCall { - 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 -// details. -func (c *RegionUrlMapsInsertCall) Fields(s ...googleapi.Field) *RegionUrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsInsertCall) Context(ctx context.Context) *RegionUrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsInvalidateCacheCall struct { - s *Service - project string - region string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, invalidating the -// specified path, -// scoped to the specified UrlMap. -// -// For more information, see Invalidating cached -// content (/cdn/docs/invalidating-cached-content). -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap scoping this request. -func (r *RegionUrlMapsService) InvalidateCache(project string, region string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *RegionUrlMapsInvalidateCacheCall { - c := &RegionUrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsInvalidateCacheCall) RequestId(requestId string) *RegionUrlMapsInvalidateCacheCall { - 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 -// details. -func (c *RegionUrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *RegionUrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsInvalidateCacheCall) Context(ctx context.Context) *RegionUrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/invalidateCache") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.invalidateCache", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.invalidateCache" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsInvalidateCacheCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.invalidateCache", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified -// project in the specified region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionUrlMapsService) List(project string, region string) *RegionUrlMapsListCall { - c := &RegionUrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionUrlMapsListCall) Filter(filter string) *RegionUrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionUrlMapsListCall) MaxResults(maxResults int64) *RegionUrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionUrlMapsListCall) OrderBy(orderBy string) *RegionUrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionUrlMapsListCall) PageToken(pageToken string) *RegionUrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionUrlMapsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionUrlMapsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsListCall) Fields(s ...googleapi.Field) *RegionUrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionUrlMapsListCall) IfNoneMatch(entityTag string) *RegionUrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsListCall) Context(ctx context.Context) *RegionUrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapList.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 *RegionUrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, 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 := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionUrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionUrlMapsPatchCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to patch. -func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { - c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatchCall { - 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 -// details. -func (c *RegionUrlMapsPatchCall) Fields(s ...googleapi.Field) *RegionUrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsPatchCall) Context(ctx context.Context) *RegionUrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionUrlMapsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionUrlMapsTestIamPermissionsCall { - c := &RegionUrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionUrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsTestIamPermissionsCall) Context(ctx context.Context) *RegionUrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsUpdateCall struct { - s *Service - project string - region string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included in -// the -// request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { - c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.urlmap = urlmap - return c -} - -// RequestId sets the optional parameter "requestId": begin_interface: -// MixerMutationRequestBuilder -// Request ID to support idempotency. -func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { - 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 -// details. -func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionUrlMapsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionUrlMapsValidateCall struct { - s *Service - project string - region string - urlMap string - regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the -// provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { - c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.urlMap = urlMap - c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionUrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionurlmapsvalidaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/urlMaps/{urlMap}/validate") - 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{ - "project": c.project, - "region": c.region, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionUrlMaps.validate" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.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 *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, 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 := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionUrlMaps.validate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionZonesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources under the specific region -// available to -// the specified project. -// -// - project: Project ID for this request. -// - region: Region for this request. -func (r *RegionZonesService) List(project string, region string) *RegionZonesListCall { - c := &RegionZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionZonesListCall) Filter(filter string) *RegionZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionZonesListCall) MaxResults(maxResults int64) *RegionZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionZonesListCall) OrderBy(orderBy string) *RegionZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionZonesListCall) PageToken(pageToken string) *RegionZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionZonesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionZonesListCall) Fields(s ...googleapi.Field) *RegionZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionZonesListCall) IfNoneMatch(entityTag string) *RegionZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionZonesListCall) Context(ctx context.Context) *RegionZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/zones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionZones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionZones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ZoneList.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 *RegionZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, 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 := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionZones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RegionsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Region resource. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information (the `quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. -// -// - project: Project ID for this request. -// - region: Name of the region resource to return. -func (r *RegionsService) Get(project string, region string) *RegionsGetCall { - c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Region.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 *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, 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 := &Region{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of region resources available to the specified -// project. -// -// To decrease latency for this method, you can optionally omit any -// unneeded -// information from the response by using a field mask. This practice -// is -// especially recommended for unused quota information -// (the `items.quotas` field). -// To exclude one or more fields, set your request's `fields` query -// parameter -// to only include the fields you need. For example, to only include the -// `id` -// and `selfLink` fields, add the query parameter `?fields=id,selfLink` to -// your request. -// -// This method fails if the quota information is unavailable for the region -// and if the organization policy -// constraint -// compute.requireBasicQuotaInResponse is enforced. This -// constraint, when enforced, disables the fail-open behaviour when -// quota -// information (the `items.quotas` field) is unavailable for the region. -// It is recommended to use the default setting -// for the constraint unless your application requires the -// fail-closed -// behaviour for this method. -// -// - project: Project ID for this request. -func (r *RegionsService) List(project string) *RegionsListCall { - c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RegionsListCall) Filter(filter string) *RegionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RegionsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RegionList.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 *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, 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 := &RegionList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationBlocksGetCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation block. -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) Get(project string, zone string, reservation string, reservationBlock string) *ReservationBlocksGetCall { - c := &ReservationBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock - return c -} - -// View sets the optional parameter "view": View of the Block. -// -// Possible values: -// -// "BASIC" - This view includes basic information about the reservation block -// "BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will default -// -// to the BASIC view. -// -// "FULL" - Includes detailed topology view. -func (c *ReservationBlocksGetCall) View(view string) *ReservationBlocksGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksGetCall) Fields(s ...googleapi.Field) *ReservationBlocksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationBlocksGetCall) IfNoneMatch(entityTag string) *ReservationBlocksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksGetCall) Context(ctx context.Context) *ReservationBlocksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksGetResponse.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 *ReservationBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksGetResponse, 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 := &ReservationBlocksGetResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksGetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationBlocksGetIamPolicyCall { - c := &ReservationBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationBlocksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ReservationBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationBlocksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.getIamPolicy" call. -// 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 *ReservationBlocksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksListCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of reservation blocks under a single reservation. -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) List(project string, zone string, reservation string) *ReservationBlocksListCall { - c := &ReservationBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationBlocksListCall) Filter(filter string) *ReservationBlocksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationBlocksListCall) MaxResults(maxResults int64) *ReservationBlocksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationBlocksListCall) OrderBy(orderBy string) *ReservationBlocksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationBlocksListCall) PageToken(pageToken string) *ReservationBlocksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationBlocksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksListCall) Fields(s ...googleapi.Field) *ReservationBlocksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationBlocksListCall) IfNoneMatch(entityTag string) *ReservationBlocksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksListCall) Context(ctx context.Context) *ReservationBlocksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationBlocksListResponse.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 *ReservationBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationBlocksListResponse, 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 := &ReservationBlocksListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationBlocksListCall) Pages(ctx context.Context, f func(*ReservationBlocksListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationBlock string - reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Allows customers to perform maintenance on a reservation -// block -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - reservationBlock: The name of the reservation block. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationBlocksService) PerformMaintenance(project string, zone string, reservation string, reservationBlock string, reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest) *ReservationBlocksPerformMaintenanceCall { - c := &ReservationBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationBlock = reservationBlock - c.reservationsblocksperformmaintenancerequest = reservationsblocksperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationBlocksPerformMaintenanceCall { - 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 -// details. -func (c *ReservationBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationBlocksPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationBlocksPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsblocksperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - "reservationBlock": c.reservationBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationBlocksPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksSetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationBlocksSetIamPolicyCall { - c := &ReservationBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationBlocksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationBlocksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{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{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.setIamPolicy" call. -// 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 *ReservationBlocksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationBlocksTestIamPermissionsCall struct { - s *Service - project string - zone string - parentResource string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationBlocksTestIamPermissionsCall { - c := &ReservationBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationBlocksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationBlocksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationBlocksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{parentResource}/reservationBlocks/{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{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationBlocks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ReservationBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksGetCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation subBlock. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) Get(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksGetCall { - c := &ReservationSubBlocksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - return c -} - -// View sets the optional parameter "view": View of the subBlock. -// -// Possible values: -// -// "SUB_BLOCK_VIEW_BASIC" - This view includes basic information about the -// -// reservation sub block -// -// "SUB_BLOCK_VIEW_FULL" - Includes detailed topology view. -// "SUB_BLOCK_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -func (c *ReservationSubBlocksGetCall) View(view string) *ReservationSubBlocksGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksGetCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationSubBlocksGetCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksGetCall) Context(ctx context.Context) *ReservationSubBlocksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksGetResponse.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 *ReservationSubBlocksGetCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksGetResponse, 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 := &ReservationSubBlocksGetResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksGetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) GetIamPolicy(project string, zone string, parentResource string, resource string) *ReservationSubBlocksGetIamPolicyCall { - c := &ReservationSubBlocksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationSubBlocksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationSubBlocksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ReservationSubBlocksGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationSubBlocksGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationSubBlocksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksGetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.getIamPolicy" call. -// 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 *ReservationSubBlocksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksListCall struct { - s *Service - project string - zone string - parentName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of reservation subBlocks under a single reservation. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) List(project string, zone string, parentName string) *ReservationSubBlocksListCall { - c := &ReservationSubBlocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationSubBlocksListCall) Filter(filter string) *ReservationSubBlocksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationSubBlocksListCall) MaxResults(maxResults int64) *ReservationSubBlocksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationSubBlocksListCall) OrderBy(orderBy string) *ReservationSubBlocksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationSubBlocksListCall) PageToken(pageToken string) *ReservationSubBlocksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationSubBlocksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationSubBlocksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksListCall) Fields(s ...googleapi.Field) *ReservationSubBlocksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationSubBlocksListCall) IfNoneMatch(entityTag string) *ReservationSubBlocksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksListCall) Context(ctx context.Context) *ReservationSubBlocksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationSubBlocksListResponse.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 *ReservationSubBlocksListCall) Do(opts ...googleapi.CallOption) (*ReservationSubBlocksListResponse, 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 := &ReservationSubBlocksListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationSubBlocksListCall) Pages(ctx context.Context, f func(*ReservationSubBlocksListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationSubBlocksPerformMaintenanceCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Allows customers to perform maintenance on a reservation -// subBlock -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) PerformMaintenance(project string, zone string, parentName string, reservationSubBlock string) *ReservationSubBlocksPerformMaintenanceCall { - c := &ReservationSubBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationSubBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationSubBlocksPerformMaintenanceCall { - 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 -// details. -func (c *ReservationSubBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationSubBlocksPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationSubBlocksPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/performMaintenance") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksReportFaultyCall struct { - s *Service - project string - zone string - parentName string - reservationSubBlock string - reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ReportFaulty: Allows customers to report a faulty subBlock. -// -// - parentName: The name of the parent reservation and parent block. In the -// format -// of -// reservations/{reservation_name}/reservationBlocks/{reservation_block_name}. -// - project: Project ID for this request. -// - reservationSubBlock: The name of the reservation subBlock. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationSubBlocksService) ReportFaulty(project string, zone string, parentName string, reservationSubBlock string, reservationsubblocksreportfaultyrequest *ReservationSubBlocksReportFaultyRequest) *ReservationSubBlocksReportFaultyCall { - c := &ReservationSubBlocksReportFaultyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentName = parentName - c.reservationSubBlock = reservationSubBlock - c.reservationsubblocksreportfaultyrequest = reservationsubblocksreportfaultyrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationSubBlocksReportFaultyCall) RequestId(requestId string) *ReservationSubBlocksReportFaultyCall { - 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 -// details. -func (c *ReservationSubBlocksReportFaultyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksReportFaultyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksReportFaultyCall) Context(ctx context.Context) *ReservationSubBlocksReportFaultyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksReportFaultyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksReportFaultyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsubblocksreportfaultyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentName}/reservationSubBlocks/{reservationSubBlock}/reportFaulty") - 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{ - "project": c.project, - "zone": c.zone, - "parentName": c.parentName, - "reservationSubBlock": c.reservationSubBlock, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.reportFaulty" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationSubBlocksReportFaultyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.reportFaulty", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksSetIamPolicyCall struct { - s *Service - project string - zone string - parentResource string - resource string - zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) SetIamPolicy(project string, zone string, parentResource string, resource string, zonesetnestedpolicyrequest *ZoneSetNestedPolicyRequest) *ReservationSubBlocksSetIamPolicyCall { - c := &ReservationSubBlocksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.zonesetnestedpolicyrequest = zonesetnestedpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationSubBlocksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksSetIamPolicyCall) Context(ctx context.Context) *ReservationSubBlocksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetnestedpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{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{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.setIamPolicy" call. -// 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 *ReservationSubBlocksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationSubBlocksTestIamPermissionsCall struct { - s *Service - project string - zone string - parentResource string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - parentResource: Name or id of parent resource of the resource for this -// request. -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationSubBlocksService) TestIamPermissions(project string, zone string, parentResource string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationSubBlocksTestIamPermissionsCall { - c := &ReservationSubBlocksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.parentResource = parentResource - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationSubBlocksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationSubBlocksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationSubBlocksTestIamPermissionsCall) Context(ctx context.Context) *ReservationSubBlocksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationSubBlocksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationSubBlocksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/{parentResource}/reservationSubBlocks/{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{ - "project": c.project, - "zone": c.zone, - "parentResource": c.parentResource, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservationSubBlocks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ReservationSubBlocksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservationSubBlocks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of reservations. -// -// To prevent failure, it is recommended that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { - c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ReservationsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ReservationsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ReservationsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/reservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationAggregatedList.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 *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, 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 := &ReservationAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationsDeleteCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to delete. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { - c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { - 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 -// details. -func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsGetCall struct { - s *Service - project string - zone string - reservation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves information about the specified reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to retrieve. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { - c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Reservation.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 *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, 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 := &Reservation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { - c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.getIamPolicy" call. -// 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 *ReservationsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsInsertCall struct { - s *Service - project string - zone string - reservation *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new reservation. For more information, readReserving -// zonal -// resources. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { - c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { - 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 -// details. -func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list of all the reservations that have been configured for -// the -// specified project in specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { - c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ReservationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReservationList.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 *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, 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 := &ReservationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ReservationsPerformMaintenanceCall struct { - s *Service - project string - zone string - reservation string - reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PerformMaintenance: Perform maintenance on an extended reservation -// -// - project: Project ID for this request. -// - reservation: The name of the reservation. -// Name should conform to RFC1035 or be a resource ID. -// - zone: Name of the zone for this request. Zone name should conform to -// RFC1035. -func (r *ReservationsService) PerformMaintenance(project string, zone string, reservation string, reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest) *ReservationsPerformMaintenanceCall { - c := &ReservationsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsperformmaintenancerequest = reservationsperformmaintenancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsPerformMaintenanceCall) RequestId(requestId string) *ReservationsPerformMaintenanceCall { - 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 -// details. -func (c *ReservationsPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationsPerformMaintenanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsPerformMaintenanceCall) Context(ctx context.Context) *ReservationsPerformMaintenanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsPerformMaintenanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsperformmaintenancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.performMaintenance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsPerformMaintenanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.performMaintenance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsResizeCall struct { - s *Service - project string - zone string - reservation string - reservationsresizerequest *ReservationsResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resize: Resizes the reservation (applicable to standalone reservations -// only). For -// more information, readModifying -// reservations. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { - c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservationsresizerequest = reservationsresizerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { - 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 -// details. -func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsResizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservationsresizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/resize") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.resize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.resize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsResizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.resize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { - c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.setIamPolicy" call. -// 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 *ReservationsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { - c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ReservationsUpdateCall struct { - s *Service - project string - zone string - reservation string - reservation2 *Reservation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update share settings of the reservation. -// -// - project: Project ID for this request. -// - reservation: Name of the reservation to update. -// - zone: Name of the zone for this request. -func (r *ReservationsService) Update(project string, zone string, reservation string, reservation2 *Reservation) *ReservationsUpdateCall { - c := &ReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.reservation = reservation - c.reservation2 = reservation2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *ReservationsUpdateCall) Paths(paths ...string) *ReservationsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ReservationsUpdateCall) RequestId(requestId string) *ReservationsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Update_mask indicates -// fields to be updated as part of this request. -func (c *ReservationsUpdateCall) UpdateMask(updateMask string) *ReservationsUpdateCall { - 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 -// details. -func (c *ReservationsUpdateCall) Fields(s ...googleapi.Field) *ReservationsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ReservationsUpdateCall) Context(ctx context.Context) *ReservationsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ReservationsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reservation2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}") - 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{ - "project": c.project, - "zone": c.zone, - "reservation": c.reservation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.reservations.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.reservations.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ReservationsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.reservations.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of resource policies. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { - c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ResourcePoliciesAggregatedListCall) Filter(filter string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ResourcePoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ResourcePoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ResourcePoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *ResourcePoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesAggregatedListCall) IfNoneMatch(entityTag string) *ResourcePoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesAggregatedListCall) Context(ctx context.Context) *ResourcePoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/resourcePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyAggregatedList.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 *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyAggregatedList, 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 := &ResourcePolicyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(*ResourcePolicyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ResourcePoliciesDeleteCall struct { - s *Service - project string - region string - resourcePolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to delete. -func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { - c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesDeleteCall) RequestId(requestId string) *ResourcePoliciesDeleteCall { - 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 -// details. -func (c *ResourcePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResourcePoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesDeleteCall) Context(ctx context.Context) *ResourcePoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesGetCall struct { - s *Service - project string - region string - resourcePolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves all information of the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Name of the resource policy to retrieve. -func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { - c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesGetCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesGetCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetCall) Context(ctx context.Context) *ResourcePoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicy.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 *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePolicy, 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 := &ResourcePolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { - c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.getIamPolicy" call. -// 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 *ResourcePoliciesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesInsertCall struct { - s *Service - project string - region string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { - c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcepolicy = resourcepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePoliciesInsertCall { - 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 -// details. -func (c *ResourcePoliciesInsertCall) Fields(s ...googleapi.Field) *ResourcePoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesInsertCall) Context(ctx context.Context) *ResourcePoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: A list all the resource policies that have been configured for -// the -// specified project in specified region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { - c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ResourcePoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ResourcePoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ResourcePoliciesListCall) IfNoneMatch(entityTag string) *ResourcePoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesListCall) Context(ctx context.Context) *ResourcePoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourcePolicyList.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 *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, 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 := &ResourcePolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ResourcePoliciesPatchCall struct { - s *Service - project string - region string - resourcePolicy string - resourcepolicy *ResourcePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Modify the specified resource policy. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - resourcePolicy: Id of the resource policy to patch. -func (r *ResourcePoliciesService) Patch(project string, region string, resourcePolicy string, resourcepolicy *ResourcePolicy) *ResourcePoliciesPatchCall { - c := &ResourcePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resourcePolicy = resourcePolicy - c.resourcepolicy = resourcepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ResourcePoliciesPatchCall) RequestId(requestId string) *ResourcePoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *ResourcePoliciesPatchCall) UpdateMask(updateMask string) *ResourcePoliciesPatchCall { - 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 -// details. -func (c *ResourcePoliciesPatchCall) Fields(s ...googleapi.Field) *ResourcePoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesPatchCall) Context(ctx context.Context) *ResourcePoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{resourcePolicy}") - 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{ - "project": c.project, - "region": c.region, - "resourcePolicy": c.resourcePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResourcePoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { - c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.setIamPolicy" call. -// 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 *ResourcePoliciesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourcePoliciesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { - c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourcePoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ResourcePoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourcePoliciesTestIamPermissionsCall) Context(ctx context.Context) *ResourcePoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.resourcePolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.resourcePolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansDeleteCall struct { - s *Service - project string - rolloutPlan string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a RolloutPlan. -// -// - project: Project ID for this request. -// - rolloutPlan: Name of the RolloutPlan resource to delete. -func (r *RolloutPlansService) Delete(project string, rolloutPlan string) *RolloutPlansDeleteCall { - c := &RolloutPlansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutPlan = rolloutPlan - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutPlansDeleteCall) RequestId(requestId string) *RolloutPlansDeleteCall { - 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 -// details. -func (c *RolloutPlansDeleteCall) Fields(s ...googleapi.Field) *RolloutPlansDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansDeleteCall) Context(ctx context.Context) *RolloutPlansDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rolloutPlan": c.rolloutPlan, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutPlansDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansGetCall struct { - s *Service - project string - rolloutPlan string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single project-scoped RolloutPlan. -// -// - project: Project ID for this request. -// - rolloutPlan: Name of the persistent rollout plan to return. -func (r *RolloutPlansService) Get(project string, rolloutPlan string) *RolloutPlansGetCall { - c := &RolloutPlansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutPlan = rolloutPlan - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutPlansGetCall) Fields(s ...googleapi.Field) *RolloutPlansGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutPlansGetCall) IfNoneMatch(entityTag string) *RolloutPlansGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansGetCall) Context(ctx context.Context) *RolloutPlansGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans/{rolloutPlan}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rolloutPlan": c.rolloutPlan, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutPlan.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 *RolloutPlansGetCall) Do(opts ...googleapi.CallOption) (*RolloutPlan, 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 := &RolloutPlan{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansInsertCall struct { - s *Service - project string - rolloutplan *RolloutPlan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new RolloutPlan in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutPlansService) Insert(project string, rolloutplan *RolloutPlan) *RolloutPlansInsertCall { - c := &RolloutPlansInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rolloutplan = rolloutplan - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutPlansInsertCall) RequestId(requestId string) *RolloutPlansInsertCall { - 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 -// details. -func (c *RolloutPlansInsertCall) Fields(s ...googleapi.Field) *RolloutPlansInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansInsertCall) Context(ctx context.Context) *RolloutPlansInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rolloutplan) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutPlansInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutPlansListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RolloutPlans in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutPlansService) List(project string) *RolloutPlansListCall { - c := &RolloutPlansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RolloutPlansListCall) Filter(filter string) *RolloutPlansListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RolloutPlansListCall) MaxResults(maxResults int64) *RolloutPlansListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RolloutPlansListCall) OrderBy(orderBy string) *RolloutPlansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RolloutPlansListCall) PageToken(pageToken string) *RolloutPlansListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RolloutPlansListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutPlansListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutPlansListCall) Fields(s ...googleapi.Field) *RolloutPlansListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutPlansListCall) IfNoneMatch(entityTag string) *RolloutPlansListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutPlansListCall) Context(ctx context.Context) *RolloutPlansListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutPlansListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutPlansListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rolloutPlans") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rolloutPlans.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutPlansListResponse.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 *RolloutPlansListCall) Do(opts ...googleapi.CallOption) (*RolloutPlansListResponse, 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 := &RolloutPlansListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rolloutPlans.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RolloutPlansListCall) Pages(ctx context.Context, f func(*RolloutPlansListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RolloutsCancelCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the Rollout resource to cancel. -func (r *RolloutsService) Cancel(project string, rollout string) *RolloutsCancelCall { - c := &RolloutsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutsCancelCall) RequestId(requestId string) *RolloutsCancelCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// Rollback sets the optional parameter "rollback": If true, then the ongoing -// rollout must be rolled back. Else, just cancel -// the rollout without taking any further actions. Note that products -// must -// support at least one of these options, however, it does not need to -// support -// both. -func (c *RolloutsCancelCall) Rollback(rollback bool) *RolloutsCancelCall { - c.urlParams_.Set("rollback", fmt.Sprint(rollback)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsCancelCall) Fields(s ...googleapi.Field) *RolloutsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsCancelCall) Context(ctx context.Context) *RolloutsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.cancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsDeleteCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the Rollout resource to delete. -func (r *RolloutsService) Delete(project string, rollout string) *RolloutsDeleteCall { - c := &RolloutsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RolloutsDeleteCall) RequestId(requestId string) *RolloutsDeleteCall { - 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 -// details. -func (c *RolloutsDeleteCall) Fields(s ...googleapi.Field) *RolloutsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsDeleteCall) Context(ctx context.Context) *RolloutsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RolloutsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsGetCall struct { - s *Service - project string - rollout string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single project-scoped Rollout. -// -// - project: Project ID for this request. -// - rollout: Name of the persistent rollout to return. -func (r *RolloutsService) Get(project string, rollout string) *RolloutsGetCall { - c := &RolloutsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.rollout = rollout - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsGetCall) Fields(s ...googleapi.Field) *RolloutsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutsGetCall) IfNoneMatch(entityTag string) *RolloutsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsGetCall) Context(ctx context.Context) *RolloutsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts/{rollout}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "rollout": c.rollout, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Rollout.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 *RolloutsGetCall) Do(opts ...googleapi.CallOption) (*Rollout, 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 := &Rollout{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RolloutsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Rollouts in a given project and location. -// -// - project: Project ID for this request. -func (r *RolloutsService) List(project string) *RolloutsListCall { - c := &RolloutsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RolloutsListCall) Filter(filter string) *RolloutsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RolloutsListCall) MaxResults(maxResults int64) *RolloutsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RolloutsListCall) OrderBy(orderBy string) *RolloutsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RolloutsListCall) PageToken(pageToken string) *RolloutsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RolloutsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RolloutsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RolloutsListCall) Fields(s ...googleapi.Field) *RolloutsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RolloutsListCall) IfNoneMatch(entityTag string) *RolloutsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RolloutsListCall) Context(ctx context.Context) *RolloutsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RolloutsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RolloutsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/rollouts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.rollouts.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.rollouts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RolloutsListResponse.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 *RolloutsListCall) Do(opts ...googleapi.CallOption) (*RolloutsListResponse, 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 := &RolloutsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.rollouts.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RolloutsListCall) Pages(ctx context.Context, f func(*RolloutsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of routers. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { - c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *RoutersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RoutersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *RoutersAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RoutersAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/routers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterAggregatedList.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 *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, 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 := &RouterAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersDeleteCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Router resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to delete. -func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { - c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall { - 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 -// details. -func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersDeleteRoutePolicyCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeleteRoutePolicy: Deletes Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) DeleteRoutePolicy(project string, region string, router string) *RoutersDeleteRoutePolicyCall { - c := &RoutersDeleteRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Policy sets the optional parameter "policy": The Policy name for this -// request. Name must conform to RFC1035 -func (c *RoutersDeleteRoutePolicyCall) Policy(policy string) *RoutersDeleteRoutePolicyCall { - c.urlParams_.Set("policy", policy) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersDeleteRoutePolicyCall) RequestId(requestId string) *RoutersDeleteRoutePolicyCall { - 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 -// details. -func (c *RoutersDeleteRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersDeleteRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersDeleteRoutePolicyCall) Context(ctx context.Context) *RoutersDeleteRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersDeleteRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersDeleteRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.deleteRoutePolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.deleteRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersDeleteRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.deleteRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Router resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to return. -func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { - c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Router.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 *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, 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 := &Router{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetNatIpInfoCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNatIpInfo: Retrieves runtime NAT IP information. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for Nat IP information. The -// name -// -// should conform to RFC1035. -func (r *RoutersService) GetNatIpInfo(project string, region string, router string) *RoutersGetNatIpInfoCall { - c := &RoutersGetNatIpInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// NatName sets the optional parameter "natName": Name of the nat service to -// filter the NAT IP information. -// If it is omitted, all nats for this router will be returned. -// Name should conform to RFC1035. -func (c *RoutersGetNatIpInfoCall) NatName(natName string) *RoutersGetNatIpInfoCall { - c.urlParams_.Set("natName", natName) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetNatIpInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatIpInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetNatIpInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatIpInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetNatIpInfoCall) Context(ctx context.Context) *RoutersGetNatIpInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetNatIpInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNatIpInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNatIpInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getNatIpInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNatIpInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *NatIpInfoResponse.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 *RoutersGetNatIpInfoCall) Do(opts ...googleapi.CallOption) (*NatIpInfoResponse, 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 := &NatIpInfoResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getNatIpInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetNatMappingInfoCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for Nat Mapping information -// of -// -// VM endpoints. -func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { - c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersGetNatMappingInfoCall) Filter(filter string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersGetNatMappingInfoCall) MaxResults(maxResults int64) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// NatName sets the optional parameter "natName": Name of the nat service to -// filter the Nat Mapping information. -// If it is omitted, all nats for this router will be returned. -// Name should conform to RFC1035. -func (c *RoutersGetNatMappingInfoCall) NatName(natName string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("natName", natName) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersGetNatMappingInfoCall) OrderBy(orderBy string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersGetNatMappingInfoCall) PageToken(pageToken string) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersGetNatMappingInfoCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetNatMappingInfoCall) Fields(s ...googleapi.Field) *RoutersGetNatMappingInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetNatMappingInfoCall) IfNoneMatch(entityTag string) *RoutersGetNatMappingInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetNatMappingInfoCall) Context(ctx context.Context) *RoutersGetNatMappingInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetNatMappingInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getNatMappingInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getNatMappingInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getNatMappingInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmEndpointNatMappingsList.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 *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndpointNatMappingsList, 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 := &VmEndpointNatMappingsList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getNatMappingInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersGetNatMappingInfoCall) Pages(ctx context.Context, f func(*VmEndpointNatMappingsList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersGetRoutePolicyCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRoutePolicy: Returns specified Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query for the route policy. The -// name should -// -// conform to RFC1035. -func (r *RoutersService) GetRoutePolicy(project string, region string, router string) *RoutersGetRoutePolicyCall { - c := &RoutersGetRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Policy sets the optional parameter "policy": The Policy name for this -// request. Name must conform to RFC1035 -func (c *RoutersGetRoutePolicyCall) Policy(policy string) *RoutersGetRoutePolicyCall { - c.urlParams_.Set("policy", policy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersGetRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetRoutePolicyCall) IfNoneMatch(entityTag string) *RoutersGetRoutePolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetRoutePolicyCall) Context(ctx context.Context) *RoutersGetRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getRoutePolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersGetRoutePolicyResponse.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 *RoutersGetRoutePolicyCall) Do(opts ...googleapi.CallOption) (*RoutersGetRoutePolicyResponse, 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 := &RoutersGetRoutePolicyResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersGetRouterStatusCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRouterStatus: Retrieves runtime information of the specified router. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query. -func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { - c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersGetRouterStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/getRouterStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getRouterStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.getRouterStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterStatusResponse.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 *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, 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 := &RouterStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.getRouterStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersInsertCall struct { - s *Service - project string - region string - router *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Router resource in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { - c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall { - 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 -// details. -func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Router resources available to the specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RoutersService) List(project string, region string) *RoutersListCall { - c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListCall) Filter(filter string) *RoutersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouterList.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 *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, 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 := &RouterList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersListBgpRoutesCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListBgpRoutes: Retrieves a list of router bgp routes available to the -// specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name or id of the resource for this request. -// Name should conform to RFC1035. -func (r *RoutersService) ListBgpRoutes(project string, region string, router string) *RoutersListBgpRoutesCall { - c := &RoutersListBgpRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// AddressFamily sets the optional parameter "addressFamily": (Required) limit -// results to this address family (either IPv4 or IPv6) -// -// Possible values: -// -// "IPV4" -// "IPV6" -// "UNSPECIFIED_IP_VERSION" (default) -func (c *RoutersListBgpRoutesCall) AddressFamily(addressFamily string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("addressFamily", addressFamily) - return c -} - -// DestinationPrefix sets the optional parameter "destinationPrefix": Limit -// results to destinations that are subnets of this CIDR range -func (c *RoutersListBgpRoutesCall) DestinationPrefix(destinationPrefix string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("destinationPrefix", destinationPrefix) - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListBgpRoutesCall) Filter(filter string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListBgpRoutesCall) MaxResults(maxResults int64) *RoutersListBgpRoutesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListBgpRoutesCall) OrderBy(orderBy string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListBgpRoutesCall) PageToken(pageToken string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Peer sets the optional parameter "peer": (Required) limit results to the BGP -// peer with the given name. -// Name should conform to RFC1035. -func (c *RoutersListBgpRoutesCall) Peer(peer string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("peer", peer) - return c -} - -// PolicyApplied sets the optional parameter "policyApplied": When true, the -// method returns post-policy routes. Otherwise, it returns -// pre-policy routes. -func (c *RoutersListBgpRoutesCall) PolicyApplied(policyApplied bool) *RoutersListBgpRoutesCall { - c.urlParams_.Set("policyApplied", fmt.Sprint(policyApplied)) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListBgpRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListBgpRoutesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// RouteType sets the optional parameter "routeType": (Required) limit results -// to this type of route (either LEARNED or -// ADVERTISED) -// -// Possible values: -// -// "ADVERTISED" -// "LEARNED" -// "UNSPECIFIED_ROUTE_TYPE" (default) -func (c *RoutersListBgpRoutesCall) RouteType(routeType string) *RoutersListBgpRoutesCall { - c.urlParams_.Set("routeType", routeType) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListBgpRoutesCall) Fields(s ...googleapi.Field) *RoutersListBgpRoutesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListBgpRoutesCall) IfNoneMatch(entityTag string) *RoutersListBgpRoutesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListBgpRoutesCall) Context(ctx context.Context) *RoutersListBgpRoutesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListBgpRoutesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListBgpRoutesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listBgpRoutes", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.listBgpRoutes" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersListBgpRoutes.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 *RoutersListBgpRoutesCall) Do(opts ...googleapi.CallOption) (*RoutersListBgpRoutes, 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 := &RoutersListBgpRoutes{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.listBgpRoutes", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListBgpRoutesCall) Pages(ctx context.Context, f func(*RoutersListBgpRoutes) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersListRoutePoliciesCall struct { - s *Service - project string - region string - router string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListRoutePolicies: Retrieves a list of router route policy subresources -// available to the -// specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name or id of the resource for this request. -// Name should conform to RFC1035. -func (r *RoutersService) ListRoutePolicies(project string, region string, router string) *RoutersListRoutePoliciesCall { - c := &RoutersListRoutePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutersListRoutePoliciesCall) Filter(filter string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutersListRoutePoliciesCall) MaxResults(maxResults int64) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutersListRoutePoliciesCall) OrderBy(orderBy string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutersListRoutePoliciesCall) PageToken(pageToken string) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutersListRoutePoliciesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersListRoutePoliciesCall) Fields(s ...googleapi.Field) *RoutersListRoutePoliciesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutersListRoutePoliciesCall) IfNoneMatch(entityTag string) *RoutersListRoutePoliciesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersListRoutePoliciesCall) Context(ctx context.Context) *RoutersListRoutePoliciesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersListRoutePoliciesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersListRoutePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listRoutePolicies", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.listRoutePolicies" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersListRoutePolicies.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 *RoutersListRoutePoliciesCall) Do(opts ...googleapi.CallOption) (*RoutersListRoutePolicies, 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 := &RoutersListRoutePolicies{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.listRoutePolicies", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutersListRoutePoliciesCall) Pages(ctx context.Context, f func(*RoutersListRoutePolicies) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified Router resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to patch. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { - 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 -// details. -func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersPatchRoutePolicyCall struct { - s *Service - project string - region string - router string - routepolicy *RoutePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRoutePolicy: Patches Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) PatchRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersPatchRoutePolicyCall { - c := &RoutersPatchRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.routepolicy = routepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersPatchRoutePolicyCall) RequestId(requestId string) *RoutersPatchRoutePolicyCall { - 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 -// details. -func (c *RoutersPatchRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersPatchRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPatchRoutePolicyCall) Context(ctx context.Context) *RoutersPatchRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPatchRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPatchRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patchRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.patchRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersPatchRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.patchRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersPreviewCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Preview: Preview fields auto-generated during router create andupdate -// operations. -// Calling this method does NOT create or update the router. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to query. -func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { - c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersPreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/preview") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.preview", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.preview" call. -// Any non-2xx status code is an error. Response headers are in either -// *RoutersPreviewResponse.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 *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, 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 := &RoutersPreviewResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.preview", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { - c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersUpdateCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified Router resource with the data included in -// the -// request. This method conforms toPUT semantics, which requests that the -// state of the -// target resource be created or replaced with the state defined by -// the -// representation enclosed in the request message payload. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to update. -func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { - c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.router2 = router2 - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall { - 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 -// details. -func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.router2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutersUpdateRoutePolicyCall struct { - s *Service - project string - region string - router string - routepolicy *RoutePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateRoutePolicy: Updates or creates new Route Policy -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource where Route Policy is defined. -func (r *RoutersService) UpdateRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersUpdateRoutePolicyCall { - c := &RoutersUpdateRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.router = router - c.routepolicy = routepolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutersUpdateRoutePolicyCall) RequestId(requestId string) *RoutersUpdateRoutePolicyCall { - 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 -// details. -func (c *RoutersUpdateRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersUpdateRoutePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutersUpdateRoutePolicyCall) Context(ctx context.Context) *RoutersUpdateRoutePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutersUpdateRoutePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutersUpdateRoutePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy") - 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{ - "project": c.project, - "region": c.region, - "router": c.router, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.updateRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routers.updateRoutePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutersUpdateRoutePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routers.updateRoutePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesDeleteCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Route resource. -// -// - project: Project ID for this request. -// - route: Name of the Route resource to delete. -func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { - c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall { - 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 -// details. -func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesGetCall struct { - s *Service - project string - route string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Route resource. -// -// - project: Project ID for this request. -// - route: Name of the Route resource to return. -func (r *RoutesService) Get(project string, route string) *RoutesGetCall { - c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{route}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "route": c.route, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Route.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 *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, 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 := &Route{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesInsertCall struct { - s *Service - project string - route *Route - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a Route resource in the specified project using the data -// included -// in the request. -// -// - project: Project ID for this request. -func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { - c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.route = route - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall { - 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 -// details. -func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.route) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RoutesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RoutesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Route resources available to the specified -// project. -// -// - project: Project ID for this request. -func (r *RoutesService) List(project string) *RoutesListCall { - c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *RoutesListCall) Filter(filter string) *RoutesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *RoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *RouteList.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 *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, 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 := &RouteList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type RoutesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { - c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RoutesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/routes/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routes.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.routes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.routes.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesAddRuleCall struct { - s *Service - project string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddRule: Inserts a rule into a security policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesAddRuleCall { - c := &SecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesAddRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesAddRuleCall { - 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 -// details. -func (c *SecurityPoliciesAddRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesAddRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesAddRuleCall) Context(ctx context.Context) *SecurityPoliciesAddRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesAddRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/addRule") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.addRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.addRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesAddRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.addRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SecurityPolicy resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SecurityPoliciesService) AggregatedList(project string) *SecurityPoliciesAggregatedListCall { - c := &SecurityPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesAggregatedListCall) Filter(filter string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SecurityPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesAggregatedListCall) MaxResults(maxResults int64) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesAggregatedListCall) OrderBy(orderBy string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesAggregatedListCall) PageToken(pageToken string) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SecurityPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SecurityPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SecurityPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesAggregatedListCall) Context(ctx context.Context) *SecurityPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesAggregatedList.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 *SecurityPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesAggregatedList, 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 := &SecurityPoliciesAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SecurityPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SecurityPoliciesAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SecurityPoliciesDeleteCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to delete. -func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { - c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesDeleteCall) RequestId(requestId string) *SecurityPoliciesDeleteCall { - 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 -// details. -func (c *SecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *SecurityPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesDeleteCall) Context(ctx context.Context) *SecurityPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesGetCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: List all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to get. -func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { - c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesGetCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesGetCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesGetCall) Context(ctx context.Context) *SecurityPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicy.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 *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, 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 := &SecurityPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesGetRuleCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetRule: Gets a rule at the specified priority. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to which the queried rule -// belongs. -func (r *SecurityPoliciesService) GetRule(project string, securityPolicy string) *SecurityPoliciesGetRuleCall { - c := &SecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the security policy. -func (c *SecurityPoliciesGetRuleCall) Priority(priority int64) *SecurityPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesGetRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesGetRuleCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesGetRuleCall) Context(ctx context.Context) *SecurityPoliciesGetRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesGetRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/getRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.getRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.getRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyRule.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 *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyRule, 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 := &SecurityPolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.getRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesInsertCall struct { - s *Service - project string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new policy in the specified project using the data -// included in -// the request. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { - c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPoliciesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesInsertCall) ValidateOnly(validateOnly bool) *SecurityPoliciesInsertCall { - 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 -// details. -func (c *SecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *SecurityPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesInsertCall) Context(ctx context.Context) *SecurityPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List all the policies that have been configured for the specified -// project. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { - c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesListCall) Filter(filter string) *SecurityPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesListCall) MaxResults(maxResults int64) *SecurityPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesListCall) OrderBy(orderBy string) *SecurityPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesListCall) PageToken(pageToken string) *SecurityPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesListCall) Fields(s ...googleapi.Field) *SecurityPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesListCall) IfNoneMatch(entityTag string) *SecurityPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesListCall) Context(ctx context.Context) *SecurityPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPolicyList.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 *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPolicyList, 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 := &SecurityPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SecurityPoliciesListPreconfiguredExpressionSetsCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListPreconfiguredExpressionSets: Gets the current list of preconfigured Web -// Application Firewall (WAF) -// expressions. -// -// - project: Project ID for this request. -func (r *SecurityPoliciesService) ListPreconfiguredExpressionSets(project string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c := &SecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Filter(filter string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) MaxResults(maxResults int64) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) OrderBy(orderBy string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) PageToken(pageToken string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) ReturnPartialSuccess(returnPartialSuccess bool) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Fields(s ...googleapi.Field) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) IfNoneMatch(entityTag string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Context(ctx context.Context) *SecurityPoliciesListPreconfiguredExpressionSetsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/listPreconfiguredExpressionSets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.listPreconfiguredExpressionSets", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.listPreconfiguredExpressionSets" call. -// Any non-2xx status code is an error. Response headers are in either -// *SecurityPoliciesListPreconfiguredExpressionSetsResponse.ServerResponse.Heade -// r 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 *SecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesListPreconfiguredExpressionSetsResponse, 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 := &SecurityPoliciesListPreconfiguredExpressionSetsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.listPreconfiguredExpressionSets", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesPatchCall struct { - s *Service - project string - securityPolicy string - securitypolicy *SecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified policy with the data included in the request. -// To -// clear fields in the policy, leave the fields empty and specify them in -// the -// updateMask. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule -// instead. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { - c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicy = securitypolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SecurityPoliciesPatchCall) RequestId(requestId string) *SecurityPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *SecurityPoliciesPatchCall) UpdateMask(updateMask string) *SecurityPoliciesPatchCall { - 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 -// details. -func (c *SecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesPatchCall) Context(ctx context.Context) *SecurityPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesPatchRuleCall struct { - s *Service - project string - securityPolicy string - securitypolicyrule *SecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// PatchRule: Patches a rule at the specified priority. To clear fields in the -// rule, -// leave the fields empty and specify them in the updateMask. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) PatchRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesPatchRuleCall { - c := &SecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - c.securitypolicyrule = securitypolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *SecurityPoliciesPatchRuleCall) Priority(priority int64) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// cleared as part of this request. -func (c *SecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *SecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *SecurityPoliciesPatchRuleCall { - 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 -// details. -func (c *SecurityPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesPatchRuleCall) Context(ctx context.Context) *SecurityPoliciesPatchRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/patchRule") - 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{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.patchRule", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.patchRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesPatchRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.patchRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesRemoveRuleCall struct { - s *Service - project string - securityPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveRule: Deletes a rule at the specified priority. -// -// - project: Project ID for this request. -// - securityPolicy: Name of the security policy to update. -func (r *SecurityPoliciesService) RemoveRule(project string, securityPolicy string) *SecurityPoliciesRemoveRuleCall { - c := &SecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.securityPolicy = securityPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the security policy. -func (c *SecurityPoliciesRemoveRuleCall) Priority(priority int64) *SecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *SecurityPoliciesRemoveRuleCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesRemoveRuleCall) Context(ctx context.Context) *SecurityPoliciesRemoveRuleCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{securityPolicy}/removeRule") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "securityPolicy": c.securityPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.removeRule", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.removeRule" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesRemoveRuleCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.removeRule", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a security policy. To learn more about -// labels, -// read the Labeling Resources -// documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SecurityPoliciesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SecurityPoliciesSetLabelsCall { - c := &SecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *SecurityPoliciesSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesSetLabelsCall) Context(ctx context.Context) *SecurityPoliciesSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SecurityPoliciesSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SecurityPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { - c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SecurityPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SecurityPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SecurityPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SecurityPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/securityPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.securityPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.securityPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.securityPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all ServiceAttachment -// resources, -// regional and global, available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *ServiceAttachmentsService) AggregatedList(project string) *ServiceAttachmentsAggregatedListCall { - c := &ServiceAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ServiceAttachmentsAggregatedListCall) Filter(filter string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *ServiceAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ServiceAttachmentsAggregatedListCall) MaxResults(maxResults int64) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ServiceAttachmentsAggregatedListCall) OrderBy(orderBy string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ServiceAttachmentsAggregatedListCall) PageToken(pageToken string) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ServiceAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *ServiceAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *ServiceAttachmentsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *ServiceAttachmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsAggregatedListCall) Context(ctx context.Context) *ServiceAttachmentsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/serviceAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachmentAggregatedList.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 *ServiceAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ServiceAttachmentAggregatedList, 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 := &ServiceAttachmentAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ServiceAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*ServiceAttachmentAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ServiceAttachmentsDeleteCall struct { - s *Service - project string - region string - serviceAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified ServiceAttachment in the given scope -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -// - serviceAttachment: Name of the ServiceAttachment resource to delete. -func (r *ServiceAttachmentsService) Delete(project string, region string, serviceAttachment string) *ServiceAttachmentsDeleteCall { - c := &ServiceAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsDeleteCall) RequestId(requestId string) *ServiceAttachmentsDeleteCall { - 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 -// details. -func (c *ServiceAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ServiceAttachmentsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsDeleteCall) Context(ctx context.Context) *ServiceAttachmentsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsGetCall struct { - s *Service - project string - region string - serviceAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified ServiceAttachment resource in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -// - serviceAttachment: Name of the ServiceAttachment resource to return. -func (r *ServiceAttachmentsService) Get(project string, region string, serviceAttachment string) *ServiceAttachmentsGetCall { - c := &ServiceAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - return c -} - -// ShowNatIps sets the optional parameter "showNatIps": Indicates whether NAT -// IPs should be included in the response. -func (c *ServiceAttachmentsGetCall) ShowNatIps(showNatIps bool) *ServiceAttachmentsGetCall { - c.urlParams_.Set("showNatIps", fmt.Sprint(showNatIps)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsGetCall) Fields(s ...googleapi.Field) *ServiceAttachmentsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsGetCall) IfNoneMatch(entityTag string) *ServiceAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsGetCall) Context(ctx context.Context) *ServiceAttachmentsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachment.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 *ServiceAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceAttachment, 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 := &ServiceAttachment{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) GetIamPolicy(project string, region string, resource string) *ServiceAttachmentsGetIamPolicyCall { - c := &ServiceAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *ServiceAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ServiceAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *ServiceAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ServiceAttachmentsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ServiceAttachmentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsGetIamPolicyCall) Context(ctx context.Context) *ServiceAttachmentsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.getIamPolicy" call. -// 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 *ServiceAttachmentsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsInsertCall struct { - s *Service - project string - region string - serviceattachment *ServiceAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a ServiceAttachment in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *ServiceAttachmentsService) Insert(project string, region string, serviceattachment *ServiceAttachment) *ServiceAttachmentsInsertCall { - c := &ServiceAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceattachment = serviceattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsInsertCall) RequestId(requestId string) *ServiceAttachmentsInsertCall { - 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 -// details. -func (c *ServiceAttachmentsInsertCall) Fields(s ...googleapi.Field) *ServiceAttachmentsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsInsertCall) Context(ctx context.Context) *ServiceAttachmentsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.serviceattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the ServiceAttachments for a project in the given scope. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *ServiceAttachmentsService) List(project string, region string) *ServiceAttachmentsListCall { - c := &ServiceAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ServiceAttachmentsListCall) Filter(filter string) *ServiceAttachmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ServiceAttachmentsListCall) MaxResults(maxResults int64) *ServiceAttachmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ServiceAttachmentsListCall) OrderBy(orderBy string) *ServiceAttachmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ServiceAttachmentsListCall) PageToken(pageToken string) *ServiceAttachmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ServiceAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ServiceAttachmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsListCall) Fields(s ...googleapi.Field) *ServiceAttachmentsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ServiceAttachmentsListCall) IfNoneMatch(entityTag string) *ServiceAttachmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsListCall) Context(ctx context.Context) *ServiceAttachmentsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAttachmentList.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 *ServiceAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ServiceAttachmentList, 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 := &ServiceAttachmentList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ServiceAttachmentsListCall) Pages(ctx context.Context, f func(*ServiceAttachmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ServiceAttachmentsPatchCall struct { - s *Service - project string - region string - serviceAttachment string - serviceattachment *ServiceAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified ServiceAttachment resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - region: The region scoping this request and should conform to RFC1035. -// - serviceAttachment: The resource id of the ServiceAttachment to patch. It -// should conform to -// RFC1035 resource name or be a string form on an unsigned long number. -func (r *ServiceAttachmentsService) Patch(project string, region string, serviceAttachment string, serviceattachment *ServiceAttachment) *ServiceAttachmentsPatchCall { - c := &ServiceAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.serviceAttachment = serviceAttachment - c.serviceattachment = serviceattachment - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ServiceAttachmentsPatchCall) RequestId(requestId string) *ServiceAttachmentsPatchCall { - 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 -// details. -func (c *ServiceAttachmentsPatchCall) Fields(s ...googleapi.Field) *ServiceAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsPatchCall) Context(ctx context.Context) *ServiceAttachmentsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.serviceattachment) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{serviceAttachment}") - 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{ - "project": c.project, - "region": c.region, - "serviceAttachment": c.serviceAttachment, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ServiceAttachmentsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ServiceAttachmentsSetIamPolicyCall { - c := &ServiceAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ServiceAttachmentsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsSetIamPolicyCall) Context(ctx context.Context) *ServiceAttachmentsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.setIamPolicy" call. -// 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 *ServiceAttachmentsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ServiceAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ServiceAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ServiceAttachmentsTestIamPermissionsCall { - c := &ServiceAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ServiceAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ServiceAttachmentsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ServiceAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *ServiceAttachmentsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ServiceAttachmentsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ServiceAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/serviceAttachments/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.serviceAttachments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.serviceAttachments.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ServiceAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.serviceAttachments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotSettingsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get snapshot settings. -// -// - project: Project ID for this request. -func (r *SnapshotSettingsService) Get(project string) *SnapshotSettingsGetCall { - c := &SnapshotSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotSettingsGetCall) Fields(s ...googleapi.Field) *SnapshotSettingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotSettingsGetCall) IfNoneMatch(entityTag string) *SnapshotSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotSettingsGetCall) Context(ctx context.Context) *SnapshotSettingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotSettingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotSettingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotSettings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotSettings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotSettings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotSettings.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 *SnapshotSettingsGetCall) Do(opts ...googleapi.CallOption) (*SnapshotSettings, 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 := &SnapshotSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotSettings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotSettingsPatchCall struct { - s *Service - project string - snapshotsettings *SnapshotSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patch snapshot settings. -// -// - project: Project ID for this request. -func (r *SnapshotSettingsService) Patch(project string, snapshotsettings *SnapshotSettings) *SnapshotSettingsPatchCall { - c := &SnapshotSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshotsettings = snapshotsettings - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotSettingsPatchCall) RequestId(requestId string) *SnapshotSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *SnapshotSettingsPatchCall) UpdateMask(updateMask string) *SnapshotSettingsPatchCall { - 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 -// details. -func (c *SnapshotSettingsPatchCall) Fields(s ...googleapi.Field) *SnapshotSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotSettingsPatchCall) Context(ctx context.Context) *SnapshotSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshotsettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshotSettings") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshotSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshotSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotSettingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshotSettings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of all of the snapshots in your -// project -// across all regions and global scope. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *SnapshotsService) AggregatedList(project string) *SnapshotsAggregatedListCall { - c := &SnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SnapshotsAggregatedListCall) Filter(filter string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SnapshotsAggregatedListCall) MaxResults(maxResults int64) *SnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SnapshotsAggregatedListCall) OrderBy(orderBy string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SnapshotsAggregatedListCall) PageToken(pageToken string) *SnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *SnapshotsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *SnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsAggregatedListCall) Context(ctx context.Context) *SnapshotsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotAggregatedList.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 *SnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*SnapshotAggregatedList, 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 := &SnapshotAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*SnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SnapshotsDeleteCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Snapshot resource. Keep in mind that -// deleting -// a single snapshot might not necessarily delete all the data on -// that -// snapshot. If any data on the snapshot that is marked for deletion is -// needed for subsequent snapshots, the data will be moved to the -// next -// corresponding snapshot. -// -// For more information, seeDeleting -// snapshots. -// -// - project: Project ID for this request. -// - snapshot: Name of the Snapshot resource to delete. -func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { - c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall { - 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 -// details. -func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsGetCall struct { - s *Service - project string - snapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Snapshot resource. -// -// - project: Project ID for this request. -// - snapshot: Name of the Snapshot resource to return. -func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { - c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{snapshot}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "snapshot": c.snapshot, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Snapshot.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 *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { - c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *SnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *SnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *SnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsGetIamPolicyCall) Context(ctx context.Context) *SnapshotsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.getIamPolicy" call. -// 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 *SnapshotsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsInsertCall struct { - s *Service - project string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a snapshot in the specified project using the data -// included -// in the request. For regular snapshot creation, consider using this -// method -// instead of disks.createSnapshot, -// as this method supports more features, such as creating snapshots in -// a -// project different from the source disk project. -// -// - project: Project ID for this request. -func (r *SnapshotsService) Insert(project string, snapshot *Snapshot) *SnapshotsInsertCall { - c := &SnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.snapshot = snapshot - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SnapshotsInsertCall) RequestId(requestId string) *SnapshotsInsertCall { - 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 -// details. -func (c *SnapshotsInsertCall) Fields(s ...googleapi.Field) *SnapshotsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsInsertCall) Context(ctx context.Context) *SnapshotsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Snapshot resources contained within -// the specified project. -// -// - project: Project ID for this request. -func (r *SnapshotsService) List(project string) *SnapshotsListCall { - c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SnapshotsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SnapshotList.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 *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, 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 := &SnapshotList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SnapshotsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall { - c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *SnapshotsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsSetIamPolicyCall) Context(ctx context.Context) *SnapshotsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setIamPolicy" call. -// 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 *SnapshotsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a snapshot. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { - c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{resource}/setLabels") - 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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SnapshotsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SnapshotsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { - c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/snapshots/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.snapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.snapshots.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.snapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SslCertificate resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SslCertificatesService) AggregatedList(project string) *SslCertificatesAggregatedListCall { - c := &SslCertificatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslCertificatesAggregatedListCall) Filter(filter string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SslCertificatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslCertificatesAggregatedListCall) MaxResults(maxResults int64) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslCertificatesAggregatedListCall) OrderBy(orderBy string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslCertificatesAggregatedListCall) PageToken(pageToken string) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslCertificatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SslCertificatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesAggregatedListCall) Fields(s ...googleapi.Field) *SslCertificatesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesAggregatedListCall) IfNoneMatch(entityTag string) *SslCertificatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesAggregatedListCall) Context(ctx context.Context) *SslCertificatesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateAggregatedList.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 *SslCertificatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SslCertificateAggregatedList, 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 := &SslCertificateAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslCertificatesAggregatedListCall) Pages(ctx context.Context, f func(*SslCertificateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslCertificatesDeleteCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SslCertificate resource. -// -// - project: Project ID for this request. -// - sslCertificate: Name of the SslCertificate resource to delete. -func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { - c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall { - 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 -// details. -func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertificatesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesGetCall struct { - s *Service - project string - sslCertificate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified SslCertificate resource. -// -// - project: Project ID for this request. -// - sslCertificate: Name of the SslCertificate resource to return. -func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { - c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslCertificate = sslCertificate - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{sslCertificate}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslCertificate": c.sslCertificate, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificate.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 *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, 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 := &SslCertificate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesInsertCall struct { - s *Service - project string - sslcertificate *SslCertificate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a SslCertificate resource in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { - c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslcertificate = sslcertificate - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall { - 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 -// details. -func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslcertificate) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslCertificatesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslCertificatesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of SslCertificate resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { - c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslCertificatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslCertificatesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslCertificateList.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 *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, 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 := &SslCertificateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslCertificatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { - c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslCertificates/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslCertificates.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslCertificates.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslCertificates.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all SslPolicy resources, regional and -// global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *SslPoliciesService) AggregatedList(project string) *SslPoliciesAggregatedListCall { - c := &SslPoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesAggregatedListCall) Filter(filter string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SslPoliciesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesAggregatedListCall) MaxResults(maxResults int64) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesAggregatedListCall) OrderBy(orderBy string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesAggregatedListCall) PageToken(pageToken string) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SslPoliciesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesAggregatedListCall) Fields(s ...googleapi.Field) *SslPoliciesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesAggregatedListCall) IfNoneMatch(entityTag string) *SslPoliciesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesAggregatedListCall) Context(ctx context.Context) *SslPoliciesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesAggregatedList.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 *SslPoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesAggregatedList, 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 := &SslPoliciesAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslPoliciesAggregatedListCall) Pages(ctx context.Context, f func(*SslPoliciesAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslPoliciesDeleteCall struct { - s *Service - project string - sslPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified SSL policy. The SSL policy resource can be -// deleted -// only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy -// resources. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to delete. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Delete(project string, sslPolicy string) *SslPoliciesDeleteCall { - c := &SslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesDeleteCall) RequestId(requestId string) *SslPoliciesDeleteCall { - 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 -// details. -func (c *SslPoliciesDeleteCall) Fields(s ...googleapi.Field) *SslPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesDeleteCall) Context(ctx context.Context) *SslPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesGetCall struct { - s *Service - project string - sslPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Lists all of the ordered rules present in a single specified policy. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Get(project string, sslPolicy string) *SslPoliciesGetCall { - c := &SslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesGetCall) Fields(s ...googleapi.Field) *SslPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesGetCall) IfNoneMatch(entityTag string) *SslPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesGetCall) Context(ctx context.Context) *SslPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPolicy.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 *SslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, 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 := &SslPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesInsertCall struct { - s *Service - project string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Returns the specified SSL policy resource. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) Insert(project string, sslpolicy *SslPolicy) *SslPoliciesInsertCall { - c := &SslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesInsertCall) RequestId(requestId string) *SslPoliciesInsertCall { - 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 -// details. -func (c *SslPoliciesInsertCall) Fields(s ...googleapi.Field) *SslPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesInsertCall) Context(ctx context.Context) *SslPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the SSL policies that have been configured for the -// specified -// project. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) List(project string) *SslPoliciesListCall { - c := &SslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesListCall) Filter(filter string) *SslPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesListCall) MaxResults(maxResults int64) *SslPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesListCall) OrderBy(orderBy string) *SslPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesListCall) PageToken(pageToken string) *SslPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesListCall) Fields(s ...googleapi.Field) *SslPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesListCall) IfNoneMatch(entityTag string) *SslPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesListCall) Context(ctx context.Context) *SslPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesList.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 *SslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList, 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 := &SslPoliciesList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SslPoliciesListCall) Pages(ctx context.Context, f func(*SslPoliciesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SslPoliciesListAvailableFeaturesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListAvailableFeatures: Lists all features that can be specified in the SSL -// policy when using -// custom profile. -// -// - project: Project ID for this request. -func (r *SslPoliciesService) ListAvailableFeatures(project string) *SslPoliciesListAvailableFeaturesCall { - c := &SslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SslPoliciesListAvailableFeaturesCall) Filter(filter string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SslPoliciesListAvailableFeaturesCall) MaxResults(maxResults int64) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SslPoliciesListAvailableFeaturesCall) OrderBy(orderBy string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SslPoliciesListAvailableFeaturesCall) PageToken(pageToken string) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SslPoliciesListAvailableFeaturesCall) ReturnPartialSuccess(returnPartialSuccess bool) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesListAvailableFeaturesCall) Fields(s ...googleapi.Field) *SslPoliciesListAvailableFeaturesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SslPoliciesListAvailableFeaturesCall) IfNoneMatch(entityTag string) *SslPoliciesListAvailableFeaturesCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesListAvailableFeaturesCall) Context(ctx context.Context) *SslPoliciesListAvailableFeaturesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/listAvailableFeatures") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.listAvailableFeatures", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.listAvailableFeatures" call. -// Any non-2xx status code is an error. Response headers are in either -// *SslPoliciesListAvailableFeaturesResponse.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 *SslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) (*SslPoliciesListAvailableFeaturesResponse, 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 := &SslPoliciesListAvailableFeaturesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.listAvailableFeatures", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesPatchCall struct { - s *Service - project string - sslPolicy string - sslpolicy *SslPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified SSL policy with the data included in the -// request. -// -// - project: Project ID for this request. -// - sslPolicy: Name of the SSL policy to update. The name must be 1-63 -// characters long, -// -// and comply with RFC1035. -func (r *SslPoliciesService) Patch(project string, sslPolicy string, sslpolicy *SslPolicy) *SslPoliciesPatchCall { - c := &SslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.sslPolicy = sslPolicy - c.sslpolicy = sslpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SslPoliciesPatchCall) RequestId(requestId string) *SslPoliciesPatchCall { - 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 -// details. -func (c *SslPoliciesPatchCall) Fields(s ...googleapi.Field) *SslPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesPatchCall) Context(ctx context.Context) *SslPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{sslPolicy}") - 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{ - "project": c.project, - "sslPolicy": c.sslPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SslPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SslPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *SslPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslPoliciesTestIamPermissionsCall { - c := &SslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SslPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslPoliciesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SslPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SslPoliciesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SslPoliciesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/sslPolicies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.sslPolicies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.sslPolicies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.sslPolicies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of storage pool types. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *StoragePoolTypesService) AggregatedList(project string) *StoragePoolTypesAggregatedListCall { - c := &StoragePoolTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolTypesAggregatedListCall) Filter(filter string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *StoragePoolTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolTypesAggregatedListCall) MaxResults(maxResults int64) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolTypesAggregatedListCall) OrderBy(orderBy string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolTypesAggregatedListCall) PageToken(pageToken string) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *StoragePoolTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesAggregatedListCall) Fields(s ...googleapi.Field) *StoragePoolTypesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesAggregatedListCall) IfNoneMatch(entityTag string) *StoragePoolTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesAggregatedListCall) Context(ctx context.Context) *StoragePoolTypesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/storagePoolTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolTypeAggregatedList.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 *StoragePoolTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*StoragePoolTypeAggregatedList, 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 := &StoragePoolTypeAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolTypesAggregatedListCall) Pages(ctx context.Context, f func(*StoragePoolTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolTypesGetCall struct { - s *Service - project string - zone string - storagePoolType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified storage pool type. -// -// - project: Project ID for this request. -// - storagePoolType: Name of the storage pool type to return. -// - zone: The name of the zone for this request. -func (r *StoragePoolTypesService) Get(project string, zone string, storagePoolType string) *StoragePoolTypesGetCall { - c := &StoragePoolTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePoolType = storagePoolType - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesGetCall) Fields(s ...googleapi.Field) *StoragePoolTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesGetCall) IfNoneMatch(entityTag string) *StoragePoolTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesGetCall) Context(ctx context.Context) *StoragePoolTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePoolTypes/{storagePoolType}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePoolType": c.storagePoolType, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolType.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 *StoragePoolTypesGetCall) Do(opts ...googleapi.CallOption) (*StoragePoolType, 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 := &StoragePoolType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of storage pool types available to the -// specified -// project. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolTypesService) List(project string, zone string) *StoragePoolTypesListCall { - c := &StoragePoolTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolTypesListCall) Filter(filter string) *StoragePoolTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolTypesListCall) MaxResults(maxResults int64) *StoragePoolTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolTypesListCall) OrderBy(orderBy string) *StoragePoolTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolTypesListCall) PageToken(pageToken string) *StoragePoolTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolTypesListCall) Fields(s ...googleapi.Field) *StoragePoolTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolTypesListCall) IfNoneMatch(entityTag string) *StoragePoolTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolTypesListCall) Context(ctx context.Context) *StoragePoolTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePoolTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePoolTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolTypeList.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 *StoragePoolTypesListCall) Do(opts ...googleapi.CallOption) (*StoragePoolTypeList, 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 := &StoragePoolTypeList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePoolTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolTypesListCall) Pages(ctx context.Context, f func(*StoragePoolTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of storage pools. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *StoragePoolsService) AggregatedList(project string) *StoragePoolsAggregatedListCall { - c := &StoragePoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsAggregatedListCall) Filter(filter string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *StoragePoolsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsAggregatedListCall) MaxResults(maxResults int64) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsAggregatedListCall) OrderBy(orderBy string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsAggregatedListCall) PageToken(pageToken string) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *StoragePoolsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsAggregatedListCall) Fields(s ...googleapi.Field) *StoragePoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsAggregatedListCall) IfNoneMatch(entityTag string) *StoragePoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsAggregatedListCall) Context(ctx context.Context) *StoragePoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/storagePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolAggregatedList.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 *StoragePoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*StoragePoolAggregatedList, 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 := &StoragePoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsAggregatedListCall) Pages(ctx context.Context, f func(*StoragePoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsDeleteCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified storage pool. Deleting a storagePool -// removes its data permanently and is irreversible. However, deleting -// a -// storagePool does not delete any snapshots previously -// made from the storagePool. You must separately delete -// snapshots. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to delete. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Delete(project string, zone string, storagePool string) *StoragePoolsDeleteCall { - c := &StoragePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsDeleteCall) RequestId(requestId string) *StoragePoolsDeleteCall { - 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 -// details. -func (c *StoragePoolsDeleteCall) Fields(s ...googleapi.Field) *StoragePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsDeleteCall) Context(ctx context.Context) *StoragePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsGetCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns a specified storage pool. Gets a list of available -// storage pools by making a list() request. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to return. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Get(project string, zone string, storagePool string) *StoragePoolsGetCall { - c := &StoragePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsGetCall) Fields(s ...googleapi.Field) *StoragePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsGetCall) IfNoneMatch(entityTag string) *StoragePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsGetCall) Context(ctx context.Context) *StoragePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePool.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 *StoragePoolsGetCall) Do(opts ...googleapi.CallOption) (*StoragePool, 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 := &StoragePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) GetIamPolicy(project string, zone string, resource string) *StoragePoolsGetIamPolicyCall { - c := &StoragePoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *StoragePoolsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *StoragePoolsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *StoragePoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *StoragePoolsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsGetIamPolicyCall) IfNoneMatch(entityTag string) *StoragePoolsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsGetIamPolicyCall) Context(ctx context.Context) *StoragePoolsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.getIamPolicy" call. -// 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 *StoragePoolsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsInsertCall struct { - s *Service - project string - zone string - storagepool *StoragePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a storage pool in the specified project using the data -// in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Insert(project string, zone string, storagepool *StoragePool) *StoragePoolsInsertCall { - c := &StoragePoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagepool = storagepool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsInsertCall) RequestId(requestId string) *StoragePoolsInsertCall { - 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 -// details. -func (c *StoragePoolsInsertCall) Fields(s ...googleapi.Field) *StoragePoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsInsertCall) Context(ctx context.Context) *StoragePoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.storagepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of storage pools contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) List(project string, zone string) *StoragePoolsListCall { - c := &StoragePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsListCall) Filter(filter string) *StoragePoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsListCall) MaxResults(maxResults int64) *StoragePoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsListCall) OrderBy(orderBy string) *StoragePoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsListCall) PageToken(pageToken string) *StoragePoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsListCall) Fields(s ...googleapi.Field) *StoragePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsListCall) IfNoneMatch(entityTag string) *StoragePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsListCall) Context(ctx context.Context) *StoragePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolList.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 *StoragePoolsListCall) Do(opts ...googleapi.CallOption) (*StoragePoolList, 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 := &StoragePoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsListCall) Pages(ctx context.Context, f func(*StoragePoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsListDisksCall struct { - s *Service - project string - zone string - storagePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListDisks: Lists the disks in a specified storage pool. -// -// - project: Project ID for this request. -// - storagePool: Name of the storage pool to list disks of. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) ListDisks(project string, zone string, storagePool string) *StoragePoolsListDisksCall { - c := &StoragePoolsListDisksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *StoragePoolsListDisksCall) Filter(filter string) *StoragePoolsListDisksCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *StoragePoolsListDisksCall) MaxResults(maxResults int64) *StoragePoolsListDisksCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *StoragePoolsListDisksCall) OrderBy(orderBy string) *StoragePoolsListDisksCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *StoragePoolsListDisksCall) PageToken(pageToken string) *StoragePoolsListDisksCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *StoragePoolsListDisksCall) ReturnPartialSuccess(returnPartialSuccess bool) *StoragePoolsListDisksCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsListDisksCall) Fields(s ...googleapi.Field) *StoragePoolsListDisksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *StoragePoolsListDisksCall) IfNoneMatch(entityTag string) *StoragePoolsListDisksCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsListDisksCall) Context(ctx context.Context) *StoragePoolsListDisksCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsListDisksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsListDisksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}/listDisks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.listDisks", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.listDisks" call. -// Any non-2xx status code is an error. Response headers are in either -// *StoragePoolListDisks.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 *StoragePoolsListDisksCall) Do(opts ...googleapi.CallOption) (*StoragePoolListDisks, 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 := &StoragePoolListDisks{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.listDisks", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *StoragePoolsListDisksCall) Pages(ctx context.Context, f func(*StoragePoolListDisks) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type StoragePoolsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *StoragePoolsSetIamPolicyCall { - c := &StoragePoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *StoragePoolsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsSetIamPolicyCall) Context(ctx context.Context) *StoragePoolsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.setIamPolicy" call. -// 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 *StoragePoolsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *StoragePoolsTestIamPermissionsCall { - c := &StoragePoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *StoragePoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *StoragePoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsTestIamPermissionsCall) Context(ctx context.Context) *StoragePoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *StoragePoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type StoragePoolsUpdateCall struct { - s *Service - project string - zone string - storagePool string - storagepool *StoragePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified storagePool with the data included in the -// request. -// The update is performed only on selected fields included as part -// of update-mask. Only the following fields can be -// modified: -// pool_provisioned_capacity_gb, pool_provisioned_iops -// and -// pool_provisioned_throughput. -// -// - project: Project ID for this request. -// - storagePool: The storagePool name for this request. -// - zone: The name of the zone for this request. -func (r *StoragePoolsService) Update(project string, zone string, storagePool string, storagepool *StoragePool) *StoragePoolsUpdateCall { - c := &StoragePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.storagePool = storagePool - c.storagepool = storagepool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *StoragePoolsUpdateCall) RequestId(requestId string) *StoragePoolsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *StoragePoolsUpdateCall) UpdateMask(updateMask string) *StoragePoolsUpdateCall { - 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 -// details. -func (c *StoragePoolsUpdateCall) Fields(s ...googleapi.Field) *StoragePoolsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *StoragePoolsUpdateCall) Context(ctx context.Context) *StoragePoolsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *StoragePoolsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *StoragePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.storagepool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/storagePools/{storagePool}") - 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{ - "project": c.project, - "zone": c.zone, - "storagePool": c.storagePool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.storagePools.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.storagePools.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *StoragePoolsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.storagePools.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of subnetworks. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { - c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *SubnetworksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *SubnetworksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *SubnetworksAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *SubnetworksAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksAggregatedListCall) Views(views ...string) *SubnetworksAggregatedListCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkAggregatedList.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 *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, 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 := &SubnetworkAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksDeleteCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified subnetwork. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to delete. -func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { - c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall { - 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 -// details. -func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksExpandIpCidrRangeCall struct { - s *Service - project string - region string - subnetwork string - subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to update. -func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { - c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall { - 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 -// details. -func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetworksexpandipcidrrangerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.expandIpCidrRange", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.expandIpCidrRange" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksExpandIpCidrRangeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.expandIpCidrRange", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksGetCall struct { - s *Service - project string - region string - subnetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified subnetwork. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to return. -func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { - c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksGetCall) Views(views ...string) *SubnetworksGetCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Subnetwork.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 *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, 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 := &Subnetwork{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such -// policy or resource exists. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { - c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *SubnetworksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", 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 -// details. -func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.getIamPolicy" call. -// 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 *SubnetworksGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksInsertCall struct { - s *Service - project string - region string - subnetwork *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a subnetwork in the specified project using the -// data -// included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { - c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall { - 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 -// details. -func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetwork) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of subnetworks available to the specified -// project. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { - c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Views sets the optional parameter "views": Defines the extra views returned -// back in the subnetwork resource. -// Supported values: -// -// - WITH_UTILIZATION: Utilization data is included in the -// response. -// -// Possible values: -// -// "DEFAULT" -// "WITH_UTILIZATION" - Utilization data is included in the response. -func (c *SubnetworksListCall) Views(views ...string) *SubnetworksListCall { - c.urlParams_.SetMulti("views", append([]string{}, views...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *SubnetworkList.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 *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, 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 := &SubnetworkList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksListUsableCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListUsable: Retrieves an aggregated list of all usable subnetworks in the -// project. -// -// - project: Project ID for this request. -func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { - c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *SubnetworksListUsableCall) Filter(filter string) *SubnetworksListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *SubnetworksListUsableCall) MaxResults(maxResults int64) *SubnetworksListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *SubnetworksListUsableCall) OrderBy(orderBy string) *SubnetworksListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *SubnetworksListUsableCall) PageToken(pageToken string) *SubnetworksListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *SubnetworksListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *SubnetworksListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProject sets the optional parameter "serviceProject": The project id -// or project number in which the subnetwork is intended to be -// used. Only applied for Shared VPC. See Shared VPC -// documentation (https://cloud.google.com/vpc/docs/shared-vpc/) -func (c *SubnetworksListUsableCall) ServiceProject(serviceProject string) *SubnetworksListUsableCall { - c.urlParams_.Set("serviceProject", serviceProject) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksListUsableCall) Fields(s ...googleapi.Field) *SubnetworksListUsableCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *SubnetworksListUsableCall) IfNoneMatch(entityTag string) *SubnetworksListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksListUsableCall) Context(ctx context.Context) *SubnetworksListUsableCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/subnetworks/listUsable") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.listUsable", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.listUsable" call. -// Any non-2xx status code is an error. Response headers are in either -// *UsableSubnetworksAggregatedList.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 *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSubnetworksAggregatedList, 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 := &UsableSubnetworksAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.listUsable", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *SubnetworksListUsableCall) Pages(ctx context.Context, f func(*UsableSubnetworksAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type SubnetworksPatchCall struct { - s *Service - project string - region string - subnetwork string - subnetwork2 *Subnetwork - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified subnetwork with the data included in the -// request. -// Only certain fields can be updated with a patch request -// as indicated in the field descriptions. -// You must specify the current fingerprint of the -// subnetwork resource being patched. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource to patch. -func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { - c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetwork2 = subnetwork2 - return c -} - -// DrainTimeoutSeconds sets the optional parameter "drainTimeoutSeconds": The -// drain timeout specifies the upper bound in seconds on the amount of -// time allowed to drain connections from the current ACTIVE subnetwork -// to the current BACKUP subnetwork. The drain timeout is only applicable -// when the following conditions are true: -// - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER -// - the subnetwork being patched has role = BACKUP -// - the patch request is setting the role to ACTIVE. Note that after this -// patch operation the roles of the ACTIVE and BACKUP subnetworks will be -// swapped. -func (c *SubnetworksPatchCall) DrainTimeoutSeconds(drainTimeoutSeconds int64) *SubnetworksPatchCall { - c.urlParams_.Set("drainTimeoutSeconds", fmt.Sprint(drainTimeoutSeconds)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksPatchCall) RequestId(requestId string) *SubnetworksPatchCall { - 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 -// details. -func (c *SubnetworksPatchCall) Fields(s ...googleapi.Field) *SubnetworksPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksPatchCall) Context(ctx context.Context) *SubnetworksPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetwork2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall { - c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setIamPolicy" call. -// 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 *SubnetworksSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksSetPrivateIpGoogleAccessCall struct { - s *Service - project string - region string - subnetwork string - subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access Google -// services without assigning -// external IP addresses through Private Google Access. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - subnetwork: Name of the Subnetwork resource. -func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { - c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.subnetwork = subnetwork - c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall { - 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 -// details. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.subnetworkssetprivateipgoogleaccessrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess") - 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{ - "project": c.project, - "region": c.region, - "subnetwork": c.subnetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.setPrivateIpGoogleAccess", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *SubnetworksSetPrivateIpGoogleAccessCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.setPrivateIpGoogleAccess", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type SubnetworksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { - c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/subnetworks/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.subnetworks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.subnetworks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.subnetworks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesDeleteCall struct { - s *Service - project string - targetGrpcProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetGrpcProxy in the given scope -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to delete. -func (r *TargetGrpcProxiesService) Delete(project string, targetGrpcProxy string) *TargetGrpcProxiesDeleteCall { - c := &TargetGrpcProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesDeleteCall) RequestId(requestId string) *TargetGrpcProxiesDeleteCall { - 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 -// details. -func (c *TargetGrpcProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesDeleteCall) Context(ctx context.Context) *TargetGrpcProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesGetCall struct { - s *Service - project string - targetGrpcProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetGrpcProxy resource in the given scope. -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to return. -func (r *TargetGrpcProxiesService) Get(project string, targetGrpcProxy string) *TargetGrpcProxiesGetCall { - c := &TargetGrpcProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesGetCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetGrpcProxiesGetCall) IfNoneMatch(entityTag string) *TargetGrpcProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesGetCall) Context(ctx context.Context) *TargetGrpcProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetGrpcProxy.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 *TargetGrpcProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetGrpcProxy, 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 := &TargetGrpcProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesInsertCall struct { - s *Service - project string - targetgrpcproxy *TargetGrpcProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetGrpcProxy in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - project: Project ID for this request. -func (r *TargetGrpcProxiesService) Insert(project string, targetgrpcproxy *TargetGrpcProxy) *TargetGrpcProxiesInsertCall { - c := &TargetGrpcProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetgrpcproxy = targetgrpcproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesInsertCall) RequestId(requestId string) *TargetGrpcProxiesInsertCall { - 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 -// details. -func (c *TargetGrpcProxiesInsertCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesInsertCall) Context(ctx context.Context) *TargetGrpcProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetgrpcproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the TargetGrpcProxies for a project in the given scope. -// -// - project: Project ID for this request. -func (r *TargetGrpcProxiesService) List(project string) *TargetGrpcProxiesListCall { - c := &TargetGrpcProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetGrpcProxiesListCall) Filter(filter string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetGrpcProxiesListCall) MaxResults(maxResults int64) *TargetGrpcProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetGrpcProxiesListCall) OrderBy(orderBy string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetGrpcProxiesListCall) PageToken(pageToken string) *TargetGrpcProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetGrpcProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetGrpcProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesListCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetGrpcProxiesListCall) IfNoneMatch(entityTag string) *TargetGrpcProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesListCall) Context(ctx context.Context) *TargetGrpcProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetGrpcProxyList.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 *TargetGrpcProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetGrpcProxyList, 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 := &TargetGrpcProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetGrpcProxiesListCall) Pages(ctx context.Context, f func(*TargetGrpcProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetGrpcProxiesPatchCall struct { - s *Service - project string - targetGrpcProxy string - targetgrpcproxy *TargetGrpcProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetGrpcProxy resource with the data included -// in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetGrpcProxy: Name of the TargetGrpcProxy resource to patch. -func (r *TargetGrpcProxiesService) Patch(project string, targetGrpcProxy string, targetgrpcproxy *TargetGrpcProxy) *TargetGrpcProxiesPatchCall { - c := &TargetGrpcProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetGrpcProxy = targetGrpcProxy - c.targetgrpcproxy = targetgrpcproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetGrpcProxiesPatchCall) RequestId(requestId string) *TargetGrpcProxiesPatchCall { - 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 -// details. -func (c *TargetGrpcProxiesPatchCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesPatchCall) Context(ctx context.Context) *TargetGrpcProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetgrpcproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{targetGrpcProxy}") - 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{ - "project": c.project, - "targetGrpcProxy": c.targetGrpcProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetGrpcProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetGrpcProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetGrpcProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetGrpcProxiesTestIamPermissionsCall { - c := &TargetGrpcProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetGrpcProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetGrpcProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetGrpcProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetGrpcProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetGrpcProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetGrpcProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetGrpcProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetGrpcProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetHttpProxy resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetHttpProxiesService) AggregatedList(project string) *TargetHttpProxiesAggregatedListCall { - c := &TargetHttpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpProxiesAggregatedListCall) Filter(filter string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetHttpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetHttpProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyAggregatedList.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 *TargetHttpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyAggregatedList, 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 := &TargetHttpProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpProxiesDeleteCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to delete. -func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { - c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall { - 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 -// details. -func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesGetCall struct { - s *Service - project string - targetHttpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpProxy resource. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to return. -func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { - c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxy.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 *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, 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 := &TargetHttpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesInsertCall struct { - s *Service - project string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpProxy resource in the specified -// project using the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { - c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall { - 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 -// details. -func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpProxy resources available -// to the specified project. -// -// - project: Project ID for this request. -func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { - c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpProxyList.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 *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, 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 := &TargetHttpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpProxiesPatchCall struct { - s *Service - project string - targetHttpProxy string - targethttpproxy *TargetHttpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetHttpProxy resource with the data included -// in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy resource to patch. -func (r *TargetHttpProxiesService) Patch(project string, targetHttpProxy string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesPatchCall { - c := &TargetHttpProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.targethttpproxy = targethttpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesPatchCall) RequestId(requestId string) *TargetHttpProxiesPatchCall { - 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 -// details. -func (c *TargetHttpProxiesPatchCall) Fields(s ...googleapi.Field) *TargetHttpProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesPatchCall) Context(ctx context.Context) *TargetHttpProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{targetHttpProxy}") - 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{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpProxy. -// -// - project: Project ID for this request. -// - targetHttpProxy: Name of the TargetHttpProxy to set a URL map for. -func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { - c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpProxy = targetHttpProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall { - 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 -// details. -func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") - 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{ - "project": c.project, - "targetHttpProxy": c.targetHttpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { - c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetHttpsProxy resources, -// regional and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetHttpsProxiesService) AggregatedList(project string) *TargetHttpsProxiesAggregatedListCall { - c := &TargetHttpsProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpsProxiesAggregatedListCall) Filter(filter string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetHttpsProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpsProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpsProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpsProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpsProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetHttpsProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpsProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyAggregatedList.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 *TargetHttpsProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyAggregatedList, 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 := &TargetHttpsProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpsProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpsProxiesDeleteCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to delete. -func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { - c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall { - 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 -// details. -func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesGetCall struct { - s *Service - project string - targetHttpsProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetHttpsProxy resource. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to return. -func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { - c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxy.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 *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, 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 := &TargetHttpsProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesInsertCall struct { - s *Service - project string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetHttpsProxy resource in the specified -// project using the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { - c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall { - 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 -// details. -func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetHttpsProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { - c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetHttpsProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetHttpsProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetHttpsProxyList.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 *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, 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 := &TargetHttpsProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetHttpsProxiesPatchCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxy *TargetHttpsProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified TargetHttpsProxy resource with the data -// included in -// the request. This method supports PATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to patch. -func (r *TargetHttpsProxiesService) Patch(project string, targetHttpsProxy string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesPatchCall { - c := &TargetHttpsProxiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxy = targethttpsproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesPatchCall) RequestId(requestId string) *TargetHttpsProxiesPatchCall { - 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 -// details. -func (c *TargetHttpsProxiesPatchCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesPatchCall) Context(ctx context.Context) *TargetHttpsProxiesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetCertificateMapCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetcertificatemaprequest *TargetHttpsProxiesSetCertificateMapRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCertificateMap: Changes the Certificate Map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose -// CertificateMap is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetHttpsProxiesService) SetCertificateMap(project string, targetHttpsProxy string, targethttpsproxiessetcertificatemaprequest *TargetHttpsProxiesSetCertificateMapRequest) *TargetHttpsProxiesSetCertificateMapCall { - c := &TargetHttpsProxiesSetCertificateMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetcertificatemaprequest = targethttpsproxiessetcertificatemaprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetCertificateMapCall) RequestId(requestId string) *TargetHttpsProxiesSetCertificateMapCall { - 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 -// details. -func (c *TargetHttpsProxiesSetCertificateMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetCertificateMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetCertificateMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetCertificateMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetCertificateMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetCertificateMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetcertificatemaprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setCertificateMap") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setCertificateMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setCertificateMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetCertificateMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setCertificateMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetQuicOverrideCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set the QUIC -// override policy for. -// -// The name should conform to RFC1035. -func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { - c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetquicoverriderequest = targethttpsproxiessetquicoverriderequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetQuicOverrideCall) RequestId(requestId string) *TargetHttpsProxiesSetQuicOverrideCall { - 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 -// details. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetQuicOverrideCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Context(ctx context.Context) *TargetHttpsProxiesSetQuicOverrideCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetquicoverriderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setQuicOverride", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setQuicOverride" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetQuicOverrideCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setQuicOverride", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetSslCertificatesCall struct { - s *Service - project string - targetHttpsProxy string - targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource to set -// an -// -// SslCertificates resource for. -func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { - c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall { - 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 -// details. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targethttpsproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetSslPolicyCall struct { - s *Service - project string - targetHttpsProxy string - sslpolicyreference *SslPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslPolicy: Sets the SSL policy for TargetHttpsProxy. The SSL policy -// specifies the -// server-side support for SSL features. This affects connections -// between -// clients and the HTTPS proxy load balancer. They do not affect the -// connection between the load balancer and the backends. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose SSL policy -// is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetHttpsProxiesService) SetSslPolicy(project string, targetHttpsProxy string, sslpolicyreference *SslPolicyReference) *TargetHttpsProxiesSetSslPolicyCall { - c := &TargetHttpsProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.sslpolicyreference = sslpolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetSslPolicyCall) RequestId(requestId string) *TargetHttpsProxiesSetSslPolicyCall { - 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 -// details. -func (c *TargetHttpsProxiesSetSslPolicyCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetSslPolicyCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setSslPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetSslPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setSslPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesSetUrlMapCall struct { - s *Service - project string - targetHttpsProxy string - urlmapreference *UrlMapReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetUrlMap: Changes the URL map for TargetHttpsProxy. -// -// - project: Project ID for this request. -// - targetHttpsProxy: Name of the TargetHttpsProxy resource whose URL map -// is -// -// to be set. -func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { - c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetHttpsProxy = targetHttpsProxy - c.urlmapreference = urlmapreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall { - 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 -// details. -func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") - 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{ - "project": c.project, - "targetHttpsProxy": c.targetHttpsProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setUrlMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.setUrlMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetHttpsProxiesSetUrlMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.setUrlMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetHttpsProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { - c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetHttpsProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetHttpsProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetHttpsProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target instances. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { - c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetInstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetInstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetInstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstanceAggregatedList.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 *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, 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 := &TargetInstanceAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetInstancesDeleteCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetInstance resource. -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to delete. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { - c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall { - 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 -// details. -func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesGetCall struct { - s *Service - project string - zone string - targetInstance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetInstance resource. -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to return. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { - c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstance.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 *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, 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 := &TargetInstance{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesInsertCall struct { - s *Service - project string - zone string - targetinstance *TargetInstance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetInstance resource in the specified project and zone -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { - c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetinstance = targetinstance - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall { - 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 -// details. -func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetinstance) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of TargetInstance resources available to the -// specified -// project and zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { - c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetInstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetInstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetInstanceList.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 *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, 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 := &TargetInstanceList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetInstancesSetSecurityPolicyCall struct { - s *Service - project string - zone string - targetInstance string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified target -// instance. For more information, seeGoogle -// Cloud Armor Overview -// -// - project: Project ID for this request. -// - targetInstance: Name of the TargetInstance resource to which the security -// policy should be -// -// set. The name should conform to RFC1035. -// - zone: Name of the zone scoping this request. -func (r *TargetInstancesService) SetSecurityPolicy(project string, zone string, targetInstance string, securitypolicyreference *SecurityPolicyReference) *TargetInstancesSetSecurityPolicyCall { - c := &TargetInstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.targetInstance = targetInstance - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetInstancesSetSecurityPolicyCall) RequestId(requestId string) *TargetInstancesSetSecurityPolicyCall { - 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 -// details. -func (c *TargetInstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetInstancesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesSetSecurityPolicyCall) Context(ctx context.Context) *TargetInstancesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy") - 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{ - "project": c.project, - "zone": c.zone, - "targetInstance": c.targetInstance, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetInstancesSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetInstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { - c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetInstances.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetInstances.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetInstances.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAddHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddHealthCheck: Adds health check URLs to a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the target pool to add a health check to. -func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { - c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall { - 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 -// details. -func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsaddhealthcheckrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.addHealthCheck", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addHealthCheck" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsAddHealthCheckCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.addHealthCheck", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAddInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddInstance: Adds an instance to a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to add instances to. -func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { - c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall { - 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 -// details. -func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAddInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsaddinstancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.addInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.addInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsAddInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.addInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target pools. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { - c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetPoolsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetPoolsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetPoolsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolAggregatedList.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 *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, 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 := &TargetPoolAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetPoolsDeleteCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to delete. -func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { - c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall { - 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 -// details. -func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsGetCall struct { - s *Service - project string - region string - targetPool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to return. -func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { - c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPool.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 *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, 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 := &TargetPool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsGetHealthCall struct { - s *Service - project string - region string - targetPool string - instancereference *InstanceReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetHealth: Gets the most recent health check results for each IP for -// the -// instance that is referenced by the given target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to which the queried instance -// belongs. -func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { - c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.instancereference = instancereference - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsGetHealthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.instancereference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.getHealth" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolInstanceHealth.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 *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, 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 := &TargetPoolInstanceHealth{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.getHealth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsInsertCall struct { - s *Service - project string - region string - targetpool *TargetPool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target pool in the specified project and region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { - c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetpool = targetpool - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall { - 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 -// details. -func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpool) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target pools available to the specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { - c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetPoolsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetPoolsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetPoolList.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 *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, 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 := &TargetPoolList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetPoolsRemoveHealthCheckCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveHealthCheck: Removes health check URL from a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetPool: Name of the target pool to remove health checks from. -func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { - c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall { - 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 -// details. -func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsremovehealthcheckrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.removeHealthCheck", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeHealthCheck" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsRemoveHealthCheckCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.removeHealthCheck", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsRemoveInstanceCall struct { - s *Service - project string - region string - targetPool string - targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// RemoveInstance: Removes instance URL from a target pool. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to remove instances from. -func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { - c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall { - 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 -// details. -func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetpoolsremoveinstancerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.removeInstance", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.removeInstance" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsRemoveInstanceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.removeInstance", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsSetBackupCall struct { - s *Service - project string - region string - targetPool string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackup: Changes a backup target pool's configurations. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to set a backup pool for. -func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { - c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.targetreference = targetreference - return c -} - -// FailoverRatio sets the optional parameter "failoverRatio": New failoverRatio -// value for the target pool. -func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { - c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall { - 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 -// details. -func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsSetBackupCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.setBackup", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setBackup" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsSetBackupCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.setBackup", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsSetSecurityPolicyCall struct { - s *Service - project string - region string - targetPool string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified target pool. -// For more information, seeGoogle -// Cloud Armor Overview -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - targetPool: Name of the TargetPool resource to which the security policy -// should be -// -// set. The name should conform to RFC1035. -func (r *TargetPoolsService) SetSecurityPolicy(project string, region string, targetPool string, securitypolicyreference *SecurityPolicyReference) *TargetPoolsSetSecurityPolicyCall { - c := &TargetPoolsSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetPool = targetPool - c.securitypolicyreference = securitypolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetPoolsSetSecurityPolicyCall) RequestId(requestId string) *TargetPoolsSetSecurityPolicyCall { - 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 -// details. -func (c *TargetPoolsSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetPoolsSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsSetSecurityPolicyCall) Context(ctx context.Context) *TargetPoolsSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "targetPool": c.targetPool, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetPoolsSetSecurityPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetPoolsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { - c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetPools.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetPools.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetPools.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesDeleteCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetSslProxy resource. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource to delete. -func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { - c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall { - 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 -// details. -func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesGetCall struct { - s *Service - project string - targetSslProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetSslProxy resource. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource to return. -func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { - c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetSslProxy.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 *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, 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 := &TargetSslProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesInsertCall struct { - s *Service - project string - targetsslproxy *TargetSslProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetSslProxy resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { - c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetsslproxy = targetsslproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall { - 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 -// details. -func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetSslProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { - c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetSslProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetSslProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetSslProxyList.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 *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, 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 := &TargetSslProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetSslProxiesSetBackendServiceCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose BackendService -// resource -// -// is to be set. -func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { - c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall { - 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 -// details. -func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setBackendService", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setBackendService" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetBackendServiceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setBackendService", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetCertificateMapCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetcertificatemaprequest *TargetSslProxiesSetCertificateMapRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetCertificateMap: Changes the Certificate Map for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose CertificateMap -// is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetSslProxiesService) SetCertificateMap(project string, targetSslProxy string, targetsslproxiessetcertificatemaprequest *TargetSslProxiesSetCertificateMapRequest) *TargetSslProxiesSetCertificateMapCall { - c := &TargetSslProxiesSetCertificateMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetcertificatemaprequest = targetsslproxiessetcertificatemaprequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetCertificateMapCall) RequestId(requestId string) *TargetSslProxiesSetCertificateMapCall { - 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 -// details. -func (c *TargetSslProxiesSetCertificateMapCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetCertificateMapCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetCertificateMapCall) Context(ctx context.Context) *TargetSslProxiesSetCertificateMapCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetCertificateMapCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetCertificateMapCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetcertificatemaprequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setCertificateMap") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setCertificateMap", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setCertificateMap" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetCertificateMapCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setCertificateMap", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetProxyHeaderCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose ProxyHeader is -// to be set. -func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { - c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall { - 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 -// details. -func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setProxyHeader", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setProxyHeader" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetProxyHeaderCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setProxyHeader", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetSslCertificatesCall struct { - s *Service - project string - targetSslProxy string - targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose SslCertificate -// resource -// -// is to be set. -func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { - c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall { - 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 -// details. -func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetsslproxiessetsslcertificatesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslCertificates", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslCertificates" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslCertificatesCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslCertificates", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesSetSslPolicyCall struct { - s *Service - project string - targetSslProxy string - sslpolicyreference *SslPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSslPolicy: Sets the SSL policy for TargetSslProxy. The SSL policy -// specifies the -// server-side support for SSL features. This affects connections -// between -// clients and the load balancer. They do not affect the -// connection between the load balancer and the backends. -// -// - project: Project ID for this request. -// - targetSslProxy: Name of the TargetSslProxy resource whose SSL policy is -// to be set. The name must be 1-63 characters long, and comply with RFC1035. -func (r *TargetSslProxiesService) SetSslPolicy(project string, targetSslProxy string, sslpolicyreference *SslPolicyReference) *TargetSslProxiesSetSslPolicyCall { - c := &TargetSslProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetSslProxy = targetSslProxy - c.sslpolicyreference = sslpolicyreference - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetSslProxiesSetSslPolicyCall) RequestId(requestId string) *TargetSslProxiesSetSslPolicyCall { - 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 -// details. -func (c *TargetSslProxiesSetSslPolicyCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesSetSslPolicyCall) Context(ctx context.Context) *TargetSslProxiesSetSslPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.sslpolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy") - 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{ - "project": c.project, - "targetSslProxy": c.targetSslProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.setSslPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetSslProxiesSetSslPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.setSslPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetSslProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { - c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetSslProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetSslProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetSslProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetSslProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetSslProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetSslProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetSslProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetSslProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all TargetTcpProxy resources, regional -// and global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *TargetTcpProxiesService) AggregatedList(project string) *TargetTcpProxiesAggregatedListCall { - c := &TargetTcpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetTcpProxiesAggregatedListCall) Filter(filter string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetTcpProxiesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetTcpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetTcpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetTcpProxiesAggregatedListCall) PageToken(pageToken string) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetTcpProxiesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetTcpProxiesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesAggregatedListCall) Context(ctx context.Context) *TargetTcpProxiesAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyAggregatedList.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 *TargetTcpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyAggregatedList, 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 := &TargetTcpProxyAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetTcpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetTcpProxyAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetTcpProxiesDeleteCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to delete. -func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { - c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall { - 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 -// details. -func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesGetCall struct { - s *Service - project string - targetTcpProxy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified TargetTcpProxy resource. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource to return. -func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { - c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxy.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 *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, 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 := &TargetTcpProxy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesInsertCall struct { - s *Service - project string - targettcpproxy *TargetTcpProxy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a TargetTcpProxy resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { - c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targettcpproxy = targettcpproxy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall { - 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 -// details. -func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of TargetTcpProxy resources -// available to the specified project. -// -// - project: Project ID for this request. -func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { - c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetTcpProxiesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetTcpProxiesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetTcpProxyList.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 *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, 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 := &TargetTcpProxyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetTcpProxiesSetBackendServiceCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetBackendService: Changes the BackendService for TargetTcpProxy. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource whose BackendService -// resource -// -// is to be set. -func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { - c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall { - 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 -// details. -func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxiessetbackendservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService") - 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{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setBackendService", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setBackendService" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetBackendServiceCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setBackendService", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesSetProxyHeaderCall struct { - s *Service - project string - targetTcpProxy string - targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. -// -// - project: Project ID for this request. -// - targetTcpProxy: Name of the TargetTcpProxy resource whose ProxyHeader is -// to be set. -func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { - c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.targetTcpProxy = targetTcpProxy - c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall { - 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 -// details. -func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targettcpproxiessetproxyheaderrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader") - 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{ - "project": c.project, - "targetTcpProxy": c.targetTcpProxy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setProxyHeader", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.setProxyHeader" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetTcpProxiesSetProxyHeaderCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.setProxyHeader", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetTcpProxiesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetTcpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetTcpProxiesTestIamPermissionsCall { - c := &TargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetTcpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetTcpProxiesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetTcpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetTcpProxiesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetTcpProxiesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/targetTcpProxies/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetTcpProxies.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetTcpProxies.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of target VPN gateways. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { - c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *TargetVpnGatewaysAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetVpnGatewaysAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *TargetVpnGatewaysAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayAggregatedList.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 *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, 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 := &TargetVpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetVpnGatewaysDeleteCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified target VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetVpnGateway: Name of the target VPN gateway to delete. -func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { - c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall { - 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 -// details. -func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysGetCall struct { - s *Service - project string - region string - targetVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified target VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - targetVpnGateway: Name of the target VPN gateway to return. -func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { - c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetVpnGateway = targetVpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "targetVpnGateway": c.targetVpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGateway.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 *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, 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 := &TargetVpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysInsertCall struct { - s *Service - project string - region string - targetvpngateway *TargetVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a target VPN gateway in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { - c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.targetvpngateway = targetvpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall { - 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 -// details. -func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.targetvpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of target VPN gateways available to the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { - c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *TargetVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *TargetVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *TargetVpnGatewayList.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 *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, 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 := &TargetVpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type TargetVpnGatewaysSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a TargetVpnGateway. To learn more about -// labels, read theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetVpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *TargetVpnGatewaysSetLabelsCall { - c := &TargetVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *TargetVpnGatewaysSetLabelsCall) RequestId(requestId string) *TargetVpnGatewaysSetLabelsCall { - 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 -// details. -func (c *TargetVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysSetLabelsCall) Context(ctx context.Context) *TargetVpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *TargetVpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type TargetVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { - c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetVpnGateways/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.targetVpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.targetVpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all UrlMap resources, regional and -// global, -// available to the specified project. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Name of the project scoping this request. -func (r *UrlMapsService) AggregatedList(project string) *UrlMapsAggregatedListCall { - c := &UrlMapsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *UrlMapsAggregatedListCall) Filter(filter string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *UrlMapsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *UrlMapsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *UrlMapsAggregatedListCall) MaxResults(maxResults int64) *UrlMapsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *UrlMapsAggregatedListCall) OrderBy(orderBy string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *UrlMapsAggregatedListCall) PageToken(pageToken string) *UrlMapsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *UrlMapsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *UrlMapsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *UrlMapsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *UrlMapsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsAggregatedListCall) Fields(s ...googleapi.Field) *UrlMapsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsAggregatedListCall) IfNoneMatch(entityTag string) *UrlMapsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsAggregatedListCall) Context(ctx context.Context) *UrlMapsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsAggregatedList.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 *UrlMapsAggregatedListCall) Do(opts ...googleapi.CallOption) (*UrlMapsAggregatedList, 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 := &UrlMapsAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *UrlMapsAggregatedListCall) Pages(ctx context.Context, f func(*UrlMapsAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type UrlMapsDeleteCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified UrlMap resource. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to delete. -func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { - c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall { - 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 -// details. -func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsGetCall struct { - s *Service - project string - urlMap string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified UrlMap resource. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to return. -func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { - c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMap.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 *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, 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 := &UrlMap{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsInsertCall struct { - s *Service - project string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a UrlMap resource in the specified project using -// the data included in the request. -// -// - project: Project ID for this request. -func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { - c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall { - 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 -// details. -func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsInvalidateCacheCall struct { - s *Service - project string - urlMap string - cacheinvalidationrule *CacheInvalidationRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// InvalidateCache: Initiates a cache invalidation operation, invalidating the -// specified path, -// scoped to the specified UrlMap. -// -// For more information, see Invalidating cached -// content (/cdn/docs/invalidating-cached-content). -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap scoping this request. -func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { - c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.cacheinvalidationrule = cacheinvalidationrule - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall { - 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 -// details. -func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsInvalidateCacheCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cacheinvalidationrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}/invalidateCache") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.invalidateCache", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.invalidateCache" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsInvalidateCacheCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.invalidateCache", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of UrlMap resources available to the -// specified -// project. -// -// - project: Project ID for this request. -func (r *UrlMapsService) List(project string) *UrlMapsListCall { - c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *UrlMapsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *UrlMapsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapList.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 *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, 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 := &UrlMapList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type UrlMapsPatchCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified UrlMap resource with the data included in -// the -// request. This method supportsPATCH -// semantics and uses theJSON merge -// patch format and processing rules. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to patch. -func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { - c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall { - 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 -// details. -func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { - c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{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{ - "project": c.project, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsUpdateCall struct { - s *Service - project string - urlMap string - urlmap *UrlMap - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified UrlMap resource with the data included in -// the -// request. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to update. -func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { - c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmap = urlmap - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall { - 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 -// details. -func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmap) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *UrlMapsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type UrlMapsValidateCall struct { - s *Service - project string - urlMap string - urlmapsvalidaterequest *UrlMapsValidateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Validate: Runs static validation for the UrlMap. In particular, the tests of -// the -// provided UrlMap will be run. Calling this method does NOT create the -// UrlMap. -// -// - project: Project ID for this request. -// - urlMap: Name of the UrlMap resource to be validated as. -func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { - c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.urlMap = urlMap - c.urlmapsvalidaterequest = urlmapsvalidaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *UrlMapsValidateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.urlmapsvalidaterequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/urlMaps/{urlMap}/validate") - 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{ - "project": c.project, - "urlMap": c.urlMap, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.urlMaps.validate", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.urlMaps.validate" call. -// Any non-2xx status code is an error. Response headers are in either -// *UrlMapsValidateResponse.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 *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, 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 := &UrlMapsValidateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.urlMaps.validate", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN gateways. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { - c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnGatewaysAggregatedListCall) Filter(filter string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *VpnGatewaysAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnGatewaysAggregatedListCall) OrderBy(orderBy string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnGatewaysAggregatedListCall) PageToken(pageToken string) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnGatewaysAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *VpnGatewaysAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *VpnGatewaysAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *VpnGatewaysAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysAggregatedListCall) Context(ctx context.Context) *VpnGatewaysAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewayAggregatedList.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 *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayAggregatedList, 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 := &VpnGatewayAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*VpnGatewayAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnGatewaysDeleteCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to delete. -func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { - c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysDeleteCall) RequestId(requestId string) *VpnGatewaysDeleteCall { - 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 -// details. -func (c *VpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *VpnGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysDeleteCall) Context(ctx context.Context) *VpnGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysGetCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to return. -func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { - c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysGetCall) Fields(s ...googleapi.Field) *VpnGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysGetCall) IfNoneMatch(entityTag string) *VpnGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysGetCall) Context(ctx context.Context) *VpnGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGateway.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 *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, 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 := &VpnGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysGetStatusCall struct { - s *Service - project string - region string - vpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetStatus: Returns the status for the specified VPN gateway. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnGateway: Name of the VPN gateway to return. -func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { - c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnGateway = vpnGateway - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysGetStatusCall) Fields(s ...googleapi.Field) *VpnGatewaysGetStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysGetStatusCall) IfNoneMatch(entityTag string) *VpnGatewaysGetStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysGetStatusCall) Context(ctx context.Context) *VpnGatewaysGetStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysGetStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnGateway": c.vpnGateway, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.getStatus", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.getStatus" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewaysGetStatusResponse.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 *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGatewaysGetStatusResponse, 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 := &VpnGatewaysGetStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.getStatus", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysInsertCall struct { - s *Service - project string - region string - vpngateway *VpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VPN gateway in the specified project and region using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { - c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpngateway = vpngateway - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysInsertCall) RequestId(requestId string) *VpnGatewaysInsertCall { - 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 -// details. -func (c *VpnGatewaysInsertCall) Fields(s ...googleapi.Field) *VpnGatewaysInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysInsertCall) Context(ctx context.Context) *VpnGatewaysInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vpngateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VPN gateways available to the specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { - c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnGatewaysListCall) Filter(filter string) *VpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnGatewaysListCall) MaxResults(maxResults int64) *VpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnGatewaysListCall) OrderBy(orderBy string) *VpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnGatewaysListCall) PageToken(pageToken string) *VpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysListCall) Fields(s ...googleapi.Field) *VpnGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnGatewaysListCall) IfNoneMatch(entityTag string) *VpnGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysListCall) Context(ctx context.Context) *VpnGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnGatewayList.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 *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, 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 := &VpnGatewayList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnGatewaysListCall) Pages(ctx context.Context, f func(*VpnGatewayList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnGatewaysSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a VpnGateway. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { - c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnGatewaysSetLabelsCall) RequestId(requestId string) *VpnGatewaysSetLabelsCall { - 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 -// details. -func (c *VpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *VpnGatewaysSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysSetLabelsCall) Context(ctx context.Context) *VpnGatewaysSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnGatewaysSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnGatewaysTestIamPermissionsCall { - c := &VpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnGatewaysTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *VpnGatewaysTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnGatewaysTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnGateways/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnGateways.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnGateways.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *VpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnGateways.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of VPN tunnels. -// -// To prevent failure, Google recommends that you set -// the -// `returnPartialSuccess` parameter to `true`. -// -// - project: Project ID for this request. -func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { - c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, -// global) should be included in the response. For new resource types -// added -// after this field, the flag has no effect as new resource types will -// always -// include every visible scope for each scope type in response. For -// resource -// types which predate this field, if this flag is omitted or false, -// only -// scopes of the scope types where the resource type is expected to be -// found -// will be included. -func (c *VpnTunnelsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnTunnelsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which -// aggregated list request is invoked for subnetworks list-usable api. -func (c *VpnTunnelsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnelAggregatedList.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 *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, 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 := &VpnTunnelAggregatedList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.aggregatedList", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnTunnelsDeleteCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified VpnTunnel resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnTunnel: Name of the VpnTunnel resource to delete. -func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { - c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall { - 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 -// details. -func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsGetCall struct { - s *Service - project string - region string - vpnTunnel string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified VpnTunnel resource. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - vpnTunnel: Name of the VpnTunnel resource to return. -func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { - c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpnTunnel = vpnTunnel - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "vpnTunnel": c.vpnTunnel, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnel.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 *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, 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 := &VpnTunnel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsInsertCall struct { - s *Service - project string - region string - vpntunnel *VpnTunnel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a VpnTunnel resource in the specified project and region -// using -// the data included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { - c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.vpntunnel = vpntunnel - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall { - 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 -// details. -func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vpntunnel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels") - 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{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of VpnTunnel resources contained in the -// specified -// project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { - c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *VpnTunnelsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *VpnTunnelsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VpnTunnelList.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 *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, 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 := &VpnTunnelList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type VpnTunnelsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLabels: Sets the labels on a VpnTunnel. To learn more about labels, read -// theLabeling -// Resources documentation. -// -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnTunnelsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnTunnelsSetLabelsCall { - c := &VpnTunnelsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *VpnTunnelsSetLabelsCall) RequestId(requestId string) *VpnTunnelsSetLabelsCall { - 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 -// details. -func (c *VpnTunnelsSetLabelsCall) Fields(s ...googleapi.Field) *VpnTunnelsSetLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsSetLabelsCall) Context(ctx context.Context) *VpnTunnelsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsSetLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.setLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *VpnTunnelsSetLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.setLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type VpnTunnelsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { - c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/vpnTunnels/{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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.vpnTunnels.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.vpnTunnels.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.vpnTunnels.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsDeleteCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified wire group in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the wire group resource to delete. -func (r *WireGroupsService) Delete(project string, crossSiteNetwork string, wireGroup string) *WireGroupsDeleteCall { - c := &WireGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsDeleteCall) RequestId(requestId string) *WireGroupsDeleteCall { - 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 -// details. -func (c *WireGroupsDeleteCall) Fields(s ...googleapi.Field) *WireGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsDeleteCall) Context(ctx context.Context) *WireGroupsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsGetCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified wire group resource in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the wire group resource to return. -func (r *WireGroupsService) Get(project string, crossSiteNetwork string, wireGroup string) *WireGroupsGetCall { - c := &WireGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *WireGroupsGetCall) Fields(s ...googleapi.Field) *WireGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *WireGroupsGetCall) IfNoneMatch(entityTag string) *WireGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsGetCall) Context(ctx context.Context) *WireGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WireGroup.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 *WireGroupsGetCall) Do(opts ...googleapi.CallOption) (*WireGroup, 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 := &WireGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsInsertCall struct { - s *Service - project string - crossSiteNetwork string - wiregroup *WireGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a wire group in the specified project in the given -// scope -// using the parameters that are included in the request. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -func (r *WireGroupsService) Insert(project string, crossSiteNetwork string, wiregroup *WireGroup) *WireGroupsInsertCall { - c := &WireGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wiregroup = wiregroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsInsertCall) RequestId(requestId string) *WireGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. -func (c *WireGroupsInsertCall) ValidateOnly(validateOnly bool) *WireGroupsInsertCall { - 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 -// details. -func (c *WireGroupsInsertCall) Fields(s ...googleapi.Field) *WireGroupsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsInsertCall) Context(ctx context.Context) *WireGroupsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wiregroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type WireGroupsListCall struct { - s *Service - project string - crossSiteNetwork string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the wire groups for a project in the given scope. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -func (r *WireGroupsService) List(project string, crossSiteNetwork string) *WireGroupsListCall { - c := &WireGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *WireGroupsListCall) Filter(filter string) *WireGroupsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *WireGroupsListCall) MaxResults(maxResults int64) *WireGroupsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *WireGroupsListCall) OrderBy(orderBy string) *WireGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *WireGroupsListCall) PageToken(pageToken string) *WireGroupsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *WireGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *WireGroupsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *WireGroupsListCall) Fields(s ...googleapi.Field) *WireGroupsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *WireGroupsListCall) IfNoneMatch(entityTag string) *WireGroupsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsListCall) Context(ctx context.Context) *WireGroupsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *WireGroupList.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 *WireGroupsListCall) Do(opts ...googleapi.CallOption) (*WireGroupList, 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 := &WireGroupList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *WireGroupsListCall) Pages(ctx context.Context, f func(*WireGroupList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type WireGroupsPatchCall struct { - s *Service - project string - crossSiteNetwork string - wireGroup string - wiregroup *WireGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the specified wire group resource with the data included in -// the -// request. This method supportsPATCH -// semantics and usesJSON merge -// patch format and processing rules. -// -// - crossSiteNetwork: . -// - project: Project ID for this request. -// - wireGroup: Name of the WireGroups resource to patch. -func (r *WireGroupsService) Patch(project string, crossSiteNetwork string, wireGroup string, wiregroup *WireGroup) *WireGroupsPatchCall { - c := &WireGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.crossSiteNetwork = crossSiteNetwork - c.wireGroup = wireGroup - c.wiregroup = wiregroup - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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). -// end_interface: MixerMutationRequestBuilder -func (c *WireGroupsPatchCall) RequestId(requestId string) *WireGroupsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *WireGroupsPatchCall) UpdateMask(updateMask string) *WireGroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. -func (c *WireGroupsPatchCall) ValidateOnly(validateOnly bool) *WireGroupsPatchCall { - 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 -// details. -func (c *WireGroupsPatchCall) Fields(s ...googleapi.Field) *WireGroupsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *WireGroupsPatchCall) Context(ctx context.Context) *WireGroupsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *WireGroupsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *WireGroupsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wiregroup) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/crossSiteNetworks/{crossSiteNetwork}/wireGroups/{wireGroup}") - 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{ - "project": c.project, - "crossSiteNetwork": c.crossSiteNetwork, - "wireGroup": c.wireGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.wireGroups.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.wireGroups.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *WireGroupsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.wireGroups.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified zone-specific Operations resource. -// -// - operation: Name of the Operations resource to delete, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Delete(project string, zone string, operationid string) *ZoneOperationsDeleteCall { - c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ZoneOperationsGetCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the specified zone-specific Operations resource. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Get(project string, zone string, operationid string) *ZoneOperationsGetCall { - c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneOperationsListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of Operation resources contained within -// the specified zone. -// -// - project: Project ID for this request. -// - zone: Name of the zone for request. -func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { - c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OperationList.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 *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, 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 := &OperationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneOperationsWaitCall struct { - s *Service - project string - zone string - operationid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits for the specified Operation resource to return as `DONE` -// or for the request to approach the 2 minute deadline, and retrieves -// the -// specified Operation resource. This method waits for no more than the -// 2 minutes and then returns the current state of the -// operation, which might be `DONE` or still in progress. -// -// This method is called on a best-effort basis. Specifically: -// -// - In uncommon cases, when the server is overloaded, the request might -// return before the default deadline is reached, or might return after -// -// zero -// -// seconds. -// - If the default deadline is reached, there is no guarantee that the -// operation is actually done when the method returns. Be prepared to -// -// retry -// -// if the operation is not `DONE`. -// -// - operation: Name of the Operations resource to return, or its unique -// numeric -// -// identifier. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Wait(project string, zone string, operationid string) *ZoneOperationsWaitCall { - c := &ZoneOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.operationid = operationid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneOperationsWaitCall) Fields(s ...googleapi.Field) *ZoneOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneOperationsWaitCall) Context(ctx context.Context) *ZoneOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/operations/{operation}/wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "operation": c.operationid, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneOperations.wait", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneOperations.wait" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneOperationsWaitCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneOperations.wait", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesDeleteCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a specified zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the zone VM extension policy to delete. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Delete(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesDeleteCall { - c := &ZoneVmExtensionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesDeleteCall) RequestId(requestId string) *ZoneVmExtensionPoliciesDeleteCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesDeleteCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesGetCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves details of a specific zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the VM extension policy resource to return. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Get(project string, zone string, vmExtensionPolicy string) *ZoneVmExtensionPoliciesGetCall { - c := &ZoneVmExtensionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneVmExtensionPoliciesGetCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneVmExtensionPoliciesGetCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesGetCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicy.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 *ZoneVmExtensionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicy, 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 := &VmExtensionPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesInsertCall struct { - s *Service - project string - zone string - vmextensionpolicy *VmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a new zone-level VM extension policy within a project. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Insert(project string, zone string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesInsertCall { - c := &ZoneVmExtensionPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmextensionpolicy = vmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesInsertCall) RequestId(requestId string) *ZoneVmExtensionPoliciesInsertCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesInsertCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesInsertCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") - 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{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesInsertCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.insert", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZoneVmExtensionPoliciesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all VM extension policies within a specific zone for a project. -// -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) List(project string, zone string) *ZoneVmExtensionPoliciesListCall { - c := &ZoneVmExtensionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZoneVmExtensionPoliciesListCall) Filter(filter string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZoneVmExtensionPoliciesListCall) MaxResults(maxResults int64) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZoneVmExtensionPoliciesListCall) OrderBy(orderBy string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZoneVmExtensionPoliciesListCall) PageToken(pageToken string) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZoneVmExtensionPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZoneVmExtensionPoliciesListCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZoneVmExtensionPoliciesListCall) IfNoneMatch(entityTag string) *ZoneVmExtensionPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesListCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *VmExtensionPolicyList.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 *ZoneVmExtensionPoliciesListCall) Do(opts ...googleapi.CallOption) (*VmExtensionPolicyList, 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 := &VmExtensionPolicyList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZoneVmExtensionPoliciesListCall) Pages(ctx context.Context, f func(*VmExtensionPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ZoneVmExtensionPoliciesUpdateCall struct { - s *Service - project string - zone string - vmExtensionPolicy string - vmextensionpolicy *VmExtensionPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Modifies an existing zone VM extension policy. -// -// - project: Project ID for this request. -// - vmExtensionPolicy: Name of the zone VM extension policy to update. -// - zone: Name of the zone for this request. -func (r *ZoneVmExtensionPoliciesService) Update(project string, zone string, vmExtensionPolicy string, vmextensionpolicy *VmExtensionPolicy) *ZoneVmExtensionPoliciesUpdateCall { - c := &ZoneVmExtensionPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.vmExtensionPolicy = vmExtensionPolicy - c.vmextensionpolicy = vmextensionpolicy - 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 will know to ignore -// the -// request if it has already been completed. -// -// 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 *ZoneVmExtensionPoliciesUpdateCall) RequestId(requestId string) *ZoneVmExtensionPoliciesUpdateCall { - 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 -// details. -func (c *ZoneVmExtensionPoliciesUpdateCall) Fields(s ...googleapi.Field) *ZoneVmExtensionPoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZoneVmExtensionPoliciesUpdateCall) Context(ctx context.Context) *ZoneVmExtensionPoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZoneVmExtensionPoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZoneVmExtensionPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.vmextensionpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}") - 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{ - "project": c.project, - "zone": c.zone, - "vmExtensionPolicy": c.vmExtensionPolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zoneVmExtensionPolicies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ZoneVmExtensionPoliciesUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zoneVmExtensionPolicies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZonesGetCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified Zone resource. -// -// - project: Project ID for this request. -// - zone: Name of the zone resource to return. -func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { - c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zones.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Zone.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 *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, 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 := &Zone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zones.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Zone resources available to the specified -// project. -// -// - project: Project ID for this request. -func (r *ZonesService) List(project string) *ZonesListCall { - c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most -// Compute resources support two types of filter expressions: -// expressions that support regular expressions and expressions that follow -// API improvement proposal AIP-160. -// These two types of filter expressions cannot be mixed in one request. -// -// If you want to use AIP-160, your expression must specify the field name, -// an -// operator, and the value that you want to use for filtering. The value -// must be a string, a number, or a boolean. The operator -// must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. -// -// For example, if you are filtering Compute Engine instances, you can -// exclude instances named `example-instance` by specifying -// `name != example-instance`. -// -// The `:*` comparison can be used to test whether a key has been defined. -// For example, to find all objects with `owner` label -// use: -// ``` -// labels.owner:* -// ``` -// -// You can also filter nested fields. For example, you could -// specify -// `scheduling.automaticRestart = false` to include instances only -// if they are not scheduled for automatic restarts. You can use filtering -// on nested fields to filter based onresource labels. -// -// To filter on multiple expressions, provide each separate expression -// within -// parentheses. For example: -// ``` -// (scheduling.automaticRestart = true) -// (cpuPlatform = "Intel Skylake") -// ``` -// By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. -// For example: -// ``` -// (cpuPlatform = "Intel Skylake") OR -// (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) -// ``` -// -// If you want to use a regular expression, use the `eq` (equal) or `ne` -// (not equal) operator against a single un-parenthesized expression with -// or -// without quotes or against multiple parenthesized expressions. -// Examples: -// -// `fieldname eq unquoted literal` -// `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" -// `(fieldname1 eq literal) (fieldname2 ne "literal")` -// -// The literal value is interpreted as a regular expression using GoogleRE2 -// library syntax. -// The literal value must match the entire field. -// -// For example, to filter for instances that do not end with name -// "instance", -// you would use `name ne .*instance`. -// -// You cannot combine constraints on multiple fields using regular -// expressions. -func (c *ZonesListCall) Filter(filter string) *ZonesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. -// If the number of available results is larger than `maxResults`, -// Compute Engine returns a `nextPageToken` that can be used to get -// the next page of results in subsequent list requests. Acceptable values -// are -// `0` to `500`, inclusive. (Default: `500`) -func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results -// are returned in alphanumerical order based on the resource name. -// -// You can also sort results in descending order based on the -// creation -// timestamp using `orderBy="creationTimestamp desc". This sorts -// results based on the `creationTimestamp` field in -// reverse chronological order (newest result first). Use this to -// sort -// resources like operations so that the newest operation is returned -// first. -// -// Currently, only sorting by `name` or -// `creationTimestamp desc` is supported. -func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the -// `nextPageToken` returned by a previous list request to get -// the next page of results. -func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in -// case -// of failure. The default value is false. -// -// For example, when partial success behavior is enabled, aggregatedList for -// a -// single zone scope either returns all resources in the zone or no -// resources, -// with an error code. -func (c *ZonesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZonesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.zones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.zones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ZoneList.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 *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, 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 := &ZoneList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.zones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json deleted file mode 100644 index c2fad032b3cf2..0000000000000 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ /dev/null @@ -1,9562 +0,0 @@ -{ - "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://container.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Container", - "description": "Builds and manages container-based applications, powered by the open source Kubernetes technology.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/kubernetes-engine/docs/", - "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": "container:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://container.mtls.googleapis.com/", - "name": "container", - "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": { - "aggregated": { - "resources": { - "usableSubnetworks": { - "methods": { - "list": { - "description": "Lists subnetworks that are usable for creating clusters in a project.", - "flatPath": "v1/projects/{projectsId}/aggregated/usableSubnetworks", - "httpMethod": "GET", - "id": "container.projects.aggregated.usableSubnetworks.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Filtering currently only supports equality on the networkProjectId and must be in the form: \"networkProjectId=[PROJECTID]\", where `networkProjectId` is the project which owns the listed subnetworks. This defaults to the parent project ID.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The max number of results per page that should be returned. If the number of available results is larger than `page_size`, a `next_page_token` is returned which can be used to get the next page of results in subsequent requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent project where subnetworks are usable. Specified in the format `projects/*`.", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/aggregated/usableSubnetworks", - "response": { - "$ref": "ListUsableSubnetworksResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "locations": { - "methods": { - "getServerConfig": { - "description": "Returns configuration info about the Google Kubernetes Engine service.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverConfig", - "httpMethod": "GET", - "id": "container.projects.locations.getServerConfig", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project and location) of the server config to get, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}/serverConfig", - "response": { - "$ref": "ServerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { - "methods": { - "checkAutopilotCompatibility": { - "description": "Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:checkAutopilotCompatibility", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.checkAutopilotCompatibility", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:checkAutopilotCompatibility", - "response": { - "$ref": "CheckAutopilotCompatibilityResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "completeIpRotation": { - "description": "Completes master IP rotation.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.completeIpRotation", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to complete IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:completeIpRotation", - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the cluster will be created. Specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/clusters", - "request": { - "$ref": "CreateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", - "httpMethod": "DELETE", - "id": "container.projects.locations.clusters.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to delete. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchClusterUpgradeInfo": { - "description": "Fetch upgrade information of a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:fetchClusterUpgradeInfo", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.fetchClusterUpgradeInfo", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name (project, location, cluster) of the cluster to get. Specified in the format `projects/*/locations/*/clusters/*` or `projects/*/zones/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "API request version that initiates this operation.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:fetchClusterUpgradeInfo", - "response": { - "$ref": "ClusterUpgradeInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the details of a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getJwks": { - "description": "Gets the public component of the cluster signing keys in JSON Web Key format.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/jwks", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.getJwks", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The cluster (project, location, cluster name) to get keys for. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/jwks", - "response": { - "$ref": "GetJSONWebKeysResponse" - } - }, - "list": { - "description": "Lists all clusters owned by a project in either the specified zone or all zones.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the clusters will be listed. Specified in the format `projects/*/locations/*`. Location \"-\" matches all zones and all regions.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides, or \"-\" for all zones. This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/clusters", - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setAddons": { - "description": "Sets the addons for a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setAddons", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setAddons", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set addons. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setAddons", - "request": { - "$ref": "SetAddonsConfigRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setLegacyAbac": { - "description": "Enables or disables the ABAC authorization mechanism on a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setLegacyAbac", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to set legacy abac. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setLegacyAbac", - "request": { - "$ref": "SetLegacyAbacRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setLocations": { - "deprecated": true, - "description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLocations", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setLocations", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set locations. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setLocations", - "request": { - "$ref": "SetLocationsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setLogging": { - "description": "Sets the logging service for a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLogging", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setLogging", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set logging. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setLogging", - "request": { - "$ref": "SetLoggingServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setMaintenancePolicy": { - "description": "Sets the maintenance policy for a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setMaintenancePolicy", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setMaintenancePolicy", - "request": { - "$ref": "SetMaintenancePolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setMasterAuth": { - "description": "Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setMasterAuth", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set auth. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setMasterAuth", - "request": { - "$ref": "SetMasterAuthRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setMonitoring": { - "description": "Sets the monitoring service for a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMonitoring", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setMonitoring", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set monitoring. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setMonitoring", - "request": { - "$ref": "SetMonitoringServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setNetworkPolicy": { - "description": "Enables or disables Network Policy for a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setNetworkPolicy", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setNetworkPolicy", - "request": { - "$ref": "SetNetworkPolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setResourceLabels": { - "description": "Sets labels on a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.setResourceLabels", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to set labels. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setResourceLabels", - "request": { - "$ref": "SetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "startIpRotation": { - "description": "Starts master IP rotation.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.startIpRotation", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster name) of the cluster to start IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:startIpRotation", - "request": { - "$ref": "StartIPRotationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates the settings of a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", - "httpMethod": "PUT", - "id": "container.projects.locations.clusters.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "UpdateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "updateMaster": { - "description": "Updates the master for a specific cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:updateMaster", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.updateMaster", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:updateMaster", - "request": { - "$ref": "UpdateMasterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "nodePools": { - "methods": { - "completeUpgrade": { - "description": "CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:completeUpgrade", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.completeUpgrade", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to complete upgrade. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:completeUpgrade", - "request": { - "$ref": "CompleteNodePoolUpgradeRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a node pool for a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent (project, location, cluster name) where the node pool will be created. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/nodePools", - "request": { - "$ref": "CreateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a node pool from a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", - "httpMethod": "DELETE", - "id": "container.projects.locations.clusters.nodePools.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchNodePoolUpgradeInfo": { - "description": "Fetch upgrade information of a specific nodepool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:fetchNodePoolUpgradeInfo", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.nodePools.fetchNodePoolUpgradeInfo", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name (project, location, cluster, nodepool) of the nodepool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*` or `projects/*/zones/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "API request version that initiates this operation.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:fetchNodePoolUpgradeInfo", - "response": { - "$ref": "NodePoolUpgradeInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Retrieves the requested node pool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.nodePools.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "NodePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists the node pools for a cluster.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.nodePools.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "The parent (project, location, cluster name) where the node pools will be listed. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/nodePools", - "response": { - "$ref": "ListNodePoolsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "rollback": { - "description": "Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.rollback", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:rollback", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setAutoscaling": { - "description": "Sets the autoscaling settings for the specified node pool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setAutoscaling", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.setAutoscaling", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setAutoscaling", - "request": { - "$ref": "SetNodePoolAutoscalingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setManagement": { - "description": "Sets the NodeManagement options for a node pool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.setManagement", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to set management properties. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setManagement", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setSize": { - "description": "Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setSize", - "httpMethod": "POST", - "id": "container.projects.locations.clusters.nodePools.setSize", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to set size. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:setSize", - "request": { - "$ref": "SetNodePoolSizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates the version and/or image type for the specified node pool.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", - "httpMethod": "PUT", - "id": "container.projects.locations.clusters.nodePools.update", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "UpdateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "well-known": { - "methods": { - "getOpenid-configuration": { - "description": "Gets the OIDC discovery document for the cluster. See the [OpenID Connect Discovery 1.0 specification](https://openid.net/specs/openid-connect-discovery-1_0.html) for details.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/.well-known/openid-configuration", - "httpMethod": "GET", - "id": "container.projects.locations.clusters.well-known.getOpenid-configuration", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The cluster (project, location, cluster name) to get the discovery document for. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/.well-known/openid-configuration", - "response": { - "$ref": "GetOpenIDConfigResponse" - } - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Cancels the specified operation.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "container.projects.locations.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, operation id) of the operation to cancel. Specified in the format `projects/*/locations/*/operations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the specified operation.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "container.projects.locations.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name (project, location, operation id) of the operation to get. Specified in the format `projects/*/locations/*/operations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - }, - "operationId": { - "deprecated": true, - "description": "Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all operations in a project in a specific zone or all zones.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "container.projects.locations.operations.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the operations will be listed. Specified in the format `projects/*/locations/*`. Location \"-\" matches all zones and all regions.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "zones": { - "methods": { - "getServerconfig": { - "description": "Returns configuration info about the Google Kubernetes Engine service.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "httpMethod": "GET", - "id": "container.projects.zones.getServerconfig", - "parameterOrder": [ - "projectId", - "zone" - ], - "parameters": { - "name": { - "description": "The name (project and location) of the server config to get, specified in the format `projects/*/locations/*`.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "response": { - "$ref": "ServerConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { - "methods": { - "addons": { - "description": "Sets the addons for a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.addons", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", - "request": { - "$ref": "SetAddonsConfigRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "completeIpRotation": { - "description": "Completes master IP rotation.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.completeIpRotation", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.create", - "parameterOrder": [ - "projectId", - "zone" - ], - "parameters": { - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "request": { - "$ref": "CreateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "DELETE", - "id": "container.projects.zones.clusters.delete", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to delete. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchClusterUpgradeInfo": { - "description": "Fetch upgrade information of a specific cluster.", - "flatPath": "v1/projects/{projectsId}/zones/{zonesId}/clusters/{clustersId}:fetchClusterUpgradeInfo", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.fetchClusterUpgradeInfo", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name (project, location, cluster) of the cluster to get. Specified in the format `projects/*/locations/*/clusters/*` or `projects/*/zones/*/clusters/*`.", - "location": "path", - "pattern": "^projects/[^/]+/zones/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "API request version that initiates this operation.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:fetchClusterUpgradeInfo", - "response": { - "$ref": "ClusterUpgradeInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the details of a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.get", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to retrieve. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "legacyAbac": { - "description": "Enables or disables the ABAC authorization mechanism on a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.legacyAbac", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "request": { - "$ref": "SetLegacyAbacRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all clusters owned by a project in either the specified zone or all zones.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.list", - "parameterOrder": [ - "projectId", - "zone" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the clusters will be listed. Specified in the format `projects/*/locations/*`. Location \"-\" matches all zones and all regions.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides, or \"-\" for all zones. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "response": { - "$ref": "ListClustersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "locations": { - "deprecated": true, - "description": "Sets the locations for a specific cluster. Deprecated. Use [projects.locations.clusters.update](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) instead.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.locations", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", - "request": { - "$ref": "SetLocationsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "logging": { - "description": "Sets the logging service for a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.logging", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - "request": { - "$ref": "SetLoggingServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "master": { - "description": "Updates the master for a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.master", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "request": { - "$ref": "UpdateMasterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "monitoring": { - "description": "Sets the monitoring service for a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.monitoring", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "request": { - "$ref": "SetMonitoringServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "resourceLabels": { - "description": "Sets labels on a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.resourceLabels", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "request": { - "$ref": "SetLabelsRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setMaintenancePolicy": { - "description": "Sets the maintenance policy for a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.setMaintenancePolicy", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Required. The name of the cluster to update.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Required. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Required. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", - "request": { - "$ref": "SetMaintenancePolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setMasterAuth": { - "description": "Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.setMasterAuth", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "request": { - "$ref": "SetMasterAuthRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setNetworkPolicy": { - "description": "Enables or disables Network Policy for a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.setNetworkPolicy", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "request": { - "$ref": "SetNetworkPolicyRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "startIpRotation": { - "description": "Starts master IP rotation.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.startIpRotation", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "request": { - "$ref": "StartIPRotationRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates the settings of a specific cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "httpMethod": "PUT", - "id": "container.projects.zones.clusters.update", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "request": { - "$ref": "UpdateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "nodePools": { - "methods": { - "autoscaling": { - "description": "Sets the autoscaling settings for the specified node pool.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.autoscaling", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "request": { - "$ref": "SetNodePoolAutoscalingRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "description": "Creates a node pool for a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.create", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "request": { - "$ref": "CreateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a node pool from a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "httpMethod": "DELETE", - "id": "container.projects.zones.clusters.nodePools.delete", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "query", - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "fetchNodePoolUpgradeInfo": { - "description": "Fetch upgrade information of a specific nodepool.", - "flatPath": "v1/projects/{projectsId}/zones/{zonesId}/clusters/{clustersId}/nodePools/{nodePoolsId}:fetchNodePoolUpgradeInfo", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.nodePools.fetchNodePoolUpgradeInfo", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name (project, location, cluster, nodepool) of the nodepool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*` or `projects/*/zones/*/clusters/*/nodePools/*`.", - "location": "path", - "pattern": "^projects/[^/]+/zones/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "required": true, - "type": "string" - }, - "version": { - "description": "API request version that initiates this operation.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}:fetchNodePoolUpgradeInfo", - "response": { - "$ref": "NodePoolUpgradeInfo" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Retrieves the requested node pool.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.nodePools.get", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "location": "query", - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "response": { - "$ref": "NodePool" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists the node pools for a cluster.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "httpMethod": "GET", - "id": "container.projects.zones.clusters.nodePools.list", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "parent": { - "description": "The parent (project, location, cluster name) where the node pools will be listed. Specified in the format `projects/*/locations/*/clusters/*`.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "response": { - "$ref": "ListNodePoolsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "rollback": { - "description": "Rolls back a previously Aborted or Failed NodePool upgrade. This makes no changes if the last upgrade successfully completed.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.rollback", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setManagement": { - "description": "Sets the NodeManagement options for a node pool.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.setManagement", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setSize": { - "description": "Sets the size for a specific node pool. The new size will be used for all replicas, including future replicas created by modifying NodePool.locations.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.setSize", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "request": { - "$ref": "SetNodePoolSizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "update": { - "description": "Updates the version and/or image type for the specified node pool.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "httpMethod": "POST", - "id": "container.projects.zones.clusters.nodePools.update", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "parameters": { - "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "request": { - "$ref": "UpdateNodePoolRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Cancels the specified operation.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "httpMethod": "POST", - "id": "container.projects.zones.operations.cancel", - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "parameters": { - "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the specified operation.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "httpMethod": "GET", - "id": "container.projects.zones.operations.get", - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "parameters": { - "name": { - "description": "The name (project, location, operation id) of the operation to get. Specified in the format `projects/*/locations/*/operations/*`.", - "location": "query", - "type": "string" - }, - "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists all operations in a project in a specific zone or all zones.", - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", - "httpMethod": "GET", - "id": "container.projects.zones.operations.list", - "parameterOrder": [ - "projectId", - "zone" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the operations will be listed. Specified in the format `projects/*/locations/*`. Location \"-\" matches all zones and all regions.", - "location": "query", - "type": "string" - }, - "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - }, - "zone": { - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/projects/{projectId}/zones/{zone}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - }, - "revision": "20251104", - "rootUrl": "https://container.googleapis.com/", - "schemas": { - "AcceleratorConfig": { - "description": "AcceleratorConfig represents a Hardware Accelerator request.", - "id": "AcceleratorConfig", - "properties": { - "acceleratorCount": { - "description": "The number of the accelerator cards exposed to an instance.", - "format": "int64", - "type": "string" - }, - "acceleratorType": { - "description": "The accelerator type resource name. List of supported accelerators [here](https://cloud.google.com/compute/docs/gpus)", - "type": "string" - }, - "gpuDriverInstallationConfig": { - "$ref": "GPUDriverInstallationConfig", - "description": "The configuration for auto installation of GPU driver." - }, - "gpuPartitionSize": { - "description": "Size of partitions to create on the GPU. Valid values are described in the NVIDIA [mig user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).", - "type": "string" - }, - "gpuSharingConfig": { - "$ref": "GPUSharingConfig", - "description": "The configuration for GPU sharing options." - } - }, - "type": "object" - }, - "AdditionalIPRangesConfig": { - "description": "AdditionalIPRangesConfig is the configuration for individual additional subnetwork attached to the cluster", - "id": "AdditionalIPRangesConfig", - "properties": { - "podIpv4RangeNames": { - "description": "List of secondary ranges names within this subnetwork that can be used for pod IPs. Example1: gke-pod-range1 Example2: gke-pod-range1,gke-pod-range2", - "items": { - "type": "string" - }, - "type": "array" - }, - "subnetwork": { - "description": "Name of the subnetwork. This can be the full path of the subnetwork or just the name. Example1: my-subnet Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet", - "type": "string" - } - }, - "type": "object" - }, - "AdditionalNodeNetworkConfig": { - "description": "AdditionalNodeNetworkConfig is the configuration for additional node networks within the NodeNetworkConfig message", - "id": "AdditionalNodeNetworkConfig", - "properties": { - "network": { - "description": "Name of the VPC where the additional interface belongs", - "type": "string" - }, - "subnetwork": { - "description": "Name of the subnetwork where the additional interface belongs", - "type": "string" - } - }, - "type": "object" - }, - "AdditionalPodNetworkConfig": { - "description": "AdditionalPodNetworkConfig is the configuration for additional pod networks within the NodeNetworkConfig message", - "id": "AdditionalPodNetworkConfig", - "properties": { - "maxPodsPerNode": { - "$ref": "MaxPodsConstraint", - "description": "The maximum number of pods per node which use this pod network." - }, - "networkAttachment": { - "description": "The name of the network attachment for pods to communicate to; cannot be specified along with subnetwork or secondary_pod_range.", - "type": "string" - }, - "secondaryPodRange": { - "description": "The name of the secondary range on the subnet which provides IP address for this pod range.", - "type": "string" - }, - "subnetwork": { - "description": "Name of the subnetwork where the additional pod network belongs.", - "type": "string" - } - }, - "type": "object" - }, - "AdditionalPodRangesConfig": { - "description": "AdditionalPodRangesConfig is the configuration for additional pod secondary ranges supporting the ClusterUpdate message.", - "id": "AdditionalPodRangesConfig", - "properties": { - "podRangeInfo": { - "description": "Output only. Information for additional pod range.", - "items": { - "$ref": "RangeInfo" - }, - "readOnly": true, - "type": "array" - }, - "podRangeNames": { - "description": "Name for pod secondary ipv4 range which has the actual range defined ahead.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AddonsConfig": { - "description": "Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality.", - "id": "AddonsConfig", - "properties": { - "cloudRunConfig": { - "$ref": "CloudRunConfig", - "description": "Configuration for the Cloud Run addon, which allows the user to use a managed Knative service." - }, - "configConnectorConfig": { - "$ref": "ConfigConnectorConfig", - "description": "Configuration for the ConfigConnector add-on, a Kubernetes extension to manage hosted Google Cloud services through the Kubernetes API." - }, - "dnsCacheConfig": { - "$ref": "DnsCacheConfig", - "description": "Configuration for NodeLocalDNS, a dns cache running on cluster nodes" - }, - "gcePersistentDiskCsiDriverConfig": { - "$ref": "GcePersistentDiskCsiDriverConfig", - "description": "Configuration for the Compute Engine Persistent Disk CSI driver." - }, - "gcpFilestoreCsiDriverConfig": { - "$ref": "GcpFilestoreCsiDriverConfig", - "description": "Configuration for the Filestore CSI driver." - }, - "gcsFuseCsiDriverConfig": { - "$ref": "GcsFuseCsiDriverConfig", - "description": "Configuration for the Cloud Storage Fuse CSI driver." - }, - "gkeBackupAgentConfig": { - "$ref": "GkeBackupAgentConfig", - "description": "Configuration for the Backup for GKE agent addon." - }, - "highScaleCheckpointingConfig": { - "$ref": "HighScaleCheckpointingConfig", - "description": "Configuration for the High Scale Checkpointing add-on." - }, - "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods." - }, - "httpLoadBalancing": { - "$ref": "HttpLoadBalancing", - "description": "Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster." - }, - "kubernetesDashboard": { - "$ref": "KubernetesDashboard", - "deprecated": true, - "description": "Configuration for the Kubernetes Dashboard. This addon is deprecated, and will be disabled in 1.15. It is recommended to use the Cloud Console to manage and monitor your Kubernetes clusters, workloads and applications. For more information, see: https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards" - }, - "lustreCsiDriverConfig": { - "$ref": "LustreCsiDriverConfig", - "description": "Configuration for the Lustre CSI driver." - }, - "networkPolicyConfig": { - "$ref": "NetworkPolicyConfig", - "description": "Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes." - }, - "parallelstoreCsiDriverConfig": { - "$ref": "ParallelstoreCsiDriverConfig", - "description": "Configuration for the Cloud Storage Parallelstore CSI driver." - }, - "rayOperatorConfig": { - "$ref": "RayOperatorConfig", - "description": "Optional. Configuration for Ray Operator addon." - }, - "statefulHaConfig": { - "$ref": "StatefulHAConfig", - "description": "Optional. Configuration for the StatefulHA add-on." - } - }, - "type": "object" - }, - "AdvancedDatapathObservabilityConfig": { - "description": "AdvancedDatapathObservabilityConfig specifies configuration of observability features of advanced datapath.", - "id": "AdvancedDatapathObservabilityConfig", - "properties": { - "enableMetrics": { - "description": "Expose flow metrics on nodes", - "type": "boolean" - }, - "enableRelay": { - "description": "Enable Relay component", - "type": "boolean" - }, - "relayMode": { - "description": "Method used to make Relay available", - "enum": [ - "RELAY_MODE_UNSPECIFIED", - "DISABLED", - "INTERNAL_VPC_LB", - "EXTERNAL_LB" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "disabled", - "exposed via internal load balancer", - "exposed via external load balancer" - ], - "type": "string" - } - }, - "type": "object" - }, - "AdvancedMachineFeatures": { - "description": "Specifies options for controlling advanced machine features.", - "id": "AdvancedMachineFeatures", - "properties": { - "enableNestedVirtualization": { - "description": "Whether or not to enable nested virtualization (defaults to false).", - "type": "boolean" - }, - "performanceMonitoringUnit": { - "description": "Type of Performance Monitoring Unit (PMU) requested on node pool instances. If unset, PMU will not be available to the node.", - "enum": [ - "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED", - "ARCHITECTURAL", - "STANDARD", - "ENHANCED" - ], - "enumDescriptions": [ - "PMU not enabled.", - "Architecturally defined non-LLC events.", - "Most documented core/L2 events.", - "Most documented core/L2 and LLC events." - ], - "type": "string" - }, - "threadsPerCore": { - "description": "The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "AnonymousAuthenticationConfig": { - "description": "AnonymousAuthenticationConfig defines the settings needed to limit endpoints that allow anonymous authentication.", - "id": "AnonymousAuthenticationConfig", - "properties": { - "mode": { - "description": "Defines the mode of limiting anonymous access in the cluster.", - "enum": [ - "MODE_UNSPECIFIED", - "ENABLED", - "LIMITED" - ], - "enumDescriptions": [ - "Default value not specified.", - "Anonymous authentication is allowed for all endpoints.", - "Anonymous authentication is allowed for only health check endpoints." - ], - "type": "string" - } - }, - "type": "object" - }, - "AuthenticatorGroupsConfig": { - "description": "Configuration for returning group information from authenticators.", - "id": "AuthenticatorGroupsConfig", - "properties": { - "enabled": { - "description": "Whether this cluster should return group membership lookups during authentication using a group of security groups.", - "type": "boolean" - }, - "securityGroup": { - "description": "The name of the security group-of-groups to be used. Only relevant if enabled = true.", - "type": "string" - } - }, - "type": "object" - }, - "AutoIpamConfig": { - "description": "AutoIpamConfig contains all information related to Auto IPAM", - "id": "AutoIpamConfig", - "properties": { - "enabled": { - "description": "The flag that enables Auto IPAM on this cluster", - "type": "boolean" - } - }, - "type": "object" - }, - "AutoMonitoringConfig": { - "description": "AutoMonitoringConfig defines the configuration for GKE Workload Auto-Monitoring.", - "id": "AutoMonitoringConfig", - "properties": { - "scope": { - "description": "Scope for GKE Workload Auto-Monitoring.", - "enum": [ - "SCOPE_UNSPECIFIED", - "ALL", - "NONE" - ], - "enumDescriptions": [ - "Not set.", - "Auto-Monitoring is enabled for all supported applications.", - "Disable Auto-Monitoring." - ], - "type": "string" - } - }, - "type": "object" - }, - "AutoUpgradeOptions": { - "description": "AutoUpgradeOptions defines the set of options for the user to control how the Auto Upgrades will proceed.", - "id": "AutoUpgradeOptions", - "properties": { - "autoUpgradeStartTime": { - "description": "Output only. This field is set when upgrades are about to commence with the approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Output only. This field is set when upgrades are about to commence with the description of the upgrade.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Autopilot": { - "description": "Autopilot is the configuration for Autopilot settings on the cluster.", - "id": "Autopilot", - "properties": { - "enabled": { - "description": "Enable Autopilot", - "type": "boolean" - }, - "privilegedAdmissionConfig": { - "$ref": "PrivilegedAdmissionConfig", - "description": "PrivilegedAdmissionConfig is the configuration related to privileged admission control." - }, - "workloadPolicyConfig": { - "$ref": "WorkloadPolicyConfig", - "description": "WorkloadPolicyConfig is the configuration related to GCW workload policy" - } - }, - "type": "object" - }, - "AutopilotCompatibilityIssue": { - "description": "AutopilotCompatibilityIssue contains information about a specific compatibility issue with Autopilot mode.", - "id": "AutopilotCompatibilityIssue", - "properties": { - "constraintType": { - "description": "The constraint type of the issue.", - "type": "string" - }, - "description": { - "description": "The description of the issue.", - "type": "string" - }, - "documentationUrl": { - "description": "A URL to a public documentation, which addresses resolving this issue.", - "type": "string" - }, - "incompatibilityType": { - "description": "The incompatibility type of this issue.", - "enum": [ - "UNSPECIFIED", - "INCOMPATIBILITY", - "ADDITIONAL_CONFIG_REQUIRED", - "PASSED_WITH_OPTIONAL_CONFIG" - ], - "enumDescriptions": [ - "Default value, should not be used.", - "Indicates that the issue is a known incompatibility between the cluster and Autopilot mode.", - "Indicates the issue is an incompatibility if customers take no further action to resolve.", - "Indicates the issue is not an incompatibility, but depending on the workloads business logic, there is a potential that they won't work on Autopilot." - ], - "type": "string" - }, - "lastObservation": { - "description": "The last time when this issue was observed.", - "format": "google-datetime", - "type": "string" - }, - "subjects": { - "description": "The name of the resources which are subject to this issue.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AutopilotConfig": { - "description": "AutopilotConfig contains configuration of autopilot feature for this nodepool.", - "id": "AutopilotConfig", - "properties": { - "enabled": { - "description": "Denotes that nodes belonging to this node pool are Autopilot nodes.", - "type": "boolean" - } - }, - "type": "object" - }, - "AutoprovisioningNodePoolDefaults": { - "description": "AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.", - "id": "AutoprovisioningNodePoolDefaults", - "properties": { - "bootDiskKmsKey": { - "description": "The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption", - "type": "string" - }, - "diskSizeGb": { - "description": "Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.", - "format": "int32", - "type": "integer" - }, - "diskType": { - "description": "Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 'pd-standard'", - "type": "string" - }, - "imageType": { - "description": "The image type to use for NAP created node. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.", - "type": "string" - }, - "insecureKubeletReadonlyPortEnabled": { - "description": "DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead.", - "type": "boolean" - }, - "management": { - "$ref": "NodeManagement", - "description": "Specifies the node management options for NAP created node-pools." - }, - "minCpuPlatform": { - "deprecated": true, - "description": "Deprecated. Minimum CPU platform to be used for NAP created node pools. The instance may be scheduled on the specified or newer CPU platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: Intel Haswell or minCpuPlatform: Intel Sandy Bridge. For more information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). This field is deprecated, min_cpu_platform should be specified using `cloud.google.com/requested-min-cpu-platform` label selector on the pod. To unset the min cpu platform field pass \"automatic\" as field value.", - "type": "string" - }, - "oauthScopes": { - "description": "Scopes that are used by NAP when creating node pools.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "The Google Cloud Platform Service Account to be used by the node VMs.", - "type": "string" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig", - "description": "Shielded Instance options." - }, - "upgradeSettings": { - "$ref": "UpgradeSettings", - "description": "Specifies the upgrade settings for NAP created node pools" - } - }, - "type": "object" - }, - "AutoscaledRolloutPolicy": { - "description": "Autoscaled rollout policy utilizes the cluster autoscaler during blue-green upgrade to scale both the blue and green pools.", - "id": "AutoscaledRolloutPolicy", - "properties": { - "waitForDrainDuration": { - "description": "Optional. Time to wait after cordoning the blue pool before draining the nodes. Defaults to 3 days. The value can be set between 0 and 7 days, inclusive.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "BestEffortProvisioning": { - "description": "Best effort provisioning.", - "id": "BestEffortProvisioning", - "properties": { - "enabled": { - "description": "When this is enabled, cluster/node pool creations will ignore non-fatal errors like stockout to best provision as many nodes as possible right now and eventually bring up all target number of nodes", - "type": "boolean" - }, - "minProvisionNodes": { - "description": "Minimum number of nodes to be provisioned to be considered as succeeded, and the rest of nodes will be provisioned gradually and eventually when stockout issue has been resolved.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "BigQueryDestination": { - "description": "Parameters for using BigQuery as the destination of resource usage export.", - "id": "BigQueryDestination", - "properties": { - "datasetId": { - "description": "The ID of a BigQuery Dataset.", - "type": "string" - } - }, - "type": "object" - }, - "BinaryAuthorization": { - "description": "Configuration for Binary Authorization.", - "id": "BinaryAuthorization", - "properties": { - "enabled": { - "deprecated": true, - "description": "This field is deprecated. Leave this unset and instead configure BinaryAuthorization using evaluation_mode. If evaluation_mode is set to anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored.", - "type": "boolean" - }, - "evaluationMode": { - "description": "Mode of operation for binauthz policy evaluation. If unspecified, defaults to DISABLED.", - "enum": [ - "EVALUATION_MODE_UNSPECIFIED", - "DISABLED", - "PROJECT_SINGLETON_POLICY_ENFORCE" - ], - "enumDescriptions": [ - "Default value", - "Disable BinaryAuthorization", - "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy. This is equivalent to setting the enabled boolean to true." - ], - "type": "string" - } - }, - "type": "object" - }, - "BlueGreenInfo": { - "description": "Information relevant to blue-green upgrade.", - "id": "BlueGreenInfo", - "properties": { - "blueInstanceGroupUrls": { - "description": "The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with blue pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "bluePoolDeletionStartTime": { - "description": "Time to start deleting blue pool to complete blue-green upgrade, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "greenInstanceGroupUrls": { - "description": "The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with green pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "greenPoolVersion": { - "description": "Version of green pool.", - "type": "string" - }, - "phase": { - "description": "Current blue-green upgrade phase.", - "enum": [ - "PHASE_UNSPECIFIED", - "UPDATE_STARTED", - "CREATING_GREEN_POOL", - "CORDONING_BLUE_POOL", - "DRAINING_BLUE_POOL", - "NODE_POOL_SOAKING", - "DELETING_BLUE_POOL", - "ROLLBACK_STARTED" - ], - "enumDescriptions": [ - "Unspecified phase.", - "blue-green upgrade has been initiated.", - "Start creating green pool nodes.", - "Start cordoning blue pool nodes.", - "Start draining blue pool nodes.", - "Start soaking time after draining entire blue pool.", - "Start deleting blue nodes.", - "Rollback has been initiated." - ], - "type": "string" - } - }, - "type": "object" - }, - "BlueGreenSettings": { - "description": "Settings for blue-green upgrade.", - "id": "BlueGreenSettings", - "properties": { - "autoscaledRolloutPolicy": { - "$ref": "AutoscaledRolloutPolicy", - "description": "Autoscaled policy for cluster autoscaler enabled blue-green upgrade." - }, - "nodePoolSoakDuration": { - "description": "Time needed after draining entire blue pool. After this period, blue pool will be cleaned up.", - "format": "google-duration", - "type": "string" - }, - "standardRolloutPolicy": { - "$ref": "StandardRolloutPolicy", - "description": "Standard policy for the blue-green upgrade." - } - }, - "type": "object" - }, - "BootDisk": { - "description": "BootDisk specifies the boot disk configuration for nodepools.", - "id": "BootDisk", - "properties": { - "diskType": { - "description": "Disk type of the boot disk. (i.e. Hyperdisk-Balanced, PD-Balanced, etc.)", - "type": "string" - }, - "provisionedIops": { - "description": "For Hyperdisk-Balanced only, the provisioned IOPS config value.", - "format": "int64", - "type": "string" - }, - "provisionedThroughput": { - "description": "For Hyperdisk-Balanced only, the provisioned throughput config value.", - "format": "int64", - "type": "string" - }, - "sizeGb": { - "description": "Disk size in GB. Replaces NodeConfig.disk_size_gb", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "CancelOperationRequest": { - "description": "CancelOperationRequest cancels a single operation.", - "id": "CancelOperationRequest", - "properties": { - "name": { - "description": "The name (project, location, operation id) of the operation to cancel. Specified in the format `projects/*/locations/*/operations/*`.", - "type": "string" - }, - "operationId": { - "deprecated": true, - "description": "Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "CertificateAuthorityDomainConfig": { - "description": "CertificateAuthorityDomainConfig configures one or more fully qualified domain names (FQDN) to a specific certificate.", - "id": "CertificateAuthorityDomainConfig", - "properties": { - "fqdns": { - "description": "List of fully qualified domain names (FQDN). Specifying port is supported. Wildcards are NOT supported. Examples: - my.customdomain.com - 10.0.1.2:5000", - "items": { - "type": "string" - }, - "type": "array" - }, - "gcpSecretManagerCertificateConfig": { - "$ref": "GCPSecretManagerCertificateConfig", - "description": "Google Secret Manager (GCP) certificate configuration." - } - }, - "type": "object" - }, - "CertificateConfig": { - "description": "CertificateConfig configures certificate for the registry.", - "id": "CertificateConfig", - "properties": { - "gcpSecretManagerSecretUri": { - "description": "The URI configures a secret from [Secret Manager](https://cloud.google.com/secret-manager) in the format \"projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION\" for global secret or \"projects/$PROJECT_ID/locations/$REGION/secrets/$SECRET_NAME/versions/$VERSION\" for regional secret. Version can be fixed (e.g. \"2\") or \"latest\"", - "type": "string" - } - }, - "type": "object" - }, - "CertificateConfigPair": { - "description": "CertificateConfigPair configures pairs of certificates, which is used for client certificate and key pairs under a registry.", - "id": "CertificateConfigPair", - "properties": { - "cert": { - "$ref": "CertificateConfig", - "description": "Cert configures the client certificate." - }, - "key": { - "$ref": "CertificateConfig", - "description": "Key configures the client private key. Optional." - } - }, - "type": "object" - }, - "CheckAutopilotCompatibilityResponse": { - "description": "CheckAutopilotCompatibilityResponse has a list of compatibility issues.", - "id": "CheckAutopilotCompatibilityResponse", - "properties": { - "issues": { - "description": "The list of issues for the given operation.", - "items": { - "$ref": "AutopilotCompatibilityIssue" - }, - "type": "array" - }, - "summary": { - "description": "The summary of the autopilot compatibility response.", - "type": "string" - } - }, - "type": "object" - }, - "CidrBlock": { - "description": "CidrBlock contains an optional name and one CIDR block.", - "id": "CidrBlock", - "properties": { - "cidrBlock": { - "description": "cidr_block must be specified in CIDR notation.", - "type": "string" - }, - "displayName": { - "description": "display_name is an optional field for users to identify CIDR blocks.", - "type": "string" - } - }, - "type": "object" - }, - "ClientCertificateConfig": { - "description": "Configuration for client certificates on the cluster.", - "id": "ClientCertificateConfig", - "properties": { - "issueClientCertificate": { - "description": "Issue a client certificate.", - "type": "boolean" - } - }, - "type": "object" - }, - "CloudRunConfig": { - "description": "Configuration options for the Cloud Run feature.", - "id": "CloudRunConfig", - "properties": { - "disabled": { - "description": "Whether Cloud Run addon is enabled for this cluster.", - "type": "boolean" - }, - "loadBalancerType": { - "description": "Which load balancer type is installed for Cloud Run.", - "enum": [ - "LOAD_BALANCER_TYPE_UNSPECIFIED", - "LOAD_BALANCER_TYPE_EXTERNAL", - "LOAD_BALANCER_TYPE_INTERNAL" - ], - "enumDescriptions": [ - "Load balancer type for Cloud Run is unspecified.", - "Install external load balancer for Cloud Run.", - "Install internal load balancer for Cloud Run." - ], - "type": "string" - } - }, - "type": "object" - }, - "Cluster": { - "description": "A Google Kubernetes Engine cluster.", - "id": "Cluster", - "properties": { - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "Configurations for the various addons available to run in the cluster." - }, - "alphaClusterFeatureGates": { - "description": "The list of user specified Kubernetes feature gates. Each string represents the activation status of a feature gate (e.g. \"featureX=true\" or \"featureX=false\")", - "items": { - "type": "string" - }, - "type": "array" - }, - "anonymousAuthenticationConfig": { - "$ref": "AnonymousAuthenticationConfig", - "description": "Configuration for limiting anonymous access to all endpoints except the health checks." - }, - "authenticatorGroupsConfig": { - "$ref": "AuthenticatorGroupsConfig", - "description": "Configuration controlling RBAC group membership information." - }, - "autopilot": { - "$ref": "Autopilot", - "description": "Autopilot configuration for the cluster." - }, - "autoscaling": { - "$ref": "ClusterAutoscaling", - "description": "Cluster-level autoscaling configuration." - }, - "binaryAuthorization": { - "$ref": "BinaryAuthorization", - "description": "Configuration for Binary Authorization." - }, - "clusterIpv4Cidr": { - "description": "The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`.", - "type": "string" - }, - "compliancePostureConfig": { - "$ref": "CompliancePostureConfig", - "description": "Enable/Disable Compliance Posture features for the cluster." - }, - "conditions": { - "description": "Which conditions caused the current cluster state.", - "items": { - "$ref": "StatusCondition" - }, - "type": "array" - }, - "confidentialNodes": { - "$ref": "ConfidentialNodes", - "description": "Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled." - }, - "controlPlaneEndpointsConfig": { - "$ref": "ControlPlaneEndpointsConfig", - "description": "Configuration for all cluster's control plane endpoints." - }, - "costManagementConfig": { - "$ref": "CostManagementConfig", - "description": "Configuration for the fine-grained cost management feature." - }, - "createTime": { - "description": "Output only. The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "readOnly": true, - "type": "string" - }, - "currentMasterVersion": { - "description": "Output only. The current software version of the master endpoint.", - "readOnly": true, - "type": "string" - }, - "currentNodeCount": { - "deprecated": true, - "description": "Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information.", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "currentNodeVersion": { - "deprecated": true, - "description": "Output only. Deprecated, use [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes.", - "readOnly": true, - "type": "string" - }, - "databaseEncryption": { - "$ref": "DatabaseEncryption", - "description": "Configuration of etcd encryption." - }, - "defaultMaxPodsConstraint": { - "$ref": "MaxPodsConstraint", - "description": "The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support." - }, - "description": { - "description": "An optional description of this cluster.", - "type": "string" - }, - "enableK8sBetaApis": { - "$ref": "K8sBetaAPIConfig", - "description": "Beta APIs Config" - }, - "enableKubernetesAlpha": { - "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation.", - "type": "boolean" - }, - "enableTpu": { - "deprecated": true, - "description": "Enable the ability to use Cloud TPUs in this cluster. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25.", - "type": "boolean" - }, - "endpoint": { - "description": "Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.", - "readOnly": true, - "type": "string" - }, - "enterpriseConfig": { - "$ref": "EnterpriseConfig", - "deprecated": true, - "description": "GKE Enterprise Configuration. Deprecated: GKE Enterprise features are now available without an Enterprise tier." - }, - "etag": { - "description": "This checksum is computed by the server based on the value of cluster fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding.", - "type": "string" - }, - "expireTime": { - "description": "Output only. The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "readOnly": true, - "type": "string" - }, - "fleet": { - "$ref": "Fleet", - "description": "Fleet information for the cluster." - }, - "gkeAutoUpgradeConfig": { - "$ref": "GkeAutoUpgradeConfig", - "description": "Configuration for GKE auto upgrades." - }, - "id": { - "description": "Output only. Unique id for the cluster.", - "readOnly": true, - "type": "string" - }, - "identityServiceConfig": { - "$ref": "IdentityServiceConfig", - "description": "Configuration for Identity Service component." - }, - "initialClusterVersion": { - "description": "The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"\",\"-\": picks the default Kubernetes version", - "type": "string" - }, - "initialNodeCount": { - "deprecated": true, - "description": "The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](https://cloud.google.com/compute/quotas) is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"node_config\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time. This field is deprecated, use node_pool.initial_node_count instead.", - "format": "int32", - "type": "integer" - }, - "instanceGroupUrls": { - "deprecated": true, - "description": "Output only. Deprecated. Use node_pools.instance_group_urls.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "ipAllocationPolicy": { - "$ref": "IPAllocationPolicy", - "description": "Configuration for cluster IP allocation." - }, - "labelFingerprint": { - "description": "The fingerprint of the set of labels for this cluster.", - "type": "string" - }, - "legacyAbac": { - "$ref": "LegacyAbac", - "description": "Configuration for the legacy ABAC authorization mode." - }, - "location": { - "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", - "readOnly": true, - "type": "string" - }, - "locations": { - "description": "The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. This field provides a default value if [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) are not specified during node pool creation. Warning: changing cluster locations will update the [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) of all node pools and will result in nodes being added and/or removed.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Logging configuration for the cluster." - }, - "loggingService": { - "description": "The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model * `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15). * `none` - no logs will be exported from the cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.", - "type": "string" - }, - "maintenancePolicy": { - "$ref": "MaintenancePolicy", - "description": "Configure the maintenance policy for this cluster." - }, - "masterAuth": { - "$ref": "MasterAuth", - "description": "The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, `username` will be set to \"admin\", a random password will be generated, and a client certificate will be issued." - }, - "masterAuthorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "deprecated": true, - "description": "The configuration options for master authorized networks feature. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config instead." - }, - "meshCertificates": { - "$ref": "MeshCertificates", - "description": "Configuration for issuance of mTLS keys and certificates to Kubernetes pods." - }, - "monitoringConfig": { - "$ref": "MonitoringConfig", - "description": "Monitoring configuration for the cluster." - }, - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No metrics will be exported from the cluster. If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.", - "type": "string" - }, - "name": { - "description": "The name of this cluster. The name must be unique within this project and location (e.g. zone or region), and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter.", - "type": "string" - }, - "network": { - "description": "The name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. If left unspecified, the `default` network will be used.", - "type": "string" - }, - "networkConfig": { - "$ref": "NetworkConfig", - "description": "Configuration for cluster networking." - }, - "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." - }, - "nodeConfig": { - "$ref": "NodeConfig", - "deprecated": true, - "description": "Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"initial_node_count\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see `node_pool.config`) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead." - }, - "nodeIpv4CidrSize": { - "description": "Output only. The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode.", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "nodePoolAutoConfig": { - "$ref": "NodePoolAutoConfig", - "description": "Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters." - }, - "nodePoolDefaults": { - "$ref": "NodePoolDefaults", - "description": "Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object." - }, - "nodePools": { - "description": "The node pools associated with this cluster. This field should not be set if \"node_config\" or \"initial_node_count\" are specified.", - "items": { - "$ref": "NodePool" - }, - "type": "array" - }, - "notificationConfig": { - "$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." - }, - "podAutoscaling": { - "$ref": "PodAutoscaling", - "description": "The config for pod autoscaling." - }, - "privateClusterConfig": { - "$ref": "PrivateClusterConfig", - "description": "Configuration for private cluster." - }, - "rbacBindingConfig": { - "$ref": "RBACBindingConfig", - "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." - }, - "releaseChannel": { - "$ref": "ReleaseChannel", - "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." - }, - "resourceLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The resource labels for the cluster to use to annotate any related Google Compute Engine resources.", - "type": "object" - }, - "resourceUsageExportConfig": { - "$ref": "ResourceUsageExportConfig", - "description": "Configuration for exporting resource usages. Resource usage export is disabled when this config is unspecified." - }, - "satisfiesPzi": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "satisfiesPzs": { - "description": "Output only. Reserved for future use.", - "readOnly": true, - "type": "boolean" - }, - "secretManagerConfig": { - "$ref": "SecretManagerConfig", - "description": "Secret CSI driver configuration." - }, - "securityPostureConfig": { - "$ref": "SecurityPostureConfig", - "description": "Enable/Disable Security Posture API features for the cluster." - }, - "selfLink": { - "description": "Output only. Server-defined URL for the resource.", - "readOnly": true, - "type": "string" - }, - "servicesIpv4Cidr": { - "description": "Output only. The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR.", - "readOnly": true, - "type": "string" - }, - "shieldedNodes": { - "$ref": "ShieldedNodes", - "description": "Shielded Nodes configuration." - }, - "status": { - "description": "Output only. The current status of this cluster.", - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RECONCILING", - "STOPPING", - "ERROR", - "DEGRADED" - ], - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the cluster is being created.", - "The RUNNING state indicates the cluster has been created and is fully usable.", - "The RECONCILING state indicates that some work is actively being done on the cluster, such as upgrading the master or node software. Details can be found in the `statusMessage` field.", - "The STOPPING state indicates the cluster is being deleted.", - "The ERROR state indicates the cluster is unusable. It will be automatically deleted. Details can be found in the `statusMessage` field.", - "The DEGRADED state indicates the cluster requires user action to restore full functionality. Details can be found in the `statusMessage` field." - ], - "readOnly": true, - "type": "string" - }, - "statusMessage": { - "deprecated": true, - "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available.", - "readOnly": true, - "type": "string" - }, - "subnetwork": { - "description": "The name of the Google Compute Engine [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which the cluster is connected.", - "type": "string" - }, - "tpuIpv4CidrBlock": { - "deprecated": true, - "description": "Output only. The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25.", - "readOnly": true, - "type": "string" - }, - "userManagedKeysConfig": { - "$ref": "UserManagedKeysConfig", - "description": "The Custom keys configuration for the cluster." - }, - "verticalPodAutoscaling": { - "$ref": "VerticalPodAutoscaling", - "description": "Cluster-level Vertical Pod Autoscaling configuration." - }, - "workloadIdentityConfig": { - "$ref": "WorkloadIdentityConfig", - "description": "Configuration for the use of Kubernetes Service Accounts in IAM policies." - }, - "zone": { - "deprecated": true, - "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ClusterAutoscaling": { - "description": "ClusterAutoscaling contains global, per-cluster information required by Cluster Autoscaler to automatically adjust the size of the cluster and create/delete node pools based on the current needs.", - "id": "ClusterAutoscaling", - "properties": { - "autoprovisioningLocations": { - "description": "The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes can be created by NAP.", - "items": { - "type": "string" - }, - "type": "array" - }, - "autoprovisioningNodePoolDefaults": { - "$ref": "AutoprovisioningNodePoolDefaults", - "description": "AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP." - }, - "autoscalingProfile": { - "description": "Defines autoscaling behaviour.", - "enum": [ - "PROFILE_UNSPECIFIED", - "OPTIMIZE_UTILIZATION", - "BALANCED" - ], - "enumDescriptions": [ - "No change to autoscaling configuration.", - "Prioritize optimizing utilization of resources.", - "Use default (balanced) autoscaling configuration." - ], - "type": "string" - }, - "defaultComputeClassConfig": { - "$ref": "DefaultComputeClassConfig", - "description": "Default compute class is a configuration for default compute class." - }, - "enableNodeAutoprovisioning": { - "description": "Enables automatic node pool creation and deletion.", - "type": "boolean" - }, - "resourceLimits": { - "description": "Contains global constraints regarding minimum and maximum amount of resources in the cluster.", - "items": { - "$ref": "ResourceLimit" - }, - "type": "array" - } - }, - "type": "object" - }, - "ClusterNetworkPerformanceConfig": { - "description": "Configuration of network bandwidth tiers", - "id": "ClusterNetworkPerformanceConfig", - "properties": { - "totalEgressBandwidthTier": { - "description": "Specifies the total network bandwidth tier for NodePools in the cluster.", - "enum": [ - "TIER_UNSPECIFIED", - "TIER_1" - ], - "enumDescriptions": [ - "Default value", - "Higher bandwidth, actual values based on VM size." - ], - "type": "string" - } - }, - "type": "object" - }, - "ClusterUpdate": { - "description": "ClusterUpdate describes an update to the cluster. Exactly one update can be applied to a cluster with each request, so at most one field can be provided.", - "id": "ClusterUpdate", - "properties": { - "additionalPodRangesConfig": { - "$ref": "AdditionalPodRangesConfig", - "description": "The additional pod ranges to be added to the cluster. These pod ranges can be used by node pools to allocate pod IPs." - }, - "desiredAdditionalIpRangesConfig": { - "$ref": "DesiredAdditionalIPRangesConfig", - "description": "The desired config for additional subnetworks attached to the cluster." - }, - "desiredAddonsConfig": { - "$ref": "AddonsConfig", - "description": "Configurations for the various addons available to run in the cluster." - }, - "desiredAnonymousAuthenticationConfig": { - "$ref": "AnonymousAuthenticationConfig", - "description": "Configuration for limiting anonymous access to all endpoints except the health checks." - }, - "desiredAuthenticatorGroupsConfig": { - "$ref": "AuthenticatorGroupsConfig", - "description": "The desired authenticator groups config for the cluster." - }, - "desiredAutoIpamConfig": { - "$ref": "AutoIpamConfig", - "description": "AutoIpamConfig contains all information related to Auto IPAM" - }, - "desiredAutopilotWorkloadPolicyConfig": { - "$ref": "WorkloadPolicyConfig", - "description": "WorkloadPolicyConfig is the configuration related to GCW workload policy" - }, - "desiredBinaryAuthorization": { - "$ref": "BinaryAuthorization", - "description": "The desired configuration options for the Binary Authorization feature." - }, - "desiredClusterAutoscaling": { - "$ref": "ClusterAutoscaling", - "description": "Cluster-level autoscaling configuration." - }, - "desiredCompliancePostureConfig": { - "$ref": "CompliancePostureConfig", - "description": "Enable/Disable Compliance Posture features for the cluster." - }, - "desiredContainerdConfig": { - "$ref": "ContainerdConfig", - "description": "The desired containerd config for the cluster." - }, - "desiredControlPlaneEndpointsConfig": { - "$ref": "ControlPlaneEndpointsConfig", - "description": "Control plane endpoints configuration." - }, - "desiredCostManagementConfig": { - "$ref": "CostManagementConfig", - "description": "The desired configuration for the fine-grained cost management feature." - }, - "desiredDatabaseEncryption": { - "$ref": "DatabaseEncryption", - "description": "Configuration of etcd encryption." - }, - "desiredDatapathProvider": { - "description": "The desired datapath provider for the cluster.", - "enum": [ - "DATAPATH_PROVIDER_UNSPECIFIED", - "LEGACY_DATAPATH", - "ADVANCED_DATAPATH" - ], - "enumDescriptions": [ - "Default value.", - "Use the IPTables implementation based on kube-proxy.", - "Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE Dataplane V2 documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) for more." - ], - "type": "string" - }, - "desiredDefaultEnablePrivateNodes": { - "description": "Override the default setting of whether future created nodes have private IP addresses only, namely NetworkConfig.default_enable_private_nodes", - "type": "boolean" - }, - "desiredDefaultSnatStatus": { - "$ref": "DefaultSnatStatus", - "description": "The desired status of whether to disable default sNAT for this cluster." - }, - "desiredDisableL4LbFirewallReconciliation": { - "description": "Enable/Disable L4 LB VPC firewall reconciliation for the cluster.", - "type": "boolean" - }, - "desiredDnsConfig": { - "$ref": "DNSConfig", - "description": "DNSConfig contains clusterDNS config for this cluster." - }, - "desiredEnableCiliumClusterwideNetworkPolicy": { - "description": "Enable/Disable Cilium Clusterwide Network Policy for the cluster.", - "type": "boolean" - }, - "desiredEnableFqdnNetworkPolicy": { - "description": "Enable/Disable FQDN Network Policy for the cluster.", - "type": "boolean" - }, - "desiredEnableMultiNetworking": { - "description": "Enable/Disable Multi-Networking for the cluster", - "type": "boolean" - }, - "desiredEnablePrivateEndpoint": { - "deprecated": true, - "description": "Enable/Disable private endpoint for the cluster's master. Deprecated: Use desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint instead. Note that the value of enable_public_endpoint is reversed: if enable_private_endpoint is false, then enable_public_endpoint will be true.", - "type": "boolean" - }, - "desiredEnterpriseConfig": { - "$ref": "DesiredEnterpriseConfig", - "deprecated": true, - "description": "The desired enterprise configuration for the cluster. Deprecated: GKE Enterprise features are now available without an Enterprise tier." - }, - "desiredFleet": { - "$ref": "Fleet", - "description": "The desired fleet configuration for the cluster." - }, - "desiredGatewayApiConfig": { - "$ref": "GatewayAPIConfig", - "description": "The desired config of Gateway API on this cluster." - }, - "desiredGcfsConfig": { - "$ref": "GcfsConfig", - "description": "The desired GCFS config for the cluster" - }, - "desiredIdentityServiceConfig": { - "$ref": "IdentityServiceConfig", - "description": "The desired Identity Service component configuration." - }, - "desiredImageType": { - "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." - }, - "desiredK8sBetaApis": { - "$ref": "K8sBetaAPIConfig", - "description": "Desired Beta APIs to be enabled for cluster." - }, - "desiredL4ilbSubsettingConfig": { - "$ref": "ILBSubsettingConfig", - "description": "The desired L4 Internal Load Balancer Subsetting configuration." - }, - "desiredLocations": { - "description": "The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. This list must always include the cluster's primary zone. Warning: changing cluster locations will update the locations of all node pools and will result in nodes being added and/or removed.", - "items": { - "type": "string" - }, - "type": "array" - }, - "desiredLoggingConfig": { - "$ref": "LoggingConfig", - "description": "The desired logging configuration." - }, - "desiredLoggingService": { - "description": "The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model * `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15). * `none` - no logs will be exported from the cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.", - "type": "string" - }, - "desiredMasterAuthorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "deprecated": true, - "description": "The desired configuration options for master authorized networks feature. Deprecated: Use desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config instead." - }, - "desiredMasterVersion": { - "description": "The Kubernetes version to change the master to. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"-\": picks the default Kubernetes version", - "type": "string" - }, - "desiredMeshCertificates": { - "$ref": "MeshCertificates", - "description": "Configuration for issuance of mTLS keys and certificates to Kubernetes pods." - }, - "desiredMonitoringConfig": { - "$ref": "MonitoringConfig", - "description": "The desired monitoring configuration." - }, - "desiredMonitoringService": { - "description": "The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No metrics will be exported from the cluster. If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.", - "type": "string" - }, - "desiredNetworkPerformanceConfig": { - "$ref": "ClusterNetworkPerformanceConfig", - "description": "The desired network performance config." - }, - "desiredNetworkTierConfig": { - "$ref": "NetworkTierConfig", - "description": "The desired network tier configuration for the cluster." - }, - "desiredNodeKubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "The desired node kubelet config for the cluster." - }, - "desiredNodePoolAutoConfigKubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "The desired node kubelet config for all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters." - }, - "desiredNodePoolAutoConfigLinuxNodeConfig": { - "$ref": "LinuxNodeConfig", - "description": "The desired Linux node config for all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. Currently only `cgroup_mode` can be set here." - }, - "desiredNodePoolAutoConfigNetworkTags": { - "$ref": "NetworkTags", - "description": "The desired network tags that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters." - }, - "desiredNodePoolAutoConfigResourceManagerTags": { - "$ref": "ResourceManagerTags", - "description": "The desired resource manager tags that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters." - }, - "desiredNodePoolAutoscaling": { - "$ref": "NodePoolAutoscaling", - "description": "Autoscaler configuration for the node pool specified in desired_node_pool_id. If there is only one pool in the cluster and desired_node_pool_id is not provided then the change applies to that single node pool." - }, - "desiredNodePoolId": { - "description": "The node pool to be upgraded. This field is mandatory if \"desired_node_version\", \"desired_image_family\" or \"desired_node_pool_autoscaling\" is specified and there is more than one node pool on the cluster.", - "type": "string" - }, - "desiredNodePoolLoggingConfig": { - "$ref": "NodePoolLoggingConfig", - "description": "The desired node pool logging configuration defaults for the cluster." - }, - "desiredNodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"-\": picks the Kubernetes master version", - "type": "string" - }, - "desiredNotificationConfig": { - "$ref": "NotificationConfig", - "description": "The desired notification configuration." - }, - "desiredParentProductConfig": { - "$ref": "ParentProductConfig", - "description": "The desired parent product config for the cluster." - }, - "desiredPodAutoscaling": { - "$ref": "PodAutoscaling", - "description": "The desired config for pod autoscaling." - }, - "desiredPrivateClusterConfig": { - "$ref": "PrivateClusterConfig", - "deprecated": true, - "description": "The desired private cluster configuration. master_global_access_config is the only field that can be changed via this field. See also ClusterUpdate.desired_enable_private_endpoint for modifying other fields within PrivateClusterConfig. Deprecated: Use desired_control_plane_endpoints_config.ip_endpoints_config.global_access instead." - }, - "desiredPrivateIpv6GoogleAccess": { - "description": "The desired state of IPv6 connectivity to Google Services.", - "enum": [ - "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED", - "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED", - "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE", - "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - ], - "enumDescriptions": [ - "Default value. Same as DISABLED", - "No private access to or from Google Services", - "Enables private IPv6 access to Google Services from GKE", - "Enables private IPv6 access to and from Google Services" - ], - "type": "string" - }, - "desiredPrivilegedAdmissionConfig": { - "$ref": "PrivilegedAdmissionConfig", - "description": "The desired privileged admission config for the cluster." - }, - "desiredRbacBindingConfig": { - "$ref": "RBACBindingConfig", - "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." - }, - "desiredReleaseChannel": { - "$ref": "ReleaseChannel", - "description": "The desired release channel configuration." - }, - "desiredResourceUsageExportConfig": { - "$ref": "ResourceUsageExportConfig", - "description": "The desired configuration for exporting resource usage." - }, - "desiredSecretManagerConfig": { - "$ref": "SecretManagerConfig", - "description": "Enable/Disable Secret Manager Config." - }, - "desiredSecurityPostureConfig": { - "$ref": "SecurityPostureConfig", - "description": "Enable/Disable Security Posture API features for the cluster." - }, - "desiredServiceExternalIpsConfig": { - "$ref": "ServiceExternalIPsConfig", - "description": "ServiceExternalIPsConfig specifies the config for the use of Services with ExternalIPs field." - }, - "desiredShieldedNodes": { - "$ref": "ShieldedNodes", - "description": "Configuration for Shielded Nodes." - }, - "desiredStackType": { - "description": "The desired stack type of the cluster. If a stack type is provided and does not match the current stack type of the cluster, update will attempt to change the stack type to the new type.", - "enum": [ - "STACK_TYPE_UNSPECIFIED", - "IPV4", - "IPV4_IPV6" - ], - "enumDescriptions": [ - "Default value, will be defaulted as IPV4 only", - "Cluster is IPV4 only", - "Cluster can use both IPv4 and IPv6" - ], - "type": "string" - }, - "desiredUserManagedKeysConfig": { - "$ref": "UserManagedKeysConfig", - "description": "The desired user managed keys config for the cluster." - }, - "desiredVerticalPodAutoscaling": { - "$ref": "VerticalPodAutoscaling", - "description": "Cluster-level Vertical Pod Autoscaling configuration." - }, - "desiredWorkloadIdentityConfig": { - "$ref": "WorkloadIdentityConfig", - "description": "Configuration for Workload Identity." - }, - "enableK8sBetaApis": { - "$ref": "K8sBetaAPIConfig", - "description": "Kubernetes open source beta apis enabled on the cluster. Only beta apis" - }, - "etag": { - "description": "The current etag of the cluster. If an etag is provided and does not match the current etag of the cluster, update will be blocked and an ABORTED error will be returned.", - "type": "string" - }, - "gkeAutoUpgradeConfig": { - "$ref": "GkeAutoUpgradeConfig", - "description": "Configuration for GKE auto upgrade." - }, - "removedAdditionalPodRangesConfig": { - "$ref": "AdditionalPodRangesConfig", - "description": "The additional pod ranges that are to be removed from the cluster. The pod ranges specified here must have been specified earlier in the 'additional_pod_ranges_config' argument." - }, - "userManagedKeysConfig": { - "$ref": "UserManagedKeysConfig", - "deprecated": true, - "description": "The Custom keys configuration for the cluster. This field is deprecated. Use ClusterUpdate.desired_user_managed_keys_config instead." - } - }, - "type": "object" - }, - "ClusterUpgradeInfo": { - "description": "ClusterUpgradeInfo contains the upgrade information of a cluster.", - "id": "ClusterUpgradeInfo", - "properties": { - "autoUpgradeStatus": { - "description": "The auto upgrade status.", - "items": { - "enum": [ - "UNKNOWN", - "ACTIVE", - "MINOR_UPGRADE_PAUSED", - "UPGRADE_PAUSED" - ], - "enumDescriptions": [ - "UNKNOWN indicates an unknown status.", - "ACTIVE indicates an active status.", - "MINOR_UPGRADE_PAUSED indicates the minor version upgrade is paused.", - "UPGRADE_PAUSED indicates the upgrade is paused." - ], - "type": "string" - }, - "type": "array" - }, - "endOfExtendedSupportTimestamp": { - "description": "The cluster's current minor version's end of extended support timestamp.", - "type": "string" - }, - "endOfStandardSupportTimestamp": { - "description": "The cluster's current minor version's end of standard support timestamp.", - "type": "string" - }, - "minorTargetVersion": { - "description": "minor_target_version indicates the target version for minor upgrade.", - "type": "string" - }, - "patchTargetVersion": { - "description": "patch_target_version indicates the target version for patch upgrade.", - "type": "string" - }, - "pausedReason": { - "description": "The auto upgrade paused reason.", - "items": { - "enum": [ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED", - "MAINTENANCE_WINDOW", - "MAINTENANCE_EXCLUSION_NO_UPGRADES", - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES", - "CLUSTER_DISRUPTION_BUDGET", - "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE", - "SYSTEM_CONFIG" - ], - "enumDescriptions": [ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.", - "MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance window.", - "MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a maintenance exclusion with scope NO_UPGRADES.", - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a maintenance exclusion with scope NO_MINOR_UPGRADES.", - "CLUSTER_DISRUPTION_BUDGET indicates the cluster is outside the cluster disruption budget.", - "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside the cluster disruption budget for minor version upgrade.", - "SYSTEM_CONFIG indicates the cluster upgrade is paused by system config." - ], - "type": "string" - }, - "type": "array" - }, - "upgradeDetails": { - "description": "The list of past auto upgrades.", - "items": { - "$ref": "UpgradeDetails" - }, - "type": "array" - } - }, - "type": "object" - }, - "CompleteIPRotationRequest": { - "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", - "id": "CompleteIPRotationRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to complete IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "CompleteNodePoolUpgradeRequest": { - "description": "CompleteNodePoolUpgradeRequest sets the name of target node pool to complete upgrade.", - "id": "CompleteNodePoolUpgradeRequest", - "properties": {}, - "type": "object" - }, - "CompliancePostureConfig": { - "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", - "id": "CompliancePostureConfig", - "properties": { - "complianceStandards": { - "description": "List of enabled compliance standards.", - "items": { - "$ref": "ComplianceStandard" - }, - "type": "array" - }, - "mode": { - "description": "Defines the enablement mode for Compliance Posture.", - "enum": [ - "MODE_UNSPECIFIED", - "DISABLED", - "ENABLED" - ], - "enumDescriptions": [ - "Default value not specified.", - "Disables Compliance Posture features on the cluster.", - "Enables Compliance Posture features on the cluster." - ], - "type": "string" - } - }, - "type": "object" - }, - "ComplianceStandard": { - "description": "Defines the details of a compliance standard.", - "id": "ComplianceStandard", - "properties": { - "standard": { - "description": "Name of the compliance standard.", - "type": "string" - } - }, - "type": "object" - }, - "ConfidentialNodes": { - "description": "ConfidentialNodes is configuration for the confidential nodes feature, which makes nodes run on confidential VMs.", - "id": "ConfidentialNodes", - "properties": { - "confidentialInstanceType": { - "description": "Defines the type of technology used by the confidential node.", - "enum": [ - "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", - "SEV", - "SEV_SNP", - "TDX" - ], - "enumDescriptions": [ - "No type specified. Do not use this value.", - "AMD Secure Encrypted Virtualization.", - "AMD Secure Encrypted Virtualization - Secure Nested Paging.", - "Intel Trust Domain eXtension." - ], - "type": "string" - }, - "enabled": { - "description": "Whether Confidential Nodes feature is enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "ConfigConnectorConfig": { - "description": "Configuration options for the Config Connector add-on.", - "id": "ConfigConnectorConfig", - "properties": { - "enabled": { - "description": "Whether Cloud Connector is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "ConsumptionMeteringConfig": { - "description": "Parameters for controlling consumption metering.", - "id": "ConsumptionMeteringConfig", - "properties": { - "enabled": { - "description": "Whether to enable consumption metering for this cluster. If enabled, a second BigQuery table will be created to hold resource consumption records.", - "type": "boolean" - } - }, - "type": "object" - }, - "ContainerdConfig": { - "description": "ContainerdConfig contains configuration to customize containerd.", - "id": "ContainerdConfig", - "properties": { - "privateRegistryAccessConfig": { - "$ref": "PrivateRegistryAccessConfig", - "description": "PrivateRegistryAccessConfig is used to configure access configuration for private container registries." - }, - "registryHosts": { - "description": "RegistryHostConfig configures containerd registry host configuration. Each registry_hosts represents a hosts.toml file. At most 25 registry_hosts are allowed.", - "items": { - "$ref": "RegistryHostConfig" - }, - "type": "array" - }, - "writableCgroups": { - "$ref": "WritableCgroups", - "description": "Optional. WritableCgroups defines writable cgroups configuration for the node pool." - } - }, - "type": "object" - }, - "ControlPlaneEndpointsConfig": { - "description": "Configuration for all of the cluster's control plane endpoints.", - "id": "ControlPlaneEndpointsConfig", - "properties": { - "dnsEndpointConfig": { - "$ref": "DNSEndpointConfig", - "description": "DNS endpoint configuration." - }, - "ipEndpointsConfig": { - "$ref": "IPEndpointsConfig", - "description": "IP endpoints configuration." - } - }, - "type": "object" - }, - "CostManagementConfig": { - "description": "Configuration for fine-grained cost management feature.", - "id": "CostManagementConfig", - "properties": { - "enabled": { - "description": "Whether the feature is enabled or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "CreateClusterRequest": { - "description": "CreateClusterRequest creates a cluster.", - "id": "CreateClusterRequest", - "properties": { - "cluster": { - "$ref": "Cluster", - "description": "Required. A [cluster resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters)" - }, - "parent": { - "description": "The parent (project and location) where the cluster will be created. Specified in the format `projects/*/locations/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "type": "string" - } - }, - "type": "object" - }, - "CreateNodePoolRequest": { - "description": "CreateNodePoolRequest creates a node pool for a cluster.", - "id": "CreateNodePoolRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field.", - "type": "string" - }, - "nodePool": { - "$ref": "NodePool", - "description": "Required. The node pool to create." - }, - "parent": { - "description": "The parent (project, location, cluster name) where the node pool will be created. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.", - "type": "string" - } - }, - "type": "object" - }, - "DNSConfig": { - "description": "DNSConfig contains the desired set of options for configuring clusterDNS.", - "id": "DNSConfig", - "properties": { - "additiveVpcScopeDnsDomain": { - "description": "Optional. The domain used in Additive VPC scope.", - "type": "string" - }, - "clusterDns": { - "description": "cluster_dns indicates which in-cluster DNS provider should be used.", - "enum": [ - "PROVIDER_UNSPECIFIED", - "PLATFORM_DEFAULT", - "CLOUD_DNS", - "KUBE_DNS" - ], - "enumDescriptions": [ - "Default value", - "Use GKE default DNS provider(kube-dns) for DNS resolution.", - "Use CloudDNS for DNS resolution.", - "Use KubeDNS for DNS resolution." - ], - "type": "string" - }, - "clusterDnsDomain": { - "description": "cluster_dns_domain is the suffix used for all cluster service records.", - "type": "string" - }, - "clusterDnsScope": { - "description": "cluster_dns_scope indicates the scope of access to cluster DNS records.", - "enum": [ - "DNS_SCOPE_UNSPECIFIED", - "CLUSTER_SCOPE", - "VPC_SCOPE" - ], - "enumDescriptions": [ - "Default value, will be inferred as cluster scope.", - "DNS records are accessible from within the cluster.", - "DNS records are accessible from within the VPC." - ], - "type": "string" - } - }, - "type": "object" - }, - "DNSEndpointConfig": { - "description": "Describes the configuration of a DNS endpoint.", - "id": "DNSEndpointConfig", - "properties": { - "allowExternalTraffic": { - "description": "Controls whether user traffic is allowed over this endpoint. Note that Google-managed services may still use the endpoint even if this is false.", - "type": "boolean" - }, - "enableK8sCertsViaDns": { - "description": "Controls whether the k8s certs auth is allowed via DNS.", - "type": "boolean" - }, - "enableK8sTokensViaDns": { - "description": "Controls whether the k8s token auth is allowed via DNS.", - "type": "boolean" - }, - "endpoint": { - "description": "Output only. The cluster's DNS endpoint configuration. A DNS format address. This is accessible from the public internet. Ex: uid.us-central1.gke.goog. Always present, but the behavior may change according to the value of DNSEndpointConfig.allow_external_traffic.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "DailyMaintenanceWindow": { - "description": "Time window specified for daily maintenance operations.", - "id": "DailyMaintenanceWindow", - "properties": { - "duration": { - "description": "Output only. Duration of the time window, automatically chosen to be smallest possible in the given scenario. Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format \"PTnHnMnS\".", - "readOnly": true, - "type": "string" - }, - "startTime": { - "description": "Time within the maintenance window to start the maintenance operations. Time format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format \"HH:MM\", where HH : [00-23] and MM : [00-59] GMT.", - "type": "string" - } - }, - "type": "object" - }, - "DatabaseEncryption": { - "description": "Configuration of etcd encryption.", - "id": "DatabaseEncryption", - "properties": { - "currentState": { - "description": "Output only. The current state of etcd encryption.", - "enum": [ - "CURRENT_STATE_UNSPECIFIED", - "CURRENT_STATE_ENCRYPTED", - "CURRENT_STATE_DECRYPTED", - "CURRENT_STATE_ENCRYPTION_PENDING", - "CURRENT_STATE_ENCRYPTION_ERROR", - "CURRENT_STATE_DECRYPTION_PENDING", - "CURRENT_STATE_DECRYPTION_ERROR" - ], - "enumDescriptions": [ - "Should never be set", - "Secrets in etcd are encrypted.", - "Secrets in etcd are stored in plain text (at etcd level) - this is unrelated to Compute Engine level full disk encryption.", - "Encryption (or re-encryption with a different CloudKMS key) of Secrets is in progress.", - "Encryption (or re-encryption with a different CloudKMS key) of Secrets in etcd encountered an error.", - "De-crypting Secrets to plain text in etcd is in progress.", - "De-crypting Secrets to plain text in etcd encountered an error." - ], - "readOnly": true, - "type": "string" - }, - "decryptionKeys": { - "description": "Output only. Keys in use by the cluster for decrypting existing objects, in addition to the key in `key_name`. Each item is a CloudKMS key resource.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "keyName": { - "description": "Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key", - "type": "string" - }, - "lastOperationErrors": { - "description": "Output only. Records errors seen during DatabaseEncryption update operations.", - "items": { - "$ref": "OperationError" - }, - "readOnly": true, - "type": "array" - }, - "state": { - "description": "The desired state of etcd encryption.", - "enum": [ - "UNKNOWN", - "ENCRYPTED", - "DECRYPTED" - ], - "enumDescriptions": [ - "Should never be set", - "Secrets in etcd are encrypted.", - "Secrets in etcd are stored in plain text (at etcd level) - this is unrelated to Compute Engine level full disk encryption." - ], - "type": "string" - } - }, - "type": "object" - }, - "DefaultComputeClassConfig": { - "description": "DefaultComputeClassConfig defines default compute class configuration.", - "id": "DefaultComputeClassConfig", - "properties": { - "enabled": { - "description": "Enables default compute class.", - "type": "boolean" - } - }, - "type": "object" - }, - "DefaultSnatStatus": { - "description": "DefaultSnatStatus contains the desired state of whether default sNAT should be disabled on the cluster.", - "id": "DefaultSnatStatus", - "properties": { - "disabled": { - "description": "Disables cluster default sNAT rules.", - "type": "boolean" - } - }, - "type": "object" - }, - "DesiredAdditionalIPRangesConfig": { - "description": "DesiredAdditionalIPRangesConfig is a wrapper used for cluster update operation and contains multiple AdditionalIPRangesConfigs.", - "id": "DesiredAdditionalIPRangesConfig", - "properties": { - "additionalIpRangesConfigs": { - "description": "List of additional IP ranges configs where each AdditionalIPRangesConfig corresponds to one subnetwork's IP ranges", - "items": { - "$ref": "AdditionalIPRangesConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "DesiredEnterpriseConfig": { - "deprecated": true, - "description": "DesiredEnterpriseConfig is a wrapper used for updating enterprise_config. Deprecated: GKE Enterprise features are now available without an Enterprise tier.", - "id": "DesiredEnterpriseConfig", - "properties": { - "desiredTier": { - "description": "desired_tier specifies the desired tier of the cluster.", - "enum": [ - "CLUSTER_TIER_UNSPECIFIED", - "STANDARD", - "ENTERPRISE" - ], - "enumDescriptions": [ - "CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.", - "STANDARD indicates a standard GKE cluster.", - "ENTERPRISE indicates a GKE Enterprise cluster." - ], - "type": "string" - } - }, - "type": "object" - }, - "DnsCacheConfig": { - "description": "Configuration for NodeLocal DNSCache", - "id": "DnsCacheConfig", - "properties": { - "enabled": { - "description": "Whether NodeLocal DNSCache is enabled for this cluster.", - "type": "boolean" - } - }, - "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" - }, - "EnterpriseConfig": { - "deprecated": true, - "description": "EnterpriseConfig is the cluster enterprise configuration. Deprecated: GKE Enterprise features are now available without an Enterprise tier.", - "id": "EnterpriseConfig", - "properties": { - "clusterTier": { - "description": "Output only. cluster_tier indicates the effective tier of the cluster.", - "enum": [ - "CLUSTER_TIER_UNSPECIFIED", - "STANDARD", - "ENTERPRISE" - ], - "enumDescriptions": [ - "CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.", - "STANDARD indicates a standard GKE cluster.", - "ENTERPRISE indicates a GKE Enterprise cluster." - ], - "readOnly": true, - "type": "string" - }, - "desiredTier": { - "description": "desired_tier specifies the desired tier of the cluster.", - "enum": [ - "CLUSTER_TIER_UNSPECIFIED", - "STANDARD", - "ENTERPRISE" - ], - "enumDescriptions": [ - "CLUSTER_TIER_UNSPECIFIED is when cluster_tier is not set.", - "STANDARD indicates a standard GKE cluster.", - "ENTERPRISE indicates a GKE Enterprise cluster." - ], - "type": "string" - } - }, - "type": "object" - }, - "EphemeralStorageLocalSsdConfig": { - "description": "EphemeralStorageLocalSsdConfig contains configuration for the node ephemeral storage using Local SSDs.", - "id": "EphemeralStorageLocalSsdConfig", - "properties": { - "dataCacheCount": { - "description": "Number of local SSDs to use for GKE Data Cache.", - "format": "int32", - "type": "integer" - }, - "localSsdCount": { - "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" - } - }, - "type": "object" - }, - "EvictionGracePeriod": { - "description": "Eviction grace periods are grace periods for each eviction signal.", - "id": "EvictionGracePeriod", - "properties": { - "imagefsAvailable": { - "description": "Optional. Grace period for eviction due to imagefs available signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "imagefsInodesFree": { - "description": "Optional. Grace period for eviction due to imagefs inodes free signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "memoryAvailable": { - "description": "Optional. Grace period for eviction due to memory available signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsAvailable": { - "description": "Optional. Grace period for eviction due to nodefs available signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsInodesFree": { - "description": "Optional. Grace period for eviction due to nodefs inodes free signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "pidAvailable": { - "description": "Optional. Grace period for eviction due to pid available signal. Sample format: \"10s\". Must be \u003e= 0. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - } - }, - "type": "object" - }, - "EvictionMinimumReclaim": { - "description": "Eviction minimum reclaims are the resource amounts of minimum reclaims for each eviction signal.", - "id": "EvictionMinimumReclaim", - "properties": { - "imagefsAvailable": { - "description": "Optional. Minimum reclaim for eviction due to imagefs available signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "imagefsInodesFree": { - "description": "Optional. Minimum reclaim for eviction due to imagefs inodes free signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "memoryAvailable": { - "description": "Optional. Minimum reclaim for eviction due to memory available signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsAvailable": { - "description": "Optional. Minimum reclaim for eviction due to nodefs available signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsInodesFree": { - "description": "Optional. Minimum reclaim for eviction due to nodefs inodes free signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "pidAvailable": { - "description": "Optional. Minimum reclaim for eviction due to pid available signal. Only take percentage value for now. Sample format: \"10%\". Must be \u003c=10%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - } - }, - "type": "object" - }, - "EvictionSignals": { - "description": "Eviction signals are the current state of a particular resource at a specific point in time. The kubelet uses eviction signals to make eviction decisions by comparing the signals to eviction thresholds, which are the minimum amount of the resource that should be available on the node.", - "id": "EvictionSignals", - "properties": { - "imagefsAvailable": { - "description": "Optional. Amount of storage available on filesystem that container runtime uses for storing images layers. If the container filesystem and image filesystem are not separate, then imagefs can store both image layers and writeable layers. Defines the amount of \"imagefs.available\" signal in kubelet. Default is unset, if not specified in the kubelet config. It takses percentage value for now. Sample format: \"30%\". Must be \u003e= 15% and \u003c= 50%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "imagefsInodesFree": { - "description": "Optional. Amount of inodes available on filesystem that container runtime uses for storing images layers. Defines the amount of \"imagefs.inodesFree\" signal in kubelet. Default is unset, if not specified in the kubelet config. Linux only. It takses percentage value for now. Sample format: \"30%\". Must be \u003e= 5% and \u003c= 50%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "memoryAvailable": { - "description": "Optional. Memory available (i.e. capacity - workingSet), in bytes. Defines the amount of \"memory.available\" signal in kubelet. Default is unset, if not specified in the kubelet config. Format: positive number + unit, e.g. 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be \u003e= 100Mi and \u003c= 50% of the node's memory. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsAvailable": { - "description": "Optional. Amount of storage available on filesystem that kubelet uses for volumes, daemon logs, etc. Defines the amount of \"nodefs.available\" signal in kubelet. Default is unset, if not specified in the kubelet config. It takses percentage value for now. Sample format: \"30%\". Must be \u003e= 10% and \u003c= 50%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "nodefsInodesFree": { - "description": "Optional. Amount of inodes available on filesystem that kubelet uses for volumes, daemon logs, etc. Defines the amount of \"nodefs.inodesFree\" signal in kubelet. Default is unset, if not specified in the kubelet config. Linux only. It takses percentage value for now. Sample format: \"30%\". Must be \u003e= 5% and \u003c= 50%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - }, - "pidAvailable": { - "description": "Optional. Amount of PID available for pod allocation. Defines the amount of \"pid.available\" signal in kubelet. Default is unset, if not specified in the kubelet config. It takses percentage value for now. Sample format: \"30%\". Must be \u003e= 10% and \u003c= 50%. See https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals", - "type": "string" - } - }, - "type": "object" - }, - "FastSocket": { - "description": "Configuration of Fast Socket feature.", - "id": "FastSocket", - "properties": { - "enabled": { - "description": "Whether Fast Socket features are enabled in the node pool.", - "type": "boolean" - } - }, - "type": "object" - }, - "Filter": { - "description": "Allows filtering to one or more specific event types. If event types are present, those and only those event types will be transmitted to the cluster. Other types will be skipped. If no filter is specified, or no event types are present, all event types will be sent", - "id": "Filter", - "properties": { - "eventType": { - "description": "Event types to allowlist.", - "items": { - "enum": [ - "EVENT_TYPE_UNSPECIFIED", - "UPGRADE_AVAILABLE_EVENT", - "UPGRADE_EVENT", - "SECURITY_BULLETIN_EVENT", - "UPGRADE_INFO_EVENT" - ], - "enumDescriptions": [ - "Not set, will be ignored.", - "Corresponds with UpgradeAvailableEvent.", - "Corresponds with UpgradeEvent.", - "Corresponds with SecurityBulletinEvent.", - "Corresponds with UpgradeInfoEvent." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Fleet": { - "description": "Fleet is the fleet configuration for the cluster.", - "id": "Fleet", - "properties": { - "membership": { - "description": "Output only. The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.", - "readOnly": true, - "type": "string" - }, - "membershipType": { - "description": "The type of the cluster's fleet membership.", - "enum": [ - "MEMBERSHIP_TYPE_UNSPECIFIED", - "LIGHTWEIGHT" - ], - "enumDescriptions": [ - "The MembershipType is not set.", - "The membership supports only lightweight compatible features." - ], - "type": "string" - }, - "preRegistered": { - "description": "Output only. Whether the cluster has been registered through the fleet API.", - "readOnly": true, - "type": "boolean" - }, - "project": { - "description": "The Fleet host project(project ID or project number) where this cluster will be registered to. This field cannot be changed after the cluster has been registered.", - "type": "string" - } - }, - "type": "object" - }, - "GCPSecretManagerCertificateConfig": { - "description": "GCPSecretManagerCertificateConfig configures a secret from [Secret Manager](https://cloud.google.com/secret-manager).", - "id": "GCPSecretManagerCertificateConfig", - "properties": { - "secretUri": { - "description": "Secret URI, in the form \"projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION\". Version can be fixed (e.g. \"2\") or \"latest\"", - "type": "string" - } - }, - "type": "object" - }, - "GPUDriverInstallationConfig": { - "description": "GPUDriverInstallationConfig specifies the version of GPU driver to be auto installed.", - "id": "GPUDriverInstallationConfig", - "properties": { - "gpuDriverVersion": { - "description": "Mode for how the GPU driver is installed.", - "enum": [ - "GPU_DRIVER_VERSION_UNSPECIFIED", - "INSTALLATION_DISABLED", - "DEFAULT", - "LATEST" - ], - "enumDescriptions": [ - "Default value is to not install any GPU driver.", - "Disable GPU driver auto installation and needs manual installation", - "\"Default\" GPU driver in COS and Ubuntu.", - "\"Latest\" GPU driver in COS." - ], - "type": "string" - } - }, - "type": "object" - }, - "GPUSharingConfig": { - "description": "GPUSharingConfig represents the GPU sharing configuration for Hardware Accelerators.", - "id": "GPUSharingConfig", - "properties": { - "gpuSharingStrategy": { - "description": "The type of GPU sharing strategy to enable on the GPU node.", - "enum": [ - "GPU_SHARING_STRATEGY_UNSPECIFIED", - "TIME_SHARING", - "MPS" - ], - "enumDescriptions": [ - "Default value.", - "GPUs are time-shared between containers.", - "GPUs are shared between containers with NVIDIA MPS." - ], - "type": "string" - }, - "maxSharedClientsPerGpu": { - "description": "The max number of containers that can share a physical GPU.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GatewayAPIConfig": { - "description": "GatewayAPIConfig contains the desired config of Gateway API on this cluster.", - "id": "GatewayAPIConfig", - "properties": { - "channel": { - "description": "The Gateway API release channel to use for Gateway API.", - "enum": [ - "CHANNEL_UNSPECIFIED", - "CHANNEL_DISABLED", - "CHANNEL_EXPERIMENTAL", - "CHANNEL_STANDARD" - ], - "enumDeprecated": [ - false, - false, - true, - false - ], - "enumDescriptions": [ - "Default value.", - "Gateway API support is disabled", - "Deprecated: use CHANNEL_STANDARD instead. Gateway API support is enabled, experimental CRDs are installed", - "Gateway API support is enabled, standard CRDs are installed" - ], - "type": "string" - } - }, - "type": "object" - }, - "GcePersistentDiskCsiDriverConfig": { - "description": "Configuration for the Compute Engine PD CSI driver.", - "id": "GcePersistentDiskCsiDriverConfig", - "properties": { - "enabled": { - "description": "Whether the Compute Engine PD CSI driver is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "GcfsConfig": { - "description": "GcfsConfig contains configurations of Google Container File System (image streaming).", - "id": "GcfsConfig", - "properties": { - "enabled": { - "description": "Whether to use GCFS.", - "type": "boolean" - } - }, - "type": "object" - }, - "GcpFilestoreCsiDriverConfig": { - "description": "Configuration for the Filestore CSI driver.", - "id": "GcpFilestoreCsiDriverConfig", - "properties": { - "enabled": { - "description": "Whether the Filestore CSI driver is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "GcsFuseCsiDriverConfig": { - "description": "Configuration for the Cloud Storage Fuse CSI driver.", - "id": "GcsFuseCsiDriverConfig", - "properties": { - "enabled": { - "description": "Whether the Cloud Storage Fuse CSI driver is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "GetJSONWebKeysResponse": { - "description": "GetJSONWebKeysResponse is a valid JSON Web Key Set as specified in rfc 7517", - "id": "GetJSONWebKeysResponse", - "properties": { - "cacheHeader": { - "$ref": "HttpCacheControlResponseHeader", - "description": "For HTTP requests, this field is automatically extracted into the Cache-Control HTTP header." - }, - "keys": { - "description": "The public component of the keys used by the cluster to sign token requests.", - "items": { - "$ref": "Jwk" - }, - "type": "array" - } - }, - "type": "object" - }, - "GetOpenIDConfigResponse": { - "description": "GetOpenIDConfigResponse is an OIDC discovery document for the cluster. See the OpenID Connect Discovery 1.0 specification for details.", - "id": "GetOpenIDConfigResponse", - "properties": { - "cacheHeader": { - "$ref": "HttpCacheControlResponseHeader", - "description": "For HTTP requests, this field is automatically extracted into the Cache-Control HTTP header." - }, - "claims_supported": { - "description": "Supported claims.", - "items": { - "type": "string" - }, - "type": "array" - }, - "grant_types": { - "description": "Supported grant types.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id_token_signing_alg_values_supported": { - "description": "supported ID Token signing Algorithms.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issuer": { - "description": "OIDC Issuer.", - "type": "string" - }, - "jwks_uri": { - "description": "JSON Web Key uri.", - "type": "string" - }, - "response_types_supported": { - "description": "Supported response types.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_types_supported": { - "description": "Supported subject types.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GkeAutoUpgradeConfig": { - "description": "GkeAutoUpgradeConfig is the configuration for GKE auto upgrades.", - "id": "GkeAutoUpgradeConfig", - "properties": { - "patchMode": { - "description": "PatchMode specifies how auto upgrade patch builds should be selected.", - "enum": [ - "PATCH_MODE_UNSPECIFIED", - "ACCELERATED" - ], - "enumDescriptions": [ - "PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the channel's patch upgrade targets as the upgrade target for the version.", - "ACCELERATED denotes that the latest patch build in the channel should be used as the upgrade target for the version." - ], - "type": "string" - } - }, - "type": "object" - }, - "GkeBackupAgentConfig": { - "description": "Configuration for the Backup for GKE Agent.", - "id": "GkeBackupAgentConfig", - "properties": { - "enabled": { - "description": "Whether the Backup for GKE agent is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "HighScaleCheckpointingConfig": { - "description": "Configuration for the High Scale Checkpointing.", - "id": "HighScaleCheckpointingConfig", - "properties": { - "enabled": { - "description": "Whether the High Scale Checkpointing is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "HorizontalPodAutoscaling": { - "description": "Configuration options for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods.", - "id": "HorizontalPodAutoscaling", - "properties": { - "disabled": { - "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that metrics are collected into Stackdriver Monitoring.", - "type": "boolean" - } - }, - "type": "object" - }, - "HostConfig": { - "description": "HostConfig configures the registry host under a given Server.", - "id": "HostConfig", - "properties": { - "ca": { - "description": "CA configures the registry host certificate.", - "items": { - "$ref": "CertificateConfig" - }, - "type": "array" - }, - "capabilities": { - "description": "Capabilities represent the capabilities of the registry host, specifying what operations a host is capable of performing. If not set, containerd enables all capabilities by default.", - "items": { - "enum": [ - "HOST_CAPABILITY_UNSPECIFIED", - "HOST_CAPABILITY_PULL", - "HOST_CAPABILITY_RESOLVE", - "HOST_CAPABILITY_PUSH" - ], - "enumDescriptions": [ - "UNKNOWN should never be set.", - "Pull represents the capability to fetch manifests and blobs by digest.", - "Resolve represents the capability to fetch manifests by name.", - "Push represents the capability to push blobs and manifests." - ], - "type": "string" - }, - "type": "array" - }, - "client": { - "description": "Client configures the registry host client certificate and key.", - "items": { - "$ref": "CertificateConfigPair" - }, - "type": "array" - }, - "dialTimeout": { - "description": "Specifies the maximum duration allowed for a connection attempt to complete. A shorter timeout helps reduce delays when falling back to the original registry if the mirror is unreachable. Maximum allowed value is 180s. If not set, containerd sets default 30s. The value should be a decimal number of seconds with an `s` suffix.", - "format": "google-duration", - "type": "string" - }, - "header": { - "description": "Header configures the registry host headers.", - "items": { - "$ref": "RegistryHeader" - }, - "type": "array" - }, - "host": { - "description": "Host configures the registry host/mirror. It supports fully qualified domain names (FQDN) and IP addresses: Specifying port is supported. Wildcards are NOT supported. Examples: - my.customdomain.com - 10.0.1.2:5000", - "type": "string" - }, - "overridePath": { - "description": "OverridePath is used to indicate the host's API root endpoint is defined in the URL path rather than by the API specification. This may be used with non-compliant OCI registries which are missing the /v2 prefix. If not set, containerd sets default false.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpCacheControlResponseHeader": { - "description": "RFC-2616: cache control support", - "id": "HttpCacheControlResponseHeader", - "properties": { - "age": { - "description": "14.6 response cache age, in seconds since the response is generated", - "format": "int64", - "type": "string" - }, - "directive": { - "description": "14.9 request and response directives", - "type": "string" - }, - "expires": { - "description": "14.21 response cache expires, in RFC 1123 date format", - "type": "string" - } - }, - "type": "object" - }, - "HttpLoadBalancing": { - "description": "Configuration options for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster.", - "id": "HttpLoadBalancing", - "properties": { - "disabled": { - "description": "Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers.", - "type": "boolean" - } - }, - "type": "object" - }, - "HugepagesConfig": { - "description": "Hugepages amount in both 2m and 1g size", - "id": "HugepagesConfig", - "properties": { - "hugepageSize1g": { - "description": "Optional. Amount of 1G hugepages", - "format": "int32", - "type": "integer" - }, - "hugepageSize2m": { - "description": "Optional. Amount of 2M hugepages", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ILBSubsettingConfig": { - "description": "ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer subsetting on this cluster.", - "id": "ILBSubsettingConfig", - "properties": { - "enabled": { - "description": "Enables l4 ILB subsetting for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "IPAllocationPolicy": { - "description": "Configuration for controlling how IPs are allocated in the cluster.", - "id": "IPAllocationPolicy", - "properties": { - "additionalIpRangesConfigs": { - "description": "Output only. The additional IP ranges that are added to the cluster. These IP ranges can be used by new node pools to allocate node and pod IPs automatically. Each AdditionalIPRangesConfig corresponds to a single subnetwork. Once a range is removed it will not show up in IPAllocationPolicy.", - "items": { - "$ref": "AdditionalIPRangesConfig" - }, - "readOnly": true, - "type": "array" - }, - "additionalPodRangesConfig": { - "$ref": "AdditionalPodRangesConfig", - "description": "Output only. The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.", - "readOnly": true - }, - "autoIpamConfig": { - "$ref": "AutoIpamConfig", - "description": "Optional. AutoIpamConfig contains all information related to Auto IPAM" - }, - "clusterIpv4Cidr": { - "deprecated": true, - "description": "This field is deprecated, use cluster_ipv4_cidr_block.", - "type": "string" - }, - "clusterIpv4CidrBlock": { - "description": "The IP address range for the cluster pod IPs. If this field is set, then `cluster.cluster_ipv4_cidr` must be left blank. This field is only applicable when `use_ip_aliases` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use.", - "type": "string" - }, - "clusterSecondaryRangeName": { - "description": "The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork. This field is only applicable with use_ip_aliases is true and create_subnetwork is false.", - "type": "string" - }, - "createSubnetwork": { - "description": "Whether a new subnetwork will be created automatically for the cluster. This field is only applicable when `use_ip_aliases` is true.", - "type": "boolean" - }, - "defaultPodIpv4RangeUtilization": { - "description": "Output only. The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", - "format": "double", - "readOnly": true, - "type": "number" - }, - "ipv6AccessType": { - "description": "The ipv6 access type (internal or external) when create_subnetwork is true", - "enum": [ - "IPV6_ACCESS_TYPE_UNSPECIFIED", - "INTERNAL", - "EXTERNAL" - ], - "enumDescriptions": [ - "Default value, will be defaulted as type external.", - "Access type internal (all v6 addresses are internal IPs)", - "Access type external (all v6 addresses are external IPs)" - ], - "type": "string" - }, - "networkTierConfig": { - "$ref": "NetworkTierConfig", - "description": "Cluster-level network tier configuration is used to determine the default network tier for external IP addresses on cluster resources, such as node pools and load balancers." - }, - "nodeIpv4Cidr": { - "deprecated": true, - "description": "This field is deprecated, use node_ipv4_cidr_block.", - "type": "string" - }, - "nodeIpv4CidrBlock": { - "description": "The IP address range of the instance IPs in this cluster. This is applicable only if `create_subnetwork` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use.", - "type": "string" - }, - "podCidrOverprovisionConfig": { - "$ref": "PodCIDROverprovisionConfig", - "description": "[PRIVATE FIELD] Pod CIDR size overprovisioning config for the cluster. Pod CIDR size per node depends on max_pods_per_node. By default, the value of max_pods_per_node is doubled and then rounded off to next power of 2 to get the size of pod CIDR block per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). This config can disable the doubling of IPs (we still round off to next power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is disabled." - }, - "servicesIpv4Cidr": { - "deprecated": true, - "description": "This field is deprecated, use services_ipv4_cidr_block.", - "type": "string" - }, - "servicesIpv4CidrBlock": { - "description": "The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when `use_ip_aliases` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use.", - "type": "string" - }, - "servicesIpv6CidrBlock": { - "description": "Output only. The services IPv6 CIDR block for the cluster.", - "readOnly": true, - "type": "string" - }, - "servicesSecondaryRangeName": { - "description": "The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. This field is only applicable with use_ip_aliases is true and create_subnetwork is false.", - "type": "string" - }, - "stackType": { - "description": "The IP stack type of the cluster", - "enum": [ - "STACK_TYPE_UNSPECIFIED", - "IPV4", - "IPV4_IPV6" - ], - "enumDescriptions": [ - "Default value, will be defaulted as IPV4 only", - "Cluster is IPV4 only", - "Cluster can use both IPv4 and IPv6" - ], - "type": "string" - }, - "subnetIpv6CidrBlock": { - "description": "Output only. The subnet's IPv6 CIDR block used by nodes and pods.", - "readOnly": true, - "type": "string" - }, - "subnetworkName": { - "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If this field is empty, then an automatic name will be chosen for the new subnetwork.", - "type": "string" - }, - "tpuIpv4CidrBlock": { - "deprecated": true, - "description": "The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when `use_ip_aliases` is true. If unspecified, the range will use the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25.", - "type": "string" - }, - "useIpAliases": { - "description": "Whether alias IPs will be used for pod IPs in the cluster. This is used in conjunction with use_routes. It cannot be true if use_routes is true. If both use_ip_aliases and use_routes are false, then the server picks the default IP allocation mode", - "type": "boolean" - }, - "useRoutes": { - "description": "Whether routes will be used for pod IPs in the cluster. This is used in conjunction with use_ip_aliases. It cannot be true if use_ip_aliases is true. If both use_ip_aliases and use_routes are false, then the server picks the default IP allocation mode", - "type": "boolean" - } - }, - "type": "object" - }, - "IPEndpointsConfig": { - "description": "IP endpoints configuration.", - "id": "IPEndpointsConfig", - "properties": { - "authorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "description": "Configuration of authorized networks. If enabled, restricts access to the control plane based on source IP. It is invalid to specify both Cluster.masterAuthorizedNetworksConfig and this field at the same time." - }, - "enablePublicEndpoint": { - "description": "Controls whether the control plane allows access through a public IP. It is invalid to specify both PrivateClusterConfig.enablePrivateEndpoint and this field at the same time.", - "type": "boolean" - }, - "enabled": { - "description": "Controls whether to allow direct IP access.", - "type": "boolean" - }, - "globalAccess": { - "description": "Controls whether the control plane's private endpoint is accessible from sources in other regions. It is invalid to specify both PrivateClusterMasterGlobalAccessConfig.enabled and this field at the same time.", - "type": "boolean" - }, - "privateEndpoint": { - "description": "Output only. The internal IP address of this cluster's control plane. Only populated if enabled.", - "readOnly": true, - "type": "string" - }, - "privateEndpointSubnetwork": { - "description": "Subnet to provision the master's private endpoint during cluster creation. Specified in projects/*/regions/*/subnetworks/* format. It is invalid to specify both PrivateClusterConfig.privateEndpointSubnetwork and this field at the same time.", - "type": "string" - }, - "publicEndpoint": { - "description": "Output only. The external IP address of this cluster's control plane. Only populated if enabled.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "IdentityServiceConfig": { - "description": "IdentityServiceConfig is configuration for Identity Service which allows customers to use external identity providers with the K8S API", - "id": "IdentityServiceConfig", - "properties": { - "enabled": { - "description": "Whether to enable the Identity Service component", - "type": "boolean" - } - }, - "type": "object" - }, - "IntraNodeVisibilityConfig": { - "description": "IntraNodeVisibilityConfig contains the desired config of the intra-node visibility on this cluster.", - "id": "IntraNodeVisibilityConfig", - "properties": { - "enabled": { - "description": "Enables intra node visibility for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "Jwk": { - "description": "Jwk is a JSON Web Key as specified in RFC 7517", - "id": "Jwk", - "properties": { - "alg": { - "description": "Algorithm.", - "type": "string" - }, - "crv": { - "description": "Used for ECDSA keys.", - "type": "string" - }, - "e": { - "description": "Used for RSA keys.", - "type": "string" - }, - "kid": { - "description": "Key ID.", - "type": "string" - }, - "kty": { - "description": "Key Type.", - "type": "string" - }, - "n": { - "description": "Used for RSA keys.", - "type": "string" - }, - "use": { - "description": "Permitted uses for the public keys.", - "type": "string" - }, - "x": { - "description": "Used for ECDSA keys.", - "type": "string" - }, - "y": { - "description": "Used for ECDSA keys.", - "type": "string" - } - }, - "type": "object" - }, - "K8sBetaAPIConfig": { - "description": "K8sBetaAPIConfig , configuration for beta APIs", - "id": "K8sBetaAPIConfig", - "properties": { - "enabledApis": { - "description": "Enabled k8s beta APIs.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "KubernetesDashboard": { - "description": "Configuration for the Kubernetes Dashboard.", - "id": "KubernetesDashboard", - "properties": { - "disabled": { - "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "LegacyAbac": { - "description": "Configuration for the legacy Attribute Based Access Control authorization mode.", - "id": "LegacyAbac", - "properties": { - "enabled": { - "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM.", - "type": "boolean" - } - }, - "type": "object" - }, - "LinuxNodeConfig": { - "description": "Parameters that can be configured on Linux nodes.", - "id": "LinuxNodeConfig", - "properties": { - "cgroupMode": { - "description": "cgroup_mode specifies the cgroup mode to be used on the node.", - "enum": [ - "CGROUP_MODE_UNSPECIFIED", - "CGROUP_MODE_V1", - "CGROUP_MODE_V2" - ], - "enumDescriptions": [ - "CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. The default for the GKE node OS image will be used.", - "CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on the node image.", - "CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on the node image." - ], - "type": "string" - }, - "hugepages": { - "$ref": "HugepagesConfig", - "description": "Optional. Amounts for 2M and 1G hugepages" - }, - "nodeKernelModuleLoading": { - "$ref": "NodeKernelModuleLoading", - "description": "Optional. Configuration for kernel module loading on nodes. When enabled, the node pool will be provisioned with a Container-Optimized OS image that enforces kernel module signature verification." - }, - "sysctls": { - "additionalProperties": { - "type": "string" - }, - "description": "The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall kernel.perf_event_paranoid kernel.sched_rt_runtime_us kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_background_bytes vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes", - "type": "object" - }, - "transparentHugepageDefrag": { - "description": "Optional. Defines the transparent hugepage defrag configuration on the node. VM hugepage allocation can be managed by either limiting defragmentation for delayed allocation or skipping it entirely for immediate allocation only. See https://docs.kernel.org/admin-guide/mm/transhuge.html for more details.", - "enum": [ - "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED", - "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS", - "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER", - "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE", - "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE", - "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER" - ], - "enumDescriptions": [ - "Default value. GKE will not modify the kernel configuration.", - "It means that an application requesting THP will stall on allocation failure and directly reclaim pages and compact memory in an effort to allocate a THP immediately.", - "It means that an application will wake kswapd in the background to reclaim pages and wake kcompactd to compact memory so that THP is available in the near future. It's the responsibility of khugepaged to then install the THP pages later.", - "It means that an application will enter direct reclaim and compaction like always, but only for regions that have used madvise(MADV_HUGEPAGE); all other regions will wake kswapd in the background to reclaim pages and wake kcompactd to compact memory so that THP is available in the near future.", - "It means that an application will enter direct reclaim like always but only for regions that are have used madvise(MADV_HUGEPAGE). This is the default kernel configuration.", - "It means that an application will never enter direct reclaim or compaction." - ], - "type": "string" - }, - "transparentHugepageEnabled": { - "description": "Optional. Transparent hugepage support for anonymous memory can be entirely disabled (mostly for debugging purposes) or only enabled inside MADV_HUGEPAGE regions (to avoid the risk of consuming more memory resources) or enabled system wide. See https://docs.kernel.org/admin-guide/mm/transhuge.html for more details.", - "enum": [ - "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED", - "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS", - "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE", - "TRANSPARENT_HUGEPAGE_ENABLED_NEVER" - ], - "enumDescriptions": [ - "Default value. GKE will not modify the kernel configuration.", - "Transparent hugepage support for anonymous memory is enabled system wide.", - "Transparent hugepage support for anonymous memory is enabled inside MADV_HUGEPAGE regions. This is the default kernel configuration.", - "Transparent hugepage support for anonymous memory is disabled." - ], - "type": "string" - } - }, - "type": "object" - }, - "ListClustersResponse": { - "description": "ListClustersResponse is the result of ListClustersRequest.", - "id": "ListClustersResponse", - "properties": { - "clusters": { - "description": "A list of clusters in the project in the specified zone, or across all ones.", - "items": { - "$ref": "Cluster" - }, - "type": "array" - }, - "missingZones": { - "description": "If any zones are listed here, the list of clusters returned may be missing those zones.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListNodePoolsResponse": { - "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", - "id": "ListNodePoolsResponse", - "properties": { - "nodePools": { - "description": "A list of node pools for a cluster.", - "items": { - "$ref": "NodePool" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListOperationsResponse": { - "description": "ListOperationsResponse is the result of ListOperationsRequest.", - "id": "ListOperationsResponse", - "properties": { - "missingZones": { - "description": "If any zones are listed here, the list of operations returned may be missing the operations from those zones.", - "items": { - "type": "string" - }, - "type": "array" - }, - "operations": { - "description": "A list of operations in the project in the specified zone.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListUsableSubnetworksResponse": { - "description": "ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest.", - "id": "ListUsableSubnetworksResponse", - "properties": { - "nextPageToken": { - "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than `page_size`, use the `next_page_token` as a value for the query parameter `page_token` in the next request. The value will become empty when there are no more pages.", - "type": "string" - }, - "subnetworks": { - "description": "A list of usable subnetworks in the specified network project.", - "items": { - "$ref": "UsableSubnetwork" - }, - "type": "array" - } - }, - "type": "object" - }, - "LocalNvmeSsdBlockConfig": { - "description": "LocalNvmeSsdBlockConfig contains configuration for using raw-block local NVMe SSDs", - "id": "LocalNvmeSsdBlockConfig", - "properties": { - "localSsdCount": { - "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" - } - }, - "type": "object" - }, - "LoggingComponentConfig": { - "description": "LoggingComponentConfig is cluster logging component configuration.", - "id": "LoggingComponentConfig", - "properties": { - "enableComponents": { - "description": "Select components to collect logs. An empty set would disable all logging.", - "items": { - "enum": [ - "COMPONENT_UNSPECIFIED", - "SYSTEM_COMPONENTS", - "WORKLOADS", - "APISERVER", - "SCHEDULER", - "CONTROLLER_MANAGER", - "KCP_SSHD", - "KCP_CONNECTION", - "KCP_HPA" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "system components", - "workloads", - "kube-apiserver", - "kube-scheduler", - "kube-controller-manager", - "kcp-sshd", - "kcp connection logs", - "horizontal pod autoscaler decision logs" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LoggingConfig": { - "description": "LoggingConfig is cluster logging configuration.", - "id": "LoggingConfig", - "properties": { - "componentConfig": { - "$ref": "LoggingComponentConfig", - "description": "Logging components configuration" - } - }, - "type": "object" - }, - "LoggingVariantConfig": { - "description": "LoggingVariantConfig specifies the behaviour of the logging component.", - "id": "LoggingVariantConfig", - "properties": { - "variant": { - "description": "Logging variant deployed on nodes.", - "enum": [ - "VARIANT_UNSPECIFIED", - "DEFAULT", - "MAX_THROUGHPUT" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "default logging variant.", - "maximum logging throughput variant." - ], - "type": "string" - } - }, - "type": "object" - }, - "LustreCsiDriverConfig": { - "description": "Configuration for the Lustre CSI driver.", - "id": "LustreCsiDriverConfig", - "properties": { - "enableLegacyLustrePort": { - "deprecated": true, - "description": "If set to true, the Lustre CSI driver will install Lustre kernel modules using port 6988. This serves as a workaround for a port conflict with the gke-metadata-server. This field is required ONLY under the following conditions: 1. The GKE node version is older than 1.33.2-gke.4655000. 2. You're connecting to a Lustre instance that has the 'gke-support-enabled' flag. Deprecated: This flag is no longer required as of GKE node version 1.33.2-gke.4655000, unless you are connecting to a Lustre instance that has the `gke-support-enabled` flag.", - "type": "boolean" - }, - "enabled": { - "description": "Whether the Lustre CSI driver is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "MaintenanceExclusionOptions": { - "description": "Represents the Maintenance exclusion option.", - "id": "MaintenanceExclusionOptions", - "properties": { - "endTimeBehavior": { - "description": "EndTimeBehavior specifies the behavior of the exclusion end time.", - "enum": [ - "END_TIME_BEHAVIOR_UNSPECIFIED", - "UNTIL_END_OF_SUPPORT" - ], - "enumDescriptions": [ - "END_TIME_BEHAVIOR_UNSPECIFIED is the default behavior, which is fixed end time.", - "UNTIL_END_OF_SUPPORT means the exclusion will be in effect until the end of the support of the cluster's current version." - ], - "type": "string" - }, - "scope": { - "description": "Scope specifies the upgrade scope which upgrades are blocked by the exclusion.", - "enum": [ - "NO_UPGRADES", - "NO_MINOR_UPGRADES", - "NO_MINOR_OR_NODE_UPGRADES" - ], - "enumDescriptions": [ - "NO_UPGRADES excludes all upgrades, including patch upgrades and minor upgrades across control planes and nodes. This is the default exclusion behavior.", - "NO_MINOR_UPGRADES excludes all minor upgrades for the cluster, only patches are allowed.", - "NO_MINOR_OR_NODE_UPGRADES excludes all minor upgrades for the cluster, and also exclude all node pool upgrades. Only control plane patches are allowed." - ], - "type": "string" - } - }, - "type": "object" - }, - "MaintenancePolicy": { - "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", - "id": "MaintenancePolicy", - "properties": { - "resourceVersion": { - "description": "A hash identifying the version of this policy, so that updates to fields of the policy won't accidentally undo intermediate changes (and so that users of the API unaware of some fields won't accidentally remove other fields). Make a `get()` request to the cluster to get the current resource version and include it with requests to set the policy.", - "type": "string" - }, - "window": { - "$ref": "MaintenanceWindow", - "description": "Specifies the maintenance window in which maintenance may be performed." - } - }, - "type": "object" - }, - "MaintenanceWindow": { - "description": "MaintenanceWindow defines the maintenance window to be used for the cluster.", - "id": "MaintenanceWindow", - "properties": { - "dailyMaintenanceWindow": { - "$ref": "DailyMaintenanceWindow", - "description": "DailyMaintenanceWindow specifies a daily maintenance operation window." - }, - "maintenanceExclusions": { - "additionalProperties": { - "$ref": "TimeWindow" - }, - "description": "Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows.", - "type": "object" - }, - "recurringWindow": { - "$ref": "RecurringTimeWindow", - "description": "RecurringWindow specifies some number of recurring time periods for maintenance to occur. The time windows may be overlapping. If no maintenance windows are set, maintenance can occur at any time." - } - }, - "type": "object" - }, - "ManagedPrometheusConfig": { - "description": "ManagedPrometheusConfig defines the configuration for Google Cloud Managed Service for Prometheus.", - "id": "ManagedPrometheusConfig", - "properties": { - "autoMonitoringConfig": { - "$ref": "AutoMonitoringConfig", - "description": "GKE Workload Auto-Monitoring Configuration." - }, - "enabled": { - "description": "Enable Managed Collection.", - "type": "boolean" - } - }, - "type": "object" - }, - "MasterAuth": { - "description": "The authentication information for accessing the master endpoint. Authentication can be done using HTTP basic auth or using client certificates.", - "id": "MasterAuth", - "properties": { - "clientCertificate": { - "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. Issued only if client_certificate_config is set.", - "readOnly": true, - "type": "string" - }, - "clientCertificateConfig": { - "$ref": "ClientCertificateConfig", - "description": "Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued." - }, - "clientKey": { - "description": "Output only. Base64-encoded private key used by clients to authenticate to the cluster endpoint.", - "readOnly": true, - "type": "string" - }, - "clusterCaCertificate": { - "description": "Output only. Base64-encoded public certificate that is the root of trust for the cluster.", - "readOnly": true, - "type": "string" - }, - "password": { - "deprecated": true, - "description": "The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password. If a password is provided for cluster creation, username must be non-empty. Warning: basic authentication is deprecated, and will be removed in GKE control plane versions 1.19 and newer. For a list of recommended authentication methods, see: https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication", - "type": "string" - }, - "username": { - "deprecated": true, - "description": "The username to use for HTTP basic authentication to the master endpoint. For clusters v1.6.0 and later, basic authentication can be disabled by leaving username unspecified (or setting it to the empty string). Warning: basic authentication is deprecated, and will be removed in GKE control plane versions 1.19 and newer. For a list of recommended authentication methods, see: https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication", - "type": "string" - } - }, - "type": "object" - }, - "MasterAuthorizedNetworksConfig": { - "description": "Configuration options for the master authorized networks feature. Enabled master authorized networks will disallow all external traffic to access Kubernetes master through HTTPS except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs.", - "id": "MasterAuthorizedNetworksConfig", - "properties": { - "cidrBlocks": { - "description": "cidr_blocks define up to 50 external networks that could access Kubernetes master through HTTPS.", - "items": { - "$ref": "CidrBlock" - }, - "type": "array" - }, - "enabled": { - "description": "Whether or not master authorized networks is enabled.", - "type": "boolean" - }, - "gcpPublicCidrsAccessEnabled": { - "description": "Whether master is accessible via Google Compute Engine Public IP addresses.", - "type": "boolean" - }, - "privateEndpointEnforcementEnabled": { - "description": "Whether master authorized networks is enforced on private endpoint or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "MaxPodsConstraint": { - "description": "Constraints applied to pods.", - "id": "MaxPodsConstraint", - "properties": { - "maxPodsPerNode": { - "description": "Constraint enforced on the max num of pods per node.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "MemoryManager": { - "description": "The option enables the Kubernetes NUMA-aware Memory Manager feature. Detailed description about the feature can be found [here](https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/).", - "id": "MemoryManager", - "properties": { - "policy": { - "description": "Controls the memory management policy on the Node. See https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies The following values are allowed. * \"none\" * \"static\" The default value is 'none' if unspecified.", - "type": "string" - } - }, - "type": "object" - }, - "MeshCertificates": { - "description": "Configuration for issuance of mTLS keys and certificates to Kubernetes pods.", - "id": "MeshCertificates", - "properties": { - "enableCertificates": { - "description": "enable_certificates controls issuance of workload mTLS certificates. If set, the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster, which can then be configured by creating a WorkloadCertificateConfig Custom Resource. Requires Workload Identity (workload_pool must be non-empty).", - "type": "boolean" - } - }, - "type": "object" - }, - "Metric": { - "description": "Progress metric is (string, int|float|string) pair.", - "id": "Metric", - "properties": { - "doubleValue": { - "description": "For metrics with floating point value.", - "format": "double", - "type": "number" - }, - "intValue": { - "description": "For metrics with integer value.", - "format": "int64", - "type": "string" - }, - "name": { - "description": "Required. Metric name, e.g., \"nodes total\", \"percent done\".", - "type": "string" - }, - "stringValue": { - "description": "For metrics with custom values (ratios, visual progress, etc.).", - "type": "string" - } - }, - "type": "object" - }, - "MonitoringComponentConfig": { - "description": "MonitoringComponentConfig is cluster monitoring component configuration.", - "id": "MonitoringComponentConfig", - "properties": { - "enableComponents": { - "description": "Select components to collect metrics. An empty set would disable all monitoring.", - "items": { - "enum": [ - "COMPONENT_UNSPECIFIED", - "SYSTEM_COMPONENTS", - "APISERVER", - "SCHEDULER", - "CONTROLLER_MANAGER", - "STORAGE", - "HPA", - "POD", - "DAEMONSET", - "DEPLOYMENT", - "STATEFULSET", - "CADVISOR", - "KUBELET", - "DCGM", - "JOBSET" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "system components", - "kube-apiserver", - "kube-scheduler", - "kube-controller-manager", - "Storage", - "Horizontal Pod Autoscaling", - "Pod", - "DaemonSet", - "Deployment", - "Statefulset", - "CADVISOR", - "KUBELET", - "NVIDIA Data Center GPU Manager (DCGM)", - "JobSet" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MonitoringConfig": { - "description": "MonitoringConfig is cluster monitoring configuration.", - "id": "MonitoringConfig", - "properties": { - "advancedDatapathObservabilityConfig": { - "$ref": "AdvancedDatapathObservabilityConfig", - "description": "Configuration of Advanced Datapath Observability features." - }, - "componentConfig": { - "$ref": "MonitoringComponentConfig", - "description": "Monitoring components configuration" - }, - "managedPrometheusConfig": { - "$ref": "ManagedPrometheusConfig", - "description": "Enable Google Cloud Managed Service for Prometheus in the cluster." - } - }, - "type": "object" - }, - "NetworkConfig": { - "description": "NetworkConfig reports the relative names of network \u0026 subnetwork.", - "id": "NetworkConfig", - "properties": { - "datapathProvider": { - "description": "The desired datapath provider for this cluster. By default, uses the IPTables-based kube-proxy implementation.", - "enum": [ - "DATAPATH_PROVIDER_UNSPECIFIED", - "LEGACY_DATAPATH", - "ADVANCED_DATAPATH" - ], - "enumDescriptions": [ - "Default value.", - "Use the IPTables implementation based on kube-proxy.", - "Use the eBPF based GKE Dataplane V2 with additional features. See the [GKE Dataplane V2 documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/dataplane-v2) for more." - ], - "type": "string" - }, - "defaultEnablePrivateNodes": { - "description": "Controls whether by default nodes have private IP addresses only. It is invalid to specify both PrivateClusterConfig.enablePrivateNodes and this field at the same time. To update the default setting, use ClusterUpdate.desired_default_enable_private_nodes", - "type": "boolean" - }, - "defaultSnatStatus": { - "$ref": "DefaultSnatStatus", - "description": "Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when default_snat_status is disabled. When disabled is set to false, default IP masquerade rules will be applied to the nodes to prevent sNAT on cluster internal traffic." - }, - "disableL4LbFirewallReconciliation": { - "description": "Disable L4 load balancer VPC firewalls to enable firewall policies.", - "type": "boolean" - }, - "dnsConfig": { - "$ref": "DNSConfig", - "description": "DNSConfig contains clusterDNS config for this cluster." - }, - "enableCiliumClusterwideNetworkPolicy": { - "description": "Whether CiliumClusterwideNetworkPolicy is enabled on this cluster.", - "type": "boolean" - }, - "enableFqdnNetworkPolicy": { - "description": "Whether FQDN Network Policy is enabled on this cluster.", - "type": "boolean" - }, - "enableIntraNodeVisibility": { - "description": "Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.", - "type": "boolean" - }, - "enableL4ilbSubsetting": { - "description": "Whether L4ILB Subsetting is enabled for this cluster.", - "type": "boolean" - }, - "enableMultiNetworking": { - "description": "Whether multi-networking is enabled for this cluster.", - "type": "boolean" - }, - "gatewayApiConfig": { - "$ref": "GatewayAPIConfig", - "description": "GatewayAPIConfig contains the desired config of Gateway API on this cluster." - }, - "inTransitEncryptionConfig": { - "description": "Specify the details of in-transit encryption. Now named inter-node transparent 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", - "readOnly": true, - "type": "string" - }, - "networkPerformanceConfig": { - "$ref": "ClusterNetworkPerformanceConfig", - "description": "Network bandwidth tier configuration." - }, - "privateIpv6GoogleAccess": { - "description": "The desired state of IPv6 connectivity to Google Services. By default, no private IPv6 access to or from Google Services (all access will be via IPv4)", - "enum": [ - "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED", - "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED", - "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE", - "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - ], - "enumDescriptions": [ - "Default value. Same as DISABLED", - "No private access to or from Google Services", - "Enables private IPv6 access to Google Services from GKE", - "Enables private IPv6 access to and from Google Services" - ], - "type": "string" - }, - "serviceExternalIpsConfig": { - "$ref": "ServiceExternalIPsConfig", - "description": "ServiceExternalIPsConfig specifies if services with externalIPs field are blocked or not." - }, - "subnetwork": { - "description": "Output only. The relative name of the Google Compute Engine [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "NetworkPerformanceConfig": { - "description": "Configuration of all network bandwidth tiers", - "id": "NetworkPerformanceConfig", - "properties": { - "totalEgressBandwidthTier": { - "description": "Specifies the total network bandwidth tier for the NodePool.", - "enum": [ - "TIER_UNSPECIFIED", - "TIER_1" - ], - "enumDescriptions": [ - "Default value", - "Higher bandwidth, actual values based on VM size." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicy": { - "description": "Configuration options for the NetworkPolicy feature. https://kubernetes.io/docs/concepts/services-networking/networkpolicies/", - "id": "NetworkPolicy", - "properties": { - "enabled": { - "description": "Whether network policy is enabled on the cluster.", - "type": "boolean" - }, - "provider": { - "description": "The selected network policy provider.", - "enum": [ - "PROVIDER_UNSPECIFIED", - "CALICO" - ], - "enumDescriptions": [ - "Not set", - "Tigera (Calico Felix)." - ], - "type": "string" - } - }, - "type": "object" - }, - "NetworkPolicyConfig": { - "description": "Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes.", - "id": "NetworkPolicyConfig", - "properties": { - "disabled": { - "description": "Whether NetworkPolicy is enabled for this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "NetworkTags": { - "description": "Collection of Compute Engine network tags that can be applied to a node's underlying VM instance.", - "id": "NetworkTags", - "properties": { - "tags": { - "description": "List of network tags.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NetworkTierConfig": { - "description": "NetworkTierConfig contains network tier information.", - "id": "NetworkTierConfig", - "properties": { - "networkTier": { - "description": "Network tier configuration.", - "enum": [ - "NETWORK_TIER_UNSPECIFIED", - "NETWORK_TIER_DEFAULT", - "NETWORK_TIER_PREMIUM", - "NETWORK_TIER_STANDARD" - ], - "enumDescriptions": [ - "By default, use project-level configuration. When unspecified, the behavior defaults to NETWORK_TIER_DEFAULT. For cluster updates, this implies no action (no-op).", - "Default network tier. Use project-level configuration. User can specify this value, meaning they want to keep the same behaviour as before cluster level network tier configuration is introduced. This field ensures backward compatibility for the network tier of cluster resources, such as node pools and load balancers, for their external IP addresses.", - "Premium network tier.", - "Standard network tier." - ], - "type": "string" - } - }, - "type": "object" - }, - "NodeAffinity": { - "description": "Specifies the NodeAffinity key, values, and affinity operator according to [shared sole tenant node group affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity).", - "id": "NodeAffinity", - "properties": { - "key": { - "description": "Key for NodeAffinity.", - "type": "string" - }, - "operator": { - "description": "Operator for NodeAffinity.", - "enum": [ - "OPERATOR_UNSPECIFIED", - "IN", - "NOT_IN" - ], - "enumDescriptions": [ - "Invalid or unspecified affinity operator.", - "Affinity operator.", - "Anti-affinity operator." - ], - "type": "string" - }, - "values": { - "description": "Values for NodeAffinity.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeConfig": { - "description": "Parameters that describe the nodes in a cluster. GKE Autopilot clusters do not recognize parameters in `NodeConfig`. Use AutoprovisioningNodePoolDefaults instead.", - "id": "NodeConfig", - "properties": { - "accelerators": { - "description": "A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "advancedMachineFeatures": { - "$ref": "AdvancedMachineFeatures", - "description": "Advanced features for the Compute Engine VM." - }, - "bootDisk": { - "$ref": "BootDisk", - "description": "The boot disk configuration for the node pool." - }, - "bootDiskKmsKey": { - "description": " The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption", - "type": "string" - }, - "confidentialNodes": { - "$ref": "ConfidentialNodes", - "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." - }, - "containerdConfig": { - "$ref": "ContainerdConfig", - "description": "Parameters for containerd customization." - }, - "diskSizeGb": { - "description": "Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB.", - "format": "int32", - "type": "integer" - }, - "diskType": { - "description": "Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is 'pd-standard'", - "type": "string" - }, - "effectiveCgroupMode": { - "description": "Output only. effective_cgroup_mode is the cgroup mode actually used by the node pool. It is determined by the cgroup mode specified in the LinuxNodeConfig or the default cgroup mode based on the cluster creation version.", - "enum": [ - "EFFECTIVE_CGROUP_MODE_UNSPECIFIED", - "EFFECTIVE_CGROUP_MODE_V1", - "EFFECTIVE_CGROUP_MODE_V2" - ], - "enumDescriptions": [ - "EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the node pool is unspecified, i.e. the node pool is a Windows node pool.", - "CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the cgroup configuration.", - "CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the cgroup configuration." - ], - "readOnly": true, - "type": "string" - }, - "enableConfidentialStorage": { - "description": "Optional. Reserved for future use.", - "type": "boolean" - }, - "ephemeralStorageLocalSsdConfig": { - "$ref": "EphemeralStorageLocalSsdConfig", - "description": "Parameters for the node ephemeral storage using Local SSDs. If unspecified, ephemeral storage is backed by the boot disk." - }, - "fastSocket": { - "$ref": "FastSocket", - "description": "Enable or disable NCCL fast socket for the node pool." - }, - "flexStart": { - "description": "Flex Start flag for enabling Flex Start VM.", - "type": "boolean" - }, - "gcfsConfig": { - "$ref": "GcfsConfig", - "description": "Google Container File System (image streaming) configs." - }, - "gvnic": { - "$ref": "VirtualNIC", - "description": "Enable or disable gvnic in the node pool." - }, - "imageType": { - "description": "The image type to use for this node. Note that for a given image type, the latest version of it will be used. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.", - "type": "string" - }, - "kubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "Node kubelet configs." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", - "type": "object" - }, - "linuxNodeConfig": { - "$ref": "LinuxNodeConfig", - "description": "Parameters that can be configured on Linux nodes." - }, - "localNvmeSsdBlockConfig": { - "$ref": "LocalNvmeSsdBlockConfig", - "description": "Parameters for using raw-block Local NVMe SSDs." - }, - "localSsdCount": { - "description": "The number of local 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.", - "format": "int32", - "type": "integer" - }, - "localSsdEncryptionMode": { - "description": "Specifies which method should be used for encrypting the Local SSDs attached to the node.", - "enum": [ - "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED", - "STANDARD_ENCRYPTION", - "EPHEMERAL_KEY_ENCRYPTION" - ], - "enumDescriptions": [ - "The given node will be encrypted using keys managed by Google infrastructure and the keys will be deleted when the node is deleted.", - "The given node will be encrypted using keys managed by Google infrastructure and the keys will be deleted when the node is deleted.", - "The given node will opt-in for using ephemeral key for encryption of Local SSDs. The Local SSDs will not be able to recover data in case of node crash." - ], - "type": "string" - }, - "loggingConfig": { - "$ref": "NodePoolLoggingConfig", - "description": "Logging configuration." - }, - "machineType": { - "description": "The name of a Google Compute Engine [machine type](https://cloud.google.com/compute/docs/machine-types) If unspecified, the default machine type is `e2-medium`.", - "type": "string" - }, - "maxRunDuration": { - "description": "The maximum duration for the nodes to exist. If unspecified, the nodes can exist indefinitely.", - "format": "google-duration", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the reserved keys: - \"cluster-location\" - \"cluster-name\" - \"cluster-uid\" - \"configure-sh\" - \"containerd-configure-sh\" - \"enable-os-login\" - \"gci-ensure-gke-docker\" - \"gci-metrics-enabled\" - \"gci-update-strategy\" - \"instance-template\" - \"kube-env\" - \"startup-script\" - \"user-data\" - \"disable-address-manager\" - \"windows-startup-script-ps1\" - \"common-psm1\" - \"k8s-node-setup-psm1\" - \"install-ssh-psm1\" - \"user-profile-psm1\" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB.", - "type": "object" - }, - "minCpuPlatform": { - "description": "Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. Applicable values are the friendly names of CPU platforms, such as `minCpuPlatform: \"Intel Haswell\"` or `minCpuPlatform: \"Intel Sandy Bridge\"`. For more information, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)", - "type": "string" - }, - "nodeGroup": { - "description": "Setting this field will assign instances of this pool to run on the specified node group. This is useful for running workloads on [sole tenant nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes).", - "type": "string" - }, - "oauthScopes": { - "description": "The set of Google API scopes to be made available on all of the node VMs under the \"default\" service account. The following scopes are recommended, but not required, and by default are not included: * `https://www.googleapis.com/auth/compute` is required for mounting persistent storage on your nodes. * `https://www.googleapis.com/auth/devstorage.read_only` is required for communicating with **gcr.io** (the [Artifact Registry](https://cloud.google.com/artifact-registry/)). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added.", - "items": { - "type": "string" - }, - "type": "array" - }, - "preemptible": { - "description": "Whether the nodes are created as preemptible VM instances. See: https://cloud.google.com/compute/docs/instances/preemptible for more information about preemptible VM instances.", - "type": "boolean" - }, - "reservationAffinity": { - "$ref": "ReservationAffinity", - "description": "The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this node pool." - }, - "resourceLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources.", - "type": "object" - }, - "resourceManagerTags": { - "$ref": "ResourceManagerTags", - "description": "A map of resource manager tag keys and values to be attached to the nodes." - }, - "sandboxConfig": { - "$ref": "SandboxConfig", - "description": "Sandbox configuration for this node." - }, - "secondaryBootDiskUpdateStrategy": { - "$ref": "SecondaryBootDiskUpdateStrategy", - "description": "Secondary boot disk update strategy." - }, - "secondaryBootDisks": { - "description": "List of secondary boot disks attached to the nodes.", - "items": { - "$ref": "SecondaryBootDisk" - }, - "type": "array" - }, - "serviceAccount": { - "description": "The Google Cloud Platform Service Account to be used by the node VMs. Specify the email address of the Service Account; otherwise, if no Service Account is specified, the \"default\" service account is used.", - "type": "string" - }, - "shieldedInstanceConfig": { - "$ref": "ShieldedInstanceConfig", - "description": "Shielded Instance options." - }, - "soleTenantConfig": { - "$ref": "SoleTenantConfig", - "description": "Parameters for node pools to be backed by shared sole tenant node groups." - }, - "spot": { - "description": "Spot flag for enabling Spot VM, which is a rebrand of the existing preemptible flag.", - "type": "boolean" - }, - "storagePools": { - "description": "List of Storage Pools where boot disks are provisioned.", - "items": { - "type": "string" - }, - "type": "array" - }, - "tags": { - "description": "The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035.", - "items": { - "type": "string" - }, - "type": "array" - }, - "taints": { - "description": "List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/", - "items": { - "$ref": "NodeTaint" - }, - "type": "array" - }, - "windowsNodeConfig": { - "$ref": "WindowsNodeConfig", - "description": "Parameters that can be configured on Windows nodes." - }, - "workloadMetadataConfig": { - "$ref": "WorkloadMetadataConfig", - "description": "The workload metadata configuration for this node." - } - }, - "type": "object" - }, - "NodeConfigDefaults": { - "description": "Subset of NodeConfig message that has defaults.", - "id": "NodeConfigDefaults", - "properties": { - "containerdConfig": { - "$ref": "ContainerdConfig", - "description": "Parameters for containerd customization." - }, - "gcfsConfig": { - "$ref": "GcfsConfig", - "description": "GCFS (Google Container File System, also known as Riptide) options." - }, - "loggingConfig": { - "$ref": "NodePoolLoggingConfig", - "description": "Logging configuration for node pools." - }, - "nodeKubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "NodeKubeletConfig controls the defaults for new node-pools. Currently only `insecure_kubelet_readonly_port_enabled` can be set here." - } - }, - "type": "object" - }, - "NodeKernelModuleLoading": { - "description": "Configuration for kernel module loading on nodes.", - "id": "NodeKernelModuleLoading", - "properties": { - "policy": { - "description": "Set the node module loading policy for nodes in the node pool.", - "enum": [ - "POLICY_UNSPECIFIED", - "ENFORCE_SIGNED_MODULES", - "DO_NOT_ENFORCE_SIGNED_MODULES" - ], - "enumDescriptions": [ - "Default behavior. GKE selects the image based on node type. For CPU and TPU nodes, the image will not allow loading external kernel modules. For GPU nodes, the image will allow loading any module, whether it is signed or not.", - "Enforced signature verification: Node pools will use a Container-Optimized OS image configured to allow loading of *Google-signed* external kernel modules. Loadpin is enabled but configured to exclude modules, and kernel module signature checking is enforced.", - "Mirrors existing DEFAULT behavior: For CPU and TPU nodes, the image will not allow loading external kernel modules. For GPU nodes, the image will allow loading any module, whether it is signed or not." - ], - "type": "string" - } - }, - "type": "object" - }, - "NodeKubeletConfig": { - "description": "Node kubelet configs.", - "id": "NodeKubeletConfig", - "properties": { - "allowedUnsafeSysctls": { - "description": "Optional. Defines a comma-separated allowlist of unsafe sysctls or sysctl patterns (ending in `*`). The unsafe namespaced sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`, and `net.*`. Leaving this allowlist empty means they cannot be set on Pods. To allow certain sysctls or sysctl patterns to be set on Pods, list them separated by commas. For example: `kernel.msg*,net.ipv4.route.min_pmtu`. See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "containerLogMaxFiles": { - "description": "Optional. Defines the maximum number of container log files that can be present for a container. See https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation The value must be an integer between 2 and 10, inclusive. The default value is 5 if unspecified.", - "format": "int32", - "type": "integer" - }, - "containerLogMaxSize": { - "description": "Optional. Defines the maximum size of the container log file before it is rotated. See https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are Ki, Mi, Gi. The value must be between 10Mi and 500Mi, inclusive. Note that the total container log size (container_log_max_size * container_log_max_files) cannot exceed 1% of the total storage of the node, to avoid disk pressure caused by log files. The default value is 10Mi if unspecified.", - "type": "string" - }, - "cpuCfsQuota": { - "description": "Enable CPU CFS quota enforcement for containers that specify CPU limits. This option is enabled by default which makes kubelet use CFS quota (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to enforce container CPU limits. Otherwise, CPU limits will not be enforced at all. Disable this option to mitigate CPU throttling problems while still having your pods to be in Guaranteed QoS class by specifying the CPU limits. The default value is 'true' if unspecified.", - "type": "boolean" - }, - "cpuCfsQuotaPeriod": { - "description": "Set the CPU CFS quota period value 'cpu.cfs_period_us'. The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as \"300ms\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\". The value must be a positive duration between 1ms and 1 second, inclusive.", - "type": "string" - }, - "cpuManagerPolicy": { - "description": "Control the CPU management policy on the node. See https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ The following values are allowed. * \"none\": the default, which represents the existing scheduling behavior. * \"static\": allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. The default value is 'none' if unspecified.", - "type": "string" - }, - "evictionMaxPodGracePeriodSeconds": { - "description": "Optional. eviction_max_pod_grace_period_seconds is the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's terminationGracePeriodSeconds value during soft evictions. Default: 0. Range: [0, 300].", - "format": "int32", - "type": "integer" - }, - "evictionMinimumReclaim": { - "$ref": "EvictionMinimumReclaim", - "description": "Optional. eviction_minimum_reclaim is a map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure." - }, - "evictionSoft": { - "$ref": "EvictionSignals", - "description": "Optional. eviction_soft is a map of signal names to quantities that defines soft eviction thresholds. Each signal is compared to its corresponding threshold to determine if a pod eviction should occur." - }, - "evictionSoftGracePeriod": { - "$ref": "EvictionGracePeriod", - "description": "Optional. eviction_soft_grace_period is a map of signal names to quantities that defines grace periods for each soft eviction signal. The grace period is the amount of time that a pod must be under pressure before an eviction occurs." - }, - "imageGcHighThresholdPercent": { - "description": "Optional. Defines the percent of disk usage after which image garbage collection is always run. The percent is calculated as this field value out of 100. The value must be between 10 and 85, inclusive and greater than image_gc_low_threshold_percent. The default value is 85 if unspecified.", - "format": "int32", - "type": "integer" - }, - "imageGcLowThresholdPercent": { - "description": "Optional. Defines the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated as this field value out of 100. The value must be between 10 and 85, inclusive and smaller than image_gc_high_threshold_percent. The default value is 80 if unspecified.", - "format": "int32", - "type": "integer" - }, - "imageMaximumGcAge": { - "description": "Optional. Defines the maximum age an image can be unused before it is garbage collected. The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as \"300s\", \"1.5h\", and \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\". The value must be a positive duration greater than image_minimum_gc_age or \"0s\". The default value is \"0s\" if unspecified, which disables this field, meaning images won't be garbage collected based on being unused for too long.", - "type": "string" - }, - "imageMinimumGcAge": { - "description": "Optional. Defines the minimum age for an unused image before it is garbage collected. The string must be a sequence of decimal numbers, each with optional fraction and a unit suffix, such as \"300s\", \"1.5h\", and \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\". The value must be a positive duration less than or equal to 2 minutes. The default value is \"2m0s\" if unspecified.", - "type": "string" - }, - "insecureKubeletReadonlyPortEnabled": { - "description": "Enable or disable Kubelet read only port.", - "type": "boolean" - }, - "maxParallelImagePulls": { - "description": "Optional. Defines the maximum number of image pulls in parallel. The range is 2 to 5, inclusive. The default value is 2 or 3 depending on the disk type. See https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls for more details.", - "format": "int32", - "type": "integer" - }, - "memoryManager": { - "$ref": "MemoryManager", - "description": "Optional. Controls NUMA-aware Memory Manager configuration on the node. For more information, see: https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/" - }, - "podPidsLimit": { - "description": "Set the Pod PID limits. See https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits Controls the maximum number of processes allowed to run in a pod. The value must be greater than or equal to 1024 and less than 4194304.", - "format": "int64", - "type": "string" - }, - "singleProcessOomKill": { - "description": "Optional. Defines whether to enable single process OOM killer. If true, will prevent the memory.oom.group flag from being set for container cgroups in cgroups v2. This causes processes in the container to be OOM killed individually instead of as a group.", - "type": "boolean" - }, - "topologyManager": { - "$ref": "TopologyManager", - "description": "Optional. Controls Topology Manager configuration on the node. For more information, see: https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/" - } - }, - "type": "object" - }, - "NodeLabels": { - "description": "Collection of node-level [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).", - "id": "NodeLabels", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Map of node label keys and node label values.", - "type": "object" - } - }, - "type": "object" - }, - "NodeManagement": { - "description": "NodeManagement defines the set of node management services turned on for the node pool.", - "id": "NodeManagement", - "properties": { - "autoRepair": { - "description": "A flag that specifies whether the node auto-repair is enabled for the node pool. If enabled, the nodes in this node pool will be monitored and, if they fail health checks too many times, an automatic repair action will be triggered.", - "type": "boolean" - }, - "autoUpgrade": { - "description": "A flag that specifies whether node auto-upgrade is enabled for the node pool. If enabled, node auto-upgrade helps keep the nodes in your node pool up to date with the latest release version of Kubernetes.", - "type": "boolean" - }, - "upgradeOptions": { - "$ref": "AutoUpgradeOptions", - "description": "Specifies the Auto Upgrade knobs for the node pool." - } - }, - "type": "object" - }, - "NodeNetworkConfig": { - "description": "Parameters for node pool-level network config.", - "id": "NodeNetworkConfig", - "properties": { - "additionalNodeNetworkConfigs": { - "description": "We specify the additional node networks for this node pool using this list. Each node network corresponds to an additional interface", - "items": { - "$ref": "AdditionalNodeNetworkConfig" - }, - "type": "array" - }, - "additionalPodNetworkConfigs": { - "description": "We specify the additional pod networks for this node pool using this list. Each pod network corresponds to an additional alias IP range for the node", - "items": { - "$ref": "AdditionalPodNetworkConfig" - }, - "type": "array" - }, - "createPodRange": { - "description": "Input only. Whether to create a new range for pod IPs in this node pool. Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they are not specified. If neither `create_pod_range` or `pod_range` are specified, the cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is used. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.", - "type": "boolean" - }, - "enablePrivateNodes": { - "description": "Whether nodes have internal IP addresses only. If enable_private_nodes is not specified, then the value is derived from Cluster.NetworkConfig.default_enable_private_nodes", - "type": "boolean" - }, - "networkPerformanceConfig": { - "$ref": "NetworkPerformanceConfig", - "description": "Network bandwidth tier configuration." - }, - "networkTierConfig": { - "$ref": "NetworkTierConfig", - "description": "Output only. The network tier configuration for the node pool inherits from the cluster-level configuration and remains immutable throughout the node pool's lifecycle, including during upgrades.", - "readOnly": true - }, - "podCidrOverprovisionConfig": { - "$ref": "PodCIDROverprovisionConfig", - "description": "[PRIVATE FIELD] Pod CIDR size overprovisioning config for the nodepool. Pod CIDR size per node depends on max_pods_per_node. By default, the value of max_pods_per_node is rounded off to next power of 2 and we then double that to get the size of pod CIDR block per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). This config can disable the doubling of IPs (we still round off to next power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is disabled." - }, - "podIpv4CidrBlock": { - "description": "The IP address range for pod IPs in this node pool. Only applicable if `create_pod_range` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) to pick a specific range to use. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.", - "type": "string" - }, - "podIpv4RangeUtilization": { - "description": "Output only. The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", - "format": "double", - "readOnly": true, - "type": "number" - }, - "podRange": { - "description": "The ID of the secondary range for pod IPs. If `create_pod_range` is true, this ID is used for the new range. If `create_pod_range` is false, uses an existing secondary range with this ID. Only applicable if `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed after the node pool has been created.", - "type": "string" - }, - "subnetwork": { - "description": "Output only. The subnetwork path for the node pool. Format: projects/{project}/regions/{region}/subnetworks/{subnetwork} If the cluster is associated with multiple subnetworks, the subnetwork for the node pool is picked based on the IP utilization during node pool creation and is immutable.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "NodePool": { - "description": "NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.", - "id": "NodePool", - "properties": { - "autopilotConfig": { - "$ref": "AutopilotConfig", - "description": "Specifies the autopilot configuration for this node pool. This field is exclusively reserved for Cluster Autoscaler." - }, - "autoscaling": { - "$ref": "NodePoolAutoscaling", - "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present." - }, - "bestEffortProvisioning": { - "$ref": "BestEffortProvisioning", - "description": "Enable best effort provisioning for nodes" - }, - "conditions": { - "description": "Which conditions caused the current node pool state.", - "items": { - "$ref": "StatusCondition" - }, - "type": "array" - }, - "config": { - "$ref": "NodeConfig", - "description": "The node configuration of the pool." - }, - "etag": { - "description": "This checksum is computed by the server based on the value of node pool fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding.", - "type": "string" - }, - "initialNodeCount": { - "description": "The initial node count for the pool. You must ensure that your Compute Engine [resource quota](https://cloud.google.com/compute/quotas) is sufficient for this number of instances. You must also have available firewall and routes quota.", - "format": "int32", - "type": "integer" - }, - "instanceGroupUrls": { - "description": "Output only. The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "locations": { - "description": "The list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the NodePool's nodes should be located. If this value is unspecified during node pool creation, the [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) value will be used, instead. Warning: changing node pool locations will result in nodes being added and/or removed.", - "items": { - "type": "string" - }, - "type": "array" - }, - "management": { - "$ref": "NodeManagement", - "description": "NodeManagement configuration for this NodePool." - }, - "maxPodsConstraint": { - "$ref": "MaxPodsConstraint", - "description": "The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool." - }, - "name": { - "description": "The name of the node pool.", - "type": "string" - }, - "networkConfig": { - "$ref": "NodeNetworkConfig", - "description": "Networking configuration for this NodePool. If specified, it overrides the cluster-level defaults." - }, - "placementPolicy": { - "$ref": "PlacementPolicy", - "description": "Specifies the node placement policy." - }, - "podIpv4CidrSize": { - "description": "Output only. The pod CIDR block size per node in this node pool.", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "queuedProvisioning": { - "$ref": "QueuedProvisioning", - "description": "Specifies the configuration of queued provisioning." - }, - "selfLink": { - "description": "Output only. Server-defined URL for the resource.", - "readOnly": true, - "type": "string" - }, - "status": { - "description": "Output only. The status of the nodes in this pool instance.", - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RUNNING_WITH_ERROR", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the node pool is being created.", - "The RUNNING state indicates the node pool has been created and is fully usable.", - "The RUNNING_WITH_ERROR state indicates the node pool has been created and is partially usable. Some error state has occurred and some functionality may be impaired. Customer may need to reissue a request or trigger a new update.", - "The RECONCILING state indicates that some work is actively being done on the node pool, such as upgrading node software. Details can be found in the `statusMessage` field.", - "The STOPPING state indicates the node pool is being deleted.", - "The ERROR state indicates the node pool may be unusable. Details can be found in the `statusMessage` field." - ], - "readOnly": true, - "type": "string" - }, - "statusMessage": { - "deprecated": true, - "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", - "readOnly": true, - "type": "string" - }, - "updateInfo": { - "$ref": "UpdateInfo", - "description": "Output only. Update info contains relevant information during a node pool update.", - "readOnly": true - }, - "upgradeSettings": { - "$ref": "UpgradeSettings", - "description": "Upgrade settings control disruption and speed of the upgrade." - }, - "version": { - "description": "The version of Kubernetes running on this NodePool's nodes. If unspecified, it defaults as described [here](https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version).", - "type": "string" - } - }, - "type": "object" - }, - "NodePoolAutoConfig": { - "description": "Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters.", - "id": "NodePoolAutoConfig", - "properties": { - "linuxNodeConfig": { - "$ref": "LinuxNodeConfig", - "description": "Output only. Configuration options for Linux nodes.", - "readOnly": true - }, - "networkTags": { - "$ref": "NetworkTags", - "description": "The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster creation. Each tag within the list must comply with RFC1035." - }, - "nodeKubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "NodeKubeletConfig controls the defaults for autoprovisioned node-pools. Currently only `insecure_kubelet_readonly_port_enabled` can be set here." - }, - "resourceManagerTags": { - "$ref": "ResourceManagerTags", - "description": "Resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies." - } - }, - "type": "object" - }, - "NodePoolAutoscaling": { - "description": "NodePoolAutoscaling contains information required by cluster autoscaler to adjust the size of the node pool to the current cluster usage.", - "id": "NodePoolAutoscaling", - "properties": { - "autoprovisioned": { - "description": "Can this node pool be deleted automatically.", - "type": "boolean" - }, - "enabled": { - "description": "Is autoscaling enabled for this node pool.", - "type": "boolean" - }, - "locationPolicy": { - "description": "Location policy used when scaling up a nodepool.", - "enum": [ - "LOCATION_POLICY_UNSPECIFIED", - "BALANCED", - "ANY" - ], - "enumDescriptions": [ - "Not set.", - "BALANCED is a best effort policy that aims to balance the sizes of different zones.", - "ANY policy picks zones that have the highest capacity available." - ], - "type": "string" - }, - "maxNodeCount": { - "description": "Maximum number of nodes for one location in the node pool. Must be \u003e= min_node_count. There has to be enough quota to scale up the cluster.", - "format": "int32", - "type": "integer" - }, - "minNodeCount": { - "description": "Minimum number of nodes for one location in the node pool. Must be greater than or equal to 0 and less than or equal to max_node_count.", - "format": "int32", - "type": "integer" - }, - "totalMaxNodeCount": { - "description": "Maximum number of nodes in the node pool. Must be greater than or equal to total_min_node_count. There has to be enough quota to scale up the cluster. The total_*_node_count fields are mutually exclusive with the *_node_count fields.", - "format": "int32", - "type": "integer" - }, - "totalMinNodeCount": { - "description": "Minimum number of nodes in the node pool. Must be greater than or equal to 0 and less than or equal to total_max_node_count. The total_*_node_count fields are mutually exclusive with the *_node_count fields.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "NodePoolDefaults": { - "description": "Subset of Nodepool message that has defaults.", - "id": "NodePoolDefaults", - "properties": { - "nodeConfigDefaults": { - "$ref": "NodeConfigDefaults", - "description": "Subset of NodeConfig message that has defaults." - } - }, - "type": "object" - }, - "NodePoolLoggingConfig": { - "description": "NodePoolLoggingConfig specifies logging configuration for nodepools.", - "id": "NodePoolLoggingConfig", - "properties": { - "variantConfig": { - "$ref": "LoggingVariantConfig", - "description": "Logging variant configuration." - } - }, - "type": "object" - }, - "NodePoolUpgradeInfo": { - "description": "NodePoolUpgradeInfo contains the upgrade information of a nodepool.", - "id": "NodePoolUpgradeInfo", - "properties": { - "autoUpgradeStatus": { - "description": "The auto upgrade status.", - "items": { - "enum": [ - "UNKNOWN", - "ACTIVE", - "MINOR_UPGRADE_PAUSED", - "UPGRADE_PAUSED" - ], - "enumDescriptions": [ - "UNKNOWN indicates an unknown status.", - "ACTIVE indicates an active status.", - "MINOR_UPGRADE_PAUSED indicates the minor version upgrade is paused.", - "UPGRADE_PAUSED indicates the upgrade is paused." - ], - "type": "string" - }, - "type": "array" - }, - "endOfExtendedSupportTimestamp": { - "description": "The nodepool's current minor version's end of extended support timestamp.", - "type": "string" - }, - "endOfStandardSupportTimestamp": { - "description": "The nodepool's current minor version's end of standard support timestamp.", - "type": "string" - }, - "minorTargetVersion": { - "description": "minor_target_version indicates the target version for minor upgrade.", - "type": "string" - }, - "patchTargetVersion": { - "description": "patch_target_version indicates the target version for patch upgrade.", - "type": "string" - }, - "pausedReason": { - "description": "The auto upgrade paused reason.", - "items": { - "enum": [ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED", - "MAINTENANCE_WINDOW", - "MAINTENANCE_EXCLUSION_NO_UPGRADES", - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES", - "SYSTEM_CONFIG" - ], - "enumDescriptions": [ - "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.", - "MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance window.", - "MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a maintenance exclusion with scope NO_UPGRADES.", - "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a maintenance exclusion with scope NO_MINOR_UPGRADES.", - "SYSTEM_CONFIG indicates the cluster upgrade is paused by system config." - ], - "type": "string" - }, - "type": "array" - }, - "upgradeDetails": { - "description": "The list of past auto upgrades.", - "items": { - "$ref": "UpgradeDetails" - }, - "type": "array" - } - }, - "type": "object" - }, - "NodeTaint": { - "description": "Kubernetes taint is composed of three fields: key, value, and effect. Effect can only be one of three types: NoSchedule, PreferNoSchedule or NoExecute. See [here](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) for more information, including usage and the valid values.", - "id": "NodeTaint", - "properties": { - "effect": { - "description": "Effect for taint.", - "enum": [ - "EFFECT_UNSPECIFIED", - "NO_SCHEDULE", - "PREFER_NO_SCHEDULE", - "NO_EXECUTE" - ], - "enumDescriptions": [ - "Not set", - "NoSchedule", - "PreferNoSchedule", - "NoExecute" - ], - "type": "string" - }, - "key": { - "description": "Key for taint.", - "type": "string" - }, - "value": { - "description": "Value for taint.", - "type": "string" - } - }, - "type": "object" - }, - "NodeTaints": { - "description": "Collection of Kubernetes [node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration).", - "id": "NodeTaints", - "properties": { - "taints": { - "description": "List of node taints.", - "items": { - "$ref": "NodeTaint" - }, - "type": "array" - } - }, - "type": "object" - }, - "NotificationConfig": { - "description": "NotificationConfig is the configuration of notifications.", - "id": "NotificationConfig", - "properties": { - "pubsub": { - "$ref": "PubSub", - "description": "Notification config for Pub/Sub." - } - }, - "type": "object" - }, - "Operation": { - "description": "This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.", - "id": "Operation", - "properties": { - "clusterConditions": { - "deprecated": true, - "description": "Which conditions caused the current cluster state. Deprecated. Use field error instead.", - "items": { - "$ref": "StatusCondition" - }, - "type": "array" - }, - "detail": { - "description": "Output only. Detailed operation progress, if available.", - "readOnly": true, - "type": "string" - }, - "endTime": { - "description": "Output only. The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "readOnly": true, - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure." - }, - "location": { - "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The server-assigned ID for the operation.", - "readOnly": true, - "type": "string" - }, - "nodepoolConditions": { - "deprecated": true, - "description": "Which conditions caused the current node pool state. Deprecated. Use field error instead.", - "items": { - "$ref": "StatusCondition" - }, - "type": "array" - }, - "operationType": { - "description": "Output only. The operation type.", - "enum": [ - "TYPE_UNSPECIFIED", - "CREATE_CLUSTER", - "DELETE_CLUSTER", - "UPGRADE_MASTER", - "UPGRADE_NODES", - "REPAIR_CLUSTER", - "UPDATE_CLUSTER", - "CREATE_NODE_POOL", - "DELETE_NODE_POOL", - "SET_NODE_POOL_MANAGEMENT", - "AUTO_REPAIR_NODES", - "AUTO_UPGRADE_NODES", - "SET_LABELS", - "SET_MASTER_AUTH", - "SET_NODE_POOL_SIZE", - "SET_NETWORK_POLICY", - "SET_MAINTENANCE_POLICY", - "RESIZE_CLUSTER", - "FLEET_FEATURE_UPGRADE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false, - true, - true, - false, - false - ], - "enumDescriptions": [ - "Not set.", - "The cluster is being created. The cluster should be assumed to be unusable until the operation finishes. In the event of the operation failing, the cluster will enter the ERROR state and eventually be deleted.", - "The cluster is being deleted. The cluster should be assumed to be unusable as soon as this operation starts. In the event of the operation failing, the cluster will enter the ERROR state and the deletion will be automatically retried until completed.", - "The cluster version is being updated. Note that this includes \"upgrades\" to the same version, which are simply a recreation. This also includes [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). For more details, see [documentation on cluster upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades).", - "A node pool is being updated. Despite calling this an \"upgrade\", this includes most forms of updates to node pools. This also includes [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). This operation sets the progress field and may be canceled. The upgrade strategy depends on [node pool configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). The nodes are generally still usable during this operation.", - "A problem has been detected with the control plane and is being repaired. This operation type is initiated by GKE. For more details, see [documentation on repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).", - "The cluster is being updated. This is a broad category of operations and includes operations that only change metadata as well as those that must recreate the entire cluster. If the control plane must be recreated, this will cause temporary downtime for zonal clusters. Some features require recreating the nodes as well. Those will be recreated as separate operations and the update may not be completely functional until the node pools recreations finish. Node recreations will generally follow [maintenance policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). Some GKE-initiated operations use this type. This includes certain types of auto-upgrades and incident mitigations.", - "A node pool is being created. The node pool should be assumed to be unusable until this operation finishes. In the event of an error, the node pool may be partially created. If enabled, [node autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) may have automatically initiated such operations.", - "The node pool is being deleted. The node pool should be assumed to be unusable as soon as this operation starts.", - "The node pool's manamagent field is being updated. These operations only update metadata and may be concurrent with most other operations.", - "A problem has been detected with nodes and [they are being repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). This operation type is initiated by GKE, typically automatically. This operation may be concurrent with other operations and there may be multiple repairs occurring on the same node pool.", - "Unused. Automatic node upgrade uses UPGRADE_NODES.", - "Unused. Updating labels uses UPDATE_CLUSTER.", - "Unused. Updating master auth uses UPDATE_CLUSTER.", - "The node pool is being resized. With the exception of resizing to or from size zero, the node pool is generally usable during this operation.", - "Unused. Updating network policy uses UPDATE_CLUSTER.", - "Unused. Updating maintenance policy uses UPDATE_CLUSTER.", - "The control plane is being resized. This operation type is initiated by GKE. These operations are often performed preemptively to ensure that the control plane has sufficient resources and is not typically an indication of issues. For more details, see [documentation on resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).", - "Fleet features of GKE Enterprise are being upgraded. The cluster should be assumed to be blocked for other upgrades until the operation finishes." - ], - "readOnly": true, - "type": "string" - }, - "progress": { - "$ref": "OperationProgress", - "description": "Output only. Progress information for an operation.", - "readOnly": true - }, - "selfLink": { - "description": "Output only. Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.", - "readOnly": true, - "type": "string" - }, - "startTime": { - "description": "Output only. The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "readOnly": true, - "type": "string" - }, - "status": { - "description": "Output only. The current status of the operation.", - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "ABORTING" - ], - "enumDescriptions": [ - "Not set.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed.", - "The operation is aborting." - ], - "readOnly": true, - "type": "string" - }, - "statusMessage": { - "deprecated": true, - "description": "Output only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead.", - "readOnly": true, - "type": "string" - }, - "targetLink": { - "description": "Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", - "readOnly": true, - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "OperationError": { - "description": "OperationError records errors seen from CloudKMS keys encountered during updates to DatabaseEncryption configuration.", - "id": "OperationError", - "properties": { - "errorMessage": { - "description": "Description of the error seen during the operation.", - "type": "string" - }, - "keyName": { - "description": "CloudKMS key resource that had the error.", - "type": "string" - }, - "timestamp": { - "description": "Time when the CloudKMS error was seen.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "OperationProgress": { - "description": "Information about operation (or operation stage) progress.", - "id": "OperationProgress", - "properties": { - "metrics": { - "description": "Progress metric bundle, for example: metrics: [{name: \"nodes done\", int_value: 15}, {name: \"nodes total\", int_value: 32}] or metrics: [{name: \"progress\", double_value: 0.56}, {name: \"progress scale\", double_value: 1.0}]", - "items": { - "$ref": "Metric" - }, - "type": "array" - }, - "name": { - "description": "A non-parameterized string describing an operation stage. Unset for single-stage operations.", - "type": "string" - }, - "stages": { - "description": "Substages of an operation or a stage.", - "items": { - "$ref": "OperationProgress" - }, - "type": "array" - }, - "status": { - "description": "Status of an operation stage. Unset for single-stage operations.", - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "ABORTING" - ], - "enumDescriptions": [ - "Not set.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed.", - "The operation is aborting." - ], - "type": "string" - } - }, - "type": "object" - }, - "ParallelstoreCsiDriverConfig": { - "description": "Configuration for the Cloud Storage Parallelstore CSI driver.", - "id": "ParallelstoreCsiDriverConfig", - "properties": { - "enabled": { - "description": "Whether the Cloud Storage Parallelstore CSI driver is enabled for this cluster.", - "type": "boolean" - } - }, - "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", - "properties": { - "policyName": { - "description": "If set, refers to the name of a custom resource policy supplied by the user. The resource policy must be in the same project and region as the node pool. If not found, InvalidArgument error is returned.", - "type": "string" - }, - "tpuTopology": { - "description": "Optional. TPU placement topology for pod slice node pool. https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies", - "type": "string" - }, - "type": { - "description": "The type of placement.", - "enum": [ - "TYPE_UNSPECIFIED", - "COMPACT" - ], - "enumDescriptions": [ - "TYPE_UNSPECIFIED specifies no requirements on nodes placement.", - "COMPACT specifies node placement in the same availability domain to ensure low communication latency." - ], - "type": "string" - } - }, - "type": "object" - }, - "PodAutoscaling": { - "description": "PodAutoscaling is used for configuration of parameters for workload autoscaling.", - "id": "PodAutoscaling", - "properties": { - "hpaProfile": { - "description": "Selected Horizontal Pod Autoscaling profile.", - "enum": [ - "HPA_PROFILE_UNSPECIFIED", - "NONE", - "PERFORMANCE" - ], - "enumDescriptions": [ - "HPA_PROFILE_UNSPECIFIED is used when no custom HPA profile is set.", - "Customers explicitly opt-out of HPA profiles.", - "PERFORMANCE is used when customers opt-in to the performance HPA profile. In this profile we support a higher number of HPAs per cluster and faster metrics collection for workload autoscaling." - ], - "type": "string" - } - }, - "type": "object" - }, - "PodCIDROverprovisionConfig": { - "description": "[PRIVATE FIELD] Config for pod CIDR size overprovisioning.", - "id": "PodCIDROverprovisionConfig", - "properties": { - "disable": { - "description": "Whether Pod CIDR overprovisioning is disabled. Note: Pod CIDR overprovisioning is enabled by default.", - "type": "boolean" - } - }, - "type": "object" - }, - "PrivateClusterConfig": { - "description": "Configuration options for private clusters.", - "id": "PrivateClusterConfig", - "properties": { - "enablePrivateEndpoint": { - "deprecated": true, - "description": "Whether the master's internal IP address is used as the cluster endpoint. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint instead. Note that the value of enable_public_endpoint is reversed: if enable_private_endpoint is false, then enable_public_endpoint will be true.", - "type": "boolean" - }, - "enablePrivateNodes": { - "deprecated": true, - "description": "Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. Deprecated: Use NetworkConfig.default_enable_private_nodes instead.", - "type": "boolean" - }, - "masterGlobalAccessConfig": { - "$ref": "PrivateClusterMasterGlobalAccessConfig", - "deprecated": true, - "description": "Controls master global access settings. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access instead." - }, - "masterIpv4CidrBlock": { - "description": "The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network.", - "type": "string" - }, - "peeringName": { - "description": "Output only. The peering name in the customer VPC used by this cluster.", - "readOnly": true, - "type": "string" - }, - "privateEndpoint": { - "deprecated": true, - "description": "Output only. The internal IP address of this cluster's master endpoint. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint instead.", - "readOnly": true, - "type": "string" - }, - "privateEndpointSubnetwork": { - "deprecated": true, - "description": "Subnet to provision the master's private endpoint during cluster creation. Specified in projects/*/regions/*/subnetworks/* format. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork instead.", - "type": "string" - }, - "publicEndpoint": { - "deprecated": true, - "description": "Output only. The external IP address of this cluster's master endpoint. Deprecated:Use ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint instead.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "PrivateClusterMasterGlobalAccessConfig": { - "description": "Configuration for controlling master global access settings.", - "id": "PrivateClusterMasterGlobalAccessConfig", - "properties": { - "enabled": { - "description": "Whenever master is accessible globally or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "PrivateRegistryAccessConfig": { - "description": "PrivateRegistryAccessConfig contains access configuration for private container registries.", - "id": "PrivateRegistryAccessConfig", - "properties": { - "certificateAuthorityDomainConfig": { - "description": "Private registry access configuration.", - "items": { - "$ref": "CertificateAuthorityDomainConfig" - }, - "type": "array" - }, - "enabled": { - "description": "Private registry access is enabled.", - "type": "boolean" - } - }, - "type": "object" - }, - "PrivilegedAdmissionConfig": { - "description": "PrivilegedAdmissionConfig stores the list of authorized allowlist paths for the cluster.", - "id": "PrivilegedAdmissionConfig", - "properties": { - "allowlistPaths": { - "description": "The customer allowlist Cloud Storage paths for the cluster. These paths are used with the `--autopilot-privileged-admission` flag to authorize privileged workloads in Autopilot clusters. Paths can be GKE-owned, in the format `gke:////`, or customer-owned, in the format `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under specific paths or directories. Example: `gs://my-bucket/*` will authorize all allowlists under the `my-bucket` bucket.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PubSub": { - "description": "Pub/Sub specific notification config.", - "id": "PubSub", - "properties": { - "enabled": { - "description": "Enable notifications for Pub/Sub.", - "type": "boolean" - }, - "filter": { - "$ref": "Filter", - "description": "Allows filtering to one or more specific event types. If no filter is specified, or if a filter is specified with no event types, all event types will be sent" - }, - "topic": { - "description": "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is `projects/{project}/topics/{topic}`.", - "type": "string" - } - }, - "type": "object" - }, - "QueuedProvisioning": { - "description": "QueuedProvisioning defines the queued provisioning used by the node pool.", - "id": "QueuedProvisioning", - "properties": { - "enabled": { - "description": "Denotes that this nodepool is QRM specific, meaning nodes can be only obtained through queuing via the Cluster Autoscaler ProvisioningRequest API.", - "type": "boolean" - } - }, - "type": "object" - }, - "RBACBindingConfig": { - "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.", - "id": "RBACBindingConfig", - "properties": { - "enableInsecureBindingSystemAuthenticated": { - "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:authenticated.", - "type": "boolean" - }, - "enableInsecureBindingSystemUnauthenticated": { - "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjets system:anonymous or system:unauthenticated.", - "type": "boolean" - } - }, - "type": "object" - }, - "RangeInfo": { - "description": "RangeInfo contains the range name and the range utilization by this cluster.", - "id": "RangeInfo", - "properties": { - "rangeName": { - "description": "Output only. Name of a range.", - "readOnly": true, - "type": "string" - }, - "utilization": { - "description": "Output only. The utilization of the range.", - "format": "double", - "readOnly": true, - "type": "number" - } - }, - "type": "object" - }, - "RayClusterLoggingConfig": { - "description": "RayClusterLoggingConfig specifies configuration of Ray logging.", - "id": "RayClusterLoggingConfig", - "properties": { - "enabled": { - "description": "Enable log collection for Ray clusters.", - "type": "boolean" - } - }, - "type": "object" - }, - "RayClusterMonitoringConfig": { - "description": "RayClusterMonitoringConfig specifies monitoring configuration for Ray clusters.", - "id": "RayClusterMonitoringConfig", - "properties": { - "enabled": { - "description": "Enable metrics collection for Ray clusters.", - "type": "boolean" - } - }, - "type": "object" - }, - "RayOperatorConfig": { - "description": "Configuration options for the Ray Operator add-on.", - "id": "RayOperatorConfig", - "properties": { - "enabled": { - "description": "Whether the Ray Operator addon is enabled for this cluster.", - "type": "boolean" - }, - "rayClusterLoggingConfig": { - "$ref": "RayClusterLoggingConfig", - "description": "Optional. Logging configuration for Ray clusters." - }, - "rayClusterMonitoringConfig": { - "$ref": "RayClusterMonitoringConfig", - "description": "Optional. Monitoring configuration for Ray clusters." - } - }, - "type": "object" - }, - "RecurringTimeWindow": { - "description": "Represents an arbitrary window of time that recurs.", - "id": "RecurringTimeWindow", - "properties": { - "recurrence": { - "description": "An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window reccurs. They go on for the span of time between the start and end time. For example, to have something repeat every weekday, you'd use: `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` To repeat some window daily (equivalent to the DailyMaintenanceWindow): `FREQ=DAILY` For the first weekend of every month: `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` This specifies how frequently the window starts. Eg, if you wanted to have a 9-5 UTC-4 window every weekday, you'd use something like: ``` start time = 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` Windows can span multiple days. Eg, to make the window encompass every weekend from midnight Saturday till the last minute of Sunday UTC: ``` start time = 2019-01-05T00:00:00Z end time = 2019-01-07T23:59:00Z recurrence = FREQ=WEEKLY;BYDAY=SA ``` Note the start and end time's specific dates are largely arbitrary except to specify duration of the window and when it first starts. The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported.", - "type": "string" - }, - "window": { - "$ref": "TimeWindow", - "description": "The window of the first recurrence." - } - }, - "type": "object" - }, - "RegistryHeader": { - "description": "RegistryHeader configures headers for the registry.", - "id": "RegistryHeader", - "properties": { - "key": { - "description": "Key configures the header key.", - "type": "string" - }, - "value": { - "description": "Value configures the header value.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegistryHostConfig": { - "description": "RegistryHostConfig configures the top-level structure for a single containerd registry server's configuration, which represents one hosts.toml file on the node. It will override the same fqdns in PrivateRegistryAccessConfig.", - "id": "RegistryHostConfig", - "properties": { - "hosts": { - "description": "HostConfig configures a list of host-specific configurations for the server. Each server can have at most 10 host configurations.", - "items": { - "$ref": "HostConfig" - }, - "type": "array" - }, - "server": { - "description": "Defines the host name of the registry server, which will be used to create configuration file as /etc/containerd/hosts.d//hosts.toml. It supports fully qualified domain names (FQDN) and IP addresses: Specifying port is supported. Wildcards are NOT supported. Examples: - my.customdomain.com - 10.0.1.2:5000", - "type": "string" - } - }, - "type": "object" - }, - "ReleaseChannel": { - "description": "ReleaseChannel indicates which release channel a cluster is subscribed to. Release channels are arranged in order of risk. When a cluster is subscribed to a release channel, Google maintains both the master version and the node version. Node auto-upgrade defaults to true and cannot be disabled.", - "id": "ReleaseChannel", - "properties": { - "channel": { - "description": "channel specifies which release channel the cluster is subscribed to.", - "enum": [ - "UNSPECIFIED", - "RAPID", - "REGULAR", - "STABLE", - "EXTENDED" - ], - "enumDescriptions": [ - "No channel specified.", - "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", - "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", - "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." - ], - "type": "string" - } - }, - "type": "object" - }, - "ReleaseChannelConfig": { - "description": "ReleaseChannelConfig exposes configuration for a release channel.", - "id": "ReleaseChannelConfig", - "properties": { - "channel": { - "description": "The release channel this configuration applies to.", - "enum": [ - "UNSPECIFIED", - "RAPID", - "REGULAR", - "STABLE", - "EXTENDED" - ], - "enumDescriptions": [ - "No channel specified.", - "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", - "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", - "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." - ], - "type": "string" - }, - "defaultVersion": { - "description": "The default version for newly created clusters on the channel.", - "type": "string" - }, - "upgradeTargetVersion": { - "description": "The auto upgrade target version for clusters on the channel.", - "type": "string" - }, - "validVersions": { - "description": "List of valid versions for the channel.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ReservationAffinity": { - "description": "[ReservationAffinity](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) is the configuration of desired reservation which instances could take capacity from.", - "id": "ReservationAffinity", - "properties": { - "consumeReservationType": { - "description": "Corresponds to the type of reservation consumption.", - "enum": [ - "UNSPECIFIED", - "NO_RESERVATION", - "ANY_RESERVATION", - "SPECIFIC_RESERVATION" - ], - "enumDescriptions": [ - "Default value. This should not be used.", - "Do not consume from any reserved capacity.", - "Consume any reservation available.", - "Must consume from a specific reservation. Must specify key value fields for specifying the reservations." - ], - "type": "string" - }, - "key": { - "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify \"compute.googleapis.com/reservation-name\" as the key and specify the name of your reservation as its value.", - "type": "string" - }, - "values": { - "description": "Corresponds to the label value(s) of reservation resource(s).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResourceLabels": { - "description": "Collection of [Resource Manager labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).", - "id": "ResourceLabels", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Map of node label keys and node label values.", - "type": "object" - } - }, - "type": "object" - }, - "ResourceLimit": { - "description": "Contains information about amount of some resource in the cluster. For memory, value should be in GB.", - "id": "ResourceLimit", - "properties": { - "maximum": { - "description": "Maximum amount of the resource in the cluster.", - "format": "int64", - "type": "string" - }, - "minimum": { - "description": "Minimum amount of the resource in the cluster.", - "format": "int64", - "type": "string" - }, - "resourceType": { - "description": "Resource name \"cpu\", \"memory\" or gpu-specific string.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceManagerTags": { - "description": "A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Tags must be according to specifications in https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. A maximum of 5 tag key-value pairs can be specified. Existing tags will be replaced with new values.", - "id": "ResourceManagerTags", - "properties": { - "tags": { - "additionalProperties": { - "type": "string" - }, - "description": "TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. `{org_id}/{tag_key_name}={tag_value_name}` 3. `{project_id}/{tag_key_name}={tag_value_name}`", - "type": "object" - } - }, - "type": "object" - }, - "ResourceUsageExportConfig": { - "description": "Configuration for exporting cluster resource usages.", - "id": "ResourceUsageExportConfig", - "properties": { - "bigqueryDestination": { - "$ref": "BigQueryDestination", - "description": "Configuration to use BigQuery as usage export destination." - }, - "consumptionMeteringConfig": { - "$ref": "ConsumptionMeteringConfig", - "description": "Configuration to enable resource consumption metering." - }, - "enableNetworkEgressMetering": { - "description": "Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic.", - "type": "boolean" - } - }, - "type": "object" - }, - "RollbackNodePoolUpgradeRequest": { - "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed NodePool upgrade. This will be an no-op if the last upgrade successfully completed.", - "id": "RollbackNodePoolUpgradeRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node poll to rollback upgrade. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "type": "string" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "respectPdb": { - "description": "Option for rollback to ignore the PodDisruptionBudget. Default value is false.", - "type": "boolean" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "RotationConfig": { - "description": "RotationConfig is config for secret manager auto rotation.", - "id": "RotationConfig", - "properties": { - "enabled": { - "description": "Whether the rotation is enabled.", - "type": "boolean" - }, - "rotationInterval": { - "description": "The interval between two consecutive rotations. Default rotation interval is 2 minutes.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "SandboxConfig": { - "description": "SandboxConfig contains configurations of the sandbox to use for the node.", - "id": "SandboxConfig", - "properties": { - "type": { - "description": "Type of the sandbox to use for the node.", - "enum": [ - "UNSPECIFIED", - "GVISOR" - ], - "enumDescriptions": [ - "Default value. This should not be used.", - "Run sandbox using gvisor." - ], - "type": "string" - } - }, - "type": "object" - }, - "SecondaryBootDisk": { - "description": "SecondaryBootDisk represents a persistent disk attached to a node with special configurations based on its mode.", - "id": "SecondaryBootDisk", - "properties": { - "diskImage": { - "description": "Fully-qualified resource ID for an existing disk image.", - "type": "string" - }, - "mode": { - "description": "Disk mode (container image cache, etc.)", - "enum": [ - "MODE_UNSPECIFIED", - "CONTAINER_IMAGE_CACHE" - ], - "enumDescriptions": [ - "MODE_UNSPECIFIED is when mode is not set.", - "CONTAINER_IMAGE_CACHE is for using the secondary boot disk as a container image cache." - ], - "type": "string" - } - }, - "type": "object" - }, - "SecondaryBootDiskUpdateStrategy": { - "description": "SecondaryBootDiskUpdateStrategy is a placeholder which will be extended in the future to define different options for updating secondary boot disks.", - "id": "SecondaryBootDiskUpdateStrategy", - "properties": {}, - "type": "object" - }, - "SecretManagerConfig": { - "description": "SecretManagerConfig is config for secret manager enablement.", - "id": "SecretManagerConfig", - "properties": { - "enabled": { - "description": "Enable/Disable Secret Manager Config.", - "type": "boolean" - }, - "rotationConfig": { - "$ref": "RotationConfig", - "description": "Rotation config for secret manager." - } - }, - "type": "object" - }, - "SecurityBulletinEvent": { - "description": "SecurityBulletinEvent is a notification sent to customers when a security bulletin has been posted that they are vulnerable to.", - "id": "SecurityBulletinEvent", - "properties": { - "affectedSupportedMinors": { - "description": "The GKE minor versions affected by this vulnerability.", - "items": { - "type": "string" - }, - "type": "array" - }, - "briefDescription": { - "description": "A brief description of the bulletin. See the bulletin pointed to by the bulletin_uri field for an expanded description.", - "type": "string" - }, - "bulletinId": { - "description": "The ID of the bulletin corresponding to the vulnerability.", - "type": "string" - }, - "bulletinUri": { - "description": "The URI link to the bulletin on the website for more information.", - "type": "string" - }, - "cveIds": { - "description": "The CVEs associated with this bulletin.", - "items": { - "type": "string" - }, - "type": "array" - }, - "manualStepsRequired": { - "description": "If this field is specified, it means there are manual steps that the user must take to make their clusters safe.", - "type": "boolean" - }, - "mitigatedVersions": { - "description": "The GKE versions where this vulnerability is mitigated.", - "items": { - "type": "string" - }, - "type": "array" - }, - "patchedVersions": { - "description": "The GKE versions where this vulnerability is patched.", - "items": { - "type": "string" - }, - "type": "array" - }, - "resourceTypeAffected": { - "description": "The resource type (node/control plane) that has the vulnerability. Multiple notifications (1 notification per resource type) will be sent for a vulnerability that affects \u003e 1 resource type.", - "type": "string" - }, - "severity": { - "description": "The severity of this bulletin as it relates to GKE.", - "type": "string" - }, - "suggestedUpgradeTarget": { - "description": "This represents a version selected from the patched_versions field that the cluster receiving this notification should most likely want to upgrade to based on its current version. Note that if this notification is being received by a given cluster, it means that this version is currently available as an upgrade target in that cluster's location.", - "type": "string" - } - }, - "type": "object" - }, - "SecurityPostureConfig": { - "description": "SecurityPostureConfig defines the flags needed to enable/disable features for the Security Posture API.", - "id": "SecurityPostureConfig", - "properties": { - "mode": { - "description": "Sets which mode to use for Security Posture features.", - "enum": [ - "MODE_UNSPECIFIED", - "DISABLED", - "BASIC", - "ENTERPRISE" - ], - "enumDescriptions": [ - "Default value not specified.", - "Disables Security Posture features on the cluster.", - "Applies Security Posture features on the cluster.", - "Applies the Security Posture off cluster Enterprise level features." - ], - "type": "string" - }, - "vulnerabilityMode": { - "description": "Sets which mode to use for vulnerability scanning.", - "enum": [ - "VULNERABILITY_MODE_UNSPECIFIED", - "VULNERABILITY_DISABLED", - "VULNERABILITY_BASIC", - "VULNERABILITY_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value not specified.", - "Disables vulnerability scanning on the cluster.", - "Applies basic vulnerability scanning on the cluster.", - "Applies the Security Posture's vulnerability on cluster Enterprise level features." - ], - "type": "string" - } - }, - "type": "object" - }, - "ServerConfig": { - "description": "Kubernetes Engine service configuration.", - "id": "ServerConfig", - "properties": { - "channels": { - "description": "List of release channel configurations.", - "items": { - "$ref": "ReleaseChannelConfig" - }, - "type": "array" - }, - "defaultClusterVersion": { - "description": "Version of Kubernetes the service deploys by default.", - "type": "string" - }, - "defaultImageType": { - "description": "Default image type.", - "type": "string" - }, - "validImageTypes": { - "description": "List of valid image types.", - "items": { - "type": "string" - }, - "type": "array" - }, - "validMasterVersions": { - "description": "List of valid master versions, in descending order.", - "items": { - "type": "string" - }, - "type": "array" - }, - "validNodeVersions": { - "description": "List of valid node upgrade target versions, in descending order.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ServiceExternalIPsConfig": { - "description": "Config to block services with externalIPs field.", - "id": "ServiceExternalIPsConfig", - "properties": { - "enabled": { - "description": "Whether Services with ExternalIPs field are allowed or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "SetAddonsConfigRequest": { - "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", - "id": "SetAddonsConfigRequest", - "properties": { - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "Required. The desired configurations for the various addons available to run in the cluster." - }, - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set addons. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetLabelsRequest": { - "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container Engine cluster, which will in turn set them for Google Compute Engine resources used by that cluster", - "id": "SetLabelsRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "labelFingerprint": { - "description": "Required. The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Kubernetes Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a `get()` request to the resource to get the latest fingerprint.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to set labels. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "resourceLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Required. The labels to set for that cluster.", - "type": "object" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetLegacyAbacRequest": { - "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for a cluster.", - "id": "SetLegacyAbacRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "enabled": { - "description": "Required. Whether ABAC authorization will be enabled in the cluster.", - "type": "boolean" - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to set legacy abac. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetLocationsRequest": { - "description": "SetLocationsRequest sets the locations of the cluster.", - "id": "SetLocationsRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "locations": { - "description": "Required. The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. Changing the locations a cluster is in will result in nodes being either created or removed from the cluster, depending on whether locations are being added or removed. This list must always include the cluster's primary zone.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set locations. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetLoggingServiceRequest": { - "description": "SetLoggingServiceRequest sets the logging service of a cluster.", - "id": "SetLoggingServiceRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "loggingService": { - "description": "Required. The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com/kubernetes` - The Cloud Logging service with a Kubernetes-native resource model * `logging.googleapis.com` - The legacy Cloud Logging service (no longer available as of GKE 1.15). * `none` - no logs will be exported from the cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set logging. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetMaintenancePolicyRequest": { - "description": "SetMaintenancePolicyRequest sets the maintenance policy for a cluster.", - "id": "SetMaintenancePolicyRequest", - "properties": { - "clusterId": { - "description": "Required. The name of the cluster to update.", - "type": "string" - }, - "maintenancePolicy": { - "$ref": "MaintenancePolicy", - "description": "Required. The maintenance policy to be set for the cluster. An empty field clears the existing maintenance policy." - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to set maintenance policy. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "description": "Required. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects).", - "type": "string" - }, - "zone": { - "description": "Required. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides.", - "type": "string" - } - }, - "type": "object" - }, - "SetMasterAuthRequest": { - "description": "SetMasterAuthRequest updates the admin password of a cluster.", - "id": "SetMasterAuthRequest", - "properties": { - "action": { - "description": "Required. The exact form of action to be taken on the master auth.", - "enum": [ - "UNKNOWN", - "SET_PASSWORD", - "GENERATE_PASSWORD", - "SET_USERNAME" - ], - "enumDescriptions": [ - "Operation is unknown and will error out.", - "Set the password to a user generated value.", - "Generate a new password and set it to that.", - "Set the username. If an empty username is provided, basic authentication is disabled for the cluster. If a non-empty username is provided, basic authentication is enabled, with either a provided password or a generated one." - ], - "type": "string" - }, - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set auth. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "update": { - "$ref": "MasterAuth", - "description": "Required. A description of the update." - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetMonitoringServiceRequest": { - "description": "SetMonitoringServiceRequest sets the monitoring service of a cluster.", - "id": "SetMonitoringServiceRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "monitoringService": { - "description": "Required. The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No metrics will be exported from the cluster. If left as an empty string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or `monitoring.googleapis.com` for earlier versions.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set monitoring. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetNetworkPolicyRequest": { - "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", - "id": "SetNetworkPolicyRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Required. Configuration options for the NetworkPolicy feature." - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetNodePoolAutoscalingRequest": { - "description": "SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.", - "id": "SetNodePoolAutoscalingRequest", - "properties": { - "autoscaling": { - "$ref": "NodePoolAutoscaling", - "description": "Required. Autoscaling configuration for the node pool." - }, - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "type": "string" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetNodePoolManagementRequest": { - "description": "SetNodePoolManagementRequest sets the node management properties of a node pool.", - "id": "SetNodePoolManagementRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "management": { - "$ref": "NodeManagement", - "description": "Required. NodeManagement configuration for the node pool." - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to set management properties. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "type": "string" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "SetNodePoolSizeRequest": { - "description": "SetNodePoolSizeRequest sets the size of a node pool.", - "id": "SetNodePoolSizeRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to set size. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "type": "string" - }, - "nodeCount": { - "description": "Required. The desired node count for the pool.", - "format": "int32", - "type": "integer" - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "ShieldedInstanceConfig": { - "description": "A set of Shielded Instance options.", - "id": "ShieldedInstanceConfig", - "properties": { - "enableIntegrityMonitoring": { - "description": "Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created.", - "type": "boolean" - }, - "enableSecureBoot": { - "description": "Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails.", - "type": "boolean" - } - }, - "type": "object" - }, - "ShieldedNodes": { - "description": "Configuration of Shielded Nodes feature.", - "id": "ShieldedNodes", - "properties": { - "enabled": { - "description": "Whether Shielded Nodes features are enabled on all nodes in this cluster.", - "type": "boolean" - } - }, - "type": "object" - }, - "SoleTenantConfig": { - "description": "SoleTenantConfig contains the NodeAffinities to specify what shared sole tenant node groups should back the node pool.", - "id": "SoleTenantConfig", - "properties": { - "minNodeCpus": { - "description": "Optional. The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. This field can only be set if the node pool is created in a shared sole-tenant node group.", - "format": "int32", - "type": "integer" - }, - "nodeAffinities": { - "description": "NodeAffinities used to match to a shared sole tenant node group.", - "items": { - "$ref": "NodeAffinity" - }, - "type": "array" - } - }, - "type": "object" - }, - "StandardRolloutPolicy": { - "description": "Standard rollout policy is the default policy for blue-green.", - "id": "StandardRolloutPolicy", - "properties": { - "batchNodeCount": { - "description": "Number of blue nodes to drain in a batch.", - "format": "int32", - "type": "integer" - }, - "batchPercentage": { - "description": "Percentage of the blue pool nodes to drain in a batch. The range of this field should be (0.0, 1.0].", - "format": "float", - "type": "number" - }, - "batchSoakDuration": { - "description": "Soak time after each batch gets drained. Default to zero.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "StartIPRotationRequest": { - "description": "StartIPRotationRequest creates a new IP for the cluster and then performs a node upgrade on each node pool to point to the new IP.", - "id": "StartIPRotationRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster name) of the cluster to start IP rotation. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "rotateCredentials": { - "description": "Whether to rotate credentials during IP rotation.", - "type": "boolean" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "StatefulHAConfig": { - "description": "Configuration for the Stateful HA add-on.", - "id": "StatefulHAConfig", - "properties": { - "enabled": { - "description": "Whether the Stateful HA add-on is enabled for this cluster.", - "type": "boolean" - } - }, - "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" - }, - "StatusCondition": { - "description": "StatusCondition describes why a cluster or a node pool has a certain status (e.g., ERROR or DEGRADED).", - "id": "StatusCondition", - "properties": { - "canonicalCode": { - "description": "Canonical code of the condition.", - "enum": [ - "OK", - "CANCELLED", - "UNKNOWN", - "INVALID_ARGUMENT", - "DEADLINE_EXCEEDED", - "NOT_FOUND", - "ALREADY_EXISTS", - "PERMISSION_DENIED", - "UNAUTHENTICATED", - "RESOURCE_EXHAUSTED", - "FAILED_PRECONDITION", - "ABORTED", - "OUT_OF_RANGE", - "UNIMPLEMENTED", - "INTERNAL", - "UNAVAILABLE", - "DATA_LOSS" - ], - "enumDescriptions": [ - "Not an error; returned on success. HTTP Mapping: 200 OK", - "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", - "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", - "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", - "The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout", - "Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found", - "The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict", - "The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden", - "The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized", - "Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests", - "The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request", - "The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict", - "The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request", - "The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented", - "Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error", - "The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable", - "Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error" - ], - "type": "string" - }, - "code": { - "deprecated": true, - "description": "Machine-friendly representation of the condition Deprecated. Use canonical_code instead.", - "enum": [ - "UNKNOWN", - "GCE_STOCKOUT", - "GKE_SERVICE_ACCOUNT_DELETED", - "GCE_QUOTA_EXCEEDED", - "SET_BY_OPERATOR", - "CLOUD_KMS_KEY_ERROR", - "CA_EXPIRING", - "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS", - "CLOUD_KMS_KEY_DESTROYED" - ], - "enumDescriptions": [ - "UNKNOWN indicates a generic condition.", - "GCE_STOCKOUT indicates that Google Compute Engine resources are temporarily unavailable.", - "GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot service account.", - "Google Compute Engine quota was exceeded.", - "Cluster state was manually changed by an SRE due to a system logic error.", - "Unable to perform an encrypt operation against the CloudKMS key used for etcd level encryption.", - "Cluster CA is expiring soon.", - "Node service account is missing permissions.", - "Cloud KMS key version used for etcd level encryption has been destroyed. This is a permanent error." - ], - "type": "string" - }, - "message": { - "description": "Human-friendly representation of the condition", - "type": "string" - } - }, - "type": "object" - }, - "TimeWindow": { - "description": "Represents an arbitrary window of time.", - "id": "TimeWindow", - "properties": { - "endTime": { - "description": "The time that the window ends. The end time should take place after the start time.", - "format": "google-datetime", - "type": "string" - }, - "maintenanceExclusionOptions": { - "$ref": "MaintenanceExclusionOptions", - "description": "MaintenanceExclusionOptions provides maintenance exclusion related options." - }, - "startTime": { - "description": "The time that the window first starts.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "TopologyManager": { - "description": "TopologyManager defines the configuration options for Topology Manager feature. See https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/", - "id": "TopologyManager", - "properties": { - "policy": { - "description": "Configures the strategy for resource alignment. Allowed values are: * none: the default policy, and does not perform any topology alignment. * restricted: the topology manager stores the preferred NUMA node affinity for the container, and will reject the pod if the affinity if not preferred. * best-effort: the topology manager stores the preferred NUMA node affinity for the container. If the affinity is not preferred, the topology manager will admit the pod to the node anyway. * single-numa-node: the topology manager determines if the single NUMA node affinity is possible. If it is, Topology Manager will store this and the Hint Providers can then use this information when making the resource allocation decision. If, however, this is not possible then the Topology Manager will reject the pod from the node. This will result in a pod in a Terminated state with a pod admission failure. The default policy value is 'none' if unspecified. Details about each strategy can be found [here](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies).", - "type": "string" - }, - "scope": { - "description": "The Topology Manager aligns resources in following scopes: * container * pod The default scope is 'container' if unspecified. See https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes", - "type": "string" - } - }, - "type": "object" - }, - "UpdateClusterRequest": { - "description": "UpdateClusterRequest updates the settings of a cluster.", - "id": "UpdateClusterRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "update": { - "$ref": "ClusterUpdate", - "description": "Required. A description of the update." - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "UpdateInfo": { - "description": "UpdateInfo contains resource (instance groups, etc), status and other intermediate information relevant to a node pool upgrade.", - "id": "UpdateInfo", - "properties": { - "blueGreenInfo": { - "$ref": "BlueGreenInfo", - "description": "Information of a blue-green upgrade." - } - }, - "type": "object" - }, - "UpdateMasterRequest": { - "description": "UpdateMasterRequest updates the master of the cluster.", - "id": "UpdateMasterRequest", - "properties": { - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "masterVersion": { - "description": "Required. The Kubernetes version to change the master to. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"-\": picks the default Kubernetes version", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to update. Specified in the format `projects/*/locations/*/clusters/*`.", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "UpdateNodePoolRequest": { - "description": "UpdateNodePoolRequests update a node pool's image and/or version.", - "id": "UpdateNodePoolRequest", - "properties": { - "accelerators": { - "description": "A list of hardware accelerators to be attached to each node. See https://cloud.google.com/compute/docs/gpus for more information about support for GPUs.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "bootDisk": { - "$ref": "BootDisk", - "description": "The desired boot disk config for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified boot disk config." - }, - "clusterId": { - "deprecated": true, - "description": "Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "confidentialNodes": { - "$ref": "ConfidentialNodes", - "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." - }, - "containerdConfig": { - "$ref": "ContainerdConfig", - "description": "The desired containerd config for nodes in the node pool. Initiates an upgrade operation that recreates the nodes with the new config." - }, - "diskSizeGb": { - "description": "Optional. The desired disk size for nodes in the node pool specified in GB. The smallest allowed disk size is 10GB. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.", - "format": "int64", - "type": "string" - }, - "diskType": { - "description": "Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.", - "type": "string" - }, - "etag": { - "description": "The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.", - "type": "string" - }, - "fastSocket": { - "$ref": "FastSocket", - "description": "Enable or disable NCCL fast socket for the node pool." - }, - "flexStart": { - "description": "Flex Start flag for enabling Flex Start VM.", - "type": "boolean" - }, - "gcfsConfig": { - "$ref": "GcfsConfig", - "description": "GCFS config." - }, - "gvnic": { - "$ref": "VirtualNIC", - "description": "Enable or disable gvnic on the node pool." - }, - "imageType": { - "description": "Required. The desired image type for the node pool. Please see https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for available image types.", - "type": "string" - }, - "kubeletConfig": { - "$ref": "NodeKubeletConfig", - "description": "Node kubelet configs." - }, - "labels": { - "$ref": "NodeLabels", - "description": "The desired node labels to be applied to all nodes in the node pool. If this field is not present, the labels will not be changed. Otherwise, the existing node labels will be *replaced* with the provided labels." - }, - "linuxNodeConfig": { - "$ref": "LinuxNodeConfig", - "description": "Parameters that can be configured on Linux nodes." - }, - "locations": { - "description": "The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the node pool's nodes should be located. Changing the locations for a node pool will result in nodes being either created or removed from the node pool, depending on whether locations are being added or removed. Warning: It is recommended to update node pool locations in a standalone API call. Do not combine a location update with changes to other fields (such as `tags`, `labels`, `taints`, etc.) in the same request. Otherwise, the API performs a structural modification where changes to other fields will only apply to newly created nodes and will not be applied to existing nodes in the node pool. To ensure all nodes are updated consistently, use a separate API call for location changes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "$ref": "NodePoolLoggingConfig", - "description": "Logging configuration." - }, - "machineType": { - "description": "Optional. The desired [Google Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.", - "type": "string" - }, - "maxRunDuration": { - "description": "The maximum duration for the nodes to exist. If unspecified, the nodes can exist indefinitely.", - "format": "google-duration", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", - "type": "string" - }, - "nodeNetworkConfig": { - "$ref": "NodeNetworkConfig", - "description": "Node network config." - }, - "nodePoolId": { - "deprecated": true, - "description": "Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "nodeVersion": { - "description": "Required. The Kubernetes version to change the nodes to (typically an upgrade). Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - \"latest\": picks the highest valid Kubernetes version - \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version - \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version - \"1.X.Y-gke.N\": picks an explicit Kubernetes version - \"-\": picks the Kubernetes master version", - "type": "string" - }, - "projectId": { - "deprecated": true, - "description": "Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", - "type": "string" - }, - "queuedProvisioning": { - "$ref": "QueuedProvisioning", - "description": "Specifies the configuration of queued provisioning." - }, - "resourceLabels": { - "$ref": "ResourceLabels", - "description": "The resource labels for the node pool to use to annotate any related Google Compute Engine resources." - }, - "resourceManagerTags": { - "$ref": "ResourceManagerTags", - "description": "Desired resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Existing tags will be replaced with new values." - }, - "storagePools": { - "description": "List of Storage Pools where boot disks are provisioned. Existing Storage Pools will be replaced with storage-pools.", - "items": { - "type": "string" - }, - "type": "array" - }, - "tags": { - "$ref": "NetworkTags", - "description": "The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags." - }, - "taints": { - "$ref": "NodeTaints", - "description": "The desired node taints to be applied to all nodes in the node pool. If this field is not present, the taints will not be changed. Otherwise, the existing node taints will be *replaced* with the provided taints." - }, - "upgradeSettings": { - "$ref": "UpgradeSettings", - "description": "Upgrade settings control disruption and speed of the upgrade." - }, - "windowsNodeConfig": { - "$ref": "WindowsNodeConfig", - "description": "Parameters that can be configured on Windows nodes." - }, - "workloadMetadataConfig": { - "$ref": "WorkloadMetadataConfig", - "description": "The desired workload metadata config for the node pool." - }, - "zone": { - "deprecated": true, - "description": "Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", - "type": "string" - } - }, - "type": "object" - }, - "UpgradeAvailableEvent": { - "description": "UpgradeAvailableEvent is a notification sent to customers when a new available version is released.", - "id": "UpgradeAvailableEvent", - "properties": { - "releaseChannel": { - "$ref": "ReleaseChannel", - "description": "The release channel of the version. If empty, it means a non-channel release." - }, - "resource": { - "description": "Optional relative path to the resource. For example, the relative path of the node pool.", - "type": "string" - }, - "resourceType": { - "description": "The resource type of the release version.", - "enum": [ - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED", - "MASTER", - "NODE_POOL" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "Master / control plane", - "Node pool" - ], - "type": "string" - }, - "version": { - "description": "The release version available for upgrade.", - "type": "string" - } - }, - "type": "object" - }, - "UpgradeDetails": { - "description": "UpgradeDetails contains detailed information of each individual upgrade operation.", - "id": "UpgradeDetails", - "properties": { - "endTime": { - "description": "The end timestamp of the upgrade.", - "format": "google-datetime", - "type": "string" - }, - "initialVersion": { - "description": "The version before the upgrade.", - "type": "string" - }, - "startTime": { - "description": "The start timestamp of the upgrade.", - "format": "google-datetime", - "type": "string" - }, - "startType": { - "description": "The start type of the upgrade.", - "enum": [ - "START_TYPE_UNSPECIFIED", - "AUTOMATIC", - "MANUAL" - ], - "enumDescriptions": [ - "Upgrade start type is unspecified.", - "Upgrade started automatically.", - "Upgrade started manually." - ], - "type": "string" - }, - "state": { - "description": "Output only. The state of the upgrade.", - "enum": [ - "UNKNOWN", - "FAILED", - "SUCCEEDED", - "CANCELED", - "RUNNING" - ], - "enumDescriptions": [ - "Upgrade state is unknown.", - "Upgrade has failed with an error.", - "Upgrade has succeeded.", - "Upgrade has been canceled.", - "Upgrade is running." - ], - "readOnly": true, - "type": "string" - }, - "targetVersion": { - "description": "The version after the upgrade.", - "type": "string" - } - }, - "type": "object" - }, - "UpgradeEvent": { - "description": "UpgradeEvent is a notification sent to customers by the cluster server when a resource is upgrading.", - "id": "UpgradeEvent", - "properties": { - "currentVersion": { - "description": "The current version before the upgrade.", - "type": "string" - }, - "operation": { - "description": "The operation associated with this upgrade.", - "type": "string" - }, - "operationStartTime": { - "description": "The time when the operation was started.", - "format": "google-datetime", - "type": "string" - }, - "resource": { - "description": "Optional relative path to the resource. For example in node pool upgrades, the relative path of the node pool.", - "type": "string" - }, - "resourceType": { - "description": "The resource type that is upgrading.", - "enum": [ - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED", - "MASTER", - "NODE_POOL" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "Master / control plane", - "Node pool" - ], - "type": "string" - }, - "targetVersion": { - "description": "The target version for the upgrade.", - "type": "string" - } - }, - "type": "object" - }, - "UpgradeInfoEvent": { - "description": "UpgradeInfoEvent is a notification sent to customers about the upgrade information of a resource.", - "id": "UpgradeInfoEvent", - "properties": { - "currentVersion": { - "description": "The current version before the upgrade.", - "type": "string" - }, - "description": { - "description": "A brief description of the event.", - "type": "string" - }, - "endTime": { - "description": "The time when the operation ended.", - "format": "google-datetime", - "type": "string" - }, - "eventType": { - "description": "The type of the event.", - "enum": [ - "EVENT_TYPE_UNSPECIFIED", - "END_OF_SUPPORT", - "COS_MILESTONE_VERSION_UPDATE", - "UPGRADE_LIFECYCLE" - ], - "enumDescriptions": [ - "EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified.", - "END_OF_SUPPORT indicates GKE version reaches end of support, check standard_support_end_time and extended_support_end_time for more details.", - "COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will update COS milestone version for new patch versions starting with the one in the description.", - "UPGRADE_LIFECYCLE indicates the event is about the upgrade lifecycle." - ], - "type": "string" - }, - "extendedSupportEndTime": { - "description": "The end of extended support timestamp.", - "format": "google-datetime", - "type": "string" - }, - "operation": { - "description": "The operation associated with this upgrade.", - "type": "string" - }, - "resource": { - "description": "Optional relative path to the resource. For example in node pool upgrades, the relative path of the node pool.", - "type": "string" - }, - "resourceType": { - "description": "The resource type associated with the upgrade.", - "enum": [ - "UPGRADE_RESOURCE_TYPE_UNSPECIFIED", - "MASTER", - "NODE_POOL" - ], - "enumDescriptions": [ - "Default value. This shouldn't be used.", - "Master / control plane", - "Node pool" - ], - "type": "string" - }, - "standardSupportEndTime": { - "description": "The end of standard support timestamp.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The time when the operation was started.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "Output only. The state of the upgrade.", - "enum": [ - "STATE_UNSPECIFIED", - "STARTED", - "SUCCEEDED", - "FAILED", - "CANCELED" - ], - "enumDescriptions": [ - "STATE_UNSPECIFIED indicates the state is unspecified.", - "STARTED indicates the upgrade has started.", - "SUCCEEDED indicates the upgrade has completed successfully.", - "FAILED indicates the upgrade has failed.", - "CANCELED indicates the upgrade has canceled." - ], - "readOnly": true, - "type": "string" - }, - "targetVersion": { - "description": "The target version for the upgrade.", - "type": "string" - } - }, - "type": "object" - }, - "UpgradeSettings": { - "description": "These upgrade settings control the level of parallelism and the level of disruption caused by an upgrade. maxUnavailable controls the number of nodes that can be simultaneously unavailable. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). Note: upgrades inevitably introduce some disruption since workloads need to be moved from old nodes to new, upgraded ones. Even if maxUnavailable=0, this holds true. (Disruption stays within the limits of PodDisruptionBudget, if it is configured.) Consider a hypothetical node pool with 5 nodes having maxSurge=2, maxUnavailable=1. This means the upgrade process upgrades 3 nodes simultaneously. It creates 2 additional (upgraded) nodes, then it brings down 3 old (not yet upgraded) nodes at the same time. This ensures that there are always at least 4 nodes available. These upgrade settings configure the upgrade strategy for the node pool. Use strategy to switch between the strategies applied to the node pool. If the strategy is ROLLING, use max_surge and max_unavailable to control the level of parallelism and the level of disruption caused by upgrade. 1. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. 2. maxUnavailable controls the number of nodes that can be simultaneously unavailable. 3. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). If the strategy is BLUE_GREEN, use blue_green_settings to configure the blue-green upgrade related settings. 1. standard_rollout_policy is the default policy. The policy is used to control the way blue pool gets drained. The draining is executed in the batch mode. The batch size could be specified as either percentage of the node pool size or the number of nodes. batch_soak_duration is the soak time after each batch gets drained. 2. node_pool_soak_duration is the soak time after all blue nodes are drained. After this period, the blue pool nodes will be deleted.", - "id": "UpgradeSettings", - "properties": { - "blueGreenSettings": { - "$ref": "BlueGreenSettings", - "description": "Settings for blue-green upgrade strategy." - }, - "maxSurge": { - "description": "The maximum number of nodes that can be created beyond the current size of the node pool during the upgrade process.", - "format": "int32", - "type": "integer" - }, - "maxUnavailable": { - "description": "The maximum number of nodes that can be simultaneously unavailable during the upgrade process. A node is considered available if its status is Ready.", - "format": "int32", - "type": "integer" - }, - "strategy": { - "description": "Update strategy of the node pool.", - "enum": [ - "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED", - "BLUE_GREEN", - "SURGE" - ], - "enumDescriptions": [ - "Default value if unset. GKE internally defaults the update strategy to SURGE for unspecified strategies.", - "blue-green upgrade.", - "SURGE is the traditional way of upgrade a node pool. max_surge and max_unavailable determines the level of upgrade parallelism." - ], - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetwork": { - "description": "UsableSubnetwork resource returns the subnetwork name, its associated network and the primary CIDR range.", - "id": "UsableSubnetwork", - "properties": { - "ipCidrRange": { - "description": "The range of internal addresses that are owned by this subnetwork.", - "type": "string" - }, - "network": { - "description": "Network Name. Example: projects/my-project/global/networks/my-network", - "type": "string" - }, - "secondaryIpRanges": { - "description": "Secondary IP ranges.", - "items": { - "$ref": "UsableSubnetworkSecondaryRange" - }, - "type": "array" - }, - "statusMessage": { - "description": "A human readable status message representing the reasons for cases where the caller cannot use the secondary ranges under the subnet. For example if the secondary_ip_ranges is empty due to a permission issue, an insufficient permission message will be given by status_message.", - "type": "string" - }, - "subnetwork": { - "description": "Subnetwork Name. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet", - "type": "string" - } - }, - "type": "object" - }, - "UsableSubnetworkSecondaryRange": { - "description": "Secondary IP range of a usable subnetwork.", - "id": "UsableSubnetworkSecondaryRange", - "properties": { - "ipCidrRange": { - "description": "The range of IP addresses belonging to this subnetwork secondary range.", - "type": "string" - }, - "rangeName": { - "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.", - "type": "string" - }, - "status": { - "description": "This field is to determine the status of the secondary range programmably.", - "enum": [ - "UNKNOWN", - "UNUSED", - "IN_USE_SERVICE", - "IN_USE_SHAREABLE_POD", - "IN_USE_MANAGED_POD" - ], - "enumDescriptions": [ - "UNKNOWN is the zero value of the Status enum. It's not a valid status.", - "UNUSED denotes that this range is unclaimed by any cluster.", - "IN_USE_SERVICE denotes that this range is claimed by cluster(s) for services. User-managed services range can be shared between clusters within the same subnetwork.", - "IN_USE_SHAREABLE_POD denotes this range was created by the network admin and is currently claimed by a cluster for pods. It can only be used by other clusters as a pod range.", - "IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed for pods. It cannot be used for other clusters." - ], - "type": "string" - } - }, - "type": "object" - }, - "UserManagedKeysConfig": { - "description": "UserManagedKeysConfig holds the resource address to Keys which are used for signing certs and token that are used for communication within cluster.", - "id": "UserManagedKeysConfig", - "properties": { - "aggregationCa": { - "description": "The Certificate Authority Service caPool to use for the aggregation CA in this cluster.", - "type": "string" - }, - "clusterCa": { - "description": "The Certificate Authority Service caPool to use for the cluster CA in this cluster.", - "type": "string" - }, - "controlPlaneDiskEncryptionKey": { - "description": "The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control plane nodes.", - "type": "string" - }, - "controlPlaneDiskEncryptionKeyVersions": { - "description": "Output only. All of the versions of the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the control plane nodes.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "etcdApiCa": { - "description": "Resource path of the Certificate Authority Service caPool to use for the etcd API CA in this cluster.", - "type": "string" - }, - "etcdPeerCa": { - "description": "Resource path of the Certificate Authority Service caPool to use for the etcd peer CA in this cluster.", - "type": "string" - }, - "gkeopsEtcdBackupEncryptionKey": { - "description": "Resource path of the Cloud KMS cryptoKey to use for encryption of internal etcd backups.", - "type": "string" - }, - "serviceAccountSigningKeys": { - "description": "The Cloud KMS cryptoKeyVersions to use for signing service account JWTs issued by this cluster. Format: `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccountVerificationKeys": { - "description": "The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs issued by this cluster. Format: `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}`", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "VerticalPodAutoscaling": { - "description": "VerticalPodAutoscaling contains global, per-cluster information required by Vertical Pod Autoscaler to automatically adjust the resources of pods controlled by it.", - "id": "VerticalPodAutoscaling", - "properties": { - "enabled": { - "description": "Enables vertical pod autoscaling.", - "type": "boolean" - } - }, - "type": "object" - }, - "VirtualNIC": { - "description": "Configuration of gVNIC feature.", - "id": "VirtualNIC", - "properties": { - "enabled": { - "description": "Whether gVNIC features are enabled in the node pool.", - "type": "boolean" - } - }, - "type": "object" - }, - "WindowsNodeConfig": { - "description": "Parameters that can be configured on Windows nodes. Windows Node Config that define the parameters that will be used to configure the Windows node pool settings.", - "id": "WindowsNodeConfig", - "properties": { - "osVersion": { - "description": "OSVersion specifies the Windows node config to be used on the node.", - "enum": [ - "OS_VERSION_UNSPECIFIED", - "OS_VERSION_LTSC2019", - "OS_VERSION_LTSC2022" - ], - "enumDescriptions": [ - "When OSVersion is not specified.", - "LTSC2019 specifies to use LTSC2019 as the Windows Servercore Base Image.", - "LTSC2022 specifies to use LTSC2022 as the Windows Servercore Base Image." - ], - "type": "string" - } - }, - "type": "object" - }, - "WorkloadIdentityConfig": { - "description": "Configuration for the use of Kubernetes Service Accounts in IAM policies.", - "id": "WorkloadIdentityConfig", - "properties": { - "workloadPool": { - "description": "The workload pool to attach all Kubernetes service accounts to.", - "type": "string" - } - }, - "type": "object" - }, - "WorkloadMetadataConfig": { - "description": "WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool.", - "id": "WorkloadMetadataConfig", - "properties": { - "mode": { - "description": "Mode is the configuration for how to expose metadata to workloads running on the node pool.", - "enum": [ - "MODE_UNSPECIFIED", - "GCE_METADATA", - "GKE_METADATA" - ], - "enumDescriptions": [ - "Not set.", - "Expose all Compute Engine metadata to pods.", - "Run the GKE Metadata Server on this node. The GKE Metadata Server exposes a metadata API to workloads that is compatible with the V1 Compute Metadata APIs exposed by the Compute Engine and App Engine Metadata Servers. This feature can only be enabled if Workload Identity is enabled at the cluster level." - ], - "type": "string" - } - }, - "type": "object" - }, - "WorkloadPolicyConfig": { - "description": "WorkloadPolicyConfig is the configuration related to GCW workload policy", - "id": "WorkloadPolicyConfig", - "properties": { - "allowNetAdmin": { - "description": "If true, workloads can use NET_ADMIN capability.", - "type": "boolean" - }, - "autopilotCompatibilityAuditingEnabled": { - "description": "If true, enables the GCW Auditor that audits workloads on standard clusters.", - "type": "boolean" - } - }, - "type": "object" - }, - "WritableCgroups": { - "description": "Defines writable cgroups configuration.", - "id": "WritableCgroups", - "properties": { - "enabled": { - "description": "Optional. Whether writable cgroups is enabled.", - "type": "boolean" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Kubernetes Engine API", - "version": "v1" -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go deleted file mode 100644 index 0631289b2fb47..0000000000000 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ /dev/null @@ -1,17231 +0,0 @@ -// Copyright 2025 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 container provides access to the Kubernetes Engine API. -// -// For product documentation, see: https://cloud.google.com/kubernetes-engine/docs/ -// -// # 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/container/v1" -// ... -// ctx := context.Background() -// containerService, err := container.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]: -// -// containerService, err := container.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, ...) -// containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package container // import "google.golang.org/api/container/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "container:v1" -const apiName = "container" -const apiVersion = "v1" -const basePath = "https://container.googleapis.com/" -const basePathTemplate = "https://container.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://container.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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Projects = NewProjectsService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - 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.Aggregated = NewProjectsAggregatedService(s) - rs.Locations = NewProjectsLocationsService(s) - rs.Zones = NewProjectsZonesService(s) - return rs -} - -type ProjectsService struct { - s *Service - - Aggregated *ProjectsAggregatedService - - Locations *ProjectsLocationsService - - Zones *ProjectsZonesService -} - -func NewProjectsAggregatedService(s *Service) *ProjectsAggregatedService { - rs := &ProjectsAggregatedService{s: s} - rs.UsableSubnetworks = NewProjectsAggregatedUsableSubnetworksService(s) - return rs -} - -type ProjectsAggregatedService struct { - s *Service - - UsableSubnetworks *ProjectsAggregatedUsableSubnetworksService -} - -func NewProjectsAggregatedUsableSubnetworksService(s *Service) *ProjectsAggregatedUsableSubnetworksService { - rs := &ProjectsAggregatedUsableSubnetworksService{s: s} - return rs -} - -type ProjectsAggregatedUsableSubnetworksService struct { - s *Service -} - -func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { - rs := &ProjectsLocationsService{s: s} - rs.Clusters = NewProjectsLocationsClustersService(s) - rs.Operations = NewProjectsLocationsOperationsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - Clusters *ProjectsLocationsClustersService - - Operations *ProjectsLocationsOperationsService -} - -func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { - rs := &ProjectsLocationsClustersService{s: s} - rs.NodePools = NewProjectsLocationsClustersNodePoolsService(s) - rs.WellKnown = NewProjectsLocationsClustersWellKnownService(s) - return rs -} - -type ProjectsLocationsClustersService struct { - s *Service - - NodePools *ProjectsLocationsClustersNodePoolsService - - WellKnown *ProjectsLocationsClustersWellKnownService -} - -func NewProjectsLocationsClustersNodePoolsService(s *Service) *ProjectsLocationsClustersNodePoolsService { - rs := &ProjectsLocationsClustersNodePoolsService{s: s} - return rs -} - -type ProjectsLocationsClustersNodePoolsService struct { - s *Service -} - -func NewProjectsLocationsClustersWellKnownService(s *Service) *ProjectsLocationsClustersWellKnownService { - rs := &ProjectsLocationsClustersWellKnownService{s: s} - return rs -} - -type ProjectsLocationsClustersWellKnownService struct { - s *Service -} - -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { - rs := &ProjectsLocationsOperationsService{s: s} - return rs -} - -type ProjectsLocationsOperationsService struct { - s *Service -} - -func NewProjectsZonesService(s *Service) *ProjectsZonesService { - rs := &ProjectsZonesService{s: s} - rs.Clusters = NewProjectsZonesClustersService(s) - rs.Operations = NewProjectsZonesOperationsService(s) - return rs -} - -type ProjectsZonesService struct { - s *Service - - Clusters *ProjectsZonesClustersService - - Operations *ProjectsZonesOperationsService -} - -func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { - rs := &ProjectsZonesClustersService{s: s} - rs.NodePools = NewProjectsZonesClustersNodePoolsService(s) - return rs -} - -type ProjectsZonesClustersService struct { - s *Service - - NodePools *ProjectsZonesClustersNodePoolsService -} - -func NewProjectsZonesClustersNodePoolsService(s *Service) *ProjectsZonesClustersNodePoolsService { - rs := &ProjectsZonesClustersNodePoolsService{s: s} - return rs -} - -type ProjectsZonesClustersNodePoolsService struct { - s *Service -} - -func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { - rs := &ProjectsZonesOperationsService{s: s} - return rs -} - -type ProjectsZonesOperationsService struct { - s *Service -} - -// AcceleratorConfig: AcceleratorConfig represents a Hardware Accelerator -// request. -type AcceleratorConfig struct { - // AcceleratorCount: The number of the accelerator cards exposed to an - // instance. - AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` - // AcceleratorType: The accelerator type resource name. List of supported - // accelerators here (https://cloud.google.com/compute/docs/gpus) - AcceleratorType string `json:"acceleratorType,omitempty"` - // GpuDriverInstallationConfig: The configuration for auto installation of GPU - // driver. - GpuDriverInstallationConfig *GPUDriverInstallationConfig `json:"gpuDriverInstallationConfig,omitempty"` - // GpuPartitionSize: Size of partitions to create on the GPU. Valid values are - // described in the NVIDIA mig user guide - // (https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning). - GpuPartitionSize string `json:"gpuPartitionSize,omitempty"` - // GpuSharingConfig: The configuration for GPU sharing options. - GpuSharingConfig *GPUSharingConfig `json:"gpuSharingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorConfig) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdditionalIPRangesConfig: AdditionalIPRangesConfig is the configuration for -// individual additional subnetwork attached to the cluster -type AdditionalIPRangesConfig struct { - // PodIpv4RangeNames: List of secondary ranges names within this subnetwork - // that can be used for pod IPs. Example1: gke-pod-range1 Example2: - // gke-pod-range1,gke-pod-range2 - PodIpv4RangeNames []string `json:"podIpv4RangeNames,omitempty"` - // Subnetwork: Name of the subnetwork. This can be the full path of the - // subnetwork or just the name. Example1: my-subnet Example2: - // projects/gke-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "PodIpv4RangeNames") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PodIpv4RangeNames") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdditionalIPRangesConfig) MarshalJSON() ([]byte, error) { - type NoMethod AdditionalIPRangesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdditionalNodeNetworkConfig: AdditionalNodeNetworkConfig is the -// configuration for additional node networks within the NodeNetworkConfig -// message -type AdditionalNodeNetworkConfig struct { - // Network: Name of the VPC where the additional interface belongs - Network string `json:"network,omitempty"` - // Subnetwork: Name of the subnetwork where the additional interface belongs - Subnetwork string `json:"subnetwork,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdditionalNodeNetworkConfig) MarshalJSON() ([]byte, error) { - type NoMethod AdditionalNodeNetworkConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdditionalPodNetworkConfig: AdditionalPodNetworkConfig is the configuration -// for additional pod networks within the NodeNetworkConfig message -type AdditionalPodNetworkConfig struct { - // MaxPodsPerNode: The maximum number of pods per node which use this pod - // network. - MaxPodsPerNode *MaxPodsConstraint `json:"maxPodsPerNode,omitempty"` - // NetworkAttachment: The name of the network attachment for pods to - // communicate to; cannot be specified along with subnetwork or - // secondary_pod_range. - NetworkAttachment string `json:"networkAttachment,omitempty"` - // SecondaryPodRange: The name of the secondary range on the subnet which - // provides IP address for this pod range. - SecondaryPodRange string `json:"secondaryPodRange,omitempty"` - // Subnetwork: Name of the subnetwork where the additional pod network belongs. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxPodsPerNode") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdditionalPodNetworkConfig) MarshalJSON() ([]byte, error) { - type NoMethod AdditionalPodNetworkConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdditionalPodRangesConfig: AdditionalPodRangesConfig is the configuration -// for additional pod secondary ranges supporting the ClusterUpdate message. -type AdditionalPodRangesConfig struct { - // PodRangeInfo: Output only. Information for additional pod range. - PodRangeInfo []*RangeInfo `json:"podRangeInfo,omitempty"` - // PodRangeNames: Name for pod secondary ipv4 range which has the actual range - // defined ahead. - PodRangeNames []string `json:"podRangeNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "PodRangeInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PodRangeInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdditionalPodRangesConfig) MarshalJSON() ([]byte, error) { - type NoMethod AdditionalPodRangesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AddonsConfig: Configuration for the addons that can be automatically spun up -// in the cluster, enabling additional functionality. -type AddonsConfig struct { - // CloudRunConfig: Configuration for the Cloud Run addon, which allows the user - // to use a managed Knative service. - CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"` - // ConfigConnectorConfig: Configuration for the ConfigConnector add-on, a - // Kubernetes extension to manage hosted Google Cloud services through the - // Kubernetes API. - ConfigConnectorConfig *ConfigConnectorConfig `json:"configConnectorConfig,omitempty"` - // DnsCacheConfig: Configuration for NodeLocalDNS, a dns cache running on - // cluster nodes - DnsCacheConfig *DnsCacheConfig `json:"dnsCacheConfig,omitempty"` - // GcePersistentDiskCsiDriverConfig: Configuration for the Compute Engine - // Persistent Disk CSI driver. - GcePersistentDiskCsiDriverConfig *GcePersistentDiskCsiDriverConfig `json:"gcePersistentDiskCsiDriverConfig,omitempty"` - // GcpFilestoreCsiDriverConfig: Configuration for the Filestore CSI driver. - GcpFilestoreCsiDriverConfig *GcpFilestoreCsiDriverConfig `json:"gcpFilestoreCsiDriverConfig,omitempty"` - // GcsFuseCsiDriverConfig: Configuration for the Cloud Storage Fuse CSI driver. - GcsFuseCsiDriverConfig *GcsFuseCsiDriverConfig `json:"gcsFuseCsiDriverConfig,omitempty"` - // GkeBackupAgentConfig: Configuration for the Backup for GKE agent addon. - GkeBackupAgentConfig *GkeBackupAgentConfig `json:"gkeBackupAgentConfig,omitempty"` - // HighScaleCheckpointingConfig: Configuration for the High Scale Checkpointing - // add-on. - HighScaleCheckpointingConfig *HighScaleCheckpointingConfig `json:"highScaleCheckpointingConfig,omitempty"` - // HorizontalPodAutoscaling: Configuration for the horizontal pod autoscaling - // feature, which increases or decreases the number of replica pods a - // replication controller has based on the resource usage of the existing pods. - HorizontalPodAutoscaling *HorizontalPodAutoscaling `json:"horizontalPodAutoscaling,omitempty"` - // HttpLoadBalancing: Configuration for the HTTP (L7) load balancing controller - // addon, which makes it easy to set up HTTP load balancers for services in a - // cluster. - HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` - // KubernetesDashboard: Configuration for the Kubernetes Dashboard. This addon - // is deprecated, and will be disabled in 1.15. It is recommended to use the - // Cloud Console to manage and monitor your Kubernetes clusters, workloads and - // applications. For more information, see: - // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards - KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` - // LustreCsiDriverConfig: Configuration for the Lustre CSI driver. - LustreCsiDriverConfig *LustreCsiDriverConfig `json:"lustreCsiDriverConfig,omitempty"` - // NetworkPolicyConfig: Configuration for NetworkPolicy. This only tracks - // whether the addon is enabled or not on the Master, it does not track whether - // network policy is enabled for the nodes. - NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` - // ParallelstoreCsiDriverConfig: Configuration for the Cloud Storage - // Parallelstore CSI driver. - ParallelstoreCsiDriverConfig *ParallelstoreCsiDriverConfig `json:"parallelstoreCsiDriverConfig,omitempty"` - // RayOperatorConfig: Optional. Configuration for Ray Operator addon. - RayOperatorConfig *RayOperatorConfig `json:"rayOperatorConfig,omitempty"` - // StatefulHaConfig: Optional. Configuration for the StatefulHA add-on. - StatefulHaConfig *StatefulHAConfig `json:"statefulHaConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudRunConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AddonsConfig) MarshalJSON() ([]byte, error) { - type NoMethod AddonsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdvancedDatapathObservabilityConfig: AdvancedDatapathObservabilityConfig -// specifies configuration of observability features of advanced datapath. -type AdvancedDatapathObservabilityConfig struct { - // EnableMetrics: Expose flow metrics on nodes - EnableMetrics bool `json:"enableMetrics,omitempty"` - // EnableRelay: Enable Relay component - EnableRelay bool `json:"enableRelay,omitempty"` - // RelayMode: Method used to make Relay available - // - // Possible values: - // "RELAY_MODE_UNSPECIFIED" - Default value. This shouldn't be used. - // "DISABLED" - disabled - // "INTERNAL_VPC_LB" - exposed via internal load balancer - // "EXTERNAL_LB" - exposed via external load balancer - RelayMode string `json:"relayMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableMetrics") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableMetrics") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdvancedDatapathObservabilityConfig) MarshalJSON() ([]byte, error) { - type NoMethod AdvancedDatapathObservabilityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AdvancedMachineFeatures: Specifies options for controlling advanced machine -// features. -type AdvancedMachineFeatures struct { - // EnableNestedVirtualization: Whether or not to enable nested virtualization - // (defaults to false). - EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // PerformanceMonitoringUnit: Type of Performance Monitoring Unit (PMU) - // requested on node pool instances. If unset, PMU will not be available to the - // node. - // - // Possible values: - // "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED" - PMU not enabled. - // "ARCHITECTURAL" - Architecturally defined non-LLC events. - // "STANDARD" - Most documented core/L2 events. - // "ENHANCED" - Most documented core/L2 and LLC events. - PerformanceMonitoringUnit string `json:"performanceMonitoringUnit,omitempty"` - // ThreadsPerCore: The number of threads per physical core. To disable - // simultaneous multithreading (SMT) set this to 1. If unset, the maximum - // number of threads supported per core by the underlying processor is assumed. - ThreadsPerCore int64 `json:"threadsPerCore,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EnableNestedVirtualization") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableNestedVirtualization") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AdvancedMachineFeatures) MarshalJSON() ([]byte, error) { - type NoMethod AdvancedMachineFeatures - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AnonymousAuthenticationConfig: AnonymousAuthenticationConfig defines the -// settings needed to limit endpoints that allow anonymous authentication. -type AnonymousAuthenticationConfig struct { - // Mode: Defines the mode of limiting anonymous access in the cluster. - // - // Possible values: - // "MODE_UNSPECIFIED" - Default value not specified. - // "ENABLED" - Anonymous authentication is allowed for all endpoints. - // "LIMITED" - Anonymous authentication is allowed for only health check - // endpoints. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AnonymousAuthenticationConfig) MarshalJSON() ([]byte, error) { - type NoMethod AnonymousAuthenticationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthenticatorGroupsConfig: Configuration for returning group information -// from authenticators. -type AuthenticatorGroupsConfig struct { - // Enabled: Whether this cluster should return group membership lookups during - // authentication using a group of security groups. - Enabled bool `json:"enabled,omitempty"` - // SecurityGroup: The name of the security group-of-groups to be used. Only - // relevant if enabled = true. - SecurityGroup string `json:"securityGroup,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuthenticatorGroupsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoIpamConfig: AutoIpamConfig contains all information related to Auto IPAM -type AutoIpamConfig struct { - // Enabled: The flag that enables Auto IPAM on this cluster - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoIpamConfig) MarshalJSON() ([]byte, error) { - type NoMethod AutoIpamConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoMonitoringConfig: AutoMonitoringConfig defines the configuration for GKE -// Workload Auto-Monitoring. -type AutoMonitoringConfig struct { - // Scope: Scope for GKE Workload Auto-Monitoring. - // - // Possible values: - // "SCOPE_UNSPECIFIED" - Not set. - // "ALL" - Auto-Monitoring is enabled for all supported applications. - // "NONE" - Disable Auto-Monitoring. - Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Scope") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Scope") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoMonitoringConfig) MarshalJSON() ([]byte, error) { - type NoMethod AutoMonitoringConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for the -// user to control how the Auto Upgrades will proceed. -type AutoUpgradeOptions struct { - // AutoUpgradeStartTime: Output only. This field is set when upgrades are about - // to commence with the approximate start time for the upgrades, in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) text format. - AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` - // Description: Output only. This field is set when upgrades are about to - // commence with the description of the upgrade. - Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoUpgradeStartTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoUpgradeStartTime") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoUpgradeOptions) MarshalJSON() ([]byte, error) { - type NoMethod AutoUpgradeOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Autopilot: Autopilot is the configuration for Autopilot settings on the -// cluster. -type Autopilot struct { - // Enabled: Enable Autopilot - Enabled bool `json:"enabled,omitempty"` - // PrivilegedAdmissionConfig: PrivilegedAdmissionConfig is the configuration - // related to privileged admission control. - PrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"privilegedAdmissionConfig,omitempty"` - // WorkloadPolicyConfig: WorkloadPolicyConfig is the configuration related to - // GCW workload policy - WorkloadPolicyConfig *WorkloadPolicyConfig `json:"workloadPolicyConfig,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Autopilot) MarshalJSON() ([]byte, error) { - type NoMethod Autopilot - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutopilotCompatibilityIssue: AutopilotCompatibilityIssue contains -// information about a specific compatibility issue with Autopilot mode. -type AutopilotCompatibilityIssue struct { - // ConstraintType: The constraint type of the issue. - ConstraintType string `json:"constraintType,omitempty"` - // Description: The description of the issue. - Description string `json:"description,omitempty"` - // DocumentationUrl: A URL to a public documentation, which addresses resolving - // this issue. - DocumentationUrl string `json:"documentationUrl,omitempty"` - // IncompatibilityType: The incompatibility type of this issue. - // - // Possible values: - // "UNSPECIFIED" - Default value, should not be used. - // "INCOMPATIBILITY" - Indicates that the issue is a known incompatibility - // between the cluster and Autopilot mode. - // "ADDITIONAL_CONFIG_REQUIRED" - Indicates the issue is an incompatibility - // if customers take no further action to resolve. - // "PASSED_WITH_OPTIONAL_CONFIG" - Indicates the issue is not an - // incompatibility, but depending on the workloads business logic, there is a - // potential that they won't work on Autopilot. - IncompatibilityType string `json:"incompatibilityType,omitempty"` - // LastObservation: The last time when this issue was observed. - LastObservation string `json:"lastObservation,omitempty"` - // Subjects: The name of the resources which are subject to this issue. - Subjects []string `json:"subjects,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConstraintType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConstraintType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutopilotCompatibilityIssue) MarshalJSON() ([]byte, error) { - type NoMethod AutopilotCompatibilityIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutopilotConfig: AutopilotConfig contains configuration of autopilot feature -// for this nodepool. -type AutopilotConfig struct { - // Enabled: Denotes that nodes belonging to this node pool are Autopilot nodes. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutopilotConfig) MarshalJSON() ([]byte, error) { - type NoMethod AutopilotConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults contains -// defaults for a node pool created by NAP. -type AutoprovisioningNodePoolDefaults struct { - // BootDiskKmsKey: The Customer Managed Encryption Key used to encrypt the boot - // disk attached to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKey - // s/[KEY_NAME]. For more information about protecting resources with Cloud KMS - // Keys please see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` - // DiskSizeGb: Size of the disk attached to each node, specified in GB. The - // smallest allowed disk size is 10GB. If unspecified, the default disk size is - // 100GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // DiskType: Type of the disk attached to each node (e.g. 'pd-standard', - // 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is - // 'pd-standard' - DiskType string `json:"diskType,omitempty"` - // ImageType: The image type to use for NAP created node. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - ImageType string `json:"imageType,omitempty"` - // InsecureKubeletReadonlyPortEnabled: DEPRECATED. Use - // NodePoolAutoConfig.NodeKubeletConfig instead. - InsecureKubeletReadonlyPortEnabled bool `json:"insecureKubeletReadonlyPortEnabled,omitempty"` - // Management: Specifies the node management options for NAP created - // node-pools. - Management *NodeManagement `json:"management,omitempty"` - // MinCpuPlatform: Deprecated. Minimum CPU platform to be used for NAP created - // node pools. The instance may be scheduled on the specified or newer CPU - // platform. Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: Intel Haswell or minCpuPlatform: Intel Sandy Bridge. For - // more information, read how to specify min CPU platform - // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform). - // This field is deprecated, min_cpu_platform should be specified using - // `cloud.google.com/requested-min-cpu-platform` label selector on the pod. To - // unset the min cpu platform field pass "automatic" as field value. - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // OauthScopes: Scopes that are used by NAP when creating node pools. - OauthScopes []string `json:"oauthScopes,omitempty"` - // ServiceAccount: The Google Cloud Platform Service Account to be used by the - // node VMs. - ServiceAccount string `json:"serviceAccount,omitempty"` - // ShieldedInstanceConfig: Shielded Instance options. - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - // UpgradeSettings: Specifies the upgrade settings for NAP created node pools - UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "BootDiskKmsKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BootDiskKmsKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { - type NoMethod AutoprovisioningNodePoolDefaults - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AutoscaledRolloutPolicy: Autoscaled rollout policy utilizes the cluster -// autoscaler during blue-green upgrade to scale both the blue and green pools. -type AutoscaledRolloutPolicy struct { - // WaitForDrainDuration: Optional. Time to wait after cordoning the blue pool - // before draining the nodes. Defaults to 3 days. The value can be set between - // 0 and 7 days, inclusive. - WaitForDrainDuration string `json:"waitForDrainDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "WaitForDrainDuration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WaitForDrainDuration") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AutoscaledRolloutPolicy) MarshalJSON() ([]byte, error) { - type NoMethod AutoscaledRolloutPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BestEffortProvisioning: Best effort provisioning. -type BestEffortProvisioning struct { - // Enabled: When this is enabled, cluster/node pool creations will ignore - // non-fatal errors like stockout to best provision as many nodes as possible - // right now and eventually bring up all target number of nodes - Enabled bool `json:"enabled,omitempty"` - // MinProvisionNodes: Minimum number of nodes to be provisioned to be - // considered as succeeded, and the rest of nodes will be provisioned gradually - // and eventually when stockout issue has been resolved. - MinProvisionNodes int64 `json:"minProvisionNodes,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BestEffortProvisioning) MarshalJSON() ([]byte, error) { - type NoMethod BestEffortProvisioning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BigQueryDestination: Parameters for using BigQuery as the destination of -// resource usage export. -type BigQueryDestination struct { - // DatasetId: The ID of a BigQuery Dataset. - DatasetId string `json:"datasetId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatasetId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatasetId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BigQueryDestination) MarshalJSON() ([]byte, error) { - type NoMethod BigQueryDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BinaryAuthorization: Configuration for Binary Authorization. -type BinaryAuthorization struct { - // Enabled: This field is deprecated. Leave this unset and instead configure - // BinaryAuthorization using evaluation_mode. If evaluation_mode is set to - // anything other than EVALUATION_MODE_UNSPECIFIED, this field is ignored. - Enabled bool `json:"enabled,omitempty"` - // EvaluationMode: Mode of operation for binauthz policy evaluation. If - // unspecified, defaults to DISABLED. - // - // Possible values: - // "EVALUATION_MODE_UNSPECIFIED" - Default value - // "DISABLED" - Disable BinaryAuthorization - // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission requests - // with BinaryAuthorization using the project's singleton policy. This is - // equivalent to setting the enabled boolean to true. - EvaluationMode string `json:"evaluationMode,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BinaryAuthorization) MarshalJSON() ([]byte, error) { - type NoMethod BinaryAuthorization - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BlueGreenInfo: Information relevant to blue-green upgrade. -type BlueGreenInfo struct { - // BlueInstanceGroupUrls: The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with blue pool. - BlueInstanceGroupUrls []string `json:"blueInstanceGroupUrls,omitempty"` - // BluePoolDeletionStartTime: Time to start deleting blue pool to complete - // blue-green upgrade, in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text - // format. - BluePoolDeletionStartTime string `json:"bluePoolDeletionStartTime,omitempty"` - // GreenInstanceGroupUrls: The resource URLs of the [managed instance groups] - // (/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with green pool. - GreenInstanceGroupUrls []string `json:"greenInstanceGroupUrls,omitempty"` - // GreenPoolVersion: Version of green pool. - GreenPoolVersion string `json:"greenPoolVersion,omitempty"` - // Phase: Current blue-green upgrade phase. - // - // Possible values: - // "PHASE_UNSPECIFIED" - Unspecified phase. - // "UPDATE_STARTED" - blue-green upgrade has been initiated. - // "CREATING_GREEN_POOL" - Start creating green pool nodes. - // "CORDONING_BLUE_POOL" - Start cordoning blue pool nodes. - // "DRAINING_BLUE_POOL" - Start draining blue pool nodes. - // "NODE_POOL_SOAKING" - Start soaking time after draining entire blue pool. - // "DELETING_BLUE_POOL" - Start deleting blue nodes. - // "ROLLBACK_STARTED" - Rollback has been initiated. - Phase string `json:"phase,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlueInstanceGroupUrls") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlueInstanceGroupUrls") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BlueGreenInfo) MarshalJSON() ([]byte, error) { - type NoMethod BlueGreenInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BlueGreenSettings: Settings for blue-green upgrade. -type BlueGreenSettings struct { - // AutoscaledRolloutPolicy: Autoscaled policy for cluster autoscaler enabled - // blue-green upgrade. - AutoscaledRolloutPolicy *AutoscaledRolloutPolicy `json:"autoscaledRolloutPolicy,omitempty"` - // NodePoolSoakDuration: Time needed after draining entire blue pool. After - // this period, blue pool will be cleaned up. - NodePoolSoakDuration string `json:"nodePoolSoakDuration,omitempty"` - // StandardRolloutPolicy: Standard policy for the blue-green upgrade. - StandardRolloutPolicy *StandardRolloutPolicy `json:"standardRolloutPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoscaledRolloutPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoscaledRolloutPolicy") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BlueGreenSettings) MarshalJSON() ([]byte, error) { - type NoMethod BlueGreenSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// BootDisk: BootDisk specifies the boot disk configuration for nodepools. -type BootDisk struct { - // DiskType: Disk type of the boot disk. (i.e. Hyperdisk-Balanced, PD-Balanced, - // etc.) - DiskType string `json:"diskType,omitempty"` - // ProvisionedIops: For Hyperdisk-Balanced only, the provisioned IOPS config - // value. - ProvisionedIops int64 `json:"provisionedIops,omitempty,string"` - // ProvisionedThroughput: For Hyperdisk-Balanced only, the provisioned - // throughput config value. - ProvisionedThroughput int64 `json:"provisionedThroughput,omitempty,string"` - // SizeGb: Disk size in GB. Replaces NodeConfig.disk_size_gb - SizeGb int64 `json:"sizeGb,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DiskType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BootDisk) MarshalJSON() ([]byte, error) { - type NoMethod BootDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CancelOperationRequest: CancelOperationRequest cancels a single operation. -type CancelOperationRequest struct { - // Name: The name (project, location, operation id) of the operation to cancel. - // Specified in the format `projects/*/locations/*/operations/*`. - Name string `json:"name,omitempty"` - // OperationId: Deprecated. The server-assigned `name` of the operation. This - // field has been deprecated and replaced by the name field. - OperationId string `json:"operationId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the - // operation resides. This field has been deprecated and replaced by the name - // field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CancelOperationRequest) MarshalJSON() ([]byte, error) { - type NoMethod CancelOperationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CertificateAuthorityDomainConfig: CertificateAuthorityDomainConfig -// configures one or more fully qualified domain names (FQDN) to a specific -// certificate. -type CertificateAuthorityDomainConfig struct { - // Fqdns: List of fully qualified domain names (FQDN). Specifying port is - // supported. Wildcards are NOT supported. Examples: - my.customdomain.com - - // 10.0.1.2:5000 - Fqdns []string `json:"fqdns,omitempty"` - // GcpSecretManagerCertificateConfig: Google Secret Manager (GCP) certificate - // configuration. - GcpSecretManagerCertificateConfig *GCPSecretManagerCertificateConfig `json:"gcpSecretManagerCertificateConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fqdns") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fqdns") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CertificateAuthorityDomainConfig) MarshalJSON() ([]byte, error) { - type NoMethod CertificateAuthorityDomainConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CertificateConfig: CertificateConfig configures certificate for the -// registry. -type CertificateConfig struct { - // GcpSecretManagerSecretUri: The URI configures a secret from Secret Manager - // (https://cloud.google.com/secret-manager) in the format - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION" for global - // secret or - // "projects/$PROJECT_ID/locations/$REGION/secrets/$SECRET_NAME/versions/$VERSIO - // N" for regional secret. Version can be fixed (e.g. "2") or "latest" - GcpSecretManagerSecretUri string `json:"gcpSecretManagerSecretUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcpSecretManagerSecretUri") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcpSecretManagerSecretUri") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CertificateConfig) MarshalJSON() ([]byte, error) { - type NoMethod CertificateConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CertificateConfigPair: CertificateConfigPair configures pairs of -// certificates, which is used for client certificate and key pairs under a -// registry. -type CertificateConfigPair struct { - // Cert: Cert configures the client certificate. - Cert *CertificateConfig `json:"cert,omitempty"` - // Key: Key configures the client private key. Optional. - Key *CertificateConfig `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cert") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cert") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CertificateConfigPair) MarshalJSON() ([]byte, error) { - type NoMethod CertificateConfigPair - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CheckAutopilotCompatibilityResponse: CheckAutopilotCompatibilityResponse has -// a list of compatibility issues. -type CheckAutopilotCompatibilityResponse struct { - // Issues: The list of issues for the given operation. - Issues []*AutopilotCompatibilityIssue `json:"issues,omitempty"` - // Summary: The summary of the autopilot compatibility response. - Summary string `json:"summary,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Issues") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Issues") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CheckAutopilotCompatibilityResponse) MarshalJSON() ([]byte, error) { - type NoMethod CheckAutopilotCompatibilityResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CidrBlock: CidrBlock contains an optional name and one CIDR block. -type CidrBlock struct { - // CidrBlock: cidr_block must be specified in CIDR notation. - CidrBlock string `json:"cidrBlock,omitempty"` - // DisplayName: display_name is an optional field for users to identify CIDR - // blocks. - DisplayName string `json:"displayName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CidrBlock") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CidrBlock") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CidrBlock) MarshalJSON() ([]byte, error) { - type NoMethod CidrBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClientCertificateConfig: Configuration for client certificates on the -// cluster. -type ClientCertificateConfig struct { - // IssueClientCertificate: Issue a client certificate. - IssueClientCertificate bool `json:"issueClientCertificate,omitempty"` - // ForceSendFields is a list of field names (e.g. "IssueClientCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IssueClientCertificate") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClientCertificateConfig) MarshalJSON() ([]byte, error) { - type NoMethod ClientCertificateConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CloudRunConfig: Configuration options for the Cloud Run feature. -type CloudRunConfig struct { - // Disabled: Whether Cloud Run addon is enabled for this cluster. - Disabled bool `json:"disabled,omitempty"` - // LoadBalancerType: Which load balancer type is installed for Cloud Run. - // - // Possible values: - // "LOAD_BALANCER_TYPE_UNSPECIFIED" - Load balancer type for Cloud Run is - // unspecified. - // "LOAD_BALANCER_TYPE_EXTERNAL" - Install external load balancer for Cloud - // Run. - // "LOAD_BALANCER_TYPE_INTERNAL" - Install internal load balancer for Cloud - // Run. - LoadBalancerType string `json:"loadBalancerType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudRunConfig) MarshalJSON() ([]byte, error) { - type NoMethod CloudRunConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Cluster: A Google Kubernetes Engine cluster. -type Cluster struct { - // AddonsConfig: Configurations for the various addons available to run in the - // cluster. - AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` - // AlphaClusterFeatureGates: The list of user specified Kubernetes feature - // gates. Each string represents the activation status of a feature gate (e.g. - // "featureX=true" or "featureX=false") - AlphaClusterFeatureGates []string `json:"alphaClusterFeatureGates,omitempty"` - // AnonymousAuthenticationConfig: Configuration for limiting anonymous access - // to all endpoints except the health checks. - AnonymousAuthenticationConfig *AnonymousAuthenticationConfig `json:"anonymousAuthenticationConfig,omitempty"` - // AuthenticatorGroupsConfig: Configuration controlling RBAC group membership - // information. - AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` - // Autopilot: Autopilot configuration for the cluster. - Autopilot *Autopilot `json:"autopilot,omitempty"` - // Autoscaling: Cluster-level autoscaling configuration. - Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` - // BinaryAuthorization: Configuration for Binary Authorization. - BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` - // ClusterIpv4Cidr: The IP address range of the container pods in this cluster, - // in CIDR (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen - // or specify a `/14` block in `10.0.0.0/8`. - ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` - // CompliancePostureConfig: Enable/Disable Compliance Posture features for the - // cluster. - CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` - // Conditions: Which conditions caused the current cluster state. - Conditions []*StatusCondition `json:"conditions,omitempty"` - // ConfidentialNodes: Configuration of Confidential Nodes. All the nodes in the - // cluster will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` - // ControlPlaneEndpointsConfig: Configuration for all cluster's control plane - // endpoints. - ControlPlaneEndpointsConfig *ControlPlaneEndpointsConfig `json:"controlPlaneEndpointsConfig,omitempty"` - // CostManagementConfig: Configuration for the fine-grained cost management - // feature. - CostManagementConfig *CostManagementConfig `json:"costManagementConfig,omitempty"` - // CreateTime: Output only. The time the cluster was created, in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) text format. - CreateTime string `json:"createTime,omitempty"` - // CurrentMasterVersion: Output only. The current software version of the - // master endpoint. - CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` - // CurrentNodeCount: Output only. The number of nodes currently in the cluster. - // Deprecated. Call Kubernetes API directly to retrieve node information. - CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` - // CurrentNodeVersion: Output only. Deprecated, use NodePools.version - // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) - // instead. The current version of the node software components. If they are - // currently at multiple versions because they're in the process of being - // upgraded, this reflects the minimum version of all nodes. - CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` - // DatabaseEncryption: Configuration of etcd encryption. - DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` - // DefaultMaxPodsConstraint: The default constraint on the maximum number of - // pods that can be run simultaneously on a node in the node pool of this - // cluster. Only honored if cluster created with IP Alias support. - DefaultMaxPodsConstraint *MaxPodsConstraint `json:"defaultMaxPodsConstraint,omitempty"` - // Description: An optional description of this cluster. - Description string `json:"description,omitempty"` - // EnableK8sBetaApis: Beta APIs Config - EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"` - // EnableKubernetesAlpha: Kubernetes alpha features are enabled on this - // cluster. This includes alpha API groups (e.g. v1alpha1) and features that - // may not be production ready in the kubernetes version of the master and - // nodes. The cluster has no SLA for uptime and master/node upgrades are - // disabled. Alpha enabled clusters are automatically deleted thirty days after - // creation. - EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` - // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. This field - // is deprecated due to the deprecation of 2VM TPU. The end of life date for - // 2VM TPU is 2025-04-25. - EnableTpu bool `json:"enableTpu,omitempty"` - // Endpoint: Output only. The IP address of this cluster's master endpoint. The - // endpoint can be accessed from the internet at - // `https://username:password@endpoint/`. See the `masterAuth` property of this - // resource for username and password information. - Endpoint string `json:"endpoint,omitempty"` - // EnterpriseConfig: GKE Enterprise Configuration. Deprecated: GKE Enterprise - // features are now available without an Enterprise tier. - EnterpriseConfig *EnterpriseConfig `json:"enterpriseConfig,omitempty"` - // Etag: This checksum is computed by the server based on the value of cluster - // fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - // ExpireTime: Output only. The time the cluster will be automatically deleted - // in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. - ExpireTime string `json:"expireTime,omitempty"` - // Fleet: Fleet information for the cluster. - Fleet *Fleet `json:"fleet,omitempty"` - // GkeAutoUpgradeConfig: Configuration for GKE auto upgrades. - GkeAutoUpgradeConfig *GkeAutoUpgradeConfig `json:"gkeAutoUpgradeConfig,omitempty"` - // Id: Output only. Unique id for the cluster. - Id string `json:"id,omitempty"` - // IdentityServiceConfig: Configuration for Identity Service component. - IdentityServiceConfig *IdentityServiceConfig `json:"identityServiceConfig,omitempty"` - // InitialClusterVersion: The initial Kubernetes version for this cluster. - // Valid versions are those found in validMasterVersions returned by - // getServerConfig. The version can be upgraded over time; such upgrades are - // reflected in currentMasterVersion and currentNodeVersion. Users may specify - // either explicit versions offered by Kubernetes Engine or version aliases, - // which have the following behavior: - "latest": picks the highest valid - // Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the - // 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y - // version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": - // picks the default Kubernetes version - InitialClusterVersion string `json:"initialClusterVersion,omitempty"` - // InitialNodeCount: The number of nodes to create in this cluster. You must - // ensure that your Compute Engine resource quota - // (https://cloud.google.com/compute/quotas) is sufficient for this number of - // instances. You must also have available firewall and routes quota. For - // requests, this field should only be used in lieu of a "node_pool" object, - // since this configuration (along with the "node_config") will be used to - // create a "NodePool" object with an auto-generated name. Do not use this and - // a node_pool at the same time. This field is deprecated, use - // node_pool.initial_node_count instead. - InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: Output only. Deprecated. Use - // node_pools.instance_group_urls. - InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` - // IpAllocationPolicy: Configuration for cluster IP allocation. - IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` - // LabelFingerprint: The fingerprint of the set of labels for this cluster. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // LegacyAbac: Configuration for the legacy ABAC authorization mode. - LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` - // Location: Output only. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or region - // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - Location string `json:"location,omitempty"` - // Locations: The list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. This field provides a default value if - // NodePool.Locations - // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // are not specified during node pool creation. Warning: changing cluster - // locations will update the NodePool.Locations - // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) - // of all node pools and will result in nodes being added and/or removed. - Locations []string `json:"locations,omitempty"` - // LoggingConfig: Logging configuration for the cluster. - LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"` - // LoggingService: The logging service the cluster should use to write logs. - // Currently available options: * `logging.googleapis.com/kubernetes` - The - // Cloud Logging service with a Kubernetes-native resource model * - // `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). * `none` - no logs will be exported from the - // cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will - // be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - LoggingService string `json:"loggingService,omitempty"` - // MaintenancePolicy: Configure the maintenance policy for this cluster. - MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` - // MasterAuth: The authentication information for accessing the master - // endpoint. If unspecified, the defaults are used: For clusters before v1.12, - // if master_auth is unspecified, `username` will be set to "admin", a random - // password will be generated, and a client certificate will be issued. - MasterAuth *MasterAuth `json:"masterAuth,omitempty"` - // MasterAuthorizedNetworksConfig: The configuration options for master - // authorized networks feature. Deprecated: Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config - // instead. - MasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworksConfig,omitempty"` - // MeshCertificates: Configuration for issuance of mTLS keys and certificates - // to Kubernetes pods. - MeshCertificates *MeshCertificates `json:"meshCertificates,omitempty"` - // MonitoringConfig: Monitoring configuration for the cluster. - MonitoringConfig *MonitoringConfig `json:"monitoringConfig,omitempty"` - // MonitoringService: The monitoring service the cluster should use to write - // metrics. Currently available options: * - // `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a - // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy - // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No - // metrics will be exported from the cluster. If left as an empty - // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or - // `monitoring.googleapis.com` for earlier versions. - MonitoringService string `json:"monitoringService,omitempty"` - // Name: The name of this cluster. The name must be unique within this project - // and location (e.g. zone or region), and can be up to 40 characters with the - // following restrictions: * Lowercase letters, numbers, and hyphens only. * - // Must start with a letter. * Must end with a number or a letter. - Name string `json:"name,omitempty"` - // Network: The name of the Google Compute Engine network - // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to - // which the cluster is connected. If left unspecified, the `default` network - // will be used. - Network string `json:"network,omitempty"` - // NetworkConfig: Configuration for cluster networking. - NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` - // NetworkPolicy: Configuration options for the NetworkPolicy feature. - NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - // NodeConfig: Parameters used in creating the cluster's nodes. For requests, - // this field should only be used in lieu of a "node_pool" object, since this - // configuration (along with the "initial_node_count") will be used to create a - // "NodePool" object with an auto-generated name. Do not use this and a - // node_pool at the same time. For responses, this field will be populated with - // the node configuration of the first node pool. (For configuration of each - // node pool, see `node_pool.config`) If unspecified, the defaults are used. - // This field is deprecated, use node_pool.config instead. - NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` - // NodeIpv4CidrSize: Output only. The size of the address space on each node - // for hosting containers. This is provisioned from within the - // `container_ipv4_cidr` range. This field will only be set when cluster is in - // route-based network mode. - NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` - // NodePoolAutoConfig: Node pool configs that apply to all auto-provisioned - // node pools in autopilot clusters and node auto-provisioning enabled - // clusters. - NodePoolAutoConfig *NodePoolAutoConfig `json:"nodePoolAutoConfig,omitempty"` - // NodePoolDefaults: Default NodePool settings for the entire cluster. These - // settings are overridden if specified on the specific NodePool object. - NodePoolDefaults *NodePoolDefaults `json:"nodePoolDefaults,omitempty"` - // NodePools: The node pools associated with this cluster. This field should - // not be set if "node_config" or "initial_node_count" are specified. - NodePools []*NodePool `json:"nodePools,omitempty"` - // 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"` - // PodAutoscaling: The config for pod autoscaling. - PodAutoscaling *PodAutoscaling `json:"podAutoscaling,omitempty"` - // PrivateClusterConfig: Configuration for private cluster. - PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` - // RbacBindingConfig: RBACBindingConfig allows user to restrict - // ClusterRoleBindings an RoleBindings that can be created. - RbacBindingConfig *RBACBindingConfig `json:"rbacBindingConfig,omitempty"` - // ReleaseChannel: Release channel configuration. If left unspecified on - // cluster creation and a version is specified, the cluster is enrolled in the - // most mature release channel where the version is available (first checking - // STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel - // configuration and no version is specified, the cluster is enrolled in the - // REGULAR channel with its default version. - ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` - // ResourceLabels: The resource labels for the cluster to use to annotate any - // related Google Compute Engine resources. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - // ResourceUsageExportConfig: Configuration for exporting resource usages. - // Resource usage export is disabled when this config is unspecified. - ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"` - // SatisfiesPzi: Output only. Reserved for future use. - SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` - // SatisfiesPzs: Output only. Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // SecretManagerConfig: Secret CSI driver configuration. - SecretManagerConfig *SecretManagerConfig `json:"secretManagerConfig,omitempty"` - // SecurityPostureConfig: Enable/Disable Security Posture API features for the - // cluster. - SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` - // SelfLink: Output only. Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // ServicesIpv4Cidr: Output only. The IP address range of the Kubernetes - // services in this cluster, in CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `1.2.3.4/29`). Service addresses are typically put in the last `/16` from - // the container CIDR. - ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` - // ShieldedNodes: Shielded Nodes configuration. - ShieldedNodes *ShieldedNodes `json:"shieldedNodes,omitempty"` - // Status: Output only. The current status of this cluster. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PROVISIONING" - The PROVISIONING state indicates the cluster is being - // created. - // "RUNNING" - The RUNNING state indicates the cluster has been created and - // is fully usable. - // "RECONCILING" - The RECONCILING state indicates that some work is actively - // being done on the cluster, such as upgrading the master or node software. - // Details can be found in the `statusMessage` field. - // "STOPPING" - The STOPPING state indicates the cluster is being deleted. - // "ERROR" - The ERROR state indicates the cluster is unusable. It will be - // automatically deleted. Details can be found in the `statusMessage` field. - // "DEGRADED" - The DEGRADED state indicates the cluster requires user action - // to restore full functionality. Details can be found in the `statusMessage` - // field. - Status string `json:"status,omitempty"` - // StatusMessage: Output only. Deprecated. Use conditions instead. Additional - // information about the current status of this cluster, if available. - StatusMessage string `json:"statusMessage,omitempty"` - // Subnetwork: The name of the Google Compute Engine subnetwork - // (https://cloud.google.com/compute/docs/subnetworks) to which the cluster is - // connected. - Subnetwork string `json:"subnetwork,omitempty"` - // TpuIpv4CidrBlock: Output only. The IP address range of the Cloud TPUs in - // this cluster, in CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `1.2.3.4/29`). This field is deprecated due to the deprecation of 2VM TPU. - // The end of life date for 2VM TPU is 2025-04-25. - TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` - // UserManagedKeysConfig: The Custom keys configuration for the cluster. - UserManagedKeysConfig *UserManagedKeysConfig `json:"userManagedKeysConfig,omitempty"` - // VerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling - // configuration. - VerticalPodAutoscaling *VerticalPodAutoscaling `json:"verticalPodAutoscaling,omitempty"` - // WorkloadIdentityConfig: Configuration for the use of Kubernetes Service - // Accounts in IAM policies. - WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` - // Zone: Output only. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field is deprecated, use location instead. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AddonsConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddonsConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Cluster) MarshalJSON() ([]byte, error) { - type NoMethod Cluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster -// information required by Cluster Autoscaler to automatically adjust the size -// of the cluster and create/delete node pools based on the current needs. -type ClusterAutoscaling struct { - // AutoprovisioningLocations: The list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes can be created by NAP. - AutoprovisioningLocations []string `json:"autoprovisioningLocations,omitempty"` - // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults contains - // defaults for a node pool created by NAP. - AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `json:"autoprovisioningNodePoolDefaults,omitempty"` - // AutoscalingProfile: Defines autoscaling behaviour. - // - // Possible values: - // "PROFILE_UNSPECIFIED" - No change to autoscaling configuration. - // "OPTIMIZE_UTILIZATION" - Prioritize optimizing utilization of resources. - // "BALANCED" - Use default (balanced) autoscaling configuration. - AutoscalingProfile string `json:"autoscalingProfile,omitempty"` - // DefaultComputeClassConfig: Default compute class is a configuration for - // default compute class. - DefaultComputeClassConfig *DefaultComputeClassConfig `json:"defaultComputeClassConfig,omitempty"` - // EnableNodeAutoprovisioning: Enables automatic node pool creation and - // deletion. - EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` - // ResourceLimits: Contains global constraints regarding minimum and maximum - // amount of resources in the cluster. - ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoprovisioningLocations") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoprovisioningLocations") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClusterAutoscaling) MarshalJSON() ([]byte, error) { - type NoMethod ClusterAutoscaling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClusterNetworkPerformanceConfig: Configuration of network bandwidth tiers -type ClusterNetworkPerformanceConfig struct { - // TotalEgressBandwidthTier: Specifies the total network bandwidth tier for - // NodePools in the cluster. - // - // Possible values: - // "TIER_UNSPECIFIED" - Default value - // "TIER_1" - Higher bandwidth, actual values based on VM size. - TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalEgressBandwidthTier") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalEgressBandwidthTier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClusterNetworkPerformanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ClusterNetworkPerformanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClusterUpdate: ClusterUpdate describes an update to the cluster. Exactly one -// update can be applied to a cluster with each request, so at most one field -// can be provided. -type ClusterUpdate struct { - // AdditionalPodRangesConfig: The additional pod ranges to be added to the - // cluster. These pod ranges can be used by node pools to allocate pod IPs. - AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` - // DesiredAdditionalIpRangesConfig: The desired config for additional - // subnetworks attached to the cluster. - DesiredAdditionalIpRangesConfig *DesiredAdditionalIPRangesConfig `json:"desiredAdditionalIpRangesConfig,omitempty"` - // DesiredAddonsConfig: Configurations for the various addons available to run - // in the cluster. - DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` - // DesiredAnonymousAuthenticationConfig: Configuration for limiting anonymous - // access to all endpoints except the health checks. - DesiredAnonymousAuthenticationConfig *AnonymousAuthenticationConfig `json:"desiredAnonymousAuthenticationConfig,omitempty"` - // DesiredAuthenticatorGroupsConfig: The desired authenticator groups config - // for the cluster. - DesiredAuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"desiredAuthenticatorGroupsConfig,omitempty"` - // DesiredAutoIpamConfig: AutoIpamConfig contains all information related to - // Auto IPAM - DesiredAutoIpamConfig *AutoIpamConfig `json:"desiredAutoIpamConfig,omitempty"` - // DesiredAutopilotWorkloadPolicyConfig: WorkloadPolicyConfig is the - // configuration related to GCW workload policy - DesiredAutopilotWorkloadPolicyConfig *WorkloadPolicyConfig `json:"desiredAutopilotWorkloadPolicyConfig,omitempty"` - // DesiredBinaryAuthorization: The desired configuration options for the Binary - // Authorization feature. - DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` - // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. - DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` - // DesiredCompliancePostureConfig: Enable/Disable Compliance Posture features - // for the cluster. - DesiredCompliancePostureConfig *CompliancePostureConfig `json:"desiredCompliancePostureConfig,omitempty"` - // DesiredContainerdConfig: The desired containerd config for the cluster. - DesiredContainerdConfig *ContainerdConfig `json:"desiredContainerdConfig,omitempty"` - // DesiredControlPlaneEndpointsConfig: Control plane endpoints configuration. - DesiredControlPlaneEndpointsConfig *ControlPlaneEndpointsConfig `json:"desiredControlPlaneEndpointsConfig,omitempty"` - // DesiredCostManagementConfig: The desired configuration for the fine-grained - // cost management feature. - DesiredCostManagementConfig *CostManagementConfig `json:"desiredCostManagementConfig,omitempty"` - // DesiredDatabaseEncryption: Configuration of etcd encryption. - DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` - // DesiredDatapathProvider: The desired datapath provider for the cluster. - // - // Possible values: - // "DATAPATH_PROVIDER_UNSPECIFIED" - Default value. - // "LEGACY_DATAPATH" - Use the IPTables implementation based on kube-proxy. - // "ADVANCED_DATAPATH" - Use the eBPF based GKE Dataplane V2 with additional - // features. See the [GKE Dataplane V2 - // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/datapla - // ne-v2) for more. - DesiredDatapathProvider string `json:"desiredDatapathProvider,omitempty"` - // DesiredDefaultEnablePrivateNodes: Override the default setting of whether - // future created nodes have private IP addresses only, namely - // NetworkConfig.default_enable_private_nodes - DesiredDefaultEnablePrivateNodes bool `json:"desiredDefaultEnablePrivateNodes,omitempty"` - // DesiredDefaultSnatStatus: The desired status of whether to disable default - // sNAT for this cluster. - DesiredDefaultSnatStatus *DefaultSnatStatus `json:"desiredDefaultSnatStatus,omitempty"` - // DesiredDisableL4LbFirewallReconciliation: Enable/Disable L4 LB VPC firewall - // reconciliation for the cluster. - DesiredDisableL4LbFirewallReconciliation bool `json:"desiredDisableL4LbFirewallReconciliation,omitempty"` - // DesiredDnsConfig: DNSConfig contains clusterDNS config for this cluster. - DesiredDnsConfig *DNSConfig `json:"desiredDnsConfig,omitempty"` - // DesiredEnableCiliumClusterwideNetworkPolicy: Enable/Disable Cilium - // Clusterwide Network Policy for the cluster. - DesiredEnableCiliumClusterwideNetworkPolicy bool `json:"desiredEnableCiliumClusterwideNetworkPolicy,omitempty"` - // DesiredEnableFqdnNetworkPolicy: Enable/Disable FQDN Network Policy for the - // cluster. - DesiredEnableFqdnNetworkPolicy bool `json:"desiredEnableFqdnNetworkPolicy,omitempty"` - // DesiredEnableMultiNetworking: Enable/Disable Multi-Networking for the - // cluster - DesiredEnableMultiNetworking bool `json:"desiredEnableMultiNetworking,omitempty"` - // DesiredEnablePrivateEndpoint: Enable/Disable private endpoint for the - // cluster's master. Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endp - // oint instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - DesiredEnablePrivateEndpoint bool `json:"desiredEnablePrivateEndpoint,omitempty"` - // DesiredEnterpriseConfig: The desired enterprise configuration for the - // cluster. Deprecated: GKE Enterprise features are now available without an - // Enterprise tier. - DesiredEnterpriseConfig *DesiredEnterpriseConfig `json:"desiredEnterpriseConfig,omitempty"` - // DesiredFleet: The desired fleet configuration for the cluster. - DesiredFleet *Fleet `json:"desiredFleet,omitempty"` - // DesiredGatewayApiConfig: The desired config of Gateway API on this cluster. - DesiredGatewayApiConfig *GatewayAPIConfig `json:"desiredGatewayApiConfig,omitempty"` - // DesiredGcfsConfig: The desired GCFS config for the cluster - DesiredGcfsConfig *GcfsConfig `json:"desiredGcfsConfig,omitempty"` - // DesiredIdentityServiceConfig: The desired Identity Service component - // configuration. - DesiredIdentityServiceConfig *IdentityServiceConfig `json:"desiredIdentityServiceConfig,omitempty"` - // DesiredImageType: The desired image type for the node pool. NOTE: Set 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"` - // DesiredK8sBetaApis: Desired Beta APIs to be enabled for cluster. - DesiredK8sBetaApis *K8sBetaAPIConfig `json:"desiredK8sBetaApis,omitempty"` - // DesiredL4ilbSubsettingConfig: The desired L4 Internal Load Balancer - // Subsetting configuration. - DesiredL4ilbSubsettingConfig *ILBSubsettingConfig `json:"desiredL4ilbSubsettingConfig,omitempty"` - // DesiredLocations: The desired list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. This list must always include the - // cluster's primary zone. Warning: changing cluster locations will update the - // locations of all node pools and will result in nodes being added and/or - // removed. - DesiredLocations []string `json:"desiredLocations,omitempty"` - // DesiredLoggingConfig: The desired logging configuration. - DesiredLoggingConfig *LoggingConfig `json:"desiredLoggingConfig,omitempty"` - // DesiredLoggingService: The logging service the cluster should use to write - // logs. Currently available options: * `logging.googleapis.com/kubernetes` - - // The Cloud Logging service with a Kubernetes-native resource model * - // `logging.googleapis.com` - The legacy Cloud Logging service (no longer - // available as of GKE 1.15). * `none` - no logs will be exported from the - // cluster. If left as an empty string,`logging.googleapis.com/kubernetes` will - // be used for GKE 1.14+ or `logging.googleapis.com` for earlier versions. - DesiredLoggingService string `json:"desiredLoggingService,omitempty"` - // DesiredMasterAuthorizedNetworksConfig: The desired configuration options for - // master authorized networks feature. Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.authorized_network - // s_config instead. - DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` - // DesiredMasterVersion: The Kubernetes version to change the master to. Users - // may specify either explicit versions offered by Kubernetes Engine or version - // aliases, which have the following behavior: - "latest": picks the highest - // valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch - // in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the - // 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "-": - // picks the default Kubernetes version - DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` - // DesiredMeshCertificates: Configuration for issuance of mTLS keys and - // certificates to Kubernetes pods. - DesiredMeshCertificates *MeshCertificates `json:"desiredMeshCertificates,omitempty"` - // DesiredMonitoringConfig: The desired monitoring configuration. - DesiredMonitoringConfig *MonitoringConfig `json:"desiredMonitoringConfig,omitempty"` - // DesiredMonitoringService: The monitoring service the cluster should use to - // write metrics. Currently available options: * - // `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a - // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy - // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No - // metrics will be exported from the cluster. If left as an empty - // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or - // `monitoring.googleapis.com` for earlier versions. - DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` - // DesiredNetworkPerformanceConfig: The desired network performance config. - DesiredNetworkPerformanceConfig *ClusterNetworkPerformanceConfig `json:"desiredNetworkPerformanceConfig,omitempty"` - // DesiredNetworkTierConfig: The desired network tier configuration for the - // cluster. - DesiredNetworkTierConfig *NetworkTierConfig `json:"desiredNetworkTierConfig,omitempty"` - // DesiredNodeKubeletConfig: The desired node kubelet config for the cluster. - DesiredNodeKubeletConfig *NodeKubeletConfig `json:"desiredNodeKubeletConfig,omitempty"` - // DesiredNodePoolAutoConfigKubeletConfig: The desired node kubelet config for - // all auto-provisioned node pools in autopilot clusters and node - // auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigKubeletConfig *NodeKubeletConfig `json:"desiredNodePoolAutoConfigKubeletConfig,omitempty"` - // DesiredNodePoolAutoConfigLinuxNodeConfig: The desired Linux node config for - // all auto-provisioned node pools in autopilot clusters and node - // auto-provisioning enabled clusters. Currently only `cgroup_mode` can be set - // here. - DesiredNodePoolAutoConfigLinuxNodeConfig *LinuxNodeConfig `json:"desiredNodePoolAutoConfigLinuxNodeConfig,omitempty"` - // DesiredNodePoolAutoConfigNetworkTags: The desired network tags that apply to - // all auto-provisioned node pools in autopilot clusters and node - // auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigNetworkTags *NetworkTags `json:"desiredNodePoolAutoConfigNetworkTags,omitempty"` - // DesiredNodePoolAutoConfigResourceManagerTags: The desired resource manager - // tags that apply to all auto-provisioned node pools in autopilot clusters and - // node auto-provisioning enabled clusters. - DesiredNodePoolAutoConfigResourceManagerTags *ResourceManagerTags `json:"desiredNodePoolAutoConfigResourceManagerTags,omitempty"` - // DesiredNodePoolAutoscaling: Autoscaler configuration for the node pool - // specified in desired_node_pool_id. If there is only one pool in the cluster - // and desired_node_pool_id is not provided then the change applies to that - // single node pool. - DesiredNodePoolAutoscaling *NodePoolAutoscaling `json:"desiredNodePoolAutoscaling,omitempty"` - // DesiredNodePoolId: The node pool to be upgraded. This field is mandatory if - // "desired_node_version", "desired_image_family" or - // "desired_node_pool_autoscaling" is specified and there is more than one node - // pool on the cluster. - DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` - // DesiredNodePoolLoggingConfig: The desired node pool logging configuration - // defaults for the cluster. - DesiredNodePoolLoggingConfig *NodePoolLoggingConfig `json:"desiredNodePoolLoggingConfig,omitempty"` - // DesiredNodeVersion: The Kubernetes version to change the nodes to (typically - // an upgrade). Users may specify either explicit versions offered by - // Kubernetes Engine or version aliases, which have the following behavior: - - // "latest": picks the highest valid Kubernetes version - "1.X": picks the - // highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the - // highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an - // explicit Kubernetes version - "-": picks the Kubernetes master version - DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` - // DesiredNotificationConfig: The desired notification configuration. - DesiredNotificationConfig *NotificationConfig `json:"desiredNotificationConfig,omitempty"` - // DesiredParentProductConfig: The desired parent product config for the - // cluster. - DesiredParentProductConfig *ParentProductConfig `json:"desiredParentProductConfig,omitempty"` - // DesiredPodAutoscaling: The desired config for pod autoscaling. - DesiredPodAutoscaling *PodAutoscaling `json:"desiredPodAutoscaling,omitempty"` - // DesiredPrivateClusterConfig: The desired private cluster configuration. - // master_global_access_config is the only field that can be changed via this - // field. See also ClusterUpdate.desired_enable_private_endpoint for modifying - // other fields within PrivateClusterConfig. Deprecated: Use - // desired_control_plane_endpoints_config.ip_endpoints_config.global_access - // instead. - DesiredPrivateClusterConfig *PrivateClusterConfig `json:"desiredPrivateClusterConfig,omitempty"` - // DesiredPrivateIpv6GoogleAccess: The desired state of IPv6 connectivity to - // Google Services. - // - // Possible values: - // "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - Default value. Same as DISABLED - // "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" - No private access to or from - // Google Services - // "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" - Enables private IPv6 access to - // Google Services from GKE - // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access - // to and from Google Services - DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` - // DesiredPrivilegedAdmissionConfig: The desired privileged admission config - // for the cluster. - DesiredPrivilegedAdmissionConfig *PrivilegedAdmissionConfig `json:"desiredPrivilegedAdmissionConfig,omitempty"` - // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict - // ClusterRoleBindings an RoleBindings that can be created. - DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` - // DesiredReleaseChannel: The desired release channel configuration. - DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` - // DesiredResourceUsageExportConfig: The desired configuration for exporting - // resource usage. - DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` - // DesiredSecretManagerConfig: Enable/Disable Secret Manager Config. - DesiredSecretManagerConfig *SecretManagerConfig `json:"desiredSecretManagerConfig,omitempty"` - // DesiredSecurityPostureConfig: Enable/Disable Security Posture API features - // for the cluster. - DesiredSecurityPostureConfig *SecurityPostureConfig `json:"desiredSecurityPostureConfig,omitempty"` - // DesiredServiceExternalIpsConfig: ServiceExternalIPsConfig specifies the - // config for the use of Services with ExternalIPs field. - DesiredServiceExternalIpsConfig *ServiceExternalIPsConfig `json:"desiredServiceExternalIpsConfig,omitempty"` - // DesiredShieldedNodes: Configuration for Shielded Nodes. - DesiredShieldedNodes *ShieldedNodes `json:"desiredShieldedNodes,omitempty"` - // DesiredStackType: The desired stack type of the cluster. If a stack type is - // provided and does not match the current stack type of the cluster, update - // will attempt to change the stack type to the new type. - // - // Possible values: - // "STACK_TYPE_UNSPECIFIED" - Default value, will be defaulted as IPV4 only - // "IPV4" - Cluster is IPV4 only - // "IPV4_IPV6" - Cluster can use both IPv4 and IPv6 - DesiredStackType string `json:"desiredStackType,omitempty"` - // DesiredUserManagedKeysConfig: The desired user managed keys config for the - // cluster. - DesiredUserManagedKeysConfig *UserManagedKeysConfig `json:"desiredUserManagedKeysConfig,omitempty"` - // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling - // configuration. - DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` - // DesiredWorkloadIdentityConfig: Configuration for Workload Identity. - DesiredWorkloadIdentityConfig *WorkloadIdentityConfig `json:"desiredWorkloadIdentityConfig,omitempty"` - // EnableK8sBetaApis: Kubernetes open source beta apis enabled on the cluster. - // Only beta apis - EnableK8sBetaApis *K8sBetaAPIConfig `json:"enableK8sBetaApis,omitempty"` - // Etag: The current etag of the cluster. If an etag is provided and does not - // match the current etag of the cluster, update will be blocked and an ABORTED - // error will be returned. - Etag string `json:"etag,omitempty"` - // GkeAutoUpgradeConfig: Configuration for GKE auto upgrade. - GkeAutoUpgradeConfig *GkeAutoUpgradeConfig `json:"gkeAutoUpgradeConfig,omitempty"` - // RemovedAdditionalPodRangesConfig: The additional pod ranges that are to be - // removed from the cluster. The pod ranges specified here must have been - // specified earlier in the 'additional_pod_ranges_config' argument. - RemovedAdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"removedAdditionalPodRangesConfig,omitempty"` - // UserManagedKeysConfig: The Custom keys configuration for the cluster. This - // field is deprecated. Use ClusterUpdate.desired_user_managed_keys_config - // instead. - UserManagedKeysConfig *UserManagedKeysConfig `json:"userManagedKeysConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalPodRangesConfig") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalPodRangesConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClusterUpdate) MarshalJSON() ([]byte, error) { - type NoMethod ClusterUpdate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ClusterUpgradeInfo: ClusterUpgradeInfo contains the upgrade information of a -// cluster. -type ClusterUpgradeInfo struct { - // AutoUpgradeStatus: The auto upgrade status. - // - // Possible values: - // "UNKNOWN" - UNKNOWN indicates an unknown status. - // "ACTIVE" - ACTIVE indicates an active status. - // "MINOR_UPGRADE_PAUSED" - MINOR_UPGRADE_PAUSED indicates the minor version - // upgrade is paused. - // "UPGRADE_PAUSED" - UPGRADE_PAUSED indicates the upgrade is paused. - AutoUpgradeStatus []string `json:"autoUpgradeStatus,omitempty"` - // EndOfExtendedSupportTimestamp: The cluster's current minor version's end of - // extended support timestamp. - EndOfExtendedSupportTimestamp string `json:"endOfExtendedSupportTimestamp,omitempty"` - // EndOfStandardSupportTimestamp: The cluster's current minor version's end of - // standard support timestamp. - EndOfStandardSupportTimestamp string `json:"endOfStandardSupportTimestamp,omitempty"` - // MinorTargetVersion: minor_target_version indicates the target version for - // minor upgrade. - MinorTargetVersion string `json:"minorTargetVersion,omitempty"` - // PatchTargetVersion: patch_target_version indicates the target version for - // patch upgrade. - PatchTargetVersion string `json:"patchTargetVersion,omitempty"` - // PausedReason: The auto upgrade paused reason. - // - // Possible values: - // "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" - - // AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. - // "MAINTENANCE_WINDOW" - MAINTENANCE_WINDOW indicates the cluster is outside - // customer maintenance window. - // "MAINTENANCE_EXCLUSION_NO_UPGRADES" - MAINTENANCE_EXCLUSION_NO_UPGRADES - // indicates the cluster is in a maintenance exclusion with scope NO_UPGRADES. - // "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" - - // MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_MINOR_UPGRADES. - // "CLUSTER_DISRUPTION_BUDGET" - CLUSTER_DISRUPTION_BUDGET indicates the - // cluster is outside the cluster disruption budget. - // "CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE" - - // CLUSTER_DISRUPTION_BUDGET_MINOR_UPGRADE indicates the cluster is outside the - // cluster disruption budget for minor version upgrade. - // "SYSTEM_CONFIG" - SYSTEM_CONFIG indicates the cluster upgrade is paused by - // system config. - PausedReason []string `json:"pausedReason,omitempty"` - // UpgradeDetails: The list of past auto upgrades. - UpgradeDetails []*UpgradeDetails `json:"upgradeDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoUpgradeStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoUpgradeStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ClusterUpgradeInfo) MarshalJSON() ([]byte, error) { - type NoMethod ClusterUpgradeInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompleteIPRotationRequest: CompleteIPRotationRequest moves the cluster -// master back into single-IP mode. -type CompleteIPRotationRequest struct { - // ClusterId: Deprecated. The name of the cluster. This field has been - // deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to complete - // IP rotation. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { - type NoMethod CompleteIPRotationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CompleteNodePoolUpgradeRequest: CompleteNodePoolUpgradeRequest sets the name -// of target node pool to complete upgrade. -type CompleteNodePoolUpgradeRequest struct { -} - -// CompliancePostureConfig: CompliancePostureConfig defines the settings needed -// to enable/disable features for the Compliance Posture. -type CompliancePostureConfig struct { - // ComplianceStandards: List of enabled compliance standards. - ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` - // Mode: Defines the enablement mode for Compliance Posture. - // - // Possible values: - // "MODE_UNSPECIFIED" - Default value not specified. - // "DISABLED" - Disables Compliance Posture features on the cluster. - // "ENABLED" - Enables Compliance Posture features on the cluster. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ComplianceStandards") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) { - type NoMethod CompliancePostureConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ComplianceStandard: Defines the details of a compliance standard. -type ComplianceStandard struct { - // Standard: Name of the compliance standard. - Standard string `json:"standard,omitempty"` - // ForceSendFields is a list of field names (e.g. "Standard") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Standard") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ComplianceStandard) MarshalJSON() ([]byte, error) { - type NoMethod ComplianceStandard - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConfidentialNodes: ConfidentialNodes is configuration for the confidential -// nodes feature, which makes nodes run on confidential VMs. -type ConfidentialNodes struct { - // ConfidentialInstanceType: Defines the type of technology used by the - // confidential node. - // - // Possible values: - // "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do not use - // this value. - // "SEV" - AMD Secure Encrypted Virtualization. - // "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested Paging. - // "TDX" - Intel Trust Domain eXtension. - ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"` - // Enabled: Whether Confidential Nodes feature is enabled. - Enabled bool `json:"enabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidentialInstanceType") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidentialInstanceType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConfidentialNodes) MarshalJSON() ([]byte, error) { - type NoMethod ConfidentialNodes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConfigConnectorConfig: Configuration options for the Config Connector -// add-on. -type ConfigConnectorConfig struct { - // Enabled: Whether Cloud Connector is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConfigConnectorConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConfigConnectorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ConsumptionMeteringConfig: Parameters for controlling consumption metering. -type ConsumptionMeteringConfig struct { - // Enabled: Whether to enable consumption metering for this cluster. If - // enabled, a second BigQuery table will be created to hold resource - // consumption records. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { - type NoMethod ConsumptionMeteringConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ContainerdConfig: ContainerdConfig contains configuration to customize -// containerd. -type ContainerdConfig struct { - // PrivateRegistryAccessConfig: PrivateRegistryAccessConfig is used to - // configure access configuration for private container registries. - PrivateRegistryAccessConfig *PrivateRegistryAccessConfig `json:"privateRegistryAccessConfig,omitempty"` - // RegistryHosts: RegistryHostConfig configures containerd registry host - // configuration. Each registry_hosts represents a hosts.toml file. At most 25 - // registry_hosts are allowed. - RegistryHosts []*RegistryHostConfig `json:"registryHosts,omitempty"` - // WritableCgroups: Optional. WritableCgroups defines writable cgroups - // configuration for the node pool. - WritableCgroups *WritableCgroups `json:"writableCgroups,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "PrivateRegistryAccessConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PrivateRegistryAccessConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ContainerdConfig) MarshalJSON() ([]byte, error) { - type NoMethod ContainerdConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ControlPlaneEndpointsConfig: Configuration for all of the cluster's control -// plane endpoints. -type ControlPlaneEndpointsConfig struct { - // DnsEndpointConfig: DNS endpoint configuration. - DnsEndpointConfig *DNSEndpointConfig `json:"dnsEndpointConfig,omitempty"` - // IpEndpointsConfig: IP endpoints configuration. - IpEndpointsConfig *IPEndpointsConfig `json:"ipEndpointsConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsEndpointConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsEndpointConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ControlPlaneEndpointsConfig) MarshalJSON() ([]byte, error) { - type NoMethod ControlPlaneEndpointsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CostManagementConfig: Configuration for fine-grained cost management -// feature. -type CostManagementConfig struct { - // Enabled: Whether the feature is enabled or not. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CostManagementConfig) MarshalJSON() ([]byte, error) { - type NoMethod CostManagementConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CreateClusterRequest: CreateClusterRequest creates a cluster. -type CreateClusterRequest struct { - // Cluster: Required. A cluster resource - // (https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) - Cluster *Cluster `json:"cluster,omitempty"` - // Parent: The parent (project and location) where the cluster will be created. - // Specified in the format `projects/*/locations/*`. - Parent string `json:"parent,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the parent field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cluster") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CreateClusterRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateClusterRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for a -// cluster. -type CreateNodePoolRequest struct { - // ClusterId: Deprecated. The name of the cluster. This field has been - // deprecated and replaced by the parent field. - ClusterId string `json:"clusterId,omitempty"` - // NodePool: Required. The node pool to create. - NodePool *NodePool `json:"nodePool,omitempty"` - // Parent: The parent (project, location, cluster name) where the node pool - // will be created. Specified in the format - // `projects/*/locations/*/clusters/*`. - Parent string `json:"parent,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the parent field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the parent field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CreateNodePoolRequest) MarshalJSON() ([]byte, error) { - type NoMethod CreateNodePoolRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DNSConfig: DNSConfig contains the desired set of options for configuring -// clusterDNS. -type DNSConfig struct { - // AdditiveVpcScopeDnsDomain: Optional. The domain used in Additive VPC scope. - AdditiveVpcScopeDnsDomain string `json:"additiveVpcScopeDnsDomain,omitempty"` - // ClusterDns: cluster_dns indicates which in-cluster DNS provider should be - // used. - // - // Possible values: - // "PROVIDER_UNSPECIFIED" - Default value - // "PLATFORM_DEFAULT" - Use GKE default DNS provider(kube-dns) for DNS - // resolution. - // "CLOUD_DNS" - Use CloudDNS for DNS resolution. - // "KUBE_DNS" - Use KubeDNS for DNS resolution. - ClusterDns string `json:"clusterDns,omitempty"` - // ClusterDnsDomain: cluster_dns_domain is the suffix used for all cluster - // service records. - ClusterDnsDomain string `json:"clusterDnsDomain,omitempty"` - // ClusterDnsScope: cluster_dns_scope indicates the scope of access to cluster - // DNS records. - // - // Possible values: - // "DNS_SCOPE_UNSPECIFIED" - Default value, will be inferred as cluster - // scope. - // "CLUSTER_SCOPE" - DNS records are accessible from within the cluster. - // "VPC_SCOPE" - DNS records are accessible from within the VPC. - ClusterDnsScope string `json:"clusterDnsScope,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditiveVpcScopeDnsDomain") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditiveVpcScopeDnsDomain") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DNSConfig) MarshalJSON() ([]byte, error) { - type NoMethod DNSConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DNSEndpointConfig: Describes the configuration of a DNS endpoint. -type DNSEndpointConfig struct { - // AllowExternalTraffic: Controls whether user traffic is allowed over this - // endpoint. Note that Google-managed services may still use the endpoint even - // if this is false. - AllowExternalTraffic bool `json:"allowExternalTraffic,omitempty"` - // EnableK8sCertsViaDns: Controls whether the k8s certs auth is allowed via - // DNS. - EnableK8sCertsViaDns bool `json:"enableK8sCertsViaDns,omitempty"` - // EnableK8sTokensViaDns: Controls whether the k8s token auth is allowed via - // DNS. - EnableK8sTokensViaDns bool `json:"enableK8sTokensViaDns,omitempty"` - // Endpoint: Output only. The cluster's DNS endpoint configuration. A DNS - // format address. This is accessible from the public internet. Ex: - // uid.us-central1.gke.goog. Always present, but the behavior may change - // according to the value of DNSEndpointConfig.allow_external_traffic. - Endpoint string `json:"endpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowExternalTraffic") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowExternalTraffic") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DNSEndpointConfig) MarshalJSON() ([]byte, error) { - type NoMethod DNSEndpointConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DailyMaintenanceWindow: Time window specified for daily maintenance -// operations. -type DailyMaintenanceWindow struct { - // Duration: Output only. Duration of the time window, automatically chosen to - // be smallest possible in the given scenario. Duration will be in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) format "PTnHnMnS". - Duration string `json:"duration,omitempty"` - // StartTime: Time within the maintenance window to start the maintenance - // operations. Time format should be in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM", where HH : [00-23] - // and MM : [00-59] GMT. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Duration") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Duration") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod DailyMaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DatabaseEncryption: Configuration of etcd encryption. -type DatabaseEncryption struct { - // CurrentState: Output only. The current state of etcd encryption. - // - // Possible values: - // "CURRENT_STATE_UNSPECIFIED" - Should never be set - // "CURRENT_STATE_ENCRYPTED" - Secrets in etcd are encrypted. - // "CURRENT_STATE_DECRYPTED" - Secrets in etcd are stored in plain text (at - // etcd level) - this is unrelated to Compute Engine level full disk - // encryption. - // "CURRENT_STATE_ENCRYPTION_PENDING" - Encryption (or re-encryption with a - // different CloudKMS key) of Secrets is in progress. - // "CURRENT_STATE_ENCRYPTION_ERROR" - Encryption (or re-encryption with a - // different CloudKMS key) of Secrets in etcd encountered an error. - // "CURRENT_STATE_DECRYPTION_PENDING" - De-crypting Secrets to plain text in - // etcd is in progress. - // "CURRENT_STATE_DECRYPTION_ERROR" - De-crypting Secrets to plain text in - // etcd encountered an error. - CurrentState string `json:"currentState,omitempty"` - // DecryptionKeys: Output only. Keys in use by the cluster for decrypting - // existing objects, in addition to the key in `key_name`. Each item is a - // CloudKMS key resource. - DecryptionKeys []string `json:"decryptionKeys,omitempty"` - // KeyName: Name of CloudKMS key to use for the encryption of secrets in etcd. - // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key - KeyName string `json:"keyName,omitempty"` - // LastOperationErrors: Output only. Records errors seen during - // DatabaseEncryption update operations. - LastOperationErrors []*OperationError `json:"lastOperationErrors,omitempty"` - // State: The desired state of etcd encryption. - // - // Possible values: - // "UNKNOWN" - Should never be set - // "ENCRYPTED" - Secrets in etcd are encrypted. - // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd level) - - // this is unrelated to Compute Engine level full disk encryption. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentState") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DatabaseEncryption) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseEncryption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DefaultComputeClassConfig: DefaultComputeClassConfig defines default compute -// class configuration. -type DefaultComputeClassConfig struct { - // Enabled: Enables default compute class. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DefaultComputeClassConfig) MarshalJSON() ([]byte, error) { - type NoMethod DefaultComputeClassConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DefaultSnatStatus: DefaultSnatStatus contains the desired state of whether -// default sNAT should be disabled on the cluster. -type DefaultSnatStatus struct { - // Disabled: Disables cluster default sNAT rules. - Disabled bool `json:"disabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DefaultSnatStatus) MarshalJSON() ([]byte, error) { - type NoMethod DefaultSnatStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DesiredAdditionalIPRangesConfig: DesiredAdditionalIPRangesConfig is a -// wrapper used for cluster update operation and contains multiple -// AdditionalIPRangesConfigs. -type DesiredAdditionalIPRangesConfig struct { - // AdditionalIpRangesConfigs: List of additional IP ranges configs where each - // AdditionalIPRangesConfig corresponds to one subnetwork's IP ranges - AdditionalIpRangesConfigs []*AdditionalIPRangesConfig `json:"additionalIpRangesConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalIpRangesConfigs") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalIpRangesConfigs") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DesiredAdditionalIPRangesConfig) MarshalJSON() ([]byte, error) { - type NoMethod DesiredAdditionalIPRangesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DesiredEnterpriseConfig: DesiredEnterpriseConfig is a wrapper used for -// updating enterprise_config. Deprecated: GKE Enterprise features are now -// available without an Enterprise tier. -type DesiredEnterpriseConfig struct { - // DesiredTier: desired_tier specifies the desired tier of the cluster. - // - // Possible values: - // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier - // is not set. - // "STANDARD" - STANDARD indicates a standard GKE cluster. - // "ENTERPRISE" - ENTERPRISE indicates a GKE Enterprise cluster. - DesiredTier string `json:"desiredTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "DesiredTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DesiredTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DesiredEnterpriseConfig) MarshalJSON() ([]byte, error) { - type NoMethod DesiredEnterpriseConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsCacheConfig: Configuration for NodeLocal DNSCache -type DnsCacheConfig struct { - // Enabled: Whether NodeLocal DNSCache is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsCacheConfig) MarshalJSON() ([]byte, error) { - type NoMethod DnsCacheConfig - return gensupport.MarshalJSON(NoMethod(s), 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:"-"` -} - -// EnterpriseConfig: EnterpriseConfig is the cluster enterprise configuration. -// Deprecated: GKE Enterprise features are now available without an Enterprise -// tier. -type EnterpriseConfig struct { - // ClusterTier: Output only. cluster_tier indicates the effective tier of the - // cluster. - // - // Possible values: - // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier - // is not set. - // "STANDARD" - STANDARD indicates a standard GKE cluster. - // "ENTERPRISE" - ENTERPRISE indicates a GKE Enterprise cluster. - ClusterTier string `json:"clusterTier,omitempty"` - // DesiredTier: desired_tier specifies the desired tier of the cluster. - // - // Possible values: - // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier - // is not set. - // "STANDARD" - STANDARD indicates a standard GKE cluster. - // "ENTERPRISE" - ENTERPRISE indicates a GKE Enterprise cluster. - DesiredTier string `json:"desiredTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClusterTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EnterpriseConfig) MarshalJSON() ([]byte, error) { - type NoMethod EnterpriseConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EphemeralStorageLocalSsdConfig: EphemeralStorageLocalSsdConfig contains -// configuration for the node ephemeral storage using Local SSDs. -type EphemeralStorageLocalSsdConfig struct { - // DataCacheCount: Number of local SSDs to use for GKE Data Cache. - DataCacheCount int64 `json:"dataCacheCount,omitempty"` - // LocalSsdCount: 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. - LocalSsdCount int64 `json:"localSsdCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataCacheCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataCacheCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EphemeralStorageLocalSsdConfig) MarshalJSON() ([]byte, error) { - type NoMethod EphemeralStorageLocalSsdConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EvictionGracePeriod: Eviction grace periods are grace periods for each -// eviction signal. -type EvictionGracePeriod struct { - // ImagefsAvailable: Optional. Grace period for eviction due to imagefs - // available signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `json:"imagefsAvailable,omitempty"` - // ImagefsInodesFree: Optional. Grace period for eviction due to imagefs inodes - // free signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `json:"imagefsInodesFree,omitempty"` - // MemoryAvailable: Optional. Grace period for eviction due to memory available - // signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `json:"memoryAvailable,omitempty"` - // NodefsAvailable: Optional. Grace period for eviction due to nodefs available - // signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `json:"nodefsAvailable,omitempty"` - // NodefsInodesFree: Optional. Grace period for eviction due to nodefs inodes - // free signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `json:"nodefsInodesFree,omitempty"` - // PidAvailable: Optional. Grace period for eviction due to pid available - // signal. Sample format: "10s". Must be >= 0. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `json:"pidAvailable,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImagefsAvailable") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImagefsAvailable") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EvictionGracePeriod) MarshalJSON() ([]byte, error) { - type NoMethod EvictionGracePeriod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EvictionMinimumReclaim: Eviction minimum reclaims are the resource amounts -// of minimum reclaims for each eviction signal. -type EvictionMinimumReclaim struct { - // ImagefsAvailable: Optional. Minimum reclaim for eviction due to imagefs - // available signal. Only take percentage value for now. Sample format: "10%". - // Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `json:"imagefsAvailable,omitempty"` - // ImagefsInodesFree: Optional. Minimum reclaim for eviction due to imagefs - // inodes free signal. Only take percentage value for now. Sample format: - // "10%". Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `json:"imagefsInodesFree,omitempty"` - // MemoryAvailable: Optional. Minimum reclaim for eviction due to memory - // available signal. Only take percentage value for now. Sample format: "10%". - // Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `json:"memoryAvailable,omitempty"` - // NodefsAvailable: Optional. Minimum reclaim for eviction due to nodefs - // available signal. Only take percentage value for now. Sample format: "10%". - // Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `json:"nodefsAvailable,omitempty"` - // NodefsInodesFree: Optional. Minimum reclaim for eviction due to nodefs - // inodes free signal. Only take percentage value for now. Sample format: - // "10%". Must be <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `json:"nodefsInodesFree,omitempty"` - // PidAvailable: Optional. Minimum reclaim for eviction due to pid available - // signal. Only take percentage value for now. Sample format: "10%". Must be - // <=10%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `json:"pidAvailable,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImagefsAvailable") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImagefsAvailable") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EvictionMinimumReclaim) MarshalJSON() ([]byte, error) { - type NoMethod EvictionMinimumReclaim - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EvictionSignals: Eviction signals are the current state of a particular -// resource at a specific point in time. The kubelet uses eviction signals to -// make eviction decisions by comparing the signals to eviction thresholds, -// which are the minimum amount of the resource that should be available on the -// node. -type EvictionSignals struct { - // ImagefsAvailable: Optional. Amount of storage available on filesystem that - // container runtime uses for storing images layers. If the container - // filesystem and image filesystem are not separate, then imagefs can store - // both image layers and writeable layers. Defines the amount of - // "imagefs.available" signal in kubelet. Default is unset, if not specified in - // the kubelet config. It takses percentage value for now. Sample format: - // "30%". Must be >= 15% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsAvailable string `json:"imagefsAvailable,omitempty"` - // ImagefsInodesFree: Optional. Amount of inodes available on filesystem that - // container runtime uses for storing images layers. Defines the amount of - // "imagefs.inodesFree" signal in kubelet. Default is unset, if not specified - // in the kubelet config. Linux only. It takses percentage value for now. - // Sample format: "30%". Must be >= 5% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - ImagefsInodesFree string `json:"imagefsInodesFree,omitempty"` - // MemoryAvailable: Optional. Memory available (i.e. capacity - workingSet), in - // bytes. Defines the amount of "memory.available" signal in kubelet. Default - // is unset, if not specified in the kubelet config. Format: positive number + - // unit, e.g. 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be >= 100Mi - // and <= 50% of the node's memory. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - MemoryAvailable string `json:"memoryAvailable,omitempty"` - // NodefsAvailable: Optional. Amount of storage available on filesystem that - // kubelet uses for volumes, daemon logs, etc. Defines the amount of - // "nodefs.available" signal in kubelet. Default is unset, if not specified in - // the kubelet config. It takses percentage value for now. Sample format: - // "30%". Must be >= 10% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsAvailable string `json:"nodefsAvailable,omitempty"` - // NodefsInodesFree: Optional. Amount of inodes available on filesystem that - // kubelet uses for volumes, daemon logs, etc. Defines the amount of - // "nodefs.inodesFree" signal in kubelet. Default is unset, if not specified in - // the kubelet config. Linux only. It takses percentage value for now. Sample - // format: "30%". Must be >= 5% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - NodefsInodesFree string `json:"nodefsInodesFree,omitempty"` - // PidAvailable: Optional. Amount of PID available for pod allocation. Defines - // the amount of "pid.available" signal in kubelet. Default is unset, if not - // specified in the kubelet config. It takses percentage value for now. Sample - // format: "30%". Must be >= 10% and <= 50%. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals - PidAvailable string `json:"pidAvailable,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImagefsAvailable") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImagefsAvailable") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EvictionSignals) MarshalJSON() ([]byte, error) { - type NoMethod EvictionSignals - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// FastSocket: Configuration of Fast Socket feature. -type FastSocket struct { - // Enabled: Whether Fast Socket features are enabled in the node pool. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s FastSocket) MarshalJSON() ([]byte, error) { - type NoMethod FastSocket - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Filter: Allows filtering to one or more specific event types. If event types -// are present, those and only those event types will be transmitted to the -// cluster. Other types will be skipped. If no filter is specified, or no event -// types are present, all event types will be sent -type Filter struct { - // EventType: Event types to allowlist. - // - // Possible values: - // "EVENT_TYPE_UNSPECIFIED" - Not set, will be ignored. - // "UPGRADE_AVAILABLE_EVENT" - Corresponds with UpgradeAvailableEvent. - // "UPGRADE_EVENT" - Corresponds with UpgradeEvent. - // "SECURITY_BULLETIN_EVENT" - Corresponds with SecurityBulletinEvent. - // "UPGRADE_INFO_EVENT" - Corresponds with UpgradeInfoEvent. - EventType []string `json:"eventType,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EventType") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Filter) MarshalJSON() ([]byte, error) { - type NoMethod Filter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Fleet: Fleet is the fleet configuration for the cluster. -type Fleet struct { - // Membership: Output only. The full resource name of the registered fleet - // membership of the cluster, in the format - // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. - Membership string `json:"membership,omitempty"` - // MembershipType: The type of the cluster's fleet membership. - // - // Possible values: - // "MEMBERSHIP_TYPE_UNSPECIFIED" - The MembershipType is not set. - // "LIGHTWEIGHT" - The membership supports only lightweight compatible - // features. - MembershipType string `json:"membershipType,omitempty"` - // PreRegistered: Output only. Whether the cluster has been registered through - // the fleet API. - PreRegistered bool `json:"preRegistered,omitempty"` - // Project: The Fleet host project(project ID or project number) where this - // cluster will be registered to. This field cannot be changed after the - // cluster has been registered. - Project string `json:"project,omitempty"` - // ForceSendFields is a list of field names (e.g. "Membership") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Membership") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Fleet) MarshalJSON() ([]byte, error) { - type NoMethod Fleet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GCPSecretManagerCertificateConfig: GCPSecretManagerCertificateConfig -// configures a secret from Secret Manager -// (https://cloud.google.com/secret-manager). -type GCPSecretManagerCertificateConfig struct { - // SecretUri: Secret URI, in the form - // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". Version can - // be fixed (e.g. "2") or "latest" - SecretUri string `json:"secretUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "SecretUri") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SecretUri") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GCPSecretManagerCertificateConfig) MarshalJSON() ([]byte, error) { - type NoMethod GCPSecretManagerCertificateConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GPUDriverInstallationConfig: GPUDriverInstallationConfig specifies the -// version of GPU driver to be auto installed. -type GPUDriverInstallationConfig struct { - // GpuDriverVersion: Mode for how the GPU driver is installed. - // - // Possible values: - // "GPU_DRIVER_VERSION_UNSPECIFIED" - Default value is to not install any GPU - // driver. - // "INSTALLATION_DISABLED" - Disable GPU driver auto installation and needs - // manual installation - // "DEFAULT" - "Default" GPU driver in COS and Ubuntu. - // "LATEST" - "Latest" GPU driver in COS. - GpuDriverVersion string `json:"gpuDriverVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "GpuDriverVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GpuDriverVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GPUDriverInstallationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GPUDriverInstallationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GPUSharingConfig: GPUSharingConfig represents the GPU sharing configuration -// for Hardware Accelerators. -type GPUSharingConfig struct { - // GpuSharingStrategy: The type of GPU sharing strategy to enable on the GPU - // node. - // - // Possible values: - // "GPU_SHARING_STRATEGY_UNSPECIFIED" - Default value. - // "TIME_SHARING" - GPUs are time-shared between containers. - // "MPS" - GPUs are shared between containers with NVIDIA MPS. - GpuSharingStrategy string `json:"gpuSharingStrategy,omitempty"` - // MaxSharedClientsPerGpu: The max number of containers that can share a - // physical GPU. - MaxSharedClientsPerGpu int64 `json:"maxSharedClientsPerGpu,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "GpuSharingStrategy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GpuSharingStrategy") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GPUSharingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GPUSharingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GatewayAPIConfig: GatewayAPIConfig contains the desired config of Gateway -// API on this cluster. -type GatewayAPIConfig struct { - // Channel: The Gateway API release channel to use for Gateway API. - // - // Possible values: - // "CHANNEL_UNSPECIFIED" - Default value. - // "CHANNEL_DISABLED" - Gateway API support is disabled - // "CHANNEL_EXPERIMENTAL" - Deprecated: use CHANNEL_STANDARD instead. 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"` - // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Channel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GatewayAPIConfig) MarshalJSON() ([]byte, error) { - type NoMethod GatewayAPIConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GcePersistentDiskCsiDriverConfig: Configuration for the Compute Engine PD -// CSI driver. -type GcePersistentDiskCsiDriverConfig struct { - // Enabled: Whether the Compute Engine PD CSI driver is enabled for this - // cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GcePersistentDiskCsiDriverConfig) MarshalJSON() ([]byte, error) { - type NoMethod GcePersistentDiskCsiDriverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GcfsConfig: GcfsConfig contains configurations of Google Container File -// System (image streaming). -type GcfsConfig struct { - // Enabled: Whether to use GCFS. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GcfsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GcfsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GcpFilestoreCsiDriverConfig: Configuration for the Filestore CSI driver. -type GcpFilestoreCsiDriverConfig struct { - // Enabled: Whether the Filestore CSI driver is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GcpFilestoreCsiDriverConfig) MarshalJSON() ([]byte, error) { - type NoMethod GcpFilestoreCsiDriverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GcsFuseCsiDriverConfig: Configuration for the Cloud Storage Fuse CSI driver. -type GcsFuseCsiDriverConfig struct { - // Enabled: Whether the Cloud Storage Fuse CSI driver is enabled for this - // cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GcsFuseCsiDriverConfig) MarshalJSON() ([]byte, error) { - type NoMethod GcsFuseCsiDriverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web Key Set -// as specified in rfc 7517 -type GetJSONWebKeysResponse struct { - // CacheHeader: For HTTP requests, this field is automatically extracted into - // the Cache-Control HTTP header. - CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` - // Keys: The public component of the keys used by the cluster to sign token - // requests. - Keys []*Jwk `json:"keys,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CacheHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CacheHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetJSONWebKeysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GetOpenIDConfigResponse: GetOpenIDConfigResponse is an OIDC discovery -// document for the cluster. See the OpenID Connect Discovery 1.0 specification -// for details. -type GetOpenIDConfigResponse struct { - // CacheHeader: For HTTP requests, this field is automatically extracted into - // the Cache-Control HTTP header. - CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` - // ClaimsSupported: Supported claims. - ClaimsSupported []string `json:"claims_supported,omitempty"` - // GrantTypes: Supported grant types. - GrantTypes []string `json:"grant_types,omitempty"` - // IdTokenSigningAlgValuesSupported: supported ID Token signing Algorithms. - IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported,omitempty"` - // Issuer: OIDC Issuer. - Issuer string `json:"issuer,omitempty"` - // JwksUri: JSON Web Key uri. - JwksUri string `json:"jwks_uri,omitempty"` - // ResponseTypesSupported: Supported response types. - ResponseTypesSupported []string `json:"response_types_supported,omitempty"` - // SubjectTypesSupported: Supported subject types. - SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CacheHeader") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CacheHeader") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GetOpenIDConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod GetOpenIDConfigResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GkeAutoUpgradeConfig: GkeAutoUpgradeConfig is the configuration for GKE auto -// upgrades. -type GkeAutoUpgradeConfig struct { - // PatchMode: PatchMode specifies how auto upgrade patch builds should be - // selected. - // - // Possible values: - // "PATCH_MODE_UNSPECIFIED" - PATCH_MODE_UNSPECIFIED defaults to using the - // upgrade target from the channel's patch upgrade targets as the upgrade - // target for the version. - // "ACCELERATED" - ACCELERATED denotes that the latest patch build in the - // channel should be used as the upgrade target for the version. - PatchMode string `json:"patchMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "PatchMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PatchMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GkeAutoUpgradeConfig) MarshalJSON() ([]byte, error) { - type NoMethod GkeAutoUpgradeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GkeBackupAgentConfig: Configuration for the Backup for GKE Agent. -type GkeBackupAgentConfig struct { - // Enabled: Whether the Backup for GKE agent is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GkeBackupAgentConfig) MarshalJSON() ([]byte, error) { - type NoMethod GkeBackupAgentConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HighScaleCheckpointingConfig: Configuration for the High Scale -// Checkpointing. -type HighScaleCheckpointingConfig struct { - // Enabled: Whether the High Scale Checkpointing is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HighScaleCheckpointingConfig) MarshalJSON() ([]byte, error) { - type NoMethod HighScaleCheckpointingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HorizontalPodAutoscaling: Configuration options for the horizontal pod -// autoscaling feature, which increases or decreases the number of replica pods -// a replication controller has based on the resource usage of the existing -// pods. -type HorizontalPodAutoscaling struct { - // Disabled: Whether the Horizontal Pod Autoscaling feature is enabled in the - // cluster. When enabled, it ensures that metrics are collected into - // Stackdriver Monitoring. - Disabled bool `json:"disabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { - type NoMethod HorizontalPodAutoscaling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HostConfig: HostConfig configures the registry host under a given Server. -type HostConfig struct { - // Ca: CA configures the registry host certificate. - Ca []*CertificateConfig `json:"ca,omitempty"` - // Capabilities: Capabilities represent the capabilities of the registry host, - // specifying what operations a host is capable of performing. If not set, - // containerd enables all capabilities by default. - // - // Possible values: - // "HOST_CAPABILITY_UNSPECIFIED" - UNKNOWN should never be set. - // "HOST_CAPABILITY_PULL" - Pull represents the capability to fetch manifests - // and blobs by digest. - // "HOST_CAPABILITY_RESOLVE" - Resolve represents the capability to fetch - // manifests by name. - // "HOST_CAPABILITY_PUSH" - Push represents the capability to push blobs and - // manifests. - Capabilities []string `json:"capabilities,omitempty"` - // Client: Client configures the registry host client certificate and key. - Client []*CertificateConfigPair `json:"client,omitempty"` - // DialTimeout: Specifies the maximum duration allowed for a connection attempt - // to complete. A shorter timeout helps reduce delays when falling back to the - // original registry if the mirror is unreachable. Maximum allowed value is - // 180s. If not set, containerd sets default 30s. The value should be a decimal - // number of seconds with an `s` suffix. - DialTimeout string `json:"dialTimeout,omitempty"` - // Header: Header configures the registry host headers. - Header []*RegistryHeader `json:"header,omitempty"` - // Host: Host configures the registry host/mirror. It supports fully qualified - // domain names (FQDN) and IP addresses: Specifying port is supported. - // Wildcards are NOT supported. Examples: - my.customdomain.com - 10.0.1.2:5000 - Host string `json:"host,omitempty"` - // OverridePath: OverridePath is used to indicate the host's API root endpoint - // is defined in the URL path rather than by the API specification. This may be - // used with non-compliant OCI registries which are missing the /v2 prefix. If - // not set, containerd sets default false. - OverridePath bool `json:"overridePath,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ca") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ca") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HostConfig) MarshalJSON() ([]byte, error) { - type NoMethod HostConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpCacheControlResponseHeader: RFC-2616: cache control support -type HttpCacheControlResponseHeader struct { - // Age: 14.6 response cache age, in seconds since the response is generated - Age int64 `json:"age,omitempty,string"` - // Directive: 14.9 request and response directives - Directive string `json:"directive,omitempty"` - // Expires: 14.21 response cache expires, in RFC 1123 date format - Expires string `json:"expires,omitempty"` - // ForceSendFields is a list of field names (e.g. "Age") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Age") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpCacheControlResponseHeader) MarshalJSON() ([]byte, error) { - type NoMethod HttpCacheControlResponseHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpLoadBalancing: Configuration options for the HTTP (L7) load balancing -// controller addon, which makes it easy to set up HTTP load balancers for -// services in a cluster. -type HttpLoadBalancing struct { - // Disabled: Whether the HTTP Load Balancing controller is enabled in the - // cluster. When enabled, it runs a small pod in the cluster that manages the - // load balancers. - Disabled bool `json:"disabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpLoadBalancing) MarshalJSON() ([]byte, error) { - type NoMethod HttpLoadBalancing - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HugepagesConfig: Hugepages amount in both 2m and 1g size -type HugepagesConfig struct { - // HugepageSize1g: Optional. Amount of 1G hugepages - HugepageSize1g int64 `json:"hugepageSize1g,omitempty"` - // HugepageSize2m: Optional. Amount of 2M hugepages - HugepageSize2m int64 `json:"hugepageSize2m,omitempty"` - // ForceSendFields is a list of field names (e.g. "HugepageSize1g") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HugepageSize1g") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HugepagesConfig) MarshalJSON() ([]byte, error) { - type NoMethod HugepagesConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ILBSubsettingConfig: ILBSubsettingConfig contains the desired config of L4 -// Internal LoadBalancer subsetting on this cluster. -type ILBSubsettingConfig struct { - // Enabled: Enables l4 ILB subsetting for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ILBSubsettingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ILBSubsettingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IPAllocationPolicy: Configuration for controlling how IPs are allocated in -// the cluster. -type IPAllocationPolicy struct { - // AdditionalIpRangesConfigs: Output only. The additional IP ranges that are - // added to the cluster. These IP ranges can be used by new node pools to - // allocate node and pod IPs automatically. Each AdditionalIPRangesConfig - // corresponds to a single subnetwork. Once a range is removed it will not show - // up in IPAllocationPolicy. - AdditionalIpRangesConfigs []*AdditionalIPRangesConfig `json:"additionalIpRangesConfigs,omitempty"` - // AdditionalPodRangesConfig: Output only. The additional pod ranges that are - // added to the cluster. These pod ranges can be used by new node pools to - // allocate pod IPs automatically. Once the range is removed it will not show - // up in IPAllocationPolicy. - AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` - // AutoIpamConfig: Optional. AutoIpamConfig contains all information related to - // Auto IPAM - AutoIpamConfig *AutoIpamConfig `json:"autoIpamConfig,omitempty"` - // ClusterIpv4Cidr: This field is deprecated, use cluster_ipv4_cidr_block. - ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` - // ClusterIpv4CidrBlock: The IP address range for the cluster pod IPs. If this - // field is set, then `cluster.cluster_ipv4_cidr` must be left blank. This - // field is only applicable when `use_ip_aliases` is true. Set to blank to have - // a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a - // range chosen with a specific netmask. Set to a CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, - // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. - ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty"` - // ClusterSecondaryRangeName: The name of the secondary range to be used for - // the cluster CIDR block. The secondary range will be used for pod IP - // addresses. This must be an existing secondary range associated with the - // cluster subnetwork. This field is only applicable with use_ip_aliases is - // true and create_subnetwork is false. - ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty"` - // CreateSubnetwork: Whether a new subnetwork will be created automatically for - // the cluster. This field is only applicable when `use_ip_aliases` is true. - CreateSubnetwork bool `json:"createSubnetwork,omitempty"` - // DefaultPodIpv4RangeUtilization: Output only. The utilization of the cluster - // default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in - // the secondary range], Usage=numNodes*numZones*podIPsPerNode. - DefaultPodIpv4RangeUtilization float64 `json:"defaultPodIpv4RangeUtilization,omitempty"` - // Ipv6AccessType: The ipv6 access type (internal or external) when - // create_subnetwork is true - // - // Possible values: - // "IPV6_ACCESS_TYPE_UNSPECIFIED" - Default value, will be defaulted as type - // external. - // "INTERNAL" - Access type internal (all v6 addresses are internal IPs) - // "EXTERNAL" - Access type external (all v6 addresses are external IPs) - Ipv6AccessType string `json:"ipv6AccessType,omitempty"` - // NetworkTierConfig: Cluster-level network tier configuration is used to - // determine the default network tier for external IP addresses on cluster - // resources, such as node pools and load balancers. - NetworkTierConfig *NetworkTierConfig `json:"networkTierConfig,omitempty"` - // NodeIpv4Cidr: This field is deprecated, use node_ipv4_cidr_block. - NodeIpv4Cidr string `json:"nodeIpv4Cidr,omitempty"` - // NodeIpv4CidrBlock: The IP address range of the instance IPs in this cluster. - // This is applicable only if `create_subnetwork` is true. Set to blank to have - // a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a - // range chosen with a specific netmask. Set to a CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, - // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. - NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty"` - // PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size overprovisioning - // config for the cluster. Pod CIDR size per node depends on max_pods_per_node. - // By default, the value of max_pods_per_node is doubled and then rounded off - // to next power of 2 to get the size of pod CIDR block per node. Example: - // max_pods_per_node of 30 would result in 64 IPs (/26). This config can - // disable the doubling of IPs (we still round off to next power of 2) Example: - // max_pods_per_node of 30 will result in 32 IPs (/27) when overprovisioning is - // disabled. - PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"` - // ServicesIpv4Cidr: This field is deprecated, use services_ipv4_cidr_block. - ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` - // ServicesIpv4CidrBlock: The IP address range of the services IPs in this - // cluster. If blank, a range will be automatically chosen with the default - // size. This field is only applicable when `use_ip_aliases` is true. Set to - // blank to have a range chosen with the default size. Set to /netmask (e.g. - // `/14`) to have a range chosen with a specific netmask. Set to a CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, - // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. - ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` - // ServicesIpv6CidrBlock: Output only. The services IPv6 CIDR block for the - // cluster. - ServicesIpv6CidrBlock string `json:"servicesIpv6CidrBlock,omitempty"` - // ServicesSecondaryRangeName: The name of the secondary range to be used as - // for the services CIDR block. The secondary range will be used for service - // ClusterIPs. This must be an existing secondary range associated with the - // cluster subnetwork. This field is only applicable with use_ip_aliases is - // true and create_subnetwork is false. - ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty"` - // StackType: The IP stack type of the cluster - // - // Possible values: - // "STACK_TYPE_UNSPECIFIED" - Default value, will be defaulted as IPV4 only - // "IPV4" - Cluster is IPV4 only - // "IPV4_IPV6" - Cluster can use both IPv4 and IPv6 - StackType string `json:"stackType,omitempty"` - // SubnetIpv6CidrBlock: Output only. The subnet's IPv6 CIDR block used by nodes - // and pods. - SubnetIpv6CidrBlock string `json:"subnetIpv6CidrBlock,omitempty"` - // SubnetworkName: A custom subnetwork name to be used if `create_subnetwork` - // is true. If this field is empty, then an automatic name will be chosen for - // the new subnetwork. - SubnetworkName string `json:"subnetworkName,omitempty"` - // TpuIpv4CidrBlock: The IP address range of the Cloud TPUs in this cluster. If - // unspecified, a range will be automatically chosen with the default size. - // This field is only applicable when `use_ip_aliases` is true. If unspecified, - // the range will use the default size. Set to /netmask (e.g. `/14`) to have a - // range chosen with a specific netmask. Set to a CIDR - // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. - // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, - // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. This - // field is deprecated due to the deprecation of 2VM TPU. The end of life date - // for 2VM TPU is 2025-04-25. - TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` - // UseIpAliases: Whether alias IPs will be used for pod IPs in the cluster. - // This is used in conjunction with use_routes. It cannot be true if use_routes - // is true. If both use_ip_aliases and use_routes are false, then the server - // picks the default IP allocation mode - UseIpAliases bool `json:"useIpAliases,omitempty"` - // UseRoutes: Whether routes will be used for pod IPs in the cluster. This is - // used in conjunction with use_ip_aliases. It cannot be true if use_ip_aliases - // is true. If both use_ip_aliases and use_routes are false, then the server - // picks the default IP allocation mode - UseRoutes bool `json:"useRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalIpRangesConfigs") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalIpRangesConfigs") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IPAllocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod IPAllocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *IPAllocationPolicy) UnmarshalJSON(data []byte) error { - type NoMethod IPAllocationPolicy - var s1 struct { - DefaultPodIpv4RangeUtilization gensupport.JSONFloat64 `json:"defaultPodIpv4RangeUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DefaultPodIpv4RangeUtilization = float64(s1.DefaultPodIpv4RangeUtilization) - return nil -} - -// IPEndpointsConfig: IP endpoints configuration. -type IPEndpointsConfig struct { - // AuthorizedNetworksConfig: Configuration of authorized networks. If enabled, - // restricts access to the control plane based on source IP. It is invalid to - // specify both Cluster.masterAuthorizedNetworksConfig and this field at the - // same time. - AuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"authorizedNetworksConfig,omitempty"` - // EnablePublicEndpoint: Controls whether the control plane allows access - // through a public IP. It is invalid to specify both - // PrivateClusterConfig.enablePrivateEndpoint and this field at the same time. - EnablePublicEndpoint bool `json:"enablePublicEndpoint,omitempty"` - // Enabled: Controls whether to allow direct IP access. - Enabled bool `json:"enabled,omitempty"` - // GlobalAccess: Controls whether the control plane's private endpoint is - // accessible from sources in other regions. It is invalid to specify both - // PrivateClusterMasterGlobalAccessConfig.enabled and this field at the same - // time. - GlobalAccess bool `json:"globalAccess,omitempty"` - // PrivateEndpoint: Output only. The internal IP address of this cluster's - // control plane. Only populated if enabled. - PrivateEndpoint string `json:"privateEndpoint,omitempty"` - // PrivateEndpointSubnetwork: Subnet to provision the master's private endpoint - // during cluster creation. Specified in projects/*/regions/*/subnetworks/* - // format. It is invalid to specify both - // PrivateClusterConfig.privateEndpointSubnetwork and this field at the same - // time. - PrivateEndpointSubnetwork string `json:"privateEndpointSubnetwork,omitempty"` - // PublicEndpoint: Output only. The external IP address of this cluster's - // control plane. Only populated if enabled. - PublicEndpoint string `json:"publicEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuthorizedNetworksConfig") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizedNetworksConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IPEndpointsConfig) MarshalJSON() ([]byte, error) { - type NoMethod IPEndpointsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IdentityServiceConfig: IdentityServiceConfig is configuration for Identity -// Service which allows customers to use external identity providers with the -// K8S API -type IdentityServiceConfig struct { - // Enabled: Whether to enable the Identity Service component - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IdentityServiceConfig) MarshalJSON() ([]byte, error) { - type NoMethod IdentityServiceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the desired -// config of the intra-node visibility on this cluster. -type IntraNodeVisibilityConfig struct { - // Enabled: Enables intra node visibility for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { - type NoMethod IntraNodeVisibilityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Jwk: Jwk is a JSON Web Key as specified in RFC 7517 -type Jwk struct { - // Alg: Algorithm. - Alg string `json:"alg,omitempty"` - // Crv: Used for ECDSA keys. - Crv string `json:"crv,omitempty"` - // E: Used for RSA keys. - E string `json:"e,omitempty"` - // Kid: Key ID. - Kid string `json:"kid,omitempty"` - // Kty: Key Type. - Kty string `json:"kty,omitempty"` - // N: Used for RSA keys. - N string `json:"n,omitempty"` - // Use: Permitted uses for the public keys. - Use string `json:"use,omitempty"` - // X: Used for ECDSA keys. - X string `json:"x,omitempty"` - // Y: Used for ECDSA keys. - Y string `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alg") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alg") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Jwk) MarshalJSON() ([]byte, error) { - type NoMethod Jwk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// K8sBetaAPIConfig: K8sBetaAPIConfig , configuration for beta APIs -type K8sBetaAPIConfig struct { - // EnabledApis: Enabled k8s beta APIs. - EnabledApis []string `json:"enabledApis,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnabledApis") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnabledApis") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s K8sBetaAPIConfig) MarshalJSON() ([]byte, error) { - type NoMethod K8sBetaAPIConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// KubernetesDashboard: Configuration for the Kubernetes Dashboard. -type KubernetesDashboard struct { - // Disabled: Whether the Kubernetes Dashboard is enabled for this cluster. - Disabled bool `json:"disabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s KubernetesDashboard) MarshalJSON() ([]byte, error) { - type NoMethod KubernetesDashboard - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LegacyAbac: Configuration for the legacy Attribute Based Access Control -// authorization mode. -type LegacyAbac struct { - // Enabled: Whether the ABAC authorizer is enabled for this cluster. When - // enabled, identities in the system, including service accounts, nodes, and - // controllers, will have statically granted permissions beyond those provided - // by the RBAC configuration or IAM. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LegacyAbac) MarshalJSON() ([]byte, error) { - type NoMethod LegacyAbac - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LinuxNodeConfig: Parameters that can be configured on Linux nodes. -type LinuxNodeConfig struct { - // CgroupMode: cgroup_mode specifies the cgroup mode to be used on the node. - // - // Possible values: - // "CGROUP_MODE_UNSPECIFIED" - CGROUP_MODE_UNSPECIFIED is when unspecified - // cgroup configuration is used. The default for the GKE node OS image will be - // used. - // "CGROUP_MODE_V1" - CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup - // configuration on the node image. - // "CGROUP_MODE_V2" - CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup - // configuration on the node image. - CgroupMode string `json:"cgroupMode,omitempty"` - // Hugepages: Optional. Amounts for 2M and 1G hugepages - Hugepages *HugepagesConfig `json:"hugepages,omitempty"` - // NodeKernelModuleLoading: Optional. Configuration for kernel module loading - // on nodes. When enabled, the node pool will be provisioned with a - // Container-Optimized OS image that enforces kernel module signature - // verification. - NodeKernelModuleLoading *NodeKernelModuleLoading `json:"nodeKernelModuleLoading,omitempty"` - // Sysctls: The Linux kernel parameters to be applied to the nodes and all pods - // running on the nodes. The following parameters are supported. - // net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog - // net.core.rmem_max net.core.rmem_default net.core.wmem_default - // net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.tcp_rmem - // net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing - // net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets - // net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control - // net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets - // net.netfilter.nf_conntrack_tcp_timeout_close_wait - // net.netfilter.nf_conntrack_tcp_timeout_time_wait - // net.netfilter.nf_conntrack_tcp_timeout_established - // net.netfilter.nf_conntrack_acct kernel.shmmni kernel.shmmax kernel.shmall - // kernel.perf_event_paranoid kernel.sched_rt_runtime_us - // kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict - // kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max - // fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open - // vm.dirty_background_ratio vm.dirty_background_bytes - // vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes - // vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory - // vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness - // vm.watermark_scale_factor vm.min_free_kbytes - Sysctls map[string]string `json:"sysctls,omitempty"` - // TransparentHugepageDefrag: Optional. Defines the transparent hugepage defrag - // configuration on the node. VM hugepage allocation can be managed by either - // limiting defragmentation for delayed allocation or skipping it entirely for - // immediate allocation only. See - // https://docs.kernel.org/admin-guide/mm/transhuge.html for more details. - // - // Possible values: - // "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED" - Default value. GKE will not - // modify the kernel configuration. - // "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS" - It means that an application - // requesting THP will stall on allocation failure and directly reclaim pages - // and compact memory in an effort to allocate a THP immediately. - // "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER" - It means that an application will - // wake kswapd in the background to reclaim pages and wake kcompactd to compact - // memory so that THP is available in the near future. It's the responsibility - // of khugepaged to then install the THP pages later. - // "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE" - It means that an - // application will enter direct reclaim and compaction like always, but only - // for regions that have used madvise(MADV_HUGEPAGE); all other regions will - // wake kswapd in the background to reclaim pages and wake kcompactd to compact - // memory so that THP is available in the near future. - // "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE" - It means that an application will - // enter direct reclaim like always but only for regions that are have used - // madvise(MADV_HUGEPAGE). This is the default kernel configuration. - // "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER" - It means that an application will - // never enter direct reclaim or compaction. - TransparentHugepageDefrag string `json:"transparentHugepageDefrag,omitempty"` - // TransparentHugepageEnabled: Optional. Transparent hugepage support for - // anonymous memory can be entirely disabled (mostly for debugging purposes) or - // only enabled inside MADV_HUGEPAGE regions (to avoid the risk of consuming - // more memory resources) or enabled system wide. See - // https://docs.kernel.org/admin-guide/mm/transhuge.html for more details. - // - // Possible values: - // "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED" - Default value. GKE will not - // modify the kernel configuration. - // "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS" - Transparent hugepage support for - // anonymous memory is enabled system wide. - // "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE" - Transparent hugepage support for - // anonymous memory is enabled inside MADV_HUGEPAGE regions. This is the - // default kernel configuration. - // "TRANSPARENT_HUGEPAGE_ENABLED_NEVER" - Transparent hugepage support for - // anonymous memory is disabled. - TransparentHugepageEnabled string `json:"transparentHugepageEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "CgroupMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CgroupMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LinuxNodeConfig) MarshalJSON() ([]byte, error) { - type NoMethod LinuxNodeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListClustersResponse: ListClustersResponse is the result of -// ListClustersRequest. -type ListClustersResponse struct { - // Clusters: A list of clusters in the project in the specified zone, or across - // all ones. - Clusters []*Cluster `json:"clusters,omitempty"` - // MissingZones: If any zones are listed here, the list of clusters returned - // may be missing those zones. - MissingZones []string `json:"missingZones,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Clusters") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClustersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListNodePoolsResponse: ListNodePoolsResponse is the result of -// ListNodePoolsRequest. -type ListNodePoolsResponse struct { - // NodePools: A list of node pools for a cluster. - NodePools []*NodePool `json:"nodePools,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NodePools") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodePools") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListNodePoolsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNodePoolsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListOperationsResponse: ListOperationsResponse is the result of -// ListOperationsRequest. -type ListOperationsResponse struct { - // MissingZones: If any zones are listed here, the list of operations returned - // may be missing the operations from those zones. - MissingZones []string `json:"missingZones,omitempty"` - // Operations: A list of operations in the project in the specified zone. - 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. "MissingZones") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MissingZones") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListUsableSubnetworksResponse: ListUsableSubnetworksResponse is the response -// of ListUsableSubnetworksRequest. -type ListUsableSubnetworksResponse struct { - // NextPageToken: This token allows you to get the next page of results for - // list requests. If the number of results is larger than `page_size`, use the - // `next_page_token` as a value for the query parameter `page_token` in the - // next request. The value will become empty when there are no more pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Subnetworks: A list of usable subnetworks in the specified network project. - Subnetworks []*UsableSubnetwork `json:"subnetworks,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListUsableSubnetworksResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LocalNvmeSsdBlockConfig: LocalNvmeSsdBlockConfig contains configuration for -// using raw-block local NVMe SSDs -type LocalNvmeSsdBlockConfig struct { - // 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. 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 - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalSsdCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocalNvmeSsdBlockConfig) MarshalJSON() ([]byte, error) { - type NoMethod LocalNvmeSsdBlockConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingComponentConfig: LoggingComponentConfig is cluster logging component -// configuration. -type LoggingComponentConfig struct { - // EnableComponents: Select components to collect logs. An empty set would - // disable all logging. - // - // Possible values: - // "COMPONENT_UNSPECIFIED" - Default value. This shouldn't be used. - // "SYSTEM_COMPONENTS" - system components - // "WORKLOADS" - workloads - // "APISERVER" - kube-apiserver - // "SCHEDULER" - kube-scheduler - // "CONTROLLER_MANAGER" - kube-controller-manager - // "KCP_SSHD" - kcp-sshd - // "KCP_CONNECTION" - kcp connection logs - // "KCP_HPA" - horizontal pod autoscaler decision logs - EnableComponents []string `json:"enableComponents,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableComponents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableComponents") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingComponentConfig) MarshalJSON() ([]byte, error) { - type NoMethod LoggingComponentConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingConfig: LoggingConfig is cluster logging configuration. -type LoggingConfig struct { - // ComponentConfig: Logging components configuration - ComponentConfig *LoggingComponentConfig `json:"componentConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ComponentConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ComponentConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod LoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingVariantConfig: LoggingVariantConfig specifies the behaviour of the -// logging component. -type LoggingVariantConfig struct { - // Variant: Logging variant deployed on nodes. - // - // Possible values: - // "VARIANT_UNSPECIFIED" - Default value. This shouldn't be used. - // "DEFAULT" - default logging variant. - // "MAX_THROUGHPUT" - maximum logging throughput variant. - Variant string `json:"variant,omitempty"` - // ForceSendFields is a list of field names (e.g. "Variant") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Variant") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingVariantConfig) MarshalJSON() ([]byte, error) { - type NoMethod LoggingVariantConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LustreCsiDriverConfig: Configuration for the Lustre CSI driver. -type LustreCsiDriverConfig struct { - // EnableLegacyLustrePort: If set to true, the Lustre CSI driver will install - // Lustre kernel modules using port 6988. This serves as a workaround for a - // port conflict with the gke-metadata-server. This field is required ONLY - // under the following conditions: 1. The GKE node version is older than - // 1.33.2-gke.4655000. 2. You're connecting to a Lustre instance that has the - // 'gke-support-enabled' flag. Deprecated: This flag is no longer required as - // of GKE node version 1.33.2-gke.4655000, unless you are connecting to a - // Lustre instance that has the `gke-support-enabled` flag. - EnableLegacyLustrePort bool `json:"enableLegacyLustrePort,omitempty"` - // Enabled: Whether the Lustre CSI driver is enabled for this cluster. - Enabled bool `json:"enabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableLegacyLustrePort") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableLegacyLustrePort") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LustreCsiDriverConfig) MarshalJSON() ([]byte, error) { - type NoMethod LustreCsiDriverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MaintenanceExclusionOptions: Represents the Maintenance exclusion option. -type MaintenanceExclusionOptions struct { - // EndTimeBehavior: EndTimeBehavior specifies the behavior of the exclusion end - // time. - // - // Possible values: - // "END_TIME_BEHAVIOR_UNSPECIFIED" - END_TIME_BEHAVIOR_UNSPECIFIED is the - // default behavior, which is fixed end time. - // "UNTIL_END_OF_SUPPORT" - UNTIL_END_OF_SUPPORT means the exclusion will be - // in effect until the end of the support of the cluster's current version. - EndTimeBehavior string `json:"endTimeBehavior,omitempty"` - // Scope: Scope specifies the upgrade scope which upgrades are blocked by the - // exclusion. - // - // Possible values: - // "NO_UPGRADES" - NO_UPGRADES excludes all upgrades, including patch - // upgrades and minor upgrades across control planes and nodes. This is the - // default exclusion behavior. - // "NO_MINOR_UPGRADES" - NO_MINOR_UPGRADES excludes all minor upgrades for - // the cluster, only patches are allowed. - // "NO_MINOR_OR_NODE_UPGRADES" - NO_MINOR_OR_NODE_UPGRADES excludes all minor - // upgrades for the cluster, and also exclude all node pool upgrades. Only - // control plane patches are allowed. - Scope string `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTimeBehavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTimeBehavior") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MaintenanceExclusionOptions) MarshalJSON() ([]byte, error) { - type NoMethod MaintenanceExclusionOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MaintenancePolicy: MaintenancePolicy defines the maintenance policy to be -// used for the cluster. -type MaintenancePolicy struct { - // ResourceVersion: A hash identifying the version of this policy, so that - // updates to fields of the policy won't accidentally undo intermediate changes - // (and so that users of the API unaware of some fields won't accidentally - // remove other fields). Make a `get()` request to the cluster to get the - // current resource version and include it with requests to set the policy. - ResourceVersion string `json:"resourceVersion,omitempty"` - // Window: Specifies the maintenance window in which maintenance may be - // performed. - Window *MaintenanceWindow `json:"window,omitempty"` - // ForceSendFields is a list of field names (e.g. "ResourceVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResourceVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MaintenancePolicy) MarshalJSON() ([]byte, error) { - type NoMethod MaintenancePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MaintenanceWindow: MaintenanceWindow defines the maintenance window to be -// used for the cluster. -type MaintenanceWindow struct { - // DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily maintenance - // operation window. - DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"` - // MaintenanceExclusions: Exceptions to maintenance window. Non-emergency - // maintenance should not occur in these windows. - MaintenanceExclusions map[string]TimeWindow `json:"maintenanceExclusions,omitempty"` - // RecurringWindow: RecurringWindow specifies some number of recurring time - // periods for maintenance to occur. The time windows may be overlapping. If no - // maintenance windows are set, maintenance can occur at any time. - RecurringWindow *RecurringTimeWindow `json:"recurringWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "DailyMaintenanceWindow") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DailyMaintenanceWindow") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MaintenanceWindow) MarshalJSON() ([]byte, error) { - type NoMethod MaintenanceWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedPrometheusConfig: ManagedPrometheusConfig defines the configuration -// for Google Cloud Managed Service for Prometheus. -type ManagedPrometheusConfig struct { - // AutoMonitoringConfig: GKE Workload Auto-Monitoring Configuration. - AutoMonitoringConfig *AutoMonitoringConfig `json:"autoMonitoringConfig,omitempty"` - // Enabled: Enable Managed Collection. - Enabled bool `json:"enabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoMonitoringConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoMonitoringConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedPrometheusConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MasterAuth: The authentication information for accessing the master -// endpoint. Authentication can be done using HTTP basic auth or using client -// certificates. -type MasterAuth struct { - // ClientCertificate: Output only. Base64-encoded public certificate used by - // clients to authenticate to the cluster endpoint. Issued only if - // client_certificate_config is set. - ClientCertificate string `json:"clientCertificate,omitempty"` - // ClientCertificateConfig: Configuration for client certificate authentication - // on the cluster. For clusters before v1.12, if no configuration is specified, - // a client certificate is issued. - ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` - // ClientKey: Output only. Base64-encoded private key used by clients to - // authenticate to the cluster endpoint. - ClientKey string `json:"clientKey,omitempty"` - // ClusterCaCertificate: Output only. Base64-encoded public certificate that is - // the root of trust for the cluster. - ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` - // Password: The password to use for HTTP basic authentication to the master - // endpoint. Because the master endpoint is open to the Internet, you should - // create a strong password. If a password is provided for cluster creation, - // username must be non-empty. Warning: basic authentication is deprecated, and - // will be removed in GKE control plane versions 1.19 and newer. For a list of - // recommended authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - Password string `json:"password,omitempty"` - // Username: The username to use for HTTP basic authentication to the master - // endpoint. For clusters v1.6.0 and later, basic authentication can be - // disabled by leaving username unspecified (or setting it to the empty - // string). Warning: basic authentication is deprecated, and will be removed in - // GKE control plane versions 1.19 and newer. For a list of recommended - // authentication methods, see: - // https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication - Username string `json:"username,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClientCertificate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientCertificate") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MasterAuth) MarshalJSON() ([]byte, error) { - type NoMethod MasterAuth - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MasterAuthorizedNetworksConfig: Configuration options for the master -// authorized networks feature. Enabled master authorized networks will -// disallow all external traffic to access Kubernetes master through HTTPS -// except traffic from the given CIDR blocks, Google Compute Engine Public IPs -// and Google Prod IPs. -type MasterAuthorizedNetworksConfig struct { - // CidrBlocks: cidr_blocks define up to 50 external networks that could access - // Kubernetes master through HTTPS. - CidrBlocks []*CidrBlock `json:"cidrBlocks,omitempty"` - // Enabled: Whether or not master authorized networks is enabled. - Enabled bool `json:"enabled,omitempty"` - // GcpPublicCidrsAccessEnabled: Whether master is accessible via Google Compute - // Engine Public IP addresses. - GcpPublicCidrsAccessEnabled bool `json:"gcpPublicCidrsAccessEnabled,omitempty"` - // PrivateEndpointEnforcementEnabled: Whether master authorized networks is - // enforced on private endpoint or not. - PrivateEndpointEnforcementEnabled bool `json:"privateEndpointEnforcementEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "CidrBlocks") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CidrBlocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { - type NoMethod MasterAuthorizedNetworksConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MaxPodsConstraint: Constraints applied to pods. -type MaxPodsConstraint struct { - // MaxPodsPerNode: Constraint enforced on the max num of pods per node. - MaxPodsPerNode int64 `json:"maxPodsPerNode,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxPodsPerNode") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MaxPodsConstraint) MarshalJSON() ([]byte, error) { - type NoMethod MaxPodsConstraint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MemoryManager: The option enables the Kubernetes NUMA-aware Memory Manager -// feature. Detailed description about the feature can be found here -// (https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/). -type MemoryManager struct { - // Policy: Controls the memory management policy on the Node. See - // https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#policies - // The following values are allowed. * "none" * "static" The default value is - // 'none' if unspecified. - Policy string `json:"policy,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MemoryManager) MarshalJSON() ([]byte, error) { - type NoMethod MemoryManager - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MeshCertificates: Configuration for issuance of mTLS keys and certificates -// to Kubernetes pods. -type MeshCertificates struct { - // EnableCertificates: enable_certificates controls issuance of workload mTLS - // certificates. If set, the GKE Workload Identity Certificates controller and - // node agent will be deployed in the cluster, which can then be configured by - // creating a WorkloadCertificateConfig Custom Resource. Requires Workload - // Identity (workload_pool must be non-empty). - EnableCertificates bool `json:"enableCertificates,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableCertificates") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableCertificates") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MeshCertificates) MarshalJSON() ([]byte, error) { - type NoMethod MeshCertificates - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Metric: Progress metric is (string, int|float|string) pair. -type Metric struct { - // DoubleValue: For metrics with floating point value. - DoubleValue float64 `json:"doubleValue,omitempty"` - // IntValue: For metrics with integer value. - IntValue int64 `json:"intValue,omitempty,string"` - // Name: Required. Metric name, e.g., "nodes total", "percent done". - Name string `json:"name,omitempty"` - // StringValue: For metrics with custom values (ratios, visual progress, etc.). - StringValue string `json:"stringValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "DoubleValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DoubleValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Metric) MarshalJSON() ([]byte, error) { - type NoMethod Metric - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Metric) UnmarshalJSON(data []byte) error { - type NoMethod Metric - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -// MonitoringComponentConfig: MonitoringComponentConfig is cluster monitoring -// component configuration. -type MonitoringComponentConfig struct { - // EnableComponents: Select components to collect metrics. An empty set would - // disable all monitoring. - // - // Possible values: - // "COMPONENT_UNSPECIFIED" - Default value. This shouldn't be used. - // "SYSTEM_COMPONENTS" - system components - // "APISERVER" - kube-apiserver - // "SCHEDULER" - kube-scheduler - // "CONTROLLER_MANAGER" - kube-controller-manager - // "STORAGE" - Storage - // "HPA" - Horizontal Pod Autoscaling - // "POD" - Pod - // "DAEMONSET" - DaemonSet - // "DEPLOYMENT" - Deployment - // "STATEFULSET" - Statefulset - // "CADVISOR" - CADVISOR - // "KUBELET" - KUBELET - // "DCGM" - NVIDIA Data Center GPU Manager (DCGM) - // "JOBSET" - JobSet - EnableComponents []string `json:"enableComponents,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableComponents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableComponents") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MonitoringComponentConfig) MarshalJSON() ([]byte, error) { - type NoMethod MonitoringComponentConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MonitoringConfig: MonitoringConfig is cluster monitoring configuration. -type MonitoringConfig struct { - // AdvancedDatapathObservabilityConfig: Configuration of Advanced Datapath - // Observability features. - AdvancedDatapathObservabilityConfig *AdvancedDatapathObservabilityConfig `json:"advancedDatapathObservabilityConfig,omitempty"` - // ComponentConfig: Monitoring components configuration - ComponentConfig *MonitoringComponentConfig `json:"componentConfig,omitempty"` - // ManagedPrometheusConfig: Enable Google Cloud Managed Service for Prometheus - // in the cluster. - ManagedPrometheusConfig *ManagedPrometheusConfig `json:"managedPrometheusConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdvancedDatapathObservabilityConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "AdvancedDatapathObservabilityConfig") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s MonitoringConfig) MarshalJSON() ([]byte, error) { - type NoMethod MonitoringConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkConfig: NetworkConfig reports the relative names of network & -// subnetwork. -type NetworkConfig struct { - // DatapathProvider: The desired datapath provider for this cluster. By - // default, uses the IPTables-based kube-proxy implementation. - // - // Possible values: - // "DATAPATH_PROVIDER_UNSPECIFIED" - Default value. - // "LEGACY_DATAPATH" - Use the IPTables implementation based on kube-proxy. - // "ADVANCED_DATAPATH" - Use the eBPF based GKE Dataplane V2 with additional - // features. See the [GKE Dataplane V2 - // documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/datapla - // ne-v2) for more. - DatapathProvider string `json:"datapathProvider,omitempty"` - // DefaultEnablePrivateNodes: Controls whether by default nodes have private IP - // addresses only. It is invalid to specify both - // PrivateClusterConfig.enablePrivateNodes and this field at the same time. To - // update the default setting, use - // ClusterUpdate.desired_default_enable_private_nodes - DefaultEnablePrivateNodes bool `json:"defaultEnablePrivateNodes,omitempty"` - // DefaultSnatStatus: Whether the cluster disables default in-node sNAT rules. - // In-node sNAT rules will be disabled when default_snat_status is disabled. - // When disabled is set to false, default IP masquerade rules will be applied - // to the nodes to prevent sNAT on cluster internal traffic. - DefaultSnatStatus *DefaultSnatStatus `json:"defaultSnatStatus,omitempty"` - // DisableL4LbFirewallReconciliation: Disable L4 load balancer VPC firewalls to - // enable firewall policies. - DisableL4LbFirewallReconciliation bool `json:"disableL4LbFirewallReconciliation,omitempty"` - // DnsConfig: DNSConfig contains clusterDNS config for this cluster. - DnsConfig *DNSConfig `json:"dnsConfig,omitempty"` - // EnableCiliumClusterwideNetworkPolicy: Whether CiliumClusterwideNetworkPolicy - // is enabled on this cluster. - EnableCiliumClusterwideNetworkPolicy bool `json:"enableCiliumClusterwideNetworkPolicy,omitempty"` - // EnableFqdnNetworkPolicy: Whether FQDN Network Policy is enabled on this - // cluster. - EnableFqdnNetworkPolicy bool `json:"enableFqdnNetworkPolicy,omitempty"` - // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled for this - // cluster. This makes same node pod to pod traffic visible for VPC network. - EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` - // EnableL4ilbSubsetting: Whether L4ILB Subsetting is enabled for this cluster. - EnableL4ilbSubsetting bool `json:"enableL4ilbSubsetting,omitempty"` - // EnableMultiNetworking: Whether multi-networking is enabled for this cluster. - EnableMultiNetworking bool `json:"enableMultiNetworking,omitempty"` - // GatewayApiConfig: GatewayAPIConfig contains the desired config of Gateway - // API on this cluster. - GatewayApiConfig *GatewayAPIConfig `json:"gatewayApiConfig,omitempty"` - // InTransitEncryptionConfig: Specify the details of in-transit encryption. Now - // named inter-node transparent 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#networks) to - // which the cluster is connected. Example: - // projects/my-project/global/networks/my-network - Network string `json:"network,omitempty"` - // NetworkPerformanceConfig: Network bandwidth tier configuration. - NetworkPerformanceConfig *ClusterNetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // PrivateIpv6GoogleAccess: The desired state of IPv6 connectivity to Google - // Services. By default, no private IPv6 access to or from Google Services (all - // access will be via IPv4) - // - // Possible values: - // "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - Default value. Same as DISABLED - // "PRIVATE_IPV6_GOOGLE_ACCESS_DISABLED" - No private access to or from - // Google Services - // "PRIVATE_IPV6_GOOGLE_ACCESS_TO_GOOGLE" - Enables private IPv6 access to - // Google Services from GKE - // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access - // to and from Google Services - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` - // ServiceExternalIpsConfig: ServiceExternalIPsConfig specifies if services - // with externalIPs field are blocked or not. - ServiceExternalIpsConfig *ServiceExternalIPsConfig `json:"serviceExternalIpsConfig,omitempty"` - // Subnetwork: Output only. The relative name of the Google Compute Engine - // subnetwork (https://cloud.google.com/compute/docs/vpc) to which the cluster - // is connected. Example: - // projects/my-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatapathProvider") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatapathProvider") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPerformanceConfig: Configuration of all network bandwidth tiers -type NetworkPerformanceConfig struct { - // TotalEgressBandwidthTier: Specifies the total network bandwidth tier for the - // NodePool. - // - // Possible values: - // "TIER_UNSPECIFIED" - Default value - // "TIER_1" - Higher bandwidth, actual values based on VM size. - TotalEgressBandwidthTier string `json:"totalEgressBandwidthTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalEgressBandwidthTier") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalEgressBandwidthTier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPerformanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicy: Configuration options for the NetworkPolicy feature. -// https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ -type NetworkPolicy struct { - // Enabled: Whether network policy is enabled on the cluster. - Enabled bool `json:"enabled,omitempty"` - // Provider: The selected network policy provider. - // - // Possible values: - // "PROVIDER_UNSPECIFIED" - Not set - // "CALICO" - Tigera (Calico Felix). - Provider string `json:"provider,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkPolicyConfig: Configuration for NetworkPolicy. This only tracks -// whether the addon is enabled or not on the Master, it does not track whether -// network policy is enabled for the nodes. -type NetworkPolicyConfig struct { - // Disabled: Whether NetworkPolicy is enabled for this cluster. - Disabled bool `json:"disabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkPolicyConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkTags: Collection of Compute Engine network tags that can be applied -// to a node's underlying VM instance. -type NetworkTags struct { - // Tags: List of network tags. - Tags []string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tags") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkTags) MarshalJSON() ([]byte, error) { - type NoMethod NetworkTags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkTierConfig: NetworkTierConfig contains network tier information. -type NetworkTierConfig struct { - // NetworkTier: Network tier configuration. - // - // Possible values: - // "NETWORK_TIER_UNSPECIFIED" - By default, use project-level configuration. - // When unspecified, the behavior defaults to NETWORK_TIER_DEFAULT. For cluster - // updates, this implies no action (no-op). - // "NETWORK_TIER_DEFAULT" - Default network tier. Use project-level - // configuration. User can specify this value, meaning they want to keep the - // same behaviour as before cluster level network tier configuration is - // introduced. This field ensures backward compatibility for the network tier - // of cluster resources, such as node pools and load balancers, for their - // external IP addresses. - // "NETWORK_TIER_PREMIUM" - Premium network tier. - // "NETWORK_TIER_STANDARD" - Standard network tier. - NetworkTier string `json:"networkTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkTier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkTier") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkTierConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkTierConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeAffinity: Specifies the NodeAffinity key, values, and affinity operator -// according to shared sole tenant node group affinities -// (https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity). -type NodeAffinity struct { - // Key: Key for NodeAffinity. - Key string `json:"key,omitempty"` - // Operator: Operator for NodeAffinity. - // - // Possible values: - // "OPERATOR_UNSPECIFIED" - Invalid or unspecified affinity operator. - // "IN" - Affinity operator. - // "NOT_IN" - Anti-affinity operator. - Operator string `json:"operator,omitempty"` - // Values: Values for NodeAffinity. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeAffinity) MarshalJSON() ([]byte, error) { - type NoMethod NodeAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeConfig: Parameters that describe the nodes in a cluster. GKE Autopilot -// clusters do not recognize parameters in `NodeConfig`. Use -// AutoprovisioningNodePoolDefaults instead. -type NodeConfig struct { - // Accelerators: A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // AdvancedMachineFeatures: Advanced features for the Compute Engine VM. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // BootDisk: The boot disk configuration for the node pool. - BootDisk *BootDisk `json:"bootDisk,omitempty"` - // BootDiskKmsKey: The Customer Managed Encryption Key used to encrypt the - // boot disk attached to each node in the node pool. This should be of the form - // projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKey - // s/[KEY_NAME]. For more information about protecting resources with Cloud KMS - // Keys please see: - // https://cloud.google.com/compute/docs/disks/customer-managed-encryption - BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"` - // ConfidentialNodes: Confidential nodes config. All the nodes in the node pool - // will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` - // ContainerdConfig: Parameters for containerd customization. - ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` - // DiskSizeGb: Size of the disk attached to each node, specified in GB. The - // smallest allowed disk size is 10GB. If unspecified, the default disk size is - // 100GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // DiskType: Type of the disk attached to each node (e.g. 'pd-standard', - // 'pd-ssd' or 'pd-balanced') If unspecified, the default disk type is - // 'pd-standard' - DiskType string `json:"diskType,omitempty"` - // EffectiveCgroupMode: Output only. effective_cgroup_mode is the cgroup mode - // actually used by the node pool. It is determined by the cgroup mode - // specified in the LinuxNodeConfig or the default cgroup mode based on the - // cluster creation version. - // - // Possible values: - // "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" - EFFECTIVE_CGROUP_MODE_UNSPECIFIED - // means the cgroup configuration for the node pool is unspecified, i.e. the - // node pool is a Windows node pool. - // "EFFECTIVE_CGROUP_MODE_V1" - CGROUP_MODE_V1 means the node pool is - // configured to use cgroupv1 for the cgroup configuration. - // "EFFECTIVE_CGROUP_MODE_V2" - CGROUP_MODE_V2 means the node pool is - // configured to use cgroupv2 for the cgroup configuration. - EffectiveCgroupMode string `json:"effectiveCgroupMode,omitempty"` - // EnableConfidentialStorage: Optional. Reserved for future use. - EnableConfidentialStorage bool `json:"enableConfidentialStorage,omitempty"` - // EphemeralStorageLocalSsdConfig: Parameters for the node ephemeral storage - // using Local SSDs. If unspecified, ephemeral storage is backed by the boot - // disk. - EphemeralStorageLocalSsdConfig *EphemeralStorageLocalSsdConfig `json:"ephemeralStorageLocalSsdConfig,omitempty"` - // FastSocket: Enable or disable NCCL fast socket for the node pool. - FastSocket *FastSocket `json:"fastSocket,omitempty"` - // FlexStart: Flex Start flag for enabling Flex Start VM. - FlexStart bool `json:"flexStart,omitempty"` - // GcfsConfig: Google Container File System (image streaming) configs. - GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` - // Gvnic: Enable or disable gvnic in the node pool. - Gvnic *VirtualNIC `json:"gvnic,omitempty"` - // ImageType: The image type to use for this node. Note that for a given image - // type, the latest version of it will be used. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - ImageType string `json:"imageType,omitempty"` - // KubeletConfig: Node kubelet configs. - KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"` - // Labels: The map of Kubernetes labels (key/value pairs) to be applied to each - // node. These will added in addition to any default label(s) that Kubernetes - // may apply to the node. In case of conflict in label keys, the applied set - // may differ depending on the Kubernetes version -- it's best to assume the - // behavior is undefined and conflicts should be avoided. For more information, - // including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - Labels map[string]string `json:"labels,omitempty"` - // LinuxNodeConfig: Parameters that can be configured on Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"` - // LocalNvmeSsdBlockConfig: Parameters for using raw-block Local NVMe SSDs. - LocalNvmeSsdBlockConfig *LocalNvmeSsdBlockConfig `json:"localNvmeSsdBlockConfig,omitempty"` - // LocalSsdCount: The number of local 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. - LocalSsdCount int64 `json:"localSsdCount,omitempty"` - // LocalSsdEncryptionMode: Specifies which method should be used for encrypting - // the Local SSDs attached to the node. - // - // Possible values: - // "LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED" - The given node will be encrypted - // using keys managed by Google infrastructure and the keys will be deleted - // when the node is deleted. - // "STANDARD_ENCRYPTION" - The given node will be encrypted using keys - // managed by Google infrastructure and the keys will be deleted when the node - // is deleted. - // "EPHEMERAL_KEY_ENCRYPTION" - The given node will opt-in for using - // ephemeral key for encryption of Local SSDs. The Local SSDs will not be able - // to recover data in case of node crash. - LocalSsdEncryptionMode string `json:"localSsdEncryptionMode,omitempty"` - // LoggingConfig: Logging configuration. - LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` - // MachineType: The name of a Google Compute Engine machine type - // (https://cloud.google.com/compute/docs/machine-types) If unspecified, the - // default machine type is `e2-medium`. - MachineType string `json:"machineType,omitempty"` - // MaxRunDuration: The maximum duration for the nodes to exist. If unspecified, - // the nodes can exist indefinitely. - MaxRunDuration string `json:"maxRunDuration,omitempty"` - // Metadata: The metadata key/value pairs assigned to instances in the cluster. - // Keys must conform to the regexp `[a-zA-Z0-9-_]+` and be less than 128 bytes - // in length. These are reflected as part of a URL in the metadata server. - // Additionally, to avoid ambiguity, keys must not conflict with any other - // metadata keys for the project or be one of the reserved keys: - - // "cluster-location" - "cluster-name" - "cluster-uid" - "configure-sh" - - // "containerd-configure-sh" - "enable-os-login" - "gci-ensure-gke-docker" - - // "gci-metrics-enabled" - "gci-update-strategy" - "instance-template" - - // "kube-env" - "startup-script" - "user-data" - "disable-address-manager" - - // "windows-startup-script-ps1" - "common-psm1" - "k8s-node-setup-psm1" - - // "install-ssh-psm1" - "user-profile-psm1" Values are free-form strings, and - // only have meaning as interpreted by the image running in the instance. The - // only restriction placed on them is that each value's size must be less than - // or equal to 32 KB. The total size of all keys and values must be less than - // 512 KB. - Metadata map[string]string `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum CPU platform to be used by this instance. The - // instance may be scheduled on the specified or newer CPU platform. Applicable - // values are the friendly names of CPU platforms, such as `minCpuPlatform: - // "Intel Haswell" or `minCpuPlatform: "Intel Sandy Bridge". For more - // information, read how to specify min CPU platform - // (https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` - // NodeGroup: Setting this field will assign instances of this pool to run on - // the specified node group. This is useful for running workloads on sole - // tenant nodes - // (https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). - NodeGroup string `json:"nodeGroup,omitempty"` - // OauthScopes: The set of Google API scopes to be made available on all of the - // node VMs under the "default" service account. The following scopes are - // recommended, but not required, and by default are not included: * - // `https://www.googleapis.com/auth/compute` is required for mounting - // persistent storage on your nodes. * - // `https://www.googleapis.com/auth/devstorage.read_only` is required for - // communicating with **gcr.io** (the Artifact Registry - // (https://cloud.google.com/artifact-registry/)). If unspecified, no scopes - // are added, unless Cloud Logging or Cloud Monitoring are enabled, in which - // case their required scopes will be added. - OauthScopes []string `json:"oauthScopes,omitempty"` - // Preemptible: Whether the nodes are created as preemptible VM instances. See: - // https://cloud.google.com/compute/docs/instances/preemptible for more - // information about preemptible VM instances. - Preemptible bool `json:"preemptible,omitempty"` - // ReservationAffinity: The optional reservation affinity. Setting this field - // will apply the specified Zonal Compute Reservation - // (https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - // to this node pool. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` - // ResourceLabels: The resource labels for the node pool to use to annotate any - // related Google Compute Engine resources. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - // ResourceManagerTags: A map of resource manager tag keys and values to be - // attached to the nodes. - ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` - // SandboxConfig: Sandbox configuration for this node. - SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` - // SecondaryBootDiskUpdateStrategy: Secondary boot disk update strategy. - SecondaryBootDiskUpdateStrategy *SecondaryBootDiskUpdateStrategy `json:"secondaryBootDiskUpdateStrategy,omitempty"` - // SecondaryBootDisks: List of secondary boot disks attached to the nodes. - SecondaryBootDisks []*SecondaryBootDisk `json:"secondaryBootDisks,omitempty"` - // ServiceAccount: The Google Cloud Platform Service Account to be used by the - // node VMs. Specify the email address of the Service Account; otherwise, if no - // Service Account is specified, the "default" service account is used. - ServiceAccount string `json:"serviceAccount,omitempty"` - // ShieldedInstanceConfig: Shielded Instance options. - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - // SoleTenantConfig: Parameters for node pools to be backed by shared sole - // tenant node groups. - SoleTenantConfig *SoleTenantConfig `json:"soleTenantConfig,omitempty"` - // Spot: Spot flag for enabling Spot VM, which is a rebrand of the existing - // preemptible flag. - Spot bool `json:"spot,omitempty"` - // StoragePools: List of Storage Pools where boot disks are provisioned. - StoragePools []string `json:"storagePools,omitempty"` - // Tags: The list of instance tags applied to all nodes. Tags are used to - // identify valid sources or targets for network firewalls and are specified by - // the client during cluster or node pool creation. Each tag within the list - // must comply with RFC1035. - Tags []string `json:"tags,omitempty"` - // Taints: List of kubernetes taints to be applied to each node. For more - // information, including usage and the valid values, see: - // https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - Taints []*NodeTaint `json:"taints,omitempty"` - // WindowsNodeConfig: Parameters that can be configured on Windows nodes. - WindowsNodeConfig *WindowsNodeConfig `json:"windowsNodeConfig,omitempty"` - // WorkloadMetadataConfig: The workload metadata configuration for this node. - WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeConfigDefaults: Subset of NodeConfig message that has defaults. -type NodeConfigDefaults struct { - // ContainerdConfig: Parameters for containerd customization. - ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` - // GcfsConfig: GCFS (Google Container File System, also known as Riptide) - // options. - GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` - // LoggingConfig: Logging configuration for node pools. - LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` - // NodeKubeletConfig: NodeKubeletConfig controls the defaults for new - // node-pools. Currently only `insecure_kubelet_readonly_port_enabled` can be - // set here. - NodeKubeletConfig *NodeKubeletConfig `json:"nodeKubeletConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerdConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerdConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeConfigDefaults) MarshalJSON() ([]byte, error) { - type NoMethod NodeConfigDefaults - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeKernelModuleLoading: Configuration for kernel module loading on nodes. -type NodeKernelModuleLoading struct { - // Policy: Set the node module loading policy for nodes in the node pool. - // - // Possible values: - // "POLICY_UNSPECIFIED" - Default behavior. GKE selects the image based on - // node type. For CPU and TPU nodes, the image will not allow loading external - // kernel modules. For GPU nodes, the image will allow loading any module, - // whether it is signed or not. - // "ENFORCE_SIGNED_MODULES" - Enforced signature verification: Node pools - // will use a Container-Optimized OS image configured to allow loading of - // *Google-signed* external kernel modules. Loadpin is enabled but configured - // to exclude modules, and kernel module signature checking is enforced. - // "DO_NOT_ENFORCE_SIGNED_MODULES" - Mirrors existing DEFAULT behavior: For - // CPU and TPU nodes, the image will not allow loading external kernel modules. - // For GPU nodes, the image will allow loading any module, whether it is signed - // or not. - Policy string `json:"policy,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeKernelModuleLoading) MarshalJSON() ([]byte, error) { - type NoMethod NodeKernelModuleLoading - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeKubeletConfig: Node kubelet configs. -type NodeKubeletConfig struct { - // AllowedUnsafeSysctls: Optional. Defines a comma-separated allowlist of - // unsafe sysctls or sysctl patterns (ending in `*`). The unsafe namespaced - // sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`, - // and `net.*`. Leaving this allowlist empty means they cannot be set on Pods. - // To allow certain sysctls or sysctl patterns to be set on Pods, list them - // separated by commas. For example: `kernel.msg*,net.ipv4.route.min_pmtu`. See - // https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for more - // details. - AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` - // ContainerLogMaxFiles: Optional. Defines the maximum number of container log - // files that can be present for a container. See - // https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation - // The value must be an integer between 2 and 10, inclusive. The default value - // is 5 if unspecified. - ContainerLogMaxFiles int64 `json:"containerLogMaxFiles,omitempty"` - // ContainerLogMaxSize: Optional. Defines the maximum size of the container log - // file before it is rotated. See - // https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation - // Valid format is positive number + unit, e.g. 100Ki, 10Mi. Valid units are - // Ki, Mi, Gi. The value must be between 10Mi and 500Mi, inclusive. Note that - // the total container log size (container_log_max_size * - // container_log_max_files) cannot exceed 1% of the total storage of the node, - // to avoid disk pressure caused by log files. The default value is 10Mi if - // unspecified. - ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` - // CpuCfsQuota: Enable CPU CFS quota enforcement for containers that specify - // CPU limits. This option is enabled by default which makes kubelet use CFS - // quota (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to - // enforce container CPU limits. Otherwise, CPU limits will not be enforced at - // all. Disable this option to mitigate CPU throttling problems while still - // having your pods to be in Guaranteed QoS class by specifying the CPU limits. - // The default value is 'true' if unspecified. - CpuCfsQuota bool `json:"cpuCfsQuota,omitempty"` - // CpuCfsQuotaPeriod: Set the CPU CFS quota period value 'cpu.cfs_period_us'. - // The string must be a sequence of decimal numbers, each with optional - // fraction and a unit suffix, such as "300ms". Valid time units are "ns", "us" - // (or "µs"), "ms", "s", "m", "h". The value must be a positive duration - // between 1ms and 1 second, inclusive. - CpuCfsQuotaPeriod string `json:"cpuCfsQuotaPeriod,omitempty"` - // CpuManagerPolicy: Control the CPU management policy on the node. See - // https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ - // The following values are allowed. * "none": the default, which represents - // the existing scheduling behavior. * "static": allows pods with certain - // resource characteristics to be granted increased CPU affinity and - // exclusivity on the node. The default value is 'none' if unspecified. - CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty"` - // EvictionMaxPodGracePeriodSeconds: Optional. - // eviction_max_pod_grace_period_seconds is the maximum allowed grace period - // (in seconds) to use when terminating pods in response to a soft eviction - // threshold being met. This value effectively caps the Pod's - // terminationGracePeriodSeconds value during soft evictions. Default: 0. - // Range: [0, 300]. - EvictionMaxPodGracePeriodSeconds int64 `json:"evictionMaxPodGracePeriodSeconds,omitempty"` - // EvictionMinimumReclaim: Optional. eviction_minimum_reclaim is a map of - // signal names to quantities that defines minimum reclaims, which describe the - // minimum amount of a given resource the kubelet will reclaim when performing - // a pod eviction while that resource is under pressure. - EvictionMinimumReclaim *EvictionMinimumReclaim `json:"evictionMinimumReclaim,omitempty"` - // EvictionSoft: Optional. eviction_soft is a map of signal names to quantities - // that defines soft eviction thresholds. Each signal is compared to its - // corresponding threshold to determine if a pod eviction should occur. - EvictionSoft *EvictionSignals `json:"evictionSoft,omitempty"` - // EvictionSoftGracePeriod: Optional. eviction_soft_grace_period is a map of - // signal names to quantities that defines grace periods for each soft eviction - // signal. The grace period is the amount of time that a pod must be under - // pressure before an eviction occurs. - EvictionSoftGracePeriod *EvictionGracePeriod `json:"evictionSoftGracePeriod,omitempty"` - // ImageGcHighThresholdPercent: Optional. Defines the percent of disk usage - // after which image garbage collection is always run. The percent is - // calculated as this field value out of 100. The value must be between 10 and - // 85, inclusive and greater than image_gc_low_threshold_percent. The default - // value is 85 if unspecified. - ImageGcHighThresholdPercent int64 `json:"imageGcHighThresholdPercent,omitempty"` - // ImageGcLowThresholdPercent: Optional. Defines the percent of disk usage - // before which image garbage collection is never run. Lowest disk usage to - // garbage collect to. The percent is calculated as this field value out of - // 100. The value must be between 10 and 85, inclusive and smaller than - // image_gc_high_threshold_percent. The default value is 80 if unspecified. - ImageGcLowThresholdPercent int64 `json:"imageGcLowThresholdPercent,omitempty"` - // ImageMaximumGcAge: Optional. Defines the maximum age an image can be unused - // before it is garbage collected. The string must be a sequence of decimal - // numbers, each with optional fraction and a unit suffix, such as "300s", - // "1.5h", and "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", - // "m", "h". The value must be a positive duration greater than - // image_minimum_gc_age or "0s". The default value is "0s" if unspecified, - // which disables this field, meaning images won't be garbage collected based - // on being unused for too long. - ImageMaximumGcAge string `json:"imageMaximumGcAge,omitempty"` - // ImageMinimumGcAge: Optional. Defines the minimum age for an unused image - // before it is garbage collected. The string must be a sequence of decimal - // numbers, each with optional fraction and a unit suffix, such as "300s", - // "1.5h", and "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", - // "m", "h". The value must be a positive duration less than or equal to 2 - // minutes. The default value is "2m0s" if unspecified. - ImageMinimumGcAge string `json:"imageMinimumGcAge,omitempty"` - // InsecureKubeletReadonlyPortEnabled: Enable or disable Kubelet read only - // port. - InsecureKubeletReadonlyPortEnabled bool `json:"insecureKubeletReadonlyPortEnabled,omitempty"` - // MaxParallelImagePulls: Optional. Defines the maximum number of image pulls - // in parallel. The range is 2 to 5, inclusive. The default value is 2 or 3 - // depending on the disk type. See - // https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls - // for more details. - MaxParallelImagePulls int64 `json:"maxParallelImagePulls,omitempty"` - // MemoryManager: Optional. Controls NUMA-aware Memory Manager configuration on - // the node. For more information, see: - // https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/ - MemoryManager *MemoryManager `json:"memoryManager,omitempty"` - // PodPidsLimit: Set the Pod PID limits. See - // https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits - // Controls the maximum number of processes allowed to run in a pod. The value - // must be greater than or equal to 1024 and less than 4194304. - PodPidsLimit int64 `json:"podPidsLimit,omitempty,string"` - // SingleProcessOomKill: Optional. Defines whether to enable single process OOM - // killer. If true, will prevent the memory.oom.group flag from being set for - // container cgroups in cgroups v2. This causes processes in the container to - // be OOM killed individually instead of as a group. - SingleProcessOomKill bool `json:"singleProcessOomKill,omitempty"` - // TopologyManager: Optional. Controls Topology Manager configuration on the - // node. For more information, see: - // https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ - TopologyManager *TopologyManager `json:"topologyManager,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowedUnsafeSysctls") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowedUnsafeSysctls") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeKubeletConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodeKubeletConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeLabels: Collection of node-level Kubernetes labels -// (https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). -type NodeLabels struct { - // Labels: Map of node label keys and node label values. - Labels map[string]string `json:"labels,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeLabels) MarshalJSON() ([]byte, error) { - type NoMethod NodeLabels - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeManagement: NodeManagement defines the set of node management services -// turned on for the node pool. -type NodeManagement struct { - // AutoRepair: A flag that specifies whether the node auto-repair is enabled - // for the node pool. If enabled, the nodes in this node pool will be monitored - // and, if they fail health checks too many times, an automatic repair action - // will be triggered. - AutoRepair bool `json:"autoRepair,omitempty"` - // AutoUpgrade: A flag that specifies whether node auto-upgrade is enabled for - // the node pool. If enabled, node auto-upgrade helps keep the nodes in your - // node pool up to date with the latest release version of Kubernetes. - AutoUpgrade bool `json:"autoUpgrade,omitempty"` - // UpgradeOptions: Specifies the Auto Upgrade knobs for the node pool. - UpgradeOptions *AutoUpgradeOptions `json:"upgradeOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoRepair") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoRepair") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeManagement) MarshalJSON() ([]byte, error) { - type NoMethod NodeManagement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeNetworkConfig: Parameters for node pool-level network config. -type NodeNetworkConfig struct { - // AdditionalNodeNetworkConfigs: We specify the additional node networks for - // this node pool using this list. Each node network corresponds to an - // additional interface - AdditionalNodeNetworkConfigs []*AdditionalNodeNetworkConfig `json:"additionalNodeNetworkConfigs,omitempty"` - // AdditionalPodNetworkConfigs: We specify the additional pod networks for this - // node pool using this list. Each pod network corresponds to an additional - // alias IP range for the node - AdditionalPodNetworkConfigs []*AdditionalPodNetworkConfig `json:"additionalPodNetworkConfigs,omitempty"` - // CreatePodRange: Input only. Whether to create a new range for pod IPs in - // this node pool. Defaults are provided for `pod_range` and - // `pod_ipv4_cidr_block` if they are not specified. If neither - // `create_pod_range` or `pod_range` are specified, the cluster-level default - // (`ip_allocation_policy.cluster_ipv4_cidr_block`) is used. Only applicable if - // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed - // after the node pool has been created. - CreatePodRange bool `json:"createPodRange,omitempty"` - // EnablePrivateNodes: Whether nodes have internal IP addresses only. If - // enable_private_nodes is not specified, then the value is derived from - // Cluster.NetworkConfig.default_enable_private_nodes - EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` - // NetworkPerformanceConfig: Network bandwidth tier configuration. - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` - // NetworkTierConfig: Output only. The network tier configuration for the node - // pool inherits from the cluster-level configuration and remains immutable - // throughout the node pool's lifecycle, including during upgrades. - NetworkTierConfig *NetworkTierConfig `json:"networkTierConfig,omitempty"` - // PodCidrOverprovisionConfig: [PRIVATE FIELD] Pod CIDR size overprovisioning - // config for the nodepool. Pod CIDR size per node depends on - // max_pods_per_node. By default, the value of max_pods_per_node is rounded off - // to next power of 2 and we then double that to get the size of pod CIDR block - // per node. Example: max_pods_per_node of 30 would result in 64 IPs (/26). - // This config can disable the doubling of IPs (we still round off to next - // power of 2) Example: max_pods_per_node of 30 will result in 32 IPs (/27) - // when overprovisioning is disabled. - PodCidrOverprovisionConfig *PodCIDROverprovisionConfig `json:"podCidrOverprovisionConfig,omitempty"` - // PodIpv4CidrBlock: The IP address range for pod IPs in this node pool. Only - // applicable if `create_pod_range` is true. Set to blank to have a range - // chosen with the default size. Set to /netmask (e.g. `/14`) to have a range - // chosen with a specific netmask. Set to a CIDR - // (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation - // (e.g. `10.96.0.0/14`) to pick a specific range to use. Only applicable if - // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed - // after the node pool has been created. - PodIpv4CidrBlock string `json:"podIpv4CidrBlock,omitempty"` - // PodIpv4RangeUtilization: Output only. The utilization of the IPv4 range for - // the pod. The ratio is Usage/[Total number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. - PodIpv4RangeUtilization float64 `json:"podIpv4RangeUtilization,omitempty"` - // PodRange: The ID of the secondary range for pod IPs. If `create_pod_range` - // is true, this ID is used for the new range. If `create_pod_range` is false, - // uses an existing secondary range with this ID. Only applicable if - // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed - // after the node pool has been created. - PodRange string `json:"podRange,omitempty"` - // Subnetwork: Output only. The subnetwork path for the node pool. Format: - // projects/{project}/regions/{region}/subnetworks/{subnetwork} If the cluster - // is associated with multiple subnetworks, the subnetwork for the node pool is - // picked based on the IP utilization during node pool creation and is - // immutable. - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AdditionalNodeNetworkConfigs") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalNodeNetworkConfigs") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeNetworkConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodeNetworkConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *NodeNetworkConfig) UnmarshalJSON(data []byte) error { - type NoMethod NodeNetworkConfig - var s1 struct { - PodIpv4RangeUtilization gensupport.JSONFloat64 `json:"podIpv4RangeUtilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PodIpv4RangeUtilization = float64(s1.PodIpv4RangeUtilization) - return nil -} - -// NodePool: NodePool contains the name and configuration for a cluster's node -// pool. Node pools are a set of nodes (i.e. VM's), with a common configuration -// and specification, under the control of the cluster master. They may have a -// set of Kubernetes labels applied to them, which may be used to reference -// them during pod scheduling. They may also be resized up or down, to -// accommodate the workload. -type NodePool struct { - // AutopilotConfig: Specifies the autopilot configuration for this node pool. - // This field is exclusively reserved for Cluster Autoscaler. - AutopilotConfig *AutopilotConfig `json:"autopilotConfig,omitempty"` - // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler is - // enabled only if a valid configuration is present. - Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` - // BestEffortProvisioning: Enable best effort provisioning for nodes - BestEffortProvisioning *BestEffortProvisioning `json:"bestEffortProvisioning,omitempty"` - // Conditions: Which conditions caused the current node pool state. - Conditions []*StatusCondition `json:"conditions,omitempty"` - // Config: The node configuration of the pool. - Config *NodeConfig `json:"config,omitempty"` - // Etag: This checksum is computed by the server based on the value of node - // pool fields, and may be sent on update requests to ensure the client has an - // up-to-date value before proceeding. - Etag string `json:"etag,omitempty"` - // InitialNodeCount: The initial node count for the pool. You must ensure that - // your Compute Engine resource quota (https://cloud.google.com/compute/quotas) - // is sufficient for this number of instances. You must also have available - // firewall and routes quota. - InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: Output only. The resource URLs of the managed instance - // groups - // (https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with this node pool. During the node pool blue-green upgrade - // operation, the URLs contain both blue and green resources. - InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` - // Locations: The list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes should be located. If this value is unspecified during node - // pool creation, the Cluster.Locations - // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) - // value will be used, instead. Warning: changing node pool locations will - // result in nodes being added and/or removed. - Locations []string `json:"locations,omitempty"` - // Management: NodeManagement configuration for this NodePool. - Management *NodeManagement `json:"management,omitempty"` - // MaxPodsConstraint: The constraint on the maximum number of pods that can be - // run simultaneously on a node in the node pool. - MaxPodsConstraint *MaxPodsConstraint `json:"maxPodsConstraint,omitempty"` - // Name: The name of the node pool. - Name string `json:"name,omitempty"` - // NetworkConfig: Networking configuration for this NodePool. If specified, it - // overrides the cluster-level defaults. - NetworkConfig *NodeNetworkConfig `json:"networkConfig,omitempty"` - // PlacementPolicy: Specifies the node placement policy. - PlacementPolicy *PlacementPolicy `json:"placementPolicy,omitempty"` - // PodIpv4CidrSize: Output only. The pod CIDR block size per node in this node - // pool. - PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` - // QueuedProvisioning: Specifies the configuration of queued provisioning. - QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` - // SelfLink: Output only. Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - // Status: Output only. The status of the nodes in this pool instance. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PROVISIONING" - The PROVISIONING state indicates the node pool is being - // created. - // "RUNNING" - The RUNNING state indicates the node pool has been created and - // is fully usable. - // "RUNNING_WITH_ERROR" - The RUNNING_WITH_ERROR state indicates the node - // pool has been created and is partially usable. Some error state has occurred - // and some functionality may be impaired. Customer may need to reissue a - // request or trigger a new update. - // "RECONCILING" - The RECONCILING state indicates that some work is actively - // being done on the node pool, such as upgrading node software. Details can be - // found in the `statusMessage` field. - // "STOPPING" - The STOPPING state indicates the node pool is being deleted. - // "ERROR" - The ERROR state indicates the node pool may be unusable. Details - // can be found in the `statusMessage` field. - Status string `json:"status,omitempty"` - // StatusMessage: Output only. Deprecated. Use conditions instead. Additional - // information about the current status of this node pool instance, if - // available. - StatusMessage string `json:"statusMessage,omitempty"` - // UpdateInfo: Output only. Update info contains relevant information during a - // node pool update. - UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` - // UpgradeSettings: Upgrade settings control disruption and speed of the - // upgrade. - UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` - // Version: The version of Kubernetes running on this NodePool's nodes. If - // unspecified, it defaults as described here - // (https://cloud.google.com/kubernetes-engine/versioning#specifying_node_version). - Version string `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. "AutopilotConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutopilotConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePool) MarshalJSON() ([]byte, error) { - type NoMethod NodePool - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodePoolAutoConfig: Node pool configs that apply to all auto-provisioned -// node pools in autopilot clusters and node auto-provisioning enabled -// clusters. -type NodePoolAutoConfig struct { - // LinuxNodeConfig: Output only. Configuration options for Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"` - // NetworkTags: The list of instance tags applied to all nodes. Tags are used - // to identify valid sources or targets for network firewalls and are specified - // by the client during cluster creation. Each tag within the list must comply - // with RFC1035. - NetworkTags *NetworkTags `json:"networkTags,omitempty"` - // NodeKubeletConfig: NodeKubeletConfig controls the defaults for - // autoprovisioned node-pools. Currently only - // `insecure_kubelet_readonly_port_enabled` can be set here. - NodeKubeletConfig *NodeKubeletConfig `json:"nodeKubeletConfig,omitempty"` - // ResourceManagerTags: Resource manager tag keys and values to be attached to - // the nodes for managing Compute Engine firewalls using Network Firewall - // Policies. - ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` - // ForceSendFields is a list of field names (e.g. "LinuxNodeConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LinuxNodeConfig") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePoolAutoConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodePoolAutoConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodePoolAutoscaling: NodePoolAutoscaling contains information required by -// cluster autoscaler to adjust the size of the node pool to the current -// cluster usage. -type NodePoolAutoscaling struct { - // Autoprovisioned: Can this node pool be deleted automatically. - Autoprovisioned bool `json:"autoprovisioned,omitempty"` - // Enabled: Is autoscaling enabled for this node pool. - Enabled bool `json:"enabled,omitempty"` - // LocationPolicy: Location policy used when scaling up a nodepool. - // - // Possible values: - // "LOCATION_POLICY_UNSPECIFIED" - Not set. - // "BALANCED" - BALANCED is a best effort policy that aims to balance the - // sizes of different zones. - // "ANY" - ANY policy picks zones that have the highest capacity available. - LocationPolicy string `json:"locationPolicy,omitempty"` - // MaxNodeCount: Maximum number of nodes for one location in the node pool. - // Must be >= min_node_count. There has to be enough quota to scale up the - // cluster. - MaxNodeCount int64 `json:"maxNodeCount,omitempty"` - // MinNodeCount: Minimum number of nodes for one location in the node pool. - // Must be greater than or equal to 0 and less than or equal to max_node_count. - MinNodeCount int64 `json:"minNodeCount,omitempty"` - // TotalMaxNodeCount: Maximum number of nodes in the node pool. Must be greater - // than or equal to total_min_node_count. There has to be enough quota to scale - // up the cluster. The total_*_node_count fields are mutually exclusive with - // the *_node_count fields. - TotalMaxNodeCount int64 `json:"totalMaxNodeCount,omitempty"` - // TotalMinNodeCount: Minimum number of nodes in the node pool. Must be greater - // than or equal to 0 and less than or equal to total_max_node_count. The - // total_*_node_count fields are mutually exclusive with the *_node_count - // fields. - TotalMinNodeCount int64 `json:"totalMinNodeCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Autoprovisioned") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePoolAutoscaling) MarshalJSON() ([]byte, error) { - type NoMethod NodePoolAutoscaling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodePoolDefaults: Subset of Nodepool message that has defaults. -type NodePoolDefaults struct { - // NodeConfigDefaults: Subset of NodeConfig message that has defaults. - NodeConfigDefaults *NodeConfigDefaults `json:"nodeConfigDefaults,omitempty"` - // ForceSendFields is a list of field names (e.g. "NodeConfigDefaults") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodeConfigDefaults") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePoolDefaults) MarshalJSON() ([]byte, error) { - type NoMethod NodePoolDefaults - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodePoolLoggingConfig: NodePoolLoggingConfig specifies logging configuration -// for nodepools. -type NodePoolLoggingConfig struct { - // VariantConfig: Logging variant configuration. - VariantConfig *LoggingVariantConfig `json:"variantConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "VariantConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "VariantConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePoolLoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodePoolLoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodePoolUpgradeInfo: NodePoolUpgradeInfo contains the upgrade information of -// a nodepool. -type NodePoolUpgradeInfo struct { - // AutoUpgradeStatus: The auto upgrade status. - // - // Possible values: - // "UNKNOWN" - UNKNOWN indicates an unknown status. - // "ACTIVE" - ACTIVE indicates an active status. - // "MINOR_UPGRADE_PAUSED" - MINOR_UPGRADE_PAUSED indicates the minor version - // upgrade is paused. - // "UPGRADE_PAUSED" - UPGRADE_PAUSED indicates the upgrade is paused. - AutoUpgradeStatus []string `json:"autoUpgradeStatus,omitempty"` - // EndOfExtendedSupportTimestamp: The nodepool's current minor version's end of - // extended support timestamp. - EndOfExtendedSupportTimestamp string `json:"endOfExtendedSupportTimestamp,omitempty"` - // EndOfStandardSupportTimestamp: The nodepool's current minor version's end of - // standard support timestamp. - EndOfStandardSupportTimestamp string `json:"endOfStandardSupportTimestamp,omitempty"` - // MinorTargetVersion: minor_target_version indicates the target version for - // minor upgrade. - MinorTargetVersion string `json:"minorTargetVersion,omitempty"` - // PatchTargetVersion: patch_target_version indicates the target version for - // patch upgrade. - PatchTargetVersion string `json:"patchTargetVersion,omitempty"` - // PausedReason: The auto upgrade paused reason. - // - // Possible values: - // "AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED" - - // AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason. - // "MAINTENANCE_WINDOW" - MAINTENANCE_WINDOW indicates the cluster is outside - // customer maintenance window. - // "MAINTENANCE_EXCLUSION_NO_UPGRADES" - MAINTENANCE_EXCLUSION_NO_UPGRADES - // indicates the cluster is in a maintenance exclusion with scope NO_UPGRADES. - // "MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES" - - // MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a - // maintenance exclusion with scope NO_MINOR_UPGRADES. - // "SYSTEM_CONFIG" - SYSTEM_CONFIG indicates the cluster upgrade is paused by - // system config. - PausedReason []string `json:"pausedReason,omitempty"` - // UpgradeDetails: The list of past auto upgrades. - UpgradeDetails []*UpgradeDetails `json:"upgradeDetails,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoUpgradeStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoUpgradeStatus") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodePoolUpgradeInfo) MarshalJSON() ([]byte, error) { - type NoMethod NodePoolUpgradeInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTaint: Kubernetes taint is composed of three fields: key, value, and -// effect. Effect can only be one of three types: NoSchedule, PreferNoSchedule -// or NoExecute. See here -// (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration) for -// more information, including usage and the valid values. -type NodeTaint struct { - // Effect: Effect for taint. - // - // Possible values: - // "EFFECT_UNSPECIFIED" - Not set - // "NO_SCHEDULE" - NoSchedule - // "PREFER_NO_SCHEDULE" - PreferNoSchedule - // "NO_EXECUTE" - NoExecute - Effect string `json:"effect,omitempty"` - // Key: Key for taint. - Key string `json:"key,omitempty"` - // Value: Value for taint. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Effect") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Effect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTaint) MarshalJSON() ([]byte, error) { - type NoMethod NodeTaint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NodeTaints: Collection of Kubernetes node taints -// (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). -type NodeTaints struct { - // Taints: List of node taints. - Taints []*NodeTaint `json:"taints,omitempty"` - // ForceSendFields is a list of field names (e.g. "Taints") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Taints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NodeTaints) MarshalJSON() ([]byte, error) { - type NoMethod NodeTaints - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NotificationConfig: NotificationConfig is the configuration of -// notifications. -type NotificationConfig struct { - // Pubsub: Notification config for Pub/Sub. - Pubsub *PubSub `json:"pubsub,omitempty"` - // ForceSendFields is a list of field names (e.g. "Pubsub") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Pubsub") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NotificationConfig) MarshalJSON() ([]byte, error) { - type NoMethod NotificationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: This operation resource represents operations that may have -// happened or are happening on the cluster. All fields are output only. -type Operation struct { - // ClusterConditions: Which conditions caused the current cluster state. - // Deprecated. Use field error instead. - ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` - // Detail: Output only. Detailed operation progress, if available. - Detail string `json:"detail,omitempty"` - // EndTime: Output only. The time the operation completed, in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) text format. - EndTime string `json:"endTime,omitempty"` - // Error: The error result of the operation in case of failure. - Error *Status `json:"error,omitempty"` - // Location: Output only. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // or region - // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) - // in which the cluster resides. - Location string `json:"location,omitempty"` - // Name: Output only. The server-assigned ID for the operation. - Name string `json:"name,omitempty"` - // NodepoolConditions: Which conditions caused the current node pool state. - // Deprecated. Use field error instead. - NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` - // OperationType: Output only. The operation type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Not set. - // "CREATE_CLUSTER" - The cluster is being created. The cluster should be - // assumed to be unusable until the operation finishes. In the event of the - // operation failing, the cluster will enter the ERROR state and eventually be - // deleted. - // "DELETE_CLUSTER" - The cluster is being deleted. The cluster should be - // assumed to be unusable as soon as this operation starts. In the event of the - // operation failing, the cluster will enter the ERROR state and the deletion - // will be automatically retried until completed. - // "UPGRADE_MASTER" - The cluster version is being updated. Note that this - // includes "upgrades" to the same version, which are simply a recreation. This - // also includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/clus - // ter-upgrades#upgrading_automatically). For more details, see [documentation - // on cluster - // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-up - // grades#cluster_upgrades). - // "UPGRADE_NODES" - A node pool is being updated. Despite calling this an - // "upgrade", this includes most forms of updates to node pools. This also - // includes - // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-a - // uto-upgrades). This operation sets the progress field and may be canceled. - // The upgrade strategy depends on [node pool - // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node- - // pool-upgrade-strategies). The nodes are generally still usable during this - // operation. - // "REPAIR_CLUSTER" - A problem has been detected with the control plane and - // is being repaired. This operation type is initiated by GKE. For more - // details, see [documentation on - // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance - // -windows-and-exclusions#repairs). - // "UPDATE_CLUSTER" - The cluster is being updated. This is a broad category - // of operations and includes operations that only change metadata as well as - // those that must recreate the entire cluster. If the control plane must be - // recreated, this will cause temporary downtime for zonal clusters. Some - // features require recreating the nodes as well. Those will be recreated as - // separate operations and the update may not be completely functional until - // the node pools recreations finish. Node recreations will generally follow - // [maintenance - // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenanc - // e-windows-and-exclusions). Some GKE-initiated operations use this type. This - // includes certain types of auto-upgrades and incident mitigations. - // "CREATE_NODE_POOL" - A node pool is being created. The node pool should be - // assumed to be unusable until this operation finishes. In the event of an - // error, the node pool may be partially created. If enabled, [node - // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node - // -auto-provisioning) may have automatically initiated such operations. - // "DELETE_NODE_POOL" - The node pool is being deleted. The node pool should - // be assumed to be unusable as soon as this operation starts. - // "SET_NODE_POOL_MANAGEMENT" - The node pool's manamagent field is being - // updated. These operations only update metadata and may be concurrent with - // most other operations. - // "AUTO_REPAIR_NODES" - A problem has been detected with nodes and [they are - // being - // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-re - // pair). This operation type is initiated by GKE, typically automatically. - // This operation may be concurrent with other operations and there may be - // multiple repairs occurring on the same node pool. - // "AUTO_UPGRADE_NODES" - Unused. Automatic node upgrade uses UPGRADE_NODES. - // "SET_LABELS" - Unused. Updating labels uses UPDATE_CLUSTER. - // "SET_MASTER_AUTH" - Unused. Updating master auth uses UPDATE_CLUSTER. - // "SET_NODE_POOL_SIZE" - The node pool is being resized. With the exception - // of resizing to or from size zero, the node pool is generally usable during - // this operation. - // "SET_NETWORK_POLICY" - Unused. Updating network policy uses - // UPDATE_CLUSTER. - // "SET_MAINTENANCE_POLICY" - Unused. Updating maintenance policy uses - // UPDATE_CLUSTER. - // "RESIZE_CLUSTER" - The control plane is being resized. This operation type - // is initiated by GKE. These operations are often performed preemptively to - // ensure that the control plane has sufficient resources and is not typically - // an indication of issues. For more details, see [documentation on - // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance - // -windows-and-exclusions#repairs). - // "FLEET_FEATURE_UPGRADE" - Fleet features of GKE Enterprise are being - // upgraded. The cluster should be assumed to be blocked for other upgrades - // until the operation finishes. - OperationType string `json:"operationType,omitempty"` - // Progress: Output only. Progress information for an operation. - Progress *OperationProgress `json:"progress,omitempty"` - // SelfLink: Output only. Server-defined URI for the operation. Example: - // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1 - // /operations/operation-123`. - SelfLink string `json:"selfLink,omitempty"` - // StartTime: Output only. The time the operation started, in RFC3339 - // (https://www.ietf.org/rfc/rfc3339.txt) text format. - StartTime string `json:"startTime,omitempty"` - // Status: Output only. The current status of the operation. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - // "ABORTING" - The operation is aborting. - Status string `json:"status,omitempty"` - // StatusMessage: Output only. If an error has occurred, a textual description - // of the error. Deprecated. Use the field error instead. - StatusMessage string `json:"statusMessage,omitempty"` - // TargetLink: Output only. Server-defined URI for the target of the operation. - // The format of this is a URI to the resource being modified (such as a - // cluster, node pool, or node). For node pool repairs, there may be multiple - // nodes being repaired, but only one will be the target. Examples: - ## - // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clust - // ers/my-cluster` ## - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster - // s/my-cluster/nodePools/my-np` - // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster - // s/my-cluster/nodePools/my-np/node/my-node` - TargetLink string `json:"targetLink,omitempty"` - // Zone: Output only. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the - // operation is taking place. This field is deprecated, use location instead. - Zone string `json:"zone,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClusterConditions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterConditions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationError: OperationError records errors seen from CloudKMS keys -// encountered during updates to DatabaseEncryption configuration. -type OperationError struct { - // ErrorMessage: Description of the error seen during the operation. - ErrorMessage string `json:"errorMessage,omitempty"` - // KeyName: CloudKMS key resource that had the error. - KeyName string `json:"keyName,omitempty"` - // Timestamp: Time when the CloudKMS error was seen. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorMessage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorMessage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationError) MarshalJSON() ([]byte, error) { - type NoMethod OperationError - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationProgress: Information about operation (or operation stage) -// progress. -type OperationProgress struct { - // Metrics: Progress metric bundle, for example: metrics: [{name: "nodes done", - // int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: - // "progress", double_value: 0.56}, {name: "progress scale", double_value: - // 1.0}] - Metrics []*Metric `json:"metrics,omitempty"` - // Name: A non-parameterized string describing an operation stage. Unset for - // single-stage operations. - Name string `json:"name,omitempty"` - // Stages: Substages of an operation or a stage. - Stages []*OperationProgress `json:"stages,omitempty"` - // Status: Status of an operation stage. Unset for single-stage operations. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Not set. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - // "ABORTING" - The operation is aborting. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Metrics") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Metrics") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationProgress) MarshalJSON() ([]byte, error) { - type NoMethod OperationProgress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ParallelstoreCsiDriverConfig: Configuration for the Cloud Storage -// Parallelstore CSI driver. -type ParallelstoreCsiDriverConfig struct { - // Enabled: Whether the Cloud Storage Parallelstore CSI driver is enabled for - // this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ParallelstoreCsiDriverConfig) MarshalJSON() ([]byte, error) { - type NoMethod ParallelstoreCsiDriverConfig - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ParentProductConfig) MarshalJSON() ([]byte, error) { - type NoMethod ParentProductConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PlacementPolicy: PlacementPolicy defines the placement policy used by the -// node pool. -type PlacementPolicy struct { - // PolicyName: If set, refers to the name of a custom resource policy supplied - // by the user. The resource policy must be in the same project and region as - // the node pool. If not found, InvalidArgument error is returned. - PolicyName string `json:"policyName,omitempty"` - // TpuTopology: Optional. TPU placement topology for pod slice node pool. - // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies - TpuTopology string `json:"tpuTopology,omitempty"` - // Type: The type of placement. - // - // Possible values: - // "TYPE_UNSPECIFIED" - TYPE_UNSPECIFIED specifies no requirements on nodes - // placement. - // "COMPACT" - COMPACT specifies node placement in the same availability - // domain to ensure low communication latency. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PolicyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PlacementPolicy) MarshalJSON() ([]byte, error) { - type NoMethod PlacementPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PodAutoscaling: PodAutoscaling is used for configuration of parameters for -// workload autoscaling. -type PodAutoscaling struct { - // HpaProfile: Selected Horizontal Pod Autoscaling profile. - // - // Possible values: - // "HPA_PROFILE_UNSPECIFIED" - HPA_PROFILE_UNSPECIFIED is used when no custom - // HPA profile is set. - // "NONE" - Customers explicitly opt-out of HPA profiles. - // "PERFORMANCE" - PERFORMANCE is used when customers opt-in to the - // performance HPA profile. In this profile we support a higher number of HPAs - // per cluster and faster metrics collection for workload autoscaling. - HpaProfile string `json:"hpaProfile,omitempty"` - // ForceSendFields is a list of field names (e.g. "HpaProfile") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HpaProfile") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PodAutoscaling) MarshalJSON() ([]byte, error) { - type NoMethod PodAutoscaling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PodCIDROverprovisionConfig: [PRIVATE FIELD] Config for pod CIDR size -// overprovisioning. -type PodCIDROverprovisionConfig struct { - // Disable: Whether Pod CIDR overprovisioning is disabled. Note: Pod CIDR - // overprovisioning is enabled by default. - Disable bool `json:"disable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PodCIDROverprovisionConfig) MarshalJSON() ([]byte, error) { - type NoMethod PodCIDROverprovisionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PrivateClusterConfig: Configuration options for private clusters. -type PrivateClusterConfig struct { - // EnablePrivateEndpoint: Whether the master's internal IP address is used as - // the cluster endpoint. Deprecated: Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint - // instead. Note that the value of enable_public_endpoint is reversed: if - // enable_private_endpoint is false, then enable_public_endpoint will be true. - EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` - // EnablePrivateNodes: Whether nodes have internal IP addresses only. If - // enabled, all nodes are given only RFC 1918 private addresses and communicate - // with the master via private networking. Deprecated: Use - // NetworkConfig.default_enable_private_nodes instead. - EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty"` - // MasterGlobalAccessConfig: Controls master global access settings. - // Deprecated: Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access instead. - MasterGlobalAccessConfig *PrivateClusterMasterGlobalAccessConfig `json:"masterGlobalAccessConfig,omitempty"` - // MasterIpv4CidrBlock: The IP range in CIDR notation to use for the hosted - // master network. This range will be used for assigning internal IP addresses - // to the master or set of masters, as well as the ILB VIP. This range must not - // overlap with any other ranges in use within the cluster's network. - MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty"` - // PeeringName: Output only. The peering name in the customer VPC used by this - // cluster. - PeeringName string `json:"peeringName,omitempty"` - // PrivateEndpoint: Output only. The internal IP address of this cluster's - // master endpoint. Deprecated: Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint instead. - PrivateEndpoint string `json:"privateEndpoint,omitempty"` - // PrivateEndpointSubnetwork: Subnet to provision the master's private endpoint - // during cluster creation. Specified in projects/*/regions/*/subnetworks/* - // format. Deprecated: Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork - // instead. - PrivateEndpointSubnetwork string `json:"privateEndpointSubnetwork,omitempty"` - // PublicEndpoint: Output only. The external IP address of this cluster's - // master endpoint. Deprecated:Use - // ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint instead. - PublicEndpoint string `json:"publicEndpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnablePrivateEndpoint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnablePrivateEndpoint") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PrivateClusterConfig) MarshalJSON() ([]byte, error) { - type NoMethod PrivateClusterConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PrivateClusterMasterGlobalAccessConfig: Configuration for controlling master -// global access settings. -type PrivateClusterMasterGlobalAccessConfig struct { - // Enabled: Whenever master is accessible globally or not. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PrivateClusterMasterGlobalAccessConfig) MarshalJSON() ([]byte, error) { - type NoMethod PrivateClusterMasterGlobalAccessConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PrivateRegistryAccessConfig: PrivateRegistryAccessConfig contains access -// configuration for private container registries. -type PrivateRegistryAccessConfig struct { - // CertificateAuthorityDomainConfig: Private registry access configuration. - CertificateAuthorityDomainConfig []*CertificateAuthorityDomainConfig `json:"certificateAuthorityDomainConfig,omitempty"` - // Enabled: Private registry access is enabled. - Enabled bool `json:"enabled,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CertificateAuthorityDomainConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CertificateAuthorityDomainConfig") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. - NullFields []string `json:"-"` -} - -func (s PrivateRegistryAccessConfig) MarshalJSON() ([]byte, error) { - type NoMethod PrivateRegistryAccessConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PrivilegedAdmissionConfig: PrivilegedAdmissionConfig stores the list of -// authorized allowlist paths for the cluster. -type PrivilegedAdmissionConfig struct { - // AllowlistPaths: The customer allowlist Cloud Storage paths for the cluster. - // These paths are used with the `--autopilot-privileged-admission` flag to - // authorize privileged workloads in Autopilot clusters. Paths can be - // GKE-owned, in the format `gke:////`, or customer-owned, in the format - // `gs:///`. Wildcards (`*`) are supported to authorize all allowlists under - // specific paths or directories. Example: `gs://my-bucket/*` will authorize - // all allowlists under the `my-bucket` bucket. - AllowlistPaths []string `json:"allowlistPaths,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowlistPaths") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowlistPaths") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PrivilegedAdmissionConfig) MarshalJSON() ([]byte, error) { - type NoMethod PrivilegedAdmissionConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PubSub: Pub/Sub specific notification config. -type PubSub struct { - // Enabled: Enable notifications for Pub/Sub. - Enabled bool `json:"enabled,omitempty"` - // Filter: Allows filtering to one or more specific event types. If no filter - // is specified, or if a filter is specified with no event types, all event - // types will be sent - Filter *Filter `json:"filter,omitempty"` - // Topic: The desired Pub/Sub topic to which notifications will be sent by GKE. - // Format is `projects/{project}/topics/{topic}`. - Topic string `json:"topic,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PubSub) MarshalJSON() ([]byte, error) { - type NoMethod PubSub - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// QueuedProvisioning: QueuedProvisioning defines the queued provisioning used -// by the node pool. -type QueuedProvisioning struct { - // Enabled: Denotes that this nodepool is QRM specific, meaning nodes can be - // only obtained through queuing via the Cluster Autoscaler ProvisioningRequest - // API. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { - type NoMethod QueuedProvisioning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RBACBindingConfig: RBACBindingConfig allows user to restrict -// ClusterRoleBindings an RoleBindings that can be created. -type RBACBindingConfig struct { - // EnableInsecureBindingSystemAuthenticated: Setting this to true will allow - // any ClusterRoleBinding and RoleBinding with subjects system:authenticated. - EnableInsecureBindingSystemAuthenticated bool `json:"enableInsecureBindingSystemAuthenticated,omitempty"` - // EnableInsecureBindingSystemUnauthenticated: Setting this to true will allow - // any ClusterRoleBinding and RoleBinding with subjets system:anonymous or - // system:unauthenticated. - EnableInsecureBindingSystemUnauthenticated bool `json:"enableInsecureBindingSystemUnauthenticated,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableInsecureBindingSystemAuthenticated") to unconditionally include in - // API requests. By default, fields with empty or default values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "EnableInsecureBindingSystemAuthenticated") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted from - // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields - // for more details. - NullFields []string `json:"-"` -} - -func (s RBACBindingConfig) MarshalJSON() ([]byte, error) { - type NoMethod RBACBindingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RangeInfo: RangeInfo contains the range name and the range utilization by -// this cluster. -type RangeInfo struct { - // RangeName: Output only. Name of a range. - RangeName string `json:"rangeName,omitempty"` - // Utilization: Output only. The utilization of the range. - Utilization float64 `json:"utilization,omitempty"` - // ForceSendFields is a list of field names (e.g. "RangeName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RangeInfo) MarshalJSON() ([]byte, error) { - type NoMethod RangeInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *RangeInfo) UnmarshalJSON(data []byte) error { - type NoMethod RangeInfo - var s1 struct { - Utilization gensupport.JSONFloat64 `json:"utilization"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Utilization = float64(s1.Utilization) - return nil -} - -// RayClusterLoggingConfig: RayClusterLoggingConfig specifies configuration of -// Ray logging. -type RayClusterLoggingConfig struct { - // Enabled: Enable log collection for Ray clusters. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RayClusterLoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod RayClusterLoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RayClusterMonitoringConfig: RayClusterMonitoringConfig specifies monitoring -// configuration for Ray clusters. -type RayClusterMonitoringConfig struct { - // Enabled: Enable metrics collection for Ray clusters. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RayClusterMonitoringConfig) MarshalJSON() ([]byte, error) { - type NoMethod RayClusterMonitoringConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RayOperatorConfig: Configuration options for the Ray Operator add-on. -type RayOperatorConfig struct { - // Enabled: Whether the Ray Operator addon is enabled for this cluster. - Enabled bool `json:"enabled,omitempty"` - // RayClusterLoggingConfig: Optional. Logging configuration for Ray clusters. - RayClusterLoggingConfig *RayClusterLoggingConfig `json:"rayClusterLoggingConfig,omitempty"` - // RayClusterMonitoringConfig: Optional. Monitoring configuration for Ray - // clusters. - RayClusterMonitoringConfig *RayClusterMonitoringConfig `json:"rayClusterMonitoringConfig,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RayOperatorConfig) MarshalJSON() ([]byte, error) { - type NoMethod RayOperatorConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecurringTimeWindow: Represents an arbitrary window of time that recurs. -type RecurringTimeWindow struct { - // Recurrence: An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) - // for how this window reccurs. They go on for the span of time between the - // start and end time. For example, to have something repeat every weekday, - // you'd use: `FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR` To repeat some window daily - // (equivalent to the DailyMaintenanceWindow): `FREQ=DAILY` For the first - // weekend of every month: `FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU` This specifies - // how frequently the window starts. Eg, if you wanted to have a 9-5 UTC-4 - // window every weekday, you'd use something like: ``` start time = - // 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = - // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` Windows can span multiple days. Eg, to - // make the window encompass every weekend from midnight Saturday till the last - // minute of Sunday UTC: ``` start time = 2019-01-05T00:00:00Z end time = - // 2019-01-07T23:59:00Z recurrence = FREQ=WEEKLY;BYDAY=SA ``` Note the start - // and end time's specific dates are largely arbitrary except to specify - // duration of the window and when it first starts. The FREQ values of HOURLY, - // MINUTELY, and SECONDLY are not supported. - Recurrence string `json:"recurrence,omitempty"` - // Window: The window of the first recurrence. - Window *TimeWindow `json:"window,omitempty"` - // ForceSendFields is a list of field names (e.g. "Recurrence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Recurrence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RecurringTimeWindow) MarshalJSON() ([]byte, error) { - type NoMethod RecurringTimeWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegistryHeader: RegistryHeader configures headers for the registry. -type RegistryHeader struct { - // Key: Key configures the header key. - Key string `json:"key,omitempty"` - // Value: Value configures the header value. - Value []string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegistryHeader) MarshalJSON() ([]byte, error) { - type NoMethod RegistryHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegistryHostConfig: RegistryHostConfig configures the top-level structure -// for a single containerd registry server's configuration, which represents -// one hosts.toml file on the node. It will override the same fqdns in -// PrivateRegistryAccessConfig. -type RegistryHostConfig struct { - // Hosts: HostConfig configures a list of host-specific configurations for the - // server. Each server can have at most 10 host configurations. - Hosts []*HostConfig `json:"hosts,omitempty"` - // Server: Defines the host name of the registry server, which will be used to - // create configuration file as /etc/containerd/hosts.d//hosts.toml. It - // supports fully qualified domain names (FQDN) and IP addresses: Specifying - // port is supported. Wildcards are NOT supported. Examples: - - // my.customdomain.com - 10.0.1.2:5000 - Server string `json:"server,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hosts") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hosts") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegistryHostConfig) MarshalJSON() ([]byte, error) { - type NoMethod RegistryHostConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReleaseChannel: ReleaseChannel indicates which release channel a cluster is -// subscribed to. Release channels are arranged in order of risk. When a -// cluster is subscribed to a release channel, Google maintains both the master -// version and the node version. Node auto-upgrade defaults to true and cannot -// be disabled. -type ReleaseChannel struct { - // Channel: channel specifies which release channel the cluster is subscribed - // to. - // - // Possible values: - // "UNSPECIFIED" - No channel specified. - // "RAPID" - RAPID channel is offered on an early access basis for customers - // who want to test new releases. WARNING: Versions available in the RAPID - // Channel may be subject to unresolved issues with no known workaround and are - // not subject to any SLAs. - // "REGULAR" - Clusters subscribed to REGULAR receive versions that are - // considered GA quality. REGULAR is intended for production users who want to - // take advantage of new features. - // "STABLE" - Clusters subscribed to STABLE receive versions that are known - // to be stable and reliable in production. - // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and - // availability for versions which are known to be stable and reliable in - // production. - Channel string `json:"channel,omitempty"` - // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Channel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReleaseChannel) MarshalJSON() ([]byte, error) { - type NoMethod ReleaseChannel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReleaseChannelConfig: ReleaseChannelConfig exposes configuration for a -// release channel. -type ReleaseChannelConfig struct { - // Channel: The release channel this configuration applies to. - // - // Possible values: - // "UNSPECIFIED" - No channel specified. - // "RAPID" - RAPID channel is offered on an early access basis for customers - // who want to test new releases. WARNING: Versions available in the RAPID - // Channel may be subject to unresolved issues with no known workaround and are - // not subject to any SLAs. - // "REGULAR" - Clusters subscribed to REGULAR receive versions that are - // considered GA quality. REGULAR is intended for production users who want to - // take advantage of new features. - // "STABLE" - Clusters subscribed to STABLE receive versions that are known - // to be stable and reliable in production. - // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and - // availability for versions which are known to be stable and reliable in - // production. - Channel string `json:"channel,omitempty"` - // DefaultVersion: The default version for newly created clusters on the - // channel. - DefaultVersion string `json:"defaultVersion,omitempty"` - // UpgradeTargetVersion: The auto upgrade target version for clusters on the - // channel. - UpgradeTargetVersion string `json:"upgradeTargetVersion,omitempty"` - // ValidVersions: List of valid versions for the channel. - ValidVersions []string `json:"validVersions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Channel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReleaseChannelConfig) MarshalJSON() ([]byte, error) { - type NoMethod ReleaseChannelConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReservationAffinity: ReservationAffinity -// (https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) -// is the configuration of desired reservation which instances could take -// capacity from. -type ReservationAffinity struct { - // ConsumeReservationType: Corresponds to the type of reservation consumption. - // - // Possible values: - // "UNSPECIFIED" - Default value. This should not be used. - // "NO_RESERVATION" - Do not consume from any reserved capacity. - // "ANY_RESERVATION" - Consume any reservation available. - // "SPECIFIC_RESERVATION" - Must consume from a specific reservation. Must - // specify key value fields for specifying the reservations. - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of a reservation resource. To target a - // SPECIFIC_RESERVATION by name, specify - // "compute.googleapis.com/reservation-name" as the key and specify the name of - // your reservation as its value. - Key string `json:"key,omitempty"` - // Values: Corresponds to the label value(s) of reservation resource(s). - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumeReservationType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod ReservationAffinity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceLabels: Collection of Resource Manager labels -// (https://cloud.google.com/resource-manager/docs/creating-managing-labels). -type ResourceLabels struct { - // Labels: Map of node label keys and node label values. - Labels map[string]string `json:"labels,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceLabels) MarshalJSON() ([]byte, error) { - type NoMethod ResourceLabels - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceLimit: Contains information about amount of some resource in the -// cluster. For memory, value should be in GB. -type ResourceLimit struct { - // Maximum: Maximum amount of the resource in the cluster. - Maximum int64 `json:"maximum,omitempty,string"` - // Minimum: Minimum amount of the resource in the cluster. - Minimum int64 `json:"minimum,omitempty,string"` - // ResourceType: Resource name "cpu", "memory" or gpu-specific string. - ResourceType string `json:"resourceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Maximum") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Maximum") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceLimit) MarshalJSON() ([]byte, error) { - type NoMethod ResourceLimit - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceManagerTags: A map of resource manager tag keys and values to be -// attached to the nodes for managing Compute Engine firewalls using Network -// Firewall Policies. Tags must be according to specifications in -// https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. A -// maximum of 5 tag key-value pairs can be specified. Existing tags will be -// replaced with new values. -type ResourceManagerTags struct { - // Tags: TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) 1. - // `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. - // `{org_id}/{tag_key_name}={tag_value_name}` 3. - // `{project_id}/{tag_key_name}={tag_value_name}` - Tags map[string]string `json:"tags,omitempty"` - // ForceSendFields is a list of field names (e.g. "Tags") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Tags") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceManagerTags) MarshalJSON() ([]byte, error) { - type NoMethod ResourceManagerTags - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResourceUsageExportConfig: Configuration for exporting cluster resource -// usages. -type ResourceUsageExportConfig struct { - // BigqueryDestination: Configuration to use BigQuery as usage export - // destination. - BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` - // ConsumptionMeteringConfig: Configuration to enable resource consumption - // metering. - ConsumptionMeteringConfig *ConsumptionMeteringConfig `json:"consumptionMeteringConfig,omitempty"` - // EnableNetworkEgressMetering: Whether to enable network egress metering for - // this cluster. If enabled, a daemonset will be created in the cluster to - // meter network egress traffic. - EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigqueryDestination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigqueryDestination") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceUsageExportConfig) MarshalJSON() ([]byte, error) { - type NoMethod ResourceUsageExportConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest rollbacks the -// previously Aborted or Failed NodePool upgrade. This will be an no-op if the -// last upgrade successfully completed. -type RollbackNodePoolUpgradeRequest struct { - // ClusterId: Deprecated. The name of the cluster to rollback. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster, node pool id) of the node poll - // to rollback upgrade. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to rollback. This field - // has been deprecated and replaced by the name field. - NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // RespectPdb: Option for rollback to ignore the PodDisruptionBudget. Default - // value is false. - RespectPdb bool `json:"respectPdb,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RollbackNodePoolUpgradeRequest) MarshalJSON() ([]byte, error) { - type NoMethod RollbackNodePoolUpgradeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RotationConfig: RotationConfig is config for secret manager auto rotation. -type RotationConfig struct { - // Enabled: Whether the rotation is enabled. - Enabled bool `json:"enabled,omitempty"` - // RotationInterval: The interval between two consecutive rotations. Default - // rotation interval is 2 minutes. - RotationInterval string `json:"rotationInterval,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RotationConfig) MarshalJSON() ([]byte, error) { - type NoMethod RotationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SandboxConfig: SandboxConfig contains configurations of the sandbox to use -// for the node. -type SandboxConfig struct { - // Type: Type of the sandbox to use for the node. - // - // Possible values: - // "UNSPECIFIED" - Default value. This should not be used. - // "GVISOR" - Run sandbox using gvisor. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SandboxConfig) MarshalJSON() ([]byte, error) { - type NoMethod SandboxConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecondaryBootDisk: SecondaryBootDisk represents a persistent disk attached -// to a node with special configurations based on its mode. -type SecondaryBootDisk struct { - // DiskImage: Fully-qualified resource ID for an existing disk image. - DiskImage string `json:"diskImage,omitempty"` - // Mode: Disk mode (container image cache, etc.) - // - // Possible values: - // "MODE_UNSPECIFIED" - MODE_UNSPECIFIED is when mode is not set. - // "CONTAINER_IMAGE_CACHE" - CONTAINER_IMAGE_CACHE is for using the secondary - // boot disk as a container image cache. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "DiskImage") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DiskImage") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecondaryBootDisk) MarshalJSON() ([]byte, error) { - type NoMethod SecondaryBootDisk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecondaryBootDiskUpdateStrategy: SecondaryBootDiskUpdateStrategy is a -// placeholder which will be extended in the future to define different options -// for updating secondary boot disks. -type SecondaryBootDiskUpdateStrategy struct { -} - -// SecretManagerConfig: SecretManagerConfig is config for secret manager -// enablement. -type SecretManagerConfig struct { - // Enabled: Enable/Disable Secret Manager Config. - Enabled bool `json:"enabled,omitempty"` - // RotationConfig: Rotation config for secret manager. - RotationConfig *RotationConfig `json:"rotationConfig,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecretManagerConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecretManagerConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityBulletinEvent: SecurityBulletinEvent is a notification sent to -// customers when a security bulletin has been posted that they are vulnerable -// to. -type SecurityBulletinEvent struct { - // AffectedSupportedMinors: The GKE minor versions affected by this - // vulnerability. - AffectedSupportedMinors []string `json:"affectedSupportedMinors,omitempty"` - // BriefDescription: A brief description of the bulletin. See the bulletin - // pointed to by the bulletin_uri field for an expanded description. - BriefDescription string `json:"briefDescription,omitempty"` - // BulletinId: The ID of the bulletin corresponding to the vulnerability. - BulletinId string `json:"bulletinId,omitempty"` - // BulletinUri: The URI link to the bulletin on the website for more - // information. - BulletinUri string `json:"bulletinUri,omitempty"` - // CveIds: The CVEs associated with this bulletin. - CveIds []string `json:"cveIds,omitempty"` - // ManualStepsRequired: If this field is specified, it means there are manual - // steps that the user must take to make their clusters safe. - ManualStepsRequired bool `json:"manualStepsRequired,omitempty"` - // MitigatedVersions: The GKE versions where this vulnerability is mitigated. - MitigatedVersions []string `json:"mitigatedVersions,omitempty"` - // PatchedVersions: The GKE versions where this vulnerability is patched. - PatchedVersions []string `json:"patchedVersions,omitempty"` - // ResourceTypeAffected: The resource type (node/control plane) that has the - // vulnerability. Multiple notifications (1 notification per resource type) - // will be sent for a vulnerability that affects > 1 resource type. - ResourceTypeAffected string `json:"resourceTypeAffected,omitempty"` - // Severity: The severity of this bulletin as it relates to GKE. - Severity string `json:"severity,omitempty"` - // SuggestedUpgradeTarget: This represents a version selected from the - // patched_versions field that the cluster receiving this notification should - // most likely want to upgrade to based on its current version. Note that if - // this notification is being received by a given cluster, it means that this - // version is currently available as an upgrade target in that cluster's - // location. - SuggestedUpgradeTarget string `json:"suggestedUpgradeTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "AffectedSupportedMinors") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AffectedSupportedMinors") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityBulletinEvent) MarshalJSON() ([]byte, error) { - type NoMethod SecurityBulletinEvent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SecurityPostureConfig: SecurityPostureConfig defines the flags needed to -// enable/disable features for the Security Posture API. -type SecurityPostureConfig struct { - // Mode: Sets which mode to use for Security Posture features. - // - // Possible values: - // "MODE_UNSPECIFIED" - Default value not specified. - // "DISABLED" - Disables Security Posture features on the cluster. - // "BASIC" - Applies Security Posture features on the cluster. - // "ENTERPRISE" - Applies the Security Posture off cluster Enterprise level - // features. - Mode string `json:"mode,omitempty"` - // VulnerabilityMode: Sets which mode to use for vulnerability scanning. - // - // Possible values: - // "VULNERABILITY_MODE_UNSPECIFIED" - Default value not specified. - // "VULNERABILITY_DISABLED" - Disables vulnerability scanning on the cluster. - // "VULNERABILITY_BASIC" - Applies basic vulnerability scanning on the - // cluster. - // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's vulnerability - // on cluster Enterprise level features. - VulnerabilityMode string `json:"vulnerabilityMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SecurityPostureConfig) MarshalJSON() ([]byte, error) { - type NoMethod SecurityPostureConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServerConfig: Kubernetes Engine service configuration. -type ServerConfig struct { - // Channels: List of release channel configurations. - Channels []*ReleaseChannelConfig `json:"channels,omitempty"` - // DefaultClusterVersion: Version of Kubernetes the service deploys by default. - DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` - // DefaultImageType: Default image type. - DefaultImageType string `json:"defaultImageType,omitempty"` - // ValidImageTypes: List of valid image types. - ValidImageTypes []string `json:"validImageTypes,omitempty"` - // ValidMasterVersions: List of valid master versions, in descending order. - ValidMasterVersions []string `json:"validMasterVersions,omitempty"` - // ValidNodeVersions: List of valid node upgrade target versions, in descending - // order. - ValidNodeVersions []string `json:"validNodeVersions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Channels") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Channels") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServerConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServerConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceExternalIPsConfig: Config to block services with externalIPs field. -type ServiceExternalIPsConfig struct { - // Enabled: Whether Services with ExternalIPs field are allowed or not. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceExternalIPsConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceExternalIPsConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetAddonsConfigRequest: SetAddonsConfigRequest sets the addons associated -// with the cluster. -type SetAddonsConfigRequest struct { - // AddonsConfig: Required. The desired configurations for the various addons - // available to run in the cluster. - AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster) of the cluster to set addons. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddonsConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddonsConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetAddonsConfigRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetLabelsRequest: SetLabelsRequest sets the Google Cloud Platform labels on -// a Google Container Engine cluster, which will in turn set them for Google -// Compute Engine resources used by that cluster -type SetLabelsRequest struct { - // ClusterId: Deprecated. The name of the cluster. This field has been - // deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // LabelFingerprint: Required. The fingerprint of the previous set of labels - // for this resource, used to detect conflicts. The fingerprint is initially - // generated by Kubernetes Engine and changes after every request to modify or - // update labels. You must always provide an up-to-date fingerprint hash when - // updating or changing labels. Make a `get()` request to the resource to get - // the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to set - // labels. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // ResourceLabels: Required. The labels to set for that cluster. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetLabelsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetLegacyAbacRequest: SetLegacyAbacRequest enables or disables the ABAC -// authorization mechanism for a cluster. -type SetLegacyAbacRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Enabled: Required. Whether ABAC authorization will be enabled in the - // cluster. - Enabled bool `json:"enabled,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to set - // legacy abac. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetLegacyAbacRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetLocationsRequest: SetLocationsRequest sets the locations of the cluster. -type SetLocationsRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Locations: Required. The desired list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. Changing the locations a cluster is in - // will result in nodes being either created or removed from the cluster, - // depending on whether locations are being added or removed. This list must - // always include the cluster's primary zone. - Locations []string `json:"locations,omitempty"` - // Name: The name (project, location, cluster) of the cluster to set locations. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetLocationsRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetLocationsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging service -// of a cluster. -type SetLoggingServiceRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // LoggingService: Required. The logging service the cluster should use to - // write logs. Currently available options: * - // `logging.googleapis.com/kubernetes` - The Cloud Logging service with a - // Kubernetes-native resource model * `logging.googleapis.com` - The legacy - // Cloud Logging service (no longer available as of GKE 1.15). * `none` - no - // logs will be exported from the cluster. If left as an empty - // string,`logging.googleapis.com/kubernetes` will be used for GKE 1.14+ or - // `logging.googleapis.com` for earlier versions. - LoggingService string `json:"loggingService,omitempty"` - // Name: The name (project, location, cluster) of the cluster to set logging. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetLoggingServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the -// maintenance policy for a cluster. -type SetMaintenancePolicyRequest struct { - // ClusterId: Required. The name of the cluster to update. - ClusterId string `json:"clusterId,omitempty"` - // MaintenancePolicy: Required. The maintenance policy to be set for the - // cluster. An empty field clears the existing maintenance policy. - MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to set - // maintenance policy. Specified in the format - // `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Required. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - ProjectId string `json:"projectId,omitempty"` - // Zone: Required. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetMaintenancePolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password of a -// cluster. -type SetMasterAuthRequest struct { - // Action: Required. The exact form of action to be taken on the master auth. - // - // Possible values: - // "UNKNOWN" - Operation is unknown and will error out. - // "SET_PASSWORD" - Set the password to a user generated value. - // "GENERATE_PASSWORD" - Generate a new password and set it to that. - // "SET_USERNAME" - Set the username. If an empty username is provided, basic - // authentication is disabled for the cluster. If a non-empty username is - // provided, basic authentication is enabled, with either a provided password - // or a generated one. - Action string `json:"action,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster) of the cluster to set auth. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Update: Required. A description of the update. - Update *MasterAuth `json:"update,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetMasterAuthRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetMasterAuthRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the monitoring -// service of a cluster. -type SetMonitoringServiceRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // MonitoringService: Required. The monitoring service the cluster should use - // to write metrics. Currently available options: * - // `monitoring.googleapis.com/kubernetes` - The Cloud Monitoring service with a - // Kubernetes-native resource model * `monitoring.googleapis.com` - The legacy - // Cloud Monitoring service (no longer available as of GKE 1.15). * `none` - No - // metrics will be exported from the cluster. If left as an empty - // string,`monitoring.googleapis.com/kubernetes` will be used for GKE 1.14+ or - // `monitoring.googleapis.com` for earlier versions. - MonitoringService string `json:"monitoringService,omitempty"` - // Name: The name (project, location, cluster) of the cluster to set - // monitoring. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetMonitoringServiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables network -// policy for a cluster. -type SetNetworkPolicyRequest struct { - // ClusterId: Deprecated. The name of the cluster. This field has been - // deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to set - // networking policy. Specified in the format - // `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // NetworkPolicy: Required. Configuration options for the NetworkPolicy - // feature. - NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetNetworkPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the -// autoscaler settings of a node pool. -type SetNodePoolAutoscalingRequest struct { - // Autoscaling: Required. Autoscaling configuration for the node pool. - Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster, node pool) of the node pool to - // set autoscaler settings. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to upgrade. This field has - // been deprecated and replaced by the name field. - NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Autoscaling") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Autoscaling") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetNodePoolAutoscalingRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetNodePoolManagementRequest: SetNodePoolManagementRequest sets the node -// management properties of a node pool. -type SetNodePoolManagementRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Management: Required. NodeManagement configuration for the node pool. - Management *NodeManagement `json:"management,omitempty"` - // Name: The name (project, location, cluster, node pool id) of the node pool - // to set management properties. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to update. This field has - // been deprecated and replaced by the name field. - NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetNodePoolManagementRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetNodePoolSizeRequest: SetNodePoolSizeRequest sets the size of a node pool. -type SetNodePoolSizeRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster, node pool id) of the node pool - // to set size. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `json:"name,omitempty"` - // NodeCount: Required. The desired node count for the pool. - NodeCount int64 `json:"nodeCount,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to update. This field has - // been deprecated and replaced by the name field. - NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetNodePoolSizeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedInstanceConfig: A set of Shielded Instance options. -type ShieldedInstanceConfig struct { - // EnableIntegrityMonitoring: Defines whether the instance has integrity - // monitoring enabled. Enables monitoring and attestation of the boot integrity - // of the instance. The attestation is performed against the integrity policy - // baseline. This baseline is initially derived from the implicitly trusted - // boot image when the instance is created. - EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Defines whether the instance has Secure Boot enabled. - // Secure Boot helps ensure that the system only runs authentic software by - // verifying the digital signature of all boot components, and halting the boot - // process if signature verification fails. - EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedInstanceConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShieldedNodes: Configuration of Shielded Nodes feature. -type ShieldedNodes struct { - // Enabled: Whether Shielded Nodes features are enabled on all nodes in this - // cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ShieldedNodes) MarshalJSON() ([]byte, error) { - type NoMethod ShieldedNodes - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SoleTenantConfig: SoleTenantConfig contains the NodeAffinities to specify -// what shared sole tenant node groups should back the node pool. -type SoleTenantConfig struct { - // MinNodeCpus: Optional. The minimum number of virtual CPUs this instance will - // consume when running on a sole-tenant node. This field can only be set if - // the node pool is created in a shared sole-tenant node group. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // NodeAffinities: NodeAffinities used to match to a shared sole tenant node - // group. - NodeAffinities []*NodeAffinity `json:"nodeAffinities,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinNodeCpus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinNodeCpus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SoleTenantConfig) MarshalJSON() ([]byte, error) { - type NoMethod SoleTenantConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StandardRolloutPolicy: Standard rollout policy is the default policy for -// blue-green. -type StandardRolloutPolicy struct { - // BatchNodeCount: Number of blue nodes to drain in a batch. - BatchNodeCount int64 `json:"batchNodeCount,omitempty"` - // BatchPercentage: Percentage of the blue pool nodes to drain in a batch. The - // range of this field should be (0.0, 1.0]. - BatchPercentage float64 `json:"batchPercentage,omitempty"` - // BatchSoakDuration: Soak time after each batch gets drained. Default to zero. - BatchSoakDuration string `json:"batchSoakDuration,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchNodeCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BatchNodeCount") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StandardRolloutPolicy) MarshalJSON() ([]byte, error) { - type NoMethod StandardRolloutPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *StandardRolloutPolicy) UnmarshalJSON(data []byte) error { - type NoMethod StandardRolloutPolicy - var s1 struct { - BatchPercentage gensupport.JSONFloat64 `json:"batchPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BatchPercentage = float64(s1.BatchPercentage) - return nil -} - -// StartIPRotationRequest: StartIPRotationRequest creates a new IP for the -// cluster and then performs a node upgrade on each node pool to point to the -// new IP. -type StartIPRotationRequest struct { - // ClusterId: Deprecated. The name of the cluster. This field has been - // deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster name) of the cluster to start IP - // rotation. Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // RotateCredentials: Whether to rotate credentials during IP rotation. - RotateCredentials bool `json:"rotateCredentials,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StartIPRotationRequest) MarshalJSON() ([]byte, error) { - type NoMethod StartIPRotationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StatefulHAConfig: Configuration for the Stateful HA add-on. -type StatefulHAConfig struct { - // Enabled: Whether the Stateful HA add-on is enabled for this cluster. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatefulHAConfig) MarshalJSON() ([]byte, error) { - type NoMethod StatefulHAConfig - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StatusCondition: StatusCondition describes why a cluster or a node pool has -// a certain status (e.g., ERROR or DEGRADED). -type StatusCondition struct { - // CanonicalCode: Canonical code of the condition. - // - // Possible values: - // "OK" - Not an error; returned on success. HTTP Mapping: 200 OK - // "CANCELLED" - The operation was cancelled, typically by the caller. HTTP - // Mapping: 499 Client Closed Request - // "UNKNOWN" - Unknown error. For example, this error may be returned when a - // `Status` value received from another address space belongs to an error space - // that is not known in this address space. Also errors raised by APIs that do - // not return enough error information may be converted to this error. HTTP - // Mapping: 500 Internal Server Error - // "INVALID_ARGUMENT" - The client specified an invalid argument. Note that - // this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates - // arguments that are problematic regardless of the state of the system (e.g., - // a malformed file name). HTTP Mapping: 400 Bad Request - // "DEADLINE_EXCEEDED" - The deadline expired before the operation could - // complete. For operations that change the state of the system, this error may - // be returned even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long enough for - // the deadline to expire. HTTP Mapping: 504 Gateway Timeout - // "NOT_FOUND" - Some requested entity (e.g., file or directory) was not - // found. Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented allowlist, - // `NOT_FOUND` may be used. If a request is denied for some users within a - // class of users, such as user-based access control, `PERMISSION_DENIED` must - // be used. HTTP Mapping: 404 Not Found - // "ALREADY_EXISTS" - The entity that a client attempted to create (e.g., - // file or directory) already exists. HTTP Mapping: 409 Conflict - // "PERMISSION_DENIED" - The caller does not have permission to execute the - // specified operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for - // those errors). `PERMISSION_DENIED` must not be used if the caller can not be - // identified (use `UNAUTHENTICATED` instead for those errors). This error code - // does not imply the request is valid or the requested entity exists or - // satisfies other pre-conditions. HTTP Mapping: 403 Forbidden - // "UNAUTHENTICATED" - The request does not have valid authentication - // credentials for the operation. HTTP Mapping: 401 Unauthorized - // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a - // per-user quota, or perhaps the entire file system is out of space. HTTP - // Mapping: 429 Too Many Requests - // "FAILED_PRECONDITION" - The operation was rejected because the system is - // not in a state required for the operation's execution. For example, the - // directory to be deleted is non-empty, an rmdir operation is applied to a - // non-directory, etc. Service implementors can use the following guidelines to - // decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use - // `UNAVAILABLE` if the client can retry just the failing call. (b) Use - // `ABORTED` if the client should retry at a higher level. For example, when a - // client-specified test-and-set fails, indicating the client should restart a - // read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client - // should not retry until the system state has been explicitly fixed. For - // example, if an "rmdir" fails because the directory is non-empty, - // `FAILED_PRECONDITION` should be returned since the client should not retry - // unless the files are deleted from the directory. HTTP Mapping: 400 Bad - // Request - // "ABORTED" - The operation was aborted, typically due to a concurrency - // issue such as a sequencer check failure or transaction abort. See the - // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and - // `UNAVAILABLE`. HTTP Mapping: 409 Conflict - // "OUT_OF_RANGE" - The operation was attempted past the valid range. E.g., - // seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error - // indicates a problem that may be fixed if the system state changes. For - // example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to - // read at an offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current file size. - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) - // when it applies so that callers who are iterating through a space can easily - // look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: - // 400 Bad Request - // "UNIMPLEMENTED" - The operation is not implemented or is not - // supported/enabled in this service. HTTP Mapping: 501 Not Implemented - // "INTERNAL" - Internal errors. This means that some invariants expected by - // the underlying system have been broken. This error code is reserved for - // serious errors. HTTP Mapping: 500 Internal Server Error - // "UNAVAILABLE" - The service is currently unavailable. This is most likely - // a transient condition, which can be corrected by retrying with a backoff. - // Note that it is not always safe to retry non-idempotent operations. See the - // guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and - // `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable - // "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping: 500 - // Internal Server Error - CanonicalCode string `json:"canonicalCode,omitempty"` - // Code: Machine-friendly representation of the condition Deprecated. Use - // canonical_code instead. - // - // Possible values: - // "UNKNOWN" - UNKNOWN indicates a generic condition. - // "GCE_STOCKOUT" - GCE_STOCKOUT indicates that Google Compute Engine - // resources are temporarily unavailable. - // "GKE_SERVICE_ACCOUNT_DELETED" - GKE_SERVICE_ACCOUNT_DELETED indicates that - // the user deleted their robot service account. - // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded. - // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE due to a - // system logic error. - // "CLOUD_KMS_KEY_ERROR" - Unable to perform an encrypt operation against the - // CloudKMS key used for etcd level encryption. - // "CA_EXPIRING" - Cluster CA is expiring soon. - // "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS" - Node service account is - // missing permissions. - // "CLOUD_KMS_KEY_DESTROYED" - Cloud KMS key version used for etcd level - // encryption has been destroyed. This is a permanent error. - Code string `json:"code,omitempty"` - // Message: Human-friendly representation of the condition - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CanonicalCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s StatusCondition) MarshalJSON() ([]byte, error) { - type NoMethod StatusCondition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimeWindow: Represents an arbitrary window of time. -type TimeWindow struct { - // EndTime: The time that the window ends. The end time should take place after - // the start time. - EndTime string `json:"endTime,omitempty"` - // MaintenanceExclusionOptions: MaintenanceExclusionOptions provides - // maintenance exclusion related options. - MaintenanceExclusionOptions *MaintenanceExclusionOptions `json:"maintenanceExclusionOptions,omitempty"` - // StartTime: The time that the window first starts. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TimeWindow) MarshalJSON() ([]byte, error) { - type NoMethod TimeWindow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TopologyManager: TopologyManager defines the configuration options for -// Topology Manager feature. See -// https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ -type TopologyManager struct { - // Policy: Configures the strategy for resource alignment. Allowed values are: - // * none: the default policy, and does not perform any topology alignment. * - // restricted: the topology manager stores the preferred NUMA node affinity for - // the container, and will reject the pod if the affinity if not preferred. * - // best-effort: the topology manager stores the preferred NUMA node affinity - // for the container. If the affinity is not preferred, the topology manager - // will admit the pod to the node anyway. * single-numa-node: the topology - // manager determines if the single NUMA node affinity is possible. If it is, - // Topology Manager will store this and the Hint Providers can then use this - // information when making the resource allocation decision. If, however, this - // is not possible then the Topology Manager will reject the pod from the node. - // This will result in a pod in a Terminated state with a pod admission - // failure. The default policy value is 'none' if unspecified. Details about - // each strategy can be found here - // (https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies). - Policy string `json:"policy,omitempty"` - // Scope: The Topology Manager aligns resources in following scopes: * - // container * pod The default scope is 'container' if unspecified. See - // https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes - Scope string `json:"scope,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TopologyManager) MarshalJSON() ([]byte, error) { - type NoMethod TopologyManager - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateClusterRequest: UpdateClusterRequest updates the settings of a -// cluster. -type UpdateClusterRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // Name: The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Update: Required. A description of the update. - Update *ClusterUpdate `json:"update,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateClusterRequest) MarshalJSON() ([]byte, error) { - type NoMethod UpdateClusterRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateInfo: UpdateInfo contains resource (instance groups, etc), status and -// other intermediate information relevant to a node pool upgrade. -type UpdateInfo struct { - // BlueGreenInfo: Information of a blue-green upgrade. - BlueGreenInfo *BlueGreenInfo `json:"blueGreenInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlueGreenInfo") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlueGreenInfo") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateInfo) MarshalJSON() ([]byte, error) { - type NoMethod UpdateInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateMasterRequest: UpdateMasterRequest updates the master of the cluster. -type UpdateMasterRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // MasterVersion: Required. The Kubernetes version to change the master to. - // Users may specify either explicit versions offered by Kubernetes Engine or - // version aliases, which have the following behavior: - "latest": picks the - // highest valid Kubernetes version - "1.X": picks the highest valid - // patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid - // gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit - // Kubernetes version - "-": picks the default Kubernetes version - MasterVersion string `json:"masterVersion,omitempty"` - // Name: The name (project, location, cluster) of the cluster to update. - // Specified in the format `projects/*/locations/*/clusters/*`. - Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateMasterRequest) MarshalJSON() ([]byte, error) { - type NoMethod UpdateMasterRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpdateNodePoolRequest: UpdateNodePoolRequests update a node pool's image -// and/or version. -type UpdateNodePoolRequest struct { - // Accelerators: A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. - Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"` - // BootDisk: The desired boot disk config for nodes in the node pool. Initiates - // an upgrade operation that migrates the nodes in the node pool to the - // specified boot disk config. - BootDisk *BootDisk `json:"bootDisk,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. This field has - // been deprecated and replaced by the name field. - ClusterId string `json:"clusterId,omitempty"` - // ConfidentialNodes: Confidential nodes config. All the nodes in the node pool - // will be Confidential VM once enabled. - ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` - // ContainerdConfig: The desired containerd config for nodes in the node pool. - // Initiates an upgrade operation that recreates the nodes with the new config. - ContainerdConfig *ContainerdConfig `json:"containerdConfig,omitempty"` - // DiskSizeGb: Optional. The desired disk size for nodes in the node pool - // specified in GB. The smallest allowed disk size is 10GB. Initiates an - // upgrade operation that migrates the nodes in the node pool to the specified - // disk size. - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or - // 'pd-balanced') for nodes in the node pool. Initiates an upgrade operation - // that migrates the nodes in the node pool to the specified disk type. - DiskType string `json:"diskType,omitempty"` - // Etag: The current etag of the node pool. If an etag is provided and does not - // match the current etag of the node pool, update will be blocked and an - // ABORTED error will be returned. - Etag string `json:"etag,omitempty"` - // FastSocket: Enable or disable NCCL fast socket for the node pool. - FastSocket *FastSocket `json:"fastSocket,omitempty"` - // FlexStart: Flex Start flag for enabling Flex Start VM. - FlexStart bool `json:"flexStart,omitempty"` - // GcfsConfig: GCFS config. - GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` - // Gvnic: Enable or disable gvnic on the node pool. - Gvnic *VirtualNIC `json:"gvnic,omitempty"` - // ImageType: Required. The desired image type for the node pool. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. - ImageType string `json:"imageType,omitempty"` - // KubeletConfig: Node kubelet configs. - KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"` - // Labels: The desired node labels to be applied to all nodes in the node pool. - // If this field is not present, the labels will not be changed. Otherwise, the - // existing node labels will be *replaced* with the provided labels. - Labels *NodeLabels `json:"labels,omitempty"` - // LinuxNodeConfig: Parameters that can be configured on Linux nodes. - LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"` - // Locations: The desired list of Google Compute Engine zones - // (https://cloud.google.com/compute/docs/zones#available) in which the node - // pool's nodes should be located. Changing the locations for a node pool will - // result in nodes being either created or removed from the node pool, - // depending on whether locations are being added or removed. Warning: It is - // recommended to update node pool locations in a standalone API call. Do not - // combine a location update with changes to other fields (such as `tags`, - // `labels`, `taints`, etc.) in the same request. Otherwise, the API performs a - // structural modification where changes to other fields will only apply to - // newly created nodes and will not be applied to existing nodes in the node - // pool. To ensure all nodes are updated consistently, use a separate API call - // for location changes. - Locations []string `json:"locations,omitempty"` - // LoggingConfig: Logging configuration. - LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` - // MachineType: Optional. The desired Google Compute Engine machine type - // (https://cloud.google.com/compute/docs/machine-types) for nodes in the node - // pool. Initiates an upgrade operation that migrates the nodes in the node - // pool to the specified machine type. - MachineType string `json:"machineType,omitempty"` - // MaxRunDuration: The maximum duration for the nodes to exist. If unspecified, - // the nodes can exist indefinitely. - MaxRunDuration string `json:"maxRunDuration,omitempty"` - // Name: The name (project, location, cluster, node pool) of the node pool to - // update. Specified in the format - // `projects/*/locations/*/clusters/*/nodePools/*`. - Name string `json:"name,omitempty"` - // NodeNetworkConfig: Node network config. - NodeNetworkConfig *NodeNetworkConfig `json:"nodeNetworkConfig,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to upgrade. This field has - // been deprecated and replaced by the name field. - NodePoolId string `json:"nodePoolId,omitempty"` - // NodeVersion: Required. The Kubernetes version to change the nodes to - // (typically an upgrade). Users may specify either explicit versions offered - // by Kubernetes Engine or version aliases, which have the following behavior: - // - "latest": picks the highest valid Kubernetes version - "1.X": picks the - // highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the - // highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an - // explicit Kubernetes version - "-": picks the Kubernetes master version - NodeVersion string `json:"nodeVersion,omitempty"` - // ProjectId: Deprecated. The Google Developers Console project ID or project - // number - // (https://cloud.google.com/resource-manager/docs/creating-managing-projects). - // This field has been deprecated and replaced by the name field. - ProjectId string `json:"projectId,omitempty"` - // QueuedProvisioning: Specifies the configuration of queued provisioning. - QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` - // ResourceLabels: The resource labels for the node pool to use to annotate any - // related Google Compute Engine resources. - ResourceLabels *ResourceLabels `json:"resourceLabels,omitempty"` - // ResourceManagerTags: Desired resource manager tag keys and values to be - // attached to the nodes for managing Compute Engine firewalls using Network - // Firewall Policies. Existing tags will be replaced with new values. - ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` - // StoragePools: List of Storage Pools where boot disks are provisioned. - // Existing Storage Pools will be replaced with storage-pools. - StoragePools []string `json:"storagePools,omitempty"` - // Tags: The desired network tags to be applied to all nodes in the node pool. - // If this field is not present, the tags will not be changed. Otherwise, the - // existing network tags will be *replaced* with the provided tags. - Tags *NetworkTags `json:"tags,omitempty"` - // Taints: The desired node taints to be applied to all nodes in the node pool. - // If this field is not present, the taints will not be changed. Otherwise, the - // existing node taints will be *replaced* with the provided taints. - Taints *NodeTaints `json:"taints,omitempty"` - // UpgradeSettings: Upgrade settings control disruption and speed of the - // upgrade. - UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` - // WindowsNodeConfig: Parameters that can be configured on Windows nodes. - WindowsNodeConfig *WindowsNodeConfig `json:"windowsNodeConfig,omitempty"` - // WorkloadMetadataConfig: The desired workload metadata config for the node - // pool. - WorkloadMetadataConfig *WorkloadMetadataConfig `json:"workloadMetadataConfig,omitempty"` - // Zone: Deprecated. The name of the Google Compute Engine zone - // (https://cloud.google.com/compute/docs/zones#available) in which the cluster - // resides. This field has been deprecated and replaced by the name field. - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Accelerators") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Accelerators") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { - type NoMethod UpdateNodePoolRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpgradeAvailableEvent: UpgradeAvailableEvent is a notification sent to -// customers when a new available version is released. -type UpgradeAvailableEvent struct { - // ReleaseChannel: The release channel of the version. If empty, it means a - // non-channel release. - ReleaseChannel *ReleaseChannel `json:"releaseChannel,omitempty"` - // Resource: Optional relative path to the resource. For example, the relative - // path of the node pool. - Resource string `json:"resource,omitempty"` - // ResourceType: The resource type of the release version. - // - // Possible values: - // "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" - Default value. This shouldn't be - // used. - // "MASTER" - Master / control plane - // "NODE_POOL" - Node pool - ResourceType string `json:"resourceType,omitempty"` - // Version: The release version available for upgrade. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReleaseChannel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReleaseChannel") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpgradeAvailableEvent) MarshalJSON() ([]byte, error) { - type NoMethod UpgradeAvailableEvent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpgradeDetails: UpgradeDetails contains detailed information of each -// individual upgrade operation. -type UpgradeDetails struct { - // EndTime: The end timestamp of the upgrade. - EndTime string `json:"endTime,omitempty"` - // InitialVersion: The version before the upgrade. - InitialVersion string `json:"initialVersion,omitempty"` - // StartTime: The start timestamp of the upgrade. - StartTime string `json:"startTime,omitempty"` - // StartType: The start type of the upgrade. - // - // Possible values: - // "START_TYPE_UNSPECIFIED" - Upgrade start type is unspecified. - // "AUTOMATIC" - Upgrade started automatically. - // "MANUAL" - Upgrade started manually. - StartType string `json:"startType,omitempty"` - // State: Output only. The state of the upgrade. - // - // Possible values: - // "UNKNOWN" - Upgrade state is unknown. - // "FAILED" - Upgrade has failed with an error. - // "SUCCEEDED" - Upgrade has succeeded. - // "CANCELED" - Upgrade has been canceled. - // "RUNNING" - Upgrade is running. - State string `json:"state,omitempty"` - // TargetVersion: The version after the upgrade. - TargetVersion string `json:"targetVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpgradeDetails) MarshalJSON() ([]byte, error) { - type NoMethod UpgradeDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpgradeEvent: UpgradeEvent is a notification sent to customers by the -// cluster server when a resource is upgrading. -type UpgradeEvent struct { - // CurrentVersion: The current version before the upgrade. - CurrentVersion string `json:"currentVersion,omitempty"` - // Operation: The operation associated with this upgrade. - Operation string `json:"operation,omitempty"` - // OperationStartTime: The time when the operation was started. - OperationStartTime string `json:"operationStartTime,omitempty"` - // Resource: Optional relative path to the resource. For example in node pool - // upgrades, the relative path of the node pool. - Resource string `json:"resource,omitempty"` - // ResourceType: The resource type that is upgrading. - // - // Possible values: - // "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" - Default value. This shouldn't be - // used. - // "MASTER" - Master / control plane - // "NODE_POOL" - Node pool - ResourceType string `json:"resourceType,omitempty"` - // TargetVersion: The target version for the upgrade. - TargetVersion string `json:"targetVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpgradeEvent) MarshalJSON() ([]byte, error) { - type NoMethod UpgradeEvent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpgradeInfoEvent: UpgradeInfoEvent is a notification sent to customers about -// the upgrade information of a resource. -type UpgradeInfoEvent struct { - // CurrentVersion: The current version before the upgrade. - CurrentVersion string `json:"currentVersion,omitempty"` - // Description: A brief description of the event. - Description string `json:"description,omitempty"` - // EndTime: The time when the operation ended. - EndTime string `json:"endTime,omitempty"` - // EventType: The type of the event. - // - // Possible values: - // "EVENT_TYPE_UNSPECIFIED" - EVENT_TYPE_UNSPECIFIED indicates the event type - // is unspecified. - // "END_OF_SUPPORT" - END_OF_SUPPORT indicates GKE version reaches end of - // support, check standard_support_end_time and extended_support_end_time for - // more details. - // "COS_MILESTONE_VERSION_UPDATE" - COS_MILESTONE_VERSION_UPDATE indicates - // that the COS node image will update COS milestone version for new patch - // versions starting with the one in the description. - // "UPGRADE_LIFECYCLE" - UPGRADE_LIFECYCLE indicates the event is about the - // upgrade lifecycle. - EventType string `json:"eventType,omitempty"` - // ExtendedSupportEndTime: The end of extended support timestamp. - ExtendedSupportEndTime string `json:"extendedSupportEndTime,omitempty"` - // Operation: The operation associated with this upgrade. - Operation string `json:"operation,omitempty"` - // Resource: Optional relative path to the resource. For example in node pool - // upgrades, the relative path of the node pool. - Resource string `json:"resource,omitempty"` - // ResourceType: The resource type associated with the upgrade. - // - // Possible values: - // "UPGRADE_RESOURCE_TYPE_UNSPECIFIED" - Default value. This shouldn't be - // used. - // "MASTER" - Master / control plane - // "NODE_POOL" - Node pool - ResourceType string `json:"resourceType,omitempty"` - // StandardSupportEndTime: The end of standard support timestamp. - StandardSupportEndTime string `json:"standardSupportEndTime,omitempty"` - // StartTime: The time when the operation was started. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The state of the upgrade. - // - // Possible values: - // "STATE_UNSPECIFIED" - STATE_UNSPECIFIED indicates the state is - // unspecified. - // "STARTED" - STARTED indicates the upgrade has started. - // "SUCCEEDED" - SUCCEEDED indicates the upgrade has completed successfully. - // "FAILED" - FAILED indicates the upgrade has failed. - // "CANCELED" - CANCELED indicates the upgrade has canceled. - State string `json:"state,omitempty"` - // TargetVersion: The target version for the upgrade. - TargetVersion string `json:"targetVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpgradeInfoEvent) MarshalJSON() ([]byte, error) { - type NoMethod UpgradeInfoEvent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UpgradeSettings: These upgrade settings control the level of parallelism and -// the level of disruption caused by an upgrade. maxUnavailable controls the -// number of nodes that can be simultaneously unavailable. maxSurge controls -// the number of additional nodes that can be added to the node pool -// temporarily for the time of the upgrade to increase the number of available -// nodes. (maxUnavailable + maxSurge) determines the level of parallelism (how -// many nodes are being upgraded at the same time). Note: upgrades inevitably -// introduce some disruption since workloads need to be moved from old nodes to -// new, upgraded ones. Even if maxUnavailable=0, this holds true. (Disruption -// stays within the limits of PodDisruptionBudget, if it is configured.) -// Consider a hypothetical node pool with 5 nodes having maxSurge=2, -// maxUnavailable=1. This means the upgrade process upgrades 3 nodes -// simultaneously. It creates 2 additional (upgraded) nodes, then it brings -// down 3 old (not yet upgraded) nodes at the same time. This ensures that -// there are always at least 4 nodes available. These upgrade settings -// configure the upgrade strategy for the node pool. Use strategy to switch -// between the strategies applied to the node pool. If the strategy is ROLLING, -// use max_surge and max_unavailable to control the level of parallelism and -// the level of disruption caused by upgrade. 1. maxSurge controls the number -// of additional nodes that can be added to the node pool temporarily for the -// time of the upgrade to increase the number of available nodes. 2. -// maxUnavailable controls the number of nodes that can be simultaneously -// unavailable. 3. (maxUnavailable + maxSurge) determines the level of -// parallelism (how many nodes are being upgraded at the same time). If the -// strategy is BLUE_GREEN, use blue_green_settings to configure the blue-green -// upgrade related settings. 1. standard_rollout_policy is the default policy. -// The policy is used to control the way blue pool gets drained. The draining -// is executed in the batch mode. The batch size could be specified as either -// percentage of the node pool size or the number of nodes. batch_soak_duration -// is the soak time after each batch gets drained. 2. node_pool_soak_duration -// is the soak time after all blue nodes are drained. After this period, the -// blue pool nodes will be deleted. -type UpgradeSettings struct { - // BlueGreenSettings: Settings for blue-green upgrade strategy. - BlueGreenSettings *BlueGreenSettings `json:"blueGreenSettings,omitempty"` - // MaxSurge: The maximum number of nodes that can be created beyond the current - // size of the node pool during the upgrade process. - MaxSurge int64 `json:"maxSurge,omitempty"` - // MaxUnavailable: The maximum number of nodes that can be simultaneously - // unavailable during the upgrade process. A node is considered available if - // its status is Ready. - MaxUnavailable int64 `json:"maxUnavailable,omitempty"` - // Strategy: Update strategy of the node pool. - // - // Possible values: - // "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" - Default value if unset. GKE - // internally defaults the update strategy to SURGE for unspecified strategies. - // "BLUE_GREEN" - blue-green upgrade. - // "SURGE" - SURGE is the traditional way of upgrade a node pool. max_surge - // and max_unavailable determines the level of upgrade parallelism. - Strategy string `json:"strategy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlueGreenSettings") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlueGreenSettings") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UpgradeSettings) MarshalJSON() ([]byte, error) { - type NoMethod UpgradeSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetwork: UsableSubnetwork resource returns the subnetwork name, its -// associated network and the primary CIDR range. -type UsableSubnetwork struct { - // IpCidrRange: The range of internal addresses that are owned by this - // subnetwork. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // Network: Network Name. Example: - // projects/my-project/global/networks/my-network - Network string `json:"network,omitempty"` - // SecondaryIpRanges: Secondary IP ranges. - SecondaryIpRanges []*UsableSubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` - // StatusMessage: A human readable status message representing the reasons for - // cases where the caller cannot use the secondary ranges under the subnet. For - // example if the secondary_ip_ranges is empty due to a permission issue, an - // insufficient permission message will be given by status_message. - StatusMessage string `json:"statusMessage,omitempty"` - // Subnetwork: Subnetwork Name. Example: - // projects/my-project/regions/us-central1/subnetworks/my-subnet - Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetwork) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UsableSubnetworkSecondaryRange: Secondary IP range of a usable subnetwork. -type UsableSubnetworkSecondaryRange struct { - // IpCidrRange: The range of IP addresses belonging to this subnetwork - // secondary range. - IpCidrRange string `json:"ipCidrRange,omitempty"` - // RangeName: The name associated with this subnetwork secondary range, used - // when adding an alias IP range to a VM instance. - RangeName string `json:"rangeName,omitempty"` - // Status: This field is to determine the status of the secondary range - // programmably. - // - // Possible values: - // "UNKNOWN" - UNKNOWN is the zero value of the Status enum. It's not a valid - // status. - // "UNUSED" - UNUSED denotes that this range is unclaimed by any cluster. - // "IN_USE_SERVICE" - IN_USE_SERVICE denotes that this range is claimed by - // cluster(s) for services. User-managed services range can be shared between - // clusters within the same subnetwork. - // "IN_USE_SHAREABLE_POD" - IN_USE_SHAREABLE_POD denotes this range was - // created by the network admin and is currently claimed by a cluster for pods. - // It can only be used by other clusters as a pod range. - // "IN_USE_MANAGED_POD" - IN_USE_MANAGED_POD denotes this range was created - // by GKE and is claimed for pods. It cannot be used for other clusters. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpCidrRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpCidrRange") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { - type NoMethod UsableSubnetworkSecondaryRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UserManagedKeysConfig: UserManagedKeysConfig holds the resource address to -// Keys which are used for signing certs and token that are used for -// communication within cluster. -type UserManagedKeysConfig struct { - // AggregationCa: The Certificate Authority Service caPool to use for the - // aggregation CA in this cluster. - AggregationCa string `json:"aggregationCa,omitempty"` - // ClusterCa: The Certificate Authority Service caPool to use for the cluster - // CA in this cluster. - ClusterCa string `json:"clusterCa,omitempty"` - // ControlPlaneDiskEncryptionKey: The Cloud KMS cryptoKey to use for - // Confidential Hyperdisk on the control plane nodes. - ControlPlaneDiskEncryptionKey string `json:"controlPlaneDiskEncryptionKey,omitempty"` - // ControlPlaneDiskEncryptionKeyVersions: Output only. All of the versions of - // the Cloud KMS cryptoKey that are used by Confidential Hyperdisks on the - // control plane nodes. - ControlPlaneDiskEncryptionKeyVersions []string `json:"controlPlaneDiskEncryptionKeyVersions,omitempty"` - // EtcdApiCa: Resource path of the Certificate Authority Service caPool to use - // for the etcd API CA in this cluster. - EtcdApiCa string `json:"etcdApiCa,omitempty"` - // EtcdPeerCa: Resource path of the Certificate Authority Service caPool to use - // for the etcd peer CA in this cluster. - EtcdPeerCa string `json:"etcdPeerCa,omitempty"` - // GkeopsEtcdBackupEncryptionKey: Resource path of the Cloud KMS cryptoKey to - // use for encryption of internal etcd backups. - GkeopsEtcdBackupEncryptionKey string `json:"gkeopsEtcdBackupEncryptionKey,omitempty"` - // ServiceAccountSigningKeys: The Cloud KMS cryptoKeyVersions to use for - // signing service account JWTs issued by this cluster. Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{crypt - // oKey}/cryptoKeyVersions/{cryptoKeyVersion}` - ServiceAccountSigningKeys []string `json:"serviceAccountSigningKeys,omitempty"` - // ServiceAccountVerificationKeys: The Cloud KMS cryptoKeyVersions to use for - // verifying service account JWTs issued by this cluster. Format: - // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{crypt - // oKey}/cryptoKeyVersions/{cryptoKeyVersion}` - ServiceAccountVerificationKeys []string `json:"serviceAccountVerificationKeys,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregationCa") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AggregationCa") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s UserManagedKeysConfig) MarshalJSON() ([]byte, error) { - type NoMethod UserManagedKeysConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerticalPodAutoscaling: VerticalPodAutoscaling contains global, per-cluster -// information required by Vertical Pod Autoscaler to automatically adjust the -// resources of pods controlled by it. -type VerticalPodAutoscaling struct { - // Enabled: Enables vertical pod autoscaling. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { - type NoMethod VerticalPodAutoscaling - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VirtualNIC: Configuration of gVNIC feature. -type VirtualNIC struct { - // Enabled: Whether gVNIC features are enabled in the node pool. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s VirtualNIC) MarshalJSON() ([]byte, error) { - type NoMethod VirtualNIC - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WindowsNodeConfig: Parameters that can be configured on Windows nodes. -// Windows Node Config that define the parameters that will be used to -// configure the Windows node pool settings. -type WindowsNodeConfig struct { - // OsVersion: OSVersion specifies the Windows node config to be used on the - // node. - // - // Possible values: - // "OS_VERSION_UNSPECIFIED" - When OSVersion is not specified. - // "OS_VERSION_LTSC2019" - LTSC2019 specifies to use LTSC2019 as the Windows - // Servercore Base Image. - // "OS_VERSION_LTSC2022" - LTSC2022 specifies to use LTSC2022 as the Windows - // Servercore Base Image. - OsVersion string `json:"osVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "OsVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OsVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WindowsNodeConfig) MarshalJSON() ([]byte, error) { - type NoMethod WindowsNodeConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadIdentityConfig: Configuration for the use of Kubernetes Service -// Accounts in IAM policies. -type WorkloadIdentityConfig struct { - // WorkloadPool: The workload pool to attach all Kubernetes service accounts - // to. - WorkloadPool string `json:"workloadPool,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkloadPool") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkloadPool") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadIdentityConfig) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadIdentityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadMetadataConfig: WorkloadMetadataConfig defines the metadata -// configuration to expose to workloads on the node pool. -type WorkloadMetadataConfig struct { - // Mode: Mode is the configuration for how to expose metadata to workloads - // running on the node pool. - // - // Possible values: - // "MODE_UNSPECIFIED" - Not set. - // "GCE_METADATA" - Expose all Compute Engine metadata to pods. - // "GKE_METADATA" - Run the GKE Metadata Server on this node. The GKE - // Metadata Server exposes a metadata API to workloads that is compatible with - // the V1 Compute Metadata APIs exposed by the Compute Engine and App Engine - // Metadata Servers. This feature can only be enabled if Workload Identity is - // enabled at the cluster level. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadMetadataConfig) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadMetadataConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WorkloadPolicyConfig: WorkloadPolicyConfig is the configuration related to -// GCW workload policy -type WorkloadPolicyConfig struct { - // AllowNetAdmin: If true, workloads can use NET_ADMIN capability. - AllowNetAdmin bool `json:"allowNetAdmin,omitempty"` - // AutopilotCompatibilityAuditingEnabled: If true, enables the GCW Auditor that - // audits workloads on standard clusters. - AutopilotCompatibilityAuditingEnabled bool `json:"autopilotCompatibilityAuditingEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowNetAdmin") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowNetAdmin") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WorkloadPolicyConfig) MarshalJSON() ([]byte, error) { - type NoMethod WorkloadPolicyConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WritableCgroups: Defines writable cgroups configuration. -type WritableCgroups struct { - // Enabled: Optional. Whether writable cgroups is enabled. - Enabled bool `json:"enabled,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WritableCgroups) MarshalJSON() ([]byte, error) { - type NoMethod WritableCgroups - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProjectsAggregatedUsableSubnetworksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists subnetworks that are usable for creating clusters in a project. -// -// - parent: The parent project where subnetworks are usable. Specified in the -// format `projects/*`. -func (r *ProjectsAggregatedUsableSubnetworksService) List(parent string) *ProjectsAggregatedUsableSubnetworksListCall { - c := &ProjectsAggregatedUsableSubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering currently only -// supports equality on the networkProjectId and must be in the form: -// "networkProjectId=[PROJECTID]", where `networkProjectId` is the project -// which owns the listed subnetworks. This defaults to the parent project ID. -func (c *ProjectsAggregatedUsableSubnetworksListCall) Filter(filter string) *ProjectsAggregatedUsableSubnetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The max number of results -// per page that should be returned. If the number of available results is -// larger than `page_size`, a `next_page_token` is returned which can be used -// to get the next page of results in subsequent requests. Acceptable values -// are 0 to 500, inclusive. (Default: 500) -func (c *ProjectsAggregatedUsableSubnetworksListCall) PageSize(pageSize int64) *ProjectsAggregatedUsableSubnetworksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set this to the nextPageToken returned by previous list requests to get -// the next page of results. -func (c *ProjectsAggregatedUsableSubnetworksListCall) PageToken(pageToken string) *ProjectsAggregatedUsableSubnetworksListCall { - 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 -// details. -func (c *ProjectsAggregatedUsableSubnetworksListCall) Fields(s ...googleapi.Field) *ProjectsAggregatedUsableSubnetworksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsAggregatedUsableSubnetworksListCall) IfNoneMatch(entityTag string) *ProjectsAggregatedUsableSubnetworksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsAggregatedUsableSubnetworksListCall) Context(ctx context.Context) *ProjectsAggregatedUsableSubnetworksListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aggregated/usableSubnetworks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.aggregated.usableSubnetworks.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.aggregated.usableSubnetworks.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListUsableSubnetworksResponse.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 *ProjectsAggregatedUsableSubnetworksListCall) Do(opts ...googleapi.CallOption) (*ListUsableSubnetworksResponse, 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 := &ListUsableSubnetworksResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.aggregated.usableSubnetworks.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsAggregatedUsableSubnetworksListCall) Pages(ctx context.Context, f func(*ListUsableSubnetworksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGetServerConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetServerConfig: Returns configuration info about the Google Kubernetes -// Engine service. -// -// - name: The name (project and location) of the server config to get, -// specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocationsGetServerConfigCall { - c := &ProjectsLocationsGetServerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *ProjectsLocationsGetServerConfigCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// to return operations for. This field has been deprecated and replaced by the -// name field. -func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGetServerConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetServerConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGetServerConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetServerConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetServerConfigCall) Context(ctx context.Context) *ProjectsLocationsGetServerConfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serverConfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.getServerConfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.getServerConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServerConfig.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 *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, 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 := &ServerConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.getServerConfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersCheckAutopilotCompatibilityCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// CheckAutopilotCompatibility: Checks the cluster compatibility with Autopilot -// mode, and returns a list of compatibility issues. -// -// - name: The name (project, location, cluster) of the cluster to retrieve. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) CheckAutopilotCompatibility(name string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { - c := &ProjectsLocationsClustersCheckAutopilotCompatibilityCall{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 -// details. -func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Context(ctx context.Context) *ProjectsLocationsClustersCheckAutopilotCompatibilityCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkAutopilotCompatibility") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.checkAutopilotCompatibility", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.checkAutopilotCompatibility" call. -// Any non-2xx status code is an error. Response headers are in either -// *CheckAutopilotCompatibilityResponse.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 *ProjectsLocationsClustersCheckAutopilotCompatibilityCall) Do(opts ...googleapi.CallOption) (*CheckAutopilotCompatibilityResponse, 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 := &CheckAutopilotCompatibilityResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.checkAutopilotCompatibility", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersCompleteIpRotationCall struct { - s *Service - name string - completeiprotationrequest *CompleteIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CompleteIpRotation: Completes master IP rotation. -// -// - name: The name (project, location, cluster name) of the cluster to -// complete IP rotation. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) CompleteIpRotation(name string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsLocationsClustersCompleteIpRotationCall { - c := &ProjectsLocationsClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.completeiprotationrequest = completeiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCompleteIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersCompleteIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.completeiprotationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:completeIpRotation") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.completeIpRotation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.completeIpRotation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersCompleteIpRotationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.completeIpRotation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersCreateCall struct { - s *Service - parent string - createclusterrequest *CreateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a cluster, consisting of the specified number and type of -// Google Compute Engine instances. By default, the cluster is created in the -// project's default network -// (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One -// firewall is added for the cluster. After cluster creation, the kubelet -// creates routes for each node to allow the containers on that node to -// communicate with all other instances in the cluster. Finally, an entry is -// added to the project's global metadata indicating which CIDR range the -// cluster is using. -// -// - parent: The parent (project and location) where the cluster will be -// created. Specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsClustersService) Create(parent string, createclusterrequest *CreateClusterRequest) *ProjectsLocationsClustersCreateCall { - c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.createclusterrequest = createclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *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. -func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createclusterrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the cluster, including the Kubernetes endpoint and all -// worker nodes. Firewalls and routes that were configured during cluster -// creation are also deleted. Other Google Compute Engine resources that might -// be in use by the cluster, such as load balancer resources, are not deleted -// if they weren't present when the cluster was initially created. -// -// - name: The name (project, location, cluster) of the cluster to delete. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { - c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// ClusterId sets the optional parameter "clusterId": Deprecated. The name of -// the cluster to delete. This field has been deprecated and replaced by the -// name field. -func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { - c.urlParams_.Set("clusterId", clusterId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersDeleteCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the name field. -func (c *ProjectsLocationsClustersDeleteCall) Zone(zone string) *ProjectsLocationsClustersDeleteCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *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. -func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersFetchClusterUpgradeInfoCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchClusterUpgradeInfo: Fetch upgrade information of a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to get. -// Specified in the format `projects/*/locations/*/clusters/*` or -// `projects/*/zones/*/clusters/*`. -func (r *ProjectsLocationsClustersService) FetchClusterUpgradeInfo(name string) *ProjectsLocationsClustersFetchClusterUpgradeInfoCall { - c := &ProjectsLocationsClustersFetchClusterUpgradeInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Version sets the optional parameter "version": API request version that -// initiates this operation. -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) Version(version string) *ProjectsLocationsClustersFetchClusterUpgradeInfoCall { - c.urlParams_.Set("version", version) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersFetchClusterUpgradeInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersFetchClusterUpgradeInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) Context(ctx context.Context) *ProjectsLocationsClustersFetchClusterUpgradeInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchClusterUpgradeInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.fetchClusterUpgradeInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.fetchClusterUpgradeInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *ClusterUpgradeInfo.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 *ProjectsLocationsClustersFetchClusterUpgradeInfoCall) Do(opts ...googleapi.CallOption) (*ClusterUpgradeInfo, 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 := &ClusterUpgradeInfo{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.fetchClusterUpgradeInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 cluster. -// -// - name: The name (project, location, cluster) of the cluster to retrieve. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { - c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// ClusterId sets the optional parameter "clusterId": Deprecated. The name of -// the cluster to retrieve. This field has been deprecated and replaced by the -// name field. -func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { - c.urlParams_.Set("clusterId", clusterId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *ProjectsLocationsClustersGetCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the name field. -func (c *ProjectsLocationsClustersGetCall) Zone(zone string) *ProjectsLocationsClustersGetCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersGetJwksCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetJwks: Gets the public component of the cluster signing keys in JSON Web -// Key format. -// -// - parent: The cluster (project, location, cluster name) to get keys for. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) GetJwks(parent string) *ProjectsLocationsClustersGetJwksCall { - c := &ProjectsLocationsClustersGetJwksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersGetJwksCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetJwksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersGetJwksCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetJwksCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersGetJwksCall) Context(ctx context.Context) *ProjectsLocationsClustersGetJwksCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jwks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.getJwks", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.getJwks" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetJSONWebKeysResponse.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 *ProjectsLocationsClustersGetJwksCall) Do(opts ...googleapi.CallOption) (*GetJSONWebKeysResponse, 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 := &GetJSONWebKeysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.getJwks", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all clusters owned by a project in either the specified zone or -// all zones. -// -// - parent: The parent (project and location) where the clusters will be -// listed. Specified in the format `projects/*/locations/*`. Location "-" -// matches all zones and all regions. -func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { - c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *ProjectsLocationsClustersListCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides, or "-" for all zones. This field has been -// deprecated and replaced by the parent field. -func (c *ProjectsLocationsClustersListCall) Zone(zone string) *ProjectsLocationsClustersListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetAddonsCall struct { - s *Service - name string - setaddonsconfigrequest *SetAddonsConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAddons: Sets the addons for a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to set addons. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetAddons(name string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsLocationsClustersSetAddonsCall { - c := &ProjectsLocationsClustersSetAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setaddonsconfigrequest = setaddonsconfigrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetAddonsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetAddonsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetAddonsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetAddonsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setaddonsconfigrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAddons") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setAddons", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setAddons" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetAddonsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setAddons", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetLegacyAbacCall struct { - s *Service - name string - setlegacyabacrequest *SetLegacyAbacRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLegacyAbac: Enables or disables the ABAC authorization mechanism on a -// cluster. -// -// - name: The name (project, location, cluster name) of the cluster to set -// legacy abac. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetLegacyAbac(name string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsLocationsClustersSetLegacyAbacCall { - c := &ProjectsLocationsClustersSetLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setlegacyabacrequest = setlegacyabacrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLegacyAbacCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetLegacyAbacCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLegacyAbacCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlegacyabacrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLegacyAbac") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLegacyAbac", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setLegacyAbac" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetLegacyAbacCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLegacyAbac", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetLocationsCall struct { - s *Service - name string - setlocationsrequest *SetLocationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLocations: Sets the locations for a specific cluster. Deprecated. Use -// projects.locations.clusters.update -// (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) -// instead. -// -// - name: The name (project, location, cluster) of the cluster to set -// locations. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetLocations(name string, setlocationsrequest *SetLocationsRequest) *ProjectsLocationsClustersSetLocationsCall { - c := &ProjectsLocationsClustersSetLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setlocationsrequest = setlocationsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetLocationsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLocationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetLocationsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLocationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlocationsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLocations") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLocations", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setLocations" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetLocationsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLocations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetLoggingCall struct { - s *Service - name string - setloggingservicerequest *SetLoggingServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetLogging: Sets the logging service for a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to set logging. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetLogging(name string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsLocationsClustersSetLoggingCall { - c := &ProjectsLocationsClustersSetLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setloggingservicerequest = setloggingservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetLoggingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetLoggingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetLoggingCall) Context(ctx context.Context) *ProjectsLocationsClustersSetLoggingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setloggingservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLogging") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLogging", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setLogging" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetLoggingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setLogging", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetMaintenancePolicyCall struct { - s *Service - name string - setmaintenancepolicyrequest *SetMaintenancePolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMaintenancePolicy: Sets the maintenance policy for a cluster. -// -// - name: The name (project, location, cluster name) of the cluster to set -// maintenance policy. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetMaintenancePolicy(name string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsLocationsClustersSetMaintenancePolicyCall { - c := &ProjectsLocationsClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setmaintenancepolicyrequest = setmaintenancepolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMaintenancePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMaintenancePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmaintenancepolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMaintenancePolicy") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMaintenancePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setMaintenancePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMaintenancePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetMasterAuthCall struct { - s *Service - name string - setmasterauthrequest *SetMasterAuthRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMasterAuth: Sets master auth materials. Currently supports changing the -// admin password or a specific cluster, either via password generation or -// explicitly setting the password. -// -// - name: The name (project, location, cluster) of the cluster to set auth. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetMasterAuth(name string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsLocationsClustersSetMasterAuthCall { - c := &ProjectsLocationsClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setmasterauthrequest = setmasterauthrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMasterAuthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMasterAuthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmasterauthrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMasterAuth") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMasterAuth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setMasterAuth" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetMasterAuthCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMasterAuth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetMonitoringCall struct { - s *Service - name string - setmonitoringservicerequest *SetMonitoringServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMonitoring: Sets the monitoring service for a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to set -// monitoring. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetMonitoring(name string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsLocationsClustersSetMonitoringCall { - c := &ProjectsLocationsClustersSetMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setmonitoringservicerequest = setmonitoringservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetMonitoringCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetMonitoringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetMonitoringCall) Context(ctx context.Context) *ProjectsLocationsClustersSetMonitoringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmonitoringservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMonitoring") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMonitoring", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setMonitoring" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetMonitoringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setMonitoring", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetNetworkPolicyCall struct { - s *Service - name string - setnetworkpolicyrequest *SetNetworkPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNetworkPolicy: Enables or disables Network Policy for a cluster. -// -// - name: The name (project, location, cluster name) of the cluster to set -// networking policy. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetNetworkPolicy(name string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsLocationsClustersSetNetworkPolicyCall { - c := &ProjectsLocationsClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setnetworkpolicyrequest = setnetworkpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetNetworkPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsLocationsClustersSetNetworkPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnetworkpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setNetworkPolicy") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setNetworkPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setNetworkPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetNetworkPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setNetworkPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersSetResourceLabelsCall struct { - s *Service - name string - setlabelsrequest *SetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetResourceLabels: Sets labels on a cluster. -// -// - name: The name (project, location, cluster name) of the cluster to set -// labels. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) SetResourceLabels(name string, setlabelsrequest *SetLabelsRequest) *ProjectsLocationsClustersSetResourceLabelsCall { - c := &ProjectsLocationsClustersSetResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setlabelsrequest = setlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersSetResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSetResourceLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersSetResourceLabelsCall) Context(ctx context.Context) *ProjectsLocationsClustersSetResourceLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setResourceLabels") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setResourceLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.setResourceLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersSetResourceLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.setResourceLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersStartIpRotationCall struct { - s *Service - name string - startiprotationrequest *StartIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartIpRotation: Starts master IP rotation. -// -// - name: The name (project, location, cluster name) of the cluster to start -// IP rotation. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) StartIpRotation(name string, startiprotationrequest *StartIPRotationRequest) *ProjectsLocationsClustersStartIpRotationCall { - c := &ProjectsLocationsClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.startiprotationrequest = startiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersStartIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsLocationsClustersStartIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.startiprotationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:startIpRotation") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.startIpRotation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.startIpRotation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersStartIpRotationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.startIpRotation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersUpdateCall struct { - s *Service - name string - updateclusterrequest *UpdateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the settings of a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to update. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) Update(name string, updateclusterrequest *UpdateClusterRequest) *ProjectsLocationsClustersUpdateCall { - c := &ProjectsLocationsClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.updateclusterrequest = updateclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updateclusterrequest) - if err != nil { - return nil, err - } - 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("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersUpdateMasterCall struct { - s *Service - name string - updatemasterrequest *UpdateMasterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateMaster: Updates the master for a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to update. -// Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersService) UpdateMaster(name string, updatemasterrequest *UpdateMasterRequest) *ProjectsLocationsClustersUpdateMasterCall { - c := &ProjectsLocationsClustersUpdateMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.updatemasterrequest = updatemasterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersUpdateMasterCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpdateMasterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersUpdateMasterCall) Context(ctx context.Context) *ProjectsLocationsClustersUpdateMasterCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatemasterrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateMaster") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.updateMaster", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.updateMaster" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersUpdateMasterCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.updateMaster", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsCompleteUpgradeCall struct { - s *Service - name string - completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CompleteUpgrade: CompleteNodePoolUpgrade will signal an on-going node pool -// upgrade to complete. -// -// - name: The name (project, location, cluster, node pool id) of the node pool -// to complete upgrade. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) CompleteUpgrade(name string, completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { - c := &ProjectsLocationsClustersNodePoolsCompleteUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.completenodepoolupgraderequest = completenodepoolupgraderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.completenodepoolupgraderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:completeUpgrade") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.completeUpgrade", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.completeUpgrade" call. -// 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 *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.completeUpgrade", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsCreateCall struct { - s *Service - parent string - createnodepoolrequest *CreateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a node pool for a cluster. -// -// - parent: The parent (project, location, cluster name) where the node pool -// will be created. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersNodePoolsService) Create(parent string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsLocationsClustersNodePoolsCreateCall { - c := &ProjectsLocationsClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.createnodepoolrequest = createnodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createnodepoolrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a node pool from a cluster. -// -// - name: The name (project, location, cluster, node pool id) of the node pool -// to delete. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *ProjectsLocationsClustersNodePoolsDeleteCall { - c := &ProjectsLocationsClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// ClusterId sets the optional parameter "clusterId": Deprecated. The name of -// the cluster. This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.urlParams_.Set("clusterId", clusterId) - return c -} - -// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The name of -// the node pool to delete. This field has been deprecated and replaced by the -// name field. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.urlParams_.Set("nodePoolId", nodePoolId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the name field. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchNodePoolUpgradeInfo: Fetch upgrade information of a specific nodepool. -// -// - name: The name (project, location, cluster, nodepool) of the nodepool to -// get. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*` or -// `projects/*/zones/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) FetchNodePoolUpgradeInfo(name string) *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c := &ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Version sets the optional parameter "version": API request version that -// initiates this operation. -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) Version(version string) *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.urlParams_.Set("version", version) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchNodePoolUpgradeInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.fetchNodePoolUpgradeInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.fetchNodePoolUpgradeInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodePoolUpgradeInfo.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 *ProjectsLocationsClustersNodePoolsFetchNodePoolUpgradeInfoCall) Do(opts ...googleapi.CallOption) (*NodePoolUpgradeInfo, 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 := &NodePoolUpgradeInfo{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.fetchNodePoolUpgradeInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the requested node pool. -// -// - name: The name (project, location, cluster, node pool id) of the node pool -// to get. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLocationsClustersNodePoolsGetCall { - c := &ProjectsLocationsClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// ClusterId sets the optional parameter "clusterId": Deprecated. The name of -// the cluster. This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { - c.urlParams_.Set("clusterId", clusterId) - return c -} - -// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The name of -// the node pool. This field has been deprecated and replaced by the name -// field. -func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { - c.urlParams_.Set("nodePoolId", nodePoolId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsGetCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the name field. -func (c *ProjectsLocationsClustersNodePoolsGetCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsGetCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodePool.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 *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, 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 := &NodePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the node pools for a cluster. -// -// - parent: The parent (project, location, cluster name) where the node pools -// will be listed. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *ProjectsLocationsClustersNodePoolsListCall { - c := &ProjectsLocationsClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ClusterId sets the optional parameter "clusterId": Deprecated. The name of -// the cluster. This field has been deprecated and replaced by the parent -// field. -func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { - c.urlParams_.Set("clusterId", clusterId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) *ProjectsLocationsClustersNodePoolsListCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the parent field. -func (c *ProjectsLocationsClustersNodePoolsListCall) Zone(zone string) *ProjectsLocationsClustersNodePoolsListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersNodePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListNodePoolsResponse.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 *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, 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 := &ListNodePoolsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsRollbackCall struct { - s *Service - name string - rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Rollback: Rolls back a previously Aborted or Failed NodePool upgrade. This -// makes no changes if the last upgrade successfully completed. -// -// - name: The name (project, location, cluster, node pool id) of the node poll -// to rollback upgrade. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) Rollback(name string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsRollbackCall { - c := &ProjectsLocationsClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsRollbackCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsRollbackCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbacknodepoolupgraderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.rollback", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.rollback" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsRollbackCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.rollback", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsSetAutoscalingCall struct { - s *Service - name string - setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetAutoscaling: Sets the autoscaling settings for the specified node pool. -// -// - name: The name (project, location, cluster, node pool) of the node pool to -// set autoscaler settings. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) SetAutoscaling(name string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { - c := &ProjectsLocationsClustersNodePoolsSetAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetAutoscalingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolautoscalingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAutoscaling") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setAutoscaling", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.setAutoscaling" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setAutoscaling", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsSetManagementCall struct { - s *Service - name string - setnodepoolmanagementrequest *SetNodePoolManagementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetManagement: Sets the NodeManagement options for a node pool. -// -// - name: The name (project, location, cluster, node pool id) of the node pool -// to set management properties. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) SetManagement(name string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsLocationsClustersNodePoolsSetManagementCall { - c := &ProjectsLocationsClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setnodepoolmanagementrequest = setnodepoolmanagementrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetManagementCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetManagementCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolmanagementrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setManagement") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setManagement", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.setManagement" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setManagement", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsSetSizeCall struct { - s *Service - name string - setnodepoolsizerequest *SetNodePoolSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSize: Sets the size for a specific node pool. The new size will be used -// for all replicas, including future replicas created by modifying -// NodePool.locations. -// -// - name: The name (project, location, cluster, node pool id) of the node pool -// to set size. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) SetSize(name string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsLocationsClustersNodePoolsSetSizeCall { - c := &ProjectsLocationsClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.setnodepoolsizerequest = setnodepoolsizerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsSetSizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsSetSizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolsizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setSize") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setSize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.setSize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.setSize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersNodePoolsUpdateCall struct { - s *Service - name string - updatenodepoolrequest *UpdateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the version and/or image type for the specified node pool. -// -// - name: The name (project, location, cluster, node pool) of the node pool to -// update. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (r *ProjectsLocationsClustersNodePoolsService) Update(name string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsLocationsClustersNodePoolsUpdateCall { - c := &ProjectsLocationsClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.updatenodepoolrequest = updatenodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatenodepoolrequest) - if err != nil { - return nil, err - } - 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("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.nodePools.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsClustersNodePoolsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.nodePools.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetOpenidConfiguration: Gets the OIDC discovery document for the cluster. -// See the OpenID Connect Discovery 1.0 specification -// (https://openid.net/specs/openid-connect-discovery-1_0.html) for details. -// -// - parent: The cluster (project, location, cluster name) to get the discovery -// document for. Specified in the format `projects/*/locations/*/clusters/*`. -func (r *ProjectsLocationsClustersWellKnownService) GetOpenidConfiguration(parent string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { - c := &ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Context(ctx context.Context) *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/.well-known/openid-configuration") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.well-known.getOpenid-configuration", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.clusters.well-known.getOpenid-configuration" call. -// Any non-2xx status code is an error. Response headers are in either -// *GetOpenIDConfigResponse.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 *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Do(opts ...googleapi.CallOption) (*GetOpenIDConfigResponse, 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 := &GetOpenIDConfigResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.clusters.well-known.getOpenid-configuration", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified operation. -// -// - name: The name (project, location, operation id) of the operation to -// cancel. Specified in the format `projects/*/locations/*/operations/*`. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.operations.cancel" call. -// 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 *ProjectsLocationsOperationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified operation. -// -// - name: The name (project, location, operation id) of the operation to get. -// Specified in the format `projects/*/locations/*/operations/*`. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// OperationId sets the optional parameter "operationId": Deprecated. The -// server-assigned `name` of the operation. This field has been deprecated and -// replaced by the name field. -func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("operationId", operationId) - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// in which the cluster resides. This field has been deprecated and replaced by -// the name field. -func (c *ProjectsLocationsOperationsGetCall) Zone(zone string) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOperationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all operations in a project in a specific zone or all zones. -// -// - parent: The parent (project and location) where the operations will be -// listed. Specified in the format `projects/*/locations/*`. Location "-" -// matches all zones and all regions. -func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// ProjectId sets the optional parameter "projectId": Deprecated. The Google -// Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("projectId", projectId) - return c -} - -// Zone sets the optional parameter "zone": Deprecated. The name of the Google -// Compute Engine zone (https://cloud.google.com/compute/docs/zones#available) -// to return operations for, or `-` for all zones. This field has been -// deprecated and replaced by the parent field. -func (c *ProjectsLocationsOperationsListCall) Zone(zone string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("zone", zone) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.locations.operations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesGetServerconfigCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetServerconfig: Returns configuration info about the Google Kubernetes -// Engine service. -// -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) to return -// operations for. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { - c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Name sets the optional parameter "name": The name (project and location) of -// the server config to get, specified in the format `projects/*/locations/*`. -func (c *ProjectsZonesGetServerconfigCall) Name(name string) *ProjectsZonesGetServerconfigCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesGetServerconfigCall) Fields(s ...googleapi.Field) *ProjectsZonesGetServerconfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesGetServerconfigCall) IfNoneMatch(entityTag string) *ProjectsZonesGetServerconfigCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/serverconfig") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.getServerconfig", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.getServerconfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServerConfig.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 *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*ServerConfig, 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 := &ServerConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.getServerconfig", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersAddonsCall struct { - s *Service - projectId string - zone string - clusterId string - setaddonsconfigrequest *SetAddonsConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Addons: Sets the addons for a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Addons(projectId string, zone string, clusterId string, setaddonsconfigrequest *SetAddonsConfigRequest) *ProjectsZonesClustersAddonsCall { - c := &ProjectsZonesClustersAddonsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setaddonsconfigrequest = setaddonsconfigrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersAddonsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersAddonsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersAddonsCall) Context(ctx context.Context) *ProjectsZonesClustersAddonsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setaddonsconfigrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.addons", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.addons" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersAddonsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.addons", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersCompleteIpRotationCall struct { - s *Service - projectId string - zone string - clusterId string - completeiprotationrequest *CompleteIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CompleteIpRotation: Completes master IP rotation. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) CompleteIpRotation(projectId string, zone string, clusterId string, completeiprotationrequest *CompleteIPRotationRequest) *ProjectsZonesClustersCompleteIpRotationCall { - c := &ProjectsZonesClustersCompleteIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.completeiprotationrequest = completeiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCompleteIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersCompleteIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.completeiprotationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.completeIpRotation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.completeIpRotation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersCompleteIpRotationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.completeIpRotation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersCreateCall struct { - s *Service - projectId string - zone string - createclusterrequest *CreateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a cluster, consisting of the specified number and type of -// Google Compute Engine instances. By default, the cluster is created in the -// project's default network -// (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). One -// firewall is added for the cluster. After cluster creation, the kubelet -// creates routes for each node to allow the containers on that node to -// communicate with all other instances in the cluster. Finally, an entry is -// added to the project's global metadata indicating which CIDR range the -// cluster is using. -// -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the parent -// field. -func (r *ProjectsZonesClustersService) Create(projectId string, zone string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { - c := &ProjectsZonesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.createclusterrequest = createclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createclusterrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/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{ - "projectId": c.projectId, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersDeleteCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the cluster, including the Kubernetes endpoint and all -// worker nodes. Firewalls and routes that were configured during cluster -// creation are also deleted. Other Google Compute Engine resources that might -// be in use by the cluster, such as load balancer resources, are not deleted -// if they weren't present when the cluster was initially created. -// -// - clusterId: Deprecated. The name of the cluster to delete. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { - c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Name sets the optional parameter "name": The name (project, location, -// cluster) of the cluster to delete. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (c *ProjectsZonesClustersDeleteCall) Name(name string) *ProjectsZonesClustersDeleteCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersFetchClusterUpgradeInfoCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchClusterUpgradeInfo: Fetch upgrade information of a specific cluster. -// -// - name: The name (project, location, cluster) of the cluster to get. -// Specified in the format `projects/*/locations/*/clusters/*` or -// `projects/*/zones/*/clusters/*`. -func (r *ProjectsZonesClustersService) FetchClusterUpgradeInfo(name string) *ProjectsZonesClustersFetchClusterUpgradeInfoCall { - c := &ProjectsZonesClustersFetchClusterUpgradeInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Version sets the optional parameter "version": API request version that -// initiates this operation. -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) Version(version string) *ProjectsZonesClustersFetchClusterUpgradeInfoCall { - c.urlParams_.Set("version", version) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersFetchClusterUpgradeInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersFetchClusterUpgradeInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) Context(ctx context.Context) *ProjectsZonesClustersFetchClusterUpgradeInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersFetchClusterUpgradeInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchClusterUpgradeInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.fetchClusterUpgradeInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.fetchClusterUpgradeInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *ClusterUpgradeInfo.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 *ProjectsZonesClustersFetchClusterUpgradeInfoCall) Do(opts ...googleapi.CallOption) (*ClusterUpgradeInfo, 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 := &ClusterUpgradeInfo{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.fetchClusterUpgradeInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersGetCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the details of a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to retrieve. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { - c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Name sets the optional parameter "name": The name (project, location, -// cluster) of the cluster to retrieve. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (c *ProjectsZonesClustersGetCall) Name(name string) *ProjectsZonesClustersGetCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.get" call. -// 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 *ProjectsZonesClustersGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersLegacyAbacCall struct { - s *Service - projectId string - zone string - clusterId string - setlegacyabacrequest *SetLegacyAbacRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// LegacyAbac: Enables or disables the ABAC authorization mechanism on a -// cluster. -// -// - clusterId: Deprecated. The name of the cluster to update. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) LegacyAbac(projectId string, zone string, clusterId string, setlegacyabacrequest *SetLegacyAbacRequest) *ProjectsZonesClustersLegacyAbacCall { - c := &ProjectsZonesClustersLegacyAbacCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlegacyabacrequest = setlegacyabacrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersLegacyAbacCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLegacyAbacCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersLegacyAbacCall) Context(ctx context.Context) *ProjectsZonesClustersLegacyAbacCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlegacyabacrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.legacyAbac", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.legacyAbac" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLegacyAbacCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.legacyAbac", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersListCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all clusters owned by a project in either the specified zone or -// all zones. -// -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides, or "-" for all zones. This field has been deprecated and -// replaced by the parent field. -func (r *ProjectsZonesClustersService) List(projectId string, zone string) *ProjectsZonesClustersListCall { - c := &ProjectsZonesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Parent sets the optional parameter "parent": The parent (project and -// location) where the clusters will be listed. Specified in the format -// `projects/*/locations/*`. Location "-" matches all zones and all regions. -func (c *ProjectsZonesClustersListCall) Parent(parent string) *ProjectsZonesClustersListCall { - c.urlParams_.Set("parent", parent) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.list" call. -// 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 *ProjectsZonesClustersListCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersLocationsCall struct { - s *Service - projectId string - zone string - clusterId string - setlocationsrequest *SetLocationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Locations: Sets the locations for a specific cluster. Deprecated. Use -// projects.locations.clusters.update -// (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/update) -// instead. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Locations(projectId string, zone string, clusterId string, setlocationsrequest *SetLocationsRequest) *ProjectsZonesClustersLocationsCall { - c := &ProjectsZonesClustersLocationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlocationsrequest = setlocationsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersLocationsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLocationsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersLocationsCall) Context(ctx context.Context) *ProjectsZonesClustersLocationsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlocationsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.locations", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.locations" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLocationsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.locations", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersLoggingCall struct { - s *Service - projectId string - zone string - clusterId string - setloggingservicerequest *SetLoggingServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Logging: Sets the logging service for a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Logging(projectId string, zone string, clusterId string, setloggingservicerequest *SetLoggingServiceRequest) *ProjectsZonesClustersLoggingCall { - c := &ProjectsZonesClustersLoggingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setloggingservicerequest = setloggingservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersLoggingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersLoggingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersLoggingCall) Context(ctx context.Context) *ProjectsZonesClustersLoggingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setloggingservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.logging", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.logging" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersLoggingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.logging", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersMasterCall struct { - s *Service - projectId string - zone string - clusterId string - updatemasterrequest *UpdateMasterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Master: Updates the master for a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Master(projectId string, zone string, clusterId string, updatemasterrequest *UpdateMasterRequest) *ProjectsZonesClustersMasterCall { - c := &ProjectsZonesClustersMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.updatemasterrequest = updatemasterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersMasterCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMasterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersMasterCall) Context(ctx context.Context) *ProjectsZonesClustersMasterCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersMasterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatemasterrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.master", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.master" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersMasterCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.master", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersMonitoringCall struct { - s *Service - projectId string - zone string - clusterId string - setmonitoringservicerequest *SetMonitoringServiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Monitoring: Sets the monitoring service for a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Monitoring(projectId string, zone string, clusterId string, setmonitoringservicerequest *SetMonitoringServiceRequest) *ProjectsZonesClustersMonitoringCall { - c := &ProjectsZonesClustersMonitoringCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setmonitoringservicerequest = setmonitoringservicerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersMonitoringCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersMonitoringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersMonitoringCall) Context(ctx context.Context) *ProjectsZonesClustersMonitoringCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmonitoringservicerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.monitoring", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.monitoring" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersMonitoringCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.monitoring", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersResourceLabelsCall struct { - s *Service - projectId string - zone string - clusterId string - setlabelsrequest *SetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ResourceLabels: Sets labels on a cluster. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) ResourceLabels(projectId string, zone string, clusterId string, setlabelsrequest *SetLabelsRequest) *ProjectsZonesClustersResourceLabelsCall { - c := &ProjectsZonesClustersResourceLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setlabelsrequest = setlabelsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersResourceLabelsCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersResourceLabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersResourceLabelsCall) Context(ctx context.Context) *ProjectsZonesClustersResourceLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setlabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.resourceLabels", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.resourceLabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersResourceLabelsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.resourceLabels", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersSetMaintenancePolicyCall struct { - s *Service - projectId string - zone string - clusterId string - setmaintenancepolicyrequest *SetMaintenancePolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMaintenancePolicy: Sets the maintenance policy for a cluster. -// -// - clusterId: The name of the cluster to update. -// - projectId: The Google Developers Console project ID or project number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// - zone: The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. -func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall { - c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setmaintenancepolicyrequest = setmaintenancepolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmaintenancepolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setMaintenancePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.setMaintenancePolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersSetMaintenancePolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setMaintenancePolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersSetMasterAuthCall struct { - s *Service - projectId string - zone string - clusterId string - setmasterauthrequest *SetMasterAuthRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetMasterAuth: Sets master auth materials. Currently supports changing the -// admin password or a specific cluster, either via password generation or -// explicitly setting the password. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) SetMasterAuth(projectId string, zone string, clusterId string, setmasterauthrequest *SetMasterAuthRequest) *ProjectsZonesClustersSetMasterAuthCall { - c := &ProjectsZonesClustersSetMasterAuthCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setmasterauthrequest = setmasterauthrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersSetMasterAuthCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMasterAuthCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersSetMasterAuthCall) Context(ctx context.Context) *ProjectsZonesClustersSetMasterAuthCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setmasterauthrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setMasterAuth", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.setMasterAuth" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersSetMasterAuthCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setMasterAuth", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersSetNetworkPolicyCall struct { - s *Service - projectId string - zone string - clusterId string - setnetworkpolicyrequest *SetNetworkPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetNetworkPolicy: Enables or disables Network Policy for a cluster. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) SetNetworkPolicy(projectId string, zone string, clusterId string, setnetworkpolicyrequest *SetNetworkPolicyRequest) *ProjectsZonesClustersSetNetworkPolicyCall { - c := &ProjectsZonesClustersSetNetworkPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.setnetworkpolicyrequest = setnetworkpolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetNetworkPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetNetworkPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnetworkpolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setNetworkPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.setNetworkPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersSetNetworkPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.setNetworkPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersStartIpRotationCall struct { - s *Service - projectId string - zone string - clusterId string - startiprotationrequest *StartIPRotationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// StartIpRotation: Starts master IP rotation. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) StartIpRotation(projectId string, zone string, clusterId string, startiprotationrequest *StartIPRotationRequest) *ProjectsZonesClustersStartIpRotationCall { - c := &ProjectsZonesClustersStartIpRotationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.startiprotationrequest = startiprotationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersStartIpRotationCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersStartIpRotationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersStartIpRotationCall) Context(ctx context.Context) *ProjectsZonesClustersStartIpRotationCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.startiprotationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.startIpRotation", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.startIpRotation" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersStartIpRotationCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.startIpRotation", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersUpdateCall struct { - s *Service - projectId string - zone string - clusterId string - updateclusterrequest *UpdateClusterRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the settings of a specific cluster. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clusterId string, updateclusterrequest *UpdateClusterRequest) *ProjectsZonesClustersUpdateCall { - c := &ProjectsZonesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.updateclusterrequest = updateclusterrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updateclusterrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsAutoscalingCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Autoscaling: Sets the autoscaling settings for the specified node pool. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to upgrade. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) Autoscaling(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolautoscalingrequest *SetNodePoolAutoscalingRequest) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c := &ProjectsZonesClustersNodePoolsAutoscalingCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolautoscalingrequest = setnodepoolautoscalingrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsAutoscalingCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolautoscalingrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.autoscaling", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.autoscaling" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.autoscaling", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsCreateCall struct { - s *Service - projectId string - zone string - clusterId string - createnodepoolrequest *CreateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a node pool for a cluster. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the parent field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the parent -// field. -func (r *ProjectsZonesClustersNodePoolsService) Create(projectId string, zone string, clusterId string, createnodepoolrequest *CreateNodePoolRequest) *ProjectsZonesClustersNodePoolsCreateCall { - c := &ProjectsZonesClustersNodePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.createnodepoolrequest = createnodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createnodepoolrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsDeleteCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a node pool from a cluster. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to delete. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) Delete(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsDeleteCall { - c := &ProjectsZonesClustersNodePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - return c -} - -// Name sets the optional parameter "name": The name (project, location, -// cluster, node pool id) of the node pool to delete. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Name(name string) *ProjectsZonesClustersNodePoolsDeleteCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchNodePoolUpgradeInfo: Fetch upgrade information of a specific nodepool. -// -// - name: The name (project, location, cluster, nodepool) of the nodepool to -// get. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*` or -// `projects/*/zones/*/clusters/*/nodePools/*`. -func (r *ProjectsZonesClustersNodePoolsService) FetchNodePoolUpgradeInfo(name string) *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c := &ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Version sets the optional parameter "version": API request version that -// initiates this operation. -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) Version(version string) *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.urlParams_.Set("version", version) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchNodePoolUpgradeInfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.fetchNodePoolUpgradeInfo", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.fetchNodePoolUpgradeInfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodePoolUpgradeInfo.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 *ProjectsZonesClustersNodePoolsFetchNodePoolUpgradeInfoCall) Do(opts ...googleapi.CallOption) (*NodePoolUpgradeInfo, 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 := &NodePoolUpgradeInfo{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.fetchNodePoolUpgradeInfo", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsGetCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves the requested node pool. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool. This field has been -// deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) Get(projectId string, zone string, clusterId string, nodePoolId string) *ProjectsZonesClustersNodePoolsGetCall { - c := &ProjectsZonesClustersNodePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - return c -} - -// Name sets the optional parameter "name": The name (project, location, -// cluster, node pool id) of the node pool to get. Specified in the format -// `projects/*/locations/*/clusters/*/nodePools/*`. -func (c *ProjectsZonesClustersNodePoolsGetCall) Name(name string) *ProjectsZonesClustersNodePoolsGetCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodePool.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 *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) (*NodePool, 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 := &NodePool{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsListCall struct { - s *Service - projectId string - zone string - clusterId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the node pools for a cluster. -// -// - clusterId: Deprecated. The name of the cluster. This field has been -// deprecated and replaced by the parent field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the parent -// field. -func (r *ProjectsZonesClustersNodePoolsService) List(projectId string, zone string, clusterId string) *ProjectsZonesClustersNodePoolsListCall { - c := &ProjectsZonesClustersNodePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - return c -} - -// Parent sets the optional parameter "parent": The parent (project, location, -// cluster name) where the node pools will be listed. Specified in the format -// `projects/*/locations/*/clusters/*`. -func (c *ProjectsZonesClustersNodePoolsListCall) Parent(parent string) *ProjectsZonesClustersNodePoolsListCall { - c.urlParams_.Set("parent", parent) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListNodePoolsResponse.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 *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption) (*ListNodePoolsResponse, 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 := &ListNodePoolsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsRollbackCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Rollback: Rolls back a previously Aborted or Failed NodePool upgrade. This -// makes no changes if the last upgrade successfully completed. -// -// - clusterId: Deprecated. The name of the cluster to rollback. This field has -// been deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to rollback. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) Rollback(projectId string, zone string, clusterId string, nodePoolId string, rollbacknodepoolupgraderequest *RollbackNodePoolUpgradeRequest) *ProjectsZonesClustersNodePoolsRollbackCall { - c := &ProjectsZonesClustersNodePoolsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.rollbacknodepoolupgraderequest = rollbacknodepoolupgraderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsRollbackCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsRollbackCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.rollbacknodepoolupgraderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.rollback", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.rollback" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsRollbackCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.rollback", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsSetManagementCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolmanagementrequest *SetNodePoolManagementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetManagement: Sets the NodeManagement options for a node pool. -// -// - clusterId: Deprecated. The name of the cluster to update. This field has -// been deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to update. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) SetManagement(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolmanagementrequest *SetNodePoolManagementRequest) *ProjectsZonesClustersNodePoolsSetManagementCall { - c := &ProjectsZonesClustersNodePoolsSetManagementCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolmanagementrequest = setnodepoolmanagementrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetManagementCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetManagementCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolmanagementrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.setManagement", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.setManagement" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsSetManagementCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.setManagement", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsSetSizeCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - setnodepoolsizerequest *SetNodePoolSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSize: Sets the size for a specific node pool. The new size will be used -// for all replicas, including future replicas created by modifying -// NodePool.locations. -// -// - clusterId: Deprecated. The name of the cluster to update. This field has -// been deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to update. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) SetSize(projectId string, zone string, clusterId string, nodePoolId string, setnodepoolsizerequest *SetNodePoolSizeRequest) *ProjectsZonesClustersNodePoolsSetSizeCall { - c := &ProjectsZonesClustersNodePoolsSetSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.setnodepoolsizerequest = setnodepoolsizerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsSetSizeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsSetSizeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setnodepoolsizerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.setSize", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.setSize" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsSetSizeCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.setSize", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesClustersNodePoolsUpdateCall struct { - s *Service - projectId string - zone string - clusterId string - nodePoolId string - updatenodepoolrequest *UpdateNodePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the version and/or image type for the specified node pool. -// -// - clusterId: Deprecated. The name of the cluster to upgrade. This field has -// been deprecated and replaced by the name field. -// - nodePoolId: Deprecated. The name of the node pool to upgrade. This field -// has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesClustersNodePoolsService) Update(projectId string, zone string, clusterId string, nodePoolId string, updatenodepoolrequest *UpdateNodePoolRequest) *ProjectsZonesClustersNodePoolsUpdateCall { - c := &ProjectsZonesClustersNodePoolsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.clusterId = clusterId - c.nodePoolId = nodePoolId - c.updatenodepoolrequest = updatenodepoolrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatenodepoolrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "clusterId": c.clusterId, - "nodePoolId": c.nodePoolId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.clusters.nodePools.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesClustersNodePoolsUpdateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.clusters.nodePools.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesOperationsCancelCall struct { - s *Service - projectId string - zone string - operationId string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the specified operation. -// -// - operationId: Deprecated. The server-assigned `name` of the operation. This -// field has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// operation resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesOperationsService) Cancel(projectId string, zone string, operationId string, canceloperationrequest *CancelOperationRequest) *ProjectsZonesOperationsCancelCall { - c := &ProjectsZonesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.operationId = operationId - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesOperationsCancelCall) Context(ctx context.Context) *ProjectsZonesOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel") - 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{ - "projectId": c.projectId, - "zone": c.zone, - "operationId": c.operationId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.cancel" call. -// 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 *ProjectsZonesOperationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesOperationsGetCall struct { - s *Service - projectId string - zone string - operationId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the specified operation. -// -// - operationId: Deprecated. The server-assigned `name` of the operation. This -// field has been deprecated and replaced by the name field. -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the name field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) in which the -// cluster resides. This field has been deprecated and replaced by the name -// field. -func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, operationId string) *ProjectsZonesOperationsGetCall { - c := &ProjectsZonesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - c.operationId = operationId - return c -} - -// Name sets the optional parameter "name": The name (project, location, -// operation id) of the operation to get. Specified in the format -// `projects/*/locations/*/operations/*`. -func (c *ProjectsZonesOperationsGetCall) Name(name string) *ProjectsZonesOperationsGetCall { - c.urlParams_.Set("name", name) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations/{operationId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - "operationId": c.operationId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsZonesOperationsGetCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsZonesOperationsListCall struct { - s *Service - projectId string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all operations in a project in a specific zone or all zones. -// -// - projectId: Deprecated. The Google Developers Console project ID or project -// number -// (https://cloud.google.com/resource-manager/docs/creating-managing-projects). -// This field has been deprecated and replaced by the parent field. -// - zone: Deprecated. The name of the Google Compute Engine zone -// (https://cloud.google.com/compute/docs/zones#available) to return -// operations for, or `-` for all zones. This field has been deprecated and -// replaced by the parent field. -func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *ProjectsZonesOperationsListCall { - c := &ProjectsZonesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.projectId = projectId - c.zone = zone - return c -} - -// Parent sets the optional parameter "parent": The parent (project and -// location) where the operations will be listed. Specified in the format -// `projects/*/locations/*`. Location "-" matches all zones and all regions. -func (c *ProjectsZonesOperationsListCall) Parent(parent string) *ProjectsZonesOperationsListCall { - c.urlParams_.Set("parent", parent) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsZonesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsZonesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsZonesOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "projectId": c.projectId, - "zone": c.zone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "container.projects.zones.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "container.projects.zones.operations.list" call. -// 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 *ProjectsZonesOperationsListCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "container.projects.zones.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/api/networkservices/v1/networkservices-api.json b/vendor/google.golang.org/api/networkservices/v1/networkservices-api.json deleted file mode 100644 index af316d1662a3e..0000000000000 --- a/vendor/google.golang.org/api/networkservices/v1/networkservices-api.json +++ /dev/null @@ -1,6364 +0,0 @@ -{ - "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://networkservices.googleapis.com/", - "batchPath": "batch", - "canonicalName": "NetworkServices", - "description": "", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/networking", - "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": "networkservices:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://networkservices.mtls.googleapis.com/", - "name": "networkservices", - "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": "networkservices.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": "networkservices.projects.locations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "extraLocationTypes": { - "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", - "location": "query", - "repeated": true, - "type": "string" - }, - "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": { - "authzExtensions": { - "methods": { - "create": { - "description": "Creates a new `AuthzExtension` resource in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authzExtensions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.authzExtensions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "authzExtensionId": { - "description": "Required. User-provided ID of the `AuthzExtension` resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the `AuthzExtension` 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 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 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": "v1/{+parent}/authzExtensions", - "request": { - "$ref": "AuthzExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `AuthzExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.authzExtensions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the `AuthzExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "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 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 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": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `AuthzExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.authzExtensions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `AuthzExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "AuthzExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `AuthzExtension` resources in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authzExtensions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.authzExtensions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint about 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 `AuthzExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/authzExtensions", - "response": { - "$ref": "ListAuthzExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `AuthzExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.authzExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. Name of the `AuthzExtension` resource in the following format: `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "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 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 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 `AuthzExtension` 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": "v1/{+name}", - "request": { - "$ref": "AuthzExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "edgeCacheKeysets": { - "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}/edgeCacheKeysets/{edgeCacheKeysetsId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkservices.projects.locations.edgeCacheKeysets.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/[^/]+/edgeCacheKeysets/[^/]+$", - "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}/edgeCacheKeysets/{edgeCacheKeysetsId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheKeysets.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/[^/]+/edgeCacheKeysets/[^/]+$", - "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}/edgeCacheKeysets/{edgeCacheKeysetsId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheKeysets.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/[^/]+/edgeCacheKeysets/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "edgeCacheOrigins": { - "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}/edgeCacheOrigins/{edgeCacheOriginsId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkservices.projects.locations.edgeCacheOrigins.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/[^/]+/edgeCacheOrigins/[^/]+$", - "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}/edgeCacheOrigins/{edgeCacheOriginsId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheOrigins.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/[^/]+/edgeCacheOrigins/[^/]+$", - "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}/edgeCacheOrigins/{edgeCacheOriginsId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheOrigins.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/[^/]+/edgeCacheOrigins/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "edgeCacheServices": { - "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}/edgeCacheServices/{edgeCacheServicesId}:getIamPolicy", - "httpMethod": "GET", - "id": "networkservices.projects.locations.edgeCacheServices.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/[^/]+/edgeCacheServices/[^/]+$", - "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}/edgeCacheServices/{edgeCacheServicesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheServices.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/[^/]+/edgeCacheServices/[^/]+$", - "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}/edgeCacheServices/{edgeCacheServicesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.edgeCacheServices.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/[^/]+/edgeCacheServices/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "endpointPolicies": { - "methods": { - "create": { - "description": "Creates a new EndpointPolicy in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", - "httpMethod": "POST", - "id": "networkservices.projects.locations.endpointPolicies.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "endpointPolicyId": { - "description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/endpointPolicies", - "request": { - "$ref": "EndpointPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single EndpointPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.endpointPolicies.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/*/endpointPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single EndpointPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.endpointPolicies.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/*/endpointPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "EndpointPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists EndpointPolicies in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", - "httpMethod": "GET", - "id": "networkservices.projects.locations.endpointPolicies.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of EndpointPolicies to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/endpointPolicies", - "response": { - "$ref": "ListEndpointPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single EndpointPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.endpointPolicies.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy 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": "EndpointPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "gateways": { - "methods": { - "create": { - "description": "Creates a new Gateway in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways", - "httpMethod": "POST", - "id": "networkservices.projects.locations.gateways.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gatewayId": { - "description": "Required. Short name of the Gateway resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gateways", - "request": { - "$ref": "Gateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single Gateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.gateways.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single Gateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Gateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Gateways in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of Gateways to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/gateways", - "response": { - "$ref": "ListGatewaysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single Gateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.gateways.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway 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": "Gateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "routeViews": { - "methods": { - "get": { - "description": "Get a single RouteView of a Gateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}/routeViews/{routeViewsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.routeViews.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the GatewayRouteView resource. Formats: projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/{route_view}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GatewayRouteView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RouteViews", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}/routeViews", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.routeViews.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of GatewayRouteViews to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGatewayRouteViewsResponse` Indicates that this is a continuation of a prior `ListGatewayRouteViews` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The Gateway to which a Route is associated. Formats: projects/{project_number}/locations/{location}/gateways/{gateway}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/routeViews", - "response": { - "$ref": "ListGatewayRouteViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "grpcRoutes": { - "methods": { - "create": { - "description": "Creates a new GrpcRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.grpcRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "grpcRouteId": { - "description": "Required. Short name of the GrpcRoute resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/grpcRoutes", - "request": { - "$ref": "GrpcRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single GrpcRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.grpcRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/*/grpcRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single GrpcRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.grpcRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/*/grpcRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GrpcRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists GrpcRoutes in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.grpcRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of GrpcRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/grpcRoutes", - "response": { - "$ref": "ListGrpcRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single GrpcRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.grpcRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/*/grpcRoutes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute 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": "GrpcRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "httpRoutes": { - "methods": { - "create": { - "description": "Creates a new HttpRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.httpRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "httpRouteId": { - "description": "Required. Short name of the HttpRoute resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/httpRoutes", - "request": { - "$ref": "HttpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single HttpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.httpRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/*/httpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single HttpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.httpRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/*/httpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "HttpRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists HttpRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.httpRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of HttpRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListHttpRoutesResponse` Indicates that this is a continuation of a prior `ListHttpRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/httpRoutes", - "response": { - "$ref": "ListHttpRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single HttpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.httpRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the HttpRoute resource. It matches pattern `projects/*/locations/*/httpRoutes/http_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute 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": "HttpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "lbEdgeExtensions": { - "methods": { - "create": { - "description": "Creates a new `LbEdgeExtension` resource in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.lbEdgeExtensions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "lbEdgeExtensionId": { - "description": "Required. User-provided ID of the `LbEdgeExtension` resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the `LbEdgeExtension` 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 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 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": "v1/{+parent}/lbEdgeExtensions", - "request": { - "$ref": "LbEdgeExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `LbEdgeExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.lbEdgeExtensions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the `LbEdgeExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "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 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 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": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `LbEdgeExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbEdgeExtensions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `LbEdgeExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "LbEdgeExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `LbEdgeExtension` resources in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbEdgeExtensions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint about 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 `LbEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/lbEdgeExtensions", - "response": { - "$ref": "ListLbEdgeExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `LbEdgeExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.lbEdgeExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. Name of the `LbEdgeExtension` resource in the following format: `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "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 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 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": "Optional. Used to specify the fields to be overwritten in the `LbEdgeExtension` 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": "v1/{+name}", - "request": { - "$ref": "LbEdgeExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "lbRouteExtensions": { - "methods": { - "create": { - "description": "Creates a new `LbRouteExtension` resource in a given project and location.", - "flatPath": "v1/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 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 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": "v1/{+parent}/lbRouteExtensions", - "request": { - "$ref": "LbRouteExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `LbRouteExtension` resource.", - "flatPath": "v1/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 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 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": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `LbRouteExtension` resource.", - "flatPath": "v1/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": "v1/{+name}", - "response": { - "$ref": "LbRouteExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `LbRouteExtension` resources in a given project and location.", - "flatPath": "v1/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 about 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. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/lbRouteExtensions", - "response": { - "$ref": "ListLbRouteExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `LbRouteExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.lbRouteExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. 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 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 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": "Optional. 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": "v1/{+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": "v1/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 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 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": "v1/{+parent}/lbTrafficExtensions", - "request": { - "$ref": "LbTrafficExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `LbTrafficExtension` resource.", - "flatPath": "v1/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 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 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": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `LbTrafficExtension` resource.", - "flatPath": "v1/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": "v1/{+name}", - "response": { - "$ref": "LbTrafficExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `LbTrafficExtension` resources in a given project and location.", - "flatPath": "v1/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 about 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. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/lbTrafficExtensions", - "response": { - "$ref": "ListLbTrafficExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.lbTrafficExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. 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 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 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": "Optional. 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": "v1/{+name}", - "request": { - "$ref": "LbTrafficExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "meshes": { - "methods": { - "create": { - "description": "Creates a new Mesh in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.meshes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "meshId": { - "description": "Required. Short name of the Mesh resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/meshes", - "request": { - "$ref": "Mesh" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single Mesh.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.meshes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/*/meshes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single Mesh.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/*/meshes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Mesh" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Meshes in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of Meshes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/meshes", - "response": { - "$ref": "ListMeshesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single Mesh.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.meshes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the Mesh resource. It matches pattern `projects/*/locations/*/meshes/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh 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": "Mesh" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "routeViews": { - "methods": { - "get": { - "description": "Get a single RouteView of a Mesh.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}/routeViews/{routeViewsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.routeViews.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the MeshRouteView resource. Format: projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{route_view}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "MeshRouteView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RouteViews", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}/routeViews", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.routeViews.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of MeshRouteViews to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListMeshRouteViewsResponse` Indicates that this is a continuation of a prior `ListMeshRouteViews` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The Mesh to which a Route is associated. Format: projects/{project_number}/locations/{location}/meshes/{mesh}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/routeViews", - "response": { - "$ref": "ListMeshRouteViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "networkservices.projects.locations.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "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": "networkservices.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": "networkservices.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": "networkservices.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" - }, - "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceBindings": { - "methods": { - "create": { - "description": "Creates a new ServiceBinding in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "serviceBindingId": { - "description": "Required. Short name of the ServiceBinding resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/serviceBindings", - "request": { - "$ref": "ServiceBinding" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ServiceBinding.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.serviceBindings.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ServiceBinding.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ServiceBinding" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ServiceBinding in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of ServiceBindings to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/serviceBindings", - "response": { - "$ref": "ListServiceBindingsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single ServiceBinding.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.serviceBindings.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/*/serviceBindings/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding 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": "ServiceBinding" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceLbPolicies": { - "methods": { - "create": { - "description": "Creates a new ServiceLbPolicy in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceLbPolicies.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "serviceLbPolicyId": { - "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/serviceLbPolicies", - "request": { - "$ref": "ServiceLbPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ServiceLbPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.serviceLbPolicies.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ServiceLbPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceLbPolicies.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ServiceLbPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ServiceLbPolicies in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceLbPolicies.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of ServiceLbPolicies to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/serviceLbPolicies", - "response": { - "$ref": "ListServiceLbPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single ServiceLbPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.serviceLbPolicies.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy 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": "ServiceLbPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "tcpRoutes": { - "methods": { - "create": { - "description": "Creates a new TcpRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.tcpRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "tcpRouteId": { - "description": "Required. Short name of the TcpRoute resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/tcpRoutes", - "request": { - "$ref": "TcpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single TcpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.tcpRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/*/tcpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single TcpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tcpRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/*/tcpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "TcpRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists TcpRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tcpRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of TcpRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListTcpRoutesResponse` Indicates that this is a continuation of a prior `ListTcpRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/tcpRoutes", - "response": { - "$ref": "ListTcpRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single TcpRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.tcpRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/*/tcpRoutes/tcp_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute 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": "TcpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "tlsRoutes": { - "methods": { - "create": { - "description": "Creates a new TlsRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.tlsRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "tlsRouteId": { - "description": "Required. Short name of the TlsRoute resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/tlsRoutes", - "request": { - "$ref": "TlsRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single TlsRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.tlsRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/*/tlsRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single TlsRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tlsRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/*/tlsRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "TlsRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists TlsRoute in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tlsRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of TlsRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListTlsRoutesResponse` Indicates that this is a continuation of a prior `ListTlsRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/tlsRoutes", - "response": { - "$ref": "ListTlsRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single TlsRoute.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.tlsRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the TlsRoute resource. It matches pattern `projects/*/locations/*/tlsRoutes/tls_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute 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": "TlsRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "wasmPlugins": { - "methods": { - "create": { - "description": "Creates a new `WasmPlugin` resource in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins", - "httpMethod": "POST", - "id": "networkservices.projects.locations.wasmPlugins.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "wasmPluginId": { - "description": "Required. User-provided ID of the `WasmPlugin` resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/wasmPlugins", - "request": { - "$ref": "WasmPlugin" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `WasmPlugin` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.wasmPlugins.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `WasmPlugin` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Determines how much data must be returned in the response. See [AIP-157](https://google.aip.dev/157).", - "enum": [ - "WASM_PLUGIN_VIEW_UNSPECIFIED", - "WASM_PLUGIN_VIEW_BASIC", - "WASM_PLUGIN_VIEW_FULL" - ], - "enumDescriptions": [ - "Unspecified value. Do not use.", - "If specified in the `GET` request for a `WasmPlugin` resource, the server's response includes just the `WasmPlugin` resource.", - "If specified in the `GET` request for a `WasmPlugin` resource, the server's response includes the `WasmPlugin` resource with all its versions." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WasmPlugin" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `WasmPlugin` resources in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of `WasmPlugin` resources to return per call. If not specified, at most 50 `WasmPlugin` resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListWasmPluginsResponse` call. Indicates that this is a continuation of a prior `ListWasmPlugins` call, and that the next page of data is to be returned.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/wasmPlugins", - "response": { - "$ref": "ListWasmPluginsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `WasmPlugin` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.wasmPlugins.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Used to specify the fields to be overwritten in the `WasmPlugin` resource by the update. The fields specified in the `update_mask` field are relative to the resource, not the full request. An omitted `update_mask` field is treated as an implied `update_mask` field equivalent to all fields that are populated (that have a non-empty value). The `update_mask` field supports a special value `*`, which means that each field in the given `WasmPlugin` resource (including the empty ones) replaces the current value.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "WasmPlugin" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "versions": { - "methods": { - "create": { - "description": "Creates a new `WasmPluginVersion` resource in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.wasmPlugins.versions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "wasmPluginVersionId": { - "description": "Required. User-provided ID of the `WasmPluginVersion` resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/versions", - "request": { - "$ref": "WasmPluginVersion" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `WasmPluginVersion` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions/{versionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.wasmPlugins.versions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `WasmPluginVersion` resource.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions/{versionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.versions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "WasmPluginVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `WasmPluginVersion` resources in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.versions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of `WasmPluginVersion` resources to return per call. If not specified, at most 50 `WasmPluginVersion` resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListWasmPluginVersionsResponse` call. Indicates that this is a continuation of a prior `ListWasmPluginVersions` call, and that the next page of data is to be returned.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/versions", - "response": { - "$ref": "ListWasmPluginVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } - } - }, - "revision": "20251105", - "rootUrl": "https://networkservices.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" - }, - "AuthzExtension": { - "description": "`AuthzExtension` is a resource that allows traffic forwarding to a callout backend service to make an authorization decision.", - "id": "AuthzExtension", - "properties": { - "authority": { - "description": "Required. The `:authority` header in the gRPC request sent from Envoy to the extension service.", - "type": "string" - }, - "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" - }, - "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` or the default setting of `FALSE` is used, one of the following happens: * 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.", - "type": "boolean" - }, - "forwardHeaders": { - "description": "Optional. List of the HTTP headers to forward to the extension (from the client). If omitted, all headers are sent. Each element is a string indicating the header name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `AuthzExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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 [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata is available under the namespace `com.google.authz_extension.`. The following variables are supported in the metadata Struct: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. Name of the `AuthzExtension` resource in the following format: `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "type": "string" - }, - "service": { - "description": "Required. The reference to the service that runs the extension. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", - "type": "string" - }, - "timeout": { - "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-10000 milliseconds.", - "format": "google-duration", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "wireFormat": { - "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", - "enum": [ - "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC", - "EXT_AUTHZ_GRPC" - ], - "enumDescriptions": [ - "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", - "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources." - ], - "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`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "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`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, - "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" - }, - "EndpointMatcher": { - "description": "A definition of a matcher that selects endpoints to which the policies should be applied.", - "id": "EndpointMatcher", - "properties": { - "metadataLabelMatcher": { - "$ref": "EndpointMatcherMetadataLabelMatcher", - "description": "The matcher is based on node metadata presented by xDS clients." - } - }, - "type": "object" - }, - "EndpointMatcherMetadataLabelMatcher": { - "description": "The matcher that is based on node metadata presented by xDS clients.", - "id": "EndpointMatcherMetadataLabelMatcher", - "properties": { - "metadataLabelMatchCriteria": { - "description": "Specifies how matching should be done. Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client with label connects, the config from P1 will be selected. If a client with label connects, the config from P2 will be selected. If a client with label connects, the config from P3 will be selected. If there is more than one best match, (for example, if a config P4 with selector exists and if a client with label connects), pick up the one with older creation time.", - "enum": [ - "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED", - "MATCH_ANY", - "MATCH_ALL" - ], - "enumDescriptions": [ - "Default value. Should not be used.", - "At least one of the Labels specified in the matcher should match the metadata presented by xDS client.", - "The metadata presented by the xDS client should contain all of the labels specified here." - ], - "type": "string" - }, - "metadataLabels": { - "description": "The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).", - "items": { - "$ref": "EndpointMatcherMetadataLabelMatcherMetadataLabels" - }, - "type": "array" - } - }, - "type": "object" - }, - "EndpointMatcherMetadataLabelMatcherMetadataLabels": { - "description": "Defines a name-pair value for a single label.", - "id": "EndpointMatcherMetadataLabelMatcherMetadataLabels", - "properties": { - "labelName": { - "description": "Required. Label name presented as key in xDS Node Metadata.", - "type": "string" - }, - "labelValue": { - "description": "Required. Label value presented as value corresponding to the above key, in xDS Node Metadata.", - "type": "string" - } - }, - "type": "object" - }, - "EndpointPolicy": { - "description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", - "id": "EndpointPolicy", - "properties": { - "authorizationPolicy": { - "description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", - "type": "string" - }, - "clientTlsPolicy": { - "description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", - "type": "string" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "endpointMatcher": { - "$ref": "EndpointMatcher", - "description": "Required. A matcher that selects endpoints to which the policies should be applied." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the EndpointPolicy resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.", - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", - "type": "string" - }, - "trafficPortSelector": { - "$ref": "TrafficPortSelector", - "description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." - }, - "type": { - "description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", - "enum": [ - "ENDPOINT_POLICY_TYPE_UNSPECIFIED", - "SIDECAR_PROXY", - "GRPC_SERVER" - ], - "enumDescriptions": [ - "Default value. Must not be used.", - "Represents a proxy deployed as a sidecar.", - "Represents a proxyless gRPC backend." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "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" - }, - "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` and `LbEdgeExtension` 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": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions. This field is not supported for plugin extensions. Setting it results in a validation error.", - "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` or the default setting of `FALSE` is used, one of the following happens: * 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.", - "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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. For `AuthzExtension` resources, the metadata is available under the namespace `com.google.authz_extension.`. For other types of extensions, the metadata is available under the namespace `com.google....`. For example: `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set for plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend. This field is subject to following limitations: * The total size of the metadata must be less than 1KiB. * The total number of keys in the metadata must be less than 16. * The length of each key must be less than 64 characters. * The length of each value must be less than 1024 characters. * All values must be strings.", - "type": "object" - }, - "name": { - "description": "Optional. 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. This field is required except for AuthzExtension.", - "type": "string" - }, - "observabilityMode": { - "description": "Optional. When set to `TRUE`, enables `observability_mode` on the `ext_proc` filter. This makes `ext_proc` calls asynchronous. Envoy doesn't check for the response from `ext_proc` calls. For more information about the filter, see: https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#extensions-filters-http-ext-proc-v3-externalprocessor This field is helpful when you want to try out the extension in async log-only mode. Supported by regional `LbTrafficExtension` and `LbRouteExtension` resources. Only `STREAMED` (default) body processing mode is supported.", - "type": "boolean" - }, - "requestBodySendMode": { - "description": "Optional. Configures the send mode for request body processing. The field can only be set if `supported_events` includes `REQUEST_BODY`. If `supported_events` includes `REQUEST_BODY`, but `request_body_send_mode` is unset, the default value `STREAMED` is used. When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. This field can be set only for `LbTrafficExtension` and `LbRouteExtension` resources, and only when the `service` field of the extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode is supported for `LbRouteExtension` resources.", - "enum": [ - "BODY_SEND_MODE_UNSPECIFIED", - "BODY_SEND_MODE_STREAMED", - "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - ], - "enumDescriptions": [ - "Default value. Do not use.", - "Calls to the extension are executed in the streamed mode. Subsequent chunks will be sent only after the previous chunks have been processed. The content of the body chunks is sent one way to the extension. Extension may send modified chunks back. This is the default value if the processing mode is not specified.", - "Calls are executed in the full duplex mode. Subsequent chunks will be sent for processing without waiting for the response for the previous chunk or for the response for `REQUEST_HEADERS` event. Extension can freely modify or chunk the body contents. If the extension doesn't send the body contents back, the next extension in the chain or the upstream will receive an empty body." - ], - "type": "string" - }, - "responseBodySendMode": { - "description": "Optional. Configures the send mode for response processing. If unspecified, the default value `STREAMED` is used. The field can only be set if `supported_events` includes `RESPONSE_BODY`. If `supported_events` includes `RESPONSE_BODY`, but `response_body_send_mode` is unset, the default value `STREAMED` is used. When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. This field can be set only for `LbTrafficExtension` resources, and only when the `service` field of the extension points to a `BackendService`.", - "enum": [ - "BODY_SEND_MODE_UNSPECIFIED", - "BODY_SEND_MODE_STREAMED", - "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - ], - "enumDescriptions": [ - "Default value. Do not use.", - "Calls to the extension are executed in the streamed mode. Subsequent chunks will be sent only after the previous chunks have been processed. The content of the body chunks is sent one way to the extension. Extension may send modified chunks back. This is the default value if the processing mode is not specified.", - "Calls are executed in the full duplex mode. Subsequent chunks will be sent for processing without waiting for the response for the previous chunk or for the response for `REQUEST_HEADERS` event. Extension can freely modify or chunk the body contents. If the extension doesn't send the body contents back, the next extension in the chain or the upstream will receive an empty body." - ], - "type": "string" - }, - "service": { - "description": "Required. The reference to the service that runs the extension. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. To configure a plugin extension, `service` must be a reference to a [`WasmPlugin` resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) in the format: `projects/{project}/locations/{location}/wasmPlugins/{plugin}` or `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. Plugin extensions are currently supported for the `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` resources.", - "type": "string" - }, - "supportedEvents": { - "description": "Optional. A set of events during request or response processing for which this extension is called. For the `LbTrafficExtension` resource, this field is required. For the `LbRouteExtension` resource, this field is optional. If unspecified, `REQUEST_HEADERS` event is assumed as supported. For the `LbEdgeExtension` resource, this field is required and must only contain `REQUEST_HEADERS` event. For the `AuthzExtension` resource, this field is optional. `REQUEST_HEADERS` is the only supported event. If unspecified, `REQUEST_HEADERS` event is assumed as supported.", - "items": { - "enum": [ - "EVENT_TYPE_UNSPECIFIED", - "REQUEST_HEADERS", - "REQUEST_BODY", - "RESPONSE_HEADERS", - "RESPONSE_BODY", - "REQUEST_TRAILERS", - "RESPONSE_TRAILERS" - ], - "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.", - "If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", - "If included in `supported_events`, the extension is called when the HTTP response trailers arrives." - ], - "type": "string" - }, - "type": "array" - }, - "timeout": { - "description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between `10`-`10000` milliseconds. Required for callout extensions. This field is not supported for plugin extensions. Setting it results in a validation error.", - "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. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", - "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", - "properties": { - "addresses": { - "description": "Optional. Zero or one IPv4 or IPv6 address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.", - "items": { - "type": "string" - }, - "type": "array" - }, - "certificateUrls": { - "description": "Optional. A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "envoyHeaders": { - "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", - "enum": [ - "ENVOY_HEADERS_UNSPECIFIED", - "NONE", - "DEBUG_HEADERS" - ], - "enumDescriptions": [ - "Defaults to NONE.", - "Suppress envoy debug headers.", - "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" - ], - "type": "string" - }, - "gatewaySecurityPolicy": { - "description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", - "type": "string" - }, - "ipVersion": { - "description": "Optional. The IP Version that will be used by this gateway. Valid options are IPV4 or IPV6. Default is IPV4.", - "enum": [ - "IP_VERSION_UNSPECIFIED", - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "The type when IP version is not specified. Defaults to IPV4.", - "The type for IP version 4.", - "The type for IP version 6." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the Gateway resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", - "type": "string" - }, - "network": { - "description": "Optional. The relative resource name identifying the VPC network that is using this configuration. For example: `projects/*/global/networks/network-1`. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.", - "type": "string" - }, - "ports": { - "description": "Required. One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple ports.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "routingMode": { - "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", - "enum": [ - "EXPLICIT_ROUTING_MODE", - "NEXT_HOP_ROUTING_MODE" - ], - "enumDescriptions": [ - "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", - "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." - ], - "type": "string" - }, - "scope": { - "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single configuration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", - "type": "string" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.", - "type": "string" - }, - "subnetwork": { - "description": "Optional. The relative resource name identifying the subnetwork in which this SWG is allocated. For example: `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY\".", - "type": "string" - }, - "type": { - "description": "Immutable. The type of the customer managed gateway. This field is required. If unspecified, an error is returned.", - "enum": [ - "TYPE_UNSPECIFIED", - "OPEN_MESH", - "SECURE_WEB_GATEWAY" - ], - "enumDescriptions": [ - "The type of the customer managed gateway is unspecified.", - "The type of the customer managed gateway is TrafficDirector Open Mesh.", - "The type of the customer managed gateway is SecureWebGateway (SWG)." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GatewayRouteView": { - "description": "GatewayRouteView defines view-only resource for Routes to a Gateway", - "id": "GatewayRouteView", - "properties": { - "name": { - "description": "Output only. Identifier. Full path name of the GatewayRouteView resource. Format: projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/{route_view}", - "readOnly": true, - "type": "string" - }, - "routeId": { - "description": "Output only. The resource id for the route.", - "readOnly": true, - "type": "string" - }, - "routeLocation": { - "description": "Output only. Location where the route exists.", - "readOnly": true, - "type": "string" - }, - "routeProjectNumber": { - "description": "Output only. Project number where the route exists.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "routeType": { - "description": "Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GrpcRoute": { - "description": "GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or Gateway resource is routed.", - "id": "GrpcRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "hostnames": { - "description": "Required. Service hostnames with an optional port for which this route describes traffic. Format: [:] Hostname is the fully qualified domain name of a network host. This matches the RFC 1123 definition of a hostname with 2 notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateway must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`. If a port is specified, then gRPC clients must use the channel URI with the port to match this rule (i.e. \"xds:///service:123\"), otherwise they must supply the URI without a port (i.e. \"xds:///service\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the GrpcRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/*/grpcRoutes/`", - "type": "string" - }, - "rules": { - "description": "Required. A list of detailed rules defining how to route traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching GrpcRoute.RouteRule will be executed. At least one rule must be supplied.", - "items": { - "$ref": "GrpcRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteDestination": { - "description": "The destination to which traffic will be routed.", - "id": "GrpcRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicy": { - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests.", - "id": "GrpcRouteFaultInjectionPolicy", - "properties": { - "abort": { - "$ref": "GrpcRouteFaultInjectionPolicyAbort", - "description": "The specification for aborting to client requests." - }, - "delay": { - "$ref": "GrpcRouteFaultInjectionPolicyDelay", - "description": "The specification for injecting delay to client requests." - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicyAbort": { - "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", - "id": "GrpcRouteFaultInjectionPolicyAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", - "format": "int32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicyDelay": { - "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", - "id": "GrpcRouteFaultInjectionPolicyDelay", - "properties": { - "fixedDelay": { - "description": "Specify a fixed delay before forwarding the request.", - "format": "google-duration", - "type": "string" - }, - "percentage": { - "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteHeaderMatch": { - "description": "A match against a collection of headers.", - "id": "GrpcRouteHeaderMatch", - "properties": { - "key": { - "description": "Required. The key of the header.", - "type": "string" - }, - "type": { - "description": "Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used.", - "enum": [ - "TYPE_UNSPECIFIED", - "EXACT", - "REGULAR_EXPRESSION" - ], - "enumDescriptions": [ - "Unspecified.", - "Will only match the exact value provided.", - "Will match paths conforming to the prefix specified by value. RE2 syntax is supported." - ], - "type": "string" - }, - "value": { - "description": "Required. The value of the header.", - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteMethodMatch": { - "description": "Specifies a match against a method.", - "id": "GrpcRouteMethodMatch", - "properties": { - "caseSensitive": { - "description": "Optional. Specifies that matches are case sensitive. The default value is true. case_sensitive must not be used with a type of REGULAR_EXPRESSION.", - "type": "boolean" - }, - "grpcMethod": { - "description": "Required. Name of the method to match against. If unspecified, will match all methods.", - "type": "string" - }, - "grpcService": { - "description": "Required. Name of the service to match against. If unspecified, will match all services.", - "type": "string" - }, - "type": { - "description": "Optional. Specifies how to match against the name. If not specified, a default value of \"EXACT\" is used.", - "enum": [ - "TYPE_UNSPECIFIED", - "EXACT", - "REGULAR_EXPRESSION" - ], - "enumDescriptions": [ - "Unspecified.", - "Will only match the exact name provided.", - "Will interpret grpc_method and grpc_service as regexes. RE2 syntax is supported." - ], - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteRetryPolicy": { - "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", - "id": "GrpcRouteRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specified, default to 1.", - "format": "uint32", - "type": "integer" - }, - "retryConditions": { - "description": "- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GrpcRouteRouteAction": { - "description": "Specifies how to route matched traffic.", - "id": "GrpcRouteRouteAction", - "properties": { - "destinations": { - "description": "Optional. The destination services to which traffic should be forwarded. If multiple destinations are specified, traffic will be split between Backend Service(s) according to the weight field of these destinations.", - "items": { - "$ref": "GrpcRouteDestination" - }, - "type": "array" - }, - "faultInjectionPolicy": { - "$ref": "GrpcRouteFaultInjectionPolicy", - "description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "retryPolicy": { - "$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", - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteRouteMatch": { - "description": "Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.", - "id": "GrpcRouteRouteMatch", - "properties": { - "headers": { - "description": "Optional. Specifies a collection of headers to match.", - "items": { - "$ref": "GrpcRouteHeaderMatch" - }, - "type": "array" - }, - "method": { - "$ref": "GrpcRouteMethodMatch", - "description": "Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods." - } - }, - "type": "object" - }, - "GrpcRouteRouteRule": { - "description": "Describes how to route traffic.", - "id": "GrpcRouteRouteRule", - "properties": { - "action": { - "$ref": "GrpcRouteRouteAction", - "description": "Required. A detailed rule defining how to route traffic. This field is required." - }, - "matches": { - "description": "Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic.", - "items": { - "$ref": "GrpcRouteRouteMatch" - }, - "type": "array" - } - }, - "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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a session cookie and disable cookie expiration.", - "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", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "hostnames": { - "description": "Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the HttpRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the HttpRoute resource. It matches pattern `projects/*/locations/*/httpRoutes/http_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.", - "items": { - "$ref": "HttpRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteCorsPolicy": { - "description": "The Specification for allowing client side cross-origin requests.", - "id": "HttpRouteCorsPolicy", - "properties": { - "allowCredentials": { - "description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.", - "type": "boolean" - }, - "allowHeaders": { - "description": "Specifies the content for Access-Control-Allow-Headers header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowMethods": { - "description": "Specifies the content for Access-Control-Allow-Methods header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOriginRegexes": { - "description": "Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOrigins": { - "description": "Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "disabled": { - "description": "If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.", - "type": "boolean" - }, - "exposeHeaders": { - "description": "Specifies the content for Access-Control-Expose-Headers header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxAge": { - "description": "Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteDestination": { - "description": "Specifications of a destination to which the request should be routed to.", - "id": "HttpRouteDestination", - "properties": { - "requestHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "responseHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "serviceName": { - "description": "The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicy": { - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.", - "id": "HttpRouteFaultInjectionPolicy", - "properties": { - "abort": { - "$ref": "HttpRouteFaultInjectionPolicyAbort", - "description": "The specification for aborting to client requests." - }, - "delay": { - "$ref": "HttpRouteFaultInjectionPolicyDelay", - "description": "The specification for injecting delay to client requests." - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicyAbort": { - "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", - "id": "HttpRouteFaultInjectionPolicyAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", - "format": "int32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicyDelay": { - "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", - "id": "HttpRouteFaultInjectionPolicyDelay", - "properties": { - "fixedDelay": { - "description": "Specify a fixed delay before forwarding the request.", - "format": "google-duration", - "type": "string" - }, - "percentage": { - "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteHeaderMatch": { - "description": "Specifies how to select a route rule based on HTTP request headers.", - "id": "HttpRouteHeaderMatch", - "properties": { - "exactMatch": { - "description": "The value of the header should match exactly the content of exact_match.", - "type": "string" - }, - "header": { - "description": "The name of the HTTP header to match against.", - "type": "string" - }, - "invertMatch": { - "description": "If specified, the match result will be inverted before checking. Default value is set to false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The value of the header must start with the contents of prefix_match.", - "type": "string" - }, - "presentMatch": { - "description": "A header with header_name must exist. The match takes place whether or not the header has a value.", - "type": "boolean" - }, - "rangeMatch": { - "$ref": "HttpRouteHeaderMatchIntegerRange", - "description": "If specified, the rule will match if the request header value is within the range." - }, - "regexMatch": { - "description": "The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax", - "type": "string" - }, - "suffixMatch": { - "description": "The value of the header must end with the contents of suffix_match.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteHeaderMatchIntegerRange": { - "description": "Represents an integer value range.", - "id": "HttpRouteHeaderMatchIntegerRange", - "properties": { - "end": { - "description": "End of the range (exclusive)", - "format": "int32", - "type": "integer" - }, - "start": { - "description": "Start of the range (inclusive)", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteHeaderModifier": { - "description": "The specification for modifying HTTP header in HTTP request and HTTP response.", - "id": "HttpRouteHeaderModifier", - "properties": { - "add": { - "additionalProperties": { - "type": "string" - }, - "description": "Add the headers with given map where key is the name of the header, value is the value of the header.", - "type": "object" - }, - "remove": { - "description": "Remove headers (matching by header names) specified in the list.", - "items": { - "type": "string" - }, - "type": "array" - }, - "set": { - "additionalProperties": { - "type": "string" - }, - "description": "Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.", - "type": "object" - } - }, - "type": "object" - }, - "HttpRouteHttpDirectResponse": { - "description": "Static HTTP response object to be returned.", - "id": "HttpRouteHttpDirectResponse", - "properties": { - "bytesBody": { - "description": "Optional. Response body as bytes. Maximum body size is 4096B.", - "format": "byte", - "type": "string" - }, - "status": { - "description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", - "format": "int32", - "type": "integer" - }, - "stringBody": { - "description": "Optional. Response body as a string. Maximum body length is 1024 characters.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteQueryParameterMatch": { - "description": "Specifications to match a query parameter in the request.", - "id": "HttpRouteQueryParameterMatch", - "properties": { - "exactMatch": { - "description": "The value of the query parameter must exactly match the contents of exact_match. Only one of exact_match, regex_match, or present_match must be set.", - "type": "string" - }, - "presentMatch": { - "description": "Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. Only one of exact_match, regex_match, or present_match must be set.", - "type": "boolean" - }, - "queryParameter": { - "description": "The name of the query parameter to match.", - "type": "string" - }, - "regexMatch": { - "description": "The value of the query parameter must match the regular expression specified by regex_match. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match must be set.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteRedirect": { - "description": "The specification for redirecting traffic.", - "id": "HttpRouteRedirect", - "properties": { - "hostRedirect": { - "description": "The host that will be used in the redirect response instead of the one that was supplied in the request.", - "type": "string" - }, - "httpsRedirect": { - "description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.", - "type": "boolean" - }, - "pathRedirect": { - "description": "The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.", - "type": "string" - }, - "portRedirect": { - "description": "The port that will be used in the redirected request instead of the one that was supplied in the request.", - "format": "int32", - "type": "integer" - }, - "prefixRewrite": { - "description": "Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.", - "type": "string" - }, - "responseCode": { - "description": "The HTTP Status code to use for the redirect.", - "enum": [ - "RESPONSE_CODE_UNSPECIFIED", - "MOVED_PERMANENTLY_DEFAULT", - "FOUND", - "SEE_OTHER", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT" - ], - "enumDescriptions": [ - "Default value", - "Corresponds to 301.", - "Corresponds to 302.", - "Corresponds to 303.", - "Corresponds to 307. In this case, the request method will be retained.", - "Corresponds to 308. In this case, the request method will be retained." - ], - "type": "string" - }, - "stripQuery": { - "description": "if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpRouteRequestMirrorPolicy": { - "description": "Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow. Mirroring is currently not supported for Cloud Run destinations.", - "id": "HttpRouteRequestMirrorPolicy", - "properties": { - "destination": { - "$ref": "HttpRouteDestination", - "description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." - }, - "mirrorPercent": { - "description": "Optional. The percentage of requests to get mirrored to the desired destination.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "HttpRouteRetryPolicy": { - "description": "The specifications for retries.", - "id": "HttpRouteRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specified, default to 1.", - "format": "int32", - "type": "integer" - }, - "perTryTimeout": { - "description": "Specifies a non-zero timeout per retry attempt.", - "format": "google-duration", - "type": "string" - }, - "retryConditions": { - "description": "Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "HttpRouteRouteAction", - "properties": { - "corsPolicy": { - "$ref": "HttpRouteCorsPolicy", - "description": "The specification for allowing client side cross-origin requests." - }, - "destinations": { - "description": "The destination to which traffic should be forwarded.", - "items": { - "$ref": "HttpRouteDestination" - }, - "type": "array" - }, - "directResponse": { - "$ref": "HttpRouteHttpDirectResponse", - "description": "Optional. Static HTTP Response object to be returned regardless of the request." - }, - "faultInjectionPolicy": { - "$ref": "HttpRouteFaultInjectionPolicy", - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "redirect": { - "$ref": "HttpRouteRedirect", - "description": "If set, the request is directed as configured by this field." - }, - "requestHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "requestMirrorPolicy": { - "$ref": "HttpRouteRequestMirrorPolicy", - "description": "Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow." - }, - "responseHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "retryPolicy": { - "$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", - "type": "string" - }, - "urlRewrite": { - "$ref": "HttpRouteURLRewrite", - "description": "The specification for rewrite URL before forwarding requests to the destination." - } - }, - "type": "object" - }, - "HttpRouteRouteMatch": { - "description": "RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.", - "id": "HttpRouteRouteMatch", - "properties": { - "fullPathMatch": { - "description": "The HTTP request path value should exactly match this value. Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - }, - "headers": { - "description": "Specifies a list of HTTP request headers to match against. ALL of the supplied headers must be matched.", - "items": { - "$ref": "HttpRouteHeaderMatch" - }, - "type": "array" - }, - "ignoreCase": { - "description": "Specifies if prefix_match and full_path_match matches are case sensitive. The default value is false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The HTTP request path value must begin with specified prefix_match. prefix_match must begin with a /. Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - }, - "queryParameters": { - "description": "Specifies a list of query parameters to match against. ALL of the query parameters must be matched.", - "items": { - "$ref": "HttpRouteQueryParameterMatch" - }, - "type": "array" - }, - "regexMatch": { - "description": "The HTTP request path value must satisfy the regular expression specified by regex_match after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "HttpRouteRouteRule", - "properties": { - "action": { - "$ref": "HttpRouteRouteAction", - "description": "The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.", - "items": { - "$ref": "HttpRouteRouteMatch" - }, - "type": "array" - } - }, - "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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a session cookie and disable cookie expiration.", - "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", - "properties": { - "hostRewrite": { - "description": "Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.", - "type": "string" - }, - "pathPrefixRewrite": { - "description": "Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.", - "type": "string" - } - }, - "type": "object" - }, - "LbEdgeExtension": { - "description": "`LbEdgeExtension` is a resource that lets the extension service influence the selection of backend services and Cloud CDN cache keys by modifying request headers.", - "id": "LbEdgeExtension", - "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 attached. At least one forwarding rule is required. Only one `LbEdgeExtension` resource can be associated with a forwarding rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `LbEdgeExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "type": "object" - }, - "loadBalancingScheme": { - "description": "Required. All forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `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. Identifier. Name of the `LbEdgeExtension` resource in the following format: `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "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 attached. At least one forwarding rule is required. Only one `LbRouteExtension` resource can be associated with a 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 requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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 [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata applies to all extensions in all extensions chains in this resource. The metadata is available under the key `com.google.lb_route_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set if at least one of the extension chains contains plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. 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": "Optional. A list of references to the forwarding rules to which this service extension is attached. At least one forwarding rule is required. Only one `LbTrafficExtension` resource can be associated with a 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 requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata applies to all extensions in all extensions chains in this resource. The metadata is available under the key `com.google.lb_traffic_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set if at least one of the extension chains contains plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. 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" - }, - "ListAuthzExtensionsResponse": { - "description": "Message for response to listing `AuthzExtension` resources.", - "id": "ListAuthzExtensionsResponse", - "properties": { - "authzExtensions": { - "description": "The list of `AuthzExtension` resources.", - "items": { - "$ref": "AuthzExtension" - }, - "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" - }, - "ListEndpointPoliciesResponse": { - "description": "Response returned by the ListEndpointPolicies method.", - "id": "ListEndpointPoliciesResponse", - "properties": { - "endpointPolicies": { - "description": "List of EndpointPolicy resources.", - "items": { - "$ref": "EndpointPolicy" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGatewayRouteViewsResponse": { - "description": "Response returned by the ListGatewayRouteViews method.", - "id": "ListGatewayRouteViewsResponse", - "properties": { - "gatewayRouteViews": { - "description": "List of GatewayRouteView resources.", - "items": { - "$ref": "GatewayRouteView" - }, - "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": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGatewaysResponse": { - "description": "Response returned by the ListGateways method.", - "id": "ListGatewaysResponse", - "properties": { - "gateways": { - "description": "List of Gateway resources.", - "items": { - "$ref": "Gateway" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGrpcRoutesResponse": { - "description": "Response returned by the ListGrpcRoutes method.", - "id": "ListGrpcRoutesResponse", - "properties": { - "grpcRoutes": { - "description": "List of GrpcRoute resources.", - "items": { - "$ref": "GrpcRoute" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListHttpRoutesResponse": { - "description": "Response returned by the ListHttpRoutes method.", - "id": "ListHttpRoutesResponse", - "properties": { - "httpRoutes": { - "description": "List of HttpRoute resources.", - "items": { - "$ref": "HttpRoute" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListLbEdgeExtensionsResponse": { - "description": "Message for response to listing `LbEdgeExtension` resources.", - "id": "ListLbEdgeExtensionsResponse", - "properties": { - "lbEdgeExtensions": { - "description": "The list of `LbEdgeExtension` resources.", - "items": { - "$ref": "LbEdgeExtension" - }, - "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" - }, - "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", - "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" - }, - "ListMeshRouteViewsResponse": { - "description": "Response returned by the ListMeshRouteViews method.", - "id": "ListMeshRouteViewsResponse", - "properties": { - "meshRouteViews": { - "description": "List of MeshRouteView resources.", - "items": { - "$ref": "MeshRouteView" - }, - "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": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListMeshesResponse": { - "description": "Response returned by the ListMeshes method.", - "id": "ListMeshesResponse", - "properties": { - "meshes": { - "description": "List of Mesh resources.", - "items": { - "$ref": "Mesh" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into `return_partial_success` and reading across collections e.g. when attempting to list all resources across all supported locations.", - "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" - }, - "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceBindingsResponse": { - "description": "Response returned by the ListServiceBindings method.", - "id": "ListServiceBindingsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "serviceBindings": { - "description": "List of ServiceBinding resources.", - "items": { - "$ref": "ServiceBinding" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceLbPoliciesResponse": { - "description": "Response returned by the ListServiceLbPolicies method.", - "id": "ListServiceLbPoliciesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "serviceLbPolicies": { - "description": "List of ServiceLbPolicy resources.", - "items": { - "$ref": "ServiceLbPolicy" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTcpRoutesResponse": { - "description": "Response returned by the ListTcpRoutes method.", - "id": "ListTcpRoutesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "tcpRoutes": { - "description": "List of TcpRoute resources.", - "items": { - "$ref": "TcpRoute" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTlsRoutesResponse": { - "description": "Response returned by the ListTlsRoutes method.", - "id": "ListTlsRoutesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "tlsRoutes": { - "description": "List of TlsRoute resources.", - "items": { - "$ref": "TlsRoute" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWasmPluginVersionsResponse": { - "description": "Response returned by the `ListWasmPluginVersions` method.", - "id": "ListWasmPluginVersionsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - }, - "wasmPluginVersions": { - "description": "List of `WasmPluginVersion` resources.", - "items": { - "$ref": "WasmPluginVersion" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWasmPluginsResponse": { - "description": "Response returned by the `ListWasmPlugins` method.", - "id": "ListWasmPluginsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - }, - "wasmPlugins": { - "description": "List of `WasmPlugin` resources.", - "items": { - "$ref": "WasmPlugin" - }, - "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" - }, - "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", - "id": "LoggingConfig", - "properties": { - "logSeverity": { - "description": "Optional. The minimum severity of logs that will be sent to Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be sent, unless it is NONE.", - "enum": [ - "LOG_SEVERITY_UNSPECIFIED", - "NONE", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "Log severity is not specified. This value is treated the same as NONE, but is used to distinguish between no update and update to NONE in update_masks.", - "Default value at resource creation, presence of this value must be treated as no logging/disable logging.", - "Debug or trace level logging.", - "Routine information, such as ongoing status or performance.", - "Normal but significant events, such as start up, shut down, or a configuration change.", - "Warning events might cause problems.", - "Error events are likely to cause problems.", - "Critical events cause more severe problems or outages.", - "A person must take action immediately.", - "One or more systems are unusable." - ], - "type": "string" - } - }, - "type": "object" - }, - "Mesh": { - "description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", - "id": "Mesh", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "envoyHeaders": { - "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", - "enum": [ - "ENVOY_HEADERS_UNSPECIFIED", - "NONE", - "DEBUG_HEADERS" - ], - "enumDescriptions": [ - "Defaults to NONE.", - "Suppress envoy debug headers.", - "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" - ], - "type": "string" - }, - "interceptionPort": { - "description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", - "format": "int32", - "type": "integer" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the Mesh resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the Mesh resource. It matches pattern `projects/*/locations/*/meshes/`.", - "type": "string" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "MeshRouteView": { - "description": "MeshRouteView defines view-only resource for Routes to a Mesh", - "id": "MeshRouteView", - "properties": { - "name": { - "description": "Output only. Identifier. Full path name of the MeshRouteView resource. Format: projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{route_view}", - "readOnly": true, - "type": "string" - }, - "routeId": { - "description": "Output only. The resource id for the route.", - "readOnly": true, - "type": "string" - }, - "routeLocation": { - "description": "Output only. Location where the route exists.", - "readOnly": true, - "type": "string" - }, - "routeProjectNumber": { - "description": "Output only. Project number where the route exists.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "routeType": { - "description": "Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute", - "readOnly": true, - "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. 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" - }, - "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" - }, - "RetryFilterPerRouteConfig": { - "id": "RetryFilterPerRouteConfig", - "properties": { - "cryptoKeyName": { - "description": "The name of the crypto key to use for encrypting event data.", - "type": "string" - } - }, - "type": "object" - }, - "ServiceBinding": { - "description": "ServiceBinding can be used to: - Bind a Service Directory Service to be used in a BackendService resource. This feature will be deprecated soon. - Bind a Private Service Connect producer service to be used in consumer Cloud Service Mesh or Application Load Balancers. - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or Application Load Balancers.", - "id": "ServiceBinding", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the ServiceBinding resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/*/serviceBindings/`.", - "type": "string" - }, - "service": { - "deprecated": true, - "description": "Optional. The full Service Directory Service name of the format `projects/*/locations/*/namespaces/*/services/*`. This field is for Service Directory integration which will be deprecated soon.", - "type": "string" - }, - "serviceId": { - "deprecated": true, - "description": "Output only. The unique identifier of the Service Directory Service against which the ServiceBinding resource is validated. This is populated when the Service Binding resource is used in another resource (like Backend Service). This is of the UUID4 format. This field is for Service Directory integration which will be deprecated soon.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ServiceLbPolicy": { - "description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", - "id": "ServiceLbPolicy", - "properties": { - "autoCapacityDrain": { - "$ref": "ServiceLbPolicyAutoCapacityDrain", - "description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." - }, - "createTime": { - "description": "Output only. The timestamp when this resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "failoverConfig": { - "$ref": "ServiceLbPolicyFailoverConfig", - "description": "Optional. Configuration related to health based failover." - }, - "isolationConfig": { - "$ref": "ServiceLbPolicyIsolationConfig", - "description": "Optional. Configuration to provide isolation support for the associated Backend Service." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", - "type": "object" - }, - "loadBalancingAlgorithm": { - "description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", - "enum": [ - "LOAD_BALANCING_ALGORITHM_UNSPECIFIED", - "SPRAY_TO_WORLD", - "SPRAY_TO_REGION", - "WATERFALL_BY_REGION", - "WATERFALL_BY_ZONE" - ], - "enumDescriptions": [ - "The type of the loadbalancing algorithm is unspecified.", - "Balance traffic across all backends across the world proportionally based on capacity.", - "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", - "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", - "Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." - ], - "type": "string" - }, - "name": { - "description": "Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when this resource was last updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ServiceLbPolicyAutoCapacityDrain": { - "description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", - "id": "ServiceLbPolicyAutoCapacityDrain", - "properties": { - "enable": { - "description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", - "type": "boolean" - } - }, - "type": "object" - }, - "ServiceLbPolicyFailoverConfig": { - "description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", - "id": "ServiceLbPolicyFailoverConfig", - "properties": { - "failoverHealthThreshold": { - "description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ServiceLbPolicyIsolationConfig": { - "description": "Configuration to provide isolation support for the associated Backend Service.", - "id": "ServiceLbPolicyIsolationConfig", - "properties": { - "isolationGranularity": { - "description": "Optional. The isolation granularity of the load balancer.", - "enum": [ - "ISOLATION_GRANULARITY_UNSPECIFIED", - "REGION" - ], - "enumDescriptions": [ - "No isolation is configured for the backend service. Traffic can overflow based on the load balancing algorithm.", - "Traffic for this service will be isolated at the cloud region level." - ], - "type": "string" - }, - "isolationMode": { - "description": "Optional. The isolation mode of the load balancer.", - "enum": [ - "ISOLATION_MODE_UNSPECIFIED", - "NEAREST", - "STRICT" - ], - "enumDescriptions": [ - "No isolation mode is configured for the backend service.", - "Traffic will be sent to the nearest region.", - "Traffic will fail if no serving backends are available in the same region as the load balancer." - ], - "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" - }, - "TcpRoute": { - "description": "TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.", - "id": "TcpRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the TcpRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/*/tcpRoutes/tcp_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", - "items": { - "$ref": "TcpRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "TcpRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "TcpRouteRouteAction", - "properties": { - "destinations": { - "description": "Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.", - "items": { - "$ref": "TcpRouteRouteDestination" - }, - "type": "array" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "originalDestination": { - "description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", - "type": "boolean" - } - }, - "type": "object" - }, - "TcpRouteRouteDestination": { - "description": "Describe the destination for traffic to be routed to.", - "id": "TcpRouteRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TcpRouteRouteMatch": { - "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", - "id": "TcpRouteRouteMatch", - "properties": { - "address": { - "description": "Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: \"10.0.0.1\" - matches against this exact IP address. \"10.0.0.0/8\" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. \"0.0.0.0/0\" - matches against any IP address'.", - "type": "string" - }, - "port": { - "description": "Required. Specifies the destination port to match against.", - "type": "string" - } - }, - "type": "object" - }, - "TcpRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "TcpRouteRouteRule", - "properties": { - "action": { - "$ref": "TcpRouteRouteAction", - "description": "Required. The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", - "items": { - "$ref": "TcpRouteRouteMatch" - }, - "type": "array" - } - }, - "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" - }, - "TlsRoute": { - "description": "TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.", - "id": "TlsRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the TlsRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the TlsRoute resource. It matches pattern `projects/*/locations/*/tlsRoutes/tls_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", - "items": { - "$ref": "TlsRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "TlsRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "TlsRouteRouteAction", - "properties": { - "destinations": { - "description": "Required. The destination services to which traffic should be forwarded. At least one destination service is required.", - "items": { - "$ref": "TlsRouteRouteDestination" - }, - "type": "array" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "TlsRouteRouteDestination": { - "description": "Describe the destination for traffic to be routed to.", - "id": "TlsRouteRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the service_name field. This is computed as: - weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TlsRouteRouteMatch": { - "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"AND\"ed for evaluation.", - "id": "TlsRouteRouteMatch", - "properties": { - "alpn": { - "description": "Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: \"http/1.1\", \"h2\". At least one of sni_host and alpn is required. Up to 5 alpns across all matches can be set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sniHost": { - "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TlsRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "TlsRouteRouteRule", - "properties": { - "action": { - "$ref": "TlsRouteRouteAction", - "description": "Required. The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. Atleast one RouteMatch must be supplied.", - "items": { - "$ref": "TlsRouteRouteMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "TrafficPortSelector": { - "description": "Specification of a port-based selector.", - "id": "TrafficPortSelector", - "properties": { - "ports": { - "description": "Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "WasmPlugin": { - "description": "`WasmPlugin` is a resource representing a service executing a customer-provided Wasm module.", - "id": "WasmPlugin", - "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" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPlugin` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", - "type": "object" - }, - "logConfig": { - "$ref": "WasmPluginLogConfig", - "description": "Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. Note that the settings relate to the logs generated by using logging statements in your Wasm code." - }, - "mainVersionId": { - "description": "Optional. The ID of the `WasmPluginVersion` resource that is the currently serving one. The version referred to must be a child of this `WasmPlugin` resource.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "usedBy": { - "description": "Output only. List of all [extensions](https://cloud.google.com/service-extensions/docs/overview) that use this `WasmPlugin` resource.", - "items": { - "$ref": "WasmPluginUsedBy" - }, - "readOnly": true, - "type": "array" - }, - "versions": { - "additionalProperties": { - "$ref": "WasmPluginVersionDetails" - }, - "description": "Optional. All versions of this `WasmPlugin` resource in the key-value format. The key is the resource ID, and the value is the `VersionDetails` object. Lets you create or update a `WasmPlugin` resource and its versions in a single request. When the `main_version_id` field is not empty, it must point to one of the `VersionDetails` objects in the map. If provided in a `PATCH` request, the new versions replace the previous set. Any version omitted from the `versions` field is removed. Because the `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion` resource with the same name already exists and differs, the request fails. Note: In a `GET` request, this field is populated only if the field `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.", - "type": "object" - } - }, - "type": "object" - }, - "WasmPluginLogConfig": { - "description": "Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging.", - "id": "WasmPluginLogConfig", - "properties": { - "enable": { - "description": "Optional. Specifies whether to enable logging for activity by this plugin. Defaults to `false`.", - "type": "boolean" - }, - "minLogLevel": { - "description": "Non-empty default. Specifies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code. This field is can be set only if logging is enabled for the plugin. If the field is not provided when logging is enabled, it is set to `INFO` by default.", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "CRITICAL" - ], - "enumDescriptions": [ - "Unspecified value. Defaults to `LogLevel.INFO`.", - "Report logs with TRACE level and above.", - "Report logs with DEBUG level and above.", - "Report logs with INFO level and above.", - "Report logs with WARN level and above.", - "Report logs with ERROR level and above.", - "Report logs with CRITICAL level only." - ], - "type": "string" - }, - "sampleRate": { - "description": "Non-empty default. Configures the sampling rate of activity logs, where `1.0` means all logged activity is reported and `0.0` means no activity is reported. A floating point value between `0.0` and `1.0` indicates that a percentage of log messages is stored. The default value when logging is enabled is `1.0`. The value of the field must be between `0` and `1` (inclusive). This field can be specified only if logging is enabled for this plugin.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "WasmPluginUsedBy": { - "description": "Defines a resource that uses the `WasmPlugin` resource.", - "id": "WasmPluginUsedBy", - "properties": { - "name": { - "description": "Output only. Full name of the resource https://google.aip.dev/122#full-resource-names, for example `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WasmPluginVersion": { - "description": "A single immutable version of a `WasmPlugin` resource. Defines the Wasm module used and optionally its runtime config.", - "id": "WasmPluginVersion", - "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" - }, - "imageDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", - "readOnly": true, - "type": "string" - }, - "imageUri": { - "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPluginVersion` resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the `WasmPluginVersion` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ versions/{wasm_plugin_version}`.", - "type": "string" - }, - "pluginConfigData": { - "description": "Configuration for the plugin. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. When a new `WasmPluginVersion` resource is created, the digest of the contents is saved in the `plugin_config_digest` field.", - "format": "byte", - "type": "string" - }, - "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", - "readOnly": true, - "type": "string" - }, - "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WasmPluginVersionDetails": { - "description": "Details of a `WasmPluginVersion` resource to be inlined in the `WasmPlugin` resource.", - "id": "WasmPluginVersionDetails", - "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" - }, - "imageDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", - "readOnly": true, - "type": "string" - }, - "imageUri": { - "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPluginVersion` resource.", - "type": "object" - }, - "pluginConfigData": { - "description": "Configuration for the plugin. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. When a new `WasmPluginVersion` version is created, the digest of the contents is saved in the `plugin_config_digest` field.", - "format": "byte", - "type": "string" - }, - "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", - "readOnly": true, - "type": "string" - }, - "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Network Services API", - "version": "v1", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/networkservices/v1/networkservices-gen.go b/vendor/google.golang.org/api/networkservices/v1/networkservices-gen.go deleted file mode 100644 index b0047b154943e..0000000000000 --- a/vendor/google.golang.org/api/networkservices/v1/networkservices-gen.go +++ /dev/null @@ -1,16035 +0,0 @@ -// Copyright 2025 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 networkservices provides access to the Network Services API. -// -// For product documentation, see: https://cloud.google.com/networking -// -// # 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/networkservices/v1" -// ... -// ctx := context.Background() -// networkservicesService, err := networkservices.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]: -// -// networkservicesService, err := networkservices.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, ...) -// networkservicesService, err := networkservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package networkservices // import "google.golang.org/api/networkservices/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "networkservices:v1" -const apiName = "networkservices" -const apiVersion = "v1" -const basePath = "https://networkservices.googleapis.com/" -const basePathTemplate = "https://networkservices.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://networkservices.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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Projects = NewProjectsService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - 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.AuthzExtensions = NewProjectsLocationsAuthzExtensionsService(s) - rs.EdgeCacheKeysets = NewProjectsLocationsEdgeCacheKeysetsService(s) - rs.EdgeCacheOrigins = NewProjectsLocationsEdgeCacheOriginsService(s) - rs.EdgeCacheServices = NewProjectsLocationsEdgeCacheServicesService(s) - rs.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s) - rs.Gateways = NewProjectsLocationsGatewaysService(s) - rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) - rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) - rs.LbEdgeExtensions = NewProjectsLocationsLbEdgeExtensionsService(s) - rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s) - rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s) - rs.Meshes = NewProjectsLocationsMeshesService(s) - rs.Operations = NewProjectsLocationsOperationsService(s) - rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) - rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s) - rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s) - rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s) - rs.WasmPlugins = NewProjectsLocationsWasmPluginsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - AuthzExtensions *ProjectsLocationsAuthzExtensionsService - - EdgeCacheKeysets *ProjectsLocationsEdgeCacheKeysetsService - - EdgeCacheOrigins *ProjectsLocationsEdgeCacheOriginsService - - EdgeCacheServices *ProjectsLocationsEdgeCacheServicesService - - EndpointPolicies *ProjectsLocationsEndpointPoliciesService - - Gateways *ProjectsLocationsGatewaysService - - GrpcRoutes *ProjectsLocationsGrpcRoutesService - - HttpRoutes *ProjectsLocationsHttpRoutesService - - LbEdgeExtensions *ProjectsLocationsLbEdgeExtensionsService - - LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService - - LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService - - Meshes *ProjectsLocationsMeshesService - - Operations *ProjectsLocationsOperationsService - - ServiceBindings *ProjectsLocationsServiceBindingsService - - ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService - - TcpRoutes *ProjectsLocationsTcpRoutesService - - TlsRoutes *ProjectsLocationsTlsRoutesService - - WasmPlugins *ProjectsLocationsWasmPluginsService -} - -func NewProjectsLocationsAuthzExtensionsService(s *Service) *ProjectsLocationsAuthzExtensionsService { - rs := &ProjectsLocationsAuthzExtensionsService{s: s} - return rs -} - -type ProjectsLocationsAuthzExtensionsService struct { - s *Service -} - -func NewProjectsLocationsEdgeCacheKeysetsService(s *Service) *ProjectsLocationsEdgeCacheKeysetsService { - rs := &ProjectsLocationsEdgeCacheKeysetsService{s: s} - return rs -} - -type ProjectsLocationsEdgeCacheKeysetsService struct { - s *Service -} - -func NewProjectsLocationsEdgeCacheOriginsService(s *Service) *ProjectsLocationsEdgeCacheOriginsService { - rs := &ProjectsLocationsEdgeCacheOriginsService{s: s} - return rs -} - -type ProjectsLocationsEdgeCacheOriginsService struct { - s *Service -} - -func NewProjectsLocationsEdgeCacheServicesService(s *Service) *ProjectsLocationsEdgeCacheServicesService { - rs := &ProjectsLocationsEdgeCacheServicesService{s: s} - return rs -} - -type ProjectsLocationsEdgeCacheServicesService struct { - s *Service -} - -func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService { - rs := &ProjectsLocationsEndpointPoliciesService{s: s} - return rs -} - -type ProjectsLocationsEndpointPoliciesService struct { - s *Service -} - -func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService { - rs := &ProjectsLocationsGatewaysService{s: s} - rs.RouteViews = NewProjectsLocationsGatewaysRouteViewsService(s) - return rs -} - -type ProjectsLocationsGatewaysService struct { - s *Service - - RouteViews *ProjectsLocationsGatewaysRouteViewsService -} - -func NewProjectsLocationsGatewaysRouteViewsService(s *Service) *ProjectsLocationsGatewaysRouteViewsService { - rs := &ProjectsLocationsGatewaysRouteViewsService{s: s} - return rs -} - -type ProjectsLocationsGatewaysRouteViewsService struct { - s *Service -} - -func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService { - rs := &ProjectsLocationsGrpcRoutesService{s: s} - return rs -} - -type ProjectsLocationsGrpcRoutesService struct { - s *Service -} - -func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService { - rs := &ProjectsLocationsHttpRoutesService{s: s} - return rs -} - -type ProjectsLocationsHttpRoutesService struct { - s *Service -} - -func NewProjectsLocationsLbEdgeExtensionsService(s *Service) *ProjectsLocationsLbEdgeExtensionsService { - rs := &ProjectsLocationsLbEdgeExtensionsService{s: s} - return rs -} - -type ProjectsLocationsLbEdgeExtensionsService 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} - rs.RouteViews = NewProjectsLocationsMeshesRouteViewsService(s) - return rs -} - -type ProjectsLocationsMeshesService struct { - s *Service - - RouteViews *ProjectsLocationsMeshesRouteViewsService -} - -func NewProjectsLocationsMeshesRouteViewsService(s *Service) *ProjectsLocationsMeshesRouteViewsService { - rs := &ProjectsLocationsMeshesRouteViewsService{s: s} - return rs -} - -type ProjectsLocationsMeshesRouteViewsService struct { - s *Service -} - -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { - rs := &ProjectsLocationsOperationsService{s: s} - return rs -} - -type ProjectsLocationsOperationsService struct { - s *Service -} - -func NewProjectsLocationsServiceBindingsService(s *Service) *ProjectsLocationsServiceBindingsService { - rs := &ProjectsLocationsServiceBindingsService{s: s} - return rs -} - -type ProjectsLocationsServiceBindingsService struct { - s *Service -} - -func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService { - rs := &ProjectsLocationsServiceLbPoliciesService{s: s} - return rs -} - -type ProjectsLocationsServiceLbPoliciesService struct { - s *Service -} - -func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService { - rs := &ProjectsLocationsTcpRoutesService{s: s} - return rs -} - -type ProjectsLocationsTcpRoutesService struct { - s *Service -} - -func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService { - rs := &ProjectsLocationsTlsRoutesService{s: s} - return rs -} - -type ProjectsLocationsTlsRoutesService struct { - s *Service -} - -func NewProjectsLocationsWasmPluginsService(s *Service) *ProjectsLocationsWasmPluginsService { - rs := &ProjectsLocationsWasmPluginsService{s: s} - rs.Versions = NewProjectsLocationsWasmPluginsVersionsService(s) - return rs -} - -type ProjectsLocationsWasmPluginsService struct { - s *Service - - Versions *ProjectsLocationsWasmPluginsVersionsService -} - -func NewProjectsLocationsWasmPluginsVersionsService(s *Service) *ProjectsLocationsWasmPluginsVersionsService { - rs := &ProjectsLocationsWasmPluginsVersionsService{s: s} - return rs -} - -type ProjectsLocationsWasmPluginsVersionsService 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditConfig - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod AuditLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// AuthzExtension: `AuthzExtension` is a resource that allows traffic -// forwarding to a callout backend service to make an authorization decision. -type AuthzExtension struct { - // Authority: Required. The `:authority` header in the gRPC request sent from - // Envoy to the extension service. - Authority string `json:"authority,omitempty"` - // 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"` - // 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` or the default - // setting of `FALSE` is used, one of the following happens: * 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. - FailOpen bool `json:"failOpen,omitempty"` - // ForwardHeaders: Optional. List of the HTTP headers to forward to the - // extension (from the client). If omitted, all headers are sent. Each element - // is a string indicating the header name. - ForwardHeaders []string `json:"forwardHeaders,omitempty"` - // Labels: Optional. Set of labels associated with the `AuthzExtension` - // resource. The format must comply with the requirements for labels - // (/compute/docs/labeling-resources#requirements) for Google Cloud resources. - 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 Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata is - // available under the namespace `com.google.authz_extension.`. The following - // variables are supported in the metadata Struct: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `AuthzExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - Name string `json:"name,omitempty"` - // Service: Required. The reference to the service that runs the extension. To - // configure a callout extension, `service` must be a fully-qualified reference - // to a backend service - // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in - // the format: - // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba - // ckendServices/{backendService}` or - // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi - // ces/{backendService}`. - Service string `json:"service,omitempty"` - // Timeout: Required. Specifies the timeout for each individual message on the - // stream. The timeout must be between 10-10000 milliseconds. - Timeout string `json:"timeout,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // WireFormat: Optional. The format of communication supported by the callout - // extension. If not specified, the default value `EXT_PROC_GRPC` is used. - // - // Possible values: - // "WIRE_FORMAT_UNSPECIFIED" - Not specified. - // "EXT_PROC_GRPC" - The extension service uses ext_proc gRPC API over a gRPC - // stream. This is the default value if the wire format is not specified. The - // backend service for the extension must use HTTP2 or H2C as the protocol. All - // `supported_events` for a client request are sent as part of the same gRPC - // stream. - // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC - // API. The backend service for the extension must use HTTP2, or H2C as the - // protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` - // resources. - WireFormat string `json:"wireFormat,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthzExtension) MarshalJSON() ([]byte, error) { - type NoMethod AuthzExtension - return gensupport.MarshalJSON(NoMethod(s), 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`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: A single identity in a workforce identity - // pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: All workforce identities with - // a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single - // identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool - // group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: All identities in a workload identity pool with a certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity - // pool. * `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. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: Deleted single identity in a - // workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview - // of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Binding) MarshalJSON() ([]byte, error) { - type NoMethod Binding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CancelOperationRequest: The request message for Operations.CancelOperation. -type CancelOperationRequest struct { -} - -// 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:"-"` -} - -// EndpointMatcher: A definition of a matcher that selects endpoints to which -// the policies should be applied. -type EndpointMatcher struct { - // MetadataLabelMatcher: The matcher is based on node metadata presented by xDS - // clients. - MetadataLabelMatcher *EndpointMatcherMetadataLabelMatcher `json:"metadataLabelMatcher,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetadataLabelMatcher") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MetadataLabelMatcher") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointMatcher) MarshalJSON() ([]byte, error) { - type NoMethod EndpointMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EndpointMatcherMetadataLabelMatcher: The matcher that is based on node -// metadata presented by xDS clients. -type EndpointMatcherMetadataLabelMatcher struct { - // MetadataLabelMatchCriteria: Specifies how matching should be done. Supported - // values are: MATCH_ANY: At least one of the Labels specified in the matcher - // should match the metadata presented by xDS client. MATCH_ALL: The metadata - // presented by the xDS client should contain all of the labels specified here. - // The selection is determined based on the best match. For example, suppose - // there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the - // matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client - // with label connects, the config from P1 will be selected. If a client with - // label connects, the config from P2 will be selected. If a client with label - // connects, the config from P3 will be selected. If there is more than one - // best match, (for example, if a config P4 with selector exists and if a - // client with label connects), pick up the one with older creation time. - // - // Possible values: - // "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should not be - // used. - // "MATCH_ANY" - At least one of the Labels specified in the matcher should - // match the metadata presented by xDS client. - // "MATCH_ALL" - The metadata presented by the xDS client should contain all - // of the labels specified here. - MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"` - // MetadataLabels: The list of label value pairs that must match labels in the - // provided metadata based on filterMatchCriteria This list can have at most 64 - // entries. The list can be empty if the match criteria is MATCH_ANY, to - // specify a wildcard match (i.e this matches any client). - MetadataLabels []*EndpointMatcherMetadataLabelMatcherMetadataLabels `json:"metadataLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetadataLabelMatchCriteria") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MetadataLabelMatchCriteria") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointMatcherMetadataLabelMatcher) MarshalJSON() ([]byte, error) { - type NoMethod EndpointMatcherMetadataLabelMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EndpointMatcherMetadataLabelMatcherMetadataLabels: Defines a name-pair value -// for a single label. -type EndpointMatcherMetadataLabelMatcherMetadataLabels struct { - // LabelName: Required. Label name presented as key in xDS Node Metadata. - LabelName string `json:"labelName,omitempty"` - // LabelValue: Required. Label value presented as value corresponding to the - // above key, in xDS Node Metadata. - LabelValue string `json:"labelValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointMatcherMetadataLabelMatcherMetadataLabels) MarshalJSON() ([]byte, error) { - type NoMethod EndpointMatcherMetadataLabelMatcherMetadataLabels - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EndpointPolicy: EndpointPolicy is a resource that helps apply desired -// configuration on the endpoints that match specific criteria. For example, -// this resource can be used to apply "authentication config" an all endpoints -// that serve on port 8080. -type EndpointPolicy struct { - // AuthorizationPolicy: Optional. This field specifies the URL of - // AuthorizationPolicy resource that applies authorization policies to the - // inbound traffic at the matched endpoints. Refer to Authorization. If this - // field is not specified, authorization is disabled(no authz checks) for this - // endpoint. - AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` - // ClientTlsPolicy: Optional. A URL referring to a ClientTlsPolicy resource. - // ClientTlsPolicy can be set to specify the authentication for traffic from - // the proxy to the actual endpoints. More specifically, it is applied to the - // outgoing traffic from the proxy to the endpoint. This is typically used for - // sidecar model where the proxy identifies itself as endpoint to the control - // plane, with the connection between sidecar and endpoint requiring - // authentication. If this field is not set, authentication is disabled(open). - // Applicable only when EndpointPolicyType is SIDECAR_PROXY. - ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EndpointMatcher: Required. A matcher that selects endpoints to which the - // policies should be applied. - EndpointMatcher *EndpointMatcher `json:"endpointMatcher,omitempty"` - // Labels: Optional. Set of label tags associated with the EndpointPolicy - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the EndpointPolicy resource. It matches pattern - // `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. - Name string `json:"name,omitempty"` - // ServerTlsPolicy: Optional. A URL referring to ServerTlsPolicy resource. - // ServerTlsPolicy is used to determine the authentication policy to be applied - // to terminate the inbound traffic at the identified backends. If this field - // is not set, authentication is disabled(open) for this endpoint. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // TrafficPortSelector: Optional. Port selector for the (matched) endpoints. If - // no port selector is provided, the matched config is applied to all ports. - TrafficPortSelector *TrafficPortSelector `json:"trafficPortSelector,omitempty"` - // Type: Required. The type of endpoint policy. This is primarily used to - // validate the configuration. - // - // Possible values: - // "ENDPOINT_POLICY_TYPE_UNSPECIFIED" - Default value. Must not be used. - // "SIDECAR_PROXY" - Represents a proxy deployed as a sidecar. - // "GRPC_SERVER" - Represents a proxyless gRPC backend. - Type string `json:"type,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. "AuthorizationPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizationPolicy") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointPolicy) MarshalJSON() ([]byte, error) { - type NoMethod EndpointPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - return gensupport.MarshalJSON(NoMethod(s), 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` and `LbEdgeExtension` 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Extensions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChain) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChain - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExtensionChainExtension: A single extension in the chain to execute for the -// matching request. -type ExtensionChainExtension struct { - // Authority: Optional. The `:authority` header in the gRPC request sent from - // Envoy to the extension service. Required for Callout extensions. This field - // is not supported for plugin extensions. Setting it results in a validation - // error. - 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` or the default - // setting of `FALSE` is used, one of the following happens: * 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. - 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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. For - // `AuthzExtension` resources, the metadata is available under the namespace - // `com.google.authz_extension.`. For other types of extensions, the metadata - // is available under the namespace `com.google....`. For example: - // `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set for plugin extensions. Setting it results in a - // validation error. You can set metadata at either the resource level or the - // extension level. The extension level metadata is recommended because you can - // pass a different set of metadata through each extension to the backend. This - // field is subject to following limitations: * The total size of the metadata - // must be less than 1KiB. * The total number of keys in the metadata must be - // less than 16. * The length of each key must be less than 64 characters. * - // The length of each value must be less than 1024 characters. * All values - // must be strings. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Optional. 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. This field is required except for AuthzExtension. - Name string `json:"name,omitempty"` - // ObservabilityMode: Optional. When set to `TRUE`, enables - // `observability_mode` on the `ext_proc` filter. This makes `ext_proc` calls - // asynchronous. Envoy doesn't check for the response from `ext_proc` calls. - // For more information about the filter, see: - // https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#extensions-filters-http-ext-proc-v3-externalprocessor - // This field is helpful when you want to try out the extension in async - // log-only mode. Supported by regional `LbTrafficExtension` and - // `LbRouteExtension` resources. Only `STREAMED` (default) body processing mode - // is supported. - ObservabilityMode bool `json:"observabilityMode,omitempty"` - // RequestBodySendMode: Optional. Configures the send mode for request body - // processing. The field can only be set if `supported_events` includes - // `REQUEST_BODY`. If `supported_events` includes `REQUEST_BODY`, but - // `request_body_send_mode` is unset, the default value `STREAMED` is used. - // When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must - // include both `REQUEST_BODY` and `REQUEST_TRAILERS`. This field can be set - // only for `LbTrafficExtension` and `LbRouteExtension` resources, and only - // when the `service` field of the extension points to a `BackendService`. Only - // `FULL_DUPLEX_STREAMED` mode is supported for `LbRouteExtension` resources. - // - // Possible values: - // "BODY_SEND_MODE_UNSPECIFIED" - Default value. Do not use. - // "BODY_SEND_MODE_STREAMED" - Calls to the extension are executed in the - // streamed mode. Subsequent chunks will be sent only after the previous chunks - // have been processed. The content of the body chunks is sent one way to the - // extension. Extension may send modified chunks back. This is the default - // value if the processing mode is not specified. - // "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - Calls are executed in the full - // duplex mode. Subsequent chunks will be sent for processing without waiting - // for the response for the previous chunk or for the response for - // `REQUEST_HEADERS` event. Extension can freely modify or chunk the body - // contents. If the extension doesn't send the body contents back, the next - // extension in the chain or the upstream will receive an empty body. - RequestBodySendMode string `json:"requestBodySendMode,omitempty"` - // ResponseBodySendMode: Optional. Configures the send mode for response - // processing. If unspecified, the default value `STREAMED` is used. The field - // can only be set if `supported_events` includes `RESPONSE_BODY`. If - // `supported_events` includes `RESPONSE_BODY`, but `response_body_send_mode` - // is unset, the default value `STREAMED` is used. When this field is set to - // `FULL_DUPLEX_STREAMED`, `supported_events` must include both `RESPONSE_BODY` - // and `RESPONSE_TRAILERS`. This field can be set only for `LbTrafficExtension` - // resources, and only when the `service` field of the extension points to a - // `BackendService`. - // - // Possible values: - // "BODY_SEND_MODE_UNSPECIFIED" - Default value. Do not use. - // "BODY_SEND_MODE_STREAMED" - Calls to the extension are executed in the - // streamed mode. Subsequent chunks will be sent only after the previous chunks - // have been processed. The content of the body chunks is sent one way to the - // extension. Extension may send modified chunks back. This is the default - // value if the processing mode is not specified. - // "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - Calls are executed in the full - // duplex mode. Subsequent chunks will be sent for processing without waiting - // for the response for the previous chunk or for the response for - // `REQUEST_HEADERS` event. Extension can freely modify or chunk the body - // contents. If the extension doesn't send the body contents back, the next - // extension in the chain or the upstream will receive an empty body. - ResponseBodySendMode string `json:"responseBodySendMode,omitempty"` - // Service: Required. The reference to the service that runs the extension. To - // configure a callout extension, `service` must be a fully-qualified reference - // to a backend service - // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in - // the format: - // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba - // ckendServices/{backendService}` or - // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi - // ces/{backendService}`. To configure a plugin extension, `service` must be a - // reference to a `WasmPlugin` resource - // (https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) - // in the format: - // `projects/{project}/locations/{location}/wasmPlugins/{plugin}` or - // `//networkservices.googleapis.com/projects/{project}/locations/{location}/was - // mPlugins/{wasmPlugin}`. Plugin extensions are currently supported for the - // `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` - // resources. - Service string `json:"service,omitempty"` - // SupportedEvents: Optional. A set of events during request or response - // processing for which this extension is called. For the `LbTrafficExtension` - // resource, this field is required. For the `LbRouteExtension` resource, this - // field is optional. If unspecified, `REQUEST_HEADERS` event is assumed as - // supported. For the `LbEdgeExtension` resource, this field is required and - // must only contain `REQUEST_HEADERS` event. For the `AuthzExtension` - // resource, this field is optional. `REQUEST_HEADERS` is the only supported - // event. If unspecified, `REQUEST_HEADERS` event is assumed as supported. - // - // 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. - // "REQUEST_TRAILERS" - If included in `supported_events`, the extension is - // called when the HTTP request trailers arrives. - // "RESPONSE_TRAILERS" - If included in `supported_events`, the extension is - // called when the HTTP response trailers arrives. - SupportedEvents []string `json:"supportedEvents,omitempty"` - // Timeout: Optional. Specifies the timeout for each individual message on the - // stream. The timeout must be between `10`-`10000` milliseconds. Required for - // callout extensions. This field is not supported for plugin extensions. - // Setting it results in a validation error. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChainExtension) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChainExtension - return gensupport.MarshalJSON(NoMethod(s), 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. For - // more information, see CEL matcher language reference - // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CelExpression") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChainMatchCondition - return gensupport.MarshalJSON(NoMethod(s), 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 have reference to to -// Gateways to dictate how requests should be routed by this Gateway. -type Gateway struct { - // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the Gateway - // will receive the traffic. When no address is provided, an IP from the - // subnetwork is allocated This field only applies to gateways of type - // 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for - // IPv4 and :: for IPv6. - Addresses []string `json:"addresses,omitempty"` - // CertificateUrls: Optional. A fully-qualified Certificates URL reference. The - // proxy presents a Certificate (selected based on SNI) when establishing a TLS - // connection. This feature only applies to gateways of type - // 'SECURE_WEB_GATEWAY'. - CertificateUrls []string `json:"certificateUrls,omitempty"` - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EnvoyHeaders: Optional. Determines if envoy will insert internal debug - // headers into upstream requests. Other Envoy headers may still be injected. - // By default, envoy will not insert any debug headers. - // - // Possible values: - // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. - // "NONE" - Suppress envoy debug headers. - // "DEBUG_HEADERS" - Envoy will insert default internal debug headers into - // upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry - // x-envoy-expected-rq-timeout-ms x-envoy-original-path - // x-envoy-upstream-stream-duration-ms - EnvoyHeaders string `json:"envoyHeaders,omitempty"` - // GatewaySecurityPolicy: Optional. A fully-qualified GatewaySecurityPolicy URL - // reference. Defines how a server should apply security policy to inbound (VM - // to Proxy) initiated connections. For example: - // `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is - // specific to gateways of type 'SECURE_WEB_GATEWAY'. - GatewaySecurityPolicy string `json:"gatewaySecurityPolicy,omitempty"` - // IpVersion: Optional. The IP Version that will be used by this gateway. Valid - // options are IPV4 or IPV6. Default is IPV4. - // - // Possible values: - // "IP_VERSION_UNSPECIFIED" - The type when IP version is not specified. - // Defaults to IPV4. - // "IPV4" - The type for IP version 4. - // "IPV6" - The type for IP version 6. - IpVersion string `json:"ipVersion,omitempty"` - // Labels: Optional. Set of label tags associated with the Gateway resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the Gateway resource. It matches pattern - // `projects/*/locations/*/gateways/`. - Name string `json:"name,omitempty"` - // Network: Optional. The relative resource name identifying the VPC network - // that is using this configuration. For example: - // `projects/*/global/networks/network-1`. Currently, this field is specific to - // gateways of type 'SECURE_WEB_GATEWAY'. - Network string `json:"network,omitempty"` - // Ports: Required. One or more port numbers (1-65535), on which the Gateway - // will receive traffic. The proxy binds to the specified ports. Gateways of - // type 'SECURE_WEB_GATEWAY' are limited to 5 ports. Gateways of type - // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple - // ports. - Ports []int64 `json:"ports,omitempty"` - // RoutingMode: Optional. The routing mode of the Gateway. This field is - // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is - // required for gateways of type SECURE_WEB_GATEWAY. - // - // Possible values: - // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are - // configured to send traffic through the gateway. This is the default routing - // mode. - // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are - // unaware of the gateway, and a route (advanced route or other route type) can - // be configured to direct traffic from client to gateway. The gateway then - // acts as a next-hop to the destination. - RoutingMode string `json:"routingMode,omitempty"` - // Scope: Optional. Scope determines how configuration across multiple Gateway - // instances are merged. The configuration for multiple Gateway instances with - // the same scope will be merged as presented as a single configuration to the - // proxy/load balancer. Max length 64 characters. Scope should start with a - // letter and can only have letters, numbers, hyphens. - Scope string `json:"scope,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,omitempty"` - // ServerTlsPolicy: Optional. A fully-qualified ServerTLSPolicy URL reference. - // Specifies how TLS traffic is terminated. If empty, TLS termination is - // disabled. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // Subnetwork: Optional. The relative resource name identifying the subnetwork - // in which this SWG is allocated. For example: - // `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field - // is specific to gateways of type 'SECURE_WEB_GATEWAY". - Subnetwork string `json:"subnetwork,omitempty"` - // Type: Immutable. The type of the customer managed gateway. This field is - // required. If unspecified, an error is returned. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The type of the customer managed gateway is - // unspecified. - // "OPEN_MESH" - The type of the customer managed gateway is TrafficDirector - // Open Mesh. - // "SECURE_WEB_GATEWAY" - The type of the customer managed gateway is - // SecureWebGateway (SWG). - Type string `json:"type,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. "Addresses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Addresses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Gateway) MarshalJSON() ([]byte, error) { - type NoMethod Gateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GatewayRouteView: GatewayRouteView defines view-only resource for Routes to -// a Gateway -type GatewayRouteView struct { - // Name: Output only. Identifier. Full path name of the GatewayRouteView - // resource. Format: - // projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/ - // {route_view} - Name string `json:"name,omitempty"` - // RouteId: Output only. The resource id for the route. - RouteId string `json:"routeId,omitempty"` - // RouteLocation: Output only. Location where the route exists. - RouteLocation string `json:"routeLocation,omitempty"` - // RouteProjectNumber: Output only. Project number where the route exists. - RouteProjectNumber int64 `json:"routeProjectNumber,omitempty,string"` - // RouteType: Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or - // TlsRoute - RouteType string `json:"routeType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GatewayRouteView) MarshalJSON() ([]byte, error) { - type NoMethod GatewayRouteView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRoute: GrpcRoute is the resource defining how gRPC traffic routed by a -// Mesh or Gateway resource is routed. -type GrpcRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this GrpcRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Hostnames: Required. Service hostnames with an optional port for which this - // route describes traffic. Format: [:] Hostname is the fully qualified domain - // name of a network host. This matches the RFC 1123 definition of a hostname - // with 2 notable exceptions: - IPs are not allowed. - A hostname may be - // prefixed with a wildcard label (`*.`). The wildcard label must appear by - // itself as the first label. Hostname can be "precise" which is a domain name - // without the terminating dot of a network host (e.g. `foo.example.com`) or - // "wildcard", which is a domain name prefixed with a single wildcard label - // (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must - // consist of lower case alphanumeric characters or '-', and must start and end - // with an alphanumeric character. No other punctuation is allowed. The routes - // associated with a Mesh or Gateway must have unique hostnames. If you attempt - // to attach multiple routes with conflicting hostnames, the configuration will - // be rejected. For example, while it is acceptable for routes for the - // hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same - // route, it is not possible to associate two routes both with `*.bar.com` or - // both with `bar.com`. If a port is specified, then gRPC clients must use the - // channel URI with the port to match this rule (i.e. "xds:///service:123"), - // otherwise they must supply the URI without a port (i.e. "xds:///service"). - Hostnames []string `json:"hostnames,omitempty"` - // Labels: Optional. Set of label tags associated with the GrpcRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this GrpcRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the GrpcRoute resource. It matches pattern - // `projects/*/locations/*/grpcRoutes/` - Name string `json:"name,omitempty"` - // Rules: Required. A list of detailed rules defining how to route traffic. - // Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - // first matching GrpcRoute.RouteRule will be executed. At least one rule must - // be supplied. - Rules []*GrpcRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRoute) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteDestination: The destination to which traffic will be routed. -type GrpcRouteDestination struct { - // ServiceName: Required. The URL of a destination service to which to route - // traffic. Must refer to either a BackendService or ServiceDirectoryService. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicy: The specification for fault injection -// introduced into traffic to test the resiliency of clients to destination -// service failure. As part of fault injection, when clients send requests to a -// destination, delays can be introduced on a percentage of requests before -// sending those requests to the destination service. Similarly requests from -// clients can be aborted by for a percentage of requests. -type GrpcRouteFaultInjectionPolicy struct { - // Abort: The specification for aborting to client requests. - Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` - // Delay: The specification for injecting delay to client requests. - Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicyAbort: Specification of how client requests are -// aborted as part of fault injection before being sent to a destination. -type GrpcRouteFaultInjectionPolicyAbort struct { - // HttpStatus: The HTTP status code used to abort the request. The value must - // be between 200 and 599 inclusive. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic which will be aborted. The value must - // be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicyAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicyDelay: Specification of how client requests are -// delayed as part of fault injection before being sent to a destination. -type GrpcRouteFaultInjectionPolicyDelay struct { - // FixedDelay: Specify a fixed delay before forwarding the request. - FixedDelay string `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic on which delay will be injected. The - // value must be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicyDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteHeaderMatch: A match against a collection of headers. -type GrpcRouteHeaderMatch struct { - // Key: Required. The key of the header. - Key string `json:"key,omitempty"` - // Type: Optional. Specifies how to match against the value of the header. If - // not specified, a default value of EXACT is used. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. - // "EXACT" - Will only match the exact value provided. - // "REGULAR_EXPRESSION" - Will match paths conforming to the prefix specified - // by value. RE2 syntax is supported. - Type string `json:"type,omitempty"` - // Value: Required. The value of the header. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteMethodMatch: Specifies a match against a method. -type GrpcRouteMethodMatch struct { - // CaseSensitive: Optional. Specifies that matches are case sensitive. The - // default value is true. case_sensitive must not be used with a type of - // REGULAR_EXPRESSION. - CaseSensitive bool `json:"caseSensitive,omitempty"` - // GrpcMethod: Required. Name of the method to match against. If unspecified, - // will match all methods. - GrpcMethod string `json:"grpcMethod,omitempty"` - // GrpcService: Required. Name of the service to match against. If unspecified, - // will match all services. - GrpcService string `json:"grpcService,omitempty"` - // Type: Optional. Specifies how to match against the name. If not specified, a - // default value of "EXACT" is used. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. - // "EXACT" - Will only match the exact name provided. - // "REGULAR_EXPRESSION" - Will interpret grpc_method and grpc_service as - // regexes. RE2 syntax is supported. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaseSensitive") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaseSensitive") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteMethodMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more -// conditions for which this retry rule applies. Valid values are: -type GrpcRouteRetryPolicy struct { - // NumRetries: Specifies the allowed number of retries. This number must be > - // 0. If not specified, default to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // RetryConditions: - connect-failure: Router will retry on failures connecting - // to Backend Services, for example due to connection timeouts. - - // refused-stream: Router will retry if the backend service resets the stream - // with a REFUSED_STREAM error code. This reset type indicates that it is safe - // to retry. - cancelled: Router will retry if the gRPC status code in the - // response header is set to cancelled - deadline-exceeded: Router will retry - // if the gRPC status code in the response header is set to deadline-exceeded - - // resource-exhausted: Router will retry if the gRPC status code in the - // response header is set to resource-exhausted - unavailable: Router will - // retry if the gRPC status code in the response header is set to unavailable - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteAction: Specifies how to route matched traffic. -type GrpcRouteRouteAction struct { - // Destinations: Optional. The destination services to which traffic should be - // forwarded. If multiple destinations are specified, traffic will be split - // between Backend Service(s) according to the weight field of these - // destinations. - Destinations []*GrpcRouteDestination `json:"destinations,omitempty"` - // FaultInjectionPolicy: Optional. The specification for fault injection - // introduced into traffic to test the resiliency of clients to destination - // service failure. As part of fault injection, when clients send requests to a - // destination, delays can be introduced on a percentage of requests before - // sending those requests to the destination service. Similarly requests from - // clients can be aborted by for a percentage of requests. timeout and - // retry_policy will be ignored by clients that are configured with a - // fault_injection_policy - FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // RetryPolicy: Optional. Specifies the retry policy associated with 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. Timeout - // includes all retries. - Timeout string `json:"timeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteMatch: Criteria for matching traffic. A RouteMatch will be -// considered to match when all supplied fields match. -type GrpcRouteRouteMatch struct { - // Headers: Optional. Specifies a collection of headers to match. - Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"` - // Method: Optional. A gRPC method to match against. If this field is empty or - // omitted, will match all methods. - Method *GrpcRouteMethodMatch `json:"method,omitempty"` - // ForceSendFields is a list of field names (e.g. "Headers") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Headers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteRule: Describes how to route traffic. -type GrpcRouteRouteRule struct { - // Action: Required. A detailed rule defining how to route traffic. This field - // is required. - Action *GrpcRouteRouteAction `json:"action,omitempty"` - // Matches: Optional. Matches define conditions used for matching the rule - // against incoming gRPC requests. Each match is independent, i.e. this rule - // will be matched if ANY one of the matches is satisfied. If no matches field - // is specified, this rule will unconditionally match traffic. - Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), 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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a - // session cookie and disable cookie expiration. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CookieTtl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteStatefulSessionAffinityPolicy - return gensupport.MarshalJSON(NoMethod(s), 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 { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this HttpRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Hostnames: Required. Hostnames define a set of hosts that should match - // against the HTTP host header to select a HttpRoute to process the request. - // Hostname is the fully qualified domain name of a network host, as defined by - // RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be - // prefixed with a wildcard label (`*.`). The wildcard label must appear by - // itself as the first label. Hostname can be "precise" which is a domain name - // without the terminating dot of a network host (e.g. `foo.example.com`) or - // "wildcard", which is a domain name prefixed with a single wildcard label - // (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must - // consist of lower case alphanumeric characters or '-', and must start and end - // with an alphanumeric character. No other punctuation is allowed. The routes - // associated with a Mesh or Gateways must have unique hostnames. If you - // attempt to attach multiple routes with conflicting hostnames, the - // configuration will be rejected. For example, while it is acceptable for - // routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated - // with the same Mesh (or Gateways under the same scope), it is not possible to - // associate two routes both with `*.bar.com` or both with `bar.com`. - Hostnames []string `json:"hostnames,omitempty"` - // Labels: Optional. Set of label tags associated with the HttpRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this HttpRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the HttpRoute resource. It matches pattern - // `projects/*/locations/*/httpRoutes/http_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. Rules - // will be matched sequentially based on the RouteMatch specified for the rule. - Rules []*HttpRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRoute) MarshalJSON() ([]byte, error) { - type NoMethod HttpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteCorsPolicy: The Specification for allowing client side cross-origin -// requests. -type HttpRouteCorsPolicy struct { - // AllowCredentials: In response to a preflight request, setting this to true - // indicates that the actual request can include user credentials. This - // translates to the Access-Control-Allow-Credentials header. Default value is - // false. - AllowCredentials bool `json:"allowCredentials,omitempty"` - // AllowHeaders: Specifies the content for Access-Control-Allow-Headers header. - AllowHeaders []string `json:"allowHeaders,omitempty"` - // AllowMethods: Specifies the content for Access-Control-Allow-Methods header. - AllowMethods []string `json:"allowMethods,omitempty"` - // AllowOriginRegexes: Specifies the regular expression patterns that match - // allowed origins. For regular expression grammar, please see - // https://github.com/google/re2/wiki/Syntax. - AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` - // AllowOrigins: Specifies the list of origins that will be allowed to do CORS - // requests. An origin is allowed if it matches either an item in allow_origins - // or an item in allow_origin_regexes. - AllowOrigins []string `json:"allowOrigins,omitempty"` - // Disabled: If true, the CORS policy is disabled. The default value is false, - // which indicates that the CORS policy is in effect. - Disabled bool `json:"disabled,omitempty"` - // ExposeHeaders: Specifies the content for Access-Control-Expose-Headers - // header. - ExposeHeaders []string `json:"exposeHeaders,omitempty"` - // MaxAge: Specifies how long result of a preflight request can be cached in - // seconds. This translates to the Access-Control-Max-Age header. - MaxAge string `json:"maxAge,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCredentials") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteCorsPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteDestination: Specifications of a destination to which the request -// should be routed to. -type HttpRouteDestination struct { - // RequestHeaderModifier: Optional. The specification for modifying the headers - // of a matching request prior to delivery of the request to the destination. - // If HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` - // ResponseHeaderModifier: Optional. The specification for modifying the - // headers of a response prior to sending the response back to the client. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` - // ServiceName: The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Specifies the proportion of requests forwarded to the backend - // referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeaderModifier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeaderModifier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicy: The specification for fault injection -// introduced into traffic to test the resiliency of clients to destination -// service failure. As part of fault injection, when clients send requests to a -// destination, delays can be introduced by client proxy on a percentage of -// requests before sending those requests to the destination service. Similarly -// requests can be aborted by client proxy for a percentage of requests. -type HttpRouteFaultInjectionPolicy struct { - // Abort: The specification for aborting to client requests. - Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` - // Delay: The specification for injecting delay to client requests. - Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicyAbort: Specification of how client requests are -// aborted as part of fault injection before being sent to a destination. -type HttpRouteFaultInjectionPolicyAbort struct { - // HttpStatus: The HTTP status code used to abort the request. The value must - // be between 200 and 599 inclusive. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic which will be aborted. The value must - // be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicyAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicyDelay: Specification of how client requests are -// delayed as part of fault injection before being sent to a destination. -type HttpRouteFaultInjectionPolicyDelay struct { - // FixedDelay: Specify a fixed delay before forwarding the request. - FixedDelay string `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic on which delay will be injected. The - // value must be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicyDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderMatch: Specifies how to select a route rule based on HTTP -// request headers. -type HttpRouteHeaderMatch struct { - // ExactMatch: The value of the header should match exactly the content of - // exact_match. - ExactMatch string `json:"exactMatch,omitempty"` - // Header: The name of the HTTP header to match against. - Header string `json:"header,omitempty"` - // InvertMatch: If specified, the match result will be inverted before - // checking. Default value is set to false. - InvertMatch bool `json:"invertMatch,omitempty"` - // PrefixMatch: The value of the header must start with the contents of - // prefix_match. - PrefixMatch string `json:"prefixMatch,omitempty"` - // PresentMatch: A header with header_name must exist. The match takes place - // whether or not the header has a value. - PresentMatch bool `json:"presentMatch,omitempty"` - // RangeMatch: If specified, the rule will match if the request header value is - // within the range. - RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"` - // RegexMatch: The value of the header must match the regular expression - // specified in regex_match. For regular expression grammar, please see: - // https://github.com/google/re2/wiki/Syntax - RegexMatch string `json:"regexMatch,omitempty"` - // SuffixMatch: The value of the header must end with the contents of - // suffix_match. - SuffixMatch string `json:"suffixMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderMatchIntegerRange: Represents an integer value range. -type HttpRouteHeaderMatchIntegerRange struct { - // End: End of the range (exclusive) - End int64 `json:"end,omitempty"` - // Start: Start of the range (inclusive) - Start int64 `json:"start,omitempty"` - // ForceSendFields is a list of field names (e.g. "End") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "End") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderMatchIntegerRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderModifier: The specification for modifying HTTP header in HTTP -// request and HTTP response. -type HttpRouteHeaderModifier struct { - // Add: Add the headers with given map where key is the name of the header, - // value is the value of the header. - Add map[string]string `json:"add,omitempty"` - // Remove: Remove headers (matching by header names) specified in the list. - Remove []string `json:"remove,omitempty"` - // Set: Completely overwrite/replace the headers with given map where key is - // the name of the header, value is the value of the header. - Set map[string]string `json:"set,omitempty"` - // ForceSendFields is a list of field names (e.g. "Add") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Add") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderModifier - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHttpDirectResponse: Static HTTP response object to be returned. -type HttpRouteHttpDirectResponse struct { - // BytesBody: Optional. Response body as bytes. Maximum body size is 4096B. - BytesBody string `json:"bytesBody,omitempty"` - // Status: Required. Status to return as part of HTTP Response. Must be a - // positive integer. - Status int64 `json:"status,omitempty"` - // StringBody: Optional. Response body as a string. Maximum body length is 1024 - // characters. - StringBody string `json:"stringBody,omitempty"` - // ForceSendFields is a list of field names (e.g. "BytesBody") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BytesBody") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHttpDirectResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteQueryParameterMatch: Specifications to match a query parameter in -// the request. -type HttpRouteQueryParameterMatch struct { - // ExactMatch: The value of the query parameter must exactly match the contents - // of exact_match. Only one of exact_match, regex_match, or present_match must - // be set. - ExactMatch string `json:"exactMatch,omitempty"` - // PresentMatch: Specifies that the QueryParameterMatcher matches if request - // contains query parameter, irrespective of whether the parameter has a value - // or not. Only one of exact_match, regex_match, or present_match must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // QueryParameter: The name of the query parameter to match. - QueryParameter string `json:"queryParameter,omitempty"` - // RegexMatch: The value of the query parameter must match the regular - // expression specified by regex_match. For regular expression grammar, please - // see https://github.com/google/re2/wiki/Syntax Only one of exact_match, - // regex_match, or present_match must be set. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteQueryParameterMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRedirect: The specification for redirecting traffic. -type HttpRouteRedirect struct { - // HostRedirect: The host that will be used in the redirect response instead of - // the one that was supplied in the request. - HostRedirect string `json:"hostRedirect,omitempty"` - // HttpsRedirect: If set to true, the URL scheme in the redirected request is - // set to https. If set to false, the URL scheme of the redirected request will - // remain the same as that of the request. The default is set to false. - HttpsRedirect bool `json:"httpsRedirect,omitempty"` - // PathRedirect: The path that will be used in the redirect response instead of - // the one that was supplied in the request. path_redirect can not be supplied - // together with prefix_redirect. Supply one alone or neither. If neither is - // supplied, the path of the original request will be used for the redirect. - PathRedirect string `json:"pathRedirect,omitempty"` - // PortRedirect: The port that will be used in the redirected request instead - // of the one that was supplied in the request. - PortRedirect int64 `json:"portRedirect,omitempty"` - // PrefixRewrite: Indicates that during redirection, the matched prefix (or - // path) should be swapped with this value. This option allows URLs be - // dynamically created based on the request. - PrefixRewrite string `json:"prefixRewrite,omitempty"` - // ResponseCode: The HTTP Status code to use for the redirect. - // - // Possible values: - // "RESPONSE_CODE_UNSPECIFIED" - Default value - // "MOVED_PERMANENTLY_DEFAULT" - Corresponds to 301. - // "FOUND" - Corresponds to 302. - // "SEE_OTHER" - Corresponds to 303. - // "TEMPORARY_REDIRECT" - Corresponds to 307. In this case, the request - // method will be retained. - // "PERMANENT_REDIRECT" - Corresponds to 308. In this case, the request - // method will be retained. - ResponseCode string `json:"responseCode,omitempty"` - // StripQuery: if set to true, any accompanying query portion of the original - // URL is removed prior to redirecting the request. If set to false, the query - // portion of the original URL is retained. The default is set to false. - StripQuery bool `json:"stripQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRedirect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRedirect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRedirect) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRedirect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRequestMirrorPolicy: Specifies the policy on how requests are -// shadowed to a separate mirrored destination service. The proxy does not wait -// for responses from the shadow service. Prior to sending traffic to the -// shadow service, the host/authority header is suffixed with -shadow. -// Mirroring is currently not supported for Cloud Run destinations. -type HttpRouteRequestMirrorPolicy struct { - // Destination: The destination the requests will be mirrored to. The weight of - // the destination will be ignored. - Destination *HttpRouteDestination `json:"destination,omitempty"` - // MirrorPercent: Optional. The percentage of requests to get mirrored to the - // desired destination. - MirrorPercent float64 `json:"mirrorPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destination") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRequestMirrorPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error { - type NoMethod HttpRouteRequestMirrorPolicy - var s1 struct { - MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MirrorPercent = float64(s1.MirrorPercent) - return nil -} - -// HttpRouteRetryPolicy: The specifications for retries. -type HttpRouteRetryPolicy struct { - // NumRetries: Specifies the allowed number of retries. This number must be > - // 0. If not specified, default to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // PerTryTimeout: Specifies a non-zero timeout per retry attempt. - PerTryTimeout string `json:"perTryTimeout,omitempty"` - // RetryConditions: Specifies one or more conditions when this retry policy - // applies. Valid values are: 5xx: Proxy will attempt a retry if the - // destination service responds with any 5xx response code, of if the - // destination service does not respond at all, example: disconnect, reset, - // read timeout, connection failure and refused streams. gateway-error: Similar - // to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will - // attempt a retry if the destination service does not respond at all - // (disconnect/reset/read timeout) connect-failure: Proxy will retry on - // failures connecting to destination for example due to connection timeouts. - // retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently - // the only retriable error supported is 409. refused-stream: Proxy will retry - // if the destination resets the stream with a REFUSED_STREAM error code. This - // reset type indicates that it is safe to retry. - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type HttpRouteRouteAction struct { - // CorsPolicy: The specification for allowing client side cross-origin - // requests. - CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"` - // Destinations: The destination to which traffic should be forwarded. - Destinations []*HttpRouteDestination `json:"destinations,omitempty"` - // DirectResponse: Optional. Static HTTP Response object to be returned - // regardless of the request. - DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"` - // FaultInjectionPolicy: The specification for fault injection introduced into - // traffic to test the resiliency of clients to backend service failure. As - // part of fault injection, when clients send requests to a backend service, - // delays can be introduced on a percentage of requests before sending those - // requests to the backend service. Similarly requests from clients can be - // aborted for a percentage of requests. timeout and retry_policy will be - // ignored by clients that are configured with a fault_injection_policy - FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // Redirect: If set, the request is directed as configured by this field. - Redirect *HttpRouteRedirect `json:"redirect,omitempty"` - // RequestHeaderModifier: The specification for modifying the headers of a - // matching request prior to delivery of the request to the destination. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` - // RequestMirrorPolicy: Specifies the policy on how requests intended for the - // routes destination are shadowed to a separate mirrored destination. Proxy - // will not wait for the shadow destination to respond before returning the - // response. Prior to sending traffic to the shadow service, the host/authority - // header is suffixed with -shadow. - RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` - // ResponseHeaderModifier: The specification for modifying the headers of a - // response prior to sending the response back to the client. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` - // 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. Timeout includes all retries. - Timeout string `json:"timeout,omitempty"` - // UrlRewrite: The specification for rewrite URL before forwarding requests to - // the destination. - UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteMatch: RouteMatch defines specifications used to match -// requests. If multiple match types are set, this RouteMatch will match if ALL -// type of matches are matched. -type HttpRouteRouteMatch struct { - // FullPathMatch: The HTTP request path value should exactly match this value. - // Only one of full_path_match, prefix_match, or regex_match should be used. - FullPathMatch string `json:"fullPathMatch,omitempty"` - // Headers: Specifies a list of HTTP request headers to match against. ALL of - // the supplied headers must be matched. - Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"` - // IgnoreCase: Specifies if prefix_match and full_path_match matches are case - // sensitive. The default value is false. - IgnoreCase bool `json:"ignoreCase,omitempty"` - // PrefixMatch: The HTTP request path value must begin with specified - // prefix_match. prefix_match must begin with a /. Only one of full_path_match, - // prefix_match, or regex_match should be used. - PrefixMatch string `json:"prefixMatch,omitempty"` - // QueryParameters: Specifies a list of query parameters to match against. ALL - // of the query parameters must be matched. - QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"` - // RegexMatch: The HTTP request path value must satisfy the regular expression - // specified by regex_match after removing any query parameters and anchor - // supplied with the original URL. For regular expression grammar, please see - // https://github.com/google/re2/wiki/Syntax Only one of full_path_match, - // prefix_match, or regex_match should be used. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullPathMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullPathMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type HttpRouteRouteRule struct { - // Action: The detailed rule defining how to route matched traffic. - Action *HttpRouteRouteAction `json:"action,omitempty"` - // Matches: A list of matches define conditions used for matching the rule - // against incoming HTTP requests. Each match is independent, i.e. this rule - // will be matched if ANY one of the matches is satisfied. If no matches field - // is specified, this rule will unconditionally match traffic. If a default - // rule is desired to be configured, add a rule with no matches specified to - // the end of the rules list. - Matches []*HttpRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), 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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a - // session cookie and disable cookie expiration. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CookieTtl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteStatefulSessionAffinityPolicy - return gensupport.MarshalJSON(NoMethod(s), 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 { - // HostRewrite: Prior to forwarding the request to the selected destination, - // the requests host header is replaced by this value. - HostRewrite string `json:"hostRewrite,omitempty"` - // PathPrefixRewrite: Prior to forwarding the request to the selected - // destination, the matching portion of the requests path is replaced by this - // value. - PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRewrite") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRewrite") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteURLRewrite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LbEdgeExtension: `LbEdgeExtension` is a resource that lets the extension -// service influence the selection of backend services and Cloud CDN cache keys -// by modifying request headers. -type LbEdgeExtension 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 attached. At least one forwarding rule is - // required. Only one `LbEdgeExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbEdgeExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: Required. All forwarding rules referenced by this - // extension must share the same load balancing scheme. Supported values: - // `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. Identifier. Name of the `LbEdgeExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbEdgeExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbEdgeExtension - return gensupport.MarshalJSON(NoMethod(s), 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 attached. At least one forwarding rule is - // required. Only one `LbRouteExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbRouteExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - 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 Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata - // applies to all extensions in all extensions chains in this resource. The - // metadata is available under the key `com.google.lb_route_extension.`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set if at least one of the extension chains contains - // plugin extensions. Setting it results in a validation error. You can set - // metadata at either the resource level or the extension level. The extension - // level metadata is recommended because you can pass a different set of - // metadata through each extension to the backend. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `LbRouteExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensio - // n}`. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbRouteExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbRouteExtension - return gensupport.MarshalJSON(NoMethod(s), 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: Optional. A list of references to the forwarding rules to - // which this service extension is attached. At least one forwarding rule is - // required. Only one `LbTrafficExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbTrafficExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - 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` and `EXTERNAL_MANAGED`. For more - // information, refer to Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata - // applies to all extensions in all extensions chains in this resource. The - // metadata is available under the key `com.google.lb_traffic_extension.`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set if at least one of the extension chains contains - // plugin extensions. Setting it results in a validation error. You can set - // metadata at either the resource level or the extension level. The extension - // level metadata is recommended because you can pass a different set of - // metadata through each extension to the backend. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `LbTrafficExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_exte - // nsion}`. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbTrafficExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbTrafficExtension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListAuthzExtensionsResponse: Message for response to listing -// `AuthzExtension` resources. -type ListAuthzExtensionsResponse struct { - // AuthzExtensions: The list of `AuthzExtension` resources. - AuthzExtensions []*AuthzExtension `json:"authzExtensions,omitempty"` - // 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. "AuthzExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthzExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListAuthzExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAuthzExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListEndpointPoliciesResponse: Response returned by the ListEndpointPolicies -// method. -type ListEndpointPoliciesResponse struct { - // EndpointPolicies: List of EndpointPolicy resources. - EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "EndpointPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListEndpointPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGatewayRouteViewsResponse: Response returned by the -// ListGatewayRouteViews method. -type ListGatewayRouteViewsResponse struct { - // GatewayRouteViews: List of GatewayRouteView resources. - GatewayRouteViews []*GatewayRouteView `json:"gatewayRouteViews,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: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. "GatewayRouteViews") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GatewayRouteViews") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGatewayRouteViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGatewayRouteViewsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGatewaysResponse: Response returned by the ListGateways method. -type ListGatewaysResponse struct { - // Gateways: List of Gateway resources. - Gateways []*Gateway `json:"gateways,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"` - // 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. "Gateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Gateways") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGatewaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGatewaysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGrpcRoutesResponse: Response returned by the ListGrpcRoutes method. -type ListGrpcRoutesResponse struct { - // GrpcRoutes: List of GrpcRoute resources. - GrpcRoutes []*GrpcRoute `json:"grpcRoutes,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "GrpcRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGrpcRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListHttpRoutesResponse: Response returned by the ListHttpRoutes method. -type ListHttpRoutesResponse struct { - // HttpRoutes: List of HttpRoute resources. - HttpRoutes []*HttpRoute `json:"httpRoutes,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "HttpRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListHttpRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbEdgeExtensionsResponse: Message for response to listing -// `LbEdgeExtension` resources. -type ListLbEdgeExtensionsResponse struct { - // LbEdgeExtensions: The list of `LbEdgeExtension` resources. - LbEdgeExtensions []*LbEdgeExtension `json:"lbEdgeExtensions,omitempty"` - // 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. "LbEdgeExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbEdgeExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbEdgeExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbEdgeExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbRouteExtensionsResponse: Message for response to listing -// `LbRouteExtension` resources. -type ListLbRouteExtensionsResponse struct { - // LbRouteExtensions: The list of `LbRouteExtension` resources. - LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"` - // 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. "LbRouteExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbRouteExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbRouteExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbTrafficExtensionsResponse: Message for response to listing -// `LbTrafficExtension` resources. -type ListLbTrafficExtensionsResponse struct { - // LbTrafficExtensions: The list of `LbTrafficExtension` resources. - LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"` - // 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. "LbTrafficExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbTrafficExtensions") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbTrafficExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListMeshRouteViewsResponse: Response returned by the ListMeshRouteViews -// method. -type ListMeshRouteViewsResponse struct { - // MeshRouteViews: List of MeshRouteView resources. - MeshRouteViews []*MeshRouteView `json:"meshRouteViews,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: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. "MeshRouteViews") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MeshRouteViews") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListMeshRouteViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMeshRouteViewsResponse - return gensupport.MarshalJSON(NoMethod(s), 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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // `return_partial_success` and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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 empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Meshes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListMeshesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMeshesResponse - return gensupport.MarshalJSON(NoMethod(s), 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"` - // Unreachable: Unordered list. Unreachable resources. Populated when the - // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceBindingsResponse: Response returned by the ListServiceBindings -// method. -type ListServiceBindingsResponse struct { - // 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"` - // ServiceBindings: List of ServiceBinding resources. - ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceBindingsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceLbPoliciesResponse: Response returned by the -// ListServiceLbPolicies method. -type ListServiceLbPoliciesResponse struct { - // 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"` - // ServiceLbPolicies: List of ServiceLbPolicy resources. - ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceLbPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. -type ListTcpRoutesResponse struct { - // 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"` - // TcpRoutes: List of TcpRoute resources. - TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTcpRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. -type ListTlsRoutesResponse struct { - // 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"` - // TlsRoutes: List of TlsRoute resources. - TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTlsRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWasmPluginVersionsResponse: Response returned by the -// `ListWasmPluginVersions` method. -type ListWasmPluginVersionsResponse struct { - // 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"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - Unreachable []string `json:"unreachable,omitempty"` - // WasmPluginVersions: List of `WasmPluginVersion` resources. - WasmPluginVersions []*WasmPluginVersion `json:"wasmPluginVersions,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWasmPluginVersionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWasmPluginVersionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWasmPluginsResponse: Response returned by the `ListWasmPlugins` method. -type ListWasmPluginsResponse struct { - // 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"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - Unreachable []string `json:"unreachable,omitempty"` - // WasmPlugins: List of `WasmPlugin` resources. - WasmPlugins []*WasmPlugin `json:"wasmPlugins,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWasmPluginsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWasmPluginsResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Location) MarshalJSON() ([]byte, error) { - type NoMethod Location - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Advanced resources. -type LoggingConfig struct { - // LogSeverity: Optional. The minimum severity of logs that will be sent to - // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be - // sent, unless it is NONE. - // - // Possible values: - // "LOG_SEVERITY_UNSPECIFIED" - Log severity is not specified. This value is - // treated the same as NONE, but is used to distinguish between no update and - // update to NONE in update_masks. - // "NONE" - Default value at resource creation, presence of this value must - // be treated as no logging/disable logging. - // "DEBUG" - Debug or trace level logging. - // "INFO" - Routine information, such as ongoing status or performance. - // "NOTICE" - Normal but significant events, such as start up, shut down, or - // a configuration change. - // "WARNING" - Warning events might cause problems. - // "ERROR" - Error events are likely to cause problems. - // "CRITICAL" - Critical events cause more severe problems or outages. - // "ALERT" - A person must take action immediately. - // "EMERGENCY" - One or more systems are unusable. - LogSeverity string `json:"logSeverity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogSeverity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LogSeverity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod LoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Mesh: Mesh represents a logical configuration grouping for workload to -// workload communication within a service mesh. Routes that point to mesh -// dictate how requests are routed within this logical mesh boundary. -type Mesh struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EnvoyHeaders: Optional. Determines if envoy will insert internal debug - // headers into upstream requests. Other Envoy headers may still be injected. - // By default, envoy will not insert any debug headers. - // - // Possible values: - // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. - // "NONE" - Suppress envoy debug headers. - // "DEBUG_HEADERS" - Envoy will insert default internal debug headers into - // upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry - // x-envoy-expected-rq-timeout-ms x-envoy-original-path - // x-envoy-upstream-stream-duration-ms - EnvoyHeaders string `json:"envoyHeaders,omitempty"` - // InterceptionPort: Optional. If set to a valid TCP port (1-65535), instructs - // the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) - // address. The SIDECAR proxy will expect all traffic to be redirected to this - // port regardless of its actual ip:port destination. If unset, a port '15001' - // is used as the interception port. This is applicable only for sidecar proxy - // deployments. - InterceptionPort int64 `json:"interceptionPort,omitempty"` - // Labels: Optional. Set of label tags associated with the Mesh resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the Mesh resource. It matches pattern - // `projects/*/locations/*/meshes/`. - Name string `json:"name,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Mesh) MarshalJSON() ([]byte, error) { - type NoMethod Mesh - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MeshRouteView: MeshRouteView defines view-only resource for Routes to a Mesh -type MeshRouteView struct { - // Name: Output only. Identifier. Full path name of the MeshRouteView resource. - // Format: - // projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{rout - // e_view} - Name string `json:"name,omitempty"` - // RouteId: Output only. The resource id for the route. - RouteId string `json:"routeId,omitempty"` - // RouteLocation: Output only. Location where the route exists. - RouteLocation string `json:"routeLocation,omitempty"` - // RouteProjectNumber: Output only. Project number where the route exists. - RouteProjectNumber int64 `json:"routeProjectNumber,omitempty,string"` - // RouteType: Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or - // TlsRoute - RouteType string `json:"routeType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MeshRouteView) MarshalJSON() ([]byte, error) { - type NoMethod MeshRouteView - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), 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. 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Policy: An Identity and Access Management (IAM) policy, which specifies -// access controls for Google Cloud resources. A `Policy` is a collection of -// `bindings`. A `binding` binds one or more `members`, or principals, to a -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RetryFilterPerRouteConfig struct { - // CryptoKeyName: The name of the crypto key to use for encrypting event data. - CryptoKeyName string `json:"cryptoKeyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CryptoKeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RetryFilterPerRouteConfig) MarshalJSON() ([]byte, error) { - type NoMethod RetryFilterPerRouteConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceBinding: ServiceBinding can be used to: - Bind a Service Directory -// Service to be used in a BackendService resource. This feature will be -// deprecated soon. - Bind a Private Service Connect producer service to be -// used in consumer Cloud Service Mesh or Application Load Balancers. - Bind a -// Cloud Run service to be used in consumer Cloud Service Mesh or Application -// Load Balancers. -type ServiceBinding struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Labels: Optional. Set of label tags associated with the ServiceBinding - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the ServiceBinding resource. It matches pattern - // `projects/*/locations/*/serviceBindings/`. - Name string `json:"name,omitempty"` - // Service: Optional. The full Service Directory Service name of the format - // `projects/*/locations/*/namespaces/*/services/*`. This field is for Service - // Directory integration which will be deprecated soon. - Service string `json:"service,omitempty"` - // ServiceId: Output only. The unique identifier of the Service Directory - // Service against which the ServiceBinding resource is validated. This is - // populated when the Service Binding resource is used in another resource - // (like Backend Service). This is of the UUID4 format. This field is for - // Service Directory integration which will be deprecated soon. - ServiceId string `json:"serviceId,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServiceBinding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicy: ServiceLbPolicy holds global load balancing and traffic -// distribution configuration that can be applied to a BackendService. -type ServiceLbPolicy struct { - // AutoCapacityDrain: Optional. Configuration to automatically move traffic - // away for unhealthy IG/NEG for the associated Backend Service. - AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"` - // CreateTime: Output only. The timestamp when this resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // FailoverConfig: Optional. Configuration related to health based failover. - FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"` - // IsolationConfig: Optional. Configuration to provide isolation support for - // the associated Backend Service. - IsolationConfig *ServiceLbPolicyIsolationConfig `json:"isolationConfig,omitempty"` - // Labels: Optional. Set of label tags associated with the ServiceLbPolicy - // resource. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingAlgorithm: Optional. The type of load balancing algorithm to be - // used. The default behavior is WATERFALL_BY_REGION. - // - // Possible values: - // "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the loadbalancing - // algorithm is unspecified. - // "SPRAY_TO_WORLD" - Balance traffic across all backends across the world - // proportionally based on capacity. - // "SPRAY_TO_REGION" - Direct traffic to the nearest region with endpoints - // and capacity before spilling over to other regions and spread the traffic - // from each client to all the MIGs/NEGs in a region. - // "WATERFALL_BY_REGION" - Direct traffic to the nearest region with - // endpoints and capacity before spilling over to other regions. All MIGs/NEGs - // within a region are evenly loaded but each client might not spread the - // traffic to all the MIGs/NEGs in the region. - // "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone closest to - // the client, before spilling over to other zones. - LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"` - // Name: Identifier. Name of the ServiceLbPolicy resource. It matches pattern - // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy - // _name}`. - Name string `json:"name,omitempty"` - // UpdateTime: Output only. The timestamp when this resource was last 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. "AutoCapacityDrain") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCapacityDrain") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy IG/NEG -// should be considered for global load balancing and traffic routing. -type ServiceLbPolicyAutoCapacityDrain struct { - // Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set as - // drained. - An IG/NEG is considered unhealthy if less than 25% of the - // instances/endpoints in the IG/NEG are healthy. - This option will never - // result in draining more than 50% of the configured IGs/NEGs for the Backend - // Service. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyAutoCapacityDrain - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyFailoverConfig: Option to specify health based failover -// behavior. This is not related to Network load balancer FailoverPolicy. -type ServiceLbPolicyFailoverConfig struct { - // FailoverHealthThreshold: Optional. The percentage threshold that a load - // balancer will begin to send traffic to failover backends. If the percentage - // of endpoints in a MIG/NEG is smaller than this value, traffic would be sent - // to failover backends if possible. This field should be set to a value - // between 1 and 99. The default value is 50 for Global external HTTP(S) load - // balancer (classic) and Proxyless service mesh, and 70 for others. - FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverHealthThreshold") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverHealthThreshold") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyFailoverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyIsolationConfig: Configuration to provide isolation support -// for the associated Backend Service. -type ServiceLbPolicyIsolationConfig struct { - // IsolationGranularity: Optional. The isolation granularity of the load - // balancer. - // - // Possible values: - // "ISOLATION_GRANULARITY_UNSPECIFIED" - No isolation is configured for the - // backend service. Traffic can overflow based on the load balancing algorithm. - // "REGION" - Traffic for this service will be isolated at the cloud region - // level. - IsolationGranularity string `json:"isolationGranularity,omitempty"` - // IsolationMode: Optional. The isolation mode of the load balancer. - // - // Possible values: - // "ISOLATION_MODE_UNSPECIFIED" - No isolation mode is configured for the - // backend service. - // "NEAREST" - Traffic will be sent to the nearest region. - // "STRICT" - Traffic will fail if no serving backends are available in the - // same region as the load balancer. - IsolationMode string `json:"isolationMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsolationGranularity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsolationGranularity") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyIsolationConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyIsolationConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the `resource`. The - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRoute: TcpRoute is the resource defining how TCP traffic should be routed -// by a Mesh/Gateway resource. -type TcpRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this TcpRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Labels: Optional. Set of label tags associated with the TcpRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this TcpRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the TcpRoute resource. It matches pattern - // `projects/*/locations/*/tcpRoutes/tcp_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. At - // least one RouteRule must be supplied. If there are multiple rules then the - // action taken will be the first rule to match. - Rules []*TcpRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRoute) MarshalJSON() ([]byte, error) { - type NoMethod TcpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type TcpRouteRouteAction struct { - // Destinations: Optional. The destination services to which traffic should be - // forwarded. At least one destination service is required. Only one of route - // destination or original destination can be set. - Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 30 seconds. If set to 0s, the timeout will be - // disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // OriginalDestination: Optional. If true, Router will use the destination IP - // and port of the original connection as the destination of the request. - // Default is false. Only one of route destinations or original destination can - // be set. - OriginalDestination bool `json:"originalDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteDestination: Describe the destination for traffic to be routed -// to. -type TcpRouteRouteDestination struct { - // ServiceName: Required. The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteMatch: RouteMatch defines the predicate used to match requests -// to a given action. Multiple match types are "OR"ed for evaluation. If no -// routeMatch field is specified, this rule will unconditionally match traffic. -type TcpRouteRouteMatch struct { - // Address: Required. Must be specified in the CIDR range format. A CIDR range - // consists of an IP Address and a prefix length to construct the subnet mask. - // By default, the prefix length is 32 (i.e. matches a single IP address). Only - // IPV4 addresses are supported. Examples: "10.0.0.1" - matches against this - // exact IP address. "10.0.0.0/8" - matches against any IP address within the - // 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP - // address'. - Address string `json:"address,omitempty"` - // Port: Required. Specifies the destination port to match against. - Port string `json:"port,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type TcpRouteRouteRule struct { - // Action: Required. The detailed rule defining how to route matched traffic. - Action *TcpRouteRouteAction `json:"action,omitempty"` - // Matches: Optional. RouteMatch defines the predicate used to match requests - // to a given action. Multiple match types are "OR"ed for evaluation. If no - // routeMatch field is specified, this rule will unconditionally match traffic. - Matches []*TcpRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRoute: TlsRoute defines how traffic should be routed based on SNI and -// other matching L3 attributes. -type TlsRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this TlsRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Labels: Optional. Set of label tags associated with the TlsRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this TlsRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the TlsRoute resource. It matches pattern - // `projects/*/locations/*/tlsRoutes/tls_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. At - // least one RouteRule must be supplied. If there are multiple rules then the - // action taken will be the first rule to match. - Rules []*TlsRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRoute) MarshalJSON() ([]byte, error) { - type NoMethod TlsRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type TlsRouteRouteAction struct { - // Destinations: Required. The destination services to which traffic should be - // forwarded. At least one destination service is required. - Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteDestination: Describe the destination for traffic to be routed -// to. -type TlsRouteRouteDestination struct { - // ServiceName: Required. The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the service_name field. This is computed as: - - // weight/Sum(weights in destinations) Weights in all destinations does not - // need to sum up to 100. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteMatch: RouteMatch defines the predicate used to match requests -// to a given action. Multiple match types are "AND"ed for evaluation. -type TlsRouteRouteMatch struct { - // Alpn: Optional. ALPN (Application-Layer Protocol Negotiation) to match - // against. Examples: "http/1.1", "h2". At least one of sni_host and alpn is - // required. Up to 5 alpns across all matches can be set. - Alpn []string `json:"alpn,omitempty"` - // SniHost: Optional. SNI (server name indicator) to match against. SNI will be - // matched against all wildcard domains, i.e. `www.example.com` will be first - // matched against `www.example.com`, then `*.example.com`, then `*.com.` - // Partial wildcards are not supported, and values like *w.example.com are - // invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts - // across all matches can be set. - SniHost []string `json:"sniHost,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpn") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alpn") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type TlsRouteRouteRule struct { - // Action: Required. The detailed rule defining how to route matched traffic. - Action *TlsRouteRouteAction `json:"action,omitempty"` - // Matches: Required. RouteMatch defines the predicate used to match requests - // to a given action. Multiple match types are "OR"ed for evaluation. Atleast - // one RouteMatch must be supplied. - Matches []*TlsRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TrafficPortSelector: Specification of a port-based selector. -type TrafficPortSelector struct { - // Ports: Optional. A list of ports. Can be port numbers or port range - // (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or - // named ports or * to specify all ports. If the list is empty, all ports are - // selected. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ports") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ports") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TrafficPortSelector) MarshalJSON() ([]byte, error) { - type NoMethod TrafficPortSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPlugin: `WasmPlugin` is a resource representing a service executing a -// customer-provided Wasm module. -type WasmPlugin 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"` - // Labels: Optional. Set of labels associated with the `WasmPlugin` resource. - // The format must comply with the following requirements - // (/compute/docs/labeling-resources#requirements). - Labels map[string]string `json:"labels,omitempty"` - // LogConfig: Optional. Specifies the logging options for the activity - // performed by this plugin. If logging is enabled, plugin logs are exported to - // Cloud Logging. Note that the settings relate to the logs generated by using - // logging statements in your Wasm code. - LogConfig *WasmPluginLogConfig `json:"logConfig,omitempty"` - // MainVersionId: Optional. The ID of the `WasmPluginVersion` resource that is - // the currently serving one. The version referred to must be a child of this - // `WasmPlugin` resource. - MainVersionId string `json:"mainVersionId,omitempty"` - // Name: Identifier. Name of the `WasmPlugin` resource in the following format: - // `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. - Name string `json:"name,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // UsedBy: Output only. List of all extensions - // (https://cloud.google.com/service-extensions/docs/overview) that use this - // `WasmPlugin` resource. - UsedBy []*WasmPluginUsedBy `json:"usedBy,omitempty"` - // Versions: Optional. All versions of this `WasmPlugin` resource in the - // key-value format. The key is the resource ID, and the value is the - // `VersionDetails` object. Lets you create or update a `WasmPlugin` resource - // and its versions in a single request. When the `main_version_id` field is - // not empty, it must point to one of the `VersionDetails` objects in the map. - // If provided in a `PATCH` request, the new versions replace the previous set. - // Any version omitted from the `versions` field is removed. Because the - // `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion` resource - // with the same name already exists and differs, the request fails. Note: In a - // `GET` request, this field is populated only if the field - // `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. - Versions map[string]WasmPluginVersionDetails `json:"versions,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPlugin) MarshalJSON() ([]byte, error) { - type NoMethod WasmPlugin - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginLogConfig: Specifies the logging options for the activity -// performed by this plugin. If logging is enabled, plugin logs are exported to -// Cloud Logging. -type WasmPluginLogConfig struct { - // Enable: Optional. Specifies whether to enable logging for activity by this - // plugin. Defaults to `false`. - Enable bool `json:"enable,omitempty"` - // MinLogLevel: Non-empty default. Specifies the lowest level of the plugin - // logs that are exported to Cloud Logging. This setting relates to the logs - // generated by using logging statements in your Wasm code. This field is can - // be set only if logging is enabled for the plugin. If the field is not - // provided when logging is enabled, it is set to `INFO` by default. - // - // Possible values: - // "LOG_LEVEL_UNSPECIFIED" - Unspecified value. Defaults to `LogLevel.INFO`. - // "TRACE" - Report logs with TRACE level and above. - // "DEBUG" - Report logs with DEBUG level and above. - // "INFO" - Report logs with INFO level and above. - // "WARN" - Report logs with WARN level and above. - // "ERROR" - Report logs with ERROR level and above. - // "CRITICAL" - Report logs with CRITICAL level only. - MinLogLevel string `json:"minLogLevel,omitempty"` - // SampleRate: Non-empty default. Configures the sampling rate of activity - // logs, where `1.0` means all logged activity is reported and `0.0` means no - // activity is reported. A floating point value between `0.0` and `1.0` - // indicates that a percentage of log messages is stored. The default value - // when logging is enabled is `1.0`. The value of the field must be between `0` - // and `1` (inclusive). This field can be specified only if logging is enabled - // for this plugin. - SampleRate float64 `json:"sampleRate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *WasmPluginLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod WasmPluginLogConfig - var s1 struct { - SampleRate gensupport.JSONFloat64 `json:"sampleRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SampleRate = float64(s1.SampleRate) - return nil -} - -// WasmPluginUsedBy: Defines a resource that uses the `WasmPlugin` resource. -type WasmPluginUsedBy struct { - // Name: Output only. Full name of the resource - // https://google.aip.dev/122#full-resource-names, for example - // `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbR - // outeExtensions/{extension}` - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginVersion: A single immutable version of a `WasmPlugin` resource. -// Defines the Wasm module used and optionally its runtime config. -type WasmPluginVersion 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"` - // ImageDigest: Output only. This field holds the digest (usually checksum) - // value for the plugin image. The value is calculated based on the `image_uri` - // field. If the `image_uri` field refers to a container image, the digest - // value is obtained from the container image. If the `image_uri` field refers - // to a generic artifact, the digest value is calculated based on the contents - // of the file. - ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the image containing the Wasm module, stored in - // Artifact Registry. The URI can refer to one of the following repository - // formats: * Container images: the `image_uri` must point to a container that - // contains a single file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the digest of the image is saved in - // the `image_digest` field. When pulling a container image from Artifact - // Registry, the digest value is used instead of an image tag. * Generic - // artifacts: the `image_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `image_digest` field. - ImageUri string `json:"imageUri,omitempty"` - // Labels: Optional. Set of labels associated with the `WasmPluginVersion` - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the `WasmPluginVersion` resource in the following - // format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ - // versions/{wasm_plugin_version}`. - Name string `json:"name,omitempty"` - // PluginConfigData: Configuration for the plugin. The configuration is - // provided to the plugin at runtime through the `ON_CONFIGURE` callback. When - // a new `WasmPluginVersion` resource is created, the digest of the contents is - // saved in the `plugin_config_digest` field. - PluginConfigData string `json:"pluginConfigData,omitempty"` - // PluginConfigDigest: Output only. This field holds the digest (usually - // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` field or the image defined by the - // `plugin_config_uri` field. - PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` - // PluginConfigUri: URI of the plugin configuration stored in the Artifact - // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The URI can refer to one of the following - // repository formats: * Container images: the `plugin_config_uri` must point - // to a container that contains a single file with the name `plugin.config`. - // When a new `WasmPluginVersion` resource is created, the digest of the image - // is saved in the `plugin_config_digest` field. When pulling a container image - // from Artifact Registry, the digest value is used instead of an image tag. * - // Generic artifacts: the `plugin_config_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.config`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `plugin_config_digest` field. - PluginConfigUri string `json:"pluginConfigUri,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginVersion) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginVersionDetails: Details of a `WasmPluginVersion` resource to be -// inlined in the `WasmPlugin` resource. -type WasmPluginVersionDetails 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"` - // ImageDigest: Output only. This field holds the digest (usually checksum) - // value for the plugin image. The value is calculated based on the `image_uri` - // field. If the `image_uri` field refers to a container image, the digest - // value is obtained from the container image. If the `image_uri` field refers - // to a generic artifact, the digest value is calculated based on the contents - // of the file. - ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the image containing the Wasm module, stored in - // Artifact Registry. The URI can refer to one of the following repository - // formats: * Container images: the `image_uri` must point to a container that - // contains a single file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the digest of the image is saved in - // the `image_digest` field. When pulling a container image from Artifact - // Registry, the digest value is used instead of an image tag. * Generic - // artifacts: the `image_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `image_digest` field. - ImageUri string `json:"imageUri,omitempty"` - // Labels: Optional. Set of labels associated with the `WasmPluginVersion` - // resource. - Labels map[string]string `json:"labels,omitempty"` - // PluginConfigData: Configuration for the plugin. The configuration is - // provided to the plugin at runtime through the `ON_CONFIGURE` callback. When - // a new `WasmPluginVersion` version is created, the digest of the contents is - // saved in the `plugin_config_digest` field. - PluginConfigData string `json:"pluginConfigData,omitempty"` - // PluginConfigDigest: Output only. This field holds the digest (usually - // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` field or the image defined by the - // `plugin_config_uri` field. - PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` - // PluginConfigUri: URI of the plugin configuration stored in the Artifact - // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The URI can refer to one of the following - // repository formats: * Container images: the `plugin_config_uri` must point - // to a container that contains a single file with the name `plugin.config`. - // When a new `WasmPluginVersion` resource is created, the digest of the image - // is saved in the `plugin_config_digest` field. When pulling a container image - // from Artifact Registry, the digest value is used instead of an image tag. * - // Generic artifacts: the `plugin_config_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.config`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `plugin_config_digest` field. - PluginConfigUri string `json:"pluginConfigUri,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginVersionDetails) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginVersionDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -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 -// details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not -// use this field. It is unsupported and is ignored unless explicitly -// documented otherwise. This is primarily for internal usage. -func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { - c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) - 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 -// details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsAuthzExtensionsCreateCall struct { - s *Service - parent string - authzextension *AuthzExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `AuthzExtension` resource in a given project and -// location. -// -// - parent: The parent resource of the `AuthzExtension` resource. Must be in -// the format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsAuthzExtensionsService) Create(parent string, authzextension *AuthzExtension) *ProjectsLocationsAuthzExtensionsCreateCall { - c := &ProjectsLocationsAuthzExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.authzextension = authzextension - return c -} - -// AuthzExtensionId sets the optional parameter "authzExtensionId": Required. -// User-provided ID of the `AuthzExtension` resource to be created. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) AuthzExtensionId(authzExtensionId string) *ProjectsLocationsAuthzExtensionsCreateCall { - c.urlParams_.Set("authzExtensionId", authzExtensionId) - 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 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 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 *ProjectsLocationsAuthzExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsCreateCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.authzextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/authzExtensions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `AuthzExtension` resource. -// -// - name: The name of the `AuthzExtension` resource to delete. Must be in the -// format -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Delete(name string) *ProjectsLocationsAuthzExtensionsDeleteCall { - c := &ProjectsLocationsAuthzExtensionsDeleteCall{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 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 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 *ProjectsLocationsAuthzExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsDeleteCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `AuthzExtension` resource. -// -// - name: A name of the `AuthzExtension` resource to get. Must be in the -// format -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Get(name string) *ProjectsLocationsAuthzExtensionsGetCall { - c := &ProjectsLocationsAuthzExtensionsGetCall{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 -// details. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAuthzExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthzExtensionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AuthzExtension.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 *ProjectsLocationsAuthzExtensionsGetCall) Do(opts ...googleapi.CallOption) (*AuthzExtension, 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 := &AuthzExtension{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `AuthzExtension` resources in a given project and location. -// -// - parent: The project and location from which the `AuthzExtension` resources -// are listed. These values are specified in the following format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsAuthzExtensionsService) List(parent string) *ProjectsLocationsAuthzExtensionsListCall { - c := &ProjectsLocationsAuthzExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsAuthzExtensionsListCall) Filter(filter string) *ProjectsLocationsAuthzExtensionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint about how to order the -// results. -func (c *ProjectsLocationsAuthzExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsAuthzExtensionsListCall { - 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 *ProjectsLocationsAuthzExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsAuthzExtensionsListCall { - 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 *ProjectsLocationsAuthzExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsAuthzExtensionsListCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAuthzExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthzExtensionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/authzExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAuthzExtensionsResponse.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 *ProjectsLocationsAuthzExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListAuthzExtensionsResponse, 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 := &ListAuthzExtensionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsAuthzExtensionsListCall) Pages(ctx context.Context, f func(*ListAuthzExtensionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsAuthzExtensionsPatchCall struct { - s *Service - name string - authzextension *AuthzExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `AuthzExtension` resource. -// -// - name: Identifier. Name of the `AuthzExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Patch(name string, authzextension *AuthzExtension) *ProjectsLocationsAuthzExtensionsPatchCall { - c := &ProjectsLocationsAuthzExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.authzextension = authzextension - 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 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 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 *ProjectsLocationsAuthzExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Used to -// specify the fields to be overwritten in the `AuthzExtension` 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 *ProjectsLocationsAuthzExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAuthzExtensionsPatchCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.authzextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall 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 *ProjectsLocationsEdgeCacheKeysetsService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall{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 *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall { - 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 -// details. -func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheKeysets.getIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall 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 *ProjectsLocationsEdgeCacheKeysetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheKeysets.setIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall 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 *ProjectsLocationsEdgeCacheKeysetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall { - c := &ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheKeysets.testIamPermissions" call. -// 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 *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheKeysets.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall 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 *ProjectsLocationsEdgeCacheOriginsService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall{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 *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall { - 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 -// details. -func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheOrigins.getIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall 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 *ProjectsLocationsEdgeCacheOriginsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheOrigins.setIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall 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 *ProjectsLocationsEdgeCacheOriginsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall { - c := &ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheOrigins.testIamPermissions" call. -// 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 *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheOrigins.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheServicesGetIamPolicyCall 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 *ProjectsLocationsEdgeCacheServicesService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheServicesGetIamPolicyCall{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 *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall { - 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 -// details. -func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheServices.getIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheServicesSetIamPolicyCall 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 *ProjectsLocationsEdgeCacheServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall { - c := &ProjectsLocationsEdgeCacheServicesSetIamPolicyCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheServices.setIamPolicy" call. -// 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 *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall 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 *ProjectsLocationsEdgeCacheServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall { - c := &ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall{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 -// details. -func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.edgeCacheServices.testIamPermissions" call. -// 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 *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.edgeCacheServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesCreateCall struct { - s *Service - parent string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new EndpointPolicy in a given project and location. -// -// - parent: The parent resource of the EndpointPolicy. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall { - c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.endpointpolicy = endpointpolicy - return c -} - -// EndpointPolicyId sets the optional parameter "endpointPolicyId": Required. -// Short name of the EndpointPolicy resource to be created. E.g. "CustomECS". -func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall { - c.urlParams_.Set("endpointPolicyId", endpointPolicyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.endpointpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointPolicies") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single EndpointPolicy. -// -// - name: A name of the EndpointPolicy to delete. Must be in the format -// `projects/*/locations/*/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall { - c := &ProjectsLocationsEndpointPoliciesDeleteCall{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 -// details. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single EndpointPolicy. -// -// - name: A name of the EndpointPolicy to get. Must be in the format -// `projects/*/locations/*/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall { - c := &ProjectsLocationsEndpointPoliciesGetCall{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 -// details. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *EndpointPolicy.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 *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, 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 := &EndpointPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists EndpointPolicies in a given project and location. -// -// - parent: The project and location from which the EndpointPolicies should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall { - c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EndpointPolicies to return per call. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListEndpointPoliciesResponse` Indicates that this is a continuation of -// a prior `ListEndpointPolicies` call, and that the system should return the -// next page of data. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsEndpointPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListEndpointPoliciesResponse.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 *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, 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 := &ListEndpointPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsEndpointPoliciesPatchCall struct { - s *Service - name string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single EndpointPolicy. -// -// - name: Identifier. Name of the EndpointPolicy resource. It matches pattern -// `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. -func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall { - c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.endpointpolicy = endpointpolicy - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the EndpointPolicy 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 *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall { - 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 -// details. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.endpointpolicy) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysCreateCall struct { - s *Service - parent string - gateway *Gateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Gateway in a given project and location. -// -// - parent: The parent resource of the Gateway. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall { - c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gateway = gateway - return c -} - -// GatewayId sets the optional parameter "gatewayId": Required. Short name of -// the Gateway resource to be created. -func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall { - c.urlParams_.Set("gatewayId", gatewayId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.gateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gateways") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single Gateway. -// -// - name: A name of the Gateway to delete. Must be in the format -// `projects/*/locations/*/gateways/*`. -func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall { - c := &ProjectsLocationsGatewaysDeleteCall{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 -// details. -func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single Gateway. -// -// - name: A name of the Gateway to get. Must be in the format -// `projects/*/locations/*/gateways/*`. -func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall { - c := &ProjectsLocationsGatewaysGetCall{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 -// details. -func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Gateway.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 *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, 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 := &Gateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Gateways in a given project and location. -// -// - parent: The project and location from which the Gateways should be listed, -// specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall { - c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Gateways -// to return per call. -func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGatewaysResponse` Indicates that this is a continuation of a prior -// `ListGateways` call, and that the system should return the next page of -// data. -func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGatewaysResponse.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 *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, 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 := &ListGatewaysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGatewaysPatchCall struct { - s *Service - name string - gateway *Gateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Gateway. -// -// - name: Identifier. Name of the Gateway resource. It matches pattern -// `projects/*/locations/*/gateways/`. -func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall { - c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gateway = gateway - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Gateway 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 *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.gateway) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysRouteViewsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a single RouteView of a Gateway. -// -// - name: Name of the GatewayRouteView resource. Formats: -// projects/{project_number}/locations/{location}/gateways/{gateway}/routeView -// s/{route_view}. -func (r *ProjectsLocationsGatewaysRouteViewsService) Get(name string) *ProjectsLocationsGatewaysRouteViewsGetCall { - c := &ProjectsLocationsGatewaysRouteViewsGetCall{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 -// details. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.routeViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GatewayRouteView.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 *ProjectsLocationsGatewaysRouteViewsGetCall) Do(opts ...googleapi.CallOption) (*GatewayRouteView, 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 := &GatewayRouteView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysRouteViewsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RouteViews -// -// - parent: The Gateway to which a Route is associated. Formats: -// projects/{project_number}/locations/{location}/gateways/{gateway}. -func (r *ProjectsLocationsGatewaysRouteViewsService) List(parent string) *ProjectsLocationsGatewaysRouteViewsListCall { - c := &ProjectsLocationsGatewaysRouteViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewayRouteViews to return per call. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysRouteViewsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGatewayRouteViewsResponse` Indicates that this is a continuation -// of a prior `ListGatewayRouteViews` call, and that the system should return -// the next page of data. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysRouteViewsListCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysRouteViewsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysRouteViewsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysRouteViewsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysRouteViewsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/routeViews") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.routeViews.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGatewayRouteViewsResponse.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 *ProjectsLocationsGatewaysRouteViewsListCall) Do(opts ...googleapi.CallOption) (*ListGatewayRouteViewsResponse, 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 := &ListGatewayRouteViewsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGatewaysRouteViewsListCall) Pages(ctx context.Context, f func(*ListGatewayRouteViewsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGrpcRoutesCreateCall struct { - s *Service - parent string - grpcroute *GrpcRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new GrpcRoute in a given project and location. -// -// - parent: The parent resource of the GrpcRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall { - c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.grpcroute = grpcroute - return c -} - -// GrpcRouteId sets the optional parameter "grpcRouteId": Required. Short name -// of the GrpcRoute resource to be created. -func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall { - c.urlParams_.Set("grpcRouteId", grpcRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grpcroute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/grpcRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single GrpcRoute. -// -// - name: A name of the GrpcRoute to delete. Must be in the format -// `projects/*/locations/*/grpcRoutes/*`. -func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall { - c := &ProjectsLocationsGrpcRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single GrpcRoute. -// -// - name: A name of the GrpcRoute to get. Must be in the format -// `projects/*/locations/*/grpcRoutes/*`. -func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall { - c := &ProjectsLocationsGrpcRoutesGetCall{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 -// details. -func (c *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GrpcRoute.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 *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, 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 := &GrpcRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists GrpcRoutes in a given project and location. -// -// - parent: The project and location from which the GrpcRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall { - c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// GrpcRoutes to return per call. -func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGrpcRoutesResponse` Indicates that this is a continuation of a -// prior `ListGrpcRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsGrpcRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/grpcRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGrpcRoutesResponse.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 *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, 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 := &ListGrpcRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGrpcRoutesPatchCall struct { - s *Service - name string - grpcroute *GrpcRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single GrpcRoute. -// -// - name: Identifier. Name of the GrpcRoute resource. It matches pattern -// `projects/*/locations/*/grpcRoutes/`. -func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall { - c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.grpcroute = grpcroute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GrpcRoute 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 *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grpcroute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesCreateCall struct { - s *Service - parent string - httproute *HttpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new HttpRoute in a given project and location. -// -// - parent: The parent resource of the HttpRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall { - c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.httproute = httproute - return c -} - -// HttpRouteId sets the optional parameter "httpRouteId": Required. Short name -// of the HttpRoute resource to be created. -func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall { - c.urlParams_.Set("httpRouteId", httpRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httproute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/httpRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single HttpRoute. -// -// - name: A name of the HttpRoute to delete. Must be in the format -// `projects/*/locations/*/httpRoutes/*`. -func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall { - c := &ProjectsLocationsHttpRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single HttpRoute. -// -// - name: A name of the HttpRoute to get. Must be in the format -// `projects/*/locations/*/httpRoutes/*`. -func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall { - c := &ProjectsLocationsHttpRoutesGetCall{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 -// details. -func (c *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpRoute.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 *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, 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 := &HttpRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists HttpRoute in a given project and location. -// -// - parent: The project and location from which the HttpRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall { - c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// HttpRoutes to return per call. -func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListHttpRoutesResponse` Indicates that this is a continuation of a -// prior `ListHttpRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsHttpRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/httpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListHttpRoutesResponse.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 *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, 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 := &ListHttpRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsHttpRoutesPatchCall struct { - s *Service - name string - httproute *HttpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single HttpRoute. -// -// - name: Identifier. Name of the HttpRoute resource. It matches pattern -// `projects/*/locations/*/httpRoutes/http_route_name>`. -func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall { - c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.httproute = httproute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the HttpRoute 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 *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httproute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsCreateCall struct { - s *Service - parent string - lbedgeextension *LbEdgeExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `LbEdgeExtension` resource in a given project and -// location. -// -// - parent: The parent resource of the `LbEdgeExtension` resource. Must be in -// the format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Create(parent string, lbedgeextension *LbEdgeExtension) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c := &ProjectsLocationsLbEdgeExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.lbedgeextension = lbedgeextension - return c -} - -// LbEdgeExtensionId sets the optional parameter "lbEdgeExtensionId": Required. -// User-provided ID of the `LbEdgeExtension` resource to be created. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) LbEdgeExtensionId(lbEdgeExtensionId string) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.urlParams_.Set("lbEdgeExtensionId", lbEdgeExtensionId) - 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 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 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 *ProjectsLocationsLbEdgeExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsCreateCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbedgeextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbEdgeExtensions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `LbEdgeExtension` resource. -// -// - name: The name of the `LbEdgeExtension` resource to delete. Must be in the -// format -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Delete(name string) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c := &ProjectsLocationsLbEdgeExtensionsDeleteCall{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 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 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 *ProjectsLocationsLbEdgeExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `LbEdgeExtension` resource. -// -// - name: A name of the `LbEdgeExtension` resource to get. Must be in the -// format -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Get(name string) *ProjectsLocationsLbEdgeExtensionsGetCall { - c := &ProjectsLocationsLbEdgeExtensionsGetCall{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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LbEdgeExtension.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 *ProjectsLocationsLbEdgeExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbEdgeExtension, 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 := &LbEdgeExtension{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `LbEdgeExtension` resources in a given project and location. -// -// - parent: The project and location from which the `LbEdgeExtension` -// resources are listed. These values are specified in the following format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) List(parent string) *ProjectsLocationsLbEdgeExtensionsListCall { - c := &ProjectsLocationsLbEdgeExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Filter(filter string) *ProjectsLocationsLbEdgeExtensionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint about how to order the -// results. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 *ProjectsLocationsLbEdgeExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 *ProjectsLocationsLbEdgeExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbEdgeExtensionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbEdgeExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListLbEdgeExtensionsResponse.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 *ProjectsLocationsLbEdgeExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbEdgeExtensionsResponse, 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 := &ListLbEdgeExtensionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsLbEdgeExtensionsListCall) Pages(ctx context.Context, f func(*ListLbEdgeExtensionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsLbEdgeExtensionsPatchCall struct { - s *Service - name string - lbedgeextension *LbEdgeExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `LbEdgeExtension` resource. -// -// - name: Identifier. Name of the `LbEdgeExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Patch(name string, lbedgeextension *LbEdgeExtension) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c := &ProjectsLocationsLbEdgeExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.lbedgeextension = lbedgeextension - 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 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 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 *ProjectsLocationsLbEdgeExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Used to specify the -// fields to be overwritten in the `LbEdgeExtension` 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 *ProjectsLocationsLbEdgeExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbEdgeExtensionsPatchCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbedgeextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbrouteextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_extens -// ion}`. -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_extens -// ion}`. -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 -// details. -func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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. These values are 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 about 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 -// details. -func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -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: Identifier. Name of the `LbRouteExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens -// ion}`. -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 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 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": 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbrouteextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtrafficextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_traffic_ex -// tension}`. -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_traffic_ex -// tension}`. -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 -// details. -func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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. These values are 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 about 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 -// details. -func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -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: Identifier. Name of the `LbTrafficExtension` resource in the -// following format: -// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex -// tension}`. -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 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 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": 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtrafficextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesCreateCall struct { - s *Service - parent string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Mesh in a given project and location. -// -// - parent: The parent resource of the Mesh. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { - c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.mesh = mesh - return c -} - -// MeshId sets the optional parameter "meshId": Required. Short name of the -// Mesh resource to be created. -func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("meshId", meshId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.mesh) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single Mesh. -// -// - name: A name of the Mesh to delete. Must be in the format -// `projects/*/locations/*/meshes/*`. -func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { - c := &ProjectsLocationsMeshesDeleteCall{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 -// details. -func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single Mesh. -// -// - name: A name of the Mesh to get. Must be in the format -// `projects/*/locations/*/meshes/*`. -func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { - c := &ProjectsLocationsMeshesGetCall{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 -// details. -func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Mesh.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 *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, 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 := &Mesh{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Meshes in a given project and location. -// -// - parent: The project and location from which the Meshes should be listed, -// specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { - c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Meshes to -// return per call. -func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListMeshesResponse` Indicates that this is a continuation of a prior -// `ListMeshes` call, and that the system should return the next page of data. -func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsMeshesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListMeshesResponse.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 *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, 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 := &ListMeshesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsMeshesPatchCall struct { - s *Service - name string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Mesh. -// -// - name: Identifier. Name of the Mesh resource. It matches pattern -// `projects/*/locations/*/meshes/`. -func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { - c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.mesh = mesh - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Mesh 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 *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { - 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 -// details. -func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.mesh) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesRouteViewsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a single RouteView of a Mesh. -// -// - name: Name of the MeshRouteView resource. Format: -// projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{ro -// ute_view}. -func (r *ProjectsLocationsMeshesRouteViewsService) Get(name string) *ProjectsLocationsMeshesRouteViewsGetCall { - c := &ProjectsLocationsMeshesRouteViewsGetCall{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 -// details. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesRouteViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesRouteViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesRouteViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesRouteViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.routeViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MeshRouteView.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 *ProjectsLocationsMeshesRouteViewsGetCall) Do(opts ...googleapi.CallOption) (*MeshRouteView, 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 := &MeshRouteView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesRouteViewsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RouteViews -// -// - parent: The Mesh to which a Route is associated. Format: -// projects/{project_number}/locations/{location}/meshes/{mesh}. -func (r *ProjectsLocationsMeshesRouteViewsService) List(parent string) *ProjectsLocationsMeshesRouteViewsListCall { - c := &ProjectsLocationsMeshesRouteViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// MeshRouteViews to return per call. -func (c *ProjectsLocationsMeshesRouteViewsListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesRouteViewsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListMeshRouteViewsResponse` Indicates that this is a continuation of a -// prior `ListMeshRouteViews` call, and that the system should return the next -// page of data. -func (c *ProjectsLocationsMeshesRouteViewsListCall) PageToken(pageToken string) *ProjectsLocationsMeshesRouteViewsListCall { - 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 -// details. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesRouteViewsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesRouteViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesRouteViewsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Context(ctx context.Context) *ProjectsLocationsMeshesRouteViewsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesRouteViewsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/routeViews") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.routeViews.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListMeshRouteViewsResponse.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 *ProjectsLocationsMeshesRouteViewsListCall) Do(opts ...googleapi.CallOption) (*ListMeshRouteViewsResponse, 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 := &ListMeshRouteViewsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsMeshesRouteViewsListCall) Pages(ctx context.Context, f func(*ListMeshRouteViewsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.cancel" call. -// 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 *ProjectsLocationsOperationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -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. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.delete" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// When set to `true`, operations that are reachable are returned as normal, -// and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and -// will result in an `UNIMPLEMENTED` error if set unless explicitly documented -// otherwise in service or product specific documentation. -func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsServiceBindingsCreateCall struct { - s *Service - parent string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ServiceBinding in a given project and location. -// -// - parent: The parent resource of the ServiceBinding. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { - c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.servicebinding = servicebinding - return c -} - -// ServiceBindingId sets the optional parameter "serviceBindingId": Required. -// Short name of the ServiceBinding resource to be created. -func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("serviceBindingId", serviceBindingId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicebinding) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single ServiceBinding. -// -// - name: A name of the ServiceBinding to delete. Must be in the format -// `projects/*/locations/*/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { - c := &ProjectsLocationsServiceBindingsDeleteCall{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 -// details. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single ServiceBinding. -// -// - name: A name of the ServiceBinding to get. Must be in the format -// `projects/*/locations/*/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { - c := &ProjectsLocationsServiceBindingsGetCall{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 -// details. -func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceBinding.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 *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, 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 := &ServiceBinding{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ServiceBinding in a given project and location. -// -// - parent: The project and location from which the ServiceBindings should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { - c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceBindings to return per call. -func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListServiceBindingsResponse` Indicates that this is a continuation of -// a prior `ListRouters` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { - 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 -// details. -func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceBindingsResponse.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 *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, 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 := &ListServiceBindingsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsServiceBindingsPatchCall struct { - s *Service - name string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ServiceBinding. -// -// - name: Identifier. Name of the ServiceBinding resource. It matches pattern -// `projects/*/locations/*/serviceBindings/`. -func (r *ProjectsLocationsServiceBindingsService) Patch(name string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsPatchCall { - c := &ProjectsLocationsServiceBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.servicebinding = servicebinding - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the ServiceBinding 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 *ProjectsLocationsServiceBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceBindingsPatchCall { - 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 -// details. -func (c *ProjectsLocationsServiceBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicebinding) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesCreateCall struct { - s *Service - parent string - servicelbpolicy *ServiceLbPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ServiceLbPolicy in a given project and location. -// -// - parent: The parent resource of the ServiceLbPolicy. Must be in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall { - c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.servicelbpolicy = servicelbpolicy - return c -} - -// ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": Required. -// Short name of the ServiceLbPolicy resource to be created. E.g. for resource -// name -// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy -// _name}`. the id is value of {service_lb_policy_name} -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicelbpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single ServiceLbPolicy. -// -// - name: A name of the ServiceLbPolicy to delete. Must be in the format -// `projects/{project}/locations/{location}/serviceLbPolicies/*`. -func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c := &ProjectsLocationsServiceLbPoliciesDeleteCall{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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single ServiceLbPolicy. -// -// - name: A name of the ServiceLbPolicy to get. Must be in the format -// `projects/{project}/locations/{location}/serviceLbPolicies/*`. -func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall { - c := &ProjectsLocationsServiceLbPoliciesGetCall{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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceLbPolicy.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 *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, 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 := &ServiceLbPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ServiceLbPolicies in a given project and location. -// -// - parent: The project and location from which the ServiceLbPolicies should -// be listed, specified in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall { - c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceLbPolicies to return per call. -func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListServiceLbPoliciesResponse` Indicates that this is a continuation -// of a prior `ListRouters` call, and that the system should return the next -// page of data. -func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall { - 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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceLbPoliciesResponse.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 *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, 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 := &ListServiceLbPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsServiceLbPoliciesPatchCall struct { - s *Service - name string - servicelbpolicy *ServiceLbPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ServiceLbPolicy. -// -// - name: Identifier. Name of the ServiceLbPolicy resource. It matches pattern -// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_poli -// cy_name}`. -func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall { - c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.servicelbpolicy = servicelbpolicy - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the ServiceLbPolicy 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 *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall { - 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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicelbpolicy) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesCreateCall struct { - s *Service - parent string - tcproute *TcpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new TcpRoute in a given project and location. -// -// - parent: The parent resource of the TcpRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall { - c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.tcproute = tcproute - return c -} - -// TcpRouteId sets the optional parameter "tcpRouteId": Required. Short name of -// the TcpRoute resource to be created. -func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall { - c.urlParams_.Set("tcpRouteId", tcpRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tcproute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tcpRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single TcpRoute. -// -// - name: A name of the TcpRoute to delete. Must be in the format -// `projects/*/locations/*/tcpRoutes/*`. -func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall { - c := &ProjectsLocationsTcpRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single TcpRoute. -// -// - name: A name of the TcpRoute to get. Must be in the format -// `projects/*/locations/*/tcpRoutes/*`. -func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall { - c := &ProjectsLocationsTcpRoutesGetCall{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 -// details. -func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TcpRoute.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 *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, 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 := &TcpRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists TcpRoute in a given project and location. -// -// - parent: The project and location from which the TcpRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall { - c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of TcpRoutes -// to return per call. -func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListTcpRoutesResponse` Indicates that this is a continuation of a -// prior `ListTcpRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsTcpRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tcpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListTcpRoutesResponse.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 *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, 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 := &ListTcpRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsTcpRoutesPatchCall struct { - s *Service - name string - tcproute *TcpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single TcpRoute. -// -// - name: Identifier. Name of the TcpRoute resource. It matches pattern -// `projects/*/locations/*/tcpRoutes/tcp_route_name>`. -func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall { - c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.tcproute = tcproute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the TcpRoute 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 *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tcproute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesCreateCall struct { - s *Service - parent string - tlsroute *TlsRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new TlsRoute in a given project and location. -// -// - parent: The parent resource of the TlsRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall { - c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.tlsroute = tlsroute - return c -} - -// TlsRouteId sets the optional parameter "tlsRouteId": Required. Short name of -// the TlsRoute resource to be created. -func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall { - c.urlParams_.Set("tlsRouteId", tlsRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tlsroute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single TlsRoute. -// -// - name: A name of the TlsRoute to delete. Must be in the format -// `projects/*/locations/*/tlsRoutes/*`. -func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall { - c := &ProjectsLocationsTlsRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single TlsRoute. -// -// - name: A name of the TlsRoute to get. Must be in the format -// `projects/*/locations/*/tlsRoutes/*`. -func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall { - c := &ProjectsLocationsTlsRoutesGetCall{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 -// details. -func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TlsRoute.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 *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, 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 := &TlsRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists TlsRoute in a given project and location. -// -// - parent: The project and location from which the TlsRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall { - c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of TlsRoutes -// to return per call. -func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListTlsRoutesResponse` Indicates that this is a continuation of a -// prior `ListTlsRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsTlsRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListTlsRoutesResponse.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 *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, 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 := &ListTlsRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsTlsRoutesPatchCall struct { - s *Service - name string - tlsroute *TlsRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single TlsRoute. -// -// - name: Identifier. Name of the TlsRoute resource. It matches pattern -// `projects/*/locations/*/tlsRoutes/tls_route_name>`. -func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall { - c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.tlsroute = tlsroute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the TlsRoute 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 *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tlsroute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsCreateCall struct { - s *Service - parent string - wasmplugin *WasmPlugin - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `WasmPlugin` resource in a given project and location. -// -// - parent: The parent resource of the `WasmPlugin` resource. Must be in the -// format `projects/{project}/locations/global`. -func (r *ProjectsLocationsWasmPluginsService) Create(parent string, wasmplugin *WasmPlugin) *ProjectsLocationsWasmPluginsCreateCall { - c := &ProjectsLocationsWasmPluginsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.wasmplugin = wasmplugin - return c -} - -// WasmPluginId sets the optional parameter "wasmPluginId": Required. -// User-provided ID of the `WasmPlugin` resource to be created. -func (c *ProjectsLocationsWasmPluginsCreateCall) WasmPluginId(wasmPluginId string) *ProjectsLocationsWasmPluginsCreateCall { - c.urlParams_.Set("wasmPluginId", wasmPluginId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsCreateCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmplugin) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/wasmPlugins") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `WasmPlugin` resource. -// -// - name: A name of the `WasmPlugin` resource to delete. Must be in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Delete(name string) *ProjectsLocationsWasmPluginsDeleteCall { - c := &ProjectsLocationsWasmPluginsDeleteCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `WasmPlugin` resource. -// -// - name: A name of the `WasmPlugin` resource to get. Must be in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Get(name string) *ProjectsLocationsWasmPluginsGetCall { - c := &ProjectsLocationsWasmPluginsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// View sets the optional parameter "view": Determines how much data must be -// returned in the response. See AIP-157 (https://google.aip.dev/157). -// -// Possible values: -// -// "WASM_PLUGIN_VIEW_UNSPECIFIED" - Unspecified value. Do not use. -// "WASM_PLUGIN_VIEW_BASIC" - If specified in the `GET` request for a -// -// `WasmPlugin` resource, the server's response includes just the `WasmPlugin` -// resource. -// -// "WASM_PLUGIN_VIEW_FULL" - If specified in the `GET` request for a -// -// `WasmPlugin` resource, the server's response includes the `WasmPlugin` -// resource with all its versions. -func (c *ProjectsLocationsWasmPluginsGetCall) View(view string) *ProjectsLocationsWasmPluginsGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsGetCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WasmPlugin.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 *ProjectsLocationsWasmPluginsGetCall) Do(opts ...googleapi.CallOption) (*WasmPlugin, 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 := &WasmPlugin{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `WasmPlugin` resources in a given project and location. -// -// - parent: The project and location from which the `WasmPlugin` resources are -// listed, specified in the following format: -// `projects/{project}/locations/global`. -func (r *ProjectsLocationsWasmPluginsService) List(parent string) *ProjectsLocationsWasmPluginsListCall { - c := &ProjectsLocationsWasmPluginsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// `WasmPlugin` resources to return per call. If not specified, at most 50 -// `WasmPlugin` resources are returned. The maximum value is 1000; values above -// 1000 are coerced to 1000. -func (c *ProjectsLocationsWasmPluginsListCall) PageSize(pageSize int64) *ProjectsLocationsWasmPluginsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListWasmPluginsResponse` call. Indicates that this is a continuation -// of a prior `ListWasmPlugins` call, and that the next page of data is to be -// returned. -func (c *ProjectsLocationsWasmPluginsListCall) PageToken(pageToken string) *ProjectsLocationsWasmPluginsListCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsListCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/wasmPlugins") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWasmPluginsResponse.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 *ProjectsLocationsWasmPluginsListCall) Do(opts ...googleapi.CallOption) (*ListWasmPluginsResponse, 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 := &ListWasmPluginsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsWasmPluginsListCall) Pages(ctx context.Context, f func(*ListWasmPluginsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsWasmPluginsPatchCall struct { - s *Service - name string - wasmplugin *WasmPlugin - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `WasmPlugin` resource. -// -// - name: Identifier. Name of the `WasmPlugin` resource in the following -// format: -// `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Patch(name string, wasmplugin *WasmPlugin) *ProjectsLocationsWasmPluginsPatchCall { - c := &ProjectsLocationsWasmPluginsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.wasmplugin = wasmplugin - return c -} - -// UpdateMask sets the optional parameter "updateMask": Used to specify the -// fields to be overwritten in the `WasmPlugin` resource by the update. The -// fields specified in the `update_mask` field are relative to the resource, -// not the full request. An omitted `update_mask` field is treated as an -// implied `update_mask` field equivalent to all fields that are populated -// (that have a non-empty value). The `update_mask` field supports a special -// value `*`, which means that each field in the given `WasmPlugin` resource -// (including the empty ones) replaces the current value. -func (c *ProjectsLocationsWasmPluginsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWasmPluginsPatchCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsPatchCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmplugin) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsCreateCall struct { - s *Service - parent string - wasmpluginversion *WasmPluginVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `WasmPluginVersion` resource in a given project and -// location. -// -// - parent: The parent resource of the `WasmPluginVersion` resource. Must be -// in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Create(parent string, wasmpluginversion *WasmPluginVersion) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c := &ProjectsLocationsWasmPluginsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.wasmpluginversion = wasmpluginversion - return c -} - -// WasmPluginVersionId sets the optional parameter "wasmPluginVersionId": -// Required. User-provided ID of the `WasmPluginVersion` resource to be -// created. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) WasmPluginVersionId(wasmPluginVersionId string) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.urlParams_.Set("wasmPluginVersionId", wasmPluginVersionId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmpluginversion) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `WasmPluginVersion` resource. -// -// - name: A name of the `WasmPluginVersion` resource to delete. Must be in the -// format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wa -// sm_plugin_version}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Delete(name string) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c := &ProjectsLocationsWasmPluginsVersionsDeleteCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `WasmPluginVersion` resource. -// -// - name: A name of the `WasmPluginVersion` resource to get. Must be in the -// format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wa -// sm_plugin_version}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Get(name string) *ProjectsLocationsWasmPluginsVersionsGetCall { - c := &ProjectsLocationsWasmPluginsVersionsGetCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WasmPluginVersion.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 *ProjectsLocationsWasmPluginsVersionsGetCall) Do(opts ...googleapi.CallOption) (*WasmPluginVersion, 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 := &WasmPluginVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `WasmPluginVersion` resources in a given project and location. -// -// - parent: The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, -// specified in the following format: -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) List(parent string) *ProjectsLocationsWasmPluginsVersionsListCall { - c := &ProjectsLocationsWasmPluginsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// `WasmPluginVersion` resources to return per call. If not specified, at most -// 50 `WasmPluginVersion` resources are returned. The maximum value is 1000; -// values above 1000 are coerced to 1000. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsWasmPluginsVersionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListWasmPluginVersionsResponse` call. Indicates that this is a -// continuation of a prior `ListWasmPluginVersions` call, and that the next -// page of data is to be returned. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) PageToken(pageToken string) *ProjectsLocationsWasmPluginsVersionsListCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsVersionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWasmPluginVersionsResponse.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 *ProjectsLocationsWasmPluginsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListWasmPluginVersionsResponse, 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 := &ListWasmPluginVersionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsWasmPluginsVersionsListCall) Pages(ctx context.Context, f func(*ListWasmPluginVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} diff --git a/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-api.json b/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-api.json deleted file mode 100644 index 91da95bd15b29..0000000000000 --- a/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-api.json +++ /dev/null @@ -1,6200 +0,0 @@ -{ - "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://networkservices.googleapis.com/", - "batchPath": "batch", - "canonicalName": "NetworkServices", - "description": "", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/networking", - "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": "networkservices:v1beta1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://networkservices.mtls.googleapis.com/", - "name": "networkservices", - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name for the location.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Location" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists information about the supported locations for this service.", - "flatPath": "v1beta1/projects/{projectsId}/locations", - "httpMethod": "GET", - "id": "networkservices.projects.locations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "extraLocationTypes": { - "description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.", - "location": "query", - "repeated": true, - "type": "string" - }, - "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": "v1beta1/{+name}/locations", - "response": { - "$ref": "ListLocationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "authzExtensions": { - "methods": { - "create": { - "description": "Creates a new `AuthzExtension` resource in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authzExtensions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.authzExtensions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "authzExtensionId": { - "description": "Required. User-provided ID of the `AuthzExtension` resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the `AuthzExtension` 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 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 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}/authzExtensions", - "request": { - "$ref": "AuthzExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `AuthzExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.authzExtensions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the `AuthzExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "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 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 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 `AuthzExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.authzExtensions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `AuthzExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "AuthzExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `AuthzExtension` resources in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authzExtensions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.authzExtensions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint about 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 `AuthzExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/authzExtensions", - "response": { - "$ref": "ListAuthzExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `AuthzExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authzExtensions/{authzExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.authzExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. Name of the `AuthzExtension` resource in the following format: `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+$", - "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 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 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 `AuthzExtension` 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": "AuthzExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "endpointPolicies": { - "methods": { - "create": { - "description": "Creates a new EndpointPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", - "httpMethod": "POST", - "id": "networkservices.projects.locations.endpointPolicies.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "endpointPolicyId": { - "description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/endpointPolicies", - "request": { - "$ref": "EndpointPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single EndpointPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.endpointPolicies.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/*/endpointPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single EndpointPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.endpointPolicies.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/*/endpointPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "EndpointPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists EndpointPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", - "httpMethod": "GET", - "id": "networkservices.projects.locations.endpointPolicies.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of EndpointPolicies to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/endpointPolicies", - "response": { - "$ref": "ListEndpointPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single EndpointPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.endpointPolicies.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy 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": "v1beta1/{+name}", - "request": { - "$ref": "EndpointPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "gateways": { - "methods": { - "create": { - "description": "Creates a new Gateway in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", - "httpMethod": "POST", - "id": "networkservices.projects.locations.gateways.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "gatewayId": { - "description": "Required. Short name of the Gateway resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/gateways", - "request": { - "$ref": "Gateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single Gateway.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.gateways.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single Gateway.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Gateway" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Gateways in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of Gateways to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/gateways", - "response": { - "$ref": "ListGatewaysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single Gateway.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.gateways.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway 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": "v1beta1/{+name}", - "request": { - "$ref": "Gateway" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "routeViews": { - "methods": { - "get": { - "description": "Get a single RouteView of a Gateway.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}/routeViews/{routeViewsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.routeViews.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the GatewayRouteView resource. Formats: projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/{route_view}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GatewayRouteView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RouteViews", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}/routeViews", - "httpMethod": "GET", - "id": "networkservices.projects.locations.gateways.routeViews.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of GatewayRouteViews to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGatewayRouteViewsResponse` Indicates that this is a continuation of a prior `ListGatewayRouteViews` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The Gateway to which a Route is associated. Formats: projects/{project_number}/locations/{location}/gateways/{gateway}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/routeViews", - "response": { - "$ref": "ListGatewayRouteViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "grpcRoutes": { - "methods": { - "create": { - "description": "Creates a new GrpcRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.grpcRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "grpcRouteId": { - "description": "Required. Short name of the GrpcRoute resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/grpcRoutes", - "request": { - "$ref": "GrpcRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single GrpcRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.grpcRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/*/grpcRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single GrpcRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.grpcRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/*/grpcRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "GrpcRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists GrpcRoutes in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.grpcRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of GrpcRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/grpcRoutes", - "response": { - "$ref": "ListGrpcRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single GrpcRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.grpcRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/*/grpcRoutes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute 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": "v1beta1/{+name}", - "request": { - "$ref": "GrpcRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "httpRoutes": { - "methods": { - "create": { - "description": "Creates a new HttpRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.httpRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "httpRouteId": { - "description": "Required. Short name of the HttpRoute resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/httpRoutes", - "request": { - "$ref": "HttpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single HttpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.httpRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/*/httpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single HttpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.httpRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/*/httpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "HttpRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists HttpRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.httpRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of HttpRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListHttpRoutesResponse` Indicates that this is a continuation of a prior `ListHttpRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/httpRoutes", - "response": { - "$ref": "ListHttpRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single HttpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.httpRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the HttpRoute resource. It matches pattern `projects/*/locations/*/httpRoutes/http_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute 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": "v1beta1/{+name}", - "request": { - "$ref": "HttpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "lbEdgeExtensions": { - "methods": { - "create": { - "description": "Creates a new `LbEdgeExtension` resource in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.lbEdgeExtensions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "lbEdgeExtensionId": { - "description": "Required. User-provided ID of the `LbEdgeExtension` resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the `LbEdgeExtension` 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 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 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}/lbEdgeExtensions", - "request": { - "$ref": "LbEdgeExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `LbEdgeExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.lbEdgeExtensions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the `LbEdgeExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "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 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 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 `LbEdgeExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbEdgeExtensions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `LbEdgeExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "LbEdgeExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `LbEdgeExtension` resources in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbEdgeExtensions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint about 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 `LbEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/lbEdgeExtensions", - "response": { - "$ref": "ListLbEdgeExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `LbEdgeExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbEdgeExtensions/{lbEdgeExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.lbEdgeExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. Name of the `LbEdgeExtension` resource in the following format: `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+$", - "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 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 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": "Optional. Used to specify the fields to be overwritten in the `LbEdgeExtension` 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": "LbEdgeExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "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 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 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 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 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 about 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. These values are 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. Identifier. 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 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 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": "Optional. 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" - ] - } - } - }, - "lbTcpExtensions": { - "methods": { - "create": { - "description": "Creates a new `LbTcpExtension` resource in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTcpExtensions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.lbTcpExtensions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "lbTcpExtensionId": { - "description": "Required. User-provided ID of the `LbTcpExtension` resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the `LbTcpExtension` 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}/lbTcpExtensions", - "request": { - "$ref": "LbTcpExtension" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `LbTcpExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTcpExtensions/{lbTcpExtensionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.lbTcpExtensions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the `LbTcpExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/LbTcpExtensions/{lb_tcp_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbTcpExtensions/[^/]+$", - "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 `LbTcpExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTcpExtensions/{lbTcpExtensionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbTcpExtensions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `LbTcpExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/LbTcpExtensions/{lb_tcp_extension}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbTcpExtensions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "LbTcpExtension" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `LbTcpExtension` resources in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTcpExtensions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.lbTcpExtensions.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 `LbTcpExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/lbTcpExtensions", - "response": { - "$ref": "ListLbTcpExtensionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `LbTcpExtension` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTcpExtensions/{lbTcpExtensionsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.lbTcpExtensions.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Identifier. Name of the `LbTcpExtension` resource in the following format: `projects/{project}/locations/{location}/LbTcpExtension/{lb_tcp_extension}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/lbTcpExtensions/[^/]+$", - "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": "Optional. Used to specify the fields to be overwritten in the `LbTcpExtension` 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": "LbTcpExtension" - }, - "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 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 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 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 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 about 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. These values are 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. Identifier. 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 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 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": "Optional. 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": { - "description": "Creates a new Mesh in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.meshes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "meshId": { - "description": "Required. Short name of the Mesh resource to be created.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/meshes", - "request": { - "$ref": "Mesh" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single Mesh.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.meshes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/*/meshes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single Mesh.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/*/meshes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Mesh" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Meshes in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of Meshes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/meshes", - "response": { - "$ref": "ListMeshesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single Mesh.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.meshes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the Mesh resource. It matches pattern `projects/*/locations/*/meshes/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh 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": "v1beta1/{+name}", - "request": { - "$ref": "Mesh" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "routeViews": { - "methods": { - "get": { - "description": "Get a single RouteView of a Mesh.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}/routeViews/{routeViewsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.routeViews.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the MeshRouteView resource. Format: projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{route_view}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "MeshRouteView" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists RouteViews", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}/routeViews", - "httpMethod": "GET", - "id": "networkservices.projects.locations.meshes.routeViews.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of MeshRouteViews to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListMeshRouteViewsResponse` Indicates that this is a continuation of a prior `ListMeshRouteViews` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The Mesh to which a Route is associated. Format: projects/{project_number}/locations/{location}/meshes/{mesh}", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/routeViews", - "response": { - "$ref": "ListMeshRouteViewsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "networkservices.projects.locations.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - "httpMethod": "DELETE", - "id": "networkservices.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": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "networkservices.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": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "networkservices.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" - }, - "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+name}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceBindings": { - "methods": { - "create": { - "description": "Creates a new ServiceBinding in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceBindings.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "serviceBindingId": { - "description": "Required. Short name of the ServiceBinding resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/serviceBindings", - "request": { - "$ref": "ServiceBinding" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.serviceBindings.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "ServiceBinding" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ServiceBinding in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceBindings.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of ServiceBindings to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/serviceBindings", - "response": { - "$ref": "ListServiceBindingsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single ServiceBinding.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.serviceBindings.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/*/serviceBindings/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding 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": "v1beta1/{+name}", - "request": { - "$ref": "ServiceBinding" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "serviceLbPolicies": { - "methods": { - "create": { - "description": "Creates a new ServiceLbPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", - "httpMethod": "POST", - "id": "networkservices.projects.locations.serviceLbPolicies.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "serviceLbPolicyId": { - "description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/serviceLbPolicies", - "request": { - "$ref": "ServiceLbPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ServiceLbPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.serviceLbPolicies.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ServiceLbPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceLbPolicies.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "ServiceLbPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ServiceLbPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", - "httpMethod": "GET", - "id": "networkservices.projects.locations.serviceLbPolicies.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of ServiceLbPolicies to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/serviceLbPolicies", - "response": { - "$ref": "ListServiceLbPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single ServiceLbPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.serviceLbPolicies.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy 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": "v1beta1/{+name}", - "request": { - "$ref": "ServiceLbPolicy" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "tcpRoutes": { - "methods": { - "create": { - "description": "Creates a new TcpRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.tcpRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "tcpRouteId": { - "description": "Required. Short name of the TcpRoute resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/tcpRoutes", - "request": { - "$ref": "TcpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single TcpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.tcpRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/*/tcpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single TcpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tcpRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/*/tcpRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "TcpRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists TcpRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tcpRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of TcpRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListTcpRoutesResponse` Indicates that this is a continuation of a prior `ListTcpRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/tcpRoutes", - "response": { - "$ref": "ListTcpRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single TcpRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.tcpRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/*/tcpRoutes/tcp_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute 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": "v1beta1/{+name}", - "request": { - "$ref": "TcpRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "tlsRoutes": { - "methods": { - "create": { - "description": "Creates a new TlsRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", - "httpMethod": "POST", - "id": "networkservices.projects.locations.tlsRoutes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "tlsRouteId": { - "description": "Required. Short name of the TlsRoute resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/tlsRoutes", - "request": { - "$ref": "TlsRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single TlsRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.tlsRoutes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/*/tlsRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single TlsRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tlsRoutes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/*/tlsRoutes/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "TlsRoute" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists TlsRoute in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", - "httpMethod": "GET", - "id": "networkservices.projects.locations.tlsRoutes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of TlsRoutes to return per call.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListTlsRoutesResponse` Indicates that this is a continuation of a prior `ListTlsRoutes` call, and that the system should return the next page of data.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/*`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1beta1/{+parent}/tlsRoutes", - "response": { - "$ref": "ListTlsRoutesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single TlsRoute.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.tlsRoutes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the TlsRoute resource. It matches pattern `projects/*/locations/*/tlsRoutes/tls_route_name\u003e`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute 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": "v1beta1/{+name}", - "request": { - "$ref": "TlsRoute" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "wasmPlugins": { - "methods": { - "create": { - "description": "Creates a new `WasmPlugin` resource in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins", - "httpMethod": "POST", - "id": "networkservices.projects.locations.wasmPlugins.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "wasmPluginId": { - "description": "Required. User-provided ID of the `WasmPlugin` resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/wasmPlugins", - "request": { - "$ref": "WasmPlugin" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `WasmPlugin` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.wasmPlugins.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `WasmPlugin` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "view": { - "description": "Determines how much data must be returned in the response. See [AIP-157](https://google.aip.dev/157).", - "enum": [ - "WASM_PLUGIN_VIEW_UNSPECIFIED", - "WASM_PLUGIN_VIEW_BASIC", - "WASM_PLUGIN_VIEW_FULL" - ], - "enumDescriptions": [ - "Unspecified value. Do not use.", - "If specified in the `GET` request for a `WasmPlugin` resource, the server's response includes just the `WasmPlugin` resource.", - "If specified in the `GET` request for a `WasmPlugin` resource, the server's response includes the `WasmPlugin` resource with all its versions." - ], - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "WasmPlugin" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `WasmPlugin` resources in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of `WasmPlugin` resources to return per call. If not specified, at most 50 `WasmPlugin` resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListWasmPluginsResponse` call. Indicates that this is a continuation of a prior `ListWasmPlugins` call, and that the next page of data is to be returned.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/wasmPlugins", - "response": { - "$ref": "ListWasmPluginsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of the specified `WasmPlugin` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}", - "httpMethod": "PATCH", - "id": "networkservices.projects.locations.wasmPlugins.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Used to specify the fields to be overwritten in the `WasmPlugin` resource by the update. The fields specified in the `update_mask` field are relative to the resource, not the full request. An omitted `update_mask` field is treated as an implied `update_mask` field equivalent to all fields that are populated (that have a non-empty value). The `update_mask` field supports a special value `*`, which means that each field in the given `WasmPlugin` resource (including the empty ones) replaces the current value.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "request": { - "$ref": "WasmPlugin" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "versions": { - "methods": { - "create": { - "description": "Creates a new `WasmPluginVersion` resource in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions", - "httpMethod": "POST", - "id": "networkservices.projects.locations.wasmPlugins.versions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - }, - "wasmPluginVersionId": { - "description": "Required. User-provided ID of the `WasmPluginVersion` resource to be created.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/versions", - "request": { - "$ref": "WasmPluginVersion" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes the specified `WasmPluginVersion` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions/{versionsId}", - "httpMethod": "DELETE", - "id": "networkservices.projects.locations.wasmPlugins.versions.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of the specified `WasmPluginVersion` resource.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions/{versionsId}", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.versions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "WasmPluginVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists `WasmPluginVersion` resources in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/wasmPlugins/{wasmPluginsId}/versions", - "httpMethod": "GET", - "id": "networkservices.projects.locations.wasmPlugins.versions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Maximum number of `WasmPluginVersion` resources to return per call. If not specified, at most 50 `WasmPluginVersion` resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The value returned by the last `ListWasmPluginVersionsResponse` call. Indicates that this is a continuation of a prior `ListWasmPluginVersions` call, and that the next page of data is to be returned.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/versions", - "response": { - "$ref": "ListWasmPluginVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } - } - }, - "revision": "20251105", - "rootUrl": "https://networkservices.googleapis.com/", - "schemas": { - "AuthzExtension": { - "description": "`AuthzExtension` is a resource that allows traffic forwarding to a callout backend service to make an authorization decision.", - "id": "AuthzExtension", - "properties": { - "authority": { - "description": "Required. The `:authority` header in the gRPC request sent from Envoy to the extension service.", - "type": "string" - }, - "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" - }, - "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` or the default setting of `FALSE` is used, one of the following happens: * 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.", - "type": "boolean" - }, - "forwardHeaders": { - "description": "Optional. List of the HTTP headers to forward to the extension (from the client). If omitted, all headers are sent. Each element is a string indicating the header name.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `AuthzExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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 [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata is available under the namespace `com.google.authz_extension.`. The following variables are supported in the metadata Struct: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. Name of the `AuthzExtension` resource in the following format: `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.", - "type": "string" - }, - "service": { - "description": "Required. The reference to the service that runs the extension. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", - "type": "string" - }, - "timeout": { - "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-10000 milliseconds.", - "format": "google-duration", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "wireFormat": { - "description": "Optional. The format of communication supported by the callout extension. If not specified, the default value `EXT_PROC_GRPC` is used.", - "enum": [ - "WIRE_FORMAT_UNSPECIFIED", - "EXT_PROC_GRPC", - "EXT_AUTHZ_GRPC" - ], - "enumDescriptions": [ - "Not specified.", - "The extension service uses ext_proc gRPC API over a gRPC stream. This is the default value if the wire format is not specified. The backend service for the extension must use HTTP2 or H2C as the protocol. All `supported_events` for a client request are sent as part of the same gRPC stream.", - "The extension service uses Envoy's `ext_authz` gRPC API. The backend service for the extension must use HTTP2, or H2C as the protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources." - ], - "type": "string" - } - }, - "type": "object" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, - "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" - }, - "EndpointMatcher": { - "description": "A definition of a matcher that selects endpoints to which the policies should be applied.", - "id": "EndpointMatcher", - "properties": { - "metadataLabelMatcher": { - "$ref": "MetadataLabelMatcher", - "description": "The matcher is based on node metadata presented by xDS clients." - } - }, - "type": "object" - }, - "EndpointPolicy": { - "description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", - "id": "EndpointPolicy", - "properties": { - "authorizationPolicy": { - "description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", - "type": "string" - }, - "clientTlsPolicy": { - "description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", - "type": "string" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "endpointMatcher": { - "$ref": "EndpointMatcher", - "description": "Required. A matcher that selects endpoints to which the policies should be applied." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the EndpointPolicy resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.", - "type": "string" - }, - "securityPolicy": { - "description": "Optional. A URL referring to a SecurityPolicy resource. SecurityPolicy is used to enforce rate limiting policy on the inbound traffic at the identified backends. If this field is not set, rate limiting is disabled for this endpoint.", - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", - "type": "string" - }, - "trafficPortSelector": { - "$ref": "TrafficPortSelector", - "description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." - }, - "type": { - "description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", - "enum": [ - "ENDPOINT_POLICY_TYPE_UNSPECIFIED", - "SIDECAR_PROXY", - "GRPC_SERVER" - ], - "enumDescriptions": [ - "Default value. Must not be used.", - "Represents a proxy deployed as a sidecar.", - "Represents a proxyless gRPC backend." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "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` and `LbEdgeExtension` 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": { - "allowDynamicForwarding": { - "description": "Optional. When set to `TRUE`, the response from an extension service is allowed to set the `com.google.envoy.dynamic_forwarding` namespace in the dynamic metadata. This field is not supported for plugin extensions or AuthzExtensions. Setting it results in a validation error.", - "type": "boolean" - }, - "authority": { - "description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions. This field is not supported for plugin extensions. Setting it results in a validation error.", - "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` or the default setting of `FALSE` is used, one of the following happens: * 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.", - "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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. For `AuthzExtension` resources, the metadata is available under the namespace `com.google.authz_extension.`. For other types of extensions, the metadata is available under the namespace `com.google....`. For example: `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set for plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend. This field is subject to following limitations: * The total size of the metadata must be less than 1KiB. * The total number of keys in the metadata must be less than 16. * The length of each key must be less than 64 characters. * The length of each value must be less than 1024 characters. * All values must be strings.", - "type": "object" - }, - "name": { - "description": "Optional. 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. This field is required except for AuthzExtension.", - "type": "string" - }, - "observabilityMode": { - "description": "Optional. When set to `TRUE`, enables `observability_mode` on the `ext_proc` filter. This makes `ext_proc` calls asynchronous. Envoy doesn't check for the response from `ext_proc` calls. For more information about the filter, see: https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#extensions-filters-http-ext-proc-v3-externalprocessor This field is helpful when you want to try out the extension in async log-only mode. Supported by regional `LbTrafficExtension` and `LbRouteExtension` resources. Only `STREAMED` (default) body processing mode is supported.", - "type": "boolean" - }, - "requestBodySendMode": { - "description": "Optional. Configures the send mode for request body processing. The field can only be set if `supported_events` includes `REQUEST_BODY`. If `supported_events` includes `REQUEST_BODY`, but `request_body_send_mode` is unset, the default value `STREAMED` is used. When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. This field can be set only for `LbTrafficExtension` and `LbRouteExtension` resources, and only when the `service` field of the extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode is supported for `LbRouteExtension` resources.", - "enum": [ - "BODY_SEND_MODE_UNSPECIFIED", - "BODY_SEND_MODE_STREAMED", - "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - ], - "enumDescriptions": [ - "Default value. Do not use.", - "Calls to the extension are executed in the streamed mode. Subsequent chunks will be sent only after the previous chunks have been processed. The content of the body chunks is sent one way to the extension. Extension may send modified chunks back. This is the default value if the processing mode is not specified.", - "Calls are executed in the full duplex mode. Subsequent chunks will be sent for processing without waiting for the response for the previous chunk or for the response for `REQUEST_HEADERS` event. Extension can freely modify or chunk the body contents. If the extension doesn't send the body contents back, the next extension in the chain or the upstream will receive an empty body." - ], - "type": "string" - }, - "responseBodySendMode": { - "description": "Optional. Configures the send mode for response processing. If unspecified, the default value `STREAMED` is used. The field can only be set if `supported_events` includes `RESPONSE_BODY`. If `supported_events` includes `RESPONSE_BODY`, but `response_body_send_mode` is unset, the default value `STREAMED` is used. When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. This field can be set only for `LbTrafficExtension` resources, and only when the `service` field of the extension points to a `BackendService`.", - "enum": [ - "BODY_SEND_MODE_UNSPECIFIED", - "BODY_SEND_MODE_STREAMED", - "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - ], - "enumDescriptions": [ - "Default value. Do not use.", - "Calls to the extension are executed in the streamed mode. Subsequent chunks will be sent only after the previous chunks have been processed. The content of the body chunks is sent one way to the extension. Extension may send modified chunks back. This is the default value if the processing mode is not specified.", - "Calls are executed in the full duplex mode. Subsequent chunks will be sent for processing without waiting for the response for the previous chunk or for the response for `REQUEST_HEADERS` event. Extension can freely modify or chunk the body contents. If the extension doesn't send the body contents back, the next extension in the chain or the upstream will receive an empty body." - ], - "type": "string" - }, - "service": { - "description": "Required. The reference to the service that runs the extension. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. To configure a plugin extension, `service` must be a reference to a [`WasmPlugin` resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) in the format: `projects/{project}/locations/{location}/wasmPlugins/{plugin}` or `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. Plugin extensions are currently supported for the `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` resources.", - "type": "string" - }, - "supportedEvents": { - "description": "Optional. A set of events during request or response processing for which this extension is called. For the `LbTrafficExtension` resource, this field is required. For the `LbRouteExtension` resource, this field is optional. If unspecified, `REQUEST_HEADERS` event is assumed as supported. For the `LbEdgeExtension` resource, this field is required and must only contain `REQUEST_HEADERS` event. For the `AuthzExtension` resource, this field is optional. `REQUEST_HEADERS` is the only supported event. If unspecified, `REQUEST_HEADERS` event is assumed as supported.", - "items": { - "enum": [ - "EVENT_TYPE_UNSPECIFIED", - "REQUEST_HEADERS", - "REQUEST_BODY", - "RESPONSE_HEADERS", - "RESPONSE_BODY", - "REQUEST_TRAILERS", - "RESPONSE_TRAILERS" - ], - "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.", - "If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", - "If included in `supported_events`, the extension is called when the HTTP response trailers arrives." - ], - "type": "string" - }, - "type": "array" - }, - "timeout": { - "description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between `10`-`10000` milliseconds. Required for callout extensions. This field is not supported for plugin extensions. Setting it results in a validation error.", - "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. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", - "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", - "properties": { - "addresses": { - "description": "Optional. Zero or one IPv4 or IPv6 address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.", - "items": { - "type": "string" - }, - "type": "array" - }, - "certificateUrls": { - "description": "Optional. A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.", - "items": { - "type": "string" - }, - "type": "array" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "envoyHeaders": { - "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", - "enum": [ - "ENVOY_HEADERS_UNSPECIFIED", - "NONE", - "DEBUG_HEADERS" - ], - "enumDescriptions": [ - "Defaults to NONE.", - "Suppress envoy debug headers.", - "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" - ], - "type": "string" - }, - "gatewaySecurityPolicy": { - "description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", - "type": "string" - }, - "ipVersion": { - "description": "Optional. The IP Version that will be used by this gateway. Valid options are IPV4 or IPV6. Default is IPV4.", - "enum": [ - "IP_VERSION_UNSPECIFIED", - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "The type when IP version is not specified. Defaults to IPV4.", - "The type for IP version 4.", - "The type for IP version 6." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the Gateway resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", - "type": "string" - }, - "network": { - "description": "Optional. The relative resource name identifying the VPC network that is using this configuration. For example: `projects/*/global/networks/network-1`. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.", - "type": "string" - }, - "ports": { - "description": "Required. One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple ports.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "routingMode": { - "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", - "enum": [ - "EXPLICIT_ROUTING_MODE", - "NEXT_HOP_ROUTING_MODE" - ], - "enumDescriptions": [ - "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", - "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." - ], - "type": "string" - }, - "scope": { - "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single configuration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", - "type": "string" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "serverTlsPolicy": { - "description": "Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.", - "type": "string" - }, - "subnetwork": { - "description": "Optional. The relative resource name identifying the subnetwork in which this SWG is allocated. For example: `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY\".", - "type": "string" - }, - "type": { - "description": "Immutable. The type of the customer managed gateway. This field is required. If unspecified, an error is returned.", - "enum": [ - "TYPE_UNSPECIFIED", - "OPEN_MESH", - "SECURE_WEB_GATEWAY" - ], - "enumDescriptions": [ - "The type of the customer managed gateway is unspecified.", - "The type of the customer managed gateway is TrafficDirector Open Mesh.", - "The type of the customer managed gateway is SecureWebGateway (SWG)." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GatewayRouteView": { - "description": "GatewayRouteView defines view-only resource for Routes to a Gateway", - "id": "GatewayRouteView", - "properties": { - "name": { - "description": "Output only. Identifier. Full path name of the GatewayRouteView resource. Format: projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/{route_view}", - "readOnly": true, - "type": "string" - }, - "routeId": { - "description": "Output only. The resource id for the route.", - "readOnly": true, - "type": "string" - }, - "routeLocation": { - "description": "Output only. Location where the route exists.", - "readOnly": true, - "type": "string" - }, - "routeProjectNumber": { - "description": "Output only. Project number where the route exists.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "routeType": { - "description": "Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GrpcRoute": { - "description": "GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or Gateway resource is routed.", - "id": "GrpcRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "hostnames": { - "description": "Required. Service hostnames with an optional port for which this route describes traffic. Format: [:] Hostname is the fully qualified domain name of a network host. This matches the RFC 1123 definition of a hostname with 2 notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateway must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`. If a port is specified, then gRPC clients must use the channel URI with the port to match this rule (i.e. \"xds:///service:123\"), otherwise they must supply the URI without a port (i.e. \"xds:///service\").", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the GrpcRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/*/grpcRoutes/`", - "type": "string" - }, - "rules": { - "description": "Required. A list of detailed rules defining how to route traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching GrpcRoute.RouteRule will be executed. At least one rule must be supplied.", - "items": { - "$ref": "GrpcRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteDestination": { - "description": "The destination to which traffic will be routed.", - "id": "GrpcRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicy": { - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests.", - "id": "GrpcRouteFaultInjectionPolicy", - "properties": { - "abort": { - "$ref": "GrpcRouteFaultInjectionPolicyAbort", - "description": "The specification for aborting to client requests." - }, - "delay": { - "$ref": "GrpcRouteFaultInjectionPolicyDelay", - "description": "The specification for injecting delay to client requests." - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicyAbort": { - "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", - "id": "GrpcRouteFaultInjectionPolicyAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", - "format": "int32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteFaultInjectionPolicyDelay": { - "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", - "id": "GrpcRouteFaultInjectionPolicyDelay", - "properties": { - "fixedDelay": { - "description": "Specify a fixed delay before forwarding the request.", - "format": "google-duration", - "type": "string" - }, - "percentage": { - "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GrpcRouteHeaderMatch": { - "description": "A match against a collection of headers.", - "id": "GrpcRouteHeaderMatch", - "properties": { - "key": { - "description": "Required. The key of the header.", - "type": "string" - }, - "type": { - "description": "Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used.", - "enum": [ - "TYPE_UNSPECIFIED", - "EXACT", - "REGULAR_EXPRESSION" - ], - "enumDescriptions": [ - "Unspecified.", - "Will only match the exact value provided.", - "Will match paths conforming to the prefix specified by value. RE2 syntax is supported." - ], - "type": "string" - }, - "value": { - "description": "Required. The value of the header.", - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteMethodMatch": { - "description": "Specifies a match against a method.", - "id": "GrpcRouteMethodMatch", - "properties": { - "caseSensitive": { - "description": "Optional. Specifies that matches are case sensitive. The default value is true. case_sensitive must not be used with a type of REGULAR_EXPRESSION.", - "type": "boolean" - }, - "grpcMethod": { - "description": "Required. Name of the method to match against. If unspecified, will match all methods.", - "type": "string" - }, - "grpcService": { - "description": "Required. Name of the service to match against. If unspecified, will match all services.", - "type": "string" - }, - "type": { - "description": "Optional. Specifies how to match against the name. If not specified, a default value of \"EXACT\" is used.", - "enum": [ - "TYPE_UNSPECIFIED", - "EXACT", - "REGULAR_EXPRESSION" - ], - "enumDescriptions": [ - "Unspecified.", - "Will only match the exact name provided.", - "Will interpret grpc_method and grpc_service as regexes. RE2 syntax is supported." - ], - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteRetryPolicy": { - "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", - "id": "GrpcRouteRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specified, default to 1.", - "format": "uint32", - "type": "integer" - }, - "retryConditions": { - "description": "- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GrpcRouteRouteAction": { - "description": "Specifies how to route matched traffic.", - "id": "GrpcRouteRouteAction", - "properties": { - "destinations": { - "description": "Optional. The destination services to which traffic should be forwarded. If multiple destinations are specified, traffic will be split between Backend Service(s) according to the weight field of these destinations.", - "items": { - "$ref": "GrpcRouteDestination" - }, - "type": "array" - }, - "faultInjectionPolicy": { - "$ref": "GrpcRouteFaultInjectionPolicy", - "description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "retryPolicy": { - "$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", - "type": "string" - } - }, - "type": "object" - }, - "GrpcRouteRouteMatch": { - "description": "Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.", - "id": "GrpcRouteRouteMatch", - "properties": { - "headers": { - "description": "Optional. Specifies a collection of headers to match.", - "items": { - "$ref": "GrpcRouteHeaderMatch" - }, - "type": "array" - }, - "method": { - "$ref": "GrpcRouteMethodMatch", - "description": "Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods." - } - }, - "type": "object" - }, - "GrpcRouteRouteRule": { - "description": "Describes how to route traffic.", - "id": "GrpcRouteRouteRule", - "properties": { - "action": { - "$ref": "GrpcRouteRouteAction", - "description": "Required. A detailed rule defining how to route traffic. This field is required." - }, - "matches": { - "description": "Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic.", - "items": { - "$ref": "GrpcRouteRouteMatch" - }, - "type": "array" - } - }, - "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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a session cookie and disable cookie expiration.", - "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", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "hostnames": { - "description": "Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the HttpRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the HttpRoute resource. It matches pattern `projects/*/locations/*/httpRoutes/http_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.", - "items": { - "$ref": "HttpRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteCorsPolicy": { - "description": "The Specification for allowing client side cross-origin requests.", - "id": "HttpRouteCorsPolicy", - "properties": { - "allowCredentials": { - "description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.", - "type": "boolean" - }, - "allowHeaders": { - "description": "Specifies the content for Access-Control-Allow-Headers header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowMethods": { - "description": "Specifies the content for Access-Control-Allow-Methods header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOriginRegexes": { - "description": "Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allowOrigins": { - "description": "Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "disabled": { - "description": "If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.", - "type": "boolean" - }, - "exposeHeaders": { - "description": "Specifies the content for Access-Control-Expose-Headers header.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxAge": { - "description": "Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteDestination": { - "description": "Specifications of a destination to which the request should be routed to.", - "id": "HttpRouteDestination", - "properties": { - "requestHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "responseHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "serviceName": { - "description": "The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicy": { - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.", - "id": "HttpRouteFaultInjectionPolicy", - "properties": { - "abort": { - "$ref": "HttpRouteFaultInjectionPolicyAbort", - "description": "The specification for aborting to client requests." - }, - "delay": { - "$ref": "HttpRouteFaultInjectionPolicyDelay", - "description": "The specification for injecting delay to client requests." - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicyAbort": { - "description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", - "id": "HttpRouteFaultInjectionPolicyAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", - "format": "int32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteFaultInjectionPolicyDelay": { - "description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", - "id": "HttpRouteFaultInjectionPolicyDelay", - "properties": { - "fixedDelay": { - "description": "Specify a fixed delay before forwarding the request.", - "format": "google-duration", - "type": "string" - }, - "percentage": { - "description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteHeaderMatch": { - "description": "Specifies how to select a route rule based on HTTP request headers.", - "id": "HttpRouteHeaderMatch", - "properties": { - "exactMatch": { - "description": "The value of the header should match exactly the content of exact_match.", - "type": "string" - }, - "header": { - "description": "The name of the HTTP header to match against.", - "type": "string" - }, - "invertMatch": { - "description": "If specified, the match result will be inverted before checking. Default value is set to false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The value of the header must start with the contents of prefix_match.", - "type": "string" - }, - "presentMatch": { - "description": "A header with header_name must exist. The match takes place whether or not the header has a value.", - "type": "boolean" - }, - "rangeMatch": { - "$ref": "HttpRouteHeaderMatchIntegerRange", - "description": "If specified, the rule will match if the request header value is within the range." - }, - "regexMatch": { - "description": "The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax", - "type": "string" - }, - "suffixMatch": { - "description": "The value of the header must end with the contents of suffix_match.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteHeaderMatchIntegerRange": { - "description": "Represents an integer value range.", - "id": "HttpRouteHeaderMatchIntegerRange", - "properties": { - "end": { - "description": "End of the range (exclusive)", - "format": "int32", - "type": "integer" - }, - "start": { - "description": "Start of the range (inclusive)", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "HttpRouteHeaderModifier": { - "description": "The specification for modifying HTTP header in HTTP request and HTTP response.", - "id": "HttpRouteHeaderModifier", - "properties": { - "add": { - "additionalProperties": { - "type": "string" - }, - "description": "Add the headers with given map where key is the name of the header, value is the value of the header.", - "type": "object" - }, - "remove": { - "description": "Remove headers (matching by header names) specified in the list.", - "items": { - "type": "string" - }, - "type": "array" - }, - "set": { - "additionalProperties": { - "type": "string" - }, - "description": "Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.", - "type": "object" - } - }, - "type": "object" - }, - "HttpRouteHttpDirectResponse": { - "description": "Static HTTP response object to be returned.", - "id": "HttpRouteHttpDirectResponse", - "properties": { - "bytesBody": { - "description": "Optional. Response body as bytes. Maximum body size is 4096B.", - "format": "byte", - "type": "string" - }, - "status": { - "description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", - "format": "int32", - "type": "integer" - }, - "stringBody": { - "description": "Optional. Response body as a string. Maximum body length is 1024 characters.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteQueryParameterMatch": { - "description": "Specifications to match a query parameter in the request.", - "id": "HttpRouteQueryParameterMatch", - "properties": { - "exactMatch": { - "description": "The value of the query parameter must exactly match the contents of exact_match. Only one of exact_match, regex_match, or present_match must be set.", - "type": "string" - }, - "presentMatch": { - "description": "Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. Only one of exact_match, regex_match, or present_match must be set.", - "type": "boolean" - }, - "queryParameter": { - "description": "The name of the query parameter to match.", - "type": "string" - }, - "regexMatch": { - "description": "The value of the query parameter must match the regular expression specified by regex_match. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match must be set.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteRedirect": { - "description": "The specification for redirecting traffic.", - "id": "HttpRouteRedirect", - "properties": { - "hostRedirect": { - "description": "The host that will be used in the redirect response instead of the one that was supplied in the request.", - "type": "string" - }, - "httpsRedirect": { - "description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.", - "type": "boolean" - }, - "pathRedirect": { - "description": "The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.", - "type": "string" - }, - "portRedirect": { - "description": "The port that will be used in the redirected request instead of the one that was supplied in the request.", - "format": "int32", - "type": "integer" - }, - "prefixRewrite": { - "description": "Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.", - "type": "string" - }, - "responseCode": { - "description": "The HTTP Status code to use for the redirect.", - "enum": [ - "RESPONSE_CODE_UNSPECIFIED", - "MOVED_PERMANENTLY_DEFAULT", - "FOUND", - "SEE_OTHER", - "TEMPORARY_REDIRECT", - "PERMANENT_REDIRECT" - ], - "enumDescriptions": [ - "Default value", - "Corresponds to 301.", - "Corresponds to 302.", - "Corresponds to 303.", - "Corresponds to 307. In this case, the request method will be retained.", - "Corresponds to 308. In this case, the request method will be retained." - ], - "type": "string" - }, - "stripQuery": { - "description": "if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpRouteRequestMirrorPolicy": { - "description": "Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow. Mirroring is currently not supported for Cloud Run destinations.", - "id": "HttpRouteRequestMirrorPolicy", - "properties": { - "destination": { - "$ref": "HttpRouteDestination", - "description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." - }, - "mirrorPercent": { - "description": "Optional. The percentage of requests to get mirrored to the desired destination.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "HttpRouteRetryPolicy": { - "description": "The specifications for retries.", - "id": "HttpRouteRetryPolicy", - "properties": { - "numRetries": { - "description": "Specifies the allowed number of retries. This number must be \u003e 0. If not specified, default to 1.", - "format": "int32", - "type": "integer" - }, - "perTryTimeout": { - "description": "Specifies a non-zero timeout per retry attempt.", - "format": "google-duration", - "type": "string" - }, - "retryConditions": { - "description": "Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "HttpRouteRouteAction", - "properties": { - "corsPolicy": { - "$ref": "HttpRouteCorsPolicy", - "description": "The specification for allowing client side cross-origin requests." - }, - "destinations": { - "description": "The destination to which traffic should be forwarded.", - "items": { - "$ref": "HttpRouteDestination" - }, - "type": "array" - }, - "directResponse": { - "$ref": "HttpRouteHttpDirectResponse", - "description": "Optional. Static HTTP Response object to be returned regardless of the request." - }, - "faultInjectionPolicy": { - "$ref": "HttpRouteFaultInjectionPolicy", - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "redirect": { - "$ref": "HttpRouteRedirect", - "description": "If set, the request is directed as configured by this field." - }, - "requestHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "requestMirrorPolicy": { - "$ref": "HttpRouteRequestMirrorPolicy", - "description": "Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow." - }, - "responseHeaderModifier": { - "$ref": "HttpRouteHeaderModifier", - "description": "The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." - }, - "retryPolicy": { - "$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", - "type": "string" - }, - "urlRewrite": { - "$ref": "HttpRouteURLRewrite", - "description": "The specification for rewrite URL before forwarding requests to the destination." - } - }, - "type": "object" - }, - "HttpRouteRouteMatch": { - "description": "RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.", - "id": "HttpRouteRouteMatch", - "properties": { - "fullPathMatch": { - "description": "The HTTP request path value should exactly match this value. Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - }, - "headers": { - "description": "Specifies a list of HTTP request headers to match against. ALL of the supplied headers must be matched.", - "items": { - "$ref": "HttpRouteHeaderMatch" - }, - "type": "array" - }, - "ignoreCase": { - "description": "Specifies if prefix_match and full_path_match matches are case sensitive. The default value is false.", - "type": "boolean" - }, - "prefixMatch": { - "description": "The HTTP request path value must begin with specified prefix_match. prefix_match must begin with a /. Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - }, - "queryParameters": { - "description": "Specifies a list of query parameters to match against. ALL of the query parameters must be matched.", - "items": { - "$ref": "HttpRouteQueryParameterMatch" - }, - "type": "array" - }, - "regexMatch": { - "description": "The HTTP request path value must satisfy the regular expression specified by regex_match after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or regex_match should be used.", - "type": "string" - } - }, - "type": "object" - }, - "HttpRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "HttpRouteRouteRule", - "properties": { - "action": { - "$ref": "HttpRouteRouteAction", - "description": "The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.", - "items": { - "$ref": "HttpRouteRouteMatch" - }, - "type": "array" - } - }, - "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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a session cookie and disable cookie expiration.", - "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", - "properties": { - "hostRewrite": { - "description": "Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.", - "type": "string" - }, - "pathPrefixRewrite": { - "description": "Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.", - "type": "string" - } - }, - "type": "object" - }, - "LbEdgeExtension": { - "description": "`LbEdgeExtension` is a resource that lets the extension service influence the selection of backend services and Cloud CDN cache keys by modifying request headers.", - "id": "LbEdgeExtension", - "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 attached. At least one forwarding rule is required. Only one `LbEdgeExtension` resource can be associated with a forwarding rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `LbEdgeExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "type": "object" - }, - "loadBalancingScheme": { - "description": "Required. All forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `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. Identifier. Name of the `LbEdgeExtension` resource in the following format: `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "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 attached. At least one forwarding rule is required. Only one `LbRouteExtension` resource can be associated with a 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 requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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 [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata applies to all extensions in all extensions chains in this resource. The metadata is available under the key `com.google.lb_route_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set if at least one of the extension chains contains plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. 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" - }, - "LbTcpExtension": { - "description": "`LbTcpExtension` is a resource that allows traffic forwarding to different backend services to make allow/deny decisions on TCP connections for all L7 Load Balancers within a network. Currently only internal load-balancers are supported.", - "id": "LbTcpExtension", - "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" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `LbTcpExtension` resource. The format must comply with [the requirements for labels](/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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`. For more information, refer to [Backend services overview](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. Identifier. Name of the `LbTcpExtension` resource in the following format: `projects/{project}/locations/{location}/LbTcpExtension/{lb_tcp_extension}`", - "type": "string" - }, - "networks": { - "description": "Optional. If set, this `LbTcpExtension` resource applies to all `ForwardingRule` resources in these VPC networks. Values should be relative resource names identifying VPC networks, for example `projects/*/global/networks/network-1`. Currently limited to 1 network per resource. Limited to 1 network per resource.", - "items": { - "type": "string" - }, - "type": "array" - }, - "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": "Optional. A list of references to the forwarding rules to which this service extension is attached. At least one forwarding rule is required. Only one `LbTrafficExtension` resource can be associated with a 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 requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", - "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` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](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" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) in the `ProcessingRequest` message sent to the extension server. The metadata applies to all extensions in all extensions chains in this resource. The metadata is available under the key `com.google.lb_traffic_extension.`. The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. This field must not be set if at least one of the extension chains contains plugin extensions. Setting it results in a validation error. You can set metadata at either the resource level or the extension level. The extension level metadata is recommended because you can pass a different set of metadata through each extension to the backend.", - "type": "object" - }, - "name": { - "description": "Required. Identifier. 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" - }, - "ListAuthzExtensionsResponse": { - "description": "Message for response to listing `AuthzExtension` resources.", - "id": "ListAuthzExtensionsResponse", - "properties": { - "authzExtensions": { - "description": "The list of `AuthzExtension` resources.", - "items": { - "$ref": "AuthzExtension" - }, - "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" - }, - "ListEndpointPoliciesResponse": { - "description": "Response returned by the ListEndpointPolicies method.", - "id": "ListEndpointPoliciesResponse", - "properties": { - "endpointPolicies": { - "description": "List of EndpointPolicy resources.", - "items": { - "$ref": "EndpointPolicy" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGatewayRouteViewsResponse": { - "description": "Response returned by the ListGatewayRouteViews method.", - "id": "ListGatewayRouteViewsResponse", - "properties": { - "gatewayRouteViews": { - "description": "List of GatewayRouteView resources.", - "items": { - "$ref": "GatewayRouteView" - }, - "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": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGatewaysResponse": { - "description": "Response returned by the ListGateways method.", - "id": "ListGatewaysResponse", - "properties": { - "gateways": { - "description": "List of Gateway resources.", - "items": { - "$ref": "Gateway" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListGrpcRoutesResponse": { - "description": "Response returned by the ListGrpcRoutes method.", - "id": "ListGrpcRoutesResponse", - "properties": { - "grpcRoutes": { - "description": "List of GrpcRoute resources.", - "items": { - "$ref": "GrpcRoute" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListHttpRoutesResponse": { - "description": "Response returned by the ListHttpRoutes method.", - "id": "ListHttpRoutesResponse", - "properties": { - "httpRoutes": { - "description": "List of HttpRoute resources.", - "items": { - "$ref": "HttpRoute" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListLbEdgeExtensionsResponse": { - "description": "Message for response to listing `LbEdgeExtension` resources.", - "id": "ListLbEdgeExtensionsResponse", - "properties": { - "lbEdgeExtensions": { - "description": "The list of `LbEdgeExtension` resources.", - "items": { - "$ref": "LbEdgeExtension" - }, - "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" - }, - "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" - }, - "ListLbTcpExtensionsResponse": { - "description": "Message for response to listing `LbTcpExtension` resources.", - "id": "ListLbTcpExtensionsResponse", - "properties": { - "lbTcpExtensions": { - "description": "The list of `LbTcpExtension` resources.", - "items": { - "$ref": "LbTcpExtension" - }, - "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", - "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" - }, - "ListMeshRouteViewsResponse": { - "description": "Response returned by the ListMeshRouteViews method.", - "id": "ListMeshRouteViewsResponse", - "properties": { - "meshRouteViews": { - "description": "List of MeshRouteView resources.", - "items": { - "$ref": "MeshRouteView" - }, - "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": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListMeshesResponse": { - "description": "Response returned by the ListMeshes method.", - "id": "ListMeshesResponse", - "properties": { - "meshes": { - "description": "List of Mesh resources.", - "items": { - "$ref": "Mesh" - }, - "type": "array" - }, - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into `return_partial_success` and reading across collections e.g. when attempting to list all resources across all supported locations.", - "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" - }, - "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceBindingsResponse": { - "description": "Response returned by the ListServiceBindings method.", - "id": "ListServiceBindingsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "serviceBindings": { - "description": "List of ServiceBinding resources.", - "items": { - "$ref": "ServiceBinding" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListServiceLbPoliciesResponse": { - "description": "Response returned by the ListServiceLbPolicies method.", - "id": "ListServiceLbPoliciesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "serviceLbPolicies": { - "description": "List of ServiceLbPolicy resources.", - "items": { - "$ref": "ServiceLbPolicy" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTcpRoutesResponse": { - "description": "Response returned by the ListTcpRoutes method.", - "id": "ListTcpRoutesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "tcpRoutes": { - "description": "List of TcpRoute resources.", - "items": { - "$ref": "TcpRoute" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTlsRoutesResponse": { - "description": "Response returned by the ListTlsRoutes method.", - "id": "ListTlsRoutesResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "tlsRoutes": { - "description": "List of TlsRoute resources.", - "items": { - "$ref": "TlsRoute" - }, - "type": "array" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request opts into return_partial_success and reading across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWasmPluginVersionsResponse": { - "description": "Response returned by the `ListWasmPluginVersions` method.", - "id": "ListWasmPluginVersionsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - }, - "wasmPluginVersions": { - "description": "List of `WasmPluginVersion` resources.", - "items": { - "$ref": "WasmPluginVersion" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListWasmPluginsResponse": { - "description": "Response returned by the `ListWasmPlugins` method.", - "id": "ListWasmPluginsResponse", - "properties": { - "nextPageToken": { - "description": "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`.", - "type": "string" - }, - "unreachable": { - "description": "Unreachable resources. Populated when the request attempts to list all resources across all supported locations, while some locations are temporarily unavailable.", - "items": { - "type": "string" - }, - "type": "array" - }, - "wasmPlugins": { - "description": "List of `WasmPlugin` resources.", - "items": { - "$ref": "WasmPlugin" - }, - "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" - }, - "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", - "id": "LoggingConfig", - "properties": { - "logSeverity": { - "description": "Optional. The minimum severity of logs that will be sent to Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be sent, unless it is NONE.", - "enum": [ - "LOG_SEVERITY_UNSPECIFIED", - "NONE", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "Log severity is not specified. This value is treated the same as NONE, but is used to distinguish between no update and update to NONE in update_masks.", - "Default value at resource creation, presence of this value must be treated as no logging/disable logging.", - "Debug or trace level logging.", - "Routine information, such as ongoing status or performance.", - "Normal but significant events, such as start up, shut down, or a configuration change.", - "Warning events might cause problems.", - "Error events are likely to cause problems.", - "Critical events cause more severe problems or outages.", - "A person must take action immediately.", - "One or more systems are unusable." - ], - "type": "string" - } - }, - "type": "object" - }, - "Mesh": { - "description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", - "id": "Mesh", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "envoyHeaders": { - "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", - "enum": [ - "ENVOY_HEADERS_UNSPECIFIED", - "NONE", - "DEBUG_HEADERS" - ], - "enumDescriptions": [ - "Defaults to NONE.", - "Suppress envoy debug headers.", - "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" - ], - "type": "string" - }, - "interceptionPort": { - "description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", - "format": "int32", - "type": "integer" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the Mesh resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the Mesh resource. It matches pattern `projects/*/locations/*/meshes/`.", - "type": "string" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "MeshRouteView": { - "description": "MeshRouteView defines view-only resource for Routes to a Mesh", - "id": "MeshRouteView", - "properties": { - "name": { - "description": "Output only. Identifier. Full path name of the MeshRouteView resource. Format: projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{route_view}", - "readOnly": true, - "type": "string" - }, - "routeId": { - "description": "Output only. The resource id for the route.", - "readOnly": true, - "type": "string" - }, - "routeLocation": { - "description": "Output only. Location where the route exists.", - "readOnly": true, - "type": "string" - }, - "routeProjectNumber": { - "description": "Output only. Project number where the route exists.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "routeType": { - "description": "Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "MetadataLabelMatcher": { - "description": "The matcher that is based on node metadata presented by xDS clients.", - "id": "MetadataLabelMatcher", - "properties": { - "metadataLabelMatchCriteria": { - "description": "Specifies how matching should be done. Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client with label connects, the config from P1 will be selected. If a client with label connects, the config from P2 will be selected. If a client with label connects, the config from P3 will be selected. If there is more than one best match, (for example, if a config P4 with selector exists and if a client with label connects), pick up the one with older creation time.", - "enum": [ - "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED", - "MATCH_ANY", - "MATCH_ALL" - ], - "enumDescriptions": [ - "Default value. Should not be used.", - "At least one of the Labels specified in the matcher should match the metadata presented by xDS client.", - "The metadata presented by the xDS client should contain all of the labels specified here." - ], - "type": "string" - }, - "metadataLabels": { - "description": "The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).", - "items": { - "$ref": "MetadataLabels" - }, - "type": "array" - } - }, - "type": "object" - }, - "MetadataLabels": { - "description": "Defines a name-pair value for a single label.", - "id": "MetadataLabels", - "properties": { - "labelName": { - "description": "Required. Label name presented as key in xDS Node Metadata.", - "type": "string" - }, - "labelValue": { - "description": "Required. Label value presented as value corresponding to the above key, in xDS Node Metadata.", - "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. 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" - }, - "RetryFilterPerRouteConfig": { - "id": "RetryFilterPerRouteConfig", - "properties": { - "cryptoKeyName": { - "description": "The name of the crypto key to use for encrypting event data.", - "type": "string" - } - }, - "type": "object" - }, - "ServiceBinding": { - "description": "ServiceBinding can be used to: - Bind a Service Directory Service to be used in a BackendService resource. This feature will be deprecated soon. - Bind a Private Service Connect producer service to be used in consumer Cloud Service Mesh or Application Load Balancers. - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or Application Load Balancers.", - "id": "ServiceBinding", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the ServiceBinding resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/*/serviceBindings/`.", - "type": "string" - }, - "service": { - "deprecated": true, - "description": "Optional. The full Service Directory Service name of the format `projects/*/locations/*/namespaces/*/services/*`. This field is for Service Directory integration which will be deprecated soon.", - "type": "string" - }, - "serviceId": { - "deprecated": true, - "description": "Output only. The unique identifier of the Service Directory Service against which the ServiceBinding resource is validated. This is populated when the Service Binding resource is used in another resource (like Backend Service). This is of the UUID4 format. This field is for Service Directory integration which will be deprecated soon.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ServiceLbPolicy": { - "description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", - "id": "ServiceLbPolicy", - "properties": { - "autoCapacityDrain": { - "$ref": "ServiceLbPolicyAutoCapacityDrain", - "description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." - }, - "createTime": { - "description": "Output only. The timestamp when this resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "failoverConfig": { - "$ref": "ServiceLbPolicyFailoverConfig", - "description": "Optional. Configuration related to health based failover." - }, - "isolationConfig": { - "$ref": "ServiceLbPolicyIsolationConfig", - "description": "Optional. Configuration to provide isolation support for the associated Backend Service." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", - "type": "object" - }, - "loadBalancingAlgorithm": { - "description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", - "enum": [ - "LOAD_BALANCING_ALGORITHM_UNSPECIFIED", - "SPRAY_TO_WORLD", - "SPRAY_TO_REGION", - "WATERFALL_BY_REGION", - "WATERFALL_BY_ZONE" - ], - "enumDescriptions": [ - "The type of the loadbalancing algorithm is unspecified.", - "Balance traffic across all backends across the world proportionally based on capacity.", - "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", - "Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", - "Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." - ], - "type": "string" - }, - "name": { - "description": "Identifier. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when this resource was last updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ServiceLbPolicyAutoCapacityDrain": { - "description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", - "id": "ServiceLbPolicyAutoCapacityDrain", - "properties": { - "enable": { - "description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", - "type": "boolean" - } - }, - "type": "object" - }, - "ServiceLbPolicyFailoverConfig": { - "description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", - "id": "ServiceLbPolicyFailoverConfig", - "properties": { - "failoverHealthThreshold": { - "description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "ServiceLbPolicyIsolationConfig": { - "description": "Configuration to provide isolation support for the associated Backend Service.", - "id": "ServiceLbPolicyIsolationConfig", - "properties": { - "isolationGranularity": { - "description": "Optional. The isolation granularity of the load balancer.", - "enum": [ - "ISOLATION_GRANULARITY_UNSPECIFIED", - "REGION" - ], - "enumDescriptions": [ - "No isolation is configured for the backend service. Traffic can overflow based on the load balancing algorithm.", - "Traffic for this service will be isolated at the cloud region level." - ], - "type": "string" - }, - "isolationMode": { - "description": "Optional. The isolation mode of the load balancer.", - "enum": [ - "ISOLATION_MODE_UNSPECIFIED", - "NEAREST", - "STRICT" - ], - "enumDescriptions": [ - "No isolation mode is configured for the backend service.", - "Traffic will be sent to the nearest region.", - "Traffic will fail if no serving backends are available in the same region as the load balancer." - ], - "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" - }, - "TcpRoute": { - "description": "TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.", - "id": "TcpRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the TcpRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the TcpRoute resource. It matches pattern `projects/*/locations/*/tcpRoutes/tcp_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", - "items": { - "$ref": "TcpRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "TcpRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "TcpRouteRouteAction", - "properties": { - "destinations": { - "description": "Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.", - "items": { - "$ref": "TcpRouteRouteDestination" - }, - "type": "array" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - }, - "originalDestination": { - "description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", - "type": "boolean" - } - }, - "type": "object" - }, - "TcpRouteRouteDestination": { - "description": "Describe the destination for traffic to be routed to.", - "id": "TcpRouteRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TcpRouteRouteMatch": { - "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", - "id": "TcpRouteRouteMatch", - "properties": { - "address": { - "description": "Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: \"10.0.0.1\" - matches against this exact IP address. \"10.0.0.0/8\" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. \"0.0.0.0/0\" - matches against any IP address'.", - "type": "string" - }, - "port": { - "description": "Required. Specifies the destination port to match against.", - "type": "string" - } - }, - "type": "object" - }, - "TcpRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "TcpRouteRouteRule", - "properties": { - "action": { - "$ref": "TcpRouteRouteAction", - "description": "Required. The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", - "items": { - "$ref": "TcpRouteRouteMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "TlsRoute": { - "description": "TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.", - "id": "TlsRoute", - "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A free-text description of the resource. Max length 1024 characters.", - "type": "string" - }, - "gateways": { - "description": "Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/*/gateways/`", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the TlsRoute resource.", - "type": "object" - }, - "meshes": { - "description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/*/meshes/` The attached Mesh should be of a type SIDECAR", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Identifier. Name of the TlsRoute resource. It matches pattern `projects/*/locations/*/tlsRoutes/tls_route_name\u003e`.", - "type": "string" - }, - "rules": { - "description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", - "items": { - "$ref": "TlsRouteRouteRule" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined URL of this resource", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "TlsRouteRouteAction": { - "description": "The specifications for routing traffic and applying associated policies.", - "id": "TlsRouteRouteAction", - "properties": { - "destinations": { - "description": "Required. The destination services to which traffic should be forwarded. At least one destination service is required.", - "items": { - "$ref": "TlsRouteRouteDestination" - }, - "type": "array" - }, - "idleTimeout": { - "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", - "format": "google-duration", - "type": "string" - } - }, - "type": "object" - }, - "TlsRouteRouteDestination": { - "description": "Describe the destination for traffic to be routed to.", - "id": "TlsRouteRouteDestination", - "properties": { - "serviceName": { - "description": "Required. The URL of a BackendService to route traffic to.", - "type": "string" - }, - "weight": { - "description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the service_name field. This is computed as: - weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "TlsRouteRouteMatch": { - "description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"AND\"ed for evaluation.", - "id": "TlsRouteRouteMatch", - "properties": { - "alpn": { - "description": "Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: \"http/1.1\", \"h2\". At least one of sni_host and alpn is required. Up to 5 alpns across all matches can be set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "sniHost": { - "description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TlsRouteRouteRule": { - "description": "Specifies how to match traffic and how to route traffic when traffic is matched.", - "id": "TlsRouteRouteRule", - "properties": { - "action": { - "$ref": "TlsRouteRouteAction", - "description": "Required. The detailed rule defining how to route matched traffic." - }, - "matches": { - "description": "Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. Atleast one RouteMatch must be supplied.", - "items": { - "$ref": "TlsRouteRouteMatch" - }, - "type": "array" - } - }, - "type": "object" - }, - "TrafficPortSelector": { - "description": "Specification of a port-based selector.", - "id": "TrafficPortSelector", - "properties": { - "ports": { - "description": "Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "WasmPlugin": { - "description": "`WasmPlugin` is a resource representing a service executing a customer-provided Wasm module.", - "id": "WasmPlugin", - "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" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPlugin` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", - "type": "object" - }, - "logConfig": { - "$ref": "WasmPluginLogConfig", - "description": "Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. Note that the settings relate to the logs generated by using logging statements in your Wasm code." - }, - "mainVersionId": { - "description": "Optional. The ID of the `WasmPluginVersion` resource that is the currently serving one. The version referred to must be a child of this `WasmPlugin` resource.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "usedBy": { - "description": "Output only. List of all [extensions](https://cloud.google.com/service-extensions/docs/overview) that use this `WasmPlugin` resource.", - "items": { - "$ref": "WasmPluginUsedBy" - }, - "readOnly": true, - "type": "array" - }, - "versions": { - "additionalProperties": { - "$ref": "WasmPluginVersionDetails" - }, - "description": "Optional. All versions of this `WasmPlugin` resource in the key-value format. The key is the resource ID, and the value is the `VersionDetails` object. Lets you create or update a `WasmPlugin` resource and its versions in a single request. When the `main_version_id` field is not empty, it must point to one of the `VersionDetails` objects in the map. If provided in a `PATCH` request, the new versions replace the previous set. Any version omitted from the `versions` field is removed. Because the `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion` resource with the same name already exists and differs, the request fails. Note: In a `GET` request, this field is populated only if the field `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.", - "type": "object" - } - }, - "type": "object" - }, - "WasmPluginLogConfig": { - "description": "Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging.", - "id": "WasmPluginLogConfig", - "properties": { - "enable": { - "description": "Optional. Specifies whether to enable logging for activity by this plugin. Defaults to `false`.", - "type": "boolean" - }, - "minLogLevel": { - "description": "Non-empty default. Specifies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code. This field is can be set only if logging is enabled for the plugin. If the field is not provided when logging is enabled, it is set to `INFO` by default.", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "CRITICAL" - ], - "enumDescriptions": [ - "Unspecified value. Defaults to `LogLevel.INFO`.", - "Report logs with TRACE level and above.", - "Report logs with DEBUG level and above.", - "Report logs with INFO level and above.", - "Report logs with WARN level and above.", - "Report logs with ERROR level and above.", - "Report logs with CRITICAL level only." - ], - "type": "string" - }, - "sampleRate": { - "description": "Non-empty default. Configures the sampling rate of activity logs, where `1.0` means all logged activity is reported and `0.0` means no activity is reported. A floating point value between `0.0` and `1.0` indicates that a percentage of log messages is stored. The default value when logging is enabled is `1.0`. The value of the field must be between `0` and `1` (inclusive). This field can be specified only if logging is enabled for this plugin.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "WasmPluginUsedBy": { - "description": "Defines a resource that uses the `WasmPlugin` resource.", - "id": "WasmPluginUsedBy", - "properties": { - "name": { - "description": "Output only. Full name of the resource https://google.aip.dev/122#full-resource-names, for example `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WasmPluginVersion": { - "description": "A single immutable version of a `WasmPlugin` resource. Defines the Wasm module used and optionally its runtime config.", - "id": "WasmPluginVersion", - "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" - }, - "imageDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", - "readOnly": true, - "type": "string" - }, - "imageUri": { - "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPluginVersion` resource.", - "type": "object" - }, - "name": { - "description": "Identifier. Name of the `WasmPluginVersion` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ versions/{wasm_plugin_version}`.", - "type": "string" - }, - "pluginConfigData": { - "description": "Configuration for the plugin. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. When a new `WasmPluginVersion` resource is created, the digest of the contents is saved in the `plugin_config_digest` field.", - "format": "byte", - "type": "string" - }, - "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", - "readOnly": true, - "type": "string" - }, - "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "WasmPluginVersionDetails": { - "description": "Details of a `WasmPluginVersion` resource to be inlined in the `WasmPlugin` resource.", - "id": "WasmPluginVersionDetails", - "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" - }, - "imageDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin image. The value is calculated based on the `image_uri` field. If the `image_uri` field refers to a container image, the digest value is obtained from the container image. If the `image_uri` field refers to a generic artifact, the digest value is calculated based on the contents of the file.", - "readOnly": true, - "type": "string" - }, - "imageUri": { - "description": "Optional. URI of the image containing the Wasm module, stored in Artifact Registry. The URI can refer to one of the following repository formats: * Container images: the `image_uri` must point to a container that contains a single file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `image_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `image_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `image_digest` field.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of labels associated with the `WasmPluginVersion` resource.", - "type": "object" - }, - "pluginConfigData": { - "description": "Configuration for the plugin. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. When a new `WasmPluginVersion` version is created, the digest of the contents is saved in the `plugin_config_digest` field.", - "format": "byte", - "type": "string" - }, - "pluginConfigDigest": { - "description": "Output only. This field holds the digest (usually checksum) value for the plugin configuration. The value is calculated based on the contents of `plugin_config_data` field or the image defined by the `plugin_config_uri` field.", - "readOnly": true, - "type": "string" - }, - "pluginConfigUri": { - "description": "URI of the plugin configuration stored in the Artifact Registry. The configuration is provided to the plugin at runtime through the `ON_CONFIGURE` callback. The URI can refer to one of the following repository formats: * Container images: the `plugin_config_uri` must point to a container that contains a single file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the digest of the image is saved in the `plugin_config_digest` field. When pulling a container image from Artifact Registry, the digest value is used instead of an image tag. * Generic artifacts: the `plugin_config_uri` must be in this format: `projects/{project}/locations/{location}/repositories/{repository}/ genericArtifacts/{package}:{version}`. The specified package and version must contain a file with the name `plugin.config`. When a new `WasmPluginVersion` resource is created, the checksum of the contents of the file is saved in the `plugin_config_digest` field.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Network Services API", - "version": "v1beta1", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-gen.go b/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-gen.go deleted file mode 100644 index 9bb4bdd584d73..0000000000000 --- a/vendor/google.golang.org/api/networkservices/v1beta1/networkservices-gen.go +++ /dev/null @@ -1,15329 +0,0 @@ -// Copyright 2025 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 networkservices provides access to the Network Services API. -// -// For product documentation, see: https://cloud.google.com/networking -// -// # 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/networkservices/v1beta1" -// ... -// ctx := context.Background() -// networkservicesService, err := networkservices.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]: -// -// networkservicesService, err := networkservices.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, ...) -// networkservicesService, err := networkservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package networkservices // import "google.golang.org/api/networkservices/v1beta1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "networkservices:v1beta1" -const apiName = "networkservices" -const apiVersion = "v1beta1" -const basePath = "https://networkservices.googleapis.com/" -const basePathTemplate = "https://networkservices.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://networkservices.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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Projects = NewProjectsService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - 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.AuthzExtensions = NewProjectsLocationsAuthzExtensionsService(s) - rs.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s) - rs.Gateways = NewProjectsLocationsGatewaysService(s) - rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) - rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) - rs.LbEdgeExtensions = NewProjectsLocationsLbEdgeExtensionsService(s) - rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s) - rs.LbTcpExtensions = NewProjectsLocationsLbTcpExtensionsService(s) - rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s) - rs.Meshes = NewProjectsLocationsMeshesService(s) - rs.Operations = NewProjectsLocationsOperationsService(s) - rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) - rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s) - rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s) - rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s) - rs.WasmPlugins = NewProjectsLocationsWasmPluginsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - AuthzExtensions *ProjectsLocationsAuthzExtensionsService - - EndpointPolicies *ProjectsLocationsEndpointPoliciesService - - Gateways *ProjectsLocationsGatewaysService - - GrpcRoutes *ProjectsLocationsGrpcRoutesService - - HttpRoutes *ProjectsLocationsHttpRoutesService - - LbEdgeExtensions *ProjectsLocationsLbEdgeExtensionsService - - LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService - - LbTcpExtensions *ProjectsLocationsLbTcpExtensionsService - - LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService - - Meshes *ProjectsLocationsMeshesService - - Operations *ProjectsLocationsOperationsService - - ServiceBindings *ProjectsLocationsServiceBindingsService - - ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService - - TcpRoutes *ProjectsLocationsTcpRoutesService - - TlsRoutes *ProjectsLocationsTlsRoutesService - - WasmPlugins *ProjectsLocationsWasmPluginsService -} - -func NewProjectsLocationsAuthzExtensionsService(s *Service) *ProjectsLocationsAuthzExtensionsService { - rs := &ProjectsLocationsAuthzExtensionsService{s: s} - return rs -} - -type ProjectsLocationsAuthzExtensionsService struct { - s *Service -} - -func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService { - rs := &ProjectsLocationsEndpointPoliciesService{s: s} - return rs -} - -type ProjectsLocationsEndpointPoliciesService struct { - s *Service -} - -func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService { - rs := &ProjectsLocationsGatewaysService{s: s} - rs.RouteViews = NewProjectsLocationsGatewaysRouteViewsService(s) - return rs -} - -type ProjectsLocationsGatewaysService struct { - s *Service - - RouteViews *ProjectsLocationsGatewaysRouteViewsService -} - -func NewProjectsLocationsGatewaysRouteViewsService(s *Service) *ProjectsLocationsGatewaysRouteViewsService { - rs := &ProjectsLocationsGatewaysRouteViewsService{s: s} - return rs -} - -type ProjectsLocationsGatewaysRouteViewsService struct { - s *Service -} - -func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService { - rs := &ProjectsLocationsGrpcRoutesService{s: s} - return rs -} - -type ProjectsLocationsGrpcRoutesService struct { - s *Service -} - -func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService { - rs := &ProjectsLocationsHttpRoutesService{s: s} - return rs -} - -type ProjectsLocationsHttpRoutesService struct { - s *Service -} - -func NewProjectsLocationsLbEdgeExtensionsService(s *Service) *ProjectsLocationsLbEdgeExtensionsService { - rs := &ProjectsLocationsLbEdgeExtensionsService{s: s} - return rs -} - -type ProjectsLocationsLbEdgeExtensionsService struct { - s *Service -} - -func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService { - rs := &ProjectsLocationsLbRouteExtensionsService{s: s} - return rs -} - -type ProjectsLocationsLbRouteExtensionsService struct { - s *Service -} - -func NewProjectsLocationsLbTcpExtensionsService(s *Service) *ProjectsLocationsLbTcpExtensionsService { - rs := &ProjectsLocationsLbTcpExtensionsService{s: s} - return rs -} - -type ProjectsLocationsLbTcpExtensionsService 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} - rs.RouteViews = NewProjectsLocationsMeshesRouteViewsService(s) - return rs -} - -type ProjectsLocationsMeshesService struct { - s *Service - - RouteViews *ProjectsLocationsMeshesRouteViewsService -} - -func NewProjectsLocationsMeshesRouteViewsService(s *Service) *ProjectsLocationsMeshesRouteViewsService { - rs := &ProjectsLocationsMeshesRouteViewsService{s: s} - return rs -} - -type ProjectsLocationsMeshesRouteViewsService struct { - s *Service -} - -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { - rs := &ProjectsLocationsOperationsService{s: s} - return rs -} - -type ProjectsLocationsOperationsService struct { - s *Service -} - -func NewProjectsLocationsServiceBindingsService(s *Service) *ProjectsLocationsServiceBindingsService { - rs := &ProjectsLocationsServiceBindingsService{s: s} - return rs -} - -type ProjectsLocationsServiceBindingsService struct { - s *Service -} - -func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService { - rs := &ProjectsLocationsServiceLbPoliciesService{s: s} - return rs -} - -type ProjectsLocationsServiceLbPoliciesService struct { - s *Service -} - -func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService { - rs := &ProjectsLocationsTcpRoutesService{s: s} - return rs -} - -type ProjectsLocationsTcpRoutesService struct { - s *Service -} - -func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService { - rs := &ProjectsLocationsTlsRoutesService{s: s} - return rs -} - -type ProjectsLocationsTlsRoutesService struct { - s *Service -} - -func NewProjectsLocationsWasmPluginsService(s *Service) *ProjectsLocationsWasmPluginsService { - rs := &ProjectsLocationsWasmPluginsService{s: s} - rs.Versions = NewProjectsLocationsWasmPluginsVersionsService(s) - return rs -} - -type ProjectsLocationsWasmPluginsService struct { - s *Service - - Versions *ProjectsLocationsWasmPluginsVersionsService -} - -func NewProjectsLocationsWasmPluginsVersionsService(s *Service) *ProjectsLocationsWasmPluginsVersionsService { - rs := &ProjectsLocationsWasmPluginsVersionsService{s: s} - return rs -} - -type ProjectsLocationsWasmPluginsVersionsService struct { - s *Service -} - -// AuthzExtension: `AuthzExtension` is a resource that allows traffic -// forwarding to a callout backend service to make an authorization decision. -type AuthzExtension struct { - // Authority: Required. The `:authority` header in the gRPC request sent from - // Envoy to the extension service. - Authority string `json:"authority,omitempty"` - // 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"` - // 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` or the default - // setting of `FALSE` is used, one of the following happens: * 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. - FailOpen bool `json:"failOpen,omitempty"` - // ForwardHeaders: Optional. List of the HTTP headers to forward to the - // extension (from the client). If omitted, all headers are sent. Each element - // is a string indicating the header name. - ForwardHeaders []string `json:"forwardHeaders,omitempty"` - // Labels: Optional. Set of labels associated with the `AuthzExtension` - // resource. The format must comply with the requirements for labels - // (/compute/docs/labeling-resources#requirements) for Google Cloud resources. - 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 Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata is - // available under the namespace `com.google.authz_extension.`. The following - // variables are supported in the metadata Struct: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `AuthzExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - Name string `json:"name,omitempty"` - // Service: Required. The reference to the service that runs the extension. To - // configure a callout extension, `service` must be a fully-qualified reference - // to a backend service - // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in - // the format: - // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba - // ckendServices/{backendService}` or - // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi - // ces/{backendService}`. - Service string `json:"service,omitempty"` - // Timeout: Required. Specifies the timeout for each individual message on the - // stream. The timeout must be between 10-10000 milliseconds. - Timeout string `json:"timeout,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // WireFormat: Optional. The format of communication supported by the callout - // extension. If not specified, the default value `EXT_PROC_GRPC` is used. - // - // Possible values: - // "WIRE_FORMAT_UNSPECIFIED" - Not specified. - // "EXT_PROC_GRPC" - The extension service uses ext_proc gRPC API over a gRPC - // stream. This is the default value if the wire format is not specified. The - // backend service for the extension must use HTTP2 or H2C as the protocol. All - // `supported_events` for a client request are sent as part of the same gRPC - // stream. - // "EXT_AUTHZ_GRPC" - The extension service uses Envoy's `ext_authz` gRPC - // API. The backend service for the extension must use HTTP2, or H2C as the - // protocol. `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` - // resources. - WireFormat string `json:"wireFormat,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Authority") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AuthzExtension) MarshalJSON() ([]byte, error) { - type NoMethod AuthzExtension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// CancelOperationRequest: The request message for Operations.CancelOperation. -type CancelOperationRequest struct { -} - -// 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:"-"` -} - -// EndpointMatcher: A definition of a matcher that selects endpoints to which -// the policies should be applied. -type EndpointMatcher struct { - // MetadataLabelMatcher: The matcher is based on node metadata presented by xDS - // clients. - MetadataLabelMatcher *MetadataLabelMatcher `json:"metadataLabelMatcher,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetadataLabelMatcher") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MetadataLabelMatcher") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointMatcher) MarshalJSON() ([]byte, error) { - type NoMethod EndpointMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// EndpointPolicy: EndpointPolicy is a resource that helps apply desired -// configuration on the endpoints that match specific criteria. For example, -// this resource can be used to apply "authentication config" an all endpoints -// that serve on port 8080. -type EndpointPolicy struct { - // AuthorizationPolicy: Optional. This field specifies the URL of - // AuthorizationPolicy resource that applies authorization policies to the - // inbound traffic at the matched endpoints. Refer to Authorization. If this - // field is not specified, authorization is disabled(no authz checks) for this - // endpoint. - AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` - // ClientTlsPolicy: Optional. A URL referring to a ClientTlsPolicy resource. - // ClientTlsPolicy can be set to specify the authentication for traffic from - // the proxy to the actual endpoints. More specifically, it is applied to the - // outgoing traffic from the proxy to the endpoint. This is typically used for - // sidecar model where the proxy identifies itself as endpoint to the control - // plane, with the connection between sidecar and endpoint requiring - // authentication. If this field is not set, authentication is disabled(open). - // Applicable only when EndpointPolicyType is SIDECAR_PROXY. - ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"` - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EndpointMatcher: Required. A matcher that selects endpoints to which the - // policies should be applied. - EndpointMatcher *EndpointMatcher `json:"endpointMatcher,omitempty"` - // Labels: Optional. Set of label tags associated with the EndpointPolicy - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the EndpointPolicy resource. It matches pattern - // `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. - Name string `json:"name,omitempty"` - // SecurityPolicy: Optional. A URL referring to a SecurityPolicy resource. - // SecurityPolicy is used to enforce rate limiting policy on the inbound - // traffic at the identified backends. If this field is not set, rate limiting - // is disabled for this endpoint. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ServerTlsPolicy: Optional. A URL referring to ServerTlsPolicy resource. - // ServerTlsPolicy is used to determine the authentication policy to be applied - // to terminate the inbound traffic at the identified backends. If this field - // is not set, authentication is disabled(open) for this endpoint. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // TrafficPortSelector: Optional. Port selector for the (matched) endpoints. If - // no port selector is provided, the matched config is applied to all ports. - TrafficPortSelector *TrafficPortSelector `json:"trafficPortSelector,omitempty"` - // Type: Required. The type of endpoint policy. This is primarily used to - // validate the configuration. - // - // Possible values: - // "ENDPOINT_POLICY_TYPE_UNSPECIFIED" - Default value. Must not be used. - // "SIDECAR_PROXY" - Represents a proxy deployed as a sidecar. - // "GRPC_SERVER" - Represents a proxyless gRPC backend. - Type string `json:"type,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. "AuthorizationPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizationPolicy") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s EndpointPolicy) MarshalJSON() ([]byte, error) { - type NoMethod EndpointPolicy - return gensupport.MarshalJSON(NoMethod(s), 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` and `LbEdgeExtension` 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Extensions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChain) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChain - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ExtensionChainExtension: A single extension in the chain to execute for the -// matching request. -type ExtensionChainExtension struct { - // AllowDynamicForwarding: Optional. When set to `TRUE`, the response from an - // extension service is allowed to set the - // `com.google.envoy.dynamic_forwarding` namespace in the dynamic metadata. - // This field is not supported for plugin extensions or AuthzExtensions. - // Setting it results in a validation error. - AllowDynamicForwarding bool `json:"allowDynamicForwarding,omitempty"` - // Authority: Optional. The `:authority` header in the gRPC request sent from - // Envoy to the extension service. Required for Callout extensions. This field - // is not supported for plugin extensions. Setting it results in a validation - // error. - 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` or the default - // setting of `FALSE` is used, one of the following happens: * 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. - 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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. For - // `AuthzExtension` resources, the metadata is available under the namespace - // `com.google.authz_extension.`. For other types of extensions, the metadata - // is available under the namespace `com.google....`. For example: - // `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set for plugin extensions. Setting it results in a - // validation error. You can set metadata at either the resource level or the - // extension level. The extension level metadata is recommended because you can - // pass a different set of metadata through each extension to the backend. This - // field is subject to following limitations: * The total size of the metadata - // must be less than 1KiB. * The total number of keys in the metadata must be - // less than 16. * The length of each key must be less than 64 characters. * - // The length of each value must be less than 1024 characters. * All values - // must be strings. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Optional. 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. This field is required except for AuthzExtension. - Name string `json:"name,omitempty"` - // ObservabilityMode: Optional. When set to `TRUE`, enables - // `observability_mode` on the `ext_proc` filter. This makes `ext_proc` calls - // asynchronous. Envoy doesn't check for the response from `ext_proc` calls. - // For more information about the filter, see: - // https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#extensions-filters-http-ext-proc-v3-externalprocessor - // This field is helpful when you want to try out the extension in async - // log-only mode. Supported by regional `LbTrafficExtension` and - // `LbRouteExtension` resources. Only `STREAMED` (default) body processing mode - // is supported. - ObservabilityMode bool `json:"observabilityMode,omitempty"` - // RequestBodySendMode: Optional. Configures the send mode for request body - // processing. The field can only be set if `supported_events` includes - // `REQUEST_BODY`. If `supported_events` includes `REQUEST_BODY`, but - // `request_body_send_mode` is unset, the default value `STREAMED` is used. - // When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must - // include both `REQUEST_BODY` and `REQUEST_TRAILERS`. This field can be set - // only for `LbTrafficExtension` and `LbRouteExtension` resources, and only - // when the `service` field of the extension points to a `BackendService`. Only - // `FULL_DUPLEX_STREAMED` mode is supported for `LbRouteExtension` resources. - // - // Possible values: - // "BODY_SEND_MODE_UNSPECIFIED" - Default value. Do not use. - // "BODY_SEND_MODE_STREAMED" - Calls to the extension are executed in the - // streamed mode. Subsequent chunks will be sent only after the previous chunks - // have been processed. The content of the body chunks is sent one way to the - // extension. Extension may send modified chunks back. This is the default - // value if the processing mode is not specified. - // "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - Calls are executed in the full - // duplex mode. Subsequent chunks will be sent for processing without waiting - // for the response for the previous chunk or for the response for - // `REQUEST_HEADERS` event. Extension can freely modify or chunk the body - // contents. If the extension doesn't send the body contents back, the next - // extension in the chain or the upstream will receive an empty body. - RequestBodySendMode string `json:"requestBodySendMode,omitempty"` - // ResponseBodySendMode: Optional. Configures the send mode for response - // processing. If unspecified, the default value `STREAMED` is used. The field - // can only be set if `supported_events` includes `RESPONSE_BODY`. If - // `supported_events` includes `RESPONSE_BODY`, but `response_body_send_mode` - // is unset, the default value `STREAMED` is used. When this field is set to - // `FULL_DUPLEX_STREAMED`, `supported_events` must include both `RESPONSE_BODY` - // and `RESPONSE_TRAILERS`. This field can be set only for `LbTrafficExtension` - // resources, and only when the `service` field of the extension points to a - // `BackendService`. - // - // Possible values: - // "BODY_SEND_MODE_UNSPECIFIED" - Default value. Do not use. - // "BODY_SEND_MODE_STREAMED" - Calls to the extension are executed in the - // streamed mode. Subsequent chunks will be sent only after the previous chunks - // have been processed. The content of the body chunks is sent one way to the - // extension. Extension may send modified chunks back. This is the default - // value if the processing mode is not specified. - // "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" - Calls are executed in the full - // duplex mode. Subsequent chunks will be sent for processing without waiting - // for the response for the previous chunk or for the response for - // `REQUEST_HEADERS` event. Extension can freely modify or chunk the body - // contents. If the extension doesn't send the body contents back, the next - // extension in the chain or the upstream will receive an empty body. - ResponseBodySendMode string `json:"responseBodySendMode,omitempty"` - // Service: Required. The reference to the service that runs the extension. To - // configure a callout extension, `service` must be a fully-qualified reference - // to a backend service - // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in - // the format: - // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba - // ckendServices/{backendService}` or - // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi - // ces/{backendService}`. To configure a plugin extension, `service` must be a - // reference to a `WasmPlugin` resource - // (https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) - // in the format: - // `projects/{project}/locations/{location}/wasmPlugins/{plugin}` or - // `//networkservices.googleapis.com/projects/{project}/locations/{location}/was - // mPlugins/{wasmPlugin}`. Plugin extensions are currently supported for the - // `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` - // resources. - Service string `json:"service,omitempty"` - // SupportedEvents: Optional. A set of events during request or response - // processing for which this extension is called. For the `LbTrafficExtension` - // resource, this field is required. For the `LbRouteExtension` resource, this - // field is optional. If unspecified, `REQUEST_HEADERS` event is assumed as - // supported. For the `LbEdgeExtension` resource, this field is required and - // must only contain `REQUEST_HEADERS` event. For the `AuthzExtension` - // resource, this field is optional. `REQUEST_HEADERS` is the only supported - // event. If unspecified, `REQUEST_HEADERS` event is assumed as supported. - // - // 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. - // "REQUEST_TRAILERS" - If included in `supported_events`, the extension is - // called when the HTTP request trailers arrives. - // "RESPONSE_TRAILERS" - If included in `supported_events`, the extension is - // called when the HTTP response trailers arrives. - SupportedEvents []string `json:"supportedEvents,omitempty"` - // Timeout: Optional. Specifies the timeout for each individual message on the - // stream. The timeout must be between `10`-`10000` milliseconds. Required for - // callout extensions. This field is not supported for plugin extensions. - // Setting it results in a validation error. - Timeout string `json:"timeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowDynamicForwarding") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowDynamicForwarding") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChainExtension) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChainExtension - return gensupport.MarshalJSON(NoMethod(s), 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. For - // more information, see CEL matcher language reference - // (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CelExpression") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { - type NoMethod ExtensionChainMatchCondition - return gensupport.MarshalJSON(NoMethod(s), 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 have reference to to -// Gateways to dictate how requests should be routed by this Gateway. -type Gateway struct { - // Addresses: Optional. Zero or one IPv4 or IPv6 address on which the Gateway - // will receive the traffic. When no address is provided, an IP from the - // subnetwork is allocated This field only applies to gateways of type - // 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for - // IPv4 and :: for IPv6. - Addresses []string `json:"addresses,omitempty"` - // CertificateUrls: Optional. A fully-qualified Certificates URL reference. The - // proxy presents a Certificate (selected based on SNI) when establishing a TLS - // connection. This feature only applies to gateways of type - // 'SECURE_WEB_GATEWAY'. - CertificateUrls []string `json:"certificateUrls,omitempty"` - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EnvoyHeaders: Optional. Determines if envoy will insert internal debug - // headers into upstream requests. Other Envoy headers may still be injected. - // By default, envoy will not insert any debug headers. - // - // Possible values: - // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. - // "NONE" - Suppress envoy debug headers. - // "DEBUG_HEADERS" - Envoy will insert default internal debug headers into - // upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry - // x-envoy-expected-rq-timeout-ms x-envoy-original-path - // x-envoy-upstream-stream-duration-ms - EnvoyHeaders string `json:"envoyHeaders,omitempty"` - // GatewaySecurityPolicy: Optional. A fully-qualified GatewaySecurityPolicy URL - // reference. Defines how a server should apply security policy to inbound (VM - // to Proxy) initiated connections. For example: - // `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is - // specific to gateways of type 'SECURE_WEB_GATEWAY'. - GatewaySecurityPolicy string `json:"gatewaySecurityPolicy,omitempty"` - // IpVersion: Optional. The IP Version that will be used by this gateway. Valid - // options are IPV4 or IPV6. Default is IPV4. - // - // Possible values: - // "IP_VERSION_UNSPECIFIED" - The type when IP version is not specified. - // Defaults to IPV4. - // "IPV4" - The type for IP version 4. - // "IPV6" - The type for IP version 6. - IpVersion string `json:"ipVersion,omitempty"` - // Labels: Optional. Set of label tags associated with the Gateway resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the Gateway resource. It matches pattern - // `projects/*/locations/*/gateways/`. - Name string `json:"name,omitempty"` - // Network: Optional. The relative resource name identifying the VPC network - // that is using this configuration. For example: - // `projects/*/global/networks/network-1`. Currently, this field is specific to - // gateways of type 'SECURE_WEB_GATEWAY'. - Network string `json:"network,omitempty"` - // Ports: Required. One or more port numbers (1-65535), on which the Gateway - // will receive traffic. The proxy binds to the specified ports. Gateways of - // type 'SECURE_WEB_GATEWAY' are limited to 5 ports. Gateways of type - // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple - // ports. - Ports []int64 `json:"ports,omitempty"` - // RoutingMode: Optional. The routing mode of the Gateway. This field is - // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is - // required for gateways of type SECURE_WEB_GATEWAY. - // - // Possible values: - // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are - // configured to send traffic through the gateway. This is the default routing - // mode. - // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are - // unaware of the gateway, and a route (advanced route or other route type) can - // be configured to direct traffic from client to gateway. The gateway then - // acts as a next-hop to the destination. - RoutingMode string `json:"routingMode,omitempty"` - // Scope: Optional. Scope determines how configuration across multiple Gateway - // instances are merged. The configuration for multiple Gateway instances with - // the same scope will be merged as presented as a single configuration to the - // proxy/load balancer. Max length 64 characters. Scope should start with a - // letter and can only have letters, numbers, hyphens. - Scope string `json:"scope,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,omitempty"` - // ServerTlsPolicy: Optional. A fully-qualified ServerTLSPolicy URL reference. - // Specifies how TLS traffic is terminated. If empty, TLS termination is - // disabled. - ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` - // Subnetwork: Optional. The relative resource name identifying the subnetwork - // in which this SWG is allocated. For example: - // `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field - // is specific to gateways of type 'SECURE_WEB_GATEWAY". - Subnetwork string `json:"subnetwork,omitempty"` - // Type: Immutable. The type of the customer managed gateway. This field is - // required. If unspecified, an error is returned. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The type of the customer managed gateway is - // unspecified. - // "OPEN_MESH" - The type of the customer managed gateway is TrafficDirector - // Open Mesh. - // "SECURE_WEB_GATEWAY" - The type of the customer managed gateway is - // SecureWebGateway (SWG). - Type string `json:"type,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. "Addresses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Addresses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Gateway) MarshalJSON() ([]byte, error) { - type NoMethod Gateway - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GatewayRouteView: GatewayRouteView defines view-only resource for Routes to -// a Gateway -type GatewayRouteView struct { - // Name: Output only. Identifier. Full path name of the GatewayRouteView - // resource. Format: - // projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/ - // {route_view} - Name string `json:"name,omitempty"` - // RouteId: Output only. The resource id for the route. - RouteId string `json:"routeId,omitempty"` - // RouteLocation: Output only. Location where the route exists. - RouteLocation string `json:"routeLocation,omitempty"` - // RouteProjectNumber: Output only. Project number where the route exists. - RouteProjectNumber int64 `json:"routeProjectNumber,omitempty,string"` - // RouteType: Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or - // TlsRoute - RouteType string `json:"routeType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GatewayRouteView) MarshalJSON() ([]byte, error) { - type NoMethod GatewayRouteView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRoute: GrpcRoute is the resource defining how gRPC traffic routed by a -// Mesh or Gateway resource is routed. -type GrpcRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this GrpcRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Hostnames: Required. Service hostnames with an optional port for which this - // route describes traffic. Format: [:] Hostname is the fully qualified domain - // name of a network host. This matches the RFC 1123 definition of a hostname - // with 2 notable exceptions: - IPs are not allowed. - A hostname may be - // prefixed with a wildcard label (`*.`). The wildcard label must appear by - // itself as the first label. Hostname can be "precise" which is a domain name - // without the terminating dot of a network host (e.g. `foo.example.com`) or - // "wildcard", which is a domain name prefixed with a single wildcard label - // (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must - // consist of lower case alphanumeric characters or '-', and must start and end - // with an alphanumeric character. No other punctuation is allowed. The routes - // associated with a Mesh or Gateway must have unique hostnames. If you attempt - // to attach multiple routes with conflicting hostnames, the configuration will - // be rejected. For example, while it is acceptable for routes for the - // hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same - // route, it is not possible to associate two routes both with `*.bar.com` or - // both with `bar.com`. If a port is specified, then gRPC clients must use the - // channel URI with the port to match this rule (i.e. "xds:///service:123"), - // otherwise they must supply the URI without a port (i.e. "xds:///service"). - Hostnames []string `json:"hostnames,omitempty"` - // Labels: Optional. Set of label tags associated with the GrpcRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this GrpcRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the GrpcRoute resource. It matches pattern - // `projects/*/locations/*/grpcRoutes/` - Name string `json:"name,omitempty"` - // Rules: Required. A list of detailed rules defining how to route traffic. - // Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - // first matching GrpcRoute.RouteRule will be executed. At least one rule must - // be supplied. - Rules []*GrpcRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRoute) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteDestination: The destination to which traffic will be routed. -type GrpcRouteDestination struct { - // ServiceName: Required. The URL of a destination service to which to route - // traffic. Must refer to either a BackendService or ServiceDirectoryService. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicy: The specification for fault injection -// introduced into traffic to test the resiliency of clients to destination -// service failure. As part of fault injection, when clients send requests to a -// destination, delays can be introduced on a percentage of requests before -// sending those requests to the destination service. Similarly requests from -// clients can be aborted by for a percentage of requests. -type GrpcRouteFaultInjectionPolicy struct { - // Abort: The specification for aborting to client requests. - Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` - // Delay: The specification for injecting delay to client requests. - Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicyAbort: Specification of how client requests are -// aborted as part of fault injection before being sent to a destination. -type GrpcRouteFaultInjectionPolicyAbort struct { - // HttpStatus: The HTTP status code used to abort the request. The value must - // be between 200 and 599 inclusive. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic which will be aborted. The value must - // be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicyAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteFaultInjectionPolicyDelay: Specification of how client requests are -// delayed as part of fault injection before being sent to a destination. -type GrpcRouteFaultInjectionPolicyDelay struct { - // FixedDelay: Specify a fixed delay before forwarding the request. - FixedDelay string `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic on which delay will be injected. The - // value must be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteFaultInjectionPolicyDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteHeaderMatch: A match against a collection of headers. -type GrpcRouteHeaderMatch struct { - // Key: Required. The key of the header. - Key string `json:"key,omitempty"` - // Type: Optional. Specifies how to match against the value of the header. If - // not specified, a default value of EXACT is used. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. - // "EXACT" - Will only match the exact value provided. - // "REGULAR_EXPRESSION" - Will match paths conforming to the prefix specified - // by value. RE2 syntax is supported. - Type string `json:"type,omitempty"` - // Value: Required. The value of the header. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteMethodMatch: Specifies a match against a method. -type GrpcRouteMethodMatch struct { - // CaseSensitive: Optional. Specifies that matches are case sensitive. The - // default value is true. case_sensitive must not be used with a type of - // REGULAR_EXPRESSION. - CaseSensitive bool `json:"caseSensitive,omitempty"` - // GrpcMethod: Required. Name of the method to match against. If unspecified, - // will match all methods. - GrpcMethod string `json:"grpcMethod,omitempty"` - // GrpcService: Required. Name of the service to match against. If unspecified, - // will match all services. - GrpcService string `json:"grpcService,omitempty"` - // Type: Optional. Specifies how to match against the name. If not specified, a - // default value of "EXACT" is used. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified. - // "EXACT" - Will only match the exact name provided. - // "REGULAR_EXPRESSION" - Will interpret grpc_method and grpc_service as - // regexes. RE2 syntax is supported. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaseSensitive") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaseSensitive") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteMethodMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more -// conditions for which this retry rule applies. Valid values are: -type GrpcRouteRetryPolicy struct { - // NumRetries: Specifies the allowed number of retries. This number must be > - // 0. If not specified, default to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // RetryConditions: - connect-failure: Router will retry on failures connecting - // to Backend Services, for example due to connection timeouts. - - // refused-stream: Router will retry if the backend service resets the stream - // with a REFUSED_STREAM error code. This reset type indicates that it is safe - // to retry. - cancelled: Router will retry if the gRPC status code in the - // response header is set to cancelled - deadline-exceeded: Router will retry - // if the gRPC status code in the response header is set to deadline-exceeded - - // resource-exhausted: Router will retry if the gRPC status code in the - // response header is set to resource-exhausted - unavailable: Router will - // retry if the gRPC status code in the response header is set to unavailable - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteAction: Specifies how to route matched traffic. -type GrpcRouteRouteAction struct { - // Destinations: Optional. The destination services to which traffic should be - // forwarded. If multiple destinations are specified, traffic will be split - // between Backend Service(s) according to the weight field of these - // destinations. - Destinations []*GrpcRouteDestination `json:"destinations,omitempty"` - // FaultInjectionPolicy: Optional. The specification for fault injection - // introduced into traffic to test the resiliency of clients to destination - // service failure. As part of fault injection, when clients send requests to a - // destination, delays can be introduced on a percentage of requests before - // sending those requests to the destination service. Similarly requests from - // clients can be aborted by for a percentage of requests. timeout and - // retry_policy will be ignored by clients that are configured with a - // fault_injection_policy - FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // RetryPolicy: Optional. Specifies the retry policy associated with 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. Timeout - // includes all retries. - Timeout string `json:"timeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteMatch: Criteria for matching traffic. A RouteMatch will be -// considered to match when all supplied fields match. -type GrpcRouteRouteMatch struct { - // Headers: Optional. Specifies a collection of headers to match. - Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"` - // Method: Optional. A gRPC method to match against. If this field is empty or - // omitted, will match all methods. - Method *GrpcRouteMethodMatch `json:"method,omitempty"` - // ForceSendFields is a list of field names (e.g. "Headers") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Headers") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GrpcRouteRouteRule: Describes how to route traffic. -type GrpcRouteRouteRule struct { - // Action: Required. A detailed rule defining how to route traffic. This field - // is required. - Action *GrpcRouteRouteAction `json:"action,omitempty"` - // Matches: Optional. Matches define conditions used for matching the rule - // against incoming gRPC requests. Each match is independent, i.e. this rule - // will be matched if ANY one of the matches is satisfied. If no matches field - // is specified, this rule will unconditionally match traffic. - Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), 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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a - // session cookie and disable cookie expiration. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CookieTtl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod GrpcRouteStatefulSessionAffinityPolicy - return gensupport.MarshalJSON(NoMethod(s), 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 { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this HttpRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Hostnames: Required. Hostnames define a set of hosts that should match - // against the HTTP host header to select a HttpRoute to process the request. - // Hostname is the fully qualified domain name of a network host, as defined by - // RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be - // prefixed with a wildcard label (`*.`). The wildcard label must appear by - // itself as the first label. Hostname can be "precise" which is a domain name - // without the terminating dot of a network host (e.g. `foo.example.com`) or - // "wildcard", which is a domain name prefixed with a single wildcard label - // (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must - // consist of lower case alphanumeric characters or '-', and must start and end - // with an alphanumeric character. No other punctuation is allowed. The routes - // associated with a Mesh or Gateways must have unique hostnames. If you - // attempt to attach multiple routes with conflicting hostnames, the - // configuration will be rejected. For example, while it is acceptable for - // routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated - // with the same Mesh (or Gateways under the same scope), it is not possible to - // associate two routes both with `*.bar.com` or both with `bar.com`. - Hostnames []string `json:"hostnames,omitempty"` - // Labels: Optional. Set of label tags associated with the HttpRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this HttpRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the HttpRoute resource. It matches pattern - // `projects/*/locations/*/httpRoutes/http_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. Rules - // will be matched sequentially based on the RouteMatch specified for the rule. - Rules []*HttpRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRoute) MarshalJSON() ([]byte, error) { - type NoMethod HttpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteCorsPolicy: The Specification for allowing client side cross-origin -// requests. -type HttpRouteCorsPolicy struct { - // AllowCredentials: In response to a preflight request, setting this to true - // indicates that the actual request can include user credentials. This - // translates to the Access-Control-Allow-Credentials header. Default value is - // false. - AllowCredentials bool `json:"allowCredentials,omitempty"` - // AllowHeaders: Specifies the content for Access-Control-Allow-Headers header. - AllowHeaders []string `json:"allowHeaders,omitempty"` - // AllowMethods: Specifies the content for Access-Control-Allow-Methods header. - AllowMethods []string `json:"allowMethods,omitempty"` - // AllowOriginRegexes: Specifies the regular expression patterns that match - // allowed origins. For regular expression grammar, please see - // https://github.com/google/re2/wiki/Syntax. - AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` - // AllowOrigins: Specifies the list of origins that will be allowed to do CORS - // requests. An origin is allowed if it matches either an item in allow_origins - // or an item in allow_origin_regexes. - AllowOrigins []string `json:"allowOrigins,omitempty"` - // Disabled: If true, the CORS policy is disabled. The default value is false, - // which indicates that the CORS policy is in effect. - Disabled bool `json:"disabled,omitempty"` - // ExposeHeaders: Specifies the content for Access-Control-Expose-Headers - // header. - ExposeHeaders []string `json:"exposeHeaders,omitempty"` - // MaxAge: Specifies how long result of a preflight request can be cached in - // seconds. This translates to the Access-Control-Max-Age header. - MaxAge string `json:"maxAge,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowCredentials") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowCredentials") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteCorsPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteDestination: Specifications of a destination to which the request -// should be routed to. -type HttpRouteDestination struct { - // RequestHeaderModifier: Optional. The specification for modifying the headers - // of a matching request prior to delivery of the request to the destination. - // If HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` - // ResponseHeaderModifier: Optional. The specification for modifying the - // headers of a response prior to sending the response back to the client. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` - // ServiceName: The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Specifies the proportion of requests forwarded to the backend - // referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestHeaderModifier") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestHeaderModifier") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicy: The specification for fault injection -// introduced into traffic to test the resiliency of clients to destination -// service failure. As part of fault injection, when clients send requests to a -// destination, delays can be introduced by client proxy on a percentage of -// requests before sending those requests to the destination service. Similarly -// requests can be aborted by client proxy for a percentage of requests. -type HttpRouteFaultInjectionPolicy struct { - // Abort: The specification for aborting to client requests. - Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"` - // Delay: The specification for injecting delay to client requests. - Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Abort") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicyAbort: Specification of how client requests are -// aborted as part of fault injection before being sent to a destination. -type HttpRouteFaultInjectionPolicyAbort struct { - // HttpStatus: The HTTP status code used to abort the request. The value must - // be between 200 and 599 inclusive. - HttpStatus int64 `json:"httpStatus,omitempty"` - // Percentage: The percentage of traffic which will be aborted. The value must - // be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicyAbort - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteFaultInjectionPolicyDelay: Specification of how client requests are -// delayed as part of fault injection before being sent to a destination. -type HttpRouteFaultInjectionPolicyDelay struct { - // FixedDelay: Specify a fixed delay before forwarding the request. - FixedDelay string `json:"fixedDelay,omitempty"` - // Percentage: The percentage of traffic on which delay will be injected. The - // value must be between [0, 100] - Percentage int64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteFaultInjectionPolicyDelay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderMatch: Specifies how to select a route rule based on HTTP -// request headers. -type HttpRouteHeaderMatch struct { - // ExactMatch: The value of the header should match exactly the content of - // exact_match. - ExactMatch string `json:"exactMatch,omitempty"` - // Header: The name of the HTTP header to match against. - Header string `json:"header,omitempty"` - // InvertMatch: If specified, the match result will be inverted before - // checking. Default value is set to false. - InvertMatch bool `json:"invertMatch,omitempty"` - // PrefixMatch: The value of the header must start with the contents of - // prefix_match. - PrefixMatch string `json:"prefixMatch,omitempty"` - // PresentMatch: A header with header_name must exist. The match takes place - // whether or not the header has a value. - PresentMatch bool `json:"presentMatch,omitempty"` - // RangeMatch: If specified, the rule will match if the request header value is - // within the range. - RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"` - // RegexMatch: The value of the header must match the regular expression - // specified in regex_match. For regular expression grammar, please see: - // https://github.com/google/re2/wiki/Syntax - RegexMatch string `json:"regexMatch,omitempty"` - // SuffixMatch: The value of the header must end with the contents of - // suffix_match. - SuffixMatch string `json:"suffixMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderMatchIntegerRange: Represents an integer value range. -type HttpRouteHeaderMatchIntegerRange struct { - // End: End of the range (exclusive) - End int64 `json:"end,omitempty"` - // Start: Start of the range (inclusive) - Start int64 `json:"start,omitempty"` - // ForceSendFields is a list of field names (e.g. "End") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "End") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderMatchIntegerRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHeaderModifier: The specification for modifying HTTP header in HTTP -// request and HTTP response. -type HttpRouteHeaderModifier struct { - // Add: Add the headers with given map where key is the name of the header, - // value is the value of the header. - Add map[string]string `json:"add,omitempty"` - // Remove: Remove headers (matching by header names) specified in the list. - Remove []string `json:"remove,omitempty"` - // Set: Completely overwrite/replace the headers with given map where key is - // the name of the header, value is the value of the header. - Set map[string]string `json:"set,omitempty"` - // ForceSendFields is a list of field names (e.g. "Add") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Add") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHeaderModifier - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteHttpDirectResponse: Static HTTP response object to be returned. -type HttpRouteHttpDirectResponse struct { - // BytesBody: Optional. Response body as bytes. Maximum body size is 4096B. - BytesBody string `json:"bytesBody,omitempty"` - // Status: Required. Status to return as part of HTTP Response. Must be a - // positive integer. - Status int64 `json:"status,omitempty"` - // StringBody: Optional. Response body as a string. Maximum body length is 1024 - // characters. - StringBody string `json:"stringBody,omitempty"` - // ForceSendFields is a list of field names (e.g. "BytesBody") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BytesBody") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteHttpDirectResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteQueryParameterMatch: Specifications to match a query parameter in -// the request. -type HttpRouteQueryParameterMatch struct { - // ExactMatch: The value of the query parameter must exactly match the contents - // of exact_match. Only one of exact_match, regex_match, or present_match must - // be set. - ExactMatch string `json:"exactMatch,omitempty"` - // PresentMatch: Specifies that the QueryParameterMatcher matches if request - // contains query parameter, irrespective of whether the parameter has a value - // or not. Only one of exact_match, regex_match, or present_match must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - // QueryParameter: The name of the query parameter to match. - QueryParameter string `json:"queryParameter,omitempty"` - // RegexMatch: The value of the query parameter must match the regular - // expression specified by regex_match. For regular expression grammar, please - // see https://github.com/google/re2/wiki/Syntax Only one of exact_match, - // regex_match, or present_match must be set. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteQueryParameterMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRedirect: The specification for redirecting traffic. -type HttpRouteRedirect struct { - // HostRedirect: The host that will be used in the redirect response instead of - // the one that was supplied in the request. - HostRedirect string `json:"hostRedirect,omitempty"` - // HttpsRedirect: If set to true, the URL scheme in the redirected request is - // set to https. If set to false, the URL scheme of the redirected request will - // remain the same as that of the request. The default is set to false. - HttpsRedirect bool `json:"httpsRedirect,omitempty"` - // PathRedirect: The path that will be used in the redirect response instead of - // the one that was supplied in the request. path_redirect can not be supplied - // together with prefix_redirect. Supply one alone or neither. If neither is - // supplied, the path of the original request will be used for the redirect. - PathRedirect string `json:"pathRedirect,omitempty"` - // PortRedirect: The port that will be used in the redirected request instead - // of the one that was supplied in the request. - PortRedirect int64 `json:"portRedirect,omitempty"` - // PrefixRewrite: Indicates that during redirection, the matched prefix (or - // path) should be swapped with this value. This option allows URLs be - // dynamically created based on the request. - PrefixRewrite string `json:"prefixRewrite,omitempty"` - // ResponseCode: The HTTP Status code to use for the redirect. - // - // Possible values: - // "RESPONSE_CODE_UNSPECIFIED" - Default value - // "MOVED_PERMANENTLY_DEFAULT" - Corresponds to 301. - // "FOUND" - Corresponds to 302. - // "SEE_OTHER" - Corresponds to 303. - // "TEMPORARY_REDIRECT" - Corresponds to 307. In this case, the request - // method will be retained. - // "PERMANENT_REDIRECT" - Corresponds to 308. In this case, the request - // method will be retained. - ResponseCode string `json:"responseCode,omitempty"` - // StripQuery: if set to true, any accompanying query portion of the original - // URL is removed prior to redirecting the request. If set to false, the query - // portion of the original URL is retained. The default is set to false. - StripQuery bool `json:"stripQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRedirect") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRedirect") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRedirect) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRedirect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRequestMirrorPolicy: Specifies the policy on how requests are -// shadowed to a separate mirrored destination service. The proxy does not wait -// for responses from the shadow service. Prior to sending traffic to the -// shadow service, the host/authority header is suffixed with -shadow. -// Mirroring is currently not supported for Cloud Run destinations. -type HttpRouteRequestMirrorPolicy struct { - // Destination: The destination the requests will be mirrored to. The weight of - // the destination will be ignored. - Destination *HttpRouteDestination `json:"destination,omitempty"` - // MirrorPercent: Optional. The percentage of requests to get mirrored to the - // desired destination. - MirrorPercent float64 `json:"mirrorPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destination") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRequestMirrorPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error { - type NoMethod HttpRouteRequestMirrorPolicy - var s1 struct { - MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MirrorPercent = float64(s1.MirrorPercent) - return nil -} - -// HttpRouteRetryPolicy: The specifications for retries. -type HttpRouteRetryPolicy struct { - // NumRetries: Specifies the allowed number of retries. This number must be > - // 0. If not specified, default to 1. - NumRetries int64 `json:"numRetries,omitempty"` - // PerTryTimeout: Specifies a non-zero timeout per retry attempt. - PerTryTimeout string `json:"perTryTimeout,omitempty"` - // RetryConditions: Specifies one or more conditions when this retry policy - // applies. Valid values are: 5xx: Proxy will attempt a retry if the - // destination service responds with any 5xx response code, of if the - // destination service does not respond at all, example: disconnect, reset, - // read timeout, connection failure and refused streams. gateway-error: Similar - // to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will - // attempt a retry if the destination service does not respond at all - // (disconnect/reset/read timeout) connect-failure: Proxy will retry on - // failures connecting to destination for example due to connection timeouts. - // retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently - // the only retriable error supported is 409. refused-stream: Proxy will retry - // if the destination resets the stream with a REFUSED_STREAM error code. This - // reset type indicates that it is safe to retry. - RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRetryPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type HttpRouteRouteAction struct { - // CorsPolicy: The specification for allowing client side cross-origin - // requests. - CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"` - // Destinations: The destination to which traffic should be forwarded. - Destinations []*HttpRouteDestination `json:"destinations,omitempty"` - // DirectResponse: Optional. Static HTTP Response object to be returned - // regardless of the request. - DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"` - // FaultInjectionPolicy: The specification for fault injection introduced into - // traffic to test the resiliency of clients to backend service failure. As - // part of fault injection, when clients send requests to a backend service, - // delays can be introduced on a percentage of requests before sending those - // requests to the backend service. Similarly requests from clients can be - // aborted for a percentage of requests. timeout and retry_policy will be - // ignored by clients that are configured with a fault_injection_policy - FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // Redirect: If set, the request is directed as configured by this field. - Redirect *HttpRouteRedirect `json:"redirect,omitempty"` - // RequestHeaderModifier: The specification for modifying the headers of a - // matching request prior to delivery of the request to the destination. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` - // RequestMirrorPolicy: Specifies the policy on how requests intended for the - // routes destination are shadowed to a separate mirrored destination. Proxy - // will not wait for the shadow destination to respond before returning the - // response. Prior to sending traffic to the shadow service, the host/authority - // header is suffixed with -shadow. - RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` - // ResponseHeaderModifier: The specification for modifying the headers of a - // response prior to sending the response back to the client. If - // HeaderModifiers are set on both the Destination and the RouteAction, they - // will be merged. Conflicts between the two will not be resolved on the - // configuration. - ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` - // 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. Timeout includes all retries. - Timeout string `json:"timeout,omitempty"` - // UrlRewrite: The specification for rewrite URL before forwarding requests to - // the destination. - UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteMatch: RouteMatch defines specifications used to match -// requests. If multiple match types are set, this RouteMatch will match if ALL -// type of matches are matched. -type HttpRouteRouteMatch struct { - // FullPathMatch: The HTTP request path value should exactly match this value. - // Only one of full_path_match, prefix_match, or regex_match should be used. - FullPathMatch string `json:"fullPathMatch,omitempty"` - // Headers: Specifies a list of HTTP request headers to match against. ALL of - // the supplied headers must be matched. - Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"` - // IgnoreCase: Specifies if prefix_match and full_path_match matches are case - // sensitive. The default value is false. - IgnoreCase bool `json:"ignoreCase,omitempty"` - // PrefixMatch: The HTTP request path value must begin with specified - // prefix_match. prefix_match must begin with a /. Only one of full_path_match, - // prefix_match, or regex_match should be used. - PrefixMatch string `json:"prefixMatch,omitempty"` - // QueryParameters: Specifies a list of query parameters to match against. ALL - // of the query parameters must be matched. - QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"` - // RegexMatch: The HTTP request path value must satisfy the regular expression - // specified by regex_match after removing any query parameters and anchor - // supplied with the original URL. For regular expression grammar, please see - // https://github.com/google/re2/wiki/Syntax Only one of full_path_match, - // prefix_match, or regex_match should be used. - RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullPathMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullPathMatch") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HttpRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type HttpRouteRouteRule struct { - // Action: The detailed rule defining how to route matched traffic. - Action *HttpRouteRouteAction `json:"action,omitempty"` - // Matches: A list of matches define conditions used for matching the rule - // against incoming HTTP requests. Each match is independent, i.e. this rule - // will be matched if ANY one of the matches is satisfied. If no matches field - // is specified, this rule will unconditionally match traffic. If a default - // rule is desired to be configured, add a rule with no matches specified to - // the end of the rules list. - Matches []*HttpRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), 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 0 to 86400 seconds (24 hours) inclusive. Set this to 0s to use a - // session cookie and disable cookie expiration. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CookieTtl") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteStatefulSessionAffinityPolicy - return gensupport.MarshalJSON(NoMethod(s), 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 { - // HostRewrite: Prior to forwarding the request to the selected destination, - // the requests host header is replaced by this value. - HostRewrite string `json:"hostRewrite,omitempty"` - // PathPrefixRewrite: Prior to forwarding the request to the selected - // destination, the matching portion of the requests path is replaced by this - // value. - PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRewrite") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRewrite") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteURLRewrite - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LbEdgeExtension: `LbEdgeExtension` is a resource that lets the extension -// service influence the selection of backend services and Cloud CDN cache keys -// by modifying request headers. -type LbEdgeExtension 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 attached. At least one forwarding rule is - // required. Only one `LbEdgeExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbEdgeExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: Required. All forwarding rules referenced by this - // extension must share the same load balancing scheme. Supported values: - // `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. Identifier. Name of the `LbEdgeExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbEdgeExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbEdgeExtension - return gensupport.MarshalJSON(NoMethod(s), 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 attached. At least one forwarding rule is - // required. Only one `LbRouteExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbRouteExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - 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 Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata - // applies to all extensions in all extensions chains in this resource. The - // metadata is available under the key `com.google.lb_route_extension.`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set if at least one of the extension chains contains - // plugin extensions. Setting it results in a validation error. You can set - // metadata at either the resource level or the extension level. The extension - // level metadata is recommended because you can pass a different set of - // metadata through each extension to the backend. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `LbRouteExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensio - // n}`. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbRouteExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbRouteExtension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LbTcpExtension: `LbTcpExtension` is a resource that allows traffic -// forwarding to different backend services to make allow/deny decisions on TCP -// connections for all L7 Load Balancers within a network. Currently only -// internal load-balancers are supported. -type LbTcpExtension 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"` - // Labels: Optional. Set of labels associated with the `LbTcpExtension` - // resource. The format must comply with the requirements for labels - // (/compute/docs/labeling-resources#requirements) for Google Cloud resources. - 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`. For more information, refer to Backend - // services overview - // (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. Identifier. Name of the `LbTcpExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/LbTcpExtension/{lb_tcp_extension}` - Name string `json:"name,omitempty"` - // Networks: Optional. If set, this `LbTcpExtension` resource applies to all - // `ForwardingRule` resources in these VPC networks. Values should be relative - // resource names identifying VPC networks, for example - // `projects/*/global/networks/network-1`. Currently limited to 1 network per - // resource. Limited to 1 network per resource. - Networks []string `json:"networks,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbTcpExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbTcpExtension - return gensupport.MarshalJSON(NoMethod(s), 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: Optional. A list of references to the forwarding rules to - // which this service extension is attached. At least one forwarding rule is - // required. Only one `LbTrafficExtension` resource can be associated with a - // forwarding rule. - ForwardingRules []string `json:"forwardingRules,omitempty"` - // Labels: Optional. Set of labels associated with the `LbTrafficExtension` - // resource. The format must comply with the requirements for labels - // (https://cloud.google.com/compute/docs/labeling-resources#requirements) for - // Google Cloud resources. - 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` and `EXTERNAL_MANAGED`. For more - // information, refer to Backend services overview - // (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"` - // Metadata: Optional. The metadata provided here is included as part of the - // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension server. The metadata - // applies to all extensions in all extensions chains in this resource. The - // metadata is available under the key `com.google.lb_traffic_extension.`. The - // following variables are supported in the metadata: `{forwarding_rule_id}` - - // substituted with the forwarding rule's fully qualified resource name. This - // field must not be set if at least one of the extension chains contains - // plugin extensions. Setting it results in a validation error. You can set - // metadata at either the resource level or the extension level. The extension - // level metadata is recommended because you can pass a different set of - // metadata through each extension to the backend. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // Name: Required. Identifier. Name of the `LbTrafficExtension` resource in the - // following format: - // `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_exte - // nsion}`. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LbTrafficExtension) MarshalJSON() ([]byte, error) { - type NoMethod LbTrafficExtension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListAuthzExtensionsResponse: Message for response to listing -// `AuthzExtension` resources. -type ListAuthzExtensionsResponse struct { - // AuthzExtensions: The list of `AuthzExtension` resources. - AuthzExtensions []*AuthzExtension `json:"authzExtensions,omitempty"` - // 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. "AuthzExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthzExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListAuthzExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAuthzExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListEndpointPoliciesResponse: Response returned by the ListEndpointPolicies -// method. -type ListEndpointPoliciesResponse struct { - // EndpointPolicies: List of EndpointPolicy resources. - EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "EndpointPolicies") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndpointPolicies") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListEndpointPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGatewayRouteViewsResponse: Response returned by the -// ListGatewayRouteViews method. -type ListGatewayRouteViewsResponse struct { - // GatewayRouteViews: List of GatewayRouteView resources. - GatewayRouteViews []*GatewayRouteView `json:"gatewayRouteViews,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: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. "GatewayRouteViews") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GatewayRouteViews") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGatewayRouteViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGatewayRouteViewsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGatewaysResponse: Response returned by the ListGateways method. -type ListGatewaysResponse struct { - // Gateways: List of Gateway resources. - Gateways []*Gateway `json:"gateways,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"` - // 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. "Gateways") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Gateways") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGatewaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGatewaysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListGrpcRoutesResponse: Response returned by the ListGrpcRoutes method. -type ListGrpcRoutesResponse struct { - // GrpcRoutes: List of GrpcRoute resources. - GrpcRoutes []*GrpcRoute `json:"grpcRoutes,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "GrpcRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GrpcRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListGrpcRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListHttpRoutesResponse: Response returned by the ListHttpRoutes method. -type ListHttpRoutesResponse struct { - // HttpRoutes: List of HttpRoute resources. - HttpRoutes []*HttpRoute `json:"httpRoutes,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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. "HttpRoutes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpRoutes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListHttpRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbEdgeExtensionsResponse: Message for response to listing -// `LbEdgeExtension` resources. -type ListLbEdgeExtensionsResponse struct { - // LbEdgeExtensions: The list of `LbEdgeExtension` resources. - LbEdgeExtensions []*LbEdgeExtension `json:"lbEdgeExtensions,omitempty"` - // 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. "LbEdgeExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbEdgeExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbEdgeExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbEdgeExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbRouteExtensionsResponse: Message for response to listing -// `LbRouteExtension` resources. -type ListLbRouteExtensionsResponse struct { - // LbRouteExtensions: The list of `LbRouteExtension` resources. - LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"` - // 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. "LbRouteExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbRouteExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbRouteExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbTcpExtensionsResponse: Message for response to listing -// `LbTcpExtension` resources. -type ListLbTcpExtensionsResponse struct { - // LbTcpExtensions: The list of `LbTcpExtension` resources. - LbTcpExtensions []*LbTcpExtension `json:"lbTcpExtensions,omitempty"` - // 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. "LbTcpExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbTcpExtensions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbTcpExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbTcpExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListLbTrafficExtensionsResponse: Message for response to listing -// `LbTrafficExtension` resources. -type ListLbTrafficExtensionsResponse struct { - // LbTrafficExtensions: The list of `LbTrafficExtension` resources. - LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"` - // 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. "LbTrafficExtensions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LbTrafficExtensions") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLbTrafficExtensionsResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListMeshRouteViewsResponse: Response returned by the ListMeshRouteViews -// method. -type ListMeshRouteViewsResponse struct { - // MeshRouteViews: List of MeshRouteView resources. - MeshRouteViews []*MeshRouteView `json:"meshRouteViews,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: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. "MeshRouteViews") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MeshRouteViews") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListMeshRouteViewsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMeshRouteViewsResponse - return gensupport.MarshalJSON(NoMethod(s), 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"` - // Unreachable: Unreachable resources. Populated when the request opts into - // `return_partial_success` and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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 empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Meshes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListMeshesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMeshesResponse - return gensupport.MarshalJSON(NoMethod(s), 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"` - // Unreachable: Unordered list. Unreachable resources. Populated when the - // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceBindingsResponse: Response returned by the ListServiceBindings -// method. -type ListServiceBindingsResponse struct { - // 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"` - // ServiceBindings: List of ServiceBinding resources. - ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceBindingsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceBindingsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListServiceLbPoliciesResponse: Response returned by the -// ListServiceLbPolicies method. -type ListServiceLbPoliciesResponse struct { - // 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"` - // ServiceLbPolicies: List of ServiceLbPolicy resources. - ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListServiceLbPoliciesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListTcpRoutesResponse: Response returned by the ListTcpRoutes method. -type ListTcpRoutesResponse struct { - // 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"` - // TcpRoutes: List of TcpRoute resources. - TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListTcpRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTcpRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListTlsRoutesResponse: Response returned by the ListTlsRoutes method. -type ListTlsRoutesResponse struct { - // 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"` - // TlsRoutes: List of TlsRoute resources. - TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"` - // Unreachable: Unreachable resources. Populated when the request opts into - // return_partial_success and reading across collections e.g. when attempting - // to list all resources across all supported locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListTlsRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTlsRoutesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWasmPluginVersionsResponse: Response returned by the -// `ListWasmPluginVersions` method. -type ListWasmPluginVersionsResponse struct { - // 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"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - Unreachable []string `json:"unreachable,omitempty"` - // WasmPluginVersions: List of `WasmPluginVersion` resources. - WasmPluginVersions []*WasmPluginVersion `json:"wasmPluginVersions,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWasmPluginVersionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWasmPluginVersionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListWasmPluginsResponse: Response returned by the `ListWasmPlugins` method. -type ListWasmPluginsResponse struct { - // 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"` - // Unreachable: Unreachable resources. Populated when the request attempts to - // list all resources across all supported locations, while some locations are - // temporarily unavailable. - Unreachable []string `json:"unreachable,omitempty"` - // WasmPlugins: List of `WasmPlugin` resources. - WasmPlugins []*WasmPlugin `json:"wasmPlugins,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListWasmPluginsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListWasmPluginsResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Location) MarshalJSON() ([]byte, error) { - type NoMethod Location - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Advanced resources. -type LoggingConfig struct { - // LogSeverity: Optional. The minimum severity of logs that will be sent to - // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be - // sent, unless it is NONE. - // - // Possible values: - // "LOG_SEVERITY_UNSPECIFIED" - Log severity is not specified. This value is - // treated the same as NONE, but is used to distinguish between no update and - // update to NONE in update_masks. - // "NONE" - Default value at resource creation, presence of this value must - // be treated as no logging/disable logging. - // "DEBUG" - Debug or trace level logging. - // "INFO" - Routine information, such as ongoing status or performance. - // "NOTICE" - Normal but significant events, such as start up, shut down, or - // a configuration change. - // "WARNING" - Warning events might cause problems. - // "ERROR" - Error events are likely to cause problems. - // "CRITICAL" - Critical events cause more severe problems or outages. - // "ALERT" - A person must take action immediately. - // "EMERGENCY" - One or more systems are unusable. - LogSeverity string `json:"logSeverity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LogSeverity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LogSeverity") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod LoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Mesh: Mesh represents a logical configuration grouping for workload to -// workload communication within a service mesh. Routes that point to mesh -// dictate how requests are routed within this logical mesh boundary. -type Mesh struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // EnvoyHeaders: Optional. Determines if envoy will insert internal debug - // headers into upstream requests. Other Envoy headers may still be injected. - // By default, envoy will not insert any debug headers. - // - // Possible values: - // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. - // "NONE" - Suppress envoy debug headers. - // "DEBUG_HEADERS" - Envoy will insert default internal debug headers into - // upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry - // x-envoy-expected-rq-timeout-ms x-envoy-original-path - // x-envoy-upstream-stream-duration-ms - EnvoyHeaders string `json:"envoyHeaders,omitempty"` - // InterceptionPort: Optional. If set to a valid TCP port (1-65535), instructs - // the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) - // address. The SIDECAR proxy will expect all traffic to be redirected to this - // port regardless of its actual ip:port destination. If unset, a port '15001' - // is used as the interception port. This is applicable only for sidecar proxy - // deployments. - InterceptionPort int64 `json:"interceptionPort,omitempty"` - // Labels: Optional. Set of label tags associated with the Mesh resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the Mesh resource. It matches pattern - // `projects/*/locations/*/meshes/`. - Name string `json:"name,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Mesh) MarshalJSON() ([]byte, error) { - type NoMethod Mesh - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MeshRouteView: MeshRouteView defines view-only resource for Routes to a Mesh -type MeshRouteView struct { - // Name: Output only. Identifier. Full path name of the MeshRouteView resource. - // Format: - // projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{rout - // e_view} - Name string `json:"name,omitempty"` - // RouteId: Output only. The resource id for the route. - RouteId string `json:"routeId,omitempty"` - // RouteLocation: Output only. Location where the route exists. - RouteLocation string `json:"routeLocation,omitempty"` - // RouteProjectNumber: Output only. Project number where the route exists. - RouteProjectNumber int64 `json:"routeProjectNumber,omitempty,string"` - // RouteType: Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or - // TlsRoute - RouteType string `json:"routeType,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MeshRouteView) MarshalJSON() ([]byte, error) { - type NoMethod MeshRouteView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataLabelMatcher: The matcher that is based on node metadata presented -// by xDS clients. -type MetadataLabelMatcher struct { - // MetadataLabelMatchCriteria: Specifies how matching should be done. Supported - // values are: MATCH_ANY: At least one of the Labels specified in the matcher - // should match the metadata presented by xDS client. MATCH_ALL: The metadata - // presented by the xDS client should contain all of the labels specified here. - // The selection is determined based on the best match. For example, suppose - // there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the - // matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client - // with label connects, the config from P1 will be selected. If a client with - // label connects, the config from P2 will be selected. If a client with label - // connects, the config from P3 will be selected. If there is more than one - // best match, (for example, if a config P4 with selector exists and if a - // client with label connects), pick up the one with older creation time. - // - // Possible values: - // "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should not be - // used. - // "MATCH_ANY" - At least one of the Labels specified in the matcher should - // match the metadata presented by xDS client. - // "MATCH_ALL" - The metadata presented by the xDS client should contain all - // of the labels specified here. - MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"` - // MetadataLabels: The list of label value pairs that must match labels in the - // provided metadata based on filterMatchCriteria This list can have at most 64 - // entries. The list can be empty if the match criteria is MATCH_ANY, to - // specify a wildcard match (i.e this matches any client). - MetadataLabels []*MetadataLabels `json:"metadataLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "MetadataLabelMatchCriteria") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MetadataLabelMatchCriteria") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataLabelMatcher) MarshalJSON() ([]byte, error) { - type NoMethod MetadataLabelMatcher - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MetadataLabels: Defines a name-pair value for a single label. -type MetadataLabels struct { - // LabelName: Required. Label name presented as key in xDS Node Metadata. - LabelName string `json:"labelName,omitempty"` - // LabelValue: Required. Label value presented as value corresponding to the - // above key, in xDS Node Metadata. - LabelValue string `json:"labelValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MetadataLabels) MarshalJSON() ([]byte, error) { - type NoMethod MetadataLabels - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), 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. 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RetryFilterPerRouteConfig struct { - // CryptoKeyName: The name of the crypto key to use for encrypting event data. - CryptoKeyName string `json:"cryptoKeyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CryptoKeyName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RetryFilterPerRouteConfig) MarshalJSON() ([]byte, error) { - type NoMethod RetryFilterPerRouteConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceBinding: ServiceBinding can be used to: - Bind a Service Directory -// Service to be used in a BackendService resource. This feature will be -// deprecated soon. - Bind a Private Service Connect producer service to be -// used in consumer Cloud Service Mesh or Application Load Balancers. - Bind a -// Cloud Run service to be used in consumer Cloud Service Mesh or Application -// Load Balancers. -type ServiceBinding struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Labels: Optional. Set of label tags associated with the ServiceBinding - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the ServiceBinding resource. It matches pattern - // `projects/*/locations/*/serviceBindings/`. - Name string `json:"name,omitempty"` - // Service: Optional. The full Service Directory Service name of the format - // `projects/*/locations/*/namespaces/*/services/*`. This field is for Service - // Directory integration which will be deprecated soon. - Service string `json:"service,omitempty"` - // ServiceId: Output only. The unique identifier of the Service Directory - // Service against which the ServiceBinding resource is validated. This is - // populated when the Service Binding resource is used in another resource - // (like Backend Service). This is of the UUID4 format. This field is for - // Service Directory integration which will be deprecated soon. - ServiceId string `json:"serviceId,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceBinding) MarshalJSON() ([]byte, error) { - type NoMethod ServiceBinding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicy: ServiceLbPolicy holds global load balancing and traffic -// distribution configuration that can be applied to a BackendService. -type ServiceLbPolicy struct { - // AutoCapacityDrain: Optional. Configuration to automatically move traffic - // away for unhealthy IG/NEG for the associated Backend Service. - AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"` - // CreateTime: Output only. The timestamp when this resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // FailoverConfig: Optional. Configuration related to health based failover. - FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"` - // IsolationConfig: Optional. Configuration to provide isolation support for - // the associated Backend Service. - IsolationConfig *ServiceLbPolicyIsolationConfig `json:"isolationConfig,omitempty"` - // Labels: Optional. Set of label tags associated with the ServiceLbPolicy - // resource. - Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingAlgorithm: Optional. The type of load balancing algorithm to be - // used. The default behavior is WATERFALL_BY_REGION. - // - // Possible values: - // "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the loadbalancing - // algorithm is unspecified. - // "SPRAY_TO_WORLD" - Balance traffic across all backends across the world - // proportionally based on capacity. - // "SPRAY_TO_REGION" - Direct traffic to the nearest region with endpoints - // and capacity before spilling over to other regions and spread the traffic - // from each client to all the MIGs/NEGs in a region. - // "WATERFALL_BY_REGION" - Direct traffic to the nearest region with - // endpoints and capacity before spilling over to other regions. All MIGs/NEGs - // within a region are evenly loaded but each client might not spread the - // traffic to all the MIGs/NEGs in the region. - // "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone closest to - // the client, before spilling over to other zones. - LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"` - // Name: Identifier. Name of the ServiceLbPolicy resource. It matches pattern - // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy - // _name}`. - Name string `json:"name,omitempty"` - // UpdateTime: Output only. The timestamp when this resource was last 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. "AutoCapacityDrain") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoCapacityDrain") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy IG/NEG -// should be considered for global load balancing and traffic routing. -type ServiceLbPolicyAutoCapacityDrain struct { - // Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set as - // drained. - An IG/NEG is considered unhealthy if less than 25% of the - // instances/endpoints in the IG/NEG are healthy. - This option will never - // result in draining more than 50% of the configured IGs/NEGs for the Backend - // Service. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyAutoCapacityDrain - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyFailoverConfig: Option to specify health based failover -// behavior. This is not related to Network load balancer FailoverPolicy. -type ServiceLbPolicyFailoverConfig struct { - // FailoverHealthThreshold: Optional. The percentage threshold that a load - // balancer will begin to send traffic to failover backends. If the percentage - // of endpoints in a MIG/NEG is smaller than this value, traffic would be sent - // to failover backends if possible. This field should be set to a value - // between 1 and 99. The default value is 50 for Global external HTTP(S) load - // balancer (classic) and Proxyless service mesh, and 70 for others. - FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailoverHealthThreshold") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailoverHealthThreshold") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyFailoverConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceLbPolicyIsolationConfig: Configuration to provide isolation support -// for the associated Backend Service. -type ServiceLbPolicyIsolationConfig struct { - // IsolationGranularity: Optional. The isolation granularity of the load - // balancer. - // - // Possible values: - // "ISOLATION_GRANULARITY_UNSPECIFIED" - No isolation is configured for the - // backend service. Traffic can overflow based on the load balancing algorithm. - // "REGION" - Traffic for this service will be isolated at the cloud region - // level. - IsolationGranularity string `json:"isolationGranularity,omitempty"` - // IsolationMode: Optional. The isolation mode of the load balancer. - // - // Possible values: - // "ISOLATION_MODE_UNSPECIFIED" - No isolation mode is configured for the - // backend service. - // "NEAREST" - Traffic will be sent to the nearest region. - // "STRICT" - Traffic will fail if no serving backends are available in the - // same region as the load balancer. - IsolationMode string `json:"isolationMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsolationGranularity") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsolationGranularity") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ServiceLbPolicyIsolationConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceLbPolicyIsolationConfig - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRoute: TcpRoute is the resource defining how TCP traffic should be routed -// by a Mesh/Gateway resource. -type TcpRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this TcpRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Labels: Optional. Set of label tags associated with the TcpRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this TcpRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the TcpRoute resource. It matches pattern - // `projects/*/locations/*/tcpRoutes/tcp_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. At - // least one RouteRule must be supplied. If there are multiple rules then the - // action taken will be the first rule to match. - Rules []*TcpRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRoute) MarshalJSON() ([]byte, error) { - type NoMethod TcpRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type TcpRouteRouteAction struct { - // Destinations: Optional. The destination services to which traffic should be - // forwarded. At least one destination service is required. Only one of route - // destination or original destination can be set. - Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 30 seconds. If set to 0s, the timeout will be - // disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // OriginalDestination: Optional. If true, Router will use the destination IP - // and port of the original connection as the destination of the request. - // Default is false. Only one of route destinations or original destination can - // be set. - OriginalDestination bool `json:"originalDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteDestination: Describe the destination for traffic to be routed -// to. -type TcpRouteRouteDestination struct { - // ServiceName: Required. The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the serviceName field. This is computed as: - - // weight/Sum(weights in this destination list). For non-zero values, there may - // be some epsilon from the exact proportion defined here depending on the - // precision an implementation supports. If only one serviceName is specified - // and it has a weight greater than 0, 100% of the traffic is forwarded to that - // backend. If weights are specified for any one service name, they need to be - // specified for all of them. If weights are unspecified for all services, - // then, traffic is distributed in equal proportions to all of them. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteMatch: RouteMatch defines the predicate used to match requests -// to a given action. Multiple match types are "OR"ed for evaluation. If no -// routeMatch field is specified, this rule will unconditionally match traffic. -type TcpRouteRouteMatch struct { - // Address: Required. Must be specified in the CIDR range format. A CIDR range - // consists of an IP Address and a prefix length to construct the subnet mask. - // By default, the prefix length is 32 (i.e. matches a single IP address). Only - // IPV4 addresses are supported. Examples: "10.0.0.1" - matches against this - // exact IP address. "10.0.0.0/8" - matches against any IP address within the - // 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP - // address'. - Address string `json:"address,omitempty"` - // Port: Required. Specifies the destination port to match against. - Port string `json:"port,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Address") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TcpRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type TcpRouteRouteRule struct { - // Action: Required. The detailed rule defining how to route matched traffic. - Action *TcpRouteRouteAction `json:"action,omitempty"` - // Matches: Optional. RouteMatch defines the predicate used to match requests - // to a given action. Multiple match types are "OR"ed for evaluation. If no - // routeMatch field is specified, this rule will unconditionally match traffic. - Matches []*TcpRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TcpRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod TcpRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRoute: TlsRoute defines how traffic should be routed based on SNI and -// other matching L3 attributes. -type TlsRoute struct { - // CreateTime: Output only. The timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. A free-text description of the resource. Max length - // 1024 characters. - Description string `json:"description,omitempty"` - // Gateways: Optional. Gateways defines a list of gateways this TlsRoute is - // attached to, as one of the routing rules to route the requests served by the - // gateway. Each gateway reference should match the pattern: - // `projects/*/locations/*/gateways/` - Gateways []string `json:"gateways,omitempty"` - // Labels: Optional. Set of label tags associated with the TlsRoute resource. - Labels map[string]string `json:"labels,omitempty"` - // Meshes: Optional. Meshes defines a list of meshes this TlsRoute is attached - // to, as one of the routing rules to route the requests served by the mesh. - // Each mesh reference should match the pattern: - // `projects/*/locations/*/meshes/` The attached Mesh should be of a type - // SIDECAR - Meshes []string `json:"meshes,omitempty"` - // Name: Identifier. Name of the TlsRoute resource. It matches pattern - // `projects/*/locations/*/tlsRoutes/tls_route_name>`. - Name string `json:"name,omitempty"` - // Rules: Required. Rules that define how traffic is routed and handled. At - // least one RouteRule must be supplied. If there are multiple rules then the - // action taken will be the first rule to match. - Rules []*TlsRouteRouteRule `json:"rules,omitempty"` - // SelfLink: Output only. Server-defined URL of this resource - SelfLink string `json:"selfLink,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRoute) MarshalJSON() ([]byte, error) { - type NoMethod TlsRoute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteAction: The specifications for routing traffic and applying -// associated policies. -type TlsRouteRouteAction struct { - // Destinations: Required. The destination services to which traffic should be - // forwarded. At least one destination service is required. - Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"` - // IdleTimeout: Optional. Specifies the idle timeout for the selected route. - // The idle timeout is defined as the period in which there are no bytes sent - // or received on either the upstream or downstream connection. If not set, the - // default idle timeout is 1 hour. If set to 0s, the timeout will be disabled. - IdleTimeout string `json:"idleTimeout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destinations") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Destinations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteDestination: Describe the destination for traffic to be routed -// to. -type TlsRouteRouteDestination struct { - // ServiceName: Required. The URL of a BackendService to route traffic to. - ServiceName string `json:"serviceName,omitempty"` - // Weight: Optional. Specifies the proportion of requests forwarded to the - // backend referenced by the service_name field. This is computed as: - - // weight/Sum(weights in destinations) Weights in all destinations does not - // need to sum up to 100. - Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteDestination) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteMatch: RouteMatch defines the predicate used to match requests -// to a given action. Multiple match types are "AND"ed for evaluation. -type TlsRouteRouteMatch struct { - // Alpn: Optional. ALPN (Application-Layer Protocol Negotiation) to match - // against. Examples: "http/1.1", "h2". At least one of sni_host and alpn is - // required. Up to 5 alpns across all matches can be set. - Alpn []string `json:"alpn,omitempty"` - // SniHost: Optional. SNI (server name indicator) to match against. SNI will be - // matched against all wildcard domains, i.e. `www.example.com` will be first - // matched against `www.example.com`, then `*.example.com`, then `*.com.` - // Partial wildcards are not supported, and values like *w.example.com are - // invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts - // across all matches can be set. - SniHost []string `json:"sniHost,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpn") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alpn") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteMatch) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteMatch - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TlsRouteRouteRule: Specifies how to match traffic and how to route traffic -// when traffic is matched. -type TlsRouteRouteRule struct { - // Action: Required. The detailed rule defining how to route matched traffic. - Action *TlsRouteRouteAction `json:"action,omitempty"` - // Matches: Required. RouteMatch defines the predicate used to match requests - // to a given action. Multiple match types are "OR"ed for evaluation. Atleast - // one RouteMatch must be supplied. - Matches []*TlsRouteRouteMatch `json:"matches,omitempty"` - // ForceSendFields is a list of field names (e.g. "Action") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Action") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TlsRouteRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod TlsRouteRouteRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TrafficPortSelector: Specification of a port-based selector. -type TrafficPortSelector struct { - // Ports: Optional. A list of ports. Can be port numbers or port range - // (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or - // named ports or * to specify all ports. If the list is empty, all ports are - // selected. - Ports []string `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ports") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ports") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TrafficPortSelector) MarshalJSON() ([]byte, error) { - type NoMethod TrafficPortSelector - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPlugin: `WasmPlugin` is a resource representing a service executing a -// customer-provided Wasm module. -type WasmPlugin 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"` - // Labels: Optional. Set of labels associated with the `WasmPlugin` resource. - // The format must comply with the following requirements - // (/compute/docs/labeling-resources#requirements). - Labels map[string]string `json:"labels,omitempty"` - // LogConfig: Optional. Specifies the logging options for the activity - // performed by this plugin. If logging is enabled, plugin logs are exported to - // Cloud Logging. Note that the settings relate to the logs generated by using - // logging statements in your Wasm code. - LogConfig *WasmPluginLogConfig `json:"logConfig,omitempty"` - // MainVersionId: Optional. The ID of the `WasmPluginVersion` resource that is - // the currently serving one. The version referred to must be a child of this - // `WasmPlugin` resource. - MainVersionId string `json:"mainVersionId,omitempty"` - // Name: Identifier. Name of the `WasmPlugin` resource in the following format: - // `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. - Name string `json:"name,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // UsedBy: Output only. List of all extensions - // (https://cloud.google.com/service-extensions/docs/overview) that use this - // `WasmPlugin` resource. - UsedBy []*WasmPluginUsedBy `json:"usedBy,omitempty"` - // Versions: Optional. All versions of this `WasmPlugin` resource in the - // key-value format. The key is the resource ID, and the value is the - // `VersionDetails` object. Lets you create or update a `WasmPlugin` resource - // and its versions in a single request. When the `main_version_id` field is - // not empty, it must point to one of the `VersionDetails` objects in the map. - // If provided in a `PATCH` request, the new versions replace the previous set. - // Any version omitted from the `versions` field is removed. Because the - // `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion` resource - // with the same name already exists and differs, the request fails. Note: In a - // `GET` request, this field is populated only if the field - // `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. - Versions map[string]WasmPluginVersionDetails `json:"versions,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPlugin) MarshalJSON() ([]byte, error) { - type NoMethod WasmPlugin - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginLogConfig: Specifies the logging options for the activity -// performed by this plugin. If logging is enabled, plugin logs are exported to -// Cloud Logging. -type WasmPluginLogConfig struct { - // Enable: Optional. Specifies whether to enable logging for activity by this - // plugin. Defaults to `false`. - Enable bool `json:"enable,omitempty"` - // MinLogLevel: Non-empty default. Specifies the lowest level of the plugin - // logs that are exported to Cloud Logging. This setting relates to the logs - // generated by using logging statements in your Wasm code. This field is can - // be set only if logging is enabled for the plugin. If the field is not - // provided when logging is enabled, it is set to `INFO` by default. - // - // Possible values: - // "LOG_LEVEL_UNSPECIFIED" - Unspecified value. Defaults to `LogLevel.INFO`. - // "TRACE" - Report logs with TRACE level and above. - // "DEBUG" - Report logs with DEBUG level and above. - // "INFO" - Report logs with INFO level and above. - // "WARN" - Report logs with WARN level and above. - // "ERROR" - Report logs with ERROR level and above. - // "CRITICAL" - Report logs with CRITICAL level only. - MinLogLevel string `json:"minLogLevel,omitempty"` - // SampleRate: Non-empty default. Configures the sampling rate of activity - // logs, where `1.0` means all logged activity is reported and `0.0` means no - // activity is reported. A floating point value between `0.0` and `1.0` - // indicates that a percentage of log messages is stored. The default value - // when logging is enabled is `1.0`. The value of the field must be between `0` - // and `1` (inclusive). This field can be specified only if logging is enabled - // for this plugin. - SampleRate float64 `json:"sampleRate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *WasmPluginLogConfig) UnmarshalJSON(data []byte) error { - type NoMethod WasmPluginLogConfig - var s1 struct { - SampleRate gensupport.JSONFloat64 `json:"sampleRate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SampleRate = float64(s1.SampleRate) - return nil -} - -// WasmPluginUsedBy: Defines a resource that uses the `WasmPlugin` resource. -type WasmPluginUsedBy struct { - // Name: Output only. Full name of the resource - // https://google.aip.dev/122#full-resource-names, for example - // `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbR - // outeExtensions/{extension}` - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginUsedBy) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginUsedBy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginVersion: A single immutable version of a `WasmPlugin` resource. -// Defines the Wasm module used and optionally its runtime config. -type WasmPluginVersion 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"` - // ImageDigest: Output only. This field holds the digest (usually checksum) - // value for the plugin image. The value is calculated based on the `image_uri` - // field. If the `image_uri` field refers to a container image, the digest - // value is obtained from the container image. If the `image_uri` field refers - // to a generic artifact, the digest value is calculated based on the contents - // of the file. - ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the image containing the Wasm module, stored in - // Artifact Registry. The URI can refer to one of the following repository - // formats: * Container images: the `image_uri` must point to a container that - // contains a single file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the digest of the image is saved in - // the `image_digest` field. When pulling a container image from Artifact - // Registry, the digest value is used instead of an image tag. * Generic - // artifacts: the `image_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `image_digest` field. - ImageUri string `json:"imageUri,omitempty"` - // Labels: Optional. Set of labels associated with the `WasmPluginVersion` - // resource. - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. Name of the `WasmPluginVersion` resource in the following - // format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ - // versions/{wasm_plugin_version}`. - Name string `json:"name,omitempty"` - // PluginConfigData: Configuration for the plugin. The configuration is - // provided to the plugin at runtime through the `ON_CONFIGURE` callback. When - // a new `WasmPluginVersion` resource is created, the digest of the contents is - // saved in the `plugin_config_digest` field. - PluginConfigData string `json:"pluginConfigData,omitempty"` - // PluginConfigDigest: Output only. This field holds the digest (usually - // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` field or the image defined by the - // `plugin_config_uri` field. - PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` - // PluginConfigUri: URI of the plugin configuration stored in the Artifact - // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The URI can refer to one of the following - // repository formats: * Container images: the `plugin_config_uri` must point - // to a container that contains a single file with the name `plugin.config`. - // When a new `WasmPluginVersion` resource is created, the digest of the image - // is saved in the `plugin_config_digest` field. When pulling a container image - // from Artifact Registry, the digest value is used instead of an image tag. * - // Generic artifacts: the `plugin_config_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.config`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `plugin_config_digest` field. - PluginConfigUri string `json:"pluginConfigUri,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginVersion) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// WasmPluginVersionDetails: Details of a `WasmPluginVersion` resource to be -// inlined in the `WasmPlugin` resource. -type WasmPluginVersionDetails 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"` - // ImageDigest: Output only. This field holds the digest (usually checksum) - // value for the plugin image. The value is calculated based on the `image_uri` - // field. If the `image_uri` field refers to a container image, the digest - // value is obtained from the container image. If the `image_uri` field refers - // to a generic artifact, the digest value is calculated based on the contents - // of the file. - ImageDigest string `json:"imageDigest,omitempty"` - // ImageUri: Optional. URI of the image containing the Wasm module, stored in - // Artifact Registry. The URI can refer to one of the following repository - // formats: * Container images: the `image_uri` must point to a container that - // contains a single file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the digest of the image is saved in - // the `image_digest` field. When pulling a container image from Artifact - // Registry, the digest value is used instead of an image tag. * Generic - // artifacts: the `image_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.wasm`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `image_digest` field. - ImageUri string `json:"imageUri,omitempty"` - // Labels: Optional. Set of labels associated with the `WasmPluginVersion` - // resource. - Labels map[string]string `json:"labels,omitempty"` - // PluginConfigData: Configuration for the plugin. The configuration is - // provided to the plugin at runtime through the `ON_CONFIGURE` callback. When - // a new `WasmPluginVersion` version is created, the digest of the contents is - // saved in the `plugin_config_digest` field. - PluginConfigData string `json:"pluginConfigData,omitempty"` - // PluginConfigDigest: Output only. This field holds the digest (usually - // checksum) value for the plugin configuration. The value is calculated based - // on the contents of `plugin_config_data` field or the image defined by the - // `plugin_config_uri` field. - PluginConfigDigest string `json:"pluginConfigDigest,omitempty"` - // PluginConfigUri: URI of the plugin configuration stored in the Artifact - // Registry. The configuration is provided to the plugin at runtime through the - // `ON_CONFIGURE` callback. The URI can refer to one of the following - // repository formats: * Container images: the `plugin_config_uri` must point - // to a container that contains a single file with the name `plugin.config`. - // When a new `WasmPluginVersion` resource is created, the digest of the image - // is saved in the `plugin_config_digest` field. When pulling a container image - // from Artifact Registry, the digest value is used instead of an image tag. * - // Generic artifacts: the `plugin_config_uri` must be in this format: - // `projects/{project}/locations/{location}/repositories/{repository}/ - // genericArtifacts/{package}:{version}`. The specified package and version - // must contain a file with the name `plugin.config`. When a new - // `WasmPluginVersion` resource is created, the checksum of the contents of the - // file is saved in the `plugin_config_digest` field. - PluginConfigUri string `json:"pluginConfigUri,omitempty"` - // UpdateTime: Output only. The timestamp when the resource was updated. - UpdateTime string `json:"updateTime,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s WasmPluginVersionDetails) MarshalJSON() ([]byte, error) { - type NoMethod WasmPluginVersionDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -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 -// details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not -// use this field. It is unsupported and is ignored unless explicitly -// documented otherwise. This is primarily for internal usage. -func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { - c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) - 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 -// details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsAuthzExtensionsCreateCall struct { - s *Service - parent string - authzextension *AuthzExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `AuthzExtension` resource in a given project and -// location. -// -// - parent: The parent resource of the `AuthzExtension` resource. Must be in -// the format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsAuthzExtensionsService) Create(parent string, authzextension *AuthzExtension) *ProjectsLocationsAuthzExtensionsCreateCall { - c := &ProjectsLocationsAuthzExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.authzextension = authzextension - return c -} - -// AuthzExtensionId sets the optional parameter "authzExtensionId": Required. -// User-provided ID of the `AuthzExtension` resource to be created. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) AuthzExtensionId(authzExtensionId string) *ProjectsLocationsAuthzExtensionsCreateCall { - c.urlParams_.Set("authzExtensionId", authzExtensionId) - 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 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 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 *ProjectsLocationsAuthzExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsCreateCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.authzextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/authzExtensions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `AuthzExtension` resource. -// -// - name: The name of the `AuthzExtension` resource to delete. Must be in the -// format -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Delete(name string) *ProjectsLocationsAuthzExtensionsDeleteCall { - c := &ProjectsLocationsAuthzExtensionsDeleteCall{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 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 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 *ProjectsLocationsAuthzExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsDeleteCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `AuthzExtension` resource. -// -// - name: A name of the `AuthzExtension` resource to get. Must be in the -// format -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Get(name string) *ProjectsLocationsAuthzExtensionsGetCall { - c := &ProjectsLocationsAuthzExtensionsGetCall{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 -// details. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAuthzExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthzExtensionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AuthzExtension.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 *ProjectsLocationsAuthzExtensionsGetCall) Do(opts ...googleapi.CallOption) (*AuthzExtension, 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 := &AuthzExtension{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAuthzExtensionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `AuthzExtension` resources in a given project and location. -// -// - parent: The project and location from which the `AuthzExtension` resources -// are listed. These values are specified in the following format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsAuthzExtensionsService) List(parent string) *ProjectsLocationsAuthzExtensionsListCall { - c := &ProjectsLocationsAuthzExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsAuthzExtensionsListCall) Filter(filter string) *ProjectsLocationsAuthzExtensionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint about how to order the -// results. -func (c *ProjectsLocationsAuthzExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsAuthzExtensionsListCall { - 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 *ProjectsLocationsAuthzExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsAuthzExtensionsListCall { - 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 *ProjectsLocationsAuthzExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsAuthzExtensionsListCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAuthzExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthzExtensionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/authzExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAuthzExtensionsResponse.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 *ProjectsLocationsAuthzExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListAuthzExtensionsResponse, 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 := &ListAuthzExtensionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsAuthzExtensionsListCall) Pages(ctx context.Context, f func(*ListAuthzExtensionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsAuthzExtensionsPatchCall struct { - s *Service - name string - authzextension *AuthzExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `AuthzExtension` resource. -// -// - name: Identifier. Name of the `AuthzExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` -// . -func (r *ProjectsLocationsAuthzExtensionsService) Patch(name string, authzextension *AuthzExtension) *ProjectsLocationsAuthzExtensionsPatchCall { - c := &ProjectsLocationsAuthzExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.authzextension = authzextension - 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 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 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 *ProjectsLocationsAuthzExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsAuthzExtensionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Used to -// specify the fields to be overwritten in the `AuthzExtension` 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 *ProjectsLocationsAuthzExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAuthzExtensionsPatchCall { - 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 -// details. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthzExtensionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAuthzExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAuthzExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.authzextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.authzExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthzExtensionsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.authzExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesCreateCall struct { - s *Service - parent string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new EndpointPolicy in a given project and location. -// -// - parent: The parent resource of the EndpointPolicy. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall { - c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.endpointpolicy = endpointpolicy - return c -} - -// EndpointPolicyId sets the optional parameter "endpointPolicyId": Required. -// Short name of the EndpointPolicy resource to be created. E.g. "CustomECS". -func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall { - c.urlParams_.Set("endpointPolicyId", endpointPolicyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.endpointpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single EndpointPolicy. -// -// - name: A name of the EndpointPolicy to delete. Must be in the format -// `projects/*/locations/*/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall { - c := &ProjectsLocationsEndpointPoliciesDeleteCall{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 -// details. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single EndpointPolicy. -// -// - name: A name of the EndpointPolicy to get. Must be in the format -// `projects/*/locations/*/endpointPolicies/*`. -func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall { - c := &ProjectsLocationsEndpointPoliciesGetCall{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 -// details. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *EndpointPolicy.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 *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, 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 := &EndpointPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsEndpointPoliciesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists EndpointPolicies in a given project and location. -// -// - parent: The project and location from which the EndpointPolicies should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall { - c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EndpointPolicies to return per call. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListEndpointPoliciesResponse` Indicates that this is a continuation of -// a prior `ListEndpointPolicies` call, and that the system should return the -// next page of data. -func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsEndpointPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListEndpointPoliciesResponse.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 *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, 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 := &ListEndpointPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsEndpointPoliciesPatchCall struct { - s *Service - name string - endpointpolicy *EndpointPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single EndpointPolicy. -// -// - name: Identifier. Name of the EndpointPolicy resource. It matches pattern -// `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. -func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall { - c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.endpointpolicy = endpointpolicy - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the EndpointPolicy 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 *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall { - 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 -// details. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.endpointpolicy) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.endpointPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.endpointPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysCreateCall struct { - s *Service - parent string - gateway *Gateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Gateway in a given project and location. -// -// - parent: The parent resource of the Gateway. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall { - c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.gateway = gateway - return c -} - -// GatewayId sets the optional parameter "gatewayId": Required. Short name of -// the Gateway resource to be created. -func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall { - c.urlParams_.Set("gatewayId", gatewayId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.gateway) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single Gateway. -// -// - name: A name of the Gateway to delete. Must be in the format -// `projects/*/locations/*/gateways/*`. -func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall { - c := &ProjectsLocationsGatewaysDeleteCall{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 -// details. -func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single Gateway. -// -// - name: A name of the Gateway to get. Must be in the format -// `projects/*/locations/*/gateways/*`. -func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall { - c := &ProjectsLocationsGatewaysGetCall{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 -// details. -func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Gateway.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 *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, 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 := &Gateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Gateways in a given project and location. -// -// - parent: The project and location from which the Gateways should be listed, -// specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall { - c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Gateways -// to return per call. -func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGatewaysResponse` Indicates that this is a continuation of a prior -// `ListGateways` call, and that the system should return the next page of -// data. -func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGatewaysResponse.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 *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, 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 := &ListGatewaysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGatewaysPatchCall struct { - s *Service - name string - gateway *Gateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Gateway. -// -// - name: Identifier. Name of the Gateway resource. It matches pattern -// `projects/*/locations/*/gateways/`. -func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall { - c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.gateway = gateway - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Gateway 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 *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.gateway) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaysPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysRouteViewsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a single RouteView of a Gateway. -// -// - name: Name of the GatewayRouteView resource. Formats: -// projects/{project_number}/locations/{location}/gateways/{gateway}/routeView -// s/{route_view}. -func (r *ProjectsLocationsGatewaysRouteViewsService) Get(name string) *ProjectsLocationsGatewaysRouteViewsGetCall { - c := &ProjectsLocationsGatewaysRouteViewsGetCall{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 -// details. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysRouteViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysRouteViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.routeViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GatewayRouteView.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 *ProjectsLocationsGatewaysRouteViewsGetCall) Do(opts ...googleapi.CallOption) (*GatewayRouteView, 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 := &GatewayRouteView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGatewaysRouteViewsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RouteViews -// -// - parent: The Gateway to which a Route is associated. Formats: -// projects/{project_number}/locations/{location}/gateways/{gateway}. -func (r *ProjectsLocationsGatewaysRouteViewsService) List(parent string) *ProjectsLocationsGatewaysRouteViewsListCall { - c := &ProjectsLocationsGatewaysRouteViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewayRouteViews to return per call. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysRouteViewsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGatewayRouteViewsResponse` Indicates that this is a continuation -// of a prior `ListGatewayRouteViews` call, and that the system should return -// the next page of data. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysRouteViewsListCall { - 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 -// details. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysRouteViewsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysRouteViewsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysRouteViewsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGatewaysRouteViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGatewaysRouteViewsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/routeViews") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.gateways.routeViews.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGatewayRouteViewsResponse.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 *ProjectsLocationsGatewaysRouteViewsListCall) Do(opts ...googleapi.CallOption) (*ListGatewayRouteViewsResponse, 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 := &ListGatewayRouteViewsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.gateways.routeViews.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGatewaysRouteViewsListCall) Pages(ctx context.Context, f func(*ListGatewayRouteViewsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGrpcRoutesCreateCall struct { - s *Service - parent string - grpcroute *GrpcRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new GrpcRoute in a given project and location. -// -// - parent: The parent resource of the GrpcRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall { - c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.grpcroute = grpcroute - return c -} - -// GrpcRouteId sets the optional parameter "grpcRouteId": Required. Short name -// of the GrpcRoute resource to be created. -func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall { - c.urlParams_.Set("grpcRouteId", grpcRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grpcroute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single GrpcRoute. -// -// - name: A name of the GrpcRoute to delete. Must be in the format -// `projects/*/locations/*/grpcRoutes/*`. -func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall { - c := &ProjectsLocationsGrpcRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single GrpcRoute. -// -// - name: A name of the GrpcRoute to get. Must be in the format -// `projects/*/locations/*/grpcRoutes/*`. -func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall { - c := &ProjectsLocationsGrpcRoutesGetCall{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 -// details. -func (c *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GrpcRoute.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 *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, 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 := &GrpcRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsGrpcRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists GrpcRoutes in a given project and location. -// -// - parent: The project and location from which the GrpcRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall { - c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// GrpcRoutes to return per call. -func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListGrpcRoutesResponse` Indicates that this is a continuation of a -// prior `ListGrpcRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsGrpcRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListGrpcRoutesResponse.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 *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, 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 := &ListGrpcRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsGrpcRoutesPatchCall struct { - s *Service - name string - grpcroute *GrpcRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single GrpcRoute. -// -// - name: Identifier. Name of the GrpcRoute resource. It matches pattern -// `projects/*/locations/*/grpcRoutes/`. -func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall { - c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.grpcroute = grpcroute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GrpcRoute 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 *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGrpcRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.grpcroute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.grpcRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGrpcRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.grpcRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesCreateCall struct { - s *Service - parent string - httproute *HttpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new HttpRoute in a given project and location. -// -// - parent: The parent resource of the HttpRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall { - c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.httproute = httproute - return c -} - -// HttpRouteId sets the optional parameter "httpRouteId": Required. Short name -// of the HttpRoute resource to be created. -func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall { - c.urlParams_.Set("httpRouteId", httpRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httproute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single HttpRoute. -// -// - name: A name of the HttpRoute to delete. Must be in the format -// `projects/*/locations/*/httpRoutes/*`. -func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall { - c := &ProjectsLocationsHttpRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single HttpRoute. -// -// - name: A name of the HttpRoute to get. Must be in the format -// `projects/*/locations/*/httpRoutes/*`. -func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall { - c := &ProjectsLocationsHttpRoutesGetCall{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 -// details. -func (c *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *HttpRoute.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 *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, 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 := &HttpRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsHttpRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists HttpRoute in a given project and location. -// -// - parent: The project and location from which the HttpRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall { - c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// HttpRoutes to return per call. -func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListHttpRoutesResponse` Indicates that this is a continuation of a -// prior `ListHttpRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsHttpRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListHttpRoutesResponse.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 *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, 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 := &ListHttpRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsHttpRoutesPatchCall struct { - s *Service - name string - httproute *HttpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single HttpRoute. -// -// - name: Identifier. Name of the HttpRoute resource. It matches pattern -// `projects/*/locations/*/httpRoutes/http_route_name>`. -func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall { - c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.httproute = httproute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the HttpRoute 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 *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHttpRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.httproute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.httpRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsHttpRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.httpRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsCreateCall struct { - s *Service - parent string - lbedgeextension *LbEdgeExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `LbEdgeExtension` resource in a given project and -// location. -// -// - parent: The parent resource of the `LbEdgeExtension` resource. Must be in -// the format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Create(parent string, lbedgeextension *LbEdgeExtension) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c := &ProjectsLocationsLbEdgeExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.lbedgeextension = lbedgeextension - return c -} - -// LbEdgeExtensionId sets the optional parameter "lbEdgeExtensionId": Required. -// User-provided ID of the `LbEdgeExtension` resource to be created. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) LbEdgeExtensionId(lbEdgeExtensionId string) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.urlParams_.Set("lbEdgeExtensionId", lbEdgeExtensionId) - 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 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 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 *ProjectsLocationsLbEdgeExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsCreateCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbedgeextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbEdgeExtensions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `LbEdgeExtension` resource. -// -// - name: The name of the `LbEdgeExtension` resource to delete. Must be in the -// format -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Delete(name string) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c := &ProjectsLocationsLbEdgeExtensionsDeleteCall{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 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 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 *ProjectsLocationsLbEdgeExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `LbEdgeExtension` resource. -// -// - name: A name of the `LbEdgeExtension` resource to get. Must be in the -// format -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Get(name string) *ProjectsLocationsLbEdgeExtensionsGetCall { - c := &ProjectsLocationsLbEdgeExtensionsGetCall{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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LbEdgeExtension.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 *ProjectsLocationsLbEdgeExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbEdgeExtension, 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 := &LbEdgeExtension{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbEdgeExtensionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `LbEdgeExtension` resources in a given project and location. -// -// - parent: The project and location from which the `LbEdgeExtension` -// resources are listed. These values are specified in the following format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) List(parent string) *ProjectsLocationsLbEdgeExtensionsListCall { - c := &ProjectsLocationsLbEdgeExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Filter(filter string) *ProjectsLocationsLbEdgeExtensionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint about how to order the -// results. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 *ProjectsLocationsLbEdgeExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 *ProjectsLocationsLbEdgeExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbEdgeExtensionsListCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbEdgeExtensionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbEdgeExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListLbEdgeExtensionsResponse.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 *ProjectsLocationsLbEdgeExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbEdgeExtensionsResponse, 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 := &ListLbEdgeExtensionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsLbEdgeExtensionsListCall) Pages(ctx context.Context, f func(*ListLbEdgeExtensionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsLbEdgeExtensionsPatchCall struct { - s *Service - name string - lbedgeextension *LbEdgeExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `LbEdgeExtension` resource. -// -// - name: Identifier. Name of the `LbEdgeExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extensio -// n}`. -func (r *ProjectsLocationsLbEdgeExtensionsService) Patch(name string, lbedgeextension *LbEdgeExtension) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c := &ProjectsLocationsLbEdgeExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.lbedgeextension = lbedgeextension - 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 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 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 *ProjectsLocationsLbEdgeExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Used to specify the -// fields to be overwritten in the `LbEdgeExtension` 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 *ProjectsLocationsLbEdgeExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbEdgeExtensionsPatchCall { - 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 -// details. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbEdgeExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbedgeextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbEdgeExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbEdgeExtensionsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbEdgeExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbrouteextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_extens -// ion}`. -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_extens -// ion}`. -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 -// details. -func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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. These values are 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 about 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 -// details. -func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -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: Identifier. Name of the `LbRouteExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens -// ion}`. -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 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 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": 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 -// details. -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. -func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbrouteextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbRouteExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbTcpExtensionsCreateCall struct { - s *Service - parent string - lbtcpextension *LbTcpExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `LbTcpExtension` resource in a given project and -// location. -// -// - parent: The parent resource of the `LbTcpExtension` resource. Must be in -// the format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbTcpExtensionsService) Create(parent string, lbtcpextension *LbTcpExtension) *ProjectsLocationsLbTcpExtensionsCreateCall { - c := &ProjectsLocationsLbTcpExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.lbtcpextension = lbtcpextension - return c -} - -// LbTcpExtensionId sets the optional parameter "lbTcpExtensionId": Required. -// User-provided ID of the `LbTcpExtension` resource to be created. -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) LbTcpExtensionId(lbTcpExtensionId string) *ProjectsLocationsLbTcpExtensionsCreateCall { - c.urlParams_.Set("lbTcpExtensionId", lbTcpExtensionId) - 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 *ProjectsLocationsLbTcpExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTcpExtensionsCreateCall { - 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 -// details. -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTcpExtensionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTcpExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtcpextension) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTcpExtensions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTcpExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbTcpExtensionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbTcpExtensionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `LbTcpExtension` resource. -// -// - name: The name of the `LbTcpExtension` resource to delete. Must be in the -// format -// `projects/{project}/locations/{location}/LbTcpExtensions/{lb_tcp_extension} -// `. -func (r *ProjectsLocationsLbTcpExtensionsService) Delete(name string) *ProjectsLocationsLbTcpExtensionsDeleteCall { - c := &ProjectsLocationsLbTcpExtensionsDeleteCall{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 *ProjectsLocationsLbTcpExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTcpExtensionsDeleteCall { - 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 -// details. -func (c *ProjectsLocationsLbTcpExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTcpExtensionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbTcpExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTcpExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbTcpExtensionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbTcpExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTcpExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbTcpExtensionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbTcpExtensionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `LbTcpExtension` resource. -// -// - name: A name of the `LbTcpExtension` resource to get. Must be in the -// format -// `projects/{project}/locations/{location}/LbTcpExtensions/{lb_tcp_extension} -// `. -func (r *ProjectsLocationsLbTcpExtensionsService) Get(name string) *ProjectsLocationsLbTcpExtensionsGetCall { - c := &ProjectsLocationsLbTcpExtensionsGetCall{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 -// details. -func (c *ProjectsLocationsLbTcpExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTcpExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbTcpExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTcpExtensionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbTcpExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTcpExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbTcpExtensionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbTcpExtensionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTcpExtensions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LbTcpExtension.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 *ProjectsLocationsLbTcpExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTcpExtension, 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 := &LbTcpExtension{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsLbTcpExtensionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `LbTcpExtension` resources in a given project and location. -// -// - parent: The project and location from which the `LbTcpExtension` resources -// are listed, specified in the following format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsLbTcpExtensionsService) List(parent string) *ProjectsLocationsLbTcpExtensionsListCall { - c := &ProjectsLocationsLbTcpExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsLbTcpExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTcpExtensionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order the -// results. -func (c *ProjectsLocationsLbTcpExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTcpExtensionsListCall { - 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 *ProjectsLocationsLbTcpExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTcpExtensionsListCall { - 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 *ProjectsLocationsLbTcpExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTcpExtensionsListCall { - 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 -// details. -func (c *ProjectsLocationsLbTcpExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTcpExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsLbTcpExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTcpExtensionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbTcpExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTcpExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbTcpExtensionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbTcpExtensionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTcpExtensions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTcpExtensions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListLbTcpExtensionsResponse.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 *ProjectsLocationsLbTcpExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTcpExtensionsResponse, 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 := &ListLbTcpExtensionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsLbTcpExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTcpExtensionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsLbTcpExtensionsPatchCall struct { - s *Service - name string - lbtcpextension *LbTcpExtension - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `LbTcpExtension` resource. -// -// - name: Identifier. Name of the `LbTcpExtension` resource in the following -// format: -// `projects/{project}/locations/{location}/LbTcpExtension/{lb_tcp_extension}`. -func (r *ProjectsLocationsLbTcpExtensionsService) Patch(name string, lbtcpextension *LbTcpExtension) *ProjectsLocationsLbTcpExtensionsPatchCall { - c := &ProjectsLocationsLbTcpExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.lbtcpextension = lbtcpextension - 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 *ProjectsLocationsLbTcpExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTcpExtensionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Used to specify the -// fields to be overwritten in the `LbTcpExtension` 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 *ProjectsLocationsLbTcpExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTcpExtensionsPatchCall { - 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 -// details. -func (c *ProjectsLocationsLbTcpExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTcpExtensionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLbTcpExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTcpExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsLbTcpExtensionsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsLbTcpExtensionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtcpextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTcpExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsLbTcpExtensionsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTcpExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtrafficextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_traffic_ex -// tension}`. -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 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 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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_traffic_ex -// tension}`. -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 -// details. -func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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. These values are 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 about 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 -// details. -func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -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: Identifier. Name of the `LbTrafficExtension` resource in the -// following format: -// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex -// tension}`. -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 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 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": 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 -// details. -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. -func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.lbtrafficextension) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.lbTrafficExtensions.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesCreateCall struct { - s *Service - parent string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Mesh in a given project and location. -// -// - parent: The parent resource of the Mesh. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall { - c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.mesh = mesh - return c -} - -// MeshId sets the optional parameter "meshId": Required. Short name of the -// Mesh resource to be created. -func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("meshId", meshId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.mesh) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single Mesh. -// -// - name: A name of the Mesh to delete. Must be in the format -// `projects/*/locations/*/meshes/*`. -func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall { - c := &ProjectsLocationsMeshesDeleteCall{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 -// details. -func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single Mesh. -// -// - name: A name of the Mesh to get. Must be in the format -// `projects/*/locations/*/meshes/*`. -func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall { - c := &ProjectsLocationsMeshesGetCall{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 -// details. -func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Mesh.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 *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, 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 := &Mesh{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Meshes in a given project and location. -// -// - parent: The project and location from which the Meshes should be listed, -// specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall { - c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Meshes to -// return per call. -func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListMeshesResponse` Indicates that this is a continuation of a prior -// `ListMeshes` call, and that the system should return the next page of data. -func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsMeshesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListMeshesResponse.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 *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, 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 := &ListMeshesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsMeshesPatchCall struct { - s *Service - name string - mesh *Mesh - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Mesh. -// -// - name: Identifier. Name of the Mesh resource. It matches pattern -// `projects/*/locations/*/meshes/`. -func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall { - c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.mesh = mesh - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Mesh 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 *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall { - 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 -// details. -func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.mesh) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMeshesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesRouteViewsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Get a single RouteView of a Mesh. -// -// - name: Name of the MeshRouteView resource. Format: -// projects/{project_number}/locations/{location}/meshes/{mesh}/routeViews/{ro -// ute_view}. -func (r *ProjectsLocationsMeshesRouteViewsService) Get(name string) *ProjectsLocationsMeshesRouteViewsGetCall { - c := &ProjectsLocationsMeshesRouteViewsGetCall{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 -// details. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesRouteViewsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesRouteViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesRouteViewsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesRouteViewsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesRouteViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.routeViews.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MeshRouteView.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 *ProjectsLocationsMeshesRouteViewsGetCall) Do(opts ...googleapi.CallOption) (*MeshRouteView, 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 := &MeshRouteView{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsMeshesRouteViewsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists RouteViews -// -// - parent: The Mesh to which a Route is associated. Format: -// projects/{project_number}/locations/{location}/meshes/{mesh}. -func (r *ProjectsLocationsMeshesRouteViewsService) List(parent string) *ProjectsLocationsMeshesRouteViewsListCall { - c := &ProjectsLocationsMeshesRouteViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// MeshRouteViews to return per call. -func (c *ProjectsLocationsMeshesRouteViewsListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesRouteViewsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListMeshRouteViewsResponse` Indicates that this is a continuation of a -// prior `ListMeshRouteViews` call, and that the system should return the next -// page of data. -func (c *ProjectsLocationsMeshesRouteViewsListCall) PageToken(pageToken string) *ProjectsLocationsMeshesRouteViewsListCall { - 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 -// details. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesRouteViewsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsMeshesRouteViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesRouteViewsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Context(ctx context.Context) *ProjectsLocationsMeshesRouteViewsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMeshesRouteViewsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMeshesRouteViewsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/routeViews") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.meshes.routeViews.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListMeshRouteViewsResponse.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 *ProjectsLocationsMeshesRouteViewsListCall) Do(opts ...googleapi.CallOption) (*ListMeshRouteViewsResponse, 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 := &ListMeshRouteViewsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.meshes.routeViews.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsMeshesRouteViewsListCall) Pages(ctx context.Context, f func(*ListMeshRouteViewsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.cancel" call. -// 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 *ProjectsLocationsOperationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -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. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.delete" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// When set to `true`, operations that are reachable are returned as normal, -// and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and -// will result in an `UNIMPLEMENTED` error if set unless explicitly documented -// otherwise in service or product specific documentation. -func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.operations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsServiceBindingsCreateCall struct { - s *Service - parent string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ServiceBinding in a given project and location. -// -// - parent: The parent resource of the ServiceBinding. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall { - c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.servicebinding = servicebinding - return c -} - -// ServiceBindingId sets the optional parameter "serviceBindingId": Required. -// Short name of the ServiceBinding resource to be created. -func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("serviceBindingId", serviceBindingId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicebinding) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single ServiceBinding. -// -// - name: A name of the ServiceBinding to delete. Must be in the format -// `projects/*/locations/*/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall { - c := &ProjectsLocationsServiceBindingsDeleteCall{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 -// details. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single ServiceBinding. -// -// - name: A name of the ServiceBinding to get. Must be in the format -// `projects/*/locations/*/serviceBindings/*`. -func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall { - c := &ProjectsLocationsServiceBindingsGetCall{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 -// details. -func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceBinding.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 *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, 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 := &ServiceBinding{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceBindingsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ServiceBinding in a given project and location. -// -// - parent: The project and location from which the ServiceBindings should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall { - c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceBindings to return per call. -func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListServiceBindingsResponse` Indicates that this is a continuation of -// a prior `ListRouters` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall { - 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 -// details. -func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceBindingsResponse.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 *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, 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 := &ListServiceBindingsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsServiceBindingsPatchCall struct { - s *Service - name string - servicebinding *ServiceBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ServiceBinding. -// -// - name: Identifier. Name of the ServiceBinding resource. It matches pattern -// `projects/*/locations/*/serviceBindings/`. -func (r *ProjectsLocationsServiceBindingsService) Patch(name string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsPatchCall { - c := &ProjectsLocationsServiceBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.servicebinding = servicebinding - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the ServiceBinding 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 *ProjectsLocationsServiceBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceBindingsPatchCall { - 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 -// details. -func (c *ProjectsLocationsServiceBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceBindingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceBindingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicebinding) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceBindings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceBindingsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceBindings.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesCreateCall struct { - s *Service - parent string - servicelbpolicy *ServiceLbPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ServiceLbPolicy in a given project and location. -// -// - parent: The parent resource of the ServiceLbPolicy. Must be in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall { - c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.servicelbpolicy = servicelbpolicy - return c -} - -// ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": Required. -// Short name of the ServiceLbPolicy resource to be created. E.g. for resource -// name -// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy -// _name}`. the id is value of {service_lb_policy_name} -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicelbpolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single ServiceLbPolicy. -// -// - name: A name of the ServiceLbPolicy to delete. Must be in the format -// `projects/{project}/locations/{location}/serviceLbPolicies/*`. -func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c := &ProjectsLocationsServiceLbPoliciesDeleteCall{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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single ServiceLbPolicy. -// -// - name: A name of the ServiceLbPolicy to get. Must be in the format -// `projects/{project}/locations/{location}/serviceLbPolicies/*`. -func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall { - c := &ProjectsLocationsServiceLbPoliciesGetCall{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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceLbPolicy.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 *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, 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 := &ServiceLbPolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsServiceLbPoliciesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ServiceLbPolicies in a given project and location. -// -// - parent: The project and location from which the ServiceLbPolicies should -// be listed, specified in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall { - c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// ServiceLbPolicies to return per call. -func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListServiceLbPoliciesResponse` Indicates that this is a continuation -// of a prior `ListRouters` call, and that the system should return the next -// page of data. -func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall { - 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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListServiceLbPoliciesResponse.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 *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, 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 := &ListServiceLbPoliciesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsServiceLbPoliciesPatchCall struct { - s *Service - name string - servicelbpolicy *ServiceLbPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ServiceLbPolicy. -// -// - name: Identifier. Name of the ServiceLbPolicy resource. It matches pattern -// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_poli -// cy_name}`. -func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall { - c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.servicelbpolicy = servicelbpolicy - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the ServiceLbPolicy 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 *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall { - 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 -// details. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.servicelbpolicy) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServiceLbPoliciesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.serviceLbPolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesCreateCall struct { - s *Service - parent string - tcproute *TcpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new TcpRoute in a given project and location. -// -// - parent: The parent resource of the TcpRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall { - c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.tcproute = tcproute - return c -} - -// TcpRouteId sets the optional parameter "tcpRouteId": Required. Short name of -// the TcpRoute resource to be created. -func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall { - c.urlParams_.Set("tcpRouteId", tcpRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tcproute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single TcpRoute. -// -// - name: A name of the TcpRoute to delete. Must be in the format -// `projects/*/locations/*/tcpRoutes/*`. -func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall { - c := &ProjectsLocationsTcpRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single TcpRoute. -// -// - name: A name of the TcpRoute to get. Must be in the format -// `projects/*/locations/*/tcpRoutes/*`. -func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall { - c := &ProjectsLocationsTcpRoutesGetCall{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 -// details. -func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TcpRoute.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 *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, 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 := &TcpRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTcpRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists TcpRoute in a given project and location. -// -// - parent: The project and location from which the TcpRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall { - c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of TcpRoutes -// to return per call. -func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListTcpRoutesResponse` Indicates that this is a continuation of a -// prior `ListTcpRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsTcpRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListTcpRoutesResponse.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 *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, 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 := &ListTcpRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsTcpRoutesPatchCall struct { - s *Service - name string - tcproute *TcpRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single TcpRoute. -// -// - name: Identifier. Name of the TcpRoute resource. It matches pattern -// `projects/*/locations/*/tcpRoutes/tcp_route_name>`. -func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall { - c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.tcproute = tcproute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the TcpRoute 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 *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTcpRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTcpRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tcproute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tcpRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTcpRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tcpRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesCreateCall struct { - s *Service - parent string - tlsroute *TlsRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new TlsRoute in a given project and location. -// -// - parent: The parent resource of the TlsRoute. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall { - c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.tlsroute = tlsroute - return c -} - -// TlsRouteId sets the optional parameter "tlsRouteId": Required. Short name of -// the TlsRoute resource to be created. -func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall { - c.urlParams_.Set("tlsRouteId", tlsRouteId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tlsroute) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single TlsRoute. -// -// - name: A name of the TlsRoute to delete. Must be in the format -// `projects/*/locations/*/tlsRoutes/*`. -func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall { - c := &ProjectsLocationsTlsRoutesDeleteCall{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 -// details. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single TlsRoute. -// -// - name: A name of the TlsRoute to get. Must be in the format -// `projects/*/locations/*/tlsRoutes/*`. -func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall { - c := &ProjectsLocationsTlsRoutesGetCall{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 -// details. -func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TlsRoute.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 *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, 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 := &TlsRoute{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTlsRoutesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists TlsRoute in a given project and location. -// -// - parent: The project and location from which the TlsRoutes should be -// listed, specified in the format `projects/*/locations/*`. -func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall { - c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of TlsRoutes -// to return per call. -func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListTlsRoutesResponse` Indicates that this is a continuation of a -// prior `ListTlsRoutes` call, and that the system should return the next page -// of data. -func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": If -// true, allow partial responses for multi-regional Aggregated List requests. -// Otherwise if one of the locations is down or unreachable, the Aggregated -// List request will fail. -func (c *ProjectsLocationsTlsRoutesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListTlsRoutesResponse.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 *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, 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 := &ListTlsRoutesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsTlsRoutesPatchCall struct { - s *Service - name string - tlsroute *TlsRoute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single TlsRoute. -// -// - name: Identifier. Name of the TlsRoute resource. It matches pattern -// `projects/*/locations/*/tlsRoutes/tls_route_name>`. -func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall { - c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.tlsroute = tlsroute - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the TlsRoute 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 *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall { - 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 -// details. -func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTlsRoutesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTlsRoutesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.tlsroute) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.tlsRoutes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsTlsRoutesPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.tlsRoutes.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsCreateCall struct { - s *Service - parent string - wasmplugin *WasmPlugin - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `WasmPlugin` resource in a given project and location. -// -// - parent: The parent resource of the `WasmPlugin` resource. Must be in the -// format `projects/{project}/locations/global`. -func (r *ProjectsLocationsWasmPluginsService) Create(parent string, wasmplugin *WasmPlugin) *ProjectsLocationsWasmPluginsCreateCall { - c := &ProjectsLocationsWasmPluginsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.wasmplugin = wasmplugin - return c -} - -// WasmPluginId sets the optional parameter "wasmPluginId": Required. -// User-provided ID of the `WasmPlugin` resource to be created. -func (c *ProjectsLocationsWasmPluginsCreateCall) WasmPluginId(wasmPluginId string) *ProjectsLocationsWasmPluginsCreateCall { - c.urlParams_.Set("wasmPluginId", wasmPluginId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsCreateCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmplugin) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/wasmPlugins") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `WasmPlugin` resource. -// -// - name: A name of the `WasmPlugin` resource to delete. Must be in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Delete(name string) *ProjectsLocationsWasmPluginsDeleteCall { - c := &ProjectsLocationsWasmPluginsDeleteCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `WasmPlugin` resource. -// -// - name: A name of the `WasmPlugin` resource to get. Must be in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Get(name string) *ProjectsLocationsWasmPluginsGetCall { - c := &ProjectsLocationsWasmPluginsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// View sets the optional parameter "view": Determines how much data must be -// returned in the response. See AIP-157 (https://google.aip.dev/157). -// -// Possible values: -// -// "WASM_PLUGIN_VIEW_UNSPECIFIED" - Unspecified value. Do not use. -// "WASM_PLUGIN_VIEW_BASIC" - If specified in the `GET` request for a -// -// `WasmPlugin` resource, the server's response includes just the `WasmPlugin` -// resource. -// -// "WASM_PLUGIN_VIEW_FULL" - If specified in the `GET` request for a -// -// `WasmPlugin` resource, the server's response includes the `WasmPlugin` -// resource with all its versions. -func (c *ProjectsLocationsWasmPluginsGetCall) View(view string) *ProjectsLocationsWasmPluginsGetCall { - c.urlParams_.Set("view", view) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsGetCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WasmPlugin.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 *ProjectsLocationsWasmPluginsGetCall) Do(opts ...googleapi.CallOption) (*WasmPlugin, 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 := &WasmPlugin{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `WasmPlugin` resources in a given project and location. -// -// - parent: The project and location from which the `WasmPlugin` resources are -// listed, specified in the following format: -// `projects/{project}/locations/global`. -func (r *ProjectsLocationsWasmPluginsService) List(parent string) *ProjectsLocationsWasmPluginsListCall { - c := &ProjectsLocationsWasmPluginsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// `WasmPlugin` resources to return per call. If not specified, at most 50 -// `WasmPlugin` resources are returned. The maximum value is 1000; values above -// 1000 are coerced to 1000. -func (c *ProjectsLocationsWasmPluginsListCall) PageSize(pageSize int64) *ProjectsLocationsWasmPluginsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListWasmPluginsResponse` call. Indicates that this is a continuation -// of a prior `ListWasmPlugins` call, and that the next page of data is to be -// returned. -func (c *ProjectsLocationsWasmPluginsListCall) PageToken(pageToken string) *ProjectsLocationsWasmPluginsListCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsListCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/wasmPlugins") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWasmPluginsResponse.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 *ProjectsLocationsWasmPluginsListCall) Do(opts ...googleapi.CallOption) (*ListWasmPluginsResponse, 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 := &ListWasmPluginsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsWasmPluginsListCall) Pages(ctx context.Context, f func(*ListWasmPluginsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsWasmPluginsPatchCall struct { - s *Service - name string - wasmplugin *WasmPlugin - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of the specified `WasmPlugin` resource. -// -// - name: Identifier. Name of the `WasmPlugin` resource in the following -// format: -// `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsService) Patch(name string, wasmplugin *WasmPlugin) *ProjectsLocationsWasmPluginsPatchCall { - c := &ProjectsLocationsWasmPluginsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.wasmplugin = wasmplugin - return c -} - -// UpdateMask sets the optional parameter "updateMask": Used to specify the -// fields to be overwritten in the `WasmPlugin` resource by the update. The -// fields specified in the `update_mask` field are relative to the resource, -// not the full request. An omitted `update_mask` field is treated as an -// implied `update_mask` field equivalent to all fields that are populated -// (that have a non-empty value). The `update_mask` field supports a special -// value `*`, which means that each field in the given `WasmPlugin` resource -// (including the empty ones) replaces the current value. -func (c *ProjectsLocationsWasmPluginsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWasmPluginsPatchCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsPatchCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmplugin) - if err != nil { - return nil, err - } - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsPatchCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsCreateCall struct { - s *Service - parent string - wasmpluginversion *WasmPluginVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new `WasmPluginVersion` resource in a given project and -// location. -// -// - parent: The parent resource of the `WasmPluginVersion` resource. Must be -// in the format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Create(parent string, wasmpluginversion *WasmPluginVersion) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c := &ProjectsLocationsWasmPluginsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.wasmpluginversion = wasmpluginversion - return c -} - -// WasmPluginVersionId sets the optional parameter "wasmPluginVersionId": -// Required. User-provided ID of the `WasmPluginVersion` resource to be -// created. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) WasmPluginVersionId(wasmPluginVersionId string) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.urlParams_.Set("wasmPluginVersionId", wasmPluginVersionId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.wasmpluginversion) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsVersionsCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified `WasmPluginVersion` resource. -// -// - name: A name of the `WasmPluginVersion` resource to delete. Must be in the -// format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wa -// sm_plugin_version}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Delete(name string) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c := &ProjectsLocationsWasmPluginsVersionsDeleteCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsWasmPluginsVersionsDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of the specified `WasmPluginVersion` resource. -// -// - name: A name of the `WasmPluginVersion` resource to get. Must be in the -// format -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wa -// sm_plugin_version}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) Get(name string) *ProjectsLocationsWasmPluginsVersionsGetCall { - c := &ProjectsLocationsWasmPluginsVersionsGetCall{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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *WasmPluginVersion.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 *ProjectsLocationsWasmPluginsVersionsGetCall) Do(opts ...googleapi.CallOption) (*WasmPluginVersion, 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 := &WasmPluginVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsWasmPluginsVersionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `WasmPluginVersion` resources in a given project and location. -// -// - parent: The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, -// specified in the following format: -// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. -func (r *ProjectsLocationsWasmPluginsVersionsService) List(parent string) *ProjectsLocationsWasmPluginsVersionsListCall { - c := &ProjectsLocationsWasmPluginsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// `WasmPluginVersion` resources to return per call. If not specified, at most -// 50 `WasmPluginVersion` resources are returned. The maximum value is 1000; -// values above 1000 are coerced to 1000. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsWasmPluginsVersionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The value returned by the -// last `ListWasmPluginVersionsResponse` call. Indicates that this is a -// continuation of a prior `ListWasmPluginVersions` call, and that the next -// page of data is to be returned. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) PageToken(pageToken string) *ProjectsLocationsWasmPluginsVersionsListCall { - 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 -// details. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWasmPluginsVersionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWasmPluginsVersionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Context(ctx context.Context) *ProjectsLocationsWasmPluginsVersionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsWasmPluginsVersionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsWasmPluginsVersionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/versions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "networkservices.projects.locations.wasmPlugins.versions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListWasmPluginVersionsResponse.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 *ProjectsLocationsWasmPluginsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListWasmPluginVersionsResponse, 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 := &ListWasmPluginVersionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "networkservices.projects.locations.wasmPlugins.versions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsWasmPluginsVersionsListCall) Pages(ctx context.Context, f func(*ListWasmPluginVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} diff --git a/vendor/google.golang.org/api/tpu/v1/tpu-api.json b/vendor/google.golang.org/api/tpu/v1/tpu-api.json deleted file mode 100644 index 207a520072296..0000000000000 --- a/vendor/google.golang.org/api/tpu/v1/tpu-api.json +++ /dev/null @@ -1,1231 +0,0 @@ -{ - "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://tpu.googleapis.com/", - "batchPath": "batch", - "canonicalName": "TPU", - "description": "TPU API provides customers with access to Google TPU technology.", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/tpu/", - "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": "tpu:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://tpu.mtls.googleapis.com/", - "name": "tpu", - "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": "tpu.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": "tpu.projects.locations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "extraLocationTypes": { - "description": "Optional. Unless explicitly documented otherwise, don't use this unsupported field which is primarily intended for internal usage.", - "location": "query", - "repeated": true, - "type": "string" - }, - "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": { - "acceleratorTypes": { - "methods": { - "get": { - "description": "Gets AcceleratorType.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", - "httpMethod": "GET", - "id": "tpu.projects.locations.acceleratorTypes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "AcceleratorType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists accelerator types supported by this API.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", - "httpMethod": "GET", - "id": "tpu.projects.locations.acceleratorTypes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "List filter.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Sort results.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The maximum number of items to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The next_page_token value returned from a previous List request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/acceleratorTypes", - "response": { - "$ref": "ListAcceleratorTypesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "nodes": { - "methods": { - "create": { - "description": "Creates a node.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes", - "httpMethod": "POST", - "id": "tpu.projects.locations.nodes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "nodeId": { - "description": "The unqualified resource name.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/nodes", - "request": { - "$ref": "Node" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a node.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", - "httpMethod": "DELETE", - "id": "tpu.projects.locations.nodes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the details of a node.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", - "httpMethod": "GET", - "id": "tpu.projects.locations.nodes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Node" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists nodes.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes", - "httpMethod": "GET", - "id": "tpu.projects.locations.nodes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of items to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The next_page_token value returned from a previous List request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/nodes", - "response": { - "$ref": "ListNodesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "reimage": { - "description": "Reimages a node's OS.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:reimage", - "httpMethod": "POST", - "id": "tpu.projects.locations.nodes.reimage", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:reimage", - "request": { - "$ref": "ReimageNodeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "start": { - "description": "Starts a node.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", - "httpMethod": "POST", - "id": "tpu.projects.locations.nodes.start", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:start", - "request": { - "$ref": "StartNodeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "stop": { - "description": "Stops a node, this operation is only available with single TPU nodes.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", - "httpMethod": "POST", - "id": "tpu.projects.locations.nodes.stop", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:stop", - "request": { - "$ref": "StopNodeRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "tpu.projects.locations.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "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": "tpu.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": "tpu.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": "tpu.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" - }, - "returnPartialSuccess": { - "description": "When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the [ListOperationsResponse.unreachable] field. This can only be `true` when reading across collections e.g. when `parent` is set to `\"projects/example/locations/-\"`. This field is not by default supported and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, - "tensorflowVersions": { - "methods": { - "get": { - "description": "Gets TensorFlow Version.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions/{tensorflowVersionsId}", - "httpMethod": "GET", - "id": "tpu.projects.locations.tensorflowVersions.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tensorflowVersions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "TensorFlowVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "List TensorFlow versions supported by this API.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions", - "httpMethod": "GET", - "id": "tpu.projects.locations.tensorflowVersions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "List filter.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Sort results.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "The maximum number of items to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The next_page_token value returned from a previous List request, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent resource name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/tensorflowVersions", - "response": { - "$ref": "ListTensorFlowVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - }, - "revision": "20251005", - "rootUrl": "https://tpu.googleapis.com/", - "schemas": { - "AcceleratorType": { - "description": "A accelerator type that a Node can be configured with.", - "id": "AcceleratorType", - "properties": { - "name": { - "description": "The resource name.", - "type": "string" - }, - "type": { - "description": "the accelerator type.", - "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" - }, - "ListAcceleratorTypesResponse": { - "description": "Response for ListAcceleratorTypes.", - "id": "ListAcceleratorTypesResponse", - "properties": { - "acceleratorTypes": { - "description": "The listed nodes.", - "items": { - "$ref": "AcceleratorType" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The next page token or empty if none.", - "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", - "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" - }, - "ListNodesResponse": { - "description": "Response for ListNodes.", - "id": "ListNodesResponse", - "properties": { - "nextPageToken": { - "description": "The next page token or empty if none.", - "type": "string" - }, - "nodes": { - "description": "The listed nodes.", - "items": { - "$ref": "Node" - }, - "type": "array" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "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" - }, - "unreachable": { - "description": "Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections e.g. when attempting to list all resources across all supported locations.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListTensorFlowVersionsResponse": { - "description": "Response for ListTensorFlowVersions.", - "id": "ListTensorFlowVersionsResponse", - "properties": { - "nextPageToken": { - "description": "The next page token or empty if none.", - "type": "string" - }, - "tensorflowVersions": { - "description": "The listed nodes.", - "items": { - "$ref": "TensorFlowVersion" - }, - "type": "array" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "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" - }, - "NetworkEndpoint": { - "description": "A network endpoint over which a TPU worker can be reached.", - "id": "NetworkEndpoint", - "properties": { - "ipAddress": { - "description": "The IP address of this network endpoint.", - "type": "string" - }, - "port": { - "description": "The port of this network endpoint.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "Node": { - "description": "A TPU instance.", - "id": "Node", - "properties": { - "acceleratorType": { - "description": "Required. The type of hardware accelerators associated with this node.", - "type": "string" - }, - "apiVersion": { - "description": "Output only. The API version that created this Node.", - "enum": [ - "API_VERSION_UNSPECIFIED", - "V1_ALPHA1", - "V1", - "V2_ALPHA1" - ], - "enumDescriptions": [ - "API version is unknown.", - "TPU API V1Alpha1 version.", - "TPU API V1 version.", - "TPU API V2Alpha1 version." - ], - "readOnly": true, - "type": "string" - }, - "cidrBlock": { - "description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", - "type": "string" - }, - "createTime": { - "description": "Output only. The time when the node was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "The user-supplied description of the TPU. Maximum of 512 characters.", - "type": "string" - }, - "health": { - "description": "The health status of the TPU node.", - "enum": [ - "HEALTH_UNSPECIFIED", - "HEALTHY", - "DEPRECATED_UNHEALTHY", - "TIMEOUT", - "UNHEALTHY_TENSORFLOW", - "UNHEALTHY_MAINTENANCE" - ], - "enumDescriptions": [ - "Health status is unknown: not initialized or failed to retrieve.", - "The resource is healthy.", - "The resource is unhealthy.", - "The resource is unresponsive.", - "The in-guest ML stack is unhealthy.", - "The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." - ], - "type": "string" - }, - "healthDescription": { - "description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", - "readOnly": true, - "type": "string" - }, - "ipAddress": { - "deprecated": true, - "description": "Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource labels to represent user-provided metadata.", - "type": "object" - }, - "name": { - "description": "Output only. Immutable. The name of the TPU", - "readOnly": true, - "type": "string" - }, - "network": { - "description": "The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, \"default\" will be used.", - "type": "string" - }, - "networkEndpoints": { - "description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first.", - "items": { - "$ref": "NetworkEndpoint" - }, - "readOnly": true, - "type": "array" - }, - "port": { - "deprecated": true, - "description": "Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances.", - "type": "string" - }, - "schedulingConfig": { - "$ref": "SchedulingConfig", - "description": "The scheduling options for this node." - }, - "serviceAccount": { - "description": "Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. The current state for the TPU Node.", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "READY", - "RESTARTING", - "REIMAGING", - "DELETING", - "REPAIRING", - "STOPPED", - "STOPPING", - "STARTING", - "PREEMPTED", - "TERMINATED", - "HIDING", - "HIDDEN", - "UNHIDING", - "UNKNOWN" - ], - "enumDescriptions": [ - "TPU node state is not known/set.", - "TPU node is being created.", - "TPU node has been created.", - "TPU node is restarting.", - "TPU node is undergoing reimaging.", - "TPU node is being deleted.", - "TPU node is being repaired and may be unusable. Details can be found in the `help_description` field.", - "TPU node is stopped.", - "TPU node is currently stopping.", - "TPU node is currently starting.", - "TPU node has been preempted. Only applies to Preemptible TPU Nodes.", - "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", - "TPU node is currently hiding.", - "TPU node has been hidden.", - "TPU node is currently unhiding.", - "TPU node has unknown state after a failed repair." - ], - "readOnly": true, - "type": "string" - }, - "symptoms": { - "description": "Output only. The Symptoms that have occurred to the TPU Node.", - "items": { - "$ref": "Symptom" - }, - "readOnly": true, - "type": "array" - }, - "tensorflowVersion": { - "description": "Required. The version of Tensorflow running in the Node.", - "type": "string" - }, - "useServiceNetworking": { - "description": "Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.", - "type": "boolean" - } - }, - "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": "Metadata describing an Operation", - "id": "OperationMetadata", - "properties": { - "apiVersion": { - "description": "API version.", - "type": "string" - }, - "cancelRequested": { - "description": "Specifies if cancellation was requested for the operation.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "ReimageNodeRequest": { - "description": "Request for ReimageNode.", - "id": "ReimageNodeRequest", - "properties": { - "tensorflowVersion": { - "description": "The version for reimage to create.", - "type": "string" - } - }, - "type": "object" - }, - "SchedulingConfig": { - "description": "Sets the scheduling options for this node.", - "id": "SchedulingConfig", - "properties": { - "preemptible": { - "description": "Defines whether the node is preemptible.", - "type": "boolean" - }, - "reserved": { - "description": "Whether the node is created under a reservation.", - "type": "boolean" - } - }, - "type": "object" - }, - "StartNodeRequest": { - "description": "Request for StartNode.", - "id": "StartNodeRequest", - "properties": {}, - "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" - }, - "StopNodeRequest": { - "description": "Request for StopNode.", - "id": "StopNodeRequest", - "properties": {}, - "type": "object" - }, - "Symptom": { - "description": "A Symptom instance.", - "id": "Symptom", - "properties": { - "createTime": { - "description": "Timestamp when the Symptom is created.", - "format": "google-datetime", - "type": "string" - }, - "details": { - "description": "Detailed information of the current Symptom.", - "type": "string" - }, - "symptomType": { - "description": "Type of the Symptom.", - "enum": [ - "SYMPTOM_TYPE_UNSPECIFIED", - "LOW_MEMORY", - "OUT_OF_MEMORY", - "EXECUTE_TIMED_OUT", - "MESH_BUILD_FAIL", - "HBM_OUT_OF_MEMORY", - "PROJECT_ABUSE" - ], - "enumDescriptions": [ - "Unspecified symptom.", - "TPU VM memory is low.", - "TPU runtime is out of memory.", - "TPU runtime execution has timed out.", - "TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", - "TPU HBM is out of memory.", - "Abusive behaviors have been identified on the current project." - ], - "type": "string" - }, - "workerId": { - "description": "A string used to uniquely distinguish a worker within a TPU node.", - "type": "string" - } - }, - "type": "object" - }, - "TensorFlowVersion": { - "description": "A tensorflow version that a Node can be configured with.", - "id": "TensorFlowVersion", - "properties": { - "name": { - "description": "The resource name.", - "type": "string" - }, - "version": { - "description": "the tensorflow version.", - "type": "string" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Cloud TPU API", - "version": "v1", - "version_module": true -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/tpu/v1/tpu-gen.go b/vendor/google.golang.org/api/tpu/v1/tpu-gen.go deleted file mode 100644 index c472abb6f107e..0000000000000 --- a/vendor/google.golang.org/api/tpu/v1/tpu-gen.go +++ /dev/null @@ -1,2883 +0,0 @@ -// Copyright 2025 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 tpu provides access to the Cloud TPU API. -// -// For product documentation, see: https://cloud.google.com/tpu/ -// -// # 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/tpu/v1" -// ... -// ctx := context.Background() -// tpuService, err := tpu.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]: -// -// tpuService, err := tpu.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, ...) -// tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package tpu // import "google.golang.org/api/tpu/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - 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 -var _ = internallog.New - -const apiId = "tpu:v1" -const apiName = "tpu" -const apiVersion = "v1" -const basePath = "https://tpu.googleapis.com/" -const basePathTemplate = "https://tpu.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://tpu.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.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Projects = NewProjectsService(s) - 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") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - 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.AcceleratorTypes = NewProjectsLocationsAcceleratorTypesService(s) - rs.Nodes = NewProjectsLocationsNodesService(s) - rs.Operations = NewProjectsLocationsOperationsService(s) - rs.TensorflowVersions = NewProjectsLocationsTensorflowVersionsService(s) - return rs -} - -type ProjectsLocationsService struct { - s *Service - - AcceleratorTypes *ProjectsLocationsAcceleratorTypesService - - Nodes *ProjectsLocationsNodesService - - Operations *ProjectsLocationsOperationsService - - TensorflowVersions *ProjectsLocationsTensorflowVersionsService -} - -func NewProjectsLocationsAcceleratorTypesService(s *Service) *ProjectsLocationsAcceleratorTypesService { - rs := &ProjectsLocationsAcceleratorTypesService{s: s} - return rs -} - -type ProjectsLocationsAcceleratorTypesService struct { - s *Service -} - -func NewProjectsLocationsNodesService(s *Service) *ProjectsLocationsNodesService { - rs := &ProjectsLocationsNodesService{s: s} - return rs -} - -type ProjectsLocationsNodesService struct { - s *Service -} - -func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { - rs := &ProjectsLocationsOperationsService{s: s} - return rs -} - -type ProjectsLocationsOperationsService struct { - s *Service -} - -func NewProjectsLocationsTensorflowVersionsService(s *Service) *ProjectsLocationsTensorflowVersionsService { - rs := &ProjectsLocationsTensorflowVersionsService{s: s} - return rs -} - -type ProjectsLocationsTensorflowVersionsService struct { - s *Service -} - -// AcceleratorType: A accelerator type that a Node can be configured with. -type AcceleratorType struct { - // Name: The resource name. - Name string `json:"name,omitempty"` - // Type: the accelerator type. - 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. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AcceleratorType) MarshalJSON() ([]byte, error) { - type NoMethod AcceleratorType - return gensupport.MarshalJSON(NoMethod(s), 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:"-"` -} - -// ListAcceleratorTypesResponse: Response for ListAcceleratorTypes. -type ListAcceleratorTypesResponse struct { - // AcceleratorTypes: The listed nodes. - AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` - // NextPageToken: The next page token or empty if none. - 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. "AcceleratorTypes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorTypes") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListAcceleratorTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAcceleratorTypesResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListNodesResponse: Response for ListNodes. -type ListNodesResponse struct { - // NextPageToken: The next page token or empty if none. - NextPageToken string `json:"nextPageToken,omitempty"` - // Nodes: The listed nodes. - Nodes []*Node `json:"nodes,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. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListNodesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNodesResponse - return gensupport.MarshalJSON(NoMethod(s), 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"` - // Unreachable: Unordered list. Unreachable resources. Populated when the - // request sets `ListOperationsRequest.return_partial_success` and reads across - // collections e.g. when attempting to list all resources across all supported - // locations. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListTensorFlowVersionsResponse: Response for ListTensorFlowVersions. -type ListTensorFlowVersionsResponse struct { - // NextPageToken: The next page token or empty if none. - NextPageToken string `json:"nextPageToken,omitempty"` - // TensorflowVersions: The listed nodes. - TensorflowVersions []*TensorFlowVersion `json:"tensorflowVersions,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. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListTensorFlowVersionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListTensorFlowVersionsResponse - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Location) MarshalJSON() ([]byte, error) { - type NoMethod Location - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// NetworkEndpoint: A network endpoint over which a TPU worker can be reached. -type NetworkEndpoint struct { - // IpAddress: The IP address of this network endpoint. - IpAddress string `json:"ipAddress,omitempty"` - // Port: The port of this network endpoint. - Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s NetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod NetworkEndpoint - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Node: A TPU instance. -type Node struct { - // AcceleratorType: Required. The type of hardware accelerators associated with - // this node. - AcceleratorType string `json:"acceleratorType,omitempty"` - // ApiVersion: Output only. The API version that created this Node. - // - // Possible values: - // "API_VERSION_UNSPECIFIED" - API version is unknown. - // "V1_ALPHA1" - TPU API V1Alpha1 version. - // "V1" - TPU API V1 version. - // "V2_ALPHA1" - TPU API V2Alpha1 version. - ApiVersion string `json:"apiVersion,omitempty"` - // CidrBlock: The CIDR block that the TPU node will use when selecting an IP - // address. This CIDR block must be a /29 block; the Compute Engine networks - // API forbids a smaller block, and using a larger block would be wasteful (a - // node can only consume one IP address). Errors will occur if the CIDR block - // has already been used for a currently existing TPU node, the CIDR block - // conflicts with any subnetworks in the user's provided network, or the - // provided network is peered with another network that is using that CIDR - // block. - CidrBlock string `json:"cidrBlock,omitempty"` - // CreateTime: Output only. The time when the node was created. - CreateTime string `json:"createTime,omitempty"` - // Description: The user-supplied description of the TPU. Maximum of 512 - // characters. - Description string `json:"description,omitempty"` - // Health: The health status of the TPU node. - // - // Possible values: - // "HEALTH_UNSPECIFIED" - Health status is unknown: not initialized or failed - // to retrieve. - // "HEALTHY" - The resource is healthy. - // "DEPRECATED_UNHEALTHY" - The resource is unhealthy. - // "TIMEOUT" - The resource is unresponsive. - // "UNHEALTHY_TENSORFLOW" - The in-guest ML stack is unhealthy. - // "UNHEALTHY_MAINTENANCE" - The node is under maintenance/priority boost - // caused rescheduling and will resume running once rescheduled. - Health string `json:"health,omitempty"` - // HealthDescription: Output only. If this field is populated, it contains a - // description of why the TPU Node is unhealthy. - HealthDescription string `json:"healthDescription,omitempty"` - // IpAddress: Output only. DEPRECATED! Use network_endpoints instead. The - // network address for the TPU Node as visible to Compute Engine instances. - IpAddress string `json:"ipAddress,omitempty"` - // Labels: Resource labels to represent user-provided metadata. - Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Immutable. The name of the TPU - Name string `json:"name,omitempty"` - // Network: The name of a network they wish to peer the TPU node to. It must be - // a preexisting Compute Engine network inside of the project on which this API - // has been activated. If none is provided, "default" will be used. - Network string `json:"network,omitempty"` - // NetworkEndpoints: Output only. The network endpoints where TPU workers can - // be accessed and sent work. It is recommended that Tensorflow clients of the - // node reach out to the 0th entry in this map first. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // Port: Output only. DEPRECATED! Use network_endpoints instead. The network - // port for the TPU Node as visible to Compute Engine instances. - Port string `json:"port,omitempty"` - // SchedulingConfig: The scheduling options for this node. - SchedulingConfig *SchedulingConfig `json:"schedulingConfig,omitempty"` - // ServiceAccount: Output only. The service account used to run the tensor flow - // services within the node. To share resources, including Google Cloud Storage - // data, with the Tensorflow job running in the Node, this account must have - // permissions to that data. - ServiceAccount string `json:"serviceAccount,omitempty"` - // State: Output only. The current state for the TPU Node. - // - // Possible values: - // "STATE_UNSPECIFIED" - TPU node state is not known/set. - // "CREATING" - TPU node is being created. - // "READY" - TPU node has been created. - // "RESTARTING" - TPU node is restarting. - // "REIMAGING" - TPU node is undergoing reimaging. - // "DELETING" - TPU node is being deleted. - // "REPAIRING" - TPU node is being repaired and may be unusable. Details can - // be found in the `help_description` field. - // "STOPPED" - TPU node is stopped. - // "STOPPING" - TPU node is currently stopping. - // "STARTING" - TPU node is currently starting. - // "PREEMPTED" - TPU node has been preempted. Only applies to Preemptible TPU - // Nodes. - // "TERMINATED" - TPU node has been terminated due to maintenance or has - // reached the end of its life cycle (for preemptible nodes). - // "HIDING" - TPU node is currently hiding. - // "HIDDEN" - TPU node has been hidden. - // "UNHIDING" - TPU node is currently unhiding. - // "UNKNOWN" - TPU node has unknown state after a failed repair. - State string `json:"state,omitempty"` - // Symptoms: Output only. The Symptoms that have occurred to the TPU Node. - Symptoms []*Symptom `json:"symptoms,omitempty"` - // TensorflowVersion: Required. The version of Tensorflow running in the Node. - TensorflowVersion string `json:"tensorflowVersion,omitempty"` - // UseServiceNetworking: Whether the VPC peering for the node is set up through - // Service Networking API. The VPC Peering should be set up before provisioning - // the node. If this field is set, cidr_block field should not be specified. If - // the network, that you want to peer the TPU Node to, is Shared VPC networks, - // the node must be created with this this field enabled. - UseServiceNetworking bool `json:"useServiceNetworking,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AcceleratorType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceleratorType") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Node) MarshalJSON() ([]byte, error) { - type NoMethod Node - return gensupport.MarshalJSON(NoMethod(s), 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OperationMetadata: Metadata describing an Operation -type OperationMetadata struct { - // ApiVersion: API version. - ApiVersion string `json:"apiVersion,omitempty"` - // CancelRequested: Specifies if cancellation was requested for the operation. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Target of the operation - for example - // projects/project-1/connectivityTests/test-1 - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReimageNodeRequest: Request for ReimageNode. -type ReimageNodeRequest struct { - // TensorflowVersion: The version for reimage to create. - TensorflowVersion string `json:"tensorflowVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "TensorflowVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TensorflowVersion") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ReimageNodeRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReimageNodeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SchedulingConfig: Sets the scheduling options for this node. -type SchedulingConfig struct { - // Preemptible: Defines whether the node is preemptible. - Preemptible bool `json:"preemptible,omitempty"` - // Reserved: Whether the node is created under a reservation. - Reserved bool `json:"reserved,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preemptible") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preemptible") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SchedulingConfig) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StartNodeRequest: Request for StartNode. -type StartNodeRequest struct { -} - -// 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// StopNodeRequest: Request for StopNode. -type StopNodeRequest struct { -} - -// Symptom: A Symptom instance. -type Symptom struct { - // CreateTime: Timestamp when the Symptom is created. - CreateTime string `json:"createTime,omitempty"` - // Details: Detailed information of the current Symptom. - Details string `json:"details,omitempty"` - // SymptomType: Type of the Symptom. - // - // Possible values: - // "SYMPTOM_TYPE_UNSPECIFIED" - Unspecified symptom. - // "LOW_MEMORY" - TPU VM memory is low. - // "OUT_OF_MEMORY" - TPU runtime is out of memory. - // "EXECUTE_TIMED_OUT" - TPU runtime execution has timed out. - // "MESH_BUILD_FAIL" - TPU runtime fails to construct a mesh that recognizes - // each TPU device's neighbors. - // "HBM_OUT_OF_MEMORY" - TPU HBM is out of memory. - // "PROJECT_ABUSE" - Abusive behaviors have been identified on the current - // project. - SymptomType string `json:"symptomType,omitempty"` - // WorkerId: A string used to uniquely distinguish a worker within a TPU node. - WorkerId string `json:"workerId,omitempty"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Symptom) MarshalJSON() ([]byte, error) { - type NoMethod Symptom - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TensorFlowVersion: A tensorflow version that a Node can be configured with. -type TensorFlowVersion struct { - // Name: The resource name. - Name string `json:"name,omitempty"` - // Version: the tensorflow version. - Version string `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. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TensorFlowVersion) MarshalJSON() ([]byte, error) { - type NoMethod TensorFlowVersion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -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 -// details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.get" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ExtraLocationTypes sets the optional parameter "extraLocationTypes": Unless -// explicitly documented otherwise, don't use this unsupported field which is -// primarily intended for internal usage. -func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall { - c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...)) - 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 -// details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsAcceleratorTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets AcceleratorType. -// -// - name: The resource name. -func (r *ProjectsLocationsAcceleratorTypesService) Get(name string) *ProjectsLocationsAcceleratorTypesGetCall { - c := &ProjectsLocationsAcceleratorTypesGetCall{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 -// details. -func (c *ProjectsLocationsAcceleratorTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAcceleratorTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAcceleratorTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAcceleratorTypesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.acceleratorTypes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.acceleratorTypes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AcceleratorType.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 *ProjectsLocationsAcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, 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 := &AcceleratorType{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.acceleratorTypes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsAcceleratorTypesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists accelerator types supported by this API. -// -// - parent: The parent resource name. -func (r *ProjectsLocationsAcceleratorTypesService) List(parent string) *ProjectsLocationsAcceleratorTypesListCall { - c := &ProjectsLocationsAcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": List filter. -func (c *ProjectsLocationsAcceleratorTypesListCall) Filter(filter string) *ProjectsLocationsAcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sort results. -func (c *ProjectsLocationsAcceleratorTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of items -// to return. -func (c *ProjectsLocationsAcceleratorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAcceleratorTypesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous List request, if any. -func (c *ProjectsLocationsAcceleratorTypesListCall) PageToken(pageToken string) *ProjectsLocationsAcceleratorTypesListCall { - 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 -// details. -func (c *ProjectsLocationsAcceleratorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsAcceleratorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAcceleratorTypesListCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsAcceleratorTypesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/acceleratorTypes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.acceleratorTypes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.acceleratorTypes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAcceleratorTypesResponse.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 *ProjectsLocationsAcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*ListAcceleratorTypesResponse, 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 := &ListAcceleratorTypesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.acceleratorTypes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsAcceleratorTypesListCall) Pages(ctx context.Context, f func(*ListAcceleratorTypesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsNodesCreateCall struct { - s *Service - parent string - node *Node - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a node. -// -// - parent: The parent resource name. -func (r *ProjectsLocationsNodesService) Create(parent string, node *Node) *ProjectsLocationsNodesCreateCall { - c := &ProjectsLocationsNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.node = node - return c -} - -// NodeId sets the optional parameter "nodeId": The unqualified resource name. -func (c *ProjectsLocationsNodesCreateCall) NodeId(nodeId string) *ProjectsLocationsNodesCreateCall { - c.urlParams_.Set("nodeId", nodeId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNodesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesCreateCall) Context(ctx context.Context) *ProjectsLocationsNodesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.node) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodes") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNodesCreateCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsNodesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a node. -// -// - name: The resource name. -func (r *ProjectsLocationsNodesService) Delete(name string) *ProjectsLocationsNodesDeleteCall { - c := &ProjectsLocationsNodesDeleteCall{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 -// details. -func (c *ProjectsLocationsNodesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNodesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNodesDeleteCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsNodesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the details of a node. -// -// - name: The resource name. -func (r *ProjectsLocationsNodesService) Get(name string) *ProjectsLocationsNodesGetCall { - c := &ProjectsLocationsNodesGetCall{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 -// details. -func (c *ProjectsLocationsNodesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNodesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesGetCall) Context(ctx context.Context) *ProjectsLocationsNodesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Node.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 *ProjectsLocationsNodesGetCall) Do(opts ...googleapi.CallOption) (*Node, 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 := &Node{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsNodesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists nodes. -// -// - parent: The parent resource name. -func (r *ProjectsLocationsNodesService) List(parent string) *ProjectsLocationsNodesListCall { - c := &ProjectsLocationsNodesListCall{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. -func (c *ProjectsLocationsNodesListCall) PageSize(pageSize int64) *ProjectsLocationsNodesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous List request, if any. -func (c *ProjectsLocationsNodesListCall) PageToken(pageToken string) *ProjectsLocationsNodesListCall { - 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 -// details. -func (c *ProjectsLocationsNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesListCall) Context(ctx context.Context) *ProjectsLocationsNodesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListNodesResponse.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 *ProjectsLocationsNodesListCall) Do(opts ...googleapi.CallOption) (*ListNodesResponse, 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 := &ListNodesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsNodesListCall) Pages(ctx context.Context, f func(*ListNodesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} - -type ProjectsLocationsNodesReimageCall struct { - s *Service - name string - reimagenoderequest *ReimageNodeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reimage: Reimages a node's OS. -// -// - name: The resource name. -func (r *ProjectsLocationsNodesService) Reimage(name string, reimagenoderequest *ReimageNodeRequest) *ProjectsLocationsNodesReimageCall { - c := &ProjectsLocationsNodesReimageCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.reimagenoderequest = reimagenoderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNodesReimageCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesReimageCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesReimageCall) Context(ctx context.Context) *ProjectsLocationsNodesReimageCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesReimageCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesReimageCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.reimagenoderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reimage") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.reimage", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.reimage" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNodesReimageCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.reimage", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsNodesStartCall struct { - s *Service - name string - startnoderequest *StartNodeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts a node. -// -// - name: The resource name. -func (r *ProjectsLocationsNodesService) Start(name string, startnoderequest *StartNodeRequest) *ProjectsLocationsNodesStartCall { - c := &ProjectsLocationsNodesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.startnoderequest = startnoderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNodesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesStartCall) Context(ctx context.Context) *ProjectsLocationsNodesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.startnoderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.start", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.start" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNodesStartCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.start", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsNodesStopCall struct { - s *Service - name string - stopnoderequest *StopNodeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a node, this operation is only available with single TPU nodes. -// -// - name: The resource name. -func (r *ProjectsLocationsNodesService) Stop(name string, stopnoderequest *StopNodeRequest) *ProjectsLocationsNodesStopCall { - c := &ProjectsLocationsNodesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.stopnoderequest = stopnoderequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNodesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStopCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNodesStopCall) Context(ctx context.Context) *ProjectsLocationsNodesStopCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNodesStopCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.stopnoderequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") - 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, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.stop", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.nodes.stop" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNodesStopCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.nodes.stop", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{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 -// details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.operations.cancel" call. -// 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 *ProjectsLocationsOperationsCancelCall) 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -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. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.operations.delete" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -// details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.operations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -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 -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// When set to `true`, operations that are reachable are returned as normal, -// and those that are unreachable are returned in the -// [ListOperationsResponse.unreachable] field. This can only be `true` when -// reading across collections e.g. when `parent` is set to -// "projects/example/locations/-". This field is not by default supported and -// will result in an `UNIMPLEMENTED` error if set unless explicitly documented -// otherwise in service or product specific documentation. -func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -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. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.operations.list" call. -// 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 - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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")) - 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) - } -} - -type ProjectsLocationsTensorflowVersionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets TensorFlow Version. -// -// - name: The resource name. -func (r *ProjectsLocationsTensorflowVersionsService) Get(name string) *ProjectsLocationsTensorflowVersionsGetCall { - c := &ProjectsLocationsTensorflowVersionsGetCall{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 -// details. -func (c *ProjectsLocationsTensorflowVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTensorflowVersionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTensorflowVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTensorflowVersionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTensorflowVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsTensorflowVersionsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTensorflowVersionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTensorflowVersionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - 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, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.tensorflowVersions.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.tensorflowVersions.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *TensorFlowVersion.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 *ProjectsLocationsTensorflowVersionsGetCall) Do(opts ...googleapi.CallOption) (*TensorFlowVersion, 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 := &TensorFlowVersion{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.tensorflowVersions.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsLocationsTensorflowVersionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: List TensorFlow versions supported by this API. -// -// - parent: The parent resource name. -func (r *ProjectsLocationsTensorflowVersionsService) List(parent string) *ProjectsLocationsTensorflowVersionsListCall { - c := &ProjectsLocationsTensorflowVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": List filter. -func (c *ProjectsLocationsTensorflowVersionsListCall) Filter(filter string) *ProjectsLocationsTensorflowVersionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sort results. -func (c *ProjectsLocationsTensorflowVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsTensorflowVersionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of items -// to return. -func (c *ProjectsLocationsTensorflowVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsTensorflowVersionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous List request, if any. -func (c *ProjectsLocationsTensorflowVersionsListCall) PageToken(pageToken string) *ProjectsLocationsTensorflowVersionsListCall { - 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 -// details. -func (c *ProjectsLocationsTensorflowVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTensorflowVersionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsTensorflowVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTensorflowVersionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsTensorflowVersionsListCall) Context(ctx context.Context) *ProjectsLocationsTensorflowVersionsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsTensorflowVersionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsTensorflowVersionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tensorflowVersions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "tpu.projects.locations.tensorflowVersions.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "tpu.projects.locations.tensorflowVersions.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListTensorFlowVersionsResponse.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 *ProjectsLocationsTensorflowVersionsListCall) Do(opts ...googleapi.CallOption) (*ListTensorFlowVersionsResponse, 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 := &ListTensorFlowVersionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "tpu.projects.locations.tensorflowVersions.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// 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 *ProjectsLocationsTensorflowVersionsListCall) Pages(ctx context.Context, f func(*ListTensorFlowVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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) - } -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/LICENSE b/vendor/k8s.io/cloud-provider-gcp/providers/LICENSE deleted file mode 100644 index d645695673349..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/BUILD b/vendor/k8s.io/cloud-provider-gcp/providers/gce/BUILD deleted file mode 100644 index d1db04de2d128..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/BUILD +++ /dev/null @@ -1,153 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "gce", - srcs = [ - "doc.go", - "gce.go", - "gce_address_manager.go", - "gce_addresses.go", - "gce_alpha.go", - "gce_annotations.go", - "gce_backendservice.go", - "gce_cert.go", - "gce_clusterid.go", - "gce_clusters.go", - "gce_disks.go", - "gce_fake.go", - "gce_firewall.go", - "gce_forwardingrule.go", - "gce_healthchecks.go", - "gce_instancegroup.go", - "gce_instances.go", - "gce_interfaces.go", - "gce_loadbalancer.go", - "gce_loadbalancer_external.go", - "gce_loadbalancer_internal.go", - "gce_loadbalancer_metrics.go", - "gce_loadbalancer_naming.go", - "gce_networkendpointgroup.go", - "gce_networks.go", - "gce_routes.go", - "gce_securitypolicy.go", - "gce_subnetworks.go", - "gce_targetpool.go", - "gce_targetproxy.go", - "gce_tpu.go", - "gce_urlmap.go", - "gce_util.go", - "gce_zones.go", - "metrics.go", - "support.go", - "token_source.go", - ], - importpath = "k8s.io/cloud-provider-gcp/providers/gce", - visibility = ["//visibility:public"], - deps = [ - "//vendor/cloud.google.com/go/compute/metadata", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock", - "//vendor/github.com/google/go-cmp/cmp", - "//vendor/golang.org/x/oauth2", - "//vendor/golang.org/x/oauth2/google", - "//vendor/google.golang.org/api/compute/v0.alpha:v0_alpha", - "//vendor/google.golang.org/api/compute/v0.beta:v0_beta", - "//vendor/google.golang.org/api/compute/v1:compute", - "//vendor/google.golang.org/api/container/v1:container", - "//vendor/google.golang.org/api/googleapi", - "//vendor/google.golang.org/api/option", - "//vendor/google.golang.org/api/tpu/v1:tpu", - "//vendor/gopkg.in/gcfg.v1:gcfg_v1", - "//vendor/k8s.io/api/core/v1:core", - "//vendor/k8s.io/apimachinery/pkg/api/resource", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:meta", - "//vendor/k8s.io/apimachinery/pkg/fields", - "//vendor/k8s.io/apimachinery/pkg/runtime", - "//vendor/k8s.io/apimachinery/pkg/types", - "//vendor/k8s.io/apimachinery/pkg/util/errors", - "//vendor/k8s.io/apimachinery/pkg/util/sets", - "//vendor/k8s.io/apimachinery/pkg/util/wait", - "//vendor/k8s.io/apimachinery/pkg/watch", - "//vendor/k8s.io/client-go/applyconfigurations/core/v1:core", - "//vendor/k8s.io/client-go/applyconfigurations/meta/v1:meta", - "//vendor/k8s.io/client-go/informers", - "//vendor/k8s.io/client-go/kubernetes", - "//vendor/k8s.io/client-go/kubernetes/fake", - "//vendor/k8s.io/client-go/kubernetes/scheme", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:core", - "//vendor/k8s.io/client-go/pkg/version", - "//vendor/k8s.io/client-go/tools/cache", - "//vendor/k8s.io/client-go/tools/record", - "//vendor/k8s.io/client-go/util/flowcontrol", - "//vendor/k8s.io/cloud-provider", - "//vendor/k8s.io/cloud-provider/service/helpers", - "//vendor/k8s.io/cloud-provider/volume", - "//vendor/k8s.io/cloud-provider/volume/errors", - "//vendor/k8s.io/cloud-provider/volume/helpers", - "//vendor/k8s.io/component-base/metrics", - "//vendor/k8s.io/component-base/metrics/legacyregistry", - "//vendor/k8s.io/klog/v2:klog", - "//vendor/k8s.io/utils/net", - ], -) - -go_test( - name = "gce_test", - srcs = [ - "gce_address_manager_test.go", - "gce_annotations_test.go", - "gce_disks_test.go", - "gce_instances_test.go", - "gce_loadbalancer_external_test.go", - "gce_loadbalancer_internal_test.go", - "gce_loadbalancer_metrics_test.go", - "gce_loadbalancer_test.go", - "gce_loadbalancer_utils_test.go", - "gce_test.go", - "gce_util_test.go", - "metrics_test.go", - ], - embed = [":gce"], - deps = [ - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta", - "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock", - "//vendor/github.com/google/go-cmp/cmp", - "//vendor/github.com/stretchr/testify/assert", - "//vendor/github.com/stretchr/testify/require", - "//vendor/golang.org/x/oauth2/google", - "//vendor/google.golang.org/api/compute/v0.alpha:v0_alpha", - "//vendor/google.golang.org/api/compute/v0.beta:v0_beta", - "//vendor/google.golang.org/api/compute/v1:compute", - "//vendor/google.golang.org/api/googleapi", - "//vendor/k8s.io/api/core/v1:core", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:meta", - "//vendor/k8s.io/apimachinery/pkg/types", - "//vendor/k8s.io/apimachinery/pkg/util/intstr", - "//vendor/k8s.io/apimachinery/pkg/util/json", - "//vendor/k8s.io/apimachinery/pkg/util/sets", - "//vendor/k8s.io/client-go/tools/record", - "//vendor/k8s.io/cloud-provider", - "//vendor/k8s.io/cloud-provider/service/helpers", - "//vendor/k8s.io/utils/net", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//providers/gce/gcpcredential:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/OWNERS b/vendor/k8s.io/cloud-provider-gcp/providers/gce/OWNERS deleted file mode 100644 index c4d0ad17bf79e..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/OWNERS +++ /dev/null @@ -1,12 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners -approvers: -- saad-ali -- jingxu97 -- bowei -- freehan -- mrhohn -- cheftako -reviewers: -- cici37 -- jiahuif -- jpbetz diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/doc.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/doc.go deleted file mode 100644 index d925c25a0a551..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package gce is an implementation of Interface, LoadBalancer -// and Instances for Google Compute Engine. -package gce // import "k8s.io/cloud-provider-gcp/providers/gce" diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce.go deleted file mode 100644 index f4cf2f3d4e3cb..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce.go +++ /dev/null @@ -1,987 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - "io" - "net/http" - "runtime" - "strconv" - "strings" - "sync" - "time" - - gcfg "gopkg.in/gcfg.v1" - - "cloud.google.com/go/compute/metadata" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - container "google.golang.org/api/container/v1" - "google.golang.org/api/option" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/informers" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/flowcontrol" - cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog/v2" -) - -const ( - // ProviderName is the official const representation of the Google Cloud Provider - ProviderName = "gce" - - k8sNodeRouteTag = "k8s-node-route" - - // AffinityTypeNone - no session affinity. - gceAffinityTypeNone = "NONE" - // AffinityTypeClientIP - affinity based on Client IP. - gceAffinityTypeClientIP = "CLIENT_IP" - - operationPollInterval = time.Second - maxTargetPoolCreateInstances = 200 - maxInstancesPerTargetPoolUpdate = 1000 - - // HTTP Load Balancer parameters - // Configure 8 second period for external health checks. - gceHcCheckIntervalSeconds = int64(8) - gceHcTimeoutSeconds = int64(1) - // Start sending requests as soon as a pod is found on the node. - gceHcHealthyThreshold = int64(1) - // Defaults to 3 * 8 = 24 seconds before the LB will steer traffic away. - gceHcUnhealthyThreshold = int64(3) - - gceComputeAPIEndpoint = "https://www.googleapis.com/compute/v1/" - gceComputeAPIEndpointBeta = "https://www.googleapis.com/compute/beta/" -) - -var _ cloudprovider.Interface = (*Cloud)(nil) -var _ cloudprovider.Instances = (*Cloud)(nil) -var _ cloudprovider.LoadBalancer = (*Cloud)(nil) -var _ cloudprovider.Routes = (*Cloud)(nil) -var _ cloudprovider.Zones = (*Cloud)(nil) -var _ cloudprovider.PVLabeler = (*Cloud)(nil) -var _ cloudprovider.Clusters = (*Cloud)(nil) - -type StackType string - -const NetworkStackDualStack StackType = "IPV4_IPV6" -const NetworkStackIPV4 StackType = "IPV4" -const NetworkStackIPV6 StackType = "IPV6" - -// Cloud is an implementation of Interface, LoadBalancer and Instances for Google Compute Engine. -type Cloud struct { - // ClusterID contains functionality for getting (and initializing) the ingress-uid. Call Cloud.Initialize() - // for the cloudprovider to start watching the configmap. - ClusterID ClusterID - - // initializer is used for lazy initialization of subnetworkURL - // and isLegacyNetwork fields if they are not passed via the config. - // The reason is to avoid GCE API calls to initialize them if they - // will never be used. This is especially important when - // it is run from Kubelets, as there can be thousands of them. - subnetworkURLAndIsLegacyNetworkInitializer sync.Once - - service *compute.Service - serviceBeta *computebeta.Service - serviceAlpha *computealpha.Service - containerService *container.Service - tpuService *tpuService - client clientset.Interface - clientBuilder cloudprovider.ControllerClientBuilder - eventBroadcaster record.EventBroadcaster - eventRecorder record.EventRecorder - projectID string - region string - regional bool - localZone string // The zone in which we are running - // managedZones will be set to the 1 zone if running a single zone cluster - // it will be set to ALL zones in region for any multi-zone cluster - // Use GetAllCurrentZones to get only zones that contain nodes - managedZones []string - networkURL string - // unsafeIsLegacyNetwork should be used only via IsLegacyNetwork() accessor, - // to ensure it was properly initialized. - unsafeIsLegacyNetwork bool - // unsafeSubnetworkURL should be used only via SubnetworkURL() accessor, - // to ensure it was properly initialized. - unsafeSubnetworkURL string - // DEPRECATED: Do not rely on this value as it may be incorrect. - secondaryRangeName string - networkProjectID string - onXPN bool - nodeTags []string // List of tags to use on firewall rules for load balancers - lastComputedNodeTags []string // List of node tags calculated in GetHostTags() - lastKnownNodeNames sets.String // List of hostnames used to calculate lastComputedHostTags in GetHostTags(names) - computeNodeTagLock sync.Mutex // Lock for computing and setting node tags - nodeInstancePrefix string // If non-"", an advisory prefix for all nodes in the cluster - useMetadataServer bool - operationPollRateLimiter flowcontrol.RateLimiter - manager diskServiceManager - // Lock for access to nodeZones - nodeZonesLock sync.Mutex - // nodeZones is a mapping from Zone to a sets.String of Node's names in the Zone - // it is updated by the nodeInformer - nodeZones map[string]sets.String - nodeInformerSynced cache.InformerSynced - // sharedResourceLock is used to serialize GCE operations that may mutate shared state to - // prevent inconsistencies. For example, load balancers manipulation methods will take the - // lock to prevent shared resources from being prematurely deleted while the operation is - // in progress. - sharedResourceLock sync.Mutex - // AlphaFeatureGate gates gce alpha features in Cloud instance. - // Related wrapper functions that interacts with gce alpha api should examine whether - // the corresponding api is enabled. - // If not enabled, it should return error. - AlphaFeatureGate *AlphaFeatureGate - - // New code generated interface to the GCE compute library. - c cloud.Cloud - - // Keep a reference of this around so we can inject a new cloud.RateLimiter implementation. - s *cloud.Service - - metricsCollector loadbalancerMetricsCollector - - // the compute API endpoint with the `projects/` element. - projectsBasePath string - // stackType indicates whether the cluster is a single stack IPv4, single - // stack IPv6 or a dual stack cluster - stackType StackType -} - -// ConfigGlobal is the in memory representation of the gce.conf config data -// TODO: replace gcfg with json -type ConfigGlobal struct { - TokenURL string `gcfg:"token-url"` - TokenBody string `gcfg:"token-body" datapolicy:"token"` - // ProjectID and NetworkProjectID can either be the numeric or string-based - // unique identifier that starts with [a-z]. - ProjectID string `gcfg:"project-id"` - // NetworkProjectID refers to the project which owns the network being used. - NetworkProjectID string `gcfg:"network-project-id"` - NetworkName string `gcfg:"network-name"` - SubnetworkName string `gcfg:"subnetwork-name"` - StackType string `gcfg:"stack-type"` - // DEPRECATED: Do not rely on this value as it may be incorrect. - // SecondaryRangeName is the name of the secondary range to allocate IP - // aliases. The secondary range must be present on the subnetwork the - // cluster is attached to. - SecondaryRangeName string `gcfg:"secondary-range-name"` - NodeTags []string `gcfg:"node-tags"` - NodeInstancePrefix string `gcfg:"node-instance-prefix"` - Regional bool `gcfg:"regional"` - Multizone bool `gcfg:"multizone"` - // APIEndpoint is the GCE compute API endpoint to use. If this is blank, - // then the default endpoint is used. - APIEndpoint string `gcfg:"api-endpoint"` - // ContainerAPIEndpoint is the GCE container API endpoint to use. If this is blank, - // then the default endpoint is used. - ContainerAPIEndpoint string `gcfg:"container-api-endpoint"` - // LocalZone specifies the GCE zone that gce cloud client instance is - // located in (i.e. where the controller will be running). If this is - // blank, then the local zone will be discovered via the metadata server. - LocalZone string `gcfg:"local-zone"` - // Default to none. - // For example: MyFeatureFlag - AlphaFeatures []string `gcfg:"alpha-features"` -} - -// ConfigFile is the struct used to parse the /etc/gce.conf configuration file. -// NOTE: Cloud config files should follow the same Kubernetes deprecation policy as -// flags or CLIs. Config fields should not change behavior in incompatible ways and -// should be deprecated for at least 2 release prior to removing. -// See https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-a-flag-or-cli -// for more details. -type ConfigFile struct { - Global ConfigGlobal `gcfg:"global"` -} - -// CloudConfig includes all the necessary configuration for creating Cloud -type CloudConfig struct { - APIEndpoint string - ContainerAPIEndpoint string - ProjectID string - NetworkProjectID string - Region string - Regional bool - Zone string - ManagedZones []string - NetworkName string - NetworkURL string - SubnetworkName string - SubnetworkURL string - // DEPRECATED: Do not rely on this value as it may be incorrect. - SecondaryRangeName string - NodeTags []string - NodeInstancePrefix string - TokenSource oauth2.TokenSource - UseMetadataServer bool - AlphaFeatureGate *AlphaFeatureGate - StackType string -} - -func init() { - cloudprovider.RegisterCloudProvider( - ProviderName, - func(config io.Reader) (cloudprovider.Interface, error) { - return newGCECloud(config) - }) -} - -// Services is the set of all versions of the compute service. -type Services struct { - // GA, Alpha, Beta versions of the compute API. - GA *compute.Service - Alpha *computealpha.Service - Beta *computebeta.Service -} - -// ComputeServices returns access to the internal compute services. -func (g *Cloud) ComputeServices() *Services { - return &Services{g.service, g.serviceAlpha, g.serviceBeta} -} - -// Compute returns the generated stubs for the compute API. -func (g *Cloud) Compute() cloud.Cloud { - return g.c -} - -// ContainerService returns the container service. -func (g *Cloud) ContainerService() *container.Service { - return g.containerService -} - -// newGCECloud creates a new instance of Cloud. -func newGCECloud(config io.Reader) (gceCloud *Cloud, err error) { - var cloudConfig *CloudConfig - var configFile *ConfigFile - - if config != nil { - configFile, err = readConfig(config) - if err != nil { - return nil, err - } - klog.Infof("Using GCE provider config %+v", configFile) - } - - cloudConfig, err = generateCloudConfig(configFile) - if err != nil { - return nil, err - } - return CreateGCECloud(cloudConfig) -} - -func readConfig(reader io.Reader) (*ConfigFile, error) { - cfg := &ConfigFile{} - if err := gcfg.FatalOnly(gcfg.ReadInto(cfg, reader)); err != nil { - klog.Errorf("Couldn't read config: %v", err) - return nil, err - } - return cfg, nil -} - -func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err error) { - cloudConfig = &CloudConfig{} - // By default, fetch token from GCE metadata server - cloudConfig.TokenSource = google.ComputeTokenSource("") - cloudConfig.UseMetadataServer = true - cloudConfig.AlphaFeatureGate = NewAlphaFeatureGate([]string{}) - if configFile != nil { - if configFile.Global.APIEndpoint != "" { - cloudConfig.APIEndpoint = configFile.Global.APIEndpoint - } - - if configFile.Global.ContainerAPIEndpoint != "" { - cloudConfig.ContainerAPIEndpoint = configFile.Global.ContainerAPIEndpoint - } - - if configFile.Global.TokenURL != "" { - // if tokenURL is nil, set tokenSource to nil. This will force the OAuth client to fall - // back to use DefaultTokenSource. This allows running gceCloud remotely. - if configFile.Global.TokenURL == "nil" { - cloudConfig.TokenSource = nil - } else { - cloudConfig.TokenSource = NewAltTokenSource(configFile.Global.TokenURL, configFile.Global.TokenBody) - } - } - - cloudConfig.NodeTags = configFile.Global.NodeTags - cloudConfig.NodeInstancePrefix = configFile.Global.NodeInstancePrefix - cloudConfig.AlphaFeatureGate = NewAlphaFeatureGate(configFile.Global.AlphaFeatures) - } - - // retrieve projectID and zone - if configFile == nil || configFile.Global.ProjectID == "" || configFile.Global.LocalZone == "" { - cloudConfig.ProjectID, cloudConfig.Zone, err = getProjectAndZone() - if err != nil { - return nil, err - } - } - - if configFile != nil { - if configFile.Global.ProjectID != "" { - cloudConfig.ProjectID = configFile.Global.ProjectID - } - if configFile.Global.LocalZone != "" { - cloudConfig.Zone = configFile.Global.LocalZone - } - if configFile.Global.NetworkProjectID != "" { - cloudConfig.NetworkProjectID = configFile.Global.NetworkProjectID - } - } - - // retrieve region - cloudConfig.Region, err = GetGCERegion(cloudConfig.Zone) - if err != nil { - return nil, err - } - - // Determine if its a regional cluster - if configFile != nil && configFile.Global.Regional { - cloudConfig.Regional = true - } - - // generate managedZones - cloudConfig.ManagedZones = []string{cloudConfig.Zone} - if configFile != nil && (configFile.Global.Multizone || configFile.Global.Regional) { - cloudConfig.ManagedZones = nil // Use all zones in region - } - - // Determine if network parameter is URL or Name - if configFile != nil && configFile.Global.NetworkName != "" { - if strings.Contains(configFile.Global.NetworkName, "/") { - cloudConfig.NetworkURL = configFile.Global.NetworkName - } else { - cloudConfig.NetworkName = configFile.Global.NetworkName - } - } else { - cloudConfig.NetworkName, err = getNetworkNameViaMetadata() - if err != nil { - return nil, err - } - } - - // Determine if subnetwork parameter is URL or Name - // If cluster is on a GCP network of mode=custom, then `SubnetName` must be specified in config file. - if configFile != nil && configFile.Global.SubnetworkName != "" { - if strings.Contains(configFile.Global.SubnetworkName, "/") { - cloudConfig.SubnetworkURL = configFile.Global.SubnetworkName - } else { - cloudConfig.SubnetworkName = configFile.Global.SubnetworkName - } - } - - if configFile != nil { - cloudConfig.SecondaryRangeName = configFile.Global.SecondaryRangeName - } - - if configFile != nil { - cloudConfig.StackType = configFile.Global.StackType - } - - return cloudConfig, err -} - -// CreateGCECloud creates a Cloud object using the specified parameters. -// If no networkUrl is specified, loads networkName via rest call. -// If no tokenSource is specified, uses oauth2.DefaultTokenSource. -// If managedZones is nil / empty all zones in the region will be managed. -func CreateGCECloud(config *CloudConfig) (*Cloud, error) { - // Remove any pre-release version and build metadata from the semver, - // leaving only the MAJOR.MINOR.PATCH portion. See http://semver.org/. - version := strings.TrimLeft(strings.Split(strings.Split(version.Get().GitVersion, "-")[0], "+")[0], "v") - - // Create a user-agent header append string to supply to the Google API - // clients, to identify Kubernetes as the origin of the GCP API calls. - userAgent := fmt.Sprintf("Kubernetes/%s (%s %s)", version, runtime.GOOS, runtime.GOARCH) - - // Use ProjectID for NetworkProjectID, if it wasn't explicitly set. - if config.NetworkProjectID == "" { - config.NetworkProjectID = config.ProjectID - } - - service, err := compute.NewService(context.Background(), option.WithTokenSource(config.TokenSource)) - if err != nil { - return nil, err - } - service.UserAgent = userAgent - - serviceBeta, err := computebeta.NewService(context.Background(), option.WithTokenSource(config.TokenSource)) - if err != nil { - return nil, err - } - serviceBeta.UserAgent = userAgent - - serviceAlpha, err := computealpha.NewService(context.Background(), option.WithTokenSource(config.TokenSource)) - if err != nil { - return nil, err - } - serviceAlpha.UserAgent = userAgent - - if config.APIEndpoint != "" { - if strings.HasSuffix(service.BasePath, "/projects/") { - service.BasePath = getProjectsBasePath(config.APIEndpoint) - serviceBeta.BasePath = getProjectsBasePath(strings.Replace(config.APIEndpoint, "v1", "beta", -1)) - serviceAlpha.BasePath = getProjectsBasePath(strings.Replace(config.APIEndpoint, "v1", "alpha", -1)) - } else { - service.BasePath = config.APIEndpoint - serviceBeta.BasePath = strings.Replace(config.APIEndpoint, "v1", "beta", -1) - serviceAlpha.BasePath = strings.Replace(config.APIEndpoint, "v1", "alpha", -1) - } - } - - containerService, err := container.NewService(context.Background(), option.WithTokenSource(config.TokenSource)) - if err != nil { - return nil, err - } - containerService.UserAgent = userAgent - if config.ContainerAPIEndpoint != "" { - containerService.BasePath = config.ContainerAPIEndpoint - } - - client, err := newOauthClient(config.TokenSource) - if err != nil { - return nil, err - } - tpuService, err := newTPUService(client) - if err != nil { - return nil, err - } - - // ProjectID and.NetworkProjectID may be project number or name. - projID, netProjID := tryConvertToProjectNames(config.ProjectID, config.NetworkProjectID, service) - onXPN := projID != netProjID - - var networkURL string - var subnetURL string - var isLegacyNetwork bool - - if config.NetworkURL != "" { - networkURL = config.NetworkURL - } else if config.NetworkName != "" { - networkURL = gceNetworkURL(config.APIEndpoint, netProjID, config.NetworkName) - } else { - // Other consumers may use the cloudprovider without utilizing the wrapped GCE API functions - // or functions requiring network/subnetwork URLs (e.g. Kubelet). - klog.Warningf("No network name or URL specified.") - } - - if config.SubnetworkURL != "" { - subnetURL = config.SubnetworkURL - } else if config.SubnetworkName != "" { - subnetURL = gceSubnetworkURL(config.APIEndpoint, netProjID, config.Region, config.SubnetworkName) - } - // If neither SubnetworkURL nor SubnetworkName are provided, defer to - // lazy initialization. Determining subnetURL and isLegacyNetwork requires - // GCE API call. Given that it's not used in many cases and the fact that - // the provider is initialized also for Kubelets (and there can be thousands - // of them) we defer to lazy initialization here. - - if len(config.ManagedZones) == 0 { - config.ManagedZones, err = getZonesForRegion(service, config.ProjectID, config.Region) - if err != nil { - return nil, err - } - } - if len(config.ManagedZones) > 1 { - klog.Infof("managing multiple zones: %v", config.ManagedZones) - } - - operationPollRateLimiter := flowcontrol.NewTokenBucketRateLimiter(5, 5) // 5 qps, 5 burst. - - gce := &Cloud{ - service: service, - serviceAlpha: serviceAlpha, - serviceBeta: serviceBeta, - containerService: containerService, - tpuService: tpuService, - projectID: projID, - networkProjectID: netProjID, - onXPN: onXPN, - region: config.Region, - regional: config.Regional, - localZone: config.Zone, - managedZones: config.ManagedZones, - networkURL: networkURL, - unsafeIsLegacyNetwork: isLegacyNetwork, - unsafeSubnetworkURL: subnetURL, - secondaryRangeName: config.SecondaryRangeName, - nodeTags: config.NodeTags, - nodeInstancePrefix: config.NodeInstancePrefix, - useMetadataServer: config.UseMetadataServer, - operationPollRateLimiter: operationPollRateLimiter, - AlphaFeatureGate: config.AlphaFeatureGate, - nodeZones: map[string]sets.String{}, - metricsCollector: newLoadBalancerMetrics(), - projectsBasePath: getProjectsBasePath(service.BasePath), - stackType: StackType(config.StackType), - } - - gce.manager = &gceServiceManager{gce} - gce.s = &cloud.Service{ - GA: service, - Alpha: serviceAlpha, - Beta: serviceBeta, - ProjectRouter: &gceProjectRouter{gce}, - RateLimiter: &gceRateLimiter{gce}, - } - gce.c = cloud.NewGCE(gce.s) - - return gce, nil -} - -// initializeNetworkConfig() is supposed to be called under sync.Once() -// for accessors to subnetworkURL and isLegacyNetwork fields. -func (g *Cloud) initializeSubnetworkURLAndIsLegacyNetwork() { - if g.unsafeSubnetworkURL != "" { - // This has already been initialized via the config. - return - } - - var subnetURL string - var isLegacyNetwork bool - - // Determine the type of network and attempt to discover the correct subnet for AUTO mode. - // Gracefully fail because kubelet calls CreateGCECloud without any config, and minions - // lack the proper credentials for API calls. - if networkName := lastComponent(g.NetworkURL()); networkName != "" { - if n, err := getNetwork(g.service, g.NetworkProjectID(), networkName); err != nil { - klog.Warningf("Could not retrieve network %q; err: %v", networkName, err) - } else { - switch typeOfNetwork(n) { - case netTypeLegacy: - klog.Infof("Network %q is type legacy - no subnetwork", networkName) - isLegacyNetwork = true - case netTypeCustom: - klog.Warningf("Network %q is type custom - cannot auto select a subnetwork", networkName) - case netTypeAuto: - subnetURL, err = determineSubnetURL(g.service, g.NetworkProjectID(), networkName, g.Region()) - if err != nil { - klog.Warningf("Could not determine subnetwork for network %q and region %v; err: %v", networkName, g.Region(), err) - } else { - klog.Infof("Auto selecting subnetwork %q", subnetURL) - } - } - } - } - - g.unsafeSubnetworkURL = subnetURL - g.unsafeIsLegacyNetwork = isLegacyNetwork -} - -// SetRateLimiter adds a custom cloud.RateLimiter implementation. -// WARNING: Calling this could have unexpected behavior if you have in-flight -// requests. It is best to use this immediately after creating a Cloud. -func (g *Cloud) SetRateLimiter(rl cloud.RateLimiter) { - if rl != nil { - g.s.RateLimiter = rl - } -} - -// determineSubnetURL queries for all subnetworks in a region for a given network and returns -// the URL of the subnetwork which exists in the auto-subnet range. -func determineSubnetURL(service *compute.Service, networkProjectID, networkName, region string) (string, error) { - subnets, err := listSubnetworksOfNetwork(service, networkProjectID, networkName, region) - if err != nil { - return "", err - } - - autoSubnets, err := subnetsInCIDR(subnets, autoSubnetIPRange) - if err != nil { - return "", err - } - - if len(autoSubnets) == 0 { - return "", fmt.Errorf("no subnet exists in auto CIDR") - } - - if len(autoSubnets) > 1 { - return "", fmt.Errorf("multiple subnetworks in the same region exist in auto CIDR") - } - - return autoSubnets[0].SelfLink, nil -} - -func tryConvertToProjectNames(configProject, configNetworkProject string, service *compute.Service) (projID, netProjID string) { - projID = configProject - if isProjectNumber(projID) { - projName, err := getProjectID(service, projID) - if err != nil { - klog.Warningf("Failed to retrieve project %v while trying to retrieve its name. err %v", projID, err) - } else { - projID = projName - } - } - - netProjID = projID - if configNetworkProject != configProject { - netProjID = configNetworkProject - } - if isProjectNumber(netProjID) { - netProjName, err := getProjectID(service, netProjID) - if err != nil { - klog.Warningf("Failed to retrieve network project %v while trying to retrieve its name. err %v", netProjID, err) - } else { - netProjID = netProjName - } - } - - return projID, netProjID -} - -// Initialize takes in a clientBuilder and spawns a goroutine for watching the clusterid configmap. -// This must be called before utilizing the funcs of gce.ClusterID -func (g *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) { - g.clientBuilder = clientBuilder - g.client = clientBuilder.ClientOrDie("cloud-provider") - - g.eventBroadcaster = record.NewBroadcaster() - g.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: g.client.CoreV1().Events("")}) - g.eventRecorder = g.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "g-cloudprovider"}) - - go g.watchClusterID(stop) - go g.metricsCollector.Run(stop) -} - -// LoadBalancer returns an implementation of LoadBalancer for Google Compute Engine. -func (g *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) { - return g, true -} - -// Instances returns an implementation of Instances for Google Compute Engine. -func (g *Cloud) Instances() (cloudprovider.Instances, bool) { - return g, true -} - -// InstancesV2 returns an implementation of InstancesV2 for Google Compute Engine. -// Implement ONLY for external cloud provider -func (g *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool) { - return g, true -} - -// Zones returns an implementation of Zones for Google Compute Engine. -func (g *Cloud) Zones() (cloudprovider.Zones, bool) { - return g, true -} - -// Clusters returns an implementation of Clusters for Google Compute Engine. -func (g *Cloud) Clusters() (cloudprovider.Clusters, bool) { - return g, true -} - -// Routes returns an implementation of Routes for Google Compute Engine. -func (g *Cloud) Routes() (cloudprovider.Routes, bool) { - return g, true -} - -// ProviderName returns the cloud provider ID. -func (g *Cloud) ProviderName() string { - return ProviderName -} - -// ProjectID returns the ProjectID corresponding to the project this cloud is in. -func (g *Cloud) ProjectID() string { - return g.projectID -} - -// NetworkProjectID returns the ProjectID corresponding to the project this cluster's network is in. -func (g *Cloud) NetworkProjectID() string { - return g.networkProjectID -} - -// Region returns the region -func (g *Cloud) Region() string { - return g.region -} - -// Regional returns true if the cluster is regional. -func (g *Cloud) Regional() bool { - return g.regional -} - -// LocalZone returns the localZone. -func (g *Cloud) LocalZone() string { - return g.localZone -} - -// OnXPN returns true if the cluster is running on a cross project network (XPN) -func (g *Cloud) OnXPN() bool { - return g.onXPN -} - -// NetworkURL returns the network url -func (g *Cloud) NetworkURL() string { - return g.networkURL -} - -// SubnetworkURL returns the subnetwork url -func (g *Cloud) SubnetworkURL() string { - g.subnetworkURLAndIsLegacyNetworkInitializer.Do(g.initializeSubnetworkURLAndIsLegacyNetwork) - return g.unsafeSubnetworkURL -} - -// IsLegacyNetwork returns true if the cluster is still running a legacy network configuration. -func (g *Cloud) IsLegacyNetwork() bool { - g.subnetworkURLAndIsLegacyNetworkInitializer.Do(g.initializeSubnetworkURLAndIsLegacyNetwork) - return g.unsafeIsLegacyNetwork -} - -// SetInformers sets up the zone handlers we need watching for node changes. -func (g *Cloud) SetInformers(informerFactory informers.SharedInformerFactory) { - klog.Infof("Setting up informers for Cloud") - nodeInformer := informerFactory.Core().V1().Nodes().Informer() - nodeInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - node := obj.(*v1.Node) - g.updateNodeZones(nil, node) - }, - UpdateFunc: func(prev, obj interface{}) { - prevNode := prev.(*v1.Node) - newNode := obj.(*v1.Node) - if getZone(newNode) == getZone(prevNode) { - return - } - g.updateNodeZones(prevNode, newNode) - }, - DeleteFunc: func(obj interface{}) { - node, isNode := obj.(*v1.Node) - // We can get DeletedFinalStateUnknown instead of *v1.Node here - // and we need to handle that correctly. - if !isNode { - deletedState, ok := obj.(cache.DeletedFinalStateUnknown) - if !ok { - klog.Errorf("Received unexpected object: %v", obj) - return - } - node, ok = deletedState.Obj.(*v1.Node) - if !ok { - klog.Errorf("DeletedFinalStateUnknown contained non-Node object: %v", deletedState.Obj) - return - } - } - g.updateNodeZones(node, nil) - }, - }) - g.nodeInformerSynced = nodeInformer.HasSynced -} - -func (g *Cloud) updateNodeZones(prevNode, newNode *v1.Node) { - g.nodeZonesLock.Lock() - defer g.nodeZonesLock.Unlock() - if prevNode != nil { - prevZone := getZone(prevNode) - if prevZone != emptyZone { - g.nodeZones[prevZone].Delete(prevNode.ObjectMeta.Name) - if g.nodeZones[prevZone].Len() == 0 { - g.nodeZones[prevZone] = nil - } - } - } - if newNode != nil { - newZone := getZone(newNode) - if newZone != emptyZone { - if g.nodeZones[newZone] == nil { - g.nodeZones[newZone] = sets.NewString() - } - g.nodeZones[newZone].Insert(newNode.ObjectMeta.Name) - } - } -} - -// HasClusterID returns true if the cluster has a clusterID -func (g *Cloud) HasClusterID() bool { - return true -} - -// getProjectsBasePath returns the compute API endpoint with the `projects/` element. -// The suffix must be added when generating compute resource urls. -func getProjectsBasePath(basePath string) string { - if !strings.HasSuffix(basePath, "/") { - basePath += "/" - } - if !strings.HasSuffix(basePath, "/projects/") { - basePath += "projects/" - } - return basePath -} - -// Project IDs cannot have a digit for the first characeter. If the id contains a digit, -// then it must be a project number. -func isProjectNumber(idOrNumber string) bool { - _, err := strconv.ParseUint(idOrNumber, 10, 64) - return err == nil -} - -func gceNetworkURL(apiEndpoint, project, network string) string { - if apiEndpoint == "" { - apiEndpoint = gceComputeAPIEndpoint - } - return apiEndpoint + strings.Join([]string{"projects", project, "global", "networks", network}, "/") -} - -func gceSubnetworkURL(apiEndpoint, project, region, subnetwork string) string { - if apiEndpoint == "" { - apiEndpoint = gceComputeAPIEndpoint - } - return apiEndpoint + strings.Join([]string{"projects", project, "regions", region, "subnetworks", subnetwork}, "/") -} - -// getRegionInURL parses full resource URLS and shorter URLS -// https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1/subnetworks/a -// projects/myproject/regions/us-central1/subnetworks/a -// All return "us-central1" -func getRegionInURL(urlStr string) string { - fields := strings.Split(urlStr, "/") - for i, v := range fields { - if v == "regions" && i < len(fields)-1 { - return fields[i+1] - } - } - return "" -} - -func getNetworkNameViaMetadata() (string, error) { - result, err := metadata.Get("instance/network-interfaces/0/network") - if err != nil { - return "", err - } - parts := strings.Split(result, "/") - if len(parts) != 4 { - return "", fmt.Errorf("unexpected response: %s", result) - } - return parts[3], nil -} - -// getNetwork returns a GCP network -func getNetwork(svc *compute.Service, networkProjectID, networkID string) (*compute.Network, error) { - return svc.Networks.Get(networkProjectID, networkID).Do() -} - -// listSubnetworksOfNetwork returns a list of subnetworks for a particular region of a network. -func listSubnetworksOfNetwork(svc *compute.Service, networkProjectID, networkID, region string) ([]*compute.Subnetwork, error) { - var subnets []*compute.Subnetwork - err := svc.Subnetworks.List(networkProjectID, region).Filter(fmt.Sprintf("network eq .*/%v$", networkID)).Pages(context.Background(), func(res *compute.SubnetworkList) error { - subnets = append(subnets, res.Items...) - return nil - }) - return subnets, err -} - -// getProjectID returns the project's string ID given a project number or string -func getProjectID(svc *compute.Service, projectNumberOrID string) (string, error) { - proj, err := svc.Projects.Get(projectNumberOrID).Do() - if err != nil { - return "", err - } - - return proj.Name, nil -} - -func getZonesForRegion(svc *compute.Service, projectID, region string) ([]string, error) { - // TODO: use PageToken to list all not just the first 500 - listCall := svc.Zones.List(projectID) - - // Filtering by region doesn't seem to work - // (tested in https://cloud.google.com/compute/docs/reference/latest/zones/list) - // listCall = listCall.Filter("region eq " + region) - - var zones []string - var accumulator = func(response *compute.ZoneList) error { - for _, zone := range response.Items { - regionName := lastComponent(zone.Region) - if regionName == region { - zones = append(zones, zone.Name) - } - } - return nil - } - err := listCall.Pages(context.TODO(), accumulator) - if err != nil { - return nil, fmt.Errorf("unexpected response listing zones: %v", err) - } - return zones, nil -} - -func findSubnetForRegion(subnetURLs []string, region string) string { - for _, url := range subnetURLs { - if thisRegion := getRegionInURL(url); thisRegion == region { - return url - } - } - return "" -} - -func newOauthClient(tokenSource oauth2.TokenSource) (*http.Client, error) { - if tokenSource == nil { - var err error - tokenSource, err = google.DefaultTokenSource( - context.Background(), - compute.CloudPlatformScope, - compute.ComputeScope) - klog.Infof("Using DefaultTokenSource %#v", tokenSource) - if err != nil { - return nil, err - } - } else { - klog.Infof("Using existing Token Source %#v", tokenSource) - } - - backoff := wait.Backoff{ - // These values will add up to about a minute. See #56293 for background. - Duration: time.Second, - Factor: 1.4, - Steps: 10, - } - if err := wait.ExponentialBackoff(backoff, func() (bool, error) { - if _, err := tokenSource.Token(); err != nil { - klog.Errorf("error fetching initial token: %v", err) - return false, nil - } - return true, nil - }); err != nil { - return nil, err - } - - return oauth2.NewClient(context.Background(), tokenSource), nil -} - -func (manager *gceServiceManager) getProjectsAPIEndpoint() string { - projectsAPIEndpoint := gceComputeAPIEndpoint + "projects/" - if manager.gce.service != nil { - projectsAPIEndpoint = manager.gce.projectsBasePath - } - - return projectsAPIEndpoint -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_address_manager.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_address_manager.go deleted file mode 100644 index 3aab291c4c7af..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_address_manager.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "net/http" - - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "k8s.io/klog/v2" -) - -type addressManager struct { - logPrefix string - svc CloudAddressService - name string - serviceName string - targetIP string - addressType cloud.LbScheme - region string - subnetURL string - tryRelease bool -} - -func newAddressManager(svc CloudAddressService, serviceName, region, subnetURL, name, targetIP string, addressType cloud.LbScheme) *addressManager { - return &addressManager{ - svc: svc, - logPrefix: fmt.Sprintf("AddressManager(%q)", name), - region: region, - serviceName: serviceName, - name: name, - targetIP: targetIP, - addressType: addressType, - tryRelease: true, - subnetURL: subnetURL, - } -} - -// HoldAddress will ensure that the IP is reserved with an address - either owned by the controller -// or by a user. If the address is not the addressManager.name, then it's assumed to be a user's address. -// The string returned is the reserved IP address. -func (am *addressManager) HoldAddress() (string, error) { - // HoldAddress starts with retrieving the address that we use for this load balancer (by name). - // Retrieving an address by IP will indicate if the IP is reserved and if reserved by the user - // or the controller, but won't tell us the current state of the controller's IP. The address - // could be reserving another address; therefore, it would need to be deleted. In the normal - // case of using a controller address, retrieving the address by name results in the fewest API - // calls since it indicates whether a Delete is necessary before Reserve. - klog.V(4).Infof("%v: attempting hold of IP %q Type %q", am.logPrefix, am.targetIP, am.addressType) - // Get the address in case it was orphaned earlier - addr, err := am.svc.GetRegionAddress(am.name, am.region) - if err != nil && !isNotFound(err) { - return "", err - } - - if addr != nil { - // If address exists, check if the address had the expected attributes. - validationError := am.validateAddress(addr) - if validationError == nil { - klog.V(4).Infof("%v: address %q already reserves IP %q Type %q. No further action required.", am.logPrefix, addr.Name, addr.Address, addr.AddressType) - return addr.Address, nil - } - - klog.V(2).Infof("%v: deleting existing address because %v", am.logPrefix, validationError) - err := am.svc.DeleteRegionAddress(addr.Name, am.region) - if err != nil { - if isNotFound(err) { - klog.V(4).Infof("%v: address %q was not found. Ignoring.", am.logPrefix, addr.Name) - } else { - return "", err - } - } else { - klog.V(4).Infof("%v: successfully deleted previous address %q", am.logPrefix, addr.Name) - } - } - - return am.ensureAddressReservation() -} - -// ReleaseAddress will release the address if it's owned by the controller. -func (am *addressManager) ReleaseAddress() error { - if !am.tryRelease { - klog.V(4).Infof("%v: not attempting release of address %q.", am.logPrefix, am.targetIP) - return nil - } - - klog.V(4).Infof("%v: releasing address %q named %q", am.logPrefix, am.targetIP, am.name) - // Controller only ever tries to unreserve the address named with the load balancer's name. - err := am.svc.DeleteRegionAddress(am.name, am.region) - if err != nil { - if isNotFound(err) { - klog.Warningf("%v: address %q was not found. Ignoring.", am.logPrefix, am.name) - return nil - } - - return err - } - - klog.V(4).Infof("%v: successfully released IP %q named %q", am.logPrefix, am.targetIP, am.name) - return nil -} - -func (am *addressManager) ensureAddressReservation() (string, error) { - // Try reserving the IP with controller-owned address name - // If am.targetIP is an empty string, a new IP will be created. - newAddr := &compute.Address{ - Name: am.name, - Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, am.serviceName), - Address: am.targetIP, - AddressType: string(am.addressType), - Subnetwork: am.subnetURL, - } - - reserveErr := am.svc.ReserveRegionAddress(newAddr, am.region) - if reserveErr == nil { - if newAddr.Address != "" { - klog.V(4).Infof("%v: successfully reserved IP %q with name %q", am.logPrefix, newAddr.Address, newAddr.Name) - return newAddr.Address, nil - } - - addr, err := am.svc.GetRegionAddress(newAddr.Name, am.region) - if err != nil { - return "", err - } - - klog.V(4).Infof("%v: successfully created address %q which reserved IP %q", am.logPrefix, addr.Name, addr.Address) - return addr.Address, nil - } else if !isHTTPErrorCode(reserveErr, http.StatusConflict) && !isHTTPErrorCode(reserveErr, http.StatusBadRequest) { - // If the IP is already reserved: - // by an internal address: a StatusConflict is returned - // by an external address: a BadRequest is returned - return "", reserveErr - } - - // If the target IP was empty, we cannot try to find which IP caused a conflict. - // If the name was already used, then the next sync will attempt deletion of that address. - if am.targetIP == "" { - return "", fmt.Errorf("failed to reserve address %q with no specific IP, err: %v", am.name, reserveErr) - } - - // Reserving the address failed due to a conflict or bad request. The address manager just checked that no address - // exists with the name, so it may belong to the user. - addr, err := am.svc.GetRegionAddressByIP(am.region, am.targetIP) - if err != nil { - return "", fmt.Errorf("failed to get address by IP %q after reservation attempt, err: %q, reservation err: %q", am.targetIP, err, reserveErr) - } - - // Check that the address attributes are as required. - if err := am.validateAddress(addr); err != nil { - return "", err - } - - if am.isManagedAddress(addr) { - // The address with this name is checked at the beginning of 'HoldAddress()', but for some reason - // it was re-created by this point. May be possible that two controllers are running. - klog.Warningf("%v: address %q unexpectedly existed with IP %q.", am.logPrefix, addr.Name, am.targetIP) - } else { - // If the retrieved address is not named with the loadbalancer name, then the controller does not own it, but will allow use of it. - klog.V(4).Infof("%v: address %q was already reserved with name: %q, description: %q", am.logPrefix, am.targetIP, addr.Name, addr.Description) - am.tryRelease = false - } - - return addr.Address, nil -} - -func (am *addressManager) validateAddress(addr *compute.Address) error { - if am.targetIP != "" && am.targetIP != addr.Address { - return fmt.Errorf("address %q does not have the expected IP %q, actual: %q", addr.Name, am.targetIP, addr.Address) - } - if addr.AddressType != string(am.addressType) { - return fmt.Errorf("address %q does not have the expected address type %q, actual: %q", addr.Name, am.addressType, addr.AddressType) - } - - return nil -} - -func (am *addressManager) isManagedAddress(addr *compute.Address) bool { - return addr.Name == am.name -} - -func ensureAddressDeleted(svc CloudAddressService, name, region string) error { - return ignoreNotFound(svc.DeleteRegionAddress(name, region)) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_addresses.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_addresses.go deleted file mode 100644 index fe4c5afcd4b32..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_addresses.go +++ /dev/null @@ -1,192 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - - "k8s.io/klog/v2" - - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newAddressMetricContext(request, region string) *metricContext { - return newAddressMetricContextWithVersion(request, region, computeV1Version) -} - -func newAddressMetricContextWithVersion(request, region, version string) *metricContext { - return newGenericMetricContext("address", request, region, unusedMetricLabel, version) -} - -// ReserveGlobalAddress creates a global address. -// Caller is allocated a random IP if they do not specify an ipAddress. If an -// ipAddress is specified, it must belong to the current project, eg: an -// ephemeral IP associated with a global forwarding rule. -func (g *Cloud) ReserveGlobalAddress(addr *compute.Address) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("reserve", "") - return mc.Observe(g.c.GlobalAddresses().Insert(ctx, meta.GlobalKey(addr.Name), addr)) -} - -// DeleteGlobalAddress deletes a global address by name. -func (g *Cloud) DeleteGlobalAddress(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("delete", "") - return mc.Observe(g.c.GlobalAddresses().Delete(ctx, meta.GlobalKey(name))) -} - -// GetGlobalAddress returns the global address by name. -func (g *Cloud) GetGlobalAddress(name string) (*compute.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("get", "") - v, err := g.c.GlobalAddresses().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// ReserveRegionAddress creates a region address -func (g *Cloud) ReserveRegionAddress(addr *compute.Address, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("reserve", region) - return mc.Observe(g.c.Addresses().Insert(ctx, meta.RegionalKey(addr.Name, region), addr)) -} - -// ReserveBetaRegionAddress creates a beta region address -func (g *Cloud) ReserveBetaRegionAddress(addr *computebeta.Address, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("reserve", region) - return mc.Observe(g.c.BetaAddresses().Insert(ctx, meta.RegionalKey(addr.Name, region), addr)) -} - -// DeleteRegionAddress deletes a region address by name. -func (g *Cloud) DeleteRegionAddress(name, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("delete", region) - return mc.Observe(g.c.Addresses().Delete(ctx, meta.RegionalKey(name, region))) -} - -// GetRegionAddress returns the region address by name -func (g *Cloud) GetRegionAddress(name, region string) (*compute.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("get", region) - v, err := g.c.Addresses().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// GetBetaRegionAddress returns the beta region address by name -func (g *Cloud) GetBetaRegionAddress(name, region string) (*computebeta.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("get", region) - v, err := g.c.BetaAddresses().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// GetRegionAddressByIP returns the regional address matching the given IP address. -func (g *Cloud) GetRegionAddressByIP(region, ipAddress string) (*compute.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("list", region) - addrs, err := g.c.Addresses().List(ctx, region, filter.Regexp("address", ipAddress)) - - mc.Observe(err) - if err != nil { - return nil, err - } - - if len(addrs) > 1 { - klog.Warningf("More than one addresses matching the IP %q: %v", ipAddress, addrNames(addrs)) - } - for _, addr := range addrs { - if addr.Address == ipAddress { - return addr, nil - } - } - return nil, makeGoogleAPINotFoundError(fmt.Sprintf("Address with IP %q was not found in region %q", ipAddress, region)) -} - -// GetBetaRegionAddressByIP returns the beta regional address matching the given IP address. -func (g *Cloud) GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("list", region) - addrs, err := g.c.BetaAddresses().List(ctx, region, filter.Regexp("address", ipAddress)) - - mc.Observe(err) - if err != nil { - return nil, err - } - - if len(addrs) > 1 { - klog.Warningf("More than one addresses matching the IP %q: %v", ipAddress, addrNames(addrs)) - } - for _, addr := range addrs { - if addr.Address == ipAddress { - return addr, nil - } - } - return nil, makeGoogleAPINotFoundError(fmt.Sprintf("Address with IP %q was not found in region %q", ipAddress, region)) -} - -func (g *Cloud) getNetworkTierFromAddress(name, region string) (string, error) { - - addr, err := g.GetRegionAddress(name, region) - if err != nil { - // Can't get the network tier, just return an error. - return "", err - } - return addr.NetworkTier, nil -} - -func addrNames(items interface{}) []string { - var ret []string - switch items := items.(type) { - case []compute.Address: - for _, a := range items { - ret = append(ret, a.Name) - } - case []computebeta.Address: - for _, a := range items { - ret = append(ret, a.Name) - } - } - return ret -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_alpha.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_alpha.go deleted file mode 100644 index 64a4f1b236157..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_alpha.go +++ /dev/null @@ -1,52 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -const ( - // AlphaFeatureILBSubsets allows InternalLoadBalancer services to include a subset - // of cluster nodes as backends instead of all nodes. - AlphaFeatureILBSubsets = "ILBSubsets" - - // AlphaFeatureSkipIGsManagement enabled L4 Regional Backend Services and - // disables instance group management in service controller - AlphaFeatureSkipIGsManagement = "SkipIGsManagement" -) - -// AlphaFeatureGate contains a mapping of alpha features to whether they are enabled -type AlphaFeatureGate struct { - features map[string]bool -} - -// Enabled returns true if the provided alpha feature is enabled -func (af *AlphaFeatureGate) Enabled(key string) bool { - if af == nil || af.features == nil { - return false - } - return af.features[key] -} - -// NewAlphaFeatureGate marks the provided alpha features as enabled -func NewAlphaFeatureGate(features []string) *AlphaFeatureGate { - featureMap := make(map[string]bool) - for _, name := range features { - featureMap[name] = true - } - return &AlphaFeatureGate{featureMap} -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_annotations.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_annotations.go deleted file mode 100644 index f1b4a921ffa57..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_annotations.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - - "k8s.io/klog/v2" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "k8s.io/api/core/v1" -) - -// LoadBalancerType defines a specific type for holding load balancer types (eg. Internal) -type LoadBalancerType string - -const ( - // ServiceAnnotationLoadBalancerType is annotated on a service with type LoadBalancer - // dictates what specific kind of GCP LB should be assembled. - // Currently, only "Internal" is supported. - ServiceAnnotationLoadBalancerType = "networking.gke.io/load-balancer-type" - - // Deprecating the old-style naming of LoadBalancerType annotation - deprecatedServiceAnnotationLoadBalancerType = "cloud.google.com/load-balancer-type" - - // LBTypeInternal is the constant for the official internal type. - LBTypeInternal LoadBalancerType = "Internal" - - // Deprecating the lowercase spelling of Internal. - deprecatedTypeInternalLowerCase LoadBalancerType = "internal" - - // ServiceAnnotationILBBackendShare is annotated on a service with "true" when users - // want to share GCP Backend Services for a set of internal load balancers. - // ALPHA feature - this may be removed in a future release. - ServiceAnnotationILBBackendShare = "alpha.cloud.google.com/load-balancer-backend-share" - - // This annotation did not correctly specify "alpha", so both annotations will be checked. - deprecatedServiceAnnotationILBBackendShare = "cloud.google.com/load-balancer-backend-share" - - // ServiceAnnotationILBAllowGlobalAccess is annotated on a service with "true" when users - // want to access the Internal LoadBalancer globally, and not restricted to the region it is - // created in. - ServiceAnnotationILBAllowGlobalAccess = "networking.gke.io/internal-load-balancer-allow-global-access" - - // ServiceAnnotationILBSubnet is annotated on a service with the name of the subnetwork - // the ILB IP Address should be assigned from. By default, this is the subnetwork that the - // cluster is created in. - ServiceAnnotationILBSubnet = "networking.gke.io/internal-load-balancer-subnet" - - // NetworkTierAnnotationKey is annotated on a Service object to indicate which - // network tier a GCP LB should use. The valid values are "Standard" and - // "Premium" (default). - NetworkTierAnnotationKey = "cloud.google.com/network-tier" - - // NetworkTierAnnotationStandard is an annotation to indicate the Service is on the Standard network tier - NetworkTierAnnotationStandard = cloud.NetworkTierStandard - - // NetworkTierAnnotationPremium is an annotation to indicate the Service is on the Premium network tier - NetworkTierAnnotationPremium = cloud.NetworkTierPremium - - // RBSAnnotationKey is annotated on a Service object to indicate - // opt-in mode for RBS NetLB - RBSAnnotationKey = "cloud.google.com/l4-rbs" - - // RBSEnabled is an annotation to indicate the Service is opt-in for RBS - RBSEnabled = "enabled" -) - -// GetLoadBalancerAnnotationType returns the type of GCP load balancer which should be assembled. -func GetLoadBalancerAnnotationType(service *v1.Service) LoadBalancerType { - var lbType LoadBalancerType - for _, ann := range []string{ - ServiceAnnotationLoadBalancerType, - deprecatedServiceAnnotationLoadBalancerType, - } { - if v, ok := service.Annotations[ann]; ok { - lbType = LoadBalancerType(v) - break - } - } - - switch lbType { - case LBTypeInternal, deprecatedTypeInternalLowerCase: - return LBTypeInternal - default: - return lbType - } -} - -// GetLoadBalancerAnnotationBackendShare returns whether this service's backend service should be -// shared with other load balancers. Health checks and the healthcheck firewall will be shared regardless. -func GetLoadBalancerAnnotationBackendShare(service *v1.Service) bool { - if l, exists := service.Annotations[ServiceAnnotationILBBackendShare]; exists && l == "true" { - return true - } - - // Check for deprecated annotation key - if l, exists := service.Annotations[deprecatedServiceAnnotationILBBackendShare]; exists && l == "true" { - klog.Warningf("Annotation %q is deprecated and replaced with an alpha-specific key: %q", deprecatedServiceAnnotationILBBackendShare, ServiceAnnotationILBBackendShare) - return true - } - - return false -} - -// GetServiceNetworkTier returns the network tier of GCP load balancer -// which should be assembled, and an error if the specified tier is not -// supported. -func GetServiceNetworkTier(service *v1.Service) (cloud.NetworkTier, error) { - l, ok := service.Annotations[NetworkTierAnnotationKey] - if !ok { - return cloud.NetworkTierDefault, nil - } - - v := cloud.NetworkTier(l) - switch v { - case cloud.NetworkTierStandard: - fallthrough - case cloud.NetworkTierPremium: - return v, nil - default: - return cloud.NetworkTierDefault, fmt.Errorf("unsupported network tier: %q", v) - } -} - -// ILBOptions represents the extra options specified when creating a -// load balancer. -type ILBOptions struct { - // AllowGlobalAccess Indicates whether global access is allowed for the LoadBalancer - AllowGlobalAccess bool - // SubnetName indicates which subnet the LoadBalancer VIPs should be assigned from - SubnetName string -} - -// GetLoadBalancerAnnotationAllowGlobalAccess returns if global access is enabled -// for the given loadbalancer service. -func GetLoadBalancerAnnotationAllowGlobalAccess(service *v1.Service) bool { - return service.Annotations[ServiceAnnotationILBAllowGlobalAccess] == "true" -} - -// GetLoadBalancerAnnotationSubnet returns the configured subnet to assign LoadBalancer IP from. -func GetLoadBalancerAnnotationSubnet(service *v1.Service) string { - if val, exists := service.Annotations[ServiceAnnotationILBSubnet]; exists { - return val - } - return "" -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_backendservice.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_backendservice.go deleted file mode 100644 index 1d0d69dad8f73..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_backendservice.go +++ /dev/null @@ -1,238 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newBackendServiceMetricContext(request, region string) *metricContext { - return newBackendServiceMetricContextWithVersion(request, region, computeV1Version) -} - -func newBackendServiceMetricContextWithVersion(request, region, version string) *metricContext { - return newGenericMetricContext("backendservice", request, region, unusedMetricLabel, version) -} - -// GetGlobalBackendService retrieves a backend by name. -func (g *Cloud) GetGlobalBackendService(name string) (*compute.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("get", "") - v, err := g.c.BackendServices().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// GetBetaGlobalBackendService retrieves beta backend by name. -func (g *Cloud) GetBetaGlobalBackendService(name string) (*computebeta.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("get", "", computeBetaVersion) - v, err := g.c.BetaBackendServices().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// GetAlphaGlobalBackendService retrieves alpha backend by name. -func (g *Cloud) GetAlphaGlobalBackendService(name string) (*computealpha.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("get", "", computeAlphaVersion) - v, err := g.c.AlphaBackendServices().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// UpdateGlobalBackendService applies the given BackendService as an update to -// an existing service. -func (g *Cloud) UpdateGlobalBackendService(bg *compute.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("update", "") - return mc.Observe(g.c.BackendServices().Update(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// UpdateBetaGlobalBackendService applies the given beta BackendService as an -// update to an existing service. -func (g *Cloud) UpdateBetaGlobalBackendService(bg *computebeta.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("update", "", computeBetaVersion) - return mc.Observe(g.c.BetaBackendServices().Update(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// UpdateAlphaGlobalBackendService applies the given alpha BackendService as an -// update to an existing service. -func (g *Cloud) UpdateAlphaGlobalBackendService(bg *computealpha.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("update", "", computeAlphaVersion) - return mc.Observe(g.c.AlphaBackendServices().Update(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// DeleteGlobalBackendService deletes the given BackendService by name. -func (g *Cloud) DeleteGlobalBackendService(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("delete", "") - return mc.Observe(g.c.BackendServices().Delete(ctx, meta.GlobalKey(name))) -} - -// CreateGlobalBackendService creates the given BackendService. -func (g *Cloud) CreateGlobalBackendService(bg *compute.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("create", "") - return mc.Observe(g.c.BackendServices().Insert(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// CreateBetaGlobalBackendService creates the given beta BackendService. -func (g *Cloud) CreateBetaGlobalBackendService(bg *computebeta.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("create", "", computeBetaVersion) - return mc.Observe(g.c.BetaBackendServices().Insert(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// CreateAlphaGlobalBackendService creates the given alpha BackendService. -func (g *Cloud) CreateAlphaGlobalBackendService(bg *computealpha.BackendService) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("create", "", computeAlphaVersion) - return mc.Observe(g.c.AlphaBackendServices().Insert(ctx, meta.GlobalKey(bg.Name), bg)) -} - -// ListGlobalBackendServices lists all backend services in the project. -func (g *Cloud) ListGlobalBackendServices() ([]*compute.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("list", "") - v, err := g.c.BackendServices().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// GetGlobalBackendServiceHealth returns the health of the BackendService -// identified by the given name, in the given instanceGroup. The -// instanceGroupLink is the fully qualified self link of an instance group. -func (g *Cloud) GetGlobalBackendServiceHealth(name string, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("get_health", "") - groupRef := &compute.ResourceGroupReference{Group: instanceGroupLink} - v, err := g.c.BackendServices().GetHealth(ctx, meta.GlobalKey(name), groupRef) - return v, mc.Observe(err) -} - -// GetRegionBackendService retrieves a backend by name. -func (g *Cloud) GetRegionBackendService(name, region string) (*compute.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("get", region) - v, err := g.c.RegionBackendServices().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// UpdateRegionBackendService applies the given BackendService as an update to -// an existing service. -func (g *Cloud) UpdateRegionBackendService(bg *compute.BackendService, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("update", region) - return mc.Observe(g.c.RegionBackendServices().Update(ctx, meta.RegionalKey(bg.Name, region), bg)) -} - -// DeleteRegionBackendService deletes the given BackendService by name. -func (g *Cloud) DeleteRegionBackendService(name, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("delete", region) - return mc.Observe(g.c.RegionBackendServices().Delete(ctx, meta.RegionalKey(name, region))) -} - -// CreateRegionBackendService creates the given BackendService. -func (g *Cloud) CreateRegionBackendService(bg *compute.BackendService, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("create", region) - return mc.Observe(g.c.RegionBackendServices().Insert(ctx, meta.RegionalKey(bg.Name, region), bg)) -} - -// ListRegionBackendServices lists all backend services in the project. -func (g *Cloud) ListRegionBackendServices(region string) ([]*compute.BackendService, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("list", region) - v, err := g.c.RegionBackendServices().List(ctx, region, filter.None) - return v, mc.Observe(err) -} - -// GetRegionalBackendServiceHealth returns the health of the BackendService -// identified by the given name, in the given instanceGroup. The -// instanceGroupLink is the fully qualified self link of an instance group. -func (g *Cloud) GetRegionalBackendServiceHealth(name, region string, instanceGroupLink string) (*compute.BackendServiceGroupHealth, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContext("get_health", region) - ref := &compute.ResourceGroupReference{Group: instanceGroupLink} - v, err := g.c.RegionBackendServices().GetHealth(ctx, meta.RegionalKey(name, region), ref) - return v, mc.Observe(err) -} - -// SetSecurityPolicyForBetaGlobalBackendService sets the given -// SecurityPolicyReference for the BackendService identified by the given name. -func (g *Cloud) SetSecurityPolicyForBetaGlobalBackendService(backendServiceName string, securityPolicyReference *computebeta.SecurityPolicyReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("set_security_policy", "", computeBetaVersion) - return mc.Observe(g.c.BetaBackendServices().SetSecurityPolicy(ctx, meta.GlobalKey(backendServiceName), securityPolicyReference)) -} - -// SetSecurityPolicyForAlphaGlobalBackendService sets the given -// SecurityPolicyReference for the BackendService identified by the given name. -func (g *Cloud) SetSecurityPolicyForAlphaGlobalBackendService(backendServiceName string, securityPolicyReference *computealpha.SecurityPolicyReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newBackendServiceMetricContextWithVersion("set_security_policy", "", computeAlphaVersion) - return mc.Observe(g.c.AlphaBackendServices().SetSecurityPolicy(ctx, meta.GlobalKey(backendServiceName), securityPolicyReference)) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_cert.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_cert.go deleted file mode 100644 index 160be3239612a..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_cert.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newCertMetricContext(request string) *metricContext { - return newGenericMetricContext("cert", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetSslCertificate returns the SslCertificate by name. -func (g *Cloud) GetSslCertificate(name string) (*compute.SslCertificate, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newCertMetricContext("get") - v, err := g.c.SslCertificates().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// CreateSslCertificate creates and returns a SslCertificate. -func (g *Cloud) CreateSslCertificate(sslCerts *compute.SslCertificate) (*compute.SslCertificate, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newCertMetricContext("create") - err := g.c.SslCertificates().Insert(ctx, meta.GlobalKey(sslCerts.Name), sslCerts) - if err != nil { - return nil, mc.Observe(err) - } - return g.GetSslCertificate(sslCerts.Name) -} - -// DeleteSslCertificate deletes the SslCertificate by name. -func (g *Cloud) DeleteSslCertificate(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newCertMetricContext("delete") - return mc.Observe(g.c.SslCertificates().Delete(ctx, meta.GlobalKey(name))) -} - -// ListSslCertificates lists all SslCertificates in the project. -func (g *Cloud) ListSslCertificates() ([]*compute.SslCertificate, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newCertMetricContext("list") - v, err := g.c.SslCertificates().List(ctx, filter.None) - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusterid.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusterid.go deleted file mode 100644 index fe474ed724897..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusterid.go +++ /dev/null @@ -1,270 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "crypto/rand" - "encoding/hex" - "errors" - "fmt" - "reflect" - "sync" - "time" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" - "k8s.io/klog/v2" -) - -const ( - // UIDConfigMapName is the Key used to persist UIDs to configmaps. - UIDConfigMapName = "ingress-uid" - - // UIDNamespace is the namespace which contains the above config map - UIDNamespace = metav1.NamespaceSystem - - // UIDCluster is the data keys for looking up the clusters UID - UIDCluster = "uid" - - // UIDProvider is the data keys for looking up the providers UID - UIDProvider = "provider-uid" - - // UIDLengthBytes is the length of a UID - UIDLengthBytes = 8 - - // Frequency of the updateFunc event handler being called - // This does not actually query the apiserver for current state - the local cache value is used. - updateFuncFrequency = 10 * time.Minute -) - -// ClusterID is the struct for maintaining information about this cluster's ID -type ClusterID struct { - idLock sync.RWMutex - client clientset.Interface - cfgMapKey string - store cache.Store - providerID *string - clusterID *string -} - -// Continually watches for changes to the cluster id config map -func (g *Cloud) watchClusterID(stop <-chan struct{}) { - g.ClusterID = ClusterID{ - cfgMapKey: fmt.Sprintf("%v/%v", UIDNamespace, UIDConfigMapName), - client: g.client, - } - - mapEventHandler := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - m, ok := obj.(*v1.ConfigMap) - if !ok || m == nil { - klog.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", obj, ok) - return - } - if m.Namespace != UIDNamespace || - m.Name != UIDConfigMapName { - return - } - - klog.V(4).Infof("Observed new configmap for clusteriD: %v, %v; setting local values", m.Name, m.Data) - g.ClusterID.update(m) - }, - UpdateFunc: func(old, cur interface{}) { - m, ok := cur.(*v1.ConfigMap) - if !ok || m == nil { - klog.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", cur, ok) - return - } - - if m.Namespace != UIDNamespace || - m.Name != UIDConfigMapName { - return - } - - if reflect.DeepEqual(old, cur) { - return - } - - klog.V(4).Infof("Observed updated configmap for clusteriD %v, %v; setting local values", m.Name, m.Data) - g.ClusterID.update(m) - }, - } - - listerWatcher := cache.NewListWatchFromClient(g.ClusterID.client.CoreV1().RESTClient(), "configmaps", UIDNamespace, fields.Everything()) - var controller cache.Controller - g.ClusterID.store, controller = cache.NewInformer(newSingleObjectListerWatcher(listerWatcher, UIDConfigMapName), &v1.ConfigMap{}, updateFuncFrequency, mapEventHandler) - - controller.Run(stop) -} - -// GetID returns the id which is unique to this cluster -// if federated, return the provider id (unique to the cluster) -// if not federated, return the cluster id -func (ci *ClusterID) GetID() (string, error) { - if err := ci.getOrInitialize(); err != nil { - return "", err - } - - ci.idLock.RLock() - defer ci.idLock.RUnlock() - if ci.clusterID == nil { - return "", errors.New("Could not retrieve cluster id") - } - - // If provider ID is set, (Federation is enabled) use this field - if ci.providerID != nil { - return *ci.providerID, nil - } - - // providerID is not set, use the cluster id - return *ci.clusterID, nil -} - -// GetFederationID returns the id which could represent the entire Federation -// or just the cluster if not federated. -func (ci *ClusterID) GetFederationID() (string, bool, error) { - if err := ci.getOrInitialize(); err != nil { - return "", false, err - } - - ci.idLock.RLock() - defer ci.idLock.RUnlock() - if ci.clusterID == nil { - return "", false, errors.New("could not retrieve cluster id") - } - - // If provider ID is not set, return false - if ci.providerID == nil || *ci.clusterID == *ci.providerID { - return "", false, nil - } - - return *ci.clusterID, true, nil -} - -// getOrInitialize either grabs the configmaps current value or defines the value -// and sets the configmap. This is for the case of the user calling GetClusterID() -// before the watch has begun. -func (ci *ClusterID) getOrInitialize() error { - if ci.store == nil { - return errors.New("Cloud.ClusterID is not ready. Call Initialize() before using") - } - - if ci.clusterID != nil { - return nil - } - - exists, err := ci.getConfigMap() - if err != nil { - return err - } else if exists { - return nil - } - - // The configmap does not exist - let's try creating one. - newID, err := makeUID() - if err != nil { - return err - } - - klog.V(4).Infof("Creating clusteriD: %v", newID) - cfg := &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: UIDConfigMapName, - Namespace: UIDNamespace, - }, - } - cfg.Data = map[string]string{ - UIDCluster: newID, - UIDProvider: newID, - } - - if _, err := ci.client.CoreV1().ConfigMaps(UIDNamespace).Create(context.TODO(), cfg, metav1.CreateOptions{}); err != nil { - klog.Errorf("GCE cloud provider failed to create %v config map to store cluster id: %v", ci.cfgMapKey, err) - return err - } - - klog.V(2).Infof("Created a config map containing clusteriD: %v", newID) - ci.update(cfg) - return nil -} - -func (ci *ClusterID) getConfigMap() (bool, error) { - item, exists, err := ci.store.GetByKey(ci.cfgMapKey) - if err != nil { - return false, err - } - if !exists { - return false, nil - } - - m, ok := item.(*v1.ConfigMap) - if !ok || m == nil { - err = fmt.Errorf("Expected v1.ConfigMap, item=%+v, typeIsOk=%v", item, ok) - klog.Error(err) - return false, err - } - ci.update(m) - return true, nil -} - -func (ci *ClusterID) update(m *v1.ConfigMap) { - ci.idLock.Lock() - defer ci.idLock.Unlock() - if clusterID, exists := m.Data[UIDCluster]; exists { - ci.clusterID = &clusterID - } - if provID, exists := m.Data[UIDProvider]; exists { - ci.providerID = &provID - } -} - -func makeUID() (string, error) { - b := make([]byte, UIDLengthBytes) - _, err := rand.Read(b) - if err != nil { - return "", err - } - return hex.EncodeToString(b), nil -} - -func newSingleObjectListerWatcher(lw cache.ListerWatcher, objectName string) *singleObjListerWatcher { - return &singleObjListerWatcher{lw: lw, objectName: objectName} -} - -type singleObjListerWatcher struct { - lw cache.ListerWatcher - objectName string -} - -func (sow *singleObjListerWatcher) List(options metav1.ListOptions) (runtime.Object, error) { - options.FieldSelector = "metadata.name=" + sow.objectName - return sow.lw.List(options) -} - -func (sow *singleObjListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { - options.FieldSelector = "metadata.name=" + sow.objectName - return sow.lw.Watch(options) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusters.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusters.go deleted file mode 100644 index 303dd5cb11acb..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_clusters.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - - "google.golang.org/api/container/v1" - "k8s.io/klog/v2" -) - -func newClustersMetricContext(request, zone string) *metricContext { - return newGenericMetricContext("clusters", request, unusedMetricLabel, zone, computeV1Version) -} - -// ListClusters will return a list of cluster names for the associated project -func (g *Cloud) ListClusters(ctx context.Context) ([]string, error) { - allClusters := []string{} - - for _, zone := range g.managedZones { - clusters, err := g.listClustersInZone(zone) - if err != nil { - return nil, err - } - // TODO: Scoping? Do we need to qualify the cluster name? - allClusters = append(allClusters, clusters...) - } - - return allClusters, nil -} - -// GetManagedClusters will return the cluster objects associated to this project -func (g *Cloud) GetManagedClusters(ctx context.Context) ([]*container.Cluster, error) { - managedClusters := []*container.Cluster{} - - if g.regional { - var err error - managedClusters, err = g.getClustersInLocation(g.region) - if err != nil { - return nil, err - } - } else if len(g.managedZones) >= 1 { - for _, zone := range g.managedZones { - clusters, err := g.getClustersInLocation(zone) - if err != nil { - return nil, err - } - managedClusters = append(managedClusters, clusters...) - } - } else { - return nil, fmt.Errorf("no zones associated with this cluster(%s)", g.ProjectID()) - } - - return managedClusters, nil -} - -// Master returned the dns address of the master -func (g *Cloud) Master(ctx context.Context, clusterName string) (string, error) { - return "k8s-" + clusterName + "-master.internal", nil -} - -func (g *Cloud) listClustersInZone(zone string) ([]string, error) { - clusters, err := g.getClustersInLocation(zone) - if err != nil { - return nil, err - } - - result := []string{} - for _, cluster := range clusters { - result = append(result, cluster.Name) - } - return result, nil -} - -func (g *Cloud) getClustersInLocation(zoneOrRegion string) ([]*container.Cluster, error) { - // TODO: Issue/68913 migrate metric to list_location instead of list_zone. - mc := newClustersMetricContext("list_zone", zoneOrRegion) - // TODO: use PageToken to list all not just the first 500 - location := getLocationName(g.projectID, zoneOrRegion) - list, err := g.containerService.Projects.Locations.Clusters.List(location).Do() - if err != nil { - return nil, mc.Observe(err) - } - if list.Header.Get("nextPageToken") != "" { - klog.Errorf("Failed to get all clusters for request, received next page token %s", list.Header.Get("nextPageToken")) - } - - return list.Clusters, mc.Observe(nil) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_disks.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_disks.go deleted file mode 100644 index af531cf9bdcf1..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_disks.go +++ /dev/null @@ -1,1054 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "strings" - - v1 "k8s.io/api/core/v1" - - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - cloudprovider "k8s.io/cloud-provider" - cloudvolume "k8s.io/cloud-provider/volume" - volerr "k8s.io/cloud-provider/volume/errors" - volumehelpers "k8s.io/cloud-provider/volume/helpers" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" - "k8s.io/klog/v2" -) - -// DiskType defines a specific type for holding disk types (eg. pd-ssd) -type DiskType string - -const ( - // DiskTypeSSD the type for persistent SSD storage - DiskTypeSSD = "pd-ssd" - - // DiskTypeStandard the type for standard persistent storage - DiskTypeStandard = "pd-standard" - - diskTypeDefault = DiskTypeStandard - diskTypeURITemplateSingleZone = "%s/zones/%s/diskTypes/%s" // {gce.projectID}/zones/{disk.Zone}/diskTypes/{disk.Type}" - diskTypeURITemplateRegional = "%s/regions/%s/diskTypes/%s" // {gce.projectID}/regions/{disk.Region}/diskTypes/{disk.Type}" - diskTypePersistent = "PERSISTENT" - - diskSourceURITemplateSingleZone = "%s/zones/%s/disks/%s" // {gce.projectID}/zones/{disk.Zone}/disks/{disk.Name}" - diskSourceURITemplateRegional = "%s/regions/%s/disks/%s" //{gce.projectID}/regions/{disk.Region}/disks/repd" - - replicaZoneURITemplateSingleZone = "%s/zones/%s" // {gce.projectID}/zones/{disk.Zone} - - diskKind = "compute#disk" -) - -type diskServiceManager interface { - // Creates a new persistent disk on GCE with the given disk spec. - CreateDiskOnCloudProvider( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zone string) (*Disk, error) - - // Creates a new regional persistent disk on GCE with the given disk spec. - CreateRegionalDiskOnCloudProvider( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zones sets.String) (*Disk, error) - - // Deletes the persistent disk from GCE with the given diskName. - DeleteDiskOnCloudProvider(zone string, disk string) error - - // Deletes the regional persistent disk from GCE with the given diskName. - DeleteRegionalDiskOnCloudProvider(diskName string) error - - // Attach a persistent disk on GCE with the given disk spec to the specified instance. - AttachDiskOnCloudProvider( - disk *Disk, - readWrite string, - instanceZone string, - instanceName string) error - - // Detach a persistent disk on GCE with the given disk spec from the specified instance. - DetachDiskOnCloudProvider( - instanceZone string, - instanceName string, - devicePath string) error - - ResizeDiskOnCloudProvider(disk *Disk, sizeGb int64, zone string) error - RegionalResizeDiskOnCloudProvider(disk *Disk, sizeGb int64) error - - // Gets the persistent disk from GCE with the given diskName. - GetDiskFromCloudProvider(zone string, diskName string) (*Disk, error) - - // Gets the regional persistent disk from GCE with the given diskName. - GetRegionalDiskFromCloudProvider(diskName string) (*Disk, error) -} - -type gceServiceManager struct { - gce *Cloud -} - -var _ diskServiceManager = &gceServiceManager{} - -func (manager *gceServiceManager) CreateDiskOnCloudProvider( - name string, - sizeGb int64, - tagsStr string, - diskType string, - zone string) (*Disk, error) { - diskTypeURI, err := manager.getDiskTypeURI( - manager.gce.region /* diskRegion */, singleZone{zone}, diskType) - if err != nil { - return nil, err - } - - diskToCreateV1 := &compute.Disk{ - Name: name, - SizeGb: sizeGb, - Description: tagsStr, - Type: diskTypeURI, - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - disk := &Disk{ - ZoneInfo: singleZone{zone}, - Region: manager.gce.region, - Kind: diskKind, - Type: diskTypeURI, - SizeGb: sizeGb, - } - return disk, manager.gce.c.Disks().Insert(ctx, meta.ZonalKey(name, zone), diskToCreateV1) -} - -func (manager *gceServiceManager) CreateRegionalDiskOnCloudProvider( - name string, - sizeGb int64, - tagsStr string, - diskType string, - replicaZones sets.String) (*Disk, error) { - - diskTypeURI, err := manager.getDiskTypeURI( - manager.gce.region /* diskRegion */, multiZone{replicaZones}, diskType) - if err != nil { - return nil, err - } - fullyQualifiedReplicaZones := []string{} - for _, replicaZone := range replicaZones.UnsortedList() { - fullyQualifiedReplicaZones = append( - fullyQualifiedReplicaZones, manager.getReplicaZoneURI(replicaZone)) - } - - diskToCreate := &compute.Disk{ - Name: name, - SizeGb: sizeGb, - Description: tagsStr, - Type: diskTypeURI, - ReplicaZones: fullyQualifiedReplicaZones, - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - disk := &Disk{ - ZoneInfo: multiZone{replicaZones}, - Region: manager.gce.region, - Name: name, - Kind: diskKind, - Type: diskTypeURI, - SizeGb: sizeGb, - } - return disk, manager.gce.c.RegionDisks().Insert(ctx, meta.RegionalKey(name, manager.gce.region), diskToCreate) -} - -func (manager *gceServiceManager) AttachDiskOnCloudProvider( - disk *Disk, - readWrite string, - instanceZone string, - instanceName string) error { - source, err := manager.getDiskSourceURI(disk) - if err != nil { - return err - } - - attachedDiskV1 := &compute.AttachedDisk{ - DeviceName: disk.Name, - Kind: disk.Kind, - Mode: readWrite, - Source: source, - Type: diskTypePersistent, - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.Instances().AttachDisk(ctx, meta.ZonalKey(instanceName, instanceZone), attachedDiskV1) -} - -func (manager *gceServiceManager) DetachDiskOnCloudProvider( - instanceZone string, - instanceName string, - devicePath string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.Instances().DetachDisk(ctx, meta.ZonalKey(instanceName, instanceZone), devicePath) -} - -func (manager *gceServiceManager) GetDiskFromCloudProvider( - zone string, - diskName string) (*Disk, error) { - if zone == "" { - return nil, fmt.Errorf("can not fetch disk %q, zone is empty", diskName) - } - - if diskName == "" { - return nil, fmt.Errorf("can not fetch disk, zone is specified (%q), but disk name is empty", zone) - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - diskStable, err := manager.gce.c.Disks().Get(ctx, meta.ZonalKey(diskName, zone)) - if err != nil { - return nil, err - } - - zoneInfo := singleZone{strings.TrimSpace(lastComponent(diskStable.Zone))} - if zoneInfo.zone == "" { - zoneInfo = singleZone{zone} - } - - region, err := manager.getRegionFromZone(zoneInfo) - if err != nil { - return nil, fmt.Errorf("failed to extract region from zone for %q/%q err=%v", zone, diskName, err) - } - - return &Disk{ - ZoneInfo: zoneInfo, - Region: region, - Name: diskStable.Name, - Kind: diskStable.Kind, - Type: diskStable.Type, - SizeGb: diskStable.SizeGb, - }, nil -} - -func (manager *gceServiceManager) GetRegionalDiskFromCloudProvider( - diskName string) (*Disk, error) { - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - diskBeta, err := manager.gce.c.RegionDisks().Get(ctx, meta.RegionalKey(diskName, manager.gce.region)) - if err != nil { - return nil, err - } - - zones := sets.NewString() - for _, zoneURI := range diskBeta.ReplicaZones { - zones.Insert(lastComponent(zoneURI)) - } - - return &Disk{ - ZoneInfo: multiZone{zones}, - Region: lastComponent(diskBeta.Region), - Name: diskBeta.Name, - Kind: diskBeta.Kind, - Type: diskBeta.Type, - SizeGb: diskBeta.SizeGb, - }, nil -} - -func (manager *gceServiceManager) DeleteDiskOnCloudProvider( - zone string, - diskName string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.Disks().Delete(ctx, meta.ZonalKey(diskName, zone)) -} - -func (manager *gceServiceManager) DeleteRegionalDiskOnCloudProvider( - diskName string) error { - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.RegionDisks().Delete(ctx, meta.RegionalKey(diskName, manager.gce.region)) -} - -func (manager *gceServiceManager) getDiskSourceURI(disk *Disk) (string, error) { - getProjectsAPIEndpoint := manager.getProjectsAPIEndpoint() - - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" || disk.Region == "" { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD does not have zone/region information: %#v", disk) - } - - return getProjectsAPIEndpoint + fmt.Sprintf( - diskSourceURITemplateSingleZone, - manager.gce.projectID, - zoneInfo.zone, - disk.Name), nil - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", disk) - } - return getProjectsAPIEndpoint + fmt.Sprintf( - diskSourceURITemplateRegional, - manager.gce.projectID, - disk.Region, - disk.Name), nil - case nil: - // Unexpected, but sanity-check - return "", fmt.Errorf("PD did not have ZoneInfo: %v", disk) - default: - // Unexpected, but sanity-check - return "", fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } -} - -func (manager *gceServiceManager) getDiskTypeURI( - diskRegion string, diskZoneInfo zoneType, diskType string) (string, error) { - - getProjectsAPIEndpoint := manager.getProjectsAPIEndpoint() - - switch zoneInfo := diskZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" { - return "", fmt.Errorf("zone is empty: %v", zoneInfo) - } - - return getProjectsAPIEndpoint + fmt.Sprintf( - diskTypeURITemplateSingleZone, - manager.gce.projectID, - zoneInfo.zone, - diskType), nil - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - return "", fmt.Errorf("zoneInfo is regional but does not have any replicaZones specified: %v", zoneInfo) - } - return getProjectsAPIEndpoint + fmt.Sprintf( - diskTypeURITemplateRegional, - manager.gce.projectID, - diskRegion, - diskType), nil - case nil: - return "", fmt.Errorf("zoneInfo nil") - default: - return "", fmt.Errorf("zoneInfo has unexpected type %T", zoneInfo) - } -} - -func (manager *gceServiceManager) getReplicaZoneURI(zone string) string { - return manager.getProjectsAPIEndpoint() + fmt.Sprintf( - replicaZoneURITemplateSingleZone, - manager.gce.projectID, - zone) -} - -func (manager *gceServiceManager) getRegionFromZone(zoneInfo zoneType) (string, error) { - var zone string - switch zoneInfo := zoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is single zone, but zone is not specified: %#v", zoneInfo) - } - - zone = zoneInfo.zone - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return "", fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", zoneInfo) - } - - zone = zoneInfo.replicaZones.UnsortedList()[0] - case nil: - // Unexpected, but sanity-check - return "", fmt.Errorf("zoneInfo is nil") - default: - // Unexpected, but sanity-check - return "", fmt.Errorf("zoneInfo has unexpected type %T", zoneInfo) - } - - region, err := GetGCERegion(zone) - if err != nil { - klog.Warningf("failed to parse GCE region from zone %q: %v", zone, err) - region = manager.gce.region - } - - return region, nil -} - -func (manager *gceServiceManager) ResizeDiskOnCloudProvider(disk *Disk, sizeGb int64, zone string) error { - resizeServiceRequest := &compute.DisksResizeRequest{ - SizeGb: sizeGb, - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.Disks().Resize(ctx, meta.ZonalKey(disk.Name, zone), resizeServiceRequest) -} - -func (manager *gceServiceManager) RegionalResizeDiskOnCloudProvider(disk *Disk, sizeGb int64) error { - - resizeServiceRequest := &compute.RegionDisksResizeRequest{ - SizeGb: sizeGb, - } - - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - return manager.gce.c.RegionDisks().Resize(ctx, meta.RegionalKey(disk.Name, disk.Region), resizeServiceRequest) -} - -// Disks is interface for manipulation with GCE PDs. -type Disks interface { - // AttachDisk attaches given disk to the node with the specified NodeName. - // Current instance is used when instanceID is empty string. - AttachDisk(diskName string, nodeName types.NodeName, readOnly bool, regional bool) error - - // DetachDisk detaches given disk to the node with the specified NodeName. - // Current instance is used when nodeName is empty string. - DetachDisk(devicePath string, nodeName types.NodeName) error - - // DiskIsAttached checks if a disk is attached to the node with the specified NodeName. - DiskIsAttached(diskName string, nodeName types.NodeName) (bool, error) - - // DisksAreAttached is a batch function to check if a list of disks are attached - // to the node with the specified NodeName. - DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) - - // BulkDisksAreAttached is a batch function to check if all corresponding disks are attached to the - // nodes specified with nodeName. - BulkDisksAreAttached(diskByNodes map[types.NodeName][]string) (map[types.NodeName]map[string]bool, error) - - // CreateDisk creates a new PD with given properties. Tags are serialized - // as JSON into Description field. - CreateDisk(name string, diskType string, zone string, sizeGb int64, tags map[string]string) (*Disk, error) - - // CreateRegionalDisk creates a new Regional Persistent Disk, with the - // specified properties, replicated to the specified zones. Tags are - // serialized as JSON into Description field. - CreateRegionalDisk(name string, diskType string, replicaZones sets.String, sizeGb int64, tags map[string]string) (*Disk, error) - - // DeleteDisk deletes PD. - DeleteDisk(diskToDelete string) error - - // ResizeDisk resizes PD and returns new disk size - ResizeDisk(diskToResize string, oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error) - - // GetAutoLabelsForPD returns labels to apply to PersistentVolume - // representing this PD, namely failure domain and zone. - GetAutoLabelsForPD(disk *Disk) (map[string]string, error) -} - -// Cloud implements Disks. -var _ Disks = (*Cloud)(nil) - -// Cloud implements PVLabeler. -var _ cloudprovider.PVLabeler = (*Cloud)(nil) - -// Disk holds all relevant data about an instance of GCE storage -type Disk struct { - ZoneInfo zoneType - Region string - Name string - Kind string - Type string - SizeGb int64 -} - -type zoneType interface { - isZoneType() -} - -type multiZone struct { - replicaZones sets.String -} - -type singleZone struct { - zone string -} - -func (m multiZone) isZoneType() {} -func (s singleZone) isZoneType() {} - -func newDiskMetricContextZonal(request, region, zone string) *metricContext { - return newGenericMetricContext("disk", request, region, zone, computeV1Version) -} - -func newDiskMetricContextRegional(request, region string) *metricContext { - return newGenericMetricContext("disk", request, region, unusedMetricLabel, computeV1Version) -} - -// GetLabelsForVolume retrieved the label info for the provided volume -func (g *Cloud) GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVolume) (map[string]string, error) { - // Ignore any volumes that are being provisioned - if pv.Spec.GCEPersistentDisk.PDName == cloudvolume.ProvisionedVolumeName { - return nil, nil - } - - // If the zone is already labeled, honor the hint - name := pv.Spec.GCEPersistentDisk.PDName - zone := pv.Labels[v1.LabelTopologyZone] - if zone == "" { - zone = pv.Labels[v1.LabelFailureDomainBetaZone] - } - - disk, err := g.getDiskByNameAndOptionalLabelZones(name, zone) - if err != nil { - return nil, err - } - labels, err := g.GetAutoLabelsForPD(disk) - if err != nil { - return nil, err - } - - return labels, nil -} - -// getDiskByNameAndOptionalZone returns a Disk object for a disk (zonal or regional) for given name and (optional) zone(s) label. -func (g *Cloud) getDiskByNameAndOptionalLabelZones(name, labelZone string) (*Disk, error) { - if labelZone == "" { - return g.GetDiskByNameUnknownZone(name) - } - zoneSet, err := volumehelpers.LabelZonesToSet(labelZone) - if err != nil { - return nil, err - } - if len(zoneSet) > 1 { - // Regional PD - return g.getRegionalDiskByName(name) - } - return g.getDiskByName(name, labelZone) -} - -// AttachDisk attaches given disk to the node with the specified NodeName. -// Current instance is used when instanceID is empty string. -func (g *Cloud) AttachDisk(diskName string, nodeName types.NodeName, readOnly bool, regional bool) error { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := g.getInstanceByName(instanceName) - if err != nil { - return fmt.Errorf("error getting instance %q", instanceName) - } - - // Try fetching as regional PD - var disk *Disk - var mc *metricContext - if regional { - disk, err = g.getRegionalDiskByName(diskName) - if err != nil { - return err - } - mc = newDiskMetricContextRegional("attach", g.region) - } else { - disk, err = g.getDiskByName(diskName, instance.Zone) - if err != nil { - return err - } - mc = newDiskMetricContextZonal("attach", g.region, instance.Zone) - } - - readWrite := "READ_WRITE" - if readOnly { - readWrite = "READ_ONLY" - } - - return mc.Observe(g.manager.AttachDiskOnCloudProvider(disk, readWrite, instance.Zone, instance.Name)) -} - -// DetachDisk detaches given disk to the node with the specified NodeName. -// Current instance is used when nodeName is empty string. -func (g *Cloud) DetachDisk(devicePath string, nodeName types.NodeName) error { - instanceName := mapNodeNameToInstanceName(nodeName) - inst, err := g.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - klog.Warningf( - "Instance %q does not exist. DetachDisk will assume PD %q is not attached to it.", - instanceName, - devicePath) - return nil - } - - return fmt.Errorf("error getting instance %q", instanceName) - } - - mc := newDiskMetricContextZonal("detach", g.region, inst.Zone) - return mc.Observe(g.manager.DetachDiskOnCloudProvider(inst.Zone, inst.Name, devicePath)) -} - -// DiskIsAttached checks if a disk is attached to the node with the specified NodeName. -func (g *Cloud) DiskIsAttached(diskName string, nodeName types.NodeName) (bool, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := g.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - klog.Warningf( - "Instance %q does not exist. DiskIsAttached will assume PD %q is not attached to it.", - instanceName, - diskName) - return false, nil - } - - return false, err - } - - for _, disk := range instance.Disks { - if disk.DeviceName == diskName { - // Disk is still attached to node - return true, nil - } - } - - return false, nil -} - -// DisksAreAttached is a batch function to check if a list of disks are attached -// to the node with the specified NodeName. -func (g *Cloud) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) { - attached := make(map[string]bool) - for _, diskName := range diskNames { - attached[diskName] = false - } - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := g.getInstanceByName(instanceName) - if err != nil { - if err == cloudprovider.InstanceNotFound { - // If instance no longer exists, safe to assume volume is not attached. - klog.Warningf( - "Instance %q does not exist. DisksAreAttached will assume PD %v are not attached to it.", - instanceName, - diskNames) - return attached, nil - } - - return attached, err - } - - for _, instanceDisk := range instance.Disks { - for _, diskName := range diskNames { - if instanceDisk.DeviceName == diskName { - // Disk is still attached to node - attached[diskName] = true - } - } - } - - return attached, nil -} - -// BulkDisksAreAttached is a batch function to check if all corresponding disks are attached to the -// nodes specified with nodeName. -func (g *Cloud) BulkDisksAreAttached(diskByNodes map[types.NodeName][]string) (map[types.NodeName]map[string]bool, error) { - instanceNames := []string{} - for nodeName := range diskByNodes { - instanceNames = append(instanceNames, mapNodeNameToInstanceName(nodeName)) - } - - // List all instances with the given instance names - // Then for each instance listed, add the disks attached to that instance to a map - listedInstances, err := g.getFoundInstanceByNames(instanceNames) - if err != nil { - return nil, fmt.Errorf("error listing instances: %v", err) - } - listedInstanceNamesToDisks := make(map[string][]*compute.AttachedDisk) - for _, instance := range listedInstances { - listedInstanceNamesToDisks[instance.Name] = instance.Disks - } - - verifyDisksAttached := make(map[types.NodeName]map[string]bool) - - // For each node and its desired attached disks that needs to be verified - for nodeName, disksToVerify := range diskByNodes { - instanceName := canonicalizeInstanceName(mapNodeNameToInstanceName(nodeName)) - disksActuallyAttached := listedInstanceNamesToDisks[instanceName] - verifyDisksAttached[nodeName] = verifyDisksAttachedToNode(disksToVerify, disksActuallyAttached) - } - - return verifyDisksAttached, nil -} - -// CreateDisk creates a new Persistent Disk, with the specified name & -// size, in the specified zone. It stores specified tags encoded in -// JSON in Description field. -func (g *Cloud) CreateDisk( - name string, diskType string, zone string, sizeGb int64, tags map[string]string) (*Disk, error) { - // Do not allow creation of PDs in zones that are do not have nodes. Such PDs - // are not currently usable. - curZones, err := g.GetAllCurrentZones() - if err != nil { - return nil, err - } - if !curZones.Has(zone) { - return nil, fmt.Errorf("kubernetes does not have a node in zone %q", zone) - } - - tagsStr, err := g.encodeDiskTags(tags) - if err != nil { - return nil, err - } - - diskType, err = getDiskType(diskType) - if err != nil { - return nil, err - } - - mc := newDiskMetricContextZonal("create", g.region, zone) - disk, err := g.manager.CreateDiskOnCloudProvider( - name, sizeGb, tagsStr, diskType, zone) - - mc.Observe(err) - if err != nil { - if isGCEError(err, "alreadyExists") { - klog.Warningf("GCE PD %q already exists, reusing", name) - return g.manager.GetDiskFromCloudProvider(zone, name) - } - return nil, err - } - return disk, nil -} - -// CreateRegionalDisk creates a new Regional Persistent Disk, with the specified -// name & size, replicated to the specified zones. It stores specified tags -// encoded in JSON in Description field. -func (g *Cloud) CreateRegionalDisk( - name string, diskType string, replicaZones sets.String, sizeGb int64, tags map[string]string) (*Disk, error) { - - // Do not allow creation of PDs in zones that are do not have nodes. Such PDs - // are not currently usable. This functionality should be reverted to checking - // against managed zones if we want users to be able to create RegionalDisks - // in zones where there are no nodes - curZones, err := g.GetAllCurrentZones() - if err != nil { - return nil, err - } - if !curZones.IsSuperset(replicaZones) { - return nil, fmt.Errorf("kubernetes does not have nodes in specified zones: %q. Zones that contain nodes: %q", replicaZones.Difference(curZones), curZones) - } - - tagsStr, err := g.encodeDiskTags(tags) - if err != nil { - return nil, err - } - - diskType, err = getDiskType(diskType) - if err != nil { - return nil, err - } - - mc := newDiskMetricContextRegional("create", g.region) - - disk, err := g.manager.CreateRegionalDiskOnCloudProvider( - name, sizeGb, tagsStr, diskType, replicaZones) - - mc.Observe(err) - if err != nil { - if isGCEError(err, "alreadyExists") { - klog.Warningf("GCE PD %q already exists, reusing", name) - return g.manager.GetRegionalDiskFromCloudProvider(name) - } - return nil, err - } - return disk, nil -} - -func getDiskType(diskType string) (string, error) { - switch diskType { - case DiskTypeSSD, DiskTypeStandard: - return diskType, nil - case "": - return diskTypeDefault, nil - default: - return "", fmt.Errorf("invalid GCE disk type %q", diskType) - } -} - -// DeleteDisk deletes rgw referenced persistent disk. -func (g *Cloud) DeleteDisk(diskToDelete string) error { - err := g.doDeleteDisk(diskToDelete) - if isGCEError(err, "resourceInUseByAnotherResource") { - return volerr.NewDeletedVolumeInUseError(err.Error()) - } - - if err == cloudprovider.DiskNotFound { - return nil - } - return err -} - -// ResizeDisk expands given disk and returns new disk size -func (g *Cloud) ResizeDisk(diskToResize string, oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error) { - disk, err := g.GetDiskByNameUnknownZone(diskToResize) - if err != nil { - return oldSize, err - } - - // GCE resizes in chunks of GiBs - requestGIB, err := volumehelpers.RoundUpToGiB(newSize) - if err != nil { - return oldSize, err - } - - newSizeQuant := resource.MustParse(fmt.Sprintf("%dGi", requestGIB)) - - // If disk is already of size equal or greater than requested size, we simply return - if disk.SizeGb >= requestGIB { - return newSizeQuant, nil - } - - var mc *metricContext - - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - mc = newDiskMetricContextZonal("resize", disk.Region, zoneInfo.zone) - err := g.manager.ResizeDiskOnCloudProvider(disk, requestGIB, zoneInfo.zone) - - if err != nil { - return oldSize, mc.Observe(err) - } - return newSizeQuant, mc.Observe(err) - case multiZone: - mc = newDiskMetricContextRegional("resize", disk.Region) - err := g.manager.RegionalResizeDiskOnCloudProvider(disk, requestGIB) - - if err != nil { - return oldSize, mc.Observe(err) - } - return newSizeQuant, mc.Observe(err) - case nil: - return oldSize, fmt.Errorf("PD has nil ZoneInfo: %v", disk) - default: - return oldSize, fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } -} - -// GetAutoLabelsForPD builds the labels that should be automatically added to a PersistentVolume backed by a GCE PD -// Specifically, this builds Topology (zone) and Region labels. -// The PersistentVolumeLabel admission controller calls this and adds the labels when a PV is created. -func (g *Cloud) GetAutoLabelsForPD(disk *Disk) (map[string]string, error) { - labels := make(map[string]string) - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - if zoneInfo.zone == "" || disk.Region == "" { - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD did not have zone/region information: %v", disk) - } - labels[v1.LabelTopologyZone] = zoneInfo.zone - labels[v1.LabelTopologyRegion] = disk.Region - case multiZone: - if zoneInfo.replicaZones == nil || zoneInfo.replicaZones.Len() <= 0 { - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD is regional but does not have any replicaZones specified: %v", disk) - } - labels[v1.LabelTopologyZone] = - volumehelpers.ZonesSetToLabelValue(zoneInfo.replicaZones) - labels[v1.LabelTopologyRegion] = disk.Region - case nil: - // Unexpected, but sanity-check - return nil, fmt.Errorf("PD did not have ZoneInfo: %v", disk) - default: - // Unexpected, but sanity-check - return nil, fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } - - return labels, nil -} - -// Returns a Disk for the disk, if it is found in the specified zone. -// If not found, returns (nil, nil) -func (g *Cloud) findDiskByName(diskName string, zone string) (*Disk, error) { - mc := newDiskMetricContextZonal("get", g.region, zone) - disk, err := g.manager.GetDiskFromCloudProvider(zone, diskName) - if err == nil { - return disk, mc.Observe(nil) - } - if !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, mc.Observe(err) - } - return nil, mc.Observe(nil) -} - -// Like findDiskByName, but returns an error if the disk is not found -func (g *Cloud) getDiskByName(diskName string, zone string) (*Disk, error) { - disk, err := g.findDiskByName(diskName, zone) - if disk == nil && err == nil { - return nil, fmt.Errorf("GCE persistent disk not found: diskName=%q zone=%q", diskName, zone) - } - return disk, err -} - -// Returns a Disk for the regional disk, if it is found. -// If not found, returns (nil, nil) -func (g *Cloud) findRegionalDiskByName(diskName string) (*Disk, error) { - mc := newDiskMetricContextRegional("get", g.region) - disk, err := g.manager.GetRegionalDiskFromCloudProvider(diskName) - if err == nil { - return disk, mc.Observe(nil) - } - if !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, mc.Observe(err) - } - return nil, mc.Observe(nil) -} - -// Like findRegionalDiskByName, but returns an error if the disk is not found -func (g *Cloud) getRegionalDiskByName(diskName string) (*Disk, error) { - disk, err := g.findRegionalDiskByName(diskName) - if disk == nil && err == nil { - return nil, fmt.Errorf("GCE regional persistent disk not found: diskName=%q", diskName) - } - return disk, err -} - -// GetDiskByNameUnknownZone scans all managed zones to return the GCE PD -// Prefer getDiskByName, if the zone can be established -// Return cloudprovider.DiskNotFound if the given disk cannot be found in any zone -func (g *Cloud) GetDiskByNameUnknownZone(diskName string) (*Disk, error) { - regionalDisk, err := g.getRegionalDiskByName(diskName) - if err == nil { - return regionalDisk, err - } - - // Note: this is the gotcha right now with GCE PD support: - // disk names are not unique per-region. - // (I can create two volumes with name "myvol" in e.g. us-central1-b & us-central1-f) - // For now, this is simply undefined behaviour. - // - // In future, we will have to require users to qualify their disk - // "us-central1-a/mydisk". We could do this for them as part of - // admission control, but that might be a little weird (values changing - // on create) - - var found *Disk - for _, zone := range g.managedZones { - disk, err := g.findDiskByName(diskName, zone) - if err != nil { - return nil, err - } - // findDiskByName returns (nil,nil) if the disk doesn't exist, so we can't - // assume that a disk was found unless disk is non-nil. - if disk == nil { - continue - } - if found != nil { - switch zoneInfo := disk.ZoneInfo.(type) { - case multiZone: - if zoneInfo.replicaZones.Has(zone) { - klog.Warningf("GCE PD name (%q) was found in multiple zones (%q), but ok because it is a RegionalDisk.", - diskName, zoneInfo.replicaZones) - continue - } - return nil, fmt.Errorf("GCE PD name was found in multiple zones: %q", diskName) - default: - return nil, fmt.Errorf("GCE PD name was found in multiple zones: %q", diskName) - } - } - found = disk - } - if found != nil { - return found, nil - } - klog.Warningf("GCE persistent disk %q not found in managed zones (%s)", - diskName, strings.Join(g.managedZones, ",")) - - return nil, cloudprovider.DiskNotFound -} - -// encodeDiskTags encodes requested volume tags into JSON string, as GCE does -// not support tags on GCE PDs and we use Description field as fallback. -func (g *Cloud) encodeDiskTags(tags map[string]string) (string, error) { - if len(tags) == 0 { - // No tags -> empty JSON - return "", nil - } - - enc, err := json.Marshal(tags) - if err != nil { - return "", err - } - return string(enc), nil -} - -func (g *Cloud) doDeleteDisk(diskToDelete string) error { - disk, err := g.GetDiskByNameUnknownZone(diskToDelete) - if err != nil { - return err - } - - var mc *metricContext - - switch zoneInfo := disk.ZoneInfo.(type) { - case singleZone: - mc = newDiskMetricContextZonal("delete", disk.Region, zoneInfo.zone) - return mc.Observe(g.manager.DeleteDiskOnCloudProvider(zoneInfo.zone, disk.Name)) - case multiZone: - mc = newDiskMetricContextRegional("delete", disk.Region) - return mc.Observe(g.manager.DeleteRegionalDiskOnCloudProvider(disk.Name)) - case nil: - return fmt.Errorf("PD has nil ZoneInfo: %v", disk) - default: - return fmt.Errorf("disk.ZoneInfo has unexpected type %T", zoneInfo) - } -} - -// isGCEError returns true if given error is a googleapi.Error with given -// reason (e.g. "resourceInUseByAnotherResource") -func isGCEError(err error, reason string) bool { - apiErr, ok := err.(*googleapi.Error) - if !ok { - return false - } - - for _, e := range apiErr.Errors { - if e.Reason == reason { - return true - } - } - return false -} - -// verifyDisksAttachedToNode takes in an slice of disks that should be attached to an instance, and the -// slice of disks actually attached to it. It returns a map verifying if the disks are actually attached. -func verifyDisksAttachedToNode(disksToVerify []string, disksActuallyAttached []*compute.AttachedDisk) map[string]bool { - verifiedDisks := make(map[string]bool) - diskNamesActuallyAttached := sets.NewString() - for _, disk := range disksActuallyAttached { - diskNamesActuallyAttached.Insert(disk.DeviceName) - } - - // For every disk that's supposed to be attached, verify that it is - for _, diskName := range disksToVerify { - verifiedDisks[diskName] = diskNamesActuallyAttached.Has(diskName) - } - - return verifiedDisks -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_fake.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_fake.go deleted file mode 100644 index 4d3d63caf536a..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_fake.go +++ /dev/null @@ -1,96 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - compute "google.golang.org/api/compute/v1" - option "google.golang.org/api/option" - "k8s.io/client-go/tools/cache" -) - -// TestClusterValues holds the config values for the fake/test gce cloud object. -type TestClusterValues struct { - ProjectID string - Region string - ZoneName string - SecondaryZoneName string - ClusterID string - ClusterName string - OnXPN bool - Regional bool - NetworkURL string -} - -// DefaultTestClusterValues Creates a reasonable set of default cluster values -// for generating a new test fake GCE cloud instance. -func DefaultTestClusterValues() TestClusterValues { - return TestClusterValues{ - ProjectID: "test-project", - Region: "us-central1", - ZoneName: "us-central1-b", - SecondaryZoneName: "us-central1-c", - ClusterID: "test-cluster-id", - ClusterName: "Test-Cluster-Name", - } -} - -// Stubs ClusterID so that ClusterID.getOrInitialize() does not require calling -// gce.Initialize() -func fakeClusterID(clusterID string) ClusterID { - return ClusterID{ - clusterID: &clusterID, - store: cache.NewStore(func(obj interface{}) (string, error) { - return "", nil - }), - } -} - -// NewFakeGCECloud constructs a fake GCE Cloud from the cluster values. -func NewFakeGCECloud(vals TestClusterValues) *Cloud { - service, err := compute.NewService(context.Background(), option.WithoutAuthentication()) - if err != nil { - panic(err) - } - gce := &Cloud{ - region: vals.Region, - service: service, - managedZones: []string{vals.ZoneName}, - localZone: vals.ZoneName, - projectID: vals.ProjectID, - networkProjectID: vals.ProjectID, - ClusterID: fakeClusterID(vals.ClusterID), - onXPN: vals.OnXPN, - metricsCollector: newLoadBalancerMetrics(), - projectsBasePath: getProjectsBasePath(service.BasePath), - regional: vals.Regional, - networkURL: vals.NetworkURL, - } - c := cloud.NewMockGCE(&gceProjectRouter{gce}) - gce.c = c - return gce -} - -// UpdateFakeGCECloud updates the fake GCE cloud with the specified values. Currently only the onXPN value is updated. -func UpdateFakeGCECloud(g *Cloud, vals TestClusterValues) { - g.onXPN = vals.OnXPN -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_firewall.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_firewall.go deleted file mode 100644 index afb59fe6c1969..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_firewall.go +++ /dev/null @@ -1,77 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newFirewallMetricContext(request string) *metricContext { - return newGenericMetricContext("firewall", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetFirewall returns the Firewall by name. -func (g *Cloud) GetFirewall(name string) (*compute.Firewall, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newFirewallMetricContext("get") - v, err := g.c.Firewalls().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// CreateFirewall creates the passed firewall -func (g *Cloud) CreateFirewall(f *compute.Firewall) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newFirewallMetricContext("create") - return mc.Observe(g.c.Firewalls().Insert(ctx, meta.GlobalKey(f.Name), f)) -} - -// DeleteFirewall deletes the given firewall rule. -func (g *Cloud) DeleteFirewall(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newFirewallMetricContext("delete") - return mc.Observe(g.c.Firewalls().Delete(ctx, meta.GlobalKey(name))) -} - -// UpdateFirewall applies the given firewall as an update to an existing service. -func (g *Cloud) UpdateFirewall(f *compute.Firewall) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newFirewallMetricContext("update") - return mc.Observe(g.c.Firewalls().Update(ctx, meta.GlobalKey(f.Name), f)) -} - -// PatchFirewall applies the given firewall as an update to an existing service. -func (g *Cloud) PatchFirewall(f *compute.Firewall) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newFirewallMetricContext("Patch") - return mc.Observe(g.c.Firewalls().Patch(ctx, meta.GlobalKey(f.Name), f)) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_forwardingrule.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_forwardingrule.go deleted file mode 100644 index c02496b0e140b..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_forwardingrule.go +++ /dev/null @@ -1,193 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" -) - -func newForwardingRuleMetricContext(request, region string) *metricContext { - return newForwardingRuleMetricContextWithVersion(request, region, computeV1Version) -} -func newForwardingRuleMetricContextWithVersion(request, region, version string) *metricContext { - return newGenericMetricContext("forwardingrule", request, region, unusedMetricLabel, version) -} - -// CreateGlobalForwardingRule creates the passed GlobalForwardingRule -func (g *Cloud) CreateGlobalForwardingRule(rule *compute.ForwardingRule) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("create", "") - return mc.Observe(g.c.GlobalForwardingRules().Insert(ctx, meta.GlobalKey(rule.Name), rule)) -} - -// SetProxyForGlobalForwardingRule links the given TargetHttp(s)Proxy with the given GlobalForwardingRule. -// targetProxyLink is the SelfLink of a TargetHttp(s)Proxy. -func (g *Cloud) SetProxyForGlobalForwardingRule(forwardingRuleName, targetProxyLink string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("set_proxy", "") - target := &compute.TargetReference{Target: targetProxyLink} - return mc.Observe(g.c.GlobalForwardingRules().SetTarget(ctx, meta.GlobalKey(forwardingRuleName), target)) -} - -// DeleteGlobalForwardingRule deletes the GlobalForwardingRule by name. -func (g *Cloud) DeleteGlobalForwardingRule(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("delete", "") - return mc.Observe(g.c.GlobalForwardingRules().Delete(ctx, meta.GlobalKey(name))) -} - -// GetGlobalForwardingRule returns the GlobalForwardingRule by name. -func (g *Cloud) GetGlobalForwardingRule(name string) (*compute.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("get", "") - v, err := g.c.GlobalForwardingRules().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// ListGlobalForwardingRules lists all GlobalForwardingRules in the project. -func (g *Cloud) ListGlobalForwardingRules() ([]*compute.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("list", "") - v, err := g.c.GlobalForwardingRules().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// GetRegionForwardingRule returns the RegionalForwardingRule by name & region. -func (g *Cloud) GetRegionForwardingRule(name, region string) (*compute.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("get", region) - v, err := g.c.ForwardingRules().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// GetAlphaRegionForwardingRule returns the Alpha forwarding rule by name & region. -func (g *Cloud) GetAlphaRegionForwardingRule(name, region string) (*computealpha.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("get", region, computeAlphaVersion) - v, err := g.c.AlphaForwardingRules().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// GetBetaRegionForwardingRule returns the Beta forwarding rule by name & region. -func (g *Cloud) GetBetaRegionForwardingRule(name, region string) (*computebeta.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("get", region, computeBetaVersion) - v, err := g.c.BetaForwardingRules().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// ListRegionForwardingRules lists all RegionalForwardingRules in the project & region. -func (g *Cloud) ListRegionForwardingRules(region string) ([]*compute.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("list", region) - v, err := g.c.ForwardingRules().List(ctx, region, filter.None) - return v, mc.Observe(err) -} - -// ListAlphaRegionForwardingRules lists all RegionalForwardingRules in the project & region. -func (g *Cloud) ListAlphaRegionForwardingRules(region string) ([]*computealpha.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("list", region, computeAlphaVersion) - v, err := g.c.AlphaForwardingRules().List(ctx, region, filter.None) - return v, mc.Observe(err) -} - -// ListBetaRegionForwardingRules lists all RegionalForwardingRules in the project & region. -func (g *Cloud) ListBetaRegionForwardingRules(region string) ([]*computebeta.ForwardingRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("list", region, computeBetaVersion) - v, err := g.c.BetaForwardingRules().List(ctx, region, filter.None) - return v, mc.Observe(err) -} - -// CreateRegionForwardingRule creates and returns a -// RegionalForwardingRule that points to the given BackendService -func (g *Cloud) CreateRegionForwardingRule(rule *compute.ForwardingRule, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("create", region) - return mc.Observe(g.c.ForwardingRules().Insert(ctx, meta.RegionalKey(rule.Name, region), rule)) -} - -// CreateAlphaRegionForwardingRule creates and returns an Alpha -// forwarding rule in the given region. -func (g *Cloud) CreateAlphaRegionForwardingRule(rule *computealpha.ForwardingRule, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("create", region, computeAlphaVersion) - return mc.Observe(g.c.AlphaForwardingRules().Insert(ctx, meta.RegionalKey(rule.Name, region), rule)) -} - -// CreateBetaRegionForwardingRule creates and returns a Beta -// forwarding rule in the given region. -func (g *Cloud) CreateBetaRegionForwardingRule(rule *computebeta.ForwardingRule, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContextWithVersion("create", region, computeBetaVersion) - return mc.Observe(g.c.BetaForwardingRules().Insert(ctx, meta.RegionalKey(rule.Name, region), rule)) -} - -// DeleteRegionForwardingRule deletes the RegionalForwardingRule by name & region. -func (g *Cloud) DeleteRegionForwardingRule(name, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newForwardingRuleMetricContext("delete", region) - return mc.Observe(g.c.ForwardingRules().Delete(ctx, meta.RegionalKey(name, region))) -} - -func (g *Cloud) getNetworkTierFromForwardingRule(name, region string) (string, error) { - fwdRule, err := g.GetRegionForwardingRule(name, region) - if err != nil { - // Can't get the network tier, just return an error. - return "", err - } - return fwdRule.NetworkTier, nil -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_healthchecks.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_healthchecks.go deleted file mode 100644 index 6409e4979e4c8..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_healthchecks.go +++ /dev/null @@ -1,260 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computealpha "google.golang.org/api/compute/v0.alpha" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -const ( - nodesHealthCheckPath = "/healthz" - // NOTE: Please keep the following port in sync with ProxyHealthzPort in pkg/cluster/ports/ports.go - // ports.ProxyHealthzPort was not used here to avoid dependencies to k8s.io/kubernetes in the - // GCE cloud provider which is required as part of the out-of-tree cloud provider efforts. - // TODO: use a shared constant once ports in pkg/cluster/ports are in a common external repo. - lbNodesHealthCheckPort = 10256 -) - -func newHealthcheckMetricContext(request string) *metricContext { - return newHealthcheckMetricContextWithVersion(request, computeV1Version) -} - -func newHealthcheckMetricContextWithVersion(request, version string) *metricContext { - return newGenericMetricContext("healthcheck", request, unusedMetricLabel, unusedMetricLabel, version) -} - -// GetHTTPHealthCheck returns the given HttpHealthCheck by name. -func (g *Cloud) GetHTTPHealthCheck(name string) (*compute.HttpHealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("get_legacy") - v, err := g.c.HttpHealthChecks().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// UpdateHTTPHealthCheck applies the given HttpHealthCheck as an update. -func (g *Cloud) UpdateHTTPHealthCheck(hc *compute.HttpHealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("update_legacy") - return mc.Observe(g.c.HttpHealthChecks().Update(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// DeleteHTTPHealthCheck deletes the given HttpHealthCheck by name. -func (g *Cloud) DeleteHTTPHealthCheck(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("delete_legacy") - return mc.Observe(g.c.HttpHealthChecks().Delete(ctx, meta.GlobalKey(name))) -} - -// CreateHTTPHealthCheck creates the given HttpHealthCheck. -func (g *Cloud) CreateHTTPHealthCheck(hc *compute.HttpHealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("create_legacy") - return mc.Observe(g.c.HttpHealthChecks().Insert(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// ListHTTPHealthChecks lists all HttpHealthChecks in the project. -func (g *Cloud) ListHTTPHealthChecks() ([]*compute.HttpHealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("list_legacy") - v, err := g.c.HttpHealthChecks().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// Legacy HTTPS Health Checks - -// GetHTTPSHealthCheck returns the given HttpsHealthCheck by name. -func (g *Cloud) GetHTTPSHealthCheck(name string) (*compute.HttpsHealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("get_legacy") - v, err := g.c.HttpsHealthChecks().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// UpdateHTTPSHealthCheck applies the given HttpsHealthCheck as an update. -func (g *Cloud) UpdateHTTPSHealthCheck(hc *compute.HttpsHealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("update_legacy") - return mc.Observe(g.c.HttpsHealthChecks().Update(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// DeleteHTTPSHealthCheck deletes the given HttpsHealthCheck by name. -func (g *Cloud) DeleteHTTPSHealthCheck(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("delete_legacy") - return mc.Observe(g.c.HttpsHealthChecks().Delete(ctx, meta.GlobalKey(name))) -} - -// CreateHTTPSHealthCheck creates the given HttpsHealthCheck. -func (g *Cloud) CreateHTTPSHealthCheck(hc *compute.HttpsHealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("create_legacy") - return mc.Observe(g.c.HttpsHealthChecks().Insert(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// ListHTTPSHealthChecks lists all HttpsHealthChecks in the project. -func (g *Cloud) ListHTTPSHealthChecks() ([]*compute.HttpsHealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("list_legacy") - v, err := g.c.HttpsHealthChecks().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// Generic HealthCheck - -// GetHealthCheck returns the given HealthCheck by name. -func (g *Cloud) GetHealthCheck(name string) (*compute.HealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("get") - v, err := g.c.HealthChecks().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// GetAlphaHealthCheck returns the given alpha HealthCheck by name. -func (g *Cloud) GetAlphaHealthCheck(name string) (*computealpha.HealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("get", computeAlphaVersion) - v, err := g.c.AlphaHealthChecks().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// GetBetaHealthCheck returns the given beta HealthCheck by name. -func (g *Cloud) GetBetaHealthCheck(name string) (*computebeta.HealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("get", computeBetaVersion) - v, err := g.c.BetaHealthChecks().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// UpdateHealthCheck applies the given HealthCheck as an update. -func (g *Cloud) UpdateHealthCheck(hc *compute.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("update") - return mc.Observe(g.c.HealthChecks().Update(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// UpdateAlphaHealthCheck applies the given alpha HealthCheck as an update. -func (g *Cloud) UpdateAlphaHealthCheck(hc *computealpha.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("update", computeAlphaVersion) - return mc.Observe(g.c.AlphaHealthChecks().Update(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// UpdateBetaHealthCheck applies the given beta HealthCheck as an update. -func (g *Cloud) UpdateBetaHealthCheck(hc *computebeta.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("update", computeBetaVersion) - return mc.Observe(g.c.BetaHealthChecks().Update(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// DeleteHealthCheck deletes the given HealthCheck by name. -func (g *Cloud) DeleteHealthCheck(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("delete") - return mc.Observe(g.c.HealthChecks().Delete(ctx, meta.GlobalKey(name))) -} - -// CreateHealthCheck creates the given HealthCheck. -func (g *Cloud) CreateHealthCheck(hc *compute.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("create") - return mc.Observe(g.c.HealthChecks().Insert(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// CreateAlphaHealthCheck creates the given alpha HealthCheck. -func (g *Cloud) CreateAlphaHealthCheck(hc *computealpha.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("create", computeAlphaVersion) - return mc.Observe(g.c.AlphaHealthChecks().Insert(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// CreateBetaHealthCheck creates the given beta HealthCheck. -func (g *Cloud) CreateBetaHealthCheck(hc *computebeta.HealthCheck) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContextWithVersion("create", computeBetaVersion) - return mc.Observe(g.c.BetaHealthChecks().Insert(ctx, meta.GlobalKey(hc.Name), hc)) -} - -// ListHealthChecks lists all HealthCheck in the project. -func (g *Cloud) ListHealthChecks() ([]*compute.HealthCheck, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newHealthcheckMetricContext("list") - v, err := g.c.HealthChecks().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// GetNodesHealthCheckPort returns the health check port used by the GCE load -// balancers (l4) for performing health checks on nodes. -func GetNodesHealthCheckPort() int32 { - return lbNodesHealthCheckPort -} - -// GetNodesHealthCheckPath returns the health check path used by the GCE load -// balancers (l4) for performing health checks on nodes. -func GetNodesHealthCheckPath() string { - return nodesHealthCheckPath -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instancegroup.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instancegroup.go deleted file mode 100644 index 46c58792b6832..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instancegroup.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newInstanceGroupMetricContext(request string, zone string) *metricContext { - return newGenericMetricContext("instancegroup", request, unusedMetricLabel, zone, computeV1Version) -} - -// CreateInstanceGroup creates an instance group with the given -// instances. It is the callers responsibility to add named ports. -func (g *Cloud) CreateInstanceGroup(ig *compute.InstanceGroup, zone string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("create", zone) - return mc.Observe(g.c.InstanceGroups().Insert(ctx, meta.ZonalKey(ig.Name, zone), ig)) -} - -// DeleteInstanceGroup deletes an instance group. -func (g *Cloud) DeleteInstanceGroup(name string, zone string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("delete", zone) - return mc.Observe(g.c.InstanceGroups().Delete(ctx, meta.ZonalKey(name, zone))) -} - -// FilterInstanceGroupsByName lists all InstanceGroups in the project and -// zone that match the name regexp. -func (g *Cloud) FilterInstanceGroupsByNamePrefix(namePrefix, zone string) ([]*compute.InstanceGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - mc := newInstanceGroupMetricContext("filter", zone) - v, err := g.c.InstanceGroups().List(ctx, zone, filter.Regexp("name", namePrefix+".*")) - return v, mc.Observe(err) -} - -// ListInstanceGroups lists all InstanceGroups in the project and -// zone. -func (g *Cloud) ListInstanceGroups(zone string) ([]*compute.InstanceGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("list", zone) - v, err := g.c.InstanceGroups().List(ctx, zone, filter.None) - return v, mc.Observe(err) -} - -// ListInstancesInInstanceGroup lists all the instances in a given -// instance group and state. -func (g *Cloud) ListInstancesInInstanceGroup(name string, zone string, state string) ([]*compute.InstanceWithNamedPorts, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("list_instances", zone) - req := &compute.InstanceGroupsListInstancesRequest{InstanceState: state} - v, err := g.c.InstanceGroups().ListInstances(ctx, meta.ZonalKey(name, zone), req, filter.None) - return v, mc.Observe(err) -} - -// AddInstancesToInstanceGroup adds the given instances to the given -// instance group. -func (g *Cloud) AddInstancesToInstanceGroup(name string, zone string, instanceRefs []*compute.InstanceReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("add_instances", zone) - // TODO: should cull operation above this layer. - if len(instanceRefs) == 0 { - return nil - } - req := &compute.InstanceGroupsAddInstancesRequest{ - Instances: instanceRefs, - } - return mc.Observe(g.c.InstanceGroups().AddInstances(ctx, meta.ZonalKey(name, zone), req)) -} - -// RemoveInstancesFromInstanceGroup removes the given instances from -// the instance group. -func (g *Cloud) RemoveInstancesFromInstanceGroup(name string, zone string, instanceRefs []*compute.InstanceReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("remove_instances", zone) - // TODO: should cull operation above this layer. - if len(instanceRefs) == 0 { - return nil - } - req := &compute.InstanceGroupsRemoveInstancesRequest{ - Instances: instanceRefs, - } - return mc.Observe(g.c.InstanceGroups().RemoveInstances(ctx, meta.ZonalKey(name, zone), req)) -} - -// SetNamedPortsOfInstanceGroup sets the list of named ports on a given instance group -func (g *Cloud) SetNamedPortsOfInstanceGroup(igName, zone string, namedPorts []*compute.NamedPort) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("set_namedports", zone) - req := &compute.InstanceGroupsSetNamedPortsRequest{NamedPorts: namedPorts} - return mc.Observe(g.c.InstanceGroups().SetNamedPorts(ctx, meta.ZonalKey(igName, zone), req)) -} - -// GetInstanceGroup returns an instance group by name. -func (g *Cloud) GetInstanceGroup(name string, zone string) (*compute.InstanceGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstanceGroupMetricContext("get", zone) - v, err := g.c.InstanceGroups().Get(ctx, meta.ZonalKey(name, zone)) - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instances.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instances.go deleted file mode 100644 index 3ab720f2e87c3..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_instances.go +++ /dev/null @@ -1,891 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - "net" - "net/http" - "strings" - "time" - - "cloud.google.com/go/compute/metadata" - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" - "k8s.io/klog/v2" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - cloudprovider "k8s.io/cloud-provider" -) - -const ( - emptyZone = "" - networkInterfaceIP = "instance/network-interfaces/%s/ip" - networkInterfaceIPV6 = "instance/network-interfaces/%s/ipv6s" - networkInterfaceAccessConfigs = "instance/network-interfaces/%s/access-configs" - networkInterfaceExternalIP = "instance/network-interfaces/%s/access-configs/%s/external-ip" -) - -func newInstancesMetricContext(request, zone string) *metricContext { - return newGenericMetricContext("instances", request, unusedMetricLabel, zone, computeV1Version) -} - -func splitNodesByZone(nodes []*v1.Node) map[string][]*v1.Node { - zones := make(map[string][]*v1.Node) - for _, n := range nodes { - z := getZone(n) - if z != emptyZone { - zones[z] = append(zones[z], n) - } - } - return zones -} - -func getZone(node *v1.Node) string { - zone, ok := node.Labels[v1.LabelTopologyZone] - if ok { - return zone - } - zone, ok = node.Labels[v1.LabelFailureDomainBetaZone] - if !ok { - klog.Warningf("Node without zone label, returning %q as zone. Node name: %v, node labels: %v", emptyZone, node.Name, node.Labels) - return emptyZone - } - return zone -} - -func makeHostURL(projectsAPIEndpoint, projectID, zone, host string) string { - host = canonicalizeInstanceName(host) - return projectsAPIEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/") -} - -// ToInstanceReferences returns instance references by links -func (g *Cloud) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) { - for _, ins := range instanceNames { - instanceLink := makeHostURL(g.projectsBasePath, g.projectID, zone, ins) - refs = append(refs, &compute.InstanceReference{Instance: instanceLink}) - } - return refs -} - -// NodeAddresses is an implementation of Instances.NodeAddresses. -func (g *Cloud) NodeAddresses(ctx context.Context, nodeName types.NodeName) ([]v1.NodeAddress, error) { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - instanceName := string(nodeName) - - if g.useMetadataServer { - // Use metadata server if possible - if g.isCurrentInstance(instanceName) { - - nics, err := metadata.Get("instance/network-interfaces/") - if err != nil { - return nil, fmt.Errorf("couldn't get network interfaces: %v", err) - } - - nicsArr := strings.Split(nics, "/\n") - nodeAddresses := []v1.NodeAddress{} - - for _, nic := range nicsArr { - - if nic == "" { - continue - } - - internalIP, err := metadata.Get(fmt.Sprintf(networkInterfaceIP, nic)) - if err != nil { - return nil, fmt.Errorf("couldn't get internal IP: %v", err) - } - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: internalIP}) - - // Both internal and external IPv6 addresses are written to this array - ipv6s, err := metadata.Get(fmt.Sprintf(networkInterfaceIPV6, nic)) - if err != nil || ipv6s == "" { - klog.Infof("no internal IPV6 addresses found for node %v: %v", nodeName, err) - } else { - ipv6Arr := strings.Split(ipv6s, "/\n") - var internalIPV6 string - for _, ip := range ipv6Arr { - if ip == "" { - continue - } - internalIPV6 = ip - break - } - if internalIPV6 != "" { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: internalIPV6}) - } else { - klog.Warningf("internal IPV6 range is empty for node %v", nodeName) - } - } - - acs, err := metadata.Get(fmt.Sprintf(networkInterfaceAccessConfigs, nic)) - if err != nil { - return nil, fmt.Errorf("couldn't get access configs: %v", err) - } - - acsArr := strings.Split(acs, "/\n") - - for _, ac := range acsArr { - - if ac == "" { - continue - } - - externalIP, err := metadata.Get(fmt.Sprintf(networkInterfaceExternalIP, nic, ac)) - if err != nil { - return nil, fmt.Errorf("couldn't get external IP: %v", err) - } - - if externalIP != "" { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: externalIP}) - } - } - } - - internalDNSFull, err := metadata.Get("instance/hostname") - if err != nil { - klog.Warningf("couldn't get full internal DNS name: %v", err) - } else { - nodeAddresses = append(nodeAddresses, - v1.NodeAddress{Type: v1.NodeInternalDNS, Address: internalDNSFull}, - v1.NodeAddress{Type: v1.NodeHostName, Address: internalDNSFull}, - ) - } - return nodeAddresses, nil - } - } - - // Use GCE API - instanceObj, err := g.getInstanceByName(instanceName) - if err != nil { - return nil, fmt.Errorf("couldn't get instance details: %v", err) - } - - instance, err := g.c.Instances().Get(timeoutCtx, meta.ZonalKey(canonicalizeInstanceName(instanceObj.Name), instanceObj.Zone)) - if err != nil { - return nil, fmt.Errorf("error while querying for instance: %v", err) - } - - return g.nodeAddressesFromInstance(instance) -} - -// NodeAddressesByProviderID will not be called from the node that is requesting this ID. -// i.e. metadata service and other local methods cannot be used here -func (g *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - _, zone, name, err := splitProviderID(providerID) - if err != nil { - return []v1.NodeAddress{}, err - } - - instance, err := g.c.Instances().Get(timeoutCtx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) - if err != nil { - return []v1.NodeAddress{}, fmt.Errorf("error while querying for providerID %q: %v", providerID, err) - } - - return g.nodeAddressesFromInstance(instance) -} - -// instanceByProviderID returns the cloudprovider instance of the node -// with the specified unique providerID -func (g *Cloud) instanceByProviderID(providerID string) (*gceInstance, error) { - project, zone, name, err := splitProviderID(providerID) - if err != nil { - return nil, err - } - - instance, err := g.getInstanceFromProjectInZoneByName(project, zone, name) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return nil, cloudprovider.InstanceNotFound - } - return nil, err - } - - return instance, nil -} - -// InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes -func (g *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) { - return false, cloudprovider.NotImplemented -} - -// InstanceShutdown returns true if the instance is in safe state to detach volumes -func (g *Cloud) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error) { - return false, cloudprovider.NotImplemented -} - -func (g *Cloud) nodeAddressesFromInstance(instance *compute.Instance) ([]v1.NodeAddress, error) { - if len(instance.NetworkInterfaces) < 1 { - return nil, fmt.Errorf("could not find network interfaces for instanceID %q", instance.Id) - } - nodeAddresses := []v1.NodeAddress{} - for _, nic := range instance.NetworkInterfaces { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: nic.NetworkIP}) - for _, config := range nic.AccessConfigs { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: config.NatIP}) - } - ipv6Addr := getIPV6AddressFromInterface(nic) - if ipv6Addr != "" { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: ipv6Addr}) - } - } - - return nodeAddresses, nil -} - -func getIPV6AddressFromInterface(nic *compute.NetworkInterface) string { - ipv6Addr := nic.Ipv6Address - if ipv6Addr == "" && nic.Ipv6AccessType == "EXTERNAL" { - for _, r := range nic.Ipv6AccessConfigs { - ipv6Addr = r.ExternalIpv6 - } - } - return ipv6Addr -} - -// InstanceTypeByProviderID returns the cloudprovider instance type of the node -// with the specified unique providerID This method will not be called from the -// node that is requesting this ID. i.e. metadata service and other local -// methods cannot be used here -func (g *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string) (string, error) { - instance, err := g.instanceByProviderID(providerID) - if err != nil { - return "", err - } - - return instance.Type, nil -} - -// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. -// If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. -func (g *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) { - _, err := g.instanceByProviderID(providerID) - if err != nil { - if err == cloudprovider.InstanceNotFound { - return false, nil - } - return false, err - } - - return true, nil -} - -// InstanceExists returns true if the instance with the given provider id still exists and is running. -// If false is returned with no error, the instance will be immediately deleted by the cloud controller manager. -func (g *Cloud) InstanceExists(ctx context.Context, node *v1.Node) (bool, error) { - providerID := node.Spec.ProviderID - if providerID == "" { - var err error - if providerID, err = cloudprovider.GetInstanceProviderID(ctx, g, types.NodeName(node.Name)); err != nil { - if err == cloudprovider.InstanceNotFound { - return false, nil - } - return false, err - } - } - return g.InstanceExistsByProviderID(ctx, providerID) -} - -// InstanceMetadata returns metadata of the specified instance. -func (g *Cloud) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error) { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - providerID := node.Spec.ProviderID - if providerID == "" { - var err error - if providerID, err = cloudprovider.GetInstanceProviderID(ctx, g, types.NodeName(node.Name)); err != nil { - return nil, err - } - } - - _, zone, name, err := splitProviderID(providerID) - if err != nil { - return nil, err - } - - region, err := GetGCERegion(zone) - if err != nil { - return nil, err - } - - var addresses []v1.NodeAddress - var instanceType string - instance, err := g.c.Instances().Get(timeoutCtx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) - if err != nil { - return nil, fmt.Errorf("error while querying for providerID %q: %v", providerID, err) - } - - addresses, err = g.nodeAddressesFromInstance(instance) - if err != nil { - return nil, err - } - - instanceType = lastComponent(instance.MachineType) - - return &cloudprovider.InstanceMetadata{ - ProviderID: providerID, - InstanceType: instanceType, - NodeAddresses: addresses, - Zone: zone, - Region: region, - }, nil -} - -// InstanceID returns the cloud provider ID of the node with the specified NodeName. -func (g *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - if g.useMetadataServer { - // Use metadata, if possible, to fetch ID. See issue #12000 - if g.isCurrentInstance(instanceName) { - projectID, zone, err := getProjectAndZone() - if err == nil { - return projectID + "/" + zone + "/" + canonicalizeInstanceName(instanceName), nil - } - } - } - instance, err := g.getInstanceByName(instanceName) - if err != nil { - return "", err - } - return g.projectID + "/" + instance.Zone + "/" + instance.Name, nil -} - -// InstanceType returns the type of the specified node with the specified NodeName. -func (g *Cloud) InstanceType(ctx context.Context, nodeName types.NodeName) (string, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - if g.useMetadataServer { - // Use metadata, if possible, to fetch ID. See issue #12000 - if g.isCurrentInstance(instanceName) { - mType, err := getCurrentMachineTypeViaMetadata() - if err == nil { - return mType, nil - } - } - } - instance, err := g.getInstanceByName(instanceName) - if err != nil { - return "", err - } - return instance.Type, nil -} - -// AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances -// expected format for the key is standard ssh-keygen format: -func (g *Cloud) AddSSHKeyToAllInstances(ctx context.Context, user string, keyData []byte) error { - ctx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - return wait.Poll(2*time.Second, 30*time.Second, func() (bool, error) { - project, err := g.c.Projects().Get(ctx, g.projectID) - if err != nil { - klog.Errorf("Could not get project: %v", err) - return false, nil - } - keyString := fmt.Sprintf("%s:%s %s@%s", user, strings.TrimSpace(string(keyData)), user, user) - found := false - for _, item := range project.CommonInstanceMetadata.Items { - if item.Key == "sshKeys" { - if strings.Contains(*item.Value, keyString) { - // We've already added the key - klog.Info("SSHKey already in project metadata") - return true, nil - } - value := *item.Value + "\n" + keyString - item.Value = &value - found = true - break - } - } - if !found { - // This is super unlikely, so log. - klog.Infof("Failed to find sshKeys metadata, creating a new item") - project.CommonInstanceMetadata.Items = append(project.CommonInstanceMetadata.Items, - &compute.MetadataItems{ - Key: "sshKeys", - Value: &keyString, - }) - } - - mc := newInstancesMetricContext("add_ssh_key", "") - err = g.c.Projects().SetCommonInstanceMetadata(ctx, g.projectID, project.CommonInstanceMetadata) - mc.Observe(err) - - if err != nil { - klog.Errorf("Could not Set Metadata: %v", err) - return false, nil - } - klog.Infof("Successfully added sshKey to project metadata") - return true, nil - }) -} - -// GetAllCurrentZones returns all the zones in which k8s nodes are currently running -func (g *Cloud) GetAllCurrentZones() (sets.String, error) { - if g.nodeInformerSynced == nil { - klog.Warning("Cloud object does not have informers set, should only happen in E2E binary.") - return g.GetAllZonesFromCloudProvider() - } - g.nodeZonesLock.Lock() - defer g.nodeZonesLock.Unlock() - if !g.nodeInformerSynced() { - return nil, fmt.Errorf("node informer is not synced when trying to GetAllCurrentZones") - } - zones := sets.NewString() - for zone, nodes := range g.nodeZones { - if len(nodes) > 0 { - zones.Insert(zone) - } - } - return zones, nil -} - -// GetAllZonesFromCloudProvider returns all the zones in which nodes are running -// Only use this in E2E tests to get zones, on real clusters this will -// get all zones with compute instances in them even if not k8s instances!!! -// ex. I have k8s nodes in us-central1-c and us-central1-b. I also have -// a non-k8s compute in us-central1-a. This func will return a,b, and c. -// -// TODO: this should be removed from the cloud provider. -func (g *Cloud) GetAllZonesFromCloudProvider() (sets.String, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - zones := sets.NewString() - for _, zone := range g.managedZones { - instances, err := g.c.Instances().List(ctx, zone, filter.None) - if err != nil { - return sets.NewString(), err - } - if len(instances) > 0 { - zones.Insert(zone) - } - } - return zones, nil -} - -// InsertInstance creates a new instance on GCP -func (g *Cloud) InsertInstance(project string, zone string, i *compute.Instance) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newInstancesMetricContext("create", zone) - return mc.Observe(g.c.Instances().Insert(ctx, meta.ZonalKey(i.Name, zone), i)) -} - -// ListInstanceNames returns a string of instance names separated by spaces. -// This method should only be used for e2e testing. -// TODO: remove this method. -func (g *Cloud) ListInstanceNames(project, zone string) (string, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - l, err := g.c.Instances().List(ctx, zone, filter.None) - if err != nil { - return "", err - } - var names []string - for _, i := range l { - names = append(names, i.Name) - } - return strings.Join(names, " "), nil -} - -// DeleteInstance deletes an instance specified by project, zone, and name -func (g *Cloud) DeleteInstance(project, zone, name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - return g.c.Instances().Delete(ctx, meta.ZonalKey(name, zone)) -} - -// CurrentNodeName returns the name of the node we are currently running on -// On most clouds (e.g. GCE) this is the hostname, so we provide the hostname -func (g *Cloud) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error) { - return types.NodeName(hostname), nil -} - -// AliasRangesByProviderID returns a list of CIDR ranges that are assigned to the -// `node` for allocation to pods. Returns a list of the form -// "/". -func (g *Cloud) AliasRangesByProviderID(providerID string) (cidrs []string, err error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - _, zone, name, err := splitProviderID(providerID) - if err != nil { - return nil, err - } - - var res *compute.Instance - res, err = g.c.Instances().Get(ctx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) - if err != nil { - return - } - - for _, networkInterface := range res.NetworkInterfaces { - for _, r := range networkInterface.AliasIpRanges { - cidrs = append(cidrs, r.IpCidrRange) - } - ipv6Addr := g.GetIPV6Address(networkInterface) - if ipv6Addr != nil { - cidrs = append(cidrs, ipv6Addr.String()) - } - } - return -} - -// GetIPV6Address fetches the IPv6 addressses associated with a network interface. -func (g *Cloud) GetIPV6Address(networkInterface *compute.NetworkInterface) *net.IPNet { - ipv6Addr := getIPV6AddressFromInterface(networkInterface) - if ipv6Addr == "" { - return nil - } - addr := net.ParseIP(ipv6Addr) - // The podCIDR range is the first /112 subrange from the /96 assigned to - // the node - mask := net.CIDRMask(112, 128) - return &net.IPNet{ - IP: addr.Mask(mask), - Mask: mask, - } -} - -// AddAliasToInstanceByProviderID adds an alias to the given instance from the named -// secondary range. -func (g *Cloud) AddAliasToInstanceByProviderID(providerID string, alias *net.IPNet) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - _, zone, name, err := splitProviderID(providerID) - if err != nil { - return err - } - - instance, err := g.c.BetaInstances().Get(ctx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) - if err != nil { - return err - } - - switch len(instance.NetworkInterfaces) { - case 0: - return fmt.Errorf("instance %q has no network interfaces", providerID) - case 1: - default: - klog.Warningf("Instance %q has more than one network interface, using only the first (%v)", - providerID, instance.NetworkInterfaces) - } - - iface := &computebeta.NetworkInterface{} - iface.Name = instance.NetworkInterfaces[0].Name - iface.Fingerprint = instance.NetworkInterfaces[0].Fingerprint - iface.AliasIpRanges = append(iface.AliasIpRanges, &computebeta.AliasIpRange{ - IpCidrRange: alias.String(), - SubnetworkRangeName: g.secondaryRangeName, - }) - - mc := newInstancesMetricContext("add_alias", zone) - err = g.c.BetaInstances().UpdateNetworkInterface(ctx, meta.ZonalKey(instance.Name, lastComponent(instance.Zone)), iface.Name, iface) - return mc.Observe(err) -} - -// Gets the named instances, returning cloudprovider.InstanceNotFound if any -// instance is not found -func (g *Cloud) getInstancesByNames(names []string) ([]*gceInstance, error) { - foundInstances, err := g.getFoundInstanceByNames(names) - if err != nil { - return nil, err - } - if len(foundInstances) != len(names) { - if len(foundInstances) == 0 { - // return error so the TargetPool nodecount does not drop to 0 unexpectedly. - return nil, cloudprovider.InstanceNotFound - } - klog.Warningf("getFoundInstanceByNames - input instances %d, found %d. Continuing LoadBalancer Update", len(names), len(foundInstances)) - } - return foundInstances, nil -} - -// Gets the named instances, returning a list of gceInstances it was able to find from the provided -// list of names. -func (g *Cloud) getFoundInstanceByNames(names []string) ([]*gceInstance, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - found := map[string]*gceInstance{} - remaining := len(names) - - nodeInstancePrefix := g.nodeInstancePrefix - for _, name := range names { - name = canonicalizeInstanceName(name) - if !strings.HasPrefix(name, g.nodeInstancePrefix) { - klog.Warningf("Instance %q does not conform to prefix %q, removing filter", name, g.nodeInstancePrefix) - nodeInstancePrefix = "" - } - found[name] = nil - } - - for _, zone := range g.managedZones { - if remaining == 0 { - break - } - instances, err := g.c.Instances().List(ctx, zone, filter.Regexp("name", nodeInstancePrefix+".*")) - if err != nil { - return nil, err - } - for _, inst := range instances { - if remaining == 0 { - break - } - if _, ok := found[inst.Name]; !ok { - continue - } - if found[inst.Name] != nil { - klog.Errorf("Instance name %q was duplicated (in zone %q and %q)", inst.Name, zone, found[inst.Name].Zone) - continue - } - found[inst.Name] = &gceInstance{ - Zone: zone, - Name: inst.Name, - ID: inst.Id, - Disks: inst.Disks, - Type: lastComponent(inst.MachineType), - } - remaining-- - } - } - - var ret []*gceInstance - var failed []string - for name, instance := range found { - if instance != nil { - ret = append(ret, instance) - } else { - failed = append(failed, name) - } - } - if len(failed) > 0 { - klog.Errorf("Failed to retrieve instances: %v", failed) - } - - return ret, nil -} - -// Gets the named instance, returning cloudprovider.InstanceNotFound if the instance is not found -func (g *Cloud) getInstanceByName(name string) (*gceInstance, error) { - // Avoid changing behaviour when not managing multiple zones - for _, zone := range g.managedZones { - instance, err := g.getInstanceFromProjectInZoneByName(g.projectID, zone, name) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - continue - } - klog.Errorf("getInstanceByName: failed to get instance %s in zone %s; err: %v", name, zone, err) - return nil, err - } - return instance, nil - } - - return nil, cloudprovider.InstanceNotFound -} - -func (g *Cloud) getInstanceFromProjectInZoneByName(project, zone, name string) (*gceInstance, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - name = canonicalizeInstanceName(name) - mc := newInstancesMetricContext("get", zone) - res, err := g.c.Instances().Get(ctx, meta.ZonalKey(name, zone)) - mc.Observe(err) - if err != nil { - return nil, err - } - return &gceInstance{ - Zone: lastComponent(res.Zone), - Name: res.Name, - ID: res.Id, - Disks: res.Disks, - Type: lastComponent(res.MachineType), - }, nil -} - -func getInstanceIDViaMetadata() (string, error) { - result, err := metadata.Get("instance/hostname") - if err != nil { - return "", err - } - parts := strings.Split(result, ".") - if len(parts) == 0 { - return "", fmt.Errorf("unexpected response: %s", result) - } - return parts[0], nil -} - -func getCurrentMachineTypeViaMetadata() (string, error) { - mType, err := metadata.Get("instance/machine-type") - if err != nil { - return "", fmt.Errorf("couldn't get machine type: %v", err) - } - parts := strings.Split(mType, "/") - if len(parts) != 4 { - return "", fmt.Errorf("unexpected response for machine type: %s", mType) - } - - return parts[3], nil -} - -// isCurrentInstance uses metadata server to check if specified -// instanceID matches current machine's instanceID -func (g *Cloud) isCurrentInstance(instanceID string) bool { - currentInstanceID, err := getInstanceIDViaMetadata() - if err != nil { - // Log and swallow error - klog.Errorf("Failed to fetch instanceID via Metadata: %v", err) - return false - } - - return currentInstanceID == canonicalizeInstanceName(instanceID) -} - -// ComputeHostTags grabs all tags from all instances being added to the pool. -// * The longest tag that is a prefix of the instance name is used -// * If any instance has no matching prefix tag, return error -// Invoking this method to get host tags is risky since it depends on the -// format of the host names in the cluster. Only use it as a fallback if -// gce.nodeTags is unspecified -func (g *Cloud) computeHostTags(hosts []*gceInstance) ([]string, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - // TODO: We could store the tags in gceInstance, so we could have already fetched it - hostNamesByZone := make(map[string]map[string]bool) // map of zones -> map of names -> bool (for easy lookup) - nodeInstancePrefix := g.nodeInstancePrefix - for _, host := range hosts { - if !strings.HasPrefix(host.Name, g.nodeInstancePrefix) { - klog.Warningf("instance %v does not conform to prefix '%s', ignoring filter", host, g.nodeInstancePrefix) - nodeInstancePrefix = "" - } - - z, ok := hostNamesByZone[host.Zone] - if !ok { - z = make(map[string]bool) - hostNamesByZone[host.Zone] = z - } - z[host.Name] = true - } - - tags := sets.NewString() - - filt := filter.None - if nodeInstancePrefix != "" { - filt = filter.Regexp("name", nodeInstancePrefix+".*") - } - for zone, hostNames := range hostNamesByZone { - instances, err := g.c.Instances().List(ctx, zone, filt) - if err != nil { - return nil, err - } - for _, instance := range instances { - if !hostNames[instance.Name] { - continue - } - longestTag := "" - for _, tag := range instance.Tags.Items { - if strings.HasPrefix(instance.Name, tag) && len(tag) > len(longestTag) { - longestTag = tag - } - } - if len(longestTag) > 0 { - tags.Insert(longestTag) - } else { - return nil, fmt.Errorf("could not find any tag that is a prefix of instance name for instance %s", instance.Name) - } - } - } - if len(tags) == 0 { - return nil, fmt.Errorf("no instances found") - } - return tags.List(), nil -} - -// GetNodeTags will first try returning the list of tags specified in GCE cloud Configuration. -// If they weren't provided, it'll compute the host tags with the given hostnames. If the list -// of hostnames has not changed, a cached set of nodetags are returned. -func (g *Cloud) GetNodeTags(nodeNames []string) ([]string, error) { - // If nodeTags were specified through configuration, use them - if len(g.nodeTags) > 0 { - return g.nodeTags, nil - } - - g.computeNodeTagLock.Lock() - defer g.computeNodeTagLock.Unlock() - - // Early return if hosts have not changed - hosts := sets.NewString(nodeNames...) - if hosts.Equal(g.lastKnownNodeNames) { - return g.lastComputedNodeTags, nil - } - - // Get GCE instance data by hostname - instances, err := g.getInstancesByNames(nodeNames) - if err != nil { - return nil, err - } - - // Determine list of host tags - tags, err := g.computeHostTags(instances) - if err != nil { - return nil, err - } - - // Save the list of tags - g.lastKnownNodeNames = hosts - g.lastComputedNodeTags = tags - return tags, nil -} - -// NodeNetworkInterfacesByProviderID returns a list of node interfaces that exist on the node. -func (g *Cloud) InstanceByProviderID(providerID string) (res *compute.Instance, err error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - _, zone, name, err := splitProviderID(providerID) - if err != nil { - return nil, err - } - - res, err = g.c.Instances().Get(ctx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) - if err != nil { - return nil, err - } - return res, nil -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_interfaces.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_interfaces.go deleted file mode 100644 index b6fbcc3c96b0b..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_interfaces.go +++ /dev/null @@ -1,54 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computebeta "google.golang.org/api/compute/v0.beta" - compute "google.golang.org/api/compute/v1" -) - -// These interfaces are added for testability. - -// CloudAddressService is an interface for managing addresses -type CloudAddressService interface { - ReserveRegionAddress(address *compute.Address, region string) error - GetRegionAddress(name string, region string) (*compute.Address, error) - GetRegionAddressByIP(region, ipAddress string) (*compute.Address, error) - DeleteRegionAddress(name, region string) error - // TODO: Mock Global endpoints - - // Beta API - ReserveBetaRegionAddress(address *computebeta.Address, region string) error - GetBetaRegionAddress(name string, region string) (*computebeta.Address, error) - GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta.Address, error) - - getNetworkTierFromAddress(name, region string) (string, error) -} - -// CloudForwardingRuleService is an interface for managing forwarding rules. -// TODO: Expand the interface to include more methods. -type CloudForwardingRuleService interface { - GetRegionForwardingRule(name, region string) (*compute.ForwardingRule, error) - CreateRegionForwardingRule(rule *compute.ForwardingRule, region string) error - DeleteRegionForwardingRule(name, region string) error - - // Needed for the "Network Tiers" feature. - getNetworkTierFromForwardingRule(name, region string) (string, error) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer.go deleted file mode 100644 index d28b8fb6f490d..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer.go +++ /dev/null @@ -1,316 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "flag" - "fmt" - "sort" - "strings" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1apply "k8s.io/client-go/applyconfigurations/core/v1" - metav1apply "k8s.io/client-go/applyconfigurations/meta/v1" - "k8s.io/klog/v2" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - cloudprovider "k8s.io/cloud-provider" - netutils "k8s.io/utils/net" -) - -type cidrs struct { - ipn netutils.IPNetSet - isSet bool -} - -var ( - l4LbSrcRngsFlag cidrs - l7lbSrcRngsFlag cidrs -) - -func init() { - var err error - // L3/4 health checkers have client addresses within these known CIDRs. - l4LbSrcRngsFlag.ipn, err = netutils.ParseIPNets([]string{"130.211.0.0/22", "35.191.0.0/16", "209.85.152.0/22", "209.85.204.0/22"}...) - if err != nil { - panic("Incorrect default GCE L3/4 source ranges") - } - // L7 health checkers have client addresses within these known CIDRs. - l7lbSrcRngsFlag.ipn, err = netutils.ParseIPNets([]string{"130.211.0.0/22", "35.191.0.0/16"}...) - if err != nil { - panic("Incorrect default GCE L7 source ranges") - } - - flag.Var(&l4LbSrcRngsFlag, "cloud-provider-gce-lb-src-cidrs", "CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks") - flag.Var(&l7lbSrcRngsFlag, "cloud-provider-gce-l7lb-src-cidrs", "CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks") -} - -// String is the method to format the flag's value, part of the flag.Value interface. -func (c *cidrs) String() string { - s := c.ipn.StringSlice() - sort.Strings(s) - return strings.Join(s, ",") -} - -// Set supports a value of CSV or the flag repeated multiple times -func (c *cidrs) Set(value string) error { - // On first Set(), clear the original defaults - if !c.isSet { - c.isSet = true - c.ipn = make(netutils.IPNetSet) - } else { - return fmt.Errorf("GCE LB CIDRs have already been set") - } - - for _, cidr := range strings.Split(value, ",") { - _, ipnet, err := netutils.ParseCIDRSloppy(cidr) - if err != nil { - return err - } - - c.ipn.Insert(ipnet) - } - return nil -} - -// L4LoadBalancerSrcRanges contains the ranges of ips used by the L3/L4 GCE load balancers -// for proxying client requests and performing health checks. -func L4LoadBalancerSrcRanges() []string { - return l4LbSrcRngsFlag.ipn.StringSlice() -} - -// L7LoadBalancerSrcRanges contains the ranges of ips used by the GCE load balancers L7 -// for proxying client requests and performing health checks. -func L7LoadBalancerSrcRanges() []string { - return l7lbSrcRngsFlag.ipn.StringSlice() -} - -// GetLoadBalancer is an implementation of LoadBalancer.GetLoadBalancer -func (g *Cloud) GetLoadBalancer(ctx context.Context, clusterName string, svc *v1.Service) (*v1.LoadBalancerStatus, bool, error) { - loadBalancerName := g.GetLoadBalancerName(ctx, clusterName, svc) - fwd, err := g.GetRegionForwardingRule(loadBalancerName, g.region) - if err == nil { - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: fwd.IPAddress}} - - return status, true, nil - } - // Checking for finalizer is more accurate because controller restart could happen in the middle of resource - // deletion. So even though forwarding rule was deleted, cleanup might not have been complete. - if hasFinalizer(svc, ILBFinalizerV1) { - return &v1.LoadBalancerStatus{}, true, nil - } - return nil, false, ignoreNotFound(err) -} - -// GetLoadBalancerName is an implementation of LoadBalancer.GetLoadBalancerName. -func (g *Cloud) GetLoadBalancerName(ctx context.Context, clusterName string, svc *v1.Service) string { - // TODO: replace DefaultLoadBalancerName to generate more meaningful loadbalancer names. - return cloudprovider.DefaultLoadBalancerName(svc) -} - -// EnsureLoadBalancer is an implementation of LoadBalancer.EnsureLoadBalancer. -func (g *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, svc *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - // GCE load balancers do not support services with LoadBalancerClass set. LoadBalancerClass can't be updated for an existing load balancer, so here we don't need to clean any resources. - // Check API documentation for .Spec.LoadBalancerClass for details on when this field is allowed to be changed. - if svc.Spec.LoadBalancerClass != nil { - klog.Infof("Ignoring service %s/%s using load balancer class %s, it is not supported by this controller.", svc.Namespace, svc.Name, svc.Spec.LoadBalancerClass) - return nil, cloudprovider.ImplementedElsewhere - } - - loadBalancerName := g.GetLoadBalancerName(ctx, clusterName, svc) - desiredScheme := getSvcScheme(svc) - clusterID, err := g.ClusterID.GetID() - if err != nil { - return nil, err - } - - // Services with multiples protocols are not supported by this controller, warn the users and sets - // the corresponding Service Status Condition. - // https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/1435-mixed-protocol-lb - if err := checkMixedProtocol(svc.Spec.Ports); err != nil { - if hasLoadBalancerPortsError(svc) { - return nil, err - } - klog.Warningf("Ignoring service %s/%s using different ports protocols", svc.Namespace, svc.Name) - g.eventRecorder.Event(svc, v1.EventTypeWarning, v1.LoadBalancerPortsErrorReason, "LoadBalancers with multiple protocols are not supported.") - svcApplyStatus := corev1apply.ServiceStatus().WithConditions( - metav1apply.Condition(). - WithType(v1.LoadBalancerPortsError). - WithStatus(metav1.ConditionTrue). - WithReason(v1.LoadBalancerPortsErrorReason). - WithMessage("LoadBalancer with multiple protocols are not supported")) - svcApply := corev1apply.Service(svc.Name, svc.Namespace).WithStatus(svcApplyStatus) - if _, errApply := g.client.CoreV1().Services(svc.Namespace).ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: "gce-cloud-controller", Force: true}); errApply != nil { - return nil, errApply - } - return nil, err - } - - klog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): ensure %v loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, desiredScheme) - - existingFwdRule, err := g.GetRegionForwardingRule(loadBalancerName, g.region) - if err != nil && !isNotFound(err) { - return nil, err - } - - if existingFwdRule != nil { - existingScheme := cloud.LbScheme(strings.ToUpper(existingFwdRule.LoadBalancingScheme)) - - // If the loadbalancer type changes between INTERNAL and EXTERNAL, the old load balancer should be deleted. - if existingScheme != desiredScheme { - klog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): deleting existing %v loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, existingScheme) - switch existingScheme { - case cloud.SchemeInternal: - err = g.ensureInternalLoadBalancerDeleted(clusterName, clusterID, svc) - default: - err = g.ensureExternalLoadBalancerDeleted(clusterName, clusterID, svc) - } - klog.V(4).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v): done deleting existing %v loadbalancer. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, existingScheme, err) - if err != nil { - return nil, err - } - - // Assume the ensureDeleted function successfully deleted the forwarding rule. - existingFwdRule = nil - } - } - - var status *v1.LoadBalancerStatus - switch desiredScheme { - case cloud.SchemeInternal: - status, err = g.ensureInternalLoadBalancer(clusterName, clusterID, svc, existingFwdRule, nodes) - default: - status, err = g.ensureExternalLoadBalancer(clusterName, clusterID, svc, existingFwdRule, nodes) - } - if err != nil { - klog.Errorf("Failed to EnsureLoadBalancer(%s, %s, %s, %s, %s), err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, err) - return status, err - } - klog.V(4).Infof("EnsureLoadBalancer(%s, %s, %s, %s, %s): done ensuring loadbalancer.", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region) - return status, err -} - -// UpdateLoadBalancer is an implementation of LoadBalancer.UpdateLoadBalancer. -func (g *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, svc *v1.Service, nodes []*v1.Node) error { - // GCE load balancers do not support services with LoadBalancerClass set. LoadBalancerClass can't be updated for an existing load balancer, so here we don't need to clean any resources. - // Check API documentation for .Spec.LoadBalancerClass for details on when this field is allowed to be changed. - if svc.Spec.LoadBalancerClass != nil { - klog.Infof("Ignoring service %s/%s using load balancer class %s, it is not supported by this controller.", svc.Namespace, svc.Name, svc.Spec.LoadBalancerClass) - return cloudprovider.ImplementedElsewhere - } - - loadBalancerName := g.GetLoadBalancerName(ctx, clusterName, svc) - scheme := getSvcScheme(svc) - clusterID, err := g.ClusterID.GetID() - if err != nil { - return err - } - - // Services with multiples protocols are not supported by this controller, warn the users and sets - // the corresponding Service Status Condition, but keep processing the Update to not break upgrades. - // https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/1435-mixed-protocol-lb - if err := checkMixedProtocol(svc.Spec.Ports); err != nil && !hasLoadBalancerPortsError(svc) { - klog.Warningf("Ignoring update for service %s/%s using different ports protocols", svc.Namespace, svc.Name) - g.eventRecorder.Event(svc, v1.EventTypeWarning, v1.LoadBalancerPortsErrorReason, "LoadBalancer with multiple protocols are not supported.") - svcApplyStatus := corev1apply.ServiceStatus().WithConditions( - metav1apply.Condition(). - WithType(v1.LoadBalancerPortsError). - WithStatus(metav1.ConditionTrue). - WithReason(v1.LoadBalancerPortsErrorReason). - WithMessage("LoadBalancer with multiple protocols are not supported")) - svcApply := corev1apply.Service(svc.Name, svc.Namespace).WithStatus(svcApplyStatus) - if _, errApply := g.client.CoreV1().Services(svc.Namespace).ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: "gce-cloud-controller", Force: true}); errApply != nil { - // the error is retried by the controller loop - return errApply - } - } - - klog.V(4).Infof("UpdateLoadBalancer(%v, %v, %v, %v, %v): updating with %v nodes [node names limited, total number of nodes: %d]", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, loggableNodeNames(nodes), len(nodes)) - - switch scheme { - case cloud.SchemeInternal: - err = g.updateInternalLoadBalancer(clusterName, clusterID, svc, nodes) - default: - err = g.updateExternalLoadBalancer(clusterName, svc, nodes) - } - klog.V(4).Infof("UpdateLoadBalancer(%v, %v, %v, %v, %v): done updating. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, err) - return err -} - -// EnsureLoadBalancerDeleted is an implementation of LoadBalancer.EnsureLoadBalancerDeleted. -func (g *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, svc *v1.Service) error { - loadBalancerName := g.GetLoadBalancerName(ctx, clusterName, svc) - scheme := getSvcScheme(svc) - clusterID, err := g.ClusterID.GetID() - if err != nil { - return err - } - - klog.V(4).Infof("EnsureLoadBalancerDeleted(%v, %v, %v, %v, %v): deleting loadbalancer", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region) - - switch scheme { - case cloud.SchemeInternal: - err = g.ensureInternalLoadBalancerDeleted(clusterName, clusterID, svc) - default: - err = g.ensureExternalLoadBalancerDeleted(clusterName, clusterID, svc) - } - klog.V(4).Infof("EnsureLoadBalancerDeleted(%v, %v, %v, %v, %v): done deleting loadbalancer. err: %v", clusterName, svc.Namespace, svc.Name, loadBalancerName, g.region, err) - return err -} - -func getSvcScheme(svc *v1.Service) cloud.LbScheme { - if t := GetLoadBalancerAnnotationType(svc); t == LBTypeInternal { - return cloud.SchemeInternal - } - return cloud.SchemeExternal -} - -// checkMixedProtocol checks if the Service Ports uses different protocols, -// per examples, TCP and UDP. -func checkMixedProtocol(ports []v1.ServicePort) error { - if len(ports) == 0 { - return nil - } - - firstProtocol := ports[0].Protocol - for _, port := range ports[1:] { - if port.Protocol != firstProtocol { - return fmt.Errorf("mixed protocol is not supported for LoadBalancer") - } - } - return nil -} - -// hasLoadBalancerPortsError checks if the Service has the LoadBalancerPortsError set to True -func hasLoadBalancerPortsError(service *v1.Service) bool { - if service == nil { - return false - } - - for _, cond := range service.Status.Conditions { - if cond.Type == v1.LoadBalancerPortsError { - return cond.Status == metav1.ConditionTrue - } - } - return false -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_external.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_external.go deleted file mode 100644 index 4c20ee9090357..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_external.go +++ /dev/null @@ -1,1175 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - "net/http" - "reflect" - "strconv" - "strings" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/sets" - cloudprovider "k8s.io/cloud-provider" - servicehelpers "k8s.io/cloud-provider/service/helpers" - utilnet "k8s.io/utils/net" - - "google.golang.org/api/compute/v1" - "k8s.io/klog/v2" -) - -const ( - errStrLbNoHosts = "cannot EnsureLoadBalancer() with no hosts" - maxNodeNamesToLog = 50 -) - -// ensureExternalLoadBalancer is the external implementation of LoadBalancer.EnsureLoadBalancer. -// Our load balancers in GCE consist of four separate GCE resources - a static -// IP address, a firewall rule, a target pool, and a forwarding rule. This -// function has to manage all of them. -// -// Due to an interesting series of design decisions, this handles both creating -// new load balancers and updating existing load balancers, recognizing when -// each is needed. -func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - // Skip service handling if it uses Regional Backend Services and handled by other controllers - if usesL4RBS(apiService, existingFwdRule) { - return nil, cloudprovider.ImplementedElsewhere - } - - if len(nodes) == 0 { - return nil, fmt.Errorf(errStrLbNoHosts) - } - - hostNames := nodeNames(nodes) - hosts, err := g.getInstancesByNames(hostNames) - if err != nil { - return nil, err - } - - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, apiService) - requestedIP := apiService.Spec.LoadBalancerIP - ports := apiService.Spec.Ports - portStr := []string{} - for _, p := range apiService.Spec.Ports { - portStr = append(portStr, fmt.Sprintf("%s/%d", p.Protocol, p.Port)) - } - - serviceName := types.NamespacedName{Namespace: apiService.Namespace, Name: apiService.Name} - lbRefStr := fmt.Sprintf("%v(%v)", loadBalancerName, serviceName) - klog.V(2).Infof("ensureExternalLoadBalancer(%s, %v, %v, %v, %v, %v)", lbRefStr, g.region, requestedIP, portStr, hostNames, apiService.Annotations) - - // Check the current and the desired network tiers. If they do not match, - // tear down the existing resources with the wrong tier. - netTier, err := g.getServiceNetworkTier(apiService) - if err != nil { - klog.Errorf("ensureExternalLoadBalancer(%s): Failed to get the desired network tier: %v.", lbRefStr, err) - return nil, err - } - klog.V(4).Infof("ensureExternalLoadBalancer(%s): Desired network tier %q.", lbRefStr, netTier) - // TODO: distinguish between unspecified and specified network tiers annotation properly in forwardingrule creation - // Only delete ForwardingRule when network tier annotation is specified, otherwise leave it only to avoid wrongful - // deletion against user intention when network tier annotation is not specified. - if _, ok := apiService.Annotations[NetworkTierAnnotationKey]; ok { - g.deleteWrongNetworkTieredResources(loadBalancerName, lbRefStr, netTier) - } - - // Check if the forwarding rule exists, and if so, what its IP is. - fwdRuleExists, fwdRuleNeedsUpdate, fwdRuleIP, err := g.forwardingRuleNeedsUpdate(loadBalancerName, g.region, requestedIP, ports) - if err != nil { - return nil, err - } - if !fwdRuleExists { - klog.V(2).Infof("ensureExternalLoadBalancer(%s): Forwarding rule %v doesn't exist.", lbRefStr, loadBalancerName) - } - - // Make sure we know which IP address will be used and have properly reserved - // it as static before moving forward with the rest of our operations. - // - // We use static IP addresses when updating a load balancer to ensure that we - // can replace the load balancer's other components without changing the - // address its service is reachable on. We do it this way rather than always - // keeping the static IP around even though this is more complicated because - // it makes it less likely that we'll run into quota issues. Only 7 static - // IP addresses are allowed per region by default. - // - // We could let an IP be allocated for us when the forwarding rule is created, - // but we need the IP to set up the firewall rule, and we want to keep the - // forwarding rule creation as the last thing that needs to be done in this - // function in order to maintain the invariant that "if the forwarding rule - // exists, the LB has been fully created". - ipAddressToUse := "" - - // Through this process we try to keep track of whether it is safe to - // release the IP that was allocated. If the user specifically asked for - // an IP, we assume they are managing it themselves. Otherwise, we will - // release the IP in case of early-terminating failure or upon successful - // creating of the LB. - // TODO(#36535): boil this logic down into a set of component functions - // and key the flag values off of errors returned. - isUserOwnedIP := false // if this is set, we never release the IP - isSafeToReleaseIP := false - defer func() { - if isUserOwnedIP { - return - } - if isSafeToReleaseIP { - if err := g.DeleteRegionAddress(loadBalancerName, g.region); err != nil && !isNotFound(err) { - klog.Errorf("ensureExternalLoadBalancer(%s): Failed to release static IP %s in region %v: %v.", lbRefStr, ipAddressToUse, g.region, err) - } else if isNotFound(err) { - klog.V(2).Infof("ensureExternalLoadBalancer(%s): IP address %s is not reserved.", lbRefStr, ipAddressToUse) - } else { - klog.Infof("ensureExternalLoadBalancer(%s): Released static IP %s.", lbRefStr, ipAddressToUse) - } - } else { - klog.Warningf("ensureExternalLoadBalancer(%s): Orphaning static IP %s in region %v: %v.", lbRefStr, ipAddressToUse, g.region, err) - } - }() - - if requestedIP != "" { - // If user requests a specific IP address, verify first. No mutation to - // the GCE resources will be performed in the verification process. - isUserOwnedIP, err = verifyUserRequestedIP(g, g.region, requestedIP, fwdRuleIP, lbRefStr, netTier) - if err != nil { - return nil, err - } - ipAddressToUse = requestedIP - } - - if !isUserOwnedIP { - // If we are not using the user-owned IP, either promote the - // emphemeral IP used by the fwd rule, or create a new static IP. - ipAddr, existed, err := ensureStaticIP(g, loadBalancerName, serviceName.String(), g.region, fwdRuleIP, netTier) - if err != nil { - return nil, fmt.Errorf("failed to ensure a static IP for load balancer (%s): %v", lbRefStr, err) - } - klog.Infof("ensureExternalLoadBalancer(%s): Ensured IP address %s (tier: %s).", lbRefStr, ipAddr, netTier) - // If the IP was not owned by the user, but it already existed, it - // could indicate that the previous update cycle failed. We can use - // this IP and try to run through the process again, but we should - // not release the IP unless it is explicitly flagged as OK. - isSafeToReleaseIP = !existed - ipAddressToUse = ipAddr - } - - // Deal with the firewall next. The reason we do this here rather than last - // is because the forwarding rule is used as the indicator that the load - // balancer is fully created - it's what getLoadBalancer checks for. - // Check if user specified the allow source range - sourceRanges, err := servicehelpers.GetLoadBalancerSourceRanges(apiService) - if err != nil { - return nil, err - } - - firewallExists, firewallNeedsUpdate, err := g.firewallNeedsUpdate(loadBalancerName, serviceName.String(), ipAddressToUse, ports, sourceRanges) - if err != nil { - return nil, err - } - - if firewallNeedsUpdate { - desc := makeFirewallDescription(serviceName.String(), ipAddressToUse) - // Unlike forwarding rules and target pools, firewalls can be updated - // without needing to be deleted and recreated. - if firewallExists { - klog.Infof("ensureExternalLoadBalancer(%s): Updating firewall.", lbRefStr) - if err := g.updateFirewall(apiService, MakeFirewallName(loadBalancerName), desc, ipAddressToUse, sourceRanges, ports, hosts); err != nil { - return nil, err - } - klog.Infof("ensureExternalLoadBalancer(%s): Updated firewall.", lbRefStr) - } else { - klog.Infof("ensureExternalLoadBalancer(%s): Creating firewall.", lbRefStr) - if err := g.createFirewall(apiService, MakeFirewallName(loadBalancerName), desc, ipAddressToUse, sourceRanges, ports, hosts); err != nil { - return nil, err - } - klog.Infof("ensureExternalLoadBalancer(%s): Created firewall.", lbRefStr) - } - } - - tpExists, tpNeedsRecreation, err := g.targetPoolNeedsRecreation(loadBalancerName, g.region, apiService.Spec.SessionAffinity) - if err != nil { - return nil, err - } - if !tpExists { - klog.Infof("ensureExternalLoadBalancer(%s): Target pool for service doesn't exist.", lbRefStr) - } - - // Check which health check needs to create and which health check needs to delete. - // Health check management is coupled with target pool operation to prevent leaking. - var hcToCreate, hcToDelete *compute.HttpHealthCheck - hcLocalTrafficExisting, err := g.GetHTTPHealthCheck(loadBalancerName) - if err != nil && !isHTTPErrorCode(err, http.StatusNotFound) { - return nil, fmt.Errorf("error checking HTTP health check for load balancer (%s): %v", lbRefStr, err) - } - if path, healthCheckNodePort := servicehelpers.GetServiceHealthCheckPathPort(apiService); path != "" { - klog.V(4).Infof("ensureExternalLoadBalancer(%s): Service needs local traffic health checks on: %d%s.", lbRefStr, healthCheckNodePort, path) - if hcLocalTrafficExisting == nil { - // This logic exists to detect a transition for non-OnlyLocal to OnlyLocal service - // turn on the tpNeedsRecreation flag to delete/recreate fwdrule/tpool updating the - // target pool to use local traffic health check. - klog.V(2).Infof("ensureExternalLoadBalancer(%s): Updating from nodes health checks to local traffic health checks.", lbRefStr) - hcToDelete = makeHTTPHealthCheck(MakeNodesHealthCheckName(clusterID), GetNodesHealthCheckPath(), GetNodesHealthCheckPort()) - tpNeedsRecreation = true - } - hcToCreate = makeHTTPHealthCheck(loadBalancerName, path, healthCheckNodePort) - } else { - klog.V(4).Infof("ensureExternalLoadBalancer(%s): Service needs nodes health checks.", lbRefStr) - if hcLocalTrafficExisting != nil { - // This logic exists to detect a transition from OnlyLocal to non-OnlyLocal service - // and turn on the tpNeedsRecreation flag to delete/recreate fwdrule/tpool updating the - // target pool to use nodes health check. - klog.V(2).Infof("ensureExternalLoadBalancer(%s): Updating from local traffic health checks to nodes health checks.", lbRefStr) - hcToDelete = hcLocalTrafficExisting - tpNeedsRecreation = true - } - hcToCreate = makeHTTPHealthCheck(MakeNodesHealthCheckName(clusterID), GetNodesHealthCheckPath(), GetNodesHealthCheckPort()) - } - // Now we get to some slightly more interesting logic. - // First, neither target pools nor forwarding rules can be updated in place - - // they have to be deleted and recreated. - // Second, forwarding rules are layered on top of target pools in that you - // can't delete a target pool that's currently in use by a forwarding rule. - // Thus, we have to tear down the forwarding rule if either it or the target - // pool needs to be updated. - if fwdRuleExists && (fwdRuleNeedsUpdate || tpNeedsRecreation) { - // Begin critical section. If we have to delete the forwarding rule, - // and something should fail before we recreate it, don't release the - // IP. That way we can come back to it later. - isSafeToReleaseIP = false - if err := g.DeleteRegionForwardingRule(loadBalancerName, g.region); err != nil && !isNotFound(err) { - return nil, fmt.Errorf("failed to delete existing forwarding rule for load balancer (%s) update: %v", lbRefStr, err) - } - klog.Infof("ensureExternalLoadBalancer(%s): Deleted forwarding rule.", lbRefStr) - } - - if err := g.ensureTargetPoolAndHealthCheck(tpExists, tpNeedsRecreation, apiService, loadBalancerName, clusterID, ipAddressToUse, hosts, hcToCreate, hcToDelete); err != nil { - return nil, err - } - - if tpNeedsRecreation || fwdRuleNeedsUpdate { - klog.Infof("ensureExternalLoadBalancer(%s): Creating forwarding rule, IP %s (tier: %s).", lbRefStr, ipAddressToUse, netTier) - if err := createForwardingRule(g, loadBalancerName, serviceName.String(), g.region, ipAddressToUse, g.targetPoolURL(loadBalancerName), ports, netTier); err != nil { - return nil, fmt.Errorf("failed to create forwarding rule for load balancer (%s): %v", lbRefStr, err) - } - // End critical section. It is safe to release the static IP (which - // just demotes it to ephemeral) now that it is attached. In the case - // of a user-requested IP, the "is user-owned" flag will be set, - // preventing it from actually being released. - isSafeToReleaseIP = true - klog.Infof("ensureExternalLoadBalancer(%s): Created forwarding rule, IP %s.", lbRefStr, ipAddressToUse) - } - - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: ipAddressToUse}} - - return status, nil -} - -// updateExternalLoadBalancer is the external implementation of LoadBalancer.UpdateLoadBalancer. -func (g *Cloud) updateExternalLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error { - // Skip service update if it uses Regional Backend Services and handled by other controllers - if usesL4RBS(service, nil) { - return cloudprovider.ImplementedElsewhere - } - - hosts, err := g.getInstancesByNames(nodeNames(nodes)) - if err != nil { - return err - } - - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) - return g.updateTargetPool(loadBalancerName, hosts) -} - -// ensureExternalLoadBalancerDeleted is the external implementation of LoadBalancer.EnsureLoadBalancerDeleted -func (g *Cloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID string, service *v1.Service) error { - // Skip service deletion if it uses Regional Backend Services and handled by other controllers - if usesL4RBS(service, nil) { - return cloudprovider.ImplementedElsewhere - } - - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) - serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - lbRefStr := fmt.Sprintf("%v(%v)", loadBalancerName, serviceName) - - var hcNames []string - if path, _ := servicehelpers.GetServiceHealthCheckPathPort(service); path != "" { - hcToDelete, err := g.GetHTTPHealthCheck(loadBalancerName) - if err != nil && !isHTTPErrorCode(err, http.StatusNotFound) { - klog.Infof("ensureExternalLoadBalancerDeleted(%s): Failed to retrieve health check:%v.", lbRefStr, err) - return err - } - // If we got 'StatusNotFound' LB was already deleted and it's safe to ignore. - if err == nil { - hcNames = append(hcNames, hcToDelete.Name) - } - } else { - // EnsureLoadBalancerDeleted() could be triggered by changing service from - // LoadBalancer type to others. In this case we have no idea whether it was - // using local traffic health check or nodes health check. Attempt to delete - // both to prevent leaking. - hcNames = append(hcNames, loadBalancerName) - hcNames = append(hcNames, MakeNodesHealthCheckName(clusterID)) - } - - errs := utilerrors.AggregateGoroutines( - func() error { - klog.Infof("ensureExternalLoadBalancerDeleted(%s): Deleting firewall rule.", lbRefStr) - fwName := MakeFirewallName(loadBalancerName) - err := ignoreNotFound(g.DeleteFirewall(fwName)) - if isForbidden(err) && g.OnXPN() { - klog.V(4).Infof("ensureExternalLoadBalancerDeleted(%s): Do not have permission to delete firewall rule %v (on XPN). Raising event.", lbRefStr, fwName) - g.raiseFirewallChangeNeededEvent(service, FirewallToGCloudDeleteCmd(fwName, g.NetworkProjectID())) - return nil - } - return err - }, - // Even though we don't hold on to static IPs for load balancers, it's - // possible that EnsureLoadBalancer left one around in a failed - // creation/update attempt, so make sure we clean it up here just in case. - func() error { - klog.Infof("ensureExternalLoadBalancerDeleted(%s): Deleting IP address.", lbRefStr) - return ignoreNotFound(g.DeleteRegionAddress(loadBalancerName, g.region)) - }, - func() error { - klog.Infof("ensureExternalLoadBalancerDeleted(%s): Deleting forwarding rule.", lbRefStr) - // The forwarding rule must be deleted before either the target pool can, - // unfortunately, so we have to do these two serially. - if err := ignoreNotFound(g.DeleteRegionForwardingRule(loadBalancerName, g.region)); err != nil { - return err - } - klog.Infof("ensureExternalLoadBalancerDeleted(%s): Deleting target pool.", lbRefStr) - if err := g.DeleteExternalTargetPoolAndChecks(service, loadBalancerName, g.region, clusterID, hcNames...); err != nil { - return err - } - return nil - }, - ) - if errs != nil { - return utilerrors.Flatten(errs) - } - return nil -} - -// DeleteExternalTargetPoolAndChecks Deletes an external load balancer pool and verifies the operation -func (g *Cloud) DeleteExternalTargetPoolAndChecks(service *v1.Service, name, region, clusterID string, hcNames ...string) error { - serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - lbRefStr := fmt.Sprintf("%v(%v)", name, serviceName) - - if err := g.DeleteTargetPool(name, region); err != nil && isHTTPErrorCode(err, http.StatusNotFound) { - klog.Infof("DeleteExternalTargetPoolAndChecks(%v): Target pool already deleted. Continuing to delete other resources.", lbRefStr) - } else if err != nil { - klog.Warningf("DeleteExternalTargetPoolAndChecks(%v): Failed to delete target pool, got error %s.", lbRefStr, err.Error()) - return err - } - - // Deletion of health checks is allowed only after the TargetPool reference is deleted - for _, hcName := range hcNames { - if err := func() error { - // Check whether it is nodes health check, which has different name from the load-balancer. - isNodesHealthCheck := hcName != name - if isNodesHealthCheck { - // Lock to prevent deleting necessary nodes health check before it gets attached - // to target pool. - g.sharedResourceLock.Lock() - defer g.sharedResourceLock.Unlock() - } - klog.Infof("DeleteExternalTargetPoolAndChecks(%v): Deleting health check %v.", lbRefStr, hcName) - if err := g.DeleteHTTPHealthCheck(hcName); err != nil { - // Delete nodes health checks will fail if any other target pool is using it. - if isInUsedByError(err) { - klog.V(4).Infof("DeleteExternalTargetPoolAndChecks(%v): Health check %v is in used: %v.", lbRefStr, hcName, err) - return nil - } else if !isHTTPErrorCode(err, http.StatusNotFound) { - klog.Warningf("DeleteExternalTargetPoolAndChecks(%v): Failed to delete health check %v: %v.", lbRefStr, hcName, err) - return err - } - // StatusNotFound could happen when: - // - This is the first attempt but we pass in a healthcheck that is already deleted - // to prevent leaking. - // - This is the first attempt but user manually deleted the heathcheck. - // - This is a retry and in previous round we failed to delete the healthcheck firewall - // after deleted the healthcheck. - // We continue to delete the healthcheck firewall to prevent leaking. - klog.V(4).Infof("DeleteExternalTargetPoolAndChecks(%v): Health check %v is already deleted.", lbRefStr, hcName) - } - // If health check is deleted without error, it means no load-balancer is using it. - // So we should delete the health check firewall as well. - fwName := MakeHealthCheckFirewallName(clusterID, hcName, isNodesHealthCheck) - klog.Infof("DeleteExternalTargetPoolAndChecks(%v): Deleting health check firewall %v.", lbRefStr, fwName) - if err := ignoreNotFound(g.DeleteFirewall(fwName)); err != nil { - if isForbidden(err) && g.OnXPN() { - klog.V(4).Infof("DeleteExternalTargetPoolAndChecks(%v): Do not have permission to delete firewall rule %v (on XPN). Raising event.", lbRefStr, fwName) - g.raiseFirewallChangeNeededEvent(service, FirewallToGCloudDeleteCmd(fwName, g.NetworkProjectID())) - return nil - } - return err - } - return nil - }(); err != nil { - return err - } - } - - return nil -} - -// verifyUserRequestedIP checks the user-provided IP to see whether it meets -// all the expected attributes for the load balancer, and returns an error if -// the verification failed. It also returns a boolean to indicate whether the -// IP address is considered owned by the user (i.e., not managed by the -// controller. -func verifyUserRequestedIP(s CloudAddressService, region, requestedIP, fwdRuleIP, lbRef string, desiredNetTier cloud.NetworkTier) (isUserOwnedIP bool, err error) { - if requestedIP == "" { - return false, nil - } - // If a specific IP address has been requested, we have to respect the - // user's request and use that IP. If the forwarding rule was already using - // a different IP, it will be harmlessly abandoned because it was only an - // ephemeral IP (or it was a different static IP owned by the user, in which - // case we shouldn't delete it anyway). - existingAddress, err := s.GetRegionAddressByIP(region, requestedIP) - if err != nil && !isNotFound(err) { - klog.Errorf("verifyUserRequestedIP: failed to check whether the requested IP %q for LB %s exists: %v", requestedIP, lbRef, err) - return false, err - } - if err == nil { - // The requested IP is a static IP, owned and managed by the user. - - // Check if the network tier of the static IP matches the desired - // network tier. - netTierStr, err := s.getNetworkTierFromAddress(existingAddress.Name, region) - if err != nil { - return false, fmt.Errorf("failed to check the network tier of the IP %q: %v", requestedIP, err) - } - netTier := cloud.NetworkTierGCEValueToType(netTierStr) - if netTier != desiredNetTier { - klog.Errorf("verifyUserRequestedIP: requested static IP %q (name: %s) for LB %s has network tier %s, need %s.", requestedIP, existingAddress.Name, lbRef, netTier, desiredNetTier) - return false, fmt.Errorf("requested IP %q belongs to the %s network tier; expected %s", requestedIP, netTier, desiredNetTier) - } - klog.V(4).Infof("verifyUserRequestedIP: the requested static IP %q (name: %s, tier: %s) for LB %s exists.", requestedIP, existingAddress.Name, netTier, lbRef) - return true, nil - } - if requestedIP == fwdRuleIP { - // The requested IP is not a static IP, but is currently assigned - // to this forwarding rule, so we can just use it. - klog.V(4).Infof("verifyUserRequestedIP: the requested IP %q is not static, but is currently in use by for LB %s", requestedIP, lbRef) - return false, nil - } - // The requested IP is not static and it is not assigned to the - // current forwarding rule. It might be attached to a different - // rule or it might not be part of this project at all. Either - // way, we can't use it. - klog.Errorf("verifyUserRequestedIP: requested IP %q for LB %s is neither static nor assigned to the LB", requestedIP, lbRef) - return false, fmt.Errorf("requested ip %q is neither static nor assigned to the LB", requestedIP) -} - -func (g *Cloud) ensureTargetPoolAndHealthCheck(tpExists, tpNeedsRecreation bool, svc *v1.Service, loadBalancerName, clusterID, ipAddressToUse string, hosts []*gceInstance, hcToCreate, hcToDelete *compute.HttpHealthCheck) error { - serviceName := types.NamespacedName{Namespace: svc.Namespace, Name: svc.Name} - lbRefStr := fmt.Sprintf("%v(%v)", loadBalancerName, serviceName) - - if tpExists && tpNeedsRecreation { - // Pass healthchecks to DeleteExternalTargetPoolAndChecks to cleanup health checks after cleaning up the target pool itself. - var hcNames []string - if hcToDelete != nil { - hcNames = append(hcNames, hcToDelete.Name) - } - if err := g.DeleteExternalTargetPoolAndChecks(svc, loadBalancerName, g.region, clusterID, hcNames...); err != nil { - return fmt.Errorf("failed to delete existing target pool for load balancer (%s) update: %v", lbRefStr, err) - } - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Deleted target pool.", lbRefStr) - } - // Once we've deleted the resources (if necessary), build them back up (or for - // the first time if they're new). - if tpNeedsRecreation { - createInstances := hosts - if len(hosts) > maxTargetPoolCreateInstances { - createInstances = createInstances[:maxTargetPoolCreateInstances] - } - if err := g.createTargetPoolAndHealthCheck(svc, loadBalancerName, serviceName.String(), ipAddressToUse, g.region, clusterID, createInstances, hcToCreate); err != nil { - return fmt.Errorf("failed to create target pool for load balancer (%s): %v", lbRefStr, err) - } - if hcToCreate != nil { - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Created health checks %v.", lbRefStr, hcToCreate.Name) - } - if len(hosts) <= maxTargetPoolCreateInstances { - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Created target pool.", lbRefStr) - } else { - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Created initial target pool (now updating the remaining %d hosts).", lbRefStr, len(hosts)-maxTargetPoolCreateInstances) - if err := g.updateTargetPool(loadBalancerName, hosts); err != nil { - return fmt.Errorf("failed to update target pool for load balancer (%s): %v", lbRefStr, err) - } - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Updated target pool (with %d hosts).", lbRefStr, len(hosts)-maxTargetPoolCreateInstances) - } - } else if tpExists { - // Ensure hosts are updated even if there is no other changes required on target pool. - if err := g.updateTargetPool(loadBalancerName, hosts); err != nil { - return fmt.Errorf("failed to update target pool for load balancer (%s): %v", lbRefStr, err) - } - klog.Infof("ensureTargetPoolAndHealthCheck(%s): Updated target pool (with %d hosts).", lbRefStr, len(hosts)) - if hcToCreate != nil { - if hc, err := g.ensureHTTPHealthCheck(hcToCreate.Name, hcToCreate.RequestPath, int32(hcToCreate.Port)); err != nil || hc == nil { - return fmt.Errorf("failed to ensure health check for %v port %d path %v: %v", loadBalancerName, hcToCreate.Port, hcToCreate.RequestPath, err) - } - } - } else { - // Panic worthy. - klog.Errorf("ensureTargetPoolAndHealthCheck(%s): target pool not exists and doesn't need to be created.", lbRefStr) - } - return nil -} - -func (g *Cloud) createTargetPoolAndHealthCheck(svc *v1.Service, name, serviceName, ipAddress, region, clusterID string, hosts []*gceInstance, hc *compute.HttpHealthCheck) error { - // health check management is coupled with targetPools to prevent leaks. A - // target pool is the only thing that requires a health check, so we delete - // associated checks on teardown, and ensure checks on setup. - hcLinks := []string{} - if hc != nil { - // Check whether it is nodes health check, which has different name from the load-balancer. - isNodesHealthCheck := hc.Name != name - if isNodesHealthCheck { - // Lock to prevent necessary nodes health check / firewall gets deleted. - g.sharedResourceLock.Lock() - defer g.sharedResourceLock.Unlock() - } - - if err := g.ensureHTTPHealthCheckFirewall(svc, serviceName, ipAddress, region, clusterID, hosts, hc.Name, int32(hc.Port), isNodesHealthCheck); err != nil { - return err - } - var err error - hcRequestPath, hcPort := hc.RequestPath, hc.Port - if hc, err = g.ensureHTTPHealthCheck(hc.Name, hc.RequestPath, int32(hc.Port)); err != nil || hc == nil { - return fmt.Errorf("failed to ensure health check for %v port %d path %v: %v", name, hcPort, hcRequestPath, err) - } - hcLinks = append(hcLinks, hc.SelfLink) - } - - var instances []string - for _, host := range hosts { - instances = append(instances, host.makeComparableHostPath()) - } - klog.Infof("Creating targetpool %v with %d healthchecks", name, len(hcLinks)) - pool := &compute.TargetPool{ - Name: name, - Description: fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName), - Instances: instances, - SessionAffinity: translateAffinityType(svc.Spec.SessionAffinity), - HealthChecks: hcLinks, - } - - if err := g.CreateTargetPool(pool, region); err != nil && !isHTTPErrorCode(err, http.StatusConflict) { - return err - } - return nil -} - -func (g *Cloud) updateTargetPool(loadBalancerName string, hosts []*gceInstance) error { - pool, err := g.GetTargetPool(loadBalancerName, g.region) - if err != nil { - return err - } - existing := sets.NewString() - for _, instance := range pool.Instances { - existing.Insert(hostURLToComparablePath(instance)) - } - - var toAdd []*compute.InstanceReference - var toRemove []*compute.InstanceReference - for _, host := range hosts { - link := host.makeComparableHostPath() - if !existing.Has(link) { - toAdd = append(toAdd, &compute.InstanceReference{Instance: link}) - } - existing.Delete(link) - } - for link := range existing { - toRemove = append(toRemove, &compute.InstanceReference{Instance: link}) - } - - for len(toAdd) > 0 { - // Do not remove more than maxInstancesPerTargetPoolUpdate in a single call. - instancesCount := len(toAdd) - if instancesCount > maxInstancesPerTargetPoolUpdate { - instancesCount = maxInstancesPerTargetPoolUpdate - } - // The operation to add 1000 instances is fairly long (may take minutes), so - // we don't need to worry about saturating QPS limits. - if err := g.AddInstancesToTargetPool(loadBalancerName, g.region, toAdd[:instancesCount]); err != nil { - return err - } - toAdd = toAdd[instancesCount:] - } - - for len(toRemove) > 0 { - // Do not remove more than maxInstancesPerTargetPoolUpdate in a single call. - instancesCount := len(toRemove) - if instancesCount > maxInstancesPerTargetPoolUpdate { - instancesCount = maxInstancesPerTargetPoolUpdate - } - // The operation to remove 1000 instances is fairly long (may take minutes), so - // we don't need to worry about saturating QPS limits. - if err := g.RemoveInstancesFromTargetPool(loadBalancerName, g.region, toRemove[:instancesCount]); err != nil { - return err - } - toRemove = toRemove[instancesCount:] - } - - // Try to verify that the correct number of nodes are now in the target pool. - // We've been bitten by a bug here before (#11327) where all nodes were - // accidentally removed and want to make similar problems easier to notice. - updatedPool, err := g.GetTargetPool(loadBalancerName, g.region) - if err != nil { - return err - } - if len(updatedPool.Instances) != len(hosts) { - klog.Errorf("Unexpected number of instances (%d) in target pool %s after updating (expected %d). Instances in updated pool: %s", - len(updatedPool.Instances), loadBalancerName, len(hosts), strings.Join(updatedPool.Instances, ",")) - return fmt.Errorf("unexpected number of instances (%d) in target pool %s after update (expected %d)", len(updatedPool.Instances), loadBalancerName, len(hosts)) - } - return nil -} - -func (g *Cloud) targetPoolURL(name string) string { - return g.projectsBasePath + strings.Join([]string{g.projectID, "regions", g.region, "targetPools", name}, "/") -} - -func makeHTTPHealthCheck(name, path string, port int32) *compute.HttpHealthCheck { - return &compute.HttpHealthCheck{ - Name: name, - Port: int64(port), - RequestPath: path, - Host: "", - Description: makeHealthCheckDescription(name), - CheckIntervalSec: gceHcCheckIntervalSeconds, - TimeoutSec: gceHcTimeoutSeconds, - HealthyThreshold: gceHcHealthyThreshold, - UnhealthyThreshold: gceHcUnhealthyThreshold, - } -} - -// mergeHTTPHealthChecks reconciles HttpHealthCheck configures to be no smaller -// than the default values. -// E.g. old health check interval is 2s, new default is 8. -// The HC interval will be reconciled to 8 seconds. -// If the existing health check is larger than the default interval, -// the configuration will be kept. -func mergeHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) { - if hc.CheckIntervalSec > newHC.CheckIntervalSec { - newHC.CheckIntervalSec = hc.CheckIntervalSec - } - if hc.TimeoutSec > newHC.TimeoutSec { - newHC.TimeoutSec = hc.TimeoutSec - } - if hc.UnhealthyThreshold > newHC.UnhealthyThreshold { - newHC.UnhealthyThreshold = hc.UnhealthyThreshold - } - if hc.HealthyThreshold > newHC.HealthyThreshold { - newHC.HealthyThreshold = hc.HealthyThreshold - } -} - -// needToUpdateHTTPHealthChecks checks whether the http healthcheck needs to be -// updated. -func needToUpdateHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) bool { - switch { - case - hc.Port != newHC.Port, - hc.RequestPath != newHC.RequestPath, - hc.Description != newHC.Description, - hc.CheckIntervalSec < newHC.CheckIntervalSec, - hc.TimeoutSec < newHC.TimeoutSec, - hc.UnhealthyThreshold < newHC.UnhealthyThreshold, - hc.HealthyThreshold < newHC.HealthyThreshold: - return true - } - return false -} - -func (g *Cloud) ensureHTTPHealthCheck(name, path string, port int32) (hc *compute.HttpHealthCheck, err error) { - newHC := makeHTTPHealthCheck(name, path, port) - hc, err = g.GetHTTPHealthCheck(name) - if hc == nil || err != nil && isHTTPErrorCode(err, http.StatusNotFound) { - klog.Infof("Did not find health check %v, creating port %v path %v", name, port, path) - if err = g.CreateHTTPHealthCheck(newHC); err != nil { - return nil, err - } - hc, err = g.GetHTTPHealthCheck(name) - if err != nil { - klog.Errorf("Failed to get http health check %v", err) - return nil, err - } - klog.Infof("Created HTTP health check %v healthCheckNodePort: %d", name, port) - return hc, nil - } - // Validate health check fields - klog.V(4).Infof("Checking http health check params %s", name) - if needToUpdateHTTPHealthChecks(hc, newHC) { - klog.Warningf("Health check %v exists but parameters have drifted - updating...", name) - mergeHTTPHealthChecks(hc, newHC) - if err := g.UpdateHTTPHealthCheck(newHC); err != nil { - klog.Warningf("Failed to reconcile http health check %v parameters", name) - return nil, err - } - klog.V(4).Infof("Corrected health check %v parameters successful", name) - hc, err = g.GetHTTPHealthCheck(name) - if err != nil { - return nil, err - } - } - return hc, nil -} - -// Passing nil for requested IP is perfectly fine - it just means that no specific -// IP is being requested. -// Returns whether the forwarding rule exists, whether it needs to be updated, -// what its IP address is (if it exists), and any error we encountered. -func (g *Cloud) forwardingRuleNeedsUpdate(name, region string, loadBalancerIP string, ports []v1.ServicePort) (exists bool, needsUpdate bool, ipAddress string, err error) { - fwd, err := g.GetRegionForwardingRule(name, region) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, "", nil - } - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because g api flaked. - return true, false, "", fmt.Errorf("error getting load balancer's forwarding rule: %v", err) - } - // If the user asks for a specific static ip through the Service spec, - // check that we're actually using it. - // TODO: we report loadbalancer IP through status, so we want to verify if - // that matches the forwarding rule as well. - if loadBalancerIP != "" && loadBalancerIP != fwd.IPAddress { - klog.Infof("LoadBalancer ip for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.IPAddress, loadBalancerIP) - return true, true, fwd.IPAddress, nil - } - portRange, err := loadBalancerPortRange(ports) - if err != nil { - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because g api flaked. - return true, false, "", err - } - if portRange != fwd.PortRange { - klog.Infof("LoadBalancer port range for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.PortRange, portRange) - return true, true, fwd.IPAddress, nil - } - // The service controller verified all the protocols match on the ports, just check the first one - if string(ports[0].Protocol) != fwd.IPProtocol { - klog.Infof("LoadBalancer protocol for forwarding rule %v was expected to be %v, but was actually %v", fwd.Name, fwd.IPProtocol, string(ports[0].Protocol)) - return true, true, fwd.IPAddress, nil - } - - return true, false, fwd.IPAddress, nil -} - -// Doesn't check whether the hosts have changed, since host updating is handled -// separately. -func (g *Cloud) targetPoolNeedsRecreation(name, region string, affinityType v1.ServiceAffinity) (exists bool, needsRecreation bool, err error) { - tp, err := g.GetTargetPool(name, region) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, nil - } - // Err on the side of caution in case of errors. Caller should notice the error and retry. - // We never want to end up recreating resources because g api flaked. - return true, false, fmt.Errorf("error getting load balancer's target pool: %v", err) - } - // TODO: If the user modifies their Service's session affinity, it *should* - // reflect in the associated target pool. However, currently not setting the - // session affinity on a target pool defaults it to the empty string while - // not setting in on a Service defaults it to None. There is a lack of - // documentation around the default setting for the target pool, so if we - // find it's the undocumented empty string, don't blindly recreate the - // target pool (which results in downtime). Fix this when we have formally - // defined the defaults on either side. - if tp.SessionAffinity != "" && translateAffinityType(affinityType) != tp.SessionAffinity { - klog.Infof("LoadBalancer target pool %v changed affinity from %v to %v", name, tp.SessionAffinity, affinityType) - return true, true, nil - } - return true, false, nil -} - -func (h *gceInstance) makeComparableHostPath() string { - return fmt.Sprintf("/zones/%s/instances/%s", h.Zone, h.Name) -} - -func nodeNames(nodes []*v1.Node) []string { - ret := make([]string, len(nodes)) - for i, node := range nodes { - ret[i] = node.Name - } - return ret -} - -func loggableNodeNames(nodes []*v1.Node) []string { - if len(nodes) > maxNodeNamesToLog { - return nodeNames(nodes[:maxNodeNamesToLog]) - } - return nodeNames(nodes) -} - -func hostURLToComparablePath(hostURL string) string { - idx := strings.Index(hostURL, "/zones/") - if idx < 0 { - return "" - } - return hostURL[idx:] -} - -func loadBalancerPortRange(ports []v1.ServicePort) (string, error) { - if len(ports) == 0 { - return "", fmt.Errorf("no ports specified for GCE load balancer") - } - - // The service controller verified all the protocols match on the ports, just check and use the first one - if ports[0].Protocol != v1.ProtocolTCP && ports[0].Protocol != v1.ProtocolUDP { - return "", fmt.Errorf("invalid protocol %s, only TCP and UDP are supported", string(ports[0].Protocol)) - } - - minPort := int32(65536) - maxPort := int32(0) - for i := range ports { - if ports[i].Port < minPort { - minPort = ports[i].Port - } - if ports[i].Port > maxPort { - maxPort = ports[i].Port - } - } - return fmt.Sprintf("%d-%d", minPort, maxPort), nil -} - -// translate from what K8s supports to what the cloud provider supports for session affinity. -func translateAffinityType(affinityType v1.ServiceAffinity) string { - switch affinityType { - case v1.ServiceAffinityClientIP: - return gceAffinityTypeClientIP - case v1.ServiceAffinityNone: - return gceAffinityTypeNone - default: - klog.Errorf("Unexpected affinity type: %v", affinityType) - return gceAffinityTypeNone - } -} - -func (g *Cloud) firewallNeedsUpdate(name, serviceName, ipAddress string, ports []v1.ServicePort, sourceRanges utilnet.IPNetSet) (exists bool, needsUpdate bool, err error) { - fw, err := g.GetFirewall(MakeFirewallName(name)) - if err != nil { - if isHTTPErrorCode(err, http.StatusNotFound) { - return false, true, nil - } - return false, false, fmt.Errorf("error getting load balancer's firewall: %v", err) - } - if fw.Description != makeFirewallDescription(serviceName, ipAddress) { - return true, true, nil - } - if len(fw.Allowed) != 1 || (fw.Allowed[0].IPProtocol != "tcp" && fw.Allowed[0].IPProtocol != "udp") { - return true, true, nil - } - // Make sure the allowed ports match. - portNums, portRanges, _ := getPortsAndProtocol(ports) - // This logic checks if the existing firewall rules contains either enumerated service ports or port ranges. - // This is to prevent unnecessary noop updates to the firewall rule when the existing firewall rule is - // set up via the previous pattern using enumerated ports instead of port ranges. - if !equalStringSets(portNums, fw.Allowed[0].Ports) && !equalStringSets(portRanges, fw.Allowed[0].Ports) { - return true, true, nil - } - - // The service controller already verified that the protocol matches on all ports, no need to check. - actualSourceRanges, err := utilnet.ParseIPNets(fw.SourceRanges...) - if err != nil { - // This really shouldn't happen... GCE has returned something unexpected - klog.Warningf("Error parsing firewall SourceRanges: %v", fw.SourceRanges) - // We don't return the error, because we can hopefully recover from this by reconfiguring the firewall - return true, true, nil - } - - if !sourceRanges.Equal(actualSourceRanges) { - return true, true, nil - } - - destinationRanges := []string{ipAddress} - - if !reflect.DeepEqual(destinationRanges, fw.DestinationRanges) { - return true, true, nil - } - - return true, false, nil -} - -func (g *Cloud) ensureHTTPHealthCheckFirewall(svc *v1.Service, serviceName, ipAddress, region, clusterID string, hosts []*gceInstance, hcName string, hcPort int32, isNodesHealthCheck bool) error { - // Prepare the firewall params for creating / checking. - desc := fmt.Sprintf(`{"kubernetes.io/cluster-id":"%s"}`, clusterID) - if !isNodesHealthCheck { - desc = makeFirewallDescription(serviceName, ipAddress) - } - sourceRanges := l4LbSrcRngsFlag.ipn - ports := []v1.ServicePort{{Protocol: "tcp", Port: hcPort}} - - fwName := MakeHealthCheckFirewallName(clusterID, hcName, isNodesHealthCheck) - fw, err := g.GetFirewall(fwName) - if err != nil { - if !isHTTPErrorCode(err, http.StatusNotFound) { - return fmt.Errorf("error getting firewall for health checks: %v", err) - } - klog.Infof("Creating firewall %v for health checks.", fwName) - if err := g.createFirewall(svc, fwName, desc, ipAddress, sourceRanges, ports, hosts); err != nil { - return err - } - klog.Infof("Created firewall %v for health checks.", fwName) - return nil - } - // Validate firewall fields. - if fw.Description != desc || - len(fw.Allowed) != 1 || - fw.Allowed[0].IPProtocol != string(ports[0].Protocol) || - !equalStringSets(fw.Allowed[0].Ports, []string{strconv.Itoa(int(ports[0].Port))}) || - !equalStringSets(fw.SourceRanges, sourceRanges.StringSlice()) { - klog.Warningf("Firewall %v exists but parameters have drifted - updating...", fwName) - if err := g.updateFirewall(svc, fwName, desc, ipAddress, sourceRanges, ports, hosts); err != nil { - klog.Warningf("Failed to reconcile firewall %v parameters.", fwName) - return err - } - klog.V(4).Infof("Corrected firewall %v parameters successful", fwName) - } - return nil -} - -func createForwardingRule(s CloudForwardingRuleService, name, serviceName, region, ipAddress, target string, ports []v1.ServicePort, netTier cloud.NetworkTier) error { - portRange, err := loadBalancerPortRange(ports) - if err != nil { - return err - } - desc := makeServiceDescription(serviceName) - ipProtocol := string(ports[0].Protocol) - - rule := &compute.ForwardingRule{ - Name: name, - Description: desc, - IPAddress: ipAddress, - IPProtocol: ipProtocol, - PortRange: portRange, - Target: target, - NetworkTier: netTier.ToGCEValue(), - } - - err = s.CreateRegionForwardingRule(rule, region) - - if err != nil && !isHTTPErrorCode(err, http.StatusConflict) { - return err - } - - return nil -} - -func (g *Cloud) createFirewall(svc *v1.Service, name, desc, destinationIP string, sourceRanges utilnet.IPNetSet, ports []v1.ServicePort, hosts []*gceInstance) error { - firewall, err := g.firewallObject(name, desc, destinationIP, sourceRanges, ports, hosts) - if err != nil { - return err - } - if err = g.CreateFirewall(firewall); err != nil { - if isHTTPErrorCode(err, http.StatusConflict) { - return nil - } else if isForbidden(err) && g.OnXPN() { - klog.V(4).Infof("createFirewall(%v): do not have permission to create firewall rule (on XPN). Raising event.", firewall.Name) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudCreateCmd(firewall, g.NetworkProjectID())) - return nil - } - return err - } - return nil -} - -func (g *Cloud) updateFirewall(svc *v1.Service, name, desc, destinationIP string, sourceRanges utilnet.IPNetSet, ports []v1.ServicePort, hosts []*gceInstance) error { - firewall, err := g.firewallObject(name, desc, destinationIP, sourceRanges, ports, hosts) - if err != nil { - return err - } - - if err = g.PatchFirewall(firewall); err != nil { - if isHTTPErrorCode(err, http.StatusConflict) { - return nil - } else if isForbidden(err) && g.OnXPN() { - klog.V(4).Infof("updateFirewall(%v): do not have permission to update firewall rule (on XPN). Raising event.", firewall.Name) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudUpdateCmd(firewall, g.NetworkProjectID())) - return nil - } - return err - } - return nil -} - -func (g *Cloud) firewallObject(name, desc, destinationIP string, sourceRanges utilnet.IPNetSet, ports []v1.ServicePort, hosts []*gceInstance) (*compute.Firewall, error) { - // destinationIP can be empty string "" and this means that it is not set. - // GCE considers empty destinationRanges as "all" for ingress firewall-rules. - // Concatenate service ports into port ranges. This help to workaround the gce firewall limitation where only - // 100 ports or port ranges can be used in a firewall rule. - _, portRanges, _ := getPortsAndProtocol(ports) - - // If the node tags to be used for this cluster have been predefined in the - // provider config, just use them. Otherwise, invoke computeHostTags method to get the tags. - hostTags := g.nodeTags - if len(hostTags) == 0 { - var err error - if hostTags, err = g.computeHostTags(hosts); err != nil { - return nil, fmt.Errorf("no node tags supplied and also failed to parse the given lists of hosts for tags. Abort creating firewall rule") - } - } - - firewall := &compute.Firewall{ - Name: name, - Description: desc, - Network: g.networkURL, - SourceRanges: sourceRanges.StringSlice(), - TargetTags: hostTags, - Allowed: []*compute.FirewallAllowed{ - { - // TODO: Make this more generic. Currently this method is only - // used to create firewall rules for loadbalancers, which have - // exactly one protocol, so we can never end up with a list of - // mixed TCP and UDP ports. It should be possible to use a - // single firewall rule for both a TCP and UDP lb. - IPProtocol: strings.ToLower(string(ports[0].Protocol)), - Ports: portRanges, - }, - }, - } - if destinationIP != "" { - firewall.DestinationRanges = []string{destinationIP} - } - return firewall, nil -} - -func ensureStaticIP(s CloudAddressService, name, serviceName, region, existingIP string, netTier cloud.NetworkTier) (ipAddress string, existing bool, err error) { - // If the address doesn't exist, this will create it. - // If the existingIP exists but is ephemeral, this will promote it to static. - // If the address already exists, this will harmlessly return a StatusConflict - // and we'll grab the IP before returning. - existed := false - desc := makeServiceDescription(serviceName) - - var creationErr error - addressObj := &compute.Address{ - Name: name, - Description: desc, - NetworkTier: netTier.ToGCEValue(), - } - if existingIP != "" { - addressObj.Address = existingIP - } - creationErr = s.ReserveRegionAddress(addressObj, region) - - if creationErr != nil { - // GCE returns StatusConflict if the name conflicts; it returns - // StatusBadRequest if the IP conflicts. - if !isHTTPErrorCode(creationErr, http.StatusConflict) && !isHTTPErrorCode(creationErr, http.StatusBadRequest) { - return "", false, fmt.Errorf("error creating gce static IP address: %v", creationErr) - } - existed = true - } - - // If address exists, get it by IP, because name might be different. - // This can specifically happen if the IP was changed from ephemeral to static, - // which results in a new name for the IP. - if existingIP != "" { - addr, err := s.GetRegionAddressByIP(region, existingIP) - if err != nil { - return "", false, fmt.Errorf("error getting static IP address: %v", err) - } - return addr.Address, existed, nil - } - - // Otherwise, get address by name - addr, err := s.GetRegionAddress(name, region) - if err != nil { - return "", false, fmt.Errorf("error getting static IP address: %v", err) - } - - return addr.Address, existed, nil -} - -func (g *Cloud) getServiceNetworkTier(svc *v1.Service) (cloud.NetworkTier, error) { - tier, err := GetServiceNetworkTier(svc) - if err != nil { - // Returns an error if the annotation is invalid. - return cloud.NetworkTier(""), err - } - return tier, nil -} - -func (g *Cloud) deleteWrongNetworkTieredResources(lbName, lbRef string, desiredNetTier cloud.NetworkTier) error { - logPrefix := fmt.Sprintf("deleteWrongNetworkTieredResources:(%s)", lbRef) - if err := deleteFWDRuleWithWrongTier(g, g.region, lbName, logPrefix, desiredNetTier); err != nil { - return err - } - if err := deleteAddressWithWrongTier(g, g.region, lbName, logPrefix, desiredNetTier); err != nil { - return err - } - return nil -} - -// deleteFWDRuleWithWrongTier checks the network tier of existing forwarding -// rule and delete the rule if the tier does not matched the desired tier. -func deleteFWDRuleWithWrongTier(s CloudForwardingRuleService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { - tierStr, err := s.getNetworkTierFromForwardingRule(name, region) - if isNotFound(err) { - return nil - } else if err != nil { - return err - } - existingTier := cloud.NetworkTierGCEValueToType(tierStr) - if existingTier == desiredNetTier { - return nil - } - klog.V(2).Infof("%s: Network tiers do not match; existing forwarding rule: %q, desired: %q. Deleting the forwarding rule", - logPrefix, existingTier, desiredNetTier) - err = s.DeleteRegionForwardingRule(name, region) - return ignoreNotFound(err) -} - -// deleteAddressWithWrongTier checks the network tier of existing address -// and delete the address if the tier does not matched the desired tier. -func deleteAddressWithWrongTier(s CloudAddressService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { - // We only check the IP address matching the reserved name that the - // controller assigned to the LB. We make the assumption that an address of - // such name is owned by the controller and is safe to release. Whether an - // IP is owned by the user is not clearly defined in the current code, and - // this assumption may not match some of the existing logic in the code. - // However, this is okay since network tiering is still Alpha and will be - // properly gated. - // TODO(#51665): Re-evaluate the "ownership" of the IP address to ensure - // we don't release IP unintentionally. - tierStr, err := s.getNetworkTierFromAddress(name, region) - if isNotFound(err) { - return nil - } else if err != nil { - return err - } - existingTier := cloud.NetworkTierGCEValueToType(tierStr) - if existingTier == desiredNetTier { - return nil - } - klog.V(2).Infof("%s: Network tiers do not match; existing address: %q, desired: %q. Deleting the address", - logPrefix, existingTier, desiredNetTier) - err = s.DeleteRegionAddress(name, region) - return ignoreNotFound(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_internal.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_internal.go deleted file mode 100644 index 2453233b37c06..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_internal.go +++ /dev/null @@ -1,1018 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "encoding/json" - "fmt" - "sort" - "strconv" - "strings" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - "github.com/google/go-cmp/cmp" - compute "google.golang.org/api/compute/v1" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - cloudprovider "k8s.io/cloud-provider" - servicehelpers "k8s.io/cloud-provider/service/helpers" - "k8s.io/klog/v2" -) - -const ( - // Used to list instances in all states(RUNNING and other) - https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroups/listInstances - allInstances = "ALL" - // ILBFinalizerV1 key is used to identify ILB services whose resources are managed by service controller. - ILBFinalizerV1 = "gke.networking.io/l4-ilb-v1" - // ILBFinalizerV2 is the finalizer used by newer controllers that implement Internal LoadBalancer services. - ILBFinalizerV2 = "gke.networking.io/l4-ilb-v2" - // maxInstancesPerInstanceGroup defines maximum number of VMs per InstanceGroup. - maxInstancesPerInstanceGroup = 1000 - // maxL4ILBPorts is the maximum number of ports that can be specified in an L4 ILB Forwarding Rule. Beyond this, "AllPorts" field should be used. - maxL4ILBPorts = 5 -) - -func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - if existingFwdRule == nil && !hasFinalizer(svc, ILBFinalizerV1) { - // Neither the forwarding rule nor the V1 finalizer exists. This is most likely a new service. - if g.AlphaFeatureGate.Enabled(AlphaFeatureILBSubsets) { - // When ILBSubsets is enabled, new ILB services will not be processed here. - // Services that have existing GCE resources created by this controller or the v1 finalizer - // will continue to update. - klog.V(2).Infof("Skipped ensureInternalLoadBalancer for service %s/%s, since %s feature is enabled.", svc.Namespace, svc.Name, AlphaFeatureILBSubsets) - return nil, cloudprovider.ImplementedElsewhere - } - if hasFinalizer(svc, ILBFinalizerV2) { - // No V1 resources present - Another controller is handling the resources for this service. - klog.V(2).Infof("Skipped ensureInternalLoadBalancer for service %s/%s, as service contains %q finalizer.", svc.Namespace, svc.Name, ILBFinalizerV2) - return nil, cloudprovider.ImplementedElsewhere - } - } - - nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} - - var serviceState L4ILBServiceState - // Mark the service InSuccess state as false to begin with. - // This will be updated to true if the VIP is configured successfully. - serviceState.InSuccess = false - defer func() { - g.metricsCollector.SetL4ILBService(nm.String(), serviceState) - }() - - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, svc) - klog.V(2).Infof("ensureInternalLoadBalancer(%v): Attaching %q finalizer", loadBalancerName, ILBFinalizerV1) - if err := addFinalizer(svc, g.client.CoreV1(), ILBFinalizerV1); err != nil { - klog.Errorf("Failed to attach finalizer '%s' on service %s/%s - %v", ILBFinalizerV1, svc.Namespace, svc.Name, err) - return nil, err - } - - ports, _, protocol := getPortsAndProtocol(svc.Spec.Ports) - if protocol != v1.ProtocolTCP && protocol != v1.ProtocolUDP { - return nil, fmt.Errorf("Invalid protocol %s, only TCP and UDP are supported", string(protocol)) - } - scheme := cloud.SchemeInternal - options := getILBOptions(svc) - if g.IsLegacyNetwork() { - g.eventRecorder.Event(svc, v1.EventTypeWarning, "ILBOptionsIgnored", "Internal LoadBalancer options are not supported with Legacy Networks.") - options = ILBOptions{} - } - - sharedBackend := shareBackendService(svc) - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, sharedBackend, scheme, protocol, svc.Spec.SessionAffinity) - backendServiceLink := g.getBackendServiceLink(backendServiceName) - - // Ensure instance groups exist and nodes are assigned to groups - igName := makeInstanceGroupName(clusterID) - igLinks, err := g.ensureInternalInstanceGroups(igName, nodes) - if err != nil { - return nil, err - } - - // Get existing backend service (if exists) - var existingBackendService *compute.BackendService - if existingFwdRule != nil && existingFwdRule.BackendService != "" { - existingBSName := getNameFromLink(existingFwdRule.BackendService) - if existingBackendService, err = g.GetRegionBackendService(existingBSName, g.region); err != nil && !isNotFound(err) { - return nil, err - } - } - - // Lock the sharedResourceLock to prevent any deletions of shared resources while assembling shared resources here - g.sharedResourceLock.Lock() - defer g.sharedResourceLock.Unlock() - - // Ensure health check exists before creating the backend service. The health check is shared - // if externalTrafficPolicy=Cluster. - sharedHealthCheck := !servicehelpers.RequestsOnlyLocalTraffic(svc) - hcName := makeHealthCheckName(loadBalancerName, clusterID, sharedHealthCheck) - hcPath, hcPort := GetNodesHealthCheckPath(), GetNodesHealthCheckPort() - if !sharedHealthCheck { - // Service requires a special health check, retrieve the OnlyLocal port & path - hcPath, hcPort = servicehelpers.GetServiceHealthCheckPathPort(svc) - } - hc, err := g.ensureInternalHealthCheck(hcName, nm, sharedHealthCheck, hcPath, hcPort) - if err != nil { - return nil, err - } - - subnetworkURL := g.SubnetworkURL() - // Any subnet specified using the subnet annotation will be picked up and reflected in the forwarding rule. - // Removing the annotation will set the forwarding rule to use the default subnet and result in a VIP change. - // In order to support existing ILBs that were setup using the wrong subnet - https://github.com/kubernetes/kubernetes/pull/57861, - // users will need to specify that subnet with the annotation. - if options.SubnetName != "" { - subnetworkURL = gceSubnetworkURL("", g.networkProjectID, g.region, options.SubnetName) - } - // Determine IP which will be used for this LB. If no forwarding rule has been established - // or specified in the Service spec, then requestedIP = "". - ipToUse := ilbIPToUse(svc, existingFwdRule, subnetworkURL) - - klog.V(2).Infof("ensureInternalLoadBalancer(%v): Using subnet %s for LoadBalancer IP %s", loadBalancerName, options.SubnetName, ipToUse) - - var addrMgr *addressManager - // If the network is not a legacy network, use the address manager - if !g.IsLegacyNetwork() { - addrMgr = newAddressManager(g, nm.String(), g.Region(), subnetworkURL, loadBalancerName, ipToUse, cloud.SchemeInternal) - ipToUse, err = addrMgr.HoldAddress() - if err != nil { - return nil, err - } - klog.V(2).Infof("ensureInternalLoadBalancer(%v): reserved IP %q for the forwarding rule", loadBalancerName, ipToUse) - defer func() { - // Release the address if all resources were created successfully, or if we error out. - if err := addrMgr.ReleaseAddress(); err != nil { - klog.Errorf("ensureInternalLoadBalancer: failed to release address reservation, possibly causing an orphan: %v", err) - } - }() - } - - fwdRuleDescription := &forwardingRuleDescription{ServiceName: nm.String()} - fwdRuleDescriptionString, err := fwdRuleDescription.marshal() - if err != nil { - return nil, err - } - newFwdRule := &compute.ForwardingRule{ - Name: loadBalancerName, - Description: fwdRuleDescriptionString, - IPAddress: ipToUse, - BackendService: backendServiceLink, - Ports: ports, - IPProtocol: string(protocol), - LoadBalancingScheme: string(scheme), - // Given that CreateGCECloud will attempt to determine the subnet based off the network, - // the subnetwork should rarely be unknown. - Subnetwork: subnetworkURL, - Network: g.networkURL, - } - if options.AllowGlobalAccess { - newFwdRule.AllowGlobalAccess = options.AllowGlobalAccess - } - if len(ports) > maxL4ILBPorts { - newFwdRule.Ports = nil - newFwdRule.AllPorts = true - } - - fwdRuleDeleted := false - if existingFwdRule != nil && !forwardingRulesEqual(existingFwdRule, newFwdRule) { - // Delete existing forwarding rule before making changes to the backend service. For example - changing protocol - // of backend service without first deleting forwarding rule will throw an error since the linked forwarding - // rule would show the old protocol. - if klogV := klog.V(2); klogV.Enabled() { - frDiff := cmp.Diff(existingFwdRule, newFwdRule) - klogV.Infof("ensureInternalLoadBalancer(%v): forwarding rule changed - Existing - %+v\n, New - %+v\n, Diff(-existing, +new) - %s\n. Deleting existing forwarding rule.", loadBalancerName, existingFwdRule, newFwdRule, frDiff) - } - if err = ignoreNotFound(g.DeleteRegionForwardingRule(loadBalancerName, g.region)); err != nil { - return nil, err - } - fwdRuleDeleted = true - } - - bsDescription := makeBackendServiceDescription(nm, sharedBackend) - err = g.ensureInternalBackendService(backendServiceName, bsDescription, svc.Spec.SessionAffinity, scheme, protocol, igLinks, hc.SelfLink) - if err != nil { - return nil, err - } - - if fwdRuleDeleted || existingFwdRule == nil { - // existing rule has been deleted, pass in nil - if err := g.ensureInternalForwardingRule(nil, newFwdRule); err != nil { - return nil, err - } - } - - // Get the most recent forwarding rule for the address. - updatedFwdRule, err := g.GetRegionForwardingRule(loadBalancerName, g.region) - if err != nil { - return nil, err - } - - ipToUse = updatedFwdRule.IPAddress - // Ensure firewall rules if necessary - if err = g.ensureInternalFirewalls(loadBalancerName, ipToUse, clusterID, nm, svc, strconv.Itoa(int(hcPort)), sharedHealthCheck, nodes); err != nil { - return nil, err - } - - // Delete the previous internal load balancer resources if necessary - if existingBackendService != nil { - g.clearPreviousInternalResources(svc, loadBalancerName, existingBackendService, backendServiceName, hcName) - } - - serviceState.InSuccess = true - if options.AllowGlobalAccess { - serviceState.EnabledGlobalAccess = true - } - // SubnetName is overridden to nil value if Alpha feature gate for custom subnet - // is not enabled. So, a non empty subnet name at this point implies that the - // feature is in use. - if options.SubnetName != "" { - serviceState.EnabledCustomSubnet = true - } - klog.V(6).Infof("Internal Loadbalancer for Service %s ensured, updating its state %v in metrics cache", nm, serviceState) - - status := &v1.LoadBalancerStatus{} - status.Ingress = []v1.LoadBalancerIngress{{IP: updatedFwdRule.IPAddress}} - return status, nil -} - -func (g *Cloud) clearPreviousInternalResources(svc *v1.Service, loadBalancerName string, existingBackendService *compute.BackendService, expectedBSName, expectedHCName string) { - // If a new backend service was created, delete the old one. - if existingBackendService.Name != expectedBSName { - klog.V(2).Infof("clearPreviousInternalResources(%v): expected backend service %q does not match previous %q - deleting backend service", loadBalancerName, expectedBSName, existingBackendService.Name) - if err := g.teardownInternalBackendService(existingBackendService.Name); err != nil && !isNotFound(err) { - klog.Warningf("clearPreviousInternalResources: could not delete old backend service: %v, err: %v", existingBackendService.Name, err) - } - } - - // If a new health check was created, delete the old one. - if len(existingBackendService.HealthChecks) == 1 { - existingHCName := getNameFromLink(existingBackendService.HealthChecks[0]) - if existingHCName != expectedHCName { - klog.V(2).Infof("clearPreviousInternalResources(%v): expected health check %q does not match previous %q - deleting health check", loadBalancerName, expectedHCName, existingHCName) - if err := g.teardownInternalHealthCheckAndFirewall(svc, existingHCName); err != nil { - klog.Warningf("clearPreviousInternalResources: could not delete existing healthcheck: %v, err: %v", existingHCName, err) - } - } - } else if len(existingBackendService.HealthChecks) > 1 { - klog.Warningf("clearPreviousInternalResources(%v): more than one health check on the backend service %v, %v", loadBalancerName, existingBackendService.Name, existingBackendService.HealthChecks) - } -} - -// updateInternalLoadBalancer is called when the list of nodes has changed. Therefore, only the instance groups -// and possibly the backend service need to be updated. -func (g *Cloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, nodes []*v1.Node) error { - if g.AlphaFeatureGate.Enabled(AlphaFeatureILBSubsets) && !hasFinalizer(svc, ILBFinalizerV1) { - klog.V(2).Infof("Skipped updateInternalLoadBalancer for service %s/%s since it does not contain %q finalizer.", svc.Namespace, svc.Name, ILBFinalizerV1) - return cloudprovider.ImplementedElsewhere - } - g.sharedResourceLock.Lock() - defer g.sharedResourceLock.Unlock() - - igName := makeInstanceGroupName(clusterID) - igLinks, err := g.ensureInternalInstanceGroups(igName, nodes) - if err != nil { - return err - } - - // Generate the backend service name - _, _, protocol := getPortsAndProtocol(svc.Spec.Ports) - scheme := cloud.SchemeInternal - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, svc) - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, shareBackendService(svc), scheme, protocol, svc.Spec.SessionAffinity) - // Ensure the backend service has the proper backend/instance-group links - return g.ensureInternalBackendServiceGroups(backendServiceName, igLinks) -} - -func (g *Cloud) ensureInternalLoadBalancerDeleted(clusterName, clusterID string, svc *v1.Service) error { - loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, svc) - svcNamespacedName := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} - _, _, protocol := getPortsAndProtocol(svc.Spec.Ports) - scheme := cloud.SchemeInternal - sharedBackend := shareBackendService(svc) - sharedHealthCheck := !servicehelpers.RequestsOnlyLocalTraffic(svc) - - g.sharedResourceLock.Lock() - defer g.sharedResourceLock.Unlock() - - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): attempting delete of region internal address", loadBalancerName) - ensureAddressDeleted(g, loadBalancerName, g.region) - - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting region internal forwarding rule", loadBalancerName) - if err := ignoreNotFound(g.DeleteRegionForwardingRule(loadBalancerName, g.region)); err != nil { - return err - } - - backendServiceName := makeBackendServiceName(loadBalancerName, clusterID, sharedBackend, scheme, protocol, svc.Spec.SessionAffinity) - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting region backend service %v", loadBalancerName, backendServiceName) - if err := g.teardownInternalBackendService(backendServiceName); err != nil { - return err - } - - deleteFunc := func(fwName string) error { - if err := ignoreNotFound(g.DeleteFirewall(fwName)); err != nil { - if isForbidden(err) && g.OnXPN() { - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): could not delete traffic firewall on XPN cluster. Raising event.", loadBalancerName) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudDeleteCmd(fwName, g.NetworkProjectID())) - return nil - } - return err - } - return nil - } - fwName := MakeFirewallName(loadBalancerName) - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting firewall %s for traffic", - loadBalancerName, fwName) - if err := deleteFunc(fwName); err != nil { - return err - } - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting legacy name firewall for traffic", loadBalancerName) - if err := deleteFunc(loadBalancerName); err != nil { - return err - } - - hcName := makeHealthCheckName(loadBalancerName, clusterID, sharedHealthCheck) - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): deleting health check %v and its firewall", loadBalancerName, hcName) - if err := g.teardownInternalHealthCheckAndFirewall(svc, hcName); err != nil { - return err - } - - // Try deleting instance groups - expect ResourceInuse error if needed by other LBs - igName := makeInstanceGroupName(clusterID) - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): Attempting delete of instanceGroup %v", loadBalancerName, igName) - if err := g.ensureInternalInstanceGroupsDeleted(igName); err != nil && !isInUsedByError(err) { - return err - } - - klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): Removing %q finalizer", loadBalancerName, ILBFinalizerV1) - if err := removeFinalizer(svc, g.client.CoreV1(), ILBFinalizerV1); err != nil { - klog.Errorf("Failed to remove finalizer '%s' on service %s - %v", ILBFinalizerV1, svcNamespacedName, err) - return err - } - - klog.V(6).Infof("Internal Loadbalancer for Service %s deleted, removing its state from metrics cache", svcNamespacedName) - g.metricsCollector.DeleteL4ILBService(svcNamespacedName.String()) - return nil -} - -func (g *Cloud) teardownInternalBackendService(bsName string) error { - if err := g.DeleteRegionBackendService(bsName, g.region); err != nil { - if isNotFound(err) { - klog.V(2).Infof("teardownInternalBackendService(%v): backend service already deleted. err: %v", bsName, err) - return nil - } else if isInUsedByError(err) { - klog.V(2).Infof("teardownInternalBackendService(%v): backend service in use.", bsName) - return nil - } else { - return fmt.Errorf("failed to delete backend service: %v, err: %v", bsName, err) - } - } - klog.V(2).Infof("teardownInternalBackendService(%v): backend service deleted", bsName) - return nil -} - -func (g *Cloud) teardownInternalHealthCheckAndFirewall(svc *v1.Service, hcName string) error { - if err := g.DeleteHealthCheck(hcName); err != nil { - if isNotFound(err) { - klog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check does not exist.", hcName) - // Purposely do not early return - double check the firewall does not exist - } else if isInUsedByError(err) { - klog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check in use.", hcName) - return nil - } else { - return fmt.Errorf("failed to delete health check: %v, err: %v", hcName, err) - } - } - klog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check deleted", hcName) - - hcFirewallName := makeHealthCheckFirewallNameFromHC(hcName) - if err := ignoreNotFound(g.DeleteFirewall(hcFirewallName)); err != nil { - if isForbidden(err) && g.OnXPN() { - klog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): could not delete health check traffic firewall on XPN cluster. Raising Event.", hcName) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudDeleteCmd(hcFirewallName, g.NetworkProjectID())) - return nil - } - - return fmt.Errorf("failed to delete health check firewall: %v, err: %v", hcFirewallName, err) - } - klog.V(2).Infof("teardownInternalHealthCheckAndFirewall(%v): health check firewall deleted", hcFirewallName) - return nil -} - -func (g *Cloud) ensureInternalFirewall(svc *v1.Service, fwName, fwDesc, destinationIP string, sourceRanges []string, portRanges []string, protocol v1.Protocol, nodes []*v1.Node, legacyFwName string) error { - klog.V(2).Infof("ensureInternalFirewall(%v): checking existing firewall", fwName) - targetTags, err := g.GetNodeTags(nodeNames(nodes)) - if err != nil { - return err - } - - existingFirewall, err := g.GetFirewall(fwName) - if err != nil && !isNotFound(err) { - return err - } - // TODO(84821) Remove legacyFwName logic after 3 releases, so there would have been atleast 2 master upgrades that would - // have triggered service sync and deletion of the legacy rules. - if legacyFwName != "" { - // Check for firewall named with the legacy naming scheme and delete if found. - legacyFirewall, err := g.GetFirewall(legacyFwName) - if err != nil && !isNotFound(err) { - return err - } - if legacyFirewall != nil && existingFirewall != nil { - // Delete the legacyFirewall rule if the new one was already created. If not, it will be deleted in the - // next sync or when the service is deleted. - defer func() { - err = g.DeleteFirewall(legacyFwName) - if err != nil { - klog.Errorf("Failed to delete legacy firewall %s for service %s/%s, err %v", - legacyFwName, svc.Namespace, svc.Name, err) - } else { - klog.V(2).Infof("Successfully deleted legacy firewall %s for service %s/%s", - legacyFwName, svc.Namespace, svc.Name) - } - }() - } - } - - expectedFirewall := &compute.Firewall{ - Name: fwName, - Description: fwDesc, - Network: g.networkURL, - SourceRanges: sourceRanges, - TargetTags: targetTags, - Allowed: []*compute.FirewallAllowed{ - { - IPProtocol: strings.ToLower(string(protocol)), - Ports: portRanges, - }, - }, - } - - if destinationIP != "" { - expectedFirewall.DestinationRanges = []string{destinationIP} - } - - if existingFirewall == nil { - klog.V(2).Infof("ensureInternalFirewall(%v): creating firewall", fwName) - err = g.CreateFirewall(expectedFirewall) - if err != nil && isForbidden(err) && g.OnXPN() { - klog.V(2).Infof("ensureInternalFirewall(%v): do not have permission to create firewall rule (on XPN). Raising event.", fwName) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudCreateCmd(expectedFirewall, g.NetworkProjectID())) - return nil - } - return err - } - - if firewallRuleEqual(expectedFirewall, existingFirewall) { - return nil - } - - klog.V(2).Infof("ensureInternalFirewall(%v): updating firewall", fwName) - err = g.PatchFirewall(expectedFirewall) - if err != nil && isForbidden(err) && g.OnXPN() { - klog.V(2).Infof("ensureInternalFirewall(%v): do not have permission to update firewall rule (on XPN). Raising event.", fwName) - g.raiseFirewallChangeNeededEvent(svc, FirewallToGCloudUpdateCmd(expectedFirewall, g.NetworkProjectID())) - return nil - } - return err -} - -func (g *Cloud) ensureInternalFirewalls(loadBalancerName, ipAddress, clusterID string, nm types.NamespacedName, svc *v1.Service, healthCheckPort string, sharedHealthCheck bool, nodes []*v1.Node) error { - // First firewall is for ingress traffic - fwDesc := makeFirewallDescription(nm.String(), ipAddress) - _, portRanges, protocol := getPortsAndProtocol(svc.Spec.Ports) - sourceRanges, err := servicehelpers.GetLoadBalancerSourceRanges(svc) - if err != nil { - return err - } - err = g.ensureInternalFirewall(svc, MakeFirewallName(loadBalancerName), fwDesc, ipAddress, sourceRanges.StringSlice(), portRanges, protocol, nodes, loadBalancerName) - if err != nil { - return err - } - - // Second firewall is for health checking nodes / services - fwHCName := makeHealthCheckFirewallName(loadBalancerName, clusterID, sharedHealthCheck) - hcSrcRanges := L4LoadBalancerSrcRanges() - return g.ensureInternalFirewall(svc, fwHCName, "", "", hcSrcRanges, []string{healthCheckPort}, v1.ProtocolTCP, nodes, "") -} - -func (g *Cloud) ensureInternalHealthCheck(name string, svcName types.NamespacedName, shared bool, path string, port int32) (*compute.HealthCheck, error) { - klog.V(2).Infof("ensureInternalHealthCheck(%v, %v, %v): checking existing health check", name, path, port) - expectedHC := newInternalLBHealthCheck(name, svcName, shared, path, port) - - hc, err := g.GetHealthCheck(name) - if err != nil && !isNotFound(err) { - return nil, err - } - - if hc == nil { - klog.V(2).Infof("ensureInternalHealthCheck: did not find health check %v, creating one with port %v path %v", name, port, path) - if err = g.CreateHealthCheck(expectedHC); err != nil { - return nil, err - } - hc, err = g.GetHealthCheck(name) - if err != nil { - klog.Errorf("Failed to get http health check %v", err) - return nil, err - } - klog.V(2).Infof("ensureInternalHealthCheck: created health check %v", name) - return hc, nil - } - - if needToUpdateHealthChecks(hc, expectedHC) { - klog.V(2).Infof("ensureInternalHealthCheck: health check %v exists but parameters have drifted - updating...", name) - mergeHealthChecks(hc, expectedHC) - if err := g.UpdateHealthCheck(expectedHC); err != nil { - klog.Warningf("Failed to reconcile http health check %v parameters", name) - return nil, err - } - klog.V(2).Infof("ensureInternalHealthCheck: corrected health check %v parameters successful", name) - hc, err = g.GetHealthCheck(name) - if err != nil { - return nil, err - } - } - return hc, nil -} - -func (g *Cloud) ensureInternalInstanceGroup(name, zone string, nodes []*v1.Node) (string, error) { - klog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): checking group that it contains %v nodes [node names limited, total number of nodes: %d]", name, zone, loggableNodeNames(nodes), len(nodes)) - ig, err := g.GetInstanceGroup(name, zone) - if err != nil && !isNotFound(err) { - return "", err - } - - kubeNodes := sets.NewString() - for _, n := range nodes { - kubeNodes.Insert(n.Name) - } - - // Individual InstanceGroup has a limit for 1000 instances in it. - // As a result, it's not possible to add more to it. - // Given that the long-term fix (AlphaFeatureILBSubsets) is already in-progress, - // to stop the bleeding we now simply cut down the contents to first 1000 - // instances in the alphabetical order. Since there is a limitation for - // 250 backend VMs for ILB, this isn't making things worse. - if len(kubeNodes) > maxInstancesPerInstanceGroup { - klog.Warningf("Limiting number of VMs for InstanceGroup %s to %d", name, maxInstancesPerInstanceGroup) - kubeNodes = sets.NewString(kubeNodes.List()[:maxInstancesPerInstanceGroup]...) - } - - gceNodes := sets.NewString() - if ig == nil { - klog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): creating instance group", name, zone) - newIG := &compute.InstanceGroup{Name: name} - if err = g.CreateInstanceGroup(newIG, zone); err != nil { - return "", err - } - - ig, err = g.GetInstanceGroup(name, zone) - if err != nil { - return "", err - } - } else { - instances, err := g.ListInstancesInInstanceGroup(name, zone, allInstances) - if err != nil { - return "", err - } - - for _, ins := range instances { - parts := strings.Split(ins.Instance, "/") - gceNodes.Insert(parts[len(parts)-1]) - } - } - - removeNodes := gceNodes.Difference(kubeNodes).List() - addNodes := kubeNodes.Difference(gceNodes).List() - - if len(removeNodes) != 0 { - klog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): removing nodes: %v", name, zone, removeNodes) - instanceRefs := g.ToInstanceReferences(zone, removeNodes) - // Possible we'll receive 404's here if the instance was deleted before getting to this point. - if err = g.RemoveInstancesFromInstanceGroup(name, zone, instanceRefs); err != nil && !isNotFound(err) { - return "", err - } - } - - if len(addNodes) != 0 { - klog.V(2).Infof("ensureInternalInstanceGroup(%v, %v): adding nodes: %v", name, zone, addNodes) - instanceRefs := g.ToInstanceReferences(zone, addNodes) - if err = g.AddInstancesToInstanceGroup(name, zone, instanceRefs); err != nil { - return "", err - } - } - - return ig.SelfLink, nil -} - -// ensureInternalInstanceGroups generates an unmanaged instance group for every zone -// where a K8s node exists. It also ensures that each node belongs to an instance group -func (g *Cloud) ensureInternalInstanceGroups(name string, nodes []*v1.Node) ([]string, error) { - zonedNodes := splitNodesByZone(nodes) - klog.V(2).Infof("ensureInternalInstanceGroups(%v): %d nodes over %d zones in region %v", name, len(nodes), len(zonedNodes), g.region) - var igLinks []string - for zone, nodes := range zonedNodes { - if g.AlphaFeatureGate.Enabled(AlphaFeatureSkipIGsManagement) { - igs, err := g.FilterInstanceGroupsByNamePrefix(name, zone) - if err != nil { - return nil, err - } - for _, ig := range igs { - igLinks = append(igLinks, ig.SelfLink) - } - } else { - igLink, err := g.ensureInternalInstanceGroup(name, zone, nodes) - if err != nil { - return nil, err - } - igLinks = append(igLinks, igLink) - } - } - - return igLinks, nil -} - -func (g *Cloud) ensureInternalInstanceGroupsDeleted(name string) error { - // List of nodes isn't available here - fetch all zones in region and try deleting this cluster's ig - zones, err := g.ListZonesInRegion(g.region) - if err != nil { - return err - } - - // Skip Instance Group deletion if IG management was moved out of k/k code - if !g.AlphaFeatureGate.Enabled(AlphaFeatureSkipIGsManagement) { - klog.V(2).Infof("ensureInternalInstanceGroupsDeleted(%v): attempting delete instance group in all %d zones", name, len(zones)) - for _, z := range zones { - if err := g.DeleteInstanceGroup(name, z.Name); err != nil && !isNotFoundOrInUse(err) { - return err - } - } - } - return nil -} - -func (g *Cloud) ensureInternalBackendService(name, description string, affinityType v1.ServiceAffinity, scheme cloud.LbScheme, protocol v1.Protocol, igLinks []string, hcLink string) error { - klog.V(2).Infof("ensureInternalBackendService(%v, %v, %v): checking existing backend service with %d groups", name, scheme, protocol, len(igLinks)) - bs, err := g.GetRegionBackendService(name, g.region) - if err != nil && !isNotFound(err) { - return err - } - - backends := backendsFromGroupLinks(igLinks) - expectedBS := &compute.BackendService{ - Name: name, - Protocol: string(protocol), - Description: description, - HealthChecks: []string{hcLink}, - Backends: backends, - SessionAffinity: translateAffinityType(affinityType), - LoadBalancingScheme: string(scheme), - } - - // Create backend service if none was found - if bs == nil { - klog.V(2).Infof("ensureInternalBackendService: creating backend service %v", name) - err := g.CreateRegionBackendService(expectedBS, g.region) - if err != nil { - return err - } - klog.V(2).Infof("ensureInternalBackendService: created backend service %v successfully", name) - return nil - } - - if backendSvcEqual(expectedBS, bs) { - return nil - } - - klog.V(2).Infof("ensureInternalBackendService: updating backend service %v", name) - // Set fingerprint for optimistic locking - expectedBS.Fingerprint = bs.Fingerprint - if err := g.UpdateRegionBackendService(expectedBS, g.region); err != nil { - return err - } - klog.V(2).Infof("ensureInternalBackendService: updated backend service %v successfully", name) - return nil -} - -// ensureInternalBackendServiceGroups updates backend services if their list of backend instance groups is incorrect. -func (g *Cloud) ensureInternalBackendServiceGroups(name string, igLinks []string) error { - klog.V(2).Infof("ensureInternalBackendServiceGroups(%v): checking existing backend service's groups", name) - bs, err := g.GetRegionBackendService(name, g.region) - if err != nil { - return err - } - - backends := backendsFromGroupLinks(igLinks) - if backendsListEqual(bs.Backends, backends) { - return nil - } - - // Set the backend service's backends to the updated list. - bs.Backends = backends - - klog.V(2).Infof("ensureInternalBackendServiceGroups: updating backend service %v", name) - if err := g.UpdateRegionBackendService(bs, g.region); err != nil { - return err - } - klog.V(2).Infof("ensureInternalBackendServiceGroups: updated backend service %v successfully", name) - return nil -} - -func shareBackendService(svc *v1.Service) bool { - return GetLoadBalancerAnnotationBackendShare(svc) && !servicehelpers.RequestsOnlyLocalTraffic(svc) -} - -func backendsFromGroupLinks(igLinks []string) (backends []*compute.Backend) { - for _, igLink := range igLinks { - backends = append(backends, &compute.Backend{ - Group: igLink, - }) - } - return backends -} - -func newInternalLBHealthCheck(name string, svcName types.NamespacedName, shared bool, path string, port int32) *compute.HealthCheck { - httpSettings := compute.HTTPHealthCheck{ - Port: int64(port), - RequestPath: path, - } - desc := "" - if !shared { - desc = makeHealthCheckDescription(svcName.String()) - } - return &compute.HealthCheck{ - Name: name, - CheckIntervalSec: gceHcCheckIntervalSeconds, - TimeoutSec: gceHcTimeoutSeconds, - HealthyThreshold: gceHcHealthyThreshold, - UnhealthyThreshold: gceHcUnhealthyThreshold, - HttpHealthCheck: &httpSettings, - Type: "HTTP", - Description: desc, - } -} - -func firewallRuleEqual(a, b *compute.Firewall) bool { - return a.Description == b.Description && - len(a.Allowed) == 1 && len(a.Allowed) == len(b.Allowed) && - a.Allowed[0].IPProtocol == b.Allowed[0].IPProtocol && - equalStringSets(a.Allowed[0].Ports, b.Allowed[0].Ports) && - equalStringSets(a.SourceRanges, b.SourceRanges) && - equalStringSets(a.DestinationRanges, b.DestinationRanges) && - equalStringSets(a.TargetTags, b.TargetTags) -} - -// mergeHealthChecks reconciles HealthCheck configures to be no smaller than -// the default values. -// E.g. old health check interval is 2s, new default is 8. -// The HC interval will be reconciled to 8 seconds. -// If the existing health check is larger than the default interval, -// the configuration will be kept. -func mergeHealthChecks(hc, newHC *compute.HealthCheck) { - if hc.CheckIntervalSec > newHC.CheckIntervalSec { - newHC.CheckIntervalSec = hc.CheckIntervalSec - } - if hc.TimeoutSec > newHC.TimeoutSec { - newHC.TimeoutSec = hc.TimeoutSec - } - if hc.UnhealthyThreshold > newHC.UnhealthyThreshold { - newHC.UnhealthyThreshold = hc.UnhealthyThreshold - } - if hc.HealthyThreshold > newHC.HealthyThreshold { - newHC.HealthyThreshold = hc.HealthyThreshold - } -} - -// needToUpdateHealthChecks checks whether the healthcheck needs to be updated. -func needToUpdateHealthChecks(hc, newHC *compute.HealthCheck) bool { - switch { - case - hc.HttpHealthCheck == nil, - newHC.HttpHealthCheck == nil, - hc.HttpHealthCheck.Port != newHC.HttpHealthCheck.Port, - hc.HttpHealthCheck.RequestPath != newHC.HttpHealthCheck.RequestPath, - hc.Description != newHC.Description, - hc.CheckIntervalSec < newHC.CheckIntervalSec, - hc.TimeoutSec < newHC.TimeoutSec, - hc.UnhealthyThreshold < newHC.UnhealthyThreshold, - hc.HealthyThreshold < newHC.HealthyThreshold: - return true - } - return false -} - -// backendsListEqual asserts that backend lists are equal by instance group link only -func backendsListEqual(a, b []*compute.Backend) bool { - if len(a) != len(b) { - return false - } - if len(a) == 0 { - return true - } - - aSet := sets.NewString() - for _, v := range a { - aSet.Insert(v.Group) - } - bSet := sets.NewString() - for _, v := range b { - bSet.Insert(v.Group) - } - - return aSet.Equal(bSet) -} - -func backendSvcEqual(a, b *compute.BackendService) bool { - return a.Protocol == b.Protocol && - a.Description == b.Description && - a.SessionAffinity == b.SessionAffinity && - a.LoadBalancingScheme == b.LoadBalancingScheme && - equalStringSets(a.HealthChecks, b.HealthChecks) && - backendsListEqual(a.Backends, b.Backends) -} - -func getPortsAndProtocol(svcPorts []v1.ServicePort) (ports []string, portRanges []string, protocol v1.Protocol) { - if len(svcPorts) == 0 { - return []string{}, []string{}, v1.ProtocolUDP - } - - // GCP doesn't support multiple protocols for a single load balancer - protocol = svcPorts[0].Protocol - portInts := []int{} - for _, p := range svcPorts { - ports = append(ports, strconv.Itoa(int(p.Port))) - portInts = append(portInts, int(p.Port)) - } - - return ports, getPortRanges(portInts), protocol -} - -func getPortRanges(ports []int) (ranges []string) { - if len(ports) < 1 { - return ranges - } - sort.Ints(ports) - - start := ports[0] - prev := ports[0] - for ix, current := range ports { - switch { - case current == prev: - // Loop over duplicates, except if the end of list is reached. - if ix == len(ports)-1 { - if start == current { - ranges = append(ranges, fmt.Sprintf("%d", current)) - } else { - ranges = append(ranges, fmt.Sprintf("%d-%d", start, current)) - } - } - case current == prev+1: - // continue the streak, create the range if this is the last element in the list. - if ix == len(ports)-1 { - ranges = append(ranges, fmt.Sprintf("%d-%d", start, current)) - } - default: - // current is not prev + 1, streak is broken. Construct the range and handle last element case. - if start == prev { - ranges = append(ranges, fmt.Sprintf("%d", prev)) - } else { - ranges = append(ranges, fmt.Sprintf("%d-%d", start, prev)) - } - if ix == len(ports)-1 { - ranges = append(ranges, fmt.Sprintf("%d", current)) - } - // reset start element - start = current - } - prev = current - } - return ranges -} - -func (g *Cloud) getBackendServiceLink(name string) string { - return g.projectsBasePath + strings.Join([]string{g.projectID, "regions", g.region, "backendServices", name}, "/") -} - -func getNameFromLink(link string) string { - if link == "" { - return "" - } - - fields := strings.Split(link, "/") - return fields[len(fields)-1] -} - -// ilbIPToUse determines which IP address needs to be used in the ForwardingRule. If an IP has been -// specified by the user, that is used. If there is an existing ForwardingRule, the ip address from -// that is reused. In case a subnetwork change is requested, the existing ForwardingRule IP is ignored. -func ilbIPToUse(svc *v1.Service, fwdRule *compute.ForwardingRule, requestedSubnet string) string { - if svc.Spec.LoadBalancerIP != "" { - return svc.Spec.LoadBalancerIP - } - if fwdRule == nil { - return "" - } - if requestedSubnet != fwdRule.Subnetwork { - // reset ip address since subnet is being changed. - return "" - } - return fwdRule.IPAddress -} - -func getILBOptions(svc *v1.Service) ILBOptions { - return ILBOptions{AllowGlobalAccess: GetLoadBalancerAnnotationAllowGlobalAccess(svc), - SubnetName: GetLoadBalancerAnnotationSubnet(svc), - } -} - -type forwardingRuleDescription struct { - ServiceName string `json:"kubernetes.io/service-name"` - APIVersion meta.Version `json:"kubernetes.io/api-version,omitempty"` -} - -// marshal the description as a JSON-encoded string. -func (d *forwardingRuleDescription) marshal() (string, error) { - out, err := json.Marshal(d) - if err != nil { - return "", err - } - return string(out), err -} - -// unmarshal desc JSON-encoded string into this structure. -func (d *forwardingRuleDescription) unmarshal(desc string) error { - return json.Unmarshal([]byte(desc), d) -} - -func getFwdRuleAPIVersion(rule *compute.ForwardingRule) (meta.Version, error) { - d := &forwardingRuleDescription{} - if rule.Description == "" { - return meta.VersionGA, nil - } - if err := d.unmarshal(rule.Description); err != nil { - return meta.VersionGA, fmt.Errorf("Failed to get APIVersion from Forwarding rule %s - %v", rule.Name, err) - } - if d.APIVersion == "" { - d.APIVersion = meta.VersionGA - } - return d.APIVersion, nil -} - -func (g *Cloud) ensureInternalForwardingRule(existingFwdRule, newFwdRule *compute.ForwardingRule) (err error) { - if existingFwdRule != nil { - if forwardingRulesEqual(existingFwdRule, newFwdRule) { - klog.V(4).Infof("existingFwdRule == newFwdRule, no updates needed (existingFwdRule == %+v)", existingFwdRule) - return nil - } - klog.V(2).Infof("ensureInternalLoadBalancer(%v): deleting existing forwarding rule with IP address %v", existingFwdRule.Name, existingFwdRule.IPAddress) - if err = ignoreNotFound(g.DeleteRegionForwardingRule(existingFwdRule.Name, g.region)); err != nil { - return err - } - } - // At this point, the existing rule has been deleted if required. - // Create the rule based on the api version determined - klog.V(2).Infof("ensureInternalLoadBalancer(%v): creating forwarding rule", newFwdRule.Name) - if err = g.CreateRegionForwardingRule(newFwdRule, g.region); err != nil { - return err - } - klog.V(2).Infof("ensureInternalLoadBalancer(%v): created forwarding rule", newFwdRule.Name) - return nil -} - -func forwardingRulesEqual(old, new *compute.ForwardingRule) bool { - // basepath could have differences like compute.googleapis.com vs www.googleapis.com, compare resourceIDs - oldResourceID, err := cloud.ParseResourceURL(old.BackendService) - if err != nil { - klog.Errorf("forwardingRulesEqual(): failed to parse backend resource URL from existing FR, err - %v", err) - } - newResourceID, err := cloud.ParseResourceURL(new.BackendService) - if err != nil { - klog.Errorf("forwardingRulesEqual(): failed to parse resource URL from new FR, err - %v", err) - } - return (old.IPAddress == "" || new.IPAddress == "" || old.IPAddress == new.IPAddress) && - old.IPProtocol == new.IPProtocol && - old.LoadBalancingScheme == new.LoadBalancingScheme && - equalStringSets(old.Ports, new.Ports) && - old.AllPorts == new.AllPorts && - oldResourceID.Equal(newResourceID) && - old.AllowGlobalAccess == new.AllowGlobalAccess && - old.Subnetwork == new.Subnetwork -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_metrics.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_metrics.go deleted file mode 100644 index 3cdbd9c0c9216..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_metrics.go +++ /dev/null @@ -1,182 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "sync" - "time" - - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog/v2" -) - -const ( - label = "feature" -) - -var ( - metricsInterval = 10 * time.Minute - l4ILBCount = metrics.NewGaugeVec( - &metrics.GaugeOpts{ - Name: "number_of_l4_ilbs", - Help: "Number of L4 ILBs", - StabilityLevel: metrics.ALPHA, - }, - []string{label}, - ) -) - -// init registers L4 internal loadbalancer usage metrics. -func init() { - klog.V(3).Infof("Registering Service Controller loadbalancer usage metrics %v", l4ILBCount) - legacyregistry.MustRegister(l4ILBCount) -} - -// LoadBalancerMetrics is a cache that contains loadbalancer service resource -// states for computing usage metrics. -type LoadBalancerMetrics struct { - // l4ILBServiceMap is a map of service key and L4 ILB service state. - l4ILBServiceMap map[string]L4ILBServiceState - - sync.Mutex -} - -type feature string - -func (f feature) String() string { - return string(f) -} - -const ( - l4ILBService = feature("L4ILBService") - l4ILBGlobalAccess = feature("L4ILBGlobalAccess") - l4ILBCustomSubnet = feature("L4ILBCustomSubnet") - // l4ILBInSuccess feature specifies that ILB VIP is configured. - l4ILBInSuccess = feature("L4ILBInSuccess") - // l4ILBInInError feature specifies that an error had occurred for this service - // in ensureInternalLoadbalancer method. - l4ILBInError = feature("L4ILBInError") -) - -// L4ILBServiceState contains Internal Loadbalancer feature states as specified -// in k8s Service. -type L4ILBServiceState struct { - // EnabledGlobalAccess specifies if Global Access is enabled. - EnabledGlobalAccess bool - // EnabledCustomSubNet specifies if Custom Subnet is enabled. - EnabledCustomSubnet bool - // InSuccess specifies if the ILB service VIP is configured. - InSuccess bool -} - -// loadbalancerMetricsCollector is an interface to update/delete L4 loadbalancer -// states in the cache that is used for computing L4 Loadbalancer usage metrics. -type loadbalancerMetricsCollector interface { - // Run starts a goroutine to compute and export metrics a periodic interval. - Run(stopCh <-chan struct{}) - // SetL4ILBService adds/updates L4 ILB service state for given service key. - SetL4ILBService(svcKey string, state L4ILBServiceState) - // DeleteL4ILBService removes the given L4 ILB service key. - DeleteL4ILBService(svcKey string) -} - -// newLoadBalancerMetrics initializes LoadBalancerMetrics and starts a goroutine -// to compute and export metrics periodically. -func newLoadBalancerMetrics() loadbalancerMetricsCollector { - return &LoadBalancerMetrics{ - l4ILBServiceMap: make(map[string]L4ILBServiceState), - } -} - -// Run implements loadbalancerMetricsCollector. -func (lm *LoadBalancerMetrics) Run(stopCh <-chan struct{}) { - klog.V(3).Infof("Loadbalancer Metrics initialized. Metrics will be exported at an interval of %v", metricsInterval) - // Compute and export metrics periodically. - go func() { - // Wait for service states to be populated in the cache before computing metrics. - time.Sleep(metricsInterval) - wait.Until(lm.export, metricsInterval, stopCh) - }() - <-stopCh -} - -// SetL4ILBService implements loadbalancerMetricsCollector. -func (lm *LoadBalancerMetrics) SetL4ILBService(svcKey string, state L4ILBServiceState) { - lm.Lock() - defer lm.Unlock() - - if lm.l4ILBServiceMap == nil { - klog.Fatalf("Loadbalancer Metrics failed to initialize correctly.") - } - lm.l4ILBServiceMap[svcKey] = state -} - -// DeleteL4ILBService implements loadbalancerMetricsCollector. -func (lm *LoadBalancerMetrics) DeleteL4ILBService(svcKey string) { - lm.Lock() - defer lm.Unlock() - - delete(lm.l4ILBServiceMap, svcKey) -} - -// export computes and exports loadbalancer usage metrics. -func (lm *LoadBalancerMetrics) export() { - ilbCount := lm.computeL4ILBMetrics() - klog.V(5).Infof("Exporting L4 ILB usage metrics: %#v", ilbCount) - for feature, count := range ilbCount { - l4ILBCount.With(map[string]string{label: feature.String()}).Set(float64(count)) - } - klog.V(5).Infof("L4 ILB usage metrics exported.") -} - -// computeL4ILBMetrics aggregates L4 ILB metrics in the cache. -func (lm *LoadBalancerMetrics) computeL4ILBMetrics() map[feature]int { - lm.Lock() - defer lm.Unlock() - klog.V(4).Infof("Computing L4 ILB usage metrics from service state map: %#v", lm.l4ILBServiceMap) - counts := map[feature]int{ - l4ILBService: 0, - l4ILBGlobalAccess: 0, - l4ILBCustomSubnet: 0, - l4ILBInSuccess: 0, - l4ILBInError: 0, - } - - for key, state := range lm.l4ILBServiceMap { - klog.V(6).Infof("ILB Service %s has EnabledGlobalAccess: %t, EnabledCustomSubnet: %t, InSuccess: %t", key, state.EnabledGlobalAccess, state.EnabledCustomSubnet, state.InSuccess) - counts[l4ILBService]++ - if !state.InSuccess { - counts[l4ILBInError]++ - // Skip counting other features if the service is in error state. - continue - } - counts[l4ILBInSuccess]++ - if state.EnabledGlobalAccess { - counts[l4ILBGlobalAccess]++ - } - if state.EnabledCustomSubnet { - counts[l4ILBCustomSubnet]++ - } - } - klog.V(4).Info("L4 ILB usage metrics computed.") - return counts -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_naming.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_naming.go deleted file mode 100644 index 01c8765e94bb1..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_loadbalancer_naming.go +++ /dev/null @@ -1,129 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "crypto/sha1" - "encoding/hex" - "fmt" - "strings" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" -) - -// Internal Load Balancer - -// Instance groups remain legacy named to stay consistent with ingress -func makeInstanceGroupName(clusterID string) string { - prefix := "k8s-ig" - // clusterID might be empty for legacy clusters - if clusterID == "" { - return prefix - } - return fmt.Sprintf("%s--%s", prefix, clusterID) -} - -func makeBackendServiceName(loadBalancerName, clusterID string, shared bool, scheme cloud.LbScheme, protocol v1.Protocol, svcAffinity v1.ServiceAffinity) string { - if shared { - hash := sha1.New() - - // For every non-nil option, hash its value. Currently, only service affinity is relevant. - hash.Write([]byte(string(svcAffinity))) - - hashed := hex.EncodeToString(hash.Sum(nil)) - hashed = hashed[:16] - - // k8s- 4 - // {clusterid}- 17 - // {scheme}- 9 (internal/external) - // {protocol}- 4 (tcp/udp) - // nmv1- 5 (naming convention version) - // {suffix} 16 (hash of settings) - // ----------------- - // 55 characters used - return fmt.Sprintf("k8s-%s-%s-%s-nmv1-%s", clusterID, strings.ToLower(string(scheme)), strings.ToLower(string(protocol)), hashed) - } - return loadBalancerName -} - -func makeHealthCheckName(loadBalancerName, clusterID string, shared bool) string { - if shared { - return fmt.Sprintf("k8s-%s-node", clusterID) - } - - return loadBalancerName -} - -func makeHealthCheckFirewallNameFromHC(healthCheckName string) string { - return healthCheckName + "-hc" -} - -func makeHealthCheckFirewallName(loadBalancerName, clusterID string, shared bool) string { - if shared { - return fmt.Sprintf("k8s-%s-node-hc", clusterID) - } - return loadBalancerName + "-hc" -} - -func makeBackendServiceDescription(nm types.NamespacedName, shared bool) string { - if shared { - return "" - } - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, nm.String()) -} - -// External Load Balancer - -// makeServiceDescription is used to generate descriptions for forwarding rules and addresses. -func makeServiceDescription(serviceName string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName) -} - -// MakeNodesHealthCheckName returns name of the health check resource used by -// the GCE load balancers (l4) for performing health checks on nodes. -func MakeNodesHealthCheckName(clusterID string) string { - return fmt.Sprintf("k8s-%v-node", clusterID) -} - -func makeHealthCheckDescription(serviceName string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s"}`, serviceName) -} - -// MakeHealthCheckFirewallName returns the firewall name used by the GCE load -// balancers (l4) for performing health checks. -func MakeHealthCheckFirewallName(clusterID, hcName string, isNodesHealthCheck bool) string { - if isNodesHealthCheck { - return MakeNodesHealthCheckName(clusterID) + "-http-hc" - } - return "k8s-" + hcName + "-http-hc" -} - -// MakeFirewallName returns the firewall name used by the GCE load -// balancers (l4) for serving traffic. -func MakeFirewallName(name string) string { - return fmt.Sprintf("k8s-fw-%s", name) -} - -func makeFirewallDescription(serviceName, ipAddress string) string { - return fmt.Sprintf(`{"kubernetes.io/service-name":"%s", "kubernetes.io/service-ip":"%s"}`, - serviceName, ipAddress) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networkendpointgroup.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networkendpointgroup.go deleted file mode 100644 index 6aa079620bafd..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networkendpointgroup.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "fmt" - "strings" - - computebeta "google.golang.org/api/compute/v0.beta" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newNetworkEndpointGroupMetricContext(request string, zone string) *metricContext { - return newGenericMetricContext("networkendpointgroup_", request, unusedMetricLabel, zone, computeBetaVersion) -} - -// GetNetworkEndpointGroup returns the collection of network endpoints for the name in zone -func (g *Cloud) GetNetworkEndpointGroup(name string, zone string) (*computebeta.NetworkEndpointGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("get", zone) - v, err := g.c.BetaNetworkEndpointGroups().Get(ctx, meta.ZonalKey(name, zone)) - return v, mc.Observe(err) -} - -// ListNetworkEndpointGroup returns the collection of network endpoints for the zone -func (g *Cloud) ListNetworkEndpointGroup(zone string) ([]*computebeta.NetworkEndpointGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("list", zone) - negs, err := g.c.BetaNetworkEndpointGroups().List(ctx, zone, filter.None) - return negs, mc.Observe(err) -} - -// AggregatedListNetworkEndpointGroup returns a map of zone -> endpoint group. -func (g *Cloud) AggregatedListNetworkEndpointGroup() (map[string][]*computebeta.NetworkEndpointGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("aggregated_list", "") - // TODO: filter for the region the cluster is in. - all, err := g.c.BetaNetworkEndpointGroups().AggregatedList(ctx, filter.None) - if err != nil { - return nil, mc.Observe(err) - } - ret := map[string][]*computebeta.NetworkEndpointGroup{} - for key, byZone := range all { - // key is "zones/" - parts := strings.Split(key, "/") - if len(parts) != 2 { - return nil, mc.Observe(fmt.Errorf("invalid key for AggregatedListNetworkEndpointGroup: %q", key)) - } - zone := parts[1] - ret[zone] = append(ret[zone], byZone...) - } - return ret, mc.Observe(nil) -} - -// CreateNetworkEndpointGroup creates an endpoint group in the zone -func (g *Cloud) CreateNetworkEndpointGroup(neg *computebeta.NetworkEndpointGroup, zone string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("create", zone) - return mc.Observe(g.c.BetaNetworkEndpointGroups().Insert(ctx, meta.ZonalKey(neg.Name, zone), neg)) -} - -// DeleteNetworkEndpointGroup deletes the name endpoint group from the zone -func (g *Cloud) DeleteNetworkEndpointGroup(name string, zone string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("delete", zone) - return mc.Observe(g.c.BetaNetworkEndpointGroups().Delete(ctx, meta.ZonalKey(name, zone))) -} - -// AttachNetworkEndpoints associates the referenced endpoints with the named endpoint group in the zone -func (g *Cloud) AttachNetworkEndpoints(name, zone string, endpoints []*computebeta.NetworkEndpoint) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("attach", zone) - req := &computebeta.NetworkEndpointGroupsAttachEndpointsRequest{ - NetworkEndpoints: endpoints, - } - return mc.Observe(g.c.BetaNetworkEndpointGroups().AttachNetworkEndpoints(ctx, meta.ZonalKey(name, zone), req)) -} - -// DetachNetworkEndpoints breaks the association between the referenced endpoints and the named endpoint group in the zone -func (g *Cloud) DetachNetworkEndpoints(name, zone string, endpoints []*computebeta.NetworkEndpoint) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("detach", zone) - req := &computebeta.NetworkEndpointGroupsDetachEndpointsRequest{ - NetworkEndpoints: endpoints, - } - return mc.Observe(g.c.BetaNetworkEndpointGroups().DetachNetworkEndpoints(ctx, meta.ZonalKey(name, zone), req)) -} - -// ListNetworkEndpoints returns all the endpoints associated with the endpoint group in zone and optionally their status. -func (g *Cloud) ListNetworkEndpoints(name, zone string, showHealthStatus bool) ([]*computebeta.NetworkEndpointWithHealthStatus, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkEndpointGroupMetricContext("list_networkendpoints", zone) - healthStatus := "SKIP" - if showHealthStatus { - healthStatus = "SHOW" - } - req := &computebeta.NetworkEndpointGroupsListEndpointsRequest{ - HealthStatus: healthStatus, - } - l, err := g.c.BetaNetworkEndpointGroups().ListNetworkEndpoints(ctx, meta.ZonalKey(name, zone), req, filter.None) - return l, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networks.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networks.go deleted file mode 100644 index 33075db41b4eb..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_networks.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - - compute "google.golang.org/api/compute/v1" -) - -func newNetworkMetricContext(request string) *metricContext { - return newGenericMetricContext("networks", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetNetwork returns the GCE resource for the compute.Network if it exists. -func (g *Cloud) GetNetwork(networkName string) (*compute.Network, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newNetworkMetricContext("get") - key := meta.GlobalKey(networkName) - network, err := g.Compute().Networks().Get(ctx, key) - return network, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_routes.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_routes.go deleted file mode 100644 index c92d103d43439..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_routes.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - "net/http" - "path" - "time" - - "google.golang.org/api/compute/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/klog/v2" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - cloudprovider "k8s.io/cloud-provider" -) - -func newRoutesMetricContext(request string) *metricContext { - return newGenericMetricContext("routes", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// ListRoutes in the cloud environment. -func (g *Cloud) ListRoutes(ctx context.Context, clusterName string) ([]*cloudprovider.Route, error) { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - mc := newRoutesMetricContext("list") - prefix := truncateClusterName(clusterName) - f := filter.Regexp("name", prefix+"-.*").AndRegexp("network", g.NetworkURL()).AndRegexp("description", k8sNodeRouteTag) - routes, err := g.c.Routes().List(timeoutCtx, f) - if err != nil { - return nil, mc.Observe(err) - } - var croutes []*cloudprovider.Route - for _, r := range routes { - target := path.Base(r.NextHopInstance) - // TODO: Should we lastComponent(target) this? - targetNodeName := types.NodeName(target) // NodeName == Instance Name on GCE - croutes = append(croutes, &cloudprovider.Route{ - Name: r.Name, - TargetNode: targetNodeName, - DestinationCIDR: r.DestRange, - }) - } - return croutes, mc.Observe(nil) -} - -// CreateRoute in the cloud environment. -func (g *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, route *cloudprovider.Route) error { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - mc := newRoutesMetricContext("create") - - targetInstance, err := g.getInstanceByName(mapNodeNameToInstanceName(route.TargetNode)) - if err != nil { - return mc.Observe(err) - } - cr := &compute.Route{ - // TODO(thockin): generate a unique name for node + route cidr. Don't depend on name hints. - Name: truncateClusterName(clusterName) + "-" + nameHint, - DestRange: route.DestinationCIDR, - NextHopInstance: fmt.Sprintf("zones/%s/instances/%s", targetInstance.Zone, targetInstance.Name), - Network: g.NetworkURL(), - Priority: 1000, - Description: k8sNodeRouteTag, - } - err = g.c.Routes().Insert(timeoutCtx, meta.GlobalKey(cr.Name), cr) - if isHTTPErrorCode(err, http.StatusConflict) { - klog.Infof("Route %q already exists.", cr.Name) - err = nil - } - return mc.Observe(err) -} - -// DeleteRoute from the cloud environment. -func (g *Cloud) DeleteRoute(ctx context.Context, clusterName string, route *cloudprovider.Route) error { - timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) - defer cancel() - - mc := newRoutesMetricContext("delete") - return mc.Observe(g.c.Routes().Delete(timeoutCtx, meta.GlobalKey(route.Name))) -} - -func truncateClusterName(clusterName string) string { - if len(clusterName) > 26 { - return clusterName[:26] - } - return clusterName -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_securitypolicy.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_securitypolicy.go deleted file mode 100644 index e93f79cacc776..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_securitypolicy.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - computebeta "google.golang.org/api/compute/v0.beta" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newSecurityPolicyMetricContextWithVersion(request, version string) *metricContext { - return newGenericMetricContext("securitypolicy", request, "", unusedMetricLabel, version) -} - -// GetBetaSecurityPolicy retrieves a security policy. -func (g *Cloud) GetBetaSecurityPolicy(name string) (*computebeta.SecurityPolicy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("get", computeBetaVersion) - v, err := g.c.BetaSecurityPolicies().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// ListBetaSecurityPolicy lists all security policies in the project. -func (g *Cloud) ListBetaSecurityPolicy() ([]*computebeta.SecurityPolicy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("list", computeBetaVersion) - v, err := g.c.BetaSecurityPolicies().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// CreateBetaSecurityPolicy creates the given security policy. -func (g *Cloud) CreateBetaSecurityPolicy(sp *computebeta.SecurityPolicy) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("create", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().Insert(ctx, meta.GlobalKey(sp.Name), sp)) -} - -// DeleteBetaSecurityPolicy deletes the given security policy. -func (g *Cloud) DeleteBetaSecurityPolicy(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("delete", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().Delete(ctx, meta.GlobalKey(name))) -} - -// PatchBetaSecurityPolicy applies the given security policy as a -// patch to an existing security policy. -func (g *Cloud) PatchBetaSecurityPolicy(sp *computebeta.SecurityPolicy) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("patch", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().Patch(ctx, meta.GlobalKey(sp.Name), sp)) -} - -// GetRuleForBetaSecurityPolicy gets rule from a security policy. -func (g *Cloud) GetRuleForBetaSecurityPolicy(name string) (*computebeta.SecurityPolicyRule, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("get_rule", computeBetaVersion) - v, err := g.c.BetaSecurityPolicies().GetRule(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// AddRuletoBetaSecurityPolicy adds the given security policy rule to -// a security policy. -func (g *Cloud) AddRuletoBetaSecurityPolicy(name string, spr *computebeta.SecurityPolicyRule) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("add_rule", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().AddRule(ctx, meta.GlobalKey(name), spr)) -} - -// PatchRuleForBetaSecurityPolicy patches the given security policy -// rule to a security policy. -func (g *Cloud) PatchRuleForBetaSecurityPolicy(name string, spr *computebeta.SecurityPolicyRule) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("patch_rule", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().PatchRule(ctx, meta.GlobalKey(name), spr)) -} - -// RemoveRuleFromBetaSecurityPolicy removes rule from a security policy. -func (g *Cloud) RemoveRuleFromBetaSecurityPolicy(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSecurityPolicyMetricContextWithVersion("remove_rule", computeBetaVersion) - return mc.Observe(g.c.BetaSecurityPolicies().RemoveRule(ctx, meta.GlobalKey(name))) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_subnetworks.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_subnetworks.go deleted file mode 100644 index a0e5f9b3eb7a0..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_subnetworks.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - - compute "google.golang.org/api/compute/v1" -) - -func newSubnetworkMetricContext(request, region string) *metricContext { - return newGenericMetricContext("subnetworks", request, region, unusedMetricLabel, computeV1Version) -} - -// GetSubnetwork returns the GCE resource for the compute.Subnetwork if it exists. -func (g *Cloud) GetSubnetwork(region, subnetworkName string) (*compute.Subnetwork, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newSubnetworkMetricContext("get", region) - key := meta.RegionalKey(subnetworkName, region) - subnetwork, err := g.Compute().Subnetworks().Get(ctx, key) - return subnetwork, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetpool.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetpool.go deleted file mode 100644 index 8b032b684b1d4..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetpool.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newTargetPoolMetricContext(request, region string) *metricContext { - return newGenericMetricContext("targetpool", request, region, unusedMetricLabel, computeV1Version) -} - -// GetTargetPool returns the TargetPool by name. -func (g *Cloud) GetTargetPool(name, region string) (*compute.TargetPool, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetPoolMetricContext("get", region) - v, err := g.c.TargetPools().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - -// CreateTargetPool creates the passed TargetPool -func (g *Cloud) CreateTargetPool(tp *compute.TargetPool, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetPoolMetricContext("create", region) - return mc.Observe(g.c.TargetPools().Insert(ctx, meta.RegionalKey(tp.Name, region), tp)) -} - -// DeleteTargetPool deletes TargetPool by name. -func (g *Cloud) DeleteTargetPool(name, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetPoolMetricContext("delete", region) - return mc.Observe(g.c.TargetPools().Delete(ctx, meta.RegionalKey(name, region))) -} - -// AddInstancesToTargetPool adds instances by link to the TargetPool -func (g *Cloud) AddInstancesToTargetPool(name, region string, instanceRefs []*compute.InstanceReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - req := &compute.TargetPoolsAddInstanceRequest{ - Instances: instanceRefs, - } - mc := newTargetPoolMetricContext("add_instances", region) - return mc.Observe(g.c.TargetPools().AddInstance(ctx, meta.RegionalKey(name, region), req)) -} - -// RemoveInstancesFromTargetPool removes instances by link to the TargetPool -func (g *Cloud) RemoveInstancesFromTargetPool(name, region string, instanceRefs []*compute.InstanceReference) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - req := &compute.TargetPoolsRemoveInstanceRequest{ - Instances: instanceRefs, - } - mc := newTargetPoolMetricContext("remove_instances", region) - return mc.Observe(g.c.TargetPools().RemoveInstance(ctx, meta.RegionalKey(name, region), req)) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetproxy.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetproxy.go deleted file mode 100644 index 1b68529444122..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_targetproxy.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newTargetProxyMetricContext(request string) *metricContext { - return newGenericMetricContext("targetproxy", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetTargetHTTPProxy returns the UrlMap by name. -func (g *Cloud) GetTargetHTTPProxy(name string) (*compute.TargetHttpProxy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("get") - v, err := g.c.TargetHttpProxies().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// CreateTargetHTTPProxy creates a TargetHttpProxy -func (g *Cloud) CreateTargetHTTPProxy(proxy *compute.TargetHttpProxy) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("create") - return mc.Observe(g.c.TargetHttpProxies().Insert(ctx, meta.GlobalKey(proxy.Name), proxy)) -} - -// SetURLMapForTargetHTTPProxy sets the given UrlMap for the given TargetHttpProxy. -func (g *Cloud) SetURLMapForTargetHTTPProxy(proxy *compute.TargetHttpProxy, urlMapLink string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - ref := &compute.UrlMapReference{UrlMap: urlMapLink} - mc := newTargetProxyMetricContext("set_url_map") - return mc.Observe(g.c.TargetHttpProxies().SetUrlMap(ctx, meta.GlobalKey(proxy.Name), ref)) -} - -// DeleteTargetHTTPProxy deletes the TargetHttpProxy by name. -func (g *Cloud) DeleteTargetHTTPProxy(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("delete") - return mc.Observe(g.c.TargetHttpProxies().Delete(ctx, meta.GlobalKey(name))) -} - -// ListTargetHTTPProxies lists all TargetHttpProxies in the project. -func (g *Cloud) ListTargetHTTPProxies() ([]*compute.TargetHttpProxy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("list") - v, err := g.c.TargetHttpProxies().List(ctx, filter.None) - return v, mc.Observe(err) -} - -// TargetHttpsProxy management - -// GetTargetHTTPSProxy returns the UrlMap by name. -func (g *Cloud) GetTargetHTTPSProxy(name string) (*compute.TargetHttpsProxy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("get") - v, err := g.c.TargetHttpsProxies().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// CreateTargetHTTPSProxy creates a TargetHttpsProxy -func (g *Cloud) CreateTargetHTTPSProxy(proxy *compute.TargetHttpsProxy) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("create") - return mc.Observe(g.c.TargetHttpsProxies().Insert(ctx, meta.GlobalKey(proxy.Name), proxy)) -} - -// SetURLMapForTargetHTTPSProxy sets the given UrlMap for the given TargetHttpsProxy. -func (g *Cloud) SetURLMapForTargetHTTPSProxy(proxy *compute.TargetHttpsProxy, urlMapLink string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("set_url_map") - ref := &compute.UrlMapReference{UrlMap: urlMapLink} - return mc.Observe(g.c.TargetHttpsProxies().SetUrlMap(ctx, meta.GlobalKey(proxy.Name), ref)) -} - -// SetSslCertificateForTargetHTTPSProxy sets the given SslCertificate for the given TargetHttpsProxy. -func (g *Cloud) SetSslCertificateForTargetHTTPSProxy(proxy *compute.TargetHttpsProxy, sslCertURLs []string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("set_ssl_cert") - req := &compute.TargetHttpsProxiesSetSslCertificatesRequest{ - SslCertificates: sslCertURLs, - } - return mc.Observe(g.c.TargetHttpsProxies().SetSslCertificates(ctx, meta.GlobalKey(proxy.Name), req)) -} - -// DeleteTargetHTTPSProxy deletes the TargetHttpsProxy by name. -func (g *Cloud) DeleteTargetHTTPSProxy(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("delete") - return mc.Observe(g.c.TargetHttpsProxies().Delete(ctx, meta.GlobalKey(name))) -} - -// ListTargetHTTPSProxies lists all TargetHttpsProxies in the project. -func (g *Cloud) ListTargetHTTPSProxies() ([]*compute.TargetHttpsProxy, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newTargetProxyMetricContext("list") - v, err := g.c.TargetHttpsProxies().List(ctx, filter.None) - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_tpu.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_tpu.go deleted file mode 100644 index 5b3e627415b28..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_tpu.go +++ /dev/null @@ -1,220 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "time" - - "google.golang.org/api/googleapi" - tpuapi "google.golang.org/api/tpu/v1" - "k8s.io/klog/v2" - - "k8s.io/apimachinery/pkg/util/wait" -) - -// newTPUService returns a new tpuService using the client to communicate with -// the Cloud TPU APIs. -func newTPUService(client *http.Client) (*tpuService, error) { - s, err := tpuapi.NewService(context.Background()) - if err != nil { - return nil, err - } - return &tpuService{ - projects: tpuapi.NewProjectsService(s), - }, nil -} - -// tpuService encapsulates the TPU services on nodes and the operations on the -// nodes. -type tpuService struct { - projects *tpuapi.ProjectsService -} - -// CreateTPU creates the Cloud TPU node with the specified name in the -// specified zone. -func (g *Cloud) CreateTPU(ctx context.Context, name, zone string, node *tpuapi.Node) (*tpuapi.Node, error) { - var err error - mc := newTPUMetricContext("create", zone) - defer mc.Observe(err) - - var op *tpuapi.Operation - parent := getTPUParentName(g.projectID, zone) - op, err = g.tpuService.projects.Locations.Nodes.Create(parent, node).NodeId(name).Do() - if err != nil { - return nil, err - } - klog.V(2).Infof("Creating Cloud TPU %q in zone %q with operation %q", name, zone, op.Name) - - op, err = g.waitForTPUOp(ctx, op) - if err != nil { - return nil, err - } - err = getErrorFromTPUOp(op) - if err != nil { - return nil, err - } - - output := new(tpuapi.Node) - err = json.Unmarshal(op.Response, output) - if err != nil { - err = fmt.Errorf("failed to unmarshal response from operation %q: response = %v, err = %v", op.Name, op.Response, err) - return nil, err - } - return output, nil -} - -// DeleteTPU deletes the Cloud TPU with the specified name in the specified -// zone. -func (g *Cloud) DeleteTPU(ctx context.Context, name, zone string) error { - var err error - mc := newTPUMetricContext("delete", zone) - defer mc.Observe(err) - - var op *tpuapi.Operation - name = getTPUName(g.projectID, zone, name) - op, err = g.tpuService.projects.Locations.Nodes.Delete(name).Do() - if err != nil { - return err - } - klog.V(2).Infof("Deleting Cloud TPU %q in zone %q with operation %q", name, zone, op.Name) - - op, err = g.waitForTPUOp(ctx, op) - if err != nil { - return err - } - err = getErrorFromTPUOp(op) - return err -} - -// GetTPU returns the Cloud TPU with the specified name in the specified zone. -func (g *Cloud) GetTPU(ctx context.Context, name, zone string) (*tpuapi.Node, error) { - mc := newTPUMetricContext("get", zone) - - name = getTPUName(g.projectID, zone, name) - node, err := g.tpuService.projects.Locations.Nodes.Get(name).Do() - if err != nil { - return nil, mc.Observe(err) - } - return node, mc.Observe(nil) -} - -// ListTPUs returns Cloud TPUs in the specified zone. -func (g *Cloud) ListTPUs(ctx context.Context, zone string) ([]*tpuapi.Node, error) { - mc := newTPUMetricContext("list", zone) - - parent := getTPUParentName(g.projectID, zone) - var nodes []*tpuapi.Node - var accumulator = func(response *tpuapi.ListNodesResponse) error { - nodes = append(nodes, response.Nodes...) - return nil - } - err := g.tpuService.projects.Locations.Nodes.List(parent).Pages(ctx, accumulator) - if err != nil { - return nil, mc.Observe(err) - } - return nodes, mc.Observe(nil) -} - -// ListLocations returns the zones where Cloud TPUs are available. -func (g *Cloud) ListLocations(ctx context.Context) ([]*tpuapi.Location, error) { - mc := newTPUMetricContext("list_locations", "") - parent := getTPUProjectURL(g.projectID) - var locations []*tpuapi.Location - var accumulator = func(response *tpuapi.ListLocationsResponse) error { - locations = append(locations, response.Locations...) - return nil - } - err := g.tpuService.projects.Locations.List(parent).Pages(ctx, accumulator) - if err != nil { - return nil, mc.Observe(err) - } - return locations, mc.Observe(nil) -} - -// waitForTPUOp checks whether the op is done every 30 seconds before the ctx -// is cancelled. -func (g *Cloud) waitForTPUOp(ctx context.Context, op *tpuapi.Operation) (*tpuapi.Operation, error) { - if err := wait.PollInfinite(30*time.Second, func() (bool, error) { - // Check if context has been cancelled. - select { - case <-ctx.Done(): - klog.V(3).Infof("Context for operation %q has been cancelled: %s", op.Name, ctx.Err()) - return true, ctx.Err() - default: - } - - klog.V(3).Infof("Waiting for operation %q to complete...", op.Name) - - start := time.Now() - g.operationPollRateLimiter.Accept() - duration := time.Since(start) - if duration > 5*time.Second { - klog.V(2).Infof("Getting operation %q throttled for %v", op.Name, duration) - } - - var err error - op, err = g.tpuService.projects.Locations.Operations.Get(op.Name).Do() - if err != nil { - return true, err - } - if op.Done { - klog.V(3).Infof("Operation %q has completed", op.Name) - return true, nil - } - return false, nil - }); err != nil { - return nil, fmt.Errorf("failed to wait for operation %q: %s", op.Name, err) - } - return op, nil -} - -// newTPUMetricContext returns a new metricContext used for recording metrics -// of Cloud TPU API calls. -func newTPUMetricContext(request, zone string) *metricContext { - return newGenericMetricContext("tpus", request, unusedMetricLabel, zone, "v1") -} - -// getErrorFromTPUOp returns the error in the failed op, or nil if the op -// succeed. -func getErrorFromTPUOp(op *tpuapi.Operation) error { - if op != nil && op.Error != nil { - return &googleapi.Error{ - Code: op.ServerResponse.HTTPStatusCode, - Message: op.Error.Message, - } - } - return nil -} - -func getTPUProjectURL(project string) string { - return fmt.Sprintf("projects/%s", project) -} - -func getTPUParentName(project, zone string) string { - return fmt.Sprintf("projects/%s/locations/%s", project, zone) -} - -func getTPUName(project, zone, name string) string { - return fmt.Sprintf("projects/%s/locations/%s/nodes/%s", project, zone, name) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_urlmap.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_urlmap.go deleted file mode 100644 index 5405ed4dd9aa9..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_urlmap.go +++ /dev/null @@ -1,79 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -func newURLMapMetricContext(request string) *metricContext { - return newGenericMetricContext("urlmap", request, unusedMetricLabel, unusedMetricLabel, computeV1Version) -} - -// GetURLMap returns the UrlMap by name. -func (g *Cloud) GetURLMap(name string) (*compute.UrlMap, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newURLMapMetricContext("get") - v, err := g.c.UrlMaps().Get(ctx, meta.GlobalKey(name)) - return v, mc.Observe(err) -} - -// CreateURLMap creates a url map -func (g *Cloud) CreateURLMap(urlMap *compute.UrlMap) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newURLMapMetricContext("create") - return mc.Observe(g.c.UrlMaps().Insert(ctx, meta.GlobalKey(urlMap.Name), urlMap)) -} - -// UpdateURLMap applies the given UrlMap as an update -func (g *Cloud) UpdateURLMap(urlMap *compute.UrlMap) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newURLMapMetricContext("update") - return mc.Observe(g.c.UrlMaps().Update(ctx, meta.GlobalKey(urlMap.Name), urlMap)) -} - -// DeleteURLMap deletes a url map by name. -func (g *Cloud) DeleteURLMap(name string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newURLMapMetricContext("delete") - return mc.Observe(g.c.UrlMaps().Delete(ctx, meta.GlobalKey(name))) -} - -// ListURLMaps lists all UrlMaps in the project. -func (g *Cloud) ListURLMaps() ([]*compute.UrlMap, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newURLMapMetricContext("list") - v, err := g.c.UrlMaps().List(ctx, filter.None) - return v, mc.Observe(err) -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_util.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_util.go deleted file mode 100644 index 06f40ce302f84..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_util.go +++ /dev/null @@ -1,418 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "errors" - "fmt" - "net" - "net/http" - "regexp" - "sort" - "strings" - "sync" - - "cloud.google.com/go/compute/metadata" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock" - compute "google.golang.org/api/compute/v1" - "google.golang.org/api/googleapi" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/kubernetes/fake" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/tools/record" - servicehelper "k8s.io/cloud-provider/service/helpers" - netutils "k8s.io/utils/net" -) - -const ( - // NetLBFinalizerV2 is the finalizer used by newer controllers that manage L4 External LoadBalancer services. - NetLBFinalizerV2 = "gke.networking.io/l4-netlb-v2" -) - -func fakeGCECloud(vals TestClusterValues) (*Cloud, error) { - gce := NewFakeGCECloud(vals) - - gce.AlphaFeatureGate = NewAlphaFeatureGate([]string{}) - gce.nodeInformerSynced = func() bool { return true } - gce.client = fake.NewSimpleClientset() - gce.eventRecorder = &record.FakeRecorder{} - - mockGCE := gce.c.(*cloud.MockGCE) - mockGCE.MockTargetPools.AddInstanceHook = mock.AddInstanceHook - mockGCE.MockTargetPools.RemoveInstanceHook = mock.RemoveInstanceHook - mockGCE.MockForwardingRules.InsertHook = mock.InsertFwdRuleHook - mockGCE.MockAddresses.InsertHook = mock.InsertAddressHook - mockGCE.MockAlphaAddresses.InsertHook = mock.InsertAlphaAddressHook - mockGCE.MockAlphaAddresses.X = mock.AddressAttributes{} - mockGCE.MockAddresses.X = mock.AddressAttributes{} - - mockGCE.MockInstanceGroups.X = mock.InstanceGroupAttributes{ - InstanceMap: make(map[meta.Key]map[string]*compute.InstanceWithNamedPorts), - Lock: &sync.Mutex{}, - } - mockGCE.MockInstanceGroups.AddInstancesHook = mock.AddInstancesHook - mockGCE.MockInstanceGroups.RemoveInstancesHook = mock.RemoveInstancesHook - mockGCE.MockInstanceGroups.ListInstancesHook = mock.ListInstancesHook - - mockGCE.MockRegionBackendServices.UpdateHook = mock.UpdateRegionBackendServiceHook - mockGCE.MockHealthChecks.UpdateHook = mock.UpdateHealthCheckHook - mockGCE.MockFirewalls.UpdateHook = mock.UpdateFirewallHook - mockGCE.MockFirewalls.PatchHook = mock.UpdateFirewallHook - - keyGA := meta.GlobalKey("key-ga") - mockGCE.MockZones.Objects[*keyGA] = &cloud.MockZonesObj{ - Obj: &compute.Zone{Name: vals.ZoneName, Region: gce.getRegionLink(vals.Region)}, - } - - return gce, nil -} - -func registerTargetPoolAddInstanceHook(gce *Cloud, callback func(*compute.TargetPoolsAddInstanceRequest)) error { - mockGCE, ok := gce.c.(*cloud.MockGCE) - if !ok { - return fmt.Errorf("couldn't cast cloud to mockGCE: %#v", gce) - } - existingHandler := mockGCE.MockTargetPools.AddInstanceHook - hook := func(ctx context.Context, key *meta.Key, req *compute.TargetPoolsAddInstanceRequest, m *cloud.MockTargetPools, options ...cloud.Option) error { - callback(req) - return existingHandler(ctx, key, req, m) - } - mockGCE.MockTargetPools.AddInstanceHook = hook - return nil -} - -func registerTargetPoolRemoveInstanceHook(gce *Cloud, callback func(*compute.TargetPoolsRemoveInstanceRequest)) error { - mockGCE, ok := gce.c.(*cloud.MockGCE) - if !ok { - return fmt.Errorf("couldn't cast cloud to mockGCE: %#v", gce) - } - existingHandler := mockGCE.MockTargetPools.RemoveInstanceHook - hook := func(ctx context.Context, key *meta.Key, req *compute.TargetPoolsRemoveInstanceRequest, m *cloud.MockTargetPools, options ...cloud.Option) error { - callback(req) - return existingHandler(ctx, key, req, m) - } - mockGCE.MockTargetPools.RemoveInstanceHook = hook - return nil -} - -type gceInstance struct { - Zone string - Name string - ID uint64 - Disks []*compute.AttachedDisk - Type string -} - -var ( - autoSubnetIPRange = &net.IPNet{ - IP: netutils.ParseIPSloppy("10.128.0.0"), - Mask: net.CIDRMask(9, 32), - } -) - -var providerIDRE = regexp.MustCompile(`^` + ProviderName + `://([^/]+)/([^/]+)/([^/]+)$`) - -func getProjectAndZone() (string, string, error) { - result, err := metadata.Get("instance/zone") - if err != nil { - return "", "", err - } - parts := strings.Split(result, "/") - if len(parts) != 4 { - return "", "", fmt.Errorf("unexpected response: %s", result) - } - zone := parts[3] - projectID, err := metadata.ProjectID() - if err != nil { - return "", "", err - } - return projectID, zone, nil -} - -func (g *Cloud) raiseFirewallChangeNeededEvent(svc *v1.Service, cmd string) { - msg := fmt.Sprintf("Firewall change required by security admin: `%v`", cmd) - if g.eventRecorder != nil && svc != nil { - g.eventRecorder.Event(svc, v1.EventTypeNormal, "LoadBalancerManualChange", msg) - } -} - -// FirewallToGCloudCreateCmd generates a gcloud command to create a firewall with specified params -func FirewallToGCloudCreateCmd(fw *compute.Firewall, projectID string) string { - args := firewallToGcloudArgs(fw, projectID) - return fmt.Sprintf("gcloud compute firewall-rules create %v --network %v %v", fw.Name, getNameFromLink(fw.Network), args) -} - -// FirewallToGCloudUpdateCmd generates a gcloud command to update a firewall to specified params -func FirewallToGCloudUpdateCmd(fw *compute.Firewall, projectID string) string { - args := firewallToGcloudArgs(fw, projectID) - return fmt.Sprintf("gcloud compute firewall-rules update %v %v", fw.Name, args) -} - -// FirewallToGCloudDeleteCmd generates a gcloud command to delete a firewall to specified params -func FirewallToGCloudDeleteCmd(fwName, projectID string) string { - return fmt.Sprintf("gcloud compute firewall-rules delete %v --project %v", fwName, projectID) -} - -func firewallToGcloudArgs(fw *compute.Firewall, projectID string) string { - var allPorts []string - for _, a := range fw.Allowed { - for _, p := range a.Ports { - allPorts = append(allPorts, fmt.Sprintf("%v:%v", a.IPProtocol, p)) - } - } - - // Sort all slices to prevent the event from being duped - sort.Strings(allPorts) - allow := strings.Join(allPorts, ",") - sort.Strings(fw.SourceRanges) - srcRngs := strings.Join(fw.SourceRanges, ",") - sort.Strings(fw.TargetTags) - targets := strings.Join(fw.TargetTags, ",") - return fmt.Sprintf("--description %q --allow %v --source-ranges %v --target-tags %v --project %v", fw.Description, allow, srcRngs, targets, projectID) -} - -// Take a GCE instance 'hostname' and break it down to something that can be fed -// to the GCE API client library. Basically this means reducing 'kubernetes- -// node-2.c.my-proj.internal' to 'kubernetes-node-2' if necessary. -func canonicalizeInstanceName(name string) string { - ix := strings.Index(name, ".") - if ix != -1 { - name = name[:ix] - } - return name -} - -// Returns the last component of a URL, i.e. anything after the last slash -// If there is no slash, returns the whole string -func lastComponent(s string) string { - lastSlash := strings.LastIndex(s, "/") - if lastSlash != -1 { - s = s[lastSlash+1:] - } - return s -} - -// mapNodeNameToInstanceName maps a k8s NodeName to a GCE Instance Name -// This is a simple string cast. -func mapNodeNameToInstanceName(nodeName types.NodeName) string { - return string(nodeName) -} - -// GetGCERegion returns region of the gce zone. Zone names -// are of the form: ${region-name}-${ix}. -// For example, "us-central1-b" has a region of "us-central1". -// So we look for the last '-' and trim to just before that. -func GetGCERegion(zone string) (string, error) { - ix := strings.LastIndex(zone, "-") - if ix == -1 { - return "", fmt.Errorf("unexpected zone: %s", zone) - } - return zone[:ix], nil -} - -func isHTTPErrorCode(err error, code int) bool { - apiErr, ok := err.(*googleapi.Error) - return ok && apiErr.Code == code -} - -func isInUsedByError(err error) bool { - apiErr, ok := err.(*googleapi.Error) - if !ok || apiErr.Code != http.StatusBadRequest { - return false - } - return strings.Contains(apiErr.Message, "being used by") -} - -// splitProviderID splits a provider's id into core components. -// A providerID is build out of '${ProviderName}://${project-id}/${zone}/${instance-name}' -// See cloudprovider.GetInstanceProviderID. -func splitProviderID(providerID string) (project, zone, instance string, err error) { - matches := providerIDRE.FindStringSubmatch(providerID) - if len(matches) != 4 { - return "", "", "", errors.New("error splitting providerID") - } - return matches[1], matches[2], matches[3], nil -} - -func equalStringSets(x, y []string) bool { - if len(x) != len(y) { - return false - } - xString := sets.NewString(x...) - yString := sets.NewString(y...) - return xString.Equal(yString) -} - -func isNotFound(err error) bool { - return isHTTPErrorCode(err, http.StatusNotFound) -} - -func ignoreNotFound(err error) error { - if err == nil || isNotFound(err) { - return nil - } - return err -} - -func isNotFoundOrInUse(err error) bool { - return isNotFound(err) || isInUsedByError(err) -} - -func isForbidden(err error) bool { - return isHTTPErrorCode(err, http.StatusForbidden) -} - -func makeGoogleAPINotFoundError(message string) error { - return &googleapi.Error{Code: http.StatusNotFound, Message: message} -} - -// containsCIDR returns true if outer contains inner. -func containsCIDR(outer, inner *net.IPNet) bool { - return outer.Contains(firstIPInRange(inner)) && outer.Contains(lastIPInRange(inner)) -} - -// firstIPInRange returns the first IP in a given IP range. -func firstIPInRange(ipNet *net.IPNet) net.IP { - return ipNet.IP.Mask(ipNet.Mask) -} - -// lastIPInRange returns the last IP in a given IP range. -func lastIPInRange(cidr *net.IPNet) net.IP { - ip := append([]byte{}, cidr.IP...) - for i, b := range cidr.Mask { - ip[i] |= ^b - } - return ip -} - -// subnetsInCIDR takes a list of subnets for a single region and -// returns subnets which exists in the specified CIDR range. -func subnetsInCIDR(subnets []*compute.Subnetwork, cidr *net.IPNet) ([]*compute.Subnetwork, error) { - var res []*compute.Subnetwork - for _, subnet := range subnets { - _, subnetRange, err := netutils.ParseCIDRSloppy(subnet.IpCidrRange) - if err != nil { - return nil, fmt.Errorf("unable to parse CIDR %q for subnet %q: %v", subnet.IpCidrRange, subnet.Name, err) - } - if containsCIDR(cidr, subnetRange) { - res = append(res, subnet) - } - } - return res, nil -} - -type netType string - -const ( - netTypeLegacy netType = "LEGACY" - netTypeAuto netType = "AUTO" - netTypeCustom netType = "CUSTOM" -) - -func typeOfNetwork(network *compute.Network) netType { - if network.IPv4Range != "" { - return netTypeLegacy - } - - if network.AutoCreateSubnetworks { - return netTypeAuto - } - - return netTypeCustom -} - -func getLocationName(project, zoneOrRegion string) string { - return fmt.Sprintf("projects/%s/locations/%s", project, zoneOrRegion) -} - -func addFinalizer(service *v1.Service, kubeClient v1core.CoreV1Interface, key string) error { - if hasFinalizer(service, key) { - return nil - } - - // Make a copy so we don't mutate the shared informer cache. - updated := service.DeepCopy() - updated.ObjectMeta.Finalizers = append(updated.ObjectMeta.Finalizers, key) - - _, err := servicehelper.PatchService(kubeClient, service, updated) - return err -} - -// removeFinalizer patches the service to remove finalizer. -func removeFinalizer(service *v1.Service, kubeClient v1core.CoreV1Interface, key string) error { - if !hasFinalizer(service, key) { - return nil - } - - // Make a copy so we don't mutate the shared informer cache. - updated := service.DeepCopy() - updated.ObjectMeta.Finalizers = removeString(updated.ObjectMeta.Finalizers, key) - - _, err := servicehelper.PatchService(kubeClient, service, updated) - return err -} - -// hasFinalizer returns if the given service has the specified key in its list of finalizers. -func hasFinalizer(service *v1.Service, key string) bool { - for _, finalizer := range service.ObjectMeta.Finalizers { - if finalizer == key { - return true - } - } - return false -} - -// removeString returns a newly created []string that contains all items from slice that -// are not equal to s. -func removeString(slice []string, s string) []string { - var newSlice []string - for _, item := range slice { - if item != s { - newSlice = append(newSlice, item) - } - } - return newSlice -} - -// usesL4RBS checks if service uses Regional Backend Service as a Backend. -// Such services implemented in other controllers and -// should not be handled by Service Controller. -func usesL4RBS(service *v1.Service, forwardingRule *compute.ForwardingRule) bool { - // Detect RBS by annotation - if val, ok := service.Annotations[RBSAnnotationKey]; ok && val == RBSEnabled { - return true - } - // Detect RBS by finalizer - if hasFinalizer(service, NetLBFinalizerV2) { - return true - } - // Detect RBS by existing forwarding rule with Backend Service attached - if forwardingRule != nil && forwardingRule.BackendService != "" { - return true - } - - return false -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_zones.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_zones.go deleted file mode 100644 index 9ddeaafc2d8e2..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/gce_zones.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "fmt" - "strings" - - compute "google.golang.org/api/compute/v1" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" - "k8s.io/apimachinery/pkg/types" - cloudprovider "k8s.io/cloud-provider" -) - -func newZonesMetricContext(request, region string) *metricContext { - return newGenericMetricContext("zones", request, region, unusedMetricLabel, computeV1Version) -} - -// GetZone creates a cloudprovider.Zone of the current zone and region -func (g *Cloud) GetZone(ctx context.Context) (cloudprovider.Zone, error) { - return cloudprovider.Zone{ - FailureDomain: g.localZone, - Region: g.region, - }, nil -} - -// GetZoneByProviderID implements Zones.GetZoneByProviderID -// This is particularly useful in external cloud providers where the kubelet -// does not initialize node data. -func (g *Cloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error) { - _, zone, _, err := splitProviderID(providerID) - if err != nil { - return cloudprovider.Zone{}, err - } - region, err := GetGCERegion(zone) - if err != nil { - return cloudprovider.Zone{}, err - } - return cloudprovider.Zone{FailureDomain: zone, Region: region}, nil -} - -// GetZoneByNodeName implements Zones.GetZoneByNodeName -// This is particularly useful in external cloud providers where the kubelet -// does not initialize node data. -func (g *Cloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error) { - instanceName := mapNodeNameToInstanceName(nodeName) - instance, err := g.getInstanceByName(instanceName) - if err != nil { - return cloudprovider.Zone{}, err - } - region, err := GetGCERegion(instance.Zone) - if err != nil { - return cloudprovider.Zone{}, err - } - return cloudprovider.Zone{FailureDomain: instance.Zone, Region: region}, nil -} - -// ListZonesInRegion returns all zones in a GCP region -func (g *Cloud) ListZonesInRegion(region string) ([]*compute.Zone, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newZonesMetricContext("list", region) - // Use regex match instead of an exact regional link constructed from getRegionalLink below. - // See comments in issue kubernetes/kubernetes#87905 - list, err := g.c.Zones().List(ctx, filter.Regexp("region", fmt.Sprintf(".*/regions/%s", region))) - if err != nil { - return nil, mc.Observe(err) - } - return list, mc.Observe(err) -} - -func (g *Cloud) getRegionLink(region string) string { - return g.projectsBasePath + strings.Join([]string{g.projectID, "regions", region}, "/") -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/metrics.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/metrics.go deleted file mode 100644 index 6fb8e5f2afeee..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/metrics.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "time" - - "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" -) - -const ( - // Version strings for recording metrics. - computeV1Version = "v1" - computeAlphaVersion = "alpha" - computeBetaVersion = "beta" -) - -type apiCallMetrics struct { - latency *metrics.HistogramVec - errors *metrics.CounterVec -} - -var ( - metricLabels = []string{ - "request", // API function that is begin invoked. - "region", // region (optional). - "zone", // zone (optional). - "version", // API version. - } - - apiMetrics = registerAPIMetrics() -) - -type metricContext struct { - start time.Time - // The cardinalities of attributes and metricLabels (defined above) must - // match, or prometheus will panic. - attributes []string -} - -// Value for an unused label in the metric dimension. -const unusedMetricLabel = "" - -// Observe the result of a API call. -func (mc *metricContext) Observe(err error) error { - apiMetrics.latency.WithLabelValues(mc.attributes...).Observe( - time.Since(mc.start).Seconds()) - if err != nil { - apiMetrics.errors.WithLabelValues(mc.attributes...).Inc() - } - - return err -} - -func newGenericMetricContext(prefix, request, region, zone, version string) *metricContext { - if len(zone) == 0 { - zone = unusedMetricLabel - } - if len(region) == 0 { - region = unusedMetricLabel - } - return &metricContext{ - start: time.Now(), - attributes: []string{prefix + "_" + request, region, zone, version}, - } -} - -// registerApiMetrics adds metrics definitions for a category of API calls. -func registerAPIMetrics() *apiCallMetrics { - metrics := &apiCallMetrics{ - latency: metrics.NewHistogramVec( - &metrics.HistogramOpts{ - Name: "cloudprovider_gce_api_request_duration_seconds", - Help: "Latency of a GCE API call", - StabilityLevel: metrics.ALPHA, - }, - metricLabels, - ), - errors: metrics.NewCounterVec( - &metrics.CounterOpts{ - Name: "cloudprovider_gce_api_request_errors", - Help: "Number of errors for an API call", - StabilityLevel: metrics.ALPHA, - }, - metricLabels, - ), - } - - legacyregistry.MustRegister(metrics.latency) - legacyregistry.MustRegister(metrics.errors) - - return metrics -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/support.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/support.go deleted file mode 100644 index 97a30c9c9e9b4..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/support.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" -) - -// gceProjectRouter sends requests to the appropriate project ID. -type gceProjectRouter struct { - gce *Cloud -} - -// ProjectID returns the project ID to be used for the given operation. -func (r *gceProjectRouter) ProjectID(ctx context.Context, version meta.Version, service string) string { - switch service { - case "Firewalls", "Routes", "Subnetworks", "Networks": - return r.gce.NetworkProjectID() - default: - return r.gce.projectID - } -} - -// gceRateLimiter implements cloud.RateLimiter. -type gceRateLimiter struct { - gce *Cloud -} - -// Accept blocks until the operation can be performed. -// -// TODO: the current cloud provider policy doesn't seem to be correct as it -// only rate limits the polling operations, but not the /submission/ of -// operations. -func (l *gceRateLimiter) Accept(ctx context.Context, key *cloud.RateLimitKey) error { - if key.Operation == "Get" && key.Service == "Operations" { - // Wait a minimum amount of time regardless of rate limiter. - rl := &cloud.MinimumRateLimiter{ - // Convert flowcontrol.RateLimiter into cloud.RateLimiter - RateLimiter: &cloud.AcceptRateLimiter{ - Acceptor: l.gce.operationPollRateLimiter, - }, - Minimum: operationPollInterval, - } - return rl.Accept(ctx, key) - } - return nil -} - -// Observe is a no-op func to satisfy cloud.RateLimiter -func (*gceRateLimiter) Observe(context.Context, error, *cloud.RateLimitKey) {} - -// CreateGCECloudWithCloud is a helper function to create an instance of Cloud with the -// given Cloud interface implementation. Typical usage is to use cloud.NewMockGCE to get a -// handle to a mock Cloud instance and then use that for testing. -func CreateGCECloudWithCloud(config *CloudConfig, c cloud.Cloud) (*Cloud, error) { - gceCloud, err := CreateGCECloud(config) - if err == nil { - gceCloud.c = c - } - return gceCloud, err -} diff --git a/vendor/k8s.io/cloud-provider-gcp/providers/gce/token_source.go b/vendor/k8s.io/cloud-provider-gcp/providers/gce/token_source.go deleted file mode 100644 index c7cd742dcac7d..0000000000000 --- a/vendor/k8s.io/cloud-provider-gcp/providers/gce/token_source.go +++ /dev/null @@ -1,130 +0,0 @@ -//go:build !providerless -// +build !providerless - -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gce - -import ( - "context" - "encoding/json" - "net/http" - "strings" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "google.golang.org/api/googleapi" - - "k8s.io/client-go/util/flowcontrol" - "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" -) - -const ( - // Max QPS to allow through to the token URL. - tokenURLQPS = .05 // back off to once every 20 seconds when failing - // Maximum burst of requests to token URL before limiting. - tokenURLBurst = 3 -) - -/* - * By default, all the following metrics are defined as falling under - * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#stability-classes) - * - * Promoting the stability level of the metric is a responsibility of the component owner, since it - * involves explicitly acknowledging support for the metric across multiple releases, in accordance with - * the metric stability policy. - */ -var ( - getTokenCounter = metrics.NewCounter( - &metrics.CounterOpts{ - Name: "get_token_count", - Help: "Counter of total Token() requests to the alternate token source", - StabilityLevel: metrics.ALPHA, - }, - ) - getTokenFailCounter = metrics.NewCounter( - &metrics.CounterOpts{ - Name: "get_token_fail_count", - Help: "Counter of failed Token() requests to the alternate token source", - StabilityLevel: metrics.ALPHA, - }, - ) -) - -func init() { - legacyregistry.MustRegister(getTokenCounter) - legacyregistry.MustRegister(getTokenFailCounter) -} - -// AltTokenSource is the structure holding the data for the functionality needed to generates tokens -type AltTokenSource struct { - oauthClient *http.Client - tokenURL string - tokenBody string `datapolicy:"token"` - throttle flowcontrol.RateLimiter -} - -// Token returns a token which may be used for authentication -func (a *AltTokenSource) Token() (*oauth2.Token, error) { - a.throttle.Accept() - getTokenCounter.Inc() - t, err := a.token() - if err != nil { - getTokenFailCounter.Inc() - } - return t, err -} - -func (a *AltTokenSource) token() (*oauth2.Token, error) { - req, err := http.NewRequest("POST", a.tokenURL, strings.NewReader(a.tokenBody)) - if err != nil { - return nil, err - } - res, err := a.oauthClient.Do(req) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - var tok struct { - AccessToken string `json:"accessToken" datapolicy:"token"` - ExpireTime time.Time `json:"expireTime"` - } - if err := json.NewDecoder(res.Body).Decode(&tok); err != nil { - return nil, err - } - return &oauth2.Token{ - AccessToken: tok.AccessToken, - Expiry: tok.ExpireTime, - }, nil -} - -// NewAltTokenSource constructs a new alternate token source for generating tokens. -func NewAltTokenSource(tokenURL, tokenBody string) oauth2.TokenSource { - client := oauth2.NewClient(context.Background(), google.ComputeTokenSource("")) - a := &AltTokenSource{ - oauthClient: client, - tokenURL: tokenURL, - tokenBody: tokenBody, - throttle: flowcontrol.NewTokenBucketRateLimiter(tokenURLQPS, tokenURLBurst), - } - return oauth2.ReuseTokenSource(nil, a) -} diff --git a/vendor/k8s.io/cloud-provider/volume/constants.go b/vendor/k8s.io/cloud-provider/volume/constants.go deleted file mode 100644 index d05f64ae25d5c..0000000000000 --- a/vendor/k8s.io/cloud-provider/volume/constants.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package volume - -const ( - // ProvisionedVolumeName is the name of a volume in an external cloud - // that is being provisioned and thus should be ignored by rest of Kubernetes. - ProvisionedVolumeName = "placeholder-for-provisioning" - - // LabelMultiZoneDelimiter separates zones for volumes - LabelMultiZoneDelimiter = "__" -) diff --git a/vendor/k8s.io/cloud-provider/volume/errors/errors.go b/vendor/k8s.io/cloud-provider/volume/errors/errors.go deleted file mode 100644 index 2e5adb1769d5c..0000000000000 --- a/vendor/k8s.io/cloud-provider/volume/errors/errors.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package errors - -import ( - k8stypes "k8s.io/apimachinery/pkg/types" -) - -// NewDeletedVolumeInUseError returns a new instance of DeletedVolumeInUseError -// error. -func NewDeletedVolumeInUseError(message string) error { - return deletedVolumeInUseError(message) -} - -type deletedVolumeInUseError string - -var _ error = deletedVolumeInUseError("") - -// IsDeletedVolumeInUse returns true if an error returned from Delete() is -// deletedVolumeInUseError -func IsDeletedVolumeInUse(err error) bool { - switch err.(type) { - case deletedVolumeInUseError: - return true - default: - return false - } -} - -func (err deletedVolumeInUseError) Error() string { - return string(err) -} - -// DanglingAttachError indicates volume is attached to a different node -// than we expected. -type DanglingAttachError struct { - msg string - CurrentNode k8stypes.NodeName - DevicePath string -} - -func (err *DanglingAttachError) Error() string { - return err.msg -} - -// NewDanglingError create a new dangling error -func NewDanglingError(msg string, node k8stypes.NodeName, devicePath string) error { - return &DanglingAttachError{ - msg: msg, - CurrentNode: node, - DevicePath: devicePath, - } -} - -// IsDanglingError returns true if an error is DanglingAttachError -func IsDanglingError(err error) bool { - switch err.(type) { - case *DanglingAttachError: - return true - default: - return false - } -} diff --git a/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go b/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go deleted file mode 100644 index 1018157380327..0000000000000 --- a/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package helpers - -import ( - "fmt" - "math" - "math/bits" - - "k8s.io/apimachinery/pkg/api/resource" -) - -/* -The Cloud Provider's volume plugins provision disks for corresponding -PersistentVolumeClaims. Cloud Providers use different allocation unit for their -disk sizes. AWS allows you to specify the size as an integer amount of GiB, -while Portworx expects bytes for example. On AWS, if you want a volume of -1500MiB, the actual call to the AWS API should therefore be for a 2GiB disk. -This file contains functions that help rounding a storage request based on a -Cloud Provider's allocation unit. -*/ - -const ( - // GB - GigaByte size - GB = 1000 * 1000 * 1000 - // GiB - GibiByte size - GiB = 1024 * 1024 * 1024 - - // MB - MegaByte size - MB = 1000 * 1000 - // MiB - MebiByte size - MiB = 1024 * 1024 - - // KB - KiloByte size - KB = 1000 - // KiB - KibiByte size - KiB = 1024 -) - -// RoundUpToGiB rounds up given quantity upto chunks of GiB -func RoundUpToGiB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, GiB) -} - -// RoundUpToMB rounds up given quantity to chunks of MB -func RoundUpToMB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, MB) -} - -// RoundUpToMiB rounds up given quantity upto chunks of MiB -func RoundUpToMiB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, MiB) -} - -// RoundUpToKB rounds up given quantity to chunks of KB -func RoundUpToKB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, KB) -} - -// RoundUpToKiB rounds up given quantity to chunks of KiB -func RoundUpToKiB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, KiB) -} - -// RoundUpToB rounds up given quantity to chunks of bytes -func RoundUpToB(size resource.Quantity) (int64, error) { - return roundUpSizeInt64(size, 1) -} - -// RoundUpToGiBInt rounds up given quantity upto chunks of GiB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToGiBInt(size resource.Quantity) (int, error) { - return roundUpSizeInt(size, GiB) -} - -// RoundUpToMBInt rounds up given quantity to chunks of MB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToMBInt(size resource.Quantity) (int, error) { - return roundUpSizeInt(size, MB) -} - -// RoundUpToMiBInt rounds up given quantity upto chunks of MiB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToMiBInt(size resource.Quantity) (int, error) { - return roundUpSizeInt(size, MiB) -} - -// RoundUpToKBInt rounds up given quantity to chunks of KB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToKBInt(size resource.Quantity) (int, error) { - return roundUpSizeInt(size, KB) -} - -// RoundUpToKiBInt rounds up given quantity upto chunks of KiB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToKiBInt(size resource.Quantity) (int, error) { - return roundUpSizeInt(size, KiB) -} - -// RoundUpToGiBInt32 rounds up given quantity up to chunks of GiB. It returns an -// int32 instead of an int64 and an error if there's overflow -func RoundUpToGiBInt32(size resource.Quantity) (int32, error) { - return roundUpSizeInt32(size, GiB) -} - -// roundUpSizeInt calculates how many allocation units are needed to accommodate -// a volume of a given size. It returns an int and an error if there's overflow -func roundUpSizeInt(size resource.Quantity, allocationUnitBytes int64) (int, error) { - if bits.UintSize == 32 { - res, err := roundUpSizeInt32(size, allocationUnitBytes) - return int(res), err - } - res, err := roundUpSizeInt64(size, allocationUnitBytes) - return int(res), err -} - -// roundUpSizeInt32 calculates how many allocation units are needed to accommodate -// a volume of a given size. It returns an int32 and an error if there's overflow -func roundUpSizeInt32(size resource.Quantity, allocationUnitBytes int64) (int32, error) { - roundedUpInt32, err := roundUpSizeInt64(size, allocationUnitBytes) - if err != nil { - return 0, err - } - if roundedUpInt32 > math.MaxInt32 { - return 0, fmt.Errorf("quantity %s is too great, overflows int32", size.String()) - } - return int32(roundedUpInt32), nil -} - -// roundUpSizeInt64 calculates how many allocation units are needed to accommodate -// a volume of a given size. It returns an int64 and an error if there's overflow -func roundUpSizeInt64(size resource.Quantity, allocationUnitBytes int64) (int64, error) { - // Use CmpInt64() to find out if the value of "size" would overflow an - // int64 and therefore have Value() return a wrong result. Then, retrieve - // the value as int64 and perform the rounding. - // It's not convenient to use AsScale() and related functions as they don't - // support BinarySI format, nor can we use AsInt64() directly since it's - // only implemented for int64 scaled numbers (int64Amount). - - // CmpInt64() actually returns 0 when comparing an amount bigger than MaxInt64. - if size.CmpInt64(math.MaxInt64) >= 0 { - return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) - } - volumeSizeBytes := size.Value() - - roundedUp := volumeSizeBytes / allocationUnitBytes - if volumeSizeBytes%allocationUnitBytes > 0 { - roundedUp++ - } - return roundedUp, nil -} diff --git a/vendor/k8s.io/cloud-provider/volume/helpers/zones.go b/vendor/k8s.io/cloud-provider/volume/helpers/zones.go deleted file mode 100644 index ff3a392846f1e..0000000000000 --- a/vendor/k8s.io/cloud-provider/volume/helpers/zones.go +++ /dev/null @@ -1,313 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package helpers - -import ( - "fmt" - "hash/fnv" - "math/rand" - "strconv" - "strings" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - cloudvolume "k8s.io/cloud-provider/volume" - "k8s.io/klog/v2" -) - -// LabelZonesToSet converts a PV label value from string containing a delimited list of zones to set -func LabelZonesToSet(labelZonesValue string) (sets.String, error) { - return stringToSet(labelZonesValue, cloudvolume.LabelMultiZoneDelimiter) -} - -// ZonesSetToLabelValue converts zones set to label value -func ZonesSetToLabelValue(strSet sets.String) string { - return strings.Join(strSet.UnsortedList(), cloudvolume.LabelMultiZoneDelimiter) -} - -// ZonesToSet converts a string containing a comma separated list of zones to set -func ZonesToSet(zonesString string) (sets.String, error) { - zones, err := stringToSet(zonesString, ",") - if err != nil { - return nil, fmt.Errorf("error parsing zones %s, must be strings separated by commas: %v", zonesString, err) - } - return zones, nil -} - -// StringToSet converts a string containing list separated by specified delimiter to a set -func stringToSet(str, delimiter string) (sets.String, error) { - zonesSlice := strings.Split(str, delimiter) - zonesSet := make(sets.String) - for _, zone := range zonesSlice { - trimmedZone := strings.TrimSpace(zone) - if trimmedZone == "" { - return make(sets.String), fmt.Errorf( - "%q separated list (%q) must not contain an empty string", - delimiter, - str) - } - zonesSet.Insert(trimmedZone) - } - return zonesSet, nil -} - -// LabelZonesToList converts a PV label value from string containing a delimited list of zones to list -func LabelZonesToList(labelZonesValue string) ([]string, error) { - return stringToList(labelZonesValue, cloudvolume.LabelMultiZoneDelimiter) -} - -// StringToList converts a string containing list separated by specified delimiter to a list -func stringToList(str, delimiter string) ([]string, error) { - zonesSlice := make([]string, 0) - for _, zone := range strings.Split(str, delimiter) { - trimmedZone := strings.TrimSpace(zone) - if trimmedZone == "" { - return nil, fmt.Errorf( - "%q separated list (%q) must not contain an empty string", - delimiter, - str) - } - zonesSlice = append(zonesSlice, trimmedZone) - } - return zonesSlice, nil -} - -// SelectZoneForVolume is a wrapper around SelectZonesForVolume -// to select a single zone for a volume based on parameters -func SelectZoneForVolume(zoneParameterPresent, zonesParameterPresent bool, zoneParameter string, zonesParameter, zonesWithNodes sets.String, node *v1.Node, allowedTopologies []v1.TopologySelectorTerm, pvcName string) (string, error) { - zones, err := SelectZonesForVolume(zoneParameterPresent, zonesParameterPresent, zoneParameter, zonesParameter, zonesWithNodes, node, allowedTopologies, pvcName, 1) - if err != nil { - return "", err - } - zone, ok := zones.PopAny() - if !ok { - return "", fmt.Errorf("could not determine a zone to provision volume in") - } - return zone, nil -} - -// SelectZonesForVolume selects zones for a volume based on several factors: -// node.zone, allowedTopologies, zone/zones parameters from storageclass, -// zones with active nodes from the cluster. The number of zones = replicas. -func SelectZonesForVolume(zoneParameterPresent, zonesParameterPresent bool, zoneParameter string, zonesParameter, zonesWithNodes sets.String, node *v1.Node, allowedTopologies []v1.TopologySelectorTerm, pvcName string, numReplicas uint32) (sets.String, error) { - if zoneParameterPresent && zonesParameterPresent { - return nil, fmt.Errorf("both zone and zones StorageClass parameters must not be used at the same time") - } - - var zoneFromNode string - // pick one zone from node if present - if node != nil { - // VolumeScheduling implicit since node is not nil - if zoneParameterPresent || zonesParameterPresent { - return nil, fmt.Errorf("zone[s] cannot be specified in StorageClass if VolumeBindingMode is set to WaitForFirstConsumer. Please specify allowedTopologies in StorageClass for constraining zones") - } - - // pick node's zone for one of the replicas - var ok bool - zoneFromNode, ok = node.ObjectMeta.Labels[v1.LabelTopologyZone] - if !ok { - zoneFromNode, ok = node.ObjectMeta.Labels[v1.LabelFailureDomainBetaZone] - if !ok { - return nil, fmt.Errorf("Either %s or %s Label for node missing", v1.LabelTopologyZone, v1.LabelFailureDomainBetaZone) - } - } - // if single replica volume and node with zone found, return immediately - if numReplicas == 1 { - return sets.NewString(zoneFromNode), nil - } - } - - // pick zone from allowedZones if specified - allowedZones, err := ZonesFromAllowedTopologies(allowedTopologies) - if err != nil { - return nil, err - } - - if (len(allowedTopologies) > 0) && (allowedZones.Len() == 0) { - return nil, fmt.Errorf("no matchLabelExpressions with %s key found in allowedTopologies. Please specify matchLabelExpressions with %s key", v1.LabelTopologyZone, v1.LabelTopologyZone) - } - - if allowedZones.Len() > 0 { - // VolumeScheduling implicit since allowedZones present - if zoneParameterPresent || zonesParameterPresent { - return nil, fmt.Errorf("zone[s] cannot be specified in StorageClass if allowedTopologies specified") - } - // scheduler will guarantee if node != null above, zoneFromNode is member of allowedZones. - // so if zoneFromNode != "", we can safely assume it is part of allowedZones. - zones, err := chooseZonesForVolumeIncludingZone(allowedZones, pvcName, zoneFromNode, numReplicas) - if err != nil { - return nil, fmt.Errorf("cannot process zones in allowedTopologies: %v", err) - } - return zones, nil - } - - // pick zone from parameters if present - if zoneParameterPresent { - if numReplicas > 1 { - return nil, fmt.Errorf("zone cannot be specified if desired number of replicas for pv is greather than 1. Please specify zones or allowedTopologies to specify desired zones") - } - return sets.NewString(zoneParameter), nil - } - - if zonesParameterPresent { - if uint32(zonesParameter.Len()) < numReplicas { - return nil, fmt.Errorf("not enough zones found in zones parameter to provision a volume with %d replicas. Found %d zones, need %d zones", numReplicas, zonesParameter.Len(), numReplicas) - } - // directly choose from zones parameter; no zone from node need to be considered - return ChooseZonesForVolume(zonesParameter, pvcName, numReplicas), nil - } - - // pick zone from zones with nodes - if zonesWithNodes.Len() > 0 { - // If node != null (and thus zoneFromNode != ""), zoneFromNode will be member of zonesWithNodes - zones, err := chooseZonesForVolumeIncludingZone(zonesWithNodes, pvcName, zoneFromNode, numReplicas) - if err != nil { - return nil, fmt.Errorf("cannot process zones where nodes exist in the cluster: %v", err) - } - return zones, nil - } - return nil, fmt.Errorf("cannot determine zones to provision volume in") -} - -// ZonesFromAllowedTopologies returns a list of zones specified in allowedTopologies -func ZonesFromAllowedTopologies(allowedTopologies []v1.TopologySelectorTerm) (sets.String, error) { - zones := make(sets.String) - for _, term := range allowedTopologies { - for _, exp := range term.MatchLabelExpressions { - if exp.Key == v1.LabelTopologyZone || exp.Key == v1.LabelFailureDomainBetaZone { - for _, value := range exp.Values { - zones.Insert(value) - } - } else { - return nil, fmt.Errorf("unsupported key found in matchLabelExpressions: %s", exp.Key) - } - } - } - return zones, nil -} - -// chooseZonesForVolumeIncludingZone is a wrapper around ChooseZonesForVolume that ensures zoneToInclude is chosen -// zoneToInclude can either be empty in which case it is ignored. If non-empty, zoneToInclude is expected to be member of zones. -// numReplicas is expected to be > 0 and <= zones.Len() -func chooseZonesForVolumeIncludingZone(zones sets.String, pvcName, zoneToInclude string, numReplicas uint32) (sets.String, error) { - if numReplicas == 0 { - return nil, fmt.Errorf("invalid number of replicas passed") - } - if uint32(zones.Len()) < numReplicas { - return nil, fmt.Errorf("not enough zones found to provision a volume with %d replicas. Need at least %d distinct zones for a volume with %d replicas", numReplicas, numReplicas, numReplicas) - } - if zoneToInclude != "" && !zones.Has(zoneToInclude) { - return nil, fmt.Errorf("zone to be included: %s needs to be member of set: %v", zoneToInclude, zones) - } - if uint32(zones.Len()) == numReplicas { - return zones, nil - } - if zoneToInclude != "" { - zones.Delete(zoneToInclude) - numReplicas = numReplicas - 1 - } - zonesChosen := ChooseZonesForVolume(zones, pvcName, numReplicas) - if zoneToInclude != "" { - zonesChosen.Insert(zoneToInclude) - } - return zonesChosen, nil -} - -// ChooseZonesForVolume is identical to ChooseZoneForVolume, but selects a multiple zones, for multi-zone disks. -func ChooseZonesForVolume(zones sets.String, pvcName string, numZones uint32) sets.String { - // No zones available, return empty set. - replicaZones := sets.NewString() - if zones.Len() == 0 { - return replicaZones - } - - // We create the volume in a zone determined by the name - // Eventually the scheduler will coordinate placement into an available zone - hash, index := getPVCNameHashAndIndexOffset(pvcName) - - // Zones.List returns zones in a consistent order (sorted) - // We do have a potential failure case where volumes will not be properly spread, - // if the set of zones changes during StatefulSet volume creation. However, this is - // probably relatively unlikely because we expect the set of zones to be essentially - // static for clusters. - // Hopefully we can address this problem if/when we do full scheduler integration of - // PVC placement (which could also e.g. avoid putting volumes in overloaded or - // unhealthy zones) - zoneSlice := zones.List() - - startingIndex := index * numZones - for index = startingIndex; index < startingIndex+numZones; index++ { - zone := zoneSlice[(hash+index)%uint32(len(zoneSlice))] - replicaZones.Insert(zone) - } - - klog.V(2).Infof("Creating volume for replicated PVC %q; chosen zones=%q from zones=%q", - pvcName, replicaZones.UnsortedList(), zoneSlice) - return replicaZones -} - -func getPVCNameHashAndIndexOffset(pvcName string) (hash uint32, index uint32) { - if pvcName == "" { - // We should always be called with a name; this shouldn't happen - klog.Warningf("No name defined during volume create; choosing random zone") - - hash = rand.Uint32() - } else { - hashString := pvcName - - // Heuristic to make sure that volumes in a StatefulSet are spread across zones - // StatefulSet PVCs are (currently) named ClaimName-StatefulSetName-Id, - // where Id is an integer index. - // Note though that if a StatefulSet pod has multiple claims, we need them to be - // in the same zone, because otherwise the pod will be unable to mount both volumes, - // and will be unschedulable. So we hash _only_ the "StatefulSetName" portion when - // it looks like `ClaimName-StatefulSetName-Id`. - // We continue to round-robin volume names that look like `Name-Id` also; this is a useful - // feature for users that are creating statefulset-like functionality without using statefulsets. - lastDash := strings.LastIndexByte(pvcName, '-') - if lastDash != -1 { - statefulsetIDString := pvcName[lastDash+1:] - statefulsetID, err := strconv.ParseUint(statefulsetIDString, 10, 32) - if err == nil { - // Offset by the statefulsetID, so we round-robin across zones - index = uint32(statefulsetID) - // We still hash the volume name, but only the prefix - hashString = pvcName[:lastDash] - - // In the special case where it looks like `ClaimName-StatefulSetName-Id`, - // hash only the StatefulSetName, so that different claims on the same StatefulSet - // member end up in the same zone. - // Note that StatefulSetName (and ClaimName) might themselves both have dashes. - // We actually just take the portion after the final - of ClaimName-StatefulSetName. - // For our purposes it doesn't much matter (just suboptimal spreading). - lastDash := strings.LastIndexByte(hashString, '-') - if lastDash != -1 { - hashString = hashString[lastDash+1:] - } - - klog.V(2).Infof("Detected StatefulSet-style volume name %q; index=%d", pvcName, index) - } - } - - // We hash the (base) volume name, so we don't bias towards the first N zones - h := fnv.New32() - h.Write([]byte(hashString)) - hash = h.Sum32() - } - - return hash, index -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0e5293dfdfb8b..c2469475d6673 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -119,12 +119,6 @@ github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/version github.com/AzureAD/microsoft-authentication-library-for-go/apps/managedidentity github.com/AzureAD/microsoft-authentication-library-for-go/apps/public -# github.com/GoogleCloudPlatform/k8s-cloud-provider v1.25.0 -## explicit; go 1.20 -github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud -github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter -github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta -github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock # github.com/MakeNowJust/heredoc v1.0.0 ## explicit; go 1.12 github.com/MakeNowJust/heredoc @@ -1235,10 +1229,7 @@ gomodules.xyz/jsonpatch/v2 # google.golang.org/api v0.257.0 ## explicit; go 1.24.0 google.golang.org/api/cloudresourcemanager/v1 -google.golang.org/api/compute/v0.alpha -google.golang.org/api/compute/v0.beta google.golang.org/api/compute/v1 -google.golang.org/api/container/v1 google.golang.org/api/dns/v1 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport @@ -1248,13 +1239,10 @@ google.golang.org/api/internal/cert google.golang.org/api/internal/gensupport google.golang.org/api/internal/impersonate google.golang.org/api/internal/third_party/uritemplates -google.golang.org/api/networkservices/v1 -google.golang.org/api/networkservices/v1beta1 google.golang.org/api/oauth2/v2 google.golang.org/api/option google.golang.org/api/option/internaloption google.golang.org/api/storage/v1 -google.golang.org/api/tpu/v1 google.golang.org/api/transport/http # google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 ## explicit; go 1.24.0 @@ -1905,9 +1893,6 @@ k8s.io/client-go/util/workqueue ## explicit; go 1.26.0 k8s.io/cloud-provider k8s.io/cloud-provider/service/helpers -k8s.io/cloud-provider/volume -k8s.io/cloud-provider/volume/errors -k8s.io/cloud-provider/volume/helpers # k8s.io/cloud-provider-aws v1.34.1 ## explicit; go 1.24.4 k8s.io/cloud-provider-aws/pkg/providers/v1 @@ -1917,9 +1902,6 @@ k8s.io/cloud-provider-aws/pkg/providers/v1/iface k8s.io/cloud-provider-aws/pkg/providers/v1/variant k8s.io/cloud-provider-aws/pkg/providers/v1/variant/fargate k8s.io/cloud-provider-aws/pkg/services -# k8s.io/cloud-provider-gcp/providers v0.28.2 -## explicit; go 1.20 -k8s.io/cloud-provider-gcp/providers/gce # k8s.io/component-base v0.36.0 ## explicit; go 1.26.0 k8s.io/component-base/cli/flag